From 23a9aaaf0cce1dcd276f8794bb4ea67e44f8c932 Mon Sep 17 00:00:00 2001 From: Marc Date: Thu, 21 Mar 2024 17:23:59 +0100 Subject: [PATCH] Improved clear filters for prices --- dist/apisearch-ui.js | 19 +++++++++++++++--- dist/apisearch-ui.js.map | 2 +- dist/apisearch-ui.min.js | 2 +- dist/apisearch-ui.min.js.map | 2 +- .../ClearFilters/ClearFiltersComponent.js | 19 +++++++++++++++--- .../ClearFilters/ClearFiltersComponent.tsx | 20 ++++++++++++++++--- .../ClearFilters/ClearFiltersProps.ts | 3 +++ 7 files changed, 55 insertions(+), 12 deletions(-) diff --git a/dist/apisearch-ui.js b/dist/apisearch-ui.js index 6793e702..8780a46d 100644 --- a/dist/apisearch-ui.js +++ b/dist/apisearch-ui.js @@ -9980,7 +9980,6 @@ var ClearFiltersComponent = /** @class */ (function (_super) { var filtersListClassName = props.classNames.filtersList; var filterClassName = props.classNames.filter; var containerTemplate = props.template.container; - var filterTemplate = props.template.filter; var appliedFiltersFormatted = this.state.appliedFilters; var individualFilterClear = null; var isEmptyClass = (this.state.appliedFilters.length === 0) ? "empty" : ""; @@ -9993,14 +9992,28 @@ var ClearFiltersComponent = /** @class */ (function (_super) { }); }); }); individualFilterClear = (0, preact_1.h)("ul", { className: "as-clearFilters__filtersList ".concat(filtersListClassName) }, values_1.map(function (filter) { + var _a, _b; + var isFilterPrice = filter.value.indexOf("..") >= 0; + var template = isFilterPrice + ? _this.props.template.filter_price + : _this.props.template.filter; + if (isFilterPrice) { + filter.parts = filter.value.replace(/[\[\]]/, "").split(".."); + if (((_a = filter.parts[0]) !== null && _a !== void 0 ? _a : "") === "0") { + template = _this.props.template.filter_price_only_to; + } + else if (((_b = filter.parts[1]) !== null && _b !== void 0 ? _b : "") === "") { + template = _this.props.template.filter_price_only_from; + } + } return (0, preact_1.h)("li", { className: "as-clearFilters__filter ".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, filter.value); } }, - (0, preact_1.h)(Template_1["default"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter })); + (0, preact_1.h)(Template_1["default"], { template: template, dictionary: _this.props.dictionary, data: filter })); })); } else if (props.showIndividualFilterClear) { individualFilterClear = (0, preact_1.h)("ul", { className: "as-clearFilters__filtersList ".concat(filtersListClassName) }, appliedFiltersFormatted.map(function (filter) { return (0, preact_1.h)("li", { className: "as-clearFilters__filter ".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, null); } }, - (0, preact_1.h)(Template_1["default"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter })); + (0, preact_1.h)(Template_1["default"], { template: _this.props.template.filter, dictionary: _this.props.dictionary, data: filter })); })); } return (this.state.showClearFilters) diff --git a/dist/apisearch-ui.js.map b/dist/apisearch-ui.js.map index fd3eee03..759dfd23 100644 --- a/dist/apisearch-ui.js.map +++ b/dist/apisearch-ui.js.map @@ -1 +1 @@ -{"version":3,"file":"apisearch-ui.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;ACVa;AACb,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,oBAAoB,mBAAO,CAAC,4EAAoB;AAChD,cAAc,mBAAO,CAAC,kEAAe;AACrC,cAAc,mBAAO,CAAC,kEAAe;AACrC,cAAc,mBAAO,CAAC,kEAAe;AACrC,eAAe,mBAAO,CAAC,oEAAgB;AACvC,uBAAuB,mBAAO,CAAC,8FAA6B;AAC5D,eAAe,mBAAO,CAAC,sEAAiB;AACxC,2BAA2B,mBAAO,CAAC,8FAA6B;AAChE,oBAAoB,mBAAO,CAAC,0FAA2B;AACvD,oBAAoB,mBAAO,CAAC,4EAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,4CAA4C,0DAA0D;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACrJL;AACb,kBAAkB;AAClB,cAAc,GAAG,wBAAwB,GAAG,sBAAsB;AAClE,gBAAgB,mBAAO,CAAC,iEAAW;AACnC,sBAAsB;AACtB,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,kDAAkD;AAClD,iCAAiC;AACjC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,2BAA2B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,oDAAoD;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC9GD;AACb,kBAAkB;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;ACjEF;AACb,kBAAkB;AAClB,uBAAuB;AACvB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,uBAAuB;;;;;;;;;;;;ACvBV;AACb,kBAAkB;AAClB,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,wBAAwB;;;;;;;;;;;;ACjBX;AACb,kBAAkB;AAClB,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvBL;AACb,kBAAkB;AAClB,sBAAsB;AACtB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB;;;;;;;;;;;;AC/CT;AACb,kBAAkB;AAClB,0BAA0B;AAC1B,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0FAA0F,GAAG,EAAE,KAAK;AACpG;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0BAA0B;;;;;;;;;;;;ACvJb;AACb,kBAAkB;AAClB,yBAAyB;AACzB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yBAAyB;;;;;;;;;;;;AC5CZ;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,2BAA2B;;;;;;;;;;;;AC/Cd;AACb,kBAAkB;AAClB,iCAAiC;AACjC,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iCAAiC;;;;;;;;;;;;AC/DpB;AACb,kBAAkB;AAClB,oBAAoB;AACpB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;;;;;;;;;;;;ACvBP;AACb,kBAAkB;AAClB,mCAAmC;AACnC,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mCAAmC;;;;;;;;;;;;AC/BtB;AACb,kBAAkB;AAClB,cAAc,GAAG,eAAe,GAAG,6BAA6B,GAAG,qBAAqB;AACxF,cAAc,mBAAO,CAAC,gDAAO;AAC7B,mBAAmB,mBAAO,CAAC,6EAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC3MD;AACb,kBAAkB;AAClB,mBAAmB;AACnB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,cAAc,mBAAO,CAAC,0DAAO;AAC7B,UAAU,mBAAO,CAAC,iDAAI;AACtB,eAAe,mBAAO,CAAC,6DAAU;AACjC,iBAAiB,mBAAO,CAAC,iEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,iCAAiC;AACrG,uHAAuH;AACvH;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;AClKN;AACb,kBAAkB;AAClB,mBAAmB;AACnB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,eAAe,mBAAO,CAAC,uDAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;AC9EN;AACb,kBAAkB;AAClB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC/BD;AACb,kBAAkB;AAClB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACXL;AACb,kBAAkB;AAClB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;;;;;;;;;;;;ACnCH;AACb,kBAAkB;AAClB,eAAe;AACf,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;ACpEF;AACb,kBAAkB;AAClB,eAAe,GAAG,kBAAkB,GAAG,kCAAkC,GAAG,iCAAiC,GAAG,8BAA8B,GAAG,iCAAiC,GAAG,oBAAoB,GAAG,kBAAkB;AAC9N;AACA;AACA;AACA,kBAAkB;AAClB,oBAAoB;AACpB,iCAAiC;AACjC,8BAA8B;AAC9B,iCAAiC;AACjC,kCAAkC;AAClC,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;AC3HF;AACb,kBAAkB;AAClB,kBAAkB;AAClB,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AChEL;AACb,kBAAkB;AAClB,aAAa;AACb,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,kBAAkB,mBAAO,CAAC,oEAAa;AACvC,gBAAgB,mBAAO,CAAC,gEAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,mCAAmC;AACnC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa;;;;;;;;;;;;ACnGA;AACb,kBAAkB;AAClB,iBAAiB;AACjB,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;;ACpEJ;AACb,kBAAkB;AAClB,YAAY;AACZ,cAAc,mBAAO,CAAC,gDAAO;AAC7B,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,mBAAmB,mBAAO,CAAC,sEAAc;AACzC,iBAAiB,mBAAO,CAAC,kEAAY;AACrC,gBAAgB,mBAAO,CAAC,gEAAW;AACnC,kBAAkB,mBAAO,CAAC,oEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mCAAmC;AACnC,0CAA0C;AAC1C,6CAA6C;AAC7C,gDAAgD;AAChD,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mCAAmC;AACnC,0CAA0C;AAC1C,6CAA6C;AAC7C,gDAAgD;AAChD,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0LAA0L,wEAAwE,mFAAmF;AACrV,wHAAwH,wEAAwE,mFAAmF;AACnR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;;ACraC;AACb,kBAAkB;AAClB,gBAAgB;AAChB,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;;;;;;;;;;;;AChFH;AACb,kBAAkB;AAClB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;;;;;;;;;;;;AC/DH;AACb,kBAAkB;AAClB,YAAY;AACZ,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;;ACrEC;AACb,kBAAkB;AAClB,mBAAmB,GAAG,4BAA4B,GAAG,qCAAqC,GAAG,oCAAoC,GAAG,sCAAsC,GAAG,qCAAqC;AAClN,eAAe,mBAAO,CAAC,8DAAU;AACjC;AACA;AACA;AACA,qCAAqC;AACrC,sCAAsC;AACtC,oCAAoC;AACpC,qCAAqC;AACrC,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mCAAmC;AACnC,+BAA+B;AAC/B,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;AC9LN;AACb,kBAAkB;AAClB,cAAc,GAAG,yBAAyB,GAAG,uBAAuB,GAAG,8BAA8B,GAAG,yBAAyB,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,2BAA2B,GAAG,mCAAmC,GAAG,uBAAuB;AAC7S;AACA;AACA;AACA,uBAAuB;AACvB,mCAAmC;AACnC,2BAA2B;AAC3B,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,yBAAyB;AACzB,8BAA8B;AAC9B,uBAAuB;AACvB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC1JD;AACb,kBAAkB;AAClB,aAAa,GAAG,oBAAoB,GAAG,0BAA0B,GAAG,0BAA0B;AAC9F,cAAc,mBAAO,CAAC,gDAAO;AAC7B,mBAAmB,mBAAO,CAAC,6EAAqB;AAChD,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C,aAAa,mBAAO,CAAC,iEAAe;AACpC,aAAa,mBAAO,CAAC,iEAAe;AACpC,oBAAoB,mBAAO,CAAC,wEAAe;AAC3C,eAAe,mBAAO,CAAC,8DAAU;AACjC,eAAe,mBAAO,CAAC,8DAAU;AACjC,oBAAoB,mBAAO,CAAC,wEAAe;AAC3C,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,eAAe,mBAAO,CAAC,8DAAU;AACjC,wBAAwB,mBAAO,CAAC,gFAAmB;AACnD,eAAe,mBAAO,CAAC,8DAAU;AACjC,kBAAkB,mBAAO,CAAC,2EAAoB;AAC9C;AACA;AACA;AACA,0BAA0B;AAC1B,0BAA0B;AAC1B,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA,oEAAoE,8BAA8B;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,mEAAmE,iCAAiC;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,gCAAgC;AAChC,mCAAmC;AACnC,gEAAgE,8BAA8B;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,oCAAoC;AACpC,0CAA0C;AAC1C,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA,gEAAgE,8BAA8B;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0CAA0C;AAC1C,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,2DAA2D,yBAAyB,iFAAiF,6BAA6B;AAClM;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa;;;;;;;;;;;;AC9uCA;AACb,kBAAkB;AAClB,aAAa,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,4BAA4B;AAC/F;AACA;AACA;AACA,4BAA4B;AAC5B,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa;;;;;;;;;;;;ACxEA;AACb,kBAAkB;AAClB,uBAAuB,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,gBAAgB;AAClG,sBAAsB,mBAAO,CAAC,4EAAiB;AAC/C;AACA;AACA;AACA,gBAAgB;AAChB,WAAW;AACX,WAAW;AACX,WAAW;AACX,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,uBAAuB;;;;;;;;;;;;ACnGV;AACb,kBAAkB;AAClB,qBAAqB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,aAAa,GAAG,uBAAuB,GAAG,4BAA4B,GAAG,sBAAsB,GAAG,oBAAoB;AACvf,aAAa,mBAAO,CAAC,iEAAe;AACpC,eAAe,mBAAO,CAAC,8DAAU;AACjC;AACA;AACA;AACA,oBAAoB;AACpB,sBAAsB;AACtB,4BAA4B;AAC5B,uBAAuB;AACvB,aAAa;AACb,oBAAoB;AACpB,iBAAiB;AACjB,mBAAmB;AACnB,qBAAqB;AACrB,qBAAqB;AACrB,oBAAoB;AACpB,mBAAmB;AACnB,uBAAuB;AACvB,uBAAuB;AACvB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,uBAAuB;AACvB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC,kCAAkC;AAClC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC,iCAAiC;AACjC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC,iCAAiC;AACjC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB;;;;;;;;;;;;ACjPR;AACb,kBAAkB;AAClB,cAAc,GAAG,+BAA+B,GAAG,+BAA+B,GAAG,yBAAyB,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,0BAA0B,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,2BAA2B,GAAG,6BAA6B,GAAG,6BAA6B,GAAG,0BAA0B,GAAG,2BAA2B,GAAG,0BAA0B;AACvnB,UAAU,mBAAO,CAAC,iDAAI;AACtB,eAAe,mBAAO,CAAC,8DAAU;AACjC;AACA;AACA;AACA,0BAA0B;AAC1B,2BAA2B;AAC3B,0BAA0B;AAC1B,6BAA6B;AAC7B,6BAA6B;AAC7B,2BAA2B;AAC3B,mBAAmB;AACnB,oBAAoB;AACpB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,2BAA2B;AAC3B,qBAAqB;AACrB;AACA;AACA,sBAAsB;AACtB;AACA;AACA,0BAA0B;AAC1B,sBAAsB;AACtB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;ACpUD;AACb,kBAAkB;AAClB,sBAAsB;AACtB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,wBAAwB,mBAAO,CAAC,uFAA0B;AAC1D,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,0BAA0B,mBAAO,CAAC,2FAA4B;AAC9D,4BAA4B,mBAAO,CAAC,+FAA8B;AAClE,kCAAkC,mBAAO,CAAC,2GAAoC;AAC9E,qBAAqB,mBAAO,CAAC,iFAAuB;AACpD,iBAAiB,mBAAO,CAAC,uEAAkB;AAC3C,cAAc,mBAAO,CAAC,mEAAgB;AACtC,aAAa,mBAAO,CAAC,iEAAe;AACpC,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C,eAAe,mBAAO,CAAC,uEAAkB;AACzC,mBAAmB,mBAAO,CAAC,2EAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2JAA2J;AAC3J;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8JAA8J;AAC9J;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mKAAmK;AACnK;AACA;AACA;AACA,iCAAiC;AACjC;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uKAAuK;AACvK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2KAA2K;AAC3K;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4JAA4J;AAC5J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+JAA+J,IAAI;AACnK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uKAAuK,IAAI;AAC3K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6JAA6J,IAAI;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iIAAiI,IAAI;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2KAA2K;AAC3K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB;;;;;;;;;;;;ACvkBT;AACb,kBAAkB;AAClB,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AC3HL;AACb,kBAAkB;AAClB,eAAe;AACf,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;ACvIF;AACb,kBAAkB;AAClB,cAAc;AACd,aAAa,mBAAO,CAAC,iEAAe;AACpC,2BAA2B,mBAAO,CAAC,uFAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,4CAA4C;AAC/F;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,wBAAwB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,kDAAkD;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC1SD;AACb,kBAAkB;AAClB,yBAAyB;AACzB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,eAAe,mBAAO,CAAC,qEAAiB;AACxC,gBAAgB,mBAAO,CAAC,iEAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yBAAyB;;;;;;;;;;;;ACzPZ;AACb,kBAAkB;AAClB,0BAA0B;AAC1B,0BAA0B,mBAAO,CAAC,qFAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0BAA0B;;;;;;;;;;;;ACzGb;AACb,kBAAkB;;;;;;;;;;;;ACDL;AACb,kBAAkB;AAClB,mBAAmB;AACnB,aAAa,mBAAO,CAAC,iEAAe;AACpC,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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A;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,EAAE,KAA4D;AAC9D,EAAE,CACsD;AACxD,CAAC,sBAAsB;;AAEvB;AACA,gCAAgC,WAAW;AAC3C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,eAAe;AACf,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,sBAAsB;AACtB,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B,2BAA2B;AAC3B,2BAA2B,gBAAgB,MAAM;AACjD,2BAA2B;AAC3B,2BAA2B;AAC3B,2BAA2B;;AAE3B;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0DAA0D;AAC1D;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oDAAoD,iBAAiB;AACrE;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ,uCAAuC;AAC/C;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,eAAe;AAC9D;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,eAAe;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,WAAW,UAAU,SAAS,KAAK,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,eAAe;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kDAAkD,iBAAiB;AACnE;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A8C,wBAAwB;AACtE,gEAAgE,0CAA0C;AAC1G,kEAAkE,4CAA4C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,wCAAwC,iCAAiC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sDAAsD;AACtI,gFAAgF,sDAAsD;AACtI,mFAAmF,yDAAyD;AAC5I,4EAA4E,sCAAsC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvYL;AACb,kBAAkB;AAClB,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AChCL;AACb,kBAAkB;AAClB,iBAAiB;AACjB,mBAAmB,mBAAO,CAAC,yCAAc;AACzC,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,cAAc,mBAAO,CAAC,+BAAS;AAC/B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,4fAA4f;AAC5f,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB;;;;;;;;;;;;ACrDJ;AACb,kBAAkB;AAClB,wBAAwB,GAAG,oBAAoB,GAAG,4BAA4B,GAAG,uBAAuB,GAAG,4BAA4B;AACvI;AACA;AACA;AACA,4BAA4B;AAC5B,uBAAuB;AACvB,4BAA4B;AAC5B,oBAAoB;AACpB,wBAAwB;;;;;;;;;;;;ACVX;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AC/BL;AACb,kBAAkB;AAClB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvBL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B;AACA;AACA;AACA,wCAAwC;AACxC,2BAA2B;;;;;;;;;;;;ACPd;AACb,kBAAkB;AAClB,2BAA2B,GAAG,qBAAqB,GAAG,wBAAwB;AAC9E;AACA;AACA,uEAAuE,uBAAuB;AAC9F,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,qEAAqE,uBAAuB;AAC5F;AACA,oBAAoB,0BAA0B;AAC9C,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA,KAAK;AACL,oBAAoB,kBAAkB;AACtC;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,oBAAoB,kBAAkB;AACtC,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;;;;;;;;;;;AClEd;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,+CAAQ;AAC/B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AClUL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,wEAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,iEAAiE,4CAA4C;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,mGAAmG;AAC5J;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACtGL;AACb,kBAAkB;AAClB,6BAA6B;AAC7B,6BAA6B,4CAA4C,UAAU,YAAY,KAAK,KAAK,UAAU,4DAA4D,gBAAgB,aAAa,yBAAyB,qBAAqB,uCAAuC,gBAAgB,YAAY,kHAAkH,UAAU,MAAM,UAAU;;;;;;;;;;;;ACH5b;AACb,kBAAkB;AAClB,4BAA4B,GAAG,wBAAwB;AACvD;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,4BAA4B;;;;;;;;;;;;ACzDf;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gBAAgB,mBAAO,CAAC,6EAA2B;AACnD,8BAA8B,mBAAO,CAAC,yFAAyB;AAC/D,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,4DAA4D;AACrG,qDAAqD,qHAAqH;AAC1K,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,yDAAyD,+EAA+E;AACxI;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC3IL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,2BAA2B,kHAAkH,KAAK,cAAc,WAAW,qBAAqB,WAAW,yFAAyF,KAAK,sBAAsB,QAAQ,8EAA8E,GAAG;;;;;;;;;;;;ACH3Y;AACb,kBAAkB;AAClB,0BAA0B;AAC1B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,yCAAyC;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,0BAA0B;;;;;;;;;;;;ACnDb;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,4BAA4B,mBAAO,CAAC,mFAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,8DAA8D,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA,iBAAiB,IAAI;AACrB,aAAa;AACb,4DAA4D,yEAAyE;AACrI,+CAA+C,sFAAsF,oEAAoE;AACzM,6DAA6D,4EAA4E;AACzI,aAAa;AACb;AACA;AACA,4DAA4D,yEAAyE;AACrI,+CAA+C,sFAAsF,4DAA4D;AACjM,6DAA6D,4EAA4E;AACzI,aAAa;AACb;AACA;AACA,wCAAwC,oFAAoF;AAC5H;AACA,+CAA+C,2BAA2B;AAC1E,iEAAiE,gEAAgE;AACjI;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB,SAAS,GAAG,KAAK;AAC1C;AACA;AACA,kBAAkB;;;;;;;;;;;;ACjKL;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACVL;AACb,kBAAkB;AAClB,yBAAyB;AACzB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,cAAc,mBAAO,CAAC,0CAAS;AAC/B,kBAAkB,mBAAO,CAAC,wCAAc;AACxC,kBAAkB,mBAAO,CAAC,wCAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,yBAAyB;;;;;;;;;;;;ACpCZ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,sJAAsJ;AAC/M;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA,4BAA4B,YAAY,GAAG,aAAa;AACxD,KAAK;AACL,kCAAkC;AAClC;AACA,kBAAkB;;;;;;;;;;;;ACrGL;AACb;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,uBAAuB,GAAG,gCAAgC,GAAG,yBAAyB,GAAG,sCAAsC,GAAG,gCAAgC,GAAG,kCAAkC;AACvM;AACA;AACA;AACA;AACA;AACA,gDAAgD,+BAA+B;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;;;;;;;;;;;AC3GV;AACb,kBAAkB;AAClB,8CAA8C,GAAG,kDAAkD,GAAG,oBAAoB,GAAG,wBAAwB;AACrJ;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8CAA8C;;;;;;;;;;;;AC1IjC;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,8BAA8B,mBAAO,CAAC,yFAAyB;AAC/D,gBAAgB,mBAAO,CAAC,6DAAW;AACnC,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,0BAA0B,mBAAO,CAAC,kFAAqB;AACvD,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,4DAA4D;AACrG,qDAAqD,oIAAoI;AACzL,qCAAqC,uEAAuE;AAC5G;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,iEAAiE,yFAAyF;AAC1J,iBAAiB;AACjB;AACA,oEAAoE,iTAAiT;AACrX;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kCAAkC,cAAc;AAChD;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;ACnUL;AACb,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uFAAuF;AAC3H,qDAAqD,oFAAoF;AACzI;AACA,wCAAwC,uFAAuF;AAC/H,yDAAyD,oFAAoF;AAC7I;AACA;AACA,kBAAkB;;;;;;;;;;;;ACrBL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,2BAA2B,mEAAmE,KAAK,iEAAiE,WAAW,qBAAqB,WAAW,2FAA2F,KAAK,sBAAsB,cAAc,8EAA8E,GAAG;;;;;;;;;;;;ACHvZ;AACb,kBAAkB;AAClB,cAAc,GAAG,gBAAgB,GAAG,yBAAyB,GAAG,qBAAqB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;;;;;;;;;;ACxFD;AACb,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6CAA6C;AAChF,qDAAqD,uDAAuD;AAC5G;AACA;AACA,kBAAkB;;;;;;;;;;;;ACdL;AACb,kBAAkB;AAClB,8BAA8B;AAC9B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,8BAA8B;;;;;;;;;;;;AChCjB;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,gBAAgB,mBAAO,CAAC,yDAAW;AACnC,4BAA4B,mBAAO,CAAC,kFAAuB;AAC3D,0BAA0B,mBAAO,CAAC,6EAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG,gEAAgE,qMAAqM,gCAAgC;AACrS,gEAAgE,uMAAuM,mDAAmD;AAC1T,0CAA0C,gCAAgC,0KAA0K,mCAAmC;AACvR,yDAAyD,gCAAgC,oCAAoC,sCAAsC,MAAM;AACzK,gEAAgE,uLAAuL,mDAAmD;AAC1S,gEAAgE,8LAA8L,yCAAyC;AACvS;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC/JL;AACb,kBAAkB;AAClB,4BAA4B,GAAG,4BAA4B;AAC3D,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,4BAA4B;;;;;;;;;;;;AC7Cf;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD,8BAA8B,mBAAO,CAAC,yFAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gCAAgC;AACzE,qDAAqD;AACrD;AACA,mBAAmB;AACnB,qCAAqC,2CAA2C;AAChF;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA,2BAA2B;AAC3B,iEAAiE,+DAA+D,WAAW,YAAY,uCAAuC;AAC9L,iBAAiB;AACjB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;ACpHL;AACb,kBAAkB;AAClB,yCAAyC,GAAG,wCAAwC;AACpF,wCAAwC,YAAY,MAAM;AAC1D,yCAAyC,iBAAiB,OAAO,yBAAyB,OAAO;;;;;;;;;;;;ACJpF;AACb,kBAAkB;AAClB,oBAAoB,GAAG,wBAAwB;AAC/C;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB;;;;;;;;;;;;AC9DP;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,eAAe,mBAAO,CAAC,yEAAe;AACtC,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,2BAA2B,mBAAO,CAAC,gFAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,6BAA6B;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8DAA8D,6BAA6B;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6GAA6G,kBAAkB;AAC/H,yGAAyG,kBAAkB;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,yCAAyC,iGAAiG;AAC1I,qDAAqD,kHAAkH;AACvK,qCAAqC,gEAAgE;AACrG,oDAAoD,+JAA+J,2BAA2B;AAC9O;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,oDAAoD,2JAA2J,yBAAyB;AACxO;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,yCAAyC,mBAAmB;AAC5D,6DAA6D,6DAA6D;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC9WL;AACb,kBAAkB;AAClB,oBAAoB;AACpB;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB;;;;;;;;;;;;ACxCP;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,sBAAsB,mBAAO,CAAC,iEAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,qFAAqF;AAC9H,qDAAqD,gEAAgE;AACrH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AChEL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0JAA0J;AAClN;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACxEL;AACb,kBAAkB;AAClB,oCAAoC,GAAG,sBAAsB;AAC7D;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oCAAoC;;;;;;;;;;;;ACnFvB;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,iBAAiB,mBAAO,CAAC,oFAA8B;AACvD,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,eAAe,mBAAO,CAAC,yEAAe;AACtC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,wEAAoB;AACrD,aAAa,mBAAO,CAAC,gDAAQ;AAC7B,sBAAsB,mBAAO,CAAC,iEAAiB;AAC/C,eAAe,mBAAO,CAAC,6CAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yEAAyE,eAAe;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8GAA8G;AACzL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA,yBAAyB,0EAA0E;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,6CAA6C,kGAAkG;AAC/I;AACA,+DAA+D,qIAAqI;AACpM,+DAA+D,uDAAuD,0BAA0B;AAChJ,wEAAwE,2CAA2C;AACnH,sCAAsC,qGAAqG;AAC3I;AACA;AACA,mDAAmD;AACnD;AACA,+BAA+B;AAC/B,qEAAqE;AACrE;AACA,mCAAmC;AACnC,mDAAmD,gFAAgF,mBAAmB,IAAI;AAC1J;AACA;AACA;AACA,6CAA6C,qEAAqE;AAClH,yDAAyD,gIAAgI;AACzL;AACA;AACA;AACA;AACA,yCAAyC,qEAAqE;AAC9G;AACA;AACA,2DAA2D,qIAAqI;AAChM;AACA,gDAAgD,uEAAuE;AACvH;AACA,wEAAwE,mCAAmC,8DAA8D,oCAAoC,6HAA6H;AAC1U,yBAAyB;AACzB;AACA;AACA;AACA,4DAA4D,4HAA4H,oBAAoB,YAAY,IAAI;AAC5N;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA,2BAA2B;AAC3B,iEAAiE;AACjE;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,2CAA2C,yCAAyC;AACpF,oDAAoD,qCAAqC;AACzF,iDAAiD,2CAA2C;AAC5F,sDAAsD;AACtD;AACA;AACA;AACA,mCAAmC;AACnC,yEAAyE;AACzE;AACA,qCAAqC,gCAAgC;AACrE,mDAAmD;AACnD;AACA;AACA;AACA,mCAAmC;AACnC,yEAAyE;AACzE;AACA,qCAAqC,gCAAgC;AACrE,iDAAiD,2CAA2C;AAC5F,wEAAwE,0BAA0B,wMAAwM;AAC1S,yBAAyB;AACzB,iBAAiB;AACjB;AACA,+DAA+D;AAC/D;AACA,yBAAyB,uGAAuG;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,wHAAwH;AACxH,6IAA6I;AAC7I;AACA;AACA;AACA,gDAAgD;AAChD;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kCAAkC,cAAc;AAChD;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC9bL;AACb,kBAAkB;AAClB,qCAAqC,GAAG,4CAA4C,GAAG,uCAAuC,GAAG,oCAAoC,GAAG,2BAA2B,GAAG,gCAAgC;AACtO,gCAAgC,uBAAuB,QAAQ,qDAAqD,eAAe,2CAA2C,OAAO,6CAA6C,YAAY,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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,0BAA0B;;;;;;;;;;;;ACpEb;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,2BAA2B,mBAAO,CAAC,gFAAsB;AACzD,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,8BAA8B,mBAAO,CAAC,uFAAyB;AAC/D,eAAe,mBAAO,CAAC,yEAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA,mCAAmC,UAAU,WAAW,+BAA+B,0BAA0B;AACjH;AACA;AACA;AACA;AACA;AACA,+DAA+D,4JAA4J,0BAA0B,4BAA4B,gDAAgD,sHAAsH;AACvb;AACA,oDAAoD,6BAA6B;AACjF,sEAAsE,yFAAyF;AAC/J;AACA;AACA;AACA,oDAAoD,yDAAyD;AAC7G;AACA;AACA,gDAAgD,mGAAmG;AACnJ,iEAAiE,6DAA6D;AAC9H;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,6BAA6B,EAAE;AAC/B;AACA;AACA,kBAAkB;;;;;;;;;;;;AChOL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AClDL;AACb,kBAAkB;AAClB,4BAA4B,GAAG,0BAA0B;AACzD,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC,qBAAqB,mBAAO,CAAC,+DAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,4BAA4B;;;;;;;;;;;;ACnDf;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,sBAAsB,mBAAO,CAAC,iEAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,yCAAyC,oDAAoD;AAC7F,wCAAwC,4GAA4G,kCAAkC,oCAAoC,qBAAqB,kBAAkB;AACjQ;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AClHL;AACb,kBAAkB;AAClB,0BAA0B;AAC1B;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Ca;AACb,kBAAkB;AAClB,yBAAyB;AACzB,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yBAAyB;;;;;;;;;;;;ACrBZ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,eAAe,mBAAO,CAAC,6CAAW;AAClC,yBAAyB,mBAAO,CAAC,6EAAoB;AACrD,iCAAiC,mBAAO,CAAC,4FAA4B;AACrE,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,6FAA6F;AACtI,qDAAqD,kHAAkH;AACvK,qCAAqC,oEAAoE;AACzG;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,uBAAuB;AACvB,6DAA6D,gFAAgF;AAC7I,aAAa;AACb;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC3IL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,2BAA2B,sCAAsC,MAAM;;;;;;;;;;;;ACH1D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,eAAe,mBAAO,CAAC,qDAAU;AACjC,kBAAkB,mBAAO,CAAC,mDAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wGAAwG;AAC/I;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACjFL;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvBL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,oGAAoG;AAC9K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;AChE7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gCAAgC,mBAAO,CAAC,yHAAsD;AAC9F,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,0IAA0I,4GAA4G,0EAA0E;AAClZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,sCAAsC;;;;;;;;;;;;AC/GrE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,8BAA8B,mBAAO,CAAC,iHAAkD;AACxF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gDAAgD,8QAA8Q,wEAAwE;AACtd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,oCAAoC;;;;;;;;;;;;ACpEnE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,6BAA6B,mBAAO,CAAC,6GAAgD;AACrF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,gDAAgD,yGAAyG,+FAA+F;AACvU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,mCAAmC;;;;;;;;;;;;ACrElE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gBAAgB,mBAAO,CAAC,wFAAsC;AAC9D,8BAA8B,mBAAO,CAAC,oHAAoD;AAC1F,gCAAgC,mBAAO,CAAC,yHAAsD;AAC9F,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,kRAAkR,4GAA4G,gJAAgJ;AAChmB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6BAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,sCAAsC;;;;;;;;;;;;ACjLrE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,4BAA4B,mBAAO,CAAC,yGAA8C;AAClF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,4FAA4F,wGAAwG,sEAAsE;AACxV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,kCAAkC;;;;;;;;;;;;AC5EjE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gCAAgC,mBAAO,CAAC,yHAAsD;AAC9F,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,gEAAgE,0EAA0E;AAC5N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,sCAAsC;;;;;;;;;;;;AClErE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,6BAA6B,mBAAO,CAAC,6GAAgD;AACrF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,oPAAoP,uGAAuG,2GAA2G,2EAA2E;AAChmB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,oEAAoE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,mCAAmC;;;;;;;;;;;;AC3GlE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,gDAAgD,0FAA0F;AACpN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;ACpE7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,sLAAsL,oGAAoG,kQAAkQ;AACtmB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,8IAA8I;AAC5N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;ACzF7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,2BAA2B,mBAAO,CAAC,wGAA8C;AACjF,6BAA6B,mBAAO,CAAC,6GAAgD;AACrF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,4RAA4R,yGAAyG,2HAA2H;AAC/kB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B;AAC9E;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2BAA2B,gEAAgE,gFAAgF;AACtO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA,iDAAiD,2BAA2B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,mCAAmC;;;;;;;;;;;;AC/KlE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,0BAA0B,mBAAO,CAAC,iGAA0C;AAC5E,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,oEAAoE;AAClJ;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,0BAA0B,gCAAgC;;;;;;;;;;;;AClE/D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,gDAAgD,wFAAwF;AAClN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,oEAAoE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;AClI7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,mCAAmC,mBAAO,CAAC,yHAAsD;AACjG,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,0FAA0F,+GAA+G,6EAA6E;AAC3W;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,yCAAyC;;;;;;;;;;;;AC5DxE;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AC7CL;AACb,kBAAkB;AAClB,uBAAuB,mBAAO,CAAC,0DAAkB;AACjD,qBAAqB,mBAAO,CAAC,sDAAgB;AAC7C,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,uBAAuB,mBAAO,CAAC,0DAAkB;AACjD,mBAAmB,mBAAO,CAAC,kDAAc;AACzC,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,eAAe,mBAAO,CAAC,0CAAU;AACjC,eAAe,mBAAO,CAAC,0CAAU;AACjC,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,iBAAiB,mBAAO,CAAC,8CAAY;AACrC,eAAe,mBAAO,CAAC,0CAAU;AACjC,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,eAAe,mBAAO,CAAC,0CAAU;AACjC,uBAAuB,mBAAO,CAAC,0DAAkB;AACjD;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AClC4B;AACsB;AACC;AACnD;;;;;;;;;;;;;;;ACHA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,IAAI;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpa4B;AAC5B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qCAAG;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxFA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACO;AACP,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACO;AACP,kDAAkD,QAAQ;AAC1D,yCAAyC,QAAQ;AACjD,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,iBAAiB,uFAAuF,cAAc;AACtH,uBAAuB,gCAAgC,qCAAqC,2CAA2C;AACvI,4BAA4B,MAAM,iBAAiB,YAAY;AAC/D,uBAAuB;AACvB,8BAA8B;AAC9B,6BAA6B;AAC7B,4BAA4B;AAC5B;AACA;AACO;AACP;AACA,iBAAiB,6CAA6C,UAAU,sDAAsD,cAAc;AAC5I,0BAA0B,6BAA6B,oBAAoB,gDAAgD,kBAAkB;AAC7I;AACA;AACO;AACP;AACA;AACA,2GAA2G,uFAAuF,cAAc;AAChN,uBAAuB,8BAA8B,gDAAgD,wDAAwD;AAC7J,6CAA6C,sCAAsC,UAAU,mBAAmB,IAAI;AACpH;AACA;AACO;AACP,iCAAiC,uCAAuC,YAAY,KAAK,OAAO;AAChG;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6CAA6C;AAC7C;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzNA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;UCzrGA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNa;AACb,kBAAkB;AAClB,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,kBAAkB","sources":["webpack://apisearchUI/webpack/universalModuleDefinition","webpack://apisearchUI/./node_modules/apisearch/lib/Apisearch.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Config.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Synonym.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ConnectionError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ErrorWithMessage.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/EventError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ForbiddenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidFormatError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidTokenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceExistsError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceNotAvailableError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnknownError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnsupportedContentTypeError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Geo/LocationRange.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/AxiosClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/CacheClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Client.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/HttpClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Response.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/AppUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Changes.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Coordinate.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Index.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/IndexUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Item.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/ItemUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Metadata.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/User.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Aggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Filter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Query.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Range.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategies.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/SortBy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/HttpRepository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/Repository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Counter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Result.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregations.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/ReadTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/Transformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/WriteTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/index.js","webpack://apisearchUI/./node_modules/events/events.js","webpack://apisearchUI/./node_modules/mustache/mustache.js","webpack://apisearchUI/./node_modules/preact/compat/dist/compat.module.js","webpack://apisearchUI/./node_modules/preact/dist/preact.module.js","webpack://apisearchUI/./node_modules/preact/hooks/dist/hooks.module.js","webpack://apisearchUI/./src/ApisearchHelper.ts","webpack://apisearchUI/./src/ApisearchUI.ts","webpack://apisearchUI/./src/ApisearchUIFactory.ts","webpack://apisearchUI/./src/Bootstrap.ts","webpack://apisearchUI/./src/Constants.ts","webpack://apisearchUI/./src/Container.ts","webpack://apisearchUI/./src/Dispatcher.ts","webpack://apisearchUI/./src/Environment.ts","webpack://apisearchUI/./src/Highlight.ts","webpack://apisearchUI/./src/Store.ts","webpack://apisearchUI/./src/components/Banner/BannerComponent.tsx","webpack://apisearchUI/./src/components/Banner/defaultTemplates.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterActions.ts","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterComponent.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersActions.ts","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersComponent.tsx","webpack://apisearchUI/./src/components/Clone.ts","webpack://apisearchUI/./src/components/Common.ts","webpack://apisearchUI/./src/components/Information/InformationComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/Helpers.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterActions.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/ShowMoreComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Pagination/Helpers.ts","webpack://apisearchUI/./src/components/Pagination/NavigationComponent.tsx","webpack://apisearchUI/./src/components/Pagination/PaginationActions.ts","webpack://apisearchUI/./src/components/Pagination/PaginationComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterActions.ts","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterActions.ts","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterComponent.tsx","webpack://apisearchUI/./src/components/Reload/ReloadActions.ts","webpack://apisearchUI/./src/components/Reload/ReloadComponent.tsx","webpack://apisearchUI/./src/components/Result/Item.tsx","webpack://apisearchUI/./src/components/Result/ResultActions.ts","webpack://apisearchUI/./src/components/Result/ResultComponent.tsx","webpack://apisearchUI/./src/components/Result/defaultTemplates.tsx","webpack://apisearchUI/./src/components/SearchInput/AutocompleteComponent.tsx","webpack://apisearchUI/./src/components/SearchInput/SearchInputActions.ts","webpack://apisearchUI/./src/components/SearchInput/SearchInputComponent.tsx","webpack://apisearchUI/./src/components/Snapshot/SnapshotComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByActions.ts","webpack://apisearchUI/./src/components/SortBy/SortByComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByHelper.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterActions.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterComponent.tsx","webpack://apisearchUI/./src/components/Suggestions/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Template.tsx","webpack://apisearchUI/./src/components/Translate.tsx","webpack://apisearchUI/./src/widgets/Banner.tsx","webpack://apisearchUI/./src/widgets/CheckboxFilter.tsx","webpack://apisearchUI/./src/widgets/ClearFilters.tsx","webpack://apisearchUI/./src/widgets/Information.tsx","webpack://apisearchUI/./src/widgets/MultipleFilter.tsx","webpack://apisearchUI/./src/widgets/Pagination.tsx","webpack://apisearchUI/./src/widgets/PriorityFilter.tsx","webpack://apisearchUI/./src/widgets/RangeFilter.tsx","webpack://apisearchUI/./src/widgets/Reload.tsx","webpack://apisearchUI/./src/widgets/Result.tsx","webpack://apisearchUI/./src/widgets/SearchInput.tsx","webpack://apisearchUI/./src/widgets/Snapshot.tsx","webpack://apisearchUI/./src/widgets/SortBy.tsx","webpack://apisearchUI/./src/widgets/Suggestions.tsx","webpack://apisearchUI/./src/widgets/Widget.ts","webpack://apisearchUI/./src/widgets/Widgets.ts","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/index.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5_file_hasher.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/parallel_hasher.js","webpack://apisearchUI/./node_modules/tslib/tslib.es6.js","webpack://apisearchUI/./node_modules/axios/dist/browser/axios.cjs","webpack://apisearchUI/webpack/bootstrap","webpack://apisearchUI/webpack/runtime/define property getters","webpack://apisearchUI/webpack/runtime/global","webpack://apisearchUI/webpack/runtime/hasOwnProperty shorthand","webpack://apisearchUI/webpack/runtime/make namespace object","webpack://apisearchUI/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"apisearchUI\"] = factory();\n\telse\n\t\troot[\"apisearchUI\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AxiosClient_1 = require(\"./Http/AxiosClient\");\nvar Query_1 = require(\"./Query/Query\");\nvar Query_2 = require(\"./Query/Query\");\nvar Query_3 = require(\"./Query/Query\");\nvar SortBy_1 = require(\"./Query/SortBy\");\nvar HttpRepository_1 = require(\"./Repository/HttpRepository\");\nvar Result_1 = require(\"./Result/Result\");\nvar ResultAggregations_1 = require(\"./Result/ResultAggregations\");\nvar Transformer_1 = require(\"./Transformer/Transformer\");\nvar CacheClient_1 = require(\"./Http/CacheClient\");\n/**\n * Apisearch class\n */\nvar Apisearch = /** @class */ (function () {\n function Apisearch() {\n }\n /**\n * Constructor\n *\n * @param config\n *\n * @return {HttpRepository}\n */\n Apisearch.createRepository = function (config) {\n Apisearch.ensureRepositoryConfigIsValid(config);\n config.options = tslib_1.__assign({ api_version: \"v1\", override_queries: true, timeout: 3000 }, config.options);\n /**\n * Client\n */\n var httpClient = typeof config.options.http_client !== \"undefined\"\n ? config.options.http_client\n : new AxiosClient_1.AxiosClient(config.options.endpoint, config.options.api_version, config.options.timeout, config.options.override_queries);\n if (config.options.use_cache) {\n httpClient = new CacheClient_1.CacheClient(httpClient);\n }\n return new HttpRepository_1.HttpRepository(httpClient, config.app_id, config.index_id, config.token, new Transformer_1.Transformer());\n };\n /**\n * Ensure the Repository configuration is valid\n *\n * @param config\n */\n Apisearch.ensureRepositoryConfigIsValid = function (config) {\n Apisearch.ensureIsDefined(config.app_id, \"app_id\");\n Apisearch.ensureIsDefined(config.index_id, \"index_id\");\n Apisearch.ensureIsDefined(config.token, \"token\");\n Apisearch.ensureIsDefined(config.options.endpoint, \"options.endpoint\");\n };\n /**\n * Ensure the value is not undefined\n *\n * @param param\n * @param name\n */\n Apisearch.ensureIsDefined = function (param, name) {\n if (typeof param === \"undefined\") {\n throw new TypeError(name + \" parameter must be defined.\");\n }\n };\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQueryLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.createLocated(coordinate, queryText, page, size);\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQuery = function (queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.create(queryText, page, size);\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Apisearch.createQueryMatchAll = function () {\n return Query_3.Query.createMatchAll();\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUID = function (uuid) {\n return Query_3.Query.createByUUID(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n return Query_3.Query.createByUUIDs.apply(Query_3.Query, uuids);\n };\n /**\n * Create empty result\n *\n * @return {Result}\n */\n Apisearch.createEmptyResult = function () {\n return Result_1.Result.create(\"\", 0, 0, new ResultAggregations_1.ResultAggregations(0), [], []);\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptySortBy = function () {\n return SortBy_1.SortBy.create();\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptyScoreStrategy = function () {\n return SortBy_1.SortBy.create();\n };\n return Apisearch;\n}());\nexports[\"default\"] = Apisearch;\n","\"use strict\";\nexports.__esModule = true;\nexports.Config = exports.DEFAULT_REPLICAS = exports.DEFAULT_SHARDS = void 0;\nvar Synonym_1 = require(\"./Synonym\");\nexports.DEFAULT_SHARDS = 1;\nexports.DEFAULT_REPLICAS = 0;\n/**\n * Result class\n */\nvar Config = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param language\n * @param storeSearchableMetadata\n * @param shards\n * @param replicas\n */\n function Config(language, storeSearchableMetadata, shards, replicas) {\n if (language === void 0) { language = null; }\n if (storeSearchableMetadata === void 0) { storeSearchableMetadata = true; }\n if (shards === void 0) { shards = exports.DEFAULT_SHARDS; }\n if (replicas === void 0) { replicas = exports.DEFAULT_REPLICAS; }\n this.synonyms = [];\n this.language = language;\n this.storeSearchableMetadata = storeSearchableMetadata;\n this.shards = shards;\n this.replicas = replicas;\n }\n /**\n * Get language\n *\n * @return {string}\n */\n Config.prototype.getLanguage = function () {\n return this.language;\n };\n /**\n * Should searchable metadata be stored\n *\n * @return {boolean}\n */\n Config.prototype.shouldSearchableMetadataBeStored = function () {\n return this.storeSearchableMetadata;\n };\n /**\n * Add synonym\n *\n * @param synonym\n */\n Config.prototype.addSynonym = function (synonym) {\n this.synonyms.push(synonym);\n };\n /**\n * Get synonyms\n *\n * @return {Synonym[]}\n */\n Config.prototype.getSynonyms = function () {\n return this.synonyms;\n };\n /**\n * Get shards\n *\n * @return {number}\n */\n Config.prototype.getShards = function () {\n return this.shards;\n };\n /**\n * Get replicas\n *\n * @return {number}\n */\n Config.prototype.getReplicas = function () {\n return this.replicas;\n };\n /**\n * to array\n */\n Config.prototype.toArray = function () {\n return {\n language: this.language,\n store_searchable_metadata: this.storeSearchableMetadata,\n synonyms: this.synonyms.map(function (synonym) { return synonym.toArray(); }),\n shards: this.shards,\n replicas: this.replicas\n };\n };\n /**\n * Create from array\n */\n Config.createFromArray = function (array) {\n var config = new Config(array.language ? array.language : null, typeof array.store_searchable_metadata == \"boolean\"\n ? array.store_searchable_metadata\n : true);\n if (array.synonyms instanceof Array &&\n array.synonyms.length > 0) {\n config.synonyms = array.synonyms.map(function (synonym) { return Synonym_1.Synonym.createFromArray(synonym); });\n }\n config.shards = typeof array.shards == \"number\"\n ? array.shards\n : exports.DEFAULT_SHARDS;\n config.replicas = typeof array.replicas == \"number\"\n ? array.replicas\n : exports.DEFAULT_REPLICAS;\n return config;\n };\n return Config;\n}());\nexports.Config = Config;\n","\"use strict\";\nexports.__esModule = true;\nexports.Synonym = void 0;\n/**\n * Result class\n */\nvar Synonym = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param words\n */\n function Synonym(words) {\n this.words = words;\n }\n /**\n * get words\n *\n * @return {string[]}\n */\n Synonym.prototype.getWords = function () {\n return this.words;\n };\n /**\n * Create by words\n *\n * @param words\n *\n * @return {Synonym}\n */\n Synonym.createbyWords = function (words) {\n return new Synonym(words);\n };\n /**\n * To array\n *\n * @return {{words: string[]}}\n */\n Synonym.prototype.toArray = function () {\n return {\n words: this.words\n };\n };\n /**\n * create from array\n *\n * @param array\n *\n * @returns {Synonym}\n */\n Synonym.createFromArray = function (array) {\n return new Synonym(array.words instanceof Object\n ? array.words\n : []);\n };\n /**\n * Expand\n *\n * @returns {string}\n */\n Synonym.prototype.expand = function () {\n return this.words.join(\",\");\n };\n return Synonym;\n}());\nexports.Synonym = Synonym;\n","\"use strict\";\nexports.__esModule = true;\nexports.ConnectionError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar ConnectionError = /** @class */ (function (_super) {\n tslib_1.__extends(ConnectionError, _super);\n function ConnectionError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ConnectionError.getTransportableHTTPError = function () {\n return 500;\n };\n return ConnectionError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ConnectionError = ConnectionError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ErrorWithMessage = void 0;\n/**\n * ConnectError\n */\nvar ErrorWithMessage = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param message\n */\n function ErrorWithMessage(message) {\n this.message = message;\n }\n return ErrorWithMessage;\n}());\nexports.ErrorWithMessage = ErrorWithMessage;\n","\"use strict\";\nexports.__esModule = true;\nexports.EventError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * EventError\n */\nvar EventError = /** @class */ (function (_super) {\n tslib_1.__extends(EventError, _super);\n function EventError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n EventError.throwEndpointNotAvailable = function () {\n return new EventError(\"Endpoint not available\");\n };\n return EventError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.EventError = EventError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ForbiddenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Forbidden Error\n */\nvar ForbiddenError = /** @class */ (function (_super) {\n tslib_1.__extends(ForbiddenError, _super);\n function ForbiddenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ForbiddenError.getTransportableHTTPError = function () {\n return 403;\n };\n /**\n * App id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createAppIdIsRequiredException = function () {\n return new ForbiddenError(\"AppId query parameter MUST be defined with a valid value\");\n };\n /**\n * Index id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createIndexIsRequiredException = function () {\n return new ForbiddenError(\"Index query parameter MUST be defined with a valid value\");\n };\n /**\n * Token is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createTokenIsRequiredException = function () {\n return new ForbiddenError(\"Token query parameter MUST be defined with a valid value\");\n };\n return ForbiddenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ForbiddenError = ForbiddenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidFormatError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Class InvalidFormatError\n */\nvar InvalidFormatError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidFormatError, _super);\n function InvalidFormatError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidFormatError.getTransportableHTTPError = function () {\n return 400;\n };\n /**\n * Item representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item representation not valid. Expecting Item array serialized but found malformed data\");\n };\n /**\n * Item UUID representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemUUIDRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item UUID representation not valid. Expecting UUID array serialized but found malformed data\");\n };\n /**\n * Create Composed UUID bad format.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.composedItemUUIDNotValid = function () {\n return new InvalidFormatError(\"A composed UUID should always follow this format: {id}~{type}.\");\n };\n /**\n * Create Query sorted by distance without coordinate.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.querySortedByDistanceWithoutCoordinate = function () {\n return new InvalidFormatError(\"In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()\");\n };\n /**\n * Query representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.queryFormatNotValid = function () {\n return new InvalidFormatError(\"Query Format not valid. Expecting a Query serialized but found malformed data\");\n };\n /**\n * Coordinate representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.coordinateFormatNotValid = function () {\n return new InvalidFormatError(\"A Coordinate should always contain a lat (Latitude) and a lon (Longitude)\");\n };\n /**\n * Config representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.configFormatNotValid = function () {\n return new InvalidFormatError(\"Config Format not valid. Expecting a Config serialized but found malformed data\");\n };\n /**\n * Token representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenFormatNotValid = function () {\n return new InvalidFormatError(\"Token Format not valid. Expecting a Token serialized but found malformed data\");\n };\n /**\n * Index format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexFormatNotValid = function () {\n return new InvalidFormatError('Index Format not valid. Expecting an Index serialized but found malformed data');\n };\n /**\n * IndexUUI format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexUUIDFormatNotValid = function () {\n return new InvalidFormatError('IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data');\n };\n /**\n * App format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.appUUIDFormatNotValid = function () {\n return new InvalidFormatError('AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data');\n };\n /**\n * Campaign representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.campaignFormatNotValid = function () {\n return new InvalidFormatError(\"Campaign Format not valid. Expecting a Campaign serialized but found malformed data\");\n };\n /**\n * Changes representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.changesFormatNotValid = function () {\n return new InvalidFormatError(\"Changes Format not valid. Expecting a Changes serialized but found malformed data\");\n };\n /**\n * Boost clause representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.boostClauseFormatNotValid = function () {\n return new InvalidFormatError(\"Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data\");\n };\n /**\n * token uuid representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenUUIDFormatNotValid = function () {\n return new InvalidFormatError(\"Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data\");\n };\n /**\n * User representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.userFormatNotValid = function () {\n return new InvalidFormatError(\"User Format not valid. Expecting a User serialized but found malformed data\");\n };\n return InvalidFormatError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidFormatError = InvalidFormatError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidTokenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Invalid token error\n */\nvar InvalidTokenError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidTokenError, _super);\n function InvalidTokenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidTokenError.getTransportableHTTPError = function () {\n return 401;\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenPermissions = function (tokenReference) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid\");\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n * @param maxHitsPerQuery\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenMaxHitsPerQuery = function (tokenReference, maxHitsPerQuery) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid. Max \" + maxHitsPerQuery + \" hits allowed\");\n };\n return InvalidTokenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidTokenError = InvalidTokenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceExistsError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource exists error\n */\nvar ResourceExistsError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceExistsError, _super);\n function ResourceExistsError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceExistsError.getTransportableHTTPError = function () {\n return 409;\n };\n /**\n * Index not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.indexAvailable = function () {\n return new ResourceExistsError(\"Index exists and cannot be created again\");\n };\n /**\n * Events not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.eventsIndexAvailable = function () {\n return new ResourceExistsError(\"Events index exists and cannot be created again\");\n };\n /**\n * Logs not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.logsIndexAvailable = function () {\n return new ResourceExistsError(\"Logs index exists and cannot be created again\");\n };\n return ResourceExistsError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceExistsError = ResourceExistsError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceNotAvailableError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource not available error\n */\nvar ResourceNotAvailableError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceNotAvailableError, _super);\n function ResourceNotAvailableError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceNotAvailableError.getTransportableHTTPError = function () {\n return 404;\n };\n /**\n * Index not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.indexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Index not available - \" + resourceId);\n };\n /**\n * Events not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.eventsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Events not available - \" + resourceId);\n };\n /**\n * Logs not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.logsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Logs not available - \" + resourceId);\n };\n /**\n * Engine not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.engineNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Engine not available - \" + resourceId);\n };\n return ResourceNotAvailableError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceNotAvailableError = ResourceNotAvailableError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnknownError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar UnknownError = /** @class */ (function (_super) {\n tslib_1.__extends(UnknownError, _super);\n function UnknownError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Unknown error\n *\n * @return this\n */\n UnknownError.createUnknownError = function () {\n return new this(\"Unknown error.\");\n };\n return UnknownError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnknownError = UnknownError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnsupportedContentTypeError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Unsupported content type error\n */\nvar UnsupportedContentTypeError = /** @class */ (function (_super) {\n tslib_1.__extends(UnsupportedContentTypeError, _super);\n function UnsupportedContentTypeError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n UnsupportedContentTypeError.getTransportableHTTPError = function () {\n return 415;\n };\n /**\n * Unsupported content type\n *\n * @return {InvalidFormatError}\n */\n UnsupportedContentTypeError.createUnsupportedContentTypeException = function () {\n return new UnsupportedContentTypeError(\"This content type is not accepted. Please use application/json\");\n };\n return UnsupportedContentTypeError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnsupportedContentTypeError = UnsupportedContentTypeError;\n","\"use strict\";\nexports.__esModule = true;\nexports.Square = exports.Polygon = exports.CoordinateAndDistance = exports.LocationRange = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\n/**\n * Abstract Location Range class\n */\nvar LocationRange = /** @class */ (function () {\n function LocationRange() {\n }\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n LocationRange.fromFilterObject = function (object) {\n throw TypeError(\"Method not valid\");\n };\n /**\n * to array\n */\n LocationRange.prototype.toArray = function () {\n return {\n type: this.getName(),\n data: this.toFilterObject()\n };\n };\n /**\n * Create from array\n *\n * @param array\n */\n LocationRange.createFromArray = function (array) {\n if (array.type == \"CoordinateAndDistance\") {\n return CoordinateAndDistance.fromFilterObject(array.data);\n }\n if (array.type == \"Polygon\") {\n return Polygon.fromFilterObject(array.data);\n }\n if (array.type == \"Square\") {\n return Square.fromFilterObject(array.data);\n }\n };\n return LocationRange;\n}());\nexports.LocationRange = LocationRange;\n/**\n * CoordinateAndDistance\n */\nvar CoordinateAndDistance = /** @class */ (function (_super) {\n tslib_1.__extends(CoordinateAndDistance, _super);\n /**\n * Constructor\n *\n * @param coordinate\n * @param distance\n */\n function CoordinateAndDistance(coordinate, distance) {\n var _this = _super.call(this) || this;\n _this.coordinate = coordinate;\n _this.distance = distance;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n CoordinateAndDistance.prototype.toFilterObject = function () {\n return {\n coordinate: this.coordinate.toArray(),\n distance: this.distance\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n CoordinateAndDistance.prototype.getName = function () {\n return \"CoordinateAndDistance\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n CoordinateAndDistance.fromFilterObject = function (object) {\n return new CoordinateAndDistance(Coordinate_1.Coordinate.createFromArray(object.coordinate), object.distance);\n };\n return CoordinateAndDistance;\n}(LocationRange));\nexports.CoordinateAndDistance = CoordinateAndDistance;\n/**\n * Polygon\n */\nvar Polygon = /** @class */ (function (_super) {\n tslib_1.__extends(Polygon, _super);\n /**\n * Constructor\n *\n * @param coordinates\n */\n function Polygon(coordinates) {\n var _this = _super.call(this) || this;\n if (coordinates.length < 3) {\n throw new Error(\"A polygon needs more than two coordinates.\");\n }\n _this.coordinates = coordinates;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{coordinates: {lat:number, lon:number}[]}}\n */\n Polygon.prototype.toFilterObject = function () {\n var coordinates = [];\n for (var i in this.coordinates) {\n coordinates.push(this.coordinates[i].toArray());\n }\n return {\n coordinates: coordinates\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Polygon.prototype.getName = function () {\n return \"Polygon\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {Polygon}\n */\n Polygon.fromFilterObject = function (object) {\n var coordinates = [];\n for (var i in object.coordinates) {\n coordinates.push(Coordinate_1.Coordinate.createFromArray(object.coordinates[i]));\n }\n return new Polygon(coordinates);\n };\n return Polygon;\n}(LocationRange));\nexports.Polygon = Polygon;\n/**\n * Square\n */\nvar Square = /** @class */ (function (_super) {\n tslib_1.__extends(Square, _super);\n /**\n * Constructor\n *\n * @param topLeftCoordinate\n * @param bottomRightCoordinate\n */\n function Square(topLeftCoordinate, bottomRightCoordinate) {\n var _this = _super.call(this) || this;\n _this.topLeftCoordinate = topLeftCoordinate;\n _this.bottomRightCoordinate = bottomRightCoordinate;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n Square.prototype.toFilterObject = function () {\n return {\n top_left: this.topLeftCoordinate.toArray(),\n bottom_right: this.bottomRightCoordinate.toArray()\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Square.prototype.getName = function () {\n return \"Square\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n Square.fromFilterObject = function (object) {\n return new Square(Coordinate_1.Coordinate.createFromArray(object.top_left), Coordinate_1.Coordinate.createFromArray(object.bottom_right));\n };\n return Square;\n}(LocationRange));\nexports.Square = Square;\n","\"use strict\";\nexports.__esModule = true;\nexports.AxiosClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar axios_1 = require(\"axios\");\nvar __1 = require(\"..\");\nvar Client_1 = require(\"./Client\");\nvar Response_1 = require(\"./Response\");\n/**\n * AxiosClient\n */\nvar AxiosClient = /** @class */ (function (_super) {\n tslib_1.__extends(AxiosClient, _super);\n /**\n * Constructor\n *\n * @param host\n * @param version\n * @param timeout\n * @param overrideQueries\n */\n function AxiosClient(host, version, timeout, overrideQueries) {\n var _this = _super.call(this, version) || this;\n _this.host = host;\n _this.timeout = timeout;\n _this.overrideQueries = overrideQueries;\n _this.abortControllers = {};\n return _this;\n }\n /**\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n */\n AxiosClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var headers, axiosRequestConfig, axiosResponse, error_1, response;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n method = method.toLowerCase();\n if (\"get\" === method &&\n this.overrideQueries) {\n this.abort(url, true);\n }\n headers = \"get\" === method\n ? {}\n : {\n \"Content-Encoding\": \"gzip\",\n \"Content-Type\": \"application/json\"\n };\n axiosRequestConfig = {\n baseURL: this.host.replace(/\\/*$/g, \"\"),\n data: data,\n headers: headers,\n method: method,\n timeout: this.timeout,\n transformRequest: [function (rawData) { return JSON.stringify(rawData); }],\n url: url + \"?\" + Client_1.Client.objectToUrlParameters(tslib_1.__assign(tslib_1.__assign({}, parameters), {\n token: credentials.token\n })).replace(/#/g, \"%23\")\n };\n if (typeof this.abortControllers[url] !== \"undefined\") {\n axiosRequestConfig.signal = this.abortControllers[url].signal;\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.fetch(url, axiosRequestConfig, 3)];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, new Response_1.Response(axiosResponse.status, axiosResponse.data)];\n case 3:\n error_1 = _a.sent();\n response = void 0;\n if (error_1.response) {\n response = new Response_1.Response(error_1.response.status, error_1.response.data);\n }\n else {\n response = new Response_1.Response(__1.ConnectionError.getTransportableHTTPError(), {\n message: error_1.message\n });\n }\n throw response;\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n AxiosClient.prototype.abort = function (url, urlIsFormatted) {\n if (!urlIsFormatted) {\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n }\n if (typeof this.abortControllers[url] !== \"undefined\") {\n this.abortControllers[url].abort();\n }\n this.generateAbortController(url);\n };\n /**\n * Generate a new cancellation token for a query\n *\n * @param url\n */\n AxiosClient.prototype.generateAbortController = function (url) {\n this.abortControllers[url] = new AbortController();\n };\n /**\n * @param url\n * @param options\n * @param retries\n */\n AxiosClient.prototype.fetch = function (url, options, retries) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, axios_1[\"default\"]\n .request(options)\n .then(function (response) {\n return {\n data: response.data,\n status: response.status\n };\n })[\"catch\"](function (error) {\n var response = error.response;\n if (error.code !== undefined &&\n error.code !== \"ECONNREFUSED\" &&\n error.code !== \"ECONNABORTED\" &&\n error.code !== \"ERR_BAD_REQUEST\" &&\n error.message !== \"Network Error\") {\n return {\n data: response.data,\n status: response.status\n };\n }\n if (retries <= 0) {\n throw error;\n }\n retries = retries - 1;\n return _this.fetch(url, options, retries);\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return AxiosClient;\n}(Client_1.Client));\nexports.AxiosClient = AxiosClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.CacheClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ts_md5_1 = require(\"ts-md5\");\n/**\n * AxiosClient\n */\nvar CacheClient = /** @class */ (function () {\n function CacheClient(httpClient) {\n this.cache = {};\n this.hits = 0;\n this.httpClient = httpClient;\n }\n CacheClient.prototype.flushCache = function () {\n this.cache = {};\n };\n CacheClient.prototype.size = function () {\n return Object.keys(this.cache).length;\n };\n CacheClient.prototype.getNumberOfHits = function () {\n return this.hits;\n };\n /**\n * Get\n *\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n *\n * @return {Promise}\n */\n CacheClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var cacheUID, _a, _b;\n return tslib_1.__generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (method !== 'get') {\n return [2 /*return*/, this.httpClient.get(url, method, credentials, parameters, data)];\n }\n cacheUID = ts_md5_1.Md5.hashStr(JSON.stringify({\n 'u': url,\n 'c': credentials,\n 'p': parameters,\n 'd': data\n })).toString();\n if (!!this.cache[cacheUID]) return [3 /*break*/, 2];\n _a = this.cache;\n _b = cacheUID;\n return [4 /*yield*/, this.httpClient.get(url, method, credentials, parameters, data)];\n case 1:\n _a[_b] = _c.sent();\n return [3 /*break*/, 3];\n case 2:\n this.httpClient.abort(url, false);\n this.hits++;\n _c.label = 3;\n case 3: return [2 /*return*/, this.cache[cacheUID]];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n CacheClient.prototype.abort = function (url, urlIsFormatted) {\n };\n return CacheClient;\n}());\nexports.CacheClient = CacheClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Client = void 0;\n/**\n * Client\n */\nvar Client = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param version\n */\n function Client(version) {\n this.version = version.replace(/^\\/*|\\/*$/g, \"\");\n }\n /**\n * Build an url parameters array by an object\n *\n * @param params\n *\n * @returns {string}\n */\n Client.objectToUrlParameters = function (params) {\n var builtParams = [];\n for (var i in params) {\n builtParams.push(i + \"=\" + params[i]);\n }\n return builtParams.join(\"&\");\n };\n return Client;\n}());\nexports.Client = Client;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpClient = void 0;\n/**\n * Http class\n */\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n }\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Response = void 0;\n/**\n * Response\n */\nvar Response = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param code\n * @param body\n */\n function Response(code, body) {\n this.code = code;\n this.body = body;\n }\n /**\n * Get code\n *\n * @return {number}\n */\n Response.prototype.getCode = function () {\n return this.code;\n };\n /**\n * Get body\n *\n * @return {any}\n */\n Response.prototype.getBody = function () {\n return this.body;\n };\n return Response;\n}());\nexports.Response = Response;\n","\"use strict\";\nexports.__esModule = true;\nexports.AppUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * AppUUID class\n */\nvar AppUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function AppUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.appUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n AppUUID.createById = function (id) {\n return new AppUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n AppUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n AppUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n AppUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new AppUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n AppUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return AppUUID;\n}());\nexports.AppUUID = AppUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Changes = exports.TYPE_ARRAY = exports.TYPE_ARRAY_EXPECTS_ELEMENT = exports.TYPE_ARRAY_ELEMENT_DELETE = exports.TYPE_ARRAY_ELEMENT_ADD = exports.TYPE_ARRAY_ELEMENT_UPDATE = exports.TYPE_LITERAL = exports.TYPE_VALUE = void 0;\n/**\n * filter constants\n */\nexports.TYPE_VALUE = 1;\nexports.TYPE_LITERAL = 4;\nexports.TYPE_ARRAY_ELEMENT_UPDATE = 8;\nexports.TYPE_ARRAY_ELEMENT_ADD = 16;\nexports.TYPE_ARRAY_ELEMENT_DELETE = 32;\nexports.TYPE_ARRAY_EXPECTS_ELEMENT = 24;\nexports.TYPE_ARRAY = 56;\n/**\n * Changes Type cast\n * @param Changes\n */\nvar Changes = /** @class */ (function () {\n function Changes() {\n /**\n * Changes\n *\n * @type {Array}\n */\n this.changes = [];\n }\n /**\n * Add new change\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addChange = function (field, value, type) {\n if (type === void 0) { type = exports.TYPE_VALUE; }\n this.changes.push({\n field: field,\n type: type,\n value: value\n });\n };\n /**\n * Update element from list\n *\n * @param field\n * @param condition\n * @param value\n * @param type\n */\n Changes.prototype.updateElementFromList = function (field, condition, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_UPDATE,\n condition: condition,\n value: value\n });\n };\n /**\n * Add element in list\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addElementInList = function (field, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_ADD,\n value: value\n });\n };\n /**\n * Delete element from list\n *\n * @param field\n * @param condition\n */\n Changes.prototype.deleteElementFromList = function (field, condition) {\n this.changes.push({\n field: field,\n type: exports.TYPE_ARRAY_ELEMENT_DELETE,\n condition: condition\n });\n };\n /**\n * Get changes\n *\n * @returns {[]}\n */\n Changes.prototype.getChanges = function () {\n return this.changes;\n };\n /**\n * Create\n *\n * @returns {Changes}\n */\n Changes.create = function () {\n return new Changes();\n };\n /**\n * To array\n *\n * @returns {[]}\n */\n Changes.prototype.toArray = function () {\n return JSON.parse(JSON.stringify(this.changes));\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Changes}\n */\n Changes.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var changes = Changes.create();\n changes.changes = array;\n return changes;\n };\n return Changes;\n}());\nexports.Changes = Changes;\n","\"use strict\";\nexports.__esModule = true;\nexports.Coordinate = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * Coordinate Type cast\n * @param coordinate\n */\nvar Coordinate = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param {number} lat\n * @param {number} lon\n */\n function Coordinate(lat, lon) {\n this.lat = lat;\n this.lon = lon;\n }\n /**\n * Get latitude\n *\n * @return float\n */\n Coordinate.prototype.getLatitude = function () {\n return this.lat;\n };\n /**\n * Get longitude\n *\n * @return float\n */\n Coordinate.prototype.getLongitude = function () {\n return this.lon;\n };\n /**\n * To array\n *\n * @return {{lat: number, lon: number}}\n */\n Coordinate.prototype.toArray = function () {\n return {\n lat: this.lat,\n lon: this.lon\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return Coordinate\n *\n * @throws InvalidFormatError\n */\n Coordinate.createFromArray = function (array) {\n if (typeof array.lat == \"undefined\" ||\n typeof array.lon == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n return new Coordinate(array.lat, array.lon);\n };\n return Coordinate;\n}());\nexports.Coordinate = Coordinate;\n","\"use strict\";\nexports.__esModule = true;\nexports.Index = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\n/**\n * Index class\n */\nvar Index = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param appUUID\n * @param isOK\n * @param docCount\n * @param size\n */\n function Index(uuid, appUUID, isOK, docCount, size) {\n if (isOK === void 0) { isOK = false; }\n if (docCount === void 0) { docCount = 0; }\n if (size === void 0) { size = '0kb'; }\n this.uuid = uuid;\n this.appUUID = appUUID;\n this.isOK = isOK;\n this.docCount = docCount;\n this.size = size;\n }\n /**\n * Get uuid\n *\n * @return {IndexUUID}\n */\n Index.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get app id\n *\n * @return {AppUUID}\n */\n Index.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Index is OK\n *\n * @return {boolean}\n */\n Index.prototype.isOk = function () {\n return this.isOK;\n };\n /**\n * Get doc count\n *\n * @return {number}\n */\n Index.prototype.getDocCount = function () {\n return this.docCount;\n };\n /**\n * get size\n *\n * @return {string}\n */\n Index.prototype.getSize = function () {\n return this.size;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n Index.prototype.toArray = function () {\n return {\n uuid: this.uuid.toArray(),\n app_id: this.appUUID.toArray(),\n is_ok: this.isOK,\n doc_count: this.docCount,\n size: this.size\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n Index.createFromArray = function (array) {\n if (typeof array.uuid == \"undefined\" ||\n typeof array.app_id == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.indexFormatNotValid();\n }\n return new Index(IndexUUID_1.IndexUUID.createFromArray(array.uuid), AppUUID_1.AppUUID.createFromArray(array.app_id), (typeof array.is_ok == \"undefined\" ? false : array.is_ok), (typeof array.doc_count == \"undefined\" ? 0 : array.doc_count), (typeof array.size == \"undefined\" ? '0kb' : array.size));\n };\n return Index;\n}());\nexports.Index = Index;\n","\"use strict\";\nexports.__esModule = true;\nexports.IndexUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * IndexUUID class\n */\nvar IndexUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function IndexUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.indexUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n IndexUUID.createById = function (id) {\n return new IndexUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n IndexUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n IndexUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n IndexUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new IndexUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n IndexUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return IndexUUID;\n}());\nexports.IndexUUID = IndexUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Item = void 0;\nvar tslib_1 = require(\"tslib\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Coordinate_1 = require(\"./Coordinate\");\nvar ItemUUID_1 = require(\"./ItemUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\n/**\n * Item class\n */\nvar Item = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n */\n function Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n this.metadata = {};\n this.indexedMetadata = {};\n this.searchableMetadata = {};\n this.exactMatchingMetadata = [];\n this.suggest = [];\n this.highlights = {};\n this.promoted = false;\n this.uuid = uuid;\n this.coordinate = coordinate;\n this.metadata = metadata;\n this.indexedMetadata = indexedMetadata;\n this.searchableMetadata = searchableMetadata;\n this.exactMatchingMetadata = exactMatchingMetadata;\n this.suggest = suggest;\n }\n /**\n * Create new Item\n *\n * @param uuid\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.create = function (uuid, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, null, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Create new located Item\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.createLocated = function (uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Get uuid\n *\n * @returns ItemUUID\n */\n Item.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get id\n *\n * @returns string\n */\n Item.prototype.getId = function () {\n return this.uuid.getId();\n };\n /**\n * Get type\n *\n * @returns string\n */\n Item.prototype.getType = function () {\n return this.uuid.getType();\n };\n /**\n * Get coordinate\n *\n * @returns Coordinate|null\n */\n Item.prototype.getCoordinate = function () {\n return this.coordinate;\n };\n /**\n * Get distance\n *\n * @returns int\n */\n Item.prototype.getDistance = function () {\n return this.distance;\n };\n /**\n * Get metadata\n *\n * @returns Array\n */\n Item.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Set metadata\n *\n * @param metadata\n */\n Item.prototype.setMetadata = function (metadata) {\n this.metadata = metadata;\n };\n /**\n * Add metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addMetadata = function (key, value) {\n this.metadata[key] = value;\n };\n /**\n * Get indexed metadata\n *\n * @returns Array\n */\n Item.prototype.getIndexedMetadata = function () {\n return this.indexedMetadata;\n };\n /**\n * Set indexed metadata\n *\n * @param indexedMetadata\n */\n Item.prototype.setIndexedMetadata = function (indexedMetadata) {\n this.indexedMetadata = indexedMetadata;\n };\n /**\n * Add indexed metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addIndexedMetadata = function (key, value) {\n this.indexedMetadata[key] = value;\n };\n /**\n * Get searchable metadata\n *\n * @returns Array\n */\n Item.prototype.getSearchableMetadata = function () {\n return this.searchableMetadata;\n };\n /**\n * Set searchable metadata\n *\n * @param searchableMetadata\n */\n Item.prototype.setSearchableMetadata = function (searchableMetadata) {\n this.searchableMetadata = searchableMetadata;\n };\n /**\n * Add searchable metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addSearchableMetadata = function (key, value) {\n this.searchableMetadata[key] = value;\n };\n /**\n * Get exactMatching metadata\n *\n * @returns Array\n */\n Item.prototype.getExactMatchingMetadata = function () {\n return this.exactMatchingMetadata;\n };\n /**\n * Set exactMatching metadata\n *\n * @param exactMatchingMetadata\n */\n Item.prototype.setExactMatchingMetadata = function (exactMatchingMetadata) {\n this.exactMatchingMetadata = exactMatchingMetadata;\n };\n /**\n * Add exactMatching metadata\n *\n * @param value\n */\n Item.prototype.addExactMatchingMetadata = function (value) {\n this.exactMatchingMetadata.push(value);\n };\n /**\n * Get all metadata\n *\n * @returns {{}}\n */\n Item.prototype.getAllMetadata = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.metadata), this.indexedMetadata);\n };\n /**\n * Get\n *\n * @param key\n *\n * @returns mixed|null\n */\n Item.prototype.get = function (key) {\n var allMetadata = this.getAllMetadata();\n return (typeof allMetadata[key] != \"undefined\")\n ? allMetadata[key]\n : null;\n };\n /**\n * Get suggest\n *\n * @returns Array\n */\n Item.prototype.getSuggest = function () {\n return this.suggest;\n };\n /**\n * Get highlights\n *\n * @returns Array\n */\n Item.prototype.getHighlights = function () {\n return this.highlights;\n };\n /**\n * Get highlight\n *\n * @param key\n *\n * @return string|null\n */\n Item.prototype.getHighlight = function (key) {\n return (typeof this.highlights[key] != \"undefined\")\n ? this.highlights[key]\n : null;\n };\n /**\n * Is promoted\n *\n * @returns boolean\n */\n Item.prototype.isPromoted = function () {\n return this.promoted;\n };\n /**\n * Set score\n *\n * @param score\n *\n * @return {Item}\n */\n Item.prototype.setScore = function (score) {\n this.score = score;\n return this;\n };\n /**\n * Get score\n *\n * @return {number}\n */\n Item.prototype.getScore = function () {\n return this.score;\n };\n /**\n * Set appUUID\n *\n * @return {AppUUID}\n */\n Item.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Set indexUUID\n *\n * @return {IndexUUID}\n */\n Item.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n /**\n * To array\n */\n Item.prototype.toArray = function () {\n var itemAsArray = {\n uuid: this.uuid.toArray()\n };\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n itemAsArray.coordinate = this.coordinate.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n itemAsArray.metadata = this.metadata;\n }\n if (Object.keys(this.indexedMetadata).length > 0) {\n itemAsArray.indexed_metadata = this.indexedMetadata;\n }\n if (Object.keys(this.searchableMetadata).length > 0) {\n itemAsArray.searchable_metadata = this.searchableMetadata;\n }\n if (this.exactMatchingMetadata.length > 0) {\n itemAsArray.exact_matching_metadata = this.exactMatchingMetadata;\n }\n if (this.suggest.length > 0) {\n itemAsArray.suggest = this.suggest;\n }\n if (Object.keys(this.highlights).length > 0) {\n itemAsArray.highlights = this.highlights;\n }\n if (this.isPromoted()) {\n itemAsArray.is_promoted = true;\n }\n if (typeof this.distance != \"undefined\") {\n itemAsArray.distance = this.distance;\n }\n if (typeof this.score != \"undefined\") {\n itemAsArray.score = this.score;\n }\n if (typeof this.appUUID != \"undefined\") {\n itemAsArray.app_uuid = this.appUUID.toArray();\n }\n if (typeof this.indexUUID != \"undefined\") {\n itemAsArray.index_uuid = this.indexUUID.toArray();\n }\n return itemAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n */\n Item.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.uuid != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.itemUUIDRepresentationNotValid();\n }\n if (typeof array.coordinate != \"undefined\" &&\n typeof array.coordinate != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n var item = (typeof array.coordinate == \"object\" &&\n array.coordinate != null)\n ? Item.createLocated(ItemUUID_1.ItemUUID.createFromArray(array.uuid), Coordinate_1.Coordinate.createFromArray(array.coordinate), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest))\n : Item.create(ItemUUID_1.ItemUUID.createFromArray(array.uuid), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest));\n if (typeof array.distance != \"undefined\" &&\n array.distance != null) {\n item.distance = array.distance;\n }\n if (typeof array.highlights == \"object\" &&\n array.highlights != null) {\n item.highlights = array.highlights;\n }\n if (typeof array.is_promoted != \"undefined\" &&\n array.is_promoted != null) {\n item.promoted = array.is_promoted;\n }\n if (typeof array.score != \"undefined\" &&\n array.score != null) {\n item.score = array.score;\n }\n if (typeof array.app_uuid != \"undefined\" &&\n array.app_uuid != null) {\n item.appUUID = AppUUID_1.AppUUID.createFromArray(array.app_uuid);\n }\n if (typeof array.index_uuid != \"undefined\" &&\n array.index_uuid != null) {\n item.indexUUID = IndexUUID_1.IndexUUID.createFromArray(array.index_uuid);\n }\n return item;\n };\n /**\n * Compose uuid\n *\n * @returns string\n */\n Item.prototype.composeUUID = function () {\n return this.uuid.composedUUID();\n };\n /**\n * Get path by field.\n *\n * @param field\n *\n * @returns {string}\n */\n Item.getPathByField = function (field) {\n return ([\"id\", \"type\"].indexOf(field) > -1)\n ? \"uuid.\" + field\n : \"indexed_metadata.\" + field;\n };\n return Item;\n}());\nexports.Item = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.ItemUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * ItemUUID class\n */\nvar ItemUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n * @param type\n */\n function ItemUUID(id, type) {\n this.id = id;\n this.type = type;\n }\n /**\n * Create composed UUID\n *\n * @param composedUUID\n *\n * @returns {ItemUUID}\n */\n ItemUUID.createByComposedUUID = function (composedUUID) {\n var parts = composedUUID.split(\"~\");\n if (2 != parts.length) {\n throw InvalidFormatError_1.InvalidFormatError.composedItemUUIDNotValid();\n }\n return new ItemUUID(parts[0], parts[1]);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n ItemUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * Get type\n *\n * @returns {string}\n */\n ItemUUID.prototype.getType = function () {\n return this.type;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n ItemUUID.prototype.toArray = function () {\n return {\n id: this.id,\n type: this.type\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n ItemUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new ItemUUID(array.id, array.type);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n ItemUUID.prototype.composedUUID = function () {\n return this.id + \"~\" + this.type;\n };\n return ItemUUID;\n}());\nexports.ItemUUID = ItemUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Metadata = void 0;\n/**\n * User class\n */\nvar Metadata = /** @class */ (function () {\n function Metadata() {\n }\n /**\n * To metadata\n *\n * @param array:{}\n *\n * @returns {string}\n */\n Metadata.toMetadata = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var parts = [];\n for (var key in array) {\n parts.push(key + \"##\" + array[key]);\n }\n return parts.join(\"~~\");\n };\n /**\n * From metadata\n *\n * @param metadata\n *\n * @return {{}}\n */\n Metadata.fromMetadata = function (metadata) {\n var values = {};\n var splittedParts = metadata.split(\"~~\");\n var iterator = 0;\n var size = 0;\n var lastElement = null;\n for (var key in splittedParts) {\n var part = splittedParts[key];\n var parts = part.split(\"##\");\n if (parts.length > 1) {\n lastElement = parts[1];\n values[parts[0]] = lastElement;\n }\n else {\n lastElement = part;\n values[iterator++] = lastElement;\n }\n size++;\n }\n if (size == 1) {\n values = {\n id: lastElement,\n name: lastElement\n };\n }\n if (typeof values.id == \"undefined\") {\n return null;\n }\n return values;\n };\n return Metadata;\n}());\nexports.Metadata = Metadata;\n","\"use strict\";\nexports.__esModule = true;\nexports.User = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * User class\n */\nvar User = /** @class */ (function () {\n /**\n * Construct\n *\n * @param id string\n * @param attributes Array\n */\n function User(id, attributes) {\n if (attributes === void 0) { attributes = {}; }\n this.id = id;\n this.attributes = attributes;\n }\n /**\n * Return the user id\n *\n * @return {string}\n */\n User.prototype.getId = function () {\n return this.id;\n };\n /**\n * Return array\n *\n * @returns {{}}\n */\n User.prototype.getAttributes = function () {\n return this.attributes;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n User.prototype.toArray = function () {\n var array = {\n id: this.id\n };\n if (Object.keys(this.attributes).length > 0) {\n array.attributes = this.attributes;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n User.createFromArray = function (array) {\n if (array == null ||\n typeof array.id == \"undefined\" ||\n array.id == null) {\n throw InvalidFormatError_1.InvalidFormatError.userFormatNotValid();\n }\n var attributes = typeof array.attributes === typeof {}\n ? array.attributes\n : {};\n return new User(array.id, attributes);\n };\n return User;\n}());\nexports.User = User;\n","\"use strict\";\nexports.__esModule = true;\nexports.Aggregation = exports.AGGREGATION_NO_LIMIT = exports.AGGREGATION_SORT_BY_NAME_DESC = exports.AGGREGATION_SORT_BY_NAME_ASC = exports.AGGREGATION_SORT_BY_COUNT_DESC = exports.AGGREGATION_SORT_BY_COUNT_ASC = void 0;\nvar Filter_1 = require(\"./Filter\");\n/**\n * Aggregation constants\n */\nexports.AGGREGATION_SORT_BY_COUNT_ASC = [\"_count\", \"asc\"];\nexports.AGGREGATION_SORT_BY_COUNT_DESC = [\"_count\", \"desc\"];\nexports.AGGREGATION_SORT_BY_NAME_ASC = [\"_term\", \"asc\"];\nexports.AGGREGATION_SORT_BY_NAME_DESC = [\"_term\", \"desc\"];\nexports.AGGREGATION_NO_LIMIT = 0;\n/**\n * Aggregation class\n */\nvar Aggregation = /** @class */ (function () {\n /**\n * Construct\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n */\n function Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n this.subgroup = [];\n this.name = name;\n this.field = field;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.subgroup = subgroup;\n this.sort = sort;\n this.limit = limit;\n this.promoted = promoted;\n }\n /**\n * Get name\n *\n * @returns {string}\n */\n Aggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get field\n *\n * @returns {string}\n */\n Aggregation.prototype.getField = function () {\n return this.field;\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Aggregation.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Aggregation.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get subgroup\n *\n * @return {[]}\n */\n Aggregation.prototype.getSubgroup = function () {\n return this.subgroup;\n };\n /**\n * Get sort\n *\n * @return {[]}\n */\n Aggregation.prototype.getSort = function () {\n return this.sort;\n };\n /**\n * Get limit\n *\n * @return {number}\n */\n Aggregation.prototype.getLimit = function () {\n return this.limit;\n };\n /**\n * Get promoted\n *\n * @return {[]}\n */\n Aggregation.prototype.getPromoted = function () {\n return this.promoted;\n };\n /**\n * Create\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n *\n * @returns {Aggregation}\n */\n Aggregation.create = function (name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n if (subgroup === void 0) { subgroup = []; }\n if (sort === void 0) { sort = exports.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = exports.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return new Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Aggregation.prototype.toArray = function () {\n var aggregationAsArray = {\n name: this.name\n };\n if (this.field !== \"uuid.type\") {\n aggregationAsArray.field = this.field;\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n aggregationAsArray.application_type = this.applicationType;\n }\n if (this.filterType !== Filter_1.FILTER_TYPE_FIELD) {\n aggregationAsArray.filter_type = this.filterType;\n }\n if (this.subgroup.length > 0) {\n aggregationAsArray.subgroup = this.subgroup;\n }\n if (JSON.stringify(this.sort) !== JSON.stringify(exports.AGGREGATION_SORT_BY_COUNT_DESC)) {\n aggregationAsArray.sort = this.sort;\n }\n if (this.limit !== exports.AGGREGATION_NO_LIMIT) {\n aggregationAsArray.limit = this.limit;\n }\n if (this.promoted.length > 0) {\n aggregationAsArray.promoted = this.promoted;\n }\n return aggregationAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Aggregation}\n */\n Aggregation.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field === \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.application_type === \"undefined\") {\n array.application_type = Filter_1.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type === \"undefined\") {\n array.filter_type = Filter_1.FILTER_TYPE_FIELD;\n }\n if (typeof array.subgroup === \"undefined\") {\n array.subgroup = [];\n }\n if (typeof array.sort === \"undefined\") {\n array.sort = exports.AGGREGATION_SORT_BY_COUNT_DESC;\n }\n if (typeof array.limit === \"undefined\") {\n array.limit = exports.AGGREGATION_NO_LIMIT;\n }\n if (typeof array.promoted === \"undefined\") {\n array.promoted = [];\n }\n return Aggregation.create(array.name, array.field, array.application_type, array.filter_type, array.subgroup, array.sort, array.limit, array.promoted);\n };\n return Aggregation;\n}());\nexports.Aggregation = Aggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.Filter = exports.FILTER_TYPE_QUERY = exports.FILTER_TYPE_GEO = exports.FILTER_TYPE_DATE_RANGE = exports.FILTER_TYPE_RANGE = exports.FILTER_TYPE_FIELD = exports.FILTER_PROMOTE = exports.FILTER_EXCLUDE = exports.FILTER_AT_LEAST_ONE = exports.FILTER_MUST_ALL_WITH_LEVELS = exports.FILTER_MUST_ALL = void 0;\n/**\n * filter constants\n */\nexports.FILTER_MUST_ALL = 4;\nexports.FILTER_MUST_ALL_WITH_LEVELS = 5;\nexports.FILTER_AT_LEAST_ONE = 8;\nexports.FILTER_EXCLUDE = 16;\nexports.FILTER_PROMOTE = 32;\nexports.FILTER_TYPE_FIELD = \"field\";\nexports.FILTER_TYPE_RANGE = \"range\";\nexports.FILTER_TYPE_DATE_RANGE = \"date_range\";\nexports.FILTER_TYPE_GEO = \"geo\";\nexports.FILTER_TYPE_QUERY = \"query\";\n/**\n * Filter class\n */\nvar Filter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n */\n function Filter(field, values, applicationType, filterType, filterTerms) {\n this.field = field;\n this.values = values;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.filterTerms = filterTerms;\n }\n /**\n * Get field\n *\n * @returns {string}\n */\n Filter.prototype.getField = function () {\n return this.field;\n };\n /**\n * Get values\n *\n * @returns {any}\n */\n Filter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Has value\n *\n * @param value\n *\n * @returns {boolean}\n */\n Filter.prototype.hasValue = function (value) {\n return typeof this.values[value] == \"undefined\";\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Filter.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Filter.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get filter type\n *\n * @return {{}}\n */\n Filter.prototype.getFilterTerms = function () {\n return this.filterTerms;\n };\n /**\n * Create\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n *\n * @return {Filter}\n */\n Filter.create = function (field, values, applicationType, filterType, filterTerms) {\n if (filterTerms === void 0) { filterTerms = []; }\n return new Filter(field, values, applicationType, filterType, filterTerms);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Filter.prototype.toArray = function () {\n var filterAsArray = {};\n if (this.field != \"uuid.type\") {\n filterAsArray.field = this.field;\n }\n if (this.values.length > 0 ||\n Object.keys(this.values).length > 0) {\n filterAsArray.values = this.values;\n }\n if (this.applicationType != exports.FILTER_AT_LEAST_ONE) {\n filterAsArray.application_type = this.applicationType;\n }\n if (this.filterType != exports.FILTER_TYPE_FIELD) {\n filterAsArray.filter_type = this.filterType;\n }\n if (this.filterTerms.length > 0) {\n filterAsArray.filter_terms = this.filterTerms;\n }\n return filterAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Filter}\n */\n Filter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field == \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.values == \"undefined\") {\n array.values = [];\n }\n if (typeof array.application_type == \"undefined\") {\n array.application_type = exports.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type == \"undefined\") {\n array.filter_type = exports.FILTER_TYPE_FIELD;\n }\n if (typeof array.filter_terms == \"undefined\") {\n array.filter_terms = [];\n }\n return Filter.create(array.field, array.values, array.application_type, array.filter_type, array.filter_terms);\n };\n return Filter;\n}());\nexports.Filter = Filter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Query = exports.NO_MIN_SCORE = exports.QUERY_DEFAULT_SIZE = exports.QUERY_DEFAULT_PAGE = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Item_1 = require(\"../Model/Item\");\nvar User_1 = require(\"../Model/User\");\nvar Aggregation_1 = require(\"./Aggregation\");\nvar Filter_1 = require(\"./Filter\");\nvar Filter_2 = require(\"./Filter\");\nvar Aggregation_2 = require(\"./Aggregation\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Filter_3 = require(\"./Filter\");\nvar ScoreStrategies_1 = require(\"./ScoreStrategies\");\nvar SortBy_1 = require(\"./SortBy\");\nvar IndexUUID_1 = require(\"../Model/IndexUUID\");\n/**\n * Query constants\n */\nexports.QUERY_DEFAULT_PAGE = 1;\nexports.QUERY_DEFAULT_SIZE = 10;\nexports.NO_MIN_SCORE = 0.0;\n/**\n * Query class\n */\nvar Query = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryText\n */\n function Query(queryText) {\n this.UUID = null;\n this.fields = [];\n this.universeFilters = {};\n this.filters = {};\n this.itemsPromoted = [];\n this.aggregations = {};\n this.resultsEnabled = true;\n this.aggregationsEnabled = true;\n this.numberOfSuggestions = 0;\n this.highlightsEnabled = false;\n this.autocompleteEnabled = false;\n this.searchableFields = [];\n this.fuzziness = null;\n this.minScore = exports.NO_MIN_SCORE;\n this.metadata = {};\n this.subqueries = {};\n this.queryOperator = null;\n this.sortByInstance = SortBy_1.SortBy.create();\n this.filters._query = Filter_1.Filter.create(\"\", [queryText], 0, Filter_3.FILTER_TYPE_QUERY);\n }\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.createLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n var query = Query.create(queryText, page, size);\n query.coordinate = coordinate;\n return query;\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.create = function (queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n page = Math.max(1, page);\n var query = new Query(queryText);\n query.from = (page - 1) * size;\n query.size = size;\n query.page = page;\n return query;\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Query.createMatchAll = function () {\n return Query.create(\"\", exports.QUERY_DEFAULT_PAGE, exports.QUERY_DEFAULT_SIZE);\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Query.createByUUID = function (uuid) {\n return Query.createByUUIDs(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.createByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n var ids = [];\n for (var i in uuids) {\n ids.push(uuids[i].composedUUID());\n }\n var query = Query.create(\"\", exports.QUERY_DEFAULT_PAGE, ids.length)\n .disableAggregations()\n .disableSuggestions();\n query.filters._id = Filter_1.Filter.create(\"_id\", ids, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD);\n return query;\n };\n /**\n * Create by UUIDs\n *\n * @param queries\n *\n * @return {Query}\n */\n Query.createMultiquery = function (queries) {\n var query = Query.createMatchAll();\n query.subqueries = queries;\n return query;\n };\n /**\n * set fields\n *\n * @param fields\n *\n * @return {Query}\n */\n Query.prototype.setFields = function (fields) {\n this.fields = fields;\n return this;\n };\n /**\n * get fields\n *\n * @return {string[]}\n */\n Query.prototype.getFields = function () {\n return this.fields;\n };\n /**\n * Filter universe by types\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByTypes = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.type;\n }\n return this;\n };\n /**\n * Filter by types\n *\n * @param values\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByTypes = function (values, aggregate, aggregationSort) {\n var _a, _b;\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.type;\n }\n if (aggregate) {\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_b = {}, _b[\"type\"] = Aggregation_1.Aggregation.create(\"type\", fieldPath, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort), _b));\n }\n return this;\n };\n /**\n * Filter universe by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.id;\n }\n return this;\n };\n /**\n * Filter by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.id;\n }\n return this;\n };\n /**\n * Filter universe by\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseBy = function (field, values, applicationType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter by\n *\n * @param filterName\n * @param field\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterBy = function (filterName, field, values, applicationType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateBy(filterName, field, applicationType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter universe by range\n *\n * @param field\n * @param values\n * @param applicationType\n * @param rangeType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByRange = function (field, values, applicationType, rangeType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter universe by date range\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByDateRange = function (field, values, applicationType) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n return this.filterUniverseByRange(field, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE);\n };\n /**\n * Filter by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param values\n * @param applicationType\n * @param rangeType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByRange = function (filterName, field, ranges, values, applicationType, rangeType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length !== 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateByRange(filterName, fieldPath, ranges, applicationType, rangeType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByDateRange = function (filterName, field, options, values, applicationType, aggregate, aggregationSort) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n return this.filterByRange(filterName, field, options, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregate, aggregationSort);\n };\n /**\n * Filter universe by location\n *\n * @param locationRange\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByLocation = function (locationRange) {\n var _a;\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"coordinate\"] = Filter_1.Filter.create(\"coordinate\", locationRange.toArray(), Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_GEO), _a));\n return this;\n };\n /**\n * Set filter fields\n *\n * @param searchableFields\n *\n * @return {Query}\n */\n Query.prototype.setSearchableFields = function (searchableFields) {\n this.searchableFields = searchableFields;\n return this;\n };\n /**\n * Get filter fields\n *\n * @return {string[]}\n */\n Query.prototype.getSearchableFields = function () {\n return this.searchableFields;\n };\n /**\n * Sort by\n *\n * @param sortBy\n *\n * @return {Query}\n */\n Query.prototype.sortBy = function (sortBy) {\n if (sortBy.isSortedByGeoDistance()) {\n if (!(this.coordinate instanceof Coordinate_1.Coordinate)) {\n throw InvalidFormatError_1.InvalidFormatError.querySortedByDistanceWithoutCoordinate();\n }\n sortBy.setCoordinate(this.coordinate);\n }\n this.sortByInstance = sortBy;\n return this;\n };\n /**\n * Aggregate by\n *\n * @param filterName\n * @param field\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateBy = function (filterName, field, applicationType, aggregationSort, limit, promoted) {\n var _a;\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param applicationType\n * @param rangeType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByRange = function (filterName, field, ranges, applicationType, rangeType, aggregationSort, limit, promoted) {\n var _a;\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n if (ranges.length === 0) {\n return this;\n }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, rangeType, ranges, aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByDateRange = function (filterName, field, options, applicationType, aggregationSort, limit, promoted) {\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return this.aggregateByRange(filterName, field, options, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregationSort, limit, promoted);\n };\n /**\n * Get aggregations\n *\n * @return {{}}\n */\n Query.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation by name\n *\n * @param aggregationName\n *\n * @return {Aggregation|null}\n */\n Query.prototype.getAggregation = function (aggregationName) {\n return this.aggregations[aggregationName] instanceof Aggregation_1.Aggregation\n ? this.aggregations[aggregationName]\n : null;\n };\n /**\n * Get query text\n *\n * @return {string}\n */\n Query.prototype.getQueryText = function () {\n var filter = this.filters._query;\n return filter instanceof Filter_1.Filter\n ? filter.getValues()[0]\n : \"\";\n };\n /**\n * Get universe filters\n *\n * @return {{}}\n */\n Query.prototype.getUniverseFilters = function () {\n return this.universeFilters;\n };\n /**\n * Get universe filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getUniverseFilter = function (filterName) {\n return this.universeFilters[filterName] instanceof Filter_1.Filter\n ? this.universeFilters[filterName]\n : null;\n };\n /**\n * Get filters\n *\n * @return {{}}\n */\n Query.prototype.getFilters = function () {\n return this.filters;\n };\n /**\n * Get filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilter = function (filterName) {\n return this.filters[filterName] instanceof Filter_1.Filter\n ? this.filters[filterName]\n : null;\n };\n /**\n * Get filter by field\n *\n * @param fieldName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilterByField = function (fieldName) {\n var fieldPath = Item_1.Item.getPathByField(fieldName);\n for (var i in this.filters) {\n if (this.filters[i].getField() == fieldPath) {\n return this.filters[i];\n }\n }\n return null;\n };\n /**\n * Get sort by\n *\n * @return {SortBy}\n */\n Query.prototype.getSortBy = function () {\n return this.sortByInstance;\n };\n /**\n * Get from\n *\n * @return {number}\n */\n Query.prototype.getFrom = function () {\n return this.from;\n };\n /**\n * Get size\n *\n * @return {number}\n */\n Query.prototype.getSize = function () {\n return this.size;\n };\n /**\n * Get page\n *\n * @return {number}\n */\n Query.prototype.getPage = function () {\n return this.page;\n };\n /**\n * Enable results\n *\n * @return {Query}\n */\n Query.prototype.enableResults = function () {\n this.resultsEnabled = true;\n return this;\n };\n /**\n * Disable results\n *\n * @return {Query}\n */\n Query.prototype.disableResults = function () {\n this.resultsEnabled = false;\n return this;\n };\n /**\n * Are results enabled\n *\n * @return {boolean}\n */\n Query.prototype.areResultsEnabled = function () {\n return this.resultsEnabled;\n };\n /**\n * Enable aggregations\n *\n * @return {Query}\n */\n Query.prototype.enableAggregations = function () {\n this.aggregationsEnabled = true;\n return this;\n };\n /**\n * Disable aggregations\n *\n * @return {Query}\n */\n Query.prototype.disableAggregations = function () {\n this.aggregationsEnabled = false;\n return this;\n };\n /**\n * Are aggregations enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAggregationsEnabled = function () {\n return this.aggregationsEnabled;\n };\n /**\n * Set number of suggestions\n *\n * @param numberOfSuggestions\n *\n * @return {Query}\n */\n Query.prototype.setNumberOfSuggestions = function (numberOfSuggestions) {\n this.numberOfSuggestions = numberOfSuggestions;\n return this;\n };\n /**\n * Disable suggestions\n *\n * @return {Query}\n */\n Query.prototype.disableSuggestions = function () {\n this.numberOfSuggestions = 0;\n return this;\n };\n /**\n * Get number of suggestions\n *\n * @return {number}\n */\n Query.prototype.getNumberOfSuggestions = function () {\n return this.numberOfSuggestions;\n };\n /**\n * Enable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.enableAutocomplete = function () {\n this.autocompleteEnabled = true;\n return this;\n };\n /**\n * Disable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.disableAutocomplete = function () {\n this.autocompleteEnabled = false;\n return this;\n };\n /**\n * Are autocomplete enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAutocompleteEnabled = function () {\n return this.autocompleteEnabled;\n };\n /**\n * Enable highlights\n *\n * @return {Query}\n */\n Query.prototype.enableHighlights = function () {\n this.highlightsEnabled = true;\n return this;\n };\n /**\n * Disable highlights\n *\n * @return {Query}\n */\n Query.prototype.disableHighlights = function () {\n this.highlightsEnabled = false;\n return this;\n };\n /**\n * Are highlights enabled\n *\n * @return {boolean}\n */\n Query.prototype.areHighlightsEnabled = function () {\n return this.highlightsEnabled;\n };\n /**\n * Promote uuid\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.promoteUUID = function (itemUUID) {\n this\n .itemsPromoted\n .push(itemUUID);\n return this;\n };\n /**\n * Promote UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.promoteUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.itemsPromoted = uuids;\n return this;\n };\n /**\n * Get promoted UUIDs\n *\n * @return {ItemUUID[]}\n */\n Query.prototype.getItemsPromoted = function () {\n return this.itemsPromoted;\n };\n /**\n * Exclude id\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.excludeUUID = function (itemUUID) {\n this.excludeUUIDs(itemUUID);\n return this;\n };\n /**\n * Exclude UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.excludeUUIDs = function () {\n var _a;\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"excluded_ids\"] = Filter_1.Filter.create(\"_id\", uuids.map(function (uuid) { return uuid.composedUUID(); }), Filter_2.FILTER_EXCLUDE, Filter_2.FILTER_TYPE_FIELD), _a));\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategies}\n */\n Query.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Set score strategies\n *\n * @param scoreStrategies\n */\n Query.prototype.setScoreStrategies = function (scoreStrategies) {\n this.scoreStrategies = scoreStrategies;\n return this;\n };\n /**\n * Get fuzziness\n *\n * @return any\n */\n Query.prototype.getFuzziness = function () {\n return this.fuzziness;\n };\n /**\n * Set fuzziness\n *\n * @param fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setFuzziness = function (fuzziness) {\n this.fuzziness = fuzziness;\n return this;\n };\n /**\n * Set auto fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setAutoFuzziness = function () {\n this.fuzziness = 'AUTO';\n return this;\n };\n /**\n * Get min score\n *\n * @return any\n */\n Query.prototype.getMinScore = function () {\n return this.minScore;\n };\n /**\n * Set min score\n *\n * @param minScore\n *\n * @return {Query}\n */\n Query.prototype.setMinScore = function (minScore) {\n this.minScore = minScore;\n return this;\n };\n /**\n * By user\n *\n * @param user\n *\n * @return {Query}\n */\n Query.prototype.byUser = function (user) {\n this.user = user;\n return this;\n };\n /**\n * By anyone\n *\n * @return {null}\n */\n Query.prototype.anonymously = function () {\n this.user = null;\n return null;\n };\n /**\n * Get user\n *\n * @return {User}\n */\n Query.prototype.getUser = function () {\n return this.user;\n };\n /**\n * set metadata value\n *\n * @param name\n * @param value\n *\n * @return {Query}\n */\n Query.prototype.setMetadataValue = function (name, value) {\n this.metadata[name] = value;\n return this;\n };\n /**\n * Get metadata\n *\n * @return any\n */\n Query.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Add subquery\n *\n * @param name\n * @param subquery\n *\n * @return {Query}\n */\n Query.prototype.addSubquery = function (name, subquery) {\n this.subqueries[name] = subquery;\n return this;\n };\n /**\n * Get subqueries\n *\n * @return {Object}\n */\n Query.prototype.getSubqueries = function () {\n return this.subqueries;\n };\n /**\n * Identify it\n *\n * @param UUID\n *\n * @return {Query}\n */\n Query.prototype.identifyWith = function (UUID) {\n this.UUID = UUID;\n return this;\n };\n /**\n * Get identification\n *\n * @return {string|null}\n */\n Query.prototype.getUUID = function () {\n return this.UUID;\n };\n /**\n * Force Index UUID.\n *\n * @param indexUUID\n *\n * @return {Query}\n */\n Query.prototype.forceIndexUUID = function (indexUUID) {\n this.indexUUID = indexUUID;\n return this;\n };\n /**\n * Get IndexUUID\n *\n * @return {IndexUUID|null}\n */\n Query.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n Query.prototype.setQueryOperator = function (queryOperator) {\n this.queryOperator = queryOperator;\n return this;\n };\n Query.prototype.getQueryOperator = function () {\n return this.queryOperator;\n };\n /**\n * To array\n *\n * @return {any}\n */\n Query.prototype.toArray = function () {\n var array = {};\n if (this.UUID !== null) {\n array.UUID = this.UUID;\n }\n if (this.getQueryText() !== \"\") {\n array.q = this.getQueryText();\n }\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n array.coordinate = this.coordinate.toArray();\n }\n /**\n * Fields\n */\n if (this.fields instanceof Array &&\n this.fields.length > 0) {\n array.fields = this.fields;\n }\n /**\n * Universe Filters\n */\n if (Object.keys(this.universeFilters).length) {\n array.universe_filters = {};\n for (var i in this.universeFilters) {\n var universeFilter = this.universeFilters[i];\n array.universe_filters[i] = universeFilter.toArray();\n }\n }\n /**\n * Filters\n */\n if (this.filters instanceof Object &&\n Object.keys(this.filters).length) {\n var filters = {};\n for (var i in this.filters) {\n var filter = this.filters[i];\n if (filter.getFilterType() !== Filter_3.FILTER_TYPE_QUERY) {\n filters[i] = filter.toArray();\n }\n }\n if (Object.keys(filters).length > 0) {\n array.filters = filters;\n }\n }\n /**\n * Aggregations\n */\n if (this.aggregations instanceof Object &&\n Object.keys(this.aggregations).length) {\n array.aggregations = {};\n for (var i in this.aggregations) {\n var aggregation = this.aggregations[i];\n array.aggregations[i] = aggregation.toArray();\n }\n }\n /**\n * Sort\n */\n var sort = this.sortByInstance.toArray();\n if (Object.keys(sort).length) {\n array.sort = sort;\n }\n /**\n * Page\n */\n var page = this.page;\n if (page !== exports.QUERY_DEFAULT_PAGE) {\n array.page = page;\n }\n /**\n * Size\n */\n var size = this.size;\n if (size !== exports.QUERY_DEFAULT_SIZE) {\n array.size = size;\n }\n /**\n * Booleans\n */\n if (this.resultsEnabled === false) {\n array.results_enabled = false;\n }\n if (this.autocompleteEnabled === true) {\n array.autocomplete_enabled = true;\n }\n if (this.numberOfSuggestions !== 0) {\n array.number_of_suggestions = this.numberOfSuggestions;\n }\n if (this.highlightsEnabled === true) {\n array.highlight_enabled = true;\n }\n if (this.aggregationsEnabled === false) {\n array.aggregations_enabled = false;\n }\n /**\n * Filter fields\n */\n if (this.searchableFields instanceof Array &&\n this.searchableFields.length > 0) {\n array.searchable_fields = this.searchableFields;\n }\n /**\n * Score strategies\n */\n if (this.scoreStrategies instanceof ScoreStrategies_1.ScoreStrategies) {\n var scoreStrategiesAsArray = this.scoreStrategies.toArray();\n if (Object.keys(scoreStrategiesAsArray).length > 0) {\n array.score_strategies = scoreStrategiesAsArray;\n }\n }\n if (this.fuzziness !== null) {\n array.fuzziness = this.fuzziness;\n }\n /**\n * Min score\n */\n var minScore = this.minScore;\n if (minScore !== exports.NO_MIN_SCORE) {\n array.min_score = minScore;\n }\n /**\n * User\n */\n if (this.user instanceof User_1.User) {\n array.user = this.user.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n array.metadata = this.metadata;\n }\n if (this.subqueries instanceof Object &&\n Object.keys(this.subqueries).length) {\n array.subqueries = {};\n for (var i in this.subqueries) {\n var subquery = this.subqueries[i];\n array.subqueries[i] = subquery.toArray();\n }\n }\n if (this.indexUUID instanceof IndexUUID_1.IndexUUID) {\n array.index_uuid = this.indexUUID.toArray();\n }\n /**\n * items promoted\n */\n if (this.itemsPromoted.length > 0) {\n array.items_promoted = [];\n for (var i in this.itemsPromoted) {\n array\n .items_promoted\n .push(this.itemsPromoted[i].toArray());\n }\n }\n if (this.queryOperator !== \"or\" && this.queryOperator !== null) {\n array.query_operator = this.queryOperator;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Query}\n */\n Query.createFromArray = function (array) {\n var query = array.coordinate instanceof Object\n ? Query.createLocated(Coordinate_1.Coordinate.createFromArray(array.coordinate), array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE)\n : Query.create(array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE);\n query.UUID = typeof array.UUID === typeof \"\"\n ? array.UUID\n : undefined;\n /**\n * Fields\n */\n query.fields = array.fields instanceof Array\n ? array.fields\n : [];\n /**\n * Aggregations\n */\n var aggregationsAsArray = typeof array.aggregations === typeof {}\n ? array.aggregations\n : {};\n for (var i in aggregationsAsArray) {\n query.aggregations[i] = Aggregation_1.Aggregation.createFromArray(aggregationsAsArray[i]);\n }\n /**\n * Sort\n */\n var sortAsArray = typeof array.sort === typeof {}\n ? array.sort\n : {};\n if (Object.keys(sortAsArray).length > 0) {\n query.sortByInstance = SortBy_1.SortBy.createFromArray(sortAsArray);\n }\n /**\n * Filters\n */\n var filtersAsArray = typeof array.filters === typeof {}\n ? array.filters\n : {};\n for (var i in filtersAsArray) {\n query.filters[i] = Filter_1.Filter.createFromArray(filtersAsArray[i]);\n }\n /**\n * Universe Filters\n */\n var universeFiltersAsArray = typeof array.universe_filters === typeof {}\n ? array.universe_filters\n : {};\n for (var i in universeFiltersAsArray) {\n query.universeFilters[i] = Filter_1.Filter.createFromArray(universeFiltersAsArray[i]);\n }\n /**\n * Booleans\n */\n query.resultsEnabled = typeof array.results_enabled === \"boolean\"\n ? array.results_enabled\n : true;\n query.numberOfSuggestions = typeof array.number_of_suggestions === \"number\"\n ? array.number_of_suggestions\n : 0;\n query.autocompleteEnabled = typeof array.autocomplete_enabled === \"boolean\"\n ? array.autocomplete_enabled\n : false;\n query.aggregationsEnabled = typeof array.aggregations_enabled === \"boolean\"\n ? array.aggregations_enabled\n : true;\n query.highlightsEnabled = typeof array.highlight_enabled === \"boolean\"\n ? array.highlight_enabled\n : false;\n query.fuzziness = array.fuzziness ? array.fuzziness : null;\n query.minScore = array.min_score ? array.min_score : exports.NO_MIN_SCORE;\n /**\n * Items promoted\n */\n var itemsPromotedAsArray = typeof array.items_promoted === typeof {}\n ? array.items_promoted\n : {};\n for (var i in itemsPromotedAsArray) {\n query\n .itemsPromoted\n .push(ItemUUID_1.ItemUUID.createFromArray(itemsPromotedAsArray[i]));\n }\n /**\n * Subqueries\n */\n var subqueriesAsArray = typeof array.subqueries === typeof {}\n ? array.subqueries\n : {};\n for (var i in subqueriesAsArray) {\n query.subqueries[i] = Query.createFromArray(subqueriesAsArray[i]);\n }\n /**\n * Filter fields\n */\n query.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n query.searchableFields = array.searchable_fields instanceof Array\n ? array.searchable_fields\n : [];\n query.scoreStrategies = array.score_strategies instanceof Object\n ? ScoreStrategies_1.ScoreStrategies.createFromArray(array.score_strategies)\n : undefined;\n query.user = array.user instanceof Object\n ? User_1.User.createFromArray(array.user)\n : undefined;\n query.indexUUID = array.index_uuid instanceof Object\n ? IndexUUID_1.IndexUUID.createFromArray(array.index_uuid)\n : undefined;\n query.queryOperator = typeof array.query_operator === \"string\"\n ? array.query_operator\n : \"or\";\n return query;\n };\n return Query;\n}());\nexports.Query = Query;\n","\"use strict\";\nexports.__esModule = true;\nexports.Range = exports.RANGE_SEPARATOR = exports.RANGE_INFINITE = exports.RANGE_MINUS_INFINITE = void 0;\n/**\n * Aggregation constants\n */\nexports.RANGE_MINUS_INFINITE = null;\nexports.RANGE_INFINITE = null;\nexports.RANGE_SEPARATOR = \"..\";\n/**\n * Filter class\n */\nvar Range = /** @class */ (function () {\n function Range() {\n }\n /**\n * Strong to array\n *\n * @param string\n *\n * @returns {[number, number]}\n */\n Range.stringToArray = function (string) {\n var parts = string.split(exports.RANGE_SEPARATOR);\n var from = parts[0];\n var to = parts[1];\n var finalFrom = exports.RANGE_MINUS_INFINITE;\n var finalTo = exports.RANGE_INFINITE;\n if (from != \"\") {\n finalFrom = parseInt(from);\n }\n if (to != \"\") {\n finalTo = parseInt(to);\n }\n return [finalFrom, finalTo];\n };\n /**\n * Array to string\n *\n * @param values\n *\n * @return {string}\n */\n Range.arrayToString = function (values) {\n var finalValues = [\"\", \"\"];\n if (values[0] != exports.RANGE_MINUS_INFINITE) {\n finalValues[0] = String(values[0]);\n }\n if (values[1] != exports.RANGE_INFINITE) {\n finalValues[1] = String(values[1]);\n }\n return finalValues.join(exports.RANGE_SEPARATOR);\n };\n /**\n * Create ranges\n *\n * @param from\n * @param to\n * @param incremental\n */\n Range.createRanges = function (from, to, incremental) {\n var ranges = [];\n var nextTo;\n while (from < to) {\n nextTo = from + incremental;\n ranges.push(from + exports.RANGE_SEPARATOR + nextTo);\n from = nextTo;\n }\n return ranges;\n };\n return Range;\n}());\nexports.Range = Range;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategies = exports.MIN = exports.MAX = exports.AVG = exports.SUM = exports.MULTIPLY = void 0;\nvar ScoreStrategy_1 = require(\"./ScoreStrategy\");\n/**\n * ScoreStrategies constants\n */\nexports.MULTIPLY = 'multiply';\nexports.SUM = 'sum';\nexports.AVG = 'avg';\nexports.MAX = 'max';\nexports.MIN = 'min';\n/**\n * ScoreStrategies\n */\nvar ScoreStrategies = /** @class */ (function () {\n function ScoreStrategies() {\n this.scoreStrategies = [];\n }\n /**\n * Create empty\n *\n * @param scoreMode\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createEmpty = function (scoreMode) {\n if (scoreMode === void 0) { scoreMode = exports.SUM; }\n var scoreStrategies = new ScoreStrategies;\n scoreStrategies.scoreMode = scoreMode;\n return scoreStrategies;\n };\n /**\n * Add score strategy\n *\n * @param scoreStrategy\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.prototype.addScoreStrategy = function (scoreStrategy) {\n this.scoreStrategies.push(scoreStrategy);\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategy[]}\n */\n ScoreStrategies.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Get score mode\n *\n * @return {string}\n */\n ScoreStrategies.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * To array\n *\n * @return {{\n * score_mode: string,\n * score_strategies: any\n * }}\n */\n ScoreStrategies.prototype.toArray = function () {\n var scoreStrategiesAsArray = [];\n for (var i in this.scoreStrategies) {\n scoreStrategiesAsArray.push(this.scoreStrategies[i].toArray());\n }\n return {\n score_mode: this.scoreMode,\n score_strategies: scoreStrategiesAsArray\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategies = (typeof array.score_mode != \"undefined\")\n ? ScoreStrategies.createEmpty(array.score_mode)\n : ScoreStrategies.createEmpty();\n scoreStrategies.scoreStrategies = [];\n for (var i in array.score_strategies) {\n scoreStrategies\n .scoreStrategies\n .push(ScoreStrategy_1.ScoreStrategy.createFromArray(array.score_strategies[i]));\n }\n return scoreStrategies;\n };\n return ScoreStrategies;\n}());\nexports.ScoreStrategies = ScoreStrategies;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategy = exports.DEFAULT_FACTOR = exports.DEFAULT_MISSING = exports.SCORE_MODE_MIN = exports.SCORE_MODE_MAX = exports.SCORE_MODE_AVG = exports.SCORE_MODE_SUM = exports.SCORE_MODE_NONE = exports.MODIFIER_SQUARE = exports.MODIFIER_LN = exports.MODIFIER_LOG = exports.MODIFIER_SQRT = exports.MODIFIER_NONE = exports.DECAY_GAUSS = exports.DECAY_EXP = exports.DECAY_LINEAR = exports.DECAY = exports.CUSTOM_FUNCTION = exports.BOOSTING_FIELD_VALUE = exports.DEFAULT_WEIGHT = exports.DEFAULT_TYPE = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar Filter_1 = require(\"./Filter\");\n/**\n * ScoreStrategy constants\n */\nexports.DEFAULT_TYPE = 'default';\nexports.DEFAULT_WEIGHT = 1.0;\nexports.BOOSTING_FIELD_VALUE = 'field_value';\nexports.CUSTOM_FUNCTION = 'custom_function';\nexports.DECAY = 'decay';\nexports.DECAY_LINEAR = 'linear';\nexports.DECAY_EXP = 'exp';\nexports.DECAY_GAUSS = 'gauss';\nexports.MODIFIER_NONE = 'none';\nexports.MODIFIER_SQRT = 'sqrt';\nexports.MODIFIER_LOG = 'log';\nexports.MODIFIER_LN = 'ln';\nexports.MODIFIER_SQUARE = 'square';\nexports.SCORE_MODE_NONE = 'none';\nexports.SCORE_MODE_SUM = 'sum';\nexports.SCORE_MODE_AVG = 'avg';\nexports.SCORE_MODE_MAX = 'max';\nexports.SCORE_MODE_MIN = 'min';\nexports.DEFAULT_MISSING = 1.0;\nexports.DEFAULT_FACTOR = 1.0;\n/**\n * ScoreStrategy\n */\nvar ScoreStrategy = /** @class */ (function () {\n function ScoreStrategy() {\n this.type = exports.DEFAULT_TYPE;\n this.filter = null;\n this.weight = exports.DEFAULT_WEIGHT;\n this.scoreMode = exports.SCORE_MODE_AVG;\n this.configuration = {};\n }\n /**\n * Get type\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getType = function () {\n return this.type;\n };\n /**\n * Get configuration value\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getConfigurationValue = function (element) {\n if (typeof this.configuration[element] == \"undefined\") {\n return null;\n }\n return this.configuration[element];\n };\n /**\n * Get weight.\n *\n * @return {number}\n */\n ScoreStrategy.prototype.getWeight = function () {\n return this.weight;\n };\n /**\n * Get score mode.\n *\n * @return {string}\n */\n ScoreStrategy.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * Get filter.\n *\n * @return {Filter}\n */\n ScoreStrategy.prototype.getFilter = function () {\n return this.filter;\n };\n /**\n * Create default\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDefault = function () {\n return new ScoreStrategy();\n };\n /**\n * Create field boosting\n *\n * @param field\n * @param factor\n * @param missing\n * @param modifier\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFieldBoosting = function (field, factor, missing, modifier, weight, filter, scoreMode) {\n if (factor === void 0) { factor = exports.DEFAULT_FACTOR; }\n if (missing === void 0) { missing = exports.DEFAULT_MISSING; }\n if (modifier === void 0) { modifier = exports.MODIFIER_NONE; }\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.BOOSTING_FIELD_VALUE;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['factor'] = factor;\n scoreStrategy.configuration['missing'] = missing;\n scoreStrategy.configuration['modifier'] = modifier;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create custom function\n *\n * @param func\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createCustomFunction = function (func, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.CUSTOM_FUNCTION;\n scoreStrategy.configuration['function'] = func;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create decay function\n *\n * @param type\n * @param field\n * @param origin\n * @param scale\n * @param offset\n * @param decay\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDecayFunction = function (type, field, origin, scale, offset, decay, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.DECAY;\n scoreStrategy.configuration['type'] = type;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['origin'] = origin;\n scoreStrategy.configuration['scale'] = scale;\n scoreStrategy.configuration['offset'] = offset;\n scoreStrategy.configuration['decay'] = decay;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Fix filter path.\n *\n * @param filter\n *\n * @return {Filter}\n */\n ScoreStrategy.fixFilterFieldPath = function (filter) {\n if (filter == null) {\n return filter;\n }\n var filterAsArray = filter.toArray();\n filterAsArray['field'] = Item_1.Item.getPathByField(filterAsArray['field']);\n return Filter_1.Filter.createFromArray(filterAsArray);\n };\n /**\n * To array\n *\n * @return {{\n * type: string,\n * configuration: any,\n * weight: number,\n * score_mode: string,\n * filter: any\n * }}\n */\n ScoreStrategy.prototype.toArray = function () {\n return {\n type: this.type,\n configuration: this.configuration,\n weight: this.weight,\n score_mode: this.scoreMode,\n filter: this.filter instanceof Filter_1.Filter\n ? this.filter.toArray()\n : null\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategy = ScoreStrategy.createDefault();\n if (typeof array.type != \"undefined\") {\n scoreStrategy.type = array.type;\n }\n if (typeof array.configuration != \"undefined\") {\n scoreStrategy.configuration = array.configuration;\n }\n if (typeof array.weight != \"undefined\") {\n scoreStrategy.weight = array.weight;\n }\n if (typeof array.score_mode != \"undefined\") {\n scoreStrategy.scoreMode = array.score_mode;\n }\n if (typeof array.filter === 'object' && array.filter !== null) {\n scoreStrategy.filter = Filter_1.Filter.createFromArray(array.filter);\n }\n return scoreStrategy;\n };\n return ScoreStrategy;\n}());\nexports.ScoreStrategy = ScoreStrategy;\n","\"use strict\";\nexports.__esModule = true;\nexports.SortBy = exports.SORT_BY_LOCATION_MI_ASC = exports.SORT_BY_LOCATION_KM_ASC = exports.SORT_BY_TYPE_DESC = exports.SORT_BY_TYPE_ASC = exports.SORT_BY_ID_DESC = exports.SORT_BY_ID_ASC = exports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM = exports.SORT_BY_SCORE = exports.SORT_BY_MODE_MEDIAN = exports.SORT_BY_MODE_MAX = exports.SORT_BY_MODE_MIN = exports.SORT_BY_MODE_SUM = exports.SORT_BY_MODE_AVG = exports.SORT_BY_DESC = exports.SORT_BY_ASC = exports.SORT_BY_TYPE_RANDOM = exports.SORT_BY_TYPE_FUNCTION = exports.SORT_BY_TYPE_DISTANCE = exports.SORT_BY_TYPE_SCORE = exports.SORT_BY_TYPE_NESTED = exports.SORT_BY_TYPE_FIELD = void 0;\nvar __1 = require(\"..\");\nvar Filter_1 = require(\"./Filter\");\n/**\n export * Sort by constants\n */\nexports.SORT_BY_TYPE_FIELD = 'field';\nexports.SORT_BY_TYPE_NESTED = 'nested';\nexports.SORT_BY_TYPE_SCORE = 'score';\nexports.SORT_BY_TYPE_DISTANCE = 'distance';\nexports.SORT_BY_TYPE_FUNCTION = 'function';\nexports.SORT_BY_TYPE_RANDOM = 'random';\nexports.SORT_BY_ASC = \"asc\";\nexports.SORT_BY_DESC = \"desc\";\nexports.SORT_BY_MODE_AVG = \"avg\";\nexports.SORT_BY_MODE_SUM = \"sum\";\nexports.SORT_BY_MODE_MIN = \"min\";\nexports.SORT_BY_MODE_MAX = \"max\";\nexports.SORT_BY_MODE_MEDIAN = \"median\";\nexports.SORT_BY_SCORE = {\n type: exports.SORT_BY_TYPE_SCORE\n};\nexports.SORT_BY_RANDOM = {\n type: exports.SORT_BY_TYPE_RANDOM\n};\nexports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM;\nexports.SORT_BY_ID_ASC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_ID_DESC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_TYPE_ASC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_TYPE_DESC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_LOCATION_KM_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"km\"\n};\nexports.SORT_BY_LOCATION_MI_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"mi\"\n};\n/**\n * ScoreStrategy\n */\nvar SortBy = /** @class */ (function () {\n function SortBy() {\n this.sortsBy = [];\n }\n /**\n * Create\n *\n * @return {SortBy}\n */\n SortBy.create = function () {\n return new SortBy;\n };\n /**\n * Sort By fields values\n *\n * @param shortSortByElements\n *\n * @return {SortBy}\n */\n SortBy.byFieldsValues = function (shortSortByElements) {\n var sortBy = SortBy.create();\n for (var key in shortSortByElements) {\n sortBy.byFieldValue(key, shortSortByElements[key]);\n }\n return sortBy;\n };\n /**\n * All\n *\n * @return {Array}\n */\n SortBy.prototype.all = function () {\n return this.sortsBy.length > 0\n ? this.sortsBy\n : [exports.SORT_BY_SCORE];\n };\n /**\n * Sort by value\n *\n * @param value\n *\n * @return {SortBy}\n */\n SortBy.prototype.byValue = function (value) {\n if (exports.SORT_BY_SCORE != value &&\n exports.SORT_BY_RANDOM != value) {\n if (typeof value.type == \"undefined\") {\n value.type = exports.SORT_BY_TYPE_FIELD;\n }\n }\n if (exports.SORT_BY_SCORE != value) {\n this.sortsBy.push(value);\n }\n return this;\n };\n /**\n * Sort by field value\n *\n * @param field\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFieldValue = function (field, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FIELD,\n field: __1.Item.getPathByField(field),\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field\n *\n * @param field\n * @param order\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedField = function (field, order, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field and filter\n *\n * @param field\n * @param order\n * @param filter\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedFieldAndFilter = function (field, order, filter, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n var fieldPath = __1.Item.getPathByField(filter.getField());\n var filterAsArray = filter.toArray();\n filterAsArray.field = fieldPath;\n filter = Filter_1.Filter.createFromArray(filterAsArray);\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n filter: filter,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by function\n *\n * @param func\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFunction = function (func, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FUNCTION,\n \"function\": func,\n order: order\n });\n return this;\n };\n /**\n * Is sorted by geo distance\n *\n * @return {boolean}\n */\n SortBy.prototype.isSortedByGeoDistance = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n return true;\n }\n }\n return false;\n };\n /**\n * Set coordinate\n *\n * @param coordinate\n *\n * @return {SortBy}\n */\n SortBy.prototype.setCoordinate = function (coordinate) {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n this.sortsBy[i].coordinate = coordinate;\n }\n }\n return this;\n };\n /**\n * Has random sort\n *\n * @return {boolean}\n */\n SortBy.prototype.hasRandomSort = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_RANDOM) {\n return true;\n }\n }\n return false;\n };\n /**\n * get first sort value as string\n *\n * @return {string}\n */\n SortBy.prototype.getFirstSortAsString = function () {\n if (this.sortsBy[0] === undefined) {\n return 'score';\n }\n var firstSortBy = this.sortsBy[0];\n if (firstSortBy.type === exports.SORT_BY_TYPE_RANDOM) {\n return 'random';\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_DISTANCE) {\n return firstSortBy.type + ':' + firstSortBy.unit;\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_SCORE) {\n return 'score';\n }\n var field = firstSortBy.field;\n var order = firstSortBy.order;\n var fieldParts = field.split('.');\n return fieldParts[1] + ':' + order;\n };\n /**\n * To array\n *\n * @return {[]}\n */\n SortBy.prototype.toArray = function () {\n var copySortBy = this.copy();\n var sortsByAsArray = copySortBy.sortsBy;\n for (var i in sortsByAsArray) {\n if (typeof sortsByAsArray[i].filter === typeof {} &&\n sortsByAsArray[i].filter != null) {\n sortsByAsArray[i].filter = sortsByAsArray[i].filter.toArray();\n }\n if (sortsByAsArray[i].coordinate !== null &&\n sortsByAsArray[i].coordinate instanceof __1.Coordinate) {\n sortsByAsArray[i].coordinate = sortsByAsArray[i].coordinate.toArray();\n }\n }\n return sortsByAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {SortBy}\n */\n SortBy.createFromArray = function (array) {\n var innerArray = JSON.parse(JSON.stringify(array));\n var sortBy = SortBy.create();\n for (var i in innerArray) {\n var element = innerArray[i];\n if (typeof element.type == \"undefined\") {\n element.type = exports.SORT_BY_TYPE_FIELD;\n }\n if (typeof element.filter === typeof {} &&\n element.filter != null) {\n element.filter = Filter_1.Filter.createFromArray(element.filter);\n }\n if (element.coordinate != null &&\n typeof element.coordinate === typeof {}) {\n element.coordinate = __1.Coordinate.createFromArray(element.coordinate);\n }\n sortBy.sortsBy.push(element);\n }\n return sortBy;\n };\n /**\n * Make a copy of this\n *\n * @returns {SortBy}\n */\n SortBy.prototype.copy = function () {\n var newSortBy = SortBy.create();\n for (var i in this.sortsBy) {\n var sortBy = this.sortsBy[i];\n if (typeof sortBy !== \"function\") {\n var sortByAsArray = JSON.parse(JSON.stringify(sortBy));\n if (typeof sortBy.filter === typeof {} &&\n sortBy.filter != null) {\n sortByAsArray.filter = Filter_1.Filter.createFromArray(sortBy.filter.toArray());\n }\n if (sortBy.coordinate != null &&\n typeof sortBy.coordinate == typeof {}) {\n sortByAsArray.coordinate = __1.Coordinate.createFromArray(sortBy.coordinate.toArray());\n }\n newSortBy.sortsBy.push(sortByAsArray);\n }\n }\n return newSortBy;\n };\n return SortBy;\n}());\nexports.SortBy = SortBy;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpRepository = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ConnectionError_1 = require(\"../Error/ConnectionError\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar InvalidTokenError_1 = require(\"../Error/InvalidTokenError\");\nvar ResourceExistsError_1 = require(\"../Error/ResourceExistsError\");\nvar ResourceNotAvailableError_1 = require(\"../Error/ResourceNotAvailableError\");\nvar UnknownError_1 = require(\"../Error/UnknownError\");\nvar Response_1 = require(\"../Http/Response\");\nvar Index_1 = require(\"../Model/Index\");\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Result_1 = require(\"../Result/Result\");\nvar Repository_1 = require(\"./Repository\");\n/**\n * Aggregation class\n */\nvar HttpRepository = /** @class */ (function (_super) {\n tslib_1.__extends(HttpRepository, _super);\n /**\n * Constructor\n *\n * @param httpClient\n * @param appId\n * @param indexId\n * @param token\n * @param transformer\n */\n function HttpRepository(httpClient, appId, indexId, token, transformer) {\n var _this = _super.call(this, appId, indexId, token) || this;\n _this.httpClient = httpClient;\n _this.transformer = transformer;\n return _this;\n }\n /**\n * Get transformer\n *\n * @return {Transformer}\n */\n HttpRepository.prototype.getTransformer = function () {\n return this.transformer;\n };\n /**\n * Generate item document by a simple object.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.addObject = function (object) {\n var item = this\n .transformer\n .toItem(object);\n if (item instanceof Item_1.Item) {\n this.addItem(item);\n }\n };\n /**\n * Delete item document by uuid.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.deleteObject = function (object) {\n var itemUUID = this\n .transformer\n .toItemUUID(object);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n this.deleteItem(itemUUID);\n }\n };\n /**\n * Flush update items\n *\n * @param {Item[]} itemsToUpdate\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushUpdateItems = function (itemsToUpdate) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToUpdate.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"put\", this.getCredentials(), {}, itemsToUpdate.map(function (item) {\n return item.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_1 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_1);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Flush delete items\n *\n * @param {ItemUUID[]} itemsToDelete\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushDeleteItems = function (itemsToDelete) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_2;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToDelete.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"delete\", this.getCredentials(), {}, itemsToDelete.map(function (itemUUID) {\n return itemUUID.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_2 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_2);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Query\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.query = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_3, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId, \"get\", this.getCredentials(), {\n query: JSON.stringify(query.toArray())\n .replace(/&/g, \"%26\")\n }, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_3 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_3);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get similar items\n *\n * @param {Query} query\n * @param {ItemUUID[]} itemUUIDs\n * @param {number} similarity\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getSimilarItems = function (query, itemUUIDs, similarity) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_4, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/similar-items', \"get\", this.getCredentials(), {}, {\n query: query.toArray(),\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n }),\n similarity: similarity\n })];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_4 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_4);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get recommended items\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getRecommendedItems = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_5, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/recommended-items', \"get\", this.getCredentials(), {}, query.toArray())];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_5 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_5);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Update items\n *\n * @param {Query} query\n * @param {Changes} changes\n *\n * @return {Promise}\n */\n HttpRepository.prototype.updateItems = function (query, changes) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_6;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items/update-by-query\", \"put\", this.getCredentials(), {}, {\n changes: changes.toArray(),\n query: query.toArray()\n })];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_6 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_6);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Create index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.createIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_7;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_7 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_7);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Delete index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.deleteIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_8;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"delete\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_8 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_8);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Reset index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.resetIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_9;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/reset\", \"put\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_9 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_9);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.checkIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_10;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"head\", this.getCredentials(), {}, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_10 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_10);\n case 3: return [2 /*return*/, response.getCode() === 200];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getIndices = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_11, result, _i, _a, indexAsArray;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\", \"get\", this.getCredentials(), {}, {})];\n case 1:\n response = _b.sent();\n return [3 /*break*/, 3];\n case 2:\n response_11 = _b.sent();\n throw HttpRepository.createErrorFromResponse(response_11);\n case 3:\n result = [];\n for (_i = 0, _a = response.getBody(); _i < _a.length; _i++) {\n indexAsArray = _a[_i];\n result.push(Index_1.Index.createFromArray(indexAsArray));\n }\n return [2 /*return*/, result];\n }\n });\n });\n };\n /**\n * Configure index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.configureIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_12;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/configure\", \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_12 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_12);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param indexUUID\n * @param itemUUID\n * @param userId\n * @param queryString\n * @param interaction\n * @param site\n * @param device\n * @param position\n */\n HttpRepository.prototype.pushInteraction = function (indexUUID, itemUUID, userId, queryString, interaction, site, device, position) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n if (position === void 0) { position = 0; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_13;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n query_string: queryString,\n site: site,\n device: device,\n user_id: userId,\n position: position\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/items/\" + itemUUID.composedUUID() + \"/interaction/\" + interaction, \"post\", {\n token: this.token\n }, parameters, {})];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_13 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_13);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param {IndexUUID} indexUUID\n * @param {string} userId\n * @param {ItemUUID[]} itemUUIDs\n * @param {string} site\n * @param {string} device\n *\n * @return {Promise}\n */\n HttpRepository.prototype.purchase = function (indexUUID, userId, itemUUIDs, site, device) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_14;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n site: site,\n device: device,\n user_id: userId\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/purchase\", \"post\", {\n token: this.token\n }, parameters, {\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n })\n })];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_14 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_14);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n *\n */\n HttpRepository.prototype.getHttpClient = function () {\n return this.httpClient;\n };\n /**\n * Get query values\n *\n * @returns any\n */\n HttpRepository.prototype.getCredentials = function () {\n return {\n app_id: this.appId,\n token: this.token\n };\n };\n /**\n * Apply transformers to results\n *\n * @param {Result} result\n *\n * @return {Result}\n */\n HttpRepository.prototype.applyTransformersToResult = function (result) {\n if (!this.transformer.hasReadTransformers()) {\n return result;\n }\n var subresults = result.getSubresults();\n if (Object.keys(subresults).length > 0) {\n Object.keys(subresults).map(function (key) {\n subresults[key] = this.applyTransformersToResult(subresults[key]);\n }.bind(this));\n return Result_1.Result.createMultiresults(subresults);\n }\n return Result_1.Result.create(result.getQueryUUID(), result.getTotalItems(), result.getTotalHits(), result.getAggregations(), result.getSuggestions(), this\n .transformer\n .fromItems(result.getItems()), result.getAutocomplete());\n };\n /**\n * @param response\n * @private\n */\n HttpRepository.createErrorFromResponse = function (response) {\n var error;\n if (response instanceof Response_1.Response) {\n switch (response.getCode()) {\n case ResourceNotAvailableError_1.ResourceNotAvailableError.getTransportableHTTPError():\n error = new ResourceNotAvailableError_1.ResourceNotAvailableError(response.getBody().message);\n break;\n case InvalidTokenError_1.InvalidTokenError.getTransportableHTTPError():\n error = new InvalidTokenError_1.InvalidTokenError(response.getBody().message);\n break;\n case InvalidFormatError_1.InvalidFormatError.getTransportableHTTPError():\n error = new InvalidFormatError_1.InvalidFormatError(response.getBody().message);\n break;\n case ResourceExistsError_1.ResourceExistsError.getTransportableHTTPError():\n error = new ResourceExistsError_1.ResourceExistsError(response.getBody().message);\n break;\n case ConnectionError_1.ConnectionError.getTransportableHTTPError():\n error = new ConnectionError_1.ConnectionError(response.getBody().message);\n break;\n }\n }\n return undefined === error\n ? UnknownError_1.UnknownError.createUnknownError()\n : error;\n };\n return HttpRepository;\n}(Repository_1.Repository));\nexports.HttpRepository = HttpRepository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Repository = void 0;\nvar tslib_1 = require(\"tslib\");\n/**\n * Aggregation class\n */\nvar Repository = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param appId\n * @param indexId\n * @param token\n */\n function Repository(appId, indexId, token) {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n this.appId = appId;\n this.indexId = indexId;\n this.token = token;\n }\n /**\n * Reset cached elements\n */\n Repository.prototype.resetCachedElements = function () {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n };\n /**\n * Add element\n *\n * @param item\n */\n Repository.prototype.addItem = function (item) {\n this.itemsToUpdate.push(item);\n };\n /**\n * Add elements\n *\n * @param items\n */\n Repository.prototype.addItems = function (items) {\n for (var i in items) {\n this.addItem(items[i]);\n }\n };\n /**\n * Delete item\n *\n * @param itemUUID\n */\n Repository.prototype.deleteItem = function (itemUUID) {\n this.itemsToDelete.push(itemUUID);\n };\n /**\n * Delete items\n *\n * @param itemsUUID\n */\n Repository.prototype.deleteItems = function (itemsUUID) {\n for (var i in itemsUUID) {\n this.deleteItem(itemsUUID[i]);\n }\n };\n /**\n * flush\n *\n * @param bulkNumber\n * @param skipIfLess\n *\n * @return {Promise}\n */\n Repository.prototype.flush = function (bulkNumber, skipIfLess) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var promise, resetCachedElements;\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n if (!bulkNumber) {\n bulkNumber = 500;\n }\n if (!skipIfLess) {\n skipIfLess = false;\n }\n if (skipIfLess &&\n this.itemsToUpdate.length < bulkNumber) {\n return [2 /*return*/];\n }\n promise = Promise.all(Repository\n .chunkArray(this.itemsToUpdate, bulkNumber)\n .map(function (arrayOfItems) {\n return _this.flushUpdateItems(arrayOfItems);\n })\n .concat(Repository\n .chunkArray(this.itemsToDelete, bulkNumber)\n .map(function (arrayOfItemsUUID) {\n return _this.flushDeleteItems(arrayOfItemsUUID);\n })));\n resetCachedElements = function () {\n _this.resetCachedElements();\n };\n promise.then(resetCachedElements, resetCachedElements);\n return [2 /*return*/, promise];\n });\n });\n };\n /**\n * Make chunks of n elements\n *\n * @param array\n * @param chunk\n *\n * @return any[]\n */\n Repository.chunkArray = function (array, chunk) {\n var arrayChunked = [];\n for (var i = 0, j = array.length; i < j; i += chunk) {\n arrayChunked.push(array.slice(i, i + chunk));\n }\n return arrayChunked;\n };\n return Repository;\n}());\nexports.Repository = Repository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Counter = void 0;\nvar Metadata_1 = require(\"../Model/Metadata\");\n/**\n * Aggregation class\n */\nvar Counter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param values\n * @param used\n * @param n\n */\n function Counter(values, used, n) {\n this.values = values;\n this.used = used;\n this.n = n;\n }\n /**\n * Get id\n *\n * @return {string|null}\n */\n Counter.prototype.getId = function () {\n return typeof this.values.id == \"string\"\n ? this.values.id\n : null;\n };\n /**\n * Get name\n *\n * @return {string|null}\n */\n Counter.prototype.getName = function () {\n return typeof this.values.name == \"string\"\n ? this.values.name\n : null;\n };\n /**\n * Get slug\n *\n * @return {string|null}\n */\n Counter.prototype.getSlug = function () {\n return typeof this.values.slug == \"string\"\n ? this.values.slug\n : null;\n };\n /**\n * Get level\n *\n * @return {number}\n */\n Counter.prototype.getLevel = function () {\n return typeof this.values.level == \"number\"\n ? this.values.level\n : 0;\n };\n /**\n * Get values\n *\n * @returns {{}}\n */\n Counter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Is used\n *\n * @returns {boolean}\n */\n Counter.prototype.isUsed = function () {\n return this.used;\n };\n /**\n * Get N\n *\n * @returns {number}\n */\n Counter.prototype.getN = function () {\n return this.n;\n };\n /**\n * Create by active elements\n *\n * @param name\n * @param n\n * @param activeElements\n */\n Counter.createByActiveElements = function (name, n, activeElements) {\n var values = Metadata_1.Metadata.fromMetadata(name);\n if (values == null) {\n return null;\n }\n var i = activeElements.length;\n var inActiveElements = false;\n while (i--) {\n if (activeElements[i] == values.id) {\n inActiveElements = true;\n }\n }\n return new Counter(values, inActiveElements, n);\n };\n /**\n * To array\n *\n * @return {{}}\n */\n Counter.prototype.toArray = function () {\n var values = {\n values: this.values,\n n: this.n\n };\n if (this.used === true) {\n values.used = true;\n }\n return values;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Counter}\n */\n Counter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new Counter(array.values, (typeof array.used == \"boolean\")\n ? array.used\n : false, array.n);\n };\n return Counter;\n}());\nexports.Counter = Counter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Result = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ResultAggregations_1 = require(\"./ResultAggregations\");\n/**\n * Result class\n */\nvar Result = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n */\n function Result(queryUUID, totalItems, totalHits) {\n this.items = [];\n this.autocomplete = null;\n this.suggestions = [];\n this.subresults = {};\n this.metadata = {};\n this.queryUUID = queryUUID;\n this.totalItems = totalItems;\n this.totalHits = totalHits;\n }\n /**\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n * @param aggregations\n * @param suggestions\n * @param items\n * @param autocomplete\n * @param metadata\n */\n Result.create = function (queryUUID, totalItems, totalHits, aggregations, suggestions, items, autocomplete, metadata) {\n if (autocomplete === void 0) { autocomplete = null; }\n if (metadata === void 0) { metadata = {}; }\n var result = new Result(queryUUID, totalItems, totalHits);\n result.aggregations = aggregations;\n result.suggestions = suggestions;\n result.items = items;\n result.autocomplete = autocomplete;\n result.metadata = metadata;\n return result;\n };\n /**\n * Create multi results\n *\n * @param subresults\n *\n * @returns {Result}\n */\n Result.createMultiresults = function (subresults) {\n var result = new Result('', 0, 0);\n result.subresults = subresults;\n return result;\n };\n /**\n * Add item\n *\n * @param item\n */\n Result.prototype.addItem = function (item) {\n this.items.push(item);\n };\n /**\n * Get items\n *\n * @return {Item[]}\n */\n Result.prototype.getItems = function () {\n return this.items;\n };\n /**\n * Get items grouped by types\n *\n * @return {any[]}\n */\n Result.prototype.getItemsGroupedByTypes = function () {\n if (this.itemsGroupedByTypeCache instanceof Object &&\n Object.keys(this.itemsGroupedByTypeCache).length > 0) {\n return this.itemsGroupedByTypeCache;\n }\n var itemsGroupedByTypes = {};\n for (var i in this.items) {\n var item = this.items[i];\n if (!(itemsGroupedByTypes[item.getType()] instanceof Array)) {\n itemsGroupedByTypes[item.getType()] = [];\n }\n itemsGroupedByTypes[item.getType()].push(item);\n }\n this.itemsGroupedByTypeCache = itemsGroupedByTypes;\n return itemsGroupedByTypes;\n };\n /**\n * Get items by type\n *\n * @param type\n *\n * @return {Array}\n */\n Result.prototype.getItemsByType = function (type) {\n var itemsGroupedByTypes = this.getItemsGroupedByTypes();\n return itemsGroupedByTypes[type] == null\n ? []\n : itemsGroupedByTypes[type];\n };\n /**\n * Get items by types\n *\n * @param types\n */\n Result.prototype.getItemsByTypes = function (types) {\n return this.items.filter(function (item) { return types.indexOf(item.getType()) >= 0; });\n };\n /**\n * Get first item\n *\n * @return {Item}\n */\n Result.prototype.getFirstItem = function () {\n return this.items.length > 0\n ? this.items[0]\n : null;\n };\n /**\n * Set aggregations\n *\n * @param aggregations\n */\n Result.prototype.setAggregations = function (aggregations) {\n this.aggregations = aggregations;\n };\n /**\n * Get aggregations\n *\n * @return {ResultAggregations}\n */\n Result.prototype.getAggregations = function () {\n return this.aggregations instanceof ResultAggregations_1.ResultAggregations\n ? this.aggregations\n : null;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @return {null}\n */\n Result.prototype.getAggregation = function (name) {\n return this.aggregations == null\n ? null\n : this.aggregations.getAggregation(name);\n };\n /**\n * Has no empty aggregation\n *\n * @param name\n *\n * @return {boolean}\n */\n Result.prototype.hasNotEmptyAggregation = function (name) {\n return this.aggregations == null\n ? false\n : this.aggregations.hasNotEmptyAggregation(name);\n };\n /**\n * Get suggestions\n *\n * @return {string[]}\n */\n Result.prototype.getSuggestions = function () {\n return this.suggestions;\n };\n /**\n * Get autocomplete\n *\n * @return {string|null}\n */\n Result.prototype.getAutocomplete = function () {\n return this.autocomplete;\n };\n /**\n * Get query uuid\n *\n * @return {string}\n */\n Result.prototype.getQueryUUID = function () {\n return this.queryUUID;\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n Result.prototype.getTotalItems = function () {\n return this.totalItems;\n };\n /**\n * Get total hits\n *\n * @return {number}\n */\n Result.prototype.getTotalHits = function () {\n return this.totalHits;\n };\n /**\n * Get subresults\n *\n * @return Object\n */\n Result.prototype.getSubresults = function () {\n return this.subresults;\n };\n /**\n * @return any\n */\n Result.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * @param name\n */\n Result.prototype.getMetadataValue = function (name) {\n var _a;\n return (_a = this.metadata[name]) !== null && _a !== void 0 ? _a : null;\n };\n /**\n * to array\n *\n * @return {{query: any, total_items: number, total_hits: number, items:any[], aggregations: any, suggestions: string[]}}\n */\n Result.prototype.toArray = function () {\n var array = {\n query_uuid: this.queryUUID,\n total_items: this.totalItems,\n total_hits: this.totalHits,\n items: this.items.map(function (item) { return item.toArray(); }),\n aggregations: this.aggregations == null\n ? null\n : this.aggregations.toArray(),\n suggests: this.suggestions,\n autocomplete: this.autocomplete === null\n ? undefined\n : this.autocomplete,\n metadata: this.metadata\n };\n if (this.subresults instanceof Object &&\n Object.keys(this.subresults).length) {\n array.subresults = {};\n for (var i in this.subresults) {\n var subresult = this.subresults[i];\n array.subresults[i] = subresult.toArray();\n }\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Result}\n */\n Result.createFromArray = function (array) {\n var result = Result.create(array.query_uuid\n ? array.query_uuid\n : '', array.total_items\n ? array.total_items\n : 0, array.total_hits\n ? array.total_hits\n : 0, array.aggregations instanceof Object\n ? ResultAggregations_1.ResultAggregations.createFromArray(array.aggregations)\n : null, array.suggests\n ? array.suggests\n : [], array.items instanceof Array\n ? array.items.map(function (itemAsArray) { return Item_1.Item.createFromArray(itemAsArray); })\n : [], array.autocomplete === undefined\n ? null\n : array.autocomplete, array.metadata === undefined\n ? {}\n : array.metadata);\n /**\n * Subqueries\n */\n var subresultsAsArray = typeof array.subresults === typeof {}\n ? array.subresults\n : {};\n for (var i in subresultsAsArray) {\n result.subresults[i] = Result.createFromArray(subresultsAsArray[i]);\n }\n return result;\n };\n return Result;\n}());\nexports.Result = Result;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregation = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Filter_1 = require(\"../Query/Filter\");\nvar Counter_1 = require(\"./Counter\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregation = /** @class */ (function () {\n /**\n * @param name\n * @param applicationType\n * @param totalElements\n * @param activeElements\n * @param metadata\n */\n function ResultAggregation(name, applicationType, totalElements, activeElements, metadata) {\n if (metadata === void 0) { metadata = {}; }\n this.counters = {};\n this.highestActiveElement = 0;\n this.name = name;\n this.applicationType = applicationType;\n this.totalElements = totalElements;\n this.activeElements = {};\n this.metadata = metadata;\n for (var i in activeElements) {\n var activeElement = activeElements[i];\n this.activeElements[activeElement] = activeElement;\n }\n }\n /**\n * Add counter\n *\n * @param name\n * @param counter\n */\n ResultAggregation.prototype.addCounter = function (name, counter) {\n if (counter == 0) {\n return;\n }\n var counterInstance = Counter_1.Counter.createByActiveElements(name, counter, Object.keys(this.activeElements));\n if (!(counterInstance instanceof Counter_1.Counter)) {\n return;\n }\n if ((this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) &&\n (this.applicationType & ~Filter_1.FILTER_MUST_ALL) &&\n counterInstance.isUsed()) {\n this.activeElements[counterInstance.getId()] = counterInstance;\n this.highestActiveElement = Math.max(counterInstance.getLevel(), this.highestActiveElement);\n return;\n }\n this.counters[counterInstance.getId()] = counterInstance;\n };\n /**\n * Get name\n *\n * @return {string}\n */\n ResultAggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get counter\n *\n * @return {any}\n */\n ResultAggregation.prototype.getCounters = function () {\n return this.counters;\n };\n /**\n *\n */\n ResultAggregation.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Return if the aggregation belongs to a filter.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.isFilter = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL) > 0;\n };\n /**\n * Aggregation has levels.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.hasLevels = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) > 0;\n };\n /**\n * Get counter by name\n *\n * @param name\n *\n * @return {null}\n */\n ResultAggregation.prototype.getCounter = function (name) {\n return this.counters[name] instanceof Counter_1.Counter\n ? this.counters[name]\n : null;\n };\n /**\n * Get all elements\n *\n * @return {{}}\n */\n ResultAggregation.prototype.getAllElements = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.activeElements), this.counters);\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregation.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * Get active elements\n *\n * @return {any}\n */\n ResultAggregation.prototype.getActiveElements = function () {\n if (Object.keys(this.activeElements).length === 0) {\n return {};\n }\n if (this.applicationType === Filter_1.FILTER_MUST_ALL_WITH_LEVELS) {\n var value = null;\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n if (!(activeElement instanceof Counter_1.Counter)) {\n continue;\n }\n if (value == null) {\n value = activeElement;\n }\n value = value.getLevel() > activeElement.getLevel()\n ? value\n : activeElement;\n }\n return value instanceof Counter_1.Counter\n ? { 0: value }\n : null;\n }\n return this.activeElements;\n };\n /**\n * Clean results by level and remove all levels higher than the lowest.\n */\n ResultAggregation.prototype.cleanCountersByLevel = function () {\n for (var i in this.counters) {\n var counter = this.counters[i];\n if (counter.getLevel() !== this.highestActiveElement + 1) {\n delete this.counters[i];\n }\n }\n };\n /**\n * Is empty\n *\n * @returns {boolean}\n */\n ResultAggregation.prototype.isEmpty = function () {\n return Object.keys(this.activeElements).length == 0 &&\n Object.keys(this.counters).length == 0;\n };\n /**\n * To array\n *\n * @return {any}\n */\n ResultAggregation.prototype.toArray = function () {\n var array = {\n name: this.name,\n counters: [],\n active_elements: [],\n metadata: this.metadata\n };\n for (var i in this.counters) {\n array.counters.push(this.counters[i].toArray());\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n array.application_type = this.applicationType;\n }\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n array.active_elements.push(activeElement instanceof Counter_1.Counter\n ? activeElement.toArray()\n : activeElement);\n }\n if (this.highestActiveElement > 0) {\n array.highest_active_level = this.highestActiveElement;\n }\n if (array.counters.length === 0) {\n delete array.counters;\n }\n if (array.active_elements.length === 0) {\n delete array.active_elements;\n }\n if (Object.keys(array.metadata).length === 0) {\n delete array.metadata;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n */\n ResultAggregation.createFromArray = function (array) {\n var activeElements = [];\n var activeElementsAsArray = array.active_elements;\n activeElementsAsArray = typeof activeElementsAsArray === typeof []\n ? activeElementsAsArray\n : [];\n for (var i in activeElementsAsArray) {\n var activeElementAsArray = activeElementsAsArray[i];\n activeElements.push(typeof activeElementAsArray === typeof {}\n ? Counter_1.Counter.createFromArray(activeElementAsArray)\n : activeElementAsArray);\n }\n var aggregation = new ResultAggregation(array.name, parseInt(array.application_type ? array.application_type : Filter_1.FILTER_AT_LEAST_ONE), parseInt(array.total_elements ? array.total_elements : 0), []);\n aggregation.activeElements = activeElements;\n var countersAsArray = typeof array.counters === typeof []\n ? array.counters\n : [];\n for (var i in countersAsArray) {\n var counterAsArray = countersAsArray[i];\n if (typeof counterAsArray !== \"function\") {\n var counter = Counter_1.Counter.createFromArray(counterAsArray);\n aggregation.counters['_' + counter.getId()] = counter;\n }\n }\n aggregation.highestActiveElement = typeof array.highest_active_level === \"number\"\n ? array.highest_active_level\n : 0;\n aggregation.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n return aggregation;\n };\n return ResultAggregation;\n}());\nexports.ResultAggregation = ResultAggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregations = void 0;\nvar ResultAggregation_1 = require(\"./ResultAggregation\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregations = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param totalElements\n */\n function ResultAggregations(totalElements) {\n this.aggregations = {};\n this.totalElements = totalElements;\n }\n /**\n * Add aggregation\n *\n * @param name\n * @param aggregation\n */\n ResultAggregations.prototype.addAggregation = function (name, aggregation) {\n this.aggregations[name] = aggregation;\n };\n /**\n * Get aggregations\n *\n * @returns {{}}\n */\n ResultAggregations.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @returns {Aggregation|null}\n */\n ResultAggregations.prototype.getAggregation = function (name) {\n return this.aggregations[name] instanceof ResultAggregation_1.ResultAggregation\n ? this.aggregations[name]\n : null;\n };\n /**\n * Has not empty aggregation\n *\n * @param name\n *\n * @returns {boolean}\n */\n ResultAggregations.prototype.hasNotEmptyAggregation = function (name) {\n var aggregation = this.getAggregation(name);\n return (aggregation instanceof ResultAggregation_1.ResultAggregation) &&\n (!aggregation.isEmpty());\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregations.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * To array\n *\n * @return {{total_elements?: number, aggregations?: {}}}\n */\n ResultAggregations.prototype.toArray = function () {\n var aggregationCollection = {};\n for (var i in this.aggregations) {\n aggregationCollection[i] = this.aggregations[i].toArray();\n }\n var array = {};\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n if (Object.keys(aggregationCollection).length > 0) {\n array.aggregations = aggregationCollection;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ResultAggregations}\n */\n ResultAggregations.createFromArray = function (array) {\n var aggregations = new ResultAggregations(typeof array.total_elements === \"number\"\n ? array.total_elements\n : 0);\n if (typeof array.aggregations === typeof {}) {\n for (var i in array.aggregations) {\n aggregations.addAggregation(i, ResultAggregation_1.ResultAggregation.createFromArray(array.aggregations[i]));\n }\n }\n return aggregations;\n };\n return ResultAggregations;\n}());\nexports.ResultAggregations = ResultAggregations;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nexports.Transformer = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\n/**\n * Transformer\n */\nvar Transformer = /** @class */ (function () {\n function Transformer() {\n this.readTransformers = [];\n this.writeTransformers = [];\n }\n /**\n * Add read transformer\n *\n * @param readTransformer\n */\n Transformer.prototype.addReadTransformer = function (readTransformer) {\n this\n .readTransformers\n .push(readTransformer);\n };\n /**\n * @return {boolean}\n */\n Transformer.prototype.hasReadTransformers = function () {\n return this.readTransformers.length > 0;\n };\n /**\n * Add write transformer\n *\n * @param writeTransformer\n */\n Transformer.prototype.addWriteTransformer = function (writeTransformer) {\n this\n .writeTransformers\n .push(writeTransformer);\n };\n /**\n * Items to objects\n *\n * @param items\n *\n * @returns {any[]}\n */\n Transformer.prototype.fromItems = function (items) {\n var objects = [];\n for (var i in items) {\n objects.push(this.fromItem(items[i]));\n }\n return objects;\n };\n /**\n * Item to object\n *\n * @param item\n *\n * @returns {any}\n */\n Transformer.prototype.fromItem = function (item) {\n for (var i in this.readTransformers) {\n var transformer = this.readTransformers[i];\n if (transformer.isValidItem(item)) {\n return transformer.fromItem(item);\n }\n }\n return item;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {Item[]}\n */\n Transformer.prototype.toItems = function (objects) {\n var items = [];\n for (var i in objects) {\n var item = this.toItem(objects[i]);\n if (item instanceof Item_1.Item) {\n items.push(item);\n }\n }\n return items;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItem = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItem(object);\n }\n }\n return object;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {ItemUUID[]}\n */\n Transformer.prototype.toItemUUIDs = function (objects) {\n var itemUUIDs = [];\n for (var i in objects) {\n var itemUUID = this.toItemUUID(objects[i]);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n itemUUIDs.push(itemUUID);\n }\n }\n return itemUUIDs;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItemUUID = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItemUUID(object);\n }\n }\n return object;\n };\n return Transformer;\n}());\nexports.Transformer = Transformer;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar Apisearch_1 = require(\"./Apisearch\");\nexports[\"default\"] = Apisearch_1[\"default\"];\ntslib_1.__exportStar(require(\"./Config/Config\"), exports);\ntslib_1.__exportStar(require(\"./Config/Synonym\"), exports);\ntslib_1.__exportStar(require(\"./Error/ConnectionError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ErrorWithMessage\"), exports);\ntslib_1.__exportStar(require(\"./Error/EventError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ForbiddenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidFormatError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidTokenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceExistsError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceNotAvailableError\"), exports);\ntslib_1.__exportStar(require(\"./Error/UnsupportedContentTypeError\"), exports);\ntslib_1.__exportStar(require(\"./Geo/LocationRange\"), exports);\ntslib_1.__exportStar(require(\"./Http/AxiosClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Client\"), exports);\ntslib_1.__exportStar(require(\"./Http/HttpClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Response\"), exports);\ntslib_1.__exportStar(require(\"./Http/CacheClient\"), exports);\ntslib_1.__exportStar(require(\"./Model/Changes\"), exports);\ntslib_1.__exportStar(require(\"./Model/Coordinate\"), exports);\ntslib_1.__exportStar(require(\"./Model/Item\"), exports);\ntslib_1.__exportStar(require(\"./Model/ItemUUID\"), exports);\ntslib_1.__exportStar(require(\"./Model/Metadata\"), exports);\ntslib_1.__exportStar(require(\"./Model/User\"), exports);\ntslib_1.__exportStar(require(\"./Query/Aggregation\"), exports);\ntslib_1.__exportStar(require(\"./Query/Filter\"), exports);\ntslib_1.__exportStar(require(\"./Query/Query\"), exports);\ntslib_1.__exportStar(require(\"./Query/Range\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategies\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategy\"), exports);\ntslib_1.__exportStar(require(\"./Query/SortBy\"), exports);\ntslib_1.__exportStar(require(\"./Repository/HttpRepository\"), exports);\ntslib_1.__exportStar(require(\"./Repository/Repository\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregation\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregations\"), exports);\ntslib_1.__exportStar(require(\"./Result/Counter\"), exports);\ntslib_1.__exportStar(require(\"./Result/Result\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/ReadTransformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/Transformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/WriteTransformer\"), exports);\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Mustache = factory());\n}(this, (function () { 'use strict';\n\n /*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n var objectToString = Object.prototype.toString;\n var isArray = Array.isArray || function isArrayPolyfill (object) {\n return objectToString.call(object) === '[object Array]';\n };\n\n function isFunction (object) {\n return typeof object === 'function';\n }\n\n /**\n * More correct typeof string handling array\n * which normally returns typeof 'object'\n */\n function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }\n\n function escapeRegExp (string) {\n return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n /**\n * Null safe way of checking whether or not an object,\n * including its prototype, has a given property\n */\n function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }\n\n /**\n * Safe way of detecting whether or not the given thing is a primitive and\n * whether it has the given property\n */\n function primitiveHasOwnProperty (primitive, propName) {\n return (\n primitive != null\n && typeof primitive !== 'object'\n && primitive.hasOwnProperty\n && primitive.hasOwnProperty(propName)\n );\n }\n\n // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n // See https://github.com/janl/mustache.js/issues/189\n var regExpTest = RegExp.prototype.test;\n function testRegExp (re, string) {\n return regExpTest.call(re, string);\n }\n\n var nonSpaceRe = /\\S/;\n function isWhitespace (string) {\n return !testRegExp(nonSpaceRe, string);\n }\n\n var entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/',\n '`': '`',\n '=': '='\n };\n\n function escapeHtml (string) {\n return String(string).replace(/[&<>\"'`=\\/]/g, function fromEntityMap (s) {\n return entityMap[s];\n });\n }\n\n var whiteRe = /\\s*/;\n var spaceRe = /\\s+/;\n var equalsRe = /\\s*=/;\n var curlyRe = /\\s*\\}/;\n var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n /**\n * Breaks up the given `template` string into a tree of tokens. If the `tags`\n * argument is given here it must be an array with two string values: the\n * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n * course, the default is to use mustaches (i.e. mustache.tags).\n *\n * A token is an array with at least 4 elements. The first element is the\n * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n * all text that appears outside a symbol this element is \"text\".\n *\n * The second element of a token is its \"value\". For mustache tags this is\n * whatever else was inside the tag besides the opening symbol. For text tokens\n * this is the text itself.\n *\n * The third and fourth elements of the token are the start and end indices,\n * respectively, of the token in the original template.\n *\n * Tokens that are the root node of a subtree contain two more elements: 1) an\n * array of tokens in the subtree and 2) the index in the original template at\n * which the closing tag for that section begins.\n *\n * Tokens for partials also contain two more elements: 1) a string value of\n * indendation prior to that tag and 2) the index of that tag on that line -\n * eg a value of 2 indicates the partial is the third tag on this line.\n */\n function parseTemplate (template, tags) {\n if (!template)\n return [];\n var lineHasNonSpace = false;\n var sections = []; // Stack to hold section tokens\n var tokens = []; // Buffer to hold the tokens\n var spaces = []; // Indices of whitespace tokens on the current line\n var hasTag = false; // Is there a {{tag}} on the current line?\n var nonSpace = false; // Is there a non-space char on the current line?\n var indentation = ''; // Tracks indentation for tags that use it\n var tagIndex = 0; // Stores a count of number of tags encountered on a line\n\n // Strips all whitespace tokens array for the current line\n // if there was a {{#tag}} on it and otherwise only space.\n function stripSpace () {\n if (hasTag && !nonSpace) {\n while (spaces.length)\n delete tokens[spaces.pop()];\n } else {\n spaces = [];\n }\n\n hasTag = false;\n nonSpace = false;\n }\n\n var openingTagRe, closingTagRe, closingCurlyRe;\n function compileTags (tagsToCompile) {\n if (typeof tagsToCompile === 'string')\n tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n throw new Error('Invalid tags: ' + tagsToCompile);\n\n openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n }\n\n compileTags(tags || mustache.tags);\n\n var scanner = new Scanner(template);\n\n var start, type, value, chr, token, openSection;\n while (!scanner.eos()) {\n start = scanner.pos;\n\n // Match any text between tags.\n value = scanner.scanUntil(openingTagRe);\n\n if (value) {\n for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n chr = value.charAt(i);\n\n if (isWhitespace(chr)) {\n spaces.push(tokens.length);\n indentation += chr;\n } else {\n nonSpace = true;\n lineHasNonSpace = true;\n indentation += ' ';\n }\n\n tokens.push([ 'text', chr, start, start + 1 ]);\n start += 1;\n\n // Check for whitespace on the current line.\n if (chr === '\\n') {\n stripSpace();\n indentation = '';\n tagIndex = 0;\n lineHasNonSpace = false;\n }\n }\n }\n\n // Match the opening tag.\n if (!scanner.scan(openingTagRe))\n break;\n\n hasTag = true;\n\n // Get the tag type.\n type = scanner.scan(tagRe) || 'name';\n scanner.scan(whiteRe);\n\n // Get the tag value.\n if (type === '=') {\n value = scanner.scanUntil(equalsRe);\n scanner.scan(equalsRe);\n scanner.scanUntil(closingTagRe);\n } else if (type === '{') {\n value = scanner.scanUntil(closingCurlyRe);\n scanner.scan(curlyRe);\n scanner.scanUntil(closingTagRe);\n type = '&';\n } else {\n value = scanner.scanUntil(closingTagRe);\n }\n\n // Match the closing tag.\n if (!scanner.scan(closingTagRe))\n throw new Error('Unclosed tag at ' + scanner.pos);\n\n if (type == '>') {\n token = [ type, value, start, scanner.pos, indentation, tagIndex, lineHasNonSpace ];\n } else {\n token = [ type, value, start, scanner.pos ];\n }\n tagIndex++;\n tokens.push(token);\n\n if (type === '#' || type === '^') {\n sections.push(token);\n } else if (type === '/') {\n // Check section nesting.\n openSection = sections.pop();\n\n if (!openSection)\n throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n if (openSection[1] !== value)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n } else if (type === 'name' || type === '{' || type === '&') {\n nonSpace = true;\n } else if (type === '=') {\n // Set the tags for the next time around.\n compileTags(value);\n }\n }\n\n stripSpace();\n\n // Make sure there are no open sections when we're done.\n openSection = sections.pop();\n\n if (openSection)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n return nestTokens(squashTokens(tokens));\n }\n\n /**\n * Combines the values of consecutive text tokens in the given `tokens` array\n * to a single token.\n */\n function squashTokens (tokens) {\n var squashedTokens = [];\n\n var token, lastToken;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n if (token) {\n if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n lastToken[1] += token[1];\n lastToken[3] = token[3];\n } else {\n squashedTokens.push(token);\n lastToken = token;\n }\n }\n }\n\n return squashedTokens;\n }\n\n /**\n * Forms the given array of `tokens` into a nested tree structure where\n * tokens that represent a section have two additional items: 1) an array of\n * all tokens that appear in that section and 2) the index in the original\n * template that represents the end of that section.\n */\n function nestTokens (tokens) {\n var nestedTokens = [];\n var collector = nestedTokens;\n var sections = [];\n\n var token, section;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n switch (token[0]) {\n case '#':\n case '^':\n collector.push(token);\n sections.push(token);\n collector = token[4] = [];\n break;\n case '/':\n section = sections.pop();\n section[5] = token[2];\n collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n break;\n default:\n collector.push(token);\n }\n }\n\n return nestedTokens;\n }\n\n /**\n * A simple string scanner that is used by the template parser to find\n * tokens in template strings.\n */\n function Scanner (string) {\n this.string = string;\n this.tail = string;\n this.pos = 0;\n }\n\n /**\n * Returns `true` if the tail is empty (end of string).\n */\n Scanner.prototype.eos = function eos () {\n return this.tail === '';\n };\n\n /**\n * Tries to match the given regular expression at the current position.\n * Returns the matched text if it can match, the empty string otherwise.\n */\n Scanner.prototype.scan = function scan (re) {\n var match = this.tail.match(re);\n\n if (!match || match.index !== 0)\n return '';\n\n var string = match[0];\n\n this.tail = this.tail.substring(string.length);\n this.pos += string.length;\n\n return string;\n };\n\n /**\n * Skips all text until the given regular expression can be matched. Returns\n * the skipped string, which is the entire tail if no match can be made.\n */\n Scanner.prototype.scanUntil = function scanUntil (re) {\n var index = this.tail.search(re), match;\n\n switch (index) {\n case -1:\n match = this.tail;\n this.tail = '';\n break;\n case 0:\n match = '';\n break;\n default:\n match = this.tail.substring(0, index);\n this.tail = this.tail.substring(index);\n }\n\n this.pos += match.length;\n\n return match;\n };\n\n /**\n * Represents a rendering context by wrapping a view object and\n * maintaining a reference to the parent context.\n */\n function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }\n\n /**\n * Creates a new context using the given view with this context\n * as the parent.\n */\n Context.prototype.push = function push (view) {\n return new Context(view, this);\n };\n\n /**\n * Returns the value of the given name in this context, traversing\n * up the context hierarchy if the value is absent in this context's view.\n */\n Context.prototype.lookup = function lookup (name) {\n var cache = this.cache;\n\n var value;\n if (cache.hasOwnProperty(name)) {\n value = cache[name];\n } else {\n var context = this, intermediateValue, names, index, lookupHit = false;\n\n while (context) {\n if (name.indexOf('.') > 0) {\n intermediateValue = context.view;\n names = name.split('.');\n index = 0;\n\n /**\n * Using the dot notion path in `name`, we descend through the\n * nested objects.\n *\n * To be certain that the lookup has been successful, we have to\n * check if the last object in the path actually has the property\n * we are looking for. We store the result in `lookupHit`.\n *\n * This is specially necessary for when the value has been set to\n * `undefined` and we want to avoid looking up parent contexts.\n *\n * In the case where dot notation is used, we consider the lookup\n * to be successful even if the last \"object\" in the path is\n * not actually an object but a primitive (e.g., a string, or an\n * integer), because it is sometimes useful to access a property\n * of an autoboxed primitive, such as the length of a string.\n **/\n while (intermediateValue != null && index < names.length) {\n if (index === names.length - 1)\n lookupHit = (\n hasProperty(intermediateValue, names[index])\n || primitiveHasOwnProperty(intermediateValue, names[index])\n );\n\n intermediateValue = intermediateValue[names[index++]];\n }\n } else {\n intermediateValue = context.view[name];\n\n /**\n * Only checking against `hasProperty`, which always returns `false` if\n * `context.view` is not an object. Deliberately omitting the check\n * against `primitiveHasOwnProperty` if dot notation is not used.\n *\n * Consider this example:\n * ```\n * Mustache.render(\"The length of a football field is {{#length}}{{length}}{{/length}}.\", {length: \"100 yards\"})\n * ```\n *\n * If we were to check also against `primitiveHasOwnProperty`, as we do\n * in the dot notation case, then render call would return:\n *\n * \"The length of a football field is 9.\"\n *\n * rather than the expected:\n *\n * \"The length of a football field is 100 yards.\"\n **/\n lookupHit = hasProperty(context.view, name);\n }\n\n if (lookupHit) {\n value = intermediateValue;\n break;\n }\n\n context = context.parent;\n }\n\n cache[name] = value;\n }\n\n if (isFunction(value))\n value = value.call(this.view);\n\n return value;\n };\n\n /**\n * A Writer knows how to take a stream of tokens and render them to a\n * string, given a context. It also maintains a cache of templates to\n * avoid the need to parse the same template twice.\n */\n function Writer () {\n this.templateCache = {\n _cache: {},\n set: function set (key, value) {\n this._cache[key] = value;\n },\n get: function get (key) {\n return this._cache[key];\n },\n clear: function clear () {\n this._cache = {};\n }\n };\n }\n\n /**\n * Clears all cached templates in this writer.\n */\n Writer.prototype.clearCache = function clearCache () {\n if (typeof this.templateCache !== 'undefined') {\n this.templateCache.clear();\n }\n };\n\n /**\n * Parses and caches the given `template` according to the given `tags` or\n * `mustache.tags` if `tags` is omitted, and returns the array of tokens\n * that is generated from the parse.\n */\n Writer.prototype.parse = function parse (template, tags) {\n var cache = this.templateCache;\n var cacheKey = template + ':' + (tags || mustache.tags).join(':');\n var isCacheEnabled = typeof cache !== 'undefined';\n var tokens = isCacheEnabled ? cache.get(cacheKey) : undefined;\n\n if (tokens == undefined) {\n tokens = parseTemplate(template, tags);\n isCacheEnabled && cache.set(cacheKey, tokens);\n }\n return tokens;\n };\n\n /**\n * High-level method that is used to render the given `template` with\n * the given `view`.\n *\n * The optional `partials` argument may be an object that contains the\n * names and templates of partials that are used in the template. It may\n * also be a function that is used to load partial templates on the fly\n * that takes a single argument: the name of the partial.\n *\n * If the optional `config` argument is given here, then it should be an\n * object with a `tags` attribute or an `escape` attribute or both.\n * If an array is passed, then it will be interpreted the same way as\n * a `tags` attribute on a `config` object.\n *\n * The `tags` attribute of a `config` object must be an array with two\n * string values: the opening and closing tags used in the template (e.g.\n * [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n *\n * The `escape` attribute of a `config` object must be a function which\n * accepts a string as input and outputs a safely escaped string.\n * If an `escape` function is not provided, then an HTML-safe string\n * escaping function is used as the default.\n */\n Writer.prototype.render = function render (template, view, partials, config) {\n var tags = this.getConfigTags(config);\n var tokens = this.parse(template, tags);\n var context = (view instanceof Context) ? view : new Context(view, undefined);\n return this.renderTokens(tokens, context, partials, template, config);\n };\n\n /**\n * Low-level method that renders the given array of `tokens` using\n * the given `context` and `partials`.\n *\n * Note: The `originalTemplate` is only ever used to extract the portion\n * of the original template that was contained in a higher-order section.\n * If the template doesn't use higher-order sections, this argument may\n * be omitted.\n */\n Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, config) {\n var buffer = '';\n\n var token, symbol, value;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n value = undefined;\n token = tokens[i];\n symbol = token[0];\n\n if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate, config);\n else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate, config);\n else if (symbol === '>') value = this.renderPartial(token, context, partials, config);\n else if (symbol === '&') value = this.unescapedValue(token, context);\n else if (symbol === 'name') value = this.escapedValue(token, context, config);\n else if (symbol === 'text') value = this.rawValue(token);\n\n if (value !== undefined)\n buffer += value;\n }\n\n return buffer;\n };\n\n Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate, config) {\n var self = this;\n var buffer = '';\n var value = context.lookup(token[1]);\n\n // This function is used to render an arbitrary template\n // in the current context by higher-order sections.\n function subRender (template) {\n return self.render(template, context, partials, config);\n }\n\n if (!value) return;\n\n if (isArray(value)) {\n for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate, config);\n }\n } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate, config);\n } else if (isFunction(value)) {\n if (typeof originalTemplate !== 'string')\n throw new Error('Cannot use higher-order sections without the original template');\n\n // Extract the portion of the original template that the section contains.\n value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n if (value != null)\n buffer += value;\n } else {\n buffer += this.renderTokens(token[4], context, partials, originalTemplate, config);\n }\n return buffer;\n };\n\n Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate, config) {\n var value = context.lookup(token[1]);\n\n // Use JavaScript's definition of falsy. Include empty arrays.\n // See https://github.com/janl/mustache.js/issues/186\n if (!value || (isArray(value) && value.length === 0))\n return this.renderTokens(token[4], context, partials, originalTemplate, config);\n };\n\n Writer.prototype.indentPartial = function indentPartial (partial, indentation, lineHasNonSpace) {\n var filteredIndentation = indentation.replace(/[^ \\t]/g, '');\n var partialByNl = partial.split('\\n');\n for (var i = 0; i < partialByNl.length; i++) {\n if (partialByNl[i].length && (i > 0 || !lineHasNonSpace)) {\n partialByNl[i] = filteredIndentation + partialByNl[i];\n }\n }\n return partialByNl.join('\\n');\n };\n\n Writer.prototype.renderPartial = function renderPartial (token, context, partials, config) {\n if (!partials) return;\n var tags = this.getConfigTags(config);\n\n var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n if (value != null) {\n var lineHasNonSpace = token[6];\n var tagIndex = token[5];\n var indentation = token[4];\n var indentedValue = value;\n if (tagIndex == 0 && indentation) {\n indentedValue = this.indentPartial(value, indentation, lineHasNonSpace);\n }\n var tokens = this.parse(indentedValue, tags);\n return this.renderTokens(tokens, context, partials, indentedValue, config);\n }\n };\n\n Writer.prototype.unescapedValue = function unescapedValue (token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return value;\n };\n\n Writer.prototype.escapedValue = function escapedValue (token, context, config) {\n var escape = this.getConfigEscape(config) || mustache.escape;\n var value = context.lookup(token[1]);\n if (value != null)\n return (typeof value === 'number' && escape === mustache.escape) ? String(value) : escape(value);\n };\n\n Writer.prototype.rawValue = function rawValue (token) {\n return token[1];\n };\n\n Writer.prototype.getConfigTags = function getConfigTags (config) {\n if (isArray(config)) {\n return config;\n }\n else if (config && typeof config === 'object') {\n return config.tags;\n }\n else {\n return undefined;\n }\n };\n\n Writer.prototype.getConfigEscape = function getConfigEscape (config) {\n if (config && typeof config === 'object' && !isArray(config)) {\n return config.escape;\n }\n else {\n return undefined;\n }\n };\n\n var mustache = {\n name: 'mustache.js',\n version: '4.2.0',\n tags: [ '{{', '}}' ],\n clearCache: undefined,\n escape: undefined,\n parse: undefined,\n render: undefined,\n Scanner: undefined,\n Context: undefined,\n Writer: undefined,\n /**\n * Allows a user to override the default caching strategy, by providing an\n * object with set, get and clear methods. This can also be used to disable\n * the cache by setting it to the literal `undefined`.\n */\n set templateCache (cache) {\n defaultWriter.templateCache = cache;\n },\n /**\n * Gets the default or overridden caching object from the default writer.\n */\n get templateCache () {\n return defaultWriter.templateCache;\n }\n };\n\n // All high-level mustache.* functions use this writer.\n var defaultWriter = new Writer();\n\n /**\n * Clears all cached templates in the default writer.\n */\n mustache.clearCache = function clearCache () {\n return defaultWriter.clearCache();\n };\n\n /**\n * Parses and caches the given template in the default writer and returns the\n * array of tokens it contains. Doing this ahead of time avoids the need to\n * parse templates on the fly as they are rendered.\n */\n mustache.parse = function parse (template, tags) {\n return defaultWriter.parse(template, tags);\n };\n\n /**\n * Renders the `template` with the given `view`, `partials`, and `config`\n * using the default writer.\n */\n mustache.render = function render (template, view, partials, config) {\n if (typeof template !== 'string') {\n throw new TypeError('Invalid template! Template should be a \"string\" ' +\n 'but \"' + typeStr(template) + '\" was given as the first ' +\n 'argument for mustache#render(template, view, partials)');\n }\n\n return defaultWriter.render(template, view, partials, config);\n };\n\n // Export the escaping function so that the user may override it.\n // See https://github.com/janl/mustache.js/issues/244\n mustache.escape = escapeHtml;\n\n // Export these mainly for testing, but also for advanced usage.\n mustache.Scanner = Scanner;\n mustache.Context = Context;\n mustache.Writer = Writer;\n\n return mustache;\n\n})));\n","import{useState as n,useReducer as t,useEffect as e,useLayoutEffect as r,useRef as u,useImperativeHandle as o,useMemo as i,useCallback as c,useContext as l,useDebugValue as f}from\"preact/hooks\";export*from\"preact/hooks\";import{Component as a,createElement as s,options as h,toChildArray as v,Fragment as p,hydrate as d,render as m,__u as b,cloneElement as y,createRef as _,createContext as g}from\"preact\";export{createElement,createContext,createRef,Fragment,Component}from\"preact\";function E(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function w(n){this.props=n}function C(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,s(n,t)}return r.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",r.prototype.isReactComponent=!0,r.__f=!0,r}(w.prototype=new a).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var R=h.__b;h.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var x=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function k(n){function t(t,e){var r=E({},t);return delete r.ref,n(r,(e=t.ref||e)&&(\"object\"!=typeof e||\"current\"in e)?e:null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var O=function(n,t){return null==n?null:v(v(n).map(t))},A={map:O,forEach:O,count:function(n){return n?v(n).length:0},only:function(n){var t=v(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:v},N=h.__e;function L(n){return n&&((n=E({},n)).__c=null,n.__k=n.__k&&n.__k.map(L)),n}function U(n){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(U)),n}function F(){this.__u=0,this.t=null,this.__b=null}function M(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function j(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n},function(n){r=n}),r)throw r;if(!e)throw t;return s(e,u)}return u.displayName=\"Lazy\",u.__f=!0,u}function D(){this.u=null,this.o=null}h.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t.__c);N(n,t,e)},(F.prototype=new a).__c=function(n,t){var e=this;null==e.t&&(e.t=[]),e.t.push(t);var r=M(e.__v),u=!1,o=function(){u||(u=!0,t.componentWillUnmount=t.__c,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var n;if(!--e.__u)for(e.__v.__k[0]=U(e.state.__e),e.setState({__e:e.__b=null});n=e.t.pop();)n.forceUpdate()},c=e.__v;c&&!0===c.__h||e.__u++||e.setState({__e:e.__b=e.__v.__k[0]}),n.then(o,o)},F.prototype.componentWillUnmount=function(){this.t=[]},F.prototype.render=function(n,t){this.__b&&(this.__v.__k&&(this.__v.__k[0]=L(this.__b)),this.__b=null);var e=t.__e&&s(p,null,n.fallback);return e&&(e.__h=null),[s(p,null,t.__e?null:n.children),e]};var I=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]3)for(u=[u],o=3;o1&&T(t,l,u),l=x(u,t,t,n.__k,null,t.__e,l),\"function\"==typeof n.type&&(n.__d=l)))}function $(l,u,i,t,o,r,f,e,c){var a,h,v,y,_,w,k,g,b,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if(\"function\"==typeof P){if(g=u.props,b=(a=P.contextType)&&t[a.__c],x=a?b?b.props.value:a.__:t,i.__c?k=(h=u.__c=i.__c).__=h.__E:(\"prototype\"in P&&P.prototype.render?u.__c=h=new P(g,x):(u.__c=h=new d(g,x),h.constructor=P,h.render=M),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,P.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,h.__h.length&&f.push(h),T(u,e,l);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,w)})}h.context=x,h.props=g,h.state=h.__s,(a=n.__r)&&a(u),h.__d=!1,h.__v=u,h.__P=l,a=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(w=h.getSnapshotBeforeUpdate(y,_)),A=null!=a&&a.type==p&&null==a.key?a.props.children:a,m(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),k&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=H(i.__e,u,i,t,o,r,f,c);(a=n.diffed)&&a(u)}catch(l){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),n.__e(l,u,i)}return u.__e}function j(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u)})}catch(l){n.__e(l,u.__v)}})}function H(n,l,u,i,t,o,r,c){var s,a,h,v,y,p=u.props,d=l.props;if(t=\"svg\"===l.type||t,null!=o)for(s=0;s3)for(u=[u],o=3;o=i.__.length&&i.__.push({}),i.__[t]}function m(n){return o=1,p(k,n)}function p(n,r,o){var i=v(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):k(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=v(t++,3);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function l(r,o){var i=v(t++,4);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function h(n){return o=5,_(function(){return{current:n}},[])}function s(n,t,u){o=6,l(function(){\"function\"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))}function _(n,u){var r=v(t++,7);return j(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,_(function(){return n},t)}function F(n){var r=u.context[n.__c],o=v(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function d(n){var r=v(t++,10),o=m();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function q(){i.some(function(t){if(t.__P)try{t.__H.__h.forEach(b),t.__H.__h.forEach(g),t.__H.__h=[]}catch(u){return t.__H.__h=[],n.__e(u,t.__v),!0}}),i=[]}n.__r=function(n){c&&c(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(b),r.__h.forEach(g),r.__h=[])},n.diffed=function(t){f&&f(t);var u=t.__c;u&&u.__H&&u.__H.__h.length&&(1!==i.push(u)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),x&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);x&&(t=requestAnimationFrame(u))})(q))},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(b),t.__h=t.__h.filter(function(n){return!n.__||g(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),e&&e(t,u)},n.unmount=function(t){a&&a(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(b)}catch(t){n.__e(t,u.__v)}};var x=\"function\"==typeof requestAnimationFrame;function b(n){\"function\"==typeof n.u&&n.u()}function g(n){n.u=n.__()}function j(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function k(n,t){return\"function\"==typeof t?t(n):t}export{m as useState,p as useReducer,y as useEffect,l as useLayoutEffect,h as useRef,s as useImperativeHandle,_ as useMemo,A as useCallback,F as useContext,T as useDebugValue,d as useErrorBoundary};\n//# sourceMappingURL=hooks.module.js.map\n","\"use strict\";\nexports.__esModule = true;\nvar SortByHelper_1 = require(\"./components/SortBy/SortByHelper\");\nvar apisearch_1 = require(\"apisearch\");\n/**\n * ApisearchUI class\n */\nvar ApisearchHelper = /** @class */ (function () {\n function ApisearchHelper() {\n }\n /**\n * @param query\n * @param sortBy\n */\n ApisearchHelper.prototype.sortBy = function (query, sortBy) {\n (0, SortByHelper_1.applySortByToQuery)(query, sortBy);\n };\n /**\n * @param query\n * @param field\n * @param value\n * @param weight\n */\n ApisearchHelper.prototype.boostByWeightAndFilter = function (query, field, value, weight) {\n var _a;\n var scoreStrategies = (_a = query.getScoreStrategies()) !== null && _a !== void 0 ? _a : apisearch_1.ScoreStrategies.createEmpty(apisearch_1.MULTIPLY);\n scoreStrategies.addScoreStrategy(apisearch_1.ScoreStrategy.createFromArray({\n \"type\": \"weight\",\n \"weight\": weight,\n \"filter\": {\n \"field\": field,\n \"values\": [value],\n \"application_type\": apisearch_1.FILTER_MUST_ALL,\n \"filter_type\": apisearch_1.FILTER_TYPE_FIELD\n },\n \"match_main_query\": true\n }));\n query.setScoreStrategies(scoreStrategies);\n };\n return ApisearchHelper;\n}());\nexports[\"default\"] = ApisearchHelper;\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar apisearch_2 = require(\"apisearch\");\nvar IndexUUID_1 = require(\"apisearch/lib/Model/IndexUUID\");\nvar ApisearchHelper_1 = require(\"./ApisearchHelper\");\nvar ApisearchUIFactory_1 = require(\"./ApisearchUIFactory\");\nvar Bootstrap_1 = require(\"./Bootstrap\");\nvar Constants_1 = require(\"./Constants\");\nvar Container_1 = require(\"./Container\");\nvar Environment_1 = require(\"./Environment\");\nvar Widgets_1 = require(\"./widgets/Widgets\");\n/**\n * ApisearchUI class\n */\nvar ApisearchUI = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param environmentId\n * @param repository\n * @param store\n */\n function ApisearchUI(environmentId, repository, store) {\n this.initialSetupPerformed = false;\n /**\n * Environment Id\n */\n this.environmentId = environmentId;\n this.repository = repository;\n this.activeWidgets = [];\n this.widgets = Widgets_1[\"default\"];\n this.helper = new ApisearchHelper_1[\"default\"]();\n this.dictionary = {};\n /**\n * Store related properties\n */\n this.store = store;\n }\n /**\n * Initialize components\n *\n * @param firstQuery\n */\n ApisearchUI.prototype.init = function (_a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, _c = _b.firstQuery, firstQuery = _c === void 0 ? true : _c;\n this.activeWidgets.map(function (widget) { return widget.withConfig(_this.config); });\n /**\n * 1.- Register all events on the store\n */\n this.store.on(\"render\", function () { return _this.render(); });\n this.store.on(\"toUrlObject\", function (query, object) { return _this.toUrlObject(query, object); });\n this.store.on(\"fromUrlObject\", function (object, query) { return _this.fromUrlObject(object, query); });\n /**\n * 2.- Trigger the initial render: (Mount the components)\n * To let components setup its configuration on componentWillMount()\n */\n this.render();\n /**\n * 3.- Dispatch the initial data request\n * With all widget previous initial configurations\n */\n this.firstQuery = firstQuery;\n this.fetchQuery(true);\n window.dispatchEvent(new Event(\"apisearch_loaded\", {\n bubbles: true\n }));\n };\n /**\n *\n */\n ApisearchUI.prototype.reset = function () {\n var initialQuery = this.store.getCurrentQuery().toArray();\n this.activeWidgets.map(function (widget) {\n widget.reset(initialQuery);\n });\n this.store.setCurrentQuery(apisearch_1.Query.createFromArray(initialQuery));\n this.store.setEmptyResult();\n var rendered = this.fetchQuery(false);\n if (!rendered) {\n this.render();\n }\n };\n /**\n * @param loadQuery\n *\n * @return boolean\n */\n ApisearchUI.prototype.fetchQuery = function (loadQuery) {\n /**\n * 3.- Dispatch the initial data request\n * With all widget previous initial configurations\n */\n if (typeof this.firstQuery === \"undefined\" ||\n true === this.firstQuery) {\n this.store.fetchInitialQuery(this.environmentId, this.repository, loadQuery);\n return true;\n }\n return false;\n };\n /**\n * @param dictionary\n */\n ApisearchUI.prototype.setDictionary = function (dictionary) {\n this.dictionary = dictionary;\n };\n /**\n * Add new widget\n *\n * @param widget\n *\n * @return {ApisearchUI}\n */\n ApisearchUI.prototype.addWidget = function (widget) {\n widget.withConfig(this.config);\n this.activeWidgets = __spreadArray(__spreadArray([], this.activeWidgets, true), [widget], false);\n return this;\n };\n /**\n * Add components in bulk mode\n *\n * @param widgets\n *\n * @return {ApisearchUI}\n */\n ApisearchUI.prototype.addWidgets = function () {\n var _this = this;\n var widgets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n widgets[_i] = arguments[_i];\n }\n widgets.map(function (widget) { return _this.addWidget(widget); });\n return this;\n };\n /**\n * Render.\n *\n * Loop all active components\n * Hydrate them with new props\n * And render them.\n */\n ApisearchUI.prototype.render = function () {\n var _this = this;\n this.activeWidgets.map(function (widget) {\n if (!_this.initialSetupPerformed) {\n widget.initialSetup(_this.environmentId, _this.store, _this.repository);\n }\n widget.render(_this.environmentId, _this.store, _this.repository, _this.dictionary);\n });\n this.initialSetupPerformed = true;\n window.dispatchEvent(new Event(\"apisearch_rendered\", {\n bubbles: true\n }));\n };\n /**\n *\n */\n ApisearchUI.prototype.normalizeQuery = function () {\n var _this = this;\n this.activeWidgets.map(function (widget) {\n widget.normalizeQuery(_this.environmentId, _this.store.getCurrentQuery());\n });\n };\n /**\n * @param query\n * @param object\n */\n ApisearchUI.prototype.toUrlObject = function (query, object) {\n this.activeWidgets.map(function (widget) {\n widget.toUrlObject(query, object);\n });\n };\n /**\n * @param object\n * @param query\n */\n ApisearchUI.prototype.fromUrlObject = function (object, query) {\n this.activeWidgets.map(function (widget) {\n widget.fromUrlObject(object, query);\n });\n };\n /**\n * @param config\n * @param hash\n *\n * @return {ApisearchUI}\n */\n ApisearchUI.create = function (config, hash) {\n var _a;\n apisearch_2[\"default\"].ensureRepositoryConfigIsValid(config);\n /**\n * Build environment Id\n */\n var environmentId = (0, Environment_1.createEnvironmentId)();\n /**\n * Bootstrapping ApisearchUI application\n */\n (0, Bootstrap_1.bootstrap)(environmentId, config, hash);\n /**\n * Register handleActions method (store reducer)\n * into the event dispatcher\n */\n var apisearchUI = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId));\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.registerListener(\"RENDER_INITIAL_DATA\", function (payload) { return apisearchUI.store.renderInitialData(payload); });\n dispatcher.registerListener(\"RENDER_FETCHED_DATA\", function (payload) { return apisearchUI.store.renderFetchedData(payload); });\n dispatcher.registerListener(\"UPDATE_APISEARCH_SETUP\", function (payload) { return apisearchUI.store.updateApisearchSetup(payload); });\n dispatcher.registerListener(\"NORMALIZE_QUERY\", function (payload) { return apisearchUI.normalizeQuery(); });\n /**\n * Add widgets\n */\n apisearchUI.widgets = Widgets_1[\"default\"];\n apisearchUI.config = config;\n var uiId = \"ui_\".concat(Math.ceil(Math.random() * (9999999 - 1) + 1));\n apisearchUI.reference = uiId;\n apisearchUI.userId = (_a = config.user_id) !== null && _a !== void 0 ? _a : \"\";\n window[uiId] = apisearchUI;\n window[\"apisearch_ui\"] = apisearchUI;\n /**\n * Return ApisearchUI instance\n */\n return apisearchUI;\n };\n /**\n * Create instance\n *\n * @param config\n *\n * @return {ApisearchUIFactory}\n */\n ApisearchUI.factory = function (config) {\n return ApisearchUIFactory_1[\"default\"].fromConfig(config);\n };\n /**\n * @param appId\n * @param indexId\n * @param itemId\n * @param position\n */\n ApisearchUI.prototype.click = function (appId, indexId, itemId, position) {\n try {\n if (navigator.sendBeacon === undefined) {\n this\n .repository\n .pushInteraction(IndexUUID_1.IndexUUID.createById(indexId), apisearch_1.ItemUUID.createByComposedUUID(itemId), this.userId, this.store.getCurrentQuery().getQueryText(), \"cli\", this.store.getSite(), this.store.getDevice(), position);\n }\n else {\n this.sendClickBeacon(appId, indexId, itemId, position);\n }\n var queryAsArray = JSON.parse(JSON.stringify(this.store.getCurrentQuery().toArray()));\n var resultAsArray = JSON.parse(JSON.stringify(this.store.getCurrentResult().toArray()));\n window.postMessage({\n name: \"apisearch_item_was_clicked\",\n app_id: appId,\n index_id: indexId,\n item_id: itemId,\n site: this.store.getSite(),\n device: this.store.getDevice(),\n query: queryAsArray,\n result: resultAsArray,\n position: position\n }, \"*\");\n window.postMessage({\n name: \"apisearch_item_was_interacted\",\n interaction: \"cli\",\n app_id: appId,\n index_id: indexId,\n item_id: itemId,\n site: this.store.getSite(),\n device: this.store.getDevice(),\n query: queryAsArray,\n result: resultAsArray,\n position: position\n }, \"*\");\n }\n catch (error) {\n // Silent pass.\n // Errors in Apisearch should never cause client browser error\n }\n };\n /**\n * @param appId\n * @param indexId\n * @param itemId\n * @param position\n * @private\n */\n ApisearchUI.prototype.sendClickBeacon = function (appId, indexId, itemId, position) {\n var data = new FormData();\n data.append(\"device\", this.store.getDevice());\n data.append(\"query_string\", this.store.getCurrentQuery().getQueryText());\n data.append(\"site\", this.store.getSite());\n data.append(\"user_id\", this.userId);\n data.append(\"position\", \"\" + position);\n var endpoint = this.config.options.endpoint + \"/\" + this.config.options.api_version;\n navigator.sendBeacon(endpoint + \"/\" + appId + \"/indices/\" + indexId + \"/items/\" + itemId + \"/interaction/cli?token=\" + this.config.token, data);\n };\n /**\n * @param interaction\n * @param appId\n * @param indexId\n * @param itemId\n * @param position\n */\n ApisearchUI.prototype.interact = function (interaction, appId, indexId, itemId, position) {\n this\n .repository\n .pushInteraction(IndexUUID_1.IndexUUID.createById(indexId), apisearch_1.ItemUUID.createByComposedUUID(itemId), this.userId, this.store.getCurrentQuery().getQueryText(), interaction, this.store.getSite(), this.store.getDevice(), position);\n var queryAsArray = JSON.parse(JSON.stringify(this.store.getCurrentQuery().toArray()));\n var resultAsArray = JSON.parse(JSON.stringify(this.store.getCurrentResult().toArray()));\n window.postMessage({\n name: \"apisearch_item_was_interacted\",\n interaction: interaction,\n app_id: appId,\n index_id: indexId,\n item_id: itemId,\n site: this.store.getSite(),\n device: this.store.getDevice(),\n query: queryAsArray,\n result: resultAsArray,\n position: position\n }, \"*\");\n };\n /**\n * @param appId\n * @param indexId\n *\n * @return {any}\n */\n ApisearchUI.prototype.purchase = function (appId, indexId) {\n this\n .repository\n .purchase(IndexUUID_1.IndexUUID.createById(indexId), this.userId, [], this.store.getSite(), this.store.getDevice());\n window.postMessage({\n name: \"apisearch_purchase_was_done\",\n app_id: appId,\n index_id: indexId,\n site: this.store.getSite(),\n device: this.store.getDevice()\n }, \"*\");\n };\n /**\n *\n */\n ApisearchUI.prototype.getQuery = function () {\n return this.store.getCurrentQuery().toArray();\n };\n /**\n * @param text\n */\n ApisearchUI.prototype.write = function (text) {\n text = text.trim();\n var query = this.getQuery();\n if (query.q !== text) {\n query.q = text;\n query.page = 1;\n this.pushQuery(query);\n }\n };\n /**\n * @param query\n */\n ApisearchUI.prototype.pushQuery = function (query) {\n var _this = this;\n var queryObject = apisearch_1.Query.createFromArray(query);\n this.repository\n .query(queryObject)\n .then(function (result) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n _this.store.renderFetchedData({\n \"query\": queryObject,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n };\n return ApisearchUI;\n}());\nexports[\"default\"] = ApisearchUI;\n","\"use strict\";\nexports.__esModule = true;\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\n/**\n * ApisearchUIFactory class\n */\nvar ApisearchUIFactory = /** @class */ (function () {\n function ApisearchUIFactory() {\n }\n /**\n * Create instance\n *\n * @param config\n *\n * @return {ApisearchUIFactory}\n */\n ApisearchUIFactory.fromConfig = function (config) {\n var instance = new ApisearchUIFactory();\n instance.config = config;\n return instance;\n };\n /**\n * @param hash\n *\n * @return {ApisearchUI}\n */\n ApisearchUIFactory.prototype.createUI = function (hash) {\n if (hash === void 0) { hash = null; }\n return ApisearchUI_1[\"default\"].create(this.config, hash);\n };\n return ApisearchUIFactory;\n}());\nexports[\"default\"] = ApisearchUIFactory;\n","\"use strict\";\nexports.__esModule = true;\nexports.bootstrap = void 0;\nvar Dispatcher_1 = require(\"./Dispatcher\");\nvar apisearch_1 = require(\"apisearch\");\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\nvar Container_1 = require(\"./Container\");\nvar Store_1 = require(\"./Store\");\nvar Constants_1 = require(\"./Constants\");\n/**\n * @param environmentId\n * @param config\n * @param hash\n */\nfunction bootstrap(environmentId, config, hash) {\n var configAsString = JSON.stringify(config);\n var repositoryId = \"\".concat(Constants_1.APISEARCH_REPOSITORY, \"__\").concat(configAsString);\n var storeId = \"\".concat(Constants_1.APISEARCH_STORE, \"__\").concat(environmentId);\n var dispatcherId = \"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId);\n var configId = \"\".concat(Constants_1.APISEARCH_CONFIG, \"__\").concat(environmentId);\n var asuiId = \"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId);\n /**\n * Register Apisearch repository\n */\n Container_1[\"default\"].register(repositoryId, function () {\n return apisearch_1[\"default\"].createRepository(config);\n });\n /**\n * Register apisearch store\n */\n Container_1[\"default\"].register(storeId, function () {\n var _a, _b, _c, _d, _e, _f;\n return new Store_1[\"default\"](config.coordinate, config.options.min_score, hash, (_a = config.user_id) !== null && _a !== void 0 ? _a : \"\", (_b = config.options.site) !== null && _b !== void 0 ? _b : \"\", (_c = config.options.language) !== null && _c !== void 0 ? _c : \"\", (_d = config.options.device) !== null && _d !== void 0 ? _d : \"\", (_e = config.options.generate_random_session_uuid) !== null && _e !== void 0 ? _e : false, (_f = config.options.initial_state) !== null && _f !== void 0 ? _f : {});\n });\n /**\n * Register an event dispatcher\n */\n Container_1[\"default\"].register(dispatcherId, function () {\n return new Dispatcher_1.Dispatcher();\n });\n /**\n * Register Apisearch config\n */\n Container_1[\"default\"].register(configId, function () {\n return config;\n });\n /**\n * Apisearch UI Instance\n */\n Container_1[\"default\"].register(asuiId, function () {\n return new ApisearchUI_1[\"default\"](environmentId, Container_1[\"default\"].get(repositoryId), Container_1[\"default\"].get(storeId));\n });\n}\nexports.bootstrap = bootstrap;\n","\"use strict\";\nexports.__esModule = true;\nexports.APISEARCH_CONFIG = exports.APISEARCH_UI = exports.APISEARCH_DISPATCHER = exports.APISEARCH_STORE = exports.APISEARCH_REPOSITORY = void 0;\n/**\n * Service constants\n */\nexports.APISEARCH_REPOSITORY = \"apisearch_repository\";\nexports.APISEARCH_STORE = \"apisearch_store\";\nexports.APISEARCH_DISPATCHER = \"apisearch_dispatcher\";\nexports.APISEARCH_UI = \"apisearch_ui\";\nexports.APISEARCH_CONFIG = \"apisearch_config\";\n","\"use strict\";\nexports.__esModule = true;\n/**\n * Apisearch Dependency Injection Container\n */\nvar Container = /** @class */ (function () {\n function Container() {\n this.services = {};\n }\n /**\n * Get service\n *\n * @param id\n */\n Container.prototype.get = function (id) {\n if (this.services[id]) {\n return this.services[id];\n }\n throw new Error(\"Service with id (\".concat(id, \") is not registered.\"));\n };\n /**\n * Register service\n *\n * @param id\n * @param serviceCallback\n */\n Container.prototype.register = function (id, serviceCallback) {\n this.services[id] = serviceCallback();\n };\n return Container;\n}());\nexports[\"default\"] = new Container;\n","\"use strict\";\nexports.__esModule = true;\nexports.Dispatcher = void 0;\nvar Dispatcher = /** @class */ (function () {\n function Dispatcher() {\n this.events = {};\n }\n Dispatcher.prototype.registerListener = function (event, callback) {\n // Create the event if not exists\n if (this.events[event] === undefined) {\n this.events[event] = {\n listeners: []\n };\n }\n this.events[event].listeners.push(callback);\n };\n Dispatcher.prototype.dispatch = function (event, payload) {\n this.events[event].listeners.forEach(function (listener) {\n listener(payload);\n });\n };\n return Dispatcher;\n}());\nexports.Dispatcher = Dispatcher;\n","\"use strict\";\nexports.__esModule = true;\nexports.createEnvironmentId = void 0;\n/**\n * Create an envID\n */\nvar createEnvironmentId = function () { return \"env_\".concat(Math.ceil(Math.random() * (9999999 - 1) + 1)); };\nexports.createEnvironmentId = createEnvironmentId;\n","\"use strict\";\nexports.__esModule = true;\nexports.levenshteinDistance = exports.highlightLine = exports.highlightElement = void 0;\nfunction highlightElement(element, inputText) {\n var children = element.querySelectorAll(\".highlight\");\n var inputTextParts = inputText.split(\" \").filter(function (word) { return (word !== \"\"); });\n for (var i = 0; i < children.length; i++) {\n highlightLine(children[i], inputTextParts);\n }\n}\nexports.highlightElement = highlightElement;\nfunction highlightLine(element, inputTextParts) {\n var lineText = element.textContent;\n var lineTextParts = lineText.split(\" \").filter(function (word) { return (word !== \"\"); });\n var replaces = {};\n for (var i = 0; i < lineTextParts.length; i++) {\n for (var j = 0; j < inputTextParts.length; j++) {\n var lineWord = lineTextParts[i];\n var inputWord = inputTextParts[j];\n var minLength = Math.min(lineWord.length, inputWord.length);\n minLength = Math.max(minLength, inputWord.length);\n var lineWordSplit = lineWord.substring(0, minLength).toLowerCase();\n var inputWordSplit = inputWord.substring(0, minLength).toLowerCase();\n var distance = levenshteinDistance(lineWordSplit, inputWordSplit);\n var allowedDistance = 0;\n if (minLength >= 5 && minLength < 10) {\n allowedDistance = 1;\n }\n else if (minLength >= 10) {\n allowedDistance = 2;\n }\n if (distance <= allowedDistance) {\n replaces[lineWord] = \"\" + lineWord + \"\";\n break;\n }\n }\n }\n for (var _i = 0, _a = Object.entries(replaces); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n lineText = lineText.replaceAll(key, value);\n }\n element.innerHTML = lineText;\n}\nexports.highlightLine = highlightLine;\nfunction levenshteinDistance(str1, str2) {\n if (str1 === void 0) { str1 = \"\"; }\n if (str2 === void 0) { str2 = \"\"; }\n var track = Array(str2.length + 1).fill(null).map(function () {\n return Array(str1.length + 1).fill(null);\n });\n for (var i = 0; i <= str1.length; i += 1) {\n track[0][i] = i;\n }\n for (var j = 0; j <= str2.length; j += 1) {\n track[j][0] = j;\n }\n for (var j = 1; j <= str2.length; j += 1) {\n for (var i = 1; i <= str1.length; i += 1) {\n var indicator = str1[i - 1] === str2[j - 1] ? 0 : 1;\n track[j][i] = Math.min(track[j][i - 1] + 1, // deletion\n track[j - 1][i] + 1, // insertion\n track[j - 1][i - 1] + indicator);\n }\n }\n return track[str2.length][str1.length];\n}\nexports.levenshteinDistance = levenshteinDistance;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar events_1 = require(\"events\");\nvar Constants_1 = require(\"./Constants\");\nvar Container_1 = require(\"./Container\");\n/**\n * Flux pattern store class\n */\nvar Store = /** @class */ (function (_super) {\n __extends(Store, _super);\n /**\n * @param coordinate\n * @param minScore\n * @param hash\n * @param userId\n * @param site\n * @param language\n * @param device\n * @param generateRandomSessionUUID\n * @param initialState\n */\n function Store(coordinate, minScore, hash, userId, site, language, device, generateRandomSessionUUID, initialState) {\n var _this = _super.call(this) || this;\n _this.withHash = false;\n _this.doNotCleanUrlHashAtFirst = false;\n _this.dirty = true;\n _this.site = site;\n _this.device = device;\n _this.initialState = initialState;\n var initialQuery = Store.loadInitialQuery(coordinate, userId, site, language, device);\n _this.window = window.top;\n _this.isUnderIframe = (window !== window.top);\n if ((typeof hash === \"string\")) {\n _this.withHash = true;\n _this.urlHash = (hash === \"\") ? \"{}\" : hash;\n if (_this.urlHash.charAt(0) === \"#\") {\n _this.urlHash = _this.urlHash.substr(1);\n }\n }\n if (minScore) {\n initialQuery.setMinScore(minScore);\n }\n /**\n * Data received\n */\n _this.setEmptyResult();\n _this.currentVisibleResults = false;\n if (generateRandomSessionUUID) {\n initialQuery.setMetadataValue(\"session_uid\", Store.createUID(16));\n }\n _this.setCurrentQuery(initialQuery);\n return _this;\n }\n /**\n * Is dirty\n *\n * @return {any}\n */\n Store.prototype.isDirty = function () {\n return this.dirty;\n };\n /**\n *\n */\n Store.prototype.getSite = function () {\n return this.site;\n };\n /**\n *\n */\n Store.prototype.getDevice = function () {\n return this.device;\n };\n /**\n * Get current query\n *\n * @return {Query}\n */\n Store.prototype.getCurrentQuery = function () {\n return this.currentQuery;\n };\n /**\n * @param query\n */\n Store.prototype.setCurrentQuery = function (query) {\n this.currentQuery = query;\n };\n /**\n * Get current result\n *\n * @return {Result}\n */\n Store.prototype.getCurrentResult = function () {\n return this.currentResult;\n };\n /**\n * @param result\n */\n Store.prototype.setCurrentResult = function (result) {\n this.currentResult = result;\n };\n /**\n *\n */\n Store.prototype.setEmptyResult = function () {\n this.currentResult = apisearch_1[\"default\"].createEmptyResult();\n };\n /**\n * Get current result\n *\n * @return {boolean}\n */\n Store.prototype.hasProperResult = function () {\n return this.currentResult.getTotalItems() > 0;\n };\n /**\n * Results are visible\n *\n * @return {boolean}\n */\n Store.prototype.resultsAreVisible = function () {\n return this.currentVisibleResults;\n };\n /**\n * @param payload\n */\n Store.prototype.updateApisearchSetup = function (payload) {\n this.currentQuery = payload.query;\n };\n /**\n * @param payload\n */\n Store.prototype.renderInitialData = function (payload) {\n var result = payload.result, query = payload.query, _ = payload._;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n this.currentVisibleResults = query !== undefined;\n this.emit(\"render\");\n this.replaceUrl(query, result, this.currentVisibleResults);\n };\n /**\n * @param payload\n */\n Store.prototype.renderFetchedData = function (payload) {\n var result = payload.result, query = payload.query, visibleResults = payload.visibleResults;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n if (visibleResults !== undefined) {\n this.currentVisibleResults = visibleResults;\n }\n this.emit(\"render\");\n this.replaceUrl(query, result, visibleResults);\n };\n /**\n * Create an uid\n */\n Store.createUID = function (length) {\n var result = \"\";\n var characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n };\n /**\n * @param environmentId\n * @param repository\n * @param loadQuery\n */\n Store.prototype.fetchInitialQuery = function (environmentId, repository, loadQuery) {\n var _this = this;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n this.currentQuery = loadQuery\n ? this.loadQuery(this.currentQuery)\n : this.currentQuery;\n dispatcher.dispatch(\"NORMALIZE_QUERY\", {\n query: this.currentQuery\n });\n /**\n * In initial query, we must delete user\n */\n var queryAsArray = this.currentQuery.toArray();\n queryAsArray.user = null;\n repository\n .query(apisearch_1.Query.createFromArray(queryAsArray))\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_INITIAL_DATA\", {\n query: _this.currentQuery,\n result: result\n });\n });\n };\n /**\n * @param coordinate\n * @param userId\n * @param site\n * @param language\n * @param device\n *\n * @private\n */\n Store.loadInitialQuery = function (coordinate, userId, site, language, device) {\n var withCoordinate = (coordinate &&\n coordinate.lat !== undefined &&\n coordinate.lon !== undefined);\n var q = {};\n if (withCoordinate) {\n q.coordinate = coordinate;\n }\n if (userId !== \"\") {\n q.user = { id: userId };\n }\n if (q.metadata === undefined) {\n q.metadata = { device: device };\n }\n if (site !== \"\") {\n q.metadata.site = site;\n }\n if (language !== \"\") {\n q.metadata.language = language;\n }\n return apisearch_1.Query.createFromArray(q);\n };\n /**\n * @param query\n */\n Store.prototype.loadQuery = function (query) {\n var queryAsObject = query.toArray();\n if (Object.keys(this.initialState).length > 0) {\n this.emit(\"fromUrlObject\", this.initialState, queryAsObject);\n return apisearch_1.Query.createFromArray(queryAsObject);\n }\n if (!this.withHash) {\n return query;\n }\n var urlObject = {};\n if (this.urlHash.match(\"q=.*\") !== null) {\n var urlHashQuery = decodeURI(this.urlHash.slice(2));\n urlObject = { q: urlHashQuery };\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n else {\n try {\n urlObject = (this.urlHash !== undefined &&\n this.urlHash !== null &&\n this.urlHash !== \"\" &&\n this.urlHash !== \"/\")\n ? JSON.parse(decodeURI(this.urlHash))\n : {};\n if (Object.keys(urlObject).length > 0) {\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n }\n catch (e) {\n // Silent pass\n this.doNotCleanUrlHashAtFirst = true;\n }\n }\n return apisearch_1.Query.createFromArray(queryAsObject);\n };\n /**\n *\n * @param query\n * @param result\n * @param visibleResults\n */\n Store.prototype.replaceUrl = function (query, result, visibleResults) {\n if (!this.withHash) {\n return;\n }\n var queryAsObject = query.toArray();\n var urlObject = {};\n this.emit(\"toUrlObject\", queryAsObject, urlObject);\n var objectAsJson;\n if (Object.keys(urlObject).length === 1 &&\n typeof urlObject.q !== \"undefined\") {\n objectAsJson = \"q=\" + urlObject.q;\n }\n else {\n objectAsJson = decodeURI(JSON.stringify(urlObject));\n objectAsJson = (objectAsJson === \"{}\") ? \"\" : objectAsJson;\n objectAsJson = encodeURI(objectAsJson);\n }\n if (!this.isUnderIframe) {\n var path = window.location.href;\n var pathWithoutHash = path.split(\"#\", 2)[0];\n history.replaceState(\"\", \"\", pathWithoutHash + \"#\" + objectAsJson);\n if (objectAsJson === \"\") {\n history.replaceState(\"\", \"\", pathWithoutHash);\n }\n }\n else {\n if (!this.doNotCleanUrlHashAtFirst) {\n this.window.postMessage({\n name: \"apisearch_replace_hash\",\n hash: objectAsJson\n }, \"*\");\n }\n this.doNotCleanUrlHashAtFirst = false;\n }\n };\n return Store;\n}(events_1.EventEmitter));\nexports[\"default\"] = Store;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Result Information Component\n */\nvar BannerComponent = /** @class */ (function (_super) {\n __extends(BannerComponent, _super);\n /**\n * Constructor\n */\n function BannerComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n BannerComponent.prototype.componentWillReceiveProps = function (props) {\n var _a;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var banners = (_a = props.store.getCurrentResult().metadata.banners) !== null && _a !== void 0 ? _a : [];\n if (!banners) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var filteredBanners = banners.filter(function (banner) { return banner.position === props.position; });\n if (filteredBanners.length === 0) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var firstBanner = filteredBanners[0];\n this.setState(function (prevState) {\n return {\n mobile_img: firstBanner.mobile_img,\n desktop_img: firstBanner.desktop_img,\n url: firstBanner.url\n };\n });\n };\n BannerComponent.prototype.render = function () {\n var _a;\n if (this.state.desktop_img === \"\") {\n return;\n }\n var data = {\n desktop_img: this.state.desktop_img,\n mobile_img: (_a = this.state.mobile_img) !== null && _a !== void 0 ? _a : this.state.desktop_img,\n url: this.state.url,\n has_url: this.state.url !== \"\",\n breaking_point_size: this.props.breakingPointSize,\n image_prefix: this.props.imagePrefix\n };\n return ((0, preact_1.h)(Template_1[\"default\"], { template: defaultTemplates_1.defaultBannerTemplate, data: data, dictionary: this.props.dictionary }));\n };\n return BannerComponent;\n}(preact_1.Component));\nexports[\"default\"] = BannerComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultBannerTemplate = void 0;\nexports.defaultBannerTemplate = \"\\n
\\n {{#has_url}}{{/has_url}}\\n \\n \\n \\n \\n {{#has_url}}{{/has_url}}\\n
\\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.aggregationSetup = void 0;\n/**\n * Checkbox filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param aggregationField\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, aggregationField) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.aggregateBy(filterName, aggregationField, apisearch_1.FILTER_TYPE_FIELD);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param isChecked\n * @param filterValue\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, filterName, filterField, isChecked, filterValue) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, isChecked\n ? [filterValue]\n : [], apisearch_1.FILTER_MUST_ALL, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../MultipleFilter/Helpers\");\nvar CheckboxFilterActions_1 = require(\"./CheckboxFilterActions\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Checkbox Filter Component\n */\nvar CheckboxFilterComponent = /** @class */ (function (_super) {\n __extends(CheckboxFilterComponent, _super);\n function CheckboxFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param activeElement\n */\n _this.handleChange = function (activeElement) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.onChangeSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, activeElement, props.filterValue);\n };\n return _this;\n }\n /**\n * Component will mount\n */\n CheckboxFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var aggregationField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, aggregationField);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n CheckboxFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n aggregation: props\n .store\n .getCurrentResult()\n .getAggregation(props.filterName)\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n CheckboxFilterComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var filterValue = props.filterValue;\n if (typeof filterValue === \"boolean\") {\n filterValue = filterValue ? \"true\" : \"false\";\n }\n var n = 0;\n var isActive = (0, Helpers_1.getFilterValuesFromQuery)(props.store.getCurrentQuery(), props.filterName)[0];\n var aggregation = state.aggregation;\n if (aggregation != null) {\n var counters = aggregation.getCounters();\n for (var i in counters) {\n var counter = counters[i];\n if (counter.values.name === filterValue) {\n n = counter.getN();\n break;\n }\n }\n }\n var label = props.label\n ? props.label\n : props.filterName;\n var that = this;\n var uid = Math.floor(Math.random() * 10000000000);\n var templateData = {\n n: n,\n isActive: isActive,\n label: label,\n uid: uid\n };\n if (n === 0) {\n return null;\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-checkboxFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-checkboxFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-checkboxFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((isActive) ? activeClassName : \"\"), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleChange(!isActive);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: this.props.dictionary }))));\n };\n return CheckboxFilterComponent;\n}(preact_1.Component));\nCheckboxFilterComponent.defaultProps = {\n filterValue: 'true',\n classNames: {\n container: \"\",\n top: \"\",\n item: \"\",\n active: \"as-checkboxFilter__item--active\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = CheckboxFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{label}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.clearFiltersAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterToClear\n * @param filterValueToClear\n */\nfunction clearFiltersAction(environmentId, currentQuery, repository, filterToClear, filterValueToClear) {\n if (filterToClear === void 0) { filterToClear = null; }\n if (filterValueToClear === void 0) { filterValueToClear = null; }\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (filterToClear === null) {\n clonedQuery.filters = {\n _query: currentQuery.getFilter(\"_query\")\n };\n }\n else if (filterValueToClear === null) {\n delete clonedQuery.filters[filterToClear];\n }\n else {\n var values = clonedQuery.filters[filterToClear].values;\n var valueIndex = values.indexOf(filterValueToClear, 0);\n if (valueIndex > -1) {\n clonedQuery.filters[filterToClear].values.splice(valueIndex, 1);\n }\n if (clonedQuery.filters[filterToClear].values.length === 0) {\n delete clonedQuery.filters[filterToClear];\n }\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.clearFiltersAction = clearFiltersAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ClearFiltersActions_1 = require(\"./ClearFiltersActions\");\n/**\n * Result Information Component\n */\nvar ClearFiltersComponent = /** @class */ (function (_super) {\n __extends(ClearFiltersComponent, _super);\n /**\n * Constructor\n */\n function ClearFiltersComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n _this.setState(function (prevState) {\n return {\n appliedFilters: [],\n showClearFilters: false\n };\n });\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository);\n };\n /**\n * Handle individual click\n */\n _this.handleIndividualClick = function (filterKey, filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository, filterKey, filterValue);\n };\n _this.state = {\n appliedFilters: [],\n showClearFilters: false\n };\n return _this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n ClearFiltersComponent.prototype.componentWillReceiveProps = function (props) {\n var appliedFiltersFormatted = this.getFiltersToShow();\n this.setState(function (prevState) {\n return {\n appliedFilters: appliedFiltersFormatted,\n showClearFilters: appliedFiltersFormatted.length > 0\n };\n });\n };\n /**\n * @param filterToAvoid\n */\n ClearFiltersComponent.prototype.getFiltersToShow = function (filterToAvoid) {\n if (filterToAvoid === void 0) { filterToAvoid = null; }\n var appliedFilters = this.props.store.getCurrentQuery().getFilters();\n var appliedFiltersFormatted = [];\n for (var _i = 0, _a = Object.entries(appliedFilters); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], filter = _b[1];\n if (filter instanceof apisearch_1.Filter && (key !== \"_query\") && (key !== filterToAvoid)) {\n appliedFiltersFormatted.push({\n filter: key,\n num: filter.getValues().length,\n values: filter.getValues()\n });\n }\n }\n return appliedFiltersFormatted;\n };\n /**\n * Render\n *\n * @return {}\n */\n ClearFiltersComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var containerClassName = props.classNames.container;\n var filtersListClassName = props.classNames.filtersList;\n var filterClassName = props.classNames.filter;\n var containerTemplate = props.template.container;\n var filterTemplate = props.template.filter;\n var appliedFiltersFormatted = this.state.appliedFilters;\n var individualFilterClear = null;\n var isEmptyClass = (this.state.appliedFilters.length === 0) ? \"empty\" : \"\";\n if (props.showIndividualFilterValueClear) {\n var values_1 = [];\n this.state.appliedFilters.forEach(function (filter) {\n filter.values.forEach(function (value) { return values_1.push({\n filter: filter.filter,\n value: value\n }); });\n });\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, values_1.map(function (filter) {\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, filter.value); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n else if (props.showIndividualFilterClear) {\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, appliedFiltersFormatted.map(function (filter) {\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, null); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n return (this.state.showClearFilters)\n ? ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName, \" \").concat(isEmptyClass) },\n props.showGlobalFilterClear\n ? (0, preact_1.h)(\"div\", { onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary }))\n : \"\",\n individualFilterClear)) : null;\n };\n return ClearFiltersComponent;\n}(preact_1.Component));\nClearFiltersComponent.defaultProps = {\n classNames: {\n container: \"\",\n filter: \"\",\n filtersList: \"\"\n },\n showGlobalFilterClear: true,\n showIndividualFilterClear: false,\n showIndividualFilterValueClear: false,\n template: {\n container: \"Clear filters\",\n filter: \"Clear {{filter}} ({{num}})\"\n }\n};\nexports[\"default\"] = ClearFiltersComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar Clone = /** @class */ (function () {\n function Clone() {\n }\n Clone.object = function (object) {\n return Object.assign(Object.create(Object.getPrototypeOf(object)), object);\n };\n return Clone;\n}());\nexports[\"default\"] = Clone;\n","\"use strict\";\nexports.__esModule = true;\nexports.onWordClickAction = void 0;\nvar apisearch_1 = require(\"apisearch\");\nvar Clone_1 = require(\"./Clone\");\nvar Container_1 = require(\"../Container\");\nvar Constants_1 = require(\"../Constants\");\n/**\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param word\n * @param category\n */\nfunction onWordClickAction(environmentId, currentQuery, repository, word, category) {\n if (category === void 0) { category = null; }\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [word];\n clonedQuery.page = 1;\n if (category) {\n clonedQuery = apisearch_1.Query.createFromArray(clonedQuery);\n clonedQuery.filterBy(\"Categoría\", \"category_level_0\", [category]);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onWordClickAction = onWordClickAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Result Information Component\n */\nvar InformationComponent = /** @class */ (function (_super) {\n __extends(InformationComponent, _super);\n /**\n * Constructor\n */\n function InformationComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n hits: 0,\n total: 0,\n visible: false\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n InformationComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return (props.store.getCurrentResult() == null)\n ? {\n hits: 0,\n total: 0,\n visible: false\n }\n : {\n hits: props.store.getCurrentResult().getTotalHits(),\n total: props.store.getCurrentResult().getTotalItems(),\n visible: true\n };\n });\n };\n InformationComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n var formatData = props.formatData;\n if (!this.state.visible) {\n return;\n }\n var currentQuery = this.props.store.getCurrentQuery();\n var size = currentQuery.getSize();\n var page = currentQuery.getPage();\n var from = (page - 1) * size;\n var to = from + size;\n var totalHits = this.state.hits.toLocaleString();\n var moreThanLimit = false;\n if (totalHits === \"10,000\") {\n totalHits = '+10,000';\n moreThanLimit = true;\n }\n /**\n * Data accessible to the template\n */\n var reducedTemplateData = {\n total_hits: totalHits,\n total_items: this.state.total.toLocaleString(),\n page: page,\n size: size,\n from: from + 1,\n to: to,\n more_than_limit: moreThanLimit\n };\n var formattedTemplateData = formatData(reducedTemplateData);\n return ((0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, data: formattedTemplateData, className: \"as-information \".concat(containerClassName), dictionary: this.props.dictionary }));\n };\n return InformationComponent;\n}(preact_1.Component));\nInformationComponent.defaultProps = {\n classNames: {\n container: ''\n },\n template: {\n container: 'Found {{total_hits}}/{{total_items}}'\n },\n formatData: function (data) { return data; }\n};\nexports[\"default\"] = InformationComponent;\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nexports.isLeveledFilter = exports.getFilterValuesFromQuery = exports.isFilterAvailable = exports.getShadowFilterValuesFromQuery = exports.manageCurrentFilterItems = exports.wasElementRecentlySelected = void 0;\n/**\n * @param selectedItem\n * @param currentItems\n */\nfunction wasElementRecentlySelected(selectedItem, currentItems) {\n return !currentItems.some(function (item) { return item === selectedItem; });\n}\nexports.wasElementRecentlySelected = wasElementRecentlySelected;\n/**\n * Manage filter items\n *\n * If an item is on the list, remove it\n * else, add it!\n *\n * @param selectedItem\n * @param currentItems\n * @param wasElementRecentlySelected\n * @param deleteIfWasRemoved\n *\n * @returns {any}\n */\nfunction manageCurrentFilterItems(selectedItem, currentItems, wasElementRecentlySelected, deleteIfWasRemoved) {\n if (!wasElementRecentlySelected) {\n return deleteIfWasRemoved\n ? currentItems.filter(function (item) { return item !== selectedItem; })\n : currentItems;\n }\n else {\n return __spreadArray(__spreadArray([], currentItems, true), [\n selectedItem,\n ], false);\n }\n}\nexports.manageCurrentFilterItems = manageCurrentFilterItems;\n/**\n * @param query\n * @param filterName\n * @param withCurrent\n */\nfunction getShadowFilterValuesFromQuery(query, filterName, withCurrent) {\n var fields = [];\n if (isFilterAvailable(query, filterName, 6)) {\n var fieldName = query.filters[filterName].field.substr(17);\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n for (var it_1 = 1; it_1 < currentLevel; it_1++) {\n var iterationFieldName = fieldNameWithoutLevel + \"_\" + it_1;\n if (query.filters[iterationFieldName] !== undefined) {\n fields.push(query.filters[iterationFieldName].values[0]);\n }\n }\n if (withCurrent) {\n fields.push(query.filters[filterName].values[0]);\n }\n }\n return fields;\n}\nexports.getShadowFilterValuesFromQuery = getShadowFilterValuesFromQuery;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction isFilterAvailable(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return (query.filters !== undefined &&\n query.filters !== null &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined &&\n query.filters[filterName] !== null &&\n (applicationType === null ||\n query.filters[filterName].applicationType === applicationType ||\n query.filters[filterName].application_type === applicationType));\n}\nexports.isFilterAvailable = isFilterAvailable;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction getFilterValuesFromQuery(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return isFilterAvailable(query, filterName, applicationType)\n ? query.filters[filterName].values\n : [];\n}\nexports.getFilterValuesFromQuery = getFilterValuesFromQuery;\n/**\n * @param filter\n */\nfunction isLeveledFilter(filter) {\n return filter.application_type === 6 ||\n filter.applicationType === 6;\n}\nexports.isLeveledFilter = isLeveledFilter;\n","\"use strict\";\nexports.__esModule = true;\nexports.configureQueryWithShadowLeveledFilters = exports.modifyQueryAggregationWithProperLevelValue = exports.filterAction = exports.aggregationSetup = void 0;\n/**\n * Multiple filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar apisearch_2 = require(\"apisearch\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param promoted\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, aggregationField, applicationType, sortBy, fetchLimit, ranges, promoted) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit, promoted);\n }\n else {\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * Filter action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param filterValues\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param labels\n * @param shadowLeveledFilters\n * @param originalFilterField\n * @param promoted\n * @param selectedFilter\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterValues, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, promoted, selectedFilter) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.filterByRange(filterName, filterField, rangesValues, filterValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, false, sortBy);\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit);\n }\n else {\n clonedQuery.filterBy(filterName, filterField, filterValues, applicationType, false, sortBy);\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n if (applicationType === 6) {\n configureQueryWithShadowLeveledFilters(clonedQuery, shadowLeveledFilters, originalFilterField);\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n // We must explicitly tell that a filter was added at this point\n if (selectedFilter) {\n clonedQuery.setMetadataValue(\"af\", [filterField, selectedFilter]);\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n */\nfunction modifyQueryAggregationWithProperLevelValue(environmentId, currentQuery, filterName, filterField, aggregationField) {\n if (currentQuery.filters !== undefined &&\n currentQuery.filters[filterName] !== undefined) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var fieldName = currentQuery.filters[filterName].field;\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n clonedQuery.aggregations[filterName].field = fieldNameWithoutLevel + \"_\" + (currentLevel + 1);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n }\n}\nexports.modifyQueryAggregationWithProperLevelValue = modifyQueryAggregationWithProperLevelValue;\n/**\n * @param query\n * @param shadowLeveledFilters\n * @param originalFilterField\n */\nfunction configureQueryWithShadowLeveledFilters(query, shadowLeveledFilters, originalFilterField) {\n for (var it_1 = 1; it_1 < 10; it_1++) {\n var iterationFieldName = originalFilterField + \"_level_\" + it_1;\n delete (query.filters[iterationFieldName]);\n delete (query.aggregations[iterationFieldName]);\n }\n if (shadowLeveledFilters.length > 0) {\n var levelCounter_1 = 1;\n shadowLeveledFilters.forEach(function (filterValue) {\n var leveledFieldName = originalFilterField + \"_level_\" + (levelCounter_1++);\n query.filterBy(leveledFieldName, leveledFieldName, [filterValue], apisearch_1.FILTER_AT_LEAST_ONE);\n });\n }\n}\nexports.configureQueryWithShadowLeveledFilters = configureQueryWithShadowLeveledFilters;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar MultipleFilterActions_1 = require(\"./MultipleFilterActions\");\nvar Helpers_1 = require(\"./Helpers\");\nvar Template_1 = require(\"../Template\");\nvar ShowMoreComponent_1 = require(\"./ShowMoreComponent\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Filter Component\n */\nvar MultipleFilterComponent = /** @class */ (function (_super) {\n __extends(MultipleFilterComponent, _super);\n /**\n * Constructor\n */\n function MultipleFilterComponent() {\n var _this = _super.call(this) || this;\n _this.currentLevel = 0;\n _this.propsReceived = false;\n /**\n * @param selectedFilter\n * @param level\n */\n _this.handleClick = function (selectedFilter, level) {\n var _a;\n var props = _this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : filterField;\n var applicationType = props.applicationType;\n var sortBy = props.sortBy;\n var ranges = props.ranges;\n var labels = props.labels;\n var fetchLimit = props.fetchLimit;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var selectedFilterAsString = String(selectedFilter);\n var valuesAsString = (applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, filterName);\n var wasNotSelected = (0, Helpers_1.wasElementRecentlySelected)(selectedFilterAsString, valuesAsString);\n var filterItems = (0, Helpers_1.manageCurrentFilterItems)(selectedFilterAsString, valuesAsString, wasNotSelected, (applicationType !== 6));\n var currentLevel = level;\n if (applicationType === 6) {\n currentLevel = wasNotSelected ? currentLevel : (currentLevel - 1);\n }\n var shadowLeveledFilters = [];\n var originalFilterField = filterField;\n if (applicationType === 6) {\n filterField = filterField + \"_level_\" + (currentLevel);\n aggregationField = aggregationField + \"_level_\" + (currentLevel + 1);\n filterItems = filterItems.slice(0, currentLevel);\n shadowLeveledFilters = filterItems.slice(0, -1);\n filterItems = filterItems.slice(-1);\n }\n _this.currentLevel = currentLevel;\n /**\n * Dispatch filter action\n */\n (0, MultipleFilterActions_1.filterAction)(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterItems, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, props.promoted, wasNotSelected ? selectedFilterAsString : null);\n };\n /**\n * Handle show more\n */\n _this.handleShowMore = function () {\n var viewLimit = _this.state.aggregations.length;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n /**\n * Handle show less\n */\n _this.handleShowLess = function () {\n var viewLimit = _this.props.viewLimit;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n _this.state = {\n aggregations: [],\n viewLimit: 0\n };\n return _this;\n }\n /**\n * Components will mount\n */\n MultipleFilterComponent.prototype.componentWillMount = function () {\n var _a;\n var props = this.props;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : props.filterField;\n var applicationType = props.applicationType;\n var fetchLimit = props.fetchLimit;\n var viewLimit = props.viewLimit;\n /**\n * Set view items limit\n */\n var isViewLimitProperlySet = (viewLimit && viewLimit < fetchLimit);\n this.setState(function (_) {\n return {\n viewLimit: (isViewLimitProperlySet)\n ? viewLimit\n : fetchLimit\n };\n });\n if (applicationType === 6) {\n aggregationField = aggregationField + \"_level_1\";\n }\n /**\n * Dispatch action\n */\n (0, MultipleFilterActions_1.aggregationSetup)(props.environmentId, props.store.getCurrentQuery(), props.filterName, props.filterField, aggregationField, applicationType, props.sortBy, fetchLimit, props.ranges, props.promoted);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n MultipleFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var filterName = props.filterName;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n aggregations: [],\n filters: []\n };\n });\n return;\n }\n var result = props.store.getCurrentResult();\n var aggregation = result.getAggregation(filterName);\n var aggregations = [];\n if (aggregation && typeof aggregation.getCounters === \"function\") {\n /**\n * Getting aggregation from aggregations\n */\n var counters = aggregation.getCounters();\n var countersAsArray = Object.values(counters);\n aggregations = props.activeFirst\n ? __spreadArray(__spreadArray([], countersAsArray.filter(function (counter) {\n return true === counter.isUsed();\n }), true), countersAsArray.filter(function (counter) {\n return (false === counter.isUsed() ||\n null === counter.isUsed());\n }), true) : countersAsArray;\n }\n this.setState(function (prevState) {\n return {\n aggregations: aggregations\n };\n });\n if (props.applicationType === 6 &&\n this.propsReceived === false) {\n var filter = props.store.getCurrentQuery().getFilter(filterName);\n this.currentLevel = (filter === undefined || filter === null)\n ? this.currentLevel\n : filter.values\n ? (filter.values.length + 1)\n : this.currentLevel;\n this.propsReceived = true;\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n MultipleFilterComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var viewLimit = props.viewLimit;\n var fetchLimit = props.fetchLimit;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var showMoreContainerClassName = props.classNames.showMoreContainer;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var showMoreTemplate = props.template.showMore;\n var showLessTemplate = props.template.showLess;\n var currentQuery = props.store.getCurrentQuery();\n var formatData = props.formatData;\n var labels = Object.keys(props.ranges).length > 0\n ? props.ranges\n : props.labels;\n /**\n * Get aggregation items\n */\n var that = this;\n var itemsIds = {};\n var allItems = this.state.aggregations.map(function (item) {\n var uid = Math.floor(Math.random() * 10000000000);\n var values = item.getValues();\n values.name = labels[values.name] ? labels[values.name] : values.name;\n itemsIds[values.id] = true;\n return {\n isActive: item.isUsed(),\n n: item.getN(),\n uid: uid,\n values: values\n };\n });\n /**\n * Shadow filters. These filters are not part of the aggregation list but are applied. Should always be listed\n * first\n */\n var appliedFilters = (props.applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, props.filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, props.filterName);\n if (appliedFilters.length > 0) {\n var zeroItemsFilters_1 = [];\n appliedFilters.forEach(function (filter) {\n if (itemsIds[filter] === undefined) {\n var uid = Math.floor(Math.random() * 10000000000);\n zeroItemsFilters_1.push({\n isActive: true,\n n: 0,\n uid: uid,\n values: {\n id: filter,\n name: filter\n }\n });\n }\n });\n allItems = __spreadArray(__spreadArray([], zeroItemsFilters_1, true), allItems, true);\n }\n /**\n * Get existing applied filters if they exist\n */\n if (allItems.length === 0) {\n return null;\n }\n var items = allItems.slice(0, this.state.viewLimit);\n var allItemsLength = allItems.length;\n var levelCounter = 1;\n var topData = {\n hasApplied: appliedFilters.length > 0,\n nApplied: appliedFilters.length\n };\n /**\n * Check available view limit\n */\n var isViewLimitProperlySet = (viewLimit &&\n viewLimit < fetchLimit &&\n allItemsLength > viewLimit);\n return ((0, preact_1.h)(\"div\", { className: \"as-multipleFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-multipleFilter__top \".concat(topClassName), dictionary: this.props.dictionary, data: topData }),\n (0, preact_1.h)(\"div\", { className: \"as-multipleFilter__itemsList \".concat(itemsListClassName) },\n (0, preact_1.h)(\"ul\", null, items.map(function (item) {\n var formattedTemplateData = formatData(item);\n var level = Math.min(levelCounter, _this.currentLevel + 1);\n levelCounter++;\n return ((0, preact_1.h)(\"li\", { className: \"as-multipleFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((item.isActive) ? activeClassName : \"\") +\n \"\".concat((props.promoted.includes(item.values.name) ? \"as-multipleFilter__item_featured\" : \"\")), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(item.values.id, level);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: formattedTemplateData, dictionary: _this.props.dictionary })));\n }))),\n (isViewLimitProperlySet)\n ? (0, preact_1.h)(ShowMoreComponent_1[\"default\"], { allItemsLength: allItemsLength, currentLimit: this.state.viewLimit, handleShowMore: this.handleShowMore, handleShowLess: this.handleShowLess, showMoreContainerClassName: showMoreContainerClassName, showMoreTemplate: showMoreTemplate, showLessTemplate: showLessTemplate, dictionary: this.props.dictionary }) : null));\n };\n return MultipleFilterComponent;\n}(preact_1.Component));\nMultipleFilterComponent.defaultProps = {\n aggregationField: null,\n applicationType: 8,\n fetchLimit: 10,\n viewLimit: null,\n sortBy: ['_term', 'desc'],\n ranges: {},\n labels: {},\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\",\n active: \"as-multipleFilter__item--active\",\n showMoreContainer: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate,\n showMore: \"+ Show more\",\n showLess: \"- Show less\"\n },\n formatData: function (data) { return data; },\n activeFirst: true,\n promoted: []\n};\nexports[\"default\"] = MultipleFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Show more component\n *\n * Provides two items\n * -> Show more element\n * -> Show less element\n */\nvar ShowMoreComponent = function (_a) {\n var allItemsLength = _a.allItemsLength, currentLimit = _a.currentLimit, handleShowMore = _a.handleShowMore, handleShowLess = _a.handleShowLess, showMoreContainerClassName = _a.showMoreContainerClassName, showMoreTemplate = _a.showMoreTemplate, showLessTemplate = _a.showLessTemplate, dictionary = _a.dictionary;\n return (allItemsLength > currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowMore },\n (0, preact_1.h)(Template_1[\"default\"], { template: showMoreTemplate, className: \"as-showMore--more\", dictionary: dictionary })))\n : (allItemsLength === currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowLess },\n (0, preact_1.h)(Template_1[\"default\"], { template: showLessTemplate, className: \"as-showMore--less\", dictionary: dictionary })))\n : null;\n};\nexports[\"default\"] = ShowMoreComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{values.name}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.getEnd = exports.getStart = exports.totalPagesToArray = exports.getTotalPages = void 0;\n/**\n * Get total pages from the total reached hits\n * divided by the hits per page configured\n *\n * If there are more than 10.000 items\n * We reduce the max num of items to 9.999\n * to take care of performance\n *\n * If total resulted pages are bigger than 999\n * we set 999 as the max number of pages\n *\n * @param totalHits\n * @param hitsPerPage\n *\n * @return {number}\n */\nfunction getTotalPages(totalHits, hitsPerPage) {\n totalHits = (totalHits >= 10000)\n ? 9999\n : totalHits;\n var totalPages = Math.ceil(totalHits / hitsPerPage);\n return (totalPages > 999)\n ? 999\n : totalPages;\n}\nexports.getTotalPages = getTotalPages;\n/**\n * Pass total pages number into an array of numbers\n *\n * @param totalPages\n *\n * @return {number[]}\n */\nfunction totalPagesToArray(totalPages) {\n var pages = [];\n for (var index = 1; index <= totalPages; index++) {\n pages.push(index);\n }\n return pages;\n}\nexports.totalPagesToArray = totalPagesToArray;\n/**\n * Get the starting point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getStart(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return currentPage - (currentPage % spectreSize);\n }\n if (isTouchingRight) {\n var start = currentPage - (spectreSize - (totalPages % currentPage));\n return (start > 0) ? start : 0;\n }\n return currentPage - (padding + 1);\n}\nexports.getStart = getStart;\n/**\n * Get the ending point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getEnd(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return spectreSize;\n }\n if (isTouchingRight) {\n return totalPages;\n }\n return currentPage + padding;\n}\nexports.getEnd = getEnd;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Arrow navigation component\n */\nfunction NavigationComponent(_a) {\n var isVisible = _a.isVisible, classNames = _a.classNames, template = _a.template, handleClick = _a.handleClick;\n return (isVisible)\n ? ((0, preact_1.h)(\"li\", { className: classNames, onClick: handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: template, dictionary: this.props.dictionary })))\n : null;\n}\nexports[\"default\"] = NavigationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.paginationChangeAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedPage\n */\nfunction paginationChangeAction(environmentId, currentQuery, repository, selectedPage) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = selectedPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.paginationChangeAction = paginationChangeAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar Helpers_1 = require(\"./Helpers\");\nvar NavigationComponent_1 = require(\"./NavigationComponent\");\nvar PaginationActions_1 = require(\"./PaginationActions\");\n/**\n * Pagination Component\n */\nvar PaginationComponent = /** @class */ (function (_super) {\n __extends(PaginationComponent, _super);\n /**\n * Constructor\n */\n function PaginationComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n *\n * @param page\n */\n _this.handleClick = function (page) {\n var _a = _this.props, store = _a.store, environmentId = _a.environmentId, repository = _a.repository;\n var currentResult = store.getCurrentResult();\n var currentQuery = store.getCurrentQuery();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuery.getSize());\n /**\n * Do not let go further\n */\n if (page <= 0)\n page = 1;\n if (page >= totalPages)\n page = totalPages;\n if (currentQuery.getPage() === page) {\n return;\n }\n /**\n * Dispatch change page action\n */\n (0, PaginationActions_1.paginationChangeAction)(environmentId, currentQuery, repository, page);\n };\n _this.state = {\n page: 1\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n PaginationComponent.prototype.componentWillReceiveProps = function (props) {\n var page = props.store.getCurrentQuery().getPage();\n this.setState(function (prevState) {\n return {\n page: page\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PaginationComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var currentResult = props.store.getCurrentResult();\n if (props.store.getCurrentResult() == null) {\n return;\n }\n var currentQuerySize = props.store.getCurrentQuery().getSize();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuerySize);\n /**\n * Hide container if hits are empty\n */\n if (currentResult.getTotalHits() === 0 ||\n totalPages === 1) {\n return null;\n }\n var padding = props.padding;\n var goFirstLast = props.goFirstLast;\n var containerClassName = props.classNames.container;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var disabledClassName = props.classNames.disabled;\n var nextClassName = props.classNames.next;\n var previousClassName = props.classNames.previous;\n var lastClassName = props.classNames.last;\n var firstClassName = props.classNames.first;\n var itemTemplate = props.template.item;\n var nextTemplate = props.template.next;\n var previousTemplate = props.template.previous;\n var firstTemplate = props.template.first;\n var lastTemplate = props.template.last;\n var currentQueryPage = props.store.getCurrentQuery().getPage();\n /**\n * Get Total pages\n */\n var pages = (0, Helpers_1.totalPagesToArray)(totalPages);\n /**\n * Get pages spectre\n */\n var spectreSize = (padding * 2) + 1;\n var isTouchingLeft = currentQueryPage <= (padding + 1);\n var isTouchingRight = (currentQueryPage + padding) >= totalPages;\n var spectre = pages.slice((0, Helpers_1.getStart)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight), (0, Helpers_1.getEnd)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight));\n /**\n * Dynamic disabled classes\n */\n var previousDisabledClass = (currentQueryPage === 1) ? disabledClassName : '';\n var nextDisabledClass = (currentQueryPage === totalPages) ? disabledClassName : '';\n return ((0, preact_1.h)(\"ul\", { className: \"as-pagination \".concat(containerClassName) },\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--first \".concat(firstClassName, \" \").concat(previousDisabledClass), template: firstTemplate, handleClick: function () { return _this.handleClick(1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--previous \".concat(previousClassName, \" \").concat(previousDisabledClass), template: previousTemplate, handleClick: function () { return _this.handleClick(currentQueryPage - 1); } }),\n spectre.map(function (page) { return ((0, preact_1.h)(\"li\", { className: \"as-pagination__item as-pagination__item--link \".concat(itemClassName, \" \").concat((currentQueryPage === page) ? activeClassName : ''), onClick: function () { return _this.handleClick(page); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: { page: page.toLocaleString('de-DE') }, dictionary: _this.props.dictionary }))); }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--next \".concat(nextClassName, \" \").concat(nextDisabledClass), template: nextTemplate, handleClick: function () { return _this.handleClick(currentQueryPage + 1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--last \".concat(lastClassName, \" \").concat(nextDisabledClass), template: lastTemplate, handleClick: function () { return _this.handleClick(totalPages); } })));\n };\n return PaginationComponent;\n}(preact_1.Component));\nPaginationComponent.defaultProps = {\n padding: 3,\n goFirstLast: false,\n classNames: {\n container: '',\n item: '',\n active: 'as-pagination__item--active',\n disabled: 'as-pagination__item--disabled',\n next: '',\n first: '',\n previous: '',\n last: ''\n },\n template: {\n item: '{{page}}',\n next: '>',\n previous: '<',\n first: '<<',\n last: '>>'\n }\n};\nexports[\"default\"] = PaginationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.priorityFilterAction = exports.setupPriorityFilters = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nfunction setupPriorityFilters(environmentId, currentQuery, filters) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.setMetadataValue(\"pf\", filters);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.setupPriorityFilters = setupPriorityFilters;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param filterValue\n * @param applicationType\n */\nfunction priorityFilterAction(environmentId, currentQuery, repository, filterName, filterField, filterValue, applicationType) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, [filterValue], applicationType, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n clonedQuery.setMetadataValue(\"af\", [filterField, filterValue]);\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.priorityFilterAction = priorityFilterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar PriorityFilterActions_1 = require(\"./PriorityFilterActions\");\n/**\n * PriorityFilterComponent\n */\nvar PriorityFilterComponent = /** @class */ (function (_super) {\n __extends(PriorityFilterComponent, _super);\n /**\n * Constructor\n */\n function PriorityFilterComponent() {\n var _this = _super.call(this) || this;\n _this.handleClick = function (filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var priorityFilter = _this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n var priorityFilterName = priorityFilter.name;\n var priorityFilterObject = props.store.getCurrentQuery().getAggregation(priorityFilterName);\n (0, PriorityFilterActions_1.priorityFilterAction)(environmentId, currentQuery, repository, priorityFilterName, priorityFilterObject.getField().replace(\"indexed_metadata.\", \"\"), filterValue, priorityFilterObject.getApplicationType());\n };\n _this.state = {\n filterName: \"\"\n };\n return _this;\n }\n /**\n * Components will mount\n */\n PriorityFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, PriorityFilterActions_1.setupPriorityFilters)(props.environmentId, props.store.getCurrentQuery(), props.filters);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n PriorityFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (_) {\n return {\n filterName: props.store.getCurrentResult().getMetadataValue(\"priority_filter\")\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PriorityFilterComponent.prototype.render = function () {\n var _this = this;\n var priorityFilter = this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n if (!priorityFilter) {\n return null;\n }\n var priorityFilterName = priorityFilter.name;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-priorityFilter\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.top, className: \"as-priorityFilter__top\", dictionary: this.props.dictionary, data: {\n name: priorityFilterName\n } }),\n (0, preact_1.h)(\"div\", { className: \"as-priorityFilter__itemsList\" },\n (0, preact_1.h)(\"ul\", null, Object.keys(priorityFilter.values).map(function (key) {\n var data = priorityFilter.values[key];\n return ((0, preact_1.h)(\"li\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(key);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: _this.props.template.item, data: __assign(__assign({}, data), { value: key }), dictionary: _this.props.dictionary })));\n })))));\n };\n return PriorityFilterComponent;\n}(preact_1.Component));\nPriorityFilterComponent.defaultProps = {\n aggregationField: null,\n template: {\n item: defaultTemplates_1.defaultPriorityFilterItemTemplate,\n top: defaultTemplates_1.defaultPriorityFilterTopTemplate\n }\n};\nexports[\"default\"] = PriorityFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultPriorityFilterItemTemplate = exports.defaultPriorityFilterTopTemplate = void 0;\nexports.defaultPriorityFilterTopTemplate = \"\\n {{name}}\\n\";\nexports.defaultPriorityFilterItemTemplate = \"\\n
{{value}}
\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.filterAction = exports.aggregationSetup = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param min\n * @param max\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, min, max) {\n var withMinMax = min === null || max === null;\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var filterType = withMinMax ? 'range_min_max' : 'range';\n var filterValues = withMinMax ? ['..'] : [min + '..' + max];\n clonedQuery.aggregateByRange(filterName, filterField, filterValues, apisearch_1.FILTER_AT_LEAST_ONE, filterType);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param from\n * @param to\n * @param deleteMinMaxAggregation\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, from, to) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var realValueFrom = Math.min(from, to);\n var realValueTo = Math.max(from, to);\n var toWithIncluded = realValueTo + ']';\n clonedQuery.filterByRange(filterName, filterField, [], [realValueFrom + \"..\" + toWithIncluded], apisearch_1.FILTER_AT_LEAST_ONE, 'range_min_max', false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Template_1 = require(\"../Template\");\nvar RangeFilterActions_1 = require(\"./RangeFilterActions\");\n/**\n * Range Filter Component\n */\nvar RangeFilterComponent = /** @class */ (function (_super) {\n __extends(RangeFilterComponent, _super);\n function RangeFilterComponent() {\n var _this = _super.call(this) || this;\n _this.uid = Math.random().toString(16).substr(2, 12);\n _this.observerFrom = _this.configureFromObserver();\n _this.observerTo = _this.configureToObserver();\n _this.rangeUid = 'range-' + _this.uid;\n _this.setState(function (prevState) {\n return {\n from: null,\n to: null,\n min: null,\n max: null,\n visible: true\n };\n });\n return _this;\n }\n /**\n * Components will mount\n */\n RangeFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n (0, RangeFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, filterField, props.minValue, props.maxValue);\n };\n RangeFilterComponent.prototype.configureFromObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_1 = mutationsList; _i < mutationsList_1.length; _i++) {\n var mutation = mutationsList_1[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.from) {\n return;\n }\n that.handleSliderChange([value, that.state.to]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.configureToObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_2 = mutationsList; _i < mutationsList_2.length; _i++) {\n var mutation = mutationsList_2[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.to) {\n return;\n }\n that.handleSliderChange([that.state.from, value]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.componentDidMount = function () {\n this.observerFrom.observe(document.getElementsByClassName('as-rangeFilter__from__' + this.uid)[0], { attributes: true });\n this.observerTo.observe(document.getElementsByClassName('as-rangeFilter__to__' + this.uid)[0], { attributes: true });\n };\n RangeFilterComponent.prototype.componentWillUnmount = function () {\n this.observerFrom.disconnect();\n this.observerTo.disconnect();\n };\n /**\n * Handle change\n *\n * @param e\n */\n RangeFilterComponent.prototype.handleChange = function (e) {\n var uid = this.uid;\n this.applyFilter(e.target.parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, e.target.parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n };\n ;\n RangeFilterComponent.prototype.handleSliderChange = function (values) {\n if (values[0] === this.state.from &&\n values[1] === this.state.to) {\n return false;\n }\n this.applyFilter(values[0], values[1]);\n };\n ;\n /**\n * @param values\n */\n RangeFilterComponent.prototype.handleSliderMove = function (values) {\n this.updateRangeLayer(this.props, this.state, values[0], values[1]);\n };\n ;\n /**\n * Component will receive props\n *\n * @param props\n */\n RangeFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var currentResult = props\n .store\n .getCurrentResult();\n var aggregation = currentResult.getAggregation(props.filterName);\n if (!(aggregation instanceof apisearch_1.ResultAggregation)) {\n this.setState(function (prevState) {\n return {\n from: prevState.from,\n to: prevState.to,\n min: prevState.min,\n max: prevState.max,\n currency_placeholder: prevState.currency_placeholder,\n visible: false\n };\n });\n return;\n }\n var metadata = aggregation.getMetadata();\n var filter = props\n .store\n .getCurrentQuery()\n .getFilter(props.filterName);\n var min = typeof props.minValue === \"number\" && props.minValue > 0\n ? props.minValue\n : (typeof metadata['min'] === \"number\"\n ? Math.floor(metadata['min'])\n : undefined);\n var max = typeof props.maxValue === \"number\" && props.maxValue > 0\n ? props.maxValue\n : (typeof metadata['max'] === \"number\"\n ? Math.ceil(metadata['max'])\n : undefined);\n var currencyPlaceholder = null;\n var firstItem = currentResult.getFirstItem();\n if (firstItem) {\n var firstItemPrice = firstItem.get('price');\n var firstItemPriceWithCurrency = firstItem.get('price_with_currency');\n if (firstItemPrice && firstItemPriceWithCurrency) {\n currencyPlaceholder = this.getCurrencyPlaceholderFromPriceAndPriceWithCurrency(firstItemPrice, firstItemPriceWithCurrency);\n }\n }\n var fromTo = this.getFromToFromFilter(filter, min, max);\n this.setState(function (prevState) {\n return {\n from: fromTo[0],\n to: fromTo[1],\n min: min,\n max: max,\n currency_placeholder: currencyPlaceholder,\n visible: ((typeof min === \"number\") && (typeof max === \"number\"))\n };\n });\n };\n /**\n * @param filter\n * @param min\n * @param max\n */\n RangeFilterComponent.prototype.getFromToFromFilter = function (filter, min, max) {\n var realMin = Math.min(min, max);\n var realMax = Math.max(min, max);\n if (filter instanceof apisearch_1.Filter) {\n var filterValue = filter.getValues()[0];\n if (typeof filterValue === \"string\") {\n var parts = filterValue.split('..');\n var from = parts[0];\n var to = parts[1].slice(0, -1);\n return [\n Math.max(realMin, parseInt(from)),\n Math.min(realMax, parseInt(to)),\n ];\n }\n }\n return [realMin, realMax];\n };\n /**\n * @param previousProps\n * @param previousState\n */\n RangeFilterComponent.prototype.componentDidUpdate = function (previousProps, previousState) {\n this.updateRangeLayer(previousProps, previousState, previousState.from, previousState.to);\n };\n /**\n * @param props\n * @param state\n * @param from\n * @param to\n */\n RangeFilterComponent.prototype.updateRangeLayer = function (props, state, from, to) {\n var min = state.min;\n var max = state.max;\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof props.callback === \"function\") {\n props.callback(Math.min(from, to), Math.max(from, to), min, max, this.rangeUid, state.currency_placeholder);\n }\n };\n /**\n * @param props\n * @param state\n */\n RangeFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var filterName = props.filterName;\n var ref = (0, compat_1.useRef)(null);\n var topTemplate = props.template.top;\n var sliderTemplate = props.template.slider;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var wrapperClassName = props.classNames.wrapper;\n var that = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n if (!ref.current) {\n return;\n }\n var uid = _this.uid;\n /**\n * Alert if clicked on outside of element\n */\n function handleChange(event) {\n var target = event.target;\n var parentNode = target.parentNode;\n self.applyFilter(parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n }\n // Bind the event listener\n ref.current.addEventListener(\"change\", handleChange);\n return function () {\n // Unbind the event listener on clean up\n ref.current.removeEventListener(\"change\", handleChange);\n };\n }, [ref]);\n var isNative = props.native;\n var isNotNative = !isNative;\n var type = isNative ? 'range' : 'number';\n var eventName = 'onClick';\n var from = state.from;\n var to = state.to;\n var min = state.min;\n var max = state.max;\n var isVisible = state.visible && !(props.store.currentResult.getTotalHits() === 0 &&\n from === min &&\n to === max);\n var visibleStyle = isVisible ? '' : 'display:none!important;';\n return ((0, preact_1.h)(\"div\", { id: this.rangeUid, className: \"as-rangeFilter \".concat(containerClassName), style: visibleStyle },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-rangeFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-rangeFilter__wrapper \".concat(wrapperClassName) },\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__from \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__from__\").concat(this.uid) }, props.attributes.from, { value: from, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onChange: function (e) {\n var positions = [parseInt(e.target.value), to];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__to \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__to__\").concat(this.uid) }, props.attributes.to, { value: to, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onChange: function (e) {\n var positions = [from, parseInt(e.target.value)];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"div\", { \"class\": \"slider\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: sliderTemplate, dictionary: this.props.dictionary })))));\n };\n /**\n * Apply filter\n */\n RangeFilterComponent.prototype.applyFilter = function (valueFrom, valueTo) {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, RangeFilterActions_1.filterAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, valueFrom, valueTo);\n };\n /**\n * @param price\n * @param priceWithCurrency\n * @private\n */\n RangeFilterComponent.prototype.getCurrencyPlaceholderFromPriceAndPriceWithCurrency = function (price, priceWithCurrency) {\n price = (price + '').replace('.', '').replace(',', '');\n priceWithCurrency = (priceWithCurrency + '').replace('.', '').replace(',', '');\n var regex = new RegExp(price + '0*');\n var currencyPlaceholder = priceWithCurrency.replace(regex, \"__price__\");\n return currencyPlaceholder;\n };\n return RangeFilterComponent;\n}(preact_1.Component));\nRangeFilterComponent.defaultProps = {\n maxValueIncluded: true,\n step: 1,\n minValue: null,\n maxValue: null,\n native: false,\n classNames: {\n container: '',\n top: '',\n wrapper: '',\n input: '',\n from: '',\n to: ''\n },\n attributes: {\n from: '',\n to: ''\n },\n template: {\n top: '',\n slider: ''\n }\n};\nexports[\"default\"] = RangeFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.reloadAction = void 0;\n/**\n * Clear filters actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Clear filters action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n */\nfunction reloadAction(environmentId, currentQuery, repository) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n if (repository instanceof apisearch_1.HttpRepository) {\n var httpClient = repository.getHttpClient();\n if (httpClient instanceof apisearch_1.CacheClient) {\n httpClient.flushCache();\n }\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.reloadAction = reloadAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ReloadActions_1 = require(\"./ReloadActions\");\n/**\n * ReloadComponent\n */\nvar ReloadComponent = /** @class */ (function (_super) {\n __extends(ReloadComponent, _super);\n function ReloadComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ReloadActions_1.reloadAction)(environmentId, currentQuery, repository);\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {}\n */\n ReloadComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n return ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName), onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary })));\n };\n return ReloadComponent;\n}(preact_1.Component));\nReloadComponent.defaultProps = {\n classNames: {\n container: \"\"\n },\n template: {\n container: \"Reload\"\n }\n};\nexports[\"default\"] = ReloadComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Template_1 = require(\"../Template\");\n/**\n * Item\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param nextProps\n * @param nextState\n */\n Item.prototype.shouldComponentUpdate = function (nextProps, nextState) {\n var shouldUpdate = this.props.data.uuid_composed !== nextProps.data.uuid_composed ||\n this.props.data.metadata.image !== nextProps.data.metadata.image ||\n this.props.data.query !== nextProps.data.query;\n if (!shouldUpdate) {\n this.highlight();\n }\n return shouldUpdate;\n };\n Item.prototype.componentDidMount = function () {\n this.highlight();\n };\n Item.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n Item.prototype.highlight = function () {\n var queryText = this.props.data.query_text;\n if (this.props.data.highlights_enabled && queryText !== \"\") {\n var element = document.getElementById(\"as-result-\" + this.props.data.uuid_composed);\n (0, Highlight_1.highlightElement)(element, queryText);\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n Item.prototype.render = function () {\n var _a;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var dictionary = (_a = props.dictionary) !== null && _a !== void 0 ? _a : {};\n var id = \"as-result-\" + data.uuid_composed;\n var isBestMatch = data.metadata.best_match ? \"best-match\" : \"\";\n var isExactMatch = data.metadata.exact_match ? \"exact-match\" : \"\";\n return (0, preact_1.h)(Template_1[\"default\"], { template: template, data: data, id: id, className: \"\".concat(props.className, \" \").concat(isBestMatch, \" \").concat(isExactMatch), dictionary: dictionary });\n };\n return Item;\n}(preact_1.Component));\nexports[\"default\"] = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.infiniteScrollNextPageAction = exports.configureQuery = void 0;\n/**\n * Search actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n *\n * Configure query\n *\n * @param environmentId\n * @param currentQuery\n * @param itemsPerPage\n * @param highlightsEnabled\n * @param promotedUUIDs\n * @param excludedUUIDs\n * @param fields\n * @param filter\n * @param minScore\n */\nfunction configureQuery(environmentId, currentQuery, itemsPerPage, highlightsEnabled, promotedUUIDs, excludedUUIDs, fields, filter, minScore) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n filter(clonedQuery);\n /**\n * Set result size\n */\n clonedQuery.size = itemsPerPage;\n /**\n * Set specific fields\n */\n clonedQuery.setFields(fields);\n /**\n * Promoted uuids\n */\n for (var i in promotedUUIDs) {\n if (promotedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.promoteUUID(promotedUUIDs[i]);\n }\n }\n /**\n * excluded uuids\n */\n for (var i in excludedUUIDs) {\n if (excludedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.excludeUUID(excludedUUIDs[i]);\n }\n }\n if (minScore > 0) {\n clonedQuery.minScore = minScore;\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.configureQuery = configureQuery;\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param nextPage\n */\nfunction infiniteScrollNextPageAction(environmentId, currentQuery, repository, nextPage) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = nextPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.infiniteScrollNextPageAction = infiniteScrollNextPageAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar ItemUUID_1 = require(\"apisearch/lib/Model/ItemUUID\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar Item_1 = require(\"./Item\");\nvar ResultActions_1 = require(\"./ResultActions\");\nvar Common_1 = require(\"../Common\");\n/**\n * Result Component\n */\nvar ResultComponent = /** @class */ (function (_super) {\n __extends(ResultComponent, _super);\n /**\n * Constructor\n */\n function ResultComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.fromLoadingNextPage = false;\n _this.observer = (0, compat_1.useRef)();\n _this.endResultsBoxRef = (0, compat_1.useCallback)(function (node) {\n if (_this.observer.current instanceof IntersectionObserver) {\n _this.observer.current.disconnect();\n }\n _this.observer.current = new IntersectionObserver(function (entries) {\n if (entries[0].isIntersecting) {\n _this.loadNextPage();\n }\n });\n if ((_this.observer.current instanceof IntersectionObserver) && node) {\n _this.observer.current.observe(node);\n }\n }, []);\n /**\n * @param word\n */\n _this.handleAlternativeClick = function (word) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n _this.state = {\n customResponse: \"\",\n focus: props.fadeInSelector === \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n return _this;\n }\n ResultComponent.prototype.loadNextPage = function () {\n var _a = this.props, environmentId = _a.environmentId, store = _a.store, repository = _a.repository;\n this.fromLoadingNextPage = true;\n this.currentExpectedPage = this.state.page + 1;\n (0, ResultActions_1.infiniteScrollNextPageAction)(environmentId, store.getCurrentQuery(), repository, this.currentExpectedPage);\n };\n /**\n * Hook that change state once mouse clicks inside or outside the container\n */\n ResultComponent.prototype.addMouseDownListeners = function (ref, fadeInSelector) {\n var _this = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event) {\n self.setState(function () {\n return {\n focus: event.target.closest(fadeInSelector) != null\n };\n });\n }\n // Bind the event listener\n document.addEventListener(\"mousedown\", handleClickOutside, { passive: true });\n return function () {\n // Unbind the event listener on clean up\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n ResultComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.store.getCurrentResult() == null) {\n this.setState(function (_) {\n return {\n customResponse: \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n });\n return;\n }\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var items = currentResult.getItems();\n var currentPage = this.page();\n var hasNewPage = (currentResult.getTotalHits() > (currentPage * currentQuery.getSize()));\n var currentItems = this.fromLoadingNextPage\n ? this.state.items.concat(items)\n : items;\n this.fromLoadingNextPage = false;\n this.currentExpectedPage = undefined;\n this.setState(function (_) {\n return {\n customResponse: currentResult.getMetadataValue(\"custom_response\"),\n hasNewPage: hasNewPage,\n items: currentItems,\n page: currentPage\n };\n });\n };\n /**\n * Component will mount\n */\n ResultComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, ResultActions_1.configureQuery)(props.environmentId, props.store.getCurrentQuery(), props.itemsPerPage, props.highlightsEnabled, props.promote.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.exclude.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.fields, props.filter, props.minScore);\n };\n /**\n * @private\n */\n ResultComponent.prototype.page = function () {\n var _a;\n return (_a = this.currentExpectedPage) !== null && _a !== void 0 ? _a : this.props.store.getCurrentQuery().getPage();\n };\n /**\n * Render\n *\n * @return {any}\n */\n ResultComponent.prototype.render = function () {\n var _this = this;\n var _a;\n var that = this;\n var props = this.props;\n var dirty = props.store.isDirty();\n var containerClassName = props.classNames.container;\n var itemsListClassName = props.classNames.itemsList;\n var placeholderClassName = props.classNames.placeholder;\n var itemsListTemplate = props.template.itemsList;\n var placeholderTemplate = (_a = props.template.placeholder) !== null && _a !== void 0 ? _a : \"\";\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var currentVisibleResults = props.currentVisibleResults;\n var subResults = Object.values(currentResult.getSubresults());\n var wrapperRef = (0, compat_1.useRef)(null);\n var customResponse = currentResult.getMetadataValue(\"custom_response\");\n var redirection = currentResult.getMetadataValue(\"redirection\");\n // Check for custom response html\n var customResponseBody;\n if (customResponse) {\n customResponseBody = ((0, preact_1.h)(Template_1[\"default\"], { template: customResponse.content, className: \"as-result__custom_response\", dictionary: this.props.dictionary }));\n if (customResponse.only) {\n return customResponseBody;\n }\n }\n var resetRedirectionOnEnter = true;\n if (redirection) {\n if (redirection.type === \"automatic\") {\n window.top.location.href = redirection.url;\n }\n else if (redirection.type === \"on_enter\") {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: redirection.url\n }, \"*\");\n resetRedirectionOnEnter = false;\n }\n if (this.props.template.redirection) {\n customResponseBody = (0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.redirection, data: {\n url: redirection.url,\n query: currentQuery.getQueryText()\n }, className: \"as-result__redirection\", dictionary: this.props.dictionary }),\n customResponseBody);\n }\n }\n if (resetRedirectionOnEnter) {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: undefined\n }, \"*\");\n }\n var hasInfiniteScrollNextPage = (props.infiniteScroll !== false) &&\n ((props.infiniteScroll === true) ||\n (props.infiniteScroll >= 0)) &&\n this.state.hasNewPage;\n var infiniteScrollMargin = hasInfiniteScrollNextPage\n ? (props.infiniteScroll === true\n ? 0\n : props.infiniteScroll)\n : undefined;\n if (props.fadeInSelector !== \"\") {\n this.addMouseDownListeners(wrapperRef, props.fadeInSelector);\n }\n if (!currentVisibleResults || !this.state.focus) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName) }));\n }\n /**\n * Data accessible to the template\n */\n var items = this.state.items;\n var reducedTemplateData = {\n query: currentQuery.getQueryText(),\n suggestions: currentResult.getSuggestions()\n };\n /**\n * We should add positions to items\n * When the number of items to render is higher than the page size, we are in front of infinite scroll\n */\n var page = this.state.page;\n var isInfiniteActive = page > 1;\n var firstItem = ((this.state.page - 1) * currentQuery.getSize());\n var itemsForEvent = items;\n if (isInfiniteActive) {\n itemsForEvent = Array.prototype.slice.call(items, firstItem);\n }\n Array.prototype.forEach.call(itemsForEvent, function (item) {\n item.position = ++firstItem;\n item.id = item.getId();\n });\n window.postMessage({\n name: \"apisearch_result_items\",\n query: currentQuery.toArray(),\n query_text: currentQuery.getQueryText(),\n with_results: items.length > 0,\n page: this.state.page,\n site: props.store.getSite(),\n device: props.store.getDevice(),\n items: itemsForEvent.map(function (item) {\n return {\n fields: item.fields,\n uuid: item.uuid\n };\n })\n }, \"*\");\n /**\n * Uses defined a custom items list. Old version\n */\n if (props.template.itemsList !== defaultTemplates_1.defaultItemsListTemplate) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef, style: \"position: relative\" },\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : (0, preact_1.h)(Template_1[\"default\"], { template: itemsListTemplate, data: __assign(__assign({}, reducedTemplateData), { items: (items)\n ? items.map(function (item, position) { return _this.hydrateItem(item, position); })\n : [] }), className: \"as-result__itemsList \".concat(itemsListClassName), dictionary: this.props.dictionary }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? (0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } }))\n : (0, preact_1.h)(\"div\", { ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative;\") }))\n : \"\"));\n }\n if (dirty) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: props.dictionary })));\n }\n /**\n * New version\n */\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n customResponseBody,\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : ((items.length > 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-result__itemsList \".concat(props.classNames.itemsList) },\n items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), { query: currentQuery.getQueryText() }), template: props.template.item, className: \"as-result__item \".concat(props.classNames.item), dictionary: props.dictionary });\n }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? \"\"\n : ((0, preact_1.h)(\"div\", { id: \"as-result__infinite_scroll_inspector\", ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative; width: 100%;\") })))\n : \"\"))\n : \"\"),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? ((0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } })))\n : \"\")\n : \"\",\n (subResults.length > 0)\n ? (0, preact_1.h)(\"div\", { className: \"as-result__alternativeList\" }, subResults.map(function (subResult) {\n return (0, preact_1.h)(\"div\", { className: \"as-result__alternative\" },\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_query\" },\n (0, preact_1.h)(\"span\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_title, data: {\n word: subResult.metadata.query_text_html\n }, dictionary: props.dictionary })),\n (0, preact_1.h)(\"a\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_all_results, data: {\n num: subResult.getTotalHits()\n }, dictionary: props.dictionary }))),\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_items\" }, subResult.items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), template: props.template.item, className: \"as-result__alternative_item \".concat(props.classNames.item), dictionary: _this.props.dictionary });\n })));\n }))\n : (((items.length === 0) && customResponseBody === undefined)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: props.template.noResults, data: {\n query: currentQuery.getQueryText()\n }, className: \"as-result__noresults \".concat(props.classNames.noResults), dictionary: props.dictionary })\n : \"\")));\n };\n /**\n * @param item\n * @param position\n * @private\n */\n ResultComponent.prototype.hydrateItem = function (item, position) {\n var props = this.props;\n var environmentId = props.environmentId;\n var config = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_CONFIG, \"__\").concat(environmentId));\n var apisearchUI = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId));\n var apisearchReference = apisearchUI.reference;\n var appId = config.app_id;\n var appUUID = item.getAppUUID();\n if (typeof appUUID === \"object\") {\n appId = appUUID.composedUUID();\n }\n var indexId = config.index_id;\n var indexUUID = item.getIndexUUID();\n if (typeof indexUUID === \"object\") {\n indexId = indexUUID.composedUUID();\n }\n var itemId = item.getUUID().composedUUID();\n var mainFields = {};\n Object.assign(mainFields, item.getMetadata(), item.getIndexedMetadata());\n var fieldsConciliation = {};\n Object.keys(props.fieldsConciliation).map(function (field, index) {\n var _a;\n fieldsConciliation[field] = (_a = mainFields[props.fieldsConciliation[field]]) !== null && _a !== void 0 ? _a : undefined;\n });\n Object.assign(mainFields, fieldsConciliation);\n item.fields = mainFields;\n var queryText = \"\";\n if (this.props.store.getCurrentQuery()) {\n queryText = this.props.store.getCurrentQuery().getQueryText();\n }\n return __assign(__assign({}, props.formatData(item)), {\n key: \"item_\" + itemId,\n uuid_composed: itemId,\n click: apisearchReference + '.click(\"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n add_to_cart: apisearchReference + '.interact(\"add_cart\", \"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n query_text: queryText,\n highlights_enabled: this.props.highlightsEnabled,\n striptags: function () {\n return function (val, render) { return render(val).replace(/(<([^>]+)>)/ig, \"\"); };\n }\n });\n };\n return ResultComponent;\n}(preact_1.Component));\nResultComponent.defaultProps = {\n fields: [],\n itemsPerPage: 10,\n highlightsEnabled: false,\n promote: [],\n exclude: [],\n filter: function (query) { return null; },\n subResult: false,\n classNames: {\n container: \"\",\n itemsList: \"\",\n item: \"\",\n noResults: \"\",\n placeholder: \"\"\n },\n template: {\n itemsList: defaultTemplates_1.defaultItemsListTemplate,\n item: defaultTemplates_1.defaultItemTemplate,\n noResults: defaultTemplates_1.defaultNoResultsItemTemplate,\n placeholder: null,\n alternative_title: defaultTemplates_1.defaultAlternativeTitleTemplate,\n alternative_all_results: defaultTemplates_1.defaultAlternativeAllResultsTemplate,\n next_page_button: defaultTemplates_1.defaultNextPageButtonTemplate,\n redirection: null\n },\n formatData: function (data) { return data; },\n fadeInSelector: \"\",\n fieldsConciliation: {}\n};\nexports[\"default\"] = ResultComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultNextPageButtonTemplate = exports.defaultAlternativeAllResultsTemplate = exports.defaultAlternativeTitleTemplate = exports.defaultNoResultsItemTemplate = exports.defaultItemTemplate = exports.defaultItemsListTemplate = void 0;\nexports.defaultItemsListTemplate = \"\\n
\\n {{#items}}\\n
\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n
\\n {{/items}}\\n
\\n {{^items}}No results{{/items}}\\n\";\nexports.defaultItemTemplate = \"\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n\";\nexports.defaultNoResultsItemTemplate = \"\\n No results\\n\";\nexports.defaultAlternativeTitleTemplate = \"{{{word}}}\";\nexports.defaultAlternativeAllResultsTemplate = \"All results ({{num}})\";\nexports.defaultNextPageButtonTemplate = \"Load page {{page}}\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * Autocomplete Component\n */\nvar AutocompleteComponent = /** @class */ (function (_super) {\n __extends(AutocompleteComponent, _super);\n /**\n * Constructor\n */\n function AutocompleteComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n autocomplete: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n AutocompleteComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.autocomplete !== null) {\n this.setState(function (prevState) {\n return {\n autocomplete: props.autocomplete\n };\n });\n }\n else {\n this.setState(function (prevState) {\n return {\n autocomplete: \"\"\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n AutocompleteComponent.prototype.render = function () {\n var autocomplete = this.state.autocomplete;\n var queryText = this.props.queryText;\n var inputClassName = this.props.inputClassName;\n var queryTextLength = queryText.length;\n var autocompleteText = autocomplete.substring(queryTextLength);\n var formattedAutocompleteText = autocompleteText === \"\"\n ? \"\"\n : queryText + autocompleteText + \" ⤷\";\n return ((0, preact_1.h)(\"input\", { type: \"text\", className: \"as-searchInput__input as-searchInput__autocomplete \".concat(inputClassName), placeholder: formattedAutocompleteText, style: \"position: absolute; top: 0px; left: 0px; background-color: white;\" }));\n };\n return AutocompleteComponent;\n}(preact_1.Component));\nexports[\"default\"] = AutocompleteComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.simpleSearchAction = exports.initialSearchSetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Initial Search\n *\n * @param environmentId\n * @param currentQuery\n * @param autocomplete\n * @param searchableFields\n * @param queryOperator\n */\nfunction initialSearchSetup(environmentId, currentQuery, autocomplete, searchableFields, queryOperator) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = 1;\n clonedQuery.queryOperator = queryOperator;\n if (searchableFields.length > 0) {\n clonedQuery.searchableFields = searchableFields;\n }\n if (autocomplete) {\n clonedQuery.enableAutocomplete();\n }\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSearchSetup = initialSearchSetup;\n/**\n * Search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param queryText\n * @param visibleResults\n */\nfunction simpleSearchAction(environmentId, currentQuery, repository, queryText, visibleResults) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [queryText];\n clonedQuery.page = 1;\n if (!visibleResults) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: null,\n visibleResults: visibleResults\n });\n return;\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result,\n visibleResults: visibleResults\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.simpleSearchAction = simpleSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"./SearchInputActions\");\nvar Template_1 = require(\"../Template\");\nvar AutocompleteComponent_1 = require(\"./AutocompleteComponent\");\nvar compat_1 = require(\"preact/compat\");\n/**\n * SearchInput Component\n */\nvar SearchInputComponent = /** @class */ (function (_super) {\n __extends(SearchInputComponent, _super);\n /**\n * Constructor\n */\n function SearchInputComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.inputRef = (0, compat_1.useRef)(null);\n /**\n * @param search\n */\n _this.handleSearch = function (search) {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var finalSpace = search.charAt(search.length - 1) === \" \" ? \" \" : \"\";\n var targetValueNoSpaces = search.trim() + finalSpace;\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, targetValueNoSpaces === \" \" ? \"\" : targetValueNoSpaces, search.length >= startSearchOn);\n };\n /**\n * Clear search\n */\n _this.clearSearch = function () {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var visibleResults = 0 === startSearchOn;\n (0, SearchInputActions_1.simpleSearchAction)(environmentId, currentQuery, repository, \"\", visibleResults);\n };\n if (props.autocomplete) {\n _this.state = { queryText: \"\" };\n }\n var that = _this;\n window.addEventListener(\"beforeunload\", function () {\n that.dispatchQueryStringEvent(props, 0);\n });\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n SearchInputComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState({\n queryText: props.store.getCurrentQuery().getQueryText()\n });\n };\n /**\n * Key down\n */\n SearchInputComponent.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case \"ArrowRight\":\n case \"Tab\":\n case \"Enter\":\n this.replaceWithAutocomplete(e);\n return;\n }\n switch (e.keyCode) {\n case 39:\n case 9:\n case 13:\n this.replaceWithAutocomplete(e);\n return;\n }\n };\n SearchInputComponent.prototype.replaceWithAutocomplete = function (e) {\n var props = this.props;\n var autocomplete = this.props.store.getCurrentResult().getAutocomplete();\n if (autocomplete !== null && autocomplete !== \"\") {\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, this.props.store.getCurrentResult().getAutocomplete(), true);\n e.preventDefault();\n return;\n }\n };\n /**\n * @param e\n */\n SearchInputComponent.prototype.doNothing = function (e) { };\n /**\n * @param config\n */\n SearchInputComponent.prototype.withConfig = function (config) {\n };\n /**\n * @param props\n * @param timeout\n */\n SearchInputComponent.prototype.dispatchQueryStringEvent = function (props, timeout) {\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n if (this.queryTextEvent) {\n this.lastQueryTextStringDispatched = null;\n clearTimeout(this.queryTextEvent);\n }\n if (this.lastQueryTextStringDispatched === currentQueryText) {\n return;\n }\n this.lastQueryTextStringDispatched = currentQueryText;\n if (currentQueryText !== \"\") {\n var that_1 = this;\n this.lastQueryTextStringDispatched = currentQueryText;\n this.queryTextEvent = setTimeout(function () {\n that_1.queryTextEvent = null;\n window.postMessage({\n name: \"apisearch_search\",\n query_text: currentQueryText,\n query: currentQuery.toArray(),\n site: props.store.getSite(),\n device: props.store.getDevice()\n }, \"*\");\n }, timeout);\n }\n };\n /**\n * Search\n *\n * @return {any}\n */\n SearchInputComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var placeholder = props.placeholder;\n var autofocus = props.autofocus;\n var clearSearch = props.clearSearch;\n var withContainer = props.withContainer;\n var containerClassName = props.classNames.container;\n var inputClassName = props.classNames.input;\n var clearSearchClassName = props.classNames.clearSearch;\n var clearSearchTemplate = props.template.clearSearch;\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n var htmlNodeInheritProps = props.htmlNodeInheritProps;\n var showAutocomplete = currentQuery.areAutocompleteEnabled();\n var autocomplete = props.store.getCurrentResult()\n ? props.store.getCurrentResult().getAutocomplete()\n : null;\n var keyDownCallback = showAutocomplete\n ? function (e) { return _this.handleKeyDown(e); }\n : function (e) { return _this.doNothing(e); };\n var keyDownAction = showAutocomplete\n ? function (e) { return _this.replaceWithAutocomplete(e); }\n : function (e) { return _this.doNothing(e); };\n var style = showAutocomplete\n ? \"position: relative; top: 0px; left: 0px; background-color: transparent; border-color: transparent;\"\n : \"\";\n var autocompletableClass = showAutocomplete\n ? \"autocompletable\"\n : \"\";\n this.dispatchQueryStringEvent(props, 2000);\n var searchInput = ((0, preact_1.h)(\"input\", __assign({ type: \"text\", className: \"as-searchInput__input \".concat(inputClassName, \" \").concat(autocompletableClass), placeholder: placeholder, autofocus: autofocus }, htmlNodeInheritProps, { onInput: function (event) { return _this.handleSearch(event.target.value); }, value: currentQueryText, style: style, onKeyDown: keyDownCallback, onTouchStart: keyDownAction, ref: this.inputRef })));\n if (showAutocomplete) {\n searchInput = ((0, preact_1.h)(\"div\", { style: \"position: relative\" },\n (0, preact_1.h)(AutocompleteComponent_1[\"default\"], { autocomplete: autocomplete, queryText: currentQueryText, inputClassName: inputClassName }),\n searchInput));\n }\n if (withContainer) {\n searchInput = ((0, preact_1.h)(\"div\", { className: \"as-searchInput \".concat(containerClassName) },\n searchInput,\n (clearSearch && currentQueryText && currentQueryText.length !== 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-searchInput__clearSearch \".concat(clearSearchClassName), onClick: this.clearSearch },\n (0, preact_1.h)(Template_1[\"default\"], { template: clearSearchTemplate, dictionary: props.dictionary }))) : null));\n }\n return searchInput;\n };\n return SearchInputComponent;\n}(preact_1.Component));\nSearchInputComponent.defaultProps = {\n placeholder: \"\",\n autofocus: false,\n autocomplete: false,\n startSearchOn: 0,\n clearSearch: true,\n withContainer: true,\n searchableFields: [],\n speechRecognition: false,\n classNames: {\n container: \"\",\n input: \"\",\n clearSearch: \"\"\n },\n template: {\n clearSearch: \"x\",\n speechRecognition: \"{S}\"\n }\n};\nexports[\"default\"] = SearchInputComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * SnapshotComponent\n */\nvar SnapshotComponent = /** @class */ (function (_super) {\n __extends(SnapshotComponent, _super);\n function SnapshotComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n SnapshotComponent.prototype.componentWillReceiveProps = function (props) {\n var query = props.store.getCurrentQuery();\n this.setState(function (prevState) {\n return { query: query };\n });\n };\n /**\n * Render\n *\n * @return {}\n */\n SnapshotComponent.prototype.render = function () {\n var queryAsJson = this.state.query == undefined\n ? ''\n : JSON.stringify(this.state.query.toArray());\n return ((0, preact_1.h)(\"div\", null, queryAsJson));\n };\n return SnapshotComponent;\n}(preact_1.Component));\nexports[\"default\"] = SnapshotComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.initialSortBySetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nvar SortByHelper_1 = require(\"./SortByHelper\");\n/**\n * Initial sortBy\n *\n * @param environmentId\n * @param currentQuery\n * @param initialOption\n */\nfunction initialSortBySetup(environmentId, currentQuery, initialOption) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, initialOption);\n clonedQuery.page = 1;\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSortBySetup = initialSortBySetup;\n/**\n * ON change search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedOption\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, selectedOption) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, selectedOption);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SortByActions_1 = require(\"./SortByActions\");\n/**\n * SortBy Filter Component\n */\nvar SortByComponent = /** @class */ (function (_super) {\n __extends(SortByComponent, _super);\n function SortByComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle change\n *\n * @param e\n */\n _this.handleChange = function (e) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var currentOption = e.target.value;\n _this.setState({\n value: currentOption\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.onChangeSearchAction)(environmentId, currentQuery, repository, currentOption);\n };\n return _this;\n }\n /**\n * Components will mount\n */\n SortByComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var options = props.options;\n var currentQuery = props.store.getCurrentQuery();\n var currentOption = options[0].value;\n this.setState({\n value: currentOption,\n visible: false\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.initialSortBySetup)(environmentId, currentQuery, currentOption);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SortByComponent.prototype.componentWillReceiveProps = function (props) {\n var nextFirstSortAsString = props.store.getCurrentQuery().getSortBy().getFirstSortAsString();\n var nextVisible = (props.store.getCurrentResult() != null)\n ? (props.store.getCurrentResult().getTotalHits() > 0)\n : false;\n if (this.state.value !== nextFirstSortAsString ||\n this.state.visible !== nextVisible) {\n this.setState(function (prevState) {\n return {\n value: nextFirstSortAsString,\n visible: nextVisible\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n SortByComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var selectClassName = props.classNames.select;\n if (!state.visible) {\n return;\n }\n var options = props.options;\n var coordinate = props.store.getCurrentQuery().toArray().coordinate;\n if (!coordinate) {\n options = options.filter(function (o) {\n return o.value !== \"distance\";\n });\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-sortBy \".concat(containerClassName) },\n (0, preact_1.h)(\"select\", { className: \"as-sortBy__selector \".concat(selectClassName), onChange: this.handleChange, value: state.value }, options.map(function (option) { return ((0, preact_1.h)(\"option\", { value: option.value }, option.name)); }))));\n };\n return SortByComponent;\n}(preact_1.Component));\nSortByComponent.defaultProps = {\n classNames: {\n container: \"\",\n select: \"\"\n }\n};\nexports[\"default\"] = SortByComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.applySortByToQuery = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\n/**\n * Apply sort by to query\n *\n * @param query Query\n * @param selectedOption string\n */\nfunction applySortByToQuery(query, selectedOption) {\n var sortByData = splitQueryValue(selectedOption);\n var sortBy = apisearch_1[\"default\"].createEmptySortBy();\n if (sortByData.field === \"distance\") {\n sortBy.byValue({\n type: apisearch_1.SORT_BY_TYPE_DISTANCE,\n unit: sortByData.sort\n ? sortByData.sort\n : \"km\"\n });\n }\n else if (sortByData.field === \"score\") {\n sortBy.byValue(apisearch_1.SORT_BY_SCORE);\n }\n else {\n sortBy.byFieldValue(sortByData.field, sortByData.sort);\n }\n query.sortBy(sortBy);\n return query;\n}\nexports.applySortByToQuery = applySortByToQuery;\n/**\n * Split sort by string representation\n *\n * @param string\n *\n * @return {{field: string, sort: string}}\n */\nfunction splitQueryValue(string) {\n var queryValue = string.split(\":\");\n return {\n field: queryValue[0],\n sort: queryValue[1]\n };\n}\n","\"use strict\";\nexports.__esModule = true;\nexports.enableSuggestions = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param numberOfSuggestions\n */\nfunction enableSuggestions(environmentId, currentQuery, numberOfSuggestions) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (numberOfSuggestions > 0) {\n clonedQuery.setNumberOfSuggestions(numberOfSuggestions);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.enableSuggestions = enableSuggestions;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Common_1 = require(\"../Common\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar SuggestionsFilterActions_1 = require(\"./SuggestionsFilterActions\");\nvar Template_1 = require(\"../Template\");\n/**\n * Suggestion Filter Component\n */\nvar SuggestionsFilterComponent = /** @class */ (function (_super) {\n __extends(SuggestionsFilterComponent, _super);\n function SuggestionsFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param word\n */\n _this.handleClick = function (word) {\n var props = _this.props;\n if (typeof word === \"string\") {\n word = word\n .replace(//g, \"\")\n .replace(/<\\/em>/g, \"\");\n }\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n return _this;\n }\n SuggestionsFilterComponent.prototype.componentDidMount = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.highlight = function () {\n var queryText = this.props.store.getCurrentQuery().getQueryText();\n if (queryText !== \"\") {\n var list = document.getElementsByClassName(\"as-suggestions\");\n for (var i = 0; i < list.length; i++) {\n (0, Highlight_1.highlightElement)(list[i], queryText);\n }\n }\n };\n /**\n * Component will mount\n */\n SuggestionsFilterComponent.prototype.componentWillMount = function () {\n this.setState(function (prevState) {\n return {\n words: []\n };\n });\n var props = this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, SuggestionsFilterActions_1.enableSuggestions)(environmentId, currentQuery, props.numberOfSuggestions);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SuggestionsFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n words: props\n .store\n .getCurrentResult()\n .getSuggestions()\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n SuggestionsFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var noSuggestionsClassName = state.words.length > 0\n ? \"\"\n : \"suggestions-empty\";\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions \".concat(containerClassName, \" \").concat(noSuggestionsClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-suggestions__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-suggestions__itemsList \".concat(itemsListClassName) }, state.words.map(function (word) {\n var templateData = {\n word: word\n };\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions__item \".concat(itemClassName), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(word);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: _this.props.dictionary })));\n }))));\n };\n return SuggestionsFilterComponent;\n}(preact_1.Component));\nSuggestionsFilterComponent.defaultProps = {\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = SuggestionsFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n {{word}}\\n\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Mustache = require(\"mustache\");\nvar Translate_1 = require(\"./Translate\");\n/**\n * Template\n */\nvar Template = /** @class */ (function (_super) {\n __extends(Template, _super);\n function Template() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Render template\n *\n * @param template\n * @param result\n * @param dictionary\n *\n * @return {any}\n */\n _this.renderTemplate = function (template, result, dictionary) {\n var trans = function () {\n return function (text, render) {\n return render(Translate_1[\"default\"].trans(text, dictionary));\n };\n };\n var output = Mustache.render(template, __assign(__assign({}, result), {\n \"trans\": trans\n }));\n return {\n __html: output\n };\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {any}\n */\n Template.prototype.render = function () {\n var _a, _b;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var className = props.className;\n var id = (_a = props.id) !== null && _a !== void 0 ? _a : \"\";\n var dictionary = (_b = props.dictionary) !== null && _b !== void 0 ? _b : {};\n return (template)\n ? (0, preact_1.h)(\"div\", { id: id, className: className, dangerouslySetInnerHTML: this.renderTemplate(template, data, dictionary) })\n : null;\n };\n return Template;\n}(preact_1.Component));\nexports[\"default\"] = Template;\n","\"use strict\";\nexports.__esModule = true;\nvar Translate = /** @class */ (function () {\n function Translate() {\n }\n Translate.trans = function (text, dictionary) {\n var _a, _b, _c;\n var parsed = [];\n try {\n parsed = JSON.parse(text);\n }\n catch (_d) {\n return (_a = dictionary[text]) !== null && _a !== void 0 ? _a : text;\n }\n var parsedText = (_b = parsed[0]) !== null && _b !== void 0 ? _b : text;\n parsedText = (_c = dictionary[parsedText]) !== null && _c !== void 0 ? _c : parsedText;\n for (var i = 1; i <= parsed.length; i++) {\n parsedText = parsedText.replace(\"$\" + i, parsed[i]);\n }\n return parsedText;\n };\n return Translate;\n}());\nexports[\"default\"] = Translate;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar BannerComponent_1 = require(\"../components/Banner/BannerComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Banner\n */\nvar Banner = /** @class */ (function (_super) {\n __extends(Banner, _super);\n /**\n * @param target\n * @param breakingPointSize\n * @param position\n * @param imagePrefix\n */\n function Banner(_a) {\n var target = _a.target, breakingPointSize = _a.breakingPointSize, position = _a.position, imagePrefix = _a.imagePrefix;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(BannerComponent_1[\"default\"], { target: target, breakingPointSize: breakingPointSize, position: position, imagePrefix: imagePrefix });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Banner.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return Banner;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Banner(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar CheckboxFilterComponent_1 = require(\"../components/CheckboxFilter/CheckboxFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * CheckboxFilter\n */\nvar CheckboxFilter = /** @class */ (function (_super) {\n __extends(CheckboxFilter, _super);\n function CheckboxFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, label = _a.label, filterValue = _a.filterValue, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(CheckboxFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, label: label, filterValue: filterValue, classNames: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n CheckboxFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n CheckboxFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n CheckboxFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n CheckboxFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return CheckboxFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new CheckboxFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ClearFiltersComponent_1 = require(\"../components/ClearFilters/ClearFiltersComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Clear Filters\n */\nvar ClearFilters = /** @class */ (function (_super) {\n __extends(ClearFilters, _super);\n /**\n * @param target\n * @param classNames\n * @param template\n * @param showIndividualFilterClear\n * @param showGlobalFilterClear\n * @param showIndividualFilterValueClear\n */\n function ClearFilters(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, showIndividualFilterClear = _a.showIndividualFilterClear, showGlobalFilterClear = _a.showGlobalFilterClear, showIndividualFilterValueClear = _a.showIndividualFilterValueClear;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ClearFiltersComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.classNames), classNames), showIndividualFilterClear: showIndividualFilterClear, showGlobalFilterClear: showGlobalFilterClear, showIndividualFilterValueClear: showIndividualFilterValueClear, template: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n ClearFilters.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return ClearFilters;\n}(Widget_1[\"default\"]));\n/**\n * Clear filters widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new ClearFilters(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar InformationComponent_1 = require(\"../components/Information/InformationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Information\n */\nvar Information = /** @class */ (function (_super) {\n __extends(Information, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n * @param formatData\n */\n function Information(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, formatData = _a.formatData;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(InformationComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.template), template), formatData: formatData });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Information.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Information;\n}(Widget_1[\"default\"]));\n/**\n * Information widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Information(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../components/MultipleFilter/Helpers\");\nvar MultipleFilterActions_1 = require(\"../components/MultipleFilter/MultipleFilterActions\");\nvar MultipleFilterComponent_1 = require(\"../components/MultipleFilter/MultipleFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Multiple Filter\n */\nvar MultipleFilter = /** @class */ (function (_super) {\n __extends(MultipleFilter, _super);\n /**\n * @param target\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param fetchLimit\n * @param viewLimit\n * @param sortBy\n * @param ranges\n * @param labels\n * @param classNames\n * @param template\n * @param formatData\n * @param activeFirst\n * @param promoted\n */\n function MultipleFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, aggregationField = _a.aggregationField, applicationType = _a.applicationType, fetchLimit = _a.fetchLimit, viewLimit = _a.viewLimit, sortBy = _a.sortBy, ranges = _a.ranges, labels = _a.labels, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, activeFirst = _a.activeFirst, promoted = _a.promoted;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.filterField = filterField;\n _this.aggregationField = aggregationField !== null && aggregationField !== void 0 ? aggregationField : filterField;\n _this.component = (0, preact_1.h)(MultipleFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: _this.filterField, aggregationField: _this.aggregationField, applicationType: applicationType, fetchLimit: fetchLimit, viewLimit: viewLimit, sortBy: sortBy, ranges: ranges, labels: labels, classNames: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, activeFirst: activeFirst, promoted: promoted });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n MultipleFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n MultipleFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filter = query.filters[filterName];\n var filterValues = filter.values;\n if (filterValues.length > 0) {\n if (filter.application_type === 6) {\n var levelsValues = (0, Helpers_1.getShadowFilterValuesFromQuery)(query, filterName, false);\n object[filterField] = {\n l: levelsValues,\n v: filter.values\n };\n }\n else {\n object[filterField] = filterValues;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n MultipleFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n var rangesValues = Object.keys(this.component.props.ranges);\n var filterType = (rangesValues.length > 0) ? \"range\" : \"field\";\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n (Array.isArray(fieldValues) && (fieldValues.length > 0) ||\n (typeof fieldValues === \"object\") && (Object.keys(fieldValues).length > 0))) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n var applicationType = this.component.props.applicationType;\n var fieldName = \"indexed_metadata.\" + this.component.props.filterField;\n if (applicationType === 6) {\n var originalFieldValues = fieldValues;\n fieldValues = originalFieldValues.v;\n var leveledValues = originalFieldValues.l;\n for (var it_1 = 0; it_1 < leveledValues.length; it_1++) {\n var level = it_1 + 1;\n var fieldNameWithoutPrefix = fieldName.substr(17);\n var leveledFilterName = fieldNameWithoutPrefix + \"_level_\" + level;\n var leveledFieldName = \"indexed_metadata.\" + leveledFilterName;\n query.filters[leveledFilterName] = {\n application_type: applicationType,\n field: leveledFieldName,\n filter_type: apisearch_1.FILTER_TYPE_FIELD,\n values: [leveledValues[it_1]]\n };\n }\n fieldName = fieldName + \"_level_\" + (leveledValues.length + 1);\n }\n query.filters[filterName] = {\n application_type: applicationType,\n field: fieldName,\n filter_type: filterType,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n MultipleFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n /**\n * @param environmentId\n * @param query\n */\n MultipleFilter.prototype.normalizeQuery = function (environmentId, query) {\n var filterName = this.component.props.filterName;\n if ((0, Helpers_1.isFilterAvailable)(query, filterName, 6)) {\n (0, MultipleFilterActions_1.modifyQueryAggregationWithProperLevelValue)(environmentId, query, filterName, this.filterField, this.aggregationField);\n }\n };\n return MultipleFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new MultipleFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PaginationComponent_1 = require(\"../components/Pagination/PaginationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Pagination\n */\nvar Pagination = /** @class */ (function (_super) {\n __extends(Pagination, _super);\n /**\n * Constructor\n *\n * @param target\n * @param padding\n * @param goFirstLast\n * @param classNames\n * @param template\n */\n function Pagination(_a) {\n var target = _a.target, padding = _a.padding, goFirstLast = _a.goFirstLast, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PaginationComponent_1[\"default\"], { target: target, padding: padding, goFirstLast: goFirstLast, classNames: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Pagination.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n /**\n * @param query\n */\n Pagination.prototype.reset = function (query) {\n delete query.page;\n };\n return Pagination;\n}(Widget_1[\"default\"]));\n/**\n * Pagination widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Pagination(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PriorityFilterComponent_1 = require(\"../components/PriorityFilter/PriorityFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * PriorityFilter\n */\nvar PriorityFilter = /** @class */ (function (_super) {\n __extends(PriorityFilter, _super);\n /**\n *\n * @param target\n * @param filters\n * @param template\n */\n function PriorityFilter(_a) {\n var target = _a.target, filters = _a.filters, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PriorityFilterComponent_1[\"default\"], { target: target, filters: filters, template: __assign(__assign({}, PriorityFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n PriorityFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return PriorityFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new PriorityFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar RangeFilterComponent_1 = require(\"../components/RangeFilter/RangeFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * RangeFilter\n */\nvar RangeFilter = /** @class */ (function (_super) {\n __extends(RangeFilter, _super);\n function RangeFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, minValue = _a.minValue, maxValue = _a.maxValue, minMaxCallback = _a.minMaxCallback, step = _a.step, callback = _a.callback, onSliderMove = _a.onSliderMove, template = _a.template, classNames = _a.classNames, attributes = _a.attributes, native = _a.native;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(RangeFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, minValue: minValue, maxValue: maxValue, minMaxCallback: minMaxCallback, step: step, callback: callback, onSliderMove: onSliderMove, native: native, template: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.template), template), classNames: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.classNames), classNames), attributes: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.attributes), attributes) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n RangeFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n RangeFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n if (query.filters !== undefined && query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n RangeFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues,\n filter_type: \"range\"\n };\n }\n };\n /**\n * @param query\n */\n RangeFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return RangeFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new RangeFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ReloadComponent_1 = require(\"../components/Reload/ReloadComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Reload\n */\nvar Reload = /** @class */ (function (_super) {\n __extends(Reload, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Reload(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ReloadComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ReloadComponent_1[\"default\"].defaultProps.classNames), classNames), template: template });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Reload.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Reload;\n}(Widget_1[\"default\"]));\n/**\n * Reload filter\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Reload(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ResultComponent_1 = require(\"../components/Result/ResultComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Result\n */\nvar Result = /** @class */ (function (_super) {\n __extends(Result, _super);\n /**\n * Constructor\n *\n * @param target\n * @param fields\n * @param itemsPerPage\n * @param promote\n * @param exclude\n * @param filter\n * @param highlightsEnabled\n * @param classNames\n * @param template\n * @param formatData\n * @param fadeInSelector\n * @param infiniteScroll\n * @param infiniteScrollButton\n * @param fieldsConciliation\n * @param minScore\n */\n function Result(_a) {\n var target = _a.target, fields = _a.fields, itemsPerPage = _a.itemsPerPage, promote = _a.promote, exclude = _a.exclude, filter = _a.filter, highlightsEnabled = _a.highlightsEnabled, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, fadeInSelector = _a.fadeInSelector, infiniteScroll = _a.infiniteScroll, infiniteScrollButton = _a.infiniteScrollButton, fieldsConciliation = _a.fieldsConciliation, minScore = _a.minScore;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(ResultComponent_1[\"default\"], { target: target, fields: fields, itemsPerPage: itemsPerPage, promote: promote, exclude: exclude, filter: filter, highlightsEnabled: highlightsEnabled, classNames: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, fadeInSelector: fadeInSelector, infiniteScroll: infiniteScroll, infiniteScrollButton: infiniteScrollButton, fieldsConciliation: fieldsConciliation, minScore: minScore });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Result.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, currentVisibleResults: store.resultsAreVisible(), dictionary: dictionary });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n */\n Result.prototype.reset = function (query) {\n delete query.page;\n this.component.state = {\n page: 1\n };\n };\n return Result;\n}(Widget_1[\"default\"]));\n/**\n * Result widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Result(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"../components/SearchInput/SearchInputActions\");\nvar SearchInputComponent_1 = require(\"../components/SearchInput/SearchInputComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SearchInput\n */\nvar SearchInput = /** @class */ (function (_super) {\n __extends(SearchInput, _super);\n /**\n * Constructor\n *\n * @param target\n * @param placeholder\n * @param startSearchOn\n * @param clearSearch\n * @param withContainer\n * @param autofocus\n * @param autocomplete\n * @param classNames\n * @param template\n * @param searchableFields\n * @param speechRecognition\n * @param queryOperator\n */\n function SearchInput(_a) {\n var target = _a.target, placeholder = _a.placeholder, startSearchOn = _a.startSearchOn, clearSearch = _a.clearSearch, withContainer = _a.withContainer, autofocus = _a.autofocus, autocomplete = _a.autocomplete, classNames = _a.classNames, template = _a.template, searchableFields = _a.searchableFields, speechRecognition = _a.speechRecognition, queryOperator = _a.queryOperator;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SearchInputComponent_1[\"default\"], { target: target, placeholder: placeholder, autofocus: autofocus, autocomplete: autocomplete, startSearchOn: startSearchOn, clearSearch: clearSearch, withContainer: withContainer, searchableFields: searchableFields, speechRecognition: speechRecognition, classNames: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.template), template), queryOperator: queryOperator, config: _this.config });\n _this.queryOperator = queryOperator;\n _this.autocomplete = autocomplete;\n _this.searchableFields = searchableFields;\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SearchInput.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, htmlNodeInheritProps: {\n autocomplete: \"off\",\n spellcheck: false\n }, dictionary: dictionary });\n if (this.target === null) {\n return;\n }\n if (!this.targetNode) {\n var targetNode = document.querySelector(this.target);\n var isInput = isInputElement(targetNode);\n if (isInput) {\n this.component.props = __assign(__assign({}, this.component.props), { withContainer: false, htmlNodeInheritProps: __assign(__assign({}, this.component.props.htmlNodeInheritedProps), getNodeAttributes(targetNode)) });\n var parentNode = targetNode.parentNode;\n targetNode.remove();\n this.targetNode = parentNode;\n }\n else {\n this.targetNode = targetNode;\n }\n }\n if (this.isSecondRender === undefined) {\n this.isSecondRender = true;\n }\n else if (this.isSecondRender === true) {\n this.isSecondRender = false;\n }\n if (!this.targetNode) {\n return;\n }\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n * @param object\n */\n SearchInput.prototype.toUrlObject = function (query, object) {\n var q = query.q;\n if (q !== undefined &&\n q !== \"\") {\n object.q = q;\n }\n };\n /**\n * @param object\n * @param query\n */\n SearchInput.prototype.fromUrlObject = function (object, query) {\n var q = object.q;\n if (q !== undefined &&\n q !== \"\") {\n query.q = q;\n }\n };\n /**\n * @param query\n */\n SearchInput.prototype.reset = function (query) {\n delete query.q;\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n SearchInput.prototype.initialSetup = function (environmentId, store, repository) {\n /**\n * Dispatch action\n */\n (0, SearchInputActions_1.initialSearchSetup)(environmentId, store.getCurrentQuery(), this.autocomplete, this.searchableFields, this.queryOperator);\n };\n return SearchInput;\n}(Widget_1[\"default\"]));\n/**\n * Returns an object of an\n * html node attributes.\n *\n * @param htmlNode\n * @returns {{}}\n */\nvar getNodeAttributes = function (htmlNode) {\n var _a;\n var nodeAttributes = {};\n for (var i = 0; i < htmlNode.attributes.length; i++) {\n var attr = htmlNode.attributes[i];\n if (attr.specified) {\n nodeAttributes = __assign(__assign({}, nodeAttributes), (_a = {}, _a[attr.name] = attr.value, _a));\n }\n }\n return nodeAttributes;\n};\n/**\n * Checks if an html node\n * is an input.\n *\n * @param targetNode\n * @returns {boolean}\n */\nvar isInputElement = function (targetNode) {\n return targetNode instanceof HTMLInputElement;\n};\n/**\n * Search Input widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SearchInput(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SnapshotComponent_1 = require(\"../components/Snapshot/SnapshotComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Snapshot\n */\nvar Snapshot = /** @class */ (function (_super) {\n __extends(Snapshot, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Snapshot(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SnapshotComponent_1[\"default\"], { target: target });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Snapshot.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Snapshot;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Snapshot(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar SortByComponent_1 = require(\"../components/SortBy/SortByComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SortBy\n */\nvar SortBy = /** @class */ (function (_super) {\n __extends(SortBy, _super);\n function SortBy(_a) {\n var target = _a.target, classNames = _a.classNames, options = _a.options;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(SortByComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, SortByComponent_1[\"default\"].defaultProps.classNames), classNames), options: options });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SortBy.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @private\n */\n SortBy.prototype.firstOptionAsString = function () {\n return this.component.props.options[0].value;\n };\n /**\n * @param query\n * @param object\n */\n SortBy.prototype.toUrlObject = function (query, object) {\n if (query.sort !== undefined) {\n var sort = query.sort[0];\n var sortInstance = apisearch_1.SortBy.createFromArray(query.sort);\n var sortAsString = sortInstance.getFirstSortAsString();\n var firstSortAsString = this.firstOptionAsString();\n if (sortAsString !== firstSortAsString) {\n if (sort.type === \"distance\") {\n object.sort = \"distance:\" + sort.unit + \":\" + sort.coordinate.lat + \":\" + sort.coordinate.lon;\n }\n else {\n object.sort = sort.field.substr(17) + \":\" + sort.order;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n SortBy.prototype.fromUrlObject = function (object, query) {\n if (object.sort !== undefined) {\n SortBy.setSortToQuery(query, object.sort);\n }\n };\n /**\n * @param query\n */\n SortBy.prototype.reset = function (query) {\n delete query.sort;\n var firstSortAsString = this.firstOptionAsString();\n SortBy.setSortToQuery(query, firstSortAsString);\n };\n /**\n * @param query\n * @param option\n * @private\n */\n SortBy.setSortToQuery = function (query, option) {\n if (option === \"score\") {\n return;\n }\n query.sort = [{}];\n if (option.indexOf(\"distance:\") === 0) {\n var distanceSortParts = option.split(\":\");\n query.sort[0].type = distanceSortParts[0];\n query.sort[0].unit = distanceSortParts[1];\n query.sort[0].coordinate = {\n lat: distanceSortParts[2],\n lon: distanceSortParts[3]\n };\n return;\n }\n var sortParts = option.split(\":\");\n query.sort[0].type = \"field\";\n query.sort[0].field = \"indexed_metadata.\" + sortParts[0];\n query.sort[0].order = sortParts[1];\n };\n return SortBy;\n}(Widget_1[\"default\"]));\n/**\n * SortBy widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SortBy(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SuggestionsFilterComponent_1 = require(\"../components/Suggestions/SuggestionsFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SuggestionsFilter\n */\nvar SuggestionsFilter = /** @class */ (function (_super) {\n __extends(SuggestionsFilter, _super);\n function SuggestionsFilter(_a) {\n var target = _a.target, numberOfSuggestions = _a.numberOfSuggestions, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SuggestionsFilterComponent_1[\"default\"], { target: target, numberOfSuggestions: numberOfSuggestions, classNames: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SuggestionsFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return SuggestionsFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SuggestionsFilter(settings); });\n","\"use strict\";\nexports.__esModule = true;\n/**\n * Widget\n */\nvar Widget = /** @class */ (function () {\n function Widget() {\n }\n Widget.prototype.withConfig = function (config) {\n if (\"withConfig\" in this.component) {\n this.component.withConfig(config);\n }\n };\n /**\n * @param query\n * @param object\n */\n Widget.prototype.toUrlObject = function (query, object) {\n };\n /**\n * @param object\n * @param query\n */\n Widget.prototype.fromUrlObject = function (object, query) {\n };\n /**\n * @param query\n */\n Widget.prototype.reset = function (query) {\n };\n /**\n * @param environmentId\n * @param query\n */\n Widget.prototype.normalizeQuery = function (environmentId, query) {\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n Widget.prototype.initialSetup = function (environmentId, store, repository) {\n };\n return Widget;\n}());\nexports[\"default\"] = Widget;\n","\"use strict\";\nexports.__esModule = true;\nvar CheckboxFilter_1 = require(\"./CheckboxFilter\");\nvar ClearFilters_1 = require(\"./ClearFilters\");\nvar Information_1 = require(\"./Information\");\nvar MultipleFilter_1 = require(\"./MultipleFilter\");\nvar Pagination_1 = require(\"./Pagination\");\nvar RangeFilter_1 = require(\"./RangeFilter\");\nvar Reload_1 = require(\"./Reload\");\nvar Result_1 = require(\"./Result\");\nvar SearchInput_1 = require(\"./SearchInput\");\nvar Snapshot_1 = require(\"./Snapshot\");\nvar SortBy_1 = require(\"./SortBy\");\nvar Suggestions_1 = require(\"./Suggestions\");\nvar Banner_1 = require(\"./Banner\");\nvar PriorityFilter_1 = require(\"./PriorityFilter\");\n/**\n * Widget factories\n */\nexports[\"default\"] = {\n searchInput: SearchInput_1[\"default\"],\n clearFilters: ClearFilters_1[\"default\"],\n multipleFilter: MultipleFilter_1[\"default\"],\n sortBy: SortBy_1[\"default\"],\n information: Information_1[\"default\"],\n result: Result_1[\"default\"],\n pagination: Pagination_1[\"default\"],\n checkboxFilter: CheckboxFilter_1[\"default\"],\n rangeFilter: RangeFilter_1[\"default\"],\n reload: Reload_1[\"default\"],\n snapshot: Snapshot_1[\"default\"],\n suggestions: Suggestions_1[\"default\"],\n banner: Banner_1[\"default\"],\n priorityFilter: PriorityFilter_1[\"default\"]\n};\n","export { Md5 } from './md5';\nexport { Md5FileHasher } from './md5_file_hasher';\nexport { ParallelHasher } from './parallel_hasher';\n//# sourceMappingURL=index.js.map","/*\n\nTypeScript Md5\n==============\n\nBased on work by\n* Joseph Myers: http://www.myersdaily.org/joseph/javascript/md5-text.html\n* André Cruz: https://github.com/satazor/SparkMD5\n* Raymond Hill: https://github.com/gorhill/yamd5.js\n\nEffectively a TypeScrypt re-write of Raymond Hill JS Library\n\nThe MIT License (MIT)\n\nCopyright (C) 2014 Raymond Hill\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n Version 2, December 2004\n\n Copyright (C) 2015 André Cruz \n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT YOU WANT TO.\n\n\n*/\n;\nexport class Md5 {\n constructor() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state = new Int32Array(4);\n this._buffer = new ArrayBuffer(68);\n this._buffer8 = new Uint8Array(this._buffer, 0, 68);\n this._buffer32 = new Uint32Array(this._buffer, 0, 17);\n this.start();\n }\n static hashStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendStr(str)\n .end(raw);\n }\n static hashAsciiStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendAsciiStr(str)\n .end(raw);\n }\n static _hex(x) {\n const hc = Md5.hexChars;\n const ho = Md5.hexOut;\n let n;\n let offset;\n let j;\n let i;\n for (i = 0; i < 4; i += 1) {\n offset = i * 8;\n n = x[i];\n for (j = 0; j < 8; j += 2) {\n ho[offset + 1 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n ho[offset + 0 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n }\n }\n return ho.join('');\n }\n static _md5cycle(x, k) {\n let a = x[0];\n let b = x[1];\n let c = x[2];\n let d = x[3];\n // ff()\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n // gg()\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n // hh()\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n // ii()\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n /**\n * Initialise buffer to be hashed\n */\n start() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state.set(Md5.stateIdentity);\n return this;\n }\n // Char to code point to to array conversion:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\n // #Example.3A_Fixing_charCodeAt_to_handle_non-Basic-Multilingual-Plane_characters_if_their_presence_earlier_in_the_string_is_unknown\n /**\n * Append a UTF-8 string to the hash buffer\n * @param str String to append\n */\n appendStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let code;\n let i;\n for (i = 0; i < str.length; i += 1) {\n code = str.charCodeAt(i);\n if (code < 128) {\n buf8[bufLen++] = code;\n }\n else if (code < 0x800) {\n buf8[bufLen++] = (code >>> 6) + 0xC0;\n buf8[bufLen++] = code & 0x3F | 0x80;\n }\n else if (code < 0xD800 || code > 0xDBFF) {\n buf8[bufLen++] = (code >>> 12) + 0xE0;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n else {\n code = ((code - 0xD800) * 0x400) + (str.charCodeAt(++i) - 0xDC00) + 0x10000;\n if (code > 0x10FFFF) {\n throw new Error('Unicode standard supports code points up to U+10FFFF');\n }\n buf8[bufLen++] = (code >>> 18) + 0xF0;\n buf8[bufLen++] = (code >>> 12 & 0x3F) | 0x80;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n if (bufLen >= 64) {\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen -= 64;\n buf32[0] = buf32[16];\n }\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append an ASCII string to the hash buffer\n * @param str String to append\n */\n appendAsciiStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(str.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = str.charCodeAt(j++);\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append a byte array to the hash buffer\n * @param input array to append\n */\n appendByteArray(input) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(input.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = input[j++];\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Get the state of the hash buffer\n */\n getState() {\n const s = this._state;\n return {\n buffer: String.fromCharCode.apply(null, Array.from(this._buffer8)),\n buflen: this._bufferLength,\n length: this._dataLength,\n state: [s[0], s[1], s[2], s[3]]\n };\n }\n /**\n * Override the current state of the hash buffer\n * @param state New hash buffer state\n */\n setState(state) {\n const buf = state.buffer;\n const x = state.state;\n const s = this._state;\n let i;\n this._dataLength = state.length;\n this._bufferLength = state.buflen;\n s[0] = x[0];\n s[1] = x[1];\n s[2] = x[2];\n s[3] = x[3];\n for (i = 0; i < buf.length; i += 1) {\n this._buffer8[i] = buf.charCodeAt(i);\n }\n }\n /**\n * Hash the current state of the hash buffer and return the result\n * @param raw Whether to return the value as an `Int32Array`\n */\n end(raw = false) {\n const bufLen = this._bufferLength;\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n const i = (bufLen >> 2) + 1;\n this._dataLength += bufLen;\n const dataBitsLen = this._dataLength * 8;\n buf8[bufLen] = 0x80;\n buf8[bufLen + 1] = buf8[bufLen + 2] = buf8[bufLen + 3] = 0;\n buf32.set(Md5.buffer32Identity.subarray(i), i);\n if (bufLen > 55) {\n Md5._md5cycle(this._state, buf32);\n buf32.set(Md5.buffer32Identity);\n }\n // Do the final computation based on the tail and length\n // Beware that the final length may not fit in 32 bits so we take care of that\n if (dataBitsLen <= 0xFFFFFFFF) {\n buf32[14] = dataBitsLen;\n }\n else {\n const matches = dataBitsLen.toString(16).match(/(.*?)(.{0,8})$/);\n if (matches === null) {\n return;\n }\n const lo = parseInt(matches[2], 16);\n const hi = parseInt(matches[1], 16) || 0;\n buf32[14] = lo;\n buf32[15] = hi;\n }\n Md5._md5cycle(this._state, buf32);\n return raw ? this._state : Md5._hex(this._state);\n }\n}\n// Private Static Variables\nMd5.stateIdentity = new Int32Array([1732584193, -271733879, -1732584194, 271733878]);\nMd5.buffer32Identity = new Int32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\nMd5.hexChars = '0123456789abcdef';\nMd5.hexOut = [];\n// Permanent instance is to use for one-call hashing\nMd5.onePassHasher = new Md5();\nif (Md5.hashStr('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n throw new Error('Md5 self test failed.');\n}\n//# sourceMappingURL=md5.js.map","import { Md5 } from './md5';\n// Hashes any blob\nexport class Md5FileHasher {\n constructor(_callback, // Callback to return the result\n _async = true, // Async version is not always available in a web worker\n _partSize = 1048576) {\n this._callback = _callback;\n this._async = _async;\n this._partSize = _partSize;\n this._configureReader();\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n */\n hash(blob) {\n const self = this;\n self._blob = blob;\n // self._length = Math.ceil(blob.size / self._partSize);\n self._part = 0;\n self._md5 = new Md5();\n self._processPart();\n }\n _fail() {\n this._callback({\n success: false,\n result: 'data read failed'\n });\n }\n _hashData(e) {\n let self = this;\n self._md5.appendByteArray(new Uint8Array(e.target.result));\n if (self._part * self._partSize >= self._blob.size) {\n self._callback({\n success: true,\n result: self._md5.end()\n });\n }\n else {\n self._processPart();\n }\n }\n _processPart() {\n const self = this;\n let endbyte = 0;\n let current_part;\n self._part += 1;\n if (self._blob.size > self._partSize) { // If blob bigger then part_size we will slice it up\n endbyte = self._part * self._partSize;\n if (endbyte > self._blob.size) {\n endbyte = self._blob.size;\n }\n current_part = self._blob.slice((self._part - 1) * self._partSize, endbyte);\n }\n else {\n current_part = self._blob;\n }\n if (self._async) {\n self._reader.readAsArrayBuffer(current_part);\n }\n else {\n setTimeout(() => {\n try {\n self._hashData({\n target: {\n result: self._reader.readAsArrayBuffer(current_part)\n },\n });\n }\n catch (e) {\n self._fail();\n }\n }, 0);\n }\n }\n _configureReader() {\n const self = this;\n if (self._async) {\n self._reader = new FileReader();\n self._reader.onload = self._hashData.bind(self);\n self._reader.onerror = self._fail.bind(self);\n self._reader.onabort = self._fail.bind(self);\n }\n else {\n self._reader = new FileReaderSync();\n }\n }\n}\n//# sourceMappingURL=md5_file_hasher.js.map",";\nexport class ParallelHasher {\n constructor(workerUri, workerOptions) {\n this._queue = [];\n this._ready = true;\n const self = this;\n if (Worker) {\n self._hashWorker = new Worker(workerUri, workerOptions);\n self._hashWorker.onmessage = self._recievedMessage.bind(self);\n self._hashWorker.onerror = (err) => {\n self._ready = false;\n console.error('Hash worker failure', err);\n };\n }\n else {\n self._ready = false;\n console.error('Web Workers are not supported in this browser');\n }\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n * @returns Promise of the Hashed result\n */\n hash(blob) {\n const self = this;\n let promise;\n promise = new Promise((resolve, reject) => {\n self._queue.push({\n blob,\n resolve,\n reject,\n });\n self._processNext();\n });\n return promise;\n }\n /** Terminate any existing hash requests */\n terminate() {\n this._ready = false;\n this._hashWorker.terminate();\n }\n // Processes the next item in the queue\n _processNext() {\n if (this._ready && !this._processing && this._queue.length > 0) {\n this._processing = this._queue.pop();\n this._hashWorker.postMessage(this._processing.blob);\n }\n }\n // Hash result is returned from the worker\n _recievedMessage(evt) {\n var _a, _b;\n const data = evt.data;\n if (data.success) {\n (_a = this._processing) === null || _a === void 0 ? void 0 : _a.resolve(data.result);\n }\n else {\n (_b = this._processing) === null || _b === void 0 ? void 0 : _b.reject(data.result);\n }\n this._processing = undefined;\n this._processNext();\n }\n}\n//# sourceMappingURL=parallel_hasher.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.7\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\nexports.__esModule = true;\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\nexports[\"default\"] = ApisearchUI_1[\"default\"];\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"apisearch-ui.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;ACVa;AACb,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,oBAAoB,mBAAO,CAAC,4EAAoB;AAChD,cAAc,mBAAO,CAAC,kEAAe;AACrC,cAAc,mBAAO,CAAC,kEAAe;AACrC,cAAc,mBAAO,CAAC,kEAAe;AACrC,eAAe,mBAAO,CAAC,oEAAgB;AACvC,uBAAuB,mBAAO,CAAC,8FAA6B;AAC5D,eAAe,mBAAO,CAAC,sEAAiB;AACxC,2BAA2B,mBAAO,CAAC,8FAA6B;AAChE,oBAAoB,mBAAO,CAAC,0FAA2B;AACvD,oBAAoB,mBAAO,CAAC,4EAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,4CAA4C,0DAA0D;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACrJL;AACb,kBAAkB;AAClB,cAAc,GAAG,wBAAwB,GAAG,sBAAsB;AAClE,gBAAgB,mBAAO,CAAC,iEAAW;AACnC,sBAAsB;AACtB,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,kDAAkD;AAClD,iCAAiC;AACjC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,2BAA2B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,oDAAoD;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC9GD;AACb,kBAAkB;AAClB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;ACjEF;AACb,kBAAkB;AAClB,uBAAuB;AACvB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,uBAAuB;;;;;;;;;;;;ACvBV;AACb,kBAAkB;AAClB,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,wBAAwB;;;;;;;;;;;;ACjBX;AACb,kBAAkB;AAClB,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvBL;AACb,kBAAkB;AAClB,sBAAsB;AACtB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB;;;;;;;;;;;;AC/CT;AACb,kBAAkB;AAClB,0BAA0B;AAC1B,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0FAA0F,GAAG,EAAE,KAAK;AACpG;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0BAA0B;;;;;;;;;;;;ACvJb;AACb,kBAAkB;AAClB,yBAAyB;AACzB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yBAAyB;;;;;;;;;;;;AC5CZ;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,2BAA2B;;;;;;;;;;;;AC/Cd;AACb,kBAAkB;AAClB,iCAAiC;AACjC,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iCAAiC;;;;;;;;;;;;AC/DpB;AACb,kBAAkB;AAClB,oBAAoB;AACpB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,oBAAoB;;;;;;;;;;;;ACvBP;AACb,kBAAkB;AAClB,mCAAmC;AACnC,cAAc,mBAAO,CAAC,gDAAO;AAC7B,yBAAyB,mBAAO,CAAC,kFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mCAAmC;;;;;;;;;;;;AC/BtB;AACb,kBAAkB;AAClB,cAAc,GAAG,eAAe,GAAG,6BAA6B,GAAG,qBAAqB;AACxF,cAAc,mBAAO,CAAC,gDAAO;AAC7B,mBAAmB,mBAAO,CAAC,6EAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,cAAc,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC3MD;AACb,kBAAkB;AAClB,mBAAmB;AACnB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,cAAc,mBAAO,CAAC,0DAAO;AAC7B,UAAU,mBAAO,CAAC,iDAAI;AACtB,eAAe,mBAAO,CAAC,6DAAU;AACjC,iBAAiB,mBAAO,CAAC,iEAAY;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,iCAAiC;AACrG,uHAAuH;AACvH;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;AClKN;AACb,kBAAkB;AAClB,mBAAmB;AACnB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,eAAe,mBAAO,CAAC,uDAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,qCAAqC;AACrC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;AC9EN;AACb,kBAAkB;AAClB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC/BD;AACb,kBAAkB;AAClB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACXL;AACb,kBAAkB;AAClB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;;;;;;;;;;;;ACnCH;AACb,kBAAkB;AAClB,eAAe;AACf,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;ACpEF;AACb,kBAAkB;AAClB,eAAe,GAAG,kBAAkB,GAAG,kCAAkC,GAAG,iCAAiC,GAAG,8BAA8B,GAAG,iCAAiC,GAAG,oBAAoB,GAAG,kBAAkB;AAC9N;AACA;AACA;AACA,kBAAkB;AAClB,oBAAoB;AACpB,iCAAiC;AACjC,8BAA8B;AAC9B,iCAAiC;AACjC,kCAAkC;AAClC,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;AC3HF;AACb,kBAAkB;AAClB,kBAAkB;AAClB,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AChEL;AACb,kBAAkB;AAClB,aAAa;AACb,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,kBAAkB,mBAAO,CAAC,oEAAa;AACvC,gBAAgB,mBAAO,CAAC,gEAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,mCAAmC;AACnC,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa;;;;;;;;;;;;ACnGA;AACb,kBAAkB;AAClB,iBAAiB;AACjB,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;;;;;;;;;;;;ACpEJ;AACb,kBAAkB;AAClB,YAAY;AACZ,cAAc,mBAAO,CAAC,gDAAO;AAC7B,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,mBAAmB,mBAAO,CAAC,sEAAc;AACzC,iBAAiB,mBAAO,CAAC,kEAAY;AACrC,gBAAgB,mBAAO,CAAC,gEAAW;AACnC,kBAAkB,mBAAO,CAAC,oEAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mCAAmC;AACnC,0CAA0C;AAC1C,6CAA6C;AAC7C,gDAAgD;AAChD,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mCAAmC;AACnC,0CAA0C;AAC1C,6CAA6C;AAC7C,gDAAgD;AAChD,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0LAA0L,wEAAwE,mFAAmF;AACrV,wHAAwH,wEAAwE,mFAAmF;AACnR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;;ACraC;AACb,kBAAkB;AAClB,gBAAgB;AAChB,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;;;;;;;;;;;;AChFH;AACb,kBAAkB;AAClB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,gBAAgB;;;;;;;;;;;;AC/DH;AACb,kBAAkB;AAClB,YAAY;AACZ,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,YAAY;;;;;;;;;;;;ACrEC;AACb,kBAAkB;AAClB,mBAAmB,GAAG,4BAA4B,GAAG,qCAAqC,GAAG,oCAAoC,GAAG,sCAAsC,GAAG,qCAAqC;AAClN,eAAe,mBAAO,CAAC,8DAAU;AACjC;AACA;AACA;AACA,qCAAqC;AACrC,sCAAsC;AACtC,oCAAoC;AACpC,qCAAqC;AACrC,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mCAAmC;AACnC,+BAA+B;AAC/B,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;AC9LN;AACb,kBAAkB;AAClB,cAAc,GAAG,yBAAyB,GAAG,uBAAuB,GAAG,8BAA8B,GAAG,yBAAyB,GAAG,yBAAyB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,2BAA2B,GAAG,mCAAmC,GAAG,uBAAuB;AAC7S;AACA;AACA;AACA,uBAAuB;AACvB,mCAAmC;AACnC,2BAA2B;AAC3B,sBAAsB;AACtB,sBAAsB;AACtB,yBAAyB;AACzB,yBAAyB;AACzB,8BAA8B;AAC9B,uBAAuB;AACvB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC1JD;AACb,kBAAkB;AAClB,aAAa,GAAG,oBAAoB,GAAG,0BAA0B,GAAG,0BAA0B;AAC9F,cAAc,mBAAO,CAAC,gDAAO;AAC7B,mBAAmB,mBAAO,CAAC,6EAAqB;AAChD,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C,aAAa,mBAAO,CAAC,iEAAe;AACpC,aAAa,mBAAO,CAAC,iEAAe;AACpC,oBAAoB,mBAAO,CAAC,wEAAe;AAC3C,eAAe,mBAAO,CAAC,8DAAU;AACjC,eAAe,mBAAO,CAAC,8DAAU;AACjC,oBAAoB,mBAAO,CAAC,wEAAe;AAC3C,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,eAAe,mBAAO,CAAC,8DAAU;AACjC,wBAAwB,mBAAO,CAAC,gFAAmB;AACnD,eAAe,mBAAO,CAAC,8DAAU;AACjC,kBAAkB,mBAAO,CAAC,2EAAoB;AAC9C;AACA;AACA;AACA,0BAA0B;AAC1B,0BAA0B;AAC1B,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA,oEAAoE,8BAA8B;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC;AACA;AACA,uEAAuE,iCAAiC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA,+DAA+D,yBAAyB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0CAA0C;AAC1C,oCAAoC;AACpC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,mEAAmE,iCAAiC;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,0CAA0C;AAC1C,gCAAgC;AAChC,mCAAmC;AACnC,gEAAgE,8BAA8B;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,oCAAoC;AACpC,0CAA0C;AAC1C,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA,gEAAgE,8BAA8B;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,0CAA0C;AAC1C,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,2DAA2D,yBAAyB,iFAAiF,6BAA6B;AAClM;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa;;;;;;;;;;;;AC9uCA;AACb,kBAAkB;AAClB,aAAa,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,4BAA4B;AAC/F;AACA;AACA;AACA,4BAA4B;AAC5B,sBAAsB;AACtB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,aAAa;;;;;;;;;;;;ACxEA;AACb,kBAAkB;AAClB,uBAAuB,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,gBAAgB;AAClG,sBAAsB,mBAAO,CAAC,4EAAiB;AAC/C;AACA;AACA;AACA,gBAAgB;AAChB,WAAW;AACX,WAAW;AACX,WAAW;AACX,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,uBAAuB;;;;;;;;;;;;ACnGV;AACb,kBAAkB;AAClB,qBAAqB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,oBAAoB,GAAG,qBAAqB,GAAG,qBAAqB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,aAAa,GAAG,uBAAuB,GAAG,4BAA4B,GAAG,sBAAsB,GAAG,oBAAoB;AACvf,aAAa,mBAAO,CAAC,iEAAe;AACpC,eAAe,mBAAO,CAAC,8DAAU;AACjC;AACA;AACA;AACA,oBAAoB;AACpB,sBAAsB;AACtB,4BAA4B;AAC5B,uBAAuB;AACvB,aAAa;AACb,oBAAoB;AACpB,iBAAiB;AACjB,mBAAmB;AACnB,qBAAqB;AACrB,qBAAqB;AACrB,oBAAoB;AACpB,mBAAmB;AACnB,uBAAuB;AACvB,uBAAuB;AACvB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,uBAAuB;AACvB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC,kCAAkC;AAClC,mCAAmC;AACnC,iCAAiC;AACjC,iCAAiC;AACjC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC,iCAAiC;AACjC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,iCAAiC;AACjC,iCAAiC;AACjC,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,qBAAqB;;;;;;;;;;;;ACjPR;AACb,kBAAkB;AAClB,cAAc,GAAG,+BAA+B,GAAG,+BAA+B,GAAG,yBAAyB,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,0BAA0B,GAAG,sBAAsB,GAAG,qBAAqB,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,2BAA2B,GAAG,6BAA6B,GAAG,6BAA6B,GAAG,0BAA0B,GAAG,2BAA2B,GAAG,0BAA0B;AACvnB,UAAU,mBAAO,CAAC,iDAAI;AACtB,eAAe,mBAAO,CAAC,8DAAU;AACjC;AACA;AACA;AACA,0BAA0B;AAC1B,2BAA2B;AAC3B,0BAA0B;AAC1B,6BAA6B;AAC7B,6BAA6B;AAC7B,2BAA2B;AAC3B,mBAAmB;AACnB,oBAAoB;AACpB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AACxB,2BAA2B;AAC3B,qBAAqB;AACrB;AACA;AACA,sBAAsB;AACtB;AACA;AACA,0BAA0B;AAC1B,sBAAsB;AACtB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;ACpUD;AACb,kBAAkB;AAClB,sBAAsB;AACtB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,wBAAwB,mBAAO,CAAC,uFAA0B;AAC1D,2BAA2B,mBAAO,CAAC,6FAA6B;AAChE,0BAA0B,mBAAO,CAAC,2FAA4B;AAC9D,4BAA4B,mBAAO,CAAC,+FAA8B;AAClE,kCAAkC,mBAAO,CAAC,2GAAoC;AAC9E,qBAAqB,mBAAO,CAAC,iFAAuB;AACpD,iBAAiB,mBAAO,CAAC,uEAAkB;AAC3C,cAAc,mBAAO,CAAC,mEAAgB;AACtC,aAAa,mBAAO,CAAC,iEAAe;AACpC,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C,eAAe,mBAAO,CAAC,uEAAkB;AACzC,mBAAmB,mBAAO,CAAC,2EAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2JAA2J;AAC3J;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8JAA8J;AAC9J;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,IAAI;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mKAAmK;AACnK;AACA;AACA;AACA,iCAAiC;AACjC;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uKAAuK;AACvK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2KAA2K;AAC3K;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4JAA4J;AAC5J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+JAA+J,IAAI;AACnK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uKAAuK,IAAI;AAC3K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6JAA6J,IAAI;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iIAAiI,IAAI;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2KAA2K;AAC3K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,QAAQ;AACvB,eAAe,YAAY;AAC3B,eAAe,QAAQ;AACvB,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,iCAAiC;AACjC,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sBAAsB;;;;;;;;;;;;ACvkBT;AACb,kBAAkB;AAClB,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AC3HL;AACb,kBAAkB;AAClB,eAAe;AACf,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,eAAe;;;;;;;;;;;;ACvIF;AACb,kBAAkB;AAClB,cAAc;AACd,aAAa,mBAAO,CAAC,iEAAe;AACpC,2BAA2B,mBAAO,CAAC,uFAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,4CAA4C;AAC/F;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,wBAAwB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,kDAAkD;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,cAAc;;;;;;;;;;;;AC1SD;AACb,kBAAkB;AAClB,yBAAyB;AACzB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,eAAe,mBAAO,CAAC,qEAAiB;AACxC,gBAAgB,mBAAO,CAAC,iEAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,yBAAyB;;;;;;;;;;;;ACzPZ;AACb,kBAAkB;AAClB,0BAA0B;AAC1B,0BAA0B,mBAAO,CAAC,qFAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,0BAA0B;;;;;;;;;;;;ACzGb;AACb,kBAAkB;;;;;;;;;;;;ACDL;AACb,kBAAkB;AAClB,mBAAmB;AACnB,aAAa,mBAAO,CAAC,iEAAe;AACpC,iBAAiB,mBAAO,CAAC,yEAAmB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,mBAAmB;;;;;;;;;;;;ACzIN;AACb,kBAAkB;;;;;;;;;;;;ACDL;AACb,kBAAkB;AAClB,cAAc,mBAAO,CAAC,gDAAO;AAC7B,kBAAkB,mBAAO,CAAC,8DAAa;AACvC,kBAAkB;AAClB,qBAAqB,mBAAO,CAAC,sEAAiB;AAC9C,qBAAqB,mBAAO,CAAC,wEAAkB;AAC/C,qBAAqB,mBAAO,CAAC,sFAAyB;AACtD,qBAAqB,mBAAO,CAAC,wFAA0B;AACvD,qBAAqB,mBAAO,CAAC,4EAAoB;AACjD,qBAAqB,mBAAO,CAAC,oFAAwB;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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,sBAAsB;AACxC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;;AAEA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,QAAQ;AACR;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA,SAAS,yBAAyB;AAClC;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,YAAY;AAC1E;AACA,8DAA8D,YAAY;AAC1E;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;;;;;;;;;;AChfA;AACA,EAAE,KAA4D;AAC9D,EAAE,CACsD;AACxD,CAAC,sBAAsB;;AAEvB;AACA,gCAAgC,WAAW;AAC3C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,eAAe;AACf,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,sBAAsB;AACtB,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B,2BAA2B;AAC3B,2BAA2B,gBAAgB,MAAM;AACjD,2BAA2B;AAC3B,2BAA2B;AAC3B,2BAA2B;;AAE3B;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0DAA0D;AAC1D;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oDAAoD,iBAAiB;AACrE;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ,uCAAuC;AAC/C;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,eAAe;AAC9D;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,eAAe;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,WAAW,UAAU,SAAS,KAAK,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+CAA+C,eAAe;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kDAAkD,iBAAiB;AACnE;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;A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AO,CAAC,sFAA+B;AACzD,wBAAwB,mBAAO,CAAC,mDAAmB;AACnD,2BAA2B,mBAAO,CAAC,yDAAsB;AACzD,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,gBAAgB,mBAAO,CAAC,mDAAmB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,mDAAmD,yCAAyC;AAC5F;AACA;AACA;AACA,8CAA8C,wBAAwB;AACtE,gEAAgE,0CAA0C;AAC1G,kEAAkE,4CAA4C;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD;AACA;AACA,wCAAwC,iCAAiC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sDAAsD;AACtI,gFAAgF,sDAAsD;AACtI,mFAAmF,yDAAyD;AAC5I,4EAA4E,sCAAsC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvYL;AACb,kBAAkB;AAClB,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AChCL;AACb,kBAAkB;AAClB,iBAAiB;AACjB,mBAAmB,mBAAO,CAAC,yCAAc;AACzC,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,cAAc,mBAAO,CAAC,+BAAS;AAC/B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,4fAA4f;AAC5f,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB;;;;;;;;;;;;ACrDJ;AACb,kBAAkB;AAClB,wBAAwB,GAAG,oBAAoB,GAAG,4BAA4B,GAAG,uBAAuB,GAAG,4BAA4B;AACvI;AACA;AACA;AACA,4BAA4B;AAC5B,uBAAuB;AACvB,4BAA4B;AAC5B,oBAAoB;AACpB,wBAAwB;;;;;;;;;;;;ACVX;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AC/BL;AACb,kBAAkB;AAClB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvBL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B;AACA;AACA;AACA,wCAAwC;AACxC,2BAA2B;;;;;;;;;;;;ACPd;AACb,kBAAkB;AAClB,2BAA2B,GAAG,qBAAqB,GAAG,wBAAwB;AAC9E;AACA;AACA,uEAAuE,uBAAuB;AAC9F,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,qEAAqE,uBAAuB;AAC5F;AACA,oBAAoB,0BAA0B;AAC9C,wBAAwB,2BAA2B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,gBAAgB;AACpE;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,2BAA2B;AAC3B,2BAA2B;AAC3B;AACA;AACA,KAAK;AACL,oBAAoB,kBAAkB;AACtC;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,oBAAoB,kBAAkB;AACtC,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;;;;;;;;;;;;AClEd;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,+CAAQ;AAC/B,kBAAkB,mBAAO,CAAC,uCAAa;AACvC,kBAAkB,mBAAO,CAAC,uCAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AClUL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,wEAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,iEAAiE,4CAA4C;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,mGAAmG;AAC5J;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACtGL;AACb,kBAAkB;AAClB,6BAA6B;AAC7B,6BAA6B,4CAA4C,UAAU,YAAY,KAAK,KAAK,UAAU,4DAA4D,gBAAgB,aAAa,yBAAyB,qBAAqB,uCAAuC,gBAAgB,YAAY,kHAAkH,UAAU,MAAM,UAAU;;;;;;;;;;;;ACH5b;AACb,kBAAkB;AAClB,4BAA4B,GAAG,wBAAwB;AACvD;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,4BAA4B;;;;;;;;;;;;ACzDf;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gBAAgB,mBAAO,CAAC,6EAA2B;AACnD,8BAA8B,mBAAO,CAAC,yFAAyB;AAC/D,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,4DAA4D;AACrG,qDAAqD,qHAAqH;AAC1K,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,yDAAyD,+EAA+E;AACxI;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC3IL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,2BAA2B,kHAAkH,KAAK,cAAc,WAAW,qBAAqB,WAAW,yFAAyF,KAAK,sBAAsB,QAAQ,8EAA8E,GAAG;;;;;;;;;;;;ACH3Y;AACb,kBAAkB;AAClB,0BAA0B;AAC1B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,yCAAyC;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,0BAA0B;;;;;;;;;;;;ACnDb;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,4BAA4B,mBAAO,CAAC,mFAAuB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,8DAA8D,gBAAgB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA,iBAAiB,IAAI;AACrB,aAAa;AACb,4DAA4D,yEAAyE;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sFAAsF,oEAAoE;AACzM,6DAA6D,sEAAsE;AACnI,aAAa;AACb;AACA;AACA,4DAA4D,yEAAyE;AACrI,+CAA+C,sFAAsF,4DAA4D;AACjM,6DAA6D,yFAAyF;AACtJ,aAAa;AACb;AACA;AACA,wCAAwC,oFAAoF;AAC5H;AACA,+CAA+C,2BAA2B;AAC1E,iEAAiE,gEAAgE;AACjI;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,yBAAyB,SAAS,GAAG,KAAK;AAC1C;AACA;AACA,kBAAkB;;;;;;;;;;;;AC9KL;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACVL;AACb,kBAAkB;AAClB,yBAAyB;AACzB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,cAAc,mBAAO,CAAC,0CAAS;AAC/B,kBAAkB,mBAAO,CAAC,wCAAc;AACxC,kBAAkB,mBAAO,CAAC,wCAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,yBAAyB;;;;;;;;;;;;ACpCZ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,sJAAsJ;AAC/M;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA,4BAA4B,YAAY,GAAG,aAAa;AACxD,KAAK;AACL,kCAAkC;AAClC;AACA,kBAAkB;;;;;;;;;;;;ACrGL;AACb;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,uBAAuB,GAAG,gCAAgC,GAAG,yBAAyB,GAAG,sCAAsC,GAAG,gCAAgC,GAAG,kCAAkC;AACvM;AACA;AACA;AACA;AACA;AACA,gDAAgD,+BAA+B;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,oDAAoD,+BAA+B;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;;;;;;;;;;;;AC3GV;AACb,kBAAkB;AAClB,8CAA8C,GAAG,kDAAkD,GAAG,oBAAoB,GAAG,wBAAwB;AACrJ;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,WAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8CAA8C;;;;;;;;;;;;AC1IjC;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA,6EAA6E,OAAO;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,8BAA8B,mBAAO,CAAC,yFAAyB;AAC/D,gBAAgB,mBAAO,CAAC,6DAAW;AACnC,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,0BAA0B,mBAAO,CAAC,kFAAqB;AACvD,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,4DAA4D;AACrG,qDAAqD,oIAAoI;AACzL,qCAAqC,uEAAuE;AAC5G;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,iEAAiE,yFAAyF;AAC1J,iBAAiB;AACjB;AACA,oEAAoE,iTAAiT;AACrX;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kCAAkC,cAAc;AAChD;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;ACnUL;AACb,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uFAAuF;AAC3H,qDAAqD,oFAAoF;AACzI;AACA,wCAAwC,uFAAuF;AAC/H,yDAAyD,oFAAoF;AAC7I;AACA;AACA,kBAAkB;;;;;;;;;;;;ACrBL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,2BAA2B,mEAAmE,KAAK,iEAAiE,WAAW,qBAAqB,WAAW,2FAA2F,KAAK,sBAAsB,cAAc,8EAA8E,GAAG;;;;;;;;;;;;ACHvZ;AACb,kBAAkB;AAClB,cAAc,GAAG,gBAAgB,GAAG,yBAAyB,GAAG,qBAAqB;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,wBAAwB,qBAAqB;AAC7C;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;;;;;;;;;;ACxFD;AACb,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6CAA6C;AAChF,qDAAqD,uDAAuD;AAC5G;AACA;AACA,kBAAkB;;;;;;;;;;;;ACdL;AACb,kBAAkB;AAClB,8BAA8B;AAC9B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,8BAA8B;;;;;;;;;;;;AChCjB;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,gBAAgB,mBAAO,CAAC,yDAAW;AACnC,4BAA4B,mBAAO,CAAC,kFAAuB;AAC3D,0BAA0B,mBAAO,CAAC,6EAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG,gEAAgE,qMAAqM,gCAAgC;AACrS,gEAAgE,uMAAuM,mDAAmD;AAC1T,0CAA0C,gCAAgC,0KAA0K,mCAAmC;AACvR,yDAAyD,gCAAgC,oCAAoC,sCAAsC,MAAM;AACzK,gEAAgE,uLAAuL,mDAAmD;AAC1S,gEAAgE,8LAA8L,yCAAyC;AACvS;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC/JL;AACb,kBAAkB;AAClB,4BAA4B,GAAG,4BAA4B;AAC3D,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,4BAA4B;;;;;;;;;;;;AC7Cf;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,gFAAoB;AACrD,8BAA8B,mBAAO,CAAC,yFAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gCAAgC;AACzE,qDAAqD;AACrD;AACA,mBAAmB;AACnB,qCAAqC,2CAA2C;AAChF;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA,2BAA2B;AAC3B,iEAAiE,+DAA+D,WAAW,YAAY,uCAAuC;AAC9L,iBAAiB;AACjB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;ACpHL;AACb,kBAAkB;AAClB,yCAAyC,GAAG,wCAAwC;AACpF,wCAAwC,YAAY,MAAM;AAC1D,yCAAyC,iBAAiB,OAAO,yBAAyB,OAAO;;;;;;;;;;;;ACJpF;AACb,kBAAkB;AAClB,oBAAoB,GAAG,wBAAwB;AAC/C;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB;;;;;;;;;;;;AC9DP;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,eAAe,mBAAO,CAAC,yEAAe;AACtC,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,2BAA2B,mBAAO,CAAC,gFAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,6BAA6B;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8DAA8D,6BAA6B;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6GAA6G,kBAAkB;AAC/H,yGAAyG,kBAAkB;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,yCAAyC,iGAAiG;AAC1I,qDAAqD,kHAAkH;AACvK,qCAAqC,gEAAgE;AACrG,oDAAoD,+JAA+J,2BAA2B;AAC9O;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,oDAAoD,2JAA2J,yBAAyB;AACxO;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C,yCAAyC,mBAAmB;AAC5D,6DAA6D,6DAA6D;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC9WL;AACb,kBAAkB;AAClB,oBAAoB;AACpB;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oBAAoB;;;;;;;;;;;;ACxCP;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,sBAAsB,mBAAO,CAAC,iEAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,qFAAqF;AAC9H,qDAAqD,gEAAgE;AACrH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AChEL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0JAA0J;AAClN;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACxEL;AACb,kBAAkB;AAClB,oCAAoC,GAAG,sBAAsB;AAC7D;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,oCAAoC;;;;;;;;;;;;ACnFvB;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,iBAAiB,mBAAO,CAAC,oFAA8B;AACvD,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,eAAe,mBAAO,CAAC,yEAAe;AACtC,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,yBAAyB,mBAAO,CAAC,wEAAoB;AACrD,aAAa,mBAAO,CAAC,gDAAQ;AAC7B,sBAAsB,mBAAO,CAAC,iEAAiB;AAC/C,eAAe,mBAAO,CAAC,6CAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yEAAyE,eAAe;AACxF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,8GAA8G;AACzL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA,yBAAyB,0EAA0E;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,6CAA6C,kGAAkG;AAC/I;AACA,+DAA+D,qIAAqI;AACpM,+DAA+D,uDAAuD,0BAA0B;AAChJ,wEAAwE,2CAA2C;AACnH,sCAAsC,qGAAqG;AAC3I;AACA;AACA,mDAAmD;AACnD;AACA,+BAA+B;AAC/B,qEAAqE;AACrE;AACA,mCAAmC;AACnC,mDAAmD,gFAAgF,mBAAmB,IAAI;AAC1J;AACA;AACA;AACA,6CAA6C,qEAAqE;AAClH,yDAAyD,gIAAgI;AACzL;AACA;AACA;AACA;AACA,yCAAyC,qEAAqE;AAC9G;AACA;AACA,2DAA2D,qIAAqI;AAChM;AACA,gDAAgD,uEAAuE;AACvH;AACA,wEAAwE,mCAAmC,8DAA8D,oCAAoC,6HAA6H;AAC1U,yBAAyB;AACzB;AACA;AACA;AACA,4DAA4D,4HAA4H,oBAAoB,YAAY,IAAI;AAC5N;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA,2BAA2B;AAC3B,iEAAiE;AACjE;AACA,+BAA+B;AAC/B;AACA;AACA;AACA,2CAA2C,yCAAyC;AACpF,oDAAoD,qCAAqC;AACzF,iDAAiD,2CAA2C;AAC5F,sDAAsD;AACtD;AACA;AACA;AACA,mCAAmC;AACnC,yEAAyE;AACzE;AACA,qCAAqC,gCAAgC;AACrE,mDAAmD;AACnD;AACA;AACA;AACA,mCAAmC;AACnC,yEAAyE;AACzE;AACA,qCAAqC,gCAAgC;AACrE,iDAAiD,2CAA2C;AAC5F,wEAAwE,0BAA0B,wMAAwM;AAC1S,yBAAyB;AACzB,iBAAiB;AACjB;AACA,+DAA+D;AAC/D;AACA,yBAAyB,uGAAuG;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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ACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2KAA2K,UAAU,WAAW,wBAAwB,GAAG;AACtQ;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACxEL;AACb,kBAAkB;AAClB,0BAA0B,GAAG,0BAA0B;AACvD,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,0BAA0B;;;;;;;;;;;;ACpEb;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,2BAA2B,mBAAO,CAAC,gFAAsB;AACzD,iBAAiB,mBAAO,CAAC,kDAAa;AACtC,8BAA8B,mBAAO,CAAC,uFAAyB;AAC/D,eAAe,mBAAO,CAAC,yEAAe;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA,6BAA6B;AAC7B,6BAA6B;AAC7B;AACA,mCAAmC,UAAU,WAAW,+BAA+B,0BAA0B;AACjH;AACA;AACA;AACA;AACA;AACA,+DAA+D,4JAA4J,0BAA0B,4BAA4B,gDAAgD,sHAAsH;AACvb;AACA,oDAAoD,6BAA6B;AACjF,sEAAsE,yFAAyF;AAC/J;AACA;AACA;AACA,oDAAoD,yDAAyD;AAC7G;AACA;AACA,gDAAgD,mGAAmG;AACnJ,iEAAiE,6DAA6D;AAC9H;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,6BAA6B,EAAE;AAC/B;AACA;AACA,kBAAkB;;;;;;;;;;;;AChOL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AClDL;AACb,kBAAkB;AAClB,4BAA4B,GAAG,0BAA0B;AACzD,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC,qBAAqB,mBAAO,CAAC,+DAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,KAAK;AACL;AACA,4BAA4B;;;;;;;;;;;;ACnDf;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,sBAAsB,mBAAO,CAAC,iEAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,yCAAyC,oDAAoD;AAC7F,wCAAwC,4GAA4G,kCAAkC,oCAAoC,qBAAqB,kBAAkB;AACjQ;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AClHL;AACb,kBAAkB;AAClB,0BAA0B;AAC1B;AACA;AACA;AACA,kBAAkB,mBAAO,CAAC,wDAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/Ca;AACb,kBAAkB;AAClB,yBAAyB;AACzB,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,cAAc,mBAAO,CAAC,2CAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,yBAAyB;;;;;;;;;;;;ACrBZ;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,kBAAkB,mBAAO,CAAC,2CAAiB;AAC3C,eAAe,mBAAO,CAAC,6CAAW;AAClC,yBAAyB,mBAAO,CAAC,6EAAoB;AACrD,iCAAiC,mBAAO,CAAC,4FAA4B;AACrE,iBAAiB,mBAAO,CAAC,kDAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,iBAAiB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,6FAA6F;AACtI,qDAAqD,kHAAkH;AACvK,qCAAqC,oEAAoE;AACzG;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA,uBAAuB;AACvB,6DAA6D,gFAAgF;AAC7I,aAAa;AACb;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC3IL;AACb,kBAAkB;AAClB,2BAA2B;AAC3B,2BAA2B,sCAAsC,MAAM;;;;;;;;;;;;ACH1D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,eAAe,mBAAO,CAAC,qDAAU;AACjC,kBAAkB,mBAAO,CAAC,mDAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wGAAwG;AAC/I;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACjFL;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;ACvBL;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,oGAAoG;AAC9K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;AChE7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gCAAgC,mBAAO,CAAC,yHAAsD;AAC9F,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,0IAA0I,4GAA4G,0EAA0E;AAClZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,sCAAsC;;;;;;;;;;;;AC/GrE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,8BAA8B,mBAAO,CAAC,iHAAkD;AACxF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gDAAgD,8QAA8Q,wEAAwE;AACtd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,oCAAoC;;;;;;;;;;;;ACpEnE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,6BAA6B,mBAAO,CAAC,6GAAgD;AACrF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,gDAAgD,yGAAyG,+FAA+F;AACvU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,mCAAmC;;;;;;;;;;;;ACrElE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gBAAgB,mBAAO,CAAC,wFAAsC;AAC9D,8BAA8B,mBAAO,CAAC,oHAAoD;AAC1F,gCAAgC,mBAAO,CAAC,yHAAsD;AAC9F,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,kRAAkR,4GAA4G,gJAAgJ;AAChmB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6BAA6B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,sCAAsC;;;;;;;;;;;;ACjLrE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,4BAA4B,mBAAO,CAAC,yGAA8C;AAClF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,4FAA4F,wGAAwG,sEAAsE;AACxV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,kCAAkC;;;;;;;;;;;;AC5EjE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,gCAAgC,mBAAO,CAAC,yHAAsD;AAC9F,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,gEAAgE,0EAA0E;AAC5N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,sCAAsC;;;;;;;;;;;;AClErE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,6BAA6B,mBAAO,CAAC,6GAAgD;AACrF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,oPAAoP,uGAAuG,2GAA2G,2EAA2E;AAChmB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,oEAAoE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,mCAAmC;;;;;;;;;;;;AC3GlE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,gDAAgD,0FAA0F;AACpN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;ACpE7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,sLAAsL,oGAAoG,kQAAkQ;AACtmB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,8IAA8I;AAC5N;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;ACzF7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,2BAA2B,mBAAO,CAAC,wGAA8C;AACjF,6BAA6B,mBAAO,CAAC,6GAAgD;AACrF,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,4RAA4R,yGAAyG,2HAA2H;AAC/kB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B;AAC9E;AACA;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2BAA2B,gEAAgE,gFAAgF;AACtO;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA,iDAAiD,2BAA2B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,mCAAmC;;;;;;;;;;;;AC/KlE;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,0BAA0B,mBAAO,CAAC,iGAA0C;AAC5E,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,oEAAoE;AAClJ;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kBAAkB,0BAA0B,gCAAgC;;;;;;;;;;;;AClE/D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,kBAAkB,mBAAO,CAAC,wDAAW;AACrC,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,wBAAwB,mBAAO,CAAC,yFAAsC;AACtE,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,gDAAgD,wFAAwF;AAClN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,oEAAoE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,8BAA8B;;;;;;;;;;;;AClI7D;AACb;AACA;AACA;AACA,eAAe,gBAAgB,sCAAsC,kBAAkB;AACvF,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,CAAC;AACD;AACA;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,eAAe,mBAAO,CAAC,2DAAQ;AAC/B,mCAAmC,mBAAO,CAAC,yHAAsD;AACjG,eAAe,mBAAO,CAAC,yCAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,0FAA0F,+GAA+G,6EAA6E;AAC3W;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,4FAA4F;AAC1K;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B,yCAAyC;;;;;;;;;;;;AC5DxE;AACb,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kBAAkB;;;;;;;;;;;;AC7CL;AACb,kBAAkB;AAClB,uBAAuB,mBAAO,CAAC,0DAAkB;AACjD,qBAAqB,mBAAO,CAAC,sDAAgB;AAC7C,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,uBAAuB,mBAAO,CAAC,0DAAkB;AACjD,mBAAmB,mBAAO,CAAC,kDAAc;AACzC,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,eAAe,mBAAO,CAAC,0CAAU;AACjC,eAAe,mBAAO,CAAC,0CAAU;AACjC,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,iBAAiB,mBAAO,CAAC,8CAAY;AACrC,eAAe,mBAAO,CAAC,0CAAU;AACjC,oBAAoB,mBAAO,CAAC,oDAAe;AAC3C,eAAe,mBAAO,CAAC,0CAAU;AACjC,uBAAuB,mBAAO,CAAC,0DAAkB;AACjD;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AClC4B;AACsB;AACC;AACnD;;;;;;;;;;;;;;;ACHA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA,wBAAwB,OAAO;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,IAAI;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACpa4B;AAC5B;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,qCAAG;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxFA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACO;AACP,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACO;AACP,kDAAkD,QAAQ;AAC1D,yCAAyC,QAAQ;AACjD,yDAAyD,QAAQ;AACjE;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA,iBAAiB,uFAAuF,cAAc;AACtH,uBAAuB,gCAAgC,qCAAqC,2CAA2C;AACvI,4BAA4B,MAAM,iBAAiB,YAAY;AAC/D,uBAAuB;AACvB,8BAA8B;AAC9B,6BAA6B;AAC7B,4BAA4B;AAC5B;AACA;AACO;AACP;AACA,iBAAiB,6CAA6C,UAAU,sDAAsD,cAAc;AAC5I,0BAA0B,6BAA6B,oBAAoB,gDAAgD,kBAAkB;AAC7I;AACA;AACO;AACP;AACA;AACA,2GAA2G,uFAAuF,cAAc;AAChN,uBAAuB,8BAA8B,gDAAgD,wDAAwD;AAC7J,6CAA6C,sCAAsC,UAAU,mBAAmB,IAAI;AACpH;AACA;AACO;AACP,iCAAiC,uCAAuC,YAAY,KAAK,OAAO;AAChG;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,6CAA6C;AAC7C;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzNA;AACa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wFAAwF,qBAAM;AAC9F,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mDAAmD;AACnD;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,QAAQ;AACnB,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,eAAe;AAC5B,aAAa,sBAAsB;AACnC,YAAY;AACZ;AACA,eAAe,SAAS;AACxB;AACA;AACA;;AAEA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,4BAA4B;AACzC;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,oDAAoD,MAAM;AAC1D,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA,uCAAuC;AACvC,KAAK;;AAEL;AACA,0DAA0D,wBAAwB;AAClF;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,0BAA0B,KAAK;AAC/B;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC,MAAM;AAC/C,MAAM;AACN;AACA;AACA,8CAA8C,MAAM;AACpD;AACA,CAAC;;AAED,sCAAsC,OAAO;;AAE7C;;AAEA;AACA;AACA;;AAEA,WAAW,QAAQ;AACnB;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mDAAmD,GAAG;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,yCAAyC,IAAI;AAC7C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,SAAS;AAC1C,MAAM;AACN,6BAA6B;AAC7B,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,WAAW,yCAAyC;;AAEpD;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA,wDAAwD,iBAAiB;;AAEzE;AACA,2CAA2C,iBAAiB;;AAE5D;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;;;;;;UCzrGA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNa;AACb,kBAAkB;AAClB,oBAAoB,mBAAO,CAAC,2CAAe;AAC3C,kBAAkB","sources":["webpack://apisearchUI/webpack/universalModuleDefinition","webpack://apisearchUI/./node_modules/apisearch/lib/Apisearch.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Config.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Synonym.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ConnectionError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ErrorWithMessage.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/EventError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ForbiddenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidFormatError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidTokenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceExistsError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceNotAvailableError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnknownError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnsupportedContentTypeError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Geo/LocationRange.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/AxiosClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/CacheClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Client.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/HttpClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Response.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/AppUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Changes.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Coordinate.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Index.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/IndexUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Item.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/ItemUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Metadata.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/User.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Aggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Filter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Query.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Range.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategies.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/SortBy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/HttpRepository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/Repository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Counter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Result.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregations.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/ReadTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/Transformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/WriteTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/index.js","webpack://apisearchUI/./node_modules/events/events.js","webpack://apisearchUI/./node_modules/mustache/mustache.js","webpack://apisearchUI/./node_modules/preact/compat/dist/compat.module.js","webpack://apisearchUI/./node_modules/preact/dist/preact.module.js","webpack://apisearchUI/./node_modules/preact/hooks/dist/hooks.module.js","webpack://apisearchUI/./src/ApisearchHelper.ts","webpack://apisearchUI/./src/ApisearchUI.ts","webpack://apisearchUI/./src/ApisearchUIFactory.ts","webpack://apisearchUI/./src/Bootstrap.ts","webpack://apisearchUI/./src/Constants.ts","webpack://apisearchUI/./src/Container.ts","webpack://apisearchUI/./src/Dispatcher.ts","webpack://apisearchUI/./src/Environment.ts","webpack://apisearchUI/./src/Highlight.ts","webpack://apisearchUI/./src/Store.ts","webpack://apisearchUI/./src/components/Banner/BannerComponent.tsx","webpack://apisearchUI/./src/components/Banner/defaultTemplates.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterActions.ts","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterComponent.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersActions.ts","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersComponent.tsx","webpack://apisearchUI/./src/components/Clone.ts","webpack://apisearchUI/./src/components/Common.ts","webpack://apisearchUI/./src/components/Information/InformationComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/Helpers.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterActions.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/ShowMoreComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Pagination/Helpers.ts","webpack://apisearchUI/./src/components/Pagination/NavigationComponent.tsx","webpack://apisearchUI/./src/components/Pagination/PaginationActions.ts","webpack://apisearchUI/./src/components/Pagination/PaginationComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterActions.ts","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterActions.ts","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterComponent.tsx","webpack://apisearchUI/./src/components/Reload/ReloadActions.ts","webpack://apisearchUI/./src/components/Reload/ReloadComponent.tsx","webpack://apisearchUI/./src/components/Result/Item.tsx","webpack://apisearchUI/./src/components/Result/ResultActions.ts","webpack://apisearchUI/./src/components/Result/ResultComponent.tsx","webpack://apisearchUI/./src/components/Result/defaultTemplates.tsx","webpack://apisearchUI/./src/components/SearchInput/AutocompleteComponent.tsx","webpack://apisearchUI/./src/components/SearchInput/SearchInputActions.ts","webpack://apisearchUI/./src/components/SearchInput/SearchInputComponent.tsx","webpack://apisearchUI/./src/components/Snapshot/SnapshotComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByActions.ts","webpack://apisearchUI/./src/components/SortBy/SortByComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByHelper.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterActions.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterComponent.tsx","webpack://apisearchUI/./src/components/Suggestions/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Template.tsx","webpack://apisearchUI/./src/components/Translate.tsx","webpack://apisearchUI/./src/widgets/Banner.tsx","webpack://apisearchUI/./src/widgets/CheckboxFilter.tsx","webpack://apisearchUI/./src/widgets/ClearFilters.tsx","webpack://apisearchUI/./src/widgets/Information.tsx","webpack://apisearchUI/./src/widgets/MultipleFilter.tsx","webpack://apisearchUI/./src/widgets/Pagination.tsx","webpack://apisearchUI/./src/widgets/PriorityFilter.tsx","webpack://apisearchUI/./src/widgets/RangeFilter.tsx","webpack://apisearchUI/./src/widgets/Reload.tsx","webpack://apisearchUI/./src/widgets/Result.tsx","webpack://apisearchUI/./src/widgets/SearchInput.tsx","webpack://apisearchUI/./src/widgets/Snapshot.tsx","webpack://apisearchUI/./src/widgets/SortBy.tsx","webpack://apisearchUI/./src/widgets/Suggestions.tsx","webpack://apisearchUI/./src/widgets/Widget.ts","webpack://apisearchUI/./src/widgets/Widgets.ts","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/index.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5_file_hasher.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/parallel_hasher.js","webpack://apisearchUI/./node_modules/tslib/tslib.es6.js","webpack://apisearchUI/./node_modules/axios/dist/browser/axios.cjs","webpack://apisearchUI/webpack/bootstrap","webpack://apisearchUI/webpack/runtime/define property getters","webpack://apisearchUI/webpack/runtime/global","webpack://apisearchUI/webpack/runtime/hasOwnProperty shorthand","webpack://apisearchUI/webpack/runtime/make namespace object","webpack://apisearchUI/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"apisearchUI\"] = factory();\n\telse\n\t\troot[\"apisearchUI\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AxiosClient_1 = require(\"./Http/AxiosClient\");\nvar Query_1 = require(\"./Query/Query\");\nvar Query_2 = require(\"./Query/Query\");\nvar Query_3 = require(\"./Query/Query\");\nvar SortBy_1 = require(\"./Query/SortBy\");\nvar HttpRepository_1 = require(\"./Repository/HttpRepository\");\nvar Result_1 = require(\"./Result/Result\");\nvar ResultAggregations_1 = require(\"./Result/ResultAggregations\");\nvar Transformer_1 = require(\"./Transformer/Transformer\");\nvar CacheClient_1 = require(\"./Http/CacheClient\");\n/**\n * Apisearch class\n */\nvar Apisearch = /** @class */ (function () {\n function Apisearch() {\n }\n /**\n * Constructor\n *\n * @param config\n *\n * @return {HttpRepository}\n */\n Apisearch.createRepository = function (config) {\n Apisearch.ensureRepositoryConfigIsValid(config);\n config.options = tslib_1.__assign({ api_version: \"v1\", override_queries: true, timeout: 3000 }, config.options);\n /**\n * Client\n */\n var httpClient = typeof config.options.http_client !== \"undefined\"\n ? config.options.http_client\n : new AxiosClient_1.AxiosClient(config.options.endpoint, config.options.api_version, config.options.timeout, config.options.override_queries);\n if (config.options.use_cache) {\n httpClient = new CacheClient_1.CacheClient(httpClient);\n }\n return new HttpRepository_1.HttpRepository(httpClient, config.app_id, config.index_id, config.token, new Transformer_1.Transformer());\n };\n /**\n * Ensure the Repository configuration is valid\n *\n * @param config\n */\n Apisearch.ensureRepositoryConfigIsValid = function (config) {\n Apisearch.ensureIsDefined(config.app_id, \"app_id\");\n Apisearch.ensureIsDefined(config.index_id, \"index_id\");\n Apisearch.ensureIsDefined(config.token, \"token\");\n Apisearch.ensureIsDefined(config.options.endpoint, \"options.endpoint\");\n };\n /**\n * Ensure the value is not undefined\n *\n * @param param\n * @param name\n */\n Apisearch.ensureIsDefined = function (param, name) {\n if (typeof param === \"undefined\") {\n throw new TypeError(name + \" parameter must be defined.\");\n }\n };\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQueryLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.createLocated(coordinate, queryText, page, size);\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQuery = function (queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.create(queryText, page, size);\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Apisearch.createQueryMatchAll = function () {\n return Query_3.Query.createMatchAll();\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUID = function (uuid) {\n return Query_3.Query.createByUUID(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n return Query_3.Query.createByUUIDs.apply(Query_3.Query, uuids);\n };\n /**\n * Create empty result\n *\n * @return {Result}\n */\n Apisearch.createEmptyResult = function () {\n return Result_1.Result.create(\"\", 0, 0, new ResultAggregations_1.ResultAggregations(0), [], []);\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptySortBy = function () {\n return SortBy_1.SortBy.create();\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptyScoreStrategy = function () {\n return SortBy_1.SortBy.create();\n };\n return Apisearch;\n}());\nexports[\"default\"] = Apisearch;\n","\"use strict\";\nexports.__esModule = true;\nexports.Config = exports.DEFAULT_REPLICAS = exports.DEFAULT_SHARDS = void 0;\nvar Synonym_1 = require(\"./Synonym\");\nexports.DEFAULT_SHARDS = 1;\nexports.DEFAULT_REPLICAS = 0;\n/**\n * Result class\n */\nvar Config = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param language\n * @param storeSearchableMetadata\n * @param shards\n * @param replicas\n */\n function Config(language, storeSearchableMetadata, shards, replicas) {\n if (language === void 0) { language = null; }\n if (storeSearchableMetadata === void 0) { storeSearchableMetadata = true; }\n if (shards === void 0) { shards = exports.DEFAULT_SHARDS; }\n if (replicas === void 0) { replicas = exports.DEFAULT_REPLICAS; }\n this.synonyms = [];\n this.language = language;\n this.storeSearchableMetadata = storeSearchableMetadata;\n this.shards = shards;\n this.replicas = replicas;\n }\n /**\n * Get language\n *\n * @return {string}\n */\n Config.prototype.getLanguage = function () {\n return this.language;\n };\n /**\n * Should searchable metadata be stored\n *\n * @return {boolean}\n */\n Config.prototype.shouldSearchableMetadataBeStored = function () {\n return this.storeSearchableMetadata;\n };\n /**\n * Add synonym\n *\n * @param synonym\n */\n Config.prototype.addSynonym = function (synonym) {\n this.synonyms.push(synonym);\n };\n /**\n * Get synonyms\n *\n * @return {Synonym[]}\n */\n Config.prototype.getSynonyms = function () {\n return this.synonyms;\n };\n /**\n * Get shards\n *\n * @return {number}\n */\n Config.prototype.getShards = function () {\n return this.shards;\n };\n /**\n * Get replicas\n *\n * @return {number}\n */\n Config.prototype.getReplicas = function () {\n return this.replicas;\n };\n /**\n * to array\n */\n Config.prototype.toArray = function () {\n return {\n language: this.language,\n store_searchable_metadata: this.storeSearchableMetadata,\n synonyms: this.synonyms.map(function (synonym) { return synonym.toArray(); }),\n shards: this.shards,\n replicas: this.replicas\n };\n };\n /**\n * Create from array\n */\n Config.createFromArray = function (array) {\n var config = new Config(array.language ? array.language : null, typeof array.store_searchable_metadata == \"boolean\"\n ? array.store_searchable_metadata\n : true);\n if (array.synonyms instanceof Array &&\n array.synonyms.length > 0) {\n config.synonyms = array.synonyms.map(function (synonym) { return Synonym_1.Synonym.createFromArray(synonym); });\n }\n config.shards = typeof array.shards == \"number\"\n ? array.shards\n : exports.DEFAULT_SHARDS;\n config.replicas = typeof array.replicas == \"number\"\n ? array.replicas\n : exports.DEFAULT_REPLICAS;\n return config;\n };\n return Config;\n}());\nexports.Config = Config;\n","\"use strict\";\nexports.__esModule = true;\nexports.Synonym = void 0;\n/**\n * Result class\n */\nvar Synonym = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param words\n */\n function Synonym(words) {\n this.words = words;\n }\n /**\n * get words\n *\n * @return {string[]}\n */\n Synonym.prototype.getWords = function () {\n return this.words;\n };\n /**\n * Create by words\n *\n * @param words\n *\n * @return {Synonym}\n */\n Synonym.createbyWords = function (words) {\n return new Synonym(words);\n };\n /**\n * To array\n *\n * @return {{words: string[]}}\n */\n Synonym.prototype.toArray = function () {\n return {\n words: this.words\n };\n };\n /**\n * create from array\n *\n * @param array\n *\n * @returns {Synonym}\n */\n Synonym.createFromArray = function (array) {\n return new Synonym(array.words instanceof Object\n ? array.words\n : []);\n };\n /**\n * Expand\n *\n * @returns {string}\n */\n Synonym.prototype.expand = function () {\n return this.words.join(\",\");\n };\n return Synonym;\n}());\nexports.Synonym = Synonym;\n","\"use strict\";\nexports.__esModule = true;\nexports.ConnectionError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar ConnectionError = /** @class */ (function (_super) {\n tslib_1.__extends(ConnectionError, _super);\n function ConnectionError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ConnectionError.getTransportableHTTPError = function () {\n return 500;\n };\n return ConnectionError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ConnectionError = ConnectionError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ErrorWithMessage = void 0;\n/**\n * ConnectError\n */\nvar ErrorWithMessage = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param message\n */\n function ErrorWithMessage(message) {\n this.message = message;\n }\n return ErrorWithMessage;\n}());\nexports.ErrorWithMessage = ErrorWithMessage;\n","\"use strict\";\nexports.__esModule = true;\nexports.EventError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * EventError\n */\nvar EventError = /** @class */ (function (_super) {\n tslib_1.__extends(EventError, _super);\n function EventError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n EventError.throwEndpointNotAvailable = function () {\n return new EventError(\"Endpoint not available\");\n };\n return EventError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.EventError = EventError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ForbiddenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Forbidden Error\n */\nvar ForbiddenError = /** @class */ (function (_super) {\n tslib_1.__extends(ForbiddenError, _super);\n function ForbiddenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ForbiddenError.getTransportableHTTPError = function () {\n return 403;\n };\n /**\n * App id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createAppIdIsRequiredException = function () {\n return new ForbiddenError(\"AppId query parameter MUST be defined with a valid value\");\n };\n /**\n * Index id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createIndexIsRequiredException = function () {\n return new ForbiddenError(\"Index query parameter MUST be defined with a valid value\");\n };\n /**\n * Token is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createTokenIsRequiredException = function () {\n return new ForbiddenError(\"Token query parameter MUST be defined with a valid value\");\n };\n return ForbiddenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ForbiddenError = ForbiddenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidFormatError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Class InvalidFormatError\n */\nvar InvalidFormatError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidFormatError, _super);\n function InvalidFormatError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidFormatError.getTransportableHTTPError = function () {\n return 400;\n };\n /**\n * Item representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item representation not valid. Expecting Item array serialized but found malformed data\");\n };\n /**\n * Item UUID representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemUUIDRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item UUID representation not valid. Expecting UUID array serialized but found malformed data\");\n };\n /**\n * Create Composed UUID bad format.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.composedItemUUIDNotValid = function () {\n return new InvalidFormatError(\"A composed UUID should always follow this format: {id}~{type}.\");\n };\n /**\n * Create Query sorted by distance without coordinate.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.querySortedByDistanceWithoutCoordinate = function () {\n return new InvalidFormatError(\"In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()\");\n };\n /**\n * Query representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.queryFormatNotValid = function () {\n return new InvalidFormatError(\"Query Format not valid. Expecting a Query serialized but found malformed data\");\n };\n /**\n * Coordinate representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.coordinateFormatNotValid = function () {\n return new InvalidFormatError(\"A Coordinate should always contain a lat (Latitude) and a lon (Longitude)\");\n };\n /**\n * Config representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.configFormatNotValid = function () {\n return new InvalidFormatError(\"Config Format not valid. Expecting a Config serialized but found malformed data\");\n };\n /**\n * Token representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenFormatNotValid = function () {\n return new InvalidFormatError(\"Token Format not valid. Expecting a Token serialized but found malformed data\");\n };\n /**\n * Index format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexFormatNotValid = function () {\n return new InvalidFormatError('Index Format not valid. Expecting an Index serialized but found malformed data');\n };\n /**\n * IndexUUI format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexUUIDFormatNotValid = function () {\n return new InvalidFormatError('IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data');\n };\n /**\n * App format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.appUUIDFormatNotValid = function () {\n return new InvalidFormatError('AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data');\n };\n /**\n * Campaign representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.campaignFormatNotValid = function () {\n return new InvalidFormatError(\"Campaign Format not valid. Expecting a Campaign serialized but found malformed data\");\n };\n /**\n * Changes representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.changesFormatNotValid = function () {\n return new InvalidFormatError(\"Changes Format not valid. Expecting a Changes serialized but found malformed data\");\n };\n /**\n * Boost clause representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.boostClauseFormatNotValid = function () {\n return new InvalidFormatError(\"Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data\");\n };\n /**\n * token uuid representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenUUIDFormatNotValid = function () {\n return new InvalidFormatError(\"Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data\");\n };\n /**\n * User representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.userFormatNotValid = function () {\n return new InvalidFormatError(\"User Format not valid. Expecting a User serialized but found malformed data\");\n };\n return InvalidFormatError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidFormatError = InvalidFormatError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidTokenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Invalid token error\n */\nvar InvalidTokenError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidTokenError, _super);\n function InvalidTokenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidTokenError.getTransportableHTTPError = function () {\n return 401;\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenPermissions = function (tokenReference) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid\");\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n * @param maxHitsPerQuery\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenMaxHitsPerQuery = function (tokenReference, maxHitsPerQuery) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid. Max \" + maxHitsPerQuery + \" hits allowed\");\n };\n return InvalidTokenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidTokenError = InvalidTokenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceExistsError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource exists error\n */\nvar ResourceExistsError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceExistsError, _super);\n function ResourceExistsError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceExistsError.getTransportableHTTPError = function () {\n return 409;\n };\n /**\n * Index not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.indexAvailable = function () {\n return new ResourceExistsError(\"Index exists and cannot be created again\");\n };\n /**\n * Events not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.eventsIndexAvailable = function () {\n return new ResourceExistsError(\"Events index exists and cannot be created again\");\n };\n /**\n * Logs not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.logsIndexAvailable = function () {\n return new ResourceExistsError(\"Logs index exists and cannot be created again\");\n };\n return ResourceExistsError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceExistsError = ResourceExistsError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceNotAvailableError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource not available error\n */\nvar ResourceNotAvailableError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceNotAvailableError, _super);\n function ResourceNotAvailableError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceNotAvailableError.getTransportableHTTPError = function () {\n return 404;\n };\n /**\n * Index not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.indexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Index not available - \" + resourceId);\n };\n /**\n * Events not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.eventsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Events not available - \" + resourceId);\n };\n /**\n * Logs not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.logsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Logs not available - \" + resourceId);\n };\n /**\n * Engine not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.engineNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Engine not available - \" + resourceId);\n };\n return ResourceNotAvailableError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceNotAvailableError = ResourceNotAvailableError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnknownError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar UnknownError = /** @class */ (function (_super) {\n tslib_1.__extends(UnknownError, _super);\n function UnknownError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Unknown error\n *\n * @return this\n */\n UnknownError.createUnknownError = function () {\n return new this(\"Unknown error.\");\n };\n return UnknownError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnknownError = UnknownError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnsupportedContentTypeError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Unsupported content type error\n */\nvar UnsupportedContentTypeError = /** @class */ (function (_super) {\n tslib_1.__extends(UnsupportedContentTypeError, _super);\n function UnsupportedContentTypeError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n UnsupportedContentTypeError.getTransportableHTTPError = function () {\n return 415;\n };\n /**\n * Unsupported content type\n *\n * @return {InvalidFormatError}\n */\n UnsupportedContentTypeError.createUnsupportedContentTypeException = function () {\n return new UnsupportedContentTypeError(\"This content type is not accepted. Please use application/json\");\n };\n return UnsupportedContentTypeError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnsupportedContentTypeError = UnsupportedContentTypeError;\n","\"use strict\";\nexports.__esModule = true;\nexports.Square = exports.Polygon = exports.CoordinateAndDistance = exports.LocationRange = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\n/**\n * Abstract Location Range class\n */\nvar LocationRange = /** @class */ (function () {\n function LocationRange() {\n }\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n LocationRange.fromFilterObject = function (object) {\n throw TypeError(\"Method not valid\");\n };\n /**\n * to array\n */\n LocationRange.prototype.toArray = function () {\n return {\n type: this.getName(),\n data: this.toFilterObject()\n };\n };\n /**\n * Create from array\n *\n * @param array\n */\n LocationRange.createFromArray = function (array) {\n if (array.type == \"CoordinateAndDistance\") {\n return CoordinateAndDistance.fromFilterObject(array.data);\n }\n if (array.type == \"Polygon\") {\n return Polygon.fromFilterObject(array.data);\n }\n if (array.type == \"Square\") {\n return Square.fromFilterObject(array.data);\n }\n };\n return LocationRange;\n}());\nexports.LocationRange = LocationRange;\n/**\n * CoordinateAndDistance\n */\nvar CoordinateAndDistance = /** @class */ (function (_super) {\n tslib_1.__extends(CoordinateAndDistance, _super);\n /**\n * Constructor\n *\n * @param coordinate\n * @param distance\n */\n function CoordinateAndDistance(coordinate, distance) {\n var _this = _super.call(this) || this;\n _this.coordinate = coordinate;\n _this.distance = distance;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n CoordinateAndDistance.prototype.toFilterObject = function () {\n return {\n coordinate: this.coordinate.toArray(),\n distance: this.distance\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n CoordinateAndDistance.prototype.getName = function () {\n return \"CoordinateAndDistance\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n CoordinateAndDistance.fromFilterObject = function (object) {\n return new CoordinateAndDistance(Coordinate_1.Coordinate.createFromArray(object.coordinate), object.distance);\n };\n return CoordinateAndDistance;\n}(LocationRange));\nexports.CoordinateAndDistance = CoordinateAndDistance;\n/**\n * Polygon\n */\nvar Polygon = /** @class */ (function (_super) {\n tslib_1.__extends(Polygon, _super);\n /**\n * Constructor\n *\n * @param coordinates\n */\n function Polygon(coordinates) {\n var _this = _super.call(this) || this;\n if (coordinates.length < 3) {\n throw new Error(\"A polygon needs more than two coordinates.\");\n }\n _this.coordinates = coordinates;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{coordinates: {lat:number, lon:number}[]}}\n */\n Polygon.prototype.toFilterObject = function () {\n var coordinates = [];\n for (var i in this.coordinates) {\n coordinates.push(this.coordinates[i].toArray());\n }\n return {\n coordinates: coordinates\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Polygon.prototype.getName = function () {\n return \"Polygon\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {Polygon}\n */\n Polygon.fromFilterObject = function (object) {\n var coordinates = [];\n for (var i in object.coordinates) {\n coordinates.push(Coordinate_1.Coordinate.createFromArray(object.coordinates[i]));\n }\n return new Polygon(coordinates);\n };\n return Polygon;\n}(LocationRange));\nexports.Polygon = Polygon;\n/**\n * Square\n */\nvar Square = /** @class */ (function (_super) {\n tslib_1.__extends(Square, _super);\n /**\n * Constructor\n *\n * @param topLeftCoordinate\n * @param bottomRightCoordinate\n */\n function Square(topLeftCoordinate, bottomRightCoordinate) {\n var _this = _super.call(this) || this;\n _this.topLeftCoordinate = topLeftCoordinate;\n _this.bottomRightCoordinate = bottomRightCoordinate;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n Square.prototype.toFilterObject = function () {\n return {\n top_left: this.topLeftCoordinate.toArray(),\n bottom_right: this.bottomRightCoordinate.toArray()\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Square.prototype.getName = function () {\n return \"Square\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n Square.fromFilterObject = function (object) {\n return new Square(Coordinate_1.Coordinate.createFromArray(object.top_left), Coordinate_1.Coordinate.createFromArray(object.bottom_right));\n };\n return Square;\n}(LocationRange));\nexports.Square = Square;\n","\"use strict\";\nexports.__esModule = true;\nexports.AxiosClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar axios_1 = require(\"axios\");\nvar __1 = require(\"..\");\nvar Client_1 = require(\"./Client\");\nvar Response_1 = require(\"./Response\");\n/**\n * AxiosClient\n */\nvar AxiosClient = /** @class */ (function (_super) {\n tslib_1.__extends(AxiosClient, _super);\n /**\n * Constructor\n *\n * @param host\n * @param version\n * @param timeout\n * @param overrideQueries\n */\n function AxiosClient(host, version, timeout, overrideQueries) {\n var _this = _super.call(this, version) || this;\n _this.host = host;\n _this.timeout = timeout;\n _this.overrideQueries = overrideQueries;\n _this.abortControllers = {};\n return _this;\n }\n /**\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n */\n AxiosClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var headers, axiosRequestConfig, axiosResponse, error_1, response;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n method = method.toLowerCase();\n if (\"get\" === method &&\n this.overrideQueries) {\n this.abort(url, true);\n }\n headers = \"get\" === method\n ? {}\n : {\n \"Content-Encoding\": \"gzip\",\n \"Content-Type\": \"application/json\"\n };\n axiosRequestConfig = {\n baseURL: this.host.replace(/\\/*$/g, \"\"),\n data: data,\n headers: headers,\n method: method,\n timeout: this.timeout,\n transformRequest: [function (rawData) { return JSON.stringify(rawData); }],\n url: url + \"?\" + Client_1.Client.objectToUrlParameters(tslib_1.__assign(tslib_1.__assign({}, parameters), {\n token: credentials.token\n })).replace(/#/g, \"%23\")\n };\n if (typeof this.abortControllers[url] !== \"undefined\") {\n axiosRequestConfig.signal = this.abortControllers[url].signal;\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.fetch(url, axiosRequestConfig, 3)];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, new Response_1.Response(axiosResponse.status, axiosResponse.data)];\n case 3:\n error_1 = _a.sent();\n response = void 0;\n if (error_1.response) {\n response = new Response_1.Response(error_1.response.status, error_1.response.data);\n }\n else {\n response = new Response_1.Response(__1.ConnectionError.getTransportableHTTPError(), {\n message: error_1.message\n });\n }\n throw response;\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n AxiosClient.prototype.abort = function (url, urlIsFormatted) {\n if (!urlIsFormatted) {\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n }\n if (typeof this.abortControllers[url] !== \"undefined\") {\n this.abortControllers[url].abort();\n }\n this.generateAbortController(url);\n };\n /**\n * Generate a new cancellation token for a query\n *\n * @param url\n */\n AxiosClient.prototype.generateAbortController = function (url) {\n this.abortControllers[url] = new AbortController();\n };\n /**\n * @param url\n * @param options\n * @param retries\n */\n AxiosClient.prototype.fetch = function (url, options, retries) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, axios_1[\"default\"]\n .request(options)\n .then(function (response) {\n return {\n data: response.data,\n status: response.status\n };\n })[\"catch\"](function (error) {\n var response = error.response;\n if (error.code !== undefined &&\n error.code !== \"ECONNREFUSED\" &&\n error.code !== \"ECONNABORTED\" &&\n error.code !== \"ERR_BAD_REQUEST\" &&\n error.message !== \"Network Error\") {\n return {\n data: response.data,\n status: response.status\n };\n }\n if (retries <= 0) {\n throw error;\n }\n retries = retries - 1;\n return _this.fetch(url, options, retries);\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return AxiosClient;\n}(Client_1.Client));\nexports.AxiosClient = AxiosClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.CacheClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ts_md5_1 = require(\"ts-md5\");\n/**\n * AxiosClient\n */\nvar CacheClient = /** @class */ (function () {\n function CacheClient(httpClient) {\n this.cache = {};\n this.hits = 0;\n this.httpClient = httpClient;\n }\n CacheClient.prototype.flushCache = function () {\n this.cache = {};\n };\n CacheClient.prototype.size = function () {\n return Object.keys(this.cache).length;\n };\n CacheClient.prototype.getNumberOfHits = function () {\n return this.hits;\n };\n /**\n * Get\n *\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n *\n * @return {Promise}\n */\n CacheClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var cacheUID, _a, _b;\n return tslib_1.__generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (method !== 'get') {\n return [2 /*return*/, this.httpClient.get(url, method, credentials, parameters, data)];\n }\n cacheUID = ts_md5_1.Md5.hashStr(JSON.stringify({\n 'u': url,\n 'c': credentials,\n 'p': parameters,\n 'd': data\n })).toString();\n if (!!this.cache[cacheUID]) return [3 /*break*/, 2];\n _a = this.cache;\n _b = cacheUID;\n return [4 /*yield*/, this.httpClient.get(url, method, credentials, parameters, data)];\n case 1:\n _a[_b] = _c.sent();\n return [3 /*break*/, 3];\n case 2:\n this.httpClient.abort(url, false);\n this.hits++;\n _c.label = 3;\n case 3: return [2 /*return*/, this.cache[cacheUID]];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n CacheClient.prototype.abort = function (url, urlIsFormatted) {\n };\n return CacheClient;\n}());\nexports.CacheClient = CacheClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Client = void 0;\n/**\n * Client\n */\nvar Client = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param version\n */\n function Client(version) {\n this.version = version.replace(/^\\/*|\\/*$/g, \"\");\n }\n /**\n * Build an url parameters array by an object\n *\n * @param params\n *\n * @returns {string}\n */\n Client.objectToUrlParameters = function (params) {\n var builtParams = [];\n for (var i in params) {\n builtParams.push(i + \"=\" + params[i]);\n }\n return builtParams.join(\"&\");\n };\n return Client;\n}());\nexports.Client = Client;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpClient = void 0;\n/**\n * Http class\n */\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n }\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Response = void 0;\n/**\n * Response\n */\nvar Response = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param code\n * @param body\n */\n function Response(code, body) {\n this.code = code;\n this.body = body;\n }\n /**\n * Get code\n *\n * @return {number}\n */\n Response.prototype.getCode = function () {\n return this.code;\n };\n /**\n * Get body\n *\n * @return {any}\n */\n Response.prototype.getBody = function () {\n return this.body;\n };\n return Response;\n}());\nexports.Response = Response;\n","\"use strict\";\nexports.__esModule = true;\nexports.AppUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * AppUUID class\n */\nvar AppUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function AppUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.appUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n AppUUID.createById = function (id) {\n return new AppUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n AppUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n AppUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n AppUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new AppUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n AppUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return AppUUID;\n}());\nexports.AppUUID = AppUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Changes = exports.TYPE_ARRAY = exports.TYPE_ARRAY_EXPECTS_ELEMENT = exports.TYPE_ARRAY_ELEMENT_DELETE = exports.TYPE_ARRAY_ELEMENT_ADD = exports.TYPE_ARRAY_ELEMENT_UPDATE = exports.TYPE_LITERAL = exports.TYPE_VALUE = void 0;\n/**\n * filter constants\n */\nexports.TYPE_VALUE = 1;\nexports.TYPE_LITERAL = 4;\nexports.TYPE_ARRAY_ELEMENT_UPDATE = 8;\nexports.TYPE_ARRAY_ELEMENT_ADD = 16;\nexports.TYPE_ARRAY_ELEMENT_DELETE = 32;\nexports.TYPE_ARRAY_EXPECTS_ELEMENT = 24;\nexports.TYPE_ARRAY = 56;\n/**\n * Changes Type cast\n * @param Changes\n */\nvar Changes = /** @class */ (function () {\n function Changes() {\n /**\n * Changes\n *\n * @type {Array}\n */\n this.changes = [];\n }\n /**\n * Add new change\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addChange = function (field, value, type) {\n if (type === void 0) { type = exports.TYPE_VALUE; }\n this.changes.push({\n field: field,\n type: type,\n value: value\n });\n };\n /**\n * Update element from list\n *\n * @param field\n * @param condition\n * @param value\n * @param type\n */\n Changes.prototype.updateElementFromList = function (field, condition, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_UPDATE,\n condition: condition,\n value: value\n });\n };\n /**\n * Add element in list\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addElementInList = function (field, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_ADD,\n value: value\n });\n };\n /**\n * Delete element from list\n *\n * @param field\n * @param condition\n */\n Changes.prototype.deleteElementFromList = function (field, condition) {\n this.changes.push({\n field: field,\n type: exports.TYPE_ARRAY_ELEMENT_DELETE,\n condition: condition\n });\n };\n /**\n * Get changes\n *\n * @returns {[]}\n */\n Changes.prototype.getChanges = function () {\n return this.changes;\n };\n /**\n * Create\n *\n * @returns {Changes}\n */\n Changes.create = function () {\n return new Changes();\n };\n /**\n * To array\n *\n * @returns {[]}\n */\n Changes.prototype.toArray = function () {\n return JSON.parse(JSON.stringify(this.changes));\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Changes}\n */\n Changes.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var changes = Changes.create();\n changes.changes = array;\n return changes;\n };\n return Changes;\n}());\nexports.Changes = Changes;\n","\"use strict\";\nexports.__esModule = true;\nexports.Coordinate = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * Coordinate Type cast\n * @param coordinate\n */\nvar Coordinate = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param {number} lat\n * @param {number} lon\n */\n function Coordinate(lat, lon) {\n this.lat = lat;\n this.lon = lon;\n }\n /**\n * Get latitude\n *\n * @return float\n */\n Coordinate.prototype.getLatitude = function () {\n return this.lat;\n };\n /**\n * Get longitude\n *\n * @return float\n */\n Coordinate.prototype.getLongitude = function () {\n return this.lon;\n };\n /**\n * To array\n *\n * @return {{lat: number, lon: number}}\n */\n Coordinate.prototype.toArray = function () {\n return {\n lat: this.lat,\n lon: this.lon\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return Coordinate\n *\n * @throws InvalidFormatError\n */\n Coordinate.createFromArray = function (array) {\n if (typeof array.lat == \"undefined\" ||\n typeof array.lon == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n return new Coordinate(array.lat, array.lon);\n };\n return Coordinate;\n}());\nexports.Coordinate = Coordinate;\n","\"use strict\";\nexports.__esModule = true;\nexports.Index = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\n/**\n * Index class\n */\nvar Index = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param appUUID\n * @param isOK\n * @param docCount\n * @param size\n */\n function Index(uuid, appUUID, isOK, docCount, size) {\n if (isOK === void 0) { isOK = false; }\n if (docCount === void 0) { docCount = 0; }\n if (size === void 0) { size = '0kb'; }\n this.uuid = uuid;\n this.appUUID = appUUID;\n this.isOK = isOK;\n this.docCount = docCount;\n this.size = size;\n }\n /**\n * Get uuid\n *\n * @return {IndexUUID}\n */\n Index.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get app id\n *\n * @return {AppUUID}\n */\n Index.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Index is OK\n *\n * @return {boolean}\n */\n Index.prototype.isOk = function () {\n return this.isOK;\n };\n /**\n * Get doc count\n *\n * @return {number}\n */\n Index.prototype.getDocCount = function () {\n return this.docCount;\n };\n /**\n * get size\n *\n * @return {string}\n */\n Index.prototype.getSize = function () {\n return this.size;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n Index.prototype.toArray = function () {\n return {\n uuid: this.uuid.toArray(),\n app_id: this.appUUID.toArray(),\n is_ok: this.isOK,\n doc_count: this.docCount,\n size: this.size\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n Index.createFromArray = function (array) {\n if (typeof array.uuid == \"undefined\" ||\n typeof array.app_id == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.indexFormatNotValid();\n }\n return new Index(IndexUUID_1.IndexUUID.createFromArray(array.uuid), AppUUID_1.AppUUID.createFromArray(array.app_id), (typeof array.is_ok == \"undefined\" ? false : array.is_ok), (typeof array.doc_count == \"undefined\" ? 0 : array.doc_count), (typeof array.size == \"undefined\" ? '0kb' : array.size));\n };\n return Index;\n}());\nexports.Index = Index;\n","\"use strict\";\nexports.__esModule = true;\nexports.IndexUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * IndexUUID class\n */\nvar IndexUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function IndexUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.indexUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n IndexUUID.createById = function (id) {\n return new IndexUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n IndexUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n IndexUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n IndexUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new IndexUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n IndexUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return IndexUUID;\n}());\nexports.IndexUUID = IndexUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Item = void 0;\nvar tslib_1 = require(\"tslib\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Coordinate_1 = require(\"./Coordinate\");\nvar ItemUUID_1 = require(\"./ItemUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\n/**\n * Item class\n */\nvar Item = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n */\n function Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n this.metadata = {};\n this.indexedMetadata = {};\n this.searchableMetadata = {};\n this.exactMatchingMetadata = [];\n this.suggest = [];\n this.highlights = {};\n this.promoted = false;\n this.uuid = uuid;\n this.coordinate = coordinate;\n this.metadata = metadata;\n this.indexedMetadata = indexedMetadata;\n this.searchableMetadata = searchableMetadata;\n this.exactMatchingMetadata = exactMatchingMetadata;\n this.suggest = suggest;\n }\n /**\n * Create new Item\n *\n * @param uuid\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.create = function (uuid, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, null, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Create new located Item\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.createLocated = function (uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Get uuid\n *\n * @returns ItemUUID\n */\n Item.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get id\n *\n * @returns string\n */\n Item.prototype.getId = function () {\n return this.uuid.getId();\n };\n /**\n * Get type\n *\n * @returns string\n */\n Item.prototype.getType = function () {\n return this.uuid.getType();\n };\n /**\n * Get coordinate\n *\n * @returns Coordinate|null\n */\n Item.prototype.getCoordinate = function () {\n return this.coordinate;\n };\n /**\n * Get distance\n *\n * @returns int\n */\n Item.prototype.getDistance = function () {\n return this.distance;\n };\n /**\n * Get metadata\n *\n * @returns Array\n */\n Item.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Set metadata\n *\n * @param metadata\n */\n Item.prototype.setMetadata = function (metadata) {\n this.metadata = metadata;\n };\n /**\n * Add metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addMetadata = function (key, value) {\n this.metadata[key] = value;\n };\n /**\n * Get indexed metadata\n *\n * @returns Array\n */\n Item.prototype.getIndexedMetadata = function () {\n return this.indexedMetadata;\n };\n /**\n * Set indexed metadata\n *\n * @param indexedMetadata\n */\n Item.prototype.setIndexedMetadata = function (indexedMetadata) {\n this.indexedMetadata = indexedMetadata;\n };\n /**\n * Add indexed metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addIndexedMetadata = function (key, value) {\n this.indexedMetadata[key] = value;\n };\n /**\n * Get searchable metadata\n *\n * @returns Array\n */\n Item.prototype.getSearchableMetadata = function () {\n return this.searchableMetadata;\n };\n /**\n * Set searchable metadata\n *\n * @param searchableMetadata\n */\n Item.prototype.setSearchableMetadata = function (searchableMetadata) {\n this.searchableMetadata = searchableMetadata;\n };\n /**\n * Add searchable metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addSearchableMetadata = function (key, value) {\n this.searchableMetadata[key] = value;\n };\n /**\n * Get exactMatching metadata\n *\n * @returns Array\n */\n Item.prototype.getExactMatchingMetadata = function () {\n return this.exactMatchingMetadata;\n };\n /**\n * Set exactMatching metadata\n *\n * @param exactMatchingMetadata\n */\n Item.prototype.setExactMatchingMetadata = function (exactMatchingMetadata) {\n this.exactMatchingMetadata = exactMatchingMetadata;\n };\n /**\n * Add exactMatching metadata\n *\n * @param value\n */\n Item.prototype.addExactMatchingMetadata = function (value) {\n this.exactMatchingMetadata.push(value);\n };\n /**\n * Get all metadata\n *\n * @returns {{}}\n */\n Item.prototype.getAllMetadata = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.metadata), this.indexedMetadata);\n };\n /**\n * Get\n *\n * @param key\n *\n * @returns mixed|null\n */\n Item.prototype.get = function (key) {\n var allMetadata = this.getAllMetadata();\n return (typeof allMetadata[key] != \"undefined\")\n ? allMetadata[key]\n : null;\n };\n /**\n * Get suggest\n *\n * @returns Array\n */\n Item.prototype.getSuggest = function () {\n return this.suggest;\n };\n /**\n * Get highlights\n *\n * @returns Array\n */\n Item.prototype.getHighlights = function () {\n return this.highlights;\n };\n /**\n * Get highlight\n *\n * @param key\n *\n * @return string|null\n */\n Item.prototype.getHighlight = function (key) {\n return (typeof this.highlights[key] != \"undefined\")\n ? this.highlights[key]\n : null;\n };\n /**\n * Is promoted\n *\n * @returns boolean\n */\n Item.prototype.isPromoted = function () {\n return this.promoted;\n };\n /**\n * Set score\n *\n * @param score\n *\n * @return {Item}\n */\n Item.prototype.setScore = function (score) {\n this.score = score;\n return this;\n };\n /**\n * Get score\n *\n * @return {number}\n */\n Item.prototype.getScore = function () {\n return this.score;\n };\n /**\n * Set appUUID\n *\n * @return {AppUUID}\n */\n Item.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Set indexUUID\n *\n * @return {IndexUUID}\n */\n Item.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n /**\n * To array\n */\n Item.prototype.toArray = function () {\n var itemAsArray = {\n uuid: this.uuid.toArray()\n };\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n itemAsArray.coordinate = this.coordinate.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n itemAsArray.metadata = this.metadata;\n }\n if (Object.keys(this.indexedMetadata).length > 0) {\n itemAsArray.indexed_metadata = this.indexedMetadata;\n }\n if (Object.keys(this.searchableMetadata).length > 0) {\n itemAsArray.searchable_metadata = this.searchableMetadata;\n }\n if (this.exactMatchingMetadata.length > 0) {\n itemAsArray.exact_matching_metadata = this.exactMatchingMetadata;\n }\n if (this.suggest.length > 0) {\n itemAsArray.suggest = this.suggest;\n }\n if (Object.keys(this.highlights).length > 0) {\n itemAsArray.highlights = this.highlights;\n }\n if (this.isPromoted()) {\n itemAsArray.is_promoted = true;\n }\n if (typeof this.distance != \"undefined\") {\n itemAsArray.distance = this.distance;\n }\n if (typeof this.score != \"undefined\") {\n itemAsArray.score = this.score;\n }\n if (typeof this.appUUID != \"undefined\") {\n itemAsArray.app_uuid = this.appUUID.toArray();\n }\n if (typeof this.indexUUID != \"undefined\") {\n itemAsArray.index_uuid = this.indexUUID.toArray();\n }\n return itemAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n */\n Item.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.uuid != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.itemUUIDRepresentationNotValid();\n }\n if (typeof array.coordinate != \"undefined\" &&\n typeof array.coordinate != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n var item = (typeof array.coordinate == \"object\" &&\n array.coordinate != null)\n ? Item.createLocated(ItemUUID_1.ItemUUID.createFromArray(array.uuid), Coordinate_1.Coordinate.createFromArray(array.coordinate), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest))\n : Item.create(ItemUUID_1.ItemUUID.createFromArray(array.uuid), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest));\n if (typeof array.distance != \"undefined\" &&\n array.distance != null) {\n item.distance = array.distance;\n }\n if (typeof array.highlights == \"object\" &&\n array.highlights != null) {\n item.highlights = array.highlights;\n }\n if (typeof array.is_promoted != \"undefined\" &&\n array.is_promoted != null) {\n item.promoted = array.is_promoted;\n }\n if (typeof array.score != \"undefined\" &&\n array.score != null) {\n item.score = array.score;\n }\n if (typeof array.app_uuid != \"undefined\" &&\n array.app_uuid != null) {\n item.appUUID = AppUUID_1.AppUUID.createFromArray(array.app_uuid);\n }\n if (typeof array.index_uuid != \"undefined\" &&\n array.index_uuid != null) {\n item.indexUUID = IndexUUID_1.IndexUUID.createFromArray(array.index_uuid);\n }\n return item;\n };\n /**\n * Compose uuid\n *\n * @returns string\n */\n Item.prototype.composeUUID = function () {\n return this.uuid.composedUUID();\n };\n /**\n * Get path by field.\n *\n * @param field\n *\n * @returns {string}\n */\n Item.getPathByField = function (field) {\n return ([\"id\", \"type\"].indexOf(field) > -1)\n ? \"uuid.\" + field\n : \"indexed_metadata.\" + field;\n };\n return Item;\n}());\nexports.Item = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.ItemUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * ItemUUID class\n */\nvar ItemUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n * @param type\n */\n function ItemUUID(id, type) {\n this.id = id;\n this.type = type;\n }\n /**\n * Create composed UUID\n *\n * @param composedUUID\n *\n * @returns {ItemUUID}\n */\n ItemUUID.createByComposedUUID = function (composedUUID) {\n var parts = composedUUID.split(\"~\");\n if (2 != parts.length) {\n throw InvalidFormatError_1.InvalidFormatError.composedItemUUIDNotValid();\n }\n return new ItemUUID(parts[0], parts[1]);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n ItemUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * Get type\n *\n * @returns {string}\n */\n ItemUUID.prototype.getType = function () {\n return this.type;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n ItemUUID.prototype.toArray = function () {\n return {\n id: this.id,\n type: this.type\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n ItemUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new ItemUUID(array.id, array.type);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n ItemUUID.prototype.composedUUID = function () {\n return this.id + \"~\" + this.type;\n };\n return ItemUUID;\n}());\nexports.ItemUUID = ItemUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Metadata = void 0;\n/**\n * User class\n */\nvar Metadata = /** @class */ (function () {\n function Metadata() {\n }\n /**\n * To metadata\n *\n * @param array:{}\n *\n * @returns {string}\n */\n Metadata.toMetadata = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var parts = [];\n for (var key in array) {\n parts.push(key + \"##\" + array[key]);\n }\n return parts.join(\"~~\");\n };\n /**\n * From metadata\n *\n * @param metadata\n *\n * @return {{}}\n */\n Metadata.fromMetadata = function (metadata) {\n var values = {};\n var splittedParts = metadata.split(\"~~\");\n var iterator = 0;\n var size = 0;\n var lastElement = null;\n for (var key in splittedParts) {\n var part = splittedParts[key];\n var parts = part.split(\"##\");\n if (parts.length > 1) {\n lastElement = parts[1];\n values[parts[0]] = lastElement;\n }\n else {\n lastElement = part;\n values[iterator++] = lastElement;\n }\n size++;\n }\n if (size == 1) {\n values = {\n id: lastElement,\n name: lastElement\n };\n }\n if (typeof values.id == \"undefined\") {\n return null;\n }\n return values;\n };\n return Metadata;\n}());\nexports.Metadata = Metadata;\n","\"use strict\";\nexports.__esModule = true;\nexports.User = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * User class\n */\nvar User = /** @class */ (function () {\n /**\n * Construct\n *\n * @param id string\n * @param attributes Array\n */\n function User(id, attributes) {\n if (attributes === void 0) { attributes = {}; }\n this.id = id;\n this.attributes = attributes;\n }\n /**\n * Return the user id\n *\n * @return {string}\n */\n User.prototype.getId = function () {\n return this.id;\n };\n /**\n * Return array\n *\n * @returns {{}}\n */\n User.prototype.getAttributes = function () {\n return this.attributes;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n User.prototype.toArray = function () {\n var array = {\n id: this.id\n };\n if (Object.keys(this.attributes).length > 0) {\n array.attributes = this.attributes;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n User.createFromArray = function (array) {\n if (array == null ||\n typeof array.id == \"undefined\" ||\n array.id == null) {\n throw InvalidFormatError_1.InvalidFormatError.userFormatNotValid();\n }\n var attributes = typeof array.attributes === typeof {}\n ? array.attributes\n : {};\n return new User(array.id, attributes);\n };\n return User;\n}());\nexports.User = User;\n","\"use strict\";\nexports.__esModule = true;\nexports.Aggregation = exports.AGGREGATION_NO_LIMIT = exports.AGGREGATION_SORT_BY_NAME_DESC = exports.AGGREGATION_SORT_BY_NAME_ASC = exports.AGGREGATION_SORT_BY_COUNT_DESC = exports.AGGREGATION_SORT_BY_COUNT_ASC = void 0;\nvar Filter_1 = require(\"./Filter\");\n/**\n * Aggregation constants\n */\nexports.AGGREGATION_SORT_BY_COUNT_ASC = [\"_count\", \"asc\"];\nexports.AGGREGATION_SORT_BY_COUNT_DESC = [\"_count\", \"desc\"];\nexports.AGGREGATION_SORT_BY_NAME_ASC = [\"_term\", \"asc\"];\nexports.AGGREGATION_SORT_BY_NAME_DESC = [\"_term\", \"desc\"];\nexports.AGGREGATION_NO_LIMIT = 0;\n/**\n * Aggregation class\n */\nvar Aggregation = /** @class */ (function () {\n /**\n * Construct\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n */\n function Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n this.subgroup = [];\n this.name = name;\n this.field = field;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.subgroup = subgroup;\n this.sort = sort;\n this.limit = limit;\n this.promoted = promoted;\n }\n /**\n * Get name\n *\n * @returns {string}\n */\n Aggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get field\n *\n * @returns {string}\n */\n Aggregation.prototype.getField = function () {\n return this.field;\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Aggregation.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Aggregation.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get subgroup\n *\n * @return {[]}\n */\n Aggregation.prototype.getSubgroup = function () {\n return this.subgroup;\n };\n /**\n * Get sort\n *\n * @return {[]}\n */\n Aggregation.prototype.getSort = function () {\n return this.sort;\n };\n /**\n * Get limit\n *\n * @return {number}\n */\n Aggregation.prototype.getLimit = function () {\n return this.limit;\n };\n /**\n * Get promoted\n *\n * @return {[]}\n */\n Aggregation.prototype.getPromoted = function () {\n return this.promoted;\n };\n /**\n * Create\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n *\n * @returns {Aggregation}\n */\n Aggregation.create = function (name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n if (subgroup === void 0) { subgroup = []; }\n if (sort === void 0) { sort = exports.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = exports.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return new Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Aggregation.prototype.toArray = function () {\n var aggregationAsArray = {\n name: this.name\n };\n if (this.field !== \"uuid.type\") {\n aggregationAsArray.field = this.field;\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n aggregationAsArray.application_type = this.applicationType;\n }\n if (this.filterType !== Filter_1.FILTER_TYPE_FIELD) {\n aggregationAsArray.filter_type = this.filterType;\n }\n if (this.subgroup.length > 0) {\n aggregationAsArray.subgroup = this.subgroup;\n }\n if (JSON.stringify(this.sort) !== JSON.stringify(exports.AGGREGATION_SORT_BY_COUNT_DESC)) {\n aggregationAsArray.sort = this.sort;\n }\n if (this.limit !== exports.AGGREGATION_NO_LIMIT) {\n aggregationAsArray.limit = this.limit;\n }\n if (this.promoted.length > 0) {\n aggregationAsArray.promoted = this.promoted;\n }\n return aggregationAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Aggregation}\n */\n Aggregation.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field === \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.application_type === \"undefined\") {\n array.application_type = Filter_1.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type === \"undefined\") {\n array.filter_type = Filter_1.FILTER_TYPE_FIELD;\n }\n if (typeof array.subgroup === \"undefined\") {\n array.subgroup = [];\n }\n if (typeof array.sort === \"undefined\") {\n array.sort = exports.AGGREGATION_SORT_BY_COUNT_DESC;\n }\n if (typeof array.limit === \"undefined\") {\n array.limit = exports.AGGREGATION_NO_LIMIT;\n }\n if (typeof array.promoted === \"undefined\") {\n array.promoted = [];\n }\n return Aggregation.create(array.name, array.field, array.application_type, array.filter_type, array.subgroup, array.sort, array.limit, array.promoted);\n };\n return Aggregation;\n}());\nexports.Aggregation = Aggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.Filter = exports.FILTER_TYPE_QUERY = exports.FILTER_TYPE_GEO = exports.FILTER_TYPE_DATE_RANGE = exports.FILTER_TYPE_RANGE = exports.FILTER_TYPE_FIELD = exports.FILTER_PROMOTE = exports.FILTER_EXCLUDE = exports.FILTER_AT_LEAST_ONE = exports.FILTER_MUST_ALL_WITH_LEVELS = exports.FILTER_MUST_ALL = void 0;\n/**\n * filter constants\n */\nexports.FILTER_MUST_ALL = 4;\nexports.FILTER_MUST_ALL_WITH_LEVELS = 5;\nexports.FILTER_AT_LEAST_ONE = 8;\nexports.FILTER_EXCLUDE = 16;\nexports.FILTER_PROMOTE = 32;\nexports.FILTER_TYPE_FIELD = \"field\";\nexports.FILTER_TYPE_RANGE = \"range\";\nexports.FILTER_TYPE_DATE_RANGE = \"date_range\";\nexports.FILTER_TYPE_GEO = \"geo\";\nexports.FILTER_TYPE_QUERY = \"query\";\n/**\n * Filter class\n */\nvar Filter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n */\n function Filter(field, values, applicationType, filterType, filterTerms) {\n this.field = field;\n this.values = values;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.filterTerms = filterTerms;\n }\n /**\n * Get field\n *\n * @returns {string}\n */\n Filter.prototype.getField = function () {\n return this.field;\n };\n /**\n * Get values\n *\n * @returns {any}\n */\n Filter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Has value\n *\n * @param value\n *\n * @returns {boolean}\n */\n Filter.prototype.hasValue = function (value) {\n return typeof this.values[value] == \"undefined\";\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Filter.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Filter.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get filter type\n *\n * @return {{}}\n */\n Filter.prototype.getFilterTerms = function () {\n return this.filterTerms;\n };\n /**\n * Create\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n *\n * @return {Filter}\n */\n Filter.create = function (field, values, applicationType, filterType, filterTerms) {\n if (filterTerms === void 0) { filterTerms = []; }\n return new Filter(field, values, applicationType, filterType, filterTerms);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Filter.prototype.toArray = function () {\n var filterAsArray = {};\n if (this.field != \"uuid.type\") {\n filterAsArray.field = this.field;\n }\n if (this.values.length > 0 ||\n Object.keys(this.values).length > 0) {\n filterAsArray.values = this.values;\n }\n if (this.applicationType != exports.FILTER_AT_LEAST_ONE) {\n filterAsArray.application_type = this.applicationType;\n }\n if (this.filterType != exports.FILTER_TYPE_FIELD) {\n filterAsArray.filter_type = this.filterType;\n }\n if (this.filterTerms.length > 0) {\n filterAsArray.filter_terms = this.filterTerms;\n }\n return filterAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Filter}\n */\n Filter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field == \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.values == \"undefined\") {\n array.values = [];\n }\n if (typeof array.application_type == \"undefined\") {\n array.application_type = exports.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type == \"undefined\") {\n array.filter_type = exports.FILTER_TYPE_FIELD;\n }\n if (typeof array.filter_terms == \"undefined\") {\n array.filter_terms = [];\n }\n return Filter.create(array.field, array.values, array.application_type, array.filter_type, array.filter_terms);\n };\n return Filter;\n}());\nexports.Filter = Filter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Query = exports.NO_MIN_SCORE = exports.QUERY_DEFAULT_SIZE = exports.QUERY_DEFAULT_PAGE = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Item_1 = require(\"../Model/Item\");\nvar User_1 = require(\"../Model/User\");\nvar Aggregation_1 = require(\"./Aggregation\");\nvar Filter_1 = require(\"./Filter\");\nvar Filter_2 = require(\"./Filter\");\nvar Aggregation_2 = require(\"./Aggregation\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Filter_3 = require(\"./Filter\");\nvar ScoreStrategies_1 = require(\"./ScoreStrategies\");\nvar SortBy_1 = require(\"./SortBy\");\nvar IndexUUID_1 = require(\"../Model/IndexUUID\");\n/**\n * Query constants\n */\nexports.QUERY_DEFAULT_PAGE = 1;\nexports.QUERY_DEFAULT_SIZE = 10;\nexports.NO_MIN_SCORE = 0.0;\n/**\n * Query class\n */\nvar Query = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryText\n */\n function Query(queryText) {\n this.UUID = null;\n this.fields = [];\n this.universeFilters = {};\n this.filters = {};\n this.itemsPromoted = [];\n this.aggregations = {};\n this.resultsEnabled = true;\n this.aggregationsEnabled = true;\n this.numberOfSuggestions = 0;\n this.highlightsEnabled = false;\n this.autocompleteEnabled = false;\n this.searchableFields = [];\n this.fuzziness = null;\n this.minScore = exports.NO_MIN_SCORE;\n this.metadata = {};\n this.subqueries = {};\n this.queryOperator = null;\n this.sortByInstance = SortBy_1.SortBy.create();\n this.filters._query = Filter_1.Filter.create(\"\", [queryText], 0, Filter_3.FILTER_TYPE_QUERY);\n }\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.createLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n var query = Query.create(queryText, page, size);\n query.coordinate = coordinate;\n return query;\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.create = function (queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n page = Math.max(1, page);\n var query = new Query(queryText);\n query.from = (page - 1) * size;\n query.size = size;\n query.page = page;\n return query;\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Query.createMatchAll = function () {\n return Query.create(\"\", exports.QUERY_DEFAULT_PAGE, exports.QUERY_DEFAULT_SIZE);\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Query.createByUUID = function (uuid) {\n return Query.createByUUIDs(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.createByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n var ids = [];\n for (var i in uuids) {\n ids.push(uuids[i].composedUUID());\n }\n var query = Query.create(\"\", exports.QUERY_DEFAULT_PAGE, ids.length)\n .disableAggregations()\n .disableSuggestions();\n query.filters._id = Filter_1.Filter.create(\"_id\", ids, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD);\n return query;\n };\n /**\n * Create by UUIDs\n *\n * @param queries\n *\n * @return {Query}\n */\n Query.createMultiquery = function (queries) {\n var query = Query.createMatchAll();\n query.subqueries = queries;\n return query;\n };\n /**\n * set fields\n *\n * @param fields\n *\n * @return {Query}\n */\n Query.prototype.setFields = function (fields) {\n this.fields = fields;\n return this;\n };\n /**\n * get fields\n *\n * @return {string[]}\n */\n Query.prototype.getFields = function () {\n return this.fields;\n };\n /**\n * Filter universe by types\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByTypes = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.type;\n }\n return this;\n };\n /**\n * Filter by types\n *\n * @param values\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByTypes = function (values, aggregate, aggregationSort) {\n var _a, _b;\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.type;\n }\n if (aggregate) {\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_b = {}, _b[\"type\"] = Aggregation_1.Aggregation.create(\"type\", fieldPath, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort), _b));\n }\n return this;\n };\n /**\n * Filter universe by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.id;\n }\n return this;\n };\n /**\n * Filter by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.id;\n }\n return this;\n };\n /**\n * Filter universe by\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseBy = function (field, values, applicationType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter by\n *\n * @param filterName\n * @param field\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterBy = function (filterName, field, values, applicationType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateBy(filterName, field, applicationType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter universe by range\n *\n * @param field\n * @param values\n * @param applicationType\n * @param rangeType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByRange = function (field, values, applicationType, rangeType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter universe by date range\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByDateRange = function (field, values, applicationType) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n return this.filterUniverseByRange(field, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE);\n };\n /**\n * Filter by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param values\n * @param applicationType\n * @param rangeType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByRange = function (filterName, field, ranges, values, applicationType, rangeType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length !== 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateByRange(filterName, fieldPath, ranges, applicationType, rangeType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByDateRange = function (filterName, field, options, values, applicationType, aggregate, aggregationSort) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n return this.filterByRange(filterName, field, options, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregate, aggregationSort);\n };\n /**\n * Filter universe by location\n *\n * @param locationRange\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByLocation = function (locationRange) {\n var _a;\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"coordinate\"] = Filter_1.Filter.create(\"coordinate\", locationRange.toArray(), Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_GEO), _a));\n return this;\n };\n /**\n * Set filter fields\n *\n * @param searchableFields\n *\n * @return {Query}\n */\n Query.prototype.setSearchableFields = function (searchableFields) {\n this.searchableFields = searchableFields;\n return this;\n };\n /**\n * Get filter fields\n *\n * @return {string[]}\n */\n Query.prototype.getSearchableFields = function () {\n return this.searchableFields;\n };\n /**\n * Sort by\n *\n * @param sortBy\n *\n * @return {Query}\n */\n Query.prototype.sortBy = function (sortBy) {\n if (sortBy.isSortedByGeoDistance()) {\n if (!(this.coordinate instanceof Coordinate_1.Coordinate)) {\n throw InvalidFormatError_1.InvalidFormatError.querySortedByDistanceWithoutCoordinate();\n }\n sortBy.setCoordinate(this.coordinate);\n }\n this.sortByInstance = sortBy;\n return this;\n };\n /**\n * Aggregate by\n *\n * @param filterName\n * @param field\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateBy = function (filterName, field, applicationType, aggregationSort, limit, promoted) {\n var _a;\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param applicationType\n * @param rangeType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByRange = function (filterName, field, ranges, applicationType, rangeType, aggregationSort, limit, promoted) {\n var _a;\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n if (ranges.length === 0) {\n return this;\n }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, rangeType, ranges, aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByDateRange = function (filterName, field, options, applicationType, aggregationSort, limit, promoted) {\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return this.aggregateByRange(filterName, field, options, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregationSort, limit, promoted);\n };\n /**\n * Get aggregations\n *\n * @return {{}}\n */\n Query.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation by name\n *\n * @param aggregationName\n *\n * @return {Aggregation|null}\n */\n Query.prototype.getAggregation = function (aggregationName) {\n return this.aggregations[aggregationName] instanceof Aggregation_1.Aggregation\n ? this.aggregations[aggregationName]\n : null;\n };\n /**\n * Get query text\n *\n * @return {string}\n */\n Query.prototype.getQueryText = function () {\n var filter = this.filters._query;\n return filter instanceof Filter_1.Filter\n ? filter.getValues()[0]\n : \"\";\n };\n /**\n * Get universe filters\n *\n * @return {{}}\n */\n Query.prototype.getUniverseFilters = function () {\n return this.universeFilters;\n };\n /**\n * Get universe filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getUniverseFilter = function (filterName) {\n return this.universeFilters[filterName] instanceof Filter_1.Filter\n ? this.universeFilters[filterName]\n : null;\n };\n /**\n * Get filters\n *\n * @return {{}}\n */\n Query.prototype.getFilters = function () {\n return this.filters;\n };\n /**\n * Get filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilter = function (filterName) {\n return this.filters[filterName] instanceof Filter_1.Filter\n ? this.filters[filterName]\n : null;\n };\n /**\n * Get filter by field\n *\n * @param fieldName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilterByField = function (fieldName) {\n var fieldPath = Item_1.Item.getPathByField(fieldName);\n for (var i in this.filters) {\n if (this.filters[i].getField() == fieldPath) {\n return this.filters[i];\n }\n }\n return null;\n };\n /**\n * Get sort by\n *\n * @return {SortBy}\n */\n Query.prototype.getSortBy = function () {\n return this.sortByInstance;\n };\n /**\n * Get from\n *\n * @return {number}\n */\n Query.prototype.getFrom = function () {\n return this.from;\n };\n /**\n * Get size\n *\n * @return {number}\n */\n Query.prototype.getSize = function () {\n return this.size;\n };\n /**\n * Get page\n *\n * @return {number}\n */\n Query.prototype.getPage = function () {\n return this.page;\n };\n /**\n * Enable results\n *\n * @return {Query}\n */\n Query.prototype.enableResults = function () {\n this.resultsEnabled = true;\n return this;\n };\n /**\n * Disable results\n *\n * @return {Query}\n */\n Query.prototype.disableResults = function () {\n this.resultsEnabled = false;\n return this;\n };\n /**\n * Are results enabled\n *\n * @return {boolean}\n */\n Query.prototype.areResultsEnabled = function () {\n return this.resultsEnabled;\n };\n /**\n * Enable aggregations\n *\n * @return {Query}\n */\n Query.prototype.enableAggregations = function () {\n this.aggregationsEnabled = true;\n return this;\n };\n /**\n * Disable aggregations\n *\n * @return {Query}\n */\n Query.prototype.disableAggregations = function () {\n this.aggregationsEnabled = false;\n return this;\n };\n /**\n * Are aggregations enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAggregationsEnabled = function () {\n return this.aggregationsEnabled;\n };\n /**\n * Set number of suggestions\n *\n * @param numberOfSuggestions\n *\n * @return {Query}\n */\n Query.prototype.setNumberOfSuggestions = function (numberOfSuggestions) {\n this.numberOfSuggestions = numberOfSuggestions;\n return this;\n };\n /**\n * Disable suggestions\n *\n * @return {Query}\n */\n Query.prototype.disableSuggestions = function () {\n this.numberOfSuggestions = 0;\n return this;\n };\n /**\n * Get number of suggestions\n *\n * @return {number}\n */\n Query.prototype.getNumberOfSuggestions = function () {\n return this.numberOfSuggestions;\n };\n /**\n * Enable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.enableAutocomplete = function () {\n this.autocompleteEnabled = true;\n return this;\n };\n /**\n * Disable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.disableAutocomplete = function () {\n this.autocompleteEnabled = false;\n return this;\n };\n /**\n * Are autocomplete enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAutocompleteEnabled = function () {\n return this.autocompleteEnabled;\n };\n /**\n * Enable highlights\n *\n * @return {Query}\n */\n Query.prototype.enableHighlights = function () {\n this.highlightsEnabled = true;\n return this;\n };\n /**\n * Disable highlights\n *\n * @return {Query}\n */\n Query.prototype.disableHighlights = function () {\n this.highlightsEnabled = false;\n return this;\n };\n /**\n * Are highlights enabled\n *\n * @return {boolean}\n */\n Query.prototype.areHighlightsEnabled = function () {\n return this.highlightsEnabled;\n };\n /**\n * Promote uuid\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.promoteUUID = function (itemUUID) {\n this\n .itemsPromoted\n .push(itemUUID);\n return this;\n };\n /**\n * Promote UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.promoteUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.itemsPromoted = uuids;\n return this;\n };\n /**\n * Get promoted UUIDs\n *\n * @return {ItemUUID[]}\n */\n Query.prototype.getItemsPromoted = function () {\n return this.itemsPromoted;\n };\n /**\n * Exclude id\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.excludeUUID = function (itemUUID) {\n this.excludeUUIDs(itemUUID);\n return this;\n };\n /**\n * Exclude UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.excludeUUIDs = function () {\n var _a;\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"excluded_ids\"] = Filter_1.Filter.create(\"_id\", uuids.map(function (uuid) { return uuid.composedUUID(); }), Filter_2.FILTER_EXCLUDE, Filter_2.FILTER_TYPE_FIELD), _a));\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategies}\n */\n Query.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Set score strategies\n *\n * @param scoreStrategies\n */\n Query.prototype.setScoreStrategies = function (scoreStrategies) {\n this.scoreStrategies = scoreStrategies;\n return this;\n };\n /**\n * Get fuzziness\n *\n * @return any\n */\n Query.prototype.getFuzziness = function () {\n return this.fuzziness;\n };\n /**\n * Set fuzziness\n *\n * @param fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setFuzziness = function (fuzziness) {\n this.fuzziness = fuzziness;\n return this;\n };\n /**\n * Set auto fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setAutoFuzziness = function () {\n this.fuzziness = 'AUTO';\n return this;\n };\n /**\n * Get min score\n *\n * @return any\n */\n Query.prototype.getMinScore = function () {\n return this.minScore;\n };\n /**\n * Set min score\n *\n * @param minScore\n *\n * @return {Query}\n */\n Query.prototype.setMinScore = function (minScore) {\n this.minScore = minScore;\n return this;\n };\n /**\n * By user\n *\n * @param user\n *\n * @return {Query}\n */\n Query.prototype.byUser = function (user) {\n this.user = user;\n return this;\n };\n /**\n * By anyone\n *\n * @return {null}\n */\n Query.prototype.anonymously = function () {\n this.user = null;\n return null;\n };\n /**\n * Get user\n *\n * @return {User}\n */\n Query.prototype.getUser = function () {\n return this.user;\n };\n /**\n * set metadata value\n *\n * @param name\n * @param value\n *\n * @return {Query}\n */\n Query.prototype.setMetadataValue = function (name, value) {\n this.metadata[name] = value;\n return this;\n };\n /**\n * Get metadata\n *\n * @return any\n */\n Query.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Add subquery\n *\n * @param name\n * @param subquery\n *\n * @return {Query}\n */\n Query.prototype.addSubquery = function (name, subquery) {\n this.subqueries[name] = subquery;\n return this;\n };\n /**\n * Get subqueries\n *\n * @return {Object}\n */\n Query.prototype.getSubqueries = function () {\n return this.subqueries;\n };\n /**\n * Identify it\n *\n * @param UUID\n *\n * @return {Query}\n */\n Query.prototype.identifyWith = function (UUID) {\n this.UUID = UUID;\n return this;\n };\n /**\n * Get identification\n *\n * @return {string|null}\n */\n Query.prototype.getUUID = function () {\n return this.UUID;\n };\n /**\n * Force Index UUID.\n *\n * @param indexUUID\n *\n * @return {Query}\n */\n Query.prototype.forceIndexUUID = function (indexUUID) {\n this.indexUUID = indexUUID;\n return this;\n };\n /**\n * Get IndexUUID\n *\n * @return {IndexUUID|null}\n */\n Query.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n Query.prototype.setQueryOperator = function (queryOperator) {\n this.queryOperator = queryOperator;\n return this;\n };\n Query.prototype.getQueryOperator = function () {\n return this.queryOperator;\n };\n /**\n * To array\n *\n * @return {any}\n */\n Query.prototype.toArray = function () {\n var array = {};\n if (this.UUID !== null) {\n array.UUID = this.UUID;\n }\n if (this.getQueryText() !== \"\") {\n array.q = this.getQueryText();\n }\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n array.coordinate = this.coordinate.toArray();\n }\n /**\n * Fields\n */\n if (this.fields instanceof Array &&\n this.fields.length > 0) {\n array.fields = this.fields;\n }\n /**\n * Universe Filters\n */\n if (Object.keys(this.universeFilters).length) {\n array.universe_filters = {};\n for (var i in this.universeFilters) {\n var universeFilter = this.universeFilters[i];\n array.universe_filters[i] = universeFilter.toArray();\n }\n }\n /**\n * Filters\n */\n if (this.filters instanceof Object &&\n Object.keys(this.filters).length) {\n var filters = {};\n for (var i in this.filters) {\n var filter = this.filters[i];\n if (filter.getFilterType() !== Filter_3.FILTER_TYPE_QUERY) {\n filters[i] = filter.toArray();\n }\n }\n if (Object.keys(filters).length > 0) {\n array.filters = filters;\n }\n }\n /**\n * Aggregations\n */\n if (this.aggregations instanceof Object &&\n Object.keys(this.aggregations).length) {\n array.aggregations = {};\n for (var i in this.aggregations) {\n var aggregation = this.aggregations[i];\n array.aggregations[i] = aggregation.toArray();\n }\n }\n /**\n * Sort\n */\n var sort = this.sortByInstance.toArray();\n if (Object.keys(sort).length) {\n array.sort = sort;\n }\n /**\n * Page\n */\n var page = this.page;\n if (page !== exports.QUERY_DEFAULT_PAGE) {\n array.page = page;\n }\n /**\n * Size\n */\n var size = this.size;\n if (size !== exports.QUERY_DEFAULT_SIZE) {\n array.size = size;\n }\n /**\n * Booleans\n */\n if (this.resultsEnabled === false) {\n array.results_enabled = false;\n }\n if (this.autocompleteEnabled === true) {\n array.autocomplete_enabled = true;\n }\n if (this.numberOfSuggestions !== 0) {\n array.number_of_suggestions = this.numberOfSuggestions;\n }\n if (this.highlightsEnabled === true) {\n array.highlight_enabled = true;\n }\n if (this.aggregationsEnabled === false) {\n array.aggregations_enabled = false;\n }\n /**\n * Filter fields\n */\n if (this.searchableFields instanceof Array &&\n this.searchableFields.length > 0) {\n array.searchable_fields = this.searchableFields;\n }\n /**\n * Score strategies\n */\n if (this.scoreStrategies instanceof ScoreStrategies_1.ScoreStrategies) {\n var scoreStrategiesAsArray = this.scoreStrategies.toArray();\n if (Object.keys(scoreStrategiesAsArray).length > 0) {\n array.score_strategies = scoreStrategiesAsArray;\n }\n }\n if (this.fuzziness !== null) {\n array.fuzziness = this.fuzziness;\n }\n /**\n * Min score\n */\n var minScore = this.minScore;\n if (minScore !== exports.NO_MIN_SCORE) {\n array.min_score = minScore;\n }\n /**\n * User\n */\n if (this.user instanceof User_1.User) {\n array.user = this.user.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n array.metadata = this.metadata;\n }\n if (this.subqueries instanceof Object &&\n Object.keys(this.subqueries).length) {\n array.subqueries = {};\n for (var i in this.subqueries) {\n var subquery = this.subqueries[i];\n array.subqueries[i] = subquery.toArray();\n }\n }\n if (this.indexUUID instanceof IndexUUID_1.IndexUUID) {\n array.index_uuid = this.indexUUID.toArray();\n }\n /**\n * items promoted\n */\n if (this.itemsPromoted.length > 0) {\n array.items_promoted = [];\n for (var i in this.itemsPromoted) {\n array\n .items_promoted\n .push(this.itemsPromoted[i].toArray());\n }\n }\n if (this.queryOperator !== \"or\" && this.queryOperator !== null) {\n array.query_operator = this.queryOperator;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Query}\n */\n Query.createFromArray = function (array) {\n var query = array.coordinate instanceof Object\n ? Query.createLocated(Coordinate_1.Coordinate.createFromArray(array.coordinate), array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE)\n : Query.create(array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE);\n query.UUID = typeof array.UUID === typeof \"\"\n ? array.UUID\n : undefined;\n /**\n * Fields\n */\n query.fields = array.fields instanceof Array\n ? array.fields\n : [];\n /**\n * Aggregations\n */\n var aggregationsAsArray = typeof array.aggregations === typeof {}\n ? array.aggregations\n : {};\n for (var i in aggregationsAsArray) {\n query.aggregations[i] = Aggregation_1.Aggregation.createFromArray(aggregationsAsArray[i]);\n }\n /**\n * Sort\n */\n var sortAsArray = typeof array.sort === typeof {}\n ? array.sort\n : {};\n if (Object.keys(sortAsArray).length > 0) {\n query.sortByInstance = SortBy_1.SortBy.createFromArray(sortAsArray);\n }\n /**\n * Filters\n */\n var filtersAsArray = typeof array.filters === typeof {}\n ? array.filters\n : {};\n for (var i in filtersAsArray) {\n query.filters[i] = Filter_1.Filter.createFromArray(filtersAsArray[i]);\n }\n /**\n * Universe Filters\n */\n var universeFiltersAsArray = typeof array.universe_filters === typeof {}\n ? array.universe_filters\n : {};\n for (var i in universeFiltersAsArray) {\n query.universeFilters[i] = Filter_1.Filter.createFromArray(universeFiltersAsArray[i]);\n }\n /**\n * Booleans\n */\n query.resultsEnabled = typeof array.results_enabled === \"boolean\"\n ? array.results_enabled\n : true;\n query.numberOfSuggestions = typeof array.number_of_suggestions === \"number\"\n ? array.number_of_suggestions\n : 0;\n query.autocompleteEnabled = typeof array.autocomplete_enabled === \"boolean\"\n ? array.autocomplete_enabled\n : false;\n query.aggregationsEnabled = typeof array.aggregations_enabled === \"boolean\"\n ? array.aggregations_enabled\n : true;\n query.highlightsEnabled = typeof array.highlight_enabled === \"boolean\"\n ? array.highlight_enabled\n : false;\n query.fuzziness = array.fuzziness ? array.fuzziness : null;\n query.minScore = array.min_score ? array.min_score : exports.NO_MIN_SCORE;\n /**\n * Items promoted\n */\n var itemsPromotedAsArray = typeof array.items_promoted === typeof {}\n ? array.items_promoted\n : {};\n for (var i in itemsPromotedAsArray) {\n query\n .itemsPromoted\n .push(ItemUUID_1.ItemUUID.createFromArray(itemsPromotedAsArray[i]));\n }\n /**\n * Subqueries\n */\n var subqueriesAsArray = typeof array.subqueries === typeof {}\n ? array.subqueries\n : {};\n for (var i in subqueriesAsArray) {\n query.subqueries[i] = Query.createFromArray(subqueriesAsArray[i]);\n }\n /**\n * Filter fields\n */\n query.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n query.searchableFields = array.searchable_fields instanceof Array\n ? array.searchable_fields\n : [];\n query.scoreStrategies = array.score_strategies instanceof Object\n ? ScoreStrategies_1.ScoreStrategies.createFromArray(array.score_strategies)\n : undefined;\n query.user = array.user instanceof Object\n ? User_1.User.createFromArray(array.user)\n : undefined;\n query.indexUUID = array.index_uuid instanceof Object\n ? IndexUUID_1.IndexUUID.createFromArray(array.index_uuid)\n : undefined;\n query.queryOperator = typeof array.query_operator === \"string\"\n ? array.query_operator\n : \"or\";\n return query;\n };\n return Query;\n}());\nexports.Query = Query;\n","\"use strict\";\nexports.__esModule = true;\nexports.Range = exports.RANGE_SEPARATOR = exports.RANGE_INFINITE = exports.RANGE_MINUS_INFINITE = void 0;\n/**\n * Aggregation constants\n */\nexports.RANGE_MINUS_INFINITE = null;\nexports.RANGE_INFINITE = null;\nexports.RANGE_SEPARATOR = \"..\";\n/**\n * Filter class\n */\nvar Range = /** @class */ (function () {\n function Range() {\n }\n /**\n * Strong to array\n *\n * @param string\n *\n * @returns {[number, number]}\n */\n Range.stringToArray = function (string) {\n var parts = string.split(exports.RANGE_SEPARATOR);\n var from = parts[0];\n var to = parts[1];\n var finalFrom = exports.RANGE_MINUS_INFINITE;\n var finalTo = exports.RANGE_INFINITE;\n if (from != \"\") {\n finalFrom = parseInt(from);\n }\n if (to != \"\") {\n finalTo = parseInt(to);\n }\n return [finalFrom, finalTo];\n };\n /**\n * Array to string\n *\n * @param values\n *\n * @return {string}\n */\n Range.arrayToString = function (values) {\n var finalValues = [\"\", \"\"];\n if (values[0] != exports.RANGE_MINUS_INFINITE) {\n finalValues[0] = String(values[0]);\n }\n if (values[1] != exports.RANGE_INFINITE) {\n finalValues[1] = String(values[1]);\n }\n return finalValues.join(exports.RANGE_SEPARATOR);\n };\n /**\n * Create ranges\n *\n * @param from\n * @param to\n * @param incremental\n */\n Range.createRanges = function (from, to, incremental) {\n var ranges = [];\n var nextTo;\n while (from < to) {\n nextTo = from + incremental;\n ranges.push(from + exports.RANGE_SEPARATOR + nextTo);\n from = nextTo;\n }\n return ranges;\n };\n return Range;\n}());\nexports.Range = Range;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategies = exports.MIN = exports.MAX = exports.AVG = exports.SUM = exports.MULTIPLY = void 0;\nvar ScoreStrategy_1 = require(\"./ScoreStrategy\");\n/**\n * ScoreStrategies constants\n */\nexports.MULTIPLY = 'multiply';\nexports.SUM = 'sum';\nexports.AVG = 'avg';\nexports.MAX = 'max';\nexports.MIN = 'min';\n/**\n * ScoreStrategies\n */\nvar ScoreStrategies = /** @class */ (function () {\n function ScoreStrategies() {\n this.scoreStrategies = [];\n }\n /**\n * Create empty\n *\n * @param scoreMode\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createEmpty = function (scoreMode) {\n if (scoreMode === void 0) { scoreMode = exports.SUM; }\n var scoreStrategies = new ScoreStrategies;\n scoreStrategies.scoreMode = scoreMode;\n return scoreStrategies;\n };\n /**\n * Add score strategy\n *\n * @param scoreStrategy\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.prototype.addScoreStrategy = function (scoreStrategy) {\n this.scoreStrategies.push(scoreStrategy);\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategy[]}\n */\n ScoreStrategies.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Get score mode\n *\n * @return {string}\n */\n ScoreStrategies.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * To array\n *\n * @return {{\n * score_mode: string,\n * score_strategies: any\n * }}\n */\n ScoreStrategies.prototype.toArray = function () {\n var scoreStrategiesAsArray = [];\n for (var i in this.scoreStrategies) {\n scoreStrategiesAsArray.push(this.scoreStrategies[i].toArray());\n }\n return {\n score_mode: this.scoreMode,\n score_strategies: scoreStrategiesAsArray\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategies = (typeof array.score_mode != \"undefined\")\n ? ScoreStrategies.createEmpty(array.score_mode)\n : ScoreStrategies.createEmpty();\n scoreStrategies.scoreStrategies = [];\n for (var i in array.score_strategies) {\n scoreStrategies\n .scoreStrategies\n .push(ScoreStrategy_1.ScoreStrategy.createFromArray(array.score_strategies[i]));\n }\n return scoreStrategies;\n };\n return ScoreStrategies;\n}());\nexports.ScoreStrategies = ScoreStrategies;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategy = exports.DEFAULT_FACTOR = exports.DEFAULT_MISSING = exports.SCORE_MODE_MIN = exports.SCORE_MODE_MAX = exports.SCORE_MODE_AVG = exports.SCORE_MODE_SUM = exports.SCORE_MODE_NONE = exports.MODIFIER_SQUARE = exports.MODIFIER_LN = exports.MODIFIER_LOG = exports.MODIFIER_SQRT = exports.MODIFIER_NONE = exports.DECAY_GAUSS = exports.DECAY_EXP = exports.DECAY_LINEAR = exports.DECAY = exports.CUSTOM_FUNCTION = exports.BOOSTING_FIELD_VALUE = exports.DEFAULT_WEIGHT = exports.DEFAULT_TYPE = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar Filter_1 = require(\"./Filter\");\n/**\n * ScoreStrategy constants\n */\nexports.DEFAULT_TYPE = 'default';\nexports.DEFAULT_WEIGHT = 1.0;\nexports.BOOSTING_FIELD_VALUE = 'field_value';\nexports.CUSTOM_FUNCTION = 'custom_function';\nexports.DECAY = 'decay';\nexports.DECAY_LINEAR = 'linear';\nexports.DECAY_EXP = 'exp';\nexports.DECAY_GAUSS = 'gauss';\nexports.MODIFIER_NONE = 'none';\nexports.MODIFIER_SQRT = 'sqrt';\nexports.MODIFIER_LOG = 'log';\nexports.MODIFIER_LN = 'ln';\nexports.MODIFIER_SQUARE = 'square';\nexports.SCORE_MODE_NONE = 'none';\nexports.SCORE_MODE_SUM = 'sum';\nexports.SCORE_MODE_AVG = 'avg';\nexports.SCORE_MODE_MAX = 'max';\nexports.SCORE_MODE_MIN = 'min';\nexports.DEFAULT_MISSING = 1.0;\nexports.DEFAULT_FACTOR = 1.0;\n/**\n * ScoreStrategy\n */\nvar ScoreStrategy = /** @class */ (function () {\n function ScoreStrategy() {\n this.type = exports.DEFAULT_TYPE;\n this.filter = null;\n this.weight = exports.DEFAULT_WEIGHT;\n this.scoreMode = exports.SCORE_MODE_AVG;\n this.configuration = {};\n }\n /**\n * Get type\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getType = function () {\n return this.type;\n };\n /**\n * Get configuration value\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getConfigurationValue = function (element) {\n if (typeof this.configuration[element] == \"undefined\") {\n return null;\n }\n return this.configuration[element];\n };\n /**\n * Get weight.\n *\n * @return {number}\n */\n ScoreStrategy.prototype.getWeight = function () {\n return this.weight;\n };\n /**\n * Get score mode.\n *\n * @return {string}\n */\n ScoreStrategy.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * Get filter.\n *\n * @return {Filter}\n */\n ScoreStrategy.prototype.getFilter = function () {\n return this.filter;\n };\n /**\n * Create default\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDefault = function () {\n return new ScoreStrategy();\n };\n /**\n * Create field boosting\n *\n * @param field\n * @param factor\n * @param missing\n * @param modifier\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFieldBoosting = function (field, factor, missing, modifier, weight, filter, scoreMode) {\n if (factor === void 0) { factor = exports.DEFAULT_FACTOR; }\n if (missing === void 0) { missing = exports.DEFAULT_MISSING; }\n if (modifier === void 0) { modifier = exports.MODIFIER_NONE; }\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.BOOSTING_FIELD_VALUE;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['factor'] = factor;\n scoreStrategy.configuration['missing'] = missing;\n scoreStrategy.configuration['modifier'] = modifier;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create custom function\n *\n * @param func\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createCustomFunction = function (func, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.CUSTOM_FUNCTION;\n scoreStrategy.configuration['function'] = func;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create decay function\n *\n * @param type\n * @param field\n * @param origin\n * @param scale\n * @param offset\n * @param decay\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDecayFunction = function (type, field, origin, scale, offset, decay, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.DECAY;\n scoreStrategy.configuration['type'] = type;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['origin'] = origin;\n scoreStrategy.configuration['scale'] = scale;\n scoreStrategy.configuration['offset'] = offset;\n scoreStrategy.configuration['decay'] = decay;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Fix filter path.\n *\n * @param filter\n *\n * @return {Filter}\n */\n ScoreStrategy.fixFilterFieldPath = function (filter) {\n if (filter == null) {\n return filter;\n }\n var filterAsArray = filter.toArray();\n filterAsArray['field'] = Item_1.Item.getPathByField(filterAsArray['field']);\n return Filter_1.Filter.createFromArray(filterAsArray);\n };\n /**\n * To array\n *\n * @return {{\n * type: string,\n * configuration: any,\n * weight: number,\n * score_mode: string,\n * filter: any\n * }}\n */\n ScoreStrategy.prototype.toArray = function () {\n return {\n type: this.type,\n configuration: this.configuration,\n weight: this.weight,\n score_mode: this.scoreMode,\n filter: this.filter instanceof Filter_1.Filter\n ? this.filter.toArray()\n : null\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategy = ScoreStrategy.createDefault();\n if (typeof array.type != \"undefined\") {\n scoreStrategy.type = array.type;\n }\n if (typeof array.configuration != \"undefined\") {\n scoreStrategy.configuration = array.configuration;\n }\n if (typeof array.weight != \"undefined\") {\n scoreStrategy.weight = array.weight;\n }\n if (typeof array.score_mode != \"undefined\") {\n scoreStrategy.scoreMode = array.score_mode;\n }\n if (typeof array.filter === 'object' && array.filter !== null) {\n scoreStrategy.filter = Filter_1.Filter.createFromArray(array.filter);\n }\n return scoreStrategy;\n };\n return ScoreStrategy;\n}());\nexports.ScoreStrategy = ScoreStrategy;\n","\"use strict\";\nexports.__esModule = true;\nexports.SortBy = exports.SORT_BY_LOCATION_MI_ASC = exports.SORT_BY_LOCATION_KM_ASC = exports.SORT_BY_TYPE_DESC = exports.SORT_BY_TYPE_ASC = exports.SORT_BY_ID_DESC = exports.SORT_BY_ID_ASC = exports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM = exports.SORT_BY_SCORE = exports.SORT_BY_MODE_MEDIAN = exports.SORT_BY_MODE_MAX = exports.SORT_BY_MODE_MIN = exports.SORT_BY_MODE_SUM = exports.SORT_BY_MODE_AVG = exports.SORT_BY_DESC = exports.SORT_BY_ASC = exports.SORT_BY_TYPE_RANDOM = exports.SORT_BY_TYPE_FUNCTION = exports.SORT_BY_TYPE_DISTANCE = exports.SORT_BY_TYPE_SCORE = exports.SORT_BY_TYPE_NESTED = exports.SORT_BY_TYPE_FIELD = void 0;\nvar __1 = require(\"..\");\nvar Filter_1 = require(\"./Filter\");\n/**\n export * Sort by constants\n */\nexports.SORT_BY_TYPE_FIELD = 'field';\nexports.SORT_BY_TYPE_NESTED = 'nested';\nexports.SORT_BY_TYPE_SCORE = 'score';\nexports.SORT_BY_TYPE_DISTANCE = 'distance';\nexports.SORT_BY_TYPE_FUNCTION = 'function';\nexports.SORT_BY_TYPE_RANDOM = 'random';\nexports.SORT_BY_ASC = \"asc\";\nexports.SORT_BY_DESC = \"desc\";\nexports.SORT_BY_MODE_AVG = \"avg\";\nexports.SORT_BY_MODE_SUM = \"sum\";\nexports.SORT_BY_MODE_MIN = \"min\";\nexports.SORT_BY_MODE_MAX = \"max\";\nexports.SORT_BY_MODE_MEDIAN = \"median\";\nexports.SORT_BY_SCORE = {\n type: exports.SORT_BY_TYPE_SCORE\n};\nexports.SORT_BY_RANDOM = {\n type: exports.SORT_BY_TYPE_RANDOM\n};\nexports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM;\nexports.SORT_BY_ID_ASC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_ID_DESC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_TYPE_ASC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_TYPE_DESC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_LOCATION_KM_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"km\"\n};\nexports.SORT_BY_LOCATION_MI_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"mi\"\n};\n/**\n * ScoreStrategy\n */\nvar SortBy = /** @class */ (function () {\n function SortBy() {\n this.sortsBy = [];\n }\n /**\n * Create\n *\n * @return {SortBy}\n */\n SortBy.create = function () {\n return new SortBy;\n };\n /**\n * Sort By fields values\n *\n * @param shortSortByElements\n *\n * @return {SortBy}\n */\n SortBy.byFieldsValues = function (shortSortByElements) {\n var sortBy = SortBy.create();\n for (var key in shortSortByElements) {\n sortBy.byFieldValue(key, shortSortByElements[key]);\n }\n return sortBy;\n };\n /**\n * All\n *\n * @return {Array}\n */\n SortBy.prototype.all = function () {\n return this.sortsBy.length > 0\n ? this.sortsBy\n : [exports.SORT_BY_SCORE];\n };\n /**\n * Sort by value\n *\n * @param value\n *\n * @return {SortBy}\n */\n SortBy.prototype.byValue = function (value) {\n if (exports.SORT_BY_SCORE != value &&\n exports.SORT_BY_RANDOM != value) {\n if (typeof value.type == \"undefined\") {\n value.type = exports.SORT_BY_TYPE_FIELD;\n }\n }\n if (exports.SORT_BY_SCORE != value) {\n this.sortsBy.push(value);\n }\n return this;\n };\n /**\n * Sort by field value\n *\n * @param field\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFieldValue = function (field, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FIELD,\n field: __1.Item.getPathByField(field),\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field\n *\n * @param field\n * @param order\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedField = function (field, order, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field and filter\n *\n * @param field\n * @param order\n * @param filter\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedFieldAndFilter = function (field, order, filter, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n var fieldPath = __1.Item.getPathByField(filter.getField());\n var filterAsArray = filter.toArray();\n filterAsArray.field = fieldPath;\n filter = Filter_1.Filter.createFromArray(filterAsArray);\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n filter: filter,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by function\n *\n * @param func\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFunction = function (func, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FUNCTION,\n \"function\": func,\n order: order\n });\n return this;\n };\n /**\n * Is sorted by geo distance\n *\n * @return {boolean}\n */\n SortBy.prototype.isSortedByGeoDistance = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n return true;\n }\n }\n return false;\n };\n /**\n * Set coordinate\n *\n * @param coordinate\n *\n * @return {SortBy}\n */\n SortBy.prototype.setCoordinate = function (coordinate) {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n this.sortsBy[i].coordinate = coordinate;\n }\n }\n return this;\n };\n /**\n * Has random sort\n *\n * @return {boolean}\n */\n SortBy.prototype.hasRandomSort = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_RANDOM) {\n return true;\n }\n }\n return false;\n };\n /**\n * get first sort value as string\n *\n * @return {string}\n */\n SortBy.prototype.getFirstSortAsString = function () {\n if (this.sortsBy[0] === undefined) {\n return 'score';\n }\n var firstSortBy = this.sortsBy[0];\n if (firstSortBy.type === exports.SORT_BY_TYPE_RANDOM) {\n return 'random';\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_DISTANCE) {\n return firstSortBy.type + ':' + firstSortBy.unit;\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_SCORE) {\n return 'score';\n }\n var field = firstSortBy.field;\n var order = firstSortBy.order;\n var fieldParts = field.split('.');\n return fieldParts[1] + ':' + order;\n };\n /**\n * To array\n *\n * @return {[]}\n */\n SortBy.prototype.toArray = function () {\n var copySortBy = this.copy();\n var sortsByAsArray = copySortBy.sortsBy;\n for (var i in sortsByAsArray) {\n if (typeof sortsByAsArray[i].filter === typeof {} &&\n sortsByAsArray[i].filter != null) {\n sortsByAsArray[i].filter = sortsByAsArray[i].filter.toArray();\n }\n if (sortsByAsArray[i].coordinate !== null &&\n sortsByAsArray[i].coordinate instanceof __1.Coordinate) {\n sortsByAsArray[i].coordinate = sortsByAsArray[i].coordinate.toArray();\n }\n }\n return sortsByAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {SortBy}\n */\n SortBy.createFromArray = function (array) {\n var innerArray = JSON.parse(JSON.stringify(array));\n var sortBy = SortBy.create();\n for (var i in innerArray) {\n var element = innerArray[i];\n if (typeof element.type == \"undefined\") {\n element.type = exports.SORT_BY_TYPE_FIELD;\n }\n if (typeof element.filter === typeof {} &&\n element.filter != null) {\n element.filter = Filter_1.Filter.createFromArray(element.filter);\n }\n if (element.coordinate != null &&\n typeof element.coordinate === typeof {}) {\n element.coordinate = __1.Coordinate.createFromArray(element.coordinate);\n }\n sortBy.sortsBy.push(element);\n }\n return sortBy;\n };\n /**\n * Make a copy of this\n *\n * @returns {SortBy}\n */\n SortBy.prototype.copy = function () {\n var newSortBy = SortBy.create();\n for (var i in this.sortsBy) {\n var sortBy = this.sortsBy[i];\n if (typeof sortBy !== \"function\") {\n var sortByAsArray = JSON.parse(JSON.stringify(sortBy));\n if (typeof sortBy.filter === typeof {} &&\n sortBy.filter != null) {\n sortByAsArray.filter = Filter_1.Filter.createFromArray(sortBy.filter.toArray());\n }\n if (sortBy.coordinate != null &&\n typeof sortBy.coordinate == typeof {}) {\n sortByAsArray.coordinate = __1.Coordinate.createFromArray(sortBy.coordinate.toArray());\n }\n newSortBy.sortsBy.push(sortByAsArray);\n }\n }\n return newSortBy;\n };\n return SortBy;\n}());\nexports.SortBy = SortBy;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpRepository = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ConnectionError_1 = require(\"../Error/ConnectionError\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar InvalidTokenError_1 = require(\"../Error/InvalidTokenError\");\nvar ResourceExistsError_1 = require(\"../Error/ResourceExistsError\");\nvar ResourceNotAvailableError_1 = require(\"../Error/ResourceNotAvailableError\");\nvar UnknownError_1 = require(\"../Error/UnknownError\");\nvar Response_1 = require(\"../Http/Response\");\nvar Index_1 = require(\"../Model/Index\");\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Result_1 = require(\"../Result/Result\");\nvar Repository_1 = require(\"./Repository\");\n/**\n * Aggregation class\n */\nvar HttpRepository = /** @class */ (function (_super) {\n tslib_1.__extends(HttpRepository, _super);\n /**\n * Constructor\n *\n * @param httpClient\n * @param appId\n * @param indexId\n * @param token\n * @param transformer\n */\n function HttpRepository(httpClient, appId, indexId, token, transformer) {\n var _this = _super.call(this, appId, indexId, token) || this;\n _this.httpClient = httpClient;\n _this.transformer = transformer;\n return _this;\n }\n /**\n * Get transformer\n *\n * @return {Transformer}\n */\n HttpRepository.prototype.getTransformer = function () {\n return this.transformer;\n };\n /**\n * Generate item document by a simple object.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.addObject = function (object) {\n var item = this\n .transformer\n .toItem(object);\n if (item instanceof Item_1.Item) {\n this.addItem(item);\n }\n };\n /**\n * Delete item document by uuid.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.deleteObject = function (object) {\n var itemUUID = this\n .transformer\n .toItemUUID(object);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n this.deleteItem(itemUUID);\n }\n };\n /**\n * Flush update items\n *\n * @param {Item[]} itemsToUpdate\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushUpdateItems = function (itemsToUpdate) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToUpdate.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"put\", this.getCredentials(), {}, itemsToUpdate.map(function (item) {\n return item.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_1 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_1);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Flush delete items\n *\n * @param {ItemUUID[]} itemsToDelete\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushDeleteItems = function (itemsToDelete) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_2;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToDelete.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"delete\", this.getCredentials(), {}, itemsToDelete.map(function (itemUUID) {\n return itemUUID.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_2 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_2);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Query\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.query = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_3, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId, \"get\", this.getCredentials(), {\n query: JSON.stringify(query.toArray())\n .replace(/&/g, \"%26\")\n }, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_3 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_3);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get similar items\n *\n * @param {Query} query\n * @param {ItemUUID[]} itemUUIDs\n * @param {number} similarity\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getSimilarItems = function (query, itemUUIDs, similarity) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_4, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/similar-items', \"get\", this.getCredentials(), {}, {\n query: query.toArray(),\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n }),\n similarity: similarity\n })];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_4 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_4);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get recommended items\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getRecommendedItems = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_5, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/recommended-items', \"get\", this.getCredentials(), {}, query.toArray())];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_5 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_5);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Update items\n *\n * @param {Query} query\n * @param {Changes} changes\n *\n * @return {Promise}\n */\n HttpRepository.prototype.updateItems = function (query, changes) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_6;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items/update-by-query\", \"put\", this.getCredentials(), {}, {\n changes: changes.toArray(),\n query: query.toArray()\n })];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_6 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_6);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Create index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.createIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_7;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_7 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_7);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Delete index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.deleteIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_8;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"delete\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_8 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_8);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Reset index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.resetIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_9;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/reset\", \"put\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_9 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_9);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.checkIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_10;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"head\", this.getCredentials(), {}, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_10 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_10);\n case 3: return [2 /*return*/, response.getCode() === 200];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getIndices = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_11, result, _i, _a, indexAsArray;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\", \"get\", this.getCredentials(), {}, {})];\n case 1:\n response = _b.sent();\n return [3 /*break*/, 3];\n case 2:\n response_11 = _b.sent();\n throw HttpRepository.createErrorFromResponse(response_11);\n case 3:\n result = [];\n for (_i = 0, _a = response.getBody(); _i < _a.length; _i++) {\n indexAsArray = _a[_i];\n result.push(Index_1.Index.createFromArray(indexAsArray));\n }\n return [2 /*return*/, result];\n }\n });\n });\n };\n /**\n * Configure index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.configureIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_12;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/configure\", \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_12 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_12);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param indexUUID\n * @param itemUUID\n * @param userId\n * @param queryString\n * @param interaction\n * @param site\n * @param device\n * @param position\n */\n HttpRepository.prototype.pushInteraction = function (indexUUID, itemUUID, userId, queryString, interaction, site, device, position) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n if (position === void 0) { position = 0; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_13;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n query_string: queryString,\n site: site,\n device: device,\n user_id: userId,\n position: position\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/items/\" + itemUUID.composedUUID() + \"/interaction/\" + interaction, \"post\", {\n token: this.token\n }, parameters, {})];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_13 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_13);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param {IndexUUID} indexUUID\n * @param {string} userId\n * @param {ItemUUID[]} itemUUIDs\n * @param {string} site\n * @param {string} device\n *\n * @return {Promise}\n */\n HttpRepository.prototype.purchase = function (indexUUID, userId, itemUUIDs, site, device) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_14;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n site: site,\n device: device,\n user_id: userId\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/purchase\", \"post\", {\n token: this.token\n }, parameters, {\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n })\n })];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_14 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_14);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n *\n */\n HttpRepository.prototype.getHttpClient = function () {\n return this.httpClient;\n };\n /**\n * Get query values\n *\n * @returns any\n */\n HttpRepository.prototype.getCredentials = function () {\n return {\n app_id: this.appId,\n token: this.token\n };\n };\n /**\n * Apply transformers to results\n *\n * @param {Result} result\n *\n * @return {Result}\n */\n HttpRepository.prototype.applyTransformersToResult = function (result) {\n if (!this.transformer.hasReadTransformers()) {\n return result;\n }\n var subresults = result.getSubresults();\n if (Object.keys(subresults).length > 0) {\n Object.keys(subresults).map(function (key) {\n subresults[key] = this.applyTransformersToResult(subresults[key]);\n }.bind(this));\n return Result_1.Result.createMultiresults(subresults);\n }\n return Result_1.Result.create(result.getQueryUUID(), result.getTotalItems(), result.getTotalHits(), result.getAggregations(), result.getSuggestions(), this\n .transformer\n .fromItems(result.getItems()), result.getAutocomplete());\n };\n /**\n * @param response\n * @private\n */\n HttpRepository.createErrorFromResponse = function (response) {\n var error;\n if (response instanceof Response_1.Response) {\n switch (response.getCode()) {\n case ResourceNotAvailableError_1.ResourceNotAvailableError.getTransportableHTTPError():\n error = new ResourceNotAvailableError_1.ResourceNotAvailableError(response.getBody().message);\n break;\n case InvalidTokenError_1.InvalidTokenError.getTransportableHTTPError():\n error = new InvalidTokenError_1.InvalidTokenError(response.getBody().message);\n break;\n case InvalidFormatError_1.InvalidFormatError.getTransportableHTTPError():\n error = new InvalidFormatError_1.InvalidFormatError(response.getBody().message);\n break;\n case ResourceExistsError_1.ResourceExistsError.getTransportableHTTPError():\n error = new ResourceExistsError_1.ResourceExistsError(response.getBody().message);\n break;\n case ConnectionError_1.ConnectionError.getTransportableHTTPError():\n error = new ConnectionError_1.ConnectionError(response.getBody().message);\n break;\n }\n }\n return undefined === error\n ? UnknownError_1.UnknownError.createUnknownError()\n : error;\n };\n return HttpRepository;\n}(Repository_1.Repository));\nexports.HttpRepository = HttpRepository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Repository = void 0;\nvar tslib_1 = require(\"tslib\");\n/**\n * Aggregation class\n */\nvar Repository = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param appId\n * @param indexId\n * @param token\n */\n function Repository(appId, indexId, token) {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n this.appId = appId;\n this.indexId = indexId;\n this.token = token;\n }\n /**\n * Reset cached elements\n */\n Repository.prototype.resetCachedElements = function () {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n };\n /**\n * Add element\n *\n * @param item\n */\n Repository.prototype.addItem = function (item) {\n this.itemsToUpdate.push(item);\n };\n /**\n * Add elements\n *\n * @param items\n */\n Repository.prototype.addItems = function (items) {\n for (var i in items) {\n this.addItem(items[i]);\n }\n };\n /**\n * Delete item\n *\n * @param itemUUID\n */\n Repository.prototype.deleteItem = function (itemUUID) {\n this.itemsToDelete.push(itemUUID);\n };\n /**\n * Delete items\n *\n * @param itemsUUID\n */\n Repository.prototype.deleteItems = function (itemsUUID) {\n for (var i in itemsUUID) {\n this.deleteItem(itemsUUID[i]);\n }\n };\n /**\n * flush\n *\n * @param bulkNumber\n * @param skipIfLess\n *\n * @return {Promise}\n */\n Repository.prototype.flush = function (bulkNumber, skipIfLess) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var promise, resetCachedElements;\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n if (!bulkNumber) {\n bulkNumber = 500;\n }\n if (!skipIfLess) {\n skipIfLess = false;\n }\n if (skipIfLess &&\n this.itemsToUpdate.length < bulkNumber) {\n return [2 /*return*/];\n }\n promise = Promise.all(Repository\n .chunkArray(this.itemsToUpdate, bulkNumber)\n .map(function (arrayOfItems) {\n return _this.flushUpdateItems(arrayOfItems);\n })\n .concat(Repository\n .chunkArray(this.itemsToDelete, bulkNumber)\n .map(function (arrayOfItemsUUID) {\n return _this.flushDeleteItems(arrayOfItemsUUID);\n })));\n resetCachedElements = function () {\n _this.resetCachedElements();\n };\n promise.then(resetCachedElements, resetCachedElements);\n return [2 /*return*/, promise];\n });\n });\n };\n /**\n * Make chunks of n elements\n *\n * @param array\n * @param chunk\n *\n * @return any[]\n */\n Repository.chunkArray = function (array, chunk) {\n var arrayChunked = [];\n for (var i = 0, j = array.length; i < j; i += chunk) {\n arrayChunked.push(array.slice(i, i + chunk));\n }\n return arrayChunked;\n };\n return Repository;\n}());\nexports.Repository = Repository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Counter = void 0;\nvar Metadata_1 = require(\"../Model/Metadata\");\n/**\n * Aggregation class\n */\nvar Counter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param values\n * @param used\n * @param n\n */\n function Counter(values, used, n) {\n this.values = values;\n this.used = used;\n this.n = n;\n }\n /**\n * Get id\n *\n * @return {string|null}\n */\n Counter.prototype.getId = function () {\n return typeof this.values.id == \"string\"\n ? this.values.id\n : null;\n };\n /**\n * Get name\n *\n * @return {string|null}\n */\n Counter.prototype.getName = function () {\n return typeof this.values.name == \"string\"\n ? this.values.name\n : null;\n };\n /**\n * Get slug\n *\n * @return {string|null}\n */\n Counter.prototype.getSlug = function () {\n return typeof this.values.slug == \"string\"\n ? this.values.slug\n : null;\n };\n /**\n * Get level\n *\n * @return {number}\n */\n Counter.prototype.getLevel = function () {\n return typeof this.values.level == \"number\"\n ? this.values.level\n : 0;\n };\n /**\n * Get values\n *\n * @returns {{}}\n */\n Counter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Is used\n *\n * @returns {boolean}\n */\n Counter.prototype.isUsed = function () {\n return this.used;\n };\n /**\n * Get N\n *\n * @returns {number}\n */\n Counter.prototype.getN = function () {\n return this.n;\n };\n /**\n * Create by active elements\n *\n * @param name\n * @param n\n * @param activeElements\n */\n Counter.createByActiveElements = function (name, n, activeElements) {\n var values = Metadata_1.Metadata.fromMetadata(name);\n if (values == null) {\n return null;\n }\n var i = activeElements.length;\n var inActiveElements = false;\n while (i--) {\n if (activeElements[i] == values.id) {\n inActiveElements = true;\n }\n }\n return new Counter(values, inActiveElements, n);\n };\n /**\n * To array\n *\n * @return {{}}\n */\n Counter.prototype.toArray = function () {\n var values = {\n values: this.values,\n n: this.n\n };\n if (this.used === true) {\n values.used = true;\n }\n return values;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Counter}\n */\n Counter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new Counter(array.values, (typeof array.used == \"boolean\")\n ? array.used\n : false, array.n);\n };\n return Counter;\n}());\nexports.Counter = Counter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Result = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ResultAggregations_1 = require(\"./ResultAggregations\");\n/**\n * Result class\n */\nvar Result = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n */\n function Result(queryUUID, totalItems, totalHits) {\n this.items = [];\n this.autocomplete = null;\n this.suggestions = [];\n this.subresults = {};\n this.metadata = {};\n this.queryUUID = queryUUID;\n this.totalItems = totalItems;\n this.totalHits = totalHits;\n }\n /**\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n * @param aggregations\n * @param suggestions\n * @param items\n * @param autocomplete\n * @param metadata\n */\n Result.create = function (queryUUID, totalItems, totalHits, aggregations, suggestions, items, autocomplete, metadata) {\n if (autocomplete === void 0) { autocomplete = null; }\n if (metadata === void 0) { metadata = {}; }\n var result = new Result(queryUUID, totalItems, totalHits);\n result.aggregations = aggregations;\n result.suggestions = suggestions;\n result.items = items;\n result.autocomplete = autocomplete;\n result.metadata = metadata;\n return result;\n };\n /**\n * Create multi results\n *\n * @param subresults\n *\n * @returns {Result}\n */\n Result.createMultiresults = function (subresults) {\n var result = new Result('', 0, 0);\n result.subresults = subresults;\n return result;\n };\n /**\n * Add item\n *\n * @param item\n */\n Result.prototype.addItem = function (item) {\n this.items.push(item);\n };\n /**\n * Get items\n *\n * @return {Item[]}\n */\n Result.prototype.getItems = function () {\n return this.items;\n };\n /**\n * Get items grouped by types\n *\n * @return {any[]}\n */\n Result.prototype.getItemsGroupedByTypes = function () {\n if (this.itemsGroupedByTypeCache instanceof Object &&\n Object.keys(this.itemsGroupedByTypeCache).length > 0) {\n return this.itemsGroupedByTypeCache;\n }\n var itemsGroupedByTypes = {};\n for (var i in this.items) {\n var item = this.items[i];\n if (!(itemsGroupedByTypes[item.getType()] instanceof Array)) {\n itemsGroupedByTypes[item.getType()] = [];\n }\n itemsGroupedByTypes[item.getType()].push(item);\n }\n this.itemsGroupedByTypeCache = itemsGroupedByTypes;\n return itemsGroupedByTypes;\n };\n /**\n * Get items by type\n *\n * @param type\n *\n * @return {Array}\n */\n Result.prototype.getItemsByType = function (type) {\n var itemsGroupedByTypes = this.getItemsGroupedByTypes();\n return itemsGroupedByTypes[type] == null\n ? []\n : itemsGroupedByTypes[type];\n };\n /**\n * Get items by types\n *\n * @param types\n */\n Result.prototype.getItemsByTypes = function (types) {\n return this.items.filter(function (item) { return types.indexOf(item.getType()) >= 0; });\n };\n /**\n * Get first item\n *\n * @return {Item}\n */\n Result.prototype.getFirstItem = function () {\n return this.items.length > 0\n ? this.items[0]\n : null;\n };\n /**\n * Set aggregations\n *\n * @param aggregations\n */\n Result.prototype.setAggregations = function (aggregations) {\n this.aggregations = aggregations;\n };\n /**\n * Get aggregations\n *\n * @return {ResultAggregations}\n */\n Result.prototype.getAggregations = function () {\n return this.aggregations instanceof ResultAggregations_1.ResultAggregations\n ? this.aggregations\n : null;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @return {null}\n */\n Result.prototype.getAggregation = function (name) {\n return this.aggregations == null\n ? null\n : this.aggregations.getAggregation(name);\n };\n /**\n * Has no empty aggregation\n *\n * @param name\n *\n * @return {boolean}\n */\n Result.prototype.hasNotEmptyAggregation = function (name) {\n return this.aggregations == null\n ? false\n : this.aggregations.hasNotEmptyAggregation(name);\n };\n /**\n * Get suggestions\n *\n * @return {string[]}\n */\n Result.prototype.getSuggestions = function () {\n return this.suggestions;\n };\n /**\n * Get autocomplete\n *\n * @return {string|null}\n */\n Result.prototype.getAutocomplete = function () {\n return this.autocomplete;\n };\n /**\n * Get query uuid\n *\n * @return {string}\n */\n Result.prototype.getQueryUUID = function () {\n return this.queryUUID;\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n Result.prototype.getTotalItems = function () {\n return this.totalItems;\n };\n /**\n * Get total hits\n *\n * @return {number}\n */\n Result.prototype.getTotalHits = function () {\n return this.totalHits;\n };\n /**\n * Get subresults\n *\n * @return Object\n */\n Result.prototype.getSubresults = function () {\n return this.subresults;\n };\n /**\n * @return any\n */\n Result.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * @param name\n */\n Result.prototype.getMetadataValue = function (name) {\n var _a;\n return (_a = this.metadata[name]) !== null && _a !== void 0 ? _a : null;\n };\n /**\n * to array\n *\n * @return {{query: any, total_items: number, total_hits: number, items:any[], aggregations: any, suggestions: string[]}}\n */\n Result.prototype.toArray = function () {\n var array = {\n query_uuid: this.queryUUID,\n total_items: this.totalItems,\n total_hits: this.totalHits,\n items: this.items.map(function (item) { return item.toArray(); }),\n aggregations: this.aggregations == null\n ? null\n : this.aggregations.toArray(),\n suggests: this.suggestions,\n autocomplete: this.autocomplete === null\n ? undefined\n : this.autocomplete,\n metadata: this.metadata\n };\n if (this.subresults instanceof Object &&\n Object.keys(this.subresults).length) {\n array.subresults = {};\n for (var i in this.subresults) {\n var subresult = this.subresults[i];\n array.subresults[i] = subresult.toArray();\n }\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Result}\n */\n Result.createFromArray = function (array) {\n var result = Result.create(array.query_uuid\n ? array.query_uuid\n : '', array.total_items\n ? array.total_items\n : 0, array.total_hits\n ? array.total_hits\n : 0, array.aggregations instanceof Object\n ? ResultAggregations_1.ResultAggregations.createFromArray(array.aggregations)\n : null, array.suggests\n ? array.suggests\n : [], array.items instanceof Array\n ? array.items.map(function (itemAsArray) { return Item_1.Item.createFromArray(itemAsArray); })\n : [], array.autocomplete === undefined\n ? null\n : array.autocomplete, array.metadata === undefined\n ? {}\n : array.metadata);\n /**\n * Subqueries\n */\n var subresultsAsArray = typeof array.subresults === typeof {}\n ? array.subresults\n : {};\n for (var i in subresultsAsArray) {\n result.subresults[i] = Result.createFromArray(subresultsAsArray[i]);\n }\n return result;\n };\n return Result;\n}());\nexports.Result = Result;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregation = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Filter_1 = require(\"../Query/Filter\");\nvar Counter_1 = require(\"./Counter\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregation = /** @class */ (function () {\n /**\n * @param name\n * @param applicationType\n * @param totalElements\n * @param activeElements\n * @param metadata\n */\n function ResultAggregation(name, applicationType, totalElements, activeElements, metadata) {\n if (metadata === void 0) { metadata = {}; }\n this.counters = {};\n this.highestActiveElement = 0;\n this.name = name;\n this.applicationType = applicationType;\n this.totalElements = totalElements;\n this.activeElements = {};\n this.metadata = metadata;\n for (var i in activeElements) {\n var activeElement = activeElements[i];\n this.activeElements[activeElement] = activeElement;\n }\n }\n /**\n * Add counter\n *\n * @param name\n * @param counter\n */\n ResultAggregation.prototype.addCounter = function (name, counter) {\n if (counter == 0) {\n return;\n }\n var counterInstance = Counter_1.Counter.createByActiveElements(name, counter, Object.keys(this.activeElements));\n if (!(counterInstance instanceof Counter_1.Counter)) {\n return;\n }\n if ((this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) &&\n (this.applicationType & ~Filter_1.FILTER_MUST_ALL) &&\n counterInstance.isUsed()) {\n this.activeElements[counterInstance.getId()] = counterInstance;\n this.highestActiveElement = Math.max(counterInstance.getLevel(), this.highestActiveElement);\n return;\n }\n this.counters[counterInstance.getId()] = counterInstance;\n };\n /**\n * Get name\n *\n * @return {string}\n */\n ResultAggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get counter\n *\n * @return {any}\n */\n ResultAggregation.prototype.getCounters = function () {\n return this.counters;\n };\n /**\n *\n */\n ResultAggregation.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Return if the aggregation belongs to a filter.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.isFilter = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL) > 0;\n };\n /**\n * Aggregation has levels.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.hasLevels = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) > 0;\n };\n /**\n * Get counter by name\n *\n * @param name\n *\n * @return {null}\n */\n ResultAggregation.prototype.getCounter = function (name) {\n return this.counters[name] instanceof Counter_1.Counter\n ? this.counters[name]\n : null;\n };\n /**\n * Get all elements\n *\n * @return {{}}\n */\n ResultAggregation.prototype.getAllElements = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.activeElements), this.counters);\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregation.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * Get active elements\n *\n * @return {any}\n */\n ResultAggregation.prototype.getActiveElements = function () {\n if (Object.keys(this.activeElements).length === 0) {\n return {};\n }\n if (this.applicationType === Filter_1.FILTER_MUST_ALL_WITH_LEVELS) {\n var value = null;\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n if (!(activeElement instanceof Counter_1.Counter)) {\n continue;\n }\n if (value == null) {\n value = activeElement;\n }\n value = value.getLevel() > activeElement.getLevel()\n ? value\n : activeElement;\n }\n return value instanceof Counter_1.Counter\n ? { 0: value }\n : null;\n }\n return this.activeElements;\n };\n /**\n * Clean results by level and remove all levels higher than the lowest.\n */\n ResultAggregation.prototype.cleanCountersByLevel = function () {\n for (var i in this.counters) {\n var counter = this.counters[i];\n if (counter.getLevel() !== this.highestActiveElement + 1) {\n delete this.counters[i];\n }\n }\n };\n /**\n * Is empty\n *\n * @returns {boolean}\n */\n ResultAggregation.prototype.isEmpty = function () {\n return Object.keys(this.activeElements).length == 0 &&\n Object.keys(this.counters).length == 0;\n };\n /**\n * To array\n *\n * @return {any}\n */\n ResultAggregation.prototype.toArray = function () {\n var array = {\n name: this.name,\n counters: [],\n active_elements: [],\n metadata: this.metadata\n };\n for (var i in this.counters) {\n array.counters.push(this.counters[i].toArray());\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n array.application_type = this.applicationType;\n }\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n array.active_elements.push(activeElement instanceof Counter_1.Counter\n ? activeElement.toArray()\n : activeElement);\n }\n if (this.highestActiveElement > 0) {\n array.highest_active_level = this.highestActiveElement;\n }\n if (array.counters.length === 0) {\n delete array.counters;\n }\n if (array.active_elements.length === 0) {\n delete array.active_elements;\n }\n if (Object.keys(array.metadata).length === 0) {\n delete array.metadata;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n */\n ResultAggregation.createFromArray = function (array) {\n var activeElements = [];\n var activeElementsAsArray = array.active_elements;\n activeElementsAsArray = typeof activeElementsAsArray === typeof []\n ? activeElementsAsArray\n : [];\n for (var i in activeElementsAsArray) {\n var activeElementAsArray = activeElementsAsArray[i];\n activeElements.push(typeof activeElementAsArray === typeof {}\n ? Counter_1.Counter.createFromArray(activeElementAsArray)\n : activeElementAsArray);\n }\n var aggregation = new ResultAggregation(array.name, parseInt(array.application_type ? array.application_type : Filter_1.FILTER_AT_LEAST_ONE), parseInt(array.total_elements ? array.total_elements : 0), []);\n aggregation.activeElements = activeElements;\n var countersAsArray = typeof array.counters === typeof []\n ? array.counters\n : [];\n for (var i in countersAsArray) {\n var counterAsArray = countersAsArray[i];\n if (typeof counterAsArray !== \"function\") {\n var counter = Counter_1.Counter.createFromArray(counterAsArray);\n aggregation.counters['_' + counter.getId()] = counter;\n }\n }\n aggregation.highestActiveElement = typeof array.highest_active_level === \"number\"\n ? array.highest_active_level\n : 0;\n aggregation.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n return aggregation;\n };\n return ResultAggregation;\n}());\nexports.ResultAggregation = ResultAggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregations = void 0;\nvar ResultAggregation_1 = require(\"./ResultAggregation\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregations = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param totalElements\n */\n function ResultAggregations(totalElements) {\n this.aggregations = {};\n this.totalElements = totalElements;\n }\n /**\n * Add aggregation\n *\n * @param name\n * @param aggregation\n */\n ResultAggregations.prototype.addAggregation = function (name, aggregation) {\n this.aggregations[name] = aggregation;\n };\n /**\n * Get aggregations\n *\n * @returns {{}}\n */\n ResultAggregations.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @returns {Aggregation|null}\n */\n ResultAggregations.prototype.getAggregation = function (name) {\n return this.aggregations[name] instanceof ResultAggregation_1.ResultAggregation\n ? this.aggregations[name]\n : null;\n };\n /**\n * Has not empty aggregation\n *\n * @param name\n *\n * @returns {boolean}\n */\n ResultAggregations.prototype.hasNotEmptyAggregation = function (name) {\n var aggregation = this.getAggregation(name);\n return (aggregation instanceof ResultAggregation_1.ResultAggregation) &&\n (!aggregation.isEmpty());\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregations.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * To array\n *\n * @return {{total_elements?: number, aggregations?: {}}}\n */\n ResultAggregations.prototype.toArray = function () {\n var aggregationCollection = {};\n for (var i in this.aggregations) {\n aggregationCollection[i] = this.aggregations[i].toArray();\n }\n var array = {};\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n if (Object.keys(aggregationCollection).length > 0) {\n array.aggregations = aggregationCollection;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ResultAggregations}\n */\n ResultAggregations.createFromArray = function (array) {\n var aggregations = new ResultAggregations(typeof array.total_elements === \"number\"\n ? array.total_elements\n : 0);\n if (typeof array.aggregations === typeof {}) {\n for (var i in array.aggregations) {\n aggregations.addAggregation(i, ResultAggregation_1.ResultAggregation.createFromArray(array.aggregations[i]));\n }\n }\n return aggregations;\n };\n return ResultAggregations;\n}());\nexports.ResultAggregations = ResultAggregations;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nexports.Transformer = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\n/**\n * Transformer\n */\nvar Transformer = /** @class */ (function () {\n function Transformer() {\n this.readTransformers = [];\n this.writeTransformers = [];\n }\n /**\n * Add read transformer\n *\n * @param readTransformer\n */\n Transformer.prototype.addReadTransformer = function (readTransformer) {\n this\n .readTransformers\n .push(readTransformer);\n };\n /**\n * @return {boolean}\n */\n Transformer.prototype.hasReadTransformers = function () {\n return this.readTransformers.length > 0;\n };\n /**\n * Add write transformer\n *\n * @param writeTransformer\n */\n Transformer.prototype.addWriteTransformer = function (writeTransformer) {\n this\n .writeTransformers\n .push(writeTransformer);\n };\n /**\n * Items to objects\n *\n * @param items\n *\n * @returns {any[]}\n */\n Transformer.prototype.fromItems = function (items) {\n var objects = [];\n for (var i in items) {\n objects.push(this.fromItem(items[i]));\n }\n return objects;\n };\n /**\n * Item to object\n *\n * @param item\n *\n * @returns {any}\n */\n Transformer.prototype.fromItem = function (item) {\n for (var i in this.readTransformers) {\n var transformer = this.readTransformers[i];\n if (transformer.isValidItem(item)) {\n return transformer.fromItem(item);\n }\n }\n return item;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {Item[]}\n */\n Transformer.prototype.toItems = function (objects) {\n var items = [];\n for (var i in objects) {\n var item = this.toItem(objects[i]);\n if (item instanceof Item_1.Item) {\n items.push(item);\n }\n }\n return items;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItem = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItem(object);\n }\n }\n return object;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {ItemUUID[]}\n */\n Transformer.prototype.toItemUUIDs = function (objects) {\n var itemUUIDs = [];\n for (var i in objects) {\n var itemUUID = this.toItemUUID(objects[i]);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n itemUUIDs.push(itemUUID);\n }\n }\n return itemUUIDs;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItemUUID = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItemUUID(object);\n }\n }\n return object;\n };\n return Transformer;\n}());\nexports.Transformer = Transformer;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar Apisearch_1 = require(\"./Apisearch\");\nexports[\"default\"] = Apisearch_1[\"default\"];\ntslib_1.__exportStar(require(\"./Config/Config\"), exports);\ntslib_1.__exportStar(require(\"./Config/Synonym\"), exports);\ntslib_1.__exportStar(require(\"./Error/ConnectionError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ErrorWithMessage\"), exports);\ntslib_1.__exportStar(require(\"./Error/EventError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ForbiddenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidFormatError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidTokenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceExistsError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceNotAvailableError\"), exports);\ntslib_1.__exportStar(require(\"./Error/UnsupportedContentTypeError\"), exports);\ntslib_1.__exportStar(require(\"./Geo/LocationRange\"), exports);\ntslib_1.__exportStar(require(\"./Http/AxiosClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Client\"), exports);\ntslib_1.__exportStar(require(\"./Http/HttpClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Response\"), exports);\ntslib_1.__exportStar(require(\"./Http/CacheClient\"), exports);\ntslib_1.__exportStar(require(\"./Model/Changes\"), exports);\ntslib_1.__exportStar(require(\"./Model/Coordinate\"), exports);\ntslib_1.__exportStar(require(\"./Model/Item\"), exports);\ntslib_1.__exportStar(require(\"./Model/ItemUUID\"), exports);\ntslib_1.__exportStar(require(\"./Model/Metadata\"), exports);\ntslib_1.__exportStar(require(\"./Model/User\"), exports);\ntslib_1.__exportStar(require(\"./Query/Aggregation\"), exports);\ntslib_1.__exportStar(require(\"./Query/Filter\"), exports);\ntslib_1.__exportStar(require(\"./Query/Query\"), exports);\ntslib_1.__exportStar(require(\"./Query/Range\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategies\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategy\"), exports);\ntslib_1.__exportStar(require(\"./Query/SortBy\"), exports);\ntslib_1.__exportStar(require(\"./Repository/HttpRepository\"), exports);\ntslib_1.__exportStar(require(\"./Repository/Repository\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregation\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregations\"), exports);\ntslib_1.__exportStar(require(\"./Result/Counter\"), exports);\ntslib_1.__exportStar(require(\"./Result/Result\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/ReadTransformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/Transformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/WriteTransformer\"), exports);\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Mustache = factory());\n}(this, (function () { 'use strict';\n\n /*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n var objectToString = Object.prototype.toString;\n var isArray = Array.isArray || function isArrayPolyfill (object) {\n return objectToString.call(object) === '[object Array]';\n };\n\n function isFunction (object) {\n return typeof object === 'function';\n }\n\n /**\n * More correct typeof string handling array\n * which normally returns typeof 'object'\n */\n function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }\n\n function escapeRegExp (string) {\n return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n /**\n * Null safe way of checking whether or not an object,\n * including its prototype, has a given property\n */\n function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }\n\n /**\n * Safe way of detecting whether or not the given thing is a primitive and\n * whether it has the given property\n */\n function primitiveHasOwnProperty (primitive, propName) {\n return (\n primitive != null\n && typeof primitive !== 'object'\n && primitive.hasOwnProperty\n && primitive.hasOwnProperty(propName)\n );\n }\n\n // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n // See https://github.com/janl/mustache.js/issues/189\n var regExpTest = RegExp.prototype.test;\n function testRegExp (re, string) {\n return regExpTest.call(re, string);\n }\n\n var nonSpaceRe = /\\S/;\n function isWhitespace (string) {\n return !testRegExp(nonSpaceRe, string);\n }\n\n var entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/',\n '`': '`',\n '=': '='\n };\n\n function escapeHtml (string) {\n return String(string).replace(/[&<>\"'`=\\/]/g, function fromEntityMap (s) {\n return entityMap[s];\n });\n }\n\n var whiteRe = /\\s*/;\n var spaceRe = /\\s+/;\n var equalsRe = /\\s*=/;\n var curlyRe = /\\s*\\}/;\n var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n /**\n * Breaks up the given `template` string into a tree of tokens. If the `tags`\n * argument is given here it must be an array with two string values: the\n * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n * course, the default is to use mustaches (i.e. mustache.tags).\n *\n * A token is an array with at least 4 elements. The first element is the\n * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n * all text that appears outside a symbol this element is \"text\".\n *\n * The second element of a token is its \"value\". For mustache tags this is\n * whatever else was inside the tag besides the opening symbol. For text tokens\n * this is the text itself.\n *\n * The third and fourth elements of the token are the start and end indices,\n * respectively, of the token in the original template.\n *\n * Tokens that are the root node of a subtree contain two more elements: 1) an\n * array of tokens in the subtree and 2) the index in the original template at\n * which the closing tag for that section begins.\n *\n * Tokens for partials also contain two more elements: 1) a string value of\n * indendation prior to that tag and 2) the index of that tag on that line -\n * eg a value of 2 indicates the partial is the third tag on this line.\n */\n function parseTemplate (template, tags) {\n if (!template)\n return [];\n var lineHasNonSpace = false;\n var sections = []; // Stack to hold section tokens\n var tokens = []; // Buffer to hold the tokens\n var spaces = []; // Indices of whitespace tokens on the current line\n var hasTag = false; // Is there a {{tag}} on the current line?\n var nonSpace = false; // Is there a non-space char on the current line?\n var indentation = ''; // Tracks indentation for tags that use it\n var tagIndex = 0; // Stores a count of number of tags encountered on a line\n\n // Strips all whitespace tokens array for the current line\n // if there was a {{#tag}} on it and otherwise only space.\n function stripSpace () {\n if (hasTag && !nonSpace) {\n while (spaces.length)\n delete tokens[spaces.pop()];\n } else {\n spaces = [];\n }\n\n hasTag = false;\n nonSpace = false;\n }\n\n var openingTagRe, closingTagRe, closingCurlyRe;\n function compileTags (tagsToCompile) {\n if (typeof tagsToCompile === 'string')\n tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n throw new Error('Invalid tags: ' + tagsToCompile);\n\n openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n }\n\n compileTags(tags || mustache.tags);\n\n var scanner = new Scanner(template);\n\n var start, type, value, chr, token, openSection;\n while (!scanner.eos()) {\n start = scanner.pos;\n\n // Match any text between tags.\n value = scanner.scanUntil(openingTagRe);\n\n if (value) {\n for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n chr = value.charAt(i);\n\n if (isWhitespace(chr)) {\n spaces.push(tokens.length);\n indentation += chr;\n } else {\n nonSpace = true;\n lineHasNonSpace = true;\n indentation += ' ';\n }\n\n tokens.push([ 'text', chr, start, start + 1 ]);\n start += 1;\n\n // Check for whitespace on the current line.\n if (chr === '\\n') {\n stripSpace();\n indentation = '';\n tagIndex = 0;\n lineHasNonSpace = false;\n }\n }\n }\n\n // Match the opening tag.\n if (!scanner.scan(openingTagRe))\n break;\n\n hasTag = true;\n\n // Get the tag type.\n type = scanner.scan(tagRe) || 'name';\n scanner.scan(whiteRe);\n\n // Get the tag value.\n if (type === '=') {\n value = scanner.scanUntil(equalsRe);\n scanner.scan(equalsRe);\n scanner.scanUntil(closingTagRe);\n } else if (type === '{') {\n value = scanner.scanUntil(closingCurlyRe);\n scanner.scan(curlyRe);\n scanner.scanUntil(closingTagRe);\n type = '&';\n } else {\n value = scanner.scanUntil(closingTagRe);\n }\n\n // Match the closing tag.\n if (!scanner.scan(closingTagRe))\n throw new Error('Unclosed tag at ' + scanner.pos);\n\n if (type == '>') {\n token = [ type, value, start, scanner.pos, indentation, tagIndex, lineHasNonSpace ];\n } else {\n token = [ type, value, start, scanner.pos ];\n }\n tagIndex++;\n tokens.push(token);\n\n if (type === '#' || type === '^') {\n sections.push(token);\n } else if (type === '/') {\n // Check section nesting.\n openSection = sections.pop();\n\n if (!openSection)\n throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n if (openSection[1] !== value)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n } else if (type === 'name' || type === '{' || type === '&') {\n nonSpace = true;\n } else if (type === '=') {\n // Set the tags for the next time around.\n compileTags(value);\n }\n }\n\n stripSpace();\n\n // Make sure there are no open sections when we're done.\n openSection = sections.pop();\n\n if (openSection)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n return nestTokens(squashTokens(tokens));\n }\n\n /**\n * Combines the values of consecutive text tokens in the given `tokens` array\n * to a single token.\n */\n function squashTokens (tokens) {\n var squashedTokens = [];\n\n var token, lastToken;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n if (token) {\n if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n lastToken[1] += token[1];\n lastToken[3] = token[3];\n } else {\n squashedTokens.push(token);\n lastToken = token;\n }\n }\n }\n\n return squashedTokens;\n }\n\n /**\n * Forms the given array of `tokens` into a nested tree structure where\n * tokens that represent a section have two additional items: 1) an array of\n * all tokens that appear in that section and 2) the index in the original\n * template that represents the end of that section.\n */\n function nestTokens (tokens) {\n var nestedTokens = [];\n var collector = nestedTokens;\n var sections = [];\n\n var token, section;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n switch (token[0]) {\n case '#':\n case '^':\n collector.push(token);\n sections.push(token);\n collector = token[4] = [];\n break;\n case '/':\n section = sections.pop();\n section[5] = token[2];\n collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n break;\n default:\n collector.push(token);\n }\n }\n\n return nestedTokens;\n }\n\n /**\n * A simple string scanner that is used by the template parser to find\n * tokens in template strings.\n */\n function Scanner (string) {\n this.string = string;\n this.tail = string;\n this.pos = 0;\n }\n\n /**\n * Returns `true` if the tail is empty (end of string).\n */\n Scanner.prototype.eos = function eos () {\n return this.tail === '';\n };\n\n /**\n * Tries to match the given regular expression at the current position.\n * Returns the matched text if it can match, the empty string otherwise.\n */\n Scanner.prototype.scan = function scan (re) {\n var match = this.tail.match(re);\n\n if (!match || match.index !== 0)\n return '';\n\n var string = match[0];\n\n this.tail = this.tail.substring(string.length);\n this.pos += string.length;\n\n return string;\n };\n\n /**\n * Skips all text until the given regular expression can be matched. Returns\n * the skipped string, which is the entire tail if no match can be made.\n */\n Scanner.prototype.scanUntil = function scanUntil (re) {\n var index = this.tail.search(re), match;\n\n switch (index) {\n case -1:\n match = this.tail;\n this.tail = '';\n break;\n case 0:\n match = '';\n break;\n default:\n match = this.tail.substring(0, index);\n this.tail = this.tail.substring(index);\n }\n\n this.pos += match.length;\n\n return match;\n };\n\n /**\n * Represents a rendering context by wrapping a view object and\n * maintaining a reference to the parent context.\n */\n function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }\n\n /**\n * Creates a new context using the given view with this context\n * as the parent.\n */\n Context.prototype.push = function push (view) {\n return new Context(view, this);\n };\n\n /**\n * Returns the value of the given name in this context, traversing\n * up the context hierarchy if the value is absent in this context's view.\n */\n Context.prototype.lookup = function lookup (name) {\n var cache = this.cache;\n\n var value;\n if (cache.hasOwnProperty(name)) {\n value = cache[name];\n } else {\n var context = this, intermediateValue, names, index, lookupHit = false;\n\n while (context) {\n if (name.indexOf('.') > 0) {\n intermediateValue = context.view;\n names = name.split('.');\n index = 0;\n\n /**\n * Using the dot notion path in `name`, we descend through the\n * nested objects.\n *\n * To be certain that the lookup has been successful, we have to\n * check if the last object in the path actually has the property\n * we are looking for. We store the result in `lookupHit`.\n *\n * This is specially necessary for when the value has been set to\n * `undefined` and we want to avoid looking up parent contexts.\n *\n * In the case where dot notation is used, we consider the lookup\n * to be successful even if the last \"object\" in the path is\n * not actually an object but a primitive (e.g., a string, or an\n * integer), because it is sometimes useful to access a property\n * of an autoboxed primitive, such as the length of a string.\n **/\n while (intermediateValue != null && index < names.length) {\n if (index === names.length - 1)\n lookupHit = (\n hasProperty(intermediateValue, names[index])\n || primitiveHasOwnProperty(intermediateValue, names[index])\n );\n\n intermediateValue = intermediateValue[names[index++]];\n }\n } else {\n intermediateValue = context.view[name];\n\n /**\n * Only checking against `hasProperty`, which always returns `false` if\n * `context.view` is not an object. Deliberately omitting the check\n * against `primitiveHasOwnProperty` if dot notation is not used.\n *\n * Consider this example:\n * ```\n * Mustache.render(\"The length of a football field is {{#length}}{{length}}{{/length}}.\", {length: \"100 yards\"})\n * ```\n *\n * If we were to check also against `primitiveHasOwnProperty`, as we do\n * in the dot notation case, then render call would return:\n *\n * \"The length of a football field is 9.\"\n *\n * rather than the expected:\n *\n * \"The length of a football field is 100 yards.\"\n **/\n lookupHit = hasProperty(context.view, name);\n }\n\n if (lookupHit) {\n value = intermediateValue;\n break;\n }\n\n context = context.parent;\n }\n\n cache[name] = value;\n }\n\n if (isFunction(value))\n value = value.call(this.view);\n\n return value;\n };\n\n /**\n * A Writer knows how to take a stream of tokens and render them to a\n * string, given a context. It also maintains a cache of templates to\n * avoid the need to parse the same template twice.\n */\n function Writer () {\n this.templateCache = {\n _cache: {},\n set: function set (key, value) {\n this._cache[key] = value;\n },\n get: function get (key) {\n return this._cache[key];\n },\n clear: function clear () {\n this._cache = {};\n }\n };\n }\n\n /**\n * Clears all cached templates in this writer.\n */\n Writer.prototype.clearCache = function clearCache () {\n if (typeof this.templateCache !== 'undefined') {\n this.templateCache.clear();\n }\n };\n\n /**\n * Parses and caches the given `template` according to the given `tags` or\n * `mustache.tags` if `tags` is omitted, and returns the array of tokens\n * that is generated from the parse.\n */\n Writer.prototype.parse = function parse (template, tags) {\n var cache = this.templateCache;\n var cacheKey = template + ':' + (tags || mustache.tags).join(':');\n var isCacheEnabled = typeof cache !== 'undefined';\n var tokens = isCacheEnabled ? cache.get(cacheKey) : undefined;\n\n if (tokens == undefined) {\n tokens = parseTemplate(template, tags);\n isCacheEnabled && cache.set(cacheKey, tokens);\n }\n return tokens;\n };\n\n /**\n * High-level method that is used to render the given `template` with\n * the given `view`.\n *\n * The optional `partials` argument may be an object that contains the\n * names and templates of partials that are used in the template. It may\n * also be a function that is used to load partial templates on the fly\n * that takes a single argument: the name of the partial.\n *\n * If the optional `config` argument is given here, then it should be an\n * object with a `tags` attribute or an `escape` attribute or both.\n * If an array is passed, then it will be interpreted the same way as\n * a `tags` attribute on a `config` object.\n *\n * The `tags` attribute of a `config` object must be an array with two\n * string values: the opening and closing tags used in the template (e.g.\n * [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n *\n * The `escape` attribute of a `config` object must be a function which\n * accepts a string as input and outputs a safely escaped string.\n * If an `escape` function is not provided, then an HTML-safe string\n * escaping function is used as the default.\n */\n Writer.prototype.render = function render (template, view, partials, config) {\n var tags = this.getConfigTags(config);\n var tokens = this.parse(template, tags);\n var context = (view instanceof Context) ? view : new Context(view, undefined);\n return this.renderTokens(tokens, context, partials, template, config);\n };\n\n /**\n * Low-level method that renders the given array of `tokens` using\n * the given `context` and `partials`.\n *\n * Note: The `originalTemplate` is only ever used to extract the portion\n * of the original template that was contained in a higher-order section.\n * If the template doesn't use higher-order sections, this argument may\n * be omitted.\n */\n Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, config) {\n var buffer = '';\n\n var token, symbol, value;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n value = undefined;\n token = tokens[i];\n symbol = token[0];\n\n if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate, config);\n else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate, config);\n else if (symbol === '>') value = this.renderPartial(token, context, partials, config);\n else if (symbol === '&') value = this.unescapedValue(token, context);\n else if (symbol === 'name') value = this.escapedValue(token, context, config);\n else if (symbol === 'text') value = this.rawValue(token);\n\n if (value !== undefined)\n buffer += value;\n }\n\n return buffer;\n };\n\n Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate, config) {\n var self = this;\n var buffer = '';\n var value = context.lookup(token[1]);\n\n // This function is used to render an arbitrary template\n // in the current context by higher-order sections.\n function subRender (template) {\n return self.render(template, context, partials, config);\n }\n\n if (!value) return;\n\n if (isArray(value)) {\n for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate, config);\n }\n } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate, config);\n } else if (isFunction(value)) {\n if (typeof originalTemplate !== 'string')\n throw new Error('Cannot use higher-order sections without the original template');\n\n // Extract the portion of the original template that the section contains.\n value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n if (value != null)\n buffer += value;\n } else {\n buffer += this.renderTokens(token[4], context, partials, originalTemplate, config);\n }\n return buffer;\n };\n\n Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate, config) {\n var value = context.lookup(token[1]);\n\n // Use JavaScript's definition of falsy. Include empty arrays.\n // See https://github.com/janl/mustache.js/issues/186\n if (!value || (isArray(value) && value.length === 0))\n return this.renderTokens(token[4], context, partials, originalTemplate, config);\n };\n\n Writer.prototype.indentPartial = function indentPartial (partial, indentation, lineHasNonSpace) {\n var filteredIndentation = indentation.replace(/[^ \\t]/g, '');\n var partialByNl = partial.split('\\n');\n for (var i = 0; i < partialByNl.length; i++) {\n if (partialByNl[i].length && (i > 0 || !lineHasNonSpace)) {\n partialByNl[i] = filteredIndentation + partialByNl[i];\n }\n }\n return partialByNl.join('\\n');\n };\n\n Writer.prototype.renderPartial = function renderPartial (token, context, partials, config) {\n if (!partials) return;\n var tags = this.getConfigTags(config);\n\n var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n if (value != null) {\n var lineHasNonSpace = token[6];\n var tagIndex = token[5];\n var indentation = token[4];\n var indentedValue = value;\n if (tagIndex == 0 && indentation) {\n indentedValue = this.indentPartial(value, indentation, lineHasNonSpace);\n }\n var tokens = this.parse(indentedValue, tags);\n return this.renderTokens(tokens, context, partials, indentedValue, config);\n }\n };\n\n Writer.prototype.unescapedValue = function unescapedValue (token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return value;\n };\n\n Writer.prototype.escapedValue = function escapedValue (token, context, config) {\n var escape = this.getConfigEscape(config) || mustache.escape;\n var value = context.lookup(token[1]);\n if (value != null)\n return (typeof value === 'number' && escape === mustache.escape) ? String(value) : escape(value);\n };\n\n Writer.prototype.rawValue = function rawValue (token) {\n return token[1];\n };\n\n Writer.prototype.getConfigTags = function getConfigTags (config) {\n if (isArray(config)) {\n return config;\n }\n else if (config && typeof config === 'object') {\n return config.tags;\n }\n else {\n return undefined;\n }\n };\n\n Writer.prototype.getConfigEscape = function getConfigEscape (config) {\n if (config && typeof config === 'object' && !isArray(config)) {\n return config.escape;\n }\n else {\n return undefined;\n }\n };\n\n var mustache = {\n name: 'mustache.js',\n version: '4.2.0',\n tags: [ '{{', '}}' ],\n clearCache: undefined,\n escape: undefined,\n parse: undefined,\n render: undefined,\n Scanner: undefined,\n Context: undefined,\n Writer: undefined,\n /**\n * Allows a user to override the default caching strategy, by providing an\n * object with set, get and clear methods. This can also be used to disable\n * the cache by setting it to the literal `undefined`.\n */\n set templateCache (cache) {\n defaultWriter.templateCache = cache;\n },\n /**\n * Gets the default or overridden caching object from the default writer.\n */\n get templateCache () {\n return defaultWriter.templateCache;\n }\n };\n\n // All high-level mustache.* functions use this writer.\n var defaultWriter = new Writer();\n\n /**\n * Clears all cached templates in the default writer.\n */\n mustache.clearCache = function clearCache () {\n return defaultWriter.clearCache();\n };\n\n /**\n * Parses and caches the given template in the default writer and returns the\n * array of tokens it contains. Doing this ahead of time avoids the need to\n * parse templates on the fly as they are rendered.\n */\n mustache.parse = function parse (template, tags) {\n return defaultWriter.parse(template, tags);\n };\n\n /**\n * Renders the `template` with the given `view`, `partials`, and `config`\n * using the default writer.\n */\n mustache.render = function render (template, view, partials, config) {\n if (typeof template !== 'string') {\n throw new TypeError('Invalid template! Template should be a \"string\" ' +\n 'but \"' + typeStr(template) + '\" was given as the first ' +\n 'argument for mustache#render(template, view, partials)');\n }\n\n return defaultWriter.render(template, view, partials, config);\n };\n\n // Export the escaping function so that the user may override it.\n // See https://github.com/janl/mustache.js/issues/244\n mustache.escape = escapeHtml;\n\n // Export these mainly for testing, but also for advanced usage.\n mustache.Scanner = Scanner;\n mustache.Context = Context;\n mustache.Writer = Writer;\n\n return mustache;\n\n})));\n","import{useState as n,useReducer as t,useEffect as e,useLayoutEffect as r,useRef as u,useImperativeHandle as o,useMemo as i,useCallback as c,useContext as l,useDebugValue as f}from\"preact/hooks\";export*from\"preact/hooks\";import{Component as a,createElement as s,options as h,toChildArray as v,Fragment as p,hydrate as d,render as m,__u as b,cloneElement as y,createRef as _,createContext as g}from\"preact\";export{createElement,createContext,createRef,Fragment,Component}from\"preact\";function E(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function w(n){this.props=n}function C(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,s(n,t)}return r.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",r.prototype.isReactComponent=!0,r.__f=!0,r}(w.prototype=new a).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var R=h.__b;h.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var x=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function k(n){function t(t,e){var r=E({},t);return delete r.ref,n(r,(e=t.ref||e)&&(\"object\"!=typeof e||\"current\"in e)?e:null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var O=function(n,t){return null==n?null:v(v(n).map(t))},A={map:O,forEach:O,count:function(n){return n?v(n).length:0},only:function(n){var t=v(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:v},N=h.__e;function L(n){return n&&((n=E({},n)).__c=null,n.__k=n.__k&&n.__k.map(L)),n}function U(n){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(U)),n}function F(){this.__u=0,this.t=null,this.__b=null}function M(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function j(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n},function(n){r=n}),r)throw r;if(!e)throw t;return s(e,u)}return u.displayName=\"Lazy\",u.__f=!0,u}function D(){this.u=null,this.o=null}h.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t.__c);N(n,t,e)},(F.prototype=new a).__c=function(n,t){var e=this;null==e.t&&(e.t=[]),e.t.push(t);var r=M(e.__v),u=!1,o=function(){u||(u=!0,t.componentWillUnmount=t.__c,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var n;if(!--e.__u)for(e.__v.__k[0]=U(e.state.__e),e.setState({__e:e.__b=null});n=e.t.pop();)n.forceUpdate()},c=e.__v;c&&!0===c.__h||e.__u++||e.setState({__e:e.__b=e.__v.__k[0]}),n.then(o,o)},F.prototype.componentWillUnmount=function(){this.t=[]},F.prototype.render=function(n,t){this.__b&&(this.__v.__k&&(this.__v.__k[0]=L(this.__b)),this.__b=null);var e=t.__e&&s(p,null,n.fallback);return e&&(e.__h=null),[s(p,null,t.__e?null:n.children),e]};var I=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]3)for(u=[u],o=3;o1&&T(t,l,u),l=x(u,t,t,n.__k,null,t.__e,l),\"function\"==typeof n.type&&(n.__d=l)))}function $(l,u,i,t,o,r,f,e,c){var a,h,v,y,_,w,k,g,b,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if(\"function\"==typeof P){if(g=u.props,b=(a=P.contextType)&&t[a.__c],x=a?b?b.props.value:a.__:t,i.__c?k=(h=u.__c=i.__c).__=h.__E:(\"prototype\"in P&&P.prototype.render?u.__c=h=new P(g,x):(u.__c=h=new d(g,x),h.constructor=P,h.render=M),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,P.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,h.__h.length&&f.push(h),T(u,e,l);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,w)})}h.context=x,h.props=g,h.state=h.__s,(a=n.__r)&&a(u),h.__d=!1,h.__v=u,h.__P=l,a=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(w=h.getSnapshotBeforeUpdate(y,_)),A=null!=a&&a.type==p&&null==a.key?a.props.children:a,m(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),k&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=H(i.__e,u,i,t,o,r,f,c);(a=n.diffed)&&a(u)}catch(l){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),n.__e(l,u,i)}return u.__e}function j(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u)})}catch(l){n.__e(l,u.__v)}})}function H(n,l,u,i,t,o,r,c){var s,a,h,v,y,p=u.props,d=l.props;if(t=\"svg\"===l.type||t,null!=o)for(s=0;s3)for(u=[u],o=3;o=i.__.length&&i.__.push({}),i.__[t]}function m(n){return o=1,p(k,n)}function p(n,r,o){var i=v(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):k(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=v(t++,3);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function l(r,o){var i=v(t++,4);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function h(n){return o=5,_(function(){return{current:n}},[])}function s(n,t,u){o=6,l(function(){\"function\"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))}function _(n,u){var r=v(t++,7);return j(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,_(function(){return n},t)}function F(n){var r=u.context[n.__c],o=v(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function d(n){var r=v(t++,10),o=m();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function q(){i.some(function(t){if(t.__P)try{t.__H.__h.forEach(b),t.__H.__h.forEach(g),t.__H.__h=[]}catch(u){return t.__H.__h=[],n.__e(u,t.__v),!0}}),i=[]}n.__r=function(n){c&&c(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(b),r.__h.forEach(g),r.__h=[])},n.diffed=function(t){f&&f(t);var u=t.__c;u&&u.__H&&u.__H.__h.length&&(1!==i.push(u)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),x&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);x&&(t=requestAnimationFrame(u))})(q))},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(b),t.__h=t.__h.filter(function(n){return!n.__||g(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),e&&e(t,u)},n.unmount=function(t){a&&a(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(b)}catch(t){n.__e(t,u.__v)}};var x=\"function\"==typeof requestAnimationFrame;function b(n){\"function\"==typeof n.u&&n.u()}function g(n){n.u=n.__()}function j(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function k(n,t){return\"function\"==typeof t?t(n):t}export{m as useState,p as useReducer,y as useEffect,l as useLayoutEffect,h as useRef,s as useImperativeHandle,_ as useMemo,A as useCallback,F as useContext,T as useDebugValue,d as useErrorBoundary};\n//# sourceMappingURL=hooks.module.js.map\n","\"use strict\";\nexports.__esModule = true;\nvar SortByHelper_1 = require(\"./components/SortBy/SortByHelper\");\nvar apisearch_1 = require(\"apisearch\");\n/**\n * ApisearchUI class\n */\nvar ApisearchHelper = /** @class */ (function () {\n function ApisearchHelper() {\n }\n /**\n * @param query\n * @param sortBy\n */\n ApisearchHelper.prototype.sortBy = function (query, sortBy) {\n (0, SortByHelper_1.applySortByToQuery)(query, sortBy);\n };\n /**\n * @param query\n * @param field\n * @param value\n * @param weight\n */\n ApisearchHelper.prototype.boostByWeightAndFilter = function (query, field, value, weight) {\n var _a;\n var scoreStrategies = (_a = query.getScoreStrategies()) !== null && _a !== void 0 ? _a : apisearch_1.ScoreStrategies.createEmpty(apisearch_1.MULTIPLY);\n scoreStrategies.addScoreStrategy(apisearch_1.ScoreStrategy.createFromArray({\n \"type\": \"weight\",\n \"weight\": weight,\n \"filter\": {\n \"field\": field,\n \"values\": [value],\n \"application_type\": apisearch_1.FILTER_MUST_ALL,\n \"filter_type\": apisearch_1.FILTER_TYPE_FIELD\n },\n \"match_main_query\": true\n }));\n query.setScoreStrategies(scoreStrategies);\n };\n return ApisearchHelper;\n}());\nexports[\"default\"] = ApisearchHelper;\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar apisearch_2 = require(\"apisearch\");\nvar IndexUUID_1 = require(\"apisearch/lib/Model/IndexUUID\");\nvar ApisearchHelper_1 = require(\"./ApisearchHelper\");\nvar ApisearchUIFactory_1 = require(\"./ApisearchUIFactory\");\nvar Bootstrap_1 = require(\"./Bootstrap\");\nvar Constants_1 = require(\"./Constants\");\nvar Container_1 = require(\"./Container\");\nvar Environment_1 = require(\"./Environment\");\nvar Widgets_1 = require(\"./widgets/Widgets\");\n/**\n * ApisearchUI class\n */\nvar ApisearchUI = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param environmentId\n * @param repository\n * @param store\n */\n function ApisearchUI(environmentId, repository, store) {\n this.initialSetupPerformed = false;\n /**\n * Environment Id\n */\n this.environmentId = environmentId;\n this.repository = repository;\n this.activeWidgets = [];\n this.widgets = Widgets_1[\"default\"];\n this.helper = new ApisearchHelper_1[\"default\"]();\n this.dictionary = {};\n /**\n * Store related properties\n */\n this.store = store;\n }\n /**\n * Initialize components\n *\n * @param firstQuery\n */\n ApisearchUI.prototype.init = function (_a) {\n var _this = this;\n var _b = _a === void 0 ? {} : _a, _c = _b.firstQuery, firstQuery = _c === void 0 ? true : _c;\n this.activeWidgets.map(function (widget) { return widget.withConfig(_this.config); });\n /**\n * 1.- Register all events on the store\n */\n this.store.on(\"render\", function () { return _this.render(); });\n this.store.on(\"toUrlObject\", function (query, object) { return _this.toUrlObject(query, object); });\n this.store.on(\"fromUrlObject\", function (object, query) { return _this.fromUrlObject(object, query); });\n /**\n * 2.- Trigger the initial render: (Mount the components)\n * To let components setup its configuration on componentWillMount()\n */\n this.render();\n /**\n * 3.- Dispatch the initial data request\n * With all widget previous initial configurations\n */\n this.firstQuery = firstQuery;\n this.fetchQuery(true);\n window.dispatchEvent(new Event(\"apisearch_loaded\", {\n bubbles: true\n }));\n };\n /**\n *\n */\n ApisearchUI.prototype.reset = function () {\n var initialQuery = this.store.getCurrentQuery().toArray();\n this.activeWidgets.map(function (widget) {\n widget.reset(initialQuery);\n });\n this.store.setCurrentQuery(apisearch_1.Query.createFromArray(initialQuery));\n this.store.setEmptyResult();\n var rendered = this.fetchQuery(false);\n if (!rendered) {\n this.render();\n }\n };\n /**\n * @param loadQuery\n *\n * @return boolean\n */\n ApisearchUI.prototype.fetchQuery = function (loadQuery) {\n /**\n * 3.- Dispatch the initial data request\n * With all widget previous initial configurations\n */\n if (typeof this.firstQuery === \"undefined\" ||\n true === this.firstQuery) {\n this.store.fetchInitialQuery(this.environmentId, this.repository, loadQuery);\n return true;\n }\n return false;\n };\n /**\n * @param dictionary\n */\n ApisearchUI.prototype.setDictionary = function (dictionary) {\n this.dictionary = dictionary;\n };\n /**\n * Add new widget\n *\n * @param widget\n *\n * @return {ApisearchUI}\n */\n ApisearchUI.prototype.addWidget = function (widget) {\n widget.withConfig(this.config);\n this.activeWidgets = __spreadArray(__spreadArray([], this.activeWidgets, true), [widget], false);\n return this;\n };\n /**\n * Add components in bulk mode\n *\n * @param widgets\n *\n * @return {ApisearchUI}\n */\n ApisearchUI.prototype.addWidgets = function () {\n var _this = this;\n var widgets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n widgets[_i] = arguments[_i];\n }\n widgets.map(function (widget) { return _this.addWidget(widget); });\n return this;\n };\n /**\n * Render.\n *\n * Loop all active components\n * Hydrate them with new props\n * And render them.\n */\n ApisearchUI.prototype.render = function () {\n var _this = this;\n this.activeWidgets.map(function (widget) {\n if (!_this.initialSetupPerformed) {\n widget.initialSetup(_this.environmentId, _this.store, _this.repository);\n }\n widget.render(_this.environmentId, _this.store, _this.repository, _this.dictionary);\n });\n this.initialSetupPerformed = true;\n window.dispatchEvent(new Event(\"apisearch_rendered\", {\n bubbles: true\n }));\n };\n /**\n *\n */\n ApisearchUI.prototype.normalizeQuery = function () {\n var _this = this;\n this.activeWidgets.map(function (widget) {\n widget.normalizeQuery(_this.environmentId, _this.store.getCurrentQuery());\n });\n };\n /**\n * @param query\n * @param object\n */\n ApisearchUI.prototype.toUrlObject = function (query, object) {\n this.activeWidgets.map(function (widget) {\n widget.toUrlObject(query, object);\n });\n };\n /**\n * @param object\n * @param query\n */\n ApisearchUI.prototype.fromUrlObject = function (object, query) {\n this.activeWidgets.map(function (widget) {\n widget.fromUrlObject(object, query);\n });\n };\n /**\n * @param config\n * @param hash\n *\n * @return {ApisearchUI}\n */\n ApisearchUI.create = function (config, hash) {\n var _a;\n apisearch_2[\"default\"].ensureRepositoryConfigIsValid(config);\n /**\n * Build environment Id\n */\n var environmentId = (0, Environment_1.createEnvironmentId)();\n /**\n * Bootstrapping ApisearchUI application\n */\n (0, Bootstrap_1.bootstrap)(environmentId, config, hash);\n /**\n * Register handleActions method (store reducer)\n * into the event dispatcher\n */\n var apisearchUI = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId));\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.registerListener(\"RENDER_INITIAL_DATA\", function (payload) { return apisearchUI.store.renderInitialData(payload); });\n dispatcher.registerListener(\"RENDER_FETCHED_DATA\", function (payload) { return apisearchUI.store.renderFetchedData(payload); });\n dispatcher.registerListener(\"UPDATE_APISEARCH_SETUP\", function (payload) { return apisearchUI.store.updateApisearchSetup(payload); });\n dispatcher.registerListener(\"NORMALIZE_QUERY\", function (payload) { return apisearchUI.normalizeQuery(); });\n /**\n * Add widgets\n */\n apisearchUI.widgets = Widgets_1[\"default\"];\n apisearchUI.config = config;\n var uiId = \"ui_\".concat(Math.ceil(Math.random() * (9999999 - 1) + 1));\n apisearchUI.reference = uiId;\n apisearchUI.userId = (_a = config.user_id) !== null && _a !== void 0 ? _a : \"\";\n window[uiId] = apisearchUI;\n window[\"apisearch_ui\"] = apisearchUI;\n /**\n * Return ApisearchUI instance\n */\n return apisearchUI;\n };\n /**\n * Create instance\n *\n * @param config\n *\n * @return {ApisearchUIFactory}\n */\n ApisearchUI.factory = function (config) {\n return ApisearchUIFactory_1[\"default\"].fromConfig(config);\n };\n /**\n * @param appId\n * @param indexId\n * @param itemId\n * @param position\n */\n ApisearchUI.prototype.click = function (appId, indexId, itemId, position) {\n try {\n if (navigator.sendBeacon === undefined) {\n this\n .repository\n .pushInteraction(IndexUUID_1.IndexUUID.createById(indexId), apisearch_1.ItemUUID.createByComposedUUID(itemId), this.userId, this.store.getCurrentQuery().getQueryText(), \"cli\", this.store.getSite(), this.store.getDevice(), position);\n }\n else {\n this.sendClickBeacon(appId, indexId, itemId, position);\n }\n var queryAsArray = JSON.parse(JSON.stringify(this.store.getCurrentQuery().toArray()));\n var resultAsArray = JSON.parse(JSON.stringify(this.store.getCurrentResult().toArray()));\n window.postMessage({\n name: \"apisearch_item_was_clicked\",\n app_id: appId,\n index_id: indexId,\n item_id: itemId,\n site: this.store.getSite(),\n device: this.store.getDevice(),\n query: queryAsArray,\n result: resultAsArray,\n position: position\n }, \"*\");\n window.postMessage({\n name: \"apisearch_item_was_interacted\",\n interaction: \"cli\",\n app_id: appId,\n index_id: indexId,\n item_id: itemId,\n site: this.store.getSite(),\n device: this.store.getDevice(),\n query: queryAsArray,\n result: resultAsArray,\n position: position\n }, \"*\");\n }\n catch (error) {\n // Silent pass.\n // Errors in Apisearch should never cause client browser error\n }\n };\n /**\n * @param appId\n * @param indexId\n * @param itemId\n * @param position\n * @private\n */\n ApisearchUI.prototype.sendClickBeacon = function (appId, indexId, itemId, position) {\n var data = new FormData();\n data.append(\"device\", this.store.getDevice());\n data.append(\"query_string\", this.store.getCurrentQuery().getQueryText());\n data.append(\"site\", this.store.getSite());\n data.append(\"user_id\", this.userId);\n data.append(\"position\", \"\" + position);\n var endpoint = this.config.options.endpoint + \"/\" + this.config.options.api_version;\n navigator.sendBeacon(endpoint + \"/\" + appId + \"/indices/\" + indexId + \"/items/\" + itemId + \"/interaction/cli?token=\" + this.config.token, data);\n };\n /**\n * @param interaction\n * @param appId\n * @param indexId\n * @param itemId\n * @param position\n */\n ApisearchUI.prototype.interact = function (interaction, appId, indexId, itemId, position) {\n this\n .repository\n .pushInteraction(IndexUUID_1.IndexUUID.createById(indexId), apisearch_1.ItemUUID.createByComposedUUID(itemId), this.userId, this.store.getCurrentQuery().getQueryText(), interaction, this.store.getSite(), this.store.getDevice(), position);\n var queryAsArray = JSON.parse(JSON.stringify(this.store.getCurrentQuery().toArray()));\n var resultAsArray = JSON.parse(JSON.stringify(this.store.getCurrentResult().toArray()));\n window.postMessage({\n name: \"apisearch_item_was_interacted\",\n interaction: interaction,\n app_id: appId,\n index_id: indexId,\n item_id: itemId,\n site: this.store.getSite(),\n device: this.store.getDevice(),\n query: queryAsArray,\n result: resultAsArray,\n position: position\n }, \"*\");\n };\n /**\n * @param appId\n * @param indexId\n *\n * @return {any}\n */\n ApisearchUI.prototype.purchase = function (appId, indexId) {\n this\n .repository\n .purchase(IndexUUID_1.IndexUUID.createById(indexId), this.userId, [], this.store.getSite(), this.store.getDevice());\n window.postMessage({\n name: \"apisearch_purchase_was_done\",\n app_id: appId,\n index_id: indexId,\n site: this.store.getSite(),\n device: this.store.getDevice()\n }, \"*\");\n };\n /**\n *\n */\n ApisearchUI.prototype.getQuery = function () {\n return this.store.getCurrentQuery().toArray();\n };\n /**\n * @param text\n */\n ApisearchUI.prototype.write = function (text) {\n text = text.trim();\n var query = this.getQuery();\n if (query.q !== text) {\n query.q = text;\n query.page = 1;\n this.pushQuery(query);\n }\n };\n /**\n * @param query\n */\n ApisearchUI.prototype.pushQuery = function (query) {\n var _this = this;\n var queryObject = apisearch_1.Query.createFromArray(query);\n this.repository\n .query(queryObject)\n .then(function (result) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n _this.store.renderFetchedData({\n \"query\": queryObject,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n };\n return ApisearchUI;\n}());\nexports[\"default\"] = ApisearchUI;\n","\"use strict\";\nexports.__esModule = true;\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\n/**\n * ApisearchUIFactory class\n */\nvar ApisearchUIFactory = /** @class */ (function () {\n function ApisearchUIFactory() {\n }\n /**\n * Create instance\n *\n * @param config\n *\n * @return {ApisearchUIFactory}\n */\n ApisearchUIFactory.fromConfig = function (config) {\n var instance = new ApisearchUIFactory();\n instance.config = config;\n return instance;\n };\n /**\n * @param hash\n *\n * @return {ApisearchUI}\n */\n ApisearchUIFactory.prototype.createUI = function (hash) {\n if (hash === void 0) { hash = null; }\n return ApisearchUI_1[\"default\"].create(this.config, hash);\n };\n return ApisearchUIFactory;\n}());\nexports[\"default\"] = ApisearchUIFactory;\n","\"use strict\";\nexports.__esModule = true;\nexports.bootstrap = void 0;\nvar Dispatcher_1 = require(\"./Dispatcher\");\nvar apisearch_1 = require(\"apisearch\");\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\nvar Container_1 = require(\"./Container\");\nvar Store_1 = require(\"./Store\");\nvar Constants_1 = require(\"./Constants\");\n/**\n * @param environmentId\n * @param config\n * @param hash\n */\nfunction bootstrap(environmentId, config, hash) {\n var configAsString = JSON.stringify(config);\n var repositoryId = \"\".concat(Constants_1.APISEARCH_REPOSITORY, \"__\").concat(configAsString);\n var storeId = \"\".concat(Constants_1.APISEARCH_STORE, \"__\").concat(environmentId);\n var dispatcherId = \"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId);\n var configId = \"\".concat(Constants_1.APISEARCH_CONFIG, \"__\").concat(environmentId);\n var asuiId = \"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId);\n /**\n * Register Apisearch repository\n */\n Container_1[\"default\"].register(repositoryId, function () {\n return apisearch_1[\"default\"].createRepository(config);\n });\n /**\n * Register apisearch store\n */\n Container_1[\"default\"].register(storeId, function () {\n var _a, _b, _c, _d, _e, _f;\n return new Store_1[\"default\"](config.coordinate, config.options.min_score, hash, (_a = config.user_id) !== null && _a !== void 0 ? _a : \"\", (_b = config.options.site) !== null && _b !== void 0 ? _b : \"\", (_c = config.options.language) !== null && _c !== void 0 ? _c : \"\", (_d = config.options.device) !== null && _d !== void 0 ? _d : \"\", (_e = config.options.generate_random_session_uuid) !== null && _e !== void 0 ? _e : false, (_f = config.options.initial_state) !== null && _f !== void 0 ? _f : {});\n });\n /**\n * Register an event dispatcher\n */\n Container_1[\"default\"].register(dispatcherId, function () {\n return new Dispatcher_1.Dispatcher();\n });\n /**\n * Register Apisearch config\n */\n Container_1[\"default\"].register(configId, function () {\n return config;\n });\n /**\n * Apisearch UI Instance\n */\n Container_1[\"default\"].register(asuiId, function () {\n return new ApisearchUI_1[\"default\"](environmentId, Container_1[\"default\"].get(repositoryId), Container_1[\"default\"].get(storeId));\n });\n}\nexports.bootstrap = bootstrap;\n","\"use strict\";\nexports.__esModule = true;\nexports.APISEARCH_CONFIG = exports.APISEARCH_UI = exports.APISEARCH_DISPATCHER = exports.APISEARCH_STORE = exports.APISEARCH_REPOSITORY = void 0;\n/**\n * Service constants\n */\nexports.APISEARCH_REPOSITORY = \"apisearch_repository\";\nexports.APISEARCH_STORE = \"apisearch_store\";\nexports.APISEARCH_DISPATCHER = \"apisearch_dispatcher\";\nexports.APISEARCH_UI = \"apisearch_ui\";\nexports.APISEARCH_CONFIG = \"apisearch_config\";\n","\"use strict\";\nexports.__esModule = true;\n/**\n * Apisearch Dependency Injection Container\n */\nvar Container = /** @class */ (function () {\n function Container() {\n this.services = {};\n }\n /**\n * Get service\n *\n * @param id\n */\n Container.prototype.get = function (id) {\n if (this.services[id]) {\n return this.services[id];\n }\n throw new Error(\"Service with id (\".concat(id, \") is not registered.\"));\n };\n /**\n * Register service\n *\n * @param id\n * @param serviceCallback\n */\n Container.prototype.register = function (id, serviceCallback) {\n this.services[id] = serviceCallback();\n };\n return Container;\n}());\nexports[\"default\"] = new Container;\n","\"use strict\";\nexports.__esModule = true;\nexports.Dispatcher = void 0;\nvar Dispatcher = /** @class */ (function () {\n function Dispatcher() {\n this.events = {};\n }\n Dispatcher.prototype.registerListener = function (event, callback) {\n // Create the event if not exists\n if (this.events[event] === undefined) {\n this.events[event] = {\n listeners: []\n };\n }\n this.events[event].listeners.push(callback);\n };\n Dispatcher.prototype.dispatch = function (event, payload) {\n this.events[event].listeners.forEach(function (listener) {\n listener(payload);\n });\n };\n return Dispatcher;\n}());\nexports.Dispatcher = Dispatcher;\n","\"use strict\";\nexports.__esModule = true;\nexports.createEnvironmentId = void 0;\n/**\n * Create an envID\n */\nvar createEnvironmentId = function () { return \"env_\".concat(Math.ceil(Math.random() * (9999999 - 1) + 1)); };\nexports.createEnvironmentId = createEnvironmentId;\n","\"use strict\";\nexports.__esModule = true;\nexports.levenshteinDistance = exports.highlightLine = exports.highlightElement = void 0;\nfunction highlightElement(element, inputText) {\n var children = element.querySelectorAll(\".highlight\");\n var inputTextParts = inputText.split(\" \").filter(function (word) { return (word !== \"\"); });\n for (var i = 0; i < children.length; i++) {\n highlightLine(children[i], inputTextParts);\n }\n}\nexports.highlightElement = highlightElement;\nfunction highlightLine(element, inputTextParts) {\n var lineText = element.textContent;\n var lineTextParts = lineText.split(\" \").filter(function (word) { return (word !== \"\"); });\n var replaces = {};\n for (var i = 0; i < lineTextParts.length; i++) {\n for (var j = 0; j < inputTextParts.length; j++) {\n var lineWord = lineTextParts[i];\n var inputWord = inputTextParts[j];\n var minLength = Math.min(lineWord.length, inputWord.length);\n minLength = Math.max(minLength, inputWord.length);\n var lineWordSplit = lineWord.substring(0, minLength).toLowerCase();\n var inputWordSplit = inputWord.substring(0, minLength).toLowerCase();\n var distance = levenshteinDistance(lineWordSplit, inputWordSplit);\n var allowedDistance = 0;\n if (minLength >= 5 && minLength < 10) {\n allowedDistance = 1;\n }\n else if (minLength >= 10) {\n allowedDistance = 2;\n }\n if (distance <= allowedDistance) {\n replaces[lineWord] = \"\" + lineWord + \"\";\n break;\n }\n }\n }\n for (var _i = 0, _a = Object.entries(replaces); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n lineText = lineText.replaceAll(key, value);\n }\n element.innerHTML = lineText;\n}\nexports.highlightLine = highlightLine;\nfunction levenshteinDistance(str1, str2) {\n if (str1 === void 0) { str1 = \"\"; }\n if (str2 === void 0) { str2 = \"\"; }\n var track = Array(str2.length + 1).fill(null).map(function () {\n return Array(str1.length + 1).fill(null);\n });\n for (var i = 0; i <= str1.length; i += 1) {\n track[0][i] = i;\n }\n for (var j = 0; j <= str2.length; j += 1) {\n track[j][0] = j;\n }\n for (var j = 1; j <= str2.length; j += 1) {\n for (var i = 1; i <= str1.length; i += 1) {\n var indicator = str1[i - 1] === str2[j - 1] ? 0 : 1;\n track[j][i] = Math.min(track[j][i - 1] + 1, // deletion\n track[j - 1][i] + 1, // insertion\n track[j - 1][i - 1] + indicator);\n }\n }\n return track[str2.length][str1.length];\n}\nexports.levenshteinDistance = levenshteinDistance;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar events_1 = require(\"events\");\nvar Constants_1 = require(\"./Constants\");\nvar Container_1 = require(\"./Container\");\n/**\n * Flux pattern store class\n */\nvar Store = /** @class */ (function (_super) {\n __extends(Store, _super);\n /**\n * @param coordinate\n * @param minScore\n * @param hash\n * @param userId\n * @param site\n * @param language\n * @param device\n * @param generateRandomSessionUUID\n * @param initialState\n */\n function Store(coordinate, minScore, hash, userId, site, language, device, generateRandomSessionUUID, initialState) {\n var _this = _super.call(this) || this;\n _this.withHash = false;\n _this.doNotCleanUrlHashAtFirst = false;\n _this.dirty = true;\n _this.site = site;\n _this.device = device;\n _this.initialState = initialState;\n var initialQuery = Store.loadInitialQuery(coordinate, userId, site, language, device);\n _this.window = window.top;\n _this.isUnderIframe = (window !== window.top);\n if ((typeof hash === \"string\")) {\n _this.withHash = true;\n _this.urlHash = (hash === \"\") ? \"{}\" : hash;\n if (_this.urlHash.charAt(0) === \"#\") {\n _this.urlHash = _this.urlHash.substr(1);\n }\n }\n if (minScore) {\n initialQuery.setMinScore(minScore);\n }\n /**\n * Data received\n */\n _this.setEmptyResult();\n _this.currentVisibleResults = false;\n if (generateRandomSessionUUID) {\n initialQuery.setMetadataValue(\"session_uid\", Store.createUID(16));\n }\n _this.setCurrentQuery(initialQuery);\n return _this;\n }\n /**\n * Is dirty\n *\n * @return {any}\n */\n Store.prototype.isDirty = function () {\n return this.dirty;\n };\n /**\n *\n */\n Store.prototype.getSite = function () {\n return this.site;\n };\n /**\n *\n */\n Store.prototype.getDevice = function () {\n return this.device;\n };\n /**\n * Get current query\n *\n * @return {Query}\n */\n Store.prototype.getCurrentQuery = function () {\n return this.currentQuery;\n };\n /**\n * @param query\n */\n Store.prototype.setCurrentQuery = function (query) {\n this.currentQuery = query;\n };\n /**\n * Get current result\n *\n * @return {Result}\n */\n Store.prototype.getCurrentResult = function () {\n return this.currentResult;\n };\n /**\n * @param result\n */\n Store.prototype.setCurrentResult = function (result) {\n this.currentResult = result;\n };\n /**\n *\n */\n Store.prototype.setEmptyResult = function () {\n this.currentResult = apisearch_1[\"default\"].createEmptyResult();\n };\n /**\n * Get current result\n *\n * @return {boolean}\n */\n Store.prototype.hasProperResult = function () {\n return this.currentResult.getTotalItems() > 0;\n };\n /**\n * Results are visible\n *\n * @return {boolean}\n */\n Store.prototype.resultsAreVisible = function () {\n return this.currentVisibleResults;\n };\n /**\n * @param payload\n */\n Store.prototype.updateApisearchSetup = function (payload) {\n this.currentQuery = payload.query;\n };\n /**\n * @param payload\n */\n Store.prototype.renderInitialData = function (payload) {\n var result = payload.result, query = payload.query, _ = payload._;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n this.currentVisibleResults = query !== undefined;\n this.emit(\"render\");\n this.replaceUrl(query, result, this.currentVisibleResults);\n };\n /**\n * @param payload\n */\n Store.prototype.renderFetchedData = function (payload) {\n var result = payload.result, query = payload.query, visibleResults = payload.visibleResults;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n if (visibleResults !== undefined) {\n this.currentVisibleResults = visibleResults;\n }\n this.emit(\"render\");\n this.replaceUrl(query, result, visibleResults);\n };\n /**\n * Create an uid\n */\n Store.createUID = function (length) {\n var result = \"\";\n var characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n };\n /**\n * @param environmentId\n * @param repository\n * @param loadQuery\n */\n Store.prototype.fetchInitialQuery = function (environmentId, repository, loadQuery) {\n var _this = this;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n this.currentQuery = loadQuery\n ? this.loadQuery(this.currentQuery)\n : this.currentQuery;\n dispatcher.dispatch(\"NORMALIZE_QUERY\", {\n query: this.currentQuery\n });\n /**\n * In initial query, we must delete user\n */\n var queryAsArray = this.currentQuery.toArray();\n queryAsArray.user = null;\n repository\n .query(apisearch_1.Query.createFromArray(queryAsArray))\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_INITIAL_DATA\", {\n query: _this.currentQuery,\n result: result\n });\n });\n };\n /**\n * @param coordinate\n * @param userId\n * @param site\n * @param language\n * @param device\n *\n * @private\n */\n Store.loadInitialQuery = function (coordinate, userId, site, language, device) {\n var withCoordinate = (coordinate &&\n coordinate.lat !== undefined &&\n coordinate.lon !== undefined);\n var q = {};\n if (withCoordinate) {\n q.coordinate = coordinate;\n }\n if (userId !== \"\") {\n q.user = { id: userId };\n }\n if (q.metadata === undefined) {\n q.metadata = { device: device };\n }\n if (site !== \"\") {\n q.metadata.site = site;\n }\n if (language !== \"\") {\n q.metadata.language = language;\n }\n return apisearch_1.Query.createFromArray(q);\n };\n /**\n * @param query\n */\n Store.prototype.loadQuery = function (query) {\n var queryAsObject = query.toArray();\n if (Object.keys(this.initialState).length > 0) {\n this.emit(\"fromUrlObject\", this.initialState, queryAsObject);\n return apisearch_1.Query.createFromArray(queryAsObject);\n }\n if (!this.withHash) {\n return query;\n }\n var urlObject = {};\n if (this.urlHash.match(\"q=.*\") !== null) {\n var urlHashQuery = decodeURI(this.urlHash.slice(2));\n urlObject = { q: urlHashQuery };\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n else {\n try {\n urlObject = (this.urlHash !== undefined &&\n this.urlHash !== null &&\n this.urlHash !== \"\" &&\n this.urlHash !== \"/\")\n ? JSON.parse(decodeURI(this.urlHash))\n : {};\n if (Object.keys(urlObject).length > 0) {\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n }\n catch (e) {\n // Silent pass\n this.doNotCleanUrlHashAtFirst = true;\n }\n }\n return apisearch_1.Query.createFromArray(queryAsObject);\n };\n /**\n *\n * @param query\n * @param result\n * @param visibleResults\n */\n Store.prototype.replaceUrl = function (query, result, visibleResults) {\n if (!this.withHash) {\n return;\n }\n var queryAsObject = query.toArray();\n var urlObject = {};\n this.emit(\"toUrlObject\", queryAsObject, urlObject);\n var objectAsJson;\n if (Object.keys(urlObject).length === 1 &&\n typeof urlObject.q !== \"undefined\") {\n objectAsJson = \"q=\" + urlObject.q;\n }\n else {\n objectAsJson = decodeURI(JSON.stringify(urlObject));\n objectAsJson = (objectAsJson === \"{}\") ? \"\" : objectAsJson;\n objectAsJson = encodeURI(objectAsJson);\n }\n if (!this.isUnderIframe) {\n var path = window.location.href;\n var pathWithoutHash = path.split(\"#\", 2)[0];\n history.replaceState(\"\", \"\", pathWithoutHash + \"#\" + objectAsJson);\n if (objectAsJson === \"\") {\n history.replaceState(\"\", \"\", pathWithoutHash);\n }\n }\n else {\n if (!this.doNotCleanUrlHashAtFirst) {\n this.window.postMessage({\n name: \"apisearch_replace_hash\",\n hash: objectAsJson\n }, \"*\");\n }\n this.doNotCleanUrlHashAtFirst = false;\n }\n };\n return Store;\n}(events_1.EventEmitter));\nexports[\"default\"] = Store;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Result Information Component\n */\nvar BannerComponent = /** @class */ (function (_super) {\n __extends(BannerComponent, _super);\n /**\n * Constructor\n */\n function BannerComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n BannerComponent.prototype.componentWillReceiveProps = function (props) {\n var _a;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var banners = (_a = props.store.getCurrentResult().metadata.banners) !== null && _a !== void 0 ? _a : [];\n if (!banners) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var filteredBanners = banners.filter(function (banner) { return banner.position === props.position; });\n if (filteredBanners.length === 0) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var firstBanner = filteredBanners[0];\n this.setState(function (prevState) {\n return {\n mobile_img: firstBanner.mobile_img,\n desktop_img: firstBanner.desktop_img,\n url: firstBanner.url\n };\n });\n };\n BannerComponent.prototype.render = function () {\n var _a;\n if (this.state.desktop_img === \"\") {\n return;\n }\n var data = {\n desktop_img: this.state.desktop_img,\n mobile_img: (_a = this.state.mobile_img) !== null && _a !== void 0 ? _a : this.state.desktop_img,\n url: this.state.url,\n has_url: this.state.url !== \"\",\n breaking_point_size: this.props.breakingPointSize,\n image_prefix: this.props.imagePrefix\n };\n return ((0, preact_1.h)(Template_1[\"default\"], { template: defaultTemplates_1.defaultBannerTemplate, data: data, dictionary: this.props.dictionary }));\n };\n return BannerComponent;\n}(preact_1.Component));\nexports[\"default\"] = BannerComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultBannerTemplate = void 0;\nexports.defaultBannerTemplate = \"\\n
\\n {{#has_url}}{{/has_url}}\\n \\n \\n \\n \\n {{#has_url}}{{/has_url}}\\n
\\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.aggregationSetup = void 0;\n/**\n * Checkbox filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param aggregationField\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, aggregationField) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.aggregateBy(filterName, aggregationField, apisearch_1.FILTER_TYPE_FIELD);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param isChecked\n * @param filterValue\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, filterName, filterField, isChecked, filterValue) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, isChecked\n ? [filterValue]\n : [], apisearch_1.FILTER_MUST_ALL, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../MultipleFilter/Helpers\");\nvar CheckboxFilterActions_1 = require(\"./CheckboxFilterActions\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Checkbox Filter Component\n */\nvar CheckboxFilterComponent = /** @class */ (function (_super) {\n __extends(CheckboxFilterComponent, _super);\n function CheckboxFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param activeElement\n */\n _this.handleChange = function (activeElement) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.onChangeSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, activeElement, props.filterValue);\n };\n return _this;\n }\n /**\n * Component will mount\n */\n CheckboxFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var aggregationField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, aggregationField);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n CheckboxFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n aggregation: props\n .store\n .getCurrentResult()\n .getAggregation(props.filterName)\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n CheckboxFilterComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var filterValue = props.filterValue;\n if (typeof filterValue === \"boolean\") {\n filterValue = filterValue ? \"true\" : \"false\";\n }\n var n = 0;\n var isActive = (0, Helpers_1.getFilterValuesFromQuery)(props.store.getCurrentQuery(), props.filterName)[0];\n var aggregation = state.aggregation;\n if (aggregation != null) {\n var counters = aggregation.getCounters();\n for (var i in counters) {\n var counter = counters[i];\n if (counter.values.name === filterValue) {\n n = counter.getN();\n break;\n }\n }\n }\n var label = props.label\n ? props.label\n : props.filterName;\n var that = this;\n var uid = Math.floor(Math.random() * 10000000000);\n var templateData = {\n n: n,\n isActive: isActive,\n label: label,\n uid: uid\n };\n if (n === 0) {\n return null;\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-checkboxFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-checkboxFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-checkboxFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((isActive) ? activeClassName : \"\"), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleChange(!isActive);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: this.props.dictionary }))));\n };\n return CheckboxFilterComponent;\n}(preact_1.Component));\nCheckboxFilterComponent.defaultProps = {\n filterValue: 'true',\n classNames: {\n container: \"\",\n top: \"\",\n item: \"\",\n active: \"as-checkboxFilter__item--active\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = CheckboxFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{label}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.clearFiltersAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterToClear\n * @param filterValueToClear\n */\nfunction clearFiltersAction(environmentId, currentQuery, repository, filterToClear, filterValueToClear) {\n if (filterToClear === void 0) { filterToClear = null; }\n if (filterValueToClear === void 0) { filterValueToClear = null; }\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (filterToClear === null) {\n clonedQuery.filters = {\n _query: currentQuery.getFilter(\"_query\")\n };\n }\n else if (filterValueToClear === null) {\n delete clonedQuery.filters[filterToClear];\n }\n else {\n var values = clonedQuery.filters[filterToClear].values;\n var valueIndex = values.indexOf(filterValueToClear, 0);\n if (valueIndex > -1) {\n clonedQuery.filters[filterToClear].values.splice(valueIndex, 1);\n }\n if (clonedQuery.filters[filterToClear].values.length === 0) {\n delete clonedQuery.filters[filterToClear];\n }\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.clearFiltersAction = clearFiltersAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ClearFiltersActions_1 = require(\"./ClearFiltersActions\");\n/**\n * Result Information Component\n */\nvar ClearFiltersComponent = /** @class */ (function (_super) {\n __extends(ClearFiltersComponent, _super);\n /**\n * Constructor\n */\n function ClearFiltersComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n _this.setState(function (prevState) {\n return {\n appliedFilters: [],\n showClearFilters: false\n };\n });\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository);\n };\n /**\n * Handle individual click\n */\n _this.handleIndividualClick = function (filterKey, filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository, filterKey, filterValue);\n };\n _this.state = {\n appliedFilters: [],\n showClearFilters: false\n };\n return _this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n ClearFiltersComponent.prototype.componentWillReceiveProps = function (props) {\n var appliedFiltersFormatted = this.getFiltersToShow();\n this.setState(function (prevState) {\n return {\n appliedFilters: appliedFiltersFormatted,\n showClearFilters: appliedFiltersFormatted.length > 0\n };\n });\n };\n /**\n * @param filterToAvoid\n */\n ClearFiltersComponent.prototype.getFiltersToShow = function (filterToAvoid) {\n if (filterToAvoid === void 0) { filterToAvoid = null; }\n var appliedFilters = this.props.store.getCurrentQuery().getFilters();\n var appliedFiltersFormatted = [];\n for (var _i = 0, _a = Object.entries(appliedFilters); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], filter = _b[1];\n if (filter instanceof apisearch_1.Filter && (key !== \"_query\") && (key !== filterToAvoid)) {\n appliedFiltersFormatted.push({\n filter: key,\n num: filter.getValues().length,\n values: filter.getValues()\n });\n }\n }\n return appliedFiltersFormatted;\n };\n /**\n * Render\n *\n * @return {}\n */\n ClearFiltersComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var containerClassName = props.classNames.container;\n var filtersListClassName = props.classNames.filtersList;\n var filterClassName = props.classNames.filter;\n var containerTemplate = props.template.container;\n var appliedFiltersFormatted = this.state.appliedFilters;\n var individualFilterClear = null;\n var isEmptyClass = (this.state.appliedFilters.length === 0) ? \"empty\" : \"\";\n if (props.showIndividualFilterValueClear) {\n var values_1 = [];\n this.state.appliedFilters.forEach(function (filter) {\n filter.values.forEach(function (value) { return values_1.push({\n filter: filter.filter,\n value: value\n }); });\n });\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, values_1.map(function (filter) {\n var _a, _b;\n var isFilterPrice = filter.value.indexOf(\"..\") >= 0;\n var template = isFilterPrice\n ? _this.props.template.filter_price\n : _this.props.template.filter;\n if (isFilterPrice) {\n filter.parts = filter.value.replace(/[\\[\\]]/, \"\").split(\"..\");\n if (((_a = filter.parts[0]) !== null && _a !== void 0 ? _a : \"\") === \"0\") {\n template = _this.props.template.filter_price_only_to;\n }\n else if (((_b = filter.parts[1]) !== null && _b !== void 0 ? _b : \"\") === \"\") {\n template = _this.props.template.filter_price_only_from;\n }\n }\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, filter.value); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: template, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n else if (props.showIndividualFilterClear) {\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, appliedFiltersFormatted.map(function (filter) {\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, null); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: _this.props.template.filter, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n return (this.state.showClearFilters)\n ? ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName, \" \").concat(isEmptyClass) },\n props.showGlobalFilterClear\n ? (0, preact_1.h)(\"div\", { onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary }))\n : \"\",\n individualFilterClear)) : null;\n };\n return ClearFiltersComponent;\n}(preact_1.Component));\nClearFiltersComponent.defaultProps = {\n classNames: {\n container: \"\",\n filter: \"\",\n filtersList: \"\"\n },\n showGlobalFilterClear: true,\n showIndividualFilterClear: false,\n showIndividualFilterValueClear: false,\n template: {\n container: \"Clear filters\",\n filter: \"Clear {{filter}} ({{num}})\"\n }\n};\nexports[\"default\"] = ClearFiltersComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar Clone = /** @class */ (function () {\n function Clone() {\n }\n Clone.object = function (object) {\n return Object.assign(Object.create(Object.getPrototypeOf(object)), object);\n };\n return Clone;\n}());\nexports[\"default\"] = Clone;\n","\"use strict\";\nexports.__esModule = true;\nexports.onWordClickAction = void 0;\nvar apisearch_1 = require(\"apisearch\");\nvar Clone_1 = require(\"./Clone\");\nvar Container_1 = require(\"../Container\");\nvar Constants_1 = require(\"../Constants\");\n/**\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param word\n * @param category\n */\nfunction onWordClickAction(environmentId, currentQuery, repository, word, category) {\n if (category === void 0) { category = null; }\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [word];\n clonedQuery.page = 1;\n if (category) {\n clonedQuery = apisearch_1.Query.createFromArray(clonedQuery);\n clonedQuery.filterBy(\"Categoría\", \"category_level_0\", [category]);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onWordClickAction = onWordClickAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Result Information Component\n */\nvar InformationComponent = /** @class */ (function (_super) {\n __extends(InformationComponent, _super);\n /**\n * Constructor\n */\n function InformationComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n hits: 0,\n total: 0,\n visible: false\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n InformationComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return (props.store.getCurrentResult() == null)\n ? {\n hits: 0,\n total: 0,\n visible: false\n }\n : {\n hits: props.store.getCurrentResult().getTotalHits(),\n total: props.store.getCurrentResult().getTotalItems(),\n visible: true\n };\n });\n };\n InformationComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n var formatData = props.formatData;\n if (!this.state.visible) {\n return;\n }\n var currentQuery = this.props.store.getCurrentQuery();\n var size = currentQuery.getSize();\n var page = currentQuery.getPage();\n var from = (page - 1) * size;\n var to = from + size;\n var totalHits = this.state.hits.toLocaleString();\n var moreThanLimit = false;\n if (totalHits === \"10,000\") {\n totalHits = '+10,000';\n moreThanLimit = true;\n }\n /**\n * Data accessible to the template\n */\n var reducedTemplateData = {\n total_hits: totalHits,\n total_items: this.state.total.toLocaleString(),\n page: page,\n size: size,\n from: from + 1,\n to: to,\n more_than_limit: moreThanLimit\n };\n var formattedTemplateData = formatData(reducedTemplateData);\n return ((0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, data: formattedTemplateData, className: \"as-information \".concat(containerClassName), dictionary: this.props.dictionary }));\n };\n return InformationComponent;\n}(preact_1.Component));\nInformationComponent.defaultProps = {\n classNames: {\n container: ''\n },\n template: {\n container: 'Found {{total_hits}}/{{total_items}}'\n },\n formatData: function (data) { return data; }\n};\nexports[\"default\"] = InformationComponent;\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nexports.isLeveledFilter = exports.getFilterValuesFromQuery = exports.isFilterAvailable = exports.getShadowFilterValuesFromQuery = exports.manageCurrentFilterItems = exports.wasElementRecentlySelected = void 0;\n/**\n * @param selectedItem\n * @param currentItems\n */\nfunction wasElementRecentlySelected(selectedItem, currentItems) {\n return !currentItems.some(function (item) { return item === selectedItem; });\n}\nexports.wasElementRecentlySelected = wasElementRecentlySelected;\n/**\n * Manage filter items\n *\n * If an item is on the list, remove it\n * else, add it!\n *\n * @param selectedItem\n * @param currentItems\n * @param wasElementRecentlySelected\n * @param deleteIfWasRemoved\n *\n * @returns {any}\n */\nfunction manageCurrentFilterItems(selectedItem, currentItems, wasElementRecentlySelected, deleteIfWasRemoved) {\n if (!wasElementRecentlySelected) {\n return deleteIfWasRemoved\n ? currentItems.filter(function (item) { return item !== selectedItem; })\n : currentItems;\n }\n else {\n return __spreadArray(__spreadArray([], currentItems, true), [\n selectedItem,\n ], false);\n }\n}\nexports.manageCurrentFilterItems = manageCurrentFilterItems;\n/**\n * @param query\n * @param filterName\n * @param withCurrent\n */\nfunction getShadowFilterValuesFromQuery(query, filterName, withCurrent) {\n var fields = [];\n if (isFilterAvailable(query, filterName, 6)) {\n var fieldName = query.filters[filterName].field.substr(17);\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n for (var it_1 = 1; it_1 < currentLevel; it_1++) {\n var iterationFieldName = fieldNameWithoutLevel + \"_\" + it_1;\n if (query.filters[iterationFieldName] !== undefined) {\n fields.push(query.filters[iterationFieldName].values[0]);\n }\n }\n if (withCurrent) {\n fields.push(query.filters[filterName].values[0]);\n }\n }\n return fields;\n}\nexports.getShadowFilterValuesFromQuery = getShadowFilterValuesFromQuery;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction isFilterAvailable(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return (query.filters !== undefined &&\n query.filters !== null &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined &&\n query.filters[filterName] !== null &&\n (applicationType === null ||\n query.filters[filterName].applicationType === applicationType ||\n query.filters[filterName].application_type === applicationType));\n}\nexports.isFilterAvailable = isFilterAvailable;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction getFilterValuesFromQuery(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return isFilterAvailable(query, filterName, applicationType)\n ? query.filters[filterName].values\n : [];\n}\nexports.getFilterValuesFromQuery = getFilterValuesFromQuery;\n/**\n * @param filter\n */\nfunction isLeveledFilter(filter) {\n return filter.application_type === 6 ||\n filter.applicationType === 6;\n}\nexports.isLeveledFilter = isLeveledFilter;\n","\"use strict\";\nexports.__esModule = true;\nexports.configureQueryWithShadowLeveledFilters = exports.modifyQueryAggregationWithProperLevelValue = exports.filterAction = exports.aggregationSetup = void 0;\n/**\n * Multiple filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar apisearch_2 = require(\"apisearch\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param promoted\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, aggregationField, applicationType, sortBy, fetchLimit, ranges, promoted) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit, promoted);\n }\n else {\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * Filter action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param filterValues\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param labels\n * @param shadowLeveledFilters\n * @param originalFilterField\n * @param promoted\n * @param selectedFilter\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterValues, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, promoted, selectedFilter) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.filterByRange(filterName, filterField, rangesValues, filterValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, false, sortBy);\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit);\n }\n else {\n clonedQuery.filterBy(filterName, filterField, filterValues, applicationType, false, sortBy);\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n if (applicationType === 6) {\n configureQueryWithShadowLeveledFilters(clonedQuery, shadowLeveledFilters, originalFilterField);\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n // We must explicitly tell that a filter was added at this point\n if (selectedFilter) {\n clonedQuery.setMetadataValue(\"af\", [filterField, selectedFilter]);\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n */\nfunction modifyQueryAggregationWithProperLevelValue(environmentId, currentQuery, filterName, filterField, aggregationField) {\n if (currentQuery.filters !== undefined &&\n currentQuery.filters[filterName] !== undefined) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var fieldName = currentQuery.filters[filterName].field;\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n clonedQuery.aggregations[filterName].field = fieldNameWithoutLevel + \"_\" + (currentLevel + 1);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n }\n}\nexports.modifyQueryAggregationWithProperLevelValue = modifyQueryAggregationWithProperLevelValue;\n/**\n * @param query\n * @param shadowLeveledFilters\n * @param originalFilterField\n */\nfunction configureQueryWithShadowLeveledFilters(query, shadowLeveledFilters, originalFilterField) {\n for (var it_1 = 1; it_1 < 10; it_1++) {\n var iterationFieldName = originalFilterField + \"_level_\" + it_1;\n delete (query.filters[iterationFieldName]);\n delete (query.aggregations[iterationFieldName]);\n }\n if (shadowLeveledFilters.length > 0) {\n var levelCounter_1 = 1;\n shadowLeveledFilters.forEach(function (filterValue) {\n var leveledFieldName = originalFilterField + \"_level_\" + (levelCounter_1++);\n query.filterBy(leveledFieldName, leveledFieldName, [filterValue], apisearch_1.FILTER_AT_LEAST_ONE);\n });\n }\n}\nexports.configureQueryWithShadowLeveledFilters = configureQueryWithShadowLeveledFilters;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar MultipleFilterActions_1 = require(\"./MultipleFilterActions\");\nvar Helpers_1 = require(\"./Helpers\");\nvar Template_1 = require(\"../Template\");\nvar ShowMoreComponent_1 = require(\"./ShowMoreComponent\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Filter Component\n */\nvar MultipleFilterComponent = /** @class */ (function (_super) {\n __extends(MultipleFilterComponent, _super);\n /**\n * Constructor\n */\n function MultipleFilterComponent() {\n var _this = _super.call(this) || this;\n _this.currentLevel = 0;\n _this.propsReceived = false;\n /**\n * @param selectedFilter\n * @param level\n */\n _this.handleClick = function (selectedFilter, level) {\n var _a;\n var props = _this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : filterField;\n var applicationType = props.applicationType;\n var sortBy = props.sortBy;\n var ranges = props.ranges;\n var labels = props.labels;\n var fetchLimit = props.fetchLimit;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var selectedFilterAsString = String(selectedFilter);\n var valuesAsString = (applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, filterName);\n var wasNotSelected = (0, Helpers_1.wasElementRecentlySelected)(selectedFilterAsString, valuesAsString);\n var filterItems = (0, Helpers_1.manageCurrentFilterItems)(selectedFilterAsString, valuesAsString, wasNotSelected, (applicationType !== 6));\n var currentLevel = level;\n if (applicationType === 6) {\n currentLevel = wasNotSelected ? currentLevel : (currentLevel - 1);\n }\n var shadowLeveledFilters = [];\n var originalFilterField = filterField;\n if (applicationType === 6) {\n filterField = filterField + \"_level_\" + (currentLevel);\n aggregationField = aggregationField + \"_level_\" + (currentLevel + 1);\n filterItems = filterItems.slice(0, currentLevel);\n shadowLeveledFilters = filterItems.slice(0, -1);\n filterItems = filterItems.slice(-1);\n }\n _this.currentLevel = currentLevel;\n /**\n * Dispatch filter action\n */\n (0, MultipleFilterActions_1.filterAction)(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterItems, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, props.promoted, wasNotSelected ? selectedFilterAsString : null);\n };\n /**\n * Handle show more\n */\n _this.handleShowMore = function () {\n var viewLimit = _this.state.aggregations.length;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n /**\n * Handle show less\n */\n _this.handleShowLess = function () {\n var viewLimit = _this.props.viewLimit;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n _this.state = {\n aggregations: [],\n viewLimit: 0\n };\n return _this;\n }\n /**\n * Components will mount\n */\n MultipleFilterComponent.prototype.componentWillMount = function () {\n var _a;\n var props = this.props;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : props.filterField;\n var applicationType = props.applicationType;\n var fetchLimit = props.fetchLimit;\n var viewLimit = props.viewLimit;\n /**\n * Set view items limit\n */\n var isViewLimitProperlySet = (viewLimit && viewLimit < fetchLimit);\n this.setState(function (_) {\n return {\n viewLimit: (isViewLimitProperlySet)\n ? viewLimit\n : fetchLimit\n };\n });\n if (applicationType === 6) {\n aggregationField = aggregationField + \"_level_1\";\n }\n /**\n * Dispatch action\n */\n (0, MultipleFilterActions_1.aggregationSetup)(props.environmentId, props.store.getCurrentQuery(), props.filterName, props.filterField, aggregationField, applicationType, props.sortBy, fetchLimit, props.ranges, props.promoted);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n MultipleFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var filterName = props.filterName;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n aggregations: [],\n filters: []\n };\n });\n return;\n }\n var result = props.store.getCurrentResult();\n var aggregation = result.getAggregation(filterName);\n var aggregations = [];\n if (aggregation && typeof aggregation.getCounters === \"function\") {\n /**\n * Getting aggregation from aggregations\n */\n var counters = aggregation.getCounters();\n var countersAsArray = Object.values(counters);\n aggregations = props.activeFirst\n ? __spreadArray(__spreadArray([], countersAsArray.filter(function (counter) {\n return true === counter.isUsed();\n }), true), countersAsArray.filter(function (counter) {\n return (false === counter.isUsed() ||\n null === counter.isUsed());\n }), true) : countersAsArray;\n }\n this.setState(function (prevState) {\n return {\n aggregations: aggregations\n };\n });\n if (props.applicationType === 6 &&\n this.propsReceived === false) {\n var filter = props.store.getCurrentQuery().getFilter(filterName);\n this.currentLevel = (filter === undefined || filter === null)\n ? this.currentLevel\n : filter.values\n ? (filter.values.length + 1)\n : this.currentLevel;\n this.propsReceived = true;\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n MultipleFilterComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var viewLimit = props.viewLimit;\n var fetchLimit = props.fetchLimit;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var showMoreContainerClassName = props.classNames.showMoreContainer;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var showMoreTemplate = props.template.showMore;\n var showLessTemplate = props.template.showLess;\n var currentQuery = props.store.getCurrentQuery();\n var formatData = props.formatData;\n var labels = Object.keys(props.ranges).length > 0\n ? props.ranges\n : props.labels;\n /**\n * Get aggregation items\n */\n var that = this;\n var itemsIds = {};\n var allItems = this.state.aggregations.map(function (item) {\n var uid = Math.floor(Math.random() * 10000000000);\n var values = item.getValues();\n values.name = labels[values.name] ? labels[values.name] : values.name;\n itemsIds[values.id] = true;\n return {\n isActive: item.isUsed(),\n n: item.getN(),\n uid: uid,\n values: values\n };\n });\n /**\n * Shadow filters. These filters are not part of the aggregation list but are applied. Should always be listed\n * first\n */\n var appliedFilters = (props.applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, props.filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, props.filterName);\n if (appliedFilters.length > 0) {\n var zeroItemsFilters_1 = [];\n appliedFilters.forEach(function (filter) {\n if (itemsIds[filter] === undefined) {\n var uid = Math.floor(Math.random() * 10000000000);\n zeroItemsFilters_1.push({\n isActive: true,\n n: 0,\n uid: uid,\n values: {\n id: filter,\n name: filter\n }\n });\n }\n });\n allItems = __spreadArray(__spreadArray([], zeroItemsFilters_1, true), allItems, true);\n }\n /**\n * Get existing applied filters if they exist\n */\n if (allItems.length === 0) {\n return null;\n }\n var items = allItems.slice(0, this.state.viewLimit);\n var allItemsLength = allItems.length;\n var levelCounter = 1;\n var topData = {\n hasApplied: appliedFilters.length > 0,\n nApplied: appliedFilters.length\n };\n /**\n * Check available view limit\n */\n var isViewLimitProperlySet = (viewLimit &&\n viewLimit < fetchLimit &&\n allItemsLength > viewLimit);\n return ((0, preact_1.h)(\"div\", { className: \"as-multipleFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-multipleFilter__top \".concat(topClassName), dictionary: this.props.dictionary, data: topData }),\n (0, preact_1.h)(\"div\", { className: \"as-multipleFilter__itemsList \".concat(itemsListClassName) },\n (0, preact_1.h)(\"ul\", null, items.map(function (item) {\n var formattedTemplateData = formatData(item);\n var level = Math.min(levelCounter, _this.currentLevel + 1);\n levelCounter++;\n return ((0, preact_1.h)(\"li\", { className: \"as-multipleFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((item.isActive) ? activeClassName : \"\") +\n \"\".concat((props.promoted.includes(item.values.name) ? \"as-multipleFilter__item_featured\" : \"\")), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(item.values.id, level);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: formattedTemplateData, dictionary: _this.props.dictionary })));\n }))),\n (isViewLimitProperlySet)\n ? (0, preact_1.h)(ShowMoreComponent_1[\"default\"], { allItemsLength: allItemsLength, currentLimit: this.state.viewLimit, handleShowMore: this.handleShowMore, handleShowLess: this.handleShowLess, showMoreContainerClassName: showMoreContainerClassName, showMoreTemplate: showMoreTemplate, showLessTemplate: showLessTemplate, dictionary: this.props.dictionary }) : null));\n };\n return MultipleFilterComponent;\n}(preact_1.Component));\nMultipleFilterComponent.defaultProps = {\n aggregationField: null,\n applicationType: 8,\n fetchLimit: 10,\n viewLimit: null,\n sortBy: ['_term', 'desc'],\n ranges: {},\n labels: {},\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\",\n active: \"as-multipleFilter__item--active\",\n showMoreContainer: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate,\n showMore: \"+ Show more\",\n showLess: \"- Show less\"\n },\n formatData: function (data) { return data; },\n activeFirst: true,\n promoted: []\n};\nexports[\"default\"] = MultipleFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Show more component\n *\n * Provides two items\n * -> Show more element\n * -> Show less element\n */\nvar ShowMoreComponent = function (_a) {\n var allItemsLength = _a.allItemsLength, currentLimit = _a.currentLimit, handleShowMore = _a.handleShowMore, handleShowLess = _a.handleShowLess, showMoreContainerClassName = _a.showMoreContainerClassName, showMoreTemplate = _a.showMoreTemplate, showLessTemplate = _a.showLessTemplate, dictionary = _a.dictionary;\n return (allItemsLength > currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowMore },\n (0, preact_1.h)(Template_1[\"default\"], { template: showMoreTemplate, className: \"as-showMore--more\", dictionary: dictionary })))\n : (allItemsLength === currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowLess },\n (0, preact_1.h)(Template_1[\"default\"], { template: showLessTemplate, className: \"as-showMore--less\", dictionary: dictionary })))\n : null;\n};\nexports[\"default\"] = ShowMoreComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{values.name}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.getEnd = exports.getStart = exports.totalPagesToArray = exports.getTotalPages = void 0;\n/**\n * Get total pages from the total reached hits\n * divided by the hits per page configured\n *\n * If there are more than 10.000 items\n * We reduce the max num of items to 9.999\n * to take care of performance\n *\n * If total resulted pages are bigger than 999\n * we set 999 as the max number of pages\n *\n * @param totalHits\n * @param hitsPerPage\n *\n * @return {number}\n */\nfunction getTotalPages(totalHits, hitsPerPage) {\n totalHits = (totalHits >= 10000)\n ? 9999\n : totalHits;\n var totalPages = Math.ceil(totalHits / hitsPerPage);\n return (totalPages > 999)\n ? 999\n : totalPages;\n}\nexports.getTotalPages = getTotalPages;\n/**\n * Pass total pages number into an array of numbers\n *\n * @param totalPages\n *\n * @return {number[]}\n */\nfunction totalPagesToArray(totalPages) {\n var pages = [];\n for (var index = 1; index <= totalPages; index++) {\n pages.push(index);\n }\n return pages;\n}\nexports.totalPagesToArray = totalPagesToArray;\n/**\n * Get the starting point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getStart(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return currentPage - (currentPage % spectreSize);\n }\n if (isTouchingRight) {\n var start = currentPage - (spectreSize - (totalPages % currentPage));\n return (start > 0) ? start : 0;\n }\n return currentPage - (padding + 1);\n}\nexports.getStart = getStart;\n/**\n * Get the ending point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getEnd(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return spectreSize;\n }\n if (isTouchingRight) {\n return totalPages;\n }\n return currentPage + padding;\n}\nexports.getEnd = getEnd;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Arrow navigation component\n */\nfunction NavigationComponent(_a) {\n var isVisible = _a.isVisible, classNames = _a.classNames, template = _a.template, handleClick = _a.handleClick;\n return (isVisible)\n ? ((0, preact_1.h)(\"li\", { className: classNames, onClick: handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: template, dictionary: this.props.dictionary })))\n : null;\n}\nexports[\"default\"] = NavigationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.paginationChangeAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedPage\n */\nfunction paginationChangeAction(environmentId, currentQuery, repository, selectedPage) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = selectedPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.paginationChangeAction = paginationChangeAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar Helpers_1 = require(\"./Helpers\");\nvar NavigationComponent_1 = require(\"./NavigationComponent\");\nvar PaginationActions_1 = require(\"./PaginationActions\");\n/**\n * Pagination Component\n */\nvar PaginationComponent = /** @class */ (function (_super) {\n __extends(PaginationComponent, _super);\n /**\n * Constructor\n */\n function PaginationComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n *\n * @param page\n */\n _this.handleClick = function (page) {\n var _a = _this.props, store = _a.store, environmentId = _a.environmentId, repository = _a.repository;\n var currentResult = store.getCurrentResult();\n var currentQuery = store.getCurrentQuery();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuery.getSize());\n /**\n * Do not let go further\n */\n if (page <= 0)\n page = 1;\n if (page >= totalPages)\n page = totalPages;\n if (currentQuery.getPage() === page) {\n return;\n }\n /**\n * Dispatch change page action\n */\n (0, PaginationActions_1.paginationChangeAction)(environmentId, currentQuery, repository, page);\n };\n _this.state = {\n page: 1\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n PaginationComponent.prototype.componentWillReceiveProps = function (props) {\n var page = props.store.getCurrentQuery().getPage();\n this.setState(function (prevState) {\n return {\n page: page\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PaginationComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var currentResult = props.store.getCurrentResult();\n if (props.store.getCurrentResult() == null) {\n return;\n }\n var currentQuerySize = props.store.getCurrentQuery().getSize();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuerySize);\n /**\n * Hide container if hits are empty\n */\n if (currentResult.getTotalHits() === 0 ||\n totalPages === 1) {\n return null;\n }\n var padding = props.padding;\n var goFirstLast = props.goFirstLast;\n var containerClassName = props.classNames.container;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var disabledClassName = props.classNames.disabled;\n var nextClassName = props.classNames.next;\n var previousClassName = props.classNames.previous;\n var lastClassName = props.classNames.last;\n var firstClassName = props.classNames.first;\n var itemTemplate = props.template.item;\n var nextTemplate = props.template.next;\n var previousTemplate = props.template.previous;\n var firstTemplate = props.template.first;\n var lastTemplate = props.template.last;\n var currentQueryPage = props.store.getCurrentQuery().getPage();\n /**\n * Get Total pages\n */\n var pages = (0, Helpers_1.totalPagesToArray)(totalPages);\n /**\n * Get pages spectre\n */\n var spectreSize = (padding * 2) + 1;\n var isTouchingLeft = currentQueryPage <= (padding + 1);\n var isTouchingRight = (currentQueryPage + padding) >= totalPages;\n var spectre = pages.slice((0, Helpers_1.getStart)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight), (0, Helpers_1.getEnd)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight));\n /**\n * Dynamic disabled classes\n */\n var previousDisabledClass = (currentQueryPage === 1) ? disabledClassName : '';\n var nextDisabledClass = (currentQueryPage === totalPages) ? disabledClassName : '';\n return ((0, preact_1.h)(\"ul\", { className: \"as-pagination \".concat(containerClassName) },\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--first \".concat(firstClassName, \" \").concat(previousDisabledClass), template: firstTemplate, handleClick: function () { return _this.handleClick(1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--previous \".concat(previousClassName, \" \").concat(previousDisabledClass), template: previousTemplate, handleClick: function () { return _this.handleClick(currentQueryPage - 1); } }),\n spectre.map(function (page) { return ((0, preact_1.h)(\"li\", { className: \"as-pagination__item as-pagination__item--link \".concat(itemClassName, \" \").concat((currentQueryPage === page) ? activeClassName : ''), onClick: function () { return _this.handleClick(page); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: { page: page.toLocaleString('de-DE') }, dictionary: _this.props.dictionary }))); }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--next \".concat(nextClassName, \" \").concat(nextDisabledClass), template: nextTemplate, handleClick: function () { return _this.handleClick(currentQueryPage + 1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--last \".concat(lastClassName, \" \").concat(nextDisabledClass), template: lastTemplate, handleClick: function () { return _this.handleClick(totalPages); } })));\n };\n return PaginationComponent;\n}(preact_1.Component));\nPaginationComponent.defaultProps = {\n padding: 3,\n goFirstLast: false,\n classNames: {\n container: '',\n item: '',\n active: 'as-pagination__item--active',\n disabled: 'as-pagination__item--disabled',\n next: '',\n first: '',\n previous: '',\n last: ''\n },\n template: {\n item: '{{page}}',\n next: '>',\n previous: '<',\n first: '<<',\n last: '>>'\n }\n};\nexports[\"default\"] = PaginationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.priorityFilterAction = exports.setupPriorityFilters = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nfunction setupPriorityFilters(environmentId, currentQuery, filters) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.setMetadataValue(\"pf\", filters);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.setupPriorityFilters = setupPriorityFilters;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param filterValue\n * @param applicationType\n */\nfunction priorityFilterAction(environmentId, currentQuery, repository, filterName, filterField, filterValue, applicationType) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, [filterValue], applicationType, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n clonedQuery.setMetadataValue(\"af\", [filterField, filterValue]);\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.priorityFilterAction = priorityFilterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar PriorityFilterActions_1 = require(\"./PriorityFilterActions\");\n/**\n * PriorityFilterComponent\n */\nvar PriorityFilterComponent = /** @class */ (function (_super) {\n __extends(PriorityFilterComponent, _super);\n /**\n * Constructor\n */\n function PriorityFilterComponent() {\n var _this = _super.call(this) || this;\n _this.handleClick = function (filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var priorityFilter = _this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n var priorityFilterName = priorityFilter.name;\n var priorityFilterObject = props.store.getCurrentQuery().getAggregation(priorityFilterName);\n (0, PriorityFilterActions_1.priorityFilterAction)(environmentId, currentQuery, repository, priorityFilterName, priorityFilterObject.getField().replace(\"indexed_metadata.\", \"\"), filterValue, priorityFilterObject.getApplicationType());\n };\n _this.state = {\n filterName: \"\"\n };\n return _this;\n }\n /**\n * Components will mount\n */\n PriorityFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, PriorityFilterActions_1.setupPriorityFilters)(props.environmentId, props.store.getCurrentQuery(), props.filters);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n PriorityFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (_) {\n return {\n filterName: props.store.getCurrentResult().getMetadataValue(\"priority_filter\")\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PriorityFilterComponent.prototype.render = function () {\n var _this = this;\n var priorityFilter = this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n if (!priorityFilter) {\n return null;\n }\n var priorityFilterName = priorityFilter.name;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-priorityFilter\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.top, className: \"as-priorityFilter__top\", dictionary: this.props.dictionary, data: {\n name: priorityFilterName\n } }),\n (0, preact_1.h)(\"div\", { className: \"as-priorityFilter__itemsList\" },\n (0, preact_1.h)(\"ul\", null, Object.keys(priorityFilter.values).map(function (key) {\n var data = priorityFilter.values[key];\n return ((0, preact_1.h)(\"li\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(key);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: _this.props.template.item, data: __assign(__assign({}, data), { value: key }), dictionary: _this.props.dictionary })));\n })))));\n };\n return PriorityFilterComponent;\n}(preact_1.Component));\nPriorityFilterComponent.defaultProps = {\n aggregationField: null,\n template: {\n item: defaultTemplates_1.defaultPriorityFilterItemTemplate,\n top: defaultTemplates_1.defaultPriorityFilterTopTemplate\n }\n};\nexports[\"default\"] = PriorityFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultPriorityFilterItemTemplate = exports.defaultPriorityFilterTopTemplate = void 0;\nexports.defaultPriorityFilterTopTemplate = \"\\n {{name}}\\n\";\nexports.defaultPriorityFilterItemTemplate = \"\\n
{{value}}
\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.filterAction = exports.aggregationSetup = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param min\n * @param max\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, min, max) {\n var withMinMax = min === null || max === null;\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var filterType = withMinMax ? 'range_min_max' : 'range';\n var filterValues = withMinMax ? ['..'] : [min + '..' + max];\n clonedQuery.aggregateByRange(filterName, filterField, filterValues, apisearch_1.FILTER_AT_LEAST_ONE, filterType);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param from\n * @param to\n * @param deleteMinMaxAggregation\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, from, to) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var realValueFrom = Math.min(from, to);\n var realValueTo = Math.max(from, to);\n var toWithIncluded = realValueTo + ']';\n clonedQuery.filterByRange(filterName, filterField, [], [realValueFrom + \"..\" + toWithIncluded], apisearch_1.FILTER_AT_LEAST_ONE, 'range_min_max', false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Template_1 = require(\"../Template\");\nvar RangeFilterActions_1 = require(\"./RangeFilterActions\");\n/**\n * Range Filter Component\n */\nvar RangeFilterComponent = /** @class */ (function (_super) {\n __extends(RangeFilterComponent, _super);\n function RangeFilterComponent() {\n var _this = _super.call(this) || this;\n _this.uid = Math.random().toString(16).substr(2, 12);\n _this.observerFrom = _this.configureFromObserver();\n _this.observerTo = _this.configureToObserver();\n _this.rangeUid = 'range-' + _this.uid;\n _this.setState(function (prevState) {\n return {\n from: null,\n to: null,\n min: null,\n max: null,\n visible: true\n };\n });\n return _this;\n }\n /**\n * Components will mount\n */\n RangeFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n (0, RangeFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, filterField, props.minValue, props.maxValue);\n };\n RangeFilterComponent.prototype.configureFromObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_1 = mutationsList; _i < mutationsList_1.length; _i++) {\n var mutation = mutationsList_1[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.from) {\n return;\n }\n that.handleSliderChange([value, that.state.to]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.configureToObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_2 = mutationsList; _i < mutationsList_2.length; _i++) {\n var mutation = mutationsList_2[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.to) {\n return;\n }\n that.handleSliderChange([that.state.from, value]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.componentDidMount = function () {\n this.observerFrom.observe(document.getElementsByClassName('as-rangeFilter__from__' + this.uid)[0], { attributes: true });\n this.observerTo.observe(document.getElementsByClassName('as-rangeFilter__to__' + this.uid)[0], { attributes: true });\n };\n RangeFilterComponent.prototype.componentWillUnmount = function () {\n this.observerFrom.disconnect();\n this.observerTo.disconnect();\n };\n /**\n * Handle change\n *\n * @param e\n */\n RangeFilterComponent.prototype.handleChange = function (e) {\n var uid = this.uid;\n this.applyFilter(e.target.parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, e.target.parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n };\n ;\n RangeFilterComponent.prototype.handleSliderChange = function (values) {\n if (values[0] === this.state.from &&\n values[1] === this.state.to) {\n return false;\n }\n this.applyFilter(values[0], values[1]);\n };\n ;\n /**\n * @param values\n */\n RangeFilterComponent.prototype.handleSliderMove = function (values) {\n this.updateRangeLayer(this.props, this.state, values[0], values[1]);\n };\n ;\n /**\n * Component will receive props\n *\n * @param props\n */\n RangeFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var currentResult = props\n .store\n .getCurrentResult();\n var aggregation = currentResult.getAggregation(props.filterName);\n if (!(aggregation instanceof apisearch_1.ResultAggregation)) {\n this.setState(function (prevState) {\n return {\n from: prevState.from,\n to: prevState.to,\n min: prevState.min,\n max: prevState.max,\n currency_placeholder: prevState.currency_placeholder,\n visible: false\n };\n });\n return;\n }\n var metadata = aggregation.getMetadata();\n var filter = props\n .store\n .getCurrentQuery()\n .getFilter(props.filterName);\n var min = typeof props.minValue === \"number\" && props.minValue > 0\n ? props.minValue\n : (typeof metadata['min'] === \"number\"\n ? Math.floor(metadata['min'])\n : undefined);\n var max = typeof props.maxValue === \"number\" && props.maxValue > 0\n ? props.maxValue\n : (typeof metadata['max'] === \"number\"\n ? Math.ceil(metadata['max'])\n : undefined);\n var currencyPlaceholder = null;\n var firstItem = currentResult.getFirstItem();\n if (firstItem) {\n var firstItemPrice = firstItem.get('price');\n var firstItemPriceWithCurrency = firstItem.get('price_with_currency');\n if (firstItemPrice && firstItemPriceWithCurrency) {\n currencyPlaceholder = this.getCurrencyPlaceholderFromPriceAndPriceWithCurrency(firstItemPrice, firstItemPriceWithCurrency);\n }\n }\n var fromTo = this.getFromToFromFilter(filter, min, max);\n this.setState(function (prevState) {\n return {\n from: fromTo[0],\n to: fromTo[1],\n min: min,\n max: max,\n currency_placeholder: currencyPlaceholder,\n visible: ((typeof min === \"number\") && (typeof max === \"number\"))\n };\n });\n };\n /**\n * @param filter\n * @param min\n * @param max\n */\n RangeFilterComponent.prototype.getFromToFromFilter = function (filter, min, max) {\n var realMin = Math.min(min, max);\n var realMax = Math.max(min, max);\n if (filter instanceof apisearch_1.Filter) {\n var filterValue = filter.getValues()[0];\n if (typeof filterValue === \"string\") {\n var parts = filterValue.split('..');\n var from = parts[0];\n var to = parts[1].slice(0, -1);\n return [\n Math.max(realMin, parseInt(from)),\n Math.min(realMax, parseInt(to)),\n ];\n }\n }\n return [realMin, realMax];\n };\n /**\n * @param previousProps\n * @param previousState\n */\n RangeFilterComponent.prototype.componentDidUpdate = function (previousProps, previousState) {\n this.updateRangeLayer(previousProps, previousState, previousState.from, previousState.to);\n };\n /**\n * @param props\n * @param state\n * @param from\n * @param to\n */\n RangeFilterComponent.prototype.updateRangeLayer = function (props, state, from, to) {\n var min = state.min;\n var max = state.max;\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof props.callback === \"function\") {\n props.callback(Math.min(from, to), Math.max(from, to), min, max, this.rangeUid, state.currency_placeholder);\n }\n };\n /**\n * @param props\n * @param state\n */\n RangeFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var filterName = props.filterName;\n var ref = (0, compat_1.useRef)(null);\n var topTemplate = props.template.top;\n var sliderTemplate = props.template.slider;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var wrapperClassName = props.classNames.wrapper;\n var that = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n if (!ref.current) {\n return;\n }\n var uid = _this.uid;\n /**\n * Alert if clicked on outside of element\n */\n function handleChange(event) {\n var target = event.target;\n var parentNode = target.parentNode;\n self.applyFilter(parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n }\n // Bind the event listener\n ref.current.addEventListener(\"change\", handleChange);\n return function () {\n // Unbind the event listener on clean up\n ref.current.removeEventListener(\"change\", handleChange);\n };\n }, [ref]);\n var isNative = props.native;\n var isNotNative = !isNative;\n var type = isNative ? 'range' : 'number';\n var eventName = 'onClick';\n var from = state.from;\n var to = state.to;\n var min = state.min;\n var max = state.max;\n var isVisible = state.visible && !(props.store.currentResult.getTotalHits() === 0 &&\n from === min &&\n to === max);\n var visibleStyle = isVisible ? '' : 'display:none!important;';\n return ((0, preact_1.h)(\"div\", { id: this.rangeUid, className: \"as-rangeFilter \".concat(containerClassName), style: visibleStyle },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-rangeFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-rangeFilter__wrapper \".concat(wrapperClassName) },\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__from \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__from__\").concat(this.uid) }, props.attributes.from, { value: from, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onChange: function (e) {\n var positions = [parseInt(e.target.value), to];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__to \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__to__\").concat(this.uid) }, props.attributes.to, { value: to, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onChange: function (e) {\n var positions = [from, parseInt(e.target.value)];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"div\", { \"class\": \"slider\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: sliderTemplate, dictionary: this.props.dictionary })))));\n };\n /**\n * Apply filter\n */\n RangeFilterComponent.prototype.applyFilter = function (valueFrom, valueTo) {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, RangeFilterActions_1.filterAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, valueFrom, valueTo);\n };\n /**\n * @param price\n * @param priceWithCurrency\n * @private\n */\n RangeFilterComponent.prototype.getCurrencyPlaceholderFromPriceAndPriceWithCurrency = function (price, priceWithCurrency) {\n price = (price + '').replace('.', '').replace(',', '');\n priceWithCurrency = (priceWithCurrency + '').replace('.', '').replace(',', '');\n var regex = new RegExp(price + '0*');\n var currencyPlaceholder = priceWithCurrency.replace(regex, \"__price__\");\n return currencyPlaceholder;\n };\n return RangeFilterComponent;\n}(preact_1.Component));\nRangeFilterComponent.defaultProps = {\n maxValueIncluded: true,\n step: 1,\n minValue: null,\n maxValue: null,\n native: false,\n classNames: {\n container: '',\n top: '',\n wrapper: '',\n input: '',\n from: '',\n to: ''\n },\n attributes: {\n from: '',\n to: ''\n },\n template: {\n top: '',\n slider: ''\n }\n};\nexports[\"default\"] = RangeFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.reloadAction = void 0;\n/**\n * Clear filters actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Clear filters action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n */\nfunction reloadAction(environmentId, currentQuery, repository) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n if (repository instanceof apisearch_1.HttpRepository) {\n var httpClient = repository.getHttpClient();\n if (httpClient instanceof apisearch_1.CacheClient) {\n httpClient.flushCache();\n }\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.reloadAction = reloadAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ReloadActions_1 = require(\"./ReloadActions\");\n/**\n * ReloadComponent\n */\nvar ReloadComponent = /** @class */ (function (_super) {\n __extends(ReloadComponent, _super);\n function ReloadComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ReloadActions_1.reloadAction)(environmentId, currentQuery, repository);\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {}\n */\n ReloadComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n return ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName), onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary })));\n };\n return ReloadComponent;\n}(preact_1.Component));\nReloadComponent.defaultProps = {\n classNames: {\n container: \"\"\n },\n template: {\n container: \"Reload\"\n }\n};\nexports[\"default\"] = ReloadComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Template_1 = require(\"../Template\");\n/**\n * Item\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param nextProps\n * @param nextState\n */\n Item.prototype.shouldComponentUpdate = function (nextProps, nextState) {\n var shouldUpdate = this.props.data.uuid_composed !== nextProps.data.uuid_composed ||\n this.props.data.metadata.image !== nextProps.data.metadata.image ||\n this.props.data.query !== nextProps.data.query;\n if (!shouldUpdate) {\n this.highlight();\n }\n return shouldUpdate;\n };\n Item.prototype.componentDidMount = function () {\n this.highlight();\n };\n Item.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n Item.prototype.highlight = function () {\n var queryText = this.props.data.query_text;\n if (this.props.data.highlights_enabled && queryText !== \"\") {\n var element = document.getElementById(\"as-result-\" + this.props.data.uuid_composed);\n (0, Highlight_1.highlightElement)(element, queryText);\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n Item.prototype.render = function () {\n var _a;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var dictionary = (_a = props.dictionary) !== null && _a !== void 0 ? _a : {};\n var id = \"as-result-\" + data.uuid_composed;\n var isBestMatch = data.metadata.best_match ? \"best-match\" : \"\";\n var isExactMatch = data.metadata.exact_match ? \"exact-match\" : \"\";\n return (0, preact_1.h)(Template_1[\"default\"], { template: template, data: data, id: id, className: \"\".concat(props.className, \" \").concat(isBestMatch, \" \").concat(isExactMatch), dictionary: dictionary });\n };\n return Item;\n}(preact_1.Component));\nexports[\"default\"] = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.infiniteScrollNextPageAction = exports.configureQuery = void 0;\n/**\n * Search actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n *\n * Configure query\n *\n * @param environmentId\n * @param currentQuery\n * @param itemsPerPage\n * @param highlightsEnabled\n * @param promotedUUIDs\n * @param excludedUUIDs\n * @param fields\n * @param filter\n * @param minScore\n */\nfunction configureQuery(environmentId, currentQuery, itemsPerPage, highlightsEnabled, promotedUUIDs, excludedUUIDs, fields, filter, minScore) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n filter(clonedQuery);\n /**\n * Set result size\n */\n clonedQuery.size = itemsPerPage;\n /**\n * Set specific fields\n */\n clonedQuery.setFields(fields);\n /**\n * Promoted uuids\n */\n for (var i in promotedUUIDs) {\n if (promotedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.promoteUUID(promotedUUIDs[i]);\n }\n }\n /**\n * excluded uuids\n */\n for (var i in excludedUUIDs) {\n if (excludedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.excludeUUID(excludedUUIDs[i]);\n }\n }\n if (minScore > 0) {\n clonedQuery.minScore = minScore;\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.configureQuery = configureQuery;\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param nextPage\n */\nfunction infiniteScrollNextPageAction(environmentId, currentQuery, repository, nextPage) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = nextPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.infiniteScrollNextPageAction = infiniteScrollNextPageAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar ItemUUID_1 = require(\"apisearch/lib/Model/ItemUUID\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar Item_1 = require(\"./Item\");\nvar ResultActions_1 = require(\"./ResultActions\");\nvar Common_1 = require(\"../Common\");\n/**\n * Result Component\n */\nvar ResultComponent = /** @class */ (function (_super) {\n __extends(ResultComponent, _super);\n /**\n * Constructor\n */\n function ResultComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.fromLoadingNextPage = false;\n _this.observer = (0, compat_1.useRef)();\n _this.endResultsBoxRef = (0, compat_1.useCallback)(function (node) {\n if (_this.observer.current instanceof IntersectionObserver) {\n _this.observer.current.disconnect();\n }\n _this.observer.current = new IntersectionObserver(function (entries) {\n if (entries[0].isIntersecting) {\n _this.loadNextPage();\n }\n });\n if ((_this.observer.current instanceof IntersectionObserver) && node) {\n _this.observer.current.observe(node);\n }\n }, []);\n /**\n * @param word\n */\n _this.handleAlternativeClick = function (word) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n _this.state = {\n customResponse: \"\",\n focus: props.fadeInSelector === \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n return _this;\n }\n ResultComponent.prototype.loadNextPage = function () {\n var _a = this.props, environmentId = _a.environmentId, store = _a.store, repository = _a.repository;\n this.fromLoadingNextPage = true;\n this.currentExpectedPage = this.state.page + 1;\n (0, ResultActions_1.infiniteScrollNextPageAction)(environmentId, store.getCurrentQuery(), repository, this.currentExpectedPage);\n };\n /**\n * Hook that change state once mouse clicks inside or outside the container\n */\n ResultComponent.prototype.addMouseDownListeners = function (ref, fadeInSelector) {\n var _this = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event) {\n self.setState(function () {\n return {\n focus: event.target.closest(fadeInSelector) != null\n };\n });\n }\n // Bind the event listener\n document.addEventListener(\"mousedown\", handleClickOutside, { passive: true });\n return function () {\n // Unbind the event listener on clean up\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n ResultComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.store.getCurrentResult() == null) {\n this.setState(function (_) {\n return {\n customResponse: \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n });\n return;\n }\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var items = currentResult.getItems();\n var currentPage = this.page();\n var hasNewPage = (currentResult.getTotalHits() > (currentPage * currentQuery.getSize()));\n var currentItems = this.fromLoadingNextPage\n ? this.state.items.concat(items)\n : items;\n this.fromLoadingNextPage = false;\n this.currentExpectedPage = undefined;\n this.setState(function (_) {\n return {\n customResponse: currentResult.getMetadataValue(\"custom_response\"),\n hasNewPage: hasNewPage,\n items: currentItems,\n page: currentPage\n };\n });\n };\n /**\n * Component will mount\n */\n ResultComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, ResultActions_1.configureQuery)(props.environmentId, props.store.getCurrentQuery(), props.itemsPerPage, props.highlightsEnabled, props.promote.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.exclude.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.fields, props.filter, props.minScore);\n };\n /**\n * @private\n */\n ResultComponent.prototype.page = function () {\n var _a;\n return (_a = this.currentExpectedPage) !== null && _a !== void 0 ? _a : this.props.store.getCurrentQuery().getPage();\n };\n /**\n * Render\n *\n * @return {any}\n */\n ResultComponent.prototype.render = function () {\n var _this = this;\n var _a;\n var that = this;\n var props = this.props;\n var dirty = props.store.isDirty();\n var containerClassName = props.classNames.container;\n var itemsListClassName = props.classNames.itemsList;\n var placeholderClassName = props.classNames.placeholder;\n var itemsListTemplate = props.template.itemsList;\n var placeholderTemplate = (_a = props.template.placeholder) !== null && _a !== void 0 ? _a : \"\";\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var currentVisibleResults = props.currentVisibleResults;\n var subResults = Object.values(currentResult.getSubresults());\n var wrapperRef = (0, compat_1.useRef)(null);\n var customResponse = currentResult.getMetadataValue(\"custom_response\");\n var redirection = currentResult.getMetadataValue(\"redirection\");\n // Check for custom response html\n var customResponseBody;\n if (customResponse) {\n customResponseBody = ((0, preact_1.h)(Template_1[\"default\"], { template: customResponse.content, className: \"as-result__custom_response\", dictionary: this.props.dictionary }));\n if (customResponse.only) {\n return customResponseBody;\n }\n }\n var resetRedirectionOnEnter = true;\n if (redirection) {\n if (redirection.type === \"automatic\") {\n window.top.location.href = redirection.url;\n }\n else if (redirection.type === \"on_enter\") {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: redirection.url\n }, \"*\");\n resetRedirectionOnEnter = false;\n }\n if (this.props.template.redirection) {\n customResponseBody = (0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.redirection, data: {\n url: redirection.url,\n query: currentQuery.getQueryText()\n }, className: \"as-result__redirection\", dictionary: this.props.dictionary }),\n customResponseBody);\n }\n }\n if (resetRedirectionOnEnter) {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: undefined\n }, \"*\");\n }\n var hasInfiniteScrollNextPage = (props.infiniteScroll !== false) &&\n ((props.infiniteScroll === true) ||\n (props.infiniteScroll >= 0)) &&\n this.state.hasNewPage;\n var infiniteScrollMargin = hasInfiniteScrollNextPage\n ? (props.infiniteScroll === true\n ? 0\n : props.infiniteScroll)\n : undefined;\n if (props.fadeInSelector !== \"\") {\n this.addMouseDownListeners(wrapperRef, props.fadeInSelector);\n }\n if (!currentVisibleResults || !this.state.focus) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName) }));\n }\n /**\n * Data accessible to the template\n */\n var items = this.state.items;\n var reducedTemplateData = {\n query: currentQuery.getQueryText(),\n suggestions: currentResult.getSuggestions()\n };\n /**\n * We should add positions to items\n * When the number of items to render is higher than the page size, we are in front of infinite scroll\n */\n var page = this.state.page;\n var isInfiniteActive = page > 1;\n var firstItem = ((this.state.page - 1) * currentQuery.getSize());\n var itemsForEvent = items;\n if (isInfiniteActive) {\n itemsForEvent = Array.prototype.slice.call(items, firstItem);\n }\n Array.prototype.forEach.call(itemsForEvent, function (item) {\n item.position = ++firstItem;\n item.id = item.getId();\n });\n window.postMessage({\n name: \"apisearch_result_items\",\n query: currentQuery.toArray(),\n query_text: currentQuery.getQueryText(),\n with_results: items.length > 0,\n page: this.state.page,\n site: props.store.getSite(),\n device: props.store.getDevice(),\n items: itemsForEvent.map(function (item) {\n return {\n fields: item.fields,\n uuid: item.uuid\n };\n })\n }, \"*\");\n /**\n * Uses defined a custom items list. Old version\n */\n if (props.template.itemsList !== defaultTemplates_1.defaultItemsListTemplate) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef, style: \"position: relative\" },\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : (0, preact_1.h)(Template_1[\"default\"], { template: itemsListTemplate, data: __assign(__assign({}, reducedTemplateData), { items: (items)\n ? items.map(function (item, position) { return _this.hydrateItem(item, position); })\n : [] }), className: \"as-result__itemsList \".concat(itemsListClassName), dictionary: this.props.dictionary }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? (0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } }))\n : (0, preact_1.h)(\"div\", { ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative;\") }))\n : \"\"));\n }\n if (dirty) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: props.dictionary })));\n }\n /**\n * New version\n */\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n customResponseBody,\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : ((items.length > 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-result__itemsList \".concat(props.classNames.itemsList) },\n items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), { query: currentQuery.getQueryText() }), template: props.template.item, className: \"as-result__item \".concat(props.classNames.item), dictionary: props.dictionary });\n }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? \"\"\n : ((0, preact_1.h)(\"div\", { id: \"as-result__infinite_scroll_inspector\", ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative; width: 100%;\") })))\n : \"\"))\n : \"\"),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? ((0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } })))\n : \"\")\n : \"\",\n (subResults.length > 0)\n ? (0, preact_1.h)(\"div\", { className: \"as-result__alternativeList\" }, subResults.map(function (subResult) {\n return (0, preact_1.h)(\"div\", { className: \"as-result__alternative\" },\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_query\" },\n (0, preact_1.h)(\"span\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_title, data: {\n word: subResult.metadata.query_text_html\n }, dictionary: props.dictionary })),\n (0, preact_1.h)(\"a\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_all_results, data: {\n num: subResult.getTotalHits()\n }, dictionary: props.dictionary }))),\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_items\" }, subResult.items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), template: props.template.item, className: \"as-result__alternative_item \".concat(props.classNames.item), dictionary: _this.props.dictionary });\n })));\n }))\n : (((items.length === 0) && customResponseBody === undefined)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: props.template.noResults, data: {\n query: currentQuery.getQueryText()\n }, className: \"as-result__noresults \".concat(props.classNames.noResults), dictionary: props.dictionary })\n : \"\")));\n };\n /**\n * @param item\n * @param position\n * @private\n */\n ResultComponent.prototype.hydrateItem = function (item, position) {\n var props = this.props;\n var environmentId = props.environmentId;\n var config = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_CONFIG, \"__\").concat(environmentId));\n var apisearchUI = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId));\n var apisearchReference = apisearchUI.reference;\n var appId = config.app_id;\n var appUUID = item.getAppUUID();\n if (typeof appUUID === \"object\") {\n appId = appUUID.composedUUID();\n }\n var indexId = config.index_id;\n var indexUUID = item.getIndexUUID();\n if (typeof indexUUID === \"object\") {\n indexId = indexUUID.composedUUID();\n }\n var itemId = item.getUUID().composedUUID();\n var mainFields = {};\n Object.assign(mainFields, item.getMetadata(), item.getIndexedMetadata());\n var fieldsConciliation = {};\n Object.keys(props.fieldsConciliation).map(function (field, index) {\n var _a;\n fieldsConciliation[field] = (_a = mainFields[props.fieldsConciliation[field]]) !== null && _a !== void 0 ? _a : undefined;\n });\n Object.assign(mainFields, fieldsConciliation);\n item.fields = mainFields;\n var queryText = \"\";\n if (this.props.store.getCurrentQuery()) {\n queryText = this.props.store.getCurrentQuery().getQueryText();\n }\n return __assign(__assign({}, props.formatData(item)), {\n key: \"item_\" + itemId,\n uuid_composed: itemId,\n click: apisearchReference + '.click(\"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n add_to_cart: apisearchReference + '.interact(\"add_cart\", \"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n query_text: queryText,\n highlights_enabled: this.props.highlightsEnabled,\n striptags: function () {\n return function (val, render) { return render(val).replace(/(<([^>]+)>)/ig, \"\"); };\n }\n });\n };\n return ResultComponent;\n}(preact_1.Component));\nResultComponent.defaultProps = {\n fields: [],\n itemsPerPage: 10,\n highlightsEnabled: false,\n promote: [],\n exclude: [],\n filter: function (query) { return null; },\n subResult: false,\n classNames: {\n container: \"\",\n itemsList: \"\",\n item: \"\",\n noResults: \"\",\n placeholder: \"\"\n },\n template: {\n itemsList: defaultTemplates_1.defaultItemsListTemplate,\n item: defaultTemplates_1.defaultItemTemplate,\n noResults: defaultTemplates_1.defaultNoResultsItemTemplate,\n placeholder: null,\n alternative_title: defaultTemplates_1.defaultAlternativeTitleTemplate,\n alternative_all_results: defaultTemplates_1.defaultAlternativeAllResultsTemplate,\n next_page_button: defaultTemplates_1.defaultNextPageButtonTemplate,\n redirection: null\n },\n formatData: function (data) { return data; },\n fadeInSelector: \"\",\n fieldsConciliation: {}\n};\nexports[\"default\"] = ResultComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultNextPageButtonTemplate = exports.defaultAlternativeAllResultsTemplate = exports.defaultAlternativeTitleTemplate = exports.defaultNoResultsItemTemplate = exports.defaultItemTemplate = exports.defaultItemsListTemplate = void 0;\nexports.defaultItemsListTemplate = \"\\n
\\n {{#items}}\\n
\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n
\\n {{/items}}\\n
\\n {{^items}}No results{{/items}}\\n\";\nexports.defaultItemTemplate = \"\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n\";\nexports.defaultNoResultsItemTemplate = \"\\n No results\\n\";\nexports.defaultAlternativeTitleTemplate = \"{{{word}}}\";\nexports.defaultAlternativeAllResultsTemplate = \"All results ({{num}})\";\nexports.defaultNextPageButtonTemplate = \"Load page {{page}}\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * Autocomplete Component\n */\nvar AutocompleteComponent = /** @class */ (function (_super) {\n __extends(AutocompleteComponent, _super);\n /**\n * Constructor\n */\n function AutocompleteComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n autocomplete: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n AutocompleteComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.autocomplete !== null) {\n this.setState(function (prevState) {\n return {\n autocomplete: props.autocomplete\n };\n });\n }\n else {\n this.setState(function (prevState) {\n return {\n autocomplete: \"\"\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n AutocompleteComponent.prototype.render = function () {\n var autocomplete = this.state.autocomplete;\n var queryText = this.props.queryText;\n var inputClassName = this.props.inputClassName;\n var queryTextLength = queryText.length;\n var autocompleteText = autocomplete.substring(queryTextLength);\n var formattedAutocompleteText = autocompleteText === \"\"\n ? \"\"\n : queryText + autocompleteText + \" ⤷\";\n return ((0, preact_1.h)(\"input\", { type: \"text\", className: \"as-searchInput__input as-searchInput__autocomplete \".concat(inputClassName), placeholder: formattedAutocompleteText, style: \"position: absolute; top: 0px; left: 0px; background-color: white;\" }));\n };\n return AutocompleteComponent;\n}(preact_1.Component));\nexports[\"default\"] = AutocompleteComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.simpleSearchAction = exports.initialSearchSetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Initial Search\n *\n * @param environmentId\n * @param currentQuery\n * @param autocomplete\n * @param searchableFields\n * @param queryOperator\n */\nfunction initialSearchSetup(environmentId, currentQuery, autocomplete, searchableFields, queryOperator) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = 1;\n clonedQuery.queryOperator = queryOperator;\n if (searchableFields.length > 0) {\n clonedQuery.searchableFields = searchableFields;\n }\n if (autocomplete) {\n clonedQuery.enableAutocomplete();\n }\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSearchSetup = initialSearchSetup;\n/**\n * Search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param queryText\n * @param visibleResults\n */\nfunction simpleSearchAction(environmentId, currentQuery, repository, queryText, visibleResults) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [queryText];\n clonedQuery.page = 1;\n if (!visibleResults) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: null,\n visibleResults: visibleResults\n });\n return;\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result,\n visibleResults: visibleResults\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.simpleSearchAction = simpleSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"./SearchInputActions\");\nvar Template_1 = require(\"../Template\");\nvar AutocompleteComponent_1 = require(\"./AutocompleteComponent\");\nvar compat_1 = require(\"preact/compat\");\n/**\n * SearchInput Component\n */\nvar SearchInputComponent = /** @class */ (function (_super) {\n __extends(SearchInputComponent, _super);\n /**\n * Constructor\n */\n function SearchInputComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.inputRef = (0, compat_1.useRef)(null);\n /**\n * @param search\n */\n _this.handleSearch = function (search) {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var finalSpace = search.charAt(search.length - 1) === \" \" ? \" \" : \"\";\n var targetValueNoSpaces = search.trim() + finalSpace;\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, targetValueNoSpaces === \" \" ? \"\" : targetValueNoSpaces, search.length >= startSearchOn);\n };\n /**\n * Clear search\n */\n _this.clearSearch = function () {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var visibleResults = 0 === startSearchOn;\n (0, SearchInputActions_1.simpleSearchAction)(environmentId, currentQuery, repository, \"\", visibleResults);\n };\n if (props.autocomplete) {\n _this.state = { queryText: \"\" };\n }\n var that = _this;\n window.addEventListener(\"beforeunload\", function () {\n that.dispatchQueryStringEvent(props, 0);\n });\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n SearchInputComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState({\n queryText: props.store.getCurrentQuery().getQueryText()\n });\n };\n /**\n * Key down\n */\n SearchInputComponent.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case \"ArrowRight\":\n case \"Tab\":\n case \"Enter\":\n this.replaceWithAutocomplete(e);\n return;\n }\n switch (e.keyCode) {\n case 39:\n case 9:\n case 13:\n this.replaceWithAutocomplete(e);\n return;\n }\n };\n SearchInputComponent.prototype.replaceWithAutocomplete = function (e) {\n var props = this.props;\n var autocomplete = this.props.store.getCurrentResult().getAutocomplete();\n if (autocomplete !== null && autocomplete !== \"\") {\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, this.props.store.getCurrentResult().getAutocomplete(), true);\n e.preventDefault();\n return;\n }\n };\n /**\n * @param e\n */\n SearchInputComponent.prototype.doNothing = function (e) { };\n /**\n * @param config\n */\n SearchInputComponent.prototype.withConfig = function (config) {\n };\n /**\n * @param props\n * @param timeout\n */\n SearchInputComponent.prototype.dispatchQueryStringEvent = function (props, timeout) {\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n if (this.queryTextEvent) {\n this.lastQueryTextStringDispatched = null;\n clearTimeout(this.queryTextEvent);\n }\n if (this.lastQueryTextStringDispatched === currentQueryText) {\n return;\n }\n this.lastQueryTextStringDispatched = currentQueryText;\n if (currentQueryText !== \"\") {\n var that_1 = this;\n this.lastQueryTextStringDispatched = currentQueryText;\n this.queryTextEvent = setTimeout(function () {\n that_1.queryTextEvent = null;\n window.postMessage({\n name: \"apisearch_search\",\n query_text: currentQueryText,\n query: currentQuery.toArray(),\n site: props.store.getSite(),\n device: props.store.getDevice()\n }, \"*\");\n }, timeout);\n }\n };\n /**\n * Search\n *\n * @return {any}\n */\n SearchInputComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var placeholder = props.placeholder;\n var autofocus = props.autofocus;\n var clearSearch = props.clearSearch;\n var withContainer = props.withContainer;\n var containerClassName = props.classNames.container;\n var inputClassName = props.classNames.input;\n var clearSearchClassName = props.classNames.clearSearch;\n var clearSearchTemplate = props.template.clearSearch;\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n var htmlNodeInheritProps = props.htmlNodeInheritProps;\n var showAutocomplete = currentQuery.areAutocompleteEnabled();\n var autocomplete = props.store.getCurrentResult()\n ? props.store.getCurrentResult().getAutocomplete()\n : null;\n var keyDownCallback = showAutocomplete\n ? function (e) { return _this.handleKeyDown(e); }\n : function (e) { return _this.doNothing(e); };\n var keyDownAction = showAutocomplete\n ? function (e) { return _this.replaceWithAutocomplete(e); }\n : function (e) { return _this.doNothing(e); };\n var style = showAutocomplete\n ? \"position: relative; top: 0px; left: 0px; background-color: transparent; border-color: transparent;\"\n : \"\";\n var autocompletableClass = showAutocomplete\n ? \"autocompletable\"\n : \"\";\n this.dispatchQueryStringEvent(props, 2000);\n var searchInput = ((0, preact_1.h)(\"input\", __assign({ type: \"text\", className: \"as-searchInput__input \".concat(inputClassName, \" \").concat(autocompletableClass), placeholder: placeholder, autofocus: autofocus }, htmlNodeInheritProps, { onInput: function (event) { return _this.handleSearch(event.target.value); }, value: currentQueryText, style: style, onKeyDown: keyDownCallback, onTouchStart: keyDownAction, ref: this.inputRef })));\n if (showAutocomplete) {\n searchInput = ((0, preact_1.h)(\"div\", { style: \"position: relative\" },\n (0, preact_1.h)(AutocompleteComponent_1[\"default\"], { autocomplete: autocomplete, queryText: currentQueryText, inputClassName: inputClassName }),\n searchInput));\n }\n if (withContainer) {\n searchInput = ((0, preact_1.h)(\"div\", { className: \"as-searchInput \".concat(containerClassName) },\n searchInput,\n (clearSearch && currentQueryText && currentQueryText.length !== 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-searchInput__clearSearch \".concat(clearSearchClassName), onClick: this.clearSearch },\n (0, preact_1.h)(Template_1[\"default\"], { template: clearSearchTemplate, dictionary: props.dictionary }))) : null));\n }\n return searchInput;\n };\n return SearchInputComponent;\n}(preact_1.Component));\nSearchInputComponent.defaultProps = {\n placeholder: \"\",\n autofocus: false,\n autocomplete: false,\n startSearchOn: 0,\n clearSearch: true,\n withContainer: true,\n searchableFields: [],\n speechRecognition: false,\n classNames: {\n container: \"\",\n input: \"\",\n clearSearch: \"\"\n },\n template: {\n clearSearch: \"x\",\n speechRecognition: \"{S}\"\n }\n};\nexports[\"default\"] = SearchInputComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * SnapshotComponent\n */\nvar SnapshotComponent = /** @class */ (function (_super) {\n __extends(SnapshotComponent, _super);\n function SnapshotComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n SnapshotComponent.prototype.componentWillReceiveProps = function (props) {\n var query = props.store.getCurrentQuery();\n this.setState(function (prevState) {\n return { query: query };\n });\n };\n /**\n * Render\n *\n * @return {}\n */\n SnapshotComponent.prototype.render = function () {\n var queryAsJson = this.state.query == undefined\n ? ''\n : JSON.stringify(this.state.query.toArray());\n return ((0, preact_1.h)(\"div\", null, queryAsJson));\n };\n return SnapshotComponent;\n}(preact_1.Component));\nexports[\"default\"] = SnapshotComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.initialSortBySetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nvar SortByHelper_1 = require(\"./SortByHelper\");\n/**\n * Initial sortBy\n *\n * @param environmentId\n * @param currentQuery\n * @param initialOption\n */\nfunction initialSortBySetup(environmentId, currentQuery, initialOption) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, initialOption);\n clonedQuery.page = 1;\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSortBySetup = initialSortBySetup;\n/**\n * ON change search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedOption\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, selectedOption) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, selectedOption);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SortByActions_1 = require(\"./SortByActions\");\n/**\n * SortBy Filter Component\n */\nvar SortByComponent = /** @class */ (function (_super) {\n __extends(SortByComponent, _super);\n function SortByComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle change\n *\n * @param e\n */\n _this.handleChange = function (e) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var currentOption = e.target.value;\n _this.setState({\n value: currentOption\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.onChangeSearchAction)(environmentId, currentQuery, repository, currentOption);\n };\n return _this;\n }\n /**\n * Components will mount\n */\n SortByComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var options = props.options;\n var currentQuery = props.store.getCurrentQuery();\n var currentOption = options[0].value;\n this.setState({\n value: currentOption,\n visible: false\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.initialSortBySetup)(environmentId, currentQuery, currentOption);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SortByComponent.prototype.componentWillReceiveProps = function (props) {\n var nextFirstSortAsString = props.store.getCurrentQuery().getSortBy().getFirstSortAsString();\n var nextVisible = (props.store.getCurrentResult() != null)\n ? (props.store.getCurrentResult().getTotalHits() > 0)\n : false;\n if (this.state.value !== nextFirstSortAsString ||\n this.state.visible !== nextVisible) {\n this.setState(function (prevState) {\n return {\n value: nextFirstSortAsString,\n visible: nextVisible\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n SortByComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var selectClassName = props.classNames.select;\n if (!state.visible) {\n return;\n }\n var options = props.options;\n var coordinate = props.store.getCurrentQuery().toArray().coordinate;\n if (!coordinate) {\n options = options.filter(function (o) {\n return o.value !== \"distance\";\n });\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-sortBy \".concat(containerClassName) },\n (0, preact_1.h)(\"select\", { className: \"as-sortBy__selector \".concat(selectClassName), onChange: this.handleChange, value: state.value }, options.map(function (option) { return ((0, preact_1.h)(\"option\", { value: option.value }, option.name)); }))));\n };\n return SortByComponent;\n}(preact_1.Component));\nSortByComponent.defaultProps = {\n classNames: {\n container: \"\",\n select: \"\"\n }\n};\nexports[\"default\"] = SortByComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.applySortByToQuery = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\n/**\n * Apply sort by to query\n *\n * @param query Query\n * @param selectedOption string\n */\nfunction applySortByToQuery(query, selectedOption) {\n var sortByData = splitQueryValue(selectedOption);\n var sortBy = apisearch_1[\"default\"].createEmptySortBy();\n if (sortByData.field === \"distance\") {\n sortBy.byValue({\n type: apisearch_1.SORT_BY_TYPE_DISTANCE,\n unit: sortByData.sort\n ? sortByData.sort\n : \"km\"\n });\n }\n else if (sortByData.field === \"score\") {\n sortBy.byValue(apisearch_1.SORT_BY_SCORE);\n }\n else {\n sortBy.byFieldValue(sortByData.field, sortByData.sort);\n }\n query.sortBy(sortBy);\n return query;\n}\nexports.applySortByToQuery = applySortByToQuery;\n/**\n * Split sort by string representation\n *\n * @param string\n *\n * @return {{field: string, sort: string}}\n */\nfunction splitQueryValue(string) {\n var queryValue = string.split(\":\");\n return {\n field: queryValue[0],\n sort: queryValue[1]\n };\n}\n","\"use strict\";\nexports.__esModule = true;\nexports.enableSuggestions = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param numberOfSuggestions\n */\nfunction enableSuggestions(environmentId, currentQuery, numberOfSuggestions) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (numberOfSuggestions > 0) {\n clonedQuery.setNumberOfSuggestions(numberOfSuggestions);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.enableSuggestions = enableSuggestions;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Common_1 = require(\"../Common\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar SuggestionsFilterActions_1 = require(\"./SuggestionsFilterActions\");\nvar Template_1 = require(\"../Template\");\n/**\n * Suggestion Filter Component\n */\nvar SuggestionsFilterComponent = /** @class */ (function (_super) {\n __extends(SuggestionsFilterComponent, _super);\n function SuggestionsFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param word\n */\n _this.handleClick = function (word) {\n var props = _this.props;\n if (typeof word === \"string\") {\n word = word\n .replace(//g, \"\")\n .replace(/<\\/em>/g, \"\");\n }\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n return _this;\n }\n SuggestionsFilterComponent.prototype.componentDidMount = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.highlight = function () {\n var queryText = this.props.store.getCurrentQuery().getQueryText();\n if (queryText !== \"\") {\n var list = document.getElementsByClassName(\"as-suggestions\");\n for (var i = 0; i < list.length; i++) {\n (0, Highlight_1.highlightElement)(list[i], queryText);\n }\n }\n };\n /**\n * Component will mount\n */\n SuggestionsFilterComponent.prototype.componentWillMount = function () {\n this.setState(function (prevState) {\n return {\n words: []\n };\n });\n var props = this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, SuggestionsFilterActions_1.enableSuggestions)(environmentId, currentQuery, props.numberOfSuggestions);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SuggestionsFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n words: props\n .store\n .getCurrentResult()\n .getSuggestions()\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n SuggestionsFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var noSuggestionsClassName = state.words.length > 0\n ? \"\"\n : \"suggestions-empty\";\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions \".concat(containerClassName, \" \").concat(noSuggestionsClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-suggestions__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-suggestions__itemsList \".concat(itemsListClassName) }, state.words.map(function (word) {\n var templateData = {\n word: word\n };\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions__item \".concat(itemClassName), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(word);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: _this.props.dictionary })));\n }))));\n };\n return SuggestionsFilterComponent;\n}(preact_1.Component));\nSuggestionsFilterComponent.defaultProps = {\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = SuggestionsFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n {{word}}\\n\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Mustache = require(\"mustache\");\nvar Translate_1 = require(\"./Translate\");\n/**\n * Template\n */\nvar Template = /** @class */ (function (_super) {\n __extends(Template, _super);\n function Template() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Render template\n *\n * @param template\n * @param result\n * @param dictionary\n *\n * @return {any}\n */\n _this.renderTemplate = function (template, result, dictionary) {\n var trans = function () {\n return function (text, render) {\n return render(Translate_1[\"default\"].trans(text, dictionary));\n };\n };\n var output = Mustache.render(template, __assign(__assign({}, result), {\n \"trans\": trans\n }));\n return {\n __html: output\n };\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {any}\n */\n Template.prototype.render = function () {\n var _a, _b;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var className = props.className;\n var id = (_a = props.id) !== null && _a !== void 0 ? _a : \"\";\n var dictionary = (_b = props.dictionary) !== null && _b !== void 0 ? _b : {};\n return (template)\n ? (0, preact_1.h)(\"div\", { id: id, className: className, dangerouslySetInnerHTML: this.renderTemplate(template, data, dictionary) })\n : null;\n };\n return Template;\n}(preact_1.Component));\nexports[\"default\"] = Template;\n","\"use strict\";\nexports.__esModule = true;\nvar Translate = /** @class */ (function () {\n function Translate() {\n }\n Translate.trans = function (text, dictionary) {\n var _a, _b, _c;\n var parsed = [];\n try {\n parsed = JSON.parse(text);\n }\n catch (_d) {\n return (_a = dictionary[text]) !== null && _a !== void 0 ? _a : text;\n }\n var parsedText = (_b = parsed[0]) !== null && _b !== void 0 ? _b : text;\n parsedText = (_c = dictionary[parsedText]) !== null && _c !== void 0 ? _c : parsedText;\n for (var i = 1; i <= parsed.length; i++) {\n parsedText = parsedText.replace(\"$\" + i, parsed[i]);\n }\n return parsedText;\n };\n return Translate;\n}());\nexports[\"default\"] = Translate;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar BannerComponent_1 = require(\"../components/Banner/BannerComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Banner\n */\nvar Banner = /** @class */ (function (_super) {\n __extends(Banner, _super);\n /**\n * @param target\n * @param breakingPointSize\n * @param position\n * @param imagePrefix\n */\n function Banner(_a) {\n var target = _a.target, breakingPointSize = _a.breakingPointSize, position = _a.position, imagePrefix = _a.imagePrefix;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(BannerComponent_1[\"default\"], { target: target, breakingPointSize: breakingPointSize, position: position, imagePrefix: imagePrefix });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Banner.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return Banner;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Banner(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar CheckboxFilterComponent_1 = require(\"../components/CheckboxFilter/CheckboxFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * CheckboxFilter\n */\nvar CheckboxFilter = /** @class */ (function (_super) {\n __extends(CheckboxFilter, _super);\n function CheckboxFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, label = _a.label, filterValue = _a.filterValue, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(CheckboxFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, label: label, filterValue: filterValue, classNames: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n CheckboxFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n CheckboxFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n CheckboxFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n CheckboxFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return CheckboxFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new CheckboxFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ClearFiltersComponent_1 = require(\"../components/ClearFilters/ClearFiltersComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Clear Filters\n */\nvar ClearFilters = /** @class */ (function (_super) {\n __extends(ClearFilters, _super);\n /**\n * @param target\n * @param classNames\n * @param template\n * @param showIndividualFilterClear\n * @param showGlobalFilterClear\n * @param showIndividualFilterValueClear\n */\n function ClearFilters(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, showIndividualFilterClear = _a.showIndividualFilterClear, showGlobalFilterClear = _a.showGlobalFilterClear, showIndividualFilterValueClear = _a.showIndividualFilterValueClear;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ClearFiltersComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.classNames), classNames), showIndividualFilterClear: showIndividualFilterClear, showGlobalFilterClear: showGlobalFilterClear, showIndividualFilterValueClear: showIndividualFilterValueClear, template: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n ClearFilters.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return ClearFilters;\n}(Widget_1[\"default\"]));\n/**\n * Clear filters widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new ClearFilters(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar InformationComponent_1 = require(\"../components/Information/InformationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Information\n */\nvar Information = /** @class */ (function (_super) {\n __extends(Information, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n * @param formatData\n */\n function Information(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, formatData = _a.formatData;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(InformationComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.template), template), formatData: formatData });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Information.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Information;\n}(Widget_1[\"default\"]));\n/**\n * Information widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Information(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../components/MultipleFilter/Helpers\");\nvar MultipleFilterActions_1 = require(\"../components/MultipleFilter/MultipleFilterActions\");\nvar MultipleFilterComponent_1 = require(\"../components/MultipleFilter/MultipleFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Multiple Filter\n */\nvar MultipleFilter = /** @class */ (function (_super) {\n __extends(MultipleFilter, _super);\n /**\n * @param target\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param fetchLimit\n * @param viewLimit\n * @param sortBy\n * @param ranges\n * @param labels\n * @param classNames\n * @param template\n * @param formatData\n * @param activeFirst\n * @param promoted\n */\n function MultipleFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, aggregationField = _a.aggregationField, applicationType = _a.applicationType, fetchLimit = _a.fetchLimit, viewLimit = _a.viewLimit, sortBy = _a.sortBy, ranges = _a.ranges, labels = _a.labels, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, activeFirst = _a.activeFirst, promoted = _a.promoted;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.filterField = filterField;\n _this.aggregationField = aggregationField !== null && aggregationField !== void 0 ? aggregationField : filterField;\n _this.component = (0, preact_1.h)(MultipleFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: _this.filterField, aggregationField: _this.aggregationField, applicationType: applicationType, fetchLimit: fetchLimit, viewLimit: viewLimit, sortBy: sortBy, ranges: ranges, labels: labels, classNames: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, activeFirst: activeFirst, promoted: promoted });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n MultipleFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n MultipleFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filter = query.filters[filterName];\n var filterValues = filter.values;\n if (filterValues.length > 0) {\n if (filter.application_type === 6) {\n var levelsValues = (0, Helpers_1.getShadowFilterValuesFromQuery)(query, filterName, false);\n object[filterField] = {\n l: levelsValues,\n v: filter.values\n };\n }\n else {\n object[filterField] = filterValues;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n MultipleFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n var rangesValues = Object.keys(this.component.props.ranges);\n var filterType = (rangesValues.length > 0) ? \"range\" : \"field\";\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n (Array.isArray(fieldValues) && (fieldValues.length > 0) ||\n (typeof fieldValues === \"object\") && (Object.keys(fieldValues).length > 0))) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n var applicationType = this.component.props.applicationType;\n var fieldName = \"indexed_metadata.\" + this.component.props.filterField;\n if (applicationType === 6) {\n var originalFieldValues = fieldValues;\n fieldValues = originalFieldValues.v;\n var leveledValues = originalFieldValues.l;\n for (var it_1 = 0; it_1 < leveledValues.length; it_1++) {\n var level = it_1 + 1;\n var fieldNameWithoutPrefix = fieldName.substr(17);\n var leveledFilterName = fieldNameWithoutPrefix + \"_level_\" + level;\n var leveledFieldName = \"indexed_metadata.\" + leveledFilterName;\n query.filters[leveledFilterName] = {\n application_type: applicationType,\n field: leveledFieldName,\n filter_type: apisearch_1.FILTER_TYPE_FIELD,\n values: [leveledValues[it_1]]\n };\n }\n fieldName = fieldName + \"_level_\" + (leveledValues.length + 1);\n }\n query.filters[filterName] = {\n application_type: applicationType,\n field: fieldName,\n filter_type: filterType,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n MultipleFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n /**\n * @param environmentId\n * @param query\n */\n MultipleFilter.prototype.normalizeQuery = function (environmentId, query) {\n var filterName = this.component.props.filterName;\n if ((0, Helpers_1.isFilterAvailable)(query, filterName, 6)) {\n (0, MultipleFilterActions_1.modifyQueryAggregationWithProperLevelValue)(environmentId, query, filterName, this.filterField, this.aggregationField);\n }\n };\n return MultipleFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new MultipleFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PaginationComponent_1 = require(\"../components/Pagination/PaginationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Pagination\n */\nvar Pagination = /** @class */ (function (_super) {\n __extends(Pagination, _super);\n /**\n * Constructor\n *\n * @param target\n * @param padding\n * @param goFirstLast\n * @param classNames\n * @param template\n */\n function Pagination(_a) {\n var target = _a.target, padding = _a.padding, goFirstLast = _a.goFirstLast, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PaginationComponent_1[\"default\"], { target: target, padding: padding, goFirstLast: goFirstLast, classNames: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Pagination.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n /**\n * @param query\n */\n Pagination.prototype.reset = function (query) {\n delete query.page;\n };\n return Pagination;\n}(Widget_1[\"default\"]));\n/**\n * Pagination widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Pagination(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PriorityFilterComponent_1 = require(\"../components/PriorityFilter/PriorityFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * PriorityFilter\n */\nvar PriorityFilter = /** @class */ (function (_super) {\n __extends(PriorityFilter, _super);\n /**\n *\n * @param target\n * @param filters\n * @param template\n */\n function PriorityFilter(_a) {\n var target = _a.target, filters = _a.filters, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PriorityFilterComponent_1[\"default\"], { target: target, filters: filters, template: __assign(__assign({}, PriorityFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n PriorityFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return PriorityFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new PriorityFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar RangeFilterComponent_1 = require(\"../components/RangeFilter/RangeFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * RangeFilter\n */\nvar RangeFilter = /** @class */ (function (_super) {\n __extends(RangeFilter, _super);\n function RangeFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, minValue = _a.minValue, maxValue = _a.maxValue, minMaxCallback = _a.minMaxCallback, step = _a.step, callback = _a.callback, onSliderMove = _a.onSliderMove, template = _a.template, classNames = _a.classNames, attributes = _a.attributes, native = _a.native;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(RangeFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, minValue: minValue, maxValue: maxValue, minMaxCallback: minMaxCallback, step: step, callback: callback, onSliderMove: onSliderMove, native: native, template: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.template), template), classNames: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.classNames), classNames), attributes: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.attributes), attributes) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n RangeFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n RangeFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n if (query.filters !== undefined && query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n RangeFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues,\n filter_type: \"range\"\n };\n }\n };\n /**\n * @param query\n */\n RangeFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return RangeFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new RangeFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ReloadComponent_1 = require(\"../components/Reload/ReloadComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Reload\n */\nvar Reload = /** @class */ (function (_super) {\n __extends(Reload, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Reload(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ReloadComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ReloadComponent_1[\"default\"].defaultProps.classNames), classNames), template: template });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Reload.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Reload;\n}(Widget_1[\"default\"]));\n/**\n * Reload filter\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Reload(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ResultComponent_1 = require(\"../components/Result/ResultComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Result\n */\nvar Result = /** @class */ (function (_super) {\n __extends(Result, _super);\n /**\n * Constructor\n *\n * @param target\n * @param fields\n * @param itemsPerPage\n * @param promote\n * @param exclude\n * @param filter\n * @param highlightsEnabled\n * @param classNames\n * @param template\n * @param formatData\n * @param fadeInSelector\n * @param infiniteScroll\n * @param infiniteScrollButton\n * @param fieldsConciliation\n * @param minScore\n */\n function Result(_a) {\n var target = _a.target, fields = _a.fields, itemsPerPage = _a.itemsPerPage, promote = _a.promote, exclude = _a.exclude, filter = _a.filter, highlightsEnabled = _a.highlightsEnabled, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, fadeInSelector = _a.fadeInSelector, infiniteScroll = _a.infiniteScroll, infiniteScrollButton = _a.infiniteScrollButton, fieldsConciliation = _a.fieldsConciliation, minScore = _a.minScore;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(ResultComponent_1[\"default\"], { target: target, fields: fields, itemsPerPage: itemsPerPage, promote: promote, exclude: exclude, filter: filter, highlightsEnabled: highlightsEnabled, classNames: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, fadeInSelector: fadeInSelector, infiniteScroll: infiniteScroll, infiniteScrollButton: infiniteScrollButton, fieldsConciliation: fieldsConciliation, minScore: minScore });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Result.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, currentVisibleResults: store.resultsAreVisible(), dictionary: dictionary });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n */\n Result.prototype.reset = function (query) {\n delete query.page;\n this.component.state = {\n page: 1\n };\n };\n return Result;\n}(Widget_1[\"default\"]));\n/**\n * Result widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Result(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"../components/SearchInput/SearchInputActions\");\nvar SearchInputComponent_1 = require(\"../components/SearchInput/SearchInputComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SearchInput\n */\nvar SearchInput = /** @class */ (function (_super) {\n __extends(SearchInput, _super);\n /**\n * Constructor\n *\n * @param target\n * @param placeholder\n * @param startSearchOn\n * @param clearSearch\n * @param withContainer\n * @param autofocus\n * @param autocomplete\n * @param classNames\n * @param template\n * @param searchableFields\n * @param speechRecognition\n * @param queryOperator\n */\n function SearchInput(_a) {\n var target = _a.target, placeholder = _a.placeholder, startSearchOn = _a.startSearchOn, clearSearch = _a.clearSearch, withContainer = _a.withContainer, autofocus = _a.autofocus, autocomplete = _a.autocomplete, classNames = _a.classNames, template = _a.template, searchableFields = _a.searchableFields, speechRecognition = _a.speechRecognition, queryOperator = _a.queryOperator;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SearchInputComponent_1[\"default\"], { target: target, placeholder: placeholder, autofocus: autofocus, autocomplete: autocomplete, startSearchOn: startSearchOn, clearSearch: clearSearch, withContainer: withContainer, searchableFields: searchableFields, speechRecognition: speechRecognition, classNames: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.template), template), queryOperator: queryOperator, config: _this.config });\n _this.queryOperator = queryOperator;\n _this.autocomplete = autocomplete;\n _this.searchableFields = searchableFields;\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SearchInput.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, htmlNodeInheritProps: {\n autocomplete: \"off\",\n spellcheck: false\n }, dictionary: dictionary });\n if (this.target === null) {\n return;\n }\n if (!this.targetNode) {\n var targetNode = document.querySelector(this.target);\n var isInput = isInputElement(targetNode);\n if (isInput) {\n this.component.props = __assign(__assign({}, this.component.props), { withContainer: false, htmlNodeInheritProps: __assign(__assign({}, this.component.props.htmlNodeInheritedProps), getNodeAttributes(targetNode)) });\n var parentNode = targetNode.parentNode;\n targetNode.remove();\n this.targetNode = parentNode;\n }\n else {\n this.targetNode = targetNode;\n }\n }\n if (this.isSecondRender === undefined) {\n this.isSecondRender = true;\n }\n else if (this.isSecondRender === true) {\n this.isSecondRender = false;\n }\n if (!this.targetNode) {\n return;\n }\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n * @param object\n */\n SearchInput.prototype.toUrlObject = function (query, object) {\n var q = query.q;\n if (q !== undefined &&\n q !== \"\") {\n object.q = q;\n }\n };\n /**\n * @param object\n * @param query\n */\n SearchInput.prototype.fromUrlObject = function (object, query) {\n var q = object.q;\n if (q !== undefined &&\n q !== \"\") {\n query.q = q;\n }\n };\n /**\n * @param query\n */\n SearchInput.prototype.reset = function (query) {\n delete query.q;\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n SearchInput.prototype.initialSetup = function (environmentId, store, repository) {\n /**\n * Dispatch action\n */\n (0, SearchInputActions_1.initialSearchSetup)(environmentId, store.getCurrentQuery(), this.autocomplete, this.searchableFields, this.queryOperator);\n };\n return SearchInput;\n}(Widget_1[\"default\"]));\n/**\n * Returns an object of an\n * html node attributes.\n *\n * @param htmlNode\n * @returns {{}}\n */\nvar getNodeAttributes = function (htmlNode) {\n var _a;\n var nodeAttributes = {};\n for (var i = 0; i < htmlNode.attributes.length; i++) {\n var attr = htmlNode.attributes[i];\n if (attr.specified) {\n nodeAttributes = __assign(__assign({}, nodeAttributes), (_a = {}, _a[attr.name] = attr.value, _a));\n }\n }\n return nodeAttributes;\n};\n/**\n * Checks if an html node\n * is an input.\n *\n * @param targetNode\n * @returns {boolean}\n */\nvar isInputElement = function (targetNode) {\n return targetNode instanceof HTMLInputElement;\n};\n/**\n * Search Input widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SearchInput(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SnapshotComponent_1 = require(\"../components/Snapshot/SnapshotComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Snapshot\n */\nvar Snapshot = /** @class */ (function (_super) {\n __extends(Snapshot, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Snapshot(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SnapshotComponent_1[\"default\"], { target: target });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Snapshot.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Snapshot;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Snapshot(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar SortByComponent_1 = require(\"../components/SortBy/SortByComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SortBy\n */\nvar SortBy = /** @class */ (function (_super) {\n __extends(SortBy, _super);\n function SortBy(_a) {\n var target = _a.target, classNames = _a.classNames, options = _a.options;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(SortByComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, SortByComponent_1[\"default\"].defaultProps.classNames), classNames), options: options });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SortBy.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @private\n */\n SortBy.prototype.firstOptionAsString = function () {\n return this.component.props.options[0].value;\n };\n /**\n * @param query\n * @param object\n */\n SortBy.prototype.toUrlObject = function (query, object) {\n if (query.sort !== undefined) {\n var sort = query.sort[0];\n var sortInstance = apisearch_1.SortBy.createFromArray(query.sort);\n var sortAsString = sortInstance.getFirstSortAsString();\n var firstSortAsString = this.firstOptionAsString();\n if (sortAsString !== firstSortAsString) {\n if (sort.type === \"distance\") {\n object.sort = \"distance:\" + sort.unit + \":\" + sort.coordinate.lat + \":\" + sort.coordinate.lon;\n }\n else {\n object.sort = sort.field.substr(17) + \":\" + sort.order;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n SortBy.prototype.fromUrlObject = function (object, query) {\n if (object.sort !== undefined) {\n SortBy.setSortToQuery(query, object.sort);\n }\n };\n /**\n * @param query\n */\n SortBy.prototype.reset = function (query) {\n delete query.sort;\n var firstSortAsString = this.firstOptionAsString();\n SortBy.setSortToQuery(query, firstSortAsString);\n };\n /**\n * @param query\n * @param option\n * @private\n */\n SortBy.setSortToQuery = function (query, option) {\n if (option === \"score\") {\n return;\n }\n query.sort = [{}];\n if (option.indexOf(\"distance:\") === 0) {\n var distanceSortParts = option.split(\":\");\n query.sort[0].type = distanceSortParts[0];\n query.sort[0].unit = distanceSortParts[1];\n query.sort[0].coordinate = {\n lat: distanceSortParts[2],\n lon: distanceSortParts[3]\n };\n return;\n }\n var sortParts = option.split(\":\");\n query.sort[0].type = \"field\";\n query.sort[0].field = \"indexed_metadata.\" + sortParts[0];\n query.sort[0].order = sortParts[1];\n };\n return SortBy;\n}(Widget_1[\"default\"]));\n/**\n * SortBy widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SortBy(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SuggestionsFilterComponent_1 = require(\"../components/Suggestions/SuggestionsFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SuggestionsFilter\n */\nvar SuggestionsFilter = /** @class */ (function (_super) {\n __extends(SuggestionsFilter, _super);\n function SuggestionsFilter(_a) {\n var target = _a.target, numberOfSuggestions = _a.numberOfSuggestions, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SuggestionsFilterComponent_1[\"default\"], { target: target, numberOfSuggestions: numberOfSuggestions, classNames: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SuggestionsFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return SuggestionsFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SuggestionsFilter(settings); });\n","\"use strict\";\nexports.__esModule = true;\n/**\n * Widget\n */\nvar Widget = /** @class */ (function () {\n function Widget() {\n }\n Widget.prototype.withConfig = function (config) {\n if (\"withConfig\" in this.component) {\n this.component.withConfig(config);\n }\n };\n /**\n * @param query\n * @param object\n */\n Widget.prototype.toUrlObject = function (query, object) {\n };\n /**\n * @param object\n * @param query\n */\n Widget.prototype.fromUrlObject = function (object, query) {\n };\n /**\n * @param query\n */\n Widget.prototype.reset = function (query) {\n };\n /**\n * @param environmentId\n * @param query\n */\n Widget.prototype.normalizeQuery = function (environmentId, query) {\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n Widget.prototype.initialSetup = function (environmentId, store, repository) {\n };\n return Widget;\n}());\nexports[\"default\"] = Widget;\n","\"use strict\";\nexports.__esModule = true;\nvar CheckboxFilter_1 = require(\"./CheckboxFilter\");\nvar ClearFilters_1 = require(\"./ClearFilters\");\nvar Information_1 = require(\"./Information\");\nvar MultipleFilter_1 = require(\"./MultipleFilter\");\nvar Pagination_1 = require(\"./Pagination\");\nvar RangeFilter_1 = require(\"./RangeFilter\");\nvar Reload_1 = require(\"./Reload\");\nvar Result_1 = require(\"./Result\");\nvar SearchInput_1 = require(\"./SearchInput\");\nvar Snapshot_1 = require(\"./Snapshot\");\nvar SortBy_1 = require(\"./SortBy\");\nvar Suggestions_1 = require(\"./Suggestions\");\nvar Banner_1 = require(\"./Banner\");\nvar PriorityFilter_1 = require(\"./PriorityFilter\");\n/**\n * Widget factories\n */\nexports[\"default\"] = {\n searchInput: SearchInput_1[\"default\"],\n clearFilters: ClearFilters_1[\"default\"],\n multipleFilter: MultipleFilter_1[\"default\"],\n sortBy: SortBy_1[\"default\"],\n information: Information_1[\"default\"],\n result: Result_1[\"default\"],\n pagination: Pagination_1[\"default\"],\n checkboxFilter: CheckboxFilter_1[\"default\"],\n rangeFilter: RangeFilter_1[\"default\"],\n reload: Reload_1[\"default\"],\n snapshot: Snapshot_1[\"default\"],\n suggestions: Suggestions_1[\"default\"],\n banner: Banner_1[\"default\"],\n priorityFilter: PriorityFilter_1[\"default\"]\n};\n","export { Md5 } from './md5';\nexport { Md5FileHasher } from './md5_file_hasher';\nexport { ParallelHasher } from './parallel_hasher';\n//# sourceMappingURL=index.js.map","/*\n\nTypeScript Md5\n==============\n\nBased on work by\n* Joseph Myers: http://www.myersdaily.org/joseph/javascript/md5-text.html\n* André Cruz: https://github.com/satazor/SparkMD5\n* Raymond Hill: https://github.com/gorhill/yamd5.js\n\nEffectively a TypeScrypt re-write of Raymond Hill JS Library\n\nThe MIT License (MIT)\n\nCopyright (C) 2014 Raymond Hill\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n Version 2, December 2004\n\n Copyright (C) 2015 André Cruz \n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT YOU WANT TO.\n\n\n*/\n;\nexport class Md5 {\n constructor() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state = new Int32Array(4);\n this._buffer = new ArrayBuffer(68);\n this._buffer8 = new Uint8Array(this._buffer, 0, 68);\n this._buffer32 = new Uint32Array(this._buffer, 0, 17);\n this.start();\n }\n static hashStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendStr(str)\n .end(raw);\n }\n static hashAsciiStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendAsciiStr(str)\n .end(raw);\n }\n static _hex(x) {\n const hc = Md5.hexChars;\n const ho = Md5.hexOut;\n let n;\n let offset;\n let j;\n let i;\n for (i = 0; i < 4; i += 1) {\n offset = i * 8;\n n = x[i];\n for (j = 0; j < 8; j += 2) {\n ho[offset + 1 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n ho[offset + 0 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n }\n }\n return ho.join('');\n }\n static _md5cycle(x, k) {\n let a = x[0];\n let b = x[1];\n let c = x[2];\n let d = x[3];\n // ff()\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n // gg()\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n // hh()\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n // ii()\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n /**\n * Initialise buffer to be hashed\n */\n start() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state.set(Md5.stateIdentity);\n return this;\n }\n // Char to code point to to array conversion:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\n // #Example.3A_Fixing_charCodeAt_to_handle_non-Basic-Multilingual-Plane_characters_if_their_presence_earlier_in_the_string_is_unknown\n /**\n * Append a UTF-8 string to the hash buffer\n * @param str String to append\n */\n appendStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let code;\n let i;\n for (i = 0; i < str.length; i += 1) {\n code = str.charCodeAt(i);\n if (code < 128) {\n buf8[bufLen++] = code;\n }\n else if (code < 0x800) {\n buf8[bufLen++] = (code >>> 6) + 0xC0;\n buf8[bufLen++] = code & 0x3F | 0x80;\n }\n else if (code < 0xD800 || code > 0xDBFF) {\n buf8[bufLen++] = (code >>> 12) + 0xE0;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n else {\n code = ((code - 0xD800) * 0x400) + (str.charCodeAt(++i) - 0xDC00) + 0x10000;\n if (code > 0x10FFFF) {\n throw new Error('Unicode standard supports code points up to U+10FFFF');\n }\n buf8[bufLen++] = (code >>> 18) + 0xF0;\n buf8[bufLen++] = (code >>> 12 & 0x3F) | 0x80;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n if (bufLen >= 64) {\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen -= 64;\n buf32[0] = buf32[16];\n }\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append an ASCII string to the hash buffer\n * @param str String to append\n */\n appendAsciiStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(str.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = str.charCodeAt(j++);\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append a byte array to the hash buffer\n * @param input array to append\n */\n appendByteArray(input) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(input.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = input[j++];\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Get the state of the hash buffer\n */\n getState() {\n const s = this._state;\n return {\n buffer: String.fromCharCode.apply(null, Array.from(this._buffer8)),\n buflen: this._bufferLength,\n length: this._dataLength,\n state: [s[0], s[1], s[2], s[3]]\n };\n }\n /**\n * Override the current state of the hash buffer\n * @param state New hash buffer state\n */\n setState(state) {\n const buf = state.buffer;\n const x = state.state;\n const s = this._state;\n let i;\n this._dataLength = state.length;\n this._bufferLength = state.buflen;\n s[0] = x[0];\n s[1] = x[1];\n s[2] = x[2];\n s[3] = x[3];\n for (i = 0; i < buf.length; i += 1) {\n this._buffer8[i] = buf.charCodeAt(i);\n }\n }\n /**\n * Hash the current state of the hash buffer and return the result\n * @param raw Whether to return the value as an `Int32Array`\n */\n end(raw = false) {\n const bufLen = this._bufferLength;\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n const i = (bufLen >> 2) + 1;\n this._dataLength += bufLen;\n const dataBitsLen = this._dataLength * 8;\n buf8[bufLen] = 0x80;\n buf8[bufLen + 1] = buf8[bufLen + 2] = buf8[bufLen + 3] = 0;\n buf32.set(Md5.buffer32Identity.subarray(i), i);\n if (bufLen > 55) {\n Md5._md5cycle(this._state, buf32);\n buf32.set(Md5.buffer32Identity);\n }\n // Do the final computation based on the tail and length\n // Beware that the final length may not fit in 32 bits so we take care of that\n if (dataBitsLen <= 0xFFFFFFFF) {\n buf32[14] = dataBitsLen;\n }\n else {\n const matches = dataBitsLen.toString(16).match(/(.*?)(.{0,8})$/);\n if (matches === null) {\n return;\n }\n const lo = parseInt(matches[2], 16);\n const hi = parseInt(matches[1], 16) || 0;\n buf32[14] = lo;\n buf32[15] = hi;\n }\n Md5._md5cycle(this._state, buf32);\n return raw ? this._state : Md5._hex(this._state);\n }\n}\n// Private Static Variables\nMd5.stateIdentity = new Int32Array([1732584193, -271733879, -1732584194, 271733878]);\nMd5.buffer32Identity = new Int32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\nMd5.hexChars = '0123456789abcdef';\nMd5.hexOut = [];\n// Permanent instance is to use for one-call hashing\nMd5.onePassHasher = new Md5();\nif (Md5.hashStr('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n throw new Error('Md5 self test failed.');\n}\n//# sourceMappingURL=md5.js.map","import { Md5 } from './md5';\n// Hashes any blob\nexport class Md5FileHasher {\n constructor(_callback, // Callback to return the result\n _async = true, // Async version is not always available in a web worker\n _partSize = 1048576) {\n this._callback = _callback;\n this._async = _async;\n this._partSize = _partSize;\n this._configureReader();\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n */\n hash(blob) {\n const self = this;\n self._blob = blob;\n // self._length = Math.ceil(blob.size / self._partSize);\n self._part = 0;\n self._md5 = new Md5();\n self._processPart();\n }\n _fail() {\n this._callback({\n success: false,\n result: 'data read failed'\n });\n }\n _hashData(e) {\n let self = this;\n self._md5.appendByteArray(new Uint8Array(e.target.result));\n if (self._part * self._partSize >= self._blob.size) {\n self._callback({\n success: true,\n result: self._md5.end()\n });\n }\n else {\n self._processPart();\n }\n }\n _processPart() {\n const self = this;\n let endbyte = 0;\n let current_part;\n self._part += 1;\n if (self._blob.size > self._partSize) { // If blob bigger then part_size we will slice it up\n endbyte = self._part * self._partSize;\n if (endbyte > self._blob.size) {\n endbyte = self._blob.size;\n }\n current_part = self._blob.slice((self._part - 1) * self._partSize, endbyte);\n }\n else {\n current_part = self._blob;\n }\n if (self._async) {\n self._reader.readAsArrayBuffer(current_part);\n }\n else {\n setTimeout(() => {\n try {\n self._hashData({\n target: {\n result: self._reader.readAsArrayBuffer(current_part)\n },\n });\n }\n catch (e) {\n self._fail();\n }\n }, 0);\n }\n }\n _configureReader() {\n const self = this;\n if (self._async) {\n self._reader = new FileReader();\n self._reader.onload = self._hashData.bind(self);\n self._reader.onerror = self._fail.bind(self);\n self._reader.onabort = self._fail.bind(self);\n }\n else {\n self._reader = new FileReaderSync();\n }\n }\n}\n//# sourceMappingURL=md5_file_hasher.js.map",";\nexport class ParallelHasher {\n constructor(workerUri, workerOptions) {\n this._queue = [];\n this._ready = true;\n const self = this;\n if (Worker) {\n self._hashWorker = new Worker(workerUri, workerOptions);\n self._hashWorker.onmessage = self._recievedMessage.bind(self);\n self._hashWorker.onerror = (err) => {\n self._ready = false;\n console.error('Hash worker failure', err);\n };\n }\n else {\n self._ready = false;\n console.error('Web Workers are not supported in this browser');\n }\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n * @returns Promise of the Hashed result\n */\n hash(blob) {\n const self = this;\n let promise;\n promise = new Promise((resolve, reject) => {\n self._queue.push({\n blob,\n resolve,\n reject,\n });\n self._processNext();\n });\n return promise;\n }\n /** Terminate any existing hash requests */\n terminate() {\n this._ready = false;\n this._hashWorker.terminate();\n }\n // Processes the next item in the queue\n _processNext() {\n if (this._ready && !this._processing && this._queue.length > 0) {\n this._processing = this._queue.pop();\n this._hashWorker.postMessage(this._processing.blob);\n }\n }\n // Hash result is returned from the worker\n _recievedMessage(evt) {\n var _a, _b;\n const data = evt.data;\n if (data.success) {\n (_a = this._processing) === null || _a === void 0 ? void 0 : _a.resolve(data.result);\n }\n else {\n (_b = this._processing) === null || _b === void 0 ? void 0 : _b.reject(data.result);\n }\n this._processing = undefined;\n this._processNext();\n }\n}\n//# sourceMappingURL=parallel_hasher.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.7\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\nexports.__esModule = true;\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\nexports[\"default\"] = ApisearchUI_1[\"default\"];\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/apisearch-ui.min.js b/dist/apisearch-ui.min.js index 706d9b7f..5b74225b 100644 --- a/dist/apisearch-ui.min.js +++ b/dist/apisearch-ui.min.js @@ -1,3 +1,3 @@ /*! For license information please see apisearch-ui.min.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apisearchUI=e():t.apisearchUI=e()}(self,(()=>(()=>{var t={9347:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(5215),o=r(5245),i=r(4148),s=r(4148),a=r(4148),u=r(8699),l=r(1802),c=r(5584),p=r(2299),f=r(76),d=r(6929),h=function(){function t(){}return t.createRepository=function(e){t.ensureRepositoryConfigIsValid(e),e.options=n.__assign({api_version:"v1",override_queries:!0,timeout:3e3},e.options);var r=void 0!==e.options.http_client?e.options.http_client:new o.AxiosClient(e.options.endpoint,e.options.api_version,e.options.timeout,e.options.override_queries);return e.options.use_cache&&(r=new d.CacheClient(r)),new l.HttpRepository(r,e.app_id,e.index_id,e.token,new f.Transformer)},t.ensureRepositoryConfigIsValid=function(e){t.ensureIsDefined(e.app_id,"app_id"),t.ensureIsDefined(e.index_id,"index_id"),t.ensureIsDefined(e.token,"token"),t.ensureIsDefined(e.options.endpoint,"options.endpoint")},t.ensureIsDefined=function(t,e){if(void 0===t)throw new TypeError(e+" parameter must be defined.")},t.createQueryLocated=function(t,e,r,n){return void 0===r&&(r=i.QUERY_DEFAULT_PAGE),void 0===n&&(n=s.QUERY_DEFAULT_SIZE),a.Query.createLocated(t,e,r,n)},t.createQuery=function(t,e,r){return void 0===e&&(e=i.QUERY_DEFAULT_PAGE),void 0===r&&(r=s.QUERY_DEFAULT_SIZE),a.Query.create(t,e,r)},t.createQueryMatchAll=function(){return a.Query.createMatchAll()},t.createQueryByUUID=function(t){return a.Query.createByUUID(t)},t.createQueryByUUIDs=function(){for(var t=[],e=0;e{"use strict";e.__esModule=!0,e.Config=e.DEFAULT_REPLICAS=e.DEFAULT_SHARDS=void 0;var n=r(5787);e.DEFAULT_SHARDS=1,e.DEFAULT_REPLICAS=0;var o=function(){function t(t,r,n,o){void 0===t&&(t=null),void 0===r&&(r=!0),void 0===n&&(n=e.DEFAULT_SHARDS),void 0===o&&(o=e.DEFAULT_REPLICAS),this.synonyms=[],this.language=t,this.storeSearchableMetadata=r,this.shards=n,this.replicas=o}return t.prototype.getLanguage=function(){return this.language},t.prototype.shouldSearchableMetadataBeStored=function(){return this.storeSearchableMetadata},t.prototype.addSynonym=function(t){this.synonyms.push(t)},t.prototype.getSynonyms=function(){return this.synonyms},t.prototype.getShards=function(){return this.shards},t.prototype.getReplicas=function(){return this.replicas},t.prototype.toArray=function(){return{language:this.language,store_searchable_metadata:this.storeSearchableMetadata,synonyms:this.synonyms.map((function(t){return t.toArray()})),shards:this.shards,replicas:this.replicas}},t.createFromArray=function(r){var o=new t(r.language?r.language:null,"boolean"!=typeof r.store_searchable_metadata||r.store_searchable_metadata);return r.synonyms instanceof Array&&r.synonyms.length>0&&(o.synonyms=r.synonyms.map((function(t){return n.Synonym.createFromArray(t)}))),o.shards="number"==typeof r.shards?r.shards:e.DEFAULT_SHARDS,o.replicas="number"==typeof r.replicas?r.replicas:e.DEFAULT_REPLICAS,o},t}();e.Config=o},5787:(t,e)=>{"use strict";e.__esModule=!0,e.Synonym=void 0;var r=function(){function t(t){this.words=t}return t.prototype.getWords=function(){return this.words},t.createbyWords=function(e){return new t(e)},t.prototype.toArray=function(){return{words:this.words}},t.createFromArray=function(e){return new t(e.words instanceof Object?e.words:[])},t.prototype.expand=function(){return this.words.join(",")},t}();e.Synonym=r},8864:(t,e,r)=>{"use strict";e.__esModule=!0,e.ConnectionError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 500},e}(r(109).ErrorWithMessage);e.ConnectionError=o},109:(t,e)=>{"use strict";e.__esModule=!0,e.ErrorWithMessage=void 0;e.ErrorWithMessage=function(t){this.message=t}},7214:(t,e,r)=>{"use strict";e.__esModule=!0,e.EventError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.throwEndpointNotAvailable=function(){return new e("Endpoint not available")},e}(r(109).ErrorWithMessage);e.EventError=o},5265:(t,e,r)=>{"use strict";e.__esModule=!0,e.ForbiddenError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 403},e.createAppIdIsRequiredException=function(){return new e("AppId query parameter MUST be defined with a valid value")},e.createIndexIsRequiredException=function(){return new e("Index query parameter MUST be defined with a valid value")},e.createTokenIsRequiredException=function(){return new e("Token query parameter MUST be defined with a valid value")},e}(r(109).ErrorWithMessage);e.ForbiddenError=o},1062:(t,e,r)=>{"use strict";e.__esModule=!0,e.InvalidFormatError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 400},e.itemRepresentationNotValid=function(){return new e("Item representation not valid. Expecting Item array serialized but found malformed data")},e.itemUUIDRepresentationNotValid=function(){return new e("Item UUID representation not valid. Expecting UUID array serialized but found malformed data")},e.composedItemUUIDNotValid=function(){return new e("A composed UUID should always follow this format: {id}~{type}.")},e.querySortedByDistanceWithoutCoordinate=function(){return new e("In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()")},e.queryFormatNotValid=function(){return new e("Query Format not valid. Expecting a Query serialized but found malformed data")},e.coordinateFormatNotValid=function(){return new e("A Coordinate should always contain a lat (Latitude) and a lon (Longitude)")},e.configFormatNotValid=function(){return new e("Config Format not valid. Expecting a Config serialized but found malformed data")},e.tokenFormatNotValid=function(){return new e("Token Format not valid. Expecting a Token serialized but found malformed data")},e.indexFormatNotValid=function(){return new e("Index Format not valid. Expecting an Index serialized but found malformed data")},e.indexUUIDFormatNotValid=function(){return new e("IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data")},e.appUUIDFormatNotValid=function(){return new e("AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data")},e.campaignFormatNotValid=function(){return new e("Campaign Format not valid. Expecting a Campaign serialized but found malformed data")},e.changesFormatNotValid=function(){return new e("Changes Format not valid. Expecting a Changes serialized but found malformed data")},e.boostClauseFormatNotValid=function(){return new e("Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data")},e.tokenUUIDFormatNotValid=function(){return new e("Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data")},e.userFormatNotValid=function(){return new e("User Format not valid. Expecting a User serialized but found malformed data")},e}(r(109).ErrorWithMessage);e.InvalidFormatError=o},748:(t,e,r)=>{"use strict";e.__esModule=!0,e.InvalidTokenError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 401},e.createInvalidTokenPermissions=function(t){return new e("Token "+t+"not valid")},e.createInvalidTokenMaxHitsPerQuery=function(t,r){return new e("Token "+t+"not valid. Max "+r+" hits allowed")},e}(r(109).ErrorWithMessage);e.InvalidTokenError=o},580:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResourceExistsError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 409},e.indexAvailable=function(){return new e("Index exists and cannot be created again")},e.eventsIndexAvailable=function(){return new e("Events index exists and cannot be created again")},e.logsIndexAvailable=function(){return new e("Logs index exists and cannot be created again")},e}(r(109).ErrorWithMessage);e.ResourceExistsError=o},1912:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResourceNotAvailableError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 404},e.indexNotAvailable=function(t){return new e("Index not available - "+t)},e.eventsIndexNotAvailable=function(t){return new e("Events not available - "+t)},e.logsIndexNotAvailable=function(t){return new e("Logs not available - "+t)},e.engineNotAvailable=function(t){return new e("Engine not available - "+t)},e}(r(109).ErrorWithMessage);e.ResourceNotAvailableError=o},6080:(t,e,r)=>{"use strict";e.__esModule=!0,e.UnknownError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.createUnknownError=function(){return new this("Unknown error.")},e}(r(109).ErrorWithMessage);e.UnknownError=o},5272:(t,e,r)=>{"use strict";e.__esModule=!0,e.UnsupportedContentTypeError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 415},e.createUnsupportedContentTypeException=function(){return new e("This content type is not accepted. Please use application/json")},e}(r(109).ErrorWithMessage);e.UnsupportedContentTypeError=o},5093:(t,e,r)=>{"use strict";e.__esModule=!0,e.Square=e.Polygon=e.CoordinateAndDistance=e.LocationRange=void 0;var n=r(5215),o=r(9367),i=function(){function t(){}return t.fromFilterObject=function(t){throw TypeError("Method not valid")},t.prototype.toArray=function(){return{type:this.getName(),data:this.toFilterObject()}},t.createFromArray=function(t){return"CoordinateAndDistance"==t.type?s.fromFilterObject(t.data):"Polygon"==t.type?a.fromFilterObject(t.data):"Square"==t.type?u.fromFilterObject(t.data):void 0},t}();e.LocationRange=i;var s=function(t){function e(e,r){var n=t.call(this)||this;return n.coordinate=e,n.distance=r,n}return n.__extends(e,t),e.prototype.toFilterObject=function(){return{coordinate:this.coordinate.toArray(),distance:this.distance}},e.prototype.getName=function(){return"CoordinateAndDistance"},e.fromFilterObject=function(t){return new e(o.Coordinate.createFromArray(t.coordinate),t.distance)},e}(i);e.CoordinateAndDistance=s;var a=function(t){function e(e){var r=t.call(this)||this;if(e.length<3)throw new Error("A polygon needs more than two coordinates.");return r.coordinates=e,r}return n.__extends(e,t),e.prototype.toFilterObject=function(){var t=[];for(var e in this.coordinates)t.push(this.coordinates[e].toArray());return{coordinates:t}},e.prototype.getName=function(){return"Polygon"},e.fromFilterObject=function(t){var r=[];for(var n in t.coordinates)r.push(o.Coordinate.createFromArray(t.coordinates[n]));return new e(r)},e}(i);e.Polygon=a;var u=function(t){function e(e,r){var n=t.call(this)||this;return n.topLeftCoordinate=e,n.bottomRightCoordinate=r,n}return n.__extends(e,t),e.prototype.toFilterObject=function(){return{top_left:this.topLeftCoordinate.toArray(),bottom_right:this.bottomRightCoordinate.toArray()}},e.prototype.getName=function(){return"Square"},e.fromFilterObject=function(t){return new e(o.Coordinate.createFromArray(t.top_left),o.Coordinate.createFromArray(t.bottom_right))},e}(i);e.Square=u},5245:(t,e,r)=>{"use strict";e.__esModule=!0,e.AxiosClient=void 0;var n=r(5215),o=r(6425),i=r(5059),s=r(6113),a=r(8609),u=function(t){function e(e,r,n,o){var i=t.call(this,r)||this;return i.host=e,i.timeout=n,i.overrideQueries=o,i.abortControllers={},i}return n.__extends(e,t),e.prototype.get=function(t,e,r,o,u){return void 0===o&&(o={}),void 0===u&&(u={}),n.__awaiter(this,void 0,void 0,(function(){var l,c,p,f;return n.__generator(this,(function(d){switch(d.label){case 0:t=t.replace(/^\/*|\/*$/g,""),t="/"+(this.version+"/"+t).replace(/^\/*|\/*$/g,""),"get"===(e=e.toLowerCase())&&this.overrideQueries&&this.abort(t,!0),l="get"===e?{}:{"Content-Encoding":"gzip","Content-Type":"application/json"},c={baseURL:this.host.replace(/\/*$/g,""),data:u,headers:l,method:e,timeout:this.timeout,transformRequest:[function(t){return JSON.stringify(t)}],url:t+"?"+s.Client.objectToUrlParameters(n.__assign(n.__assign({},o),{token:r.token})).replace(/#/g,"%23")},void 0!==this.abortControllers[t]&&(c.signal=this.abortControllers[t].signal),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this.fetch(t,c,3)];case 2:return p=d.sent(),[2,new a.Response(p.status,p.data)];case 3:throw(f=d.sent()).response?new a.Response(f.response.status,f.response.data):new a.Response(i.ConnectionError.getTransportableHTTPError(),{message:f.message});case 4:return[2]}}))}))},e.prototype.abort=function(t,e){e||(t=t.replace(/^\/*|\/*$/g,""),t="/"+(this.version+"/"+t).replace(/^\/*|\/*$/g,"")),void 0!==this.abortControllers[t]&&this.abortControllers[t].abort(),this.generateAbortController(t)},e.prototype.generateAbortController=function(t){this.abortControllers[t]=new AbortController},e.prototype.fetch=function(t,e,r){return n.__awaiter(this,void 0,void 0,(function(){var i=this;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,o.default.request(e).then((function(t){return{data:t.data,status:t.status}})).catch((function(n){var o=n.response;if(void 0!==n.code&&"ECONNREFUSED"!==n.code&&"ECONNABORTED"!==n.code&&"ERR_BAD_REQUEST"!==n.code&&"Network Error"!==n.message)return{data:o.data,status:o.status};if(r<=0)throw n;return r-=1,i.fetch(t,e,r)}))];case 1:return[2,n.sent()]}}))}))},e}(s.Client);e.AxiosClient=u},6929:(t,e,r)=>{"use strict";e.__esModule=!0,e.CacheClient=void 0;var n=r(5215),o=r(6172),i=function(){function t(t){this.cache={},this.hits=0,this.httpClient=t}return t.prototype.flushCache=function(){this.cache={}},t.prototype.size=function(){return Object.keys(this.cache).length},t.prototype.getNumberOfHits=function(){return this.hits},t.prototype.get=function(t,e,r,i,s){return void 0===i&&(i={}),void 0===s&&(s={}),n.__awaiter(this,void 0,void 0,(function(){var a,u,l;return n.__generator(this,(function(n){switch(n.label){case 0:return"get"!==e?[2,this.httpClient.get(t,e,r,i,s)]:(a=o.Md5.hashStr(JSON.stringify({u:t,c:r,p:i,d:s})).toString(),this.cache[a]?[3,2]:(u=this.cache,l=a,[4,this.httpClient.get(t,e,r,i,s)]));case 1:return u[l]=n.sent(),[3,3];case 2:this.httpClient.abort(t,!1),this.hits++,n.label=3;case 3:return[2,this.cache[a]]}}))}))},t.prototype.abort=function(t,e){},t}();e.CacheClient=i},6113:(t,e)=>{"use strict";e.__esModule=!0,e.Client=void 0;var r=function(){function t(t){this.version=t.replace(/^\/*|\/*$/g,"")}return t.objectToUrlParameters=function(t){var e=[];for(var r in t)e.push(r+"="+t[r]);return e.join("&")},t}();e.Client=r},2113:(t,e)=>{"use strict";e.__esModule=!0,e.HttpClient=void 0;e.HttpClient=function(){}},8609:(t,e)=>{"use strict";e.__esModule=!0,e.Response=void 0;var r=function(){function t(t,e){this.code=t,this.body=e}return t.prototype.getCode=function(){return this.code},t.prototype.getBody=function(){return this.body},t}();e.Response=r},781:(t,e,r)=>{"use strict";e.__esModule=!0,e.AppUUID=void 0;var n=r(1062),o=function(){function t(t){if(t.indexOf("_")>=0)throw n.InvalidFormatError.appUUIDFormatNotValid();this.id=t}return t.createById=function(e){return new t(e)},t.prototype.getId=function(){return this.id},t.prototype.toArray=function(){return{id:this.id}},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).id)},t.prototype.composedUUID=function(){return this.id},t}();e.AppUUID=o},7112:(t,e)=>{"use strict";e.__esModule=!0,e.Changes=e.TYPE_ARRAY=e.TYPE_ARRAY_EXPECTS_ELEMENT=e.TYPE_ARRAY_ELEMENT_DELETE=e.TYPE_ARRAY_ELEMENT_ADD=e.TYPE_ARRAY_ELEMENT_UPDATE=e.TYPE_LITERAL=e.TYPE_VALUE=void 0,e.TYPE_VALUE=1,e.TYPE_LITERAL=4,e.TYPE_ARRAY_ELEMENT_UPDATE=8,e.TYPE_ARRAY_ELEMENT_ADD=16,e.TYPE_ARRAY_ELEMENT_DELETE=32,e.TYPE_ARRAY_EXPECTS_ELEMENT=24,e.TYPE_ARRAY=56;var r=function(){function t(){this.changes=[]}return t.prototype.addChange=function(t,r,n){void 0===n&&(n=e.TYPE_VALUE),this.changes.push({field:t,type:n,value:r})},t.prototype.updateElementFromList=function(t,r,n,o){this.changes.push({field:t,type:o|e.TYPE_ARRAY_ELEMENT_UPDATE,condition:r,value:n})},t.prototype.addElementInList=function(t,r,n){this.changes.push({field:t,type:n|e.TYPE_ARRAY_ELEMENT_ADD,value:r})},t.prototype.deleteElementFromList=function(t,r){this.changes.push({field:t,type:e.TYPE_ARRAY_ELEMENT_DELETE,condition:r})},t.prototype.getChanges=function(){return this.changes},t.create=function(){return new t},t.prototype.toArray=function(){return JSON.parse(JSON.stringify(this.changes))},t.createFromArray=function(e){e=JSON.parse(JSON.stringify(e));var r=t.create();return r.changes=e,r},t}();e.Changes=r},9367:(t,e,r)=>{"use strict";e.__esModule=!0,e.Coordinate=void 0;var n=r(1062),o=function(){function t(t,e){this.lat=t,this.lon=e}return t.prototype.getLatitude=function(){return this.lat},t.prototype.getLongitude=function(){return this.lon},t.prototype.toArray=function(){return{lat:this.lat,lon:this.lon}},t.createFromArray=function(e){if(void 0===e.lat||void 0===e.lon)throw n.InvalidFormatError.coordinateFormatNotValid();return new t(e.lat,e.lon)},t}();e.Coordinate=o},6285:(t,e,r)=>{"use strict";e.__esModule=!0,e.Index=void 0;var n=r(1062),o=r(2734),i=r(781),s=function(){function t(t,e,r,n,o){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===o&&(o="0kb"),this.uuid=t,this.appUUID=e,this.isOK=r,this.docCount=n,this.size=o}return t.prototype.getUUID=function(){return this.uuid},t.prototype.getAppUUID=function(){return this.appUUID},t.prototype.isOk=function(){return this.isOK},t.prototype.getDocCount=function(){return this.docCount},t.prototype.getSize=function(){return this.size},t.prototype.toArray=function(){return{uuid:this.uuid.toArray(),app_id:this.appUUID.toArray(),is_ok:this.isOK,doc_count:this.docCount,size:this.size}},t.createFromArray=function(e){if(void 0===e.uuid||void 0===e.app_id)throw n.InvalidFormatError.indexFormatNotValid();return new t(o.IndexUUID.createFromArray(e.uuid),i.AppUUID.createFromArray(e.app_id),void 0!==e.is_ok&&e.is_ok,void 0===e.doc_count?0:e.doc_count,void 0===e.size?"0kb":e.size)},t}();e.Index=s},2734:(t,e,r)=>{"use strict";e.__esModule=!0,e.IndexUUID=void 0;var n=r(1062),o=function(){function t(t){if(t.indexOf("_")>=0)throw n.InvalidFormatError.indexUUIDFormatNotValid();this.id=t}return t.createById=function(e){return new t(e)},t.prototype.getId=function(){return this.id},t.prototype.toArray=function(){return{id:this.id}},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).id)},t.prototype.composedUUID=function(){return this.id},t}();e.IndexUUID=o},9934:(t,e,r)=>{"use strict";e.__esModule=!0,e.Item=void 0;var n=r(5215),o=r(1062),i=r(9367),s=r(5301),a=r(781),u=r(2734),l=function(){function t(t,e,r,n,o,i,s){this.metadata={},this.indexedMetadata={},this.searchableMetadata={},this.exactMatchingMetadata=[],this.suggest=[],this.highlights={},this.promoted=!1,this.uuid=t,this.coordinate=e,this.metadata=r,this.indexedMetadata=n,this.searchableMetadata=o,this.exactMatchingMetadata=i,this.suggest=s}return t.create=function(e,r,n,o,i,s){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i=[]),void 0===s&&(s=[]),new t(e,null,r,n,o,i,s)},t.createLocated=function(e,r,n,o,i,s,a){return void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i={}),void 0===s&&(s=[]),void 0===a&&(a=[]),new t(e,r,n,o,i,s,a)},t.prototype.getUUID=function(){return this.uuid},t.prototype.getId=function(){return this.uuid.getId()},t.prototype.getType=function(){return this.uuid.getType()},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.getDistance=function(){return this.distance},t.prototype.getMetadata=function(){return this.metadata},t.prototype.setMetadata=function(t){this.metadata=t},t.prototype.addMetadata=function(t,e){this.metadata[t]=e},t.prototype.getIndexedMetadata=function(){return this.indexedMetadata},t.prototype.setIndexedMetadata=function(t){this.indexedMetadata=t},t.prototype.addIndexedMetadata=function(t,e){this.indexedMetadata[t]=e},t.prototype.getSearchableMetadata=function(){return this.searchableMetadata},t.prototype.setSearchableMetadata=function(t){this.searchableMetadata=t},t.prototype.addSearchableMetadata=function(t,e){this.searchableMetadata[t]=e},t.prototype.getExactMatchingMetadata=function(){return this.exactMatchingMetadata},t.prototype.setExactMatchingMetadata=function(t){this.exactMatchingMetadata=t},t.prototype.addExactMatchingMetadata=function(t){this.exactMatchingMetadata.push(t)},t.prototype.getAllMetadata=function(){return n.__assign(n.__assign({},this.metadata),this.indexedMetadata)},t.prototype.get=function(t){var e=this.getAllMetadata();return void 0!==e[t]?e[t]:null},t.prototype.getSuggest=function(){return this.suggest},t.prototype.getHighlights=function(){return this.highlights},t.prototype.getHighlight=function(t){return void 0!==this.highlights[t]?this.highlights[t]:null},t.prototype.isPromoted=function(){return this.promoted},t.prototype.setScore=function(t){return this.score=t,this},t.prototype.getScore=function(){return this.score},t.prototype.getAppUUID=function(){return this.appUUID},t.prototype.getIndexUUID=function(){return this.indexUUID},t.prototype.toArray=function(){var t={uuid:this.uuid.toArray()};return this.coordinate instanceof i.Coordinate&&(t.coordinate=this.coordinate.toArray()),Object.keys(this.metadata).length>0&&(t.metadata=this.metadata),Object.keys(this.indexedMetadata).length>0&&(t.indexed_metadata=this.indexedMetadata),Object.keys(this.searchableMetadata).length>0&&(t.searchable_metadata=this.searchableMetadata),this.exactMatchingMetadata.length>0&&(t.exact_matching_metadata=this.exactMatchingMetadata),this.suggest.length>0&&(t.suggest=this.suggest),Object.keys(this.highlights).length>0&&(t.highlights=this.highlights),this.isPromoted()&&(t.is_promoted=!0),void 0!==this.distance&&(t.distance=this.distance),void 0!==this.score&&(t.score=this.score),void 0!==this.appUUID&&(t.app_uuid=this.appUUID.toArray()),void 0!==this.indexUUID&&(t.index_uuid=this.indexUUID.toArray()),t},t.createFromArray=function(e){if("object"!=typeof(e=JSON.parse(JSON.stringify(e))).uuid)throw o.InvalidFormatError.itemUUIDRepresentationNotValid();if(void 0!==e.coordinate&&"object"!=typeof e.coordinate)throw o.InvalidFormatError.coordinateFormatNotValid();var r="object"==typeof e.coordinate&&null!=e.coordinate?t.createLocated(s.ItemUUID.createFromArray(e.uuid),i.Coordinate.createFromArray(e.coordinate),void 0===e.metadata?{}:e.metadata,void 0===e.indexed_metadata?{}:e.indexed_metadata,void 0===e.searchable_metadata?{}:e.searchable_metadata,void 0===e.exact_matching_metadata?[]:e.exact_matching_metadata,void 0===e.suggest?[]:e.suggest):t.create(s.ItemUUID.createFromArray(e.uuid),void 0===e.metadata?{}:e.metadata,void 0===e.indexed_metadata?{}:e.indexed_metadata,void 0===e.searchable_metadata?{}:e.searchable_metadata,void 0===e.exact_matching_metadata?[]:e.exact_matching_metadata,void 0===e.suggest?[]:e.suggest);return void 0!==e.distance&&null!=e.distance&&(r.distance=e.distance),"object"==typeof e.highlights&&null!=e.highlights&&(r.highlights=e.highlights),void 0!==e.is_promoted&&null!=e.is_promoted&&(r.promoted=e.is_promoted),void 0!==e.score&&null!=e.score&&(r.score=e.score),void 0!==e.app_uuid&&null!=e.app_uuid&&(r.appUUID=a.AppUUID.createFromArray(e.app_uuid)),void 0!==e.index_uuid&&null!=e.index_uuid&&(r.indexUUID=u.IndexUUID.createFromArray(e.index_uuid)),r},t.prototype.composeUUID=function(){return this.uuid.composedUUID()},t.getPathByField=function(t){return["id","type"].indexOf(t)>-1?"uuid."+t:"indexed_metadata."+t},t}();e.Item=l},5301:(t,e,r)=>{"use strict";e.__esModule=!0,e.ItemUUID=void 0;var n=r(1062),o=function(){function t(t,e){this.id=t,this.type=e}return t.createByComposedUUID=function(e){var r=e.split("~");if(2!=r.length)throw n.InvalidFormatError.composedItemUUIDNotValid();return new t(r[0],r[1])},t.prototype.getId=function(){return this.id},t.prototype.getType=function(){return this.type},t.prototype.toArray=function(){return{id:this.id,type:this.type}},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).id,e.type)},t.prototype.composedUUID=function(){return this.id+"~"+this.type},t}();e.ItemUUID=o},1984:(t,e)=>{"use strict";e.__esModule=!0,e.Metadata=void 0;var r=function(){function t(){}return t.toMetadata=function(t){t=JSON.parse(JSON.stringify(t));var e=[];for(var r in t)e.push(r+"##"+t[r]);return e.join("~~")},t.fromMetadata=function(t){var e={},r=t.split("~~"),n=0,o=0,i=null;for(var s in r){var a=r[s],u=a.split("##");u.length>1?(i=u[1],e[u[0]]=i):(i=a,e[n++]=i),o++}return 1==o&&(e={id:i,name:i}),void 0===e.id?null:e},t}();e.Metadata=r},2850:(t,e,r)=>{"use strict";e.__esModule=!0,e.User=void 0;var n=r(1062),o=function(){function t(t,e){void 0===e&&(e={}),this.id=t,this.attributes=e}return t.prototype.getId=function(){return this.id},t.prototype.getAttributes=function(){return this.attributes},t.prototype.toArray=function(){var t={id:this.id};return Object.keys(this.attributes).length>0&&(t.attributes=this.attributes),t},t.createFromArray=function(e){if(null==e||void 0===e.id||null==e.id)throw n.InvalidFormatError.userFormatNotValid();var r=typeof e.attributes==typeof{}?e.attributes:{};return new t(e.id,r)},t}();e.User=o},4402:(t,e,r)=>{"use strict";e.__esModule=!0,e.Aggregation=e.AGGREGATION_NO_LIMIT=e.AGGREGATION_SORT_BY_NAME_DESC=e.AGGREGATION_SORT_BY_NAME_ASC=e.AGGREGATION_SORT_BY_COUNT_DESC=e.AGGREGATION_SORT_BY_COUNT_ASC=void 0;var n=r(1248);e.AGGREGATION_SORT_BY_COUNT_ASC=["_count","asc"],e.AGGREGATION_SORT_BY_COUNT_DESC=["_count","desc"],e.AGGREGATION_SORT_BY_NAME_ASC=["_term","asc"],e.AGGREGATION_SORT_BY_NAME_DESC=["_term","desc"],e.AGGREGATION_NO_LIMIT=0;var o=function(){function t(t,e,r,n,o,i,s,a){this.subgroup=[],this.name=t,this.field=e,this.applicationType=r,this.filterType=n,this.subgroup=o,this.sort=i,this.limit=s,this.promoted=a}return t.prototype.getName=function(){return this.name},t.prototype.getField=function(){return this.field},t.prototype.getApplicationType=function(){return this.applicationType},t.prototype.getFilterType=function(){return this.filterType},t.prototype.getSubgroup=function(){return this.subgroup},t.prototype.getSort=function(){return this.sort},t.prototype.getLimit=function(){return this.limit},t.prototype.getPromoted=function(){return this.promoted},t.create=function(r,n,o,i,s,a,u,l){return void 0===s&&(s=[]),void 0===a&&(a=e.AGGREGATION_SORT_BY_COUNT_DESC),void 0===u&&(u=e.AGGREGATION_NO_LIMIT),void 0===l&&(l=[]),new t(r,n,o,i,s,a,u,l)},t.prototype.toArray=function(){var t={name:this.name};return"uuid.type"!==this.field&&(t.field=this.field),this.applicationType!==n.FILTER_AT_LEAST_ONE&&(t.application_type=this.applicationType),this.filterType!==n.FILTER_TYPE_FIELD&&(t.filter_type=this.filterType),this.subgroup.length>0&&(t.subgroup=this.subgroup),JSON.stringify(this.sort)!==JSON.stringify(e.AGGREGATION_SORT_BY_COUNT_DESC)&&(t.sort=this.sort),this.limit!==e.AGGREGATION_NO_LIMIT&&(t.limit=this.limit),this.promoted.length>0&&(t.promoted=this.promoted),t},t.createFromArray=function(r){return void 0===(r=JSON.parse(JSON.stringify(r))).field&&(r.field="uuid.type"),void 0===r.application_type&&(r.application_type=n.FILTER_AT_LEAST_ONE),void 0===r.filter_type&&(r.filter_type=n.FILTER_TYPE_FIELD),void 0===r.subgroup&&(r.subgroup=[]),void 0===r.sort&&(r.sort=e.AGGREGATION_SORT_BY_COUNT_DESC),void 0===r.limit&&(r.limit=e.AGGREGATION_NO_LIMIT),void 0===r.promoted&&(r.promoted=[]),t.create(r.name,r.field,r.application_type,r.filter_type,r.subgroup,r.sort,r.limit,r.promoted)},t}();e.Aggregation=o},1248:(t,e)=>{"use strict";e.__esModule=!0,e.Filter=e.FILTER_TYPE_QUERY=e.FILTER_TYPE_GEO=e.FILTER_TYPE_DATE_RANGE=e.FILTER_TYPE_RANGE=e.FILTER_TYPE_FIELD=e.FILTER_PROMOTE=e.FILTER_EXCLUDE=e.FILTER_AT_LEAST_ONE=e.FILTER_MUST_ALL_WITH_LEVELS=e.FILTER_MUST_ALL=void 0,e.FILTER_MUST_ALL=4,e.FILTER_MUST_ALL_WITH_LEVELS=5,e.FILTER_AT_LEAST_ONE=8,e.FILTER_EXCLUDE=16,e.FILTER_PROMOTE=32,e.FILTER_TYPE_FIELD="field",e.FILTER_TYPE_RANGE="range",e.FILTER_TYPE_DATE_RANGE="date_range",e.FILTER_TYPE_GEO="geo",e.FILTER_TYPE_QUERY="query";var r=function(){function t(t,e,r,n,o){this.field=t,this.values=e,this.applicationType=r,this.filterType=n,this.filterTerms=o}return t.prototype.getField=function(){return this.field},t.prototype.getValues=function(){return this.values},t.prototype.hasValue=function(t){return void 0===this.values[t]},t.prototype.getApplicationType=function(){return this.applicationType},t.prototype.getFilterType=function(){return this.filterType},t.prototype.getFilterTerms=function(){return this.filterTerms},t.create=function(e,r,n,o,i){return void 0===i&&(i=[]),new t(e,r,n,o,i)},t.prototype.toArray=function(){var t={};return"uuid.type"!=this.field&&(t.field=this.field),(this.values.length>0||Object.keys(this.values).length>0)&&(t.values=this.values),this.applicationType!=e.FILTER_AT_LEAST_ONE&&(t.application_type=this.applicationType),this.filterType!=e.FILTER_TYPE_FIELD&&(t.filter_type=this.filterType),this.filterTerms.length>0&&(t.filter_terms=this.filterTerms),t},t.createFromArray=function(r){return void 0===(r=JSON.parse(JSON.stringify(r))).field&&(r.field="uuid.type"),void 0===r.values&&(r.values=[]),void 0===r.application_type&&(r.application_type=e.FILTER_AT_LEAST_ONE),void 0===r.filter_type&&(r.filter_type=e.FILTER_TYPE_FIELD),void 0===r.filter_terms&&(r.filter_terms=[]),t.create(r.field,r.values,r.application_type,r.filter_type,r.filter_terms)},t}();e.Filter=r},4148:(t,e,r)=>{"use strict";e.__esModule=!0,e.Query=e.NO_MIN_SCORE=e.QUERY_DEFAULT_SIZE=e.QUERY_DEFAULT_PAGE=void 0;var n=r(5215),o=r(9367),i=r(5301),s=r(9934),a=r(2850),u=r(4402),l=r(1248),c=r(1248),p=r(4402),f=r(1062),d=r(1248),h=r(9643),_=r(8699),y=r(2734);e.QUERY_DEFAULT_PAGE=1,e.QUERY_DEFAULT_SIZE=10,e.NO_MIN_SCORE=0;var g=function(){function t(t){this.UUID=null,this.fields=[],this.universeFilters={},this.filters={},this.itemsPromoted=[],this.aggregations={},this.resultsEnabled=!0,this.aggregationsEnabled=!0,this.numberOfSuggestions=0,this.highlightsEnabled=!1,this.autocompleteEnabled=!1,this.searchableFields=[],this.fuzziness=null,this.minScore=e.NO_MIN_SCORE,this.metadata={},this.subqueries={},this.queryOperator=null,this.sortByInstance=_.SortBy.create(),this.filters._query=l.Filter.create("",[t],0,d.FILTER_TYPE_QUERY)}return t.createLocated=function(r,n,o,i){void 0===o&&(o=e.QUERY_DEFAULT_PAGE),void 0===i&&(i=e.QUERY_DEFAULT_SIZE);var s=t.create(n,o,i);return s.coordinate=r,s},t.create=function(r,n,o){void 0===n&&(n=e.QUERY_DEFAULT_PAGE),void 0===o&&(o=e.QUERY_DEFAULT_SIZE),n=Math.max(1,n);var i=new t(r);return i.from=(n-1)*o,i.size=o,i.page=n,i},t.createMatchAll=function(){return t.create("",e.QUERY_DEFAULT_PAGE,e.QUERY_DEFAULT_SIZE)},t.createByUUID=function(e){return t.createByUUIDs(e)},t.createByUUIDs=function(){for(var r=[],n=0;n0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((e={}).type=l.Filter.create(r,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),e)):delete this.universeFilters.type,this},t.prototype.filterByTypes=function(t,e,r){var o,i;void 0===e&&(e=!0),void 0===r&&(r=p.AGGREGATION_SORT_BY_COUNT_DESC);var a=s.Item.getPathByField("type");return t.length>0?this.filters=n.__assign(n.__assign({},this.filters),((o={}).type=l.Filter.create(a,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),o)):delete this.filters.type,e&&(this.aggregations=n.__assign(n.__assign({},this.aggregations),((i={}).type=u.Aggregation.create("type",a,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD,[],r),i))),this},t.prototype.filterUniverseByIds=function(t){var e,r=s.Item.getPathByField("id");return t.length>0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((e={}).id=l.Filter.create(r,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),e)):delete this.universeFilters.id,this},t.prototype.filterByIds=function(t){var e,r=s.Item.getPathByField("id");return t.length>0?this.filters=n.__assign(n.__assign({},this.filters),((e={}).id=l.Filter.create(r,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),e)):delete this.filters.id,this},t.prototype.filterUniverseBy=function(t,e,r){var o;void 0===r&&(r=c.FILTER_AT_LEAST_ONE);var i=s.Item.getPathByField(t);return e.length>0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((o={})[t]=l.Filter.create(i,e,r,c.FILTER_TYPE_FIELD),o)):delete this.universeFilters[t],this},t.prototype.filterBy=function(t,e,r,o,i,a){var u;void 0===o&&(o=c.FILTER_AT_LEAST_ONE),void 0===i&&(i=!0),void 0===a&&(a=p.AGGREGATION_SORT_BY_COUNT_DESC);var f=s.Item.getPathByField(e);return r.length>0?this.filters=n.__assign(n.__assign({},this.filters),((u={})[t]=l.Filter.create(f,r,o,c.FILTER_TYPE_FIELD),u)):delete this.filters[t],i&&this.aggregateBy(t,e,o,a),this},t.prototype.filterUniverseByRange=function(t,e,r,o){var i;void 0===r&&(r=c.FILTER_AT_LEAST_ONE),void 0===o&&(o=c.FILTER_TYPE_RANGE);var a=s.Item.getPathByField(t);return e.length>0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((i={})[t]=l.Filter.create(a,e,r,o),i)):delete this.universeFilters[t],this},t.prototype.filterUniverseByDateRange=function(t,e,r){return void 0===r&&(r=c.FILTER_AT_LEAST_ONE),this.filterUniverseByRange(t,e,r,c.FILTER_TYPE_DATE_RANGE)},t.prototype.filterByRange=function(t,e,r,o,i,a,u,f){var d;void 0===i&&(i=c.FILTER_AT_LEAST_ONE),void 0===a&&(a=c.FILTER_TYPE_RANGE),void 0===u&&(u=!0),void 0===f&&(f=p.AGGREGATION_SORT_BY_COUNT_DESC);var h=s.Item.getPathByField(e);return 0!==o.length?this.filters=n.__assign(n.__assign({},this.filters),((d={})[t]=l.Filter.create(h,o,i,a),d)):delete this.filters[t],u&&this.aggregateByRange(t,h,r,i,a,f),this},t.prototype.filterByDateRange=function(t,e,r,n,o,i,s){return void 0===o&&(o=c.FILTER_AT_LEAST_ONE),void 0===i&&(i=!0),void 0===s&&(s=p.AGGREGATION_SORT_BY_COUNT_DESC),this.filterByRange(t,e,r,n,o,c.FILTER_TYPE_DATE_RANGE,i,s)},t.prototype.filterUniverseByLocation=function(t){var e;return this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((e={}).coordinate=l.Filter.create("coordinate",t.toArray(),c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_GEO),e)),this},t.prototype.setSearchableFields=function(t){return this.searchableFields=t,this},t.prototype.getSearchableFields=function(){return this.searchableFields},t.prototype.sortBy=function(t){if(t.isSortedByGeoDistance()){if(!(this.coordinate instanceof o.Coordinate))throw f.InvalidFormatError.querySortedByDistanceWithoutCoordinate();t.setCoordinate(this.coordinate)}return this.sortByInstance=t,this},t.prototype.aggregateBy=function(t,e,r,o,i,a){var l;return void 0===o&&(o=p.AGGREGATION_SORT_BY_COUNT_DESC),void 0===i&&(i=p.AGGREGATION_NO_LIMIT),void 0===a&&(a=[]),this.aggregations=n.__assign(n.__assign({},this.aggregations),((l={})[t]=u.Aggregation.create(t,s.Item.getPathByField(e),r,c.FILTER_TYPE_FIELD,[],o,i,a),l)),this},t.prototype.aggregateByRange=function(t,e,r,o,i,a,l,f){var d;return void 0===i&&(i=c.FILTER_TYPE_RANGE),void 0===a&&(a=p.AGGREGATION_SORT_BY_COUNT_DESC),void 0===l&&(l=p.AGGREGATION_NO_LIMIT),void 0===f&&(f=[]),0===r.length||(this.aggregations=n.__assign(n.__assign({},this.aggregations),((d={})[t]=u.Aggregation.create(t,s.Item.getPathByField(e),o,i,r,a,l,f),d))),this},t.prototype.aggregateByDateRange=function(t,e,r,n,o,i,s){return void 0===o&&(o=p.AGGREGATION_SORT_BY_COUNT_DESC),void 0===i&&(i=p.AGGREGATION_NO_LIMIT),void 0===s&&(s=[]),this.aggregateByRange(t,e,r,n,c.FILTER_TYPE_DATE_RANGE,o,i,s)},t.prototype.getAggregations=function(){return this.aggregations},t.prototype.getAggregation=function(t){return this.aggregations[t]instanceof u.Aggregation?this.aggregations[t]:null},t.prototype.getQueryText=function(){var t=this.filters._query;return t instanceof l.Filter?t.getValues()[0]:""},t.prototype.getUniverseFilters=function(){return this.universeFilters},t.prototype.getUniverseFilter=function(t){return this.universeFilters[t]instanceof l.Filter?this.universeFilters[t]:null},t.prototype.getFilters=function(){return this.filters},t.prototype.getFilter=function(t){return this.filters[t]instanceof l.Filter?this.filters[t]:null},t.prototype.getFilterByField=function(t){var e=s.Item.getPathByField(t);for(var r in this.filters)if(this.filters[r].getField()==e)return this.filters[r];return null},t.prototype.getSortBy=function(){return this.sortByInstance},t.prototype.getFrom=function(){return this.from},t.prototype.getSize=function(){return this.size},t.prototype.getPage=function(){return this.page},t.prototype.enableResults=function(){return this.resultsEnabled=!0,this},t.prototype.disableResults=function(){return this.resultsEnabled=!1,this},t.prototype.areResultsEnabled=function(){return this.resultsEnabled},t.prototype.enableAggregations=function(){return this.aggregationsEnabled=!0,this},t.prototype.disableAggregations=function(){return this.aggregationsEnabled=!1,this},t.prototype.areAggregationsEnabled=function(){return this.aggregationsEnabled},t.prototype.setNumberOfSuggestions=function(t){return this.numberOfSuggestions=t,this},t.prototype.disableSuggestions=function(){return this.numberOfSuggestions=0,this},t.prototype.getNumberOfSuggestions=function(){return this.numberOfSuggestions},t.prototype.enableAutocomplete=function(){return this.autocompleteEnabled=!0,this},t.prototype.disableAutocomplete=function(){return this.autocompleteEnabled=!1,this},t.prototype.areAutocompleteEnabled=function(){return this.autocompleteEnabled},t.prototype.enableHighlights=function(){return this.highlightsEnabled=!0,this},t.prototype.disableHighlights=function(){return this.highlightsEnabled=!1,this},t.prototype.areHighlightsEnabled=function(){return this.highlightsEnabled},t.prototype.promoteUUID=function(t){return this.itemsPromoted.push(t),this},t.prototype.promoteUUIDs=function(){for(var t=[],e=0;e0&&(t.fields=this.fields),Object.keys(this.universeFilters).length)for(var r in t.universe_filters={},this.universeFilters){var n=this.universeFilters[r];t.universe_filters[r]=n.toArray()}if(this.filters instanceof Object&&Object.keys(this.filters).length){var i={};for(var r in this.filters){var s=this.filters[r];s.getFilterType()!==d.FILTER_TYPE_QUERY&&(i[r]=s.toArray())}Object.keys(i).length>0&&(t.filters=i)}if(this.aggregations instanceof Object&&Object.keys(this.aggregations).length)for(var r in t.aggregations={},this.aggregations){var u=this.aggregations[r];t.aggregations[r]=u.toArray()}var l=this.sortByInstance.toArray();Object.keys(l).length&&(t.sort=l);var c=this.page;c!==e.QUERY_DEFAULT_PAGE&&(t.page=c);var p=this.size;if(p!==e.QUERY_DEFAULT_SIZE&&(t.size=p),!1===this.resultsEnabled&&(t.results_enabled=!1),!0===this.autocompleteEnabled&&(t.autocomplete_enabled=!0),0!==this.numberOfSuggestions&&(t.number_of_suggestions=this.numberOfSuggestions),!0===this.highlightsEnabled&&(t.highlight_enabled=!0),!1===this.aggregationsEnabled&&(t.aggregations_enabled=!1),this.searchableFields instanceof Array&&this.searchableFields.length>0&&(t.searchable_fields=this.searchableFields),this.scoreStrategies instanceof h.ScoreStrategies){var f=this.scoreStrategies.toArray();Object.keys(f).length>0&&(t.score_strategies=f)}null!==this.fuzziness&&(t.fuzziness=this.fuzziness);var _=this.minScore;if(_!==e.NO_MIN_SCORE&&(t.min_score=_),this.user instanceof a.User&&(t.user=this.user.toArray()),Object.keys(this.metadata).length>0&&(t.metadata=this.metadata),this.subqueries instanceof Object&&Object.keys(this.subqueries).length)for(var r in t.subqueries={},this.subqueries){var g=this.subqueries[r];t.subqueries[r]=g.toArray()}if(this.indexUUID instanceof y.IndexUUID&&(t.index_uuid=this.indexUUID.toArray()),this.itemsPromoted.length>0)for(var r in t.items_promoted=[],this.itemsPromoted)t.items_promoted.push(this.itemsPromoted[r].toArray());return"or"!==this.queryOperator&&null!==this.queryOperator&&(t.query_operator=this.queryOperator),t},t.createFromArray=function(r){var n=r.coordinate instanceof Object?t.createLocated(o.Coordinate.createFromArray(r.coordinate),r.q?r.q:"",r.page?r.page:e.QUERY_DEFAULT_PAGE,r.size?r.size:e.QUERY_DEFAULT_SIZE):t.create(r.q?r.q:"",r.page?r.page:e.QUERY_DEFAULT_PAGE,r.size?r.size:e.QUERY_DEFAULT_SIZE);n.UUID="string"==typeof r.UUID?r.UUID:void 0,n.fields=r.fields instanceof Array?r.fields:[];var s=typeof r.aggregations==typeof{}?r.aggregations:{};for(var c in s)n.aggregations[c]=u.Aggregation.createFromArray(s[c]);var p=typeof r.sort==typeof{}?r.sort:{};Object.keys(p).length>0&&(n.sortByInstance=_.SortBy.createFromArray(p));var f=typeof r.filters==typeof{}?r.filters:{};for(var c in f)n.filters[c]=l.Filter.createFromArray(f[c]);var d=typeof r.universe_filters==typeof{}?r.universe_filters:{};for(var c in d)n.universeFilters[c]=l.Filter.createFromArray(d[c]);n.resultsEnabled="boolean"!=typeof r.results_enabled||r.results_enabled,n.numberOfSuggestions="number"==typeof r.number_of_suggestions?r.number_of_suggestions:0,n.autocompleteEnabled="boolean"==typeof r.autocomplete_enabled&&r.autocomplete_enabled,n.aggregationsEnabled="boolean"!=typeof r.aggregations_enabled||r.aggregations_enabled,n.highlightsEnabled="boolean"==typeof r.highlight_enabled&&r.highlight_enabled,n.fuzziness=r.fuzziness?r.fuzziness:null,n.minScore=r.min_score?r.min_score:e.NO_MIN_SCORE;var g=typeof r.items_promoted==typeof{}?r.items_promoted:{};for(var c in g)n.itemsPromoted.push(i.ItemUUID.createFromArray(g[c]));var m=typeof r.subqueries==typeof{}?r.subqueries:{};for(var c in m)n.subqueries[c]=t.createFromArray(m[c]);return n.metadata=typeof r.metadata==typeof{}?r.metadata:{},n.searchableFields=r.searchable_fields instanceof Array?r.searchable_fields:[],n.scoreStrategies=r.score_strategies instanceof Object?h.ScoreStrategies.createFromArray(r.score_strategies):void 0,n.user=r.user instanceof Object?a.User.createFromArray(r.user):void 0,n.indexUUID=r.index_uuid instanceof Object?y.IndexUUID.createFromArray(r.index_uuid):void 0,n.queryOperator="string"==typeof r.query_operator?r.query_operator:"or",n},t}();e.Query=g},2641:(t,e)=>{"use strict";e.__esModule=!0,e.Range=e.RANGE_SEPARATOR=e.RANGE_INFINITE=e.RANGE_MINUS_INFINITE=void 0,e.RANGE_MINUS_INFINITE=null,e.RANGE_INFINITE=null,e.RANGE_SEPARATOR="..";var r=function(){function t(){}return t.stringToArray=function(t){var r=t.split(e.RANGE_SEPARATOR),n=r[0],o=r[1],i=e.RANGE_MINUS_INFINITE,s=e.RANGE_INFINITE;return""!=n&&(i=parseInt(n)),""!=o&&(s=parseInt(o)),[i,s]},t.arrayToString=function(t){var r=["",""];return t[0]!=e.RANGE_MINUS_INFINITE&&(r[0]=String(t[0])),t[1]!=e.RANGE_INFINITE&&(r[1]=String(t[1])),r.join(e.RANGE_SEPARATOR)},t.createRanges=function(t,r,n){for(var o,i=[];t{"use strict";e.__esModule=!0,e.ScoreStrategies=e.MIN=e.MAX=e.AVG=e.SUM=e.MULTIPLY=void 0;var n=r(5911);e.MULTIPLY="multiply",e.SUM="sum",e.AVG="avg",e.MAX="max",e.MIN="min";var o=function(){function t(){this.scoreStrategies=[]}return t.createEmpty=function(r){void 0===r&&(r=e.SUM);var n=new t;return n.scoreMode=r,n},t.prototype.addScoreStrategy=function(t){return this.scoreStrategies.push(t),this},t.prototype.getScoreStrategies=function(){return this.scoreStrategies},t.prototype.getScoreMode=function(){return this.scoreMode},t.prototype.toArray=function(){var t=[];for(var e in this.scoreStrategies)t.push(this.scoreStrategies[e].toArray());return{score_mode:this.scoreMode,score_strategies:t}},t.createFromArray=function(e){var r=void 0!==(e=JSON.parse(JSON.stringify(e))).score_mode?t.createEmpty(e.score_mode):t.createEmpty();for(var o in r.scoreStrategies=[],e.score_strategies)r.scoreStrategies.push(n.ScoreStrategy.createFromArray(e.score_strategies[o]));return r},t}();e.ScoreStrategies=o},5911:(t,e,r)=>{"use strict";e.__esModule=!0,e.ScoreStrategy=e.DEFAULT_FACTOR=e.DEFAULT_MISSING=e.SCORE_MODE_MIN=e.SCORE_MODE_MAX=e.SCORE_MODE_AVG=e.SCORE_MODE_SUM=e.SCORE_MODE_NONE=e.MODIFIER_SQUARE=e.MODIFIER_LN=e.MODIFIER_LOG=e.MODIFIER_SQRT=e.MODIFIER_NONE=e.DECAY_GAUSS=e.DECAY_EXP=e.DECAY_LINEAR=e.DECAY=e.CUSTOM_FUNCTION=e.BOOSTING_FIELD_VALUE=e.DEFAULT_WEIGHT=e.DEFAULT_TYPE=void 0;var n=r(9934),o=r(1248);e.DEFAULT_TYPE="default",e.DEFAULT_WEIGHT=1,e.BOOSTING_FIELD_VALUE="field_value",e.CUSTOM_FUNCTION="custom_function",e.DECAY="decay",e.DECAY_LINEAR="linear",e.DECAY_EXP="exp",e.DECAY_GAUSS="gauss",e.MODIFIER_NONE="none",e.MODIFIER_SQRT="sqrt",e.MODIFIER_LOG="log",e.MODIFIER_LN="ln",e.MODIFIER_SQUARE="square",e.SCORE_MODE_NONE="none",e.SCORE_MODE_SUM="sum",e.SCORE_MODE_AVG="avg",e.SCORE_MODE_MAX="max",e.SCORE_MODE_MIN="min",e.DEFAULT_MISSING=1,e.DEFAULT_FACTOR=1;var i=function(){function t(){this.type=e.DEFAULT_TYPE,this.filter=null,this.weight=e.DEFAULT_WEIGHT,this.scoreMode=e.SCORE_MODE_AVG,this.configuration={}}return t.prototype.getType=function(){return this.type},t.prototype.getConfigurationValue=function(t){return void 0===this.configuration[t]?null:this.configuration[t]},t.prototype.getWeight=function(){return this.weight},t.prototype.getScoreMode=function(){return this.scoreMode},t.prototype.getFilter=function(){return this.filter},t.createDefault=function(){return new t},t.createFieldBoosting=function(r,n,o,i,s,a,u){void 0===n&&(n=e.DEFAULT_FACTOR),void 0===o&&(o=e.DEFAULT_MISSING),void 0===i&&(i=e.MODIFIER_NONE),void 0===s&&(s=e.DEFAULT_WEIGHT),void 0===a&&(a=null),void 0===u&&(u=e.SCORE_MODE_AVG);var l=t.createDefault();return l.type=e.BOOSTING_FIELD_VALUE,l.configuration.field=r,l.configuration.factor=n,l.configuration.missing=o,l.configuration.modifier=i,l.weight=s,l.filter=t.fixFilterFieldPath(a),l.scoreMode=u,l},t.createCustomFunction=function(r,n,o,i){void 0===n&&(n=e.DEFAULT_WEIGHT),void 0===o&&(o=null),void 0===i&&(i=e.SCORE_MODE_AVG);var s=t.createDefault();return s.type=e.CUSTOM_FUNCTION,s.configuration.function=r,s.weight=n,s.filter=t.fixFilterFieldPath(o),s.scoreMode=i,s},t.createDecayFunction=function(r,n,o,i,s,a,u,l,c){void 0===u&&(u=e.DEFAULT_WEIGHT),void 0===l&&(l=null),void 0===c&&(c=e.SCORE_MODE_AVG);var p=t.createDefault();return p.type=e.DECAY,p.configuration.type=r,p.configuration.field=n,p.configuration.origin=o,p.configuration.scale=i,p.configuration.offset=s,p.configuration.decay=a,p.weight=u,p.filter=t.fixFilterFieldPath(l),p.scoreMode=c,p},t.fixFilterFieldPath=function(t){if(null==t)return t;var e=t.toArray();return e.field=n.Item.getPathByField(e.field),o.Filter.createFromArray(e)},t.prototype.toArray=function(){return{type:this.type,configuration:this.configuration,weight:this.weight,score_mode:this.scoreMode,filter:this.filter instanceof o.Filter?this.filter.toArray():null}},t.createFromArray=function(e){e=JSON.parse(JSON.stringify(e));var r=t.createDefault();return void 0!==e.type&&(r.type=e.type),void 0!==e.configuration&&(r.configuration=e.configuration),void 0!==e.weight&&(r.weight=e.weight),void 0!==e.score_mode&&(r.scoreMode=e.score_mode),"object"==typeof e.filter&&null!==e.filter&&(r.filter=o.Filter.createFromArray(e.filter)),r},t}();e.ScoreStrategy=i},8699:(t,e,r)=>{"use strict";e.__esModule=!0,e.SortBy=e.SORT_BY_LOCATION_MI_ASC=e.SORT_BY_LOCATION_KM_ASC=e.SORT_BY_TYPE_DESC=e.SORT_BY_TYPE_ASC=e.SORT_BY_ID_DESC=e.SORT_BY_ID_ASC=e.SORT_BY_AL_TUN_TUN=e.SORT_BY_RANDOM=e.SORT_BY_SCORE=e.SORT_BY_MODE_MEDIAN=e.SORT_BY_MODE_MAX=e.SORT_BY_MODE_MIN=e.SORT_BY_MODE_SUM=e.SORT_BY_MODE_AVG=e.SORT_BY_DESC=e.SORT_BY_ASC=e.SORT_BY_TYPE_RANDOM=e.SORT_BY_TYPE_FUNCTION=e.SORT_BY_TYPE_DISTANCE=e.SORT_BY_TYPE_SCORE=e.SORT_BY_TYPE_NESTED=e.SORT_BY_TYPE_FIELD=void 0;var n=r(5059),o=r(1248);e.SORT_BY_TYPE_FIELD="field",e.SORT_BY_TYPE_NESTED="nested",e.SORT_BY_TYPE_SCORE="score",e.SORT_BY_TYPE_DISTANCE="distance",e.SORT_BY_TYPE_FUNCTION="function",e.SORT_BY_TYPE_RANDOM="random",e.SORT_BY_ASC="asc",e.SORT_BY_DESC="desc",e.SORT_BY_MODE_AVG="avg",e.SORT_BY_MODE_SUM="sum",e.SORT_BY_MODE_MIN="min",e.SORT_BY_MODE_MAX="max",e.SORT_BY_MODE_MEDIAN="median",e.SORT_BY_SCORE={type:e.SORT_BY_TYPE_SCORE},e.SORT_BY_RANDOM={type:e.SORT_BY_TYPE_RANDOM},e.SORT_BY_AL_TUN_TUN=e.SORT_BY_RANDOM,e.SORT_BY_ID_ASC={field:"uuid.id",order:e.SORT_BY_ASC},e.SORT_BY_ID_DESC={field:"uuid.id",order:e.SORT_BY_DESC},e.SORT_BY_TYPE_ASC={field:"uuid.type",order:e.SORT_BY_ASC},e.SORT_BY_TYPE_DESC={field:"uuid.type",order:e.SORT_BY_DESC},e.SORT_BY_LOCATION_KM_ASC={type:e.SORT_BY_TYPE_DISTANCE,unit:"km"},e.SORT_BY_LOCATION_MI_ASC={type:e.SORT_BY_TYPE_DISTANCE,unit:"mi"};var i=function(){function t(){this.sortsBy=[]}return t.create=function(){return new t},t.byFieldsValues=function(e){var r=t.create();for(var n in e)r.byFieldValue(n,e[n]);return r},t.prototype.all=function(){return this.sortsBy.length>0?this.sortsBy:[e.SORT_BY_SCORE]},t.prototype.byValue=function(t){return e.SORT_BY_SCORE!=t&&e.SORT_BY_RANDOM!=t&&void 0===t.type&&(t.type=e.SORT_BY_TYPE_FIELD),e.SORT_BY_SCORE!=t&&this.sortsBy.push(t),this},t.prototype.byFieldValue=function(t,r){return this.sortsBy.push({type:e.SORT_BY_TYPE_FIELD,field:n.Item.getPathByField(t),order:r}),this},t.prototype.byNestedField=function(t,r,n){return void 0===n&&(n=e.SORT_BY_MODE_AVG),this.sortsBy.push({type:e.SORT_BY_TYPE_NESTED,mode:n,field:"indexed_metadata."+t,order:r}),this},t.prototype.byNestedFieldAndFilter=function(t,r,i,s){void 0===s&&(s=e.SORT_BY_MODE_AVG);var a=n.Item.getPathByField(i.getField()),u=i.toArray();return u.field=a,i=o.Filter.createFromArray(u),this.sortsBy.push({type:e.SORT_BY_TYPE_NESTED,mode:s,filter:i,field:"indexed_metadata."+t,order:r}),this},t.prototype.byFunction=function(t,r){return this.sortsBy.push({type:e.SORT_BY_TYPE_FUNCTION,function:t,order:r}),this},t.prototype.isSortedByGeoDistance=function(){for(var t in this.sortsBy)if(this.sortsBy[t].type===e.SORT_BY_TYPE_DISTANCE)return!0;return!1},t.prototype.setCoordinate=function(t){for(var r in this.sortsBy)this.sortsBy[r].type===e.SORT_BY_TYPE_DISTANCE&&(this.sortsBy[r].coordinate=t);return this},t.prototype.hasRandomSort=function(){for(var t in this.sortsBy)if(this.sortsBy[t].type===e.SORT_BY_TYPE_RANDOM)return!0;return!1},t.prototype.getFirstSortAsString=function(){if(void 0===this.sortsBy[0])return"score";var t=this.sortsBy[0];if(t.type===e.SORT_BY_TYPE_RANDOM)return"random";if(t.type===e.SORT_BY_TYPE_DISTANCE)return t.type+":"+t.unit;if(t.type===e.SORT_BY_TYPE_SCORE)return"score";var r=t.field,n=t.order;return r.split(".")[1]+":"+n},t.prototype.toArray=function(){var t=this.copy().sortsBy;for(var e in t)typeof t[e].filter==typeof{}&&null!=t[e].filter&&(t[e].filter=t[e].filter.toArray()),null!==t[e].coordinate&&t[e].coordinate instanceof n.Coordinate&&(t[e].coordinate=t[e].coordinate.toArray());return t},t.createFromArray=function(r){var i=JSON.parse(JSON.stringify(r)),s=t.create();for(var a in i){var u=i[a];void 0===u.type&&(u.type=e.SORT_BY_TYPE_FIELD),typeof u.filter==typeof{}&&null!=u.filter&&(u.filter=o.Filter.createFromArray(u.filter)),null!=u.coordinate&&typeof u.coordinate==typeof{}&&(u.coordinate=n.Coordinate.createFromArray(u.coordinate)),s.sortsBy.push(u)}return s},t.prototype.copy=function(){var e=t.create();for(var r in this.sortsBy){var i=this.sortsBy[r];if("function"!=typeof i){var s=JSON.parse(JSON.stringify(i));typeof i.filter==typeof{}&&null!=i.filter&&(s.filter=o.Filter.createFromArray(i.filter.toArray())),null!=i.coordinate&&typeof i.coordinate==typeof{}&&(s.coordinate=n.Coordinate.createFromArray(i.coordinate.toArray())),e.sortsBy.push(s)}}return e},t}();e.SortBy=i},1802:(t,e,r)=>{"use strict";e.__esModule=!0,e.HttpRepository=void 0;var n=r(5215),o=r(8864),i=r(1062),s=r(748),a=r(580),u=r(1912),l=r(6080),c=r(8609),p=r(6285),f=r(9934),d=r(5301),h=r(5584),_=function(t){function e(e,r,n,o,i){var s=t.call(this,r,n,o)||this;return s.httpClient=e,s.transformer=i,s}return n.__extends(e,t),e.prototype.getTransformer=function(){return this.transformer},e.prototype.addObject=function(t){var e=this.transformer.toItem(t);e instanceof f.Item&&this.addItem(e)},e.prototype.deleteObject=function(t){var e=this.transformer.toItemUUID(t);e instanceof d.ItemUUID&&this.deleteItem(e)},e.prototype.flushUpdateItems=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:if(0===t.length)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/items","put",this.getCredentials(),{},t.map((function(t){return t.toArray()})))];case 2:return n.sent(),[3,4];case 3:throw r=n.sent(),e.createErrorFromResponse(r);case 4:return[2]}}))}))},e.prototype.flushDeleteItems=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:if(0===t.length)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/items","delete",this.getCredentials(),{},t.map((function(t){return t.toArray()})))];case 2:return n.sent(),[3,4];case 3:throw r=n.sent(),e.createErrorFromResponse(r);case 4:return[2]}}))}))},e.prototype.query=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId,"get",this.getCredentials(),{query:JSON.stringify(t.toArray()).replace(/&/g,"%26")},{})];case 1:return r=n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return i=h.Result.createFromArray(r.getBody()),[2,this.applyTransformersToResult(i)]}}))}))},e.prototype.getSimilarItems=function(t,r,o){return n.__awaiter(this,void 0,void 0,(function(){var i,s,a;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/similar-items","get",this.getCredentials(),{},{query:t.toArray(),items_uuid:r.map((function(t){return t.toArray()})),similarity:o})];case 1:return i=n.sent(),[3,3];case 2:throw s=n.sent(),e.createErrorFromResponse(s);case 3:return a=h.Result.createFromArray(i.getBody()),[2,this.applyTransformersToResult(a)]}}))}))},e.prototype.getRecommendedItems=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/recommended-items","get",this.getCredentials(),{},t.toArray())];case 1:return r=n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return i=h.Result.createFromArray(r.getBody()),[2,this.applyTransformersToResult(i)]}}))}))},e.prototype.updateItems=function(t,r){return n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/items/update-by-query","put",this.getCredentials(),{},{changes:r.toArray(),query:t.toArray()})];case 1:return n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return[2]}}))}))},e.prototype.createIndex=function(t,r){return n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID(),"put",this.getCredentials(),{},r.toArray())];case 1:return n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return[2]}}))}))},e.prototype.deleteIndex=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID(),"delete",this.getCredentials(),{},{})];case 1:return n.sent(),[3,3];case 2:throw r=n.sent(),e.createErrorFromResponse(r);case 3:return[2]}}))}))},e.prototype.resetIndex=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID()+"/reset","put",this.getCredentials(),{},{})];case 1:return n.sent(),[3,3];case 2:throw r=n.sent(),e.createErrorFromResponse(r);case 3:return[2]}}))}))},e.prototype.checkIndex=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r,o;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID(),"head",this.getCredentials(),{},{})];case 1:return r=n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return[2,200===r.getCode()]}}))}))},e.prototype.getIndices=function(){return n.__awaiter(this,void 0,void 0,(function(){var t,r,o,i,s,a;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/","get",this.getCredentials(),{},{})];case 1:return t=n.sent(),[3,3];case 2:throw r=n.sent(),e.createErrorFromResponse(r);case 3:for(o=[],i=0,s=t.getBody();i0?(Object.keys(e).map(function(t){e[t]=this.applyTransformersToResult(e[t])}.bind(this)),h.Result.createMultiresults(e)):h.Result.create(t.getQueryUUID(),t.getTotalItems(),t.getTotalHits(),t.getAggregations(),t.getSuggestions(),this.transformer.fromItems(t.getItems()),t.getAutocomplete())},e.createErrorFromResponse=function(t){var e;if(t instanceof c.Response)switch(t.getCode()){case u.ResourceNotAvailableError.getTransportableHTTPError():e=new u.ResourceNotAvailableError(t.getBody().message);break;case s.InvalidTokenError.getTransportableHTTPError():e=new s.InvalidTokenError(t.getBody().message);break;case i.InvalidFormatError.getTransportableHTTPError():e=new i.InvalidFormatError(t.getBody().message);break;case a.ResourceExistsError.getTransportableHTTPError():e=new a.ResourceExistsError(t.getBody().message);break;case o.ConnectionError.getTransportableHTTPError():e=new o.ConnectionError(t.getBody().message)}return void 0===e?l.UnknownError.createUnknownError():e},e}(r(7226).Repository);e.HttpRepository=_},7226:(t,e,r)=>{"use strict";e.__esModule=!0,e.Repository=void 0;var n=r(5215),o=function(){function t(t,e,r){this.itemsToUpdate=[],this.itemsToDelete=[],this.appId=t,this.indexId=e,this.token=r}return t.prototype.resetCachedElements=function(){this.itemsToUpdate=[],this.itemsToDelete=[]},t.prototype.addItem=function(t){this.itemsToUpdate.push(t)},t.prototype.addItems=function(t){for(var e in t)this.addItem(t[e])},t.prototype.deleteItem=function(t){this.itemsToDelete.push(t)},t.prototype.deleteItems=function(t){for(var e in t)this.deleteItem(t[e])},t.prototype.flush=function(e,r){return n.__awaiter(this,void 0,void 0,(function(){var o,i,s=this;return n.__generator(this,(function(n){return e||(e=500),r||(r=!1),r&&this.itemsToUpdate.length{"use strict";e.__esModule=!0,e.Counter=void 0;var n=r(1984),o=function(){function t(t,e,r){this.values=t,this.used=e,this.n=r}return t.prototype.getId=function(){return"string"==typeof this.values.id?this.values.id:null},t.prototype.getName=function(){return"string"==typeof this.values.name?this.values.name:null},t.prototype.getSlug=function(){return"string"==typeof this.values.slug?this.values.slug:null},t.prototype.getLevel=function(){return"number"==typeof this.values.level?this.values.level:0},t.prototype.getValues=function(){return this.values},t.prototype.isUsed=function(){return this.used},t.prototype.getN=function(){return this.n},t.createByActiveElements=function(e,r,o){var i=n.Metadata.fromMetadata(e);if(null==i)return null;for(var s=o.length,a=!1;s--;)o[s]==i.id&&(a=!0);return new t(i,a,r)},t.prototype.toArray=function(){var t={values:this.values,n:this.n};return!0===this.used&&(t.used=!0),t},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).values,"boolean"==typeof e.used&&e.used,e.n)},t}();e.Counter=o},5584:(t,e,r)=>{"use strict";e.__esModule=!0,e.Result=void 0;var n=r(9934),o=r(2299),i=function(){function t(t,e,r){this.items=[],this.autocomplete=null,this.suggestions=[],this.subresults={},this.metadata={},this.queryUUID=t,this.totalItems=e,this.totalHits=r}return t.create=function(e,r,n,o,i,s,a,u){void 0===a&&(a=null),void 0===u&&(u={});var l=new t(e,r,n);return l.aggregations=o,l.suggestions=i,l.items=s,l.autocomplete=a,l.metadata=u,l},t.createMultiresults=function(e){var r=new t("",0,0);return r.subresults=e,r},t.prototype.addItem=function(t){this.items.push(t)},t.prototype.getItems=function(){return this.items},t.prototype.getItemsGroupedByTypes=function(){if(this.itemsGroupedByTypeCache instanceof Object&&Object.keys(this.itemsGroupedByTypeCache).length>0)return this.itemsGroupedByTypeCache;var t={};for(var e in this.items){var r=this.items[e];t[r.getType()]instanceof Array||(t[r.getType()]=[]),t[r.getType()].push(r)}return this.itemsGroupedByTypeCache=t,t},t.prototype.getItemsByType=function(t){var e=this.getItemsGroupedByTypes();return null==e[t]?[]:e[t]},t.prototype.getItemsByTypes=function(t){return this.items.filter((function(e){return t.indexOf(e.getType())>=0}))},t.prototype.getFirstItem=function(){return this.items.length>0?this.items[0]:null},t.prototype.setAggregations=function(t){this.aggregations=t},t.prototype.getAggregations=function(){return this.aggregations instanceof o.ResultAggregations?this.aggregations:null},t.prototype.getAggregation=function(t){return null==this.aggregations?null:this.aggregations.getAggregation(t)},t.prototype.hasNotEmptyAggregation=function(t){return null!=this.aggregations&&this.aggregations.hasNotEmptyAggregation(t)},t.prototype.getSuggestions=function(){return this.suggestions},t.prototype.getAutocomplete=function(){return this.autocomplete},t.prototype.getQueryUUID=function(){return this.queryUUID},t.prototype.getTotalItems=function(){return this.totalItems},t.prototype.getTotalHits=function(){return this.totalHits},t.prototype.getSubresults=function(){return this.subresults},t.prototype.getMetadata=function(){return this.metadata},t.prototype.getMetadataValue=function(t){var e;return null!==(e=this.metadata[t])&&void 0!==e?e:null},t.prototype.toArray=function(){var t={query_uuid:this.queryUUID,total_items:this.totalItems,total_hits:this.totalHits,items:this.items.map((function(t){return t.toArray()})),aggregations:null==this.aggregations?null:this.aggregations.toArray(),suggests:this.suggestions,autocomplete:null===this.autocomplete?void 0:this.autocomplete,metadata:this.metadata};if(this.subresults instanceof Object&&Object.keys(this.subresults).length)for(var e in t.subresults={},this.subresults){var r=this.subresults[e];t.subresults[e]=r.toArray()}return t},t.createFromArray=function(e){var r=t.create(e.query_uuid?e.query_uuid:"",e.total_items?e.total_items:0,e.total_hits?e.total_hits:0,e.aggregations instanceof Object?o.ResultAggregations.createFromArray(e.aggregations):null,e.suggests?e.suggests:[],e.items instanceof Array?e.items.map((function(t){return n.Item.createFromArray(t)})):[],void 0===e.autocomplete?null:e.autocomplete,void 0===e.metadata?{}:e.metadata),i=typeof e.subresults==typeof{}?e.subresults:{};for(var s in i)r.subresults[s]=t.createFromArray(i[s]);return r},t}();e.Result=i},9476:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResultAggregation=void 0;var n=r(5215),o=r(1248),i=r(8901),s=function(){function t(t,e,r,n,o){for(var i in void 0===o&&(o={}),this.counters={},this.highestActiveElement=0,this.name=t,this.applicationType=e,this.totalElements=r,this.activeElements={},this.metadata=o,n){var s=n[i];this.activeElements[s]=s}}return t.prototype.addCounter=function(t,e){if(0!=e){var r=i.Counter.createByActiveElements(t,e,Object.keys(this.activeElements));if(r instanceof i.Counter)return this.applicationType&o.FILTER_MUST_ALL_WITH_LEVELS&&this.applicationType&~o.FILTER_MUST_ALL&&r.isUsed()?(this.activeElements[r.getId()]=r,void(this.highestActiveElement=Math.max(r.getLevel(),this.highestActiveElement))):void(this.counters[r.getId()]=r)}},t.prototype.getName=function(){return this.name},t.prototype.getCounters=function(){return this.counters},t.prototype.getMetadata=function(){return this.metadata},t.prototype.isFilter=function(){return(this.applicationType&o.FILTER_MUST_ALL)>0},t.prototype.hasLevels=function(){return(this.applicationType&o.FILTER_MUST_ALL_WITH_LEVELS)>0},t.prototype.getCounter=function(t){return this.counters[t]instanceof i.Counter?this.counters[t]:null},t.prototype.getAllElements=function(){return n.__assign(n.__assign({},this.activeElements),this.counters)},t.prototype.getTotalElements=function(){return this.totalElements},t.prototype.getActiveElements=function(){if(0===Object.keys(this.activeElements).length)return{};if(this.applicationType===o.FILTER_MUST_ALL_WITH_LEVELS){var t=null;for(var e in this.activeElements){var r=this.activeElements[e];r instanceof i.Counter&&(null==t&&(t=r),t=t.getLevel()>r.getLevel()?t:r)}return t instanceof i.Counter?{0:t}:null}return this.activeElements},t.prototype.cleanCountersByLevel=function(){for(var t in this.counters)this.counters[t].getLevel()!==this.highestActiveElement+1&&delete this.counters[t]},t.prototype.isEmpty=function(){return 0==Object.keys(this.activeElements).length&&0==Object.keys(this.counters).length},t.prototype.toArray=function(){var t={name:this.name,counters:[],active_elements:[],metadata:this.metadata};for(var e in this.counters)t.counters.push(this.counters[e].toArray());for(var e in this.applicationType!==o.FILTER_AT_LEAST_ONE&&(t.application_type=this.applicationType),this.totalElements>0&&(t.total_elements=this.totalElements),this.activeElements){var r=this.activeElements[e];t.active_elements.push(r instanceof i.Counter?r.toArray():r)}return this.highestActiveElement>0&&(t.highest_active_level=this.highestActiveElement),0===t.counters.length&&delete t.counters,0===t.active_elements.length&&delete t.active_elements,0===Object.keys(t.metadata).length&&delete t.metadata,t},t.createFromArray=function(e){var r=[],n=e.active_elements;for(var s in n=typeof n==typeof[]?n:[]){var a=n[s];r.push(typeof a==typeof{}?i.Counter.createFromArray(a):a)}var u=new t(e.name,parseInt(e.application_type?e.application_type:o.FILTER_AT_LEAST_ONE),parseInt(e.total_elements?e.total_elements:0),[]);u.activeElements=r;var l=typeof e.counters==typeof[]?e.counters:[];for(var s in l){var c=l[s];if("function"!=typeof c){var p=i.Counter.createFromArray(c);u.counters["_"+p.getId()]=p}}return u.highestActiveElement="number"==typeof e.highest_active_level?e.highest_active_level:0,u.metadata=typeof e.metadata==typeof{}?e.metadata:{},u},t}();e.ResultAggregation=s},2299:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResultAggregations=void 0;var n=r(9476),o=function(){function t(t){this.aggregations={},this.totalElements=t}return t.prototype.addAggregation=function(t,e){this.aggregations[t]=e},t.prototype.getAggregations=function(){return this.aggregations},t.prototype.getAggregation=function(t){return this.aggregations[t]instanceof n.ResultAggregation?this.aggregations[t]:null},t.prototype.hasNotEmptyAggregation=function(t){var e=this.getAggregation(t);return e instanceof n.ResultAggregation&&!e.isEmpty()},t.prototype.getTotalElements=function(){return this.totalElements},t.prototype.toArray=function(){var t={};for(var e in this.aggregations)t[e]=this.aggregations[e].toArray();var r={};return this.totalElements>0&&(r.total_elements=this.totalElements),Object.keys(t).length>0&&(r.aggregations=t),r},t.createFromArray=function(e){var r=new t("number"==typeof e.total_elements?e.total_elements:0);if(typeof e.aggregations==typeof{})for(var o in e.aggregations)r.addAggregation(o,n.ResultAggregation.createFromArray(e.aggregations[o]));return r},t}();e.ResultAggregations=o},6256:(t,e)=>{"use strict";e.__esModule=!0},76:(t,e,r)=>{"use strict";e.__esModule=!0,e.Transformer=void 0;var n=r(9934),o=r(5301),i=function(){function t(){this.readTransformers=[],this.writeTransformers=[]}return t.prototype.addReadTransformer=function(t){this.readTransformers.push(t)},t.prototype.hasReadTransformers=function(){return this.readTransformers.length>0},t.prototype.addWriteTransformer=function(t){this.writeTransformers.push(t)},t.prototype.fromItems=function(t){var e=[];for(var r in t)e.push(this.fromItem(t[r]));return e},t.prototype.fromItem=function(t){for(var e in this.readTransformers){var r=this.readTransformers[e];if(r.isValidItem(t))return r.fromItem(t)}return t},t.prototype.toItems=function(t){var e=[];for(var r in t){var o=this.toItem(t[r]);o instanceof n.Item&&e.push(o)}return e},t.prototype.toItem=function(t){for(var e in this.writeTransformers){var r=this.writeTransformers[e];if(r.isValidObject(t))return r.toItem(t)}return t},t.prototype.toItemUUIDs=function(t){var e=[];for(var r in t){var n=this.toItemUUID(t[r]);n instanceof o.ItemUUID&&e.push(n)}return e},t.prototype.toItemUUID=function(t){for(var e in this.writeTransformers){var r=this.writeTransformers[e];if(r.isValidObject(t))return r.toItemUUID(t)}return t},t}();e.Transformer=i},6889:(t,e)=>{"use strict";e.__esModule=!0},5059:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(5215),o=r(9347);e.default=o.default,n.__exportStar(r(6282),e),n.__exportStar(r(5787),e),n.__exportStar(r(8864),e),n.__exportStar(r(109),e),n.__exportStar(r(7214),e),n.__exportStar(r(5265),e),n.__exportStar(r(1062),e),n.__exportStar(r(748),e),n.__exportStar(r(580),e),n.__exportStar(r(1912),e),n.__exportStar(r(5272),e),n.__exportStar(r(5093),e),n.__exportStar(r(5245),e),n.__exportStar(r(6113),e),n.__exportStar(r(2113),e),n.__exportStar(r(8609),e),n.__exportStar(r(6929),e),n.__exportStar(r(7112),e),n.__exportStar(r(9367),e),n.__exportStar(r(9934),e),n.__exportStar(r(5301),e),n.__exportStar(r(1984),e),n.__exportStar(r(2850),e),n.__exportStar(r(4402),e),n.__exportStar(r(1248),e),n.__exportStar(r(4148),e),n.__exportStar(r(2641),e),n.__exportStar(r(9643),e),n.__exportStar(r(5911),e),n.__exportStar(r(8699),e),n.__exportStar(r(1802),e),n.__exportStar(r(7226),e),n.__exportStar(r(9476),e),n.__exportStar(r(2299),e),n.__exportStar(r(8901),e),n.__exportStar(r(5584),e),n.__exportStar(r(6256),e),n.__exportStar(r(76),e),n.__exportStar(r(6889),e)},7007:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(t,e){return new Promise((function(r,n){function o(r){t.removeListener(e,i),n(r)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),r([].slice.call(arguments))}_(t,e,i,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&_(t,"error",e,{once:!0})}(t,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var o,i,s,l;if(a(r),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),s=i[e]),void 0===s)s=i[e]=r,++t._eventsCount;else if("function"==typeof s?s=i[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(t))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=c.bind(n);return o.listener=r,n.wrapFn=o,o}function f(t,e,r){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var l=u.length,c=h(u,l);for(r=0;r=0;i--)if(r[i]===e||r[i].listener===e){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},i.prototype.listeners=function(t){return f(this,t,!0)},i.prototype.rawListeners=function(t){return f(this,t,!1)},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7965:function(t){t.exports=function(){"use strict";var t=Object.prototype.toString,e=Array.isArray||function(e){return"[object Array]"===t.call(e)};function r(t){return"function"==typeof t}function n(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(t,e){return null!=t&&"object"==typeof t&&e in t}var i=RegExp.prototype.test;var s=/\S/;function a(t){return!function(t,e){return i.call(t,e)}(s,t)}var u={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var l=/\s*/,c=/\s+/,p=/\s*=/,f=/\s*\}/,d=/#|\^|\/|>|\{|&|=|!/;function h(t){this.string=t,this.tail=t,this.pos=0}function _(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function y(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var r=e[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},h.prototype.scanUntil=function(t){var e,r=this.tail.search(t);switch(r){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,r),this.tail=this.tail.substring(r)}return this.pos+=e.length,e},_.prototype.push=function(t){return new _(t,this)},_.prototype.lookup=function(t){var e,n,i,s=this.cache;if(s.hasOwnProperty(t))e=s[t];else{for(var a,u,l,c=this,p=!1;c;){if(t.indexOf(".")>0)for(a=c.view,u=t.split("."),l=0;null!=a&&l0?o[o.length-1][4]:r;break;default:n.push(e)}return r}(function(t){for(var e,r,n=[],o=0,i=t.length;o"===s?a=this.renderPartial(i,e,r,o):"&"===s?a=this.unescapedValue(i,e):"name"===s?a=this.escapedValue(i,e,o):"text"===s&&(a=this.rawValue(i)),void 0!==a&&(u+=a);return u},y.prototype.renderSection=function(t,n,o,i,s){var a=this,u="",l=n.lookup(t[1]);if(l){if(e(l))for(var c=0,p=l.length;c0||!r)&&(o[i]=n+o[i]);return o.join("\n")},y.prototype.renderPartial=function(t,e,n,o){if(n){var i=this.getConfigTags(o),s=r(n)?n(t[1]):n[t[1]];if(null!=s){var a=t[6],u=t[5],l=t[4],c=s;0==u&&l&&(c=this.indentPartial(s,l,a));var p=this.parse(c,i);return this.renderTokens(p,e,n,c,o)}}},y.prototype.unescapedValue=function(t,e){var r=e.lookup(t[1]);if(null!=r)return r},y.prototype.escapedValue=function(t,e,r){var n=this.getConfigEscape(r)||g.escape,o=e.lookup(t[1]);if(null!=o)return"number"==typeof o&&n===g.escape?String(o):n(o)},y.prototype.rawValue=function(t){return t[1]},y.prototype.getConfigTags=function(t){return e(t)?t:t&&"object"==typeof t?t.tags:void 0},y.prototype.getConfigEscape=function(t){return t&&"object"==typeof t&&!e(t)?t.escape:void 0};var g={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){m.templateCache=t},get templateCache(){return m.templateCache}},m=new y;return g.clearCache=function(){return m.clearCache()},g.parse=function(t,e){return m.parse(t,e)},g.render=function(t,r,n,o){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+((e(i=t)?"array":typeof i)+'" was given as the first argument for mustache#render(template, view, partials)'));var i;return m.render(t,r,n,o)},g.escape=function(t){return String(t).replace(/[&<>"'`=\/]/g,(function(t){return u[t]}))},g.Scanner=h,g.Context=_,g.Writer=y,g}()},5299:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Children:()=>k,Component:()=>s.Component,Fragment:()=>s.Fragment,PureComponent:()=>U,StrictMode:()=>vt,Suspense:()=>q,SuspenseList:()=>V,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>pt,cloneElement:()=>_t,createContext:()=>s.createContext,createElement:()=>s.createElement,createFactory:()=>dt,createPortal:()=>$,createRef:()=>s.createRef,default:()=>Et,findDOMNode:()=>gt,forwardRef:()=>M,hydrate:()=>et,isValidElement:()=>ht,lazy:()=>G,memo:()=>x,render:()=>tt,unmountComponentAtNode:()=>yt,unstable_batchedUpdates:()=>mt,useCallback:()=>b,useContext:()=>A,useDebugValue:()=>S,useEffect:()=>y,useErrorBoundary:()=>T,useImperativeHandle:()=>v,useLayoutEffect:()=>g,useMemo:()=>E,useReducer:()=>_,useRef:()=>m,useState:()=>h,version:()=>ft});var n,o,i,s=r(172),a=0,u=[],l=s.options.__r,c=s.options.diffed,p=s.options.__c,f=s.options.unmount;function d(t,e){s.options.__h&&s.options.__h(o,t,a||e),a=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function h(t){return a=1,_(F,t)}function _(t,e,r){var i=d(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):F(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function y(t,e){var r=d(n++,3);!s.options.__s&&C(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function g(t,e){var r=d(n++,4);!s.options.__s&&C(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t){return a=5,E((function(){return{current:t}}),[])}function v(t,e,r){a=6,g((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))}function E(t,e){var r=d(n++,7);return C(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function b(t,e){return a=8,E((function(){return t}),e)}function A(t){var e=o.context[t.__c],r=d(n++,9);return r.__c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__}function S(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t)}function T(t){var e=d(n++,10),r=h();return e.__=t,o.componentDidCatch||(o.componentDidCatch=function(t){e.__&&e.__(t),r[1](t)}),[r[0],function(){r[1](void 0)}]}function O(){u.some((function(t){if(t.__P)try{t.__H.__h.forEach(w),t.__H.__h.forEach(R),t.__H.__h=[]}catch(e){return t.__H.__h=[],s.options.__e(e,t.__v),!0}})),u=[]}s.options.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(w),e.__h.forEach(R),e.__h=[])},s.options.diffed=function(t){c&&c(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&i===s.options.requestAnimationFrame||((i=s.options.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),I&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);I&&(e=requestAnimationFrame(r))})(O))},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(w),t.__h=t.__h.filter((function(t){return!t.__||R(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.options.__e(r,t.__v)}})),p&&p(t,e)},s.options.unmount=function(t){f&&f(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(w)}catch(t){s.options.__e(t,e.__v)}};var I="function"==typeof requestAnimationFrame;function w(t){"function"==typeof t.u&&t.u()}function R(t){t.u=t.__()}function C(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function F(t,e){return"function"==typeof e?e(t):e}function N(t,e){for(var r in e)t[r]=e[r];return t}function P(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function U(t){this.props=t}function x(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:P(this.props,t)}function n(e){return this.shouldComponentUpdate=r,(0,s.createElement)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(U.prototype=new s.Component).isPureReactComponent=!0,U.prototype.shouldComponentUpdate=function(t,e){return P(this.props,t)||P(this.state,e)};var D=s.options.__b;s.options.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),D&&D(t)};var L="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function M(t){function e(e,r){var n=N({},e);return delete n.ref,t(n,(r=e.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return e.$$typeof=L,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var j=function(t,e){return null==t?null:(0,s.toChildArray)((0,s.toChildArray)(t).map(e))},k={map:j,forEach:j,count:function(t){return t?(0,s.toChildArray)(t).length:0},only:function(t){var e=(0,s.toChildArray)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:s.toChildArray},B=s.options.__e;function Y(t){return t&&((t=N({},t)).__c=null,t.__k=t.__k&&t.__k.map(Y)),t}function H(t){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(H)),t}function q(){this.__u=0,this.t=null,this.__b=null}function Q(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function G(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return(0,s.createElement)(r,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null}s.options.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e.__c);B(t,e,r)},(q.prototype=new s.Component).__c=function(t,e){var r=this;null==r.t&&(r.t=[]),r.t.push(e);var n=Q(r.__v),o=!1,i=function(){o||(o=!0,e.componentWillUnmount=e.__c,n?n(s):s())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var s=function(){var t;if(! --r.__u)for(r.__v.__k[0]=H(r.state.__e),r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()},a=r.__v;a&&!0===a.__h||r.__u++||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(i,i)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(t,e){this.__b&&(this.__v.__k&&(this.__v.__k[0]=Y(this.__b)),this.__b=null);var r=e.__e&&(0,s.createElement)(s.Fragment,null,t.fallback);return r&&(r.__h=null),[(0,s.createElement)(s.Fragment,null,e.__e?null:t.children),r]};var W=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]{"use strict";r.r(e),r.d(e,{Component:()=>v,Fragment:()=>m,__u:()=>L,cloneElement:()=>B,createContext:()=>Y,createElement:()=>_,createRef:()=>g,h:()=>_,hydrate:()=>k,isValidElement:()=>o,options:()=>n,render:()=>j,toChildArray:()=>O});var n,o,i,s,a,u,l,c={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,r){var n,o,i,s=arguments,a={};for(i in e)"key"==i?n=e[i]:"ref"==i?o=e[i]:a[i]=e[i];if(arguments.length>3)for(r=[r],i=3;i1&&N(o,e,r),e=I(r,o,o,t.__k,null,o.__e,e),"function"==typeof t.type&&(t.__d=e)))}function P(t,e,r,o,i,s,a,u,l){var c,p,f,h,_,y,g,E,b,A,S,O=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(l=r.__h,u=e.__e=r.__e,e.__h=null,s=[u]),(c=n.__b)&&c(e);try{t:if("function"==typeof O){if(E=e.props,b=(c=O.contextType)&&o[c.__c],A=c?b?b.props.value:c.__:o,r.__c?g=(p=e.__c=r.__c).__=p.__E:("prototype"in O&&O.prototype.render?e.__c=p=new O(E,A):(e.__c=p=new v(E,A),p.constructor=O,p.render=M),b&&b.sub(p),p.props=E,p.state||(p.state={}),p.context=A,p.__n=o,f=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=O.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=d({},p.__s)),d(p.__s,O.getDerivedStateFromProps(E,p.__s))),h=p.props,_=p.state,f)null==O.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==O.getDerivedStateFromProps&&E!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(E,A),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(E,p.__s,A)||e.__v===r.__v){p.props=E,p.state=p.__s,e.__v!==r.__v&&(p.__d=!1),p.__v=e,e.__e=r.__e,e.__k=r.__k,p.__h.length&&a.push(p),N(e,u,t);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(E,p.__s,A),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(h,_,y)}))}p.context=A,p.props=E,p.state=p.__s,(c=n.__r)&&c(e),p.__d=!1,p.__v=e,p.__P=t,c=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(o=d(d({},o),p.getChildContext())),f||null==p.getSnapshotBeforeUpdate||(y=p.getSnapshotBeforeUpdate(h,_)),S=null!=c&&c.type==m&&null==c.key?c.props.children:c,T(t,Array.isArray(S)?S:[S],e,r,o,i,s,a,u,l),p.base=e.__e,e.__h=null,p.__h.length&&a.push(p),g&&(p.__E=p.__=null),p.__e=!1}else null==s&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=x(r.__e,e,r,o,i,s,a,l);(c=n.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=s)&&(e.__e=u,e.__h=!!l,s[s.indexOf(u)]=null),n.__e(t,e,r)}return e.__e}function U(t,e){n.__c&&n.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){n.__e(t,e.__v)}}))}function x(t,e,r,n,o,i,s,a){var u,l,f,d,h,_=r.props,y=e.props;if(o="svg"===e.type||o,null!=i)for(u=0;u3)for(r=[r],i=3;i{"use strict";e.__esModule=!0;var n=r(2634),o=r(5059),i=function(){function t(){}return t.prototype.sortBy=function(t,e){(0,n.applySortByToQuery)(t,e)},t.prototype.boostByWeightAndFilter=function(t,e,r,n){var i,s=null!==(i=t.getScoreStrategies())&&void 0!==i?i:o.ScoreStrategies.createEmpty(o.MULTIPLY);s.addScoreStrategy(o.ScoreStrategy.createFromArray({type:"weight",weight:n,filter:{field:e,values:[r],application_type:o.FILTER_MUST_ALL,filter_type:o.FILTER_TYPE_FIELD},match_main_query:!0})),t.setScoreStrategies(s)},t}();e.default=i},6798:function(t,e,r){"use strict";var n=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o{"use strict";e.__esModule=!0;var n=r(6798),o=function(){function t(){}return t.fromConfig=function(e){var r=new t;return r.config=e,r},t.prototype.createUI=function(t){return void 0===t&&(t=null),n.default.create(this.config,t)},t}();e.default=o},5978:(t,e,r)=>{"use strict";e.__esModule=!0,e.bootstrap=void 0;var n=r(5279),o=r(5059),i=r(6798),s=r(803),a=r(9673),u=r(9913);e.bootstrap=function(t,e,r){var l=JSON.stringify(e),c="".concat(u.APISEARCH_REPOSITORY,"__").concat(l),p="".concat(u.APISEARCH_STORE,"__").concat(t),f="".concat(u.APISEARCH_DISPATCHER,"__").concat(t),d="".concat(u.APISEARCH_CONFIG,"__").concat(t),h="".concat(u.APISEARCH_UI,"__").concat(t);s.default.register(c,(function(){return o.default.createRepository(e)})),s.default.register(p,(function(){var t,n,o,i,s,u;return new a.default(e.coordinate,e.options.min_score,r,null!==(t=e.user_id)&&void 0!==t?t:"",null!==(n=e.options.site)&&void 0!==n?n:"",null!==(o=e.options.language)&&void 0!==o?o:"",null!==(i=e.options.device)&&void 0!==i?i:"",null!==(s=e.options.generate_random_session_uuid)&&void 0!==s&&s,null!==(u=e.options.initial_state)&&void 0!==u?u:{})})),s.default.register(f,(function(){return new n.Dispatcher})),s.default.register(d,(function(){return e})),s.default.register(h,(function(){return new i.default(t,s.default.get(c),s.default.get(p))}))}},9913:(t,e)=>{"use strict";e.__esModule=!0,e.APISEARCH_CONFIG=e.APISEARCH_UI=e.APISEARCH_DISPATCHER=e.APISEARCH_STORE=e.APISEARCH_REPOSITORY=void 0,e.APISEARCH_REPOSITORY="apisearch_repository",e.APISEARCH_STORE="apisearch_store",e.APISEARCH_DISPATCHER="apisearch_dispatcher",e.APISEARCH_UI="apisearch_ui",e.APISEARCH_CONFIG="apisearch_config"},803:(t,e)=>{"use strict";e.__esModule=!0;var r=function(){function t(){this.services={}}return t.prototype.get=function(t){if(this.services[t])return this.services[t];throw new Error("Service with id (".concat(t,") is not registered."))},t.prototype.register=function(t,e){this.services[t]=e()},t}();e.default=new r},5279:(t,e)=>{"use strict";e.__esModule=!0,e.Dispatcher=void 0;var r=function(){function t(){this.events={}}return t.prototype.registerListener=function(t,e){void 0===this.events[t]&&(this.events[t]={listeners:[]}),this.events[t].listeners.push(e)},t.prototype.dispatch=function(t,e){this.events[t].listeners.forEach((function(t){t(e)}))},t}();e.Dispatcher=r},5193:(t,e)=>{"use strict";e.__esModule=!0,e.createEnvironmentId=void 0,e.createEnvironmentId=function(){return"env_".concat(Math.ceil(9999998*Math.random()+1))}},1828:(t,e)=>{"use strict";function r(t,e){for(var r=t.textContent,o=r.split(" ").filter((function(t){return""!==t})),i={},s=0;s=5&&c<10?p=1:c>=10&&(p=2),n(u.substring(0,c).toLowerCase(),l.substring(0,c).toLowerCase())<=p){i[u]=""+u+"";break}}for(var f=0,d=Object.entries(i);f0},e.prototype.resultsAreVisible=function(){return this.currentVisibleResults},e.prototype.updateApisearchSetup=function(t){this.currentQuery=t.query},e.prototype.renderInitialData=function(t){var e=t.result,r=t.query;t._,this.dirty=!1,this.currentResult=e,this.currentQuery=r,this.currentVisibleResults=void 0!==r,this.emit("render"),this.replaceUrl(r,e,this.currentVisibleResults)},e.prototype.renderFetchedData=function(t){var e=t.result,r=t.query,n=t.visibleResults;this.dirty=!1,this.currentResult=e,this.currentQuery=r,void 0!==n&&(this.currentVisibleResults=n),this.emit("render"),this.replaceUrl(r,e,n)},e.createUID=function(t){for(var e="",r=0;r0)return this.emit("fromUrlObject",this.initialState,e),i.Query.createFromArray(e);if(!this.withHash)return t;var r={};if(null!==this.urlHash.match("q=.*"))r={q:decodeURI(this.urlHash.slice(2))},this.emit("fromUrlObject",r,e);else try{r=void 0!==this.urlHash&&null!==this.urlHash&&""!==this.urlHash&&"/"!==this.urlHash?JSON.parse(decodeURI(this.urlHash)):{},Object.keys(r).length>0&&this.emit("fromUrlObject",r,e)}catch(t){this.doNotCleanUrlHashAtFirst=!0}return i.Query.createFromArray(e)},e.prototype.replaceUrl=function(t,e,r){if(this.withHash){var n,o=t.toArray(),i={};if(this.emit("toUrlObject",o,i),1===Object.keys(i).length&&void 0!==i.q?n="q="+i.q:(n="{}"===(n=decodeURI(JSON.stringify(i)))?"":n,n=encodeURI(n)),this.isUnderIframe)this.doNotCleanUrlHashAtFirst||this.window.postMessage({name:"apisearch_replace_hash",hash:n},"*"),this.doNotCleanUrlHashAtFirst=!1;else{var s=window.location.href.split("#",2)[0];history.replaceState("","",s+"#"+n),""===n&&history.replaceState("","",s)}}},e}(s.EventEmitter);e.default=l},4847:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=r(7726),u=function(t){function e(e){var r=t.call(this,e)||this;return r.state={mobile_img:"",desktop_img:"",url:""},r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e;if(null!=t.store.getCurrentResult()){var r=null!==(e=t.store.getCurrentResult().metadata.banners)&&void 0!==e?e:[];if(r){var n=r.filter((function(e){return e.position===t.position}));if(0!==n.length){var o=n[0];this.setState((function(t){return{mobile_img:o.mobile_img,desktop_img:o.desktop_img,url:o.url}}))}else this.setState((function(t){return{mobile_img:"",desktop_img:"",url:""}}))}else this.setState((function(t){return{mobile_img:"",desktop_img:"",url:""}}))}else this.setState((function(t){return{mobile_img:"",desktop_img:"",url:""}}))},e.prototype.render=function(){var t;if(""!==this.state.desktop_img){var e={desktop_img:this.state.desktop_img,mobile_img:null!==(t=this.state.mobile_img)&&void 0!==t?t:this.state.desktop_img,url:this.state.url,has_url:""!==this.state.url,breaking_point_size:this.props.breakingPointSize,image_prefix:this.props.imagePrefix};return(0,i.h)(s.default,{template:a.defaultBannerTemplate,data:e,dictionary:this.props.dictionary})}},e}(i.Component);e.default=u},7726:(t,e)=>{"use strict";e.__esModule=!0,e.defaultBannerTemplate=void 0,e.defaultBannerTemplate='\n \n'},4927:(t,e,r)=>{"use strict";e.__esModule=!0,e.onChangeSearchAction=e.aggregationSetup=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.aggregationSetup=function(t,e,r,a){var u=s.default.object(e);u.aggregateBy(r,a,n.FILTER_TYPE_FIELD),i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:u})},e.onChangeSearchAction=function(t,e,r,a,u,l,c){window.postMessage({name:"apisearch_scroll_top"},"*");var p=s.default.object(e);p.filterBy(a,u,l?[c]:[],n.FILTER_MUST_ALL,!1),p.page=1;var f=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));r.query(p).then((function(t){f.dispatch("RENDER_FETCHED_DATA",{query:p,result:t})})).catch((function(t){}))}},1549:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(481),a=r(4927),u=r(3701),l=r(7707),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleChange=function(t){var r=e.props;(0,a.onChangeSearchAction)(r.environmentId,r.store.getCurrentQuery(),r.repository,r.filterName,r.filterField,t,r.filterValue)},e}return o(e,t),e.prototype.componentWillMount=function(){var t=this.props,e=t.environmentId,r=t.filterName,n=t.filterField,o=t.store.getCurrentQuery();(0,a.aggregationSetup)(e,o,r,n)},e.prototype.componentWillReceiveProps=function(t){this.setState((function(e){return{aggregation:t.store.getCurrentResult().getAggregation(t.filterName)}}))},e.prototype.render=function(t,e){var r=t.classNames.container,n=t.classNames.top,o=t.classNames.item,a=t.classNames.active,l=t.template.top,c=t.template.item,p=t.filterValue;"boolean"==typeof p&&(p=p?"true":"false");var f=0,d=(0,s.getFilterValuesFromQuery)(t.store.getCurrentQuery(),t.filterName)[0],h=e.aggregation;if(null!=h){var _=h.getCounters();for(var y in _){var g=_[y];if(g.values.name===p){f=g.getN();break}}}var m=t.label?t.label:t.filterName,v=this,E=Math.floor(1e10*Math.random()),b={n:f,isActive:d,label:m,uid:E};return 0===f?null:(0,i.h)("div",{className:"as-checkboxFilter ".concat(r)},(0,i.h)(u.default,{template:l,className:"as-checkboxFilter__top ".concat(n),dictionary:this.props.dictionary}),(0,i.h)("div",{className:"as-checkboxFilter__item "+"".concat(o," ")+"".concat(d?a:""),onClick:function(t){t.stopPropagation(),t.preventDefault(),v.handleChange(!d)}},(0,i.h)(u.default,{template:c,data:b,dictionary:this.props.dictionary})))},e}(i.Component);c.defaultProps={filterValue:"true",classNames:{container:"",top:"",item:"",active:"as-checkboxFilter__item--active"},template:{top:null,item:l.defaultItemTemplate}},e.default=c},7707:(t,e)=>{"use strict";e.__esModule=!0,e.defaultItemTemplate=void 0,e.defaultItemTemplate='\n \n \n {{{label}}}\n \n \n {{n}}\n \n'},181:(t,e,r)=>{"use strict";e.__esModule=!0,e.clearFiltersAction=void 0;var n=r(9913),o=r(803),i=r(5544);e.clearFiltersAction=function(t,e,r,s,a){void 0===s&&(s=null),void 0===a&&(a=null),window.postMessage({name:"apisearch_scroll_top"},"*");var u=i.default.object(e);if(null===s)u.filters={_query:e.getFilter("_query")};else if(null===a)delete u.filters[s];else{var l=u.filters[s].values.indexOf(a,0);l>-1&&u.filters[s].values.splice(l,1),0===u.filters[s].values.length&&delete u.filters[s]}u.page=1;var c=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));r.query(u).then((function(t){c.dispatch("RENDER_FETCHED_DATA",{query:u,result:t})})).catch((function(t){}))}},2651:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(5059),s=r(172),a=r(3701),u=r(181),l=function(t){function e(){var e=t.call(this)||this;return e.handleClick=function(){var t=e.props,r=t.environmentId,n=t.store.getCurrentQuery(),o=t.repository;e.setState((function(t){return{appliedFilters:[],showClearFilters:!1}})),(0,u.clearFiltersAction)(r,n,o)},e.handleIndividualClick=function(t,r){var n=e.props,o=n.environmentId,i=n.store.getCurrentQuery(),s=n.repository;(0,u.clearFiltersAction)(o,i,s,t,r)},e.state={appliedFilters:[],showClearFilters:!1},e}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e=this.getFiltersToShow();this.setState((function(t){return{appliedFilters:e,showClearFilters:e.length>0}}))},e.prototype.getFiltersToShow=function(t){void 0===t&&(t=null);for(var e=this.props.store.getCurrentQuery().getFilters(),r=[],n=0,o=Object.entries(e);n{"use strict";e.__esModule=!0;var r=function(){function t(){}return t.object=function(t){return Object.assign(Object.create(Object.getPrototypeOf(t)),t)},t}();e.default=r},676:(t,e,r)=>{"use strict";e.__esModule=!0,e.onWordClickAction=void 0;var n=r(5059),o=r(5544),i=r(803),s=r(9913);e.onWordClickAction=function(t,e,r,a,u){void 0===u&&(u=null);var l=o.default.object(e);l.filters._query.values=[a],l.page=1,u&&(l=n.Query.createFromArray(l)).filterBy("Categoría","category_level_0",[u]);var c=i.default.get("".concat(s.APISEARCH_DISPATCHER,"__").concat(t));r.query(l).then((function(t){c.dispatch("RENDER_FETCHED_DATA",{query:l,result:t})})).catch((function(t){}))}},7677:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=function(t){function e(e){var r=t.call(this,e)||this;return r.state={hits:0,total:0,visible:!1},r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){this.setState((function(e){return null==t.store.getCurrentResult()?{hits:0,total:0,visible:!1}:{hits:t.store.getCurrentResult().getTotalHits(),total:t.store.getCurrentResult().getTotalItems(),visible:!0}}))},e.prototype.render=function(){var t=this.props,e=t.classNames.container,r=t.template.container,n=t.formatData;if(this.state.visible){var o=this.props.store.getCurrentQuery(),a=o.getSize(),u=o.getPage(),l=(u-1)*a,c=l+a,p=this.state.hits.toLocaleString(),f=!1;"10,000"===p&&(p="+10,000",f=!0);var d=n({total_hits:p,total_items:this.state.total.toLocaleString(),page:u,size:a,from:l+1,to:c,more_than_limit:f});return(0,i.h)(s.default,{template:r,data:d,className:"as-information ".concat(e),dictionary:this.props.dictionary})}},e}(i.Component);a.defaultProps={classNames:{container:""},template:{container:"Found {{total_hits}}/{{total_items}}"},formatData:function(t){return t}},e.default=a},481:function(t,e){"use strict";var r=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o{"use strict";e.__esModule=!0,e.configureQueryWithShadowLeveledFilters=e.modifyQueryAggregationWithProperLevelValue=e.filterAction=e.aggregationSetup=void 0;var n=r(5059),o=r(9913),i=r(5059),s=r(803),a=r(5544);function u(t,e,r){for(var o=1;o<10;o++){var i=r+"_level_"+o;delete t.filters[i],delete t.aggregations[i]}if(e.length>0){var s=1;e.forEach((function(e){var o=r+"_level_"+s++;t.filterBy(o,o,[e],n.FILTER_AT_LEAST_ONE)}))}}e.aggregationSetup=function(t,e,r,n,u,l,c,p,f,d){var h=a.default.object(e),_=Object.keys(f);_.length>0?h.aggregateByRange(r,u,_,l,i.FILTER_TYPE_RANGE,c,p,d):h.aggregateBy(r,u,l,c,p,d),s.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:h})},e.filterAction=function(t,e,r,n,l,c,p,f,d,h,_,y,g,m,v,E){window.postMessage({name:"apisearch_scroll_top"},"*");var b=a.default.object(e),A=Object.keys(_);A.length>0?(b.filterByRange(n,l,A,p,f,i.FILTER_TYPE_RANGE,!1,d),b.aggregateByRange(n,c,A,f,i.FILTER_TYPE_RANGE,d,h)):(b.filterBy(n,l,p,f,!1,d),b.aggregateBy(n,c,f,d,h,v)),6===f&&u(b,g,m),b.page=1;var S=s.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));E&&b.setMetadataValue("af",[l,E]),r.query(b).then((function(t){delete b.metadata.af,S.dispatch("RENDER_FETCHED_DATA",{query:b,result:t})})).catch((function(t){}))},e.modifyQueryAggregationWithProperLevelValue=function(t,e,r,n,i){if(void 0!==e.filters&&void 0!==e.filters[r]){var u=a.default.object(e),l=e.filters[r].field.split("_"),c=parseInt(l[l.length-1],10),p=l.slice(0,l.length-1).join("_");u.aggregations[r].field=p+"_"+(c+1),s.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:u})}},e.configureQueryWithShadowLeveledFilters=u},5587:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o0?e.ranges:e.labels,A=this,S={},T=this.state.aggregations.map((function(t){var e=Math.floor(1e10*Math.random()),r=t.getValues();return r.name=b[r.name]?b[r.name]:r.name,S[r.id]=!0,{isActive:t.isUsed(),n:t.getN(),uid:e,values:r}})),O=6===e.applicationType?(0,u.getShadowFilterValuesFromQuery)(v,e.filterName,!0):(0,u.getFilterValuesFromQuery)(v,e.filterName);if(O.length>0){var I=[];O.forEach((function(t){if(void 0===S[t]){var e=Math.floor(1e10*Math.random());I.push({isActive:!0,n:0,uid:e,values:{id:t,name:t}})}})),T=i(i([],I,!0),T,!0)}if(0===T.length)return null;var w=T.slice(0,this.state.viewLimit),R=T.length,C=1,F={hasApplied:O.length>0,nApplied:O.length},N=r&&rr;return(0,s.h)("div",{className:"as-multipleFilter ".concat(o)},(0,s.h)(l.default,{template:_,className:"as-multipleFilter__top ".concat(a),dictionary:this.props.dictionary,data:F}),(0,s.h)("div",{className:"as-multipleFilter__itemsList ".concat(p)},(0,s.h)("ul",null,w.map((function(r){var n=E(r),o=Math.min(C,t.currentLevel+1);return C++,(0,s.h)("li",{className:"as-multipleFilter__item "+"".concat(f," ")+"".concat(r.isActive?d:"")+"".concat(e.promoted.includes(r.values.name)?"as-multipleFilter__item_featured":""),onClick:function(t){t.stopPropagation(),t.preventDefault(),A.handleClick(r.values.id,o)}},(0,s.h)(l.default,{template:y,data:n,dictionary:t.props.dictionary}))})))),N?(0,s.h)(c.default,{allItemsLength:R,currentLimit:this.state.viewLimit,handleShowMore:this.handleShowMore,handleShowLess:this.handleShowLess,showMoreContainerClassName:h,showMoreTemplate:g,showLessTemplate:m,dictionary:this.props.dictionary}):null)},e}(s.Component);f.defaultProps={aggregationField:null,applicationType:8,fetchLimit:10,viewLimit:null,sortBy:["_term","desc"],ranges:{},labels:{},classNames:{container:"",top:"",itemsList:"",item:"",active:"as-multipleFilter__item--active",showMoreContainer:""},template:{top:null,item:p.defaultItemTemplate,showMore:"+ Show more",showLess:"- Show less"},formatData:function(t){return t},activeFirst:!0,promoted:[]},e.default=f},7277:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(172),o=r(3701);e.default=function(t){var e=t.allItemsLength,r=t.currentLimit,i=t.handleShowMore,s=t.handleShowLess,a=t.showMoreContainerClassName,u=t.showMoreTemplate,l=t.showLessTemplate,c=t.dictionary;return e>r?(0,n.h)("div",{className:"as-showMore ".concat(a),onClick:i},(0,n.h)(o.default,{template:u,className:"as-showMore--more",dictionary:c})):e===r?(0,n.h)("div",{className:"as-showMore ".concat(a),onClick:s},(0,n.h)(o.default,{template:l,className:"as-showMore--less",dictionary:c})):null}},718:(t,e)=>{"use strict";e.__esModule=!0,e.defaultItemTemplate=void 0,e.defaultItemTemplate='\n \n \n {{{values.name}}}\n \n \n {{n}}\n \n'},951:(t,e)=>{"use strict";e.__esModule=!0,e.getEnd=e.getStart=e.totalPagesToArray=e.getTotalPages=void 0,e.getTotalPages=function(t,e){t=t>=1e4?9999:t;var r=Math.ceil(t/e);return r>999?999:r},e.totalPagesToArray=function(t){for(var e=[],r=1;r<=t;r++)e.push(r);return e},e.getStart=function(t,e,r,n,o,i){if(o)return r-r%n;if(i){var s=r-(n-t%r);return s>0?s:0}return r-(e+1)},e.getEnd=function(t,e,r,n,o,i){return o?n:i?t:r+e}},6777:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(172),o=r(3701);e.default=function(t){var e=t.isVisible,r=t.classNames,i=t.template,s=t.handleClick;return e?(0,n.h)("li",{className:r,onClick:s},(0,n.h)(o.default,{template:i,dictionary:this.props.dictionary})):null}},8725:(t,e,r)=>{"use strict";e.__esModule=!0,e.paginationChangeAction=void 0;var n=r(9913),o=r(803),i=r(5544);e.paginationChangeAction=function(t,e,r,s){window.postMessage({name:"apisearch_scroll_top"},"*");var a=i.default.object(e);a.page=s;var u=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));r.query(a).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:a,result:t})})).catch((function(t){}))}},5531:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=r(951),u=r(6777),l=r(8725),c=function(t){function e(){var e=t.call(this)||this;return e.handleClick=function(t){var r=e.props,n=r.store,o=r.environmentId,i=r.repository,s=n.getCurrentResult(),u=n.getCurrentQuery(),c=(0,a.getTotalPages)(s.getTotalHits(),u.getSize());t<=0&&(t=1),t>=c&&(t=c),u.getPage()!==t&&(0,l.paginationChangeAction)(o,u,i,t)},e.state={page:1},e}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e=t.store.getCurrentQuery().getPage();this.setState((function(t){return{page:e}}))},e.prototype.render=function(){var t=this,e=this.props,r=e.store.getCurrentResult();if(null!=e.store.getCurrentResult()){var n=e.store.getCurrentQuery().getSize(),o=(0,a.getTotalPages)(r.getTotalHits(),n);if(0===r.getTotalHits()||1===o)return null;var l=e.padding,c=e.goFirstLast,p=e.classNames.container,f=e.classNames.item,d=e.classNames.active,h=e.classNames.disabled,_=e.classNames.next,y=e.classNames.previous,g=e.classNames.last,m=e.classNames.first,v=e.template.item,E=e.template.next,b=e.template.previous,A=e.template.first,S=e.template.last,T=e.store.getCurrentQuery().getPage(),O=(0,a.totalPagesToArray)(o),I=2*l+1,w=T<=l+1,R=T+l>=o,C=O.slice((0,a.getStart)(o,l,T,I,w,R),(0,a.getEnd)(o,l,T,I,w,R)),F=1===T?h:"",N=T===o?h:"";return(0,i.h)("ul",{className:"as-pagination ".concat(p)},(0,i.h)(u.default,{isVisible:c,classNames:"as-pagination__item as-pagination__item--first ".concat(m," ").concat(F),template:A,handleClick:function(){return t.handleClick(1)}}),(0,i.h)(u.default,{isVisible:!0,classNames:"as-pagination__item as-pagination__item--previous ".concat(y," ").concat(F),template:b,handleClick:function(){return t.handleClick(T-1)}}),C.map((function(e){return(0,i.h)("li",{className:"as-pagination__item as-pagination__item--link ".concat(f," ").concat(T===e?d:""),onClick:function(){return t.handleClick(e)}},(0,i.h)(s.default,{template:v,data:{page:e.toLocaleString("de-DE")},dictionary:t.props.dictionary}))})),(0,i.h)(u.default,{isVisible:!0,classNames:"as-pagination__item as-pagination__item--next ".concat(_," ").concat(N),template:E,handleClick:function(){return t.handleClick(T+1)}}),(0,i.h)(u.default,{isVisible:c,classNames:"as-pagination__item as-pagination__item--last ".concat(g," ").concat(N),template:S,handleClick:function(){return t.handleClick(o)}}))}},e}(i.Component);c.defaultProps={padding:3,goFirstLast:!1,classNames:{container:"",item:"",active:"as-pagination__item--active",disabled:"as-pagination__item--disabled",next:"",first:"",previous:"",last:""},template:{item:"{{page}}",next:">",previous:"<",first:"<<",last:">>"}},e.default=c},7869:(t,e,r)=>{"use strict";e.__esModule=!0,e.priorityFilterAction=e.setupPriorityFilters=void 0;var n=r(9913),o=r(803),i=r(5544);e.setupPriorityFilters=function(t,e,r){var s=i.default.object(e);s.setMetadataValue("pf",r),o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:s})},e.priorityFilterAction=function(t,e,r,s,a,u,l){window.postMessage({name:"apisearch_scroll_top"},"*");var c=i.default.object(e);c.filterBy(s,a,[u],l,!1),c.page=1;var p=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));c.setMetadataValue("af",[a,u]),r.query(c).then((function(t){delete c.metadata.af,p.dispatch("RENDER_FETCHED_DATA",{query:c,result:t})})).catch((function(t){}))}},947:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";e.__esModule=!0,e.defaultPriorityFilterItemTemplate=e.defaultPriorityFilterTopTemplate=void 0,e.defaultPriorityFilterTopTemplate="\n {{name}}\n",e.defaultPriorityFilterItemTemplate='\n
{{value}}
\n \n'},3815:(t,e,r)=>{"use strict";e.__esModule=!0,e.filterAction=e.aggregationSetup=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.aggregationSetup=function(t,e,r,a,u,l){var c=null===u||null===l,p=s.default.object(e),f=c?"range_min_max":"range",d=c?[".."]:[u+".."+l];p.aggregateByRange(r,a,d,n.FILTER_AT_LEAST_ONE,f),i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:p})},e.filterAction=function(t,e,r,a,u,l,c){window.postMessage({name:"apisearch_scroll_top"},"*");var p=s.default.object(e),f=Math.min(l,c),d=Math.max(l,c)+"]";p.filterByRange(a,u,[],[f+".."+d],n.FILTER_AT_LEAST_ONE,"range_min_max",!1),p.page=1;var h=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));r.query(p).then((function(t){h.dispatch("RENDER_FETCHED_DATA",{query:p,result:t})})).catch((function(t){}))}},7845:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0?t.minValue:"number"==typeof n.min?Math.floor(n.min):void 0,a="number"==typeof t.maxValue&&t.maxValue>0?t.maxValue:"number"==typeof n.max?Math.ceil(n.max):void 0,u=null,l=e.getFirstItem();if(l){var c=l.get("price"),p=l.get("price_with_currency");c&&p&&(u=this.getCurrencyPlaceholderFromPriceAndPriceWithCurrency(c,p))}var f=this.getFromToFromFilter(o,i,a);this.setState((function(t){return{from:f[0],to:f[1],min:i,max:a,currency_placeholder:u,visible:"number"==typeof i&&"number"==typeof a}}))}else this.setState((function(t){return{from:t.from,to:t.to,min:t.min,max:t.max,currency_placeholder:t.currency_placeholder,visible:!1}}))},e.prototype.getFromToFromFilter=function(t,e,r){var n=Math.min(e,r),o=Math.max(e,r);if(t instanceof s.Filter){var i=t.getValues()[0];if("string"==typeof i){var a=i.split(".."),u=a[0],l=a[1].slice(0,-1);return[Math.max(n,parseInt(u)),Math.min(o,parseInt(l))]}}return[n,o]},e.prototype.componentDidUpdate=function(t,e){this.updateRangeLayer(t,e,e.from,e.to)},e.prototype.updateRangeLayer=function(t,e,r,n){var o=e.min,i=e.max;"number"==typeof r&&"number"==typeof n&&"function"==typeof t.callback&&t.callback(Math.min(r,n),Math.max(r,n),o,i,this.rangeUid,e.currency_placeholder)},e.prototype.render=function(t,e){var r=this,n=(t.filterName,(0,u.useRef)(null)),o=t.template.top,s=t.template.slider,c=t.classNames.container,p=t.classNames.top,f=t.classNames.wrapper,d=this;(0,u.useEffect)((function(){var t=r;if(n.current){var e=r.uid;return n.current.addEventListener("change",o),function(){n.current.removeEventListener("change",o)}}function o(r){var n=r.target.parentNode;t.applyFilter(n.getElementsByClassName("as-rangeFilter__from__"+e)[0].value,n.getElementsByClassName("as-rangeFilter__to__"+e)[0].value)}}),[n]);var h=t.native,_=!h,y=h?"range":"number",g=e.from,m=e.to,v=e.min,E=e.max,b=!e.visible||0===t.store.currentResult.getTotalHits()&&g===v&&m===E?"display:none!important;":"";return(0,a.h)("div",{id:this.rangeUid,className:"as-rangeFilter ".concat(c),style:b},(0,a.h)(l.default,{template:o,className:"as-rangeFilter__top ".concat(p),dictionary:this.props.dictionary}),(0,a.h)("div",{className:"as-rangeFilter__wrapper ".concat(f)},(0,a.h)("input",i({type:y,class:"as-rangeFilter__from ".concat(t.classNames.input," as-rangeFilter__").concat(this.uid," as-rangeFilter__from__").concat(this.uid)},t.attributes.from,{value:g,min:v,max:E,step:t.step,onClick:function(t){if(_)return!1;d.handleSliderChange([parseInt(t.target.value),m])},onTouchEnd:function(t){if(_)return!1;d.handleSliderChange([parseInt(t.target.value),m])},onChange:function(t){var e=[parseInt(t.target.value),m];if(h)return d.handleSliderMove(e),!1;d.handleSliderChange(e)},autocomplete:"off"})),(0,a.h)("input",i({type:y,class:"as-rangeFilter__to ".concat(t.classNames.input," as-rangeFilter__").concat(this.uid," as-rangeFilter__to__").concat(this.uid)},t.attributes.to,{value:m,min:v,max:E,step:t.step,onClick:function(t){if(_)return!1;d.handleSliderChange([g,parseInt(t.target.value)])},onTouchEnd:function(t){if(_)return!1;d.handleSliderChange([g,parseInt(t.target.value)])},onChange:function(t){var e=[g,parseInt(t.target.value)];if(h)return d.handleSliderMove(e),!1;d.handleSliderChange(e)},autocomplete:"off"})),(0,a.h)("div",{class:"slider"},(0,a.h)(l.default,{template:s,dictionary:this.props.dictionary}))))},e.prototype.applyFilter=function(t,e){var r=this.props;(0,c.filterAction)(r.environmentId,r.store.getCurrentQuery(),r.repository,r.filterName,r.filterField,t,e)},e.prototype.getCurrencyPlaceholderFromPriceAndPriceWithCurrency=function(t,e){t=(t+"").replace(".","").replace(",",""),e=(e+"").replace(".","").replace(",","");var r=new RegExp(t+"0*");return e.replace(r,"__price__")},e}(a.Component);p.defaultProps={maxValueIncluded:!0,step:1,minValue:null,maxValue:null,native:!1,classNames:{container:"",top:"",wrapper:"",input:"",from:"",to:""},attributes:{from:"",to:""},template:{top:"",slider:""}},e.default=p},8379:(t,e,r)=>{"use strict";e.__esModule=!0,e.reloadAction=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.reloadAction=function(t,e,r){window.postMessage({name:"apisearch_scroll_top"},"*");var a=s.default.object(e),u=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));if(r instanceof n.HttpRepository){var l=r.getHttpClient();l instanceof n.CacheClient&&l.flushCache()}r.query(a).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:a,result:t})})).catch((function(t){}))}},369:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=r(8379),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleClick=function(){var t=e.props,r=t.environmentId,n=t.store.getCurrentQuery(),o=t.repository;(0,a.reloadAction)(r,n,o)},e}return o(e,t),e.prototype.render=function(){var t=this.props,e=t.classNames.container,r=t.template.container;return(0,i.h)("div",{className:"as-clearFilters ".concat(e),onClick:this.handleClick},(0,i.h)(s.default,{template:r,dictionary:this.props.dictionary}))},e}(i.Component);u.defaultProps={classNames:{container:""},template:{container:"Reload"}},e.default=u},1767:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(1828),a=r(3701),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.shouldComponentUpdate=function(t,e){var r=this.props.data.uuid_composed!==t.data.uuid_composed||this.props.data.metadata.image!==t.data.metadata.image||this.props.data.query!==t.data.query;return r||this.highlight(),r},e.prototype.componentDidMount=function(){this.highlight()},e.prototype.componentDidUpdate=function(){this.highlight()},e.prototype.highlight=function(){var t=this.props.data.query_text;if(this.props.data.highlights_enabled&&""!==t){var e=document.getElementById("as-result-"+this.props.data.uuid_composed);(0,s.highlightElement)(e,t)}},e.prototype.render=function(){var t,e=this.props,r=e.template,n=e.data,o=null!==(t=e.dictionary)&&void 0!==t?t:{},s="as-result-"+n.uuid_composed,u=n.metadata.best_match?"best-match":"",l=n.metadata.exact_match?"exact-match":"";return(0,i.h)(a.default,{template:r,data:n,id:s,className:"".concat(e.className," ").concat(u," ").concat(l),dictionary:o})},e}(i.Component);e.default=u},4627:(t,e,r)=>{"use strict";e.__esModule=!0,e.infiniteScrollNextPageAction=e.configureQuery=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.configureQuery=function(t,e,r,a,u,l,c,p,f){var d=s.default.object(e);for(var h in p(d),d.size=r,d.setFields(c),u)u[h]instanceof n.ItemUUID&&d.promoteUUID(u[h]);for(var h in l)l[h]instanceof n.ItemUUID&&d.excludeUUID(l[h]);f>0&&(d.minScore=f),i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:d})},e.infiniteScrollNextPageAction=function(t,e,r,n){var a=s.default.object(e);a.page=n;var u=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));r.query(a).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:a,result:t})})).catch((function(t){}))}},1481:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;ro*r.getSize(),s=this.fromLoadingNextPage?this.state.items.concat(n):n;this.fromLoadingNextPage=!1,this.currentExpectedPage=void 0,this.setState((function(t){return{customResponse:e.getMetadataValue("custom_response"),hasNewPage:i,items:s,page:o}}))}else this.setState((function(t){return{customResponse:"",hasNewPage:!1,items:[],page:0}}))},e.prototype.componentWillMount=function(){var t=this.props;(0,h.configureQuery)(t.environmentId,t.store.getCurrentQuery(),t.itemsPerPage,t.highlightsEnabled,t.promote.map((function(t){return t instanceof s.ItemUUID?t:s.ItemUUID.createFromArray(t)})),t.exclude.map((function(t){return t instanceof s.ItemUUID?t:s.ItemUUID.createFromArray(t)})),t.fields,t.filter,t.minScore)},e.prototype.page=function(){var t;return null!==(t=this.currentExpectedPage)&&void 0!==t?t:this.props.store.getCurrentQuery().getPage()},e.prototype.render=function(){var t,e,r=this,n=this,o=this.props,s=o.store.isDirty(),l=o.classNames.container,c=o.classNames.itemsList,h=o.classNames.placeholder,_=o.template.itemsList,y=null!==(t=o.template.placeholder)&&void 0!==t?t:"",g=o.store.getCurrentResult(),m=o.store.getCurrentQuery(),v=o.currentVisibleResults,E=Object.values(g.getSubresults()),b=(0,u.useRef)(null),A=g.getMetadataValue("custom_response"),S=g.getMetadataValue("redirection");if(A&&(e=(0,a.h)(p.default,{template:A.content,className:"as-result__custom_response",dictionary:this.props.dictionary}),A.only))return e;var T=!0;S&&("automatic"===S.type?window.top.location.href=S.url:"on_enter"===S.type&&(window.postMessage({name:"apisearch_bind_enter_redirection",url:S.url},"*"),T=!1),this.props.template.redirection&&(e=(0,a.h)("div",null,(0,a.h)(p.default,{template:this.props.template.redirection,data:{url:S.url,query:m.getQueryText()},className:"as-result__redirection",dictionary:this.props.dictionary}),e))),T&&window.postMessage({name:"apisearch_bind_enter_redirection",url:void 0},"*");var O=!1!==o.infiniteScroll&&(!0===o.infiniteScroll||o.infiniteScroll>=0)&&this.state.hasNewPage,I=O?!0===o.infiniteScroll?0:o.infiniteScroll:void 0;if(""!==o.fadeInSelector&&this.addMouseDownListeners(b,o.fadeInSelector),!v||!this.state.focus)return(0,a.h)("div",{className:"as-result ".concat(l)});var w=this.state.items,R={query:m.getQueryText(),suggestions:g.getSuggestions()},C=this.state.page>1,F=(this.state.page-1)*m.getSize(),N=w;return C&&(N=Array.prototype.slice.call(w,F)),Array.prototype.forEach.call(N,(function(t){t.position=++F,t.id=t.getId()})),window.postMessage({name:"apisearch_result_items",query:m.toArray(),query_text:m.getQueryText(),with_results:w.length>0,page:this.state.page,site:o.store.getSite(),device:o.store.getDevice(),items:N.map((function(t){return{fields:t.fields,uuid:t.uuid}}))},"*"),o.template.itemsList!==f.defaultItemsListTemplate?(0,a.h)("div",{className:"as-result ".concat(l),ref:b,style:"position: relative"},s?(0,a.h)(p.default,{template:y,className:"as-result__placeholder ".concat(h),dictionary:this.props.dictionary}):(0,a.h)(p.default,{template:_,data:i(i({},R),{items:w?w.map((function(t,e){return r.hydrateItem(t,e)})):[]}),className:"as-result__itemsList ".concat(c),dictionary:this.props.dictionary}),O?o.infiniteScrollButton?(0,a.h)("div",{onClick:function(t){n.loadNextPage()}},(0,a.h)(p.default,{template:o.template.next_page_button,data:{page:this.state.page+1}})):(0,a.h)("div",{ref:this.endResultsBoxRef,style:"bottom: ".concat(I,"px; position: relative;")}):""):s?(0,a.h)("div",{className:"as-result ".concat(l),ref:b},(0,a.h)(p.default,{template:y,className:"as-result__placeholder ".concat(h),dictionary:o.dictionary})):(0,a.h)("div",{className:"as-result ".concat(l),ref:b},e,s?(0,a.h)(p.default,{template:y,className:"as-result__placeholder ".concat(h),dictionary:this.props.dictionary}):w.length>0?(0,a.h)("div",{className:"as-result__itemsList ".concat(o.classNames.itemsList)},w.map((function(t,e){return(0,a.h)(d.default,{data:i(i(i({},R),r.hydrateItem(t,e)),{query:m.getQueryText()}),template:o.template.item,className:"as-result__item ".concat(o.classNames.item),dictionary:o.dictionary})})),O?o.infiniteScrollButton?"":(0,a.h)("div",{id:"as-result__infinite_scroll_inspector",ref:this.endResultsBoxRef,style:"bottom: ".concat(I,"px; position: relative; width: 100%;")}):""):"",O&&o.infiniteScrollButton?(0,a.h)("div",{onClick:function(t){n.loadNextPage()}},(0,a.h)(p.default,{template:o.template.next_page_button,data:{page:this.state.page+1}})):"",E.length>0?(0,a.h)("div",{className:"as-result__alternativeList"},E.map((function(t){return(0,a.h)("div",{className:"as-result__alternative"},(0,a.h)("div",{className:"as-result__alternative_query"},(0,a.h)("span",{onClick:function(e){e.stopPropagation(),e.preventDefault(),n.handleAlternativeClick(t.metadata.query_text)}},(0,a.h)(p.default,{template:o.template.alternative_title,data:{word:t.metadata.query_text_html},dictionary:o.dictionary})),(0,a.h)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),n.handleAlternativeClick(t.metadata.query_text)}},(0,a.h)(p.default,{template:o.template.alternative_all_results,data:{num:t.getTotalHits()},dictionary:o.dictionary}))),(0,a.h)("div",{className:"as-result__alternative_items"},t.items.map((function(t,e){return(0,a.h)(d.default,{data:i(i({},R),r.hydrateItem(t,e)),template:o.template.item,className:"as-result__alternative_item ".concat(o.classNames.item),dictionary:r.props.dictionary})}))))}))):0===w.length&&void 0===e?(0,a.h)(p.default,{template:o.template.noResults,data:{query:m.getQueryText()},className:"as-result__noresults ".concat(o.classNames.noResults),dictionary:o.dictionary}):"")},e.prototype.hydrateItem=function(t,e){var r=this.props,n=r.environmentId,o=c.default.get("".concat(l.APISEARCH_CONFIG,"__").concat(n)),s=c.default.get("".concat(l.APISEARCH_UI,"__").concat(n)).reference,a=o.app_id,u=t.getAppUUID();"object"==typeof u&&(a=u.composedUUID());var p=o.index_id,f=t.getIndexUUID();"object"==typeof f&&(p=f.composedUUID());var d=t.getUUID().composedUUID(),h={};Object.assign(h,t.getMetadata(),t.getIndexedMetadata());var _={};Object.keys(r.fieldsConciliation).map((function(t,e){var n;_[t]=null!==(n=h[r.fieldsConciliation[t]])&&void 0!==n?n:void 0})),Object.assign(h,_),t.fields=h;var y="";return this.props.store.getCurrentQuery()&&(y=this.props.store.getCurrentQuery().getQueryText()),i(i({},r.formatData(t)),{key:"item_"+d,uuid_composed:d,click:s+'.click("'+a+'", "'+p+'", "'+d+'", '+e+");",add_to_cart:s+'.interact("add_cart", "'+a+'", "'+p+'", "'+d+'", '+e+");",query_text:y,highlights_enabled:this.props.highlightsEnabled,striptags:function(){return function(t,e){return e(t).replace(/(<([^>]+)>)/gi,"")}}})},e}(a.Component);y.defaultProps={fields:[],itemsPerPage:10,highlightsEnabled:!1,promote:[],exclude:[],filter:function(t){return null},subResult:!1,classNames:{container:"",itemsList:"",item:"",noResults:"",placeholder:""},template:{itemsList:f.defaultItemsListTemplate,item:f.defaultItemTemplate,noResults:f.defaultNoResultsItemTemplate,placeholder:null,alternative_title:f.defaultAlternativeTitleTemplate,alternative_all_results:f.defaultAlternativeAllResultsTemplate,next_page_button:f.defaultNextPageButtonTemplate,redirection:null},formatData:function(t){return t},fadeInSelector:"",fieldsConciliation:{}},e.default=y},5253:(t,e)=>{"use strict";e.__esModule=!0,e.defaultNextPageButtonTemplate=e.defaultAlternativeAllResultsTemplate=e.defaultAlternativeTitleTemplate=e.defaultNoResultsItemTemplate=e.defaultItemTemplate=e.defaultItemsListTemplate=void 0,e.defaultItemsListTemplate='\n
\n {{#items}}\n
\n Score: {{score}}
\n Uuid: {{uuid.type}} - {{uuid.id}}
\n Title: {{{fields.title}}}
\n Description: {{fields.description}}
\n Link: {{metadata.link}}\n
\n {{/items}}\n
\n {{^items}}No results{{/items}}\n',e.defaultItemTemplate='\n Score: {{score}}
\n Uuid: {{uuid.type}} - {{uuid.id}}
\n Title: {{{fields.title}}}
\n Description: {{fields.description}}
\n Link: {{metadata.link}}\n',e.defaultNoResultsItemTemplate="\n No results\n",e.defaultAlternativeTitleTemplate="{{{word}}}",e.defaultAlternativeAllResultsTemplate="All results ({{num}})",e.defaultNextPageButtonTemplate="Load page {{page}}"},2703:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=function(t){function e(e){var r=t.call(this,e)||this;return r.state={autocomplete:""},r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){null!==t.autocomplete?this.setState((function(e){return{autocomplete:t.autocomplete}})):this.setState((function(t){return{autocomplete:""}}))},e.prototype.render=function(){var t=this.state.autocomplete,e=this.props.queryText,r=this.props.inputClassName,n=e.length,o=t.substring(n),s=""===o?"":e+o+" ⤷";return(0,i.h)("input",{type:"text",className:"as-searchInput__input as-searchInput__autocomplete ".concat(r),placeholder:s,style:"position: absolute; top: 0px; left: 0px; background-color: white;"})},e}(i.Component);e.default=s},8527:(t,e,r)=>{"use strict";e.__esModule=!0,e.simpleSearchAction=e.initialSearchSetup=void 0;var n=r(9913),o=r(803),i=r(5544);e.initialSearchSetup=function(t,e,r,s,a){var u=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)),l=i.default.object(e);l.page=1,l.queryOperator=a,s.length>0&&(l.searchableFields=s),r&&l.enableAutocomplete(),u.dispatch("UPDATE_APISEARCH_SETUP",{query:l})},e.simpleSearchAction=function(t,e,r,s,a){window.postMessage({name:"apisearch_scroll_top"},"*");var u=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)),l=i.default.object(e);l.filters._query.values=[s],l.page=1,a?r.query(l).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:l,result:t,visibleResults:a})})).catch((function(t){})):u.dispatch("RENDER_FETCHED_DATA",{query:l,result:null,visibleResults:a})}},5949:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=n)},r.clearSearch=function(){var t=r.props,e=t.startSearchOn,n=t.environmentId,o=t.store.getCurrentQuery(),i=t.repository,s=0===e;(0,a.simpleSearchAction)(n,o,i,"",s)},e.autocomplete&&(r.state={queryText:""});var n=r;return window.addEventListener("beforeunload",(function(){n.dispatchQueryStringEvent(e,0)})),r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){this.setState({queryText:t.store.getCurrentQuery().getQueryText()})},e.prototype.handleKeyDown=function(t){switch(t.key){case"ArrowRight":case"Tab":case"Enter":return void this.replaceWithAutocomplete(t)}switch(t.keyCode){case 39:case 9:case 13:return void this.replaceWithAutocomplete(t)}},e.prototype.replaceWithAutocomplete=function(t){var e=this.props,r=this.props.store.getCurrentResult().getAutocomplete();if(null!==r&&""!==r)return(0,a.simpleSearchAction)(e.environmentId,e.store.getCurrentQuery(),e.repository,this.props.store.getCurrentResult().getAutocomplete(),!0),void t.preventDefault()},e.prototype.doNothing=function(t){},e.prototype.withConfig=function(t){},e.prototype.dispatchQueryStringEvent=function(t,e){var r=t.store.getCurrentQuery(),n=r.getQueryText();if(this.queryTextEvent&&(this.lastQueryTextStringDispatched=null,clearTimeout(this.queryTextEvent)),this.lastQueryTextStringDispatched!==n&&(this.lastQueryTextStringDispatched=n,""!==n)){var o=this;this.lastQueryTextStringDispatched=n,this.queryTextEvent=setTimeout((function(){o.queryTextEvent=null,window.postMessage({name:"apisearch_search",query_text:n,query:r.toArray(),site:t.store.getSite(),device:t.store.getDevice()},"*")}),e)}},e.prototype.render=function(){var t=this,e=this.props,r=e.placeholder,n=e.autofocus,o=e.clearSearch,a=e.withContainer,c=e.classNames.container,p=e.classNames.input,f=e.classNames.clearSearch,d=e.template.clearSearch,h=e.store.getCurrentQuery(),_=h.getQueryText(),y=e.htmlNodeInheritProps,g=h.areAutocompleteEnabled(),m=e.store.getCurrentResult()?e.store.getCurrentResult().getAutocomplete():null,v=g?function(e){return t.handleKeyDown(e)}:function(e){return t.doNothing(e)},E=g?function(e){return t.replaceWithAutocomplete(e)}:function(e){return t.doNothing(e)},b=g?"position: relative; top: 0px; left: 0px; background-color: transparent; border-color: transparent;":"",A=g?"autocompletable":"";this.dispatchQueryStringEvent(e,2e3);var S=(0,s.h)("input",i({type:"text",className:"as-searchInput__input ".concat(p," ").concat(A),placeholder:r,autofocus:n},y,{onInput:function(e){return t.handleSearch(e.target.value)},value:_,style:b,onKeyDown:v,onTouchStart:E,ref:this.inputRef}));return g&&(S=(0,s.h)("div",{style:"position: relative"},(0,s.h)(l.default,{autocomplete:m,queryText:_,inputClassName:p}),S)),a&&(S=(0,s.h)("div",{className:"as-searchInput ".concat(c)},S,o&&_&&0!==_.length?(0,s.h)("div",{className:"as-searchInput__clearSearch ".concat(f),onClick:this.clearSearch},(0,s.h)(u.default,{template:d,dictionary:e.dictionary})):null)),S},e}(s.Component);p.defaultProps={placeholder:"",autofocus:!1,autocomplete:!1,startSearchOn:0,clearSearch:!0,withContainer:!0,searchableFields:[],speechRecognition:!1,classNames:{container:"",input:"",clearSearch:""},template:{clearSearch:"x",speechRecognition:"{S}"}},e.default=p},5635:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e=t.store.getCurrentQuery();this.setState((function(t){return{query:e}}))},e.prototype.render=function(){var t=null==this.state.query?"":JSON.stringify(this.state.query.toArray());return(0,i.h)("div",null,t)},e}(i.Component);e.default=s},8355:(t,e,r)=>{"use strict";e.__esModule=!0,e.onChangeSearchAction=e.initialSortBySetup=void 0;var n=r(9913),o=r(803),i=r(5544),s=r(2634);e.initialSortBySetup=function(t,e,r){var a=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)),u=i.default.object(e);(0,s.applySortByToQuery)(u,r),u.page=1,a.dispatch("UPDATE_APISEARCH_SETUP",{query:u})},e.onChangeSearchAction=function(t,e,r,a){window.postMessage({name:"apisearch_scroll_top"},"*");var u=i.default.object(e);(0,s.applySortByToQuery)(u,a),u.page=1;var l=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));r.query(u).then((function(t){l.dispatch("RENDER_FETCHED_DATA",{query:u,result:t})})).catch((function(t){}))}},5929:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(8355),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleChange=function(t){var r=e.props,n=r.environmentId,o=r.store.getCurrentQuery(),i=r.repository,a=t.target.value;e.setState({value:a}),(0,s.onChangeSearchAction)(n,o,i,a)},e}return o(e,t),e.prototype.componentWillMount=function(){var t=this.props,e=t.environmentId,r=t.options,n=t.store.getCurrentQuery(),o=r[0].value;this.setState({value:o,visible:!1}),(0,s.initialSortBySetup)(e,n,o)},e.prototype.componentWillReceiveProps=function(t){var e=t.store.getCurrentQuery().getSortBy().getFirstSortAsString(),r=null!=t.store.getCurrentResult()&&t.store.getCurrentResult().getTotalHits()>0;this.state.value===e&&this.state.visible===r||this.setState((function(t){return{value:e,visible:r}}))},e.prototype.render=function(t,e){var r=t.classNames.container,n=t.classNames.select;if(e.visible){var o=t.options;return t.store.getCurrentQuery().toArray().coordinate||(o=o.filter((function(t){return"distance"!==t.value}))),(0,i.h)("div",{className:"as-sortBy ".concat(r)},(0,i.h)("select",{className:"as-sortBy__selector ".concat(n),onChange:this.handleChange,value:e.value},o.map((function(t){return(0,i.h)("option",{value:t.value},t.name)}))))}},e}(i.Component);a.defaultProps={classNames:{container:"",select:""}},e.default=a},2634:(t,e,r)=>{"use strict";e.__esModule=!0,e.applySortByToQuery=void 0;var n=r(5059);e.applySortByToQuery=function(t,e){var r,o={field:(r=e.split(":"))[0],sort:r[1]},i=n.default.createEmptySortBy();return"distance"===o.field?i.byValue({type:n.SORT_BY_TYPE_DISTANCE,unit:o.sort?o.sort:"km"}):"score"===o.field?i.byValue(n.SORT_BY_SCORE):i.byFieldValue(o.field,o.sort),t.sortBy(i),t}},5449:(t,e,r)=>{"use strict";e.__esModule=!0,e.enableSuggestions=void 0;var n=r(9913),o=r(803),i=r(5544);e.enableSuggestions=function(t,e,r){var s=i.default.object(e);r>0&&s.setNumberOfSuggestions(r),o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:s})}},6647:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(1828),a=r(676),u=r(6761),l=r(5449),c=r(3701),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleClick=function(t){var r=e.props;"string"==typeof t&&(t=t.replace(//g,"").replace(/<\/em>/g,"")),(0,a.onWordClickAction)(r.environmentId,r.store.getCurrentQuery(),r.repository,t)},e}return o(e,t),e.prototype.componentDidMount=function(){this.highlight()},e.prototype.componentDidUpdate=function(){this.highlight()},e.prototype.highlight=function(){var t=this.props.store.getCurrentQuery().getQueryText();if(""!==t)for(var e=document.getElementsByClassName("as-suggestions"),r=0;r0?"":"suggestions-empty",l=t.template.top,p=t.template.item,f=this;return(0,i.h)("div",{className:"as-suggestions ".concat(n," ").concat(u)},(0,i.h)(c.default,{template:l,className:"as-suggestions__top ".concat(o),dictionary:this.props.dictionary}),(0,i.h)("div",{className:"as-suggestions__itemsList ".concat(s)},e.words.map((function(t){var e={word:t};return(0,i.h)("div",{className:"as-suggestions__item ".concat(a),onClick:function(e){e.stopPropagation(),e.preventDefault(),f.handleClick(t)}},(0,i.h)(c.default,{template:p,data:e,dictionary:r.props.dictionary}))}))))},e}(i.Component);p.defaultProps={classNames:{container:"",top:"",itemsList:"",item:""},template:{top:null,item:u.defaultItemTemplate}},e.default=p},6761:(t,e)=>{"use strict";e.__esModule=!0,e.defaultItemTemplate=void 0,e.defaultItemTemplate='\n {{word}}\n'},3701:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";e.__esModule=!0;var r=function(){function t(){}return t.trans=function(t,e){var r,n,o,i=[];try{i=JSON.parse(t)}catch(n){return null!==(r=e[t])&&void 0!==r?r:t}var s=null!==(n=i[0])&&void 0!==n?n:t;s=null!==(o=e[s])&&void 0!==o?o:s;for(var a=1;a<=i.length;a++)s=s.replace("$"+a,i[a]);return s},t}();e.default=r},6526:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&(e[o]=i)}},e.prototype.fromUrlObject=function(t,e){var r,n=this.component.props.filterName,o=e.aggregations[n],i=null!==(r=t[this.component.props.filterField])&&void 0!==r?r:t[n];void 0!==o&&void 0!==i&&Array.isArray(i)&&i.length>0&&(void 0===e.filters&&(e.filters={}),e.filters[n]={field:"indexed_metadata."+this.component.props.filterField,values:i})},e.prototype.reset=function(t){var e=this.component.props.filterName;void 0!==t.filters&&"object"==typeof t.filters&&void 0!==t.filters[e]&&delete t.filters[e]},e}(r(696).default);e.default=function(t){return new u(t)}},5376:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)if(6===i.application_type){var a=(0,u.getShadowFilterValuesFromQuery)(t,r,!1);e[o]={l:a,v:i.values}}else e[o]=s}},e.prototype.fromUrlObject=function(t,e){var r,n=this.component.props.filterName,o=e.aggregations[n],i=null!==(r=t[this.component.props.filterField])&&void 0!==r?r:t[n],a=Object.keys(this.component.props.ranges).length>0?"range":"field";if(void 0!==o&&void 0!==i&&(Array.isArray(i)&&i.length>0||"object"==typeof i&&Object.keys(i).length>0)){void 0===e.filters&&(e.filters={});var u=this.component.props.applicationType,l="indexed_metadata."+this.component.props.filterField;if(6===u){var c=i;i=c.v;for(var p=c.l,f=0;f0&&(e[n]=o)}},e.prototype.fromUrlObject=function(t,e){var r,n=this.component.props.filterName,o=null!==(r=t[this.component.props.filterField])&&void 0!==r?r:t[n];void 0!==o&&Array.isArray(o)&&o.length>0&&(void 0===e.filters&&(e.filters={}),e.filters[n]={field:"indexed_metadata."+this.component.props.filterField,values:o,filter_type:"range"})},e.prototype.reset=function(t){var e=this.component.props.filterName;void 0!==t.filters&&"object"==typeof t.filters&&void 0!==t.filters[e]&&delete t.filters[e]},e}(r(696).default);e.default=function(t){return new u(t)}},8299:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";e.__esModule=!0;var r=function(){function t(){}return t.prototype.withConfig=function(t){"withConfig"in this.component&&this.component.withConfig(t)},t.prototype.toUrlObject=function(t,e){},t.prototype.fromUrlObject=function(t,e){},t.prototype.reset=function(t){},t.prototype.normalizeQuery=function(t,e){},t.prototype.initialSetup=function(t,e,r){},t}();e.default=r},9487:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(1821),o=r(5376),i=r(5768),s=r(5538),a=r(6092),u=r(747),l=r(8299),c=r(5107),p=r(2638),f=r(6600),d=r(4743),h=r(9149),_=r(6526),y=r(762);e.default={searchInput:p.default,clearFilters:o.default,multipleFilter:s.default,sortBy:d.default,information:i.default,result:c.default,pagination:a.default,checkboxFilter:n.default,rangeFilter:u.default,reload:l.default,snapshot:f.default,suggestions:h.default,banner:_.default,priorityFilter:y.default}},6172:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Md5:()=>n,Md5FileHasher:()=>o,ParallelHasher:()=>i});class n{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,e=!1){return this.onePassHasher.start().appendStr(t).end(e)}static hashAsciiStr(t,e=!1){return this.onePassHasher.start().appendAsciiStr(t).end(e)}static _hex(t){const e=n.hexChars,r=n.hexOut;let o,i,s,a;for(a=0;a<4;a+=1)for(i=8*a,o=t[a],s=0;s<8;s+=2)r[i+1+s]=e.charAt(15&o),o>>>=4,r[i+0+s]=e.charAt(15&o),o>>>=4;return r.join("")}static _md5cycle(t,e){let r=t[0],n=t[1],o=t[2],i=t[3];r+=(n&o|~n&i)+e[0]-680876936|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[1]-389564586|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[2]+606105819|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[3]-1044525330|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[4]-176418897|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[5]+1200080426|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[6]-1473231341|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[7]-45705983|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[8]+1770035416|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[9]-1958414417|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[10]-42063|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[11]-1990404162|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[12]+1804603682|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[13]-40341101|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[14]-1502002290|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[15]+1236535329|0,n=(n<<22|n>>>10)+o|0,r+=(n&i|o&~i)+e[1]-165796510|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[6]-1069501632|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[11]+643717713|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[0]-373897302|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[5]-701558691|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[10]+38016083|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[15]-660478335|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[4]-405537848|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[9]+568446438|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[14]-1019803690|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[3]-187363961|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[8]+1163531501|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[13]-1444681467|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[2]-51403784|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[7]+1735328473|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[12]-1926607734|0,n=(n<<20|n>>>12)+o|0,r+=(n^o^i)+e[5]-378558|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[8]-2022574463|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[11]+1839030562|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[14]-35309556|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[1]-1530992060|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[4]+1272893353|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[7]-155497632|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[10]-1094730640|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[13]+681279174|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[0]-358537222|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[3]-722521979|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[6]+76029189|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[9]-640364487|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[12]-421815835|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[15]+530742520|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[2]-995338651|0,n=(n<<23|n>>>9)+o|0,r+=(o^(n|~i))+e[0]-198630844|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[7]+1126891415|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[14]-1416354905|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[5]-57434055|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[12]+1700485571|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[3]-1894986606|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[10]-1051523|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[1]-2054922799|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[8]+1873313359|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[15]-30611744|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[6]-1560198380|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[13]+1309151649|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[4]-145523070|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[11]-1120210379|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[2]+718787259|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[9]-343485551|0,n=(n<<21|n>>>11)+o|0,t[0]=r+t[0]|0,t[1]=n+t[1]|0,t[2]=o+t[2]|0,t[3]=i+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(n.stateIdentity),this}appendStr(t){const e=this._buffer8,r=this._buffer32;let o,i,s=this._bufferLength;for(i=0;i>>6),e[s++]=63&o|128;else if(o<55296||o>56319)e[s++]=224+(o>>>12),e[s++]=o>>>6&63|128,e[s++]=63&o|128;else{if(o=1024*(o-55296)+(t.charCodeAt(++i)-56320)+65536,o>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");e[s++]=240+(o>>>18),e[s++]=o>>>12&63|128,e[s++]=o>>>6&63|128,e[s++]=63&o|128}s>=64&&(this._dataLength+=64,n._md5cycle(this._state,r),s-=64,r[0]=r[16])}return this._bufferLength=s,this}appendAsciiStr(t){const e=this._buffer8,r=this._buffer32;let o,i=this._bufferLength,s=0;for(;;){for(o=Math.min(t.length-s,64-i);o--;)e[i++]=t.charCodeAt(s++);if(i<64)break;this._dataLength+=64,n._md5cycle(this._state,r),i=0}return this._bufferLength=i,this}appendByteArray(t){const e=this._buffer8,r=this._buffer32;let o,i=this._bufferLength,s=0;for(;;){for(o=Math.min(t.length-s,64-i);o--;)e[i++]=t[s++];if(i<64)break;this._dataLength+=64,n._md5cycle(this._state,r),i=0}return this._bufferLength=i,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const e=t.buffer,r=t.state,n=this._state;let o;for(this._dataLength=t.length,this._bufferLength=t.buflen,n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],o=0;o>2);this._dataLength+=e;const s=8*this._dataLength;if(r[e]=128,r[e+1]=r[e+2]=r[e+3]=0,o.set(n.buffer32Identity.subarray(i),i),e>55&&(n._md5cycle(this._state,o),o.set(n.buffer32Identity)),s<=4294967295)o[14]=s;else{const t=s.toString(16).match(/(.*?)(.{0,8})$/);if(null===t)return;const e=parseInt(t[2],16),r=parseInt(t[1],16)||0;o[14]=e,o[15]=r}return n._md5cycle(this._state,o),t?this._state:n._hex(this._state)}}if(n.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),n.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.hexChars="0123456789abcdef",n.hexOut=[],n.onePassHasher=new n,"5d41402abc4b2a76b9719d911017c592"!==n.hashStr("hello"))throw new Error("Md5 self test failed.");class o{constructor(t,e=!0,r=1048576){this._callback=t,this._async=e,this._partSize=r,this._configureReader()}hash(t){const e=this;e._blob=t,e._part=0,e._md5=new n,e._processPart()}_fail(){this._callback({success:!1,result:"data read failed"})}_hashData(t){let e=this;e._md5.appendByteArray(new Uint8Array(t.target.result)),e._part*e._partSize>=e._blob.size?e._callback({success:!0,result:e._md5.end()}):e._processPart()}_processPart(){const t=this;let e,r=0;t._part+=1,t._blob.size>t._partSize?(r=t._part*t._partSize,r>t._blob.size&&(r=t._blob.size),e=t._blob.slice((t._part-1)*t._partSize,r)):e=t._blob,t._async?t._reader.readAsArrayBuffer(e):setTimeout((()=>{try{t._hashData({target:{result:t._reader.readAsArrayBuffer(e)}})}catch(e){t._fail()}}),0)}_configureReader(){const t=this;t._async?(t._reader=new FileReader,t._reader.onload=t._hashData.bind(t),t._reader.onerror=t._fail.bind(t),t._reader.onabort=t._fail.bind(t)):t._reader=new FileReaderSync}}class i{constructor(t,e){this._queue=[],this._ready=!0;const r=this;Worker?(r._hashWorker=new Worker(t,e),r._hashWorker.onmessage=r._recievedMessage.bind(r),r._hashWorker.onerror=t=>{r._ready=!1,console.error("Hash worker failure",t)}):(r._ready=!1,console.error("Web Workers are not supported in this browser"))}hash(t){const e=this;let r;return r=new Promise(((r,n)=>{e._queue.push({blob:t,resolve:r,reject:n}),e._processNext()})),r}terminate(){this._ready=!1,this._hashWorker.terminate()}_processNext(){this._ready&&!this._processing&&this._queue.length>0&&(this._processing=this._queue.pop(),this._hashWorker.postMessage(this._processing.blob))}_recievedMessage(t){var e,r;const n=t.data;n.success?null===(e=this._processing)||void 0===e||e.resolve(n.result):null===(r=this._processing)||void 0===r||r.reject(n.result),this._processing=void 0,this._processNext()}}},5215:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__assign:()=>i,__asyncDelegator:()=>E,__asyncGenerator:()=>v,__asyncValues:()=>b,__await:()=>m,__awaiter:()=>c,__classPrivateFieldGet:()=>O,__classPrivateFieldSet:()=>I,__createBinding:()=>f,__decorate:()=>a,__exportStar:()=>d,__extends:()=>o,__generator:()=>p,__importDefault:()=>T,__importStar:()=>S,__makeTemplateObject:()=>A,__metadata:()=>l,__param:()=>u,__read:()=>_,__rest:()=>s,__spread:()=>y,__spreadArrays:()=>g,__values:()=>h});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function o(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function u(t,e){return function(r,n){e(r,n,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function p(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var t=[],e=0;e1||a(t,e)}))})}function a(t,e){try{(r=o[t](e)).value instanceof m?Promise.resolve(r.value.v).then(u,l):c(i[0][2],r)}catch(t){c(i[0][3],t)}var r}function u(t){a("next",t)}function l(t){a("throw",t)}function c(t,e){t(e),i.shift(),i.length&&a(i[0][0],i[0][1])}}function E(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,o){e[n]=t[n]?function(e){return(r=!r)?{value:m(t[n](e)),done:"return"===n}:o?o(e):e}:o}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=h(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,o){!function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)}(n,o,(e=t[r](e)).done,e.value)}))}}}function A(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function S(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function T(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function I(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},6425:(t,e,r)=>{"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),t=>{const e=o.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const u=t=>(t=t.toLowerCase(),e=>s(e)===t),l=t=>e=>typeof e===t,{isArray:c}=Array,p=l("undefined"),f=u("ArrayBuffer"),d=l("string"),h=l("function"),_=l("number"),y=t=>null!==t&&"object"==typeof t,g=t=>{if("object"!==s(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},m=u("Date"),v=u("File"),E=u("Blob"),b=u("FileList"),A=u("URLSearchParams");function S(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),c(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,I=t=>!p(t)&&t!==O,w=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const C=u("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),N=u("RegExp"),P=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};S(r,((r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)})),Object.defineProperties(t,n)},U="abcdefghijklmnopqrstuvwxyz",x="0123456789",D={DIGIT:x,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+x},L=u("AsyncFunction");var M={isArray:c,isArrayBuffer:f,isBuffer:function(t){return null!==t&&!p(t)&&null!==t.constructor&&!p(t.constructor)&&h(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||h(t.append)&&("formdata"===(e=s(t))||"object"===e&&h(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e},isString:d,isNumber:_,isBoolean:t=>!0===t||!1===t,isObject:y,isPlainObject:g,isUndefined:p,isDate:m,isFile:v,isBlob:E,isRegExp:N,isFunction:h,isStream:t=>y(t)&&h(t.pipe),isURLSearchParams:A,isTypedArray:w,isFileList:b,forEach:S,merge:function t(){const{caseless:e}=I(this)&&this||{},r={},n=(n,o)=>{const i=e&&T(r,o)||o;g(r[i])&&g(n)?r[i]=t(r[i],n):g(n)?r[i]=t({},n):c(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{r&&h(e)?t[o]=n(e,r):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,s,a;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)a=o[s],n&&!n(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==r&&i(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:u,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(c(t))return t;let e=t.length;if(!_(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:C,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:P,freezeMethods:t=>{P(t,((e,r)=>{if(h(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];h(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return c(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:T,global:O,isContextDefined:I,ALPHABET:D,generateString:(t=16,e=D.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&h(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(y(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=c(t)?[]:{};return S(t,((t,e)=>{const i=r(t,n+1);!p(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:L,isThenable:t=>t&&(y(t)||h(t))&&h(t.then)&&h(t.catch)};function j(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}M.inherits(j,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const k=j.prototype,B={};function Y(t){return M.isPlainObject(t)||M.isArray(t)}function H(t){return M.endsWith(t,"[]")?t.slice(0,-2):t}function q(t,e,r){return t?t.concat(e).map((function(t,e){return t=H(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{B[t]={value:t}})),Object.defineProperties(j,B),Object.defineProperty(k,"isAxiosError",{value:!0}),j.from=(t,e,r,n,o,i)=>{const s=Object.create(k);return M.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),j.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const Q=M.toFlatObject(M,{},null,(function(t){return/^is[A-Z]/.test(t)}));function G(t,e,r){if(!M.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!M.isUndefined(e[t])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(e);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(M.isDate(t))return t.toISOString();if(!a&&M.isBlob(t))throw new j("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(t)||M.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,o){let a=t;if(t&&!o&&"object"==typeof t)if(M.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(M.isArray(t)&&function(t){return M.isArray(t)&&!t.some(Y)}(t)||(M.isFileList(t)||M.endsWith(r,"[]"))&&(a=M.toArray(t)))return r=H(r),a.forEach((function(t,n){!M.isUndefined(t)&&null!==t&&e.append(!0===s?q([r],n,i):null===s?r:r+"[]",u(t))})),!1;return!!Y(t)||(e.append(q(o,r,i),u(t)),!1)}const c=[],p=Object.assign(Q,{defaultVisitor:l,convertValue:u,isVisitable:Y});if(!M.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!M.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),M.forEach(r,(function(r,i){!0===(!(M.isUndefined(r)||null===r)&&o.call(e,r,M.isString(i)?i.trim():i,n,p))&&t(r,n?n.concat(i):[i])})),c.pop()}}(t),e}function V(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function W(t,e){this._pairs=[],t&&G(t,this,e)}const z=W.prototype;function J(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $(t,e,r){if(!e)return t;const n=r&&r.encode||J,o=r&&r.serialize;let i;if(i=o?o(e,r):M.isURLSearchParams(e)?e.toString():new W(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}z.append=function(t,e){this._pairs.push([t,e])},z.toString=function(t){const e=t?function(e){return t.call(this,e,V)}:V;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var K=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},X={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:W,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(rt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(rt)<0);var rt;const nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:nt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,r,n,o){let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=t.length;return i=!i&&M.isArray(n)?n.length:i,a?(M.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&M.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&M.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return M.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null}const st={transitional:X,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=M.isObject(t);if(o&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return n?JSON.stringify(it(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return G(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return ot.isNode&&M.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=M.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return G(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(M.isString(t))try{return(0,JSON.parse)(t),M.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||st.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&M.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw j.from(t,j.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],(t=>{st.headers[t]={}}));var at=st;const ut=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lt=Symbol("internals");function ct(t){return t&&String(t).trim().toLowerCase()}function pt(t){return!1===t||null==t?t:M.isArray(t)?t.map(pt):String(t)}function ft(t,e,r,n,o){return M.isFunction(n)?n.call(this,e,r):(o&&(e=r),M.isString(e)?M.isString(n)?-1!==e.indexOf(n):M.isRegExp(n)?n.test(e):void 0:void 0)}class dt{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=ct(e);if(!o)throw new Error("header name must be a non-empty string");const i=M.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=pt(t))}const i=(t,e)=>M.forEach(t,((t,r)=>o(t,r,e)));return M.isPlainObject(t)||t instanceof this.constructor?i(t,e):M.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&ut[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=ct(t)){const r=M.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(M.isFunction(e))return e.call(this,t,r);if(M.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ct(t)){const r=M.findKey(this,t);return!(!r||void 0===this[r]||e&&!ft(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=ct(t)){const o=M.findKey(r,t);!o||e&&!ft(0,r[o],o,e)||(delete r[o],n=!0)}}return M.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!ft(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return M.forEach(this,((n,o)=>{const i=M.findKey(r,o);if(i)return e[i]=pt(n),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete e[o],e[s]=pt(n),r[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return M.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&M.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[lt]=this[lt]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=ct(t);e[n]||(function(t,e){const r=M.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return M.isArray(t)?t.forEach(n):n(t),this}}dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(dt.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),M.freezeMethods(dt);var ht=dt;function _t(t,e){const r=this||at,n=e||r,o=ht.from(n.headers);let i=n.data;return M.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function yt(t){return!(!t||!t.__CANCEL__)}function gt(t,e,r){j.call(this,null==t?"canceled":t,j.ERR_CANCELED,e,r),this.name="CanceledError"}M.inherits(gt,j,{__CANCEL__:!0});var mt=ot.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];M.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),M.isString(n)&&s.push("path="+n),M.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function vt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var Et=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=M.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};function bt(t,e){let r=0;const n=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),l=n[s];o||(o=u),r[i]=a,n[i]=u;let c=s,p=0;for(;c!==i;)p+=r[c++],c%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-o{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,u=n(a);r=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};l[e?"download":"upload"]=!0,t(l)}}const At={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=ht.from(t.headers).normalize();let i,s,{responseType:a,withXSRFToken:u}=t;function l(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(M.isFormData(n))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const p=vt(t.baseURL,t.url);function f(){if(!c)return;const n=ht.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new j("Request failed with status code "+r.status,[j.ERR_BAD_REQUEST,j.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),l()}),(function(t){r(t),l()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),$(p,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(f)},c.onabort=function(){c&&(r(new j("Request aborted",j.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new j("Network Error",j.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||X;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new j(e,n.clarifyTimeoutError?j.ETIMEDOUT:j.ECONNABORTED,t,c)),c=null},ot.hasStandardBrowserEnv&&(u&&M.isFunction(u)&&(u=u(t)),u||!1!==u&&Et(p))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&mt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&M.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),M.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),a&&"json"!==a&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",bt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",bt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{c&&(r(!e||e.type?new gt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(p);d&&-1===ot.protocols.indexOf(d)?r(new j("Unsupported protocol "+d+":",j.ERR_BAD_REQUEST,t)):c.send(n||null)}))}};M.forEach(At,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Tt=t=>M.isFunction(t)||null===t||!1===t;var Ot=t=>{t=M.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new j("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function It(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new gt(null,t)}function wt(t){return It(t),t.headers=ht.from(t.headers),t.data=_t.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ot(t.adapter||at.adapter)(t).then((function(e){return It(t),e.data=_t.call(t,t.transformResponse,e),e.headers=ht.from(e.headers),e}),(function(e){return yt(e)||(It(t),e&&e.response&&(e.response.data=_t.call(t,t.transformResponse,e.response),e.response.headers=ht.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof ht?t.toJSON():t;function Ct(t,e){e=e||{};const r={};function n(t,e,r){return M.isPlainObject(t)&&M.isPlainObject(e)?M.merge.call({caseless:r},t,e):M.isPlainObject(e)?M.merge({},e):M.isArray(e)?e.slice():e}function o(t,e,r){return M.isUndefined(e)?M.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!M.isUndefined(e))return n(void 0,e)}function s(t,e){return M.isUndefined(e)?M.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return M.forEach(Object.keys(Object.assign({},t,e)),(function(n){const i=u[n]||o,s=i(t[n],e[n],n);M.isUndefined(s)&&i!==a||(r[n]=s)})),r}const Ft={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ft[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Nt={};Ft.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.7] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new j(n(o," has been removed"+(e?" in "+e:"")),j.ERR_DEPRECATED);return e&&!Nt[o]&&(Nt[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var Pt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new j("options must be an object",j.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const e=t[i],r=void 0===e||s(e,i,t);if(!0!==r)throw new j("option "+i+" must be "+r,j.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new j("Unknown option "+i,j.ERR_BAD_OPTION)}},validators:Ft};const Ut=Pt.validators;class xt{constructor(t){this.defaults=t,this.interceptors={request:new K,response:new K}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ct(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;void 0!==r&&Pt.assertOptions(r,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),null!=n&&(M.isFunction(n)?e.paramsSerializer={serialize:n}:Pt.assertOptions(n,{encode:Ut.function,serialize:Ut.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&M.merge(o.common,o[e.method]);o&&M.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=ht.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let c,p=0;if(!a){const t=[wt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,u),c=t.length,l=Promise.resolve(e);p{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new gt(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Lt((function(e){t=e})),cancel:t}}}var Mt=Lt;const jt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jt).forEach((([t,e])=>{jt[e]=t}));var kt=jt;const Bt=function t(e){const r=new Dt(e),o=n(Dt.prototype.request,r);return M.extend(o,Dt.prototype,r,{allOwnKeys:!0}),M.extend(o,r,null,{allOwnKeys:!0}),o.create=function(r){return t(Ct(e,r))},o}(at);Bt.Axios=Dt,Bt.CanceledError=gt,Bt.CancelToken=Mt,Bt.isCancel=yt,Bt.VERSION="1.6.7",Bt.toFormData=G,Bt.AxiosError=j,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=function(t){return function(e){return t.apply(null,e)}},Bt.isAxiosError=function(t){return M.isObject(t)&&!0===t.isAxiosError},Bt.mergeConfig=Ct,Bt.AxiosHeaders=ht,Bt.formToJSON=t=>it(M.isHTMLForm(t)?new FormData(t):t),Bt.getAdapter=Ot,Bt.HttpStatusCode=kt,Bt.default=Bt,t.exports=Bt}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";var t=n,e=r(6798);t.default=e.default})(),n.default})())); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apisearchUI=e():t.apisearchUI=e()}(self,(()=>(()=>{var t={9347:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(5215),o=r(5245),i=r(4148),s=r(4148),a=r(4148),u=r(8699),l=r(1802),c=r(5584),p=r(2299),f=r(76),d=r(6929),h=function(){function t(){}return t.createRepository=function(e){t.ensureRepositoryConfigIsValid(e),e.options=n.__assign({api_version:"v1",override_queries:!0,timeout:3e3},e.options);var r=void 0!==e.options.http_client?e.options.http_client:new o.AxiosClient(e.options.endpoint,e.options.api_version,e.options.timeout,e.options.override_queries);return e.options.use_cache&&(r=new d.CacheClient(r)),new l.HttpRepository(r,e.app_id,e.index_id,e.token,new f.Transformer)},t.ensureRepositoryConfigIsValid=function(e){t.ensureIsDefined(e.app_id,"app_id"),t.ensureIsDefined(e.index_id,"index_id"),t.ensureIsDefined(e.token,"token"),t.ensureIsDefined(e.options.endpoint,"options.endpoint")},t.ensureIsDefined=function(t,e){if(void 0===t)throw new TypeError(e+" parameter must be defined.")},t.createQueryLocated=function(t,e,r,n){return void 0===r&&(r=i.QUERY_DEFAULT_PAGE),void 0===n&&(n=s.QUERY_DEFAULT_SIZE),a.Query.createLocated(t,e,r,n)},t.createQuery=function(t,e,r){return void 0===e&&(e=i.QUERY_DEFAULT_PAGE),void 0===r&&(r=s.QUERY_DEFAULT_SIZE),a.Query.create(t,e,r)},t.createQueryMatchAll=function(){return a.Query.createMatchAll()},t.createQueryByUUID=function(t){return a.Query.createByUUID(t)},t.createQueryByUUIDs=function(){for(var t=[],e=0;e{"use strict";e.__esModule=!0,e.Config=e.DEFAULT_REPLICAS=e.DEFAULT_SHARDS=void 0;var n=r(5787);e.DEFAULT_SHARDS=1,e.DEFAULT_REPLICAS=0;var o=function(){function t(t,r,n,o){void 0===t&&(t=null),void 0===r&&(r=!0),void 0===n&&(n=e.DEFAULT_SHARDS),void 0===o&&(o=e.DEFAULT_REPLICAS),this.synonyms=[],this.language=t,this.storeSearchableMetadata=r,this.shards=n,this.replicas=o}return t.prototype.getLanguage=function(){return this.language},t.prototype.shouldSearchableMetadataBeStored=function(){return this.storeSearchableMetadata},t.prototype.addSynonym=function(t){this.synonyms.push(t)},t.prototype.getSynonyms=function(){return this.synonyms},t.prototype.getShards=function(){return this.shards},t.prototype.getReplicas=function(){return this.replicas},t.prototype.toArray=function(){return{language:this.language,store_searchable_metadata:this.storeSearchableMetadata,synonyms:this.synonyms.map((function(t){return t.toArray()})),shards:this.shards,replicas:this.replicas}},t.createFromArray=function(r){var o=new t(r.language?r.language:null,"boolean"!=typeof r.store_searchable_metadata||r.store_searchable_metadata);return r.synonyms instanceof Array&&r.synonyms.length>0&&(o.synonyms=r.synonyms.map((function(t){return n.Synonym.createFromArray(t)}))),o.shards="number"==typeof r.shards?r.shards:e.DEFAULT_SHARDS,o.replicas="number"==typeof r.replicas?r.replicas:e.DEFAULT_REPLICAS,o},t}();e.Config=o},5787:(t,e)=>{"use strict";e.__esModule=!0,e.Synonym=void 0;var r=function(){function t(t){this.words=t}return t.prototype.getWords=function(){return this.words},t.createbyWords=function(e){return new t(e)},t.prototype.toArray=function(){return{words:this.words}},t.createFromArray=function(e){return new t(e.words instanceof Object?e.words:[])},t.prototype.expand=function(){return this.words.join(",")},t}();e.Synonym=r},8864:(t,e,r)=>{"use strict";e.__esModule=!0,e.ConnectionError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 500},e}(r(109).ErrorWithMessage);e.ConnectionError=o},109:(t,e)=>{"use strict";e.__esModule=!0,e.ErrorWithMessage=void 0;e.ErrorWithMessage=function(t){this.message=t}},7214:(t,e,r)=>{"use strict";e.__esModule=!0,e.EventError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.throwEndpointNotAvailable=function(){return new e("Endpoint not available")},e}(r(109).ErrorWithMessage);e.EventError=o},5265:(t,e,r)=>{"use strict";e.__esModule=!0,e.ForbiddenError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 403},e.createAppIdIsRequiredException=function(){return new e("AppId query parameter MUST be defined with a valid value")},e.createIndexIsRequiredException=function(){return new e("Index query parameter MUST be defined with a valid value")},e.createTokenIsRequiredException=function(){return new e("Token query parameter MUST be defined with a valid value")},e}(r(109).ErrorWithMessage);e.ForbiddenError=o},1062:(t,e,r)=>{"use strict";e.__esModule=!0,e.InvalidFormatError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 400},e.itemRepresentationNotValid=function(){return new e("Item representation not valid. Expecting Item array serialized but found malformed data")},e.itemUUIDRepresentationNotValid=function(){return new e("Item UUID representation not valid. Expecting UUID array serialized but found malformed data")},e.composedItemUUIDNotValid=function(){return new e("A composed UUID should always follow this format: {id}~{type}.")},e.querySortedByDistanceWithoutCoordinate=function(){return new e("In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()")},e.queryFormatNotValid=function(){return new e("Query Format not valid. Expecting a Query serialized but found malformed data")},e.coordinateFormatNotValid=function(){return new e("A Coordinate should always contain a lat (Latitude) and a lon (Longitude)")},e.configFormatNotValid=function(){return new e("Config Format not valid. Expecting a Config serialized but found malformed data")},e.tokenFormatNotValid=function(){return new e("Token Format not valid. Expecting a Token serialized but found malformed data")},e.indexFormatNotValid=function(){return new e("Index Format not valid. Expecting an Index serialized but found malformed data")},e.indexUUIDFormatNotValid=function(){return new e("IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data")},e.appUUIDFormatNotValid=function(){return new e("AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data")},e.campaignFormatNotValid=function(){return new e("Campaign Format not valid. Expecting a Campaign serialized but found malformed data")},e.changesFormatNotValid=function(){return new e("Changes Format not valid. Expecting a Changes serialized but found malformed data")},e.boostClauseFormatNotValid=function(){return new e("Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data")},e.tokenUUIDFormatNotValid=function(){return new e("Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data")},e.userFormatNotValid=function(){return new e("User Format not valid. Expecting a User serialized but found malformed data")},e}(r(109).ErrorWithMessage);e.InvalidFormatError=o},748:(t,e,r)=>{"use strict";e.__esModule=!0,e.InvalidTokenError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 401},e.createInvalidTokenPermissions=function(t){return new e("Token "+t+"not valid")},e.createInvalidTokenMaxHitsPerQuery=function(t,r){return new e("Token "+t+"not valid. Max "+r+" hits allowed")},e}(r(109).ErrorWithMessage);e.InvalidTokenError=o},580:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResourceExistsError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 409},e.indexAvailable=function(){return new e("Index exists and cannot be created again")},e.eventsIndexAvailable=function(){return new e("Events index exists and cannot be created again")},e.logsIndexAvailable=function(){return new e("Logs index exists and cannot be created again")},e}(r(109).ErrorWithMessage);e.ResourceExistsError=o},1912:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResourceNotAvailableError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 404},e.indexNotAvailable=function(t){return new e("Index not available - "+t)},e.eventsIndexNotAvailable=function(t){return new e("Events not available - "+t)},e.logsIndexNotAvailable=function(t){return new e("Logs not available - "+t)},e.engineNotAvailable=function(t){return new e("Engine not available - "+t)},e}(r(109).ErrorWithMessage);e.ResourceNotAvailableError=o},6080:(t,e,r)=>{"use strict";e.__esModule=!0,e.UnknownError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.createUnknownError=function(){return new this("Unknown error.")},e}(r(109).ErrorWithMessage);e.UnknownError=o},5272:(t,e,r)=>{"use strict";e.__esModule=!0,e.UnsupportedContentTypeError=void 0;var n=r(5215),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getTransportableHTTPError=function(){return 415},e.createUnsupportedContentTypeException=function(){return new e("This content type is not accepted. Please use application/json")},e}(r(109).ErrorWithMessage);e.UnsupportedContentTypeError=o},5093:(t,e,r)=>{"use strict";e.__esModule=!0,e.Square=e.Polygon=e.CoordinateAndDistance=e.LocationRange=void 0;var n=r(5215),o=r(9367),i=function(){function t(){}return t.fromFilterObject=function(t){throw TypeError("Method not valid")},t.prototype.toArray=function(){return{type:this.getName(),data:this.toFilterObject()}},t.createFromArray=function(t){return"CoordinateAndDistance"==t.type?s.fromFilterObject(t.data):"Polygon"==t.type?a.fromFilterObject(t.data):"Square"==t.type?u.fromFilterObject(t.data):void 0},t}();e.LocationRange=i;var s=function(t){function e(e,r){var n=t.call(this)||this;return n.coordinate=e,n.distance=r,n}return n.__extends(e,t),e.prototype.toFilterObject=function(){return{coordinate:this.coordinate.toArray(),distance:this.distance}},e.prototype.getName=function(){return"CoordinateAndDistance"},e.fromFilterObject=function(t){return new e(o.Coordinate.createFromArray(t.coordinate),t.distance)},e}(i);e.CoordinateAndDistance=s;var a=function(t){function e(e){var r=t.call(this)||this;if(e.length<3)throw new Error("A polygon needs more than two coordinates.");return r.coordinates=e,r}return n.__extends(e,t),e.prototype.toFilterObject=function(){var t=[];for(var e in this.coordinates)t.push(this.coordinates[e].toArray());return{coordinates:t}},e.prototype.getName=function(){return"Polygon"},e.fromFilterObject=function(t){var r=[];for(var n in t.coordinates)r.push(o.Coordinate.createFromArray(t.coordinates[n]));return new e(r)},e}(i);e.Polygon=a;var u=function(t){function e(e,r){var n=t.call(this)||this;return n.topLeftCoordinate=e,n.bottomRightCoordinate=r,n}return n.__extends(e,t),e.prototype.toFilterObject=function(){return{top_left:this.topLeftCoordinate.toArray(),bottom_right:this.bottomRightCoordinate.toArray()}},e.prototype.getName=function(){return"Square"},e.fromFilterObject=function(t){return new e(o.Coordinate.createFromArray(t.top_left),o.Coordinate.createFromArray(t.bottom_right))},e}(i);e.Square=u},5245:(t,e,r)=>{"use strict";e.__esModule=!0,e.AxiosClient=void 0;var n=r(5215),o=r(6425),i=r(5059),s=r(6113),a=r(8609),u=function(t){function e(e,r,n,o){var i=t.call(this,r)||this;return i.host=e,i.timeout=n,i.overrideQueries=o,i.abortControllers={},i}return n.__extends(e,t),e.prototype.get=function(t,e,r,o,u){return void 0===o&&(o={}),void 0===u&&(u={}),n.__awaiter(this,void 0,void 0,(function(){var l,c,p,f;return n.__generator(this,(function(d){switch(d.label){case 0:t=t.replace(/^\/*|\/*$/g,""),t="/"+(this.version+"/"+t).replace(/^\/*|\/*$/g,""),"get"===(e=e.toLowerCase())&&this.overrideQueries&&this.abort(t,!0),l="get"===e?{}:{"Content-Encoding":"gzip","Content-Type":"application/json"},c={baseURL:this.host.replace(/\/*$/g,""),data:u,headers:l,method:e,timeout:this.timeout,transformRequest:[function(t){return JSON.stringify(t)}],url:t+"?"+s.Client.objectToUrlParameters(n.__assign(n.__assign({},o),{token:r.token})).replace(/#/g,"%23")},void 0!==this.abortControllers[t]&&(c.signal=this.abortControllers[t].signal),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,this.fetch(t,c,3)];case 2:return p=d.sent(),[2,new a.Response(p.status,p.data)];case 3:throw(f=d.sent()).response?new a.Response(f.response.status,f.response.data):new a.Response(i.ConnectionError.getTransportableHTTPError(),{message:f.message});case 4:return[2]}}))}))},e.prototype.abort=function(t,e){e||(t=t.replace(/^\/*|\/*$/g,""),t="/"+(this.version+"/"+t).replace(/^\/*|\/*$/g,"")),void 0!==this.abortControllers[t]&&this.abortControllers[t].abort(),this.generateAbortController(t)},e.prototype.generateAbortController=function(t){this.abortControllers[t]=new AbortController},e.prototype.fetch=function(t,e,r){return n.__awaiter(this,void 0,void 0,(function(){var i=this;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,o.default.request(e).then((function(t){return{data:t.data,status:t.status}})).catch((function(n){var o=n.response;if(void 0!==n.code&&"ECONNREFUSED"!==n.code&&"ECONNABORTED"!==n.code&&"ERR_BAD_REQUEST"!==n.code&&"Network Error"!==n.message)return{data:o.data,status:o.status};if(r<=0)throw n;return r-=1,i.fetch(t,e,r)}))];case 1:return[2,n.sent()]}}))}))},e}(s.Client);e.AxiosClient=u},6929:(t,e,r)=>{"use strict";e.__esModule=!0,e.CacheClient=void 0;var n=r(5215),o=r(6172),i=function(){function t(t){this.cache={},this.hits=0,this.httpClient=t}return t.prototype.flushCache=function(){this.cache={}},t.prototype.size=function(){return Object.keys(this.cache).length},t.prototype.getNumberOfHits=function(){return this.hits},t.prototype.get=function(t,e,r,i,s){return void 0===i&&(i={}),void 0===s&&(s={}),n.__awaiter(this,void 0,void 0,(function(){var a,u,l;return n.__generator(this,(function(n){switch(n.label){case 0:return"get"!==e?[2,this.httpClient.get(t,e,r,i,s)]:(a=o.Md5.hashStr(JSON.stringify({u:t,c:r,p:i,d:s})).toString(),this.cache[a]?[3,2]:(u=this.cache,l=a,[4,this.httpClient.get(t,e,r,i,s)]));case 1:return u[l]=n.sent(),[3,3];case 2:this.httpClient.abort(t,!1),this.hits++,n.label=3;case 3:return[2,this.cache[a]]}}))}))},t.prototype.abort=function(t,e){},t}();e.CacheClient=i},6113:(t,e)=>{"use strict";e.__esModule=!0,e.Client=void 0;var r=function(){function t(t){this.version=t.replace(/^\/*|\/*$/g,"")}return t.objectToUrlParameters=function(t){var e=[];for(var r in t)e.push(r+"="+t[r]);return e.join("&")},t}();e.Client=r},2113:(t,e)=>{"use strict";e.__esModule=!0,e.HttpClient=void 0;e.HttpClient=function(){}},8609:(t,e)=>{"use strict";e.__esModule=!0,e.Response=void 0;var r=function(){function t(t,e){this.code=t,this.body=e}return t.prototype.getCode=function(){return this.code},t.prototype.getBody=function(){return this.body},t}();e.Response=r},781:(t,e,r)=>{"use strict";e.__esModule=!0,e.AppUUID=void 0;var n=r(1062),o=function(){function t(t){if(t.indexOf("_")>=0)throw n.InvalidFormatError.appUUIDFormatNotValid();this.id=t}return t.createById=function(e){return new t(e)},t.prototype.getId=function(){return this.id},t.prototype.toArray=function(){return{id:this.id}},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).id)},t.prototype.composedUUID=function(){return this.id},t}();e.AppUUID=o},7112:(t,e)=>{"use strict";e.__esModule=!0,e.Changes=e.TYPE_ARRAY=e.TYPE_ARRAY_EXPECTS_ELEMENT=e.TYPE_ARRAY_ELEMENT_DELETE=e.TYPE_ARRAY_ELEMENT_ADD=e.TYPE_ARRAY_ELEMENT_UPDATE=e.TYPE_LITERAL=e.TYPE_VALUE=void 0,e.TYPE_VALUE=1,e.TYPE_LITERAL=4,e.TYPE_ARRAY_ELEMENT_UPDATE=8,e.TYPE_ARRAY_ELEMENT_ADD=16,e.TYPE_ARRAY_ELEMENT_DELETE=32,e.TYPE_ARRAY_EXPECTS_ELEMENT=24,e.TYPE_ARRAY=56;var r=function(){function t(){this.changes=[]}return t.prototype.addChange=function(t,r,n){void 0===n&&(n=e.TYPE_VALUE),this.changes.push({field:t,type:n,value:r})},t.prototype.updateElementFromList=function(t,r,n,o){this.changes.push({field:t,type:o|e.TYPE_ARRAY_ELEMENT_UPDATE,condition:r,value:n})},t.prototype.addElementInList=function(t,r,n){this.changes.push({field:t,type:n|e.TYPE_ARRAY_ELEMENT_ADD,value:r})},t.prototype.deleteElementFromList=function(t,r){this.changes.push({field:t,type:e.TYPE_ARRAY_ELEMENT_DELETE,condition:r})},t.prototype.getChanges=function(){return this.changes},t.create=function(){return new t},t.prototype.toArray=function(){return JSON.parse(JSON.stringify(this.changes))},t.createFromArray=function(e){e=JSON.parse(JSON.stringify(e));var r=t.create();return r.changes=e,r},t}();e.Changes=r},9367:(t,e,r)=>{"use strict";e.__esModule=!0,e.Coordinate=void 0;var n=r(1062),o=function(){function t(t,e){this.lat=t,this.lon=e}return t.prototype.getLatitude=function(){return this.lat},t.prototype.getLongitude=function(){return this.lon},t.prototype.toArray=function(){return{lat:this.lat,lon:this.lon}},t.createFromArray=function(e){if(void 0===e.lat||void 0===e.lon)throw n.InvalidFormatError.coordinateFormatNotValid();return new t(e.lat,e.lon)},t}();e.Coordinate=o},6285:(t,e,r)=>{"use strict";e.__esModule=!0,e.Index=void 0;var n=r(1062),o=r(2734),i=r(781),s=function(){function t(t,e,r,n,o){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===o&&(o="0kb"),this.uuid=t,this.appUUID=e,this.isOK=r,this.docCount=n,this.size=o}return t.prototype.getUUID=function(){return this.uuid},t.prototype.getAppUUID=function(){return this.appUUID},t.prototype.isOk=function(){return this.isOK},t.prototype.getDocCount=function(){return this.docCount},t.prototype.getSize=function(){return this.size},t.prototype.toArray=function(){return{uuid:this.uuid.toArray(),app_id:this.appUUID.toArray(),is_ok:this.isOK,doc_count:this.docCount,size:this.size}},t.createFromArray=function(e){if(void 0===e.uuid||void 0===e.app_id)throw n.InvalidFormatError.indexFormatNotValid();return new t(o.IndexUUID.createFromArray(e.uuid),i.AppUUID.createFromArray(e.app_id),void 0!==e.is_ok&&e.is_ok,void 0===e.doc_count?0:e.doc_count,void 0===e.size?"0kb":e.size)},t}();e.Index=s},2734:(t,e,r)=>{"use strict";e.__esModule=!0,e.IndexUUID=void 0;var n=r(1062),o=function(){function t(t){if(t.indexOf("_")>=0)throw n.InvalidFormatError.indexUUIDFormatNotValid();this.id=t}return t.createById=function(e){return new t(e)},t.prototype.getId=function(){return this.id},t.prototype.toArray=function(){return{id:this.id}},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).id)},t.prototype.composedUUID=function(){return this.id},t}();e.IndexUUID=o},9934:(t,e,r)=>{"use strict";e.__esModule=!0,e.Item=void 0;var n=r(5215),o=r(1062),i=r(9367),s=r(5301),a=r(781),u=r(2734),l=function(){function t(t,e,r,n,o,i,s){this.metadata={},this.indexedMetadata={},this.searchableMetadata={},this.exactMatchingMetadata=[],this.suggest=[],this.highlights={},this.promoted=!1,this.uuid=t,this.coordinate=e,this.metadata=r,this.indexedMetadata=n,this.searchableMetadata=o,this.exactMatchingMetadata=i,this.suggest=s}return t.create=function(e,r,n,o,i,s){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i=[]),void 0===s&&(s=[]),new t(e,null,r,n,o,i,s)},t.createLocated=function(e,r,n,o,i,s,a){return void 0===n&&(n={}),void 0===o&&(o={}),void 0===i&&(i={}),void 0===s&&(s=[]),void 0===a&&(a=[]),new t(e,r,n,o,i,s,a)},t.prototype.getUUID=function(){return this.uuid},t.prototype.getId=function(){return this.uuid.getId()},t.prototype.getType=function(){return this.uuid.getType()},t.prototype.getCoordinate=function(){return this.coordinate},t.prototype.getDistance=function(){return this.distance},t.prototype.getMetadata=function(){return this.metadata},t.prototype.setMetadata=function(t){this.metadata=t},t.prototype.addMetadata=function(t,e){this.metadata[t]=e},t.prototype.getIndexedMetadata=function(){return this.indexedMetadata},t.prototype.setIndexedMetadata=function(t){this.indexedMetadata=t},t.prototype.addIndexedMetadata=function(t,e){this.indexedMetadata[t]=e},t.prototype.getSearchableMetadata=function(){return this.searchableMetadata},t.prototype.setSearchableMetadata=function(t){this.searchableMetadata=t},t.prototype.addSearchableMetadata=function(t,e){this.searchableMetadata[t]=e},t.prototype.getExactMatchingMetadata=function(){return this.exactMatchingMetadata},t.prototype.setExactMatchingMetadata=function(t){this.exactMatchingMetadata=t},t.prototype.addExactMatchingMetadata=function(t){this.exactMatchingMetadata.push(t)},t.prototype.getAllMetadata=function(){return n.__assign(n.__assign({},this.metadata),this.indexedMetadata)},t.prototype.get=function(t){var e=this.getAllMetadata();return void 0!==e[t]?e[t]:null},t.prototype.getSuggest=function(){return this.suggest},t.prototype.getHighlights=function(){return this.highlights},t.prototype.getHighlight=function(t){return void 0!==this.highlights[t]?this.highlights[t]:null},t.prototype.isPromoted=function(){return this.promoted},t.prototype.setScore=function(t){return this.score=t,this},t.prototype.getScore=function(){return this.score},t.prototype.getAppUUID=function(){return this.appUUID},t.prototype.getIndexUUID=function(){return this.indexUUID},t.prototype.toArray=function(){var t={uuid:this.uuid.toArray()};return this.coordinate instanceof i.Coordinate&&(t.coordinate=this.coordinate.toArray()),Object.keys(this.metadata).length>0&&(t.metadata=this.metadata),Object.keys(this.indexedMetadata).length>0&&(t.indexed_metadata=this.indexedMetadata),Object.keys(this.searchableMetadata).length>0&&(t.searchable_metadata=this.searchableMetadata),this.exactMatchingMetadata.length>0&&(t.exact_matching_metadata=this.exactMatchingMetadata),this.suggest.length>0&&(t.suggest=this.suggest),Object.keys(this.highlights).length>0&&(t.highlights=this.highlights),this.isPromoted()&&(t.is_promoted=!0),void 0!==this.distance&&(t.distance=this.distance),void 0!==this.score&&(t.score=this.score),void 0!==this.appUUID&&(t.app_uuid=this.appUUID.toArray()),void 0!==this.indexUUID&&(t.index_uuid=this.indexUUID.toArray()),t},t.createFromArray=function(e){if("object"!=typeof(e=JSON.parse(JSON.stringify(e))).uuid)throw o.InvalidFormatError.itemUUIDRepresentationNotValid();if(void 0!==e.coordinate&&"object"!=typeof e.coordinate)throw o.InvalidFormatError.coordinateFormatNotValid();var r="object"==typeof e.coordinate&&null!=e.coordinate?t.createLocated(s.ItemUUID.createFromArray(e.uuid),i.Coordinate.createFromArray(e.coordinate),void 0===e.metadata?{}:e.metadata,void 0===e.indexed_metadata?{}:e.indexed_metadata,void 0===e.searchable_metadata?{}:e.searchable_metadata,void 0===e.exact_matching_metadata?[]:e.exact_matching_metadata,void 0===e.suggest?[]:e.suggest):t.create(s.ItemUUID.createFromArray(e.uuid),void 0===e.metadata?{}:e.metadata,void 0===e.indexed_metadata?{}:e.indexed_metadata,void 0===e.searchable_metadata?{}:e.searchable_metadata,void 0===e.exact_matching_metadata?[]:e.exact_matching_metadata,void 0===e.suggest?[]:e.suggest);return void 0!==e.distance&&null!=e.distance&&(r.distance=e.distance),"object"==typeof e.highlights&&null!=e.highlights&&(r.highlights=e.highlights),void 0!==e.is_promoted&&null!=e.is_promoted&&(r.promoted=e.is_promoted),void 0!==e.score&&null!=e.score&&(r.score=e.score),void 0!==e.app_uuid&&null!=e.app_uuid&&(r.appUUID=a.AppUUID.createFromArray(e.app_uuid)),void 0!==e.index_uuid&&null!=e.index_uuid&&(r.indexUUID=u.IndexUUID.createFromArray(e.index_uuid)),r},t.prototype.composeUUID=function(){return this.uuid.composedUUID()},t.getPathByField=function(t){return["id","type"].indexOf(t)>-1?"uuid."+t:"indexed_metadata."+t},t}();e.Item=l},5301:(t,e,r)=>{"use strict";e.__esModule=!0,e.ItemUUID=void 0;var n=r(1062),o=function(){function t(t,e){this.id=t,this.type=e}return t.createByComposedUUID=function(e){var r=e.split("~");if(2!=r.length)throw n.InvalidFormatError.composedItemUUIDNotValid();return new t(r[0],r[1])},t.prototype.getId=function(){return this.id},t.prototype.getType=function(){return this.type},t.prototype.toArray=function(){return{id:this.id,type:this.type}},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).id,e.type)},t.prototype.composedUUID=function(){return this.id+"~"+this.type},t}();e.ItemUUID=o},1984:(t,e)=>{"use strict";e.__esModule=!0,e.Metadata=void 0;var r=function(){function t(){}return t.toMetadata=function(t){t=JSON.parse(JSON.stringify(t));var e=[];for(var r in t)e.push(r+"##"+t[r]);return e.join("~~")},t.fromMetadata=function(t){var e={},r=t.split("~~"),n=0,o=0,i=null;for(var s in r){var a=r[s],u=a.split("##");u.length>1?(i=u[1],e[u[0]]=i):(i=a,e[n++]=i),o++}return 1==o&&(e={id:i,name:i}),void 0===e.id?null:e},t}();e.Metadata=r},2850:(t,e,r)=>{"use strict";e.__esModule=!0,e.User=void 0;var n=r(1062),o=function(){function t(t,e){void 0===e&&(e={}),this.id=t,this.attributes=e}return t.prototype.getId=function(){return this.id},t.prototype.getAttributes=function(){return this.attributes},t.prototype.toArray=function(){var t={id:this.id};return Object.keys(this.attributes).length>0&&(t.attributes=this.attributes),t},t.createFromArray=function(e){if(null==e||void 0===e.id||null==e.id)throw n.InvalidFormatError.userFormatNotValid();var r=typeof e.attributes==typeof{}?e.attributes:{};return new t(e.id,r)},t}();e.User=o},4402:(t,e,r)=>{"use strict";e.__esModule=!0,e.Aggregation=e.AGGREGATION_NO_LIMIT=e.AGGREGATION_SORT_BY_NAME_DESC=e.AGGREGATION_SORT_BY_NAME_ASC=e.AGGREGATION_SORT_BY_COUNT_DESC=e.AGGREGATION_SORT_BY_COUNT_ASC=void 0;var n=r(1248);e.AGGREGATION_SORT_BY_COUNT_ASC=["_count","asc"],e.AGGREGATION_SORT_BY_COUNT_DESC=["_count","desc"],e.AGGREGATION_SORT_BY_NAME_ASC=["_term","asc"],e.AGGREGATION_SORT_BY_NAME_DESC=["_term","desc"],e.AGGREGATION_NO_LIMIT=0;var o=function(){function t(t,e,r,n,o,i,s,a){this.subgroup=[],this.name=t,this.field=e,this.applicationType=r,this.filterType=n,this.subgroup=o,this.sort=i,this.limit=s,this.promoted=a}return t.prototype.getName=function(){return this.name},t.prototype.getField=function(){return this.field},t.prototype.getApplicationType=function(){return this.applicationType},t.prototype.getFilterType=function(){return this.filterType},t.prototype.getSubgroup=function(){return this.subgroup},t.prototype.getSort=function(){return this.sort},t.prototype.getLimit=function(){return this.limit},t.prototype.getPromoted=function(){return this.promoted},t.create=function(r,n,o,i,s,a,u,l){return void 0===s&&(s=[]),void 0===a&&(a=e.AGGREGATION_SORT_BY_COUNT_DESC),void 0===u&&(u=e.AGGREGATION_NO_LIMIT),void 0===l&&(l=[]),new t(r,n,o,i,s,a,u,l)},t.prototype.toArray=function(){var t={name:this.name};return"uuid.type"!==this.field&&(t.field=this.field),this.applicationType!==n.FILTER_AT_LEAST_ONE&&(t.application_type=this.applicationType),this.filterType!==n.FILTER_TYPE_FIELD&&(t.filter_type=this.filterType),this.subgroup.length>0&&(t.subgroup=this.subgroup),JSON.stringify(this.sort)!==JSON.stringify(e.AGGREGATION_SORT_BY_COUNT_DESC)&&(t.sort=this.sort),this.limit!==e.AGGREGATION_NO_LIMIT&&(t.limit=this.limit),this.promoted.length>0&&(t.promoted=this.promoted),t},t.createFromArray=function(r){return void 0===(r=JSON.parse(JSON.stringify(r))).field&&(r.field="uuid.type"),void 0===r.application_type&&(r.application_type=n.FILTER_AT_LEAST_ONE),void 0===r.filter_type&&(r.filter_type=n.FILTER_TYPE_FIELD),void 0===r.subgroup&&(r.subgroup=[]),void 0===r.sort&&(r.sort=e.AGGREGATION_SORT_BY_COUNT_DESC),void 0===r.limit&&(r.limit=e.AGGREGATION_NO_LIMIT),void 0===r.promoted&&(r.promoted=[]),t.create(r.name,r.field,r.application_type,r.filter_type,r.subgroup,r.sort,r.limit,r.promoted)},t}();e.Aggregation=o},1248:(t,e)=>{"use strict";e.__esModule=!0,e.Filter=e.FILTER_TYPE_QUERY=e.FILTER_TYPE_GEO=e.FILTER_TYPE_DATE_RANGE=e.FILTER_TYPE_RANGE=e.FILTER_TYPE_FIELD=e.FILTER_PROMOTE=e.FILTER_EXCLUDE=e.FILTER_AT_LEAST_ONE=e.FILTER_MUST_ALL_WITH_LEVELS=e.FILTER_MUST_ALL=void 0,e.FILTER_MUST_ALL=4,e.FILTER_MUST_ALL_WITH_LEVELS=5,e.FILTER_AT_LEAST_ONE=8,e.FILTER_EXCLUDE=16,e.FILTER_PROMOTE=32,e.FILTER_TYPE_FIELD="field",e.FILTER_TYPE_RANGE="range",e.FILTER_TYPE_DATE_RANGE="date_range",e.FILTER_TYPE_GEO="geo",e.FILTER_TYPE_QUERY="query";var r=function(){function t(t,e,r,n,o){this.field=t,this.values=e,this.applicationType=r,this.filterType=n,this.filterTerms=o}return t.prototype.getField=function(){return this.field},t.prototype.getValues=function(){return this.values},t.prototype.hasValue=function(t){return void 0===this.values[t]},t.prototype.getApplicationType=function(){return this.applicationType},t.prototype.getFilterType=function(){return this.filterType},t.prototype.getFilterTerms=function(){return this.filterTerms},t.create=function(e,r,n,o,i){return void 0===i&&(i=[]),new t(e,r,n,o,i)},t.prototype.toArray=function(){var t={};return"uuid.type"!=this.field&&(t.field=this.field),(this.values.length>0||Object.keys(this.values).length>0)&&(t.values=this.values),this.applicationType!=e.FILTER_AT_LEAST_ONE&&(t.application_type=this.applicationType),this.filterType!=e.FILTER_TYPE_FIELD&&(t.filter_type=this.filterType),this.filterTerms.length>0&&(t.filter_terms=this.filterTerms),t},t.createFromArray=function(r){return void 0===(r=JSON.parse(JSON.stringify(r))).field&&(r.field="uuid.type"),void 0===r.values&&(r.values=[]),void 0===r.application_type&&(r.application_type=e.FILTER_AT_LEAST_ONE),void 0===r.filter_type&&(r.filter_type=e.FILTER_TYPE_FIELD),void 0===r.filter_terms&&(r.filter_terms=[]),t.create(r.field,r.values,r.application_type,r.filter_type,r.filter_terms)},t}();e.Filter=r},4148:(t,e,r)=>{"use strict";e.__esModule=!0,e.Query=e.NO_MIN_SCORE=e.QUERY_DEFAULT_SIZE=e.QUERY_DEFAULT_PAGE=void 0;var n=r(5215),o=r(9367),i=r(5301),s=r(9934),a=r(2850),u=r(4402),l=r(1248),c=r(1248),p=r(4402),f=r(1062),d=r(1248),h=r(9643),_=r(8699),y=r(2734);e.QUERY_DEFAULT_PAGE=1,e.QUERY_DEFAULT_SIZE=10,e.NO_MIN_SCORE=0;var g=function(){function t(t){this.UUID=null,this.fields=[],this.universeFilters={},this.filters={},this.itemsPromoted=[],this.aggregations={},this.resultsEnabled=!0,this.aggregationsEnabled=!0,this.numberOfSuggestions=0,this.highlightsEnabled=!1,this.autocompleteEnabled=!1,this.searchableFields=[],this.fuzziness=null,this.minScore=e.NO_MIN_SCORE,this.metadata={},this.subqueries={},this.queryOperator=null,this.sortByInstance=_.SortBy.create(),this.filters._query=l.Filter.create("",[t],0,d.FILTER_TYPE_QUERY)}return t.createLocated=function(r,n,o,i){void 0===o&&(o=e.QUERY_DEFAULT_PAGE),void 0===i&&(i=e.QUERY_DEFAULT_SIZE);var s=t.create(n,o,i);return s.coordinate=r,s},t.create=function(r,n,o){void 0===n&&(n=e.QUERY_DEFAULT_PAGE),void 0===o&&(o=e.QUERY_DEFAULT_SIZE),n=Math.max(1,n);var i=new t(r);return i.from=(n-1)*o,i.size=o,i.page=n,i},t.createMatchAll=function(){return t.create("",e.QUERY_DEFAULT_PAGE,e.QUERY_DEFAULT_SIZE)},t.createByUUID=function(e){return t.createByUUIDs(e)},t.createByUUIDs=function(){for(var r=[],n=0;n0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((e={}).type=l.Filter.create(r,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),e)):delete this.universeFilters.type,this},t.prototype.filterByTypes=function(t,e,r){var o,i;void 0===e&&(e=!0),void 0===r&&(r=p.AGGREGATION_SORT_BY_COUNT_DESC);var a=s.Item.getPathByField("type");return t.length>0?this.filters=n.__assign(n.__assign({},this.filters),((o={}).type=l.Filter.create(a,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),o)):delete this.filters.type,e&&(this.aggregations=n.__assign(n.__assign({},this.aggregations),((i={}).type=u.Aggregation.create("type",a,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD,[],r),i))),this},t.prototype.filterUniverseByIds=function(t){var e,r=s.Item.getPathByField("id");return t.length>0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((e={}).id=l.Filter.create(r,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),e)):delete this.universeFilters.id,this},t.prototype.filterByIds=function(t){var e,r=s.Item.getPathByField("id");return t.length>0?this.filters=n.__assign(n.__assign({},this.filters),((e={}).id=l.Filter.create(r,t,c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_FIELD),e)):delete this.filters.id,this},t.prototype.filterUniverseBy=function(t,e,r){var o;void 0===r&&(r=c.FILTER_AT_LEAST_ONE);var i=s.Item.getPathByField(t);return e.length>0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((o={})[t]=l.Filter.create(i,e,r,c.FILTER_TYPE_FIELD),o)):delete this.universeFilters[t],this},t.prototype.filterBy=function(t,e,r,o,i,a){var u;void 0===o&&(o=c.FILTER_AT_LEAST_ONE),void 0===i&&(i=!0),void 0===a&&(a=p.AGGREGATION_SORT_BY_COUNT_DESC);var f=s.Item.getPathByField(e);return r.length>0?this.filters=n.__assign(n.__assign({},this.filters),((u={})[t]=l.Filter.create(f,r,o,c.FILTER_TYPE_FIELD),u)):delete this.filters[t],i&&this.aggregateBy(t,e,o,a),this},t.prototype.filterUniverseByRange=function(t,e,r,o){var i;void 0===r&&(r=c.FILTER_AT_LEAST_ONE),void 0===o&&(o=c.FILTER_TYPE_RANGE);var a=s.Item.getPathByField(t);return e.length>0?this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((i={})[t]=l.Filter.create(a,e,r,o),i)):delete this.universeFilters[t],this},t.prototype.filterUniverseByDateRange=function(t,e,r){return void 0===r&&(r=c.FILTER_AT_LEAST_ONE),this.filterUniverseByRange(t,e,r,c.FILTER_TYPE_DATE_RANGE)},t.prototype.filterByRange=function(t,e,r,o,i,a,u,f){var d;void 0===i&&(i=c.FILTER_AT_LEAST_ONE),void 0===a&&(a=c.FILTER_TYPE_RANGE),void 0===u&&(u=!0),void 0===f&&(f=p.AGGREGATION_SORT_BY_COUNT_DESC);var h=s.Item.getPathByField(e);return 0!==o.length?this.filters=n.__assign(n.__assign({},this.filters),((d={})[t]=l.Filter.create(h,o,i,a),d)):delete this.filters[t],u&&this.aggregateByRange(t,h,r,i,a,f),this},t.prototype.filterByDateRange=function(t,e,r,n,o,i,s){return void 0===o&&(o=c.FILTER_AT_LEAST_ONE),void 0===i&&(i=!0),void 0===s&&(s=p.AGGREGATION_SORT_BY_COUNT_DESC),this.filterByRange(t,e,r,n,o,c.FILTER_TYPE_DATE_RANGE,i,s)},t.prototype.filterUniverseByLocation=function(t){var e;return this.universeFilters=n.__assign(n.__assign({},this.universeFilters),((e={}).coordinate=l.Filter.create("coordinate",t.toArray(),c.FILTER_AT_LEAST_ONE,c.FILTER_TYPE_GEO),e)),this},t.prototype.setSearchableFields=function(t){return this.searchableFields=t,this},t.prototype.getSearchableFields=function(){return this.searchableFields},t.prototype.sortBy=function(t){if(t.isSortedByGeoDistance()){if(!(this.coordinate instanceof o.Coordinate))throw f.InvalidFormatError.querySortedByDistanceWithoutCoordinate();t.setCoordinate(this.coordinate)}return this.sortByInstance=t,this},t.prototype.aggregateBy=function(t,e,r,o,i,a){var l;return void 0===o&&(o=p.AGGREGATION_SORT_BY_COUNT_DESC),void 0===i&&(i=p.AGGREGATION_NO_LIMIT),void 0===a&&(a=[]),this.aggregations=n.__assign(n.__assign({},this.aggregations),((l={})[t]=u.Aggregation.create(t,s.Item.getPathByField(e),r,c.FILTER_TYPE_FIELD,[],o,i,a),l)),this},t.prototype.aggregateByRange=function(t,e,r,o,i,a,l,f){var d;return void 0===i&&(i=c.FILTER_TYPE_RANGE),void 0===a&&(a=p.AGGREGATION_SORT_BY_COUNT_DESC),void 0===l&&(l=p.AGGREGATION_NO_LIMIT),void 0===f&&(f=[]),0===r.length||(this.aggregations=n.__assign(n.__assign({},this.aggregations),((d={})[t]=u.Aggregation.create(t,s.Item.getPathByField(e),o,i,r,a,l,f),d))),this},t.prototype.aggregateByDateRange=function(t,e,r,n,o,i,s){return void 0===o&&(o=p.AGGREGATION_SORT_BY_COUNT_DESC),void 0===i&&(i=p.AGGREGATION_NO_LIMIT),void 0===s&&(s=[]),this.aggregateByRange(t,e,r,n,c.FILTER_TYPE_DATE_RANGE,o,i,s)},t.prototype.getAggregations=function(){return this.aggregations},t.prototype.getAggregation=function(t){return this.aggregations[t]instanceof u.Aggregation?this.aggregations[t]:null},t.prototype.getQueryText=function(){var t=this.filters._query;return t instanceof l.Filter?t.getValues()[0]:""},t.prototype.getUniverseFilters=function(){return this.universeFilters},t.prototype.getUniverseFilter=function(t){return this.universeFilters[t]instanceof l.Filter?this.universeFilters[t]:null},t.prototype.getFilters=function(){return this.filters},t.prototype.getFilter=function(t){return this.filters[t]instanceof l.Filter?this.filters[t]:null},t.prototype.getFilterByField=function(t){var e=s.Item.getPathByField(t);for(var r in this.filters)if(this.filters[r].getField()==e)return this.filters[r];return null},t.prototype.getSortBy=function(){return this.sortByInstance},t.prototype.getFrom=function(){return this.from},t.prototype.getSize=function(){return this.size},t.prototype.getPage=function(){return this.page},t.prototype.enableResults=function(){return this.resultsEnabled=!0,this},t.prototype.disableResults=function(){return this.resultsEnabled=!1,this},t.prototype.areResultsEnabled=function(){return this.resultsEnabled},t.prototype.enableAggregations=function(){return this.aggregationsEnabled=!0,this},t.prototype.disableAggregations=function(){return this.aggregationsEnabled=!1,this},t.prototype.areAggregationsEnabled=function(){return this.aggregationsEnabled},t.prototype.setNumberOfSuggestions=function(t){return this.numberOfSuggestions=t,this},t.prototype.disableSuggestions=function(){return this.numberOfSuggestions=0,this},t.prototype.getNumberOfSuggestions=function(){return this.numberOfSuggestions},t.prototype.enableAutocomplete=function(){return this.autocompleteEnabled=!0,this},t.prototype.disableAutocomplete=function(){return this.autocompleteEnabled=!1,this},t.prototype.areAutocompleteEnabled=function(){return this.autocompleteEnabled},t.prototype.enableHighlights=function(){return this.highlightsEnabled=!0,this},t.prototype.disableHighlights=function(){return this.highlightsEnabled=!1,this},t.prototype.areHighlightsEnabled=function(){return this.highlightsEnabled},t.prototype.promoteUUID=function(t){return this.itemsPromoted.push(t),this},t.prototype.promoteUUIDs=function(){for(var t=[],e=0;e0&&(t.fields=this.fields),Object.keys(this.universeFilters).length)for(var r in t.universe_filters={},this.universeFilters){var n=this.universeFilters[r];t.universe_filters[r]=n.toArray()}if(this.filters instanceof Object&&Object.keys(this.filters).length){var i={};for(var r in this.filters){var s=this.filters[r];s.getFilterType()!==d.FILTER_TYPE_QUERY&&(i[r]=s.toArray())}Object.keys(i).length>0&&(t.filters=i)}if(this.aggregations instanceof Object&&Object.keys(this.aggregations).length)for(var r in t.aggregations={},this.aggregations){var u=this.aggregations[r];t.aggregations[r]=u.toArray()}var l=this.sortByInstance.toArray();Object.keys(l).length&&(t.sort=l);var c=this.page;c!==e.QUERY_DEFAULT_PAGE&&(t.page=c);var p=this.size;if(p!==e.QUERY_DEFAULT_SIZE&&(t.size=p),!1===this.resultsEnabled&&(t.results_enabled=!1),!0===this.autocompleteEnabled&&(t.autocomplete_enabled=!0),0!==this.numberOfSuggestions&&(t.number_of_suggestions=this.numberOfSuggestions),!0===this.highlightsEnabled&&(t.highlight_enabled=!0),!1===this.aggregationsEnabled&&(t.aggregations_enabled=!1),this.searchableFields instanceof Array&&this.searchableFields.length>0&&(t.searchable_fields=this.searchableFields),this.scoreStrategies instanceof h.ScoreStrategies){var f=this.scoreStrategies.toArray();Object.keys(f).length>0&&(t.score_strategies=f)}null!==this.fuzziness&&(t.fuzziness=this.fuzziness);var _=this.minScore;if(_!==e.NO_MIN_SCORE&&(t.min_score=_),this.user instanceof a.User&&(t.user=this.user.toArray()),Object.keys(this.metadata).length>0&&(t.metadata=this.metadata),this.subqueries instanceof Object&&Object.keys(this.subqueries).length)for(var r in t.subqueries={},this.subqueries){var g=this.subqueries[r];t.subqueries[r]=g.toArray()}if(this.indexUUID instanceof y.IndexUUID&&(t.index_uuid=this.indexUUID.toArray()),this.itemsPromoted.length>0)for(var r in t.items_promoted=[],this.itemsPromoted)t.items_promoted.push(this.itemsPromoted[r].toArray());return"or"!==this.queryOperator&&null!==this.queryOperator&&(t.query_operator=this.queryOperator),t},t.createFromArray=function(r){var n=r.coordinate instanceof Object?t.createLocated(o.Coordinate.createFromArray(r.coordinate),r.q?r.q:"",r.page?r.page:e.QUERY_DEFAULT_PAGE,r.size?r.size:e.QUERY_DEFAULT_SIZE):t.create(r.q?r.q:"",r.page?r.page:e.QUERY_DEFAULT_PAGE,r.size?r.size:e.QUERY_DEFAULT_SIZE);n.UUID="string"==typeof r.UUID?r.UUID:void 0,n.fields=r.fields instanceof Array?r.fields:[];var s=typeof r.aggregations==typeof{}?r.aggregations:{};for(var c in s)n.aggregations[c]=u.Aggregation.createFromArray(s[c]);var p=typeof r.sort==typeof{}?r.sort:{};Object.keys(p).length>0&&(n.sortByInstance=_.SortBy.createFromArray(p));var f=typeof r.filters==typeof{}?r.filters:{};for(var c in f)n.filters[c]=l.Filter.createFromArray(f[c]);var d=typeof r.universe_filters==typeof{}?r.universe_filters:{};for(var c in d)n.universeFilters[c]=l.Filter.createFromArray(d[c]);n.resultsEnabled="boolean"!=typeof r.results_enabled||r.results_enabled,n.numberOfSuggestions="number"==typeof r.number_of_suggestions?r.number_of_suggestions:0,n.autocompleteEnabled="boolean"==typeof r.autocomplete_enabled&&r.autocomplete_enabled,n.aggregationsEnabled="boolean"!=typeof r.aggregations_enabled||r.aggregations_enabled,n.highlightsEnabled="boolean"==typeof r.highlight_enabled&&r.highlight_enabled,n.fuzziness=r.fuzziness?r.fuzziness:null,n.minScore=r.min_score?r.min_score:e.NO_MIN_SCORE;var g=typeof r.items_promoted==typeof{}?r.items_promoted:{};for(var c in g)n.itemsPromoted.push(i.ItemUUID.createFromArray(g[c]));var m=typeof r.subqueries==typeof{}?r.subqueries:{};for(var c in m)n.subqueries[c]=t.createFromArray(m[c]);return n.metadata=typeof r.metadata==typeof{}?r.metadata:{},n.searchableFields=r.searchable_fields instanceof Array?r.searchable_fields:[],n.scoreStrategies=r.score_strategies instanceof Object?h.ScoreStrategies.createFromArray(r.score_strategies):void 0,n.user=r.user instanceof Object?a.User.createFromArray(r.user):void 0,n.indexUUID=r.index_uuid instanceof Object?y.IndexUUID.createFromArray(r.index_uuid):void 0,n.queryOperator="string"==typeof r.query_operator?r.query_operator:"or",n},t}();e.Query=g},2641:(t,e)=>{"use strict";e.__esModule=!0,e.Range=e.RANGE_SEPARATOR=e.RANGE_INFINITE=e.RANGE_MINUS_INFINITE=void 0,e.RANGE_MINUS_INFINITE=null,e.RANGE_INFINITE=null,e.RANGE_SEPARATOR="..";var r=function(){function t(){}return t.stringToArray=function(t){var r=t.split(e.RANGE_SEPARATOR),n=r[0],o=r[1],i=e.RANGE_MINUS_INFINITE,s=e.RANGE_INFINITE;return""!=n&&(i=parseInt(n)),""!=o&&(s=parseInt(o)),[i,s]},t.arrayToString=function(t){var r=["",""];return t[0]!=e.RANGE_MINUS_INFINITE&&(r[0]=String(t[0])),t[1]!=e.RANGE_INFINITE&&(r[1]=String(t[1])),r.join(e.RANGE_SEPARATOR)},t.createRanges=function(t,r,n){for(var o,i=[];t{"use strict";e.__esModule=!0,e.ScoreStrategies=e.MIN=e.MAX=e.AVG=e.SUM=e.MULTIPLY=void 0;var n=r(5911);e.MULTIPLY="multiply",e.SUM="sum",e.AVG="avg",e.MAX="max",e.MIN="min";var o=function(){function t(){this.scoreStrategies=[]}return t.createEmpty=function(r){void 0===r&&(r=e.SUM);var n=new t;return n.scoreMode=r,n},t.prototype.addScoreStrategy=function(t){return this.scoreStrategies.push(t),this},t.prototype.getScoreStrategies=function(){return this.scoreStrategies},t.prototype.getScoreMode=function(){return this.scoreMode},t.prototype.toArray=function(){var t=[];for(var e in this.scoreStrategies)t.push(this.scoreStrategies[e].toArray());return{score_mode:this.scoreMode,score_strategies:t}},t.createFromArray=function(e){var r=void 0!==(e=JSON.parse(JSON.stringify(e))).score_mode?t.createEmpty(e.score_mode):t.createEmpty();for(var o in r.scoreStrategies=[],e.score_strategies)r.scoreStrategies.push(n.ScoreStrategy.createFromArray(e.score_strategies[o]));return r},t}();e.ScoreStrategies=o},5911:(t,e,r)=>{"use strict";e.__esModule=!0,e.ScoreStrategy=e.DEFAULT_FACTOR=e.DEFAULT_MISSING=e.SCORE_MODE_MIN=e.SCORE_MODE_MAX=e.SCORE_MODE_AVG=e.SCORE_MODE_SUM=e.SCORE_MODE_NONE=e.MODIFIER_SQUARE=e.MODIFIER_LN=e.MODIFIER_LOG=e.MODIFIER_SQRT=e.MODIFIER_NONE=e.DECAY_GAUSS=e.DECAY_EXP=e.DECAY_LINEAR=e.DECAY=e.CUSTOM_FUNCTION=e.BOOSTING_FIELD_VALUE=e.DEFAULT_WEIGHT=e.DEFAULT_TYPE=void 0;var n=r(9934),o=r(1248);e.DEFAULT_TYPE="default",e.DEFAULT_WEIGHT=1,e.BOOSTING_FIELD_VALUE="field_value",e.CUSTOM_FUNCTION="custom_function",e.DECAY="decay",e.DECAY_LINEAR="linear",e.DECAY_EXP="exp",e.DECAY_GAUSS="gauss",e.MODIFIER_NONE="none",e.MODIFIER_SQRT="sqrt",e.MODIFIER_LOG="log",e.MODIFIER_LN="ln",e.MODIFIER_SQUARE="square",e.SCORE_MODE_NONE="none",e.SCORE_MODE_SUM="sum",e.SCORE_MODE_AVG="avg",e.SCORE_MODE_MAX="max",e.SCORE_MODE_MIN="min",e.DEFAULT_MISSING=1,e.DEFAULT_FACTOR=1;var i=function(){function t(){this.type=e.DEFAULT_TYPE,this.filter=null,this.weight=e.DEFAULT_WEIGHT,this.scoreMode=e.SCORE_MODE_AVG,this.configuration={}}return t.prototype.getType=function(){return this.type},t.prototype.getConfigurationValue=function(t){return void 0===this.configuration[t]?null:this.configuration[t]},t.prototype.getWeight=function(){return this.weight},t.prototype.getScoreMode=function(){return this.scoreMode},t.prototype.getFilter=function(){return this.filter},t.createDefault=function(){return new t},t.createFieldBoosting=function(r,n,o,i,s,a,u){void 0===n&&(n=e.DEFAULT_FACTOR),void 0===o&&(o=e.DEFAULT_MISSING),void 0===i&&(i=e.MODIFIER_NONE),void 0===s&&(s=e.DEFAULT_WEIGHT),void 0===a&&(a=null),void 0===u&&(u=e.SCORE_MODE_AVG);var l=t.createDefault();return l.type=e.BOOSTING_FIELD_VALUE,l.configuration.field=r,l.configuration.factor=n,l.configuration.missing=o,l.configuration.modifier=i,l.weight=s,l.filter=t.fixFilterFieldPath(a),l.scoreMode=u,l},t.createCustomFunction=function(r,n,o,i){void 0===n&&(n=e.DEFAULT_WEIGHT),void 0===o&&(o=null),void 0===i&&(i=e.SCORE_MODE_AVG);var s=t.createDefault();return s.type=e.CUSTOM_FUNCTION,s.configuration.function=r,s.weight=n,s.filter=t.fixFilterFieldPath(o),s.scoreMode=i,s},t.createDecayFunction=function(r,n,o,i,s,a,u,l,c){void 0===u&&(u=e.DEFAULT_WEIGHT),void 0===l&&(l=null),void 0===c&&(c=e.SCORE_MODE_AVG);var p=t.createDefault();return p.type=e.DECAY,p.configuration.type=r,p.configuration.field=n,p.configuration.origin=o,p.configuration.scale=i,p.configuration.offset=s,p.configuration.decay=a,p.weight=u,p.filter=t.fixFilterFieldPath(l),p.scoreMode=c,p},t.fixFilterFieldPath=function(t){if(null==t)return t;var e=t.toArray();return e.field=n.Item.getPathByField(e.field),o.Filter.createFromArray(e)},t.prototype.toArray=function(){return{type:this.type,configuration:this.configuration,weight:this.weight,score_mode:this.scoreMode,filter:this.filter instanceof o.Filter?this.filter.toArray():null}},t.createFromArray=function(e){e=JSON.parse(JSON.stringify(e));var r=t.createDefault();return void 0!==e.type&&(r.type=e.type),void 0!==e.configuration&&(r.configuration=e.configuration),void 0!==e.weight&&(r.weight=e.weight),void 0!==e.score_mode&&(r.scoreMode=e.score_mode),"object"==typeof e.filter&&null!==e.filter&&(r.filter=o.Filter.createFromArray(e.filter)),r},t}();e.ScoreStrategy=i},8699:(t,e,r)=>{"use strict";e.__esModule=!0,e.SortBy=e.SORT_BY_LOCATION_MI_ASC=e.SORT_BY_LOCATION_KM_ASC=e.SORT_BY_TYPE_DESC=e.SORT_BY_TYPE_ASC=e.SORT_BY_ID_DESC=e.SORT_BY_ID_ASC=e.SORT_BY_AL_TUN_TUN=e.SORT_BY_RANDOM=e.SORT_BY_SCORE=e.SORT_BY_MODE_MEDIAN=e.SORT_BY_MODE_MAX=e.SORT_BY_MODE_MIN=e.SORT_BY_MODE_SUM=e.SORT_BY_MODE_AVG=e.SORT_BY_DESC=e.SORT_BY_ASC=e.SORT_BY_TYPE_RANDOM=e.SORT_BY_TYPE_FUNCTION=e.SORT_BY_TYPE_DISTANCE=e.SORT_BY_TYPE_SCORE=e.SORT_BY_TYPE_NESTED=e.SORT_BY_TYPE_FIELD=void 0;var n=r(5059),o=r(1248);e.SORT_BY_TYPE_FIELD="field",e.SORT_BY_TYPE_NESTED="nested",e.SORT_BY_TYPE_SCORE="score",e.SORT_BY_TYPE_DISTANCE="distance",e.SORT_BY_TYPE_FUNCTION="function",e.SORT_BY_TYPE_RANDOM="random",e.SORT_BY_ASC="asc",e.SORT_BY_DESC="desc",e.SORT_BY_MODE_AVG="avg",e.SORT_BY_MODE_SUM="sum",e.SORT_BY_MODE_MIN="min",e.SORT_BY_MODE_MAX="max",e.SORT_BY_MODE_MEDIAN="median",e.SORT_BY_SCORE={type:e.SORT_BY_TYPE_SCORE},e.SORT_BY_RANDOM={type:e.SORT_BY_TYPE_RANDOM},e.SORT_BY_AL_TUN_TUN=e.SORT_BY_RANDOM,e.SORT_BY_ID_ASC={field:"uuid.id",order:e.SORT_BY_ASC},e.SORT_BY_ID_DESC={field:"uuid.id",order:e.SORT_BY_DESC},e.SORT_BY_TYPE_ASC={field:"uuid.type",order:e.SORT_BY_ASC},e.SORT_BY_TYPE_DESC={field:"uuid.type",order:e.SORT_BY_DESC},e.SORT_BY_LOCATION_KM_ASC={type:e.SORT_BY_TYPE_DISTANCE,unit:"km"},e.SORT_BY_LOCATION_MI_ASC={type:e.SORT_BY_TYPE_DISTANCE,unit:"mi"};var i=function(){function t(){this.sortsBy=[]}return t.create=function(){return new t},t.byFieldsValues=function(e){var r=t.create();for(var n in e)r.byFieldValue(n,e[n]);return r},t.prototype.all=function(){return this.sortsBy.length>0?this.sortsBy:[e.SORT_BY_SCORE]},t.prototype.byValue=function(t){return e.SORT_BY_SCORE!=t&&e.SORT_BY_RANDOM!=t&&void 0===t.type&&(t.type=e.SORT_BY_TYPE_FIELD),e.SORT_BY_SCORE!=t&&this.sortsBy.push(t),this},t.prototype.byFieldValue=function(t,r){return this.sortsBy.push({type:e.SORT_BY_TYPE_FIELD,field:n.Item.getPathByField(t),order:r}),this},t.prototype.byNestedField=function(t,r,n){return void 0===n&&(n=e.SORT_BY_MODE_AVG),this.sortsBy.push({type:e.SORT_BY_TYPE_NESTED,mode:n,field:"indexed_metadata."+t,order:r}),this},t.prototype.byNestedFieldAndFilter=function(t,r,i,s){void 0===s&&(s=e.SORT_BY_MODE_AVG);var a=n.Item.getPathByField(i.getField()),u=i.toArray();return u.field=a,i=o.Filter.createFromArray(u),this.sortsBy.push({type:e.SORT_BY_TYPE_NESTED,mode:s,filter:i,field:"indexed_metadata."+t,order:r}),this},t.prototype.byFunction=function(t,r){return this.sortsBy.push({type:e.SORT_BY_TYPE_FUNCTION,function:t,order:r}),this},t.prototype.isSortedByGeoDistance=function(){for(var t in this.sortsBy)if(this.sortsBy[t].type===e.SORT_BY_TYPE_DISTANCE)return!0;return!1},t.prototype.setCoordinate=function(t){for(var r in this.sortsBy)this.sortsBy[r].type===e.SORT_BY_TYPE_DISTANCE&&(this.sortsBy[r].coordinate=t);return this},t.prototype.hasRandomSort=function(){for(var t in this.sortsBy)if(this.sortsBy[t].type===e.SORT_BY_TYPE_RANDOM)return!0;return!1},t.prototype.getFirstSortAsString=function(){if(void 0===this.sortsBy[0])return"score";var t=this.sortsBy[0];if(t.type===e.SORT_BY_TYPE_RANDOM)return"random";if(t.type===e.SORT_BY_TYPE_DISTANCE)return t.type+":"+t.unit;if(t.type===e.SORT_BY_TYPE_SCORE)return"score";var r=t.field,n=t.order;return r.split(".")[1]+":"+n},t.prototype.toArray=function(){var t=this.copy().sortsBy;for(var e in t)typeof t[e].filter==typeof{}&&null!=t[e].filter&&(t[e].filter=t[e].filter.toArray()),null!==t[e].coordinate&&t[e].coordinate instanceof n.Coordinate&&(t[e].coordinate=t[e].coordinate.toArray());return t},t.createFromArray=function(r){var i=JSON.parse(JSON.stringify(r)),s=t.create();for(var a in i){var u=i[a];void 0===u.type&&(u.type=e.SORT_BY_TYPE_FIELD),typeof u.filter==typeof{}&&null!=u.filter&&(u.filter=o.Filter.createFromArray(u.filter)),null!=u.coordinate&&typeof u.coordinate==typeof{}&&(u.coordinate=n.Coordinate.createFromArray(u.coordinate)),s.sortsBy.push(u)}return s},t.prototype.copy=function(){var e=t.create();for(var r in this.sortsBy){var i=this.sortsBy[r];if("function"!=typeof i){var s=JSON.parse(JSON.stringify(i));typeof i.filter==typeof{}&&null!=i.filter&&(s.filter=o.Filter.createFromArray(i.filter.toArray())),null!=i.coordinate&&typeof i.coordinate==typeof{}&&(s.coordinate=n.Coordinate.createFromArray(i.coordinate.toArray())),e.sortsBy.push(s)}}return e},t}();e.SortBy=i},1802:(t,e,r)=>{"use strict";e.__esModule=!0,e.HttpRepository=void 0;var n=r(5215),o=r(8864),i=r(1062),s=r(748),a=r(580),u=r(1912),l=r(6080),c=r(8609),p=r(6285),f=r(9934),d=r(5301),h=r(5584),_=function(t){function e(e,r,n,o,i){var s=t.call(this,r,n,o)||this;return s.httpClient=e,s.transformer=i,s}return n.__extends(e,t),e.prototype.getTransformer=function(){return this.transformer},e.prototype.addObject=function(t){var e=this.transformer.toItem(t);e instanceof f.Item&&this.addItem(e)},e.prototype.deleteObject=function(t){var e=this.transformer.toItemUUID(t);e instanceof d.ItemUUID&&this.deleteItem(e)},e.prototype.flushUpdateItems=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:if(0===t.length)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/items","put",this.getCredentials(),{},t.map((function(t){return t.toArray()})))];case 2:return n.sent(),[3,4];case 3:throw r=n.sent(),e.createErrorFromResponse(r);case 4:return[2]}}))}))},e.prototype.flushDeleteItems=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:if(0===t.length)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/items","delete",this.getCredentials(),{},t.map((function(t){return t.toArray()})))];case 2:return n.sent(),[3,4];case 3:throw r=n.sent(),e.createErrorFromResponse(r);case 4:return[2]}}))}))},e.prototype.query=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId,"get",this.getCredentials(),{query:JSON.stringify(t.toArray()).replace(/&/g,"%26")},{})];case 1:return r=n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return i=h.Result.createFromArray(r.getBody()),[2,this.applyTransformersToResult(i)]}}))}))},e.prototype.getSimilarItems=function(t,r,o){return n.__awaiter(this,void 0,void 0,(function(){var i,s,a;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/similar-items","get",this.getCredentials(),{},{query:t.toArray(),items_uuid:r.map((function(t){return t.toArray()})),similarity:o})];case 1:return i=n.sent(),[3,3];case 2:throw s=n.sent(),e.createErrorFromResponse(s);case 3:return a=h.Result.createFromArray(i.getBody()),[2,this.applyTransformersToResult(a)]}}))}))},e.prototype.getRecommendedItems=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r,o,i;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/recommended-items","get",this.getCredentials(),{},t.toArray())];case 1:return r=n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return i=h.Result.createFromArray(r.getBody()),[2,this.applyTransformersToResult(i)]}}))}))},e.prototype.updateItems=function(t,r){return n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+this.indexId+"/items/update-by-query","put",this.getCredentials(),{},{changes:r.toArray(),query:t.toArray()})];case 1:return n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return[2]}}))}))},e.prototype.createIndex=function(t,r){return n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID(),"put",this.getCredentials(),{},r.toArray())];case 1:return n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return[2]}}))}))},e.prototype.deleteIndex=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID(),"delete",this.getCredentials(),{},{})];case 1:return n.sent(),[3,3];case 2:throw r=n.sent(),e.createErrorFromResponse(r);case 3:return[2]}}))}))},e.prototype.resetIndex=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID()+"/reset","put",this.getCredentials(),{},{})];case 1:return n.sent(),[3,3];case 2:throw r=n.sent(),e.createErrorFromResponse(r);case 3:return[2]}}))}))},e.prototype.checkIndex=function(t){return n.__awaiter(this,void 0,void 0,(function(){var r,o;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/"+t.composedUUID(),"head",this.getCredentials(),{},{})];case 1:return r=n.sent(),[3,3];case 2:throw o=n.sent(),e.createErrorFromResponse(o);case 3:return[2,200===r.getCode()]}}))}))},e.prototype.getIndices=function(){return n.__awaiter(this,void 0,void 0,(function(){var t,r,o,i,s,a;return n.__generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.get("/"+this.appId+"/indices/","get",this.getCredentials(),{},{})];case 1:return t=n.sent(),[3,3];case 2:throw r=n.sent(),e.createErrorFromResponse(r);case 3:for(o=[],i=0,s=t.getBody();i0?(Object.keys(e).map(function(t){e[t]=this.applyTransformersToResult(e[t])}.bind(this)),h.Result.createMultiresults(e)):h.Result.create(t.getQueryUUID(),t.getTotalItems(),t.getTotalHits(),t.getAggregations(),t.getSuggestions(),this.transformer.fromItems(t.getItems()),t.getAutocomplete())},e.createErrorFromResponse=function(t){var e;if(t instanceof c.Response)switch(t.getCode()){case u.ResourceNotAvailableError.getTransportableHTTPError():e=new u.ResourceNotAvailableError(t.getBody().message);break;case s.InvalidTokenError.getTransportableHTTPError():e=new s.InvalidTokenError(t.getBody().message);break;case i.InvalidFormatError.getTransportableHTTPError():e=new i.InvalidFormatError(t.getBody().message);break;case a.ResourceExistsError.getTransportableHTTPError():e=new a.ResourceExistsError(t.getBody().message);break;case o.ConnectionError.getTransportableHTTPError():e=new o.ConnectionError(t.getBody().message)}return void 0===e?l.UnknownError.createUnknownError():e},e}(r(7226).Repository);e.HttpRepository=_},7226:(t,e,r)=>{"use strict";e.__esModule=!0,e.Repository=void 0;var n=r(5215),o=function(){function t(t,e,r){this.itemsToUpdate=[],this.itemsToDelete=[],this.appId=t,this.indexId=e,this.token=r}return t.prototype.resetCachedElements=function(){this.itemsToUpdate=[],this.itemsToDelete=[]},t.prototype.addItem=function(t){this.itemsToUpdate.push(t)},t.prototype.addItems=function(t){for(var e in t)this.addItem(t[e])},t.prototype.deleteItem=function(t){this.itemsToDelete.push(t)},t.prototype.deleteItems=function(t){for(var e in t)this.deleteItem(t[e])},t.prototype.flush=function(e,r){return n.__awaiter(this,void 0,void 0,(function(){var o,i,s=this;return n.__generator(this,(function(n){return e||(e=500),r||(r=!1),r&&this.itemsToUpdate.length{"use strict";e.__esModule=!0,e.Counter=void 0;var n=r(1984),o=function(){function t(t,e,r){this.values=t,this.used=e,this.n=r}return t.prototype.getId=function(){return"string"==typeof this.values.id?this.values.id:null},t.prototype.getName=function(){return"string"==typeof this.values.name?this.values.name:null},t.prototype.getSlug=function(){return"string"==typeof this.values.slug?this.values.slug:null},t.prototype.getLevel=function(){return"number"==typeof this.values.level?this.values.level:0},t.prototype.getValues=function(){return this.values},t.prototype.isUsed=function(){return this.used},t.prototype.getN=function(){return this.n},t.createByActiveElements=function(e,r,o){var i=n.Metadata.fromMetadata(e);if(null==i)return null;for(var s=o.length,a=!1;s--;)o[s]==i.id&&(a=!0);return new t(i,a,r)},t.prototype.toArray=function(){var t={values:this.values,n:this.n};return!0===this.used&&(t.used=!0),t},t.createFromArray=function(e){return new t((e=JSON.parse(JSON.stringify(e))).values,"boolean"==typeof e.used&&e.used,e.n)},t}();e.Counter=o},5584:(t,e,r)=>{"use strict";e.__esModule=!0,e.Result=void 0;var n=r(9934),o=r(2299),i=function(){function t(t,e,r){this.items=[],this.autocomplete=null,this.suggestions=[],this.subresults={},this.metadata={},this.queryUUID=t,this.totalItems=e,this.totalHits=r}return t.create=function(e,r,n,o,i,s,a,u){void 0===a&&(a=null),void 0===u&&(u={});var l=new t(e,r,n);return l.aggregations=o,l.suggestions=i,l.items=s,l.autocomplete=a,l.metadata=u,l},t.createMultiresults=function(e){var r=new t("",0,0);return r.subresults=e,r},t.prototype.addItem=function(t){this.items.push(t)},t.prototype.getItems=function(){return this.items},t.prototype.getItemsGroupedByTypes=function(){if(this.itemsGroupedByTypeCache instanceof Object&&Object.keys(this.itemsGroupedByTypeCache).length>0)return this.itemsGroupedByTypeCache;var t={};for(var e in this.items){var r=this.items[e];t[r.getType()]instanceof Array||(t[r.getType()]=[]),t[r.getType()].push(r)}return this.itemsGroupedByTypeCache=t,t},t.prototype.getItemsByType=function(t){var e=this.getItemsGroupedByTypes();return null==e[t]?[]:e[t]},t.prototype.getItemsByTypes=function(t){return this.items.filter((function(e){return t.indexOf(e.getType())>=0}))},t.prototype.getFirstItem=function(){return this.items.length>0?this.items[0]:null},t.prototype.setAggregations=function(t){this.aggregations=t},t.prototype.getAggregations=function(){return this.aggregations instanceof o.ResultAggregations?this.aggregations:null},t.prototype.getAggregation=function(t){return null==this.aggregations?null:this.aggregations.getAggregation(t)},t.prototype.hasNotEmptyAggregation=function(t){return null!=this.aggregations&&this.aggregations.hasNotEmptyAggregation(t)},t.prototype.getSuggestions=function(){return this.suggestions},t.prototype.getAutocomplete=function(){return this.autocomplete},t.prototype.getQueryUUID=function(){return this.queryUUID},t.prototype.getTotalItems=function(){return this.totalItems},t.prototype.getTotalHits=function(){return this.totalHits},t.prototype.getSubresults=function(){return this.subresults},t.prototype.getMetadata=function(){return this.metadata},t.prototype.getMetadataValue=function(t){var e;return null!==(e=this.metadata[t])&&void 0!==e?e:null},t.prototype.toArray=function(){var t={query_uuid:this.queryUUID,total_items:this.totalItems,total_hits:this.totalHits,items:this.items.map((function(t){return t.toArray()})),aggregations:null==this.aggregations?null:this.aggregations.toArray(),suggests:this.suggestions,autocomplete:null===this.autocomplete?void 0:this.autocomplete,metadata:this.metadata};if(this.subresults instanceof Object&&Object.keys(this.subresults).length)for(var e in t.subresults={},this.subresults){var r=this.subresults[e];t.subresults[e]=r.toArray()}return t},t.createFromArray=function(e){var r=t.create(e.query_uuid?e.query_uuid:"",e.total_items?e.total_items:0,e.total_hits?e.total_hits:0,e.aggregations instanceof Object?o.ResultAggregations.createFromArray(e.aggregations):null,e.suggests?e.suggests:[],e.items instanceof Array?e.items.map((function(t){return n.Item.createFromArray(t)})):[],void 0===e.autocomplete?null:e.autocomplete,void 0===e.metadata?{}:e.metadata),i=typeof e.subresults==typeof{}?e.subresults:{};for(var s in i)r.subresults[s]=t.createFromArray(i[s]);return r},t}();e.Result=i},9476:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResultAggregation=void 0;var n=r(5215),o=r(1248),i=r(8901),s=function(){function t(t,e,r,n,o){for(var i in void 0===o&&(o={}),this.counters={},this.highestActiveElement=0,this.name=t,this.applicationType=e,this.totalElements=r,this.activeElements={},this.metadata=o,n){var s=n[i];this.activeElements[s]=s}}return t.prototype.addCounter=function(t,e){if(0!=e){var r=i.Counter.createByActiveElements(t,e,Object.keys(this.activeElements));if(r instanceof i.Counter)return this.applicationType&o.FILTER_MUST_ALL_WITH_LEVELS&&this.applicationType&~o.FILTER_MUST_ALL&&r.isUsed()?(this.activeElements[r.getId()]=r,void(this.highestActiveElement=Math.max(r.getLevel(),this.highestActiveElement))):void(this.counters[r.getId()]=r)}},t.prototype.getName=function(){return this.name},t.prototype.getCounters=function(){return this.counters},t.prototype.getMetadata=function(){return this.metadata},t.prototype.isFilter=function(){return(this.applicationType&o.FILTER_MUST_ALL)>0},t.prototype.hasLevels=function(){return(this.applicationType&o.FILTER_MUST_ALL_WITH_LEVELS)>0},t.prototype.getCounter=function(t){return this.counters[t]instanceof i.Counter?this.counters[t]:null},t.prototype.getAllElements=function(){return n.__assign(n.__assign({},this.activeElements),this.counters)},t.prototype.getTotalElements=function(){return this.totalElements},t.prototype.getActiveElements=function(){if(0===Object.keys(this.activeElements).length)return{};if(this.applicationType===o.FILTER_MUST_ALL_WITH_LEVELS){var t=null;for(var e in this.activeElements){var r=this.activeElements[e];r instanceof i.Counter&&(null==t&&(t=r),t=t.getLevel()>r.getLevel()?t:r)}return t instanceof i.Counter?{0:t}:null}return this.activeElements},t.prototype.cleanCountersByLevel=function(){for(var t in this.counters)this.counters[t].getLevel()!==this.highestActiveElement+1&&delete this.counters[t]},t.prototype.isEmpty=function(){return 0==Object.keys(this.activeElements).length&&0==Object.keys(this.counters).length},t.prototype.toArray=function(){var t={name:this.name,counters:[],active_elements:[],metadata:this.metadata};for(var e in this.counters)t.counters.push(this.counters[e].toArray());for(var e in this.applicationType!==o.FILTER_AT_LEAST_ONE&&(t.application_type=this.applicationType),this.totalElements>0&&(t.total_elements=this.totalElements),this.activeElements){var r=this.activeElements[e];t.active_elements.push(r instanceof i.Counter?r.toArray():r)}return this.highestActiveElement>0&&(t.highest_active_level=this.highestActiveElement),0===t.counters.length&&delete t.counters,0===t.active_elements.length&&delete t.active_elements,0===Object.keys(t.metadata).length&&delete t.metadata,t},t.createFromArray=function(e){var r=[],n=e.active_elements;for(var s in n=typeof n==typeof[]?n:[]){var a=n[s];r.push(typeof a==typeof{}?i.Counter.createFromArray(a):a)}var u=new t(e.name,parseInt(e.application_type?e.application_type:o.FILTER_AT_LEAST_ONE),parseInt(e.total_elements?e.total_elements:0),[]);u.activeElements=r;var l=typeof e.counters==typeof[]?e.counters:[];for(var s in l){var c=l[s];if("function"!=typeof c){var p=i.Counter.createFromArray(c);u.counters["_"+p.getId()]=p}}return u.highestActiveElement="number"==typeof e.highest_active_level?e.highest_active_level:0,u.metadata=typeof e.metadata==typeof{}?e.metadata:{},u},t}();e.ResultAggregation=s},2299:(t,e,r)=>{"use strict";e.__esModule=!0,e.ResultAggregations=void 0;var n=r(9476),o=function(){function t(t){this.aggregations={},this.totalElements=t}return t.prototype.addAggregation=function(t,e){this.aggregations[t]=e},t.prototype.getAggregations=function(){return this.aggregations},t.prototype.getAggregation=function(t){return this.aggregations[t]instanceof n.ResultAggregation?this.aggregations[t]:null},t.prototype.hasNotEmptyAggregation=function(t){var e=this.getAggregation(t);return e instanceof n.ResultAggregation&&!e.isEmpty()},t.prototype.getTotalElements=function(){return this.totalElements},t.prototype.toArray=function(){var t={};for(var e in this.aggregations)t[e]=this.aggregations[e].toArray();var r={};return this.totalElements>0&&(r.total_elements=this.totalElements),Object.keys(t).length>0&&(r.aggregations=t),r},t.createFromArray=function(e){var r=new t("number"==typeof e.total_elements?e.total_elements:0);if(typeof e.aggregations==typeof{})for(var o in e.aggregations)r.addAggregation(o,n.ResultAggregation.createFromArray(e.aggregations[o]));return r},t}();e.ResultAggregations=o},6256:(t,e)=>{"use strict";e.__esModule=!0},76:(t,e,r)=>{"use strict";e.__esModule=!0,e.Transformer=void 0;var n=r(9934),o=r(5301),i=function(){function t(){this.readTransformers=[],this.writeTransformers=[]}return t.prototype.addReadTransformer=function(t){this.readTransformers.push(t)},t.prototype.hasReadTransformers=function(){return this.readTransformers.length>0},t.prototype.addWriteTransformer=function(t){this.writeTransformers.push(t)},t.prototype.fromItems=function(t){var e=[];for(var r in t)e.push(this.fromItem(t[r]));return e},t.prototype.fromItem=function(t){for(var e in this.readTransformers){var r=this.readTransformers[e];if(r.isValidItem(t))return r.fromItem(t)}return t},t.prototype.toItems=function(t){var e=[];for(var r in t){var o=this.toItem(t[r]);o instanceof n.Item&&e.push(o)}return e},t.prototype.toItem=function(t){for(var e in this.writeTransformers){var r=this.writeTransformers[e];if(r.isValidObject(t))return r.toItem(t)}return t},t.prototype.toItemUUIDs=function(t){var e=[];for(var r in t){var n=this.toItemUUID(t[r]);n instanceof o.ItemUUID&&e.push(n)}return e},t.prototype.toItemUUID=function(t){for(var e in this.writeTransformers){var r=this.writeTransformers[e];if(r.isValidObject(t))return r.toItemUUID(t)}return t},t}();e.Transformer=i},6889:(t,e)=>{"use strict";e.__esModule=!0},5059:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(5215),o=r(9347);e.default=o.default,n.__exportStar(r(6282),e),n.__exportStar(r(5787),e),n.__exportStar(r(8864),e),n.__exportStar(r(109),e),n.__exportStar(r(7214),e),n.__exportStar(r(5265),e),n.__exportStar(r(1062),e),n.__exportStar(r(748),e),n.__exportStar(r(580),e),n.__exportStar(r(1912),e),n.__exportStar(r(5272),e),n.__exportStar(r(5093),e),n.__exportStar(r(5245),e),n.__exportStar(r(6113),e),n.__exportStar(r(2113),e),n.__exportStar(r(8609),e),n.__exportStar(r(6929),e),n.__exportStar(r(7112),e),n.__exportStar(r(9367),e),n.__exportStar(r(9934),e),n.__exportStar(r(5301),e),n.__exportStar(r(1984),e),n.__exportStar(r(2850),e),n.__exportStar(r(4402),e),n.__exportStar(r(1248),e),n.__exportStar(r(4148),e),n.__exportStar(r(2641),e),n.__exportStar(r(9643),e),n.__exportStar(r(5911),e),n.__exportStar(r(8699),e),n.__exportStar(r(1802),e),n.__exportStar(r(7226),e),n.__exportStar(r(9476),e),n.__exportStar(r(2299),e),n.__exportStar(r(8901),e),n.__exportStar(r(5584),e),n.__exportStar(r(6256),e),n.__exportStar(r(76),e),n.__exportStar(r(6889),e)},7007:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(t,e){return new Promise((function(r,n){function o(r){t.removeListener(e,i),n(r)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),r([].slice.call(arguments))}_(t,e,i,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&_(t,"error",e,{once:!0})}(t,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var o,i,s,l;if(a(r),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),s=i[e]),void 0===s)s=i[e]=r,++t._eventsCount;else if("function"==typeof s?s=i[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=u(t))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},o=c.bind(n);return o.listener=r,n.wrapFn=o,o}function f(t,e,r){var n=t._events;if(void 0===n)return[];var o=n[e];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var l=u.length,c=h(u,l);for(r=0;r=0;i--)if(r[i]===e||r[i].listener===e){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},i.prototype.listeners=function(t){return f(this,t,!0)},i.prototype.rawListeners=function(t){return f(this,t,!1)},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7965:function(t){t.exports=function(){"use strict";var t=Object.prototype.toString,e=Array.isArray||function(e){return"[object Array]"===t.call(e)};function r(t){return"function"==typeof t}function n(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function o(t,e){return null!=t&&"object"==typeof t&&e in t}var i=RegExp.prototype.test;var s=/\S/;function a(t){return!function(t,e){return i.call(t,e)}(s,t)}var u={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};var l=/\s*/,c=/\s+/,p=/\s*=/,f=/\s*\}/,d=/#|\^|\/|>|\{|&|=|!/;function h(t){this.string=t,this.tail=t,this.pos=0}function _(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function y(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var r=e[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r},h.prototype.scanUntil=function(t){var e,r=this.tail.search(t);switch(r){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,r),this.tail=this.tail.substring(r)}return this.pos+=e.length,e},_.prototype.push=function(t){return new _(t,this)},_.prototype.lookup=function(t){var e,n,i,s=this.cache;if(s.hasOwnProperty(t))e=s[t];else{for(var a,u,l,c=this,p=!1;c;){if(t.indexOf(".")>0)for(a=c.view,u=t.split("."),l=0;null!=a&&l0?o[o.length-1][4]:r;break;default:n.push(e)}return r}(function(t){for(var e,r,n=[],o=0,i=t.length;o"===s?a=this.renderPartial(i,e,r,o):"&"===s?a=this.unescapedValue(i,e):"name"===s?a=this.escapedValue(i,e,o):"text"===s&&(a=this.rawValue(i)),void 0!==a&&(u+=a);return u},y.prototype.renderSection=function(t,n,o,i,s){var a=this,u="",l=n.lookup(t[1]);if(l){if(e(l))for(var c=0,p=l.length;c0||!r)&&(o[i]=n+o[i]);return o.join("\n")},y.prototype.renderPartial=function(t,e,n,o){if(n){var i=this.getConfigTags(o),s=r(n)?n(t[1]):n[t[1]];if(null!=s){var a=t[6],u=t[5],l=t[4],c=s;0==u&&l&&(c=this.indentPartial(s,l,a));var p=this.parse(c,i);return this.renderTokens(p,e,n,c,o)}}},y.prototype.unescapedValue=function(t,e){var r=e.lookup(t[1]);if(null!=r)return r},y.prototype.escapedValue=function(t,e,r){var n=this.getConfigEscape(r)||g.escape,o=e.lookup(t[1]);if(null!=o)return"number"==typeof o&&n===g.escape?String(o):n(o)},y.prototype.rawValue=function(t){return t[1]},y.prototype.getConfigTags=function(t){return e(t)?t:t&&"object"==typeof t?t.tags:void 0},y.prototype.getConfigEscape=function(t){return t&&"object"==typeof t&&!e(t)?t.escape:void 0};var g={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){m.templateCache=t},get templateCache(){return m.templateCache}},m=new y;return g.clearCache=function(){return m.clearCache()},g.parse=function(t,e){return m.parse(t,e)},g.render=function(t,r,n,o){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+((e(i=t)?"array":typeof i)+'" was given as the first argument for mustache#render(template, view, partials)'));var i;return m.render(t,r,n,o)},g.escape=function(t){return String(t).replace(/[&<>"'`=\/]/g,(function(t){return u[t]}))},g.Scanner=h,g.Context=_,g.Writer=y,g}()},5299:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Children:()=>k,Component:()=>s.Component,Fragment:()=>s.Fragment,PureComponent:()=>U,StrictMode:()=>vt,Suspense:()=>q,SuspenseList:()=>V,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>pt,cloneElement:()=>_t,createContext:()=>s.createContext,createElement:()=>s.createElement,createFactory:()=>dt,createPortal:()=>$,createRef:()=>s.createRef,default:()=>Et,findDOMNode:()=>gt,forwardRef:()=>M,hydrate:()=>et,isValidElement:()=>ht,lazy:()=>G,memo:()=>x,render:()=>tt,unmountComponentAtNode:()=>yt,unstable_batchedUpdates:()=>mt,useCallback:()=>b,useContext:()=>A,useDebugValue:()=>S,useEffect:()=>y,useErrorBoundary:()=>T,useImperativeHandle:()=>v,useLayoutEffect:()=>g,useMemo:()=>E,useReducer:()=>_,useRef:()=>m,useState:()=>h,version:()=>ft});var n,o,i,s=r(172),a=0,u=[],l=s.options.__r,c=s.options.diffed,p=s.options.__c,f=s.options.unmount;function d(t,e){s.options.__h&&s.options.__h(o,t,a||e),a=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function h(t){return a=1,_(F,t)}function _(t,e,r){var i=d(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):F(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function y(t,e){var r=d(n++,3);!s.options.__s&&C(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function g(t,e){var r=d(n++,4);!s.options.__s&&C(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t){return a=5,E((function(){return{current:t}}),[])}function v(t,e,r){a=6,g((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))}function E(t,e){var r=d(n++,7);return C(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function b(t,e){return a=8,E((function(){return t}),e)}function A(t){var e=o.context[t.__c],r=d(n++,9);return r.__c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__}function S(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t)}function T(t){var e=d(n++,10),r=h();return e.__=t,o.componentDidCatch||(o.componentDidCatch=function(t){e.__&&e.__(t),r[1](t)}),[r[0],function(){r[1](void 0)}]}function O(){u.some((function(t){if(t.__P)try{t.__H.__h.forEach(w),t.__H.__h.forEach(R),t.__H.__h=[]}catch(e){return t.__H.__h=[],s.options.__e(e,t.__v),!0}})),u=[]}s.options.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(w),e.__h.forEach(R),e.__h=[])},s.options.diffed=function(t){c&&c(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&i===s.options.requestAnimationFrame||((i=s.options.requestAnimationFrame)||function(t){var e,r=function(){clearTimeout(n),I&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);I&&(e=requestAnimationFrame(r))})(O))},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(w),t.__h=t.__h.filter((function(t){return!t.__||R(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.options.__e(r,t.__v)}})),p&&p(t,e)},s.options.unmount=function(t){f&&f(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(w)}catch(t){s.options.__e(t,e.__v)}};var I="function"==typeof requestAnimationFrame;function w(t){"function"==typeof t.u&&t.u()}function R(t){t.u=t.__()}function C(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function F(t,e){return"function"==typeof e?e(t):e}function N(t,e){for(var r in e)t[r]=e[r];return t}function P(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function U(t){this.props=t}function x(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:P(this.props,t)}function n(e){return this.shouldComponentUpdate=r,(0,s.createElement)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(U.prototype=new s.Component).isPureReactComponent=!0,U.prototype.shouldComponentUpdate=function(t,e){return P(this.props,t)||P(this.state,e)};var D=s.options.__b;s.options.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),D&&D(t)};var L="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function M(t){function e(e,r){var n=N({},e);return delete n.ref,t(n,(r=e.ref||r)&&("object"!=typeof r||"current"in r)?r:null)}return e.$$typeof=L,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var j=function(t,e){return null==t?null:(0,s.toChildArray)((0,s.toChildArray)(t).map(e))},k={map:j,forEach:j,count:function(t){return t?(0,s.toChildArray)(t).length:0},only:function(t){var e=(0,s.toChildArray)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:s.toChildArray},B=s.options.__e;function Y(t){return t&&((t=N({},t)).__c=null,t.__k=t.__k&&t.__k.map(Y)),t}function H(t){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(H)),t}function q(){this.__u=0,this.t=null,this.__b=null}function Q(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function G(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return(0,s.createElement)(r,o)}return o.displayName="Lazy",o.__f=!0,o}function V(){this.u=null,this.o=null}s.options.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e.__c);B(t,e,r)},(q.prototype=new s.Component).__c=function(t,e){var r=this;null==r.t&&(r.t=[]),r.t.push(e);var n=Q(r.__v),o=!1,i=function(){o||(o=!0,e.componentWillUnmount=e.__c,n?n(s):s())};e.__c=e.componentWillUnmount,e.componentWillUnmount=function(){i(),e.__c&&e.__c()};var s=function(){var t;if(! --r.__u)for(r.__v.__k[0]=H(r.state.__e),r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()},a=r.__v;a&&!0===a.__h||r.__u++||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(i,i)},q.prototype.componentWillUnmount=function(){this.t=[]},q.prototype.render=function(t,e){this.__b&&(this.__v.__k&&(this.__v.__k[0]=Y(this.__b)),this.__b=null);var r=e.__e&&(0,s.createElement)(s.Fragment,null,t.fallback);return r&&(r.__h=null),[(0,s.createElement)(s.Fragment,null,e.__e?null:t.children),r]};var W=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]{"use strict";r.r(e),r.d(e,{Component:()=>v,Fragment:()=>m,__u:()=>L,cloneElement:()=>B,createContext:()=>Y,createElement:()=>_,createRef:()=>g,h:()=>_,hydrate:()=>k,isValidElement:()=>o,options:()=>n,render:()=>j,toChildArray:()=>O});var n,o,i,s,a,u,l,c={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t,e,r){var n,o,i,s=arguments,a={};for(i in e)"key"==i?n=e[i]:"ref"==i?o=e[i]:a[i]=e[i];if(arguments.length>3)for(r=[r],i=3;i1&&N(o,e,r),e=I(r,o,o,t.__k,null,o.__e,e),"function"==typeof t.type&&(t.__d=e)))}function P(t,e,r,o,i,s,a,u,l){var c,p,f,h,_,y,g,E,b,A,S,O=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(l=r.__h,u=e.__e=r.__e,e.__h=null,s=[u]),(c=n.__b)&&c(e);try{t:if("function"==typeof O){if(E=e.props,b=(c=O.contextType)&&o[c.__c],A=c?b?b.props.value:c.__:o,r.__c?g=(p=e.__c=r.__c).__=p.__E:("prototype"in O&&O.prototype.render?e.__c=p=new O(E,A):(e.__c=p=new v(E,A),p.constructor=O,p.render=M),b&&b.sub(p),p.props=E,p.state||(p.state={}),p.context=A,p.__n=o,f=p.__d=!0,p.__h=[]),null==p.__s&&(p.__s=p.state),null!=O.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=d({},p.__s)),d(p.__s,O.getDerivedStateFromProps(E,p.__s))),h=p.props,_=p.state,f)null==O.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==O.getDerivedStateFromProps&&E!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(E,A),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(E,p.__s,A)||e.__v===r.__v){p.props=E,p.state=p.__s,e.__v!==r.__v&&(p.__d=!1),p.__v=e,e.__e=r.__e,e.__k=r.__k,p.__h.length&&a.push(p),N(e,u,t);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(E,p.__s,A),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(h,_,y)}))}p.context=A,p.props=E,p.state=p.__s,(c=n.__r)&&c(e),p.__d=!1,p.__v=e,p.__P=t,c=p.render(p.props,p.state,p.context),p.state=p.__s,null!=p.getChildContext&&(o=d(d({},o),p.getChildContext())),f||null==p.getSnapshotBeforeUpdate||(y=p.getSnapshotBeforeUpdate(h,_)),S=null!=c&&c.type==m&&null==c.key?c.props.children:c,T(t,Array.isArray(S)?S:[S],e,r,o,i,s,a,u,l),p.base=e.__e,e.__h=null,p.__h.length&&a.push(p),g&&(p.__E=p.__=null),p.__e=!1}else null==s&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=x(r.__e,e,r,o,i,s,a,l);(c=n.diffed)&&c(e)}catch(t){e.__v=null,(l||null!=s)&&(e.__e=u,e.__h=!!l,s[s.indexOf(u)]=null),n.__e(t,e,r)}return e.__e}function U(t,e){n.__c&&n.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){n.__e(t,e.__v)}}))}function x(t,e,r,n,o,i,s,a){var u,l,f,d,h,_=r.props,y=e.props;if(o="svg"===e.type||o,null!=i)for(u=0;u3)for(r=[r],i=3;i{"use strict";e.__esModule=!0;var n=r(2634),o=r(5059),i=function(){function t(){}return t.prototype.sortBy=function(t,e){(0,n.applySortByToQuery)(t,e)},t.prototype.boostByWeightAndFilter=function(t,e,r,n){var i,s=null!==(i=t.getScoreStrategies())&&void 0!==i?i:o.ScoreStrategies.createEmpty(o.MULTIPLY);s.addScoreStrategy(o.ScoreStrategy.createFromArray({type:"weight",weight:n,filter:{field:e,values:[r],application_type:o.FILTER_MUST_ALL,filter_type:o.FILTER_TYPE_FIELD},match_main_query:!0})),t.setScoreStrategies(s)},t}();e.default=i},6798:function(t,e,r){"use strict";var n=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o{"use strict";e.__esModule=!0;var n=r(6798),o=function(){function t(){}return t.fromConfig=function(e){var r=new t;return r.config=e,r},t.prototype.createUI=function(t){return void 0===t&&(t=null),n.default.create(this.config,t)},t}();e.default=o},5978:(t,e,r)=>{"use strict";e.__esModule=!0,e.bootstrap=void 0;var n=r(5279),o=r(5059),i=r(6798),s=r(803),a=r(9673),u=r(9913);e.bootstrap=function(t,e,r){var l=JSON.stringify(e),c="".concat(u.APISEARCH_REPOSITORY,"__").concat(l),p="".concat(u.APISEARCH_STORE,"__").concat(t),f="".concat(u.APISEARCH_DISPATCHER,"__").concat(t),d="".concat(u.APISEARCH_CONFIG,"__").concat(t),h="".concat(u.APISEARCH_UI,"__").concat(t);s.default.register(c,(function(){return o.default.createRepository(e)})),s.default.register(p,(function(){var t,n,o,i,s,u;return new a.default(e.coordinate,e.options.min_score,r,null!==(t=e.user_id)&&void 0!==t?t:"",null!==(n=e.options.site)&&void 0!==n?n:"",null!==(o=e.options.language)&&void 0!==o?o:"",null!==(i=e.options.device)&&void 0!==i?i:"",null!==(s=e.options.generate_random_session_uuid)&&void 0!==s&&s,null!==(u=e.options.initial_state)&&void 0!==u?u:{})})),s.default.register(f,(function(){return new n.Dispatcher})),s.default.register(d,(function(){return e})),s.default.register(h,(function(){return new i.default(t,s.default.get(c),s.default.get(p))}))}},9913:(t,e)=>{"use strict";e.__esModule=!0,e.APISEARCH_CONFIG=e.APISEARCH_UI=e.APISEARCH_DISPATCHER=e.APISEARCH_STORE=e.APISEARCH_REPOSITORY=void 0,e.APISEARCH_REPOSITORY="apisearch_repository",e.APISEARCH_STORE="apisearch_store",e.APISEARCH_DISPATCHER="apisearch_dispatcher",e.APISEARCH_UI="apisearch_ui",e.APISEARCH_CONFIG="apisearch_config"},803:(t,e)=>{"use strict";e.__esModule=!0;var r=function(){function t(){this.services={}}return t.prototype.get=function(t){if(this.services[t])return this.services[t];throw new Error("Service with id (".concat(t,") is not registered."))},t.prototype.register=function(t,e){this.services[t]=e()},t}();e.default=new r},5279:(t,e)=>{"use strict";e.__esModule=!0,e.Dispatcher=void 0;var r=function(){function t(){this.events={}}return t.prototype.registerListener=function(t,e){void 0===this.events[t]&&(this.events[t]={listeners:[]}),this.events[t].listeners.push(e)},t.prototype.dispatch=function(t,e){this.events[t].listeners.forEach((function(t){t(e)}))},t}();e.Dispatcher=r},5193:(t,e)=>{"use strict";e.__esModule=!0,e.createEnvironmentId=void 0,e.createEnvironmentId=function(){return"env_".concat(Math.ceil(9999998*Math.random()+1))}},1828:(t,e)=>{"use strict";function r(t,e){for(var r=t.textContent,o=r.split(" ").filter((function(t){return""!==t})),i={},s=0;s=5&&c<10?p=1:c>=10&&(p=2),n(u.substring(0,c).toLowerCase(),l.substring(0,c).toLowerCase())<=p){i[u]=""+u+"";break}}for(var f=0,d=Object.entries(i);f0},e.prototype.resultsAreVisible=function(){return this.currentVisibleResults},e.prototype.updateApisearchSetup=function(t){this.currentQuery=t.query},e.prototype.renderInitialData=function(t){var e=t.result,r=t.query;t._,this.dirty=!1,this.currentResult=e,this.currentQuery=r,this.currentVisibleResults=void 0!==r,this.emit("render"),this.replaceUrl(r,e,this.currentVisibleResults)},e.prototype.renderFetchedData=function(t){var e=t.result,r=t.query,n=t.visibleResults;this.dirty=!1,this.currentResult=e,this.currentQuery=r,void 0!==n&&(this.currentVisibleResults=n),this.emit("render"),this.replaceUrl(r,e,n)},e.createUID=function(t){for(var e="",r=0;r0)return this.emit("fromUrlObject",this.initialState,e),i.Query.createFromArray(e);if(!this.withHash)return t;var r={};if(null!==this.urlHash.match("q=.*"))r={q:decodeURI(this.urlHash.slice(2))},this.emit("fromUrlObject",r,e);else try{r=void 0!==this.urlHash&&null!==this.urlHash&&""!==this.urlHash&&"/"!==this.urlHash?JSON.parse(decodeURI(this.urlHash)):{},Object.keys(r).length>0&&this.emit("fromUrlObject",r,e)}catch(t){this.doNotCleanUrlHashAtFirst=!0}return i.Query.createFromArray(e)},e.prototype.replaceUrl=function(t,e,r){if(this.withHash){var n,o=t.toArray(),i={};if(this.emit("toUrlObject",o,i),1===Object.keys(i).length&&void 0!==i.q?n="q="+i.q:(n="{}"===(n=decodeURI(JSON.stringify(i)))?"":n,n=encodeURI(n)),this.isUnderIframe)this.doNotCleanUrlHashAtFirst||this.window.postMessage({name:"apisearch_replace_hash",hash:n},"*"),this.doNotCleanUrlHashAtFirst=!1;else{var s=window.location.href.split("#",2)[0];history.replaceState("","",s+"#"+n),""===n&&history.replaceState("","",s)}}},e}(s.EventEmitter);e.default=l},4847:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=r(7726),u=function(t){function e(e){var r=t.call(this,e)||this;return r.state={mobile_img:"",desktop_img:"",url:""},r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e;if(null!=t.store.getCurrentResult()){var r=null!==(e=t.store.getCurrentResult().metadata.banners)&&void 0!==e?e:[];if(r){var n=r.filter((function(e){return e.position===t.position}));if(0!==n.length){var o=n[0];this.setState((function(t){return{mobile_img:o.mobile_img,desktop_img:o.desktop_img,url:o.url}}))}else this.setState((function(t){return{mobile_img:"",desktop_img:"",url:""}}))}else this.setState((function(t){return{mobile_img:"",desktop_img:"",url:""}}))}else this.setState((function(t){return{mobile_img:"",desktop_img:"",url:""}}))},e.prototype.render=function(){var t;if(""!==this.state.desktop_img){var e={desktop_img:this.state.desktop_img,mobile_img:null!==(t=this.state.mobile_img)&&void 0!==t?t:this.state.desktop_img,url:this.state.url,has_url:""!==this.state.url,breaking_point_size:this.props.breakingPointSize,image_prefix:this.props.imagePrefix};return(0,i.h)(s.default,{template:a.defaultBannerTemplate,data:e,dictionary:this.props.dictionary})}},e}(i.Component);e.default=u},7726:(t,e)=>{"use strict";e.__esModule=!0,e.defaultBannerTemplate=void 0,e.defaultBannerTemplate='\n \n'},4927:(t,e,r)=>{"use strict";e.__esModule=!0,e.onChangeSearchAction=e.aggregationSetup=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.aggregationSetup=function(t,e,r,a){var u=s.default.object(e);u.aggregateBy(r,a,n.FILTER_TYPE_FIELD),i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:u})},e.onChangeSearchAction=function(t,e,r,a,u,l,c){window.postMessage({name:"apisearch_scroll_top"},"*");var p=s.default.object(e);p.filterBy(a,u,l?[c]:[],n.FILTER_MUST_ALL,!1),p.page=1;var f=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));r.query(p).then((function(t){f.dispatch("RENDER_FETCHED_DATA",{query:p,result:t})})).catch((function(t){}))}},1549:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(481),a=r(4927),u=r(3701),l=r(7707),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleChange=function(t){var r=e.props;(0,a.onChangeSearchAction)(r.environmentId,r.store.getCurrentQuery(),r.repository,r.filterName,r.filterField,t,r.filterValue)},e}return o(e,t),e.prototype.componentWillMount=function(){var t=this.props,e=t.environmentId,r=t.filterName,n=t.filterField,o=t.store.getCurrentQuery();(0,a.aggregationSetup)(e,o,r,n)},e.prototype.componentWillReceiveProps=function(t){this.setState((function(e){return{aggregation:t.store.getCurrentResult().getAggregation(t.filterName)}}))},e.prototype.render=function(t,e){var r=t.classNames.container,n=t.classNames.top,o=t.classNames.item,a=t.classNames.active,l=t.template.top,c=t.template.item,p=t.filterValue;"boolean"==typeof p&&(p=p?"true":"false");var f=0,d=(0,s.getFilterValuesFromQuery)(t.store.getCurrentQuery(),t.filterName)[0],h=e.aggregation;if(null!=h){var _=h.getCounters();for(var y in _){var g=_[y];if(g.values.name===p){f=g.getN();break}}}var m=t.label?t.label:t.filterName,v=this,E=Math.floor(1e10*Math.random()),b={n:f,isActive:d,label:m,uid:E};return 0===f?null:(0,i.h)("div",{className:"as-checkboxFilter ".concat(r)},(0,i.h)(u.default,{template:l,className:"as-checkboxFilter__top ".concat(n),dictionary:this.props.dictionary}),(0,i.h)("div",{className:"as-checkboxFilter__item "+"".concat(o," ")+"".concat(d?a:""),onClick:function(t){t.stopPropagation(),t.preventDefault(),v.handleChange(!d)}},(0,i.h)(u.default,{template:c,data:b,dictionary:this.props.dictionary})))},e}(i.Component);c.defaultProps={filterValue:"true",classNames:{container:"",top:"",item:"",active:"as-checkboxFilter__item--active"},template:{top:null,item:l.defaultItemTemplate}},e.default=c},7707:(t,e)=>{"use strict";e.__esModule=!0,e.defaultItemTemplate=void 0,e.defaultItemTemplate='\n \n \n {{{label}}}\n \n \n {{n}}\n \n'},181:(t,e,r)=>{"use strict";e.__esModule=!0,e.clearFiltersAction=void 0;var n=r(9913),o=r(803),i=r(5544);e.clearFiltersAction=function(t,e,r,s,a){void 0===s&&(s=null),void 0===a&&(a=null),window.postMessage({name:"apisearch_scroll_top"},"*");var u=i.default.object(e);if(null===s)u.filters={_query:e.getFilter("_query")};else if(null===a)delete u.filters[s];else{var l=u.filters[s].values.indexOf(a,0);l>-1&&u.filters[s].values.splice(l,1),0===u.filters[s].values.length&&delete u.filters[s]}u.page=1;var c=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));r.query(u).then((function(t){c.dispatch("RENDER_FETCHED_DATA",{query:u,result:t})})).catch((function(t){}))}},2651:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(5059),s=r(172),a=r(3701),u=r(181),l=function(t){function e(){var e=t.call(this)||this;return e.handleClick=function(){var t=e.props,r=t.environmentId,n=t.store.getCurrentQuery(),o=t.repository;e.setState((function(t){return{appliedFilters:[],showClearFilters:!1}})),(0,u.clearFiltersAction)(r,n,o)},e.handleIndividualClick=function(t,r){var n=e.props,o=n.environmentId,i=n.store.getCurrentQuery(),s=n.repository;(0,u.clearFiltersAction)(o,i,s,t,r)},e.state={appliedFilters:[],showClearFilters:!1},e}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e=this.getFiltersToShow();this.setState((function(t){return{appliedFilters:e,showClearFilters:e.length>0}}))},e.prototype.getFiltersToShow=function(t){void 0===t&&(t=null);for(var e=this.props.store.getCurrentQuery().getFilters(),r=[],n=0,o=Object.entries(e);n=0,u=i?t.props.template.filter_price:t.props.template.filter;return i&&(e.parts=e.value.replace(/[\[\]]/,"").split(".."),"0"===(null!==(r=e.parts[0])&&void 0!==r?r:"")?u=t.props.template.filter_price_only_to:""===(null!==(n=e.parts[1])&&void 0!==n?n:"")&&(u=t.props.template.filter_price_only_from)),(0,s.h)("li",{className:"as-clearFilters__filter ".concat(o),onClick:function(){return t.handleIndividualClick(e.filter,e.value)}},(0,s.h)(a.default,{template:u,dictionary:t.props.dictionary,data:e}))})))}else e.showIndividualFilterClear&&(l=(0,s.h)("ul",{className:"as-clearFilters__filtersList ".concat(n)},u.map((function(e){return(0,s.h)("li",{className:"as-clearFilters__filter ".concat(o),onClick:function(){return t.handleIndividualClick(e.filter,null)}},(0,s.h)(a.default,{template:t.props.template.filter,dictionary:t.props.dictionary,data:e}))}))));return this.state.showClearFilters?(0,s.h)("div",{className:"as-clearFilters ".concat(r," ").concat(c)},e.showGlobalFilterClear?(0,s.h)("div",{onClick:this.handleClick},(0,s.h)(a.default,{template:i,dictionary:this.props.dictionary})):"",l):null},e}(s.Component);l.defaultProps={classNames:{container:"",filter:"",filtersList:""},showGlobalFilterClear:!0,showIndividualFilterClear:!1,showIndividualFilterValueClear:!1,template:{container:"Clear filters",filter:"Clear {{filter}} ({{num}})"}},e.default=l},5544:(t,e)=>{"use strict";e.__esModule=!0;var r=function(){function t(){}return t.object=function(t){return Object.assign(Object.create(Object.getPrototypeOf(t)),t)},t}();e.default=r},676:(t,e,r)=>{"use strict";e.__esModule=!0,e.onWordClickAction=void 0;var n=r(5059),o=r(5544),i=r(803),s=r(9913);e.onWordClickAction=function(t,e,r,a,u){void 0===u&&(u=null);var l=o.default.object(e);l.filters._query.values=[a],l.page=1,u&&(l=n.Query.createFromArray(l)).filterBy("Categoría","category_level_0",[u]);var c=i.default.get("".concat(s.APISEARCH_DISPATCHER,"__").concat(t));r.query(l).then((function(t){c.dispatch("RENDER_FETCHED_DATA",{query:l,result:t})})).catch((function(t){}))}},7677:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=function(t){function e(e){var r=t.call(this,e)||this;return r.state={hits:0,total:0,visible:!1},r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){this.setState((function(e){return null==t.store.getCurrentResult()?{hits:0,total:0,visible:!1}:{hits:t.store.getCurrentResult().getTotalHits(),total:t.store.getCurrentResult().getTotalItems(),visible:!0}}))},e.prototype.render=function(){var t=this.props,e=t.classNames.container,r=t.template.container,n=t.formatData;if(this.state.visible){var o=this.props.store.getCurrentQuery(),a=o.getSize(),u=o.getPage(),l=(u-1)*a,c=l+a,p=this.state.hits.toLocaleString(),f=!1;"10,000"===p&&(p="+10,000",f=!0);var d=n({total_hits:p,total_items:this.state.total.toLocaleString(),page:u,size:a,from:l+1,to:c,more_than_limit:f});return(0,i.h)(s.default,{template:r,data:d,className:"as-information ".concat(e),dictionary:this.props.dictionary})}},e}(i.Component);a.defaultProps={classNames:{container:""},template:{container:"Found {{total_hits}}/{{total_items}}"},formatData:function(t){return t}},e.default=a},481:function(t,e){"use strict";var r=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o{"use strict";e.__esModule=!0,e.configureQueryWithShadowLeveledFilters=e.modifyQueryAggregationWithProperLevelValue=e.filterAction=e.aggregationSetup=void 0;var n=r(5059),o=r(9913),i=r(5059),s=r(803),a=r(5544);function u(t,e,r){for(var o=1;o<10;o++){var i=r+"_level_"+o;delete t.filters[i],delete t.aggregations[i]}if(e.length>0){var s=1;e.forEach((function(e){var o=r+"_level_"+s++;t.filterBy(o,o,[e],n.FILTER_AT_LEAST_ONE)}))}}e.aggregationSetup=function(t,e,r,n,u,l,c,p,f,d){var h=a.default.object(e),_=Object.keys(f);_.length>0?h.aggregateByRange(r,u,_,l,i.FILTER_TYPE_RANGE,c,p,d):h.aggregateBy(r,u,l,c,p,d),s.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:h})},e.filterAction=function(t,e,r,n,l,c,p,f,d,h,_,y,g,m,v,E){window.postMessage({name:"apisearch_scroll_top"},"*");var b=a.default.object(e),A=Object.keys(_);A.length>0?(b.filterByRange(n,l,A,p,f,i.FILTER_TYPE_RANGE,!1,d),b.aggregateByRange(n,c,A,f,i.FILTER_TYPE_RANGE,d,h)):(b.filterBy(n,l,p,f,!1,d),b.aggregateBy(n,c,f,d,h,v)),6===f&&u(b,g,m),b.page=1;var S=s.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));E&&b.setMetadataValue("af",[l,E]),r.query(b).then((function(t){delete b.metadata.af,S.dispatch("RENDER_FETCHED_DATA",{query:b,result:t})})).catch((function(t){}))},e.modifyQueryAggregationWithProperLevelValue=function(t,e,r,n,i){if(void 0!==e.filters&&void 0!==e.filters[r]){var u=a.default.object(e),l=e.filters[r].field.split("_"),c=parseInt(l[l.length-1],10),p=l.slice(0,l.length-1).join("_");u.aggregations[r].field=p+"_"+(c+1),s.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:u})}},e.configureQueryWithShadowLeveledFilters=u},5587:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o0?e.ranges:e.labels,A=this,S={},T=this.state.aggregations.map((function(t){var e=Math.floor(1e10*Math.random()),r=t.getValues();return r.name=b[r.name]?b[r.name]:r.name,S[r.id]=!0,{isActive:t.isUsed(),n:t.getN(),uid:e,values:r}})),O=6===e.applicationType?(0,u.getShadowFilterValuesFromQuery)(v,e.filterName,!0):(0,u.getFilterValuesFromQuery)(v,e.filterName);if(O.length>0){var I=[];O.forEach((function(t){if(void 0===S[t]){var e=Math.floor(1e10*Math.random());I.push({isActive:!0,n:0,uid:e,values:{id:t,name:t}})}})),T=i(i([],I,!0),T,!0)}if(0===T.length)return null;var w=T.slice(0,this.state.viewLimit),R=T.length,C=1,F={hasApplied:O.length>0,nApplied:O.length},N=r&&rr;return(0,s.h)("div",{className:"as-multipleFilter ".concat(o)},(0,s.h)(l.default,{template:_,className:"as-multipleFilter__top ".concat(a),dictionary:this.props.dictionary,data:F}),(0,s.h)("div",{className:"as-multipleFilter__itemsList ".concat(p)},(0,s.h)("ul",null,w.map((function(r){var n=E(r),o=Math.min(C,t.currentLevel+1);return C++,(0,s.h)("li",{className:"as-multipleFilter__item "+"".concat(f," ")+"".concat(r.isActive?d:"")+"".concat(e.promoted.includes(r.values.name)?"as-multipleFilter__item_featured":""),onClick:function(t){t.stopPropagation(),t.preventDefault(),A.handleClick(r.values.id,o)}},(0,s.h)(l.default,{template:y,data:n,dictionary:t.props.dictionary}))})))),N?(0,s.h)(c.default,{allItemsLength:R,currentLimit:this.state.viewLimit,handleShowMore:this.handleShowMore,handleShowLess:this.handleShowLess,showMoreContainerClassName:h,showMoreTemplate:g,showLessTemplate:m,dictionary:this.props.dictionary}):null)},e}(s.Component);f.defaultProps={aggregationField:null,applicationType:8,fetchLimit:10,viewLimit:null,sortBy:["_term","desc"],ranges:{},labels:{},classNames:{container:"",top:"",itemsList:"",item:"",active:"as-multipleFilter__item--active",showMoreContainer:""},template:{top:null,item:p.defaultItemTemplate,showMore:"+ Show more",showLess:"- Show less"},formatData:function(t){return t},activeFirst:!0,promoted:[]},e.default=f},7277:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(172),o=r(3701);e.default=function(t){var e=t.allItemsLength,r=t.currentLimit,i=t.handleShowMore,s=t.handleShowLess,a=t.showMoreContainerClassName,u=t.showMoreTemplate,l=t.showLessTemplate,c=t.dictionary;return e>r?(0,n.h)("div",{className:"as-showMore ".concat(a),onClick:i},(0,n.h)(o.default,{template:u,className:"as-showMore--more",dictionary:c})):e===r?(0,n.h)("div",{className:"as-showMore ".concat(a),onClick:s},(0,n.h)(o.default,{template:l,className:"as-showMore--less",dictionary:c})):null}},718:(t,e)=>{"use strict";e.__esModule=!0,e.defaultItemTemplate=void 0,e.defaultItemTemplate='\n \n \n {{{values.name}}}\n \n \n {{n}}\n \n'},951:(t,e)=>{"use strict";e.__esModule=!0,e.getEnd=e.getStart=e.totalPagesToArray=e.getTotalPages=void 0,e.getTotalPages=function(t,e){t=t>=1e4?9999:t;var r=Math.ceil(t/e);return r>999?999:r},e.totalPagesToArray=function(t){for(var e=[],r=1;r<=t;r++)e.push(r);return e},e.getStart=function(t,e,r,n,o,i){if(o)return r-r%n;if(i){var s=r-(n-t%r);return s>0?s:0}return r-(e+1)},e.getEnd=function(t,e,r,n,o,i){return o?n:i?t:r+e}},6777:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(172),o=r(3701);e.default=function(t){var e=t.isVisible,r=t.classNames,i=t.template,s=t.handleClick;return e?(0,n.h)("li",{className:r,onClick:s},(0,n.h)(o.default,{template:i,dictionary:this.props.dictionary})):null}},8725:(t,e,r)=>{"use strict";e.__esModule=!0,e.paginationChangeAction=void 0;var n=r(9913),o=r(803),i=r(5544);e.paginationChangeAction=function(t,e,r,s){window.postMessage({name:"apisearch_scroll_top"},"*");var a=i.default.object(e);a.page=s;var u=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));r.query(a).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:a,result:t})})).catch((function(t){}))}},5531:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=r(951),u=r(6777),l=r(8725),c=function(t){function e(){var e=t.call(this)||this;return e.handleClick=function(t){var r=e.props,n=r.store,o=r.environmentId,i=r.repository,s=n.getCurrentResult(),u=n.getCurrentQuery(),c=(0,a.getTotalPages)(s.getTotalHits(),u.getSize());t<=0&&(t=1),t>=c&&(t=c),u.getPage()!==t&&(0,l.paginationChangeAction)(o,u,i,t)},e.state={page:1},e}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e=t.store.getCurrentQuery().getPage();this.setState((function(t){return{page:e}}))},e.prototype.render=function(){var t=this,e=this.props,r=e.store.getCurrentResult();if(null!=e.store.getCurrentResult()){var n=e.store.getCurrentQuery().getSize(),o=(0,a.getTotalPages)(r.getTotalHits(),n);if(0===r.getTotalHits()||1===o)return null;var l=e.padding,c=e.goFirstLast,p=e.classNames.container,f=e.classNames.item,d=e.classNames.active,h=e.classNames.disabled,_=e.classNames.next,y=e.classNames.previous,g=e.classNames.last,m=e.classNames.first,v=e.template.item,E=e.template.next,b=e.template.previous,A=e.template.first,S=e.template.last,T=e.store.getCurrentQuery().getPage(),O=(0,a.totalPagesToArray)(o),I=2*l+1,w=T<=l+1,R=T+l>=o,C=O.slice((0,a.getStart)(o,l,T,I,w,R),(0,a.getEnd)(o,l,T,I,w,R)),F=1===T?h:"",N=T===o?h:"";return(0,i.h)("ul",{className:"as-pagination ".concat(p)},(0,i.h)(u.default,{isVisible:c,classNames:"as-pagination__item as-pagination__item--first ".concat(m," ").concat(F),template:A,handleClick:function(){return t.handleClick(1)}}),(0,i.h)(u.default,{isVisible:!0,classNames:"as-pagination__item as-pagination__item--previous ".concat(y," ").concat(F),template:b,handleClick:function(){return t.handleClick(T-1)}}),C.map((function(e){return(0,i.h)("li",{className:"as-pagination__item as-pagination__item--link ".concat(f," ").concat(T===e?d:""),onClick:function(){return t.handleClick(e)}},(0,i.h)(s.default,{template:v,data:{page:e.toLocaleString("de-DE")},dictionary:t.props.dictionary}))})),(0,i.h)(u.default,{isVisible:!0,classNames:"as-pagination__item as-pagination__item--next ".concat(_," ").concat(N),template:E,handleClick:function(){return t.handleClick(T+1)}}),(0,i.h)(u.default,{isVisible:c,classNames:"as-pagination__item as-pagination__item--last ".concat(g," ").concat(N),template:S,handleClick:function(){return t.handleClick(o)}}))}},e}(i.Component);c.defaultProps={padding:3,goFirstLast:!1,classNames:{container:"",item:"",active:"as-pagination__item--active",disabled:"as-pagination__item--disabled",next:"",first:"",previous:"",last:""},template:{item:"{{page}}",next:">",previous:"<",first:"<<",last:">>"}},e.default=c},7869:(t,e,r)=>{"use strict";e.__esModule=!0,e.priorityFilterAction=e.setupPriorityFilters=void 0;var n=r(9913),o=r(803),i=r(5544);e.setupPriorityFilters=function(t,e,r){var s=i.default.object(e);s.setMetadataValue("pf",r),o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:s})},e.priorityFilterAction=function(t,e,r,s,a,u,l){window.postMessage({name:"apisearch_scroll_top"},"*");var c=i.default.object(e);c.filterBy(s,a,[u],l,!1),c.page=1;var p=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));c.setMetadataValue("af",[a,u]),r.query(c).then((function(t){delete c.metadata.af,p.dispatch("RENDER_FETCHED_DATA",{query:c,result:t})})).catch((function(t){}))}},947:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";e.__esModule=!0,e.defaultPriorityFilterItemTemplate=e.defaultPriorityFilterTopTemplate=void 0,e.defaultPriorityFilterTopTemplate="\n {{name}}\n",e.defaultPriorityFilterItemTemplate='\n
{{value}}
\n \n'},3815:(t,e,r)=>{"use strict";e.__esModule=!0,e.filterAction=e.aggregationSetup=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.aggregationSetup=function(t,e,r,a,u,l){var c=null===u||null===l,p=s.default.object(e),f=c?"range_min_max":"range",d=c?[".."]:[u+".."+l];p.aggregateByRange(r,a,d,n.FILTER_AT_LEAST_ONE,f),i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:p})},e.filterAction=function(t,e,r,a,u,l,c){window.postMessage({name:"apisearch_scroll_top"},"*");var p=s.default.object(e),f=Math.min(l,c),d=Math.max(l,c)+"]";p.filterByRange(a,u,[],[f+".."+d],n.FILTER_AT_LEAST_ONE,"range_min_max",!1),p.page=1;var h=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));r.query(p).then((function(t){h.dispatch("RENDER_FETCHED_DATA",{query:p,result:t})})).catch((function(t){}))}},7845:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0?t.minValue:"number"==typeof n.min?Math.floor(n.min):void 0,a="number"==typeof t.maxValue&&t.maxValue>0?t.maxValue:"number"==typeof n.max?Math.ceil(n.max):void 0,u=null,l=e.getFirstItem();if(l){var c=l.get("price"),p=l.get("price_with_currency");c&&p&&(u=this.getCurrencyPlaceholderFromPriceAndPriceWithCurrency(c,p))}var f=this.getFromToFromFilter(o,i,a);this.setState((function(t){return{from:f[0],to:f[1],min:i,max:a,currency_placeholder:u,visible:"number"==typeof i&&"number"==typeof a}}))}else this.setState((function(t){return{from:t.from,to:t.to,min:t.min,max:t.max,currency_placeholder:t.currency_placeholder,visible:!1}}))},e.prototype.getFromToFromFilter=function(t,e,r){var n=Math.min(e,r),o=Math.max(e,r);if(t instanceof s.Filter){var i=t.getValues()[0];if("string"==typeof i){var a=i.split(".."),u=a[0],l=a[1].slice(0,-1);return[Math.max(n,parseInt(u)),Math.min(o,parseInt(l))]}}return[n,o]},e.prototype.componentDidUpdate=function(t,e){this.updateRangeLayer(t,e,e.from,e.to)},e.prototype.updateRangeLayer=function(t,e,r,n){var o=e.min,i=e.max;"number"==typeof r&&"number"==typeof n&&"function"==typeof t.callback&&t.callback(Math.min(r,n),Math.max(r,n),o,i,this.rangeUid,e.currency_placeholder)},e.prototype.render=function(t,e){var r=this,n=(t.filterName,(0,u.useRef)(null)),o=t.template.top,s=t.template.slider,c=t.classNames.container,p=t.classNames.top,f=t.classNames.wrapper,d=this;(0,u.useEffect)((function(){var t=r;if(n.current){var e=r.uid;return n.current.addEventListener("change",o),function(){n.current.removeEventListener("change",o)}}function o(r){var n=r.target.parentNode;t.applyFilter(n.getElementsByClassName("as-rangeFilter__from__"+e)[0].value,n.getElementsByClassName("as-rangeFilter__to__"+e)[0].value)}}),[n]);var h=t.native,_=!h,y=h?"range":"number",g=e.from,m=e.to,v=e.min,E=e.max,b=!e.visible||0===t.store.currentResult.getTotalHits()&&g===v&&m===E?"display:none!important;":"";return(0,a.h)("div",{id:this.rangeUid,className:"as-rangeFilter ".concat(c),style:b},(0,a.h)(l.default,{template:o,className:"as-rangeFilter__top ".concat(p),dictionary:this.props.dictionary}),(0,a.h)("div",{className:"as-rangeFilter__wrapper ".concat(f)},(0,a.h)("input",i({type:y,class:"as-rangeFilter__from ".concat(t.classNames.input," as-rangeFilter__").concat(this.uid," as-rangeFilter__from__").concat(this.uid)},t.attributes.from,{value:g,min:v,max:E,step:t.step,onClick:function(t){if(_)return!1;d.handleSliderChange([parseInt(t.target.value),m])},onTouchEnd:function(t){if(_)return!1;d.handleSliderChange([parseInt(t.target.value),m])},onChange:function(t){var e=[parseInt(t.target.value),m];if(h)return d.handleSliderMove(e),!1;d.handleSliderChange(e)},autocomplete:"off"})),(0,a.h)("input",i({type:y,class:"as-rangeFilter__to ".concat(t.classNames.input," as-rangeFilter__").concat(this.uid," as-rangeFilter__to__").concat(this.uid)},t.attributes.to,{value:m,min:v,max:E,step:t.step,onClick:function(t){if(_)return!1;d.handleSliderChange([g,parseInt(t.target.value)])},onTouchEnd:function(t){if(_)return!1;d.handleSliderChange([g,parseInt(t.target.value)])},onChange:function(t){var e=[g,parseInt(t.target.value)];if(h)return d.handleSliderMove(e),!1;d.handleSliderChange(e)},autocomplete:"off"})),(0,a.h)("div",{class:"slider"},(0,a.h)(l.default,{template:s,dictionary:this.props.dictionary}))))},e.prototype.applyFilter=function(t,e){var r=this.props;(0,c.filterAction)(r.environmentId,r.store.getCurrentQuery(),r.repository,r.filterName,r.filterField,t,e)},e.prototype.getCurrencyPlaceholderFromPriceAndPriceWithCurrency=function(t,e){t=(t+"").replace(".","").replace(",",""),e=(e+"").replace(".","").replace(",","");var r=new RegExp(t+"0*");return e.replace(r,"__price__")},e}(a.Component);p.defaultProps={maxValueIncluded:!0,step:1,minValue:null,maxValue:null,native:!1,classNames:{container:"",top:"",wrapper:"",input:"",from:"",to:""},attributes:{from:"",to:""},template:{top:"",slider:""}},e.default=p},8379:(t,e,r)=>{"use strict";e.__esModule=!0,e.reloadAction=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.reloadAction=function(t,e,r){window.postMessage({name:"apisearch_scroll_top"},"*");var a=s.default.object(e),u=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));if(r instanceof n.HttpRepository){var l=r.getHttpClient();l instanceof n.CacheClient&&l.flushCache()}r.query(a).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:a,result:t})})).catch((function(t){}))}},369:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(3701),a=r(8379),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleClick=function(){var t=e.props,r=t.environmentId,n=t.store.getCurrentQuery(),o=t.repository;(0,a.reloadAction)(r,n,o)},e}return o(e,t),e.prototype.render=function(){var t=this.props,e=t.classNames.container,r=t.template.container;return(0,i.h)("div",{className:"as-clearFilters ".concat(e),onClick:this.handleClick},(0,i.h)(s.default,{template:r,dictionary:this.props.dictionary}))},e}(i.Component);u.defaultProps={classNames:{container:""},template:{container:"Reload"}},e.default=u},1767:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(1828),a=r(3701),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.shouldComponentUpdate=function(t,e){var r=this.props.data.uuid_composed!==t.data.uuid_composed||this.props.data.metadata.image!==t.data.metadata.image||this.props.data.query!==t.data.query;return r||this.highlight(),r},e.prototype.componentDidMount=function(){this.highlight()},e.prototype.componentDidUpdate=function(){this.highlight()},e.prototype.highlight=function(){var t=this.props.data.query_text;if(this.props.data.highlights_enabled&&""!==t){var e=document.getElementById("as-result-"+this.props.data.uuid_composed);(0,s.highlightElement)(e,t)}},e.prototype.render=function(){var t,e=this.props,r=e.template,n=e.data,o=null!==(t=e.dictionary)&&void 0!==t?t:{},s="as-result-"+n.uuid_composed,u=n.metadata.best_match?"best-match":"",l=n.metadata.exact_match?"exact-match":"";return(0,i.h)(a.default,{template:r,data:n,id:s,className:"".concat(e.className," ").concat(u," ").concat(l),dictionary:o})},e}(i.Component);e.default=u},4627:(t,e,r)=>{"use strict";e.__esModule=!0,e.infiniteScrollNextPageAction=e.configureQuery=void 0;var n=r(5059),o=r(9913),i=r(803),s=r(5544);e.configureQuery=function(t,e,r,a,u,l,c,p,f){var d=s.default.object(e);for(var h in p(d),d.size=r,d.setFields(c),u)u[h]instanceof n.ItemUUID&&d.promoteUUID(u[h]);for(var h in l)l[h]instanceof n.ItemUUID&&d.excludeUUID(l[h]);f>0&&(d.minScore=f),i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:d})},e.infiniteScrollNextPageAction=function(t,e,r,n){var a=s.default.object(e);a.page=n;var u=i.default.get("".concat(o.APISEARCH_DISPATCHER,"__").concat(t));r.query(a).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:a,result:t})})).catch((function(t){}))}},1481:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;ro*r.getSize(),s=this.fromLoadingNextPage?this.state.items.concat(n):n;this.fromLoadingNextPage=!1,this.currentExpectedPage=void 0,this.setState((function(t){return{customResponse:e.getMetadataValue("custom_response"),hasNewPage:i,items:s,page:o}}))}else this.setState((function(t){return{customResponse:"",hasNewPage:!1,items:[],page:0}}))},e.prototype.componentWillMount=function(){var t=this.props;(0,h.configureQuery)(t.environmentId,t.store.getCurrentQuery(),t.itemsPerPage,t.highlightsEnabled,t.promote.map((function(t){return t instanceof s.ItemUUID?t:s.ItemUUID.createFromArray(t)})),t.exclude.map((function(t){return t instanceof s.ItemUUID?t:s.ItemUUID.createFromArray(t)})),t.fields,t.filter,t.minScore)},e.prototype.page=function(){var t;return null!==(t=this.currentExpectedPage)&&void 0!==t?t:this.props.store.getCurrentQuery().getPage()},e.prototype.render=function(){var t,e,r=this,n=this,o=this.props,s=o.store.isDirty(),l=o.classNames.container,c=o.classNames.itemsList,h=o.classNames.placeholder,_=o.template.itemsList,y=null!==(t=o.template.placeholder)&&void 0!==t?t:"",g=o.store.getCurrentResult(),m=o.store.getCurrentQuery(),v=o.currentVisibleResults,E=Object.values(g.getSubresults()),b=(0,u.useRef)(null),A=g.getMetadataValue("custom_response"),S=g.getMetadataValue("redirection");if(A&&(e=(0,a.h)(p.default,{template:A.content,className:"as-result__custom_response",dictionary:this.props.dictionary}),A.only))return e;var T=!0;S&&("automatic"===S.type?window.top.location.href=S.url:"on_enter"===S.type&&(window.postMessage({name:"apisearch_bind_enter_redirection",url:S.url},"*"),T=!1),this.props.template.redirection&&(e=(0,a.h)("div",null,(0,a.h)(p.default,{template:this.props.template.redirection,data:{url:S.url,query:m.getQueryText()},className:"as-result__redirection",dictionary:this.props.dictionary}),e))),T&&window.postMessage({name:"apisearch_bind_enter_redirection",url:void 0},"*");var O=!1!==o.infiniteScroll&&(!0===o.infiniteScroll||o.infiniteScroll>=0)&&this.state.hasNewPage,I=O?!0===o.infiniteScroll?0:o.infiniteScroll:void 0;if(""!==o.fadeInSelector&&this.addMouseDownListeners(b,o.fadeInSelector),!v||!this.state.focus)return(0,a.h)("div",{className:"as-result ".concat(l)});var w=this.state.items,R={query:m.getQueryText(),suggestions:g.getSuggestions()},C=this.state.page>1,F=(this.state.page-1)*m.getSize(),N=w;return C&&(N=Array.prototype.slice.call(w,F)),Array.prototype.forEach.call(N,(function(t){t.position=++F,t.id=t.getId()})),window.postMessage({name:"apisearch_result_items",query:m.toArray(),query_text:m.getQueryText(),with_results:w.length>0,page:this.state.page,site:o.store.getSite(),device:o.store.getDevice(),items:N.map((function(t){return{fields:t.fields,uuid:t.uuid}}))},"*"),o.template.itemsList!==f.defaultItemsListTemplate?(0,a.h)("div",{className:"as-result ".concat(l),ref:b,style:"position: relative"},s?(0,a.h)(p.default,{template:y,className:"as-result__placeholder ".concat(h),dictionary:this.props.dictionary}):(0,a.h)(p.default,{template:_,data:i(i({},R),{items:w?w.map((function(t,e){return r.hydrateItem(t,e)})):[]}),className:"as-result__itemsList ".concat(c),dictionary:this.props.dictionary}),O?o.infiniteScrollButton?(0,a.h)("div",{onClick:function(t){n.loadNextPage()}},(0,a.h)(p.default,{template:o.template.next_page_button,data:{page:this.state.page+1}})):(0,a.h)("div",{ref:this.endResultsBoxRef,style:"bottom: ".concat(I,"px; position: relative;")}):""):s?(0,a.h)("div",{className:"as-result ".concat(l),ref:b},(0,a.h)(p.default,{template:y,className:"as-result__placeholder ".concat(h),dictionary:o.dictionary})):(0,a.h)("div",{className:"as-result ".concat(l),ref:b},e,s?(0,a.h)(p.default,{template:y,className:"as-result__placeholder ".concat(h),dictionary:this.props.dictionary}):w.length>0?(0,a.h)("div",{className:"as-result__itemsList ".concat(o.classNames.itemsList)},w.map((function(t,e){return(0,a.h)(d.default,{data:i(i(i({},R),r.hydrateItem(t,e)),{query:m.getQueryText()}),template:o.template.item,className:"as-result__item ".concat(o.classNames.item),dictionary:o.dictionary})})),O?o.infiniteScrollButton?"":(0,a.h)("div",{id:"as-result__infinite_scroll_inspector",ref:this.endResultsBoxRef,style:"bottom: ".concat(I,"px; position: relative; width: 100%;")}):""):"",O&&o.infiniteScrollButton?(0,a.h)("div",{onClick:function(t){n.loadNextPage()}},(0,a.h)(p.default,{template:o.template.next_page_button,data:{page:this.state.page+1}})):"",E.length>0?(0,a.h)("div",{className:"as-result__alternativeList"},E.map((function(t){return(0,a.h)("div",{className:"as-result__alternative"},(0,a.h)("div",{className:"as-result__alternative_query"},(0,a.h)("span",{onClick:function(e){e.stopPropagation(),e.preventDefault(),n.handleAlternativeClick(t.metadata.query_text)}},(0,a.h)(p.default,{template:o.template.alternative_title,data:{word:t.metadata.query_text_html},dictionary:o.dictionary})),(0,a.h)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),n.handleAlternativeClick(t.metadata.query_text)}},(0,a.h)(p.default,{template:o.template.alternative_all_results,data:{num:t.getTotalHits()},dictionary:o.dictionary}))),(0,a.h)("div",{className:"as-result__alternative_items"},t.items.map((function(t,e){return(0,a.h)(d.default,{data:i(i({},R),r.hydrateItem(t,e)),template:o.template.item,className:"as-result__alternative_item ".concat(o.classNames.item),dictionary:r.props.dictionary})}))))}))):0===w.length&&void 0===e?(0,a.h)(p.default,{template:o.template.noResults,data:{query:m.getQueryText()},className:"as-result__noresults ".concat(o.classNames.noResults),dictionary:o.dictionary}):"")},e.prototype.hydrateItem=function(t,e){var r=this.props,n=r.environmentId,o=c.default.get("".concat(l.APISEARCH_CONFIG,"__").concat(n)),s=c.default.get("".concat(l.APISEARCH_UI,"__").concat(n)).reference,a=o.app_id,u=t.getAppUUID();"object"==typeof u&&(a=u.composedUUID());var p=o.index_id,f=t.getIndexUUID();"object"==typeof f&&(p=f.composedUUID());var d=t.getUUID().composedUUID(),h={};Object.assign(h,t.getMetadata(),t.getIndexedMetadata());var _={};Object.keys(r.fieldsConciliation).map((function(t,e){var n;_[t]=null!==(n=h[r.fieldsConciliation[t]])&&void 0!==n?n:void 0})),Object.assign(h,_),t.fields=h;var y="";return this.props.store.getCurrentQuery()&&(y=this.props.store.getCurrentQuery().getQueryText()),i(i({},r.formatData(t)),{key:"item_"+d,uuid_composed:d,click:s+'.click("'+a+'", "'+p+'", "'+d+'", '+e+");",add_to_cart:s+'.interact("add_cart", "'+a+'", "'+p+'", "'+d+'", '+e+");",query_text:y,highlights_enabled:this.props.highlightsEnabled,striptags:function(){return function(t,e){return e(t).replace(/(<([^>]+)>)/gi,"")}}})},e}(a.Component);y.defaultProps={fields:[],itemsPerPage:10,highlightsEnabled:!1,promote:[],exclude:[],filter:function(t){return null},subResult:!1,classNames:{container:"",itemsList:"",item:"",noResults:"",placeholder:""},template:{itemsList:f.defaultItemsListTemplate,item:f.defaultItemTemplate,noResults:f.defaultNoResultsItemTemplate,placeholder:null,alternative_title:f.defaultAlternativeTitleTemplate,alternative_all_results:f.defaultAlternativeAllResultsTemplate,next_page_button:f.defaultNextPageButtonTemplate,redirection:null},formatData:function(t){return t},fadeInSelector:"",fieldsConciliation:{}},e.default=y},5253:(t,e)=>{"use strict";e.__esModule=!0,e.defaultNextPageButtonTemplate=e.defaultAlternativeAllResultsTemplate=e.defaultAlternativeTitleTemplate=e.defaultNoResultsItemTemplate=e.defaultItemTemplate=e.defaultItemsListTemplate=void 0,e.defaultItemsListTemplate='\n
\n {{#items}}\n
\n Score: {{score}}
\n Uuid: {{uuid.type}} - {{uuid.id}}
\n Title: {{{fields.title}}}
\n Description: {{fields.description}}
\n Link: {{metadata.link}}\n
\n {{/items}}\n
\n {{^items}}No results{{/items}}\n',e.defaultItemTemplate='\n Score: {{score}}
\n Uuid: {{uuid.type}} - {{uuid.id}}
\n Title: {{{fields.title}}}
\n Description: {{fields.description}}
\n Link: {{metadata.link}}\n',e.defaultNoResultsItemTemplate="\n No results\n",e.defaultAlternativeTitleTemplate="{{{word}}}",e.defaultAlternativeAllResultsTemplate="All results ({{num}})",e.defaultNextPageButtonTemplate="Load page {{page}}"},2703:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=function(t){function e(e){var r=t.call(this,e)||this;return r.state={autocomplete:""},r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){null!==t.autocomplete?this.setState((function(e){return{autocomplete:t.autocomplete}})):this.setState((function(t){return{autocomplete:""}}))},e.prototype.render=function(){var t=this.state.autocomplete,e=this.props.queryText,r=this.props.inputClassName,n=e.length,o=t.substring(n),s=""===o?"":e+o+" ⤷";return(0,i.h)("input",{type:"text",className:"as-searchInput__input as-searchInput__autocomplete ".concat(r),placeholder:s,style:"position: absolute; top: 0px; left: 0px; background-color: white;"})},e}(i.Component);e.default=s},8527:(t,e,r)=>{"use strict";e.__esModule=!0,e.simpleSearchAction=e.initialSearchSetup=void 0;var n=r(9913),o=r(803),i=r(5544);e.initialSearchSetup=function(t,e,r,s,a){var u=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)),l=i.default.object(e);l.page=1,l.queryOperator=a,s.length>0&&(l.searchableFields=s),r&&l.enableAutocomplete(),u.dispatch("UPDATE_APISEARCH_SETUP",{query:l})},e.simpleSearchAction=function(t,e,r,s,a){window.postMessage({name:"apisearch_scroll_top"},"*");var u=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)),l=i.default.object(e);l.filters._query.values=[s],l.page=1,a?r.query(l).then((function(t){u.dispatch("RENDER_FETCHED_DATA",{query:l,result:t,visibleResults:a})})).catch((function(t){})):u.dispatch("RENDER_FETCHED_DATA",{query:l,result:null,visibleResults:a})}},5949:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=n)},r.clearSearch=function(){var t=r.props,e=t.startSearchOn,n=t.environmentId,o=t.store.getCurrentQuery(),i=t.repository,s=0===e;(0,a.simpleSearchAction)(n,o,i,"",s)},e.autocomplete&&(r.state={queryText:""});var n=r;return window.addEventListener("beforeunload",(function(){n.dispatchQueryStringEvent(e,0)})),r}return o(e,t),e.prototype.componentWillReceiveProps=function(t){this.setState({queryText:t.store.getCurrentQuery().getQueryText()})},e.prototype.handleKeyDown=function(t){switch(t.key){case"ArrowRight":case"Tab":case"Enter":return void this.replaceWithAutocomplete(t)}switch(t.keyCode){case 39:case 9:case 13:return void this.replaceWithAutocomplete(t)}},e.prototype.replaceWithAutocomplete=function(t){var e=this.props,r=this.props.store.getCurrentResult().getAutocomplete();if(null!==r&&""!==r)return(0,a.simpleSearchAction)(e.environmentId,e.store.getCurrentQuery(),e.repository,this.props.store.getCurrentResult().getAutocomplete(),!0),void t.preventDefault()},e.prototype.doNothing=function(t){},e.prototype.withConfig=function(t){},e.prototype.dispatchQueryStringEvent=function(t,e){var r=t.store.getCurrentQuery(),n=r.getQueryText();if(this.queryTextEvent&&(this.lastQueryTextStringDispatched=null,clearTimeout(this.queryTextEvent)),this.lastQueryTextStringDispatched!==n&&(this.lastQueryTextStringDispatched=n,""!==n)){var o=this;this.lastQueryTextStringDispatched=n,this.queryTextEvent=setTimeout((function(){o.queryTextEvent=null,window.postMessage({name:"apisearch_search",query_text:n,query:r.toArray(),site:t.store.getSite(),device:t.store.getDevice()},"*")}),e)}},e.prototype.render=function(){var t=this,e=this.props,r=e.placeholder,n=e.autofocus,o=e.clearSearch,a=e.withContainer,c=e.classNames.container,p=e.classNames.input,f=e.classNames.clearSearch,d=e.template.clearSearch,h=e.store.getCurrentQuery(),_=h.getQueryText(),y=e.htmlNodeInheritProps,g=h.areAutocompleteEnabled(),m=e.store.getCurrentResult()?e.store.getCurrentResult().getAutocomplete():null,v=g?function(e){return t.handleKeyDown(e)}:function(e){return t.doNothing(e)},E=g?function(e){return t.replaceWithAutocomplete(e)}:function(e){return t.doNothing(e)},b=g?"position: relative; top: 0px; left: 0px; background-color: transparent; border-color: transparent;":"",A=g?"autocompletable":"";this.dispatchQueryStringEvent(e,2e3);var S=(0,s.h)("input",i({type:"text",className:"as-searchInput__input ".concat(p," ").concat(A),placeholder:r,autofocus:n},y,{onInput:function(e){return t.handleSearch(e.target.value)},value:_,style:b,onKeyDown:v,onTouchStart:E,ref:this.inputRef}));return g&&(S=(0,s.h)("div",{style:"position: relative"},(0,s.h)(l.default,{autocomplete:m,queryText:_,inputClassName:p}),S)),a&&(S=(0,s.h)("div",{className:"as-searchInput ".concat(c)},S,o&&_&&0!==_.length?(0,s.h)("div",{className:"as-searchInput__clearSearch ".concat(f),onClick:this.clearSearch},(0,s.h)(u.default,{template:d,dictionary:e.dictionary})):null)),S},e}(s.Component);p.defaultProps={placeholder:"",autofocus:!1,autocomplete:!1,startSearchOn:0,clearSearch:!0,withContainer:!0,searchableFields:[],speechRecognition:!1,classNames:{container:"",input:"",clearSearch:""},template:{clearSearch:"x",speechRecognition:"{S}"}},e.default=p},5635:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.componentWillReceiveProps=function(t){var e=t.store.getCurrentQuery();this.setState((function(t){return{query:e}}))},e.prototype.render=function(){var t=null==this.state.query?"":JSON.stringify(this.state.query.toArray());return(0,i.h)("div",null,t)},e}(i.Component);e.default=s},8355:(t,e,r)=>{"use strict";e.__esModule=!0,e.onChangeSearchAction=e.initialSortBySetup=void 0;var n=r(9913),o=r(803),i=r(5544),s=r(2634);e.initialSortBySetup=function(t,e,r){var a=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)),u=i.default.object(e);(0,s.applySortByToQuery)(u,r),u.page=1,a.dispatch("UPDATE_APISEARCH_SETUP",{query:u})},e.onChangeSearchAction=function(t,e,r,a){window.postMessage({name:"apisearch_scroll_top"},"*");var u=i.default.object(e);(0,s.applySortByToQuery)(u,a),u.page=1;var l=o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t));r.query(u).then((function(t){l.dispatch("RENDER_FETCHED_DATA",{query:u,result:t})})).catch((function(t){}))}},5929:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(8355),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleChange=function(t){var r=e.props,n=r.environmentId,o=r.store.getCurrentQuery(),i=r.repository,a=t.target.value;e.setState({value:a}),(0,s.onChangeSearchAction)(n,o,i,a)},e}return o(e,t),e.prototype.componentWillMount=function(){var t=this.props,e=t.environmentId,r=t.options,n=t.store.getCurrentQuery(),o=r[0].value;this.setState({value:o,visible:!1}),(0,s.initialSortBySetup)(e,n,o)},e.prototype.componentWillReceiveProps=function(t){var e=t.store.getCurrentQuery().getSortBy().getFirstSortAsString(),r=null!=t.store.getCurrentResult()&&t.store.getCurrentResult().getTotalHits()>0;this.state.value===e&&this.state.visible===r||this.setState((function(t){return{value:e,visible:r}}))},e.prototype.render=function(t,e){var r=t.classNames.container,n=t.classNames.select;if(e.visible){var o=t.options;return t.store.getCurrentQuery().toArray().coordinate||(o=o.filter((function(t){return"distance"!==t.value}))),(0,i.h)("div",{className:"as-sortBy ".concat(r)},(0,i.h)("select",{className:"as-sortBy__selector ".concat(n),onChange:this.handleChange,value:e.value},o.map((function(t){return(0,i.h)("option",{value:t.value},t.name)}))))}},e}(i.Component);a.defaultProps={classNames:{container:"",select:""}},e.default=a},2634:(t,e,r)=>{"use strict";e.__esModule=!0,e.applySortByToQuery=void 0;var n=r(5059);e.applySortByToQuery=function(t,e){var r,o={field:(r=e.split(":"))[0],sort:r[1]},i=n.default.createEmptySortBy();return"distance"===o.field?i.byValue({type:n.SORT_BY_TYPE_DISTANCE,unit:o.sort?o.sort:"km"}):"score"===o.field?i.byValue(n.SORT_BY_SCORE):i.byFieldValue(o.field,o.sort),t.sortBy(i),t}},5449:(t,e,r)=>{"use strict";e.__esModule=!0,e.enableSuggestions=void 0;var n=r(9913),o=r(803),i=r(5544);e.enableSuggestions=function(t,e,r){var s=i.default.object(e);r>0&&s.setNumberOfSuggestions(r),o.default.get("".concat(n.APISEARCH_DISPATCHER,"__").concat(t)).dispatch("UPDATE_APISEARCH_SETUP",{query:s})}},6647:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});e.__esModule=!0;var i=r(172),s=r(1828),a=r(676),u=r(6761),l=r(5449),c=r(3701),p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handleClick=function(t){var r=e.props;"string"==typeof t&&(t=t.replace(//g,"").replace(/<\/em>/g,"")),(0,a.onWordClickAction)(r.environmentId,r.store.getCurrentQuery(),r.repository,t)},e}return o(e,t),e.prototype.componentDidMount=function(){this.highlight()},e.prototype.componentDidUpdate=function(){this.highlight()},e.prototype.highlight=function(){var t=this.props.store.getCurrentQuery().getQueryText();if(""!==t)for(var e=document.getElementsByClassName("as-suggestions"),r=0;r0?"":"suggestions-empty",l=t.template.top,p=t.template.item,f=this;return(0,i.h)("div",{className:"as-suggestions ".concat(n," ").concat(u)},(0,i.h)(c.default,{template:l,className:"as-suggestions__top ".concat(o),dictionary:this.props.dictionary}),(0,i.h)("div",{className:"as-suggestions__itemsList ".concat(s)},e.words.map((function(t){var e={word:t};return(0,i.h)("div",{className:"as-suggestions__item ".concat(a),onClick:function(e){e.stopPropagation(),e.preventDefault(),f.handleClick(t)}},(0,i.h)(c.default,{template:p,data:e,dictionary:r.props.dictionary}))}))))},e}(i.Component);p.defaultProps={classNames:{container:"",top:"",itemsList:"",item:""},template:{top:null,item:u.defaultItemTemplate}},e.default=p},6761:(t,e)=>{"use strict";e.__esModule=!0,e.defaultItemTemplate=void 0,e.defaultItemTemplate='\n {{word}}\n'},3701:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";e.__esModule=!0;var r=function(){function t(){}return t.trans=function(t,e){var r,n,o,i=[];try{i=JSON.parse(t)}catch(n){return null!==(r=e[t])&&void 0!==r?r:t}var s=null!==(n=i[0])&&void 0!==n?n:t;s=null!==(o=e[s])&&void 0!==o?o:s;for(var a=1;a<=i.length;a++)s=s.replace("$"+a,i[a]);return s},t}();e.default=r},6526:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0&&(e[o]=i)}},e.prototype.fromUrlObject=function(t,e){var r,n=this.component.props.filterName,o=e.aggregations[n],i=null!==(r=t[this.component.props.filterField])&&void 0!==r?r:t[n];void 0!==o&&void 0!==i&&Array.isArray(i)&&i.length>0&&(void 0===e.filters&&(e.filters={}),e.filters[n]={field:"indexed_metadata."+this.component.props.filterField,values:i})},e.prototype.reset=function(t){var e=this.component.props.filterName;void 0!==t.filters&&"object"==typeof t.filters&&void 0!==t.filters[e]&&delete t.filters[e]},e}(r(696).default);e.default=function(t){return new u(t)}},5376:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)if(6===i.application_type){var a=(0,u.getShadowFilterValuesFromQuery)(t,r,!1);e[o]={l:a,v:i.values}}else e[o]=s}},e.prototype.fromUrlObject=function(t,e){var r,n=this.component.props.filterName,o=e.aggregations[n],i=null!==(r=t[this.component.props.filterField])&&void 0!==r?r:t[n],a=Object.keys(this.component.props.ranges).length>0?"range":"field";if(void 0!==o&&void 0!==i&&(Array.isArray(i)&&i.length>0||"object"==typeof i&&Object.keys(i).length>0)){void 0===e.filters&&(e.filters={});var u=this.component.props.applicationType,l="indexed_metadata."+this.component.props.filterField;if(6===u){var c=i;i=c.v;for(var p=c.l,f=0;f0&&(e[n]=o)}},e.prototype.fromUrlObject=function(t,e){var r,n=this.component.props.filterName,o=null!==(r=t[this.component.props.filterField])&&void 0!==r?r:t[n];void 0!==o&&Array.isArray(o)&&o.length>0&&(void 0===e.filters&&(e.filters={}),e.filters[n]={field:"indexed_metadata."+this.component.props.filterField,values:o,filter_type:"range"})},e.prototype.reset=function(t){var e=this.component.props.filterName;void 0!==t.filters&&"object"==typeof t.filters&&void 0!==t.filters[e]&&delete t.filters[e]},e}(r(696).default);e.default=function(t){return new u(t)}},8299:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r{"use strict";e.__esModule=!0;var r=function(){function t(){}return t.prototype.withConfig=function(t){"withConfig"in this.component&&this.component.withConfig(t)},t.prototype.toUrlObject=function(t,e){},t.prototype.fromUrlObject=function(t,e){},t.prototype.reset=function(t){},t.prototype.normalizeQuery=function(t,e){},t.prototype.initialSetup=function(t,e,r){},t}();e.default=r},9487:(t,e,r)=>{"use strict";e.__esModule=!0;var n=r(1821),o=r(5376),i=r(5768),s=r(5538),a=r(6092),u=r(747),l=r(8299),c=r(5107),p=r(2638),f=r(6600),d=r(4743),h=r(9149),_=r(6526),y=r(762);e.default={searchInput:p.default,clearFilters:o.default,multipleFilter:s.default,sortBy:d.default,information:i.default,result:c.default,pagination:a.default,checkboxFilter:n.default,rangeFilter:u.default,reload:l.default,snapshot:f.default,suggestions:h.default,banner:_.default,priorityFilter:y.default}},6172:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Md5:()=>n,Md5FileHasher:()=>o,ParallelHasher:()=>i});class n{constructor(){this._dataLength=0,this._bufferLength=0,this._state=new Int32Array(4),this._buffer=new ArrayBuffer(68),this._buffer8=new Uint8Array(this._buffer,0,68),this._buffer32=new Uint32Array(this._buffer,0,17),this.start()}static hashStr(t,e=!1){return this.onePassHasher.start().appendStr(t).end(e)}static hashAsciiStr(t,e=!1){return this.onePassHasher.start().appendAsciiStr(t).end(e)}static _hex(t){const e=n.hexChars,r=n.hexOut;let o,i,s,a;for(a=0;a<4;a+=1)for(i=8*a,o=t[a],s=0;s<8;s+=2)r[i+1+s]=e.charAt(15&o),o>>>=4,r[i+0+s]=e.charAt(15&o),o>>>=4;return r.join("")}static _md5cycle(t,e){let r=t[0],n=t[1],o=t[2],i=t[3];r+=(n&o|~n&i)+e[0]-680876936|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[1]-389564586|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[2]+606105819|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[3]-1044525330|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[4]-176418897|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[5]+1200080426|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[6]-1473231341|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[7]-45705983|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[8]+1770035416|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[9]-1958414417|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[10]-42063|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[11]-1990404162|0,n=(n<<22|n>>>10)+o|0,r+=(n&o|~n&i)+e[12]+1804603682|0,r=(r<<7|r>>>25)+n|0,i+=(r&n|~r&o)+e[13]-40341101|0,i=(i<<12|i>>>20)+r|0,o+=(i&r|~i&n)+e[14]-1502002290|0,o=(o<<17|o>>>15)+i|0,n+=(o&i|~o&r)+e[15]+1236535329|0,n=(n<<22|n>>>10)+o|0,r+=(n&i|o&~i)+e[1]-165796510|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[6]-1069501632|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[11]+643717713|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[0]-373897302|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[5]-701558691|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[10]+38016083|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[15]-660478335|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[4]-405537848|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[9]+568446438|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[14]-1019803690|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[3]-187363961|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[8]+1163531501|0,n=(n<<20|n>>>12)+o|0,r+=(n&i|o&~i)+e[13]-1444681467|0,r=(r<<5|r>>>27)+n|0,i+=(r&o|n&~o)+e[2]-51403784|0,i=(i<<9|i>>>23)+r|0,o+=(i&n|r&~n)+e[7]+1735328473|0,o=(o<<14|o>>>18)+i|0,n+=(o&r|i&~r)+e[12]-1926607734|0,n=(n<<20|n>>>12)+o|0,r+=(n^o^i)+e[5]-378558|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[8]-2022574463|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[11]+1839030562|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[14]-35309556|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[1]-1530992060|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[4]+1272893353|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[7]-155497632|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[10]-1094730640|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[13]+681279174|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[0]-358537222|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[3]-722521979|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[6]+76029189|0,n=(n<<23|n>>>9)+o|0,r+=(n^o^i)+e[9]-640364487|0,r=(r<<4|r>>>28)+n|0,i+=(r^n^o)+e[12]-421815835|0,i=(i<<11|i>>>21)+r|0,o+=(i^r^n)+e[15]+530742520|0,o=(o<<16|o>>>16)+i|0,n+=(o^i^r)+e[2]-995338651|0,n=(n<<23|n>>>9)+o|0,r+=(o^(n|~i))+e[0]-198630844|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[7]+1126891415|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[14]-1416354905|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[5]-57434055|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[12]+1700485571|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[3]-1894986606|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[10]-1051523|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[1]-2054922799|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[8]+1873313359|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[15]-30611744|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[6]-1560198380|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[13]+1309151649|0,n=(n<<21|n>>>11)+o|0,r+=(o^(n|~i))+e[4]-145523070|0,r=(r<<6|r>>>26)+n|0,i+=(n^(r|~o))+e[11]-1120210379|0,i=(i<<10|i>>>22)+r|0,o+=(r^(i|~n))+e[2]+718787259|0,o=(o<<15|o>>>17)+i|0,n+=(i^(o|~r))+e[9]-343485551|0,n=(n<<21|n>>>11)+o|0,t[0]=r+t[0]|0,t[1]=n+t[1]|0,t[2]=o+t[2]|0,t[3]=i+t[3]|0}start(){return this._dataLength=0,this._bufferLength=0,this._state.set(n.stateIdentity),this}appendStr(t){const e=this._buffer8,r=this._buffer32;let o,i,s=this._bufferLength;for(i=0;i>>6),e[s++]=63&o|128;else if(o<55296||o>56319)e[s++]=224+(o>>>12),e[s++]=o>>>6&63|128,e[s++]=63&o|128;else{if(o=1024*(o-55296)+(t.charCodeAt(++i)-56320)+65536,o>1114111)throw new Error("Unicode standard supports code points up to U+10FFFF");e[s++]=240+(o>>>18),e[s++]=o>>>12&63|128,e[s++]=o>>>6&63|128,e[s++]=63&o|128}s>=64&&(this._dataLength+=64,n._md5cycle(this._state,r),s-=64,r[0]=r[16])}return this._bufferLength=s,this}appendAsciiStr(t){const e=this._buffer8,r=this._buffer32;let o,i=this._bufferLength,s=0;for(;;){for(o=Math.min(t.length-s,64-i);o--;)e[i++]=t.charCodeAt(s++);if(i<64)break;this._dataLength+=64,n._md5cycle(this._state,r),i=0}return this._bufferLength=i,this}appendByteArray(t){const e=this._buffer8,r=this._buffer32;let o,i=this._bufferLength,s=0;for(;;){for(o=Math.min(t.length-s,64-i);o--;)e[i++]=t[s++];if(i<64)break;this._dataLength+=64,n._md5cycle(this._state,r),i=0}return this._bufferLength=i,this}getState(){const t=this._state;return{buffer:String.fromCharCode.apply(null,Array.from(this._buffer8)),buflen:this._bufferLength,length:this._dataLength,state:[t[0],t[1],t[2],t[3]]}}setState(t){const e=t.buffer,r=t.state,n=this._state;let o;for(this._dataLength=t.length,this._bufferLength=t.buflen,n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],o=0;o>2);this._dataLength+=e;const s=8*this._dataLength;if(r[e]=128,r[e+1]=r[e+2]=r[e+3]=0,o.set(n.buffer32Identity.subarray(i),i),e>55&&(n._md5cycle(this._state,o),o.set(n.buffer32Identity)),s<=4294967295)o[14]=s;else{const t=s.toString(16).match(/(.*?)(.{0,8})$/);if(null===t)return;const e=parseInt(t[2],16),r=parseInt(t[1],16)||0;o[14]=e,o[15]=r}return n._md5cycle(this._state,o),t?this._state:n._hex(this._state)}}if(n.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),n.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.hexChars="0123456789abcdef",n.hexOut=[],n.onePassHasher=new n,"5d41402abc4b2a76b9719d911017c592"!==n.hashStr("hello"))throw new Error("Md5 self test failed.");class o{constructor(t,e=!0,r=1048576){this._callback=t,this._async=e,this._partSize=r,this._configureReader()}hash(t){const e=this;e._blob=t,e._part=0,e._md5=new n,e._processPart()}_fail(){this._callback({success:!1,result:"data read failed"})}_hashData(t){let e=this;e._md5.appendByteArray(new Uint8Array(t.target.result)),e._part*e._partSize>=e._blob.size?e._callback({success:!0,result:e._md5.end()}):e._processPart()}_processPart(){const t=this;let e,r=0;t._part+=1,t._blob.size>t._partSize?(r=t._part*t._partSize,r>t._blob.size&&(r=t._blob.size),e=t._blob.slice((t._part-1)*t._partSize,r)):e=t._blob,t._async?t._reader.readAsArrayBuffer(e):setTimeout((()=>{try{t._hashData({target:{result:t._reader.readAsArrayBuffer(e)}})}catch(e){t._fail()}}),0)}_configureReader(){const t=this;t._async?(t._reader=new FileReader,t._reader.onload=t._hashData.bind(t),t._reader.onerror=t._fail.bind(t),t._reader.onabort=t._fail.bind(t)):t._reader=new FileReaderSync}}class i{constructor(t,e){this._queue=[],this._ready=!0;const r=this;Worker?(r._hashWorker=new Worker(t,e),r._hashWorker.onmessage=r._recievedMessage.bind(r),r._hashWorker.onerror=t=>{r._ready=!1,console.error("Hash worker failure",t)}):(r._ready=!1,console.error("Web Workers are not supported in this browser"))}hash(t){const e=this;let r;return r=new Promise(((r,n)=>{e._queue.push({blob:t,resolve:r,reject:n}),e._processNext()})),r}terminate(){this._ready=!1,this._hashWorker.terminate()}_processNext(){this._ready&&!this._processing&&this._queue.length>0&&(this._processing=this._queue.pop(),this._hashWorker.postMessage(this._processing.blob))}_recievedMessage(t){var e,r;const n=t.data;n.success?null===(e=this._processing)||void 0===e||e.resolve(n.result):null===(r=this._processing)||void 0===r||r.reject(n.result),this._processing=void 0,this._processNext()}}},5215:(t,e,r)=>{"use strict";r.r(e),r.d(e,{__assign:()=>i,__asyncDelegator:()=>E,__asyncGenerator:()=>v,__asyncValues:()=>b,__await:()=>m,__awaiter:()=>c,__classPrivateFieldGet:()=>O,__classPrivateFieldSet:()=>I,__createBinding:()=>f,__decorate:()=>a,__exportStar:()=>d,__extends:()=>o,__generator:()=>p,__importDefault:()=>T,__importStar:()=>S,__makeTemplateObject:()=>A,__metadata:()=>l,__param:()=>u,__read:()=>_,__rest:()=>s,__spread:()=>y,__spreadArrays:()=>g,__values:()=>h});var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function o(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,r,s):o(e,r))||s);return i>3&&s&&Object.defineProperty(e,r,s),s}function u(t,e){return function(r,n){e(r,n,t)}}function l(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}u((n=n.apply(t,e||[])).next())}))}function p(t,e){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function y(){for(var t=[],e=0;e1||a(t,e)}))})}function a(t,e){try{(r=o[t](e)).value instanceof m?Promise.resolve(r.value.v).then(u,l):c(i[0][2],r)}catch(t){c(i[0][3],t)}var r}function u(t){a("next",t)}function l(t){a("throw",t)}function c(t,e){t(e),i.shift(),i.length&&a(i[0][0],i[0][1])}}function E(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,o){e[n]=t[n]?function(e){return(r=!r)?{value:m(t[n](e)),done:"return"===n}:o?o(e):e}:o}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=h(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,o){!function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)}(n,o,(e=t[r](e)).done,e.value)}))}}}function A(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function S(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function T(t){return t&&t.__esModule?t:{default:t}}function O(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function I(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},6425:(t,e,r)=>{"use strict";function n(t,e){return function(){return t.apply(e,arguments)}}const{toString:o}=Object.prototype,{getPrototypeOf:i}=Object,s=(a=Object.create(null),t=>{const e=o.call(t);return a[e]||(a[e]=e.slice(8,-1).toLowerCase())});var a;const u=t=>(t=t.toLowerCase(),e=>s(e)===t),l=t=>e=>typeof e===t,{isArray:c}=Array,p=l("undefined"),f=u("ArrayBuffer"),d=l("string"),h=l("function"),_=l("number"),y=t=>null!==t&&"object"==typeof t,g=t=>{if("object"!==s(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},m=u("Date"),v=u("File"),E=u("Blob"),b=u("FileList"),A=u("URLSearchParams");function S(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),c(t))for(n=0,o=t.length;n0;)if(n=r[o],e===n.toLowerCase())return n;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,I=t=>!p(t)&&t!==O,w=(R="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>R&&t instanceof R);var R;const C=u("HTMLFormElement"),F=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),N=u("RegExp"),P=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};S(r,((r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)})),Object.defineProperties(t,n)},U="abcdefghijklmnopqrstuvwxyz",x="0123456789",D={DIGIT:x,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+x},L=u("AsyncFunction");var M={isArray:c,isArrayBuffer:f,isBuffer:function(t){return null!==t&&!p(t)&&null!==t.constructor&&!p(t.constructor)&&h(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||h(t.append)&&("formdata"===(e=s(t))||"object"===e&&h(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&f(t.buffer),e},isString:d,isNumber:_,isBoolean:t=>!0===t||!1===t,isObject:y,isPlainObject:g,isUndefined:p,isDate:m,isFile:v,isBlob:E,isRegExp:N,isFunction:h,isStream:t=>y(t)&&h(t.pipe),isURLSearchParams:A,isTypedArray:w,isFileList:b,forEach:S,merge:function t(){const{caseless:e}=I(this)&&this||{},r={},n=(n,o)=>{const i=e&&T(r,o)||o;g(r[i])&&g(n)?r[i]=t(r[i],n):g(n)?r[i]=t({},n):c(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t(S(e,((e,o)=>{r&&h(e)?t[o]=n(e,r):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,s,a;const u={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)a=o[s],n&&!n(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==r&&i(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:s,kindOfTest:u,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(c(t))return t;let e=t.length;if(!_(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:C,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:P,freezeMethods:t=>{P(t,((e,r)=>{if(h(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];h(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return c(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:T,global:O,isContextDefined:I,ALPHABET:D,generateString:(t=16,e=D.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&h(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(y(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=c(t)?[]:{};return S(t,((t,e)=>{const i=r(t,n+1);!p(i)&&(o[e]=i)})),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:L,isThenable:t=>t&&(y(t)||h(t))&&h(t.then)&&h(t.catch)};function j(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}M.inherits(j,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const k=j.prototype,B={};function Y(t){return M.isPlainObject(t)||M.isArray(t)}function H(t){return M.endsWith(t,"[]")?t.slice(0,-2):t}function q(t,e,r){return t?t.concat(e).map((function(t,e){return t=H(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{B[t]={value:t}})),Object.defineProperties(j,B),Object.defineProperty(k,"isAxiosError",{value:!0}),j.from=(t,e,r,n,o,i)=>{const s=Object.create(k);return M.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),j.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const Q=M.toFlatObject(M,{},null,(function(t){return/^is[A-Z]/.test(t)}));function G(t,e,r){if(!M.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!M.isUndefined(e[t])}))).metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(e);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(M.isDate(t))return t.toISOString();if(!a&&M.isBlob(t))throw new j("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(t)||M.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,o){let a=t;if(t&&!o&&"object"==typeof t)if(M.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(M.isArray(t)&&function(t){return M.isArray(t)&&!t.some(Y)}(t)||(M.isFileList(t)||M.endsWith(r,"[]"))&&(a=M.toArray(t)))return r=H(r),a.forEach((function(t,n){!M.isUndefined(t)&&null!==t&&e.append(!0===s?q([r],n,i):null===s?r:r+"[]",u(t))})),!1;return!!Y(t)||(e.append(q(o,r,i),u(t)),!1)}const c=[],p=Object.assign(Q,{defaultVisitor:l,convertValue:u,isVisitable:Y});if(!M.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!M.isUndefined(r)){if(-1!==c.indexOf(r))throw Error("Circular reference detected in "+n.join("."));c.push(r),M.forEach(r,(function(r,i){!0===(!(M.isUndefined(r)||null===r)&&o.call(e,r,M.isString(i)?i.trim():i,n,p))&&t(r,n?n.concat(i):[i])})),c.pop()}}(t),e}function V(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function W(t,e){this._pairs=[],t&&G(t,this,e)}const z=W.prototype;function J(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $(t,e,r){if(!e)return t;const n=r&&r.encode||J,o=r&&r.serialize;let i;if(i=o?o(e,r):M.isURLSearchParams(e)?e.toString():new W(e,r).toString(n),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}z.append=function(t,e){this._pairs.push([t,e])},z.toString=function(t){const e=t?function(e){return t.call(this,e,V)}:V;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var K=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},X={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:W,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const tt="undefined"!=typeof window&&"undefined"!=typeof document,et=(rt="undefined"!=typeof navigator&&navigator.product,tt&&["ReactNative","NativeScript","NS"].indexOf(rt)<0);var rt;const nt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ot={...Object.freeze({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserWebWorkerEnv:nt,hasStandardBrowserEnv:et}),...Z};function it(t){function e(t,r,n,o){let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=t.length;return i=!i&&M.isArray(n)?n.length:i,a?(M.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&M.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&M.isArray(n[i])&&(n[i]=function(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n{e(function(t){return M.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null}const st={transitional:X,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,o=M.isObject(t);if(o&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return n?JSON.stringify(it(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return G(t,new ot.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return ot.isNode&&M.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=M.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return G(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||n?(e.setContentType("application/json",!1),function(t,e,r){if(M.isString(t))try{return(0,JSON.parse)(t),M.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||st.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&M.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw j.from(t,j.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],(t=>{st.headers[t]={}}));var at=st;const ut=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lt=Symbol("internals");function ct(t){return t&&String(t).trim().toLowerCase()}function pt(t){return!1===t||null==t?t:M.isArray(t)?t.map(pt):String(t)}function ft(t,e,r,n,o){return M.isFunction(n)?n.call(this,e,r):(o&&(e=r),M.isString(e)?M.isString(n)?-1!==e.indexOf(n):M.isRegExp(n)?n.test(e):void 0:void 0)}class dt{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function o(t,e,r){const o=ct(e);if(!o)throw new Error("header name must be a non-empty string");const i=M.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||e]=pt(t))}const i=(t,e)=>M.forEach(t,((t,r)=>o(t,r,e)));return M.isPlainObject(t)||t instanceof this.constructor?i(t,e):M.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?i((t=>{const e={};let r,n,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),r=t.substring(0,o).trim().toLowerCase(),n=t.substring(o+1).trim(),!r||e[r]&&ut[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&o(e,t,r),this}get(t,e){if(t=ct(t)){const r=M.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(M.isFunction(e))return e.call(this,t,r);if(M.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ct(t)){const r=M.findKey(this,t);return!(!r||void 0===this[r]||e&&!ft(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function o(t){if(t=ct(t)){const o=M.findKey(r,t);!o||e&&!ft(0,r[o],o,e)||(delete r[o],n=!0)}}return M.isArray(t)?t.forEach(o):o(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const o=e[r];t&&!ft(0,this[o],o,t,!0)||(delete this[o],n=!0)}return n}normalize(t){const e=this,r={};return M.forEach(this,((n,o)=>{const i=M.findKey(r,o);if(i)return e[i]=pt(n),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete e[o],e[s]=pt(n),r[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return M.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&M.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[lt]=this[lt]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=ct(t);e[n]||(function(t,e){const r=M.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,o){return this[n].call(this,e,t,r,o)},configurable:!0})}))}(r,t),e[n]=!0)}return M.isArray(t)?t.forEach(n):n(t),this}}dt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(dt.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),M.freezeMethods(dt);var ht=dt;function _t(t,e){const r=this||at,n=e||r,o=ht.from(n.headers);let i=n.data;return M.forEach(t,(function(t){i=t.call(r,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function yt(t){return!(!t||!t.__CANCEL__)}function gt(t,e,r){j.call(this,null==t?"canceled":t,j.ERR_CANCELED,e,r),this.name="CanceledError"}M.inherits(gt,j,{__CANCEL__:!0});var mt=ot.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];M.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),M.isString(n)&&s.push("path="+n),M.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function vt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var Et=ot.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=M.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};function bt(t,e){let r=0;const n=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),l=n[s];o||(o=u),r[i]=a,n[i]=u;let c=s,p=0;for(;c!==i;)p+=r[c++],c%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-o{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,u=n(a);r=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};l[e?"download":"upload"]=!0,t(l)}}const At={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const o=ht.from(t.headers).normalize();let i,s,{responseType:a,withXSRFToken:u}=t;function l(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}if(M.isFormData(n))if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];o.setContentType([t||"multipart/form-data",...e].join("; "))}let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(e+":"+r))}const p=vt(t.baseURL,t.url);function f(){if(!c)return;const n=ht.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new j("Request failed with status code "+r.status,[j.ERR_BAD_REQUEST,j.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),l()}),(function(t){r(t),l()}),{data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),$(p,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(f)},c.onabort=function(){c&&(r(new j("Request aborted",j.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new j("Network Error",j.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||X;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new j(e,n.clarifyTimeoutError?j.ETIMEDOUT:j.ECONNABORTED,t,c)),c=null},ot.hasStandardBrowserEnv&&(u&&M.isFunction(u)&&(u=u(t)),u||!1!==u&&Et(p))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&mt.read(t.xsrfCookieName);e&&o.set(t.xsrfHeaderName,e)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&M.forEach(o.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),M.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),a&&"json"!==a&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",bt(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",bt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{c&&(r(!e||e.type?new gt(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(p);d&&-1===ot.protocols.indexOf(d)?r(new j("Unsupported protocol "+d+":",j.ERR_BAD_REQUEST,t)):c.send(n||null)}))}};M.forEach(At,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const St=t=>`- ${t}`,Tt=t=>M.isFunction(t)||null===t||!1===t;var Ot=t=>{t=M.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new j("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(St).join("\n"):" "+St(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function It(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new gt(null,t)}function wt(t){return It(t),t.headers=ht.from(t.headers),t.data=_t.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ot(t.adapter||at.adapter)(t).then((function(e){return It(t),e.data=_t.call(t,t.transformResponse,e),e.headers=ht.from(e.headers),e}),(function(e){return yt(e)||(It(t),e&&e.response&&(e.response.data=_t.call(t,t.transformResponse,e.response),e.response.headers=ht.from(e.response.headers))),Promise.reject(e)}))}const Rt=t=>t instanceof ht?t.toJSON():t;function Ct(t,e){e=e||{};const r={};function n(t,e,r){return M.isPlainObject(t)&&M.isPlainObject(e)?M.merge.call({caseless:r},t,e):M.isPlainObject(e)?M.merge({},e):M.isArray(e)?e.slice():e}function o(t,e,r){return M.isUndefined(e)?M.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function i(t,e){if(!M.isUndefined(e))return n(void 0,e)}function s(t,e){return M.isUndefined(e)?M.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,o,i){return i in e?n(r,o):i in t?n(void 0,r):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>o(Rt(t),Rt(e),!0)};return M.forEach(Object.keys(Object.assign({},t,e)),(function(n){const i=u[n]||o,s=i(t[n],e[n],n);M.isUndefined(s)&&i!==a||(r[n]=s)})),r}const Ft={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ft[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Nt={};Ft.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.7] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,o,i)=>{if(!1===t)throw new j(n(o," has been removed"+(e?" in "+e:"")),j.ERR_DEPRECATED);return e&&!Nt[o]&&(Nt[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var Pt={assertOptions:function(t,e,r){if("object"!=typeof t)throw new j("options must be an object",j.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const e=t[i],r=void 0===e||s(e,i,t);if(!0!==r)throw new j("option "+i+" must be "+r,j.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new j("Unknown option "+i,j.ERR_BAD_OPTION)}},validators:Ft};const Ut=Pt.validators;class xt{constructor(t){this.defaults=t,this.interceptors={request:new K,response:new K}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e;Error.captureStackTrace?Error.captureStackTrace(e={}):e=new Error;const r=e.stack?e.stack.replace(/^.+\n/,""):"";t.stack?r&&!String(t.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+r):t.stack=r}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ct(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:o}=e;void 0!==r&&Pt.assertOptions(r,{silentJSONParsing:Ut.transitional(Ut.boolean),forcedJSONParsing:Ut.transitional(Ut.boolean),clarifyTimeoutError:Ut.transitional(Ut.boolean)},!1),null!=n&&(M.isFunction(n)?e.paramsSerializer={serialize:n}:Pt.assertOptions(n,{encode:Ut.function,serialize:Ut.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&M.merge(o.common,o[e.method]);o&&M.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=ht.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let l;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let c,p=0;if(!a){const t=[wt.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,u),c=t.length,l=Promise.resolve(e);p{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,o){r.reason||(r.reason=new gt(t,n,o),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new Lt((function(e){t=e})),cancel:t}}}var Mt=Lt;const jt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jt).forEach((([t,e])=>{jt[e]=t}));var kt=jt;const Bt=function t(e){const r=new Dt(e),o=n(Dt.prototype.request,r);return M.extend(o,Dt.prototype,r,{allOwnKeys:!0}),M.extend(o,r,null,{allOwnKeys:!0}),o.create=function(r){return t(Ct(e,r))},o}(at);Bt.Axios=Dt,Bt.CanceledError=gt,Bt.CancelToken=Mt,Bt.isCancel=yt,Bt.VERSION="1.6.7",Bt.toFormData=G,Bt.AxiosError=j,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=function(t){return function(e){return t.apply(null,e)}},Bt.isAxiosError=function(t){return M.isObject(t)&&!0===t.isAxiosError},Bt.mergeConfig=Ct,Bt.AxiosHeaders=ht,Bt.formToJSON=t=>it(M.isHTMLForm(t)?new FormData(t):t),Bt.getAdapter=Ot,Bt.HttpStatusCode=kt,Bt.default=Bt,t.exports=Bt}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";var t=n,e=r(6798);t.default=e.default})(),n.default})())); //# sourceMappingURL=apisearch-ui.min.js.map \ No newline at end of file diff --git a/dist/apisearch-ui.min.js.map b/dist/apisearch-ui.min.js.map index 7065cf50..955e1a7d 100644 --- a/dist/apisearch-ui.min.js.map +++ b/dist/apisearch-ui.min.js.map @@ -1 +1 @@ -{"version":3,"file":"apisearch-ui.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,6CCRTJ,EAAQK,YAAa,EACrB,IAAIC,EAAU,EAAQ,MAClBC,EAAgB,EAAQ,MACxBC,EAAU,EAAQ,MAClBC,EAAU,EAAQ,MAClBC,EAAU,EAAQ,MAClBC,EAAW,EAAQ,MACnBC,EAAmB,EAAQ,MAC3BC,EAAW,EAAQ,MACnBC,EAAuB,EAAQ,MAC/BC,EAAgB,EAAQ,IACxBC,EAAgB,EAAQ,MAIxBC,EAA2B,WAC3B,SAASA,IACT,CAiIA,OAzHAA,EAAUC,iBAAmB,SAAUC,GACnCF,EAAUG,8BAA8BD,GACxCA,EAAOE,QAAUf,EAAQgB,SAAS,CAAEC,YAAa,KAAMC,kBAAkB,EAAMC,QAAS,KAAQN,EAAOE,SAIvG,IAAIK,OAAmD,IAA/BP,EAAOE,QAAQM,YACjCR,EAAOE,QAAQM,YACf,IAAIpB,EAAcqB,YAAYT,EAAOE,QAAQQ,SAAUV,EAAOE,QAAQE,YAAaJ,EAAOE,QAAQI,QAASN,EAAOE,QAAQG,kBAIhI,OAHIL,EAAOE,QAAQS,YACfJ,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C,EAAI,CAAC7/B,EAAS03E,KACjC,IAAI,IAAInlE,KAAOmlE,EACXJ,EAAoBr5C,EAAEy5C,EAAYnlE,KAAS+kE,EAAoBr5C,EAAEj+B,EAASuS,IAC5EpM,OAAO+vB,eAAel2B,EAASuS,EAAK,CAAE4jB,YAAY,EAAM/qB,IAAKssE,EAAWnlE,IAE1E,ECND+kE,EAAoBn3C,EAAI,WACvB,GAA0B,iBAAfs6B,WAAyB,OAAOA,WAC3C,IACC,OAAO31D,MAAQ,IAAIstB,SAAS,cAAb,EAChB,CAAE,MAAOkM,GACR,GAAsB,iBAAXuN,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxByrC,EAAoBr5C,EAAI,CAACjG,EAAK8iC,IAAU30D,OAAOnB,UAAUk1B,eAAe/vB,KAAK6tB,EAAK8iC,GCClFwc,EAAoBt5C,EAAKh+B,IACH,oBAAXqhC,QAA0BA,OAAO04B,aAC1C5zD,OAAO+vB,eAAel2B,EAASqhC,OAAO04B,YAAa,CAAE/pD,MAAO,WAE7D7J,OAAO+vB,eAAel2B,EAAS,aAAc,CAAEgQ,OAAO,GAAO,4CCH1Dm/B,EAAgB,EAAQ,MAC5BnvC,EAAiB,QAAImvC,EAAuB","sources":["webpack://apisearchUI/webpack/universalModuleDefinition","webpack://apisearchUI/./node_modules/apisearch/lib/Apisearch.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Config.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Synonym.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ConnectionError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ErrorWithMessage.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/EventError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ForbiddenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidFormatError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidTokenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceExistsError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceNotAvailableError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnknownError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnsupportedContentTypeError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Geo/LocationRange.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/AxiosClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/CacheClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Client.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/HttpClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Response.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/AppUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Changes.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Coordinate.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Index.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/IndexUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Item.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/ItemUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Metadata.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/User.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Aggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Filter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Query.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Range.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategies.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/SortBy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/HttpRepository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/Repository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Counter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Result.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregations.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/ReadTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/Transformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/WriteTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/index.js","webpack://apisearchUI/./node_modules/events/events.js","webpack://apisearchUI/./node_modules/mustache/mustache.js","webpack://apisearchUI/./node_modules/preact/hooks/dist/hooks.module.js","webpack://apisearchUI/./node_modules/preact/compat/dist/compat.module.js","webpack://apisearchUI/./node_modules/preact/dist/preact.module.js","webpack://apisearchUI/./src/ApisearchHelper.ts","webpack://apisearchUI/./src/ApisearchUI.ts","webpack://apisearchUI/./src/ApisearchUIFactory.ts","webpack://apisearchUI/./src/Bootstrap.ts","webpack://apisearchUI/./src/Constants.ts","webpack://apisearchUI/./src/Container.ts","webpack://apisearchUI/./src/Dispatcher.ts","webpack://apisearchUI/./src/Environment.ts","webpack://apisearchUI/./src/Highlight.ts","webpack://apisearchUI/./src/Store.ts","webpack://apisearchUI/./src/components/Banner/BannerComponent.tsx","webpack://apisearchUI/./src/components/Banner/defaultTemplates.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterActions.ts","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterComponent.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersActions.ts","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersComponent.tsx","webpack://apisearchUI/./src/components/Clone.ts","webpack://apisearchUI/./src/components/Common.ts","webpack://apisearchUI/./src/components/Information/InformationComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/Helpers.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterActions.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/ShowMoreComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Pagination/Helpers.ts","webpack://apisearchUI/./src/components/Pagination/NavigationComponent.tsx","webpack://apisearchUI/./src/components/Pagination/PaginationActions.ts","webpack://apisearchUI/./src/components/Pagination/PaginationComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterActions.ts","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterActions.ts","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterComponent.tsx","webpack://apisearchUI/./src/components/Reload/ReloadActions.ts","webpack://apisearchUI/./src/components/Reload/ReloadComponent.tsx","webpack://apisearchUI/./src/components/Result/Item.tsx","webpack://apisearchUI/./src/components/Result/ResultActions.ts","webpack://apisearchUI/./src/components/Result/ResultComponent.tsx","webpack://apisearchUI/./src/components/Result/defaultTemplates.tsx","webpack://apisearchUI/./src/components/SearchInput/AutocompleteComponent.tsx","webpack://apisearchUI/./src/components/SearchInput/SearchInputActions.ts","webpack://apisearchUI/./src/components/SearchInput/SearchInputComponent.tsx","webpack://apisearchUI/./src/components/Snapshot/SnapshotComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByActions.ts","webpack://apisearchUI/./src/components/SortBy/SortByComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByHelper.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterActions.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterComponent.tsx","webpack://apisearchUI/./src/components/Suggestions/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Template.tsx","webpack://apisearchUI/./src/components/Translate.tsx","webpack://apisearchUI/./src/widgets/Banner.tsx","webpack://apisearchUI/./src/widgets/CheckboxFilter.tsx","webpack://apisearchUI/./src/widgets/ClearFilters.tsx","webpack://apisearchUI/./src/widgets/Information.tsx","webpack://apisearchUI/./src/widgets/MultipleFilter.tsx","webpack://apisearchUI/./src/widgets/Pagination.tsx","webpack://apisearchUI/./src/widgets/PriorityFilter.tsx","webpack://apisearchUI/./src/widgets/RangeFilter.tsx","webpack://apisearchUI/./src/widgets/Reload.tsx","webpack://apisearchUI/./src/widgets/Result.tsx","webpack://apisearchUI/./src/widgets/SearchInput.tsx","webpack://apisearchUI/./src/widgets/Snapshot.tsx","webpack://apisearchUI/./src/widgets/SortBy.tsx","webpack://apisearchUI/./src/widgets/Suggestions.tsx","webpack://apisearchUI/./src/widgets/Widget.ts","webpack://apisearchUI/./src/widgets/Widgets.ts","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5_file_hasher.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/parallel_hasher.js","webpack://apisearchUI/./node_modules/tslib/tslib.es6.js","webpack://apisearchUI/./node_modules/axios/dist/browser/axios.cjs","webpack://apisearchUI/webpack/bootstrap","webpack://apisearchUI/webpack/runtime/define property getters","webpack://apisearchUI/webpack/runtime/global","webpack://apisearchUI/webpack/runtime/hasOwnProperty shorthand","webpack://apisearchUI/webpack/runtime/make namespace object","webpack://apisearchUI/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"apisearchUI\"] = factory();\n\telse\n\t\troot[\"apisearchUI\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AxiosClient_1 = require(\"./Http/AxiosClient\");\nvar Query_1 = require(\"./Query/Query\");\nvar Query_2 = require(\"./Query/Query\");\nvar Query_3 = require(\"./Query/Query\");\nvar SortBy_1 = require(\"./Query/SortBy\");\nvar HttpRepository_1 = require(\"./Repository/HttpRepository\");\nvar Result_1 = require(\"./Result/Result\");\nvar ResultAggregations_1 = require(\"./Result/ResultAggregations\");\nvar Transformer_1 = require(\"./Transformer/Transformer\");\nvar CacheClient_1 = require(\"./Http/CacheClient\");\n/**\n * Apisearch class\n */\nvar Apisearch = /** @class */ (function () {\n function Apisearch() {\n }\n /**\n * Constructor\n *\n * @param config\n *\n * @return {HttpRepository}\n */\n Apisearch.createRepository = function (config) {\n Apisearch.ensureRepositoryConfigIsValid(config);\n config.options = tslib_1.__assign({ api_version: \"v1\", override_queries: true, timeout: 3000 }, config.options);\n /**\n * Client\n */\n var httpClient = typeof config.options.http_client !== \"undefined\"\n ? config.options.http_client\n : new AxiosClient_1.AxiosClient(config.options.endpoint, config.options.api_version, config.options.timeout, config.options.override_queries);\n if (config.options.use_cache) {\n httpClient = new CacheClient_1.CacheClient(httpClient);\n }\n return new HttpRepository_1.HttpRepository(httpClient, config.app_id, config.index_id, config.token, new Transformer_1.Transformer());\n };\n /**\n * Ensure the Repository configuration is valid\n *\n * @param config\n */\n Apisearch.ensureRepositoryConfigIsValid = function (config) {\n Apisearch.ensureIsDefined(config.app_id, \"app_id\");\n Apisearch.ensureIsDefined(config.index_id, \"index_id\");\n Apisearch.ensureIsDefined(config.token, \"token\");\n Apisearch.ensureIsDefined(config.options.endpoint, \"options.endpoint\");\n };\n /**\n * Ensure the value is not undefined\n *\n * @param param\n * @param name\n */\n Apisearch.ensureIsDefined = function (param, name) {\n if (typeof param === \"undefined\") {\n throw new TypeError(name + \" parameter must be defined.\");\n }\n };\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQueryLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.createLocated(coordinate, queryText, page, size);\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQuery = function (queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.create(queryText, page, size);\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Apisearch.createQueryMatchAll = function () {\n return Query_3.Query.createMatchAll();\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUID = function (uuid) {\n return Query_3.Query.createByUUID(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n return Query_3.Query.createByUUIDs.apply(Query_3.Query, uuids);\n };\n /**\n * Create empty result\n *\n * @return {Result}\n */\n Apisearch.createEmptyResult = function () {\n return Result_1.Result.create(\"\", 0, 0, new ResultAggregations_1.ResultAggregations(0), [], []);\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptySortBy = function () {\n return SortBy_1.SortBy.create();\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptyScoreStrategy = function () {\n return SortBy_1.SortBy.create();\n };\n return Apisearch;\n}());\nexports[\"default\"] = Apisearch;\n","\"use strict\";\nexports.__esModule = true;\nexports.Config = exports.DEFAULT_REPLICAS = exports.DEFAULT_SHARDS = void 0;\nvar Synonym_1 = require(\"./Synonym\");\nexports.DEFAULT_SHARDS = 1;\nexports.DEFAULT_REPLICAS = 0;\n/**\n * Result class\n */\nvar Config = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param language\n * @param storeSearchableMetadata\n * @param shards\n * @param replicas\n */\n function Config(language, storeSearchableMetadata, shards, replicas) {\n if (language === void 0) { language = null; }\n if (storeSearchableMetadata === void 0) { storeSearchableMetadata = true; }\n if (shards === void 0) { shards = exports.DEFAULT_SHARDS; }\n if (replicas === void 0) { replicas = exports.DEFAULT_REPLICAS; }\n this.synonyms = [];\n this.language = language;\n this.storeSearchableMetadata = storeSearchableMetadata;\n this.shards = shards;\n this.replicas = replicas;\n }\n /**\n * Get language\n *\n * @return {string}\n */\n Config.prototype.getLanguage = function () {\n return this.language;\n };\n /**\n * Should searchable metadata be stored\n *\n * @return {boolean}\n */\n Config.prototype.shouldSearchableMetadataBeStored = function () {\n return this.storeSearchableMetadata;\n };\n /**\n * Add synonym\n *\n * @param synonym\n */\n Config.prototype.addSynonym = function (synonym) {\n this.synonyms.push(synonym);\n };\n /**\n * Get synonyms\n *\n * @return {Synonym[]}\n */\n Config.prototype.getSynonyms = function () {\n return this.synonyms;\n };\n /**\n * Get shards\n *\n * @return {number}\n */\n Config.prototype.getShards = function () {\n return this.shards;\n };\n /**\n * Get replicas\n *\n * @return {number}\n */\n Config.prototype.getReplicas = function () {\n return this.replicas;\n };\n /**\n * to array\n */\n Config.prototype.toArray = function () {\n return {\n language: this.language,\n store_searchable_metadata: this.storeSearchableMetadata,\n synonyms: this.synonyms.map(function (synonym) { return synonym.toArray(); }),\n shards: this.shards,\n replicas: this.replicas\n };\n };\n /**\n * Create from array\n */\n Config.createFromArray = function (array) {\n var config = new Config(array.language ? array.language : null, typeof array.store_searchable_metadata == \"boolean\"\n ? array.store_searchable_metadata\n : true);\n if (array.synonyms instanceof Array &&\n array.synonyms.length > 0) {\n config.synonyms = array.synonyms.map(function (synonym) { return Synonym_1.Synonym.createFromArray(synonym); });\n }\n config.shards = typeof array.shards == \"number\"\n ? array.shards\n : exports.DEFAULT_SHARDS;\n config.replicas = typeof array.replicas == \"number\"\n ? array.replicas\n : exports.DEFAULT_REPLICAS;\n return config;\n };\n return Config;\n}());\nexports.Config = Config;\n","\"use strict\";\nexports.__esModule = true;\nexports.Synonym = void 0;\n/**\n * Result class\n */\nvar Synonym = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param words\n */\n function Synonym(words) {\n this.words = words;\n }\n /**\n * get words\n *\n * @return {string[]}\n */\n Synonym.prototype.getWords = function () {\n return this.words;\n };\n /**\n * Create by words\n *\n * @param words\n *\n * @return {Synonym}\n */\n Synonym.createbyWords = function (words) {\n return new Synonym(words);\n };\n /**\n * To array\n *\n * @return {{words: string[]}}\n */\n Synonym.prototype.toArray = function () {\n return {\n words: this.words\n };\n };\n /**\n * create from array\n *\n * @param array\n *\n * @returns {Synonym}\n */\n Synonym.createFromArray = function (array) {\n return new Synonym(array.words instanceof Object\n ? array.words\n : []);\n };\n /**\n * Expand\n *\n * @returns {string}\n */\n Synonym.prototype.expand = function () {\n return this.words.join(\",\");\n };\n return Synonym;\n}());\nexports.Synonym = Synonym;\n","\"use strict\";\nexports.__esModule = true;\nexports.ConnectionError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar ConnectionError = /** @class */ (function (_super) {\n tslib_1.__extends(ConnectionError, _super);\n function ConnectionError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ConnectionError.getTransportableHTTPError = function () {\n return 500;\n };\n return ConnectionError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ConnectionError = ConnectionError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ErrorWithMessage = void 0;\n/**\n * ConnectError\n */\nvar ErrorWithMessage = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param message\n */\n function ErrorWithMessage(message) {\n this.message = message;\n }\n return ErrorWithMessage;\n}());\nexports.ErrorWithMessage = ErrorWithMessage;\n","\"use strict\";\nexports.__esModule = true;\nexports.EventError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * EventError\n */\nvar EventError = /** @class */ (function (_super) {\n tslib_1.__extends(EventError, _super);\n function EventError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n EventError.throwEndpointNotAvailable = function () {\n return new EventError(\"Endpoint not available\");\n };\n return EventError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.EventError = EventError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ForbiddenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Forbidden Error\n */\nvar ForbiddenError = /** @class */ (function (_super) {\n tslib_1.__extends(ForbiddenError, _super);\n function ForbiddenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ForbiddenError.getTransportableHTTPError = function () {\n return 403;\n };\n /**\n * App id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createAppIdIsRequiredException = function () {\n return new ForbiddenError(\"AppId query parameter MUST be defined with a valid value\");\n };\n /**\n * Index id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createIndexIsRequiredException = function () {\n return new ForbiddenError(\"Index query parameter MUST be defined with a valid value\");\n };\n /**\n * Token is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createTokenIsRequiredException = function () {\n return new ForbiddenError(\"Token query parameter MUST be defined with a valid value\");\n };\n return ForbiddenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ForbiddenError = ForbiddenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidFormatError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Class InvalidFormatError\n */\nvar InvalidFormatError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidFormatError, _super);\n function InvalidFormatError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidFormatError.getTransportableHTTPError = function () {\n return 400;\n };\n /**\n * Item representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item representation not valid. Expecting Item array serialized but found malformed data\");\n };\n /**\n * Item UUID representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemUUIDRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item UUID representation not valid. Expecting UUID array serialized but found malformed data\");\n };\n /**\n * Create Composed UUID bad format.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.composedItemUUIDNotValid = function () {\n return new InvalidFormatError(\"A composed UUID should always follow this format: {id}~{type}.\");\n };\n /**\n * Create Query sorted by distance without coordinate.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.querySortedByDistanceWithoutCoordinate = function () {\n return new InvalidFormatError(\"In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()\");\n };\n /**\n * Query representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.queryFormatNotValid = function () {\n return new InvalidFormatError(\"Query Format not valid. Expecting a Query serialized but found malformed data\");\n };\n /**\n * Coordinate representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.coordinateFormatNotValid = function () {\n return new InvalidFormatError(\"A Coordinate should always contain a lat (Latitude) and a lon (Longitude)\");\n };\n /**\n * Config representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.configFormatNotValid = function () {\n return new InvalidFormatError(\"Config Format not valid. Expecting a Config serialized but found malformed data\");\n };\n /**\n * Token representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenFormatNotValid = function () {\n return new InvalidFormatError(\"Token Format not valid. Expecting a Token serialized but found malformed data\");\n };\n /**\n * Index format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexFormatNotValid = function () {\n return new InvalidFormatError('Index Format not valid. Expecting an Index serialized but found malformed data');\n };\n /**\n * IndexUUI format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexUUIDFormatNotValid = function () {\n return new InvalidFormatError('IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data');\n };\n /**\n * App format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.appUUIDFormatNotValid = function () {\n return new InvalidFormatError('AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data');\n };\n /**\n * Campaign representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.campaignFormatNotValid = function () {\n return new InvalidFormatError(\"Campaign Format not valid. Expecting a Campaign serialized but found malformed data\");\n };\n /**\n * Changes representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.changesFormatNotValid = function () {\n return new InvalidFormatError(\"Changes Format not valid. Expecting a Changes serialized but found malformed data\");\n };\n /**\n * Boost clause representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.boostClauseFormatNotValid = function () {\n return new InvalidFormatError(\"Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data\");\n };\n /**\n * token uuid representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenUUIDFormatNotValid = function () {\n return new InvalidFormatError(\"Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data\");\n };\n /**\n * User representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.userFormatNotValid = function () {\n return new InvalidFormatError(\"User Format not valid. Expecting a User serialized but found malformed data\");\n };\n return InvalidFormatError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidFormatError = InvalidFormatError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidTokenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Invalid token error\n */\nvar InvalidTokenError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidTokenError, _super);\n function InvalidTokenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidTokenError.getTransportableHTTPError = function () {\n return 401;\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenPermissions = function (tokenReference) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid\");\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n * @param maxHitsPerQuery\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenMaxHitsPerQuery = function (tokenReference, maxHitsPerQuery) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid. Max \" + maxHitsPerQuery + \" hits allowed\");\n };\n return InvalidTokenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidTokenError = InvalidTokenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceExistsError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource exists error\n */\nvar ResourceExistsError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceExistsError, _super);\n function ResourceExistsError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceExistsError.getTransportableHTTPError = function () {\n return 409;\n };\n /**\n * Index not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.indexAvailable = function () {\n return new ResourceExistsError(\"Index exists and cannot be created again\");\n };\n /**\n * Events not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.eventsIndexAvailable = function () {\n return new ResourceExistsError(\"Events index exists and cannot be created again\");\n };\n /**\n * Logs not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.logsIndexAvailable = function () {\n return new ResourceExistsError(\"Logs index exists and cannot be created again\");\n };\n return ResourceExistsError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceExistsError = ResourceExistsError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceNotAvailableError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource not available error\n */\nvar ResourceNotAvailableError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceNotAvailableError, _super);\n function ResourceNotAvailableError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceNotAvailableError.getTransportableHTTPError = function () {\n return 404;\n };\n /**\n * Index not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.indexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Index not available - \" + resourceId);\n };\n /**\n * Events not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.eventsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Events not available - \" + resourceId);\n };\n /**\n * Logs not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.logsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Logs not available - \" + resourceId);\n };\n /**\n * Engine not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.engineNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Engine not available - \" + resourceId);\n };\n return ResourceNotAvailableError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceNotAvailableError = ResourceNotAvailableError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnknownError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar UnknownError = /** @class */ (function (_super) {\n tslib_1.__extends(UnknownError, _super);\n function UnknownError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Unknown error\n *\n * @return this\n */\n UnknownError.createUnknownError = function () {\n return new this(\"Unknown error.\");\n };\n return UnknownError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnknownError = UnknownError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnsupportedContentTypeError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Unsupported content type error\n */\nvar UnsupportedContentTypeError = /** @class */ (function (_super) {\n tslib_1.__extends(UnsupportedContentTypeError, _super);\n function UnsupportedContentTypeError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n UnsupportedContentTypeError.getTransportableHTTPError = function () {\n return 415;\n };\n /**\n * Unsupported content type\n *\n * @return {InvalidFormatError}\n */\n UnsupportedContentTypeError.createUnsupportedContentTypeException = function () {\n return new UnsupportedContentTypeError(\"This content type is not accepted. Please use application/json\");\n };\n return UnsupportedContentTypeError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnsupportedContentTypeError = UnsupportedContentTypeError;\n","\"use strict\";\nexports.__esModule = true;\nexports.Square = exports.Polygon = exports.CoordinateAndDistance = exports.LocationRange = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\n/**\n * Abstract Location Range class\n */\nvar LocationRange = /** @class */ (function () {\n function LocationRange() {\n }\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n LocationRange.fromFilterObject = function (object) {\n throw TypeError(\"Method not valid\");\n };\n /**\n * to array\n */\n LocationRange.prototype.toArray = function () {\n return {\n type: this.getName(),\n data: this.toFilterObject()\n };\n };\n /**\n * Create from array\n *\n * @param array\n */\n LocationRange.createFromArray = function (array) {\n if (array.type == \"CoordinateAndDistance\") {\n return CoordinateAndDistance.fromFilterObject(array.data);\n }\n if (array.type == \"Polygon\") {\n return Polygon.fromFilterObject(array.data);\n }\n if (array.type == \"Square\") {\n return Square.fromFilterObject(array.data);\n }\n };\n return LocationRange;\n}());\nexports.LocationRange = LocationRange;\n/**\n * CoordinateAndDistance\n */\nvar CoordinateAndDistance = /** @class */ (function (_super) {\n tslib_1.__extends(CoordinateAndDistance, _super);\n /**\n * Constructor\n *\n * @param coordinate\n * @param distance\n */\n function CoordinateAndDistance(coordinate, distance) {\n var _this = _super.call(this) || this;\n _this.coordinate = coordinate;\n _this.distance = distance;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n CoordinateAndDistance.prototype.toFilterObject = function () {\n return {\n coordinate: this.coordinate.toArray(),\n distance: this.distance\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n CoordinateAndDistance.prototype.getName = function () {\n return \"CoordinateAndDistance\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n CoordinateAndDistance.fromFilterObject = function (object) {\n return new CoordinateAndDistance(Coordinate_1.Coordinate.createFromArray(object.coordinate), object.distance);\n };\n return CoordinateAndDistance;\n}(LocationRange));\nexports.CoordinateAndDistance = CoordinateAndDistance;\n/**\n * Polygon\n */\nvar Polygon = /** @class */ (function (_super) {\n tslib_1.__extends(Polygon, _super);\n /**\n * Constructor\n *\n * @param coordinates\n */\n function Polygon(coordinates) {\n var _this = _super.call(this) || this;\n if (coordinates.length < 3) {\n throw new Error(\"A polygon needs more than two coordinates.\");\n }\n _this.coordinates = coordinates;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{coordinates: {lat:number, lon:number}[]}}\n */\n Polygon.prototype.toFilterObject = function () {\n var coordinates = [];\n for (var i in this.coordinates) {\n coordinates.push(this.coordinates[i].toArray());\n }\n return {\n coordinates: coordinates\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Polygon.prototype.getName = function () {\n return \"Polygon\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {Polygon}\n */\n Polygon.fromFilterObject = function (object) {\n var coordinates = [];\n for (var i in object.coordinates) {\n coordinates.push(Coordinate_1.Coordinate.createFromArray(object.coordinates[i]));\n }\n return new Polygon(coordinates);\n };\n return Polygon;\n}(LocationRange));\nexports.Polygon = Polygon;\n/**\n * Square\n */\nvar Square = /** @class */ (function (_super) {\n tslib_1.__extends(Square, _super);\n /**\n * Constructor\n *\n * @param topLeftCoordinate\n * @param bottomRightCoordinate\n */\n function Square(topLeftCoordinate, bottomRightCoordinate) {\n var _this = _super.call(this) || this;\n _this.topLeftCoordinate = topLeftCoordinate;\n _this.bottomRightCoordinate = bottomRightCoordinate;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n Square.prototype.toFilterObject = function () {\n return {\n top_left: this.topLeftCoordinate.toArray(),\n bottom_right: this.bottomRightCoordinate.toArray()\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Square.prototype.getName = function () {\n return \"Square\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n Square.fromFilterObject = function (object) {\n return new Square(Coordinate_1.Coordinate.createFromArray(object.top_left), Coordinate_1.Coordinate.createFromArray(object.bottom_right));\n };\n return Square;\n}(LocationRange));\nexports.Square = Square;\n","\"use strict\";\nexports.__esModule = true;\nexports.AxiosClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar axios_1 = require(\"axios\");\nvar __1 = require(\"..\");\nvar Client_1 = require(\"./Client\");\nvar Response_1 = require(\"./Response\");\n/**\n * AxiosClient\n */\nvar AxiosClient = /** @class */ (function (_super) {\n tslib_1.__extends(AxiosClient, _super);\n /**\n * Constructor\n *\n * @param host\n * @param version\n * @param timeout\n * @param overrideQueries\n */\n function AxiosClient(host, version, timeout, overrideQueries) {\n var _this = _super.call(this, version) || this;\n _this.host = host;\n _this.timeout = timeout;\n _this.overrideQueries = overrideQueries;\n _this.abortControllers = {};\n return _this;\n }\n /**\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n */\n AxiosClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var headers, axiosRequestConfig, axiosResponse, error_1, response;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n method = method.toLowerCase();\n if (\"get\" === method &&\n this.overrideQueries) {\n this.abort(url, true);\n }\n headers = \"get\" === method\n ? {}\n : {\n \"Content-Encoding\": \"gzip\",\n \"Content-Type\": \"application/json\"\n };\n axiosRequestConfig = {\n baseURL: this.host.replace(/\\/*$/g, \"\"),\n data: data,\n headers: headers,\n method: method,\n timeout: this.timeout,\n transformRequest: [function (rawData) { return JSON.stringify(rawData); }],\n url: url + \"?\" + Client_1.Client.objectToUrlParameters(tslib_1.__assign(tslib_1.__assign({}, parameters), {\n token: credentials.token\n })).replace(/#/g, \"%23\")\n };\n if (typeof this.abortControllers[url] !== \"undefined\") {\n axiosRequestConfig.signal = this.abortControllers[url].signal;\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.fetch(url, axiosRequestConfig, 3)];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, new Response_1.Response(axiosResponse.status, axiosResponse.data)];\n case 3:\n error_1 = _a.sent();\n response = void 0;\n if (error_1.response) {\n response = new Response_1.Response(error_1.response.status, error_1.response.data);\n }\n else {\n response = new Response_1.Response(__1.ConnectionError.getTransportableHTTPError(), {\n message: error_1.message\n });\n }\n throw response;\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n AxiosClient.prototype.abort = function (url, urlIsFormatted) {\n if (!urlIsFormatted) {\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n }\n if (typeof this.abortControllers[url] !== \"undefined\") {\n this.abortControllers[url].abort();\n }\n this.generateAbortController(url);\n };\n /**\n * Generate a new cancellation token for a query\n *\n * @param url\n */\n AxiosClient.prototype.generateAbortController = function (url) {\n this.abortControllers[url] = new AbortController();\n };\n /**\n * @param url\n * @param options\n * @param retries\n */\n AxiosClient.prototype.fetch = function (url, options, retries) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, axios_1[\"default\"]\n .request(options)\n .then(function (response) {\n return {\n data: response.data,\n status: response.status\n };\n })[\"catch\"](function (error) {\n var response = error.response;\n if (error.code !== undefined &&\n error.code !== \"ECONNREFUSED\" &&\n error.code !== \"ECONNABORTED\" &&\n error.code !== \"ERR_BAD_REQUEST\" &&\n error.message !== \"Network Error\") {\n return {\n data: response.data,\n status: response.status\n };\n }\n if (retries <= 0) {\n throw error;\n }\n retries = retries - 1;\n return _this.fetch(url, options, retries);\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return AxiosClient;\n}(Client_1.Client));\nexports.AxiosClient = AxiosClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.CacheClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ts_md5_1 = require(\"ts-md5\");\n/**\n * AxiosClient\n */\nvar CacheClient = /** @class */ (function () {\n function CacheClient(httpClient) {\n this.cache = {};\n this.hits = 0;\n this.httpClient = httpClient;\n }\n CacheClient.prototype.flushCache = function () {\n this.cache = {};\n };\n CacheClient.prototype.size = function () {\n return Object.keys(this.cache).length;\n };\n CacheClient.prototype.getNumberOfHits = function () {\n return this.hits;\n };\n /**\n * Get\n *\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n *\n * @return {Promise}\n */\n CacheClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var cacheUID, _a, _b;\n return tslib_1.__generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (method !== 'get') {\n return [2 /*return*/, this.httpClient.get(url, method, credentials, parameters, data)];\n }\n cacheUID = ts_md5_1.Md5.hashStr(JSON.stringify({\n 'u': url,\n 'c': credentials,\n 'p': parameters,\n 'd': data\n })).toString();\n if (!!this.cache[cacheUID]) return [3 /*break*/, 2];\n _a = this.cache;\n _b = cacheUID;\n return [4 /*yield*/, this.httpClient.get(url, method, credentials, parameters, data)];\n case 1:\n _a[_b] = _c.sent();\n return [3 /*break*/, 3];\n case 2:\n this.httpClient.abort(url, false);\n this.hits++;\n _c.label = 3;\n case 3: return [2 /*return*/, this.cache[cacheUID]];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n CacheClient.prototype.abort = function (url, urlIsFormatted) {\n };\n return CacheClient;\n}());\nexports.CacheClient = CacheClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Client = void 0;\n/**\n * Client\n */\nvar Client = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param version\n */\n function Client(version) {\n this.version = version.replace(/^\\/*|\\/*$/g, \"\");\n }\n /**\n * Build an url parameters array by an object\n *\n * @param params\n *\n * @returns {string}\n */\n Client.objectToUrlParameters = function (params) {\n var builtParams = [];\n for (var i in params) {\n builtParams.push(i + \"=\" + params[i]);\n }\n return builtParams.join(\"&\");\n };\n return Client;\n}());\nexports.Client = Client;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpClient = void 0;\n/**\n * Http class\n */\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n }\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Response = void 0;\n/**\n * Response\n */\nvar Response = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param code\n * @param body\n */\n function Response(code, body) {\n this.code = code;\n this.body = body;\n }\n /**\n * Get code\n *\n * @return {number}\n */\n Response.prototype.getCode = function () {\n return this.code;\n };\n /**\n * Get body\n *\n * @return {any}\n */\n Response.prototype.getBody = function () {\n return this.body;\n };\n return Response;\n}());\nexports.Response = Response;\n","\"use strict\";\nexports.__esModule = true;\nexports.AppUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * AppUUID class\n */\nvar AppUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function AppUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.appUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n AppUUID.createById = function (id) {\n return new AppUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n AppUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n AppUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n AppUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new AppUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n AppUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return AppUUID;\n}());\nexports.AppUUID = AppUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Changes = exports.TYPE_ARRAY = exports.TYPE_ARRAY_EXPECTS_ELEMENT = exports.TYPE_ARRAY_ELEMENT_DELETE = exports.TYPE_ARRAY_ELEMENT_ADD = exports.TYPE_ARRAY_ELEMENT_UPDATE = exports.TYPE_LITERAL = exports.TYPE_VALUE = void 0;\n/**\n * filter constants\n */\nexports.TYPE_VALUE = 1;\nexports.TYPE_LITERAL = 4;\nexports.TYPE_ARRAY_ELEMENT_UPDATE = 8;\nexports.TYPE_ARRAY_ELEMENT_ADD = 16;\nexports.TYPE_ARRAY_ELEMENT_DELETE = 32;\nexports.TYPE_ARRAY_EXPECTS_ELEMENT = 24;\nexports.TYPE_ARRAY = 56;\n/**\n * Changes Type cast\n * @param Changes\n */\nvar Changes = /** @class */ (function () {\n function Changes() {\n /**\n * Changes\n *\n * @type {Array}\n */\n this.changes = [];\n }\n /**\n * Add new change\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addChange = function (field, value, type) {\n if (type === void 0) { type = exports.TYPE_VALUE; }\n this.changes.push({\n field: field,\n type: type,\n value: value\n });\n };\n /**\n * Update element from list\n *\n * @param field\n * @param condition\n * @param value\n * @param type\n */\n Changes.prototype.updateElementFromList = function (field, condition, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_UPDATE,\n condition: condition,\n value: value\n });\n };\n /**\n * Add element in list\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addElementInList = function (field, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_ADD,\n value: value\n });\n };\n /**\n * Delete element from list\n *\n * @param field\n * @param condition\n */\n Changes.prototype.deleteElementFromList = function (field, condition) {\n this.changes.push({\n field: field,\n type: exports.TYPE_ARRAY_ELEMENT_DELETE,\n condition: condition\n });\n };\n /**\n * Get changes\n *\n * @returns {[]}\n */\n Changes.prototype.getChanges = function () {\n return this.changes;\n };\n /**\n * Create\n *\n * @returns {Changes}\n */\n Changes.create = function () {\n return new Changes();\n };\n /**\n * To array\n *\n * @returns {[]}\n */\n Changes.prototype.toArray = function () {\n return JSON.parse(JSON.stringify(this.changes));\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Changes}\n */\n Changes.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var changes = Changes.create();\n changes.changes = array;\n return changes;\n };\n return Changes;\n}());\nexports.Changes = Changes;\n","\"use strict\";\nexports.__esModule = true;\nexports.Coordinate = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * Coordinate Type cast\n * @param coordinate\n */\nvar Coordinate = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param {number} lat\n * @param {number} lon\n */\n function Coordinate(lat, lon) {\n this.lat = lat;\n this.lon = lon;\n }\n /**\n * Get latitude\n *\n * @return float\n */\n Coordinate.prototype.getLatitude = function () {\n return this.lat;\n };\n /**\n * Get longitude\n *\n * @return float\n */\n Coordinate.prototype.getLongitude = function () {\n return this.lon;\n };\n /**\n * To array\n *\n * @return {{lat: number, lon: number}}\n */\n Coordinate.prototype.toArray = function () {\n return {\n lat: this.lat,\n lon: this.lon\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return Coordinate\n *\n * @throws InvalidFormatError\n */\n Coordinate.createFromArray = function (array) {\n if (typeof array.lat == \"undefined\" ||\n typeof array.lon == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n return new Coordinate(array.lat, array.lon);\n };\n return Coordinate;\n}());\nexports.Coordinate = Coordinate;\n","\"use strict\";\nexports.__esModule = true;\nexports.Index = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\n/**\n * Index class\n */\nvar Index = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param appUUID\n * @param isOK\n * @param docCount\n * @param size\n */\n function Index(uuid, appUUID, isOK, docCount, size) {\n if (isOK === void 0) { isOK = false; }\n if (docCount === void 0) { docCount = 0; }\n if (size === void 0) { size = '0kb'; }\n this.uuid = uuid;\n this.appUUID = appUUID;\n this.isOK = isOK;\n this.docCount = docCount;\n this.size = size;\n }\n /**\n * Get uuid\n *\n * @return {IndexUUID}\n */\n Index.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get app id\n *\n * @return {AppUUID}\n */\n Index.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Index is OK\n *\n * @return {boolean}\n */\n Index.prototype.isOk = function () {\n return this.isOK;\n };\n /**\n * Get doc count\n *\n * @return {number}\n */\n Index.prototype.getDocCount = function () {\n return this.docCount;\n };\n /**\n * get size\n *\n * @return {string}\n */\n Index.prototype.getSize = function () {\n return this.size;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n Index.prototype.toArray = function () {\n return {\n uuid: this.uuid.toArray(),\n app_id: this.appUUID.toArray(),\n is_ok: this.isOK,\n doc_count: this.docCount,\n size: this.size\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n Index.createFromArray = function (array) {\n if (typeof array.uuid == \"undefined\" ||\n typeof array.app_id == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.indexFormatNotValid();\n }\n return new Index(IndexUUID_1.IndexUUID.createFromArray(array.uuid), AppUUID_1.AppUUID.createFromArray(array.app_id), (typeof array.is_ok == \"undefined\" ? false : array.is_ok), (typeof array.doc_count == \"undefined\" ? 0 : array.doc_count), (typeof array.size == \"undefined\" ? '0kb' : array.size));\n };\n return Index;\n}());\nexports.Index = Index;\n","\"use strict\";\nexports.__esModule = true;\nexports.IndexUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * IndexUUID class\n */\nvar IndexUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function IndexUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.indexUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n IndexUUID.createById = function (id) {\n return new IndexUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n IndexUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n IndexUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n IndexUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new IndexUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n IndexUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return IndexUUID;\n}());\nexports.IndexUUID = IndexUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Item = void 0;\nvar tslib_1 = require(\"tslib\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Coordinate_1 = require(\"./Coordinate\");\nvar ItemUUID_1 = require(\"./ItemUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\n/**\n * Item class\n */\nvar Item = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n */\n function Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n this.metadata = {};\n this.indexedMetadata = {};\n this.searchableMetadata = {};\n this.exactMatchingMetadata = [];\n this.suggest = [];\n this.highlights = {};\n this.promoted = false;\n this.uuid = uuid;\n this.coordinate = coordinate;\n this.metadata = metadata;\n this.indexedMetadata = indexedMetadata;\n this.searchableMetadata = searchableMetadata;\n this.exactMatchingMetadata = exactMatchingMetadata;\n this.suggest = suggest;\n }\n /**\n * Create new Item\n *\n * @param uuid\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.create = function (uuid, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, null, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Create new located Item\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.createLocated = function (uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Get uuid\n *\n * @returns ItemUUID\n */\n Item.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get id\n *\n * @returns string\n */\n Item.prototype.getId = function () {\n return this.uuid.getId();\n };\n /**\n * Get type\n *\n * @returns string\n */\n Item.prototype.getType = function () {\n return this.uuid.getType();\n };\n /**\n * Get coordinate\n *\n * @returns Coordinate|null\n */\n Item.prototype.getCoordinate = function () {\n return this.coordinate;\n };\n /**\n * Get distance\n *\n * @returns int\n */\n Item.prototype.getDistance = function () {\n return this.distance;\n };\n /**\n * Get metadata\n *\n * @returns Array\n */\n Item.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Set metadata\n *\n * @param metadata\n */\n Item.prototype.setMetadata = function (metadata) {\n this.metadata = metadata;\n };\n /**\n * Add metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addMetadata = function (key, value) {\n this.metadata[key] = value;\n };\n /**\n * Get indexed metadata\n *\n * @returns Array\n */\n Item.prototype.getIndexedMetadata = function () {\n return this.indexedMetadata;\n };\n /**\n * Set indexed metadata\n *\n * @param indexedMetadata\n */\n Item.prototype.setIndexedMetadata = function (indexedMetadata) {\n this.indexedMetadata = indexedMetadata;\n };\n /**\n * Add indexed metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addIndexedMetadata = function (key, value) {\n this.indexedMetadata[key] = value;\n };\n /**\n * Get searchable metadata\n *\n * @returns Array\n */\n Item.prototype.getSearchableMetadata = function () {\n return this.searchableMetadata;\n };\n /**\n * Set searchable metadata\n *\n * @param searchableMetadata\n */\n Item.prototype.setSearchableMetadata = function (searchableMetadata) {\n this.searchableMetadata = searchableMetadata;\n };\n /**\n * Add searchable metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addSearchableMetadata = function (key, value) {\n this.searchableMetadata[key] = value;\n };\n /**\n * Get exactMatching metadata\n *\n * @returns Array\n */\n Item.prototype.getExactMatchingMetadata = function () {\n return this.exactMatchingMetadata;\n };\n /**\n * Set exactMatching metadata\n *\n * @param exactMatchingMetadata\n */\n Item.prototype.setExactMatchingMetadata = function (exactMatchingMetadata) {\n this.exactMatchingMetadata = exactMatchingMetadata;\n };\n /**\n * Add exactMatching metadata\n *\n * @param value\n */\n Item.prototype.addExactMatchingMetadata = function (value) {\n this.exactMatchingMetadata.push(value);\n };\n /**\n * Get all metadata\n *\n * @returns {{}}\n */\n Item.prototype.getAllMetadata = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.metadata), this.indexedMetadata);\n };\n /**\n * Get\n *\n * @param key\n *\n * @returns mixed|null\n */\n Item.prototype.get = function (key) {\n var allMetadata = this.getAllMetadata();\n return (typeof allMetadata[key] != \"undefined\")\n ? allMetadata[key]\n : null;\n };\n /**\n * Get suggest\n *\n * @returns Array\n */\n Item.prototype.getSuggest = function () {\n return this.suggest;\n };\n /**\n * Get highlights\n *\n * @returns Array\n */\n Item.prototype.getHighlights = function () {\n return this.highlights;\n };\n /**\n * Get highlight\n *\n * @param key\n *\n * @return string|null\n */\n Item.prototype.getHighlight = function (key) {\n return (typeof this.highlights[key] != \"undefined\")\n ? this.highlights[key]\n : null;\n };\n /**\n * Is promoted\n *\n * @returns boolean\n */\n Item.prototype.isPromoted = function () {\n return this.promoted;\n };\n /**\n * Set score\n *\n * @param score\n *\n * @return {Item}\n */\n Item.prototype.setScore = function (score) {\n this.score = score;\n return this;\n };\n /**\n * Get score\n *\n * @return {number}\n */\n Item.prototype.getScore = function () {\n return this.score;\n };\n /**\n * Set appUUID\n *\n * @return {AppUUID}\n */\n Item.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Set indexUUID\n *\n * @return {IndexUUID}\n */\n Item.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n /**\n * To array\n */\n Item.prototype.toArray = function () {\n var itemAsArray = {\n uuid: this.uuid.toArray()\n };\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n itemAsArray.coordinate = this.coordinate.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n itemAsArray.metadata = this.metadata;\n }\n if (Object.keys(this.indexedMetadata).length > 0) {\n itemAsArray.indexed_metadata = this.indexedMetadata;\n }\n if (Object.keys(this.searchableMetadata).length > 0) {\n itemAsArray.searchable_metadata = this.searchableMetadata;\n }\n if (this.exactMatchingMetadata.length > 0) {\n itemAsArray.exact_matching_metadata = this.exactMatchingMetadata;\n }\n if (this.suggest.length > 0) {\n itemAsArray.suggest = this.suggest;\n }\n if (Object.keys(this.highlights).length > 0) {\n itemAsArray.highlights = this.highlights;\n }\n if (this.isPromoted()) {\n itemAsArray.is_promoted = true;\n }\n if (typeof this.distance != \"undefined\") {\n itemAsArray.distance = this.distance;\n }\n if (typeof this.score != \"undefined\") {\n itemAsArray.score = this.score;\n }\n if (typeof this.appUUID != \"undefined\") {\n itemAsArray.app_uuid = this.appUUID.toArray();\n }\n if (typeof this.indexUUID != \"undefined\") {\n itemAsArray.index_uuid = this.indexUUID.toArray();\n }\n return itemAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n */\n Item.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.uuid != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.itemUUIDRepresentationNotValid();\n }\n if (typeof array.coordinate != \"undefined\" &&\n typeof array.coordinate != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n var item = (typeof array.coordinate == \"object\" &&\n array.coordinate != null)\n ? Item.createLocated(ItemUUID_1.ItemUUID.createFromArray(array.uuid), Coordinate_1.Coordinate.createFromArray(array.coordinate), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest))\n : Item.create(ItemUUID_1.ItemUUID.createFromArray(array.uuid), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest));\n if (typeof array.distance != \"undefined\" &&\n array.distance != null) {\n item.distance = array.distance;\n }\n if (typeof array.highlights == \"object\" &&\n array.highlights != null) {\n item.highlights = array.highlights;\n }\n if (typeof array.is_promoted != \"undefined\" &&\n array.is_promoted != null) {\n item.promoted = array.is_promoted;\n }\n if (typeof array.score != \"undefined\" &&\n array.score != null) {\n item.score = array.score;\n }\n if (typeof array.app_uuid != \"undefined\" &&\n array.app_uuid != null) {\n item.appUUID = AppUUID_1.AppUUID.createFromArray(array.app_uuid);\n }\n if (typeof array.index_uuid != \"undefined\" &&\n array.index_uuid != null) {\n item.indexUUID = IndexUUID_1.IndexUUID.createFromArray(array.index_uuid);\n }\n return item;\n };\n /**\n * Compose uuid\n *\n * @returns string\n */\n Item.prototype.composeUUID = function () {\n return this.uuid.composedUUID();\n };\n /**\n * Get path by field.\n *\n * @param field\n *\n * @returns {string}\n */\n Item.getPathByField = function (field) {\n return ([\"id\", \"type\"].indexOf(field) > -1)\n ? \"uuid.\" + field\n : \"indexed_metadata.\" + field;\n };\n return Item;\n}());\nexports.Item = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.ItemUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * ItemUUID class\n */\nvar ItemUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n * @param type\n */\n function ItemUUID(id, type) {\n this.id = id;\n this.type = type;\n }\n /**\n * Create composed UUID\n *\n * @param composedUUID\n *\n * @returns {ItemUUID}\n */\n ItemUUID.createByComposedUUID = function (composedUUID) {\n var parts = composedUUID.split(\"~\");\n if (2 != parts.length) {\n throw InvalidFormatError_1.InvalidFormatError.composedItemUUIDNotValid();\n }\n return new ItemUUID(parts[0], parts[1]);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n ItemUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * Get type\n *\n * @returns {string}\n */\n ItemUUID.prototype.getType = function () {\n return this.type;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n ItemUUID.prototype.toArray = function () {\n return {\n id: this.id,\n type: this.type\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n ItemUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new ItemUUID(array.id, array.type);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n ItemUUID.prototype.composedUUID = function () {\n return this.id + \"~\" + this.type;\n };\n return ItemUUID;\n}());\nexports.ItemUUID = ItemUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Metadata = void 0;\n/**\n * User class\n */\nvar Metadata = /** @class */ (function () {\n function Metadata() {\n }\n /**\n * To metadata\n *\n * @param array:{}\n *\n * @returns {string}\n */\n Metadata.toMetadata = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var parts = [];\n for (var key in array) {\n parts.push(key + \"##\" + array[key]);\n }\n return parts.join(\"~~\");\n };\n /**\n * From metadata\n *\n * @param metadata\n *\n * @return {{}}\n */\n Metadata.fromMetadata = function (metadata) {\n var values = {};\n var splittedParts = metadata.split(\"~~\");\n var iterator = 0;\n var size = 0;\n var lastElement = null;\n for (var key in splittedParts) {\n var part = splittedParts[key];\n var parts = part.split(\"##\");\n if (parts.length > 1) {\n lastElement = parts[1];\n values[parts[0]] = lastElement;\n }\n else {\n lastElement = part;\n values[iterator++] = lastElement;\n }\n size++;\n }\n if (size == 1) {\n values = {\n id: lastElement,\n name: lastElement\n };\n }\n if (typeof values.id == \"undefined\") {\n return null;\n }\n return values;\n };\n return Metadata;\n}());\nexports.Metadata = Metadata;\n","\"use strict\";\nexports.__esModule = true;\nexports.User = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * User class\n */\nvar User = /** @class */ (function () {\n /**\n * Construct\n *\n * @param id string\n * @param attributes Array\n */\n function User(id, attributes) {\n if (attributes === void 0) { attributes = {}; }\n this.id = id;\n this.attributes = attributes;\n }\n /**\n * Return the user id\n *\n * @return {string}\n */\n User.prototype.getId = function () {\n return this.id;\n };\n /**\n * Return array\n *\n * @returns {{}}\n */\n User.prototype.getAttributes = function () {\n return this.attributes;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n User.prototype.toArray = function () {\n var array = {\n id: this.id\n };\n if (Object.keys(this.attributes).length > 0) {\n array.attributes = this.attributes;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n User.createFromArray = function (array) {\n if (array == null ||\n typeof array.id == \"undefined\" ||\n array.id == null) {\n throw InvalidFormatError_1.InvalidFormatError.userFormatNotValid();\n }\n var attributes = typeof array.attributes === typeof {}\n ? array.attributes\n : {};\n return new User(array.id, attributes);\n };\n return User;\n}());\nexports.User = User;\n","\"use strict\";\nexports.__esModule = true;\nexports.Aggregation = exports.AGGREGATION_NO_LIMIT = exports.AGGREGATION_SORT_BY_NAME_DESC = exports.AGGREGATION_SORT_BY_NAME_ASC = exports.AGGREGATION_SORT_BY_COUNT_DESC = exports.AGGREGATION_SORT_BY_COUNT_ASC = void 0;\nvar Filter_1 = require(\"./Filter\");\n/**\n * Aggregation constants\n */\nexports.AGGREGATION_SORT_BY_COUNT_ASC = [\"_count\", \"asc\"];\nexports.AGGREGATION_SORT_BY_COUNT_DESC = [\"_count\", \"desc\"];\nexports.AGGREGATION_SORT_BY_NAME_ASC = [\"_term\", \"asc\"];\nexports.AGGREGATION_SORT_BY_NAME_DESC = [\"_term\", \"desc\"];\nexports.AGGREGATION_NO_LIMIT = 0;\n/**\n * Aggregation class\n */\nvar Aggregation = /** @class */ (function () {\n /**\n * Construct\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n */\n function Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n this.subgroup = [];\n this.name = name;\n this.field = field;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.subgroup = subgroup;\n this.sort = sort;\n this.limit = limit;\n this.promoted = promoted;\n }\n /**\n * Get name\n *\n * @returns {string}\n */\n Aggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get field\n *\n * @returns {string}\n */\n Aggregation.prototype.getField = function () {\n return this.field;\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Aggregation.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Aggregation.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get subgroup\n *\n * @return {[]}\n */\n Aggregation.prototype.getSubgroup = function () {\n return this.subgroup;\n };\n /**\n * Get sort\n *\n * @return {[]}\n */\n Aggregation.prototype.getSort = function () {\n return this.sort;\n };\n /**\n * Get limit\n *\n * @return {number}\n */\n Aggregation.prototype.getLimit = function () {\n return this.limit;\n };\n /**\n * Get promoted\n *\n * @return {[]}\n */\n Aggregation.prototype.getPromoted = function () {\n return this.promoted;\n };\n /**\n * Create\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n *\n * @returns {Aggregation}\n */\n Aggregation.create = function (name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n if (subgroup === void 0) { subgroup = []; }\n if (sort === void 0) { sort = exports.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = exports.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return new Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Aggregation.prototype.toArray = function () {\n var aggregationAsArray = {\n name: this.name\n };\n if (this.field !== \"uuid.type\") {\n aggregationAsArray.field = this.field;\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n aggregationAsArray.application_type = this.applicationType;\n }\n if (this.filterType !== Filter_1.FILTER_TYPE_FIELD) {\n aggregationAsArray.filter_type = this.filterType;\n }\n if (this.subgroup.length > 0) {\n aggregationAsArray.subgroup = this.subgroup;\n }\n if (JSON.stringify(this.sort) !== JSON.stringify(exports.AGGREGATION_SORT_BY_COUNT_DESC)) {\n aggregationAsArray.sort = this.sort;\n }\n if (this.limit !== exports.AGGREGATION_NO_LIMIT) {\n aggregationAsArray.limit = this.limit;\n }\n if (this.promoted.length > 0) {\n aggregationAsArray.promoted = this.promoted;\n }\n return aggregationAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Aggregation}\n */\n Aggregation.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field === \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.application_type === \"undefined\") {\n array.application_type = Filter_1.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type === \"undefined\") {\n array.filter_type = Filter_1.FILTER_TYPE_FIELD;\n }\n if (typeof array.subgroup === \"undefined\") {\n array.subgroup = [];\n }\n if (typeof array.sort === \"undefined\") {\n array.sort = exports.AGGREGATION_SORT_BY_COUNT_DESC;\n }\n if (typeof array.limit === \"undefined\") {\n array.limit = exports.AGGREGATION_NO_LIMIT;\n }\n if (typeof array.promoted === \"undefined\") {\n array.promoted = [];\n }\n return Aggregation.create(array.name, array.field, array.application_type, array.filter_type, array.subgroup, array.sort, array.limit, array.promoted);\n };\n return Aggregation;\n}());\nexports.Aggregation = Aggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.Filter = exports.FILTER_TYPE_QUERY = exports.FILTER_TYPE_GEO = exports.FILTER_TYPE_DATE_RANGE = exports.FILTER_TYPE_RANGE = exports.FILTER_TYPE_FIELD = exports.FILTER_PROMOTE = exports.FILTER_EXCLUDE = exports.FILTER_AT_LEAST_ONE = exports.FILTER_MUST_ALL_WITH_LEVELS = exports.FILTER_MUST_ALL = void 0;\n/**\n * filter constants\n */\nexports.FILTER_MUST_ALL = 4;\nexports.FILTER_MUST_ALL_WITH_LEVELS = 5;\nexports.FILTER_AT_LEAST_ONE = 8;\nexports.FILTER_EXCLUDE = 16;\nexports.FILTER_PROMOTE = 32;\nexports.FILTER_TYPE_FIELD = \"field\";\nexports.FILTER_TYPE_RANGE = \"range\";\nexports.FILTER_TYPE_DATE_RANGE = \"date_range\";\nexports.FILTER_TYPE_GEO = \"geo\";\nexports.FILTER_TYPE_QUERY = \"query\";\n/**\n * Filter class\n */\nvar Filter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n */\n function Filter(field, values, applicationType, filterType, filterTerms) {\n this.field = field;\n this.values = values;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.filterTerms = filterTerms;\n }\n /**\n * Get field\n *\n * @returns {string}\n */\n Filter.prototype.getField = function () {\n return this.field;\n };\n /**\n * Get values\n *\n * @returns {any}\n */\n Filter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Has value\n *\n * @param value\n *\n * @returns {boolean}\n */\n Filter.prototype.hasValue = function (value) {\n return typeof this.values[value] == \"undefined\";\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Filter.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Filter.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get filter type\n *\n * @return {{}}\n */\n Filter.prototype.getFilterTerms = function () {\n return this.filterTerms;\n };\n /**\n * Create\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n *\n * @return {Filter}\n */\n Filter.create = function (field, values, applicationType, filterType, filterTerms) {\n if (filterTerms === void 0) { filterTerms = []; }\n return new Filter(field, values, applicationType, filterType, filterTerms);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Filter.prototype.toArray = function () {\n var filterAsArray = {};\n if (this.field != \"uuid.type\") {\n filterAsArray.field = this.field;\n }\n if (this.values.length > 0 ||\n Object.keys(this.values).length > 0) {\n filterAsArray.values = this.values;\n }\n if (this.applicationType != exports.FILTER_AT_LEAST_ONE) {\n filterAsArray.application_type = this.applicationType;\n }\n if (this.filterType != exports.FILTER_TYPE_FIELD) {\n filterAsArray.filter_type = this.filterType;\n }\n if (this.filterTerms.length > 0) {\n filterAsArray.filter_terms = this.filterTerms;\n }\n return filterAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Filter}\n */\n Filter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field == \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.values == \"undefined\") {\n array.values = [];\n }\n if (typeof array.application_type == \"undefined\") {\n array.application_type = exports.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type == \"undefined\") {\n array.filter_type = exports.FILTER_TYPE_FIELD;\n }\n if (typeof array.filter_terms == \"undefined\") {\n array.filter_terms = [];\n }\n return Filter.create(array.field, array.values, array.application_type, array.filter_type, array.filter_terms);\n };\n return Filter;\n}());\nexports.Filter = Filter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Query = exports.NO_MIN_SCORE = exports.QUERY_DEFAULT_SIZE = exports.QUERY_DEFAULT_PAGE = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Item_1 = require(\"../Model/Item\");\nvar User_1 = require(\"../Model/User\");\nvar Aggregation_1 = require(\"./Aggregation\");\nvar Filter_1 = require(\"./Filter\");\nvar Filter_2 = require(\"./Filter\");\nvar Aggregation_2 = require(\"./Aggregation\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Filter_3 = require(\"./Filter\");\nvar ScoreStrategies_1 = require(\"./ScoreStrategies\");\nvar SortBy_1 = require(\"./SortBy\");\nvar IndexUUID_1 = require(\"../Model/IndexUUID\");\n/**\n * Query constants\n */\nexports.QUERY_DEFAULT_PAGE = 1;\nexports.QUERY_DEFAULT_SIZE = 10;\nexports.NO_MIN_SCORE = 0.0;\n/**\n * Query class\n */\nvar Query = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryText\n */\n function Query(queryText) {\n this.UUID = null;\n this.fields = [];\n this.universeFilters = {};\n this.filters = {};\n this.itemsPromoted = [];\n this.aggregations = {};\n this.resultsEnabled = true;\n this.aggregationsEnabled = true;\n this.numberOfSuggestions = 0;\n this.highlightsEnabled = false;\n this.autocompleteEnabled = false;\n this.searchableFields = [];\n this.fuzziness = null;\n this.minScore = exports.NO_MIN_SCORE;\n this.metadata = {};\n this.subqueries = {};\n this.queryOperator = null;\n this.sortByInstance = SortBy_1.SortBy.create();\n this.filters._query = Filter_1.Filter.create(\"\", [queryText], 0, Filter_3.FILTER_TYPE_QUERY);\n }\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.createLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n var query = Query.create(queryText, page, size);\n query.coordinate = coordinate;\n return query;\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.create = function (queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n page = Math.max(1, page);\n var query = new Query(queryText);\n query.from = (page - 1) * size;\n query.size = size;\n query.page = page;\n return query;\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Query.createMatchAll = function () {\n return Query.create(\"\", exports.QUERY_DEFAULT_PAGE, exports.QUERY_DEFAULT_SIZE);\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Query.createByUUID = function (uuid) {\n return Query.createByUUIDs(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.createByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n var ids = [];\n for (var i in uuids) {\n ids.push(uuids[i].composedUUID());\n }\n var query = Query.create(\"\", exports.QUERY_DEFAULT_PAGE, ids.length)\n .disableAggregations()\n .disableSuggestions();\n query.filters._id = Filter_1.Filter.create(\"_id\", ids, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD);\n return query;\n };\n /**\n * Create by UUIDs\n *\n * @param queries\n *\n * @return {Query}\n */\n Query.createMultiquery = function (queries) {\n var query = Query.createMatchAll();\n query.subqueries = queries;\n return query;\n };\n /**\n * set fields\n *\n * @param fields\n *\n * @return {Query}\n */\n Query.prototype.setFields = function (fields) {\n this.fields = fields;\n return this;\n };\n /**\n * get fields\n *\n * @return {string[]}\n */\n Query.prototype.getFields = function () {\n return this.fields;\n };\n /**\n * Filter universe by types\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByTypes = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.type;\n }\n return this;\n };\n /**\n * Filter by types\n *\n * @param values\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByTypes = function (values, aggregate, aggregationSort) {\n var _a, _b;\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.type;\n }\n if (aggregate) {\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_b = {}, _b[\"type\"] = Aggregation_1.Aggregation.create(\"type\", fieldPath, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort), _b));\n }\n return this;\n };\n /**\n * Filter universe by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.id;\n }\n return this;\n };\n /**\n * Filter by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.id;\n }\n return this;\n };\n /**\n * Filter universe by\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseBy = function (field, values, applicationType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter by\n *\n * @param filterName\n * @param field\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterBy = function (filterName, field, values, applicationType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateBy(filterName, field, applicationType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter universe by range\n *\n * @param field\n * @param values\n * @param applicationType\n * @param rangeType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByRange = function (field, values, applicationType, rangeType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter universe by date range\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByDateRange = function (field, values, applicationType) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n return this.filterUniverseByRange(field, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE);\n };\n /**\n * Filter by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param values\n * @param applicationType\n * @param rangeType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByRange = function (filterName, field, ranges, values, applicationType, rangeType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length !== 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateByRange(filterName, fieldPath, ranges, applicationType, rangeType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByDateRange = function (filterName, field, options, values, applicationType, aggregate, aggregationSort) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n return this.filterByRange(filterName, field, options, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregate, aggregationSort);\n };\n /**\n * Filter universe by location\n *\n * @param locationRange\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByLocation = function (locationRange) {\n var _a;\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"coordinate\"] = Filter_1.Filter.create(\"coordinate\", locationRange.toArray(), Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_GEO), _a));\n return this;\n };\n /**\n * Set filter fields\n *\n * @param searchableFields\n *\n * @return {Query}\n */\n Query.prototype.setSearchableFields = function (searchableFields) {\n this.searchableFields = searchableFields;\n return this;\n };\n /**\n * Get filter fields\n *\n * @return {string[]}\n */\n Query.prototype.getSearchableFields = function () {\n return this.searchableFields;\n };\n /**\n * Sort by\n *\n * @param sortBy\n *\n * @return {Query}\n */\n Query.prototype.sortBy = function (sortBy) {\n if (sortBy.isSortedByGeoDistance()) {\n if (!(this.coordinate instanceof Coordinate_1.Coordinate)) {\n throw InvalidFormatError_1.InvalidFormatError.querySortedByDistanceWithoutCoordinate();\n }\n sortBy.setCoordinate(this.coordinate);\n }\n this.sortByInstance = sortBy;\n return this;\n };\n /**\n * Aggregate by\n *\n * @param filterName\n * @param field\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateBy = function (filterName, field, applicationType, aggregationSort, limit, promoted) {\n var _a;\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param applicationType\n * @param rangeType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByRange = function (filterName, field, ranges, applicationType, rangeType, aggregationSort, limit, promoted) {\n var _a;\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n if (ranges.length === 0) {\n return this;\n }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, rangeType, ranges, aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByDateRange = function (filterName, field, options, applicationType, aggregationSort, limit, promoted) {\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return this.aggregateByRange(filterName, field, options, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregationSort, limit, promoted);\n };\n /**\n * Get aggregations\n *\n * @return {{}}\n */\n Query.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation by name\n *\n * @param aggregationName\n *\n * @return {Aggregation|null}\n */\n Query.prototype.getAggregation = function (aggregationName) {\n return this.aggregations[aggregationName] instanceof Aggregation_1.Aggregation\n ? this.aggregations[aggregationName]\n : null;\n };\n /**\n * Get query text\n *\n * @return {string}\n */\n Query.prototype.getQueryText = function () {\n var filter = this.filters._query;\n return filter instanceof Filter_1.Filter\n ? filter.getValues()[0]\n : \"\";\n };\n /**\n * Get universe filters\n *\n * @return {{}}\n */\n Query.prototype.getUniverseFilters = function () {\n return this.universeFilters;\n };\n /**\n * Get universe filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getUniverseFilter = function (filterName) {\n return this.universeFilters[filterName] instanceof Filter_1.Filter\n ? this.universeFilters[filterName]\n : null;\n };\n /**\n * Get filters\n *\n * @return {{}}\n */\n Query.prototype.getFilters = function () {\n return this.filters;\n };\n /**\n * Get filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilter = function (filterName) {\n return this.filters[filterName] instanceof Filter_1.Filter\n ? this.filters[filterName]\n : null;\n };\n /**\n * Get filter by field\n *\n * @param fieldName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilterByField = function (fieldName) {\n var fieldPath = Item_1.Item.getPathByField(fieldName);\n for (var i in this.filters) {\n if (this.filters[i].getField() == fieldPath) {\n return this.filters[i];\n }\n }\n return null;\n };\n /**\n * Get sort by\n *\n * @return {SortBy}\n */\n Query.prototype.getSortBy = function () {\n return this.sortByInstance;\n };\n /**\n * Get from\n *\n * @return {number}\n */\n Query.prototype.getFrom = function () {\n return this.from;\n };\n /**\n * Get size\n *\n * @return {number}\n */\n Query.prototype.getSize = function () {\n return this.size;\n };\n /**\n * Get page\n *\n * @return {number}\n */\n Query.prototype.getPage = function () {\n return this.page;\n };\n /**\n * Enable results\n *\n * @return {Query}\n */\n Query.prototype.enableResults = function () {\n this.resultsEnabled = true;\n return this;\n };\n /**\n * Disable results\n *\n * @return {Query}\n */\n Query.prototype.disableResults = function () {\n this.resultsEnabled = false;\n return this;\n };\n /**\n * Are results enabled\n *\n * @return {boolean}\n */\n Query.prototype.areResultsEnabled = function () {\n return this.resultsEnabled;\n };\n /**\n * Enable aggregations\n *\n * @return {Query}\n */\n Query.prototype.enableAggregations = function () {\n this.aggregationsEnabled = true;\n return this;\n };\n /**\n * Disable aggregations\n *\n * @return {Query}\n */\n Query.prototype.disableAggregations = function () {\n this.aggregationsEnabled = false;\n return this;\n };\n /**\n * Are aggregations enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAggregationsEnabled = function () {\n return this.aggregationsEnabled;\n };\n /**\n * Set number of suggestions\n *\n * @param numberOfSuggestions\n *\n * @return {Query}\n */\n Query.prototype.setNumberOfSuggestions = function (numberOfSuggestions) {\n this.numberOfSuggestions = numberOfSuggestions;\n return this;\n };\n /**\n * Disable suggestions\n *\n * @return {Query}\n */\n Query.prototype.disableSuggestions = function () {\n this.numberOfSuggestions = 0;\n return this;\n };\n /**\n * Get number of suggestions\n *\n * @return {number}\n */\n Query.prototype.getNumberOfSuggestions = function () {\n return this.numberOfSuggestions;\n };\n /**\n * Enable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.enableAutocomplete = function () {\n this.autocompleteEnabled = true;\n return this;\n };\n /**\n * Disable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.disableAutocomplete = function () {\n this.autocompleteEnabled = false;\n return this;\n };\n /**\n * Are autocomplete enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAutocompleteEnabled = function () {\n return this.autocompleteEnabled;\n };\n /**\n * Enable highlights\n *\n * @return {Query}\n */\n Query.prototype.enableHighlights = function () {\n this.highlightsEnabled = true;\n return this;\n };\n /**\n * Disable highlights\n *\n * @return {Query}\n */\n Query.prototype.disableHighlights = function () {\n this.highlightsEnabled = false;\n return this;\n };\n /**\n * Are highlights enabled\n *\n * @return {boolean}\n */\n Query.prototype.areHighlightsEnabled = function () {\n return this.highlightsEnabled;\n };\n /**\n * Promote uuid\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.promoteUUID = function (itemUUID) {\n this\n .itemsPromoted\n .push(itemUUID);\n return this;\n };\n /**\n * Promote UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.promoteUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.itemsPromoted = uuids;\n return this;\n };\n /**\n * Get promoted UUIDs\n *\n * @return {ItemUUID[]}\n */\n Query.prototype.getItemsPromoted = function () {\n return this.itemsPromoted;\n };\n /**\n * Exclude id\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.excludeUUID = function (itemUUID) {\n this.excludeUUIDs(itemUUID);\n return this;\n };\n /**\n * Exclude UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.excludeUUIDs = function () {\n var _a;\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"excluded_ids\"] = Filter_1.Filter.create(\"_id\", uuids.map(function (uuid) { return uuid.composedUUID(); }), Filter_2.FILTER_EXCLUDE, Filter_2.FILTER_TYPE_FIELD), _a));\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategies}\n */\n Query.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Set score strategies\n *\n * @param scoreStrategies\n */\n Query.prototype.setScoreStrategies = function (scoreStrategies) {\n this.scoreStrategies = scoreStrategies;\n return this;\n };\n /**\n * Get fuzziness\n *\n * @return any\n */\n Query.prototype.getFuzziness = function () {\n return this.fuzziness;\n };\n /**\n * Set fuzziness\n *\n * @param fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setFuzziness = function (fuzziness) {\n this.fuzziness = fuzziness;\n return this;\n };\n /**\n * Set auto fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setAutoFuzziness = function () {\n this.fuzziness = 'AUTO';\n return this;\n };\n /**\n * Get min score\n *\n * @return any\n */\n Query.prototype.getMinScore = function () {\n return this.minScore;\n };\n /**\n * Set min score\n *\n * @param minScore\n *\n * @return {Query}\n */\n Query.prototype.setMinScore = function (minScore) {\n this.minScore = minScore;\n return this;\n };\n /**\n * By user\n *\n * @param user\n *\n * @return {Query}\n */\n Query.prototype.byUser = function (user) {\n this.user = user;\n return this;\n };\n /**\n * By anyone\n *\n * @return {null}\n */\n Query.prototype.anonymously = function () {\n this.user = null;\n return null;\n };\n /**\n * Get user\n *\n * @return {User}\n */\n Query.prototype.getUser = function () {\n return this.user;\n };\n /**\n * set metadata value\n *\n * @param name\n * @param value\n *\n * @return {Query}\n */\n Query.prototype.setMetadataValue = function (name, value) {\n this.metadata[name] = value;\n return this;\n };\n /**\n * Get metadata\n *\n * @return any\n */\n Query.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Add subquery\n *\n * @param name\n * @param subquery\n *\n * @return {Query}\n */\n Query.prototype.addSubquery = function (name, subquery) {\n this.subqueries[name] = subquery;\n return this;\n };\n /**\n * Get subqueries\n *\n * @return {Object}\n */\n Query.prototype.getSubqueries = function () {\n return this.subqueries;\n };\n /**\n * Identify it\n *\n * @param UUID\n *\n * @return {Query}\n */\n Query.prototype.identifyWith = function (UUID) {\n this.UUID = UUID;\n return this;\n };\n /**\n * Get identification\n *\n * @return {string|null}\n */\n Query.prototype.getUUID = function () {\n return this.UUID;\n };\n /**\n * Force Index UUID.\n *\n * @param indexUUID\n *\n * @return {Query}\n */\n Query.prototype.forceIndexUUID = function (indexUUID) {\n this.indexUUID = indexUUID;\n return this;\n };\n /**\n * Get IndexUUID\n *\n * @return {IndexUUID|null}\n */\n Query.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n Query.prototype.setQueryOperator = function (queryOperator) {\n this.queryOperator = queryOperator;\n return this;\n };\n Query.prototype.getQueryOperator = function () {\n return this.queryOperator;\n };\n /**\n * To array\n *\n * @return {any}\n */\n Query.prototype.toArray = function () {\n var array = {};\n if (this.UUID !== null) {\n array.UUID = this.UUID;\n }\n if (this.getQueryText() !== \"\") {\n array.q = this.getQueryText();\n }\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n array.coordinate = this.coordinate.toArray();\n }\n /**\n * Fields\n */\n if (this.fields instanceof Array &&\n this.fields.length > 0) {\n array.fields = this.fields;\n }\n /**\n * Universe Filters\n */\n if (Object.keys(this.universeFilters).length) {\n array.universe_filters = {};\n for (var i in this.universeFilters) {\n var universeFilter = this.universeFilters[i];\n array.universe_filters[i] = universeFilter.toArray();\n }\n }\n /**\n * Filters\n */\n if (this.filters instanceof Object &&\n Object.keys(this.filters).length) {\n var filters = {};\n for (var i in this.filters) {\n var filter = this.filters[i];\n if (filter.getFilterType() !== Filter_3.FILTER_TYPE_QUERY) {\n filters[i] = filter.toArray();\n }\n }\n if (Object.keys(filters).length > 0) {\n array.filters = filters;\n }\n }\n /**\n * Aggregations\n */\n if (this.aggregations instanceof Object &&\n Object.keys(this.aggregations).length) {\n array.aggregations = {};\n for (var i in this.aggregations) {\n var aggregation = this.aggregations[i];\n array.aggregations[i] = aggregation.toArray();\n }\n }\n /**\n * Sort\n */\n var sort = this.sortByInstance.toArray();\n if (Object.keys(sort).length) {\n array.sort = sort;\n }\n /**\n * Page\n */\n var page = this.page;\n if (page !== exports.QUERY_DEFAULT_PAGE) {\n array.page = page;\n }\n /**\n * Size\n */\n var size = this.size;\n if (size !== exports.QUERY_DEFAULT_SIZE) {\n array.size = size;\n }\n /**\n * Booleans\n */\n if (this.resultsEnabled === false) {\n array.results_enabled = false;\n }\n if (this.autocompleteEnabled === true) {\n array.autocomplete_enabled = true;\n }\n if (this.numberOfSuggestions !== 0) {\n array.number_of_suggestions = this.numberOfSuggestions;\n }\n if (this.highlightsEnabled === true) {\n array.highlight_enabled = true;\n }\n if (this.aggregationsEnabled === false) {\n array.aggregations_enabled = false;\n }\n /**\n * Filter fields\n */\n if (this.searchableFields instanceof Array &&\n this.searchableFields.length > 0) {\n array.searchable_fields = this.searchableFields;\n }\n /**\n * Score strategies\n */\n if (this.scoreStrategies instanceof ScoreStrategies_1.ScoreStrategies) {\n var scoreStrategiesAsArray = this.scoreStrategies.toArray();\n if (Object.keys(scoreStrategiesAsArray).length > 0) {\n array.score_strategies = scoreStrategiesAsArray;\n }\n }\n if (this.fuzziness !== null) {\n array.fuzziness = this.fuzziness;\n }\n /**\n * Min score\n */\n var minScore = this.minScore;\n if (minScore !== exports.NO_MIN_SCORE) {\n array.min_score = minScore;\n }\n /**\n * User\n */\n if (this.user instanceof User_1.User) {\n array.user = this.user.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n array.metadata = this.metadata;\n }\n if (this.subqueries instanceof Object &&\n Object.keys(this.subqueries).length) {\n array.subqueries = {};\n for (var i in this.subqueries) {\n var subquery = this.subqueries[i];\n array.subqueries[i] = subquery.toArray();\n }\n }\n if (this.indexUUID instanceof IndexUUID_1.IndexUUID) {\n array.index_uuid = this.indexUUID.toArray();\n }\n /**\n * items promoted\n */\n if (this.itemsPromoted.length > 0) {\n array.items_promoted = [];\n for (var i in this.itemsPromoted) {\n array\n .items_promoted\n .push(this.itemsPromoted[i].toArray());\n }\n }\n if (this.queryOperator !== \"or\" && this.queryOperator !== null) {\n array.query_operator = this.queryOperator;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Query}\n */\n Query.createFromArray = function (array) {\n var query = array.coordinate instanceof Object\n ? Query.createLocated(Coordinate_1.Coordinate.createFromArray(array.coordinate), array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE)\n : Query.create(array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE);\n query.UUID = typeof array.UUID === typeof \"\"\n ? array.UUID\n : undefined;\n /**\n * Fields\n */\n query.fields = array.fields instanceof Array\n ? array.fields\n : [];\n /**\n * Aggregations\n */\n var aggregationsAsArray = typeof array.aggregations === typeof {}\n ? array.aggregations\n : {};\n for (var i in aggregationsAsArray) {\n query.aggregations[i] = Aggregation_1.Aggregation.createFromArray(aggregationsAsArray[i]);\n }\n /**\n * Sort\n */\n var sortAsArray = typeof array.sort === typeof {}\n ? array.sort\n : {};\n if (Object.keys(sortAsArray).length > 0) {\n query.sortByInstance = SortBy_1.SortBy.createFromArray(sortAsArray);\n }\n /**\n * Filters\n */\n var filtersAsArray = typeof array.filters === typeof {}\n ? array.filters\n : {};\n for (var i in filtersAsArray) {\n query.filters[i] = Filter_1.Filter.createFromArray(filtersAsArray[i]);\n }\n /**\n * Universe Filters\n */\n var universeFiltersAsArray = typeof array.universe_filters === typeof {}\n ? array.universe_filters\n : {};\n for (var i in universeFiltersAsArray) {\n query.universeFilters[i] = Filter_1.Filter.createFromArray(universeFiltersAsArray[i]);\n }\n /**\n * Booleans\n */\n query.resultsEnabled = typeof array.results_enabled === \"boolean\"\n ? array.results_enabled\n : true;\n query.numberOfSuggestions = typeof array.number_of_suggestions === \"number\"\n ? array.number_of_suggestions\n : 0;\n query.autocompleteEnabled = typeof array.autocomplete_enabled === \"boolean\"\n ? array.autocomplete_enabled\n : false;\n query.aggregationsEnabled = typeof array.aggregations_enabled === \"boolean\"\n ? array.aggregations_enabled\n : true;\n query.highlightsEnabled = typeof array.highlight_enabled === \"boolean\"\n ? array.highlight_enabled\n : false;\n query.fuzziness = array.fuzziness ? array.fuzziness : null;\n query.minScore = array.min_score ? array.min_score : exports.NO_MIN_SCORE;\n /**\n * Items promoted\n */\n var itemsPromotedAsArray = typeof array.items_promoted === typeof {}\n ? array.items_promoted\n : {};\n for (var i in itemsPromotedAsArray) {\n query\n .itemsPromoted\n .push(ItemUUID_1.ItemUUID.createFromArray(itemsPromotedAsArray[i]));\n }\n /**\n * Subqueries\n */\n var subqueriesAsArray = typeof array.subqueries === typeof {}\n ? array.subqueries\n : {};\n for (var i in subqueriesAsArray) {\n query.subqueries[i] = Query.createFromArray(subqueriesAsArray[i]);\n }\n /**\n * Filter fields\n */\n query.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n query.searchableFields = array.searchable_fields instanceof Array\n ? array.searchable_fields\n : [];\n query.scoreStrategies = array.score_strategies instanceof Object\n ? ScoreStrategies_1.ScoreStrategies.createFromArray(array.score_strategies)\n : undefined;\n query.user = array.user instanceof Object\n ? User_1.User.createFromArray(array.user)\n : undefined;\n query.indexUUID = array.index_uuid instanceof Object\n ? IndexUUID_1.IndexUUID.createFromArray(array.index_uuid)\n : undefined;\n query.queryOperator = typeof array.query_operator === \"string\"\n ? array.query_operator\n : \"or\";\n return query;\n };\n return Query;\n}());\nexports.Query = Query;\n","\"use strict\";\nexports.__esModule = true;\nexports.Range = exports.RANGE_SEPARATOR = exports.RANGE_INFINITE = exports.RANGE_MINUS_INFINITE = void 0;\n/**\n * Aggregation constants\n */\nexports.RANGE_MINUS_INFINITE = null;\nexports.RANGE_INFINITE = null;\nexports.RANGE_SEPARATOR = \"..\";\n/**\n * Filter class\n */\nvar Range = /** @class */ (function () {\n function Range() {\n }\n /**\n * Strong to array\n *\n * @param string\n *\n * @returns {[number, number]}\n */\n Range.stringToArray = function (string) {\n var parts = string.split(exports.RANGE_SEPARATOR);\n var from = parts[0];\n var to = parts[1];\n var finalFrom = exports.RANGE_MINUS_INFINITE;\n var finalTo = exports.RANGE_INFINITE;\n if (from != \"\") {\n finalFrom = parseInt(from);\n }\n if (to != \"\") {\n finalTo = parseInt(to);\n }\n return [finalFrom, finalTo];\n };\n /**\n * Array to string\n *\n * @param values\n *\n * @return {string}\n */\n Range.arrayToString = function (values) {\n var finalValues = [\"\", \"\"];\n if (values[0] != exports.RANGE_MINUS_INFINITE) {\n finalValues[0] = String(values[0]);\n }\n if (values[1] != exports.RANGE_INFINITE) {\n finalValues[1] = String(values[1]);\n }\n return finalValues.join(exports.RANGE_SEPARATOR);\n };\n /**\n * Create ranges\n *\n * @param from\n * @param to\n * @param incremental\n */\n Range.createRanges = function (from, to, incremental) {\n var ranges = [];\n var nextTo;\n while (from < to) {\n nextTo = from + incremental;\n ranges.push(from + exports.RANGE_SEPARATOR + nextTo);\n from = nextTo;\n }\n return ranges;\n };\n return Range;\n}());\nexports.Range = Range;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategies = exports.MIN = exports.MAX = exports.AVG = exports.SUM = exports.MULTIPLY = void 0;\nvar ScoreStrategy_1 = require(\"./ScoreStrategy\");\n/**\n * ScoreStrategies constants\n */\nexports.MULTIPLY = 'multiply';\nexports.SUM = 'sum';\nexports.AVG = 'avg';\nexports.MAX = 'max';\nexports.MIN = 'min';\n/**\n * ScoreStrategies\n */\nvar ScoreStrategies = /** @class */ (function () {\n function ScoreStrategies() {\n this.scoreStrategies = [];\n }\n /**\n * Create empty\n *\n * @param scoreMode\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createEmpty = function (scoreMode) {\n if (scoreMode === void 0) { scoreMode = exports.SUM; }\n var scoreStrategies = new ScoreStrategies;\n scoreStrategies.scoreMode = scoreMode;\n return scoreStrategies;\n };\n /**\n * Add score strategy\n *\n * @param scoreStrategy\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.prototype.addScoreStrategy = function (scoreStrategy) {\n this.scoreStrategies.push(scoreStrategy);\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategy[]}\n */\n ScoreStrategies.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Get score mode\n *\n * @return {string}\n */\n ScoreStrategies.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * To array\n *\n * @return {{\n * score_mode: string,\n * score_strategies: any\n * }}\n */\n ScoreStrategies.prototype.toArray = function () {\n var scoreStrategiesAsArray = [];\n for (var i in this.scoreStrategies) {\n scoreStrategiesAsArray.push(this.scoreStrategies[i].toArray());\n }\n return {\n score_mode: this.scoreMode,\n score_strategies: scoreStrategiesAsArray\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategies = (typeof array.score_mode != \"undefined\")\n ? ScoreStrategies.createEmpty(array.score_mode)\n : ScoreStrategies.createEmpty();\n scoreStrategies.scoreStrategies = [];\n for (var i in array.score_strategies) {\n scoreStrategies\n .scoreStrategies\n .push(ScoreStrategy_1.ScoreStrategy.createFromArray(array.score_strategies[i]));\n }\n return scoreStrategies;\n };\n return ScoreStrategies;\n}());\nexports.ScoreStrategies = ScoreStrategies;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategy = exports.DEFAULT_FACTOR = exports.DEFAULT_MISSING = exports.SCORE_MODE_MIN = exports.SCORE_MODE_MAX = exports.SCORE_MODE_AVG = exports.SCORE_MODE_SUM = exports.SCORE_MODE_NONE = exports.MODIFIER_SQUARE = exports.MODIFIER_LN = exports.MODIFIER_LOG = exports.MODIFIER_SQRT = exports.MODIFIER_NONE = exports.DECAY_GAUSS = exports.DECAY_EXP = exports.DECAY_LINEAR = exports.DECAY = exports.CUSTOM_FUNCTION = exports.BOOSTING_FIELD_VALUE = exports.DEFAULT_WEIGHT = exports.DEFAULT_TYPE = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar Filter_1 = require(\"./Filter\");\n/**\n * ScoreStrategy constants\n */\nexports.DEFAULT_TYPE = 'default';\nexports.DEFAULT_WEIGHT = 1.0;\nexports.BOOSTING_FIELD_VALUE = 'field_value';\nexports.CUSTOM_FUNCTION = 'custom_function';\nexports.DECAY = 'decay';\nexports.DECAY_LINEAR = 'linear';\nexports.DECAY_EXP = 'exp';\nexports.DECAY_GAUSS = 'gauss';\nexports.MODIFIER_NONE = 'none';\nexports.MODIFIER_SQRT = 'sqrt';\nexports.MODIFIER_LOG = 'log';\nexports.MODIFIER_LN = 'ln';\nexports.MODIFIER_SQUARE = 'square';\nexports.SCORE_MODE_NONE = 'none';\nexports.SCORE_MODE_SUM = 'sum';\nexports.SCORE_MODE_AVG = 'avg';\nexports.SCORE_MODE_MAX = 'max';\nexports.SCORE_MODE_MIN = 'min';\nexports.DEFAULT_MISSING = 1.0;\nexports.DEFAULT_FACTOR = 1.0;\n/**\n * ScoreStrategy\n */\nvar ScoreStrategy = /** @class */ (function () {\n function ScoreStrategy() {\n this.type = exports.DEFAULT_TYPE;\n this.filter = null;\n this.weight = exports.DEFAULT_WEIGHT;\n this.scoreMode = exports.SCORE_MODE_AVG;\n this.configuration = {};\n }\n /**\n * Get type\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getType = function () {\n return this.type;\n };\n /**\n * Get configuration value\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getConfigurationValue = function (element) {\n if (typeof this.configuration[element] == \"undefined\") {\n return null;\n }\n return this.configuration[element];\n };\n /**\n * Get weight.\n *\n * @return {number}\n */\n ScoreStrategy.prototype.getWeight = function () {\n return this.weight;\n };\n /**\n * Get score mode.\n *\n * @return {string}\n */\n ScoreStrategy.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * Get filter.\n *\n * @return {Filter}\n */\n ScoreStrategy.prototype.getFilter = function () {\n return this.filter;\n };\n /**\n * Create default\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDefault = function () {\n return new ScoreStrategy();\n };\n /**\n * Create field boosting\n *\n * @param field\n * @param factor\n * @param missing\n * @param modifier\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFieldBoosting = function (field, factor, missing, modifier, weight, filter, scoreMode) {\n if (factor === void 0) { factor = exports.DEFAULT_FACTOR; }\n if (missing === void 0) { missing = exports.DEFAULT_MISSING; }\n if (modifier === void 0) { modifier = exports.MODIFIER_NONE; }\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.BOOSTING_FIELD_VALUE;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['factor'] = factor;\n scoreStrategy.configuration['missing'] = missing;\n scoreStrategy.configuration['modifier'] = modifier;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create custom function\n *\n * @param func\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createCustomFunction = function (func, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.CUSTOM_FUNCTION;\n scoreStrategy.configuration['function'] = func;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create decay function\n *\n * @param type\n * @param field\n * @param origin\n * @param scale\n * @param offset\n * @param decay\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDecayFunction = function (type, field, origin, scale, offset, decay, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.DECAY;\n scoreStrategy.configuration['type'] = type;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['origin'] = origin;\n scoreStrategy.configuration['scale'] = scale;\n scoreStrategy.configuration['offset'] = offset;\n scoreStrategy.configuration['decay'] = decay;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Fix filter path.\n *\n * @param filter\n *\n * @return {Filter}\n */\n ScoreStrategy.fixFilterFieldPath = function (filter) {\n if (filter == null) {\n return filter;\n }\n var filterAsArray = filter.toArray();\n filterAsArray['field'] = Item_1.Item.getPathByField(filterAsArray['field']);\n return Filter_1.Filter.createFromArray(filterAsArray);\n };\n /**\n * To array\n *\n * @return {{\n * type: string,\n * configuration: any,\n * weight: number,\n * score_mode: string,\n * filter: any\n * }}\n */\n ScoreStrategy.prototype.toArray = function () {\n return {\n type: this.type,\n configuration: this.configuration,\n weight: this.weight,\n score_mode: this.scoreMode,\n filter: this.filter instanceof Filter_1.Filter\n ? this.filter.toArray()\n : null\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategy = ScoreStrategy.createDefault();\n if (typeof array.type != \"undefined\") {\n scoreStrategy.type = array.type;\n }\n if (typeof array.configuration != \"undefined\") {\n scoreStrategy.configuration = array.configuration;\n }\n if (typeof array.weight != \"undefined\") {\n scoreStrategy.weight = array.weight;\n }\n if (typeof array.score_mode != \"undefined\") {\n scoreStrategy.scoreMode = array.score_mode;\n }\n if (typeof array.filter === 'object' && array.filter !== null) {\n scoreStrategy.filter = Filter_1.Filter.createFromArray(array.filter);\n }\n return scoreStrategy;\n };\n return ScoreStrategy;\n}());\nexports.ScoreStrategy = ScoreStrategy;\n","\"use strict\";\nexports.__esModule = true;\nexports.SortBy = exports.SORT_BY_LOCATION_MI_ASC = exports.SORT_BY_LOCATION_KM_ASC = exports.SORT_BY_TYPE_DESC = exports.SORT_BY_TYPE_ASC = exports.SORT_BY_ID_DESC = exports.SORT_BY_ID_ASC = exports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM = exports.SORT_BY_SCORE = exports.SORT_BY_MODE_MEDIAN = exports.SORT_BY_MODE_MAX = exports.SORT_BY_MODE_MIN = exports.SORT_BY_MODE_SUM = exports.SORT_BY_MODE_AVG = exports.SORT_BY_DESC = exports.SORT_BY_ASC = exports.SORT_BY_TYPE_RANDOM = exports.SORT_BY_TYPE_FUNCTION = exports.SORT_BY_TYPE_DISTANCE = exports.SORT_BY_TYPE_SCORE = exports.SORT_BY_TYPE_NESTED = exports.SORT_BY_TYPE_FIELD = void 0;\nvar __1 = require(\"..\");\nvar Filter_1 = require(\"./Filter\");\n/**\n export * Sort by constants\n */\nexports.SORT_BY_TYPE_FIELD = 'field';\nexports.SORT_BY_TYPE_NESTED = 'nested';\nexports.SORT_BY_TYPE_SCORE = 'score';\nexports.SORT_BY_TYPE_DISTANCE = 'distance';\nexports.SORT_BY_TYPE_FUNCTION = 'function';\nexports.SORT_BY_TYPE_RANDOM = 'random';\nexports.SORT_BY_ASC = \"asc\";\nexports.SORT_BY_DESC = \"desc\";\nexports.SORT_BY_MODE_AVG = \"avg\";\nexports.SORT_BY_MODE_SUM = \"sum\";\nexports.SORT_BY_MODE_MIN = \"min\";\nexports.SORT_BY_MODE_MAX = \"max\";\nexports.SORT_BY_MODE_MEDIAN = \"median\";\nexports.SORT_BY_SCORE = {\n type: exports.SORT_BY_TYPE_SCORE\n};\nexports.SORT_BY_RANDOM = {\n type: exports.SORT_BY_TYPE_RANDOM\n};\nexports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM;\nexports.SORT_BY_ID_ASC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_ID_DESC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_TYPE_ASC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_TYPE_DESC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_LOCATION_KM_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"km\"\n};\nexports.SORT_BY_LOCATION_MI_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"mi\"\n};\n/**\n * ScoreStrategy\n */\nvar SortBy = /** @class */ (function () {\n function SortBy() {\n this.sortsBy = [];\n }\n /**\n * Create\n *\n * @return {SortBy}\n */\n SortBy.create = function () {\n return new SortBy;\n };\n /**\n * Sort By fields values\n *\n * @param shortSortByElements\n *\n * @return {SortBy}\n */\n SortBy.byFieldsValues = function (shortSortByElements) {\n var sortBy = SortBy.create();\n for (var key in shortSortByElements) {\n sortBy.byFieldValue(key, shortSortByElements[key]);\n }\n return sortBy;\n };\n /**\n * All\n *\n * @return {Array}\n */\n SortBy.prototype.all = function () {\n return this.sortsBy.length > 0\n ? this.sortsBy\n : [exports.SORT_BY_SCORE];\n };\n /**\n * Sort by value\n *\n * @param value\n *\n * @return {SortBy}\n */\n SortBy.prototype.byValue = function (value) {\n if (exports.SORT_BY_SCORE != value &&\n exports.SORT_BY_RANDOM != value) {\n if (typeof value.type == \"undefined\") {\n value.type = exports.SORT_BY_TYPE_FIELD;\n }\n }\n if (exports.SORT_BY_SCORE != value) {\n this.sortsBy.push(value);\n }\n return this;\n };\n /**\n * Sort by field value\n *\n * @param field\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFieldValue = function (field, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FIELD,\n field: __1.Item.getPathByField(field),\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field\n *\n * @param field\n * @param order\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedField = function (field, order, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field and filter\n *\n * @param field\n * @param order\n * @param filter\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedFieldAndFilter = function (field, order, filter, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n var fieldPath = __1.Item.getPathByField(filter.getField());\n var filterAsArray = filter.toArray();\n filterAsArray.field = fieldPath;\n filter = Filter_1.Filter.createFromArray(filterAsArray);\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n filter: filter,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by function\n *\n * @param func\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFunction = function (func, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FUNCTION,\n \"function\": func,\n order: order\n });\n return this;\n };\n /**\n * Is sorted by geo distance\n *\n * @return {boolean}\n */\n SortBy.prototype.isSortedByGeoDistance = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n return true;\n }\n }\n return false;\n };\n /**\n * Set coordinate\n *\n * @param coordinate\n *\n * @return {SortBy}\n */\n SortBy.prototype.setCoordinate = function (coordinate) {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n this.sortsBy[i].coordinate = coordinate;\n }\n }\n return this;\n };\n /**\n * Has random sort\n *\n * @return {boolean}\n */\n SortBy.prototype.hasRandomSort = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_RANDOM) {\n return true;\n }\n }\n return false;\n };\n /**\n * get first sort value as string\n *\n * @return {string}\n */\n SortBy.prototype.getFirstSortAsString = function () {\n if (this.sortsBy[0] === undefined) {\n return 'score';\n }\n var firstSortBy = this.sortsBy[0];\n if (firstSortBy.type === exports.SORT_BY_TYPE_RANDOM) {\n return 'random';\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_DISTANCE) {\n return firstSortBy.type + ':' + firstSortBy.unit;\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_SCORE) {\n return 'score';\n }\n var field = firstSortBy.field;\n var order = firstSortBy.order;\n var fieldParts = field.split('.');\n return fieldParts[1] + ':' + order;\n };\n /**\n * To array\n *\n * @return {[]}\n */\n SortBy.prototype.toArray = function () {\n var copySortBy = this.copy();\n var sortsByAsArray = copySortBy.sortsBy;\n for (var i in sortsByAsArray) {\n if (typeof sortsByAsArray[i].filter === typeof {} &&\n sortsByAsArray[i].filter != null) {\n sortsByAsArray[i].filter = sortsByAsArray[i].filter.toArray();\n }\n if (sortsByAsArray[i].coordinate !== null &&\n sortsByAsArray[i].coordinate instanceof __1.Coordinate) {\n sortsByAsArray[i].coordinate = sortsByAsArray[i].coordinate.toArray();\n }\n }\n return sortsByAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {SortBy}\n */\n SortBy.createFromArray = function (array) {\n var innerArray = JSON.parse(JSON.stringify(array));\n var sortBy = SortBy.create();\n for (var i in innerArray) {\n var element = innerArray[i];\n if (typeof element.type == \"undefined\") {\n element.type = exports.SORT_BY_TYPE_FIELD;\n }\n if (typeof element.filter === typeof {} &&\n element.filter != null) {\n element.filter = Filter_1.Filter.createFromArray(element.filter);\n }\n if (element.coordinate != null &&\n typeof element.coordinate === typeof {}) {\n element.coordinate = __1.Coordinate.createFromArray(element.coordinate);\n }\n sortBy.sortsBy.push(element);\n }\n return sortBy;\n };\n /**\n * Make a copy of this\n *\n * @returns {SortBy}\n */\n SortBy.prototype.copy = function () {\n var newSortBy = SortBy.create();\n for (var i in this.sortsBy) {\n var sortBy = this.sortsBy[i];\n if (typeof sortBy !== \"function\") {\n var sortByAsArray = JSON.parse(JSON.stringify(sortBy));\n if (typeof sortBy.filter === typeof {} &&\n sortBy.filter != null) {\n sortByAsArray.filter = Filter_1.Filter.createFromArray(sortBy.filter.toArray());\n }\n if (sortBy.coordinate != null &&\n typeof sortBy.coordinate == typeof {}) {\n sortByAsArray.coordinate = __1.Coordinate.createFromArray(sortBy.coordinate.toArray());\n }\n newSortBy.sortsBy.push(sortByAsArray);\n }\n }\n return newSortBy;\n };\n return SortBy;\n}());\nexports.SortBy = SortBy;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpRepository = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ConnectionError_1 = require(\"../Error/ConnectionError\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar InvalidTokenError_1 = require(\"../Error/InvalidTokenError\");\nvar ResourceExistsError_1 = require(\"../Error/ResourceExistsError\");\nvar ResourceNotAvailableError_1 = require(\"../Error/ResourceNotAvailableError\");\nvar UnknownError_1 = require(\"../Error/UnknownError\");\nvar Response_1 = require(\"../Http/Response\");\nvar Index_1 = require(\"../Model/Index\");\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Result_1 = require(\"../Result/Result\");\nvar Repository_1 = require(\"./Repository\");\n/**\n * Aggregation class\n */\nvar HttpRepository = /** @class */ (function (_super) {\n tslib_1.__extends(HttpRepository, _super);\n /**\n * Constructor\n *\n * @param httpClient\n * @param appId\n * @param indexId\n * @param token\n * @param transformer\n */\n function HttpRepository(httpClient, appId, indexId, token, transformer) {\n var _this = _super.call(this, appId, indexId, token) || this;\n _this.httpClient = httpClient;\n _this.transformer = transformer;\n return _this;\n }\n /**\n * Get transformer\n *\n * @return {Transformer}\n */\n HttpRepository.prototype.getTransformer = function () {\n return this.transformer;\n };\n /**\n * Generate item document by a simple object.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.addObject = function (object) {\n var item = this\n .transformer\n .toItem(object);\n if (item instanceof Item_1.Item) {\n this.addItem(item);\n }\n };\n /**\n * Delete item document by uuid.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.deleteObject = function (object) {\n var itemUUID = this\n .transformer\n .toItemUUID(object);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n this.deleteItem(itemUUID);\n }\n };\n /**\n * Flush update items\n *\n * @param {Item[]} itemsToUpdate\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushUpdateItems = function (itemsToUpdate) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToUpdate.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"put\", this.getCredentials(), {}, itemsToUpdate.map(function (item) {\n return item.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_1 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_1);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Flush delete items\n *\n * @param {ItemUUID[]} itemsToDelete\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushDeleteItems = function (itemsToDelete) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_2;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToDelete.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"delete\", this.getCredentials(), {}, itemsToDelete.map(function (itemUUID) {\n return itemUUID.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_2 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_2);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Query\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.query = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_3, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId, \"get\", this.getCredentials(), {\n query: JSON.stringify(query.toArray())\n .replace(/&/g, \"%26\")\n }, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_3 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_3);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get similar items\n *\n * @param {Query} query\n * @param {ItemUUID[]} itemUUIDs\n * @param {number} similarity\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getSimilarItems = function (query, itemUUIDs, similarity) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_4, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/similar-items', \"get\", this.getCredentials(), {}, {\n query: query.toArray(),\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n }),\n similarity: similarity\n })];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_4 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_4);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get recommended items\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getRecommendedItems = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_5, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/recommended-items', \"get\", this.getCredentials(), {}, query.toArray())];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_5 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_5);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Update items\n *\n * @param {Query} query\n * @param {Changes} changes\n *\n * @return {Promise}\n */\n HttpRepository.prototype.updateItems = function (query, changes) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_6;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items/update-by-query\", \"put\", this.getCredentials(), {}, {\n changes: changes.toArray(),\n query: query.toArray()\n })];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_6 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_6);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Create index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.createIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_7;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_7 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_7);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Delete index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.deleteIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_8;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"delete\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_8 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_8);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Reset index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.resetIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_9;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/reset\", \"put\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_9 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_9);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.checkIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_10;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"head\", this.getCredentials(), {}, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_10 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_10);\n case 3: return [2 /*return*/, response.getCode() === 200];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getIndices = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_11, result, _i, _a, indexAsArray;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\", \"get\", this.getCredentials(), {}, {})];\n case 1:\n response = _b.sent();\n return [3 /*break*/, 3];\n case 2:\n response_11 = _b.sent();\n throw HttpRepository.createErrorFromResponse(response_11);\n case 3:\n result = [];\n for (_i = 0, _a = response.getBody(); _i < _a.length; _i++) {\n indexAsArray = _a[_i];\n result.push(Index_1.Index.createFromArray(indexAsArray));\n }\n return [2 /*return*/, result];\n }\n });\n });\n };\n /**\n * Configure index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.configureIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_12;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/configure\", \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_12 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_12);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param indexUUID\n * @param itemUUID\n * @param userId\n * @param queryString\n * @param interaction\n * @param site\n * @param device\n * @param position\n */\n HttpRepository.prototype.pushInteraction = function (indexUUID, itemUUID, userId, queryString, interaction, site, device, position) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n if (position === void 0) { position = 0; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_13;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n query_string: queryString,\n site: site,\n device: device,\n user_id: userId,\n position: position\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/items/\" + itemUUID.composedUUID() + \"/interaction/\" + interaction, \"post\", {\n token: this.token\n }, parameters, {})];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_13 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_13);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param {IndexUUID} indexUUID\n * @param {string} userId\n * @param {ItemUUID[]} itemUUIDs\n * @param {string} site\n * @param {string} device\n *\n * @return {Promise}\n */\n HttpRepository.prototype.purchase = function (indexUUID, userId, itemUUIDs, site, device) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_14;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n site: site,\n device: device,\n user_id: userId\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/purchase\", \"post\", {\n token: this.token\n }, parameters, {\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n })\n })];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_14 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_14);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n *\n */\n HttpRepository.prototype.getHttpClient = function () {\n return this.httpClient;\n };\n /**\n * Get query values\n *\n * @returns any\n */\n HttpRepository.prototype.getCredentials = function () {\n return {\n app_id: this.appId,\n token: this.token\n };\n };\n /**\n * Apply transformers to results\n *\n * @param {Result} result\n *\n * @return {Result}\n */\n HttpRepository.prototype.applyTransformersToResult = function (result) {\n if (!this.transformer.hasReadTransformers()) {\n return result;\n }\n var subresults = result.getSubresults();\n if (Object.keys(subresults).length > 0) {\n Object.keys(subresults).map(function (key) {\n subresults[key] = this.applyTransformersToResult(subresults[key]);\n }.bind(this));\n return Result_1.Result.createMultiresults(subresults);\n }\n return Result_1.Result.create(result.getQueryUUID(), result.getTotalItems(), result.getTotalHits(), result.getAggregations(), result.getSuggestions(), this\n .transformer\n .fromItems(result.getItems()), result.getAutocomplete());\n };\n /**\n * @param response\n * @private\n */\n HttpRepository.createErrorFromResponse = function (response) {\n var error;\n if (response instanceof Response_1.Response) {\n switch (response.getCode()) {\n case ResourceNotAvailableError_1.ResourceNotAvailableError.getTransportableHTTPError():\n error = new ResourceNotAvailableError_1.ResourceNotAvailableError(response.getBody().message);\n break;\n case InvalidTokenError_1.InvalidTokenError.getTransportableHTTPError():\n error = new InvalidTokenError_1.InvalidTokenError(response.getBody().message);\n break;\n case InvalidFormatError_1.InvalidFormatError.getTransportableHTTPError():\n error = new InvalidFormatError_1.InvalidFormatError(response.getBody().message);\n break;\n case ResourceExistsError_1.ResourceExistsError.getTransportableHTTPError():\n error = new ResourceExistsError_1.ResourceExistsError(response.getBody().message);\n break;\n case ConnectionError_1.ConnectionError.getTransportableHTTPError():\n error = new ConnectionError_1.ConnectionError(response.getBody().message);\n break;\n }\n }\n return undefined === error\n ? UnknownError_1.UnknownError.createUnknownError()\n : error;\n };\n return HttpRepository;\n}(Repository_1.Repository));\nexports.HttpRepository = HttpRepository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Repository = void 0;\nvar tslib_1 = require(\"tslib\");\n/**\n * Aggregation class\n */\nvar Repository = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param appId\n * @param indexId\n * @param token\n */\n function Repository(appId, indexId, token) {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n this.appId = appId;\n this.indexId = indexId;\n this.token = token;\n }\n /**\n * Reset cached elements\n */\n Repository.prototype.resetCachedElements = function () {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n };\n /**\n * Add element\n *\n * @param item\n */\n Repository.prototype.addItem = function (item) {\n this.itemsToUpdate.push(item);\n };\n /**\n * Add elements\n *\n * @param items\n */\n Repository.prototype.addItems = function (items) {\n for (var i in items) {\n this.addItem(items[i]);\n }\n };\n /**\n * Delete item\n *\n * @param itemUUID\n */\n Repository.prototype.deleteItem = function (itemUUID) {\n this.itemsToDelete.push(itemUUID);\n };\n /**\n * Delete items\n *\n * @param itemsUUID\n */\n Repository.prototype.deleteItems = function (itemsUUID) {\n for (var i in itemsUUID) {\n this.deleteItem(itemsUUID[i]);\n }\n };\n /**\n * flush\n *\n * @param bulkNumber\n * @param skipIfLess\n *\n * @return {Promise}\n */\n Repository.prototype.flush = function (bulkNumber, skipIfLess) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var promise, resetCachedElements;\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n if (!bulkNumber) {\n bulkNumber = 500;\n }\n if (!skipIfLess) {\n skipIfLess = false;\n }\n if (skipIfLess &&\n this.itemsToUpdate.length < bulkNumber) {\n return [2 /*return*/];\n }\n promise = Promise.all(Repository\n .chunkArray(this.itemsToUpdate, bulkNumber)\n .map(function (arrayOfItems) {\n return _this.flushUpdateItems(arrayOfItems);\n })\n .concat(Repository\n .chunkArray(this.itemsToDelete, bulkNumber)\n .map(function (arrayOfItemsUUID) {\n return _this.flushDeleteItems(arrayOfItemsUUID);\n })));\n resetCachedElements = function () {\n _this.resetCachedElements();\n };\n promise.then(resetCachedElements, resetCachedElements);\n return [2 /*return*/, promise];\n });\n });\n };\n /**\n * Make chunks of n elements\n *\n * @param array\n * @param chunk\n *\n * @return any[]\n */\n Repository.chunkArray = function (array, chunk) {\n var arrayChunked = [];\n for (var i = 0, j = array.length; i < j; i += chunk) {\n arrayChunked.push(array.slice(i, i + chunk));\n }\n return arrayChunked;\n };\n return Repository;\n}());\nexports.Repository = Repository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Counter = void 0;\nvar Metadata_1 = require(\"../Model/Metadata\");\n/**\n * Aggregation class\n */\nvar Counter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param values\n * @param used\n * @param n\n */\n function Counter(values, used, n) {\n this.values = values;\n this.used = used;\n this.n = n;\n }\n /**\n * Get id\n *\n * @return {string|null}\n */\n Counter.prototype.getId = function () {\n return typeof this.values.id == \"string\"\n ? this.values.id\n : null;\n };\n /**\n * Get name\n *\n * @return {string|null}\n */\n Counter.prototype.getName = function () {\n return typeof this.values.name == \"string\"\n ? this.values.name\n : null;\n };\n /**\n * Get slug\n *\n * @return {string|null}\n */\n Counter.prototype.getSlug = function () {\n return typeof this.values.slug == \"string\"\n ? this.values.slug\n : null;\n };\n /**\n * Get level\n *\n * @return {number}\n */\n Counter.prototype.getLevel = function () {\n return typeof this.values.level == \"number\"\n ? this.values.level\n : 0;\n };\n /**\n * Get values\n *\n * @returns {{}}\n */\n Counter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Is used\n *\n * @returns {boolean}\n */\n Counter.prototype.isUsed = function () {\n return this.used;\n };\n /**\n * Get N\n *\n * @returns {number}\n */\n Counter.prototype.getN = function () {\n return this.n;\n };\n /**\n * Create by active elements\n *\n * @param name\n * @param n\n * @param activeElements\n */\n Counter.createByActiveElements = function (name, n, activeElements) {\n var values = Metadata_1.Metadata.fromMetadata(name);\n if (values == null) {\n return null;\n }\n var i = activeElements.length;\n var inActiveElements = false;\n while (i--) {\n if (activeElements[i] == values.id) {\n inActiveElements = true;\n }\n }\n return new Counter(values, inActiveElements, n);\n };\n /**\n * To array\n *\n * @return {{}}\n */\n Counter.prototype.toArray = function () {\n var values = {\n values: this.values,\n n: this.n\n };\n if (this.used === true) {\n values.used = true;\n }\n return values;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Counter}\n */\n Counter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new Counter(array.values, (typeof array.used == \"boolean\")\n ? array.used\n : false, array.n);\n };\n return Counter;\n}());\nexports.Counter = Counter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Result = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ResultAggregations_1 = require(\"./ResultAggregations\");\n/**\n * Result class\n */\nvar Result = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n */\n function Result(queryUUID, totalItems, totalHits) {\n this.items = [];\n this.autocomplete = null;\n this.suggestions = [];\n this.subresults = {};\n this.metadata = {};\n this.queryUUID = queryUUID;\n this.totalItems = totalItems;\n this.totalHits = totalHits;\n }\n /**\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n * @param aggregations\n * @param suggestions\n * @param items\n * @param autocomplete\n * @param metadata\n */\n Result.create = function (queryUUID, totalItems, totalHits, aggregations, suggestions, items, autocomplete, metadata) {\n if (autocomplete === void 0) { autocomplete = null; }\n if (metadata === void 0) { metadata = {}; }\n var result = new Result(queryUUID, totalItems, totalHits);\n result.aggregations = aggregations;\n result.suggestions = suggestions;\n result.items = items;\n result.autocomplete = autocomplete;\n result.metadata = metadata;\n return result;\n };\n /**\n * Create multi results\n *\n * @param subresults\n *\n * @returns {Result}\n */\n Result.createMultiresults = function (subresults) {\n var result = new Result('', 0, 0);\n result.subresults = subresults;\n return result;\n };\n /**\n * Add item\n *\n * @param item\n */\n Result.prototype.addItem = function (item) {\n this.items.push(item);\n };\n /**\n * Get items\n *\n * @return {Item[]}\n */\n Result.prototype.getItems = function () {\n return this.items;\n };\n /**\n * Get items grouped by types\n *\n * @return {any[]}\n */\n Result.prototype.getItemsGroupedByTypes = function () {\n if (this.itemsGroupedByTypeCache instanceof Object &&\n Object.keys(this.itemsGroupedByTypeCache).length > 0) {\n return this.itemsGroupedByTypeCache;\n }\n var itemsGroupedByTypes = {};\n for (var i in this.items) {\n var item = this.items[i];\n if (!(itemsGroupedByTypes[item.getType()] instanceof Array)) {\n itemsGroupedByTypes[item.getType()] = [];\n }\n itemsGroupedByTypes[item.getType()].push(item);\n }\n this.itemsGroupedByTypeCache = itemsGroupedByTypes;\n return itemsGroupedByTypes;\n };\n /**\n * Get items by type\n *\n * @param type\n *\n * @return {Array}\n */\n Result.prototype.getItemsByType = function (type) {\n var itemsGroupedByTypes = this.getItemsGroupedByTypes();\n return itemsGroupedByTypes[type] == null\n ? []\n : itemsGroupedByTypes[type];\n };\n /**\n * Get items by types\n *\n * @param types\n */\n Result.prototype.getItemsByTypes = function (types) {\n return this.items.filter(function (item) { return types.indexOf(item.getType()) >= 0; });\n };\n /**\n * Get first item\n *\n * @return {Item}\n */\n Result.prototype.getFirstItem = function () {\n return this.items.length > 0\n ? this.items[0]\n : null;\n };\n /**\n * Set aggregations\n *\n * @param aggregations\n */\n Result.prototype.setAggregations = function (aggregations) {\n this.aggregations = aggregations;\n };\n /**\n * Get aggregations\n *\n * @return {ResultAggregations}\n */\n Result.prototype.getAggregations = function () {\n return this.aggregations instanceof ResultAggregations_1.ResultAggregations\n ? this.aggregations\n : null;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @return {null}\n */\n Result.prototype.getAggregation = function (name) {\n return this.aggregations == null\n ? null\n : this.aggregations.getAggregation(name);\n };\n /**\n * Has no empty aggregation\n *\n * @param name\n *\n * @return {boolean}\n */\n Result.prototype.hasNotEmptyAggregation = function (name) {\n return this.aggregations == null\n ? false\n : this.aggregations.hasNotEmptyAggregation(name);\n };\n /**\n * Get suggestions\n *\n * @return {string[]}\n */\n Result.prototype.getSuggestions = function () {\n return this.suggestions;\n };\n /**\n * Get autocomplete\n *\n * @return {string|null}\n */\n Result.prototype.getAutocomplete = function () {\n return this.autocomplete;\n };\n /**\n * Get query uuid\n *\n * @return {string}\n */\n Result.prototype.getQueryUUID = function () {\n return this.queryUUID;\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n Result.prototype.getTotalItems = function () {\n return this.totalItems;\n };\n /**\n * Get total hits\n *\n * @return {number}\n */\n Result.prototype.getTotalHits = function () {\n return this.totalHits;\n };\n /**\n * Get subresults\n *\n * @return Object\n */\n Result.prototype.getSubresults = function () {\n return this.subresults;\n };\n /**\n * @return any\n */\n Result.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * @param name\n */\n Result.prototype.getMetadataValue = function (name) {\n var _a;\n return (_a = this.metadata[name]) !== null && _a !== void 0 ? _a : null;\n };\n /**\n * to array\n *\n * @return {{query: any, total_items: number, total_hits: number, items:any[], aggregations: any, suggestions: string[]}}\n */\n Result.prototype.toArray = function () {\n var array = {\n query_uuid: this.queryUUID,\n total_items: this.totalItems,\n total_hits: this.totalHits,\n items: this.items.map(function (item) { return item.toArray(); }),\n aggregations: this.aggregations == null\n ? null\n : this.aggregations.toArray(),\n suggests: this.suggestions,\n autocomplete: this.autocomplete === null\n ? undefined\n : this.autocomplete,\n metadata: this.metadata\n };\n if (this.subresults instanceof Object &&\n Object.keys(this.subresults).length) {\n array.subresults = {};\n for (var i in this.subresults) {\n var subresult = this.subresults[i];\n array.subresults[i] = subresult.toArray();\n }\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Result}\n */\n Result.createFromArray = function (array) {\n var result = Result.create(array.query_uuid\n ? array.query_uuid\n : '', array.total_items\n ? array.total_items\n : 0, array.total_hits\n ? array.total_hits\n : 0, array.aggregations instanceof Object\n ? ResultAggregations_1.ResultAggregations.createFromArray(array.aggregations)\n : null, array.suggests\n ? array.suggests\n : [], array.items instanceof Array\n ? array.items.map(function (itemAsArray) { return Item_1.Item.createFromArray(itemAsArray); })\n : [], array.autocomplete === undefined\n ? null\n : array.autocomplete, array.metadata === undefined\n ? {}\n : array.metadata);\n /**\n * Subqueries\n */\n var subresultsAsArray = typeof array.subresults === typeof {}\n ? array.subresults\n : {};\n for (var i in subresultsAsArray) {\n result.subresults[i] = Result.createFromArray(subresultsAsArray[i]);\n }\n return result;\n };\n return Result;\n}());\nexports.Result = Result;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregation = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Filter_1 = require(\"../Query/Filter\");\nvar Counter_1 = require(\"./Counter\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregation = /** @class */ (function () {\n /**\n * @param name\n * @param applicationType\n * @param totalElements\n * @param activeElements\n * @param metadata\n */\n function ResultAggregation(name, applicationType, totalElements, activeElements, metadata) {\n if (metadata === void 0) { metadata = {}; }\n this.counters = {};\n this.highestActiveElement = 0;\n this.name = name;\n this.applicationType = applicationType;\n this.totalElements = totalElements;\n this.activeElements = {};\n this.metadata = metadata;\n for (var i in activeElements) {\n var activeElement = activeElements[i];\n this.activeElements[activeElement] = activeElement;\n }\n }\n /**\n * Add counter\n *\n * @param name\n * @param counter\n */\n ResultAggregation.prototype.addCounter = function (name, counter) {\n if (counter == 0) {\n return;\n }\n var counterInstance = Counter_1.Counter.createByActiveElements(name, counter, Object.keys(this.activeElements));\n if (!(counterInstance instanceof Counter_1.Counter)) {\n return;\n }\n if ((this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) &&\n (this.applicationType & ~Filter_1.FILTER_MUST_ALL) &&\n counterInstance.isUsed()) {\n this.activeElements[counterInstance.getId()] = counterInstance;\n this.highestActiveElement = Math.max(counterInstance.getLevel(), this.highestActiveElement);\n return;\n }\n this.counters[counterInstance.getId()] = counterInstance;\n };\n /**\n * Get name\n *\n * @return {string}\n */\n ResultAggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get counter\n *\n * @return {any}\n */\n ResultAggregation.prototype.getCounters = function () {\n return this.counters;\n };\n /**\n *\n */\n ResultAggregation.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Return if the aggregation belongs to a filter.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.isFilter = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL) > 0;\n };\n /**\n * Aggregation has levels.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.hasLevels = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) > 0;\n };\n /**\n * Get counter by name\n *\n * @param name\n *\n * @return {null}\n */\n ResultAggregation.prototype.getCounter = function (name) {\n return this.counters[name] instanceof Counter_1.Counter\n ? this.counters[name]\n : null;\n };\n /**\n * Get all elements\n *\n * @return {{}}\n */\n ResultAggregation.prototype.getAllElements = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.activeElements), this.counters);\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregation.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * Get active elements\n *\n * @return {any}\n */\n ResultAggregation.prototype.getActiveElements = function () {\n if (Object.keys(this.activeElements).length === 0) {\n return {};\n }\n if (this.applicationType === Filter_1.FILTER_MUST_ALL_WITH_LEVELS) {\n var value = null;\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n if (!(activeElement instanceof Counter_1.Counter)) {\n continue;\n }\n if (value == null) {\n value = activeElement;\n }\n value = value.getLevel() > activeElement.getLevel()\n ? value\n : activeElement;\n }\n return value instanceof Counter_1.Counter\n ? { 0: value }\n : null;\n }\n return this.activeElements;\n };\n /**\n * Clean results by level and remove all levels higher than the lowest.\n */\n ResultAggregation.prototype.cleanCountersByLevel = function () {\n for (var i in this.counters) {\n var counter = this.counters[i];\n if (counter.getLevel() !== this.highestActiveElement + 1) {\n delete this.counters[i];\n }\n }\n };\n /**\n * Is empty\n *\n * @returns {boolean}\n */\n ResultAggregation.prototype.isEmpty = function () {\n return Object.keys(this.activeElements).length == 0 &&\n Object.keys(this.counters).length == 0;\n };\n /**\n * To array\n *\n * @return {any}\n */\n ResultAggregation.prototype.toArray = function () {\n var array = {\n name: this.name,\n counters: [],\n active_elements: [],\n metadata: this.metadata\n };\n for (var i in this.counters) {\n array.counters.push(this.counters[i].toArray());\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n array.application_type = this.applicationType;\n }\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n array.active_elements.push(activeElement instanceof Counter_1.Counter\n ? activeElement.toArray()\n : activeElement);\n }\n if (this.highestActiveElement > 0) {\n array.highest_active_level = this.highestActiveElement;\n }\n if (array.counters.length === 0) {\n delete array.counters;\n }\n if (array.active_elements.length === 0) {\n delete array.active_elements;\n }\n if (Object.keys(array.metadata).length === 0) {\n delete array.metadata;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n */\n ResultAggregation.createFromArray = function (array) {\n var activeElements = [];\n var activeElementsAsArray = array.active_elements;\n activeElementsAsArray = typeof activeElementsAsArray === typeof []\n ? activeElementsAsArray\n : [];\n for (var i in activeElementsAsArray) {\n var activeElementAsArray = activeElementsAsArray[i];\n activeElements.push(typeof activeElementAsArray === typeof {}\n ? Counter_1.Counter.createFromArray(activeElementAsArray)\n : activeElementAsArray);\n }\n var aggregation = new ResultAggregation(array.name, parseInt(array.application_type ? array.application_type : Filter_1.FILTER_AT_LEAST_ONE), parseInt(array.total_elements ? array.total_elements : 0), []);\n aggregation.activeElements = activeElements;\n var countersAsArray = typeof array.counters === typeof []\n ? array.counters\n : [];\n for (var i in countersAsArray) {\n var counterAsArray = countersAsArray[i];\n if (typeof counterAsArray !== \"function\") {\n var counter = Counter_1.Counter.createFromArray(counterAsArray);\n aggregation.counters['_' + counter.getId()] = counter;\n }\n }\n aggregation.highestActiveElement = typeof array.highest_active_level === \"number\"\n ? array.highest_active_level\n : 0;\n aggregation.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n return aggregation;\n };\n return ResultAggregation;\n}());\nexports.ResultAggregation = ResultAggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregations = void 0;\nvar ResultAggregation_1 = require(\"./ResultAggregation\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregations = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param totalElements\n */\n function ResultAggregations(totalElements) {\n this.aggregations = {};\n this.totalElements = totalElements;\n }\n /**\n * Add aggregation\n *\n * @param name\n * @param aggregation\n */\n ResultAggregations.prototype.addAggregation = function (name, aggregation) {\n this.aggregations[name] = aggregation;\n };\n /**\n * Get aggregations\n *\n * @returns {{}}\n */\n ResultAggregations.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @returns {Aggregation|null}\n */\n ResultAggregations.prototype.getAggregation = function (name) {\n return this.aggregations[name] instanceof ResultAggregation_1.ResultAggregation\n ? this.aggregations[name]\n : null;\n };\n /**\n * Has not empty aggregation\n *\n * @param name\n *\n * @returns {boolean}\n */\n ResultAggregations.prototype.hasNotEmptyAggregation = function (name) {\n var aggregation = this.getAggregation(name);\n return (aggregation instanceof ResultAggregation_1.ResultAggregation) &&\n (!aggregation.isEmpty());\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregations.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * To array\n *\n * @return {{total_elements?: number, aggregations?: {}}}\n */\n ResultAggregations.prototype.toArray = function () {\n var aggregationCollection = {};\n for (var i in this.aggregations) {\n aggregationCollection[i] = this.aggregations[i].toArray();\n }\n var array = {};\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n if (Object.keys(aggregationCollection).length > 0) {\n array.aggregations = aggregationCollection;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ResultAggregations}\n */\n ResultAggregations.createFromArray = function (array) {\n var aggregations = new ResultAggregations(typeof array.total_elements === \"number\"\n ? array.total_elements\n : 0);\n if (typeof array.aggregations === typeof {}) {\n for (var i in array.aggregations) {\n aggregations.addAggregation(i, ResultAggregation_1.ResultAggregation.createFromArray(array.aggregations[i]));\n }\n }\n return aggregations;\n };\n return ResultAggregations;\n}());\nexports.ResultAggregations = ResultAggregations;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nexports.Transformer = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\n/**\n * Transformer\n */\nvar Transformer = /** @class */ (function () {\n function Transformer() {\n this.readTransformers = [];\n this.writeTransformers = [];\n }\n /**\n * Add read transformer\n *\n * @param readTransformer\n */\n Transformer.prototype.addReadTransformer = function (readTransformer) {\n this\n .readTransformers\n .push(readTransformer);\n };\n /**\n * @return {boolean}\n */\n Transformer.prototype.hasReadTransformers = function () {\n return this.readTransformers.length > 0;\n };\n /**\n * Add write transformer\n *\n * @param writeTransformer\n */\n Transformer.prototype.addWriteTransformer = function (writeTransformer) {\n this\n .writeTransformers\n .push(writeTransformer);\n };\n /**\n * Items to objects\n *\n * @param items\n *\n * @returns {any[]}\n */\n Transformer.prototype.fromItems = function (items) {\n var objects = [];\n for (var i in items) {\n objects.push(this.fromItem(items[i]));\n }\n return objects;\n };\n /**\n * Item to object\n *\n * @param item\n *\n * @returns {any}\n */\n Transformer.prototype.fromItem = function (item) {\n for (var i in this.readTransformers) {\n var transformer = this.readTransformers[i];\n if (transformer.isValidItem(item)) {\n return transformer.fromItem(item);\n }\n }\n return item;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {Item[]}\n */\n Transformer.prototype.toItems = function (objects) {\n var items = [];\n for (var i in objects) {\n var item = this.toItem(objects[i]);\n if (item instanceof Item_1.Item) {\n items.push(item);\n }\n }\n return items;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItem = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItem(object);\n }\n }\n return object;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {ItemUUID[]}\n */\n Transformer.prototype.toItemUUIDs = function (objects) {\n var itemUUIDs = [];\n for (var i in objects) {\n var itemUUID = this.toItemUUID(objects[i]);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n itemUUIDs.push(itemUUID);\n }\n }\n return itemUUIDs;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItemUUID = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItemUUID(object);\n }\n }\n return object;\n };\n return Transformer;\n}());\nexports.Transformer = Transformer;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar Apisearch_1 = require(\"./Apisearch\");\nexports[\"default\"] = Apisearch_1[\"default\"];\ntslib_1.__exportStar(require(\"./Config/Config\"), exports);\ntslib_1.__exportStar(require(\"./Config/Synonym\"), exports);\ntslib_1.__exportStar(require(\"./Error/ConnectionError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ErrorWithMessage\"), exports);\ntslib_1.__exportStar(require(\"./Error/EventError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ForbiddenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidFormatError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidTokenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceExistsError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceNotAvailableError\"), exports);\ntslib_1.__exportStar(require(\"./Error/UnsupportedContentTypeError\"), exports);\ntslib_1.__exportStar(require(\"./Geo/LocationRange\"), exports);\ntslib_1.__exportStar(require(\"./Http/AxiosClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Client\"), exports);\ntslib_1.__exportStar(require(\"./Http/HttpClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Response\"), exports);\ntslib_1.__exportStar(require(\"./Http/CacheClient\"), exports);\ntslib_1.__exportStar(require(\"./Model/Changes\"), exports);\ntslib_1.__exportStar(require(\"./Model/Coordinate\"), exports);\ntslib_1.__exportStar(require(\"./Model/Item\"), exports);\ntslib_1.__exportStar(require(\"./Model/ItemUUID\"), exports);\ntslib_1.__exportStar(require(\"./Model/Metadata\"), exports);\ntslib_1.__exportStar(require(\"./Model/User\"), exports);\ntslib_1.__exportStar(require(\"./Query/Aggregation\"), exports);\ntslib_1.__exportStar(require(\"./Query/Filter\"), exports);\ntslib_1.__exportStar(require(\"./Query/Query\"), exports);\ntslib_1.__exportStar(require(\"./Query/Range\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategies\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategy\"), exports);\ntslib_1.__exportStar(require(\"./Query/SortBy\"), exports);\ntslib_1.__exportStar(require(\"./Repository/HttpRepository\"), exports);\ntslib_1.__exportStar(require(\"./Repository/Repository\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregation\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregations\"), exports);\ntslib_1.__exportStar(require(\"./Result/Counter\"), exports);\ntslib_1.__exportStar(require(\"./Result/Result\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/ReadTransformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/Transformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/WriteTransformer\"), exports);\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Mustache = factory());\n}(this, (function () { 'use strict';\n\n /*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n var objectToString = Object.prototype.toString;\n var isArray = Array.isArray || function isArrayPolyfill (object) {\n return objectToString.call(object) === '[object Array]';\n };\n\n function isFunction (object) {\n return typeof object === 'function';\n }\n\n /**\n * More correct typeof string handling array\n * which normally returns typeof 'object'\n */\n function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }\n\n function escapeRegExp (string) {\n return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n /**\n * Null safe way of checking whether or not an object,\n * including its prototype, has a given property\n */\n function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }\n\n /**\n * Safe way of detecting whether or not the given thing is a primitive and\n * whether it has the given property\n */\n function primitiveHasOwnProperty (primitive, propName) {\n return (\n primitive != null\n && typeof primitive !== 'object'\n && primitive.hasOwnProperty\n && primitive.hasOwnProperty(propName)\n );\n }\n\n // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n // See https://github.com/janl/mustache.js/issues/189\n var regExpTest = RegExp.prototype.test;\n function testRegExp (re, string) {\n return regExpTest.call(re, string);\n }\n\n var nonSpaceRe = /\\S/;\n function isWhitespace (string) {\n return !testRegExp(nonSpaceRe, string);\n }\n\n var entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/',\n '`': '`',\n '=': '='\n };\n\n function escapeHtml (string) {\n return String(string).replace(/[&<>\"'`=\\/]/g, function fromEntityMap (s) {\n return entityMap[s];\n });\n }\n\n var whiteRe = /\\s*/;\n var spaceRe = /\\s+/;\n var equalsRe = /\\s*=/;\n var curlyRe = /\\s*\\}/;\n var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n /**\n * Breaks up the given `template` string into a tree of tokens. If the `tags`\n * argument is given here it must be an array with two string values: the\n * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n * course, the default is to use mustaches (i.e. mustache.tags).\n *\n * A token is an array with at least 4 elements. The first element is the\n * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n * all text that appears outside a symbol this element is \"text\".\n *\n * The second element of a token is its \"value\". For mustache tags this is\n * whatever else was inside the tag besides the opening symbol. For text tokens\n * this is the text itself.\n *\n * The third and fourth elements of the token are the start and end indices,\n * respectively, of the token in the original template.\n *\n * Tokens that are the root node of a subtree contain two more elements: 1) an\n * array of tokens in the subtree and 2) the index in the original template at\n * which the closing tag for that section begins.\n *\n * Tokens for partials also contain two more elements: 1) a string value of\n * indendation prior to that tag and 2) the index of that tag on that line -\n * eg a value of 2 indicates the partial is the third tag on this line.\n */\n function parseTemplate (template, tags) {\n if (!template)\n return [];\n var lineHasNonSpace = false;\n var sections = []; // Stack to hold section tokens\n var tokens = []; // Buffer to hold the tokens\n var spaces = []; // Indices of whitespace tokens on the current line\n var hasTag = false; // Is there a {{tag}} on the current line?\n var nonSpace = false; // Is there a non-space char on the current line?\n var indentation = ''; // Tracks indentation for tags that use it\n var tagIndex = 0; // Stores a count of number of tags encountered on a line\n\n // Strips all whitespace tokens array for the current line\n // if there was a {{#tag}} on it and otherwise only space.\n function stripSpace () {\n if (hasTag && !nonSpace) {\n while (spaces.length)\n delete tokens[spaces.pop()];\n } else {\n spaces = [];\n }\n\n hasTag = false;\n nonSpace = false;\n }\n\n var openingTagRe, closingTagRe, closingCurlyRe;\n function compileTags (tagsToCompile) {\n if (typeof tagsToCompile === 'string')\n tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n throw new Error('Invalid tags: ' + tagsToCompile);\n\n openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n }\n\n compileTags(tags || mustache.tags);\n\n var scanner = new Scanner(template);\n\n var start, type, value, chr, token, openSection;\n while (!scanner.eos()) {\n start = scanner.pos;\n\n // Match any text between tags.\n value = scanner.scanUntil(openingTagRe);\n\n if (value) {\n for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n chr = value.charAt(i);\n\n if (isWhitespace(chr)) {\n spaces.push(tokens.length);\n indentation += chr;\n } else {\n nonSpace = true;\n lineHasNonSpace = true;\n indentation += ' ';\n }\n\n tokens.push([ 'text', chr, start, start + 1 ]);\n start += 1;\n\n // Check for whitespace on the current line.\n if (chr === '\\n') {\n stripSpace();\n indentation = '';\n tagIndex = 0;\n lineHasNonSpace = false;\n }\n }\n }\n\n // Match the opening tag.\n if (!scanner.scan(openingTagRe))\n break;\n\n hasTag = true;\n\n // Get the tag type.\n type = scanner.scan(tagRe) || 'name';\n scanner.scan(whiteRe);\n\n // Get the tag value.\n if (type === '=') {\n value = scanner.scanUntil(equalsRe);\n scanner.scan(equalsRe);\n scanner.scanUntil(closingTagRe);\n } else if (type === '{') {\n value = scanner.scanUntil(closingCurlyRe);\n scanner.scan(curlyRe);\n scanner.scanUntil(closingTagRe);\n type = '&';\n } else {\n value = scanner.scanUntil(closingTagRe);\n }\n\n // Match the closing tag.\n if (!scanner.scan(closingTagRe))\n throw new Error('Unclosed tag at ' + scanner.pos);\n\n if (type == '>') {\n token = [ type, value, start, scanner.pos, indentation, tagIndex, lineHasNonSpace ];\n } else {\n token = [ type, value, start, scanner.pos ];\n }\n tagIndex++;\n tokens.push(token);\n\n if (type === '#' || type === '^') {\n sections.push(token);\n } else if (type === '/') {\n // Check section nesting.\n openSection = sections.pop();\n\n if (!openSection)\n throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n if (openSection[1] !== value)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n } else if (type === 'name' || type === '{' || type === '&') {\n nonSpace = true;\n } else if (type === '=') {\n // Set the tags for the next time around.\n compileTags(value);\n }\n }\n\n stripSpace();\n\n // Make sure there are no open sections when we're done.\n openSection = sections.pop();\n\n if (openSection)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n return nestTokens(squashTokens(tokens));\n }\n\n /**\n * Combines the values of consecutive text tokens in the given `tokens` array\n * to a single token.\n */\n function squashTokens (tokens) {\n var squashedTokens = [];\n\n var token, lastToken;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n if (token) {\n if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n lastToken[1] += token[1];\n lastToken[3] = token[3];\n } else {\n squashedTokens.push(token);\n lastToken = token;\n }\n }\n }\n\n return squashedTokens;\n }\n\n /**\n * Forms the given array of `tokens` into a nested tree structure where\n * tokens that represent a section have two additional items: 1) an array of\n * all tokens that appear in that section and 2) the index in the original\n * template that represents the end of that section.\n */\n function nestTokens (tokens) {\n var nestedTokens = [];\n var collector = nestedTokens;\n var sections = [];\n\n var token, section;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n switch (token[0]) {\n case '#':\n case '^':\n collector.push(token);\n sections.push(token);\n collector = token[4] = [];\n break;\n case '/':\n section = sections.pop();\n section[5] = token[2];\n collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n break;\n default:\n collector.push(token);\n }\n }\n\n return nestedTokens;\n }\n\n /**\n * A simple string scanner that is used by the template parser to find\n * tokens in template strings.\n */\n function Scanner (string) {\n this.string = string;\n this.tail = string;\n this.pos = 0;\n }\n\n /**\n * Returns `true` if the tail is empty (end of string).\n */\n Scanner.prototype.eos = function eos () {\n return this.tail === '';\n };\n\n /**\n * Tries to match the given regular expression at the current position.\n * Returns the matched text if it can match, the empty string otherwise.\n */\n Scanner.prototype.scan = function scan (re) {\n var match = this.tail.match(re);\n\n if (!match || match.index !== 0)\n return '';\n\n var string = match[0];\n\n this.tail = this.tail.substring(string.length);\n this.pos += string.length;\n\n return string;\n };\n\n /**\n * Skips all text until the given regular expression can be matched. Returns\n * the skipped string, which is the entire tail if no match can be made.\n */\n Scanner.prototype.scanUntil = function scanUntil (re) {\n var index = this.tail.search(re), match;\n\n switch (index) {\n case -1:\n match = this.tail;\n this.tail = '';\n break;\n case 0:\n match = '';\n break;\n default:\n match = this.tail.substring(0, index);\n this.tail = this.tail.substring(index);\n }\n\n this.pos += match.length;\n\n return match;\n };\n\n /**\n * Represents a rendering context by wrapping a view object and\n * maintaining a reference to the parent context.\n */\n function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }\n\n /**\n * Creates a new context using the given view with this context\n * as the parent.\n */\n Context.prototype.push = function push (view) {\n return new Context(view, this);\n };\n\n /**\n * Returns the value of the given name in this context, traversing\n * up the context hierarchy if the value is absent in this context's view.\n */\n Context.prototype.lookup = function lookup (name) {\n var cache = this.cache;\n\n var value;\n if (cache.hasOwnProperty(name)) {\n value = cache[name];\n } else {\n var context = this, intermediateValue, names, index, lookupHit = false;\n\n while (context) {\n if (name.indexOf('.') > 0) {\n intermediateValue = context.view;\n names = name.split('.');\n index = 0;\n\n /**\n * Using the dot notion path in `name`, we descend through the\n * nested objects.\n *\n * To be certain that the lookup has been successful, we have to\n * check if the last object in the path actually has the property\n * we are looking for. We store the result in `lookupHit`.\n *\n * This is specially necessary for when the value has been set to\n * `undefined` and we want to avoid looking up parent contexts.\n *\n * In the case where dot notation is used, we consider the lookup\n * to be successful even if the last \"object\" in the path is\n * not actually an object but a primitive (e.g., a string, or an\n * integer), because it is sometimes useful to access a property\n * of an autoboxed primitive, such as the length of a string.\n **/\n while (intermediateValue != null && index < names.length) {\n if (index === names.length - 1)\n lookupHit = (\n hasProperty(intermediateValue, names[index])\n || primitiveHasOwnProperty(intermediateValue, names[index])\n );\n\n intermediateValue = intermediateValue[names[index++]];\n }\n } else {\n intermediateValue = context.view[name];\n\n /**\n * Only checking against `hasProperty`, which always returns `false` if\n * `context.view` is not an object. Deliberately omitting the check\n * against `primitiveHasOwnProperty` if dot notation is not used.\n *\n * Consider this example:\n * ```\n * Mustache.render(\"The length of a football field is {{#length}}{{length}}{{/length}}.\", {length: \"100 yards\"})\n * ```\n *\n * If we were to check also against `primitiveHasOwnProperty`, as we do\n * in the dot notation case, then render call would return:\n *\n * \"The length of a football field is 9.\"\n *\n * rather than the expected:\n *\n * \"The length of a football field is 100 yards.\"\n **/\n lookupHit = hasProperty(context.view, name);\n }\n\n if (lookupHit) {\n value = intermediateValue;\n break;\n }\n\n context = context.parent;\n }\n\n cache[name] = value;\n }\n\n if (isFunction(value))\n value = value.call(this.view);\n\n return value;\n };\n\n /**\n * A Writer knows how to take a stream of tokens and render them to a\n * string, given a context. It also maintains a cache of templates to\n * avoid the need to parse the same template twice.\n */\n function Writer () {\n this.templateCache = {\n _cache: {},\n set: function set (key, value) {\n this._cache[key] = value;\n },\n get: function get (key) {\n return this._cache[key];\n },\n clear: function clear () {\n this._cache = {};\n }\n };\n }\n\n /**\n * Clears all cached templates in this writer.\n */\n Writer.prototype.clearCache = function clearCache () {\n if (typeof this.templateCache !== 'undefined') {\n this.templateCache.clear();\n }\n };\n\n /**\n * Parses and caches the given `template` according to the given `tags` or\n * `mustache.tags` if `tags` is omitted, and returns the array of tokens\n * that is generated from the parse.\n */\n Writer.prototype.parse = function parse (template, tags) {\n var cache = this.templateCache;\n var cacheKey = template + ':' + (tags || mustache.tags).join(':');\n var isCacheEnabled = typeof cache !== 'undefined';\n var tokens = isCacheEnabled ? cache.get(cacheKey) : undefined;\n\n if (tokens == undefined) {\n tokens = parseTemplate(template, tags);\n isCacheEnabled && cache.set(cacheKey, tokens);\n }\n return tokens;\n };\n\n /**\n * High-level method that is used to render the given `template` with\n * the given `view`.\n *\n * The optional `partials` argument may be an object that contains the\n * names and templates of partials that are used in the template. It may\n * also be a function that is used to load partial templates on the fly\n * that takes a single argument: the name of the partial.\n *\n * If the optional `config` argument is given here, then it should be an\n * object with a `tags` attribute or an `escape` attribute or both.\n * If an array is passed, then it will be interpreted the same way as\n * a `tags` attribute on a `config` object.\n *\n * The `tags` attribute of a `config` object must be an array with two\n * string values: the opening and closing tags used in the template (e.g.\n * [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n *\n * The `escape` attribute of a `config` object must be a function which\n * accepts a string as input and outputs a safely escaped string.\n * If an `escape` function is not provided, then an HTML-safe string\n * escaping function is used as the default.\n */\n Writer.prototype.render = function render (template, view, partials, config) {\n var tags = this.getConfigTags(config);\n var tokens = this.parse(template, tags);\n var context = (view instanceof Context) ? view : new Context(view, undefined);\n return this.renderTokens(tokens, context, partials, template, config);\n };\n\n /**\n * Low-level method that renders the given array of `tokens` using\n * the given `context` and `partials`.\n *\n * Note: The `originalTemplate` is only ever used to extract the portion\n * of the original template that was contained in a higher-order section.\n * If the template doesn't use higher-order sections, this argument may\n * be omitted.\n */\n Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, config) {\n var buffer = '';\n\n var token, symbol, value;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n value = undefined;\n token = tokens[i];\n symbol = token[0];\n\n if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate, config);\n else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate, config);\n else if (symbol === '>') value = this.renderPartial(token, context, partials, config);\n else if (symbol === '&') value = this.unescapedValue(token, context);\n else if (symbol === 'name') value = this.escapedValue(token, context, config);\n else if (symbol === 'text') value = this.rawValue(token);\n\n if (value !== undefined)\n buffer += value;\n }\n\n return buffer;\n };\n\n Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate, config) {\n var self = this;\n var buffer = '';\n var value = context.lookup(token[1]);\n\n // This function is used to render an arbitrary template\n // in the current context by higher-order sections.\n function subRender (template) {\n return self.render(template, context, partials, config);\n }\n\n if (!value) return;\n\n if (isArray(value)) {\n for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate, config);\n }\n } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate, config);\n } else if (isFunction(value)) {\n if (typeof originalTemplate !== 'string')\n throw new Error('Cannot use higher-order sections without the original template');\n\n // Extract the portion of the original template that the section contains.\n value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n if (value != null)\n buffer += value;\n } else {\n buffer += this.renderTokens(token[4], context, partials, originalTemplate, config);\n }\n return buffer;\n };\n\n Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate, config) {\n var value = context.lookup(token[1]);\n\n // Use JavaScript's definition of falsy. Include empty arrays.\n // See https://github.com/janl/mustache.js/issues/186\n if (!value || (isArray(value) && value.length === 0))\n return this.renderTokens(token[4], context, partials, originalTemplate, config);\n };\n\n Writer.prototype.indentPartial = function indentPartial (partial, indentation, lineHasNonSpace) {\n var filteredIndentation = indentation.replace(/[^ \\t]/g, '');\n var partialByNl = partial.split('\\n');\n for (var i = 0; i < partialByNl.length; i++) {\n if (partialByNl[i].length && (i > 0 || !lineHasNonSpace)) {\n partialByNl[i] = filteredIndentation + partialByNl[i];\n }\n }\n return partialByNl.join('\\n');\n };\n\n Writer.prototype.renderPartial = function renderPartial (token, context, partials, config) {\n if (!partials) return;\n var tags = this.getConfigTags(config);\n\n var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n if (value != null) {\n var lineHasNonSpace = token[6];\n var tagIndex = token[5];\n var indentation = token[4];\n var indentedValue = value;\n if (tagIndex == 0 && indentation) {\n indentedValue = this.indentPartial(value, indentation, lineHasNonSpace);\n }\n var tokens = this.parse(indentedValue, tags);\n return this.renderTokens(tokens, context, partials, indentedValue, config);\n }\n };\n\n Writer.prototype.unescapedValue = function unescapedValue (token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return value;\n };\n\n Writer.prototype.escapedValue = function escapedValue (token, context, config) {\n var escape = this.getConfigEscape(config) || mustache.escape;\n var value = context.lookup(token[1]);\n if (value != null)\n return (typeof value === 'number' && escape === mustache.escape) ? String(value) : escape(value);\n };\n\n Writer.prototype.rawValue = function rawValue (token) {\n return token[1];\n };\n\n Writer.prototype.getConfigTags = function getConfigTags (config) {\n if (isArray(config)) {\n return config;\n }\n else if (config && typeof config === 'object') {\n return config.tags;\n }\n else {\n return undefined;\n }\n };\n\n Writer.prototype.getConfigEscape = function getConfigEscape (config) {\n if (config && typeof config === 'object' && !isArray(config)) {\n return config.escape;\n }\n else {\n return undefined;\n }\n };\n\n var mustache = {\n name: 'mustache.js',\n version: '4.2.0',\n tags: [ '{{', '}}' ],\n clearCache: undefined,\n escape: undefined,\n parse: undefined,\n render: undefined,\n Scanner: undefined,\n Context: undefined,\n Writer: undefined,\n /**\n * Allows a user to override the default caching strategy, by providing an\n * object with set, get and clear methods. This can also be used to disable\n * the cache by setting it to the literal `undefined`.\n */\n set templateCache (cache) {\n defaultWriter.templateCache = cache;\n },\n /**\n * Gets the default or overridden caching object from the default writer.\n */\n get templateCache () {\n return defaultWriter.templateCache;\n }\n };\n\n // All high-level mustache.* functions use this writer.\n var defaultWriter = new Writer();\n\n /**\n * Clears all cached templates in the default writer.\n */\n mustache.clearCache = function clearCache () {\n return defaultWriter.clearCache();\n };\n\n /**\n * Parses and caches the given template in the default writer and returns the\n * array of tokens it contains. Doing this ahead of time avoids the need to\n * parse templates on the fly as they are rendered.\n */\n mustache.parse = function parse (template, tags) {\n return defaultWriter.parse(template, tags);\n };\n\n /**\n * Renders the `template` with the given `view`, `partials`, and `config`\n * using the default writer.\n */\n mustache.render = function render (template, view, partials, config) {\n if (typeof template !== 'string') {\n throw new TypeError('Invalid template! Template should be a \"string\" ' +\n 'but \"' + typeStr(template) + '\" was given as the first ' +\n 'argument for mustache#render(template, view, partials)');\n }\n\n return defaultWriter.render(template, view, partials, config);\n };\n\n // Export the escaping function so that the user may override it.\n // See https://github.com/janl/mustache.js/issues/244\n mustache.escape = escapeHtml;\n\n // Export these mainly for testing, but also for advanced usage.\n mustache.Scanner = Scanner;\n mustache.Context = Context;\n mustache.Writer = Writer;\n\n return mustache;\n\n})));\n","import{options as n}from\"preact\";var t,u,r,o=0,i=[],c=n.__r,f=n.diffed,e=n.__c,a=n.unmount;function v(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function m(n){return o=1,p(k,n)}function p(n,r,o){var i=v(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):k(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=v(t++,3);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function l(r,o){var i=v(t++,4);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function h(n){return o=5,_(function(){return{current:n}},[])}function s(n,t,u){o=6,l(function(){\"function\"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))}function _(n,u){var r=v(t++,7);return j(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,_(function(){return n},t)}function F(n){var r=u.context[n.__c],o=v(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function d(n){var r=v(t++,10),o=m();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function q(){i.some(function(t){if(t.__P)try{t.__H.__h.forEach(b),t.__H.__h.forEach(g),t.__H.__h=[]}catch(u){return t.__H.__h=[],n.__e(u,t.__v),!0}}),i=[]}n.__r=function(n){c&&c(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(b),r.__h.forEach(g),r.__h=[])},n.diffed=function(t){f&&f(t);var u=t.__c;u&&u.__H&&u.__H.__h.length&&(1!==i.push(u)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),x&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);x&&(t=requestAnimationFrame(u))})(q))},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(b),t.__h=t.__h.filter(function(n){return!n.__||g(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),e&&e(t,u)},n.unmount=function(t){a&&a(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(b)}catch(t){n.__e(t,u.__v)}};var x=\"function\"==typeof requestAnimationFrame;function b(n){\"function\"==typeof n.u&&n.u()}function g(n){n.u=n.__()}function j(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function k(n,t){return\"function\"==typeof t?t(n):t}export{m as useState,p as useReducer,y as useEffect,l as useLayoutEffect,h as useRef,s as useImperativeHandle,_ as useMemo,A as useCallback,F as useContext,T as useDebugValue,d as useErrorBoundary};\n//# sourceMappingURL=hooks.module.js.map\n","import{useState as n,useReducer as t,useEffect as e,useLayoutEffect as r,useRef as u,useImperativeHandle as o,useMemo as i,useCallback as c,useContext as l,useDebugValue as f}from\"preact/hooks\";export*from\"preact/hooks\";import{Component as a,createElement as s,options as h,toChildArray as v,Fragment as p,hydrate as d,render as m,__u as b,cloneElement as y,createRef as _,createContext as g}from\"preact\";export{createElement,createContext,createRef,Fragment,Component}from\"preact\";function E(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function w(n){this.props=n}function C(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,s(n,t)}return r.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",r.prototype.isReactComponent=!0,r.__f=!0,r}(w.prototype=new a).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var R=h.__b;h.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var x=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function k(n){function t(t,e){var r=E({},t);return delete r.ref,n(r,(e=t.ref||e)&&(\"object\"!=typeof e||\"current\"in e)?e:null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var O=function(n,t){return null==n?null:v(v(n).map(t))},A={map:O,forEach:O,count:function(n){return n?v(n).length:0},only:function(n){var t=v(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:v},N=h.__e;function L(n){return n&&((n=E({},n)).__c=null,n.__k=n.__k&&n.__k.map(L)),n}function U(n){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(U)),n}function F(){this.__u=0,this.t=null,this.__b=null}function M(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function j(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n},function(n){r=n}),r)throw r;if(!e)throw t;return s(e,u)}return u.displayName=\"Lazy\",u.__f=!0,u}function D(){this.u=null,this.o=null}h.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t.__c);N(n,t,e)},(F.prototype=new a).__c=function(n,t){var e=this;null==e.t&&(e.t=[]),e.t.push(t);var r=M(e.__v),u=!1,o=function(){u||(u=!0,t.componentWillUnmount=t.__c,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var n;if(!--e.__u)for(e.__v.__k[0]=U(e.state.__e),e.setState({__e:e.__b=null});n=e.t.pop();)n.forceUpdate()},c=e.__v;c&&!0===c.__h||e.__u++||e.setState({__e:e.__b=e.__v.__k[0]}),n.then(o,o)},F.prototype.componentWillUnmount=function(){this.t=[]},F.prototype.render=function(n,t){this.__b&&(this.__v.__k&&(this.__v.__k[0]=L(this.__b)),this.__b=null);var e=t.__e&&s(p,null,n.fallback);return e&&(e.__h=null),[s(p,null,t.__e?null:n.children),e]};var I=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]3)for(u=[u],o=3;o1&&T(t,l,u),l=x(u,t,t,n.__k,null,t.__e,l),\"function\"==typeof n.type&&(n.__d=l)))}function $(l,u,i,t,o,r,f,e,c){var a,h,v,y,_,w,k,g,b,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if(\"function\"==typeof P){if(g=u.props,b=(a=P.contextType)&&t[a.__c],x=a?b?b.props.value:a.__:t,i.__c?k=(h=u.__c=i.__c).__=h.__E:(\"prototype\"in P&&P.prototype.render?u.__c=h=new P(g,x):(u.__c=h=new d(g,x),h.constructor=P,h.render=M),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,P.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,h.__h.length&&f.push(h),T(u,e,l);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,w)})}h.context=x,h.props=g,h.state=h.__s,(a=n.__r)&&a(u),h.__d=!1,h.__v=u,h.__P=l,a=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(w=h.getSnapshotBeforeUpdate(y,_)),A=null!=a&&a.type==p&&null==a.key?a.props.children:a,m(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),k&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=H(i.__e,u,i,t,o,r,f,c);(a=n.diffed)&&a(u)}catch(l){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),n.__e(l,u,i)}return u.__e}function j(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u)})}catch(l){n.__e(l,u.__v)}})}function H(n,l,u,i,t,o,r,c){var s,a,h,v,y,p=u.props,d=l.props;if(t=\"svg\"===l.type||t,null!=o)for(s=0;s3)for(u=[u],o=3;o= 5 && minLength < 10) {\n allowedDistance = 1;\n }\n else if (minLength >= 10) {\n allowedDistance = 2;\n }\n if (distance <= allowedDistance) {\n replaces[lineWord] = \"\" + lineWord + \"\";\n break;\n }\n }\n }\n for (var _i = 0, _a = Object.entries(replaces); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n lineText = lineText.replaceAll(key, value);\n }\n element.innerHTML = lineText;\n}\nexports.highlightLine = highlightLine;\nfunction levenshteinDistance(str1, str2) {\n if (str1 === void 0) { str1 = \"\"; }\n if (str2 === void 0) { str2 = \"\"; }\n var track = Array(str2.length + 1).fill(null).map(function () {\n return Array(str1.length + 1).fill(null);\n });\n for (var i = 0; i <= str1.length; i += 1) {\n track[0][i] = i;\n }\n for (var j = 0; j <= str2.length; j += 1) {\n track[j][0] = j;\n }\n for (var j = 1; j <= str2.length; j += 1) {\n for (var i = 1; i <= str1.length; i += 1) {\n var indicator = str1[i - 1] === str2[j - 1] ? 0 : 1;\n track[j][i] = Math.min(track[j][i - 1] + 1, // deletion\n track[j - 1][i] + 1, // insertion\n track[j - 1][i - 1] + indicator);\n }\n }\n return track[str2.length][str1.length];\n}\nexports.levenshteinDistance = levenshteinDistance;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar events_1 = require(\"events\");\nvar Constants_1 = require(\"./Constants\");\nvar Container_1 = require(\"./Container\");\n/**\n * Flux pattern store class\n */\nvar Store = /** @class */ (function (_super) {\n __extends(Store, _super);\n /**\n * @param coordinate\n * @param minScore\n * @param hash\n * @param userId\n * @param site\n * @param language\n * @param device\n * @param generateRandomSessionUUID\n * @param initialState\n */\n function Store(coordinate, minScore, hash, userId, site, language, device, generateRandomSessionUUID, initialState) {\n var _this = _super.call(this) || this;\n _this.withHash = false;\n _this.doNotCleanUrlHashAtFirst = false;\n _this.dirty = true;\n _this.site = site;\n _this.device = device;\n _this.initialState = initialState;\n var initialQuery = Store.loadInitialQuery(coordinate, userId, site, language, device);\n _this.window = window.top;\n _this.isUnderIframe = (window !== window.top);\n if ((typeof hash === \"string\")) {\n _this.withHash = true;\n _this.urlHash = (hash === \"\") ? \"{}\" : hash;\n if (_this.urlHash.charAt(0) === \"#\") {\n _this.urlHash = _this.urlHash.substr(1);\n }\n }\n if (minScore) {\n initialQuery.setMinScore(minScore);\n }\n /**\n * Data received\n */\n _this.setEmptyResult();\n _this.currentVisibleResults = false;\n if (generateRandomSessionUUID) {\n initialQuery.setMetadataValue(\"session_uid\", Store.createUID(16));\n }\n _this.setCurrentQuery(initialQuery);\n return _this;\n }\n /**\n * Is dirty\n *\n * @return {any}\n */\n Store.prototype.isDirty = function () {\n return this.dirty;\n };\n /**\n *\n */\n Store.prototype.getSite = function () {\n return this.site;\n };\n /**\n *\n */\n Store.prototype.getDevice = function () {\n return this.device;\n };\n /**\n * Get current query\n *\n * @return {Query}\n */\n Store.prototype.getCurrentQuery = function () {\n return this.currentQuery;\n };\n /**\n * @param query\n */\n Store.prototype.setCurrentQuery = function (query) {\n this.currentQuery = query;\n };\n /**\n * Get current result\n *\n * @return {Result}\n */\n Store.prototype.getCurrentResult = function () {\n return this.currentResult;\n };\n /**\n * @param result\n */\n Store.prototype.setCurrentResult = function (result) {\n this.currentResult = result;\n };\n /**\n *\n */\n Store.prototype.setEmptyResult = function () {\n this.currentResult = apisearch_1[\"default\"].createEmptyResult();\n };\n /**\n * Get current result\n *\n * @return {boolean}\n */\n Store.prototype.hasProperResult = function () {\n return this.currentResult.getTotalItems() > 0;\n };\n /**\n * Results are visible\n *\n * @return {boolean}\n */\n Store.prototype.resultsAreVisible = function () {\n return this.currentVisibleResults;\n };\n /**\n * @param payload\n */\n Store.prototype.updateApisearchSetup = function (payload) {\n this.currentQuery = payload.query;\n };\n /**\n * @param payload\n */\n Store.prototype.renderInitialData = function (payload) {\n var result = payload.result, query = payload.query, _ = payload._;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n this.currentVisibleResults = query !== undefined;\n this.emit(\"render\");\n this.replaceUrl(query, result, this.currentVisibleResults);\n };\n /**\n * @param payload\n */\n Store.prototype.renderFetchedData = function (payload) {\n var result = payload.result, query = payload.query, visibleResults = payload.visibleResults;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n if (visibleResults !== undefined) {\n this.currentVisibleResults = visibleResults;\n }\n this.emit(\"render\");\n this.replaceUrl(query, result, visibleResults);\n };\n /**\n * Create an uid\n */\n Store.createUID = function (length) {\n var result = \"\";\n var characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n };\n /**\n * @param environmentId\n * @param repository\n * @param loadQuery\n */\n Store.prototype.fetchInitialQuery = function (environmentId, repository, loadQuery) {\n var _this = this;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n this.currentQuery = loadQuery\n ? this.loadQuery(this.currentQuery)\n : this.currentQuery;\n dispatcher.dispatch(\"NORMALIZE_QUERY\", {\n query: this.currentQuery\n });\n /**\n * In initial query, we must delete user\n */\n var queryAsArray = this.currentQuery.toArray();\n queryAsArray.user = null;\n repository\n .query(apisearch_1.Query.createFromArray(queryAsArray))\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_INITIAL_DATA\", {\n query: _this.currentQuery,\n result: result\n });\n });\n };\n /**\n * @param coordinate\n * @param userId\n * @param site\n * @param language\n * @param device\n *\n * @private\n */\n Store.loadInitialQuery = function (coordinate, userId, site, language, device) {\n var withCoordinate = (coordinate &&\n coordinate.lat !== undefined &&\n coordinate.lon !== undefined);\n var q = {};\n if (withCoordinate) {\n q.coordinate = coordinate;\n }\n if (userId !== \"\") {\n q.user = { id: userId };\n }\n if (q.metadata === undefined) {\n q.metadata = { device: device };\n }\n if (site !== \"\") {\n q.metadata.site = site;\n }\n if (language !== \"\") {\n q.metadata.language = language;\n }\n return apisearch_1.Query.createFromArray(q);\n };\n /**\n * @param query\n */\n Store.prototype.loadQuery = function (query) {\n var queryAsObject = query.toArray();\n if (Object.keys(this.initialState).length > 0) {\n this.emit(\"fromUrlObject\", this.initialState, queryAsObject);\n return apisearch_1.Query.createFromArray(queryAsObject);\n }\n if (!this.withHash) {\n return query;\n }\n var urlObject = {};\n if (this.urlHash.match(\"q=.*\") !== null) {\n var urlHashQuery = decodeURI(this.urlHash.slice(2));\n urlObject = { q: urlHashQuery };\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n else {\n try {\n urlObject = (this.urlHash !== undefined &&\n this.urlHash !== null &&\n this.urlHash !== \"\" &&\n this.urlHash !== \"/\")\n ? JSON.parse(decodeURI(this.urlHash))\n : {};\n if (Object.keys(urlObject).length > 0) {\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n }\n catch (e) {\n // Silent pass\n this.doNotCleanUrlHashAtFirst = true;\n }\n }\n return apisearch_1.Query.createFromArray(queryAsObject);\n };\n /**\n *\n * @param query\n * @param result\n * @param visibleResults\n */\n Store.prototype.replaceUrl = function (query, result, visibleResults) {\n if (!this.withHash) {\n return;\n }\n var queryAsObject = query.toArray();\n var urlObject = {};\n this.emit(\"toUrlObject\", queryAsObject, urlObject);\n var objectAsJson;\n if (Object.keys(urlObject).length === 1 &&\n typeof urlObject.q !== \"undefined\") {\n objectAsJson = \"q=\" + urlObject.q;\n }\n else {\n objectAsJson = decodeURI(JSON.stringify(urlObject));\n objectAsJson = (objectAsJson === \"{}\") ? \"\" : objectAsJson;\n objectAsJson = encodeURI(objectAsJson);\n }\n if (!this.isUnderIframe) {\n var path = window.location.href;\n var pathWithoutHash = path.split(\"#\", 2)[0];\n history.replaceState(\"\", \"\", pathWithoutHash + \"#\" + objectAsJson);\n if (objectAsJson === \"\") {\n history.replaceState(\"\", \"\", pathWithoutHash);\n }\n }\n else {\n if (!this.doNotCleanUrlHashAtFirst) {\n this.window.postMessage({\n name: \"apisearch_replace_hash\",\n hash: objectAsJson\n }, \"*\");\n }\n this.doNotCleanUrlHashAtFirst = false;\n }\n };\n return Store;\n}(events_1.EventEmitter));\nexports[\"default\"] = Store;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Result Information Component\n */\nvar BannerComponent = /** @class */ (function (_super) {\n __extends(BannerComponent, _super);\n /**\n * Constructor\n */\n function BannerComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n BannerComponent.prototype.componentWillReceiveProps = function (props) {\n var _a;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var banners = (_a = props.store.getCurrentResult().metadata.banners) !== null && _a !== void 0 ? _a : [];\n if (!banners) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var filteredBanners = banners.filter(function (banner) { return banner.position === props.position; });\n if (filteredBanners.length === 0) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var firstBanner = filteredBanners[0];\n this.setState(function (prevState) {\n return {\n mobile_img: firstBanner.mobile_img,\n desktop_img: firstBanner.desktop_img,\n url: firstBanner.url\n };\n });\n };\n BannerComponent.prototype.render = function () {\n var _a;\n if (this.state.desktop_img === \"\") {\n return;\n }\n var data = {\n desktop_img: this.state.desktop_img,\n mobile_img: (_a = this.state.mobile_img) !== null && _a !== void 0 ? _a : this.state.desktop_img,\n url: this.state.url,\n has_url: this.state.url !== \"\",\n breaking_point_size: this.props.breakingPointSize,\n image_prefix: this.props.imagePrefix\n };\n return ((0, preact_1.h)(Template_1[\"default\"], { template: defaultTemplates_1.defaultBannerTemplate, data: data, dictionary: this.props.dictionary }));\n };\n return BannerComponent;\n}(preact_1.Component));\nexports[\"default\"] = BannerComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultBannerTemplate = void 0;\nexports.defaultBannerTemplate = \"\\n
\\n {{#has_url}}{{/has_url}}\\n \\n \\n \\n \\n {{#has_url}}{{/has_url}}\\n
\\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.aggregationSetup = void 0;\n/**\n * Checkbox filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param aggregationField\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, aggregationField) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.aggregateBy(filterName, aggregationField, apisearch_1.FILTER_TYPE_FIELD);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param isChecked\n * @param filterValue\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, filterName, filterField, isChecked, filterValue) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, isChecked\n ? [filterValue]\n : [], apisearch_1.FILTER_MUST_ALL, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../MultipleFilter/Helpers\");\nvar CheckboxFilterActions_1 = require(\"./CheckboxFilterActions\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Checkbox Filter Component\n */\nvar CheckboxFilterComponent = /** @class */ (function (_super) {\n __extends(CheckboxFilterComponent, _super);\n function CheckboxFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param activeElement\n */\n _this.handleChange = function (activeElement) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.onChangeSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, activeElement, props.filterValue);\n };\n return _this;\n }\n /**\n * Component will mount\n */\n CheckboxFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var aggregationField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, aggregationField);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n CheckboxFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n aggregation: props\n .store\n .getCurrentResult()\n .getAggregation(props.filterName)\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n CheckboxFilterComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var filterValue = props.filterValue;\n if (typeof filterValue === \"boolean\") {\n filterValue = filterValue ? \"true\" : \"false\";\n }\n var n = 0;\n var isActive = (0, Helpers_1.getFilterValuesFromQuery)(props.store.getCurrentQuery(), props.filterName)[0];\n var aggregation = state.aggregation;\n if (aggregation != null) {\n var counters = aggregation.getCounters();\n for (var i in counters) {\n var counter = counters[i];\n if (counter.values.name === filterValue) {\n n = counter.getN();\n break;\n }\n }\n }\n var label = props.label\n ? props.label\n : props.filterName;\n var that = this;\n var uid = Math.floor(Math.random() * 10000000000);\n var templateData = {\n n: n,\n isActive: isActive,\n label: label,\n uid: uid\n };\n if (n === 0) {\n return null;\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-checkboxFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-checkboxFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-checkboxFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((isActive) ? activeClassName : \"\"), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleChange(!isActive);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: this.props.dictionary }))));\n };\n return CheckboxFilterComponent;\n}(preact_1.Component));\nCheckboxFilterComponent.defaultProps = {\n filterValue: 'true',\n classNames: {\n container: \"\",\n top: \"\",\n item: \"\",\n active: \"as-checkboxFilter__item--active\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = CheckboxFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{label}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.clearFiltersAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterToClear\n * @param filterValueToClear\n */\nfunction clearFiltersAction(environmentId, currentQuery, repository, filterToClear, filterValueToClear) {\n if (filterToClear === void 0) { filterToClear = null; }\n if (filterValueToClear === void 0) { filterValueToClear = null; }\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (filterToClear === null) {\n clonedQuery.filters = {\n _query: currentQuery.getFilter(\"_query\")\n };\n }\n else if (filterValueToClear === null) {\n delete clonedQuery.filters[filterToClear];\n }\n else {\n var values = clonedQuery.filters[filterToClear].values;\n var valueIndex = values.indexOf(filterValueToClear, 0);\n if (valueIndex > -1) {\n clonedQuery.filters[filterToClear].values.splice(valueIndex, 1);\n }\n if (clonedQuery.filters[filterToClear].values.length === 0) {\n delete clonedQuery.filters[filterToClear];\n }\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.clearFiltersAction = clearFiltersAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ClearFiltersActions_1 = require(\"./ClearFiltersActions\");\n/**\n * Result Information Component\n */\nvar ClearFiltersComponent = /** @class */ (function (_super) {\n __extends(ClearFiltersComponent, _super);\n /**\n * Constructor\n */\n function ClearFiltersComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n _this.setState(function (prevState) {\n return {\n appliedFilters: [],\n showClearFilters: false\n };\n });\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository);\n };\n /**\n * Handle individual click\n */\n _this.handleIndividualClick = function (filterKey, filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository, filterKey, filterValue);\n };\n _this.state = {\n appliedFilters: [],\n showClearFilters: false\n };\n return _this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n ClearFiltersComponent.prototype.componentWillReceiveProps = function (props) {\n var appliedFiltersFormatted = this.getFiltersToShow();\n this.setState(function (prevState) {\n return {\n appliedFilters: appliedFiltersFormatted,\n showClearFilters: appliedFiltersFormatted.length > 0\n };\n });\n };\n /**\n * @param filterToAvoid\n */\n ClearFiltersComponent.prototype.getFiltersToShow = function (filterToAvoid) {\n if (filterToAvoid === void 0) { filterToAvoid = null; }\n var appliedFilters = this.props.store.getCurrentQuery().getFilters();\n var appliedFiltersFormatted = [];\n for (var _i = 0, _a = Object.entries(appliedFilters); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], filter = _b[1];\n if (filter instanceof apisearch_1.Filter && (key !== \"_query\") && (key !== filterToAvoid)) {\n appliedFiltersFormatted.push({\n filter: key,\n num: filter.getValues().length,\n values: filter.getValues()\n });\n }\n }\n return appliedFiltersFormatted;\n };\n /**\n * Render\n *\n * @return {}\n */\n ClearFiltersComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var containerClassName = props.classNames.container;\n var filtersListClassName = props.classNames.filtersList;\n var filterClassName = props.classNames.filter;\n var containerTemplate = props.template.container;\n var filterTemplate = props.template.filter;\n var appliedFiltersFormatted = this.state.appliedFilters;\n var individualFilterClear = null;\n var isEmptyClass = (this.state.appliedFilters.length === 0) ? \"empty\" : \"\";\n if (props.showIndividualFilterValueClear) {\n var values_1 = [];\n this.state.appliedFilters.forEach(function (filter) {\n filter.values.forEach(function (value) { return values_1.push({\n filter: filter.filter,\n value: value\n }); });\n });\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, values_1.map(function (filter) {\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, filter.value); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n else if (props.showIndividualFilterClear) {\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, appliedFiltersFormatted.map(function (filter) {\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, null); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n return (this.state.showClearFilters)\n ? ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName, \" \").concat(isEmptyClass) },\n props.showGlobalFilterClear\n ? (0, preact_1.h)(\"div\", { onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary }))\n : \"\",\n individualFilterClear)) : null;\n };\n return ClearFiltersComponent;\n}(preact_1.Component));\nClearFiltersComponent.defaultProps = {\n classNames: {\n container: \"\",\n filter: \"\",\n filtersList: \"\"\n },\n showGlobalFilterClear: true,\n showIndividualFilterClear: false,\n showIndividualFilterValueClear: false,\n template: {\n container: \"Clear filters\",\n filter: \"Clear {{filter}} ({{num}})\"\n }\n};\nexports[\"default\"] = ClearFiltersComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar Clone = /** @class */ (function () {\n function Clone() {\n }\n Clone.object = function (object) {\n return Object.assign(Object.create(Object.getPrototypeOf(object)), object);\n };\n return Clone;\n}());\nexports[\"default\"] = Clone;\n","\"use strict\";\nexports.__esModule = true;\nexports.onWordClickAction = void 0;\nvar apisearch_1 = require(\"apisearch\");\nvar Clone_1 = require(\"./Clone\");\nvar Container_1 = require(\"../Container\");\nvar Constants_1 = require(\"../Constants\");\n/**\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param word\n * @param category\n */\nfunction onWordClickAction(environmentId, currentQuery, repository, word, category) {\n if (category === void 0) { category = null; }\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [word];\n clonedQuery.page = 1;\n if (category) {\n clonedQuery = apisearch_1.Query.createFromArray(clonedQuery);\n clonedQuery.filterBy(\"Categoría\", \"category_level_0\", [category]);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onWordClickAction = onWordClickAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Result Information Component\n */\nvar InformationComponent = /** @class */ (function (_super) {\n __extends(InformationComponent, _super);\n /**\n * Constructor\n */\n function InformationComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n hits: 0,\n total: 0,\n visible: false\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n InformationComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return (props.store.getCurrentResult() == null)\n ? {\n hits: 0,\n total: 0,\n visible: false\n }\n : {\n hits: props.store.getCurrentResult().getTotalHits(),\n total: props.store.getCurrentResult().getTotalItems(),\n visible: true\n };\n });\n };\n InformationComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n var formatData = props.formatData;\n if (!this.state.visible) {\n return;\n }\n var currentQuery = this.props.store.getCurrentQuery();\n var size = currentQuery.getSize();\n var page = currentQuery.getPage();\n var from = (page - 1) * size;\n var to = from + size;\n var totalHits = this.state.hits.toLocaleString();\n var moreThanLimit = false;\n if (totalHits === \"10,000\") {\n totalHits = '+10,000';\n moreThanLimit = true;\n }\n /**\n * Data accessible to the template\n */\n var reducedTemplateData = {\n total_hits: totalHits,\n total_items: this.state.total.toLocaleString(),\n page: page,\n size: size,\n from: from + 1,\n to: to,\n more_than_limit: moreThanLimit\n };\n var formattedTemplateData = formatData(reducedTemplateData);\n return ((0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, data: formattedTemplateData, className: \"as-information \".concat(containerClassName), dictionary: this.props.dictionary }));\n };\n return InformationComponent;\n}(preact_1.Component));\nInformationComponent.defaultProps = {\n classNames: {\n container: ''\n },\n template: {\n container: 'Found {{total_hits}}/{{total_items}}'\n },\n formatData: function (data) { return data; }\n};\nexports[\"default\"] = InformationComponent;\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nexports.isLeveledFilter = exports.getFilterValuesFromQuery = exports.isFilterAvailable = exports.getShadowFilterValuesFromQuery = exports.manageCurrentFilterItems = exports.wasElementRecentlySelected = void 0;\n/**\n * @param selectedItem\n * @param currentItems\n */\nfunction wasElementRecentlySelected(selectedItem, currentItems) {\n return !currentItems.some(function (item) { return item === selectedItem; });\n}\nexports.wasElementRecentlySelected = wasElementRecentlySelected;\n/**\n * Manage filter items\n *\n * If an item is on the list, remove it\n * else, add it!\n *\n * @param selectedItem\n * @param currentItems\n * @param wasElementRecentlySelected\n * @param deleteIfWasRemoved\n *\n * @returns {any}\n */\nfunction manageCurrentFilterItems(selectedItem, currentItems, wasElementRecentlySelected, deleteIfWasRemoved) {\n if (!wasElementRecentlySelected) {\n return deleteIfWasRemoved\n ? currentItems.filter(function (item) { return item !== selectedItem; })\n : currentItems;\n }\n else {\n return __spreadArray(__spreadArray([], currentItems, true), [\n selectedItem,\n ], false);\n }\n}\nexports.manageCurrentFilterItems = manageCurrentFilterItems;\n/**\n * @param query\n * @param filterName\n * @param withCurrent\n */\nfunction getShadowFilterValuesFromQuery(query, filterName, withCurrent) {\n var fields = [];\n if (isFilterAvailable(query, filterName, 6)) {\n var fieldName = query.filters[filterName].field.substr(17);\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n for (var it_1 = 1; it_1 < currentLevel; it_1++) {\n var iterationFieldName = fieldNameWithoutLevel + \"_\" + it_1;\n if (query.filters[iterationFieldName] !== undefined) {\n fields.push(query.filters[iterationFieldName].values[0]);\n }\n }\n if (withCurrent) {\n fields.push(query.filters[filterName].values[0]);\n }\n }\n return fields;\n}\nexports.getShadowFilterValuesFromQuery = getShadowFilterValuesFromQuery;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction isFilterAvailable(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return (query.filters !== undefined &&\n query.filters !== null &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined &&\n query.filters[filterName] !== null &&\n (applicationType === null ||\n query.filters[filterName].applicationType === applicationType ||\n query.filters[filterName].application_type === applicationType));\n}\nexports.isFilterAvailable = isFilterAvailable;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction getFilterValuesFromQuery(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return isFilterAvailable(query, filterName, applicationType)\n ? query.filters[filterName].values\n : [];\n}\nexports.getFilterValuesFromQuery = getFilterValuesFromQuery;\n/**\n * @param filter\n */\nfunction isLeveledFilter(filter) {\n return filter.application_type === 6 ||\n filter.applicationType === 6;\n}\nexports.isLeveledFilter = isLeveledFilter;\n","\"use strict\";\nexports.__esModule = true;\nexports.configureQueryWithShadowLeveledFilters = exports.modifyQueryAggregationWithProperLevelValue = exports.filterAction = exports.aggregationSetup = void 0;\n/**\n * Multiple filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar apisearch_2 = require(\"apisearch\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param promoted\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, aggregationField, applicationType, sortBy, fetchLimit, ranges, promoted) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit, promoted);\n }\n else {\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * Filter action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param filterValues\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param labels\n * @param shadowLeveledFilters\n * @param originalFilterField\n * @param promoted\n * @param selectedFilter\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterValues, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, promoted, selectedFilter) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.filterByRange(filterName, filterField, rangesValues, filterValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, false, sortBy);\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit);\n }\n else {\n clonedQuery.filterBy(filterName, filterField, filterValues, applicationType, false, sortBy);\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n if (applicationType === 6) {\n configureQueryWithShadowLeveledFilters(clonedQuery, shadowLeveledFilters, originalFilterField);\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n // We must explicitly tell that a filter was added at this point\n if (selectedFilter) {\n clonedQuery.setMetadataValue(\"af\", [filterField, selectedFilter]);\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n */\nfunction modifyQueryAggregationWithProperLevelValue(environmentId, currentQuery, filterName, filterField, aggregationField) {\n if (currentQuery.filters !== undefined &&\n currentQuery.filters[filterName] !== undefined) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var fieldName = currentQuery.filters[filterName].field;\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n clonedQuery.aggregations[filterName].field = fieldNameWithoutLevel + \"_\" + (currentLevel + 1);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n }\n}\nexports.modifyQueryAggregationWithProperLevelValue = modifyQueryAggregationWithProperLevelValue;\n/**\n * @param query\n * @param shadowLeveledFilters\n * @param originalFilterField\n */\nfunction configureQueryWithShadowLeveledFilters(query, shadowLeveledFilters, originalFilterField) {\n for (var it_1 = 1; it_1 < 10; it_1++) {\n var iterationFieldName = originalFilterField + \"_level_\" + it_1;\n delete (query.filters[iterationFieldName]);\n delete (query.aggregations[iterationFieldName]);\n }\n if (shadowLeveledFilters.length > 0) {\n var levelCounter_1 = 1;\n shadowLeveledFilters.forEach(function (filterValue) {\n var leveledFieldName = originalFilterField + \"_level_\" + (levelCounter_1++);\n query.filterBy(leveledFieldName, leveledFieldName, [filterValue], apisearch_1.FILTER_AT_LEAST_ONE);\n });\n }\n}\nexports.configureQueryWithShadowLeveledFilters = configureQueryWithShadowLeveledFilters;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar MultipleFilterActions_1 = require(\"./MultipleFilterActions\");\nvar Helpers_1 = require(\"./Helpers\");\nvar Template_1 = require(\"../Template\");\nvar ShowMoreComponent_1 = require(\"./ShowMoreComponent\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Filter Component\n */\nvar MultipleFilterComponent = /** @class */ (function (_super) {\n __extends(MultipleFilterComponent, _super);\n /**\n * Constructor\n */\n function MultipleFilterComponent() {\n var _this = _super.call(this) || this;\n _this.currentLevel = 0;\n _this.propsReceived = false;\n /**\n * @param selectedFilter\n * @param level\n */\n _this.handleClick = function (selectedFilter, level) {\n var _a;\n var props = _this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : filterField;\n var applicationType = props.applicationType;\n var sortBy = props.sortBy;\n var ranges = props.ranges;\n var labels = props.labels;\n var fetchLimit = props.fetchLimit;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var selectedFilterAsString = String(selectedFilter);\n var valuesAsString = (applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, filterName);\n var wasNotSelected = (0, Helpers_1.wasElementRecentlySelected)(selectedFilterAsString, valuesAsString);\n var filterItems = (0, Helpers_1.manageCurrentFilterItems)(selectedFilterAsString, valuesAsString, wasNotSelected, (applicationType !== 6));\n var currentLevel = level;\n if (applicationType === 6) {\n currentLevel = wasNotSelected ? currentLevel : (currentLevel - 1);\n }\n var shadowLeveledFilters = [];\n var originalFilterField = filterField;\n if (applicationType === 6) {\n filterField = filterField + \"_level_\" + (currentLevel);\n aggregationField = aggregationField + \"_level_\" + (currentLevel + 1);\n filterItems = filterItems.slice(0, currentLevel);\n shadowLeveledFilters = filterItems.slice(0, -1);\n filterItems = filterItems.slice(-1);\n }\n _this.currentLevel = currentLevel;\n /**\n * Dispatch filter action\n */\n (0, MultipleFilterActions_1.filterAction)(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterItems, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, props.promoted, wasNotSelected ? selectedFilterAsString : null);\n };\n /**\n * Handle show more\n */\n _this.handleShowMore = function () {\n var viewLimit = _this.state.aggregations.length;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n /**\n * Handle show less\n */\n _this.handleShowLess = function () {\n var viewLimit = _this.props.viewLimit;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n _this.state = {\n aggregations: [],\n viewLimit: 0\n };\n return _this;\n }\n /**\n * Components will mount\n */\n MultipleFilterComponent.prototype.componentWillMount = function () {\n var _a;\n var props = this.props;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : props.filterField;\n var applicationType = props.applicationType;\n var fetchLimit = props.fetchLimit;\n var viewLimit = props.viewLimit;\n /**\n * Set view items limit\n */\n var isViewLimitProperlySet = (viewLimit && viewLimit < fetchLimit);\n this.setState(function (_) {\n return {\n viewLimit: (isViewLimitProperlySet)\n ? viewLimit\n : fetchLimit\n };\n });\n if (applicationType === 6) {\n aggregationField = aggregationField + \"_level_1\";\n }\n /**\n * Dispatch action\n */\n (0, MultipleFilterActions_1.aggregationSetup)(props.environmentId, props.store.getCurrentQuery(), props.filterName, props.filterField, aggregationField, applicationType, props.sortBy, fetchLimit, props.ranges, props.promoted);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n MultipleFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var filterName = props.filterName;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n aggregations: [],\n filters: []\n };\n });\n return;\n }\n var result = props.store.getCurrentResult();\n var aggregation = result.getAggregation(filterName);\n var aggregations = [];\n if (aggregation && typeof aggregation.getCounters === \"function\") {\n /**\n * Getting aggregation from aggregations\n */\n var counters = aggregation.getCounters();\n var countersAsArray = Object.values(counters);\n aggregations = props.activeFirst\n ? __spreadArray(__spreadArray([], countersAsArray.filter(function (counter) {\n return true === counter.isUsed();\n }), true), countersAsArray.filter(function (counter) {\n return (false === counter.isUsed() ||\n null === counter.isUsed());\n }), true) : countersAsArray;\n }\n this.setState(function (prevState) {\n return {\n aggregations: aggregations\n };\n });\n if (props.applicationType === 6 &&\n this.propsReceived === false) {\n var filter = props.store.getCurrentQuery().getFilter(filterName);\n this.currentLevel = (filter === undefined || filter === null)\n ? this.currentLevel\n : filter.values\n ? (filter.values.length + 1)\n : this.currentLevel;\n this.propsReceived = true;\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n MultipleFilterComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var viewLimit = props.viewLimit;\n var fetchLimit = props.fetchLimit;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var showMoreContainerClassName = props.classNames.showMoreContainer;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var showMoreTemplate = props.template.showMore;\n var showLessTemplate = props.template.showLess;\n var currentQuery = props.store.getCurrentQuery();\n var formatData = props.formatData;\n var labels = Object.keys(props.ranges).length > 0\n ? props.ranges\n : props.labels;\n /**\n * Get aggregation items\n */\n var that = this;\n var itemsIds = {};\n var allItems = this.state.aggregations.map(function (item) {\n var uid = Math.floor(Math.random() * 10000000000);\n var values = item.getValues();\n values.name = labels[values.name] ? labels[values.name] : values.name;\n itemsIds[values.id] = true;\n return {\n isActive: item.isUsed(),\n n: item.getN(),\n uid: uid,\n values: values\n };\n });\n /**\n * Shadow filters. These filters are not part of the aggregation list but are applied. Should always be listed\n * first\n */\n var appliedFilters = (props.applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, props.filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, props.filterName);\n if (appliedFilters.length > 0) {\n var zeroItemsFilters_1 = [];\n appliedFilters.forEach(function (filter) {\n if (itemsIds[filter] === undefined) {\n var uid = Math.floor(Math.random() * 10000000000);\n zeroItemsFilters_1.push({\n isActive: true,\n n: 0,\n uid: uid,\n values: {\n id: filter,\n name: filter\n }\n });\n }\n });\n allItems = __spreadArray(__spreadArray([], zeroItemsFilters_1, true), allItems, true);\n }\n /**\n * Get existing applied filters if they exist\n */\n if (allItems.length === 0) {\n return null;\n }\n var items = allItems.slice(0, this.state.viewLimit);\n var allItemsLength = allItems.length;\n var levelCounter = 1;\n var topData = {\n hasApplied: appliedFilters.length > 0,\n nApplied: appliedFilters.length\n };\n /**\n * Check available view limit\n */\n var isViewLimitProperlySet = (viewLimit &&\n viewLimit < fetchLimit &&\n allItemsLength > viewLimit);\n return ((0, preact_1.h)(\"div\", { className: \"as-multipleFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-multipleFilter__top \".concat(topClassName), dictionary: this.props.dictionary, data: topData }),\n (0, preact_1.h)(\"div\", { className: \"as-multipleFilter__itemsList \".concat(itemsListClassName) },\n (0, preact_1.h)(\"ul\", null, items.map(function (item) {\n var formattedTemplateData = formatData(item);\n var level = Math.min(levelCounter, _this.currentLevel + 1);\n levelCounter++;\n return ((0, preact_1.h)(\"li\", { className: \"as-multipleFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((item.isActive) ? activeClassName : \"\") +\n \"\".concat((props.promoted.includes(item.values.name) ? \"as-multipleFilter__item_featured\" : \"\")), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(item.values.id, level);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: formattedTemplateData, dictionary: _this.props.dictionary })));\n }))),\n (isViewLimitProperlySet)\n ? (0, preact_1.h)(ShowMoreComponent_1[\"default\"], { allItemsLength: allItemsLength, currentLimit: this.state.viewLimit, handleShowMore: this.handleShowMore, handleShowLess: this.handleShowLess, showMoreContainerClassName: showMoreContainerClassName, showMoreTemplate: showMoreTemplate, showLessTemplate: showLessTemplate, dictionary: this.props.dictionary }) : null));\n };\n return MultipleFilterComponent;\n}(preact_1.Component));\nMultipleFilterComponent.defaultProps = {\n aggregationField: null,\n applicationType: 8,\n fetchLimit: 10,\n viewLimit: null,\n sortBy: ['_term', 'desc'],\n ranges: {},\n labels: {},\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\",\n active: \"as-multipleFilter__item--active\",\n showMoreContainer: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate,\n showMore: \"+ Show more\",\n showLess: \"- Show less\"\n },\n formatData: function (data) { return data; },\n activeFirst: true,\n promoted: []\n};\nexports[\"default\"] = MultipleFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Show more component\n *\n * Provides two items\n * -> Show more element\n * -> Show less element\n */\nvar ShowMoreComponent = function (_a) {\n var allItemsLength = _a.allItemsLength, currentLimit = _a.currentLimit, handleShowMore = _a.handleShowMore, handleShowLess = _a.handleShowLess, showMoreContainerClassName = _a.showMoreContainerClassName, showMoreTemplate = _a.showMoreTemplate, showLessTemplate = _a.showLessTemplate, dictionary = _a.dictionary;\n return (allItemsLength > currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowMore },\n (0, preact_1.h)(Template_1[\"default\"], { template: showMoreTemplate, className: \"as-showMore--more\", dictionary: dictionary })))\n : (allItemsLength === currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowLess },\n (0, preact_1.h)(Template_1[\"default\"], { template: showLessTemplate, className: \"as-showMore--less\", dictionary: dictionary })))\n : null;\n};\nexports[\"default\"] = ShowMoreComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{values.name}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.getEnd = exports.getStart = exports.totalPagesToArray = exports.getTotalPages = void 0;\n/**\n * Get total pages from the total reached hits\n * divided by the hits per page configured\n *\n * If there are more than 10.000 items\n * We reduce the max num of items to 9.999\n * to take care of performance\n *\n * If total resulted pages are bigger than 999\n * we set 999 as the max number of pages\n *\n * @param totalHits\n * @param hitsPerPage\n *\n * @return {number}\n */\nfunction getTotalPages(totalHits, hitsPerPage) {\n totalHits = (totalHits >= 10000)\n ? 9999\n : totalHits;\n var totalPages = Math.ceil(totalHits / hitsPerPage);\n return (totalPages > 999)\n ? 999\n : totalPages;\n}\nexports.getTotalPages = getTotalPages;\n/**\n * Pass total pages number into an array of numbers\n *\n * @param totalPages\n *\n * @return {number[]}\n */\nfunction totalPagesToArray(totalPages) {\n var pages = [];\n for (var index = 1; index <= totalPages; index++) {\n pages.push(index);\n }\n return pages;\n}\nexports.totalPagesToArray = totalPagesToArray;\n/**\n * Get the starting point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getStart(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return currentPage - (currentPage % spectreSize);\n }\n if (isTouchingRight) {\n var start = currentPage - (spectreSize - (totalPages % currentPage));\n return (start > 0) ? start : 0;\n }\n return currentPage - (padding + 1);\n}\nexports.getStart = getStart;\n/**\n * Get the ending point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getEnd(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return spectreSize;\n }\n if (isTouchingRight) {\n return totalPages;\n }\n return currentPage + padding;\n}\nexports.getEnd = getEnd;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Arrow navigation component\n */\nfunction NavigationComponent(_a) {\n var isVisible = _a.isVisible, classNames = _a.classNames, template = _a.template, handleClick = _a.handleClick;\n return (isVisible)\n ? ((0, preact_1.h)(\"li\", { className: classNames, onClick: handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: template, dictionary: this.props.dictionary })))\n : null;\n}\nexports[\"default\"] = NavigationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.paginationChangeAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedPage\n */\nfunction paginationChangeAction(environmentId, currentQuery, repository, selectedPage) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = selectedPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.paginationChangeAction = paginationChangeAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar Helpers_1 = require(\"./Helpers\");\nvar NavigationComponent_1 = require(\"./NavigationComponent\");\nvar PaginationActions_1 = require(\"./PaginationActions\");\n/**\n * Pagination Component\n */\nvar PaginationComponent = /** @class */ (function (_super) {\n __extends(PaginationComponent, _super);\n /**\n * Constructor\n */\n function PaginationComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n *\n * @param page\n */\n _this.handleClick = function (page) {\n var _a = _this.props, store = _a.store, environmentId = _a.environmentId, repository = _a.repository;\n var currentResult = store.getCurrentResult();\n var currentQuery = store.getCurrentQuery();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuery.getSize());\n /**\n * Do not let go further\n */\n if (page <= 0)\n page = 1;\n if (page >= totalPages)\n page = totalPages;\n if (currentQuery.getPage() === page) {\n return;\n }\n /**\n * Dispatch change page action\n */\n (0, PaginationActions_1.paginationChangeAction)(environmentId, currentQuery, repository, page);\n };\n _this.state = {\n page: 1\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n PaginationComponent.prototype.componentWillReceiveProps = function (props) {\n var page = props.store.getCurrentQuery().getPage();\n this.setState(function (prevState) {\n return {\n page: page\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PaginationComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var currentResult = props.store.getCurrentResult();\n if (props.store.getCurrentResult() == null) {\n return;\n }\n var currentQuerySize = props.store.getCurrentQuery().getSize();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuerySize);\n /**\n * Hide container if hits are empty\n */\n if (currentResult.getTotalHits() === 0 ||\n totalPages === 1) {\n return null;\n }\n var padding = props.padding;\n var goFirstLast = props.goFirstLast;\n var containerClassName = props.classNames.container;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var disabledClassName = props.classNames.disabled;\n var nextClassName = props.classNames.next;\n var previousClassName = props.classNames.previous;\n var lastClassName = props.classNames.last;\n var firstClassName = props.classNames.first;\n var itemTemplate = props.template.item;\n var nextTemplate = props.template.next;\n var previousTemplate = props.template.previous;\n var firstTemplate = props.template.first;\n var lastTemplate = props.template.last;\n var currentQueryPage = props.store.getCurrentQuery().getPage();\n /**\n * Get Total pages\n */\n var pages = (0, Helpers_1.totalPagesToArray)(totalPages);\n /**\n * Get pages spectre\n */\n var spectreSize = (padding * 2) + 1;\n var isTouchingLeft = currentQueryPage <= (padding + 1);\n var isTouchingRight = (currentQueryPage + padding) >= totalPages;\n var spectre = pages.slice((0, Helpers_1.getStart)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight), (0, Helpers_1.getEnd)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight));\n /**\n * Dynamic disabled classes\n */\n var previousDisabledClass = (currentQueryPage === 1) ? disabledClassName : '';\n var nextDisabledClass = (currentQueryPage === totalPages) ? disabledClassName : '';\n return ((0, preact_1.h)(\"ul\", { className: \"as-pagination \".concat(containerClassName) },\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--first \".concat(firstClassName, \" \").concat(previousDisabledClass), template: firstTemplate, handleClick: function () { return _this.handleClick(1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--previous \".concat(previousClassName, \" \").concat(previousDisabledClass), template: previousTemplate, handleClick: function () { return _this.handleClick(currentQueryPage - 1); } }),\n spectre.map(function (page) { return ((0, preact_1.h)(\"li\", { className: \"as-pagination__item as-pagination__item--link \".concat(itemClassName, \" \").concat((currentQueryPage === page) ? activeClassName : ''), onClick: function () { return _this.handleClick(page); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: { page: page.toLocaleString('de-DE') }, dictionary: _this.props.dictionary }))); }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--next \".concat(nextClassName, \" \").concat(nextDisabledClass), template: nextTemplate, handleClick: function () { return _this.handleClick(currentQueryPage + 1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--last \".concat(lastClassName, \" \").concat(nextDisabledClass), template: lastTemplate, handleClick: function () { return _this.handleClick(totalPages); } })));\n };\n return PaginationComponent;\n}(preact_1.Component));\nPaginationComponent.defaultProps = {\n padding: 3,\n goFirstLast: false,\n classNames: {\n container: '',\n item: '',\n active: 'as-pagination__item--active',\n disabled: 'as-pagination__item--disabled',\n next: '',\n first: '',\n previous: '',\n last: ''\n },\n template: {\n item: '{{page}}',\n next: '>',\n previous: '<',\n first: '<<',\n last: '>>'\n }\n};\nexports[\"default\"] = PaginationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.priorityFilterAction = exports.setupPriorityFilters = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nfunction setupPriorityFilters(environmentId, currentQuery, filters) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.setMetadataValue(\"pf\", filters);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.setupPriorityFilters = setupPriorityFilters;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param filterValue\n * @param applicationType\n */\nfunction priorityFilterAction(environmentId, currentQuery, repository, filterName, filterField, filterValue, applicationType) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, [filterValue], applicationType, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n clonedQuery.setMetadataValue(\"af\", [filterField, filterValue]);\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.priorityFilterAction = priorityFilterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar PriorityFilterActions_1 = require(\"./PriorityFilterActions\");\n/**\n * PriorityFilterComponent\n */\nvar PriorityFilterComponent = /** @class */ (function (_super) {\n __extends(PriorityFilterComponent, _super);\n /**\n * Constructor\n */\n function PriorityFilterComponent() {\n var _this = _super.call(this) || this;\n _this.handleClick = function (filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var priorityFilter = _this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n var priorityFilterName = priorityFilter.name;\n var priorityFilterObject = props.store.getCurrentQuery().getAggregation(priorityFilterName);\n (0, PriorityFilterActions_1.priorityFilterAction)(environmentId, currentQuery, repository, priorityFilterName, priorityFilterObject.getField().replace(\"indexed_metadata.\", \"\"), filterValue, priorityFilterObject.getApplicationType());\n };\n _this.state = {\n filterName: \"\"\n };\n return _this;\n }\n /**\n * Components will mount\n */\n PriorityFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, PriorityFilterActions_1.setupPriorityFilters)(props.environmentId, props.store.getCurrentQuery(), props.filters);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n PriorityFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (_) {\n return {\n filterName: props.store.getCurrentResult().getMetadataValue(\"priority_filter\")\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PriorityFilterComponent.prototype.render = function () {\n var _this = this;\n var priorityFilter = this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n if (!priorityFilter) {\n return null;\n }\n var priorityFilterName = priorityFilter.name;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-priorityFilter\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.top, className: \"as-priorityFilter__top\", dictionary: this.props.dictionary, data: {\n name: priorityFilterName\n } }),\n (0, preact_1.h)(\"div\", { className: \"as-priorityFilter__itemsList\" },\n (0, preact_1.h)(\"ul\", null, Object.keys(priorityFilter.values).map(function (key) {\n var data = priorityFilter.values[key];\n return ((0, preact_1.h)(\"li\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(key);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: _this.props.template.item, data: __assign(__assign({}, data), { value: key }), dictionary: _this.props.dictionary })));\n })))));\n };\n return PriorityFilterComponent;\n}(preact_1.Component));\nPriorityFilterComponent.defaultProps = {\n aggregationField: null,\n template: {\n item: defaultTemplates_1.defaultPriorityFilterItemTemplate,\n top: defaultTemplates_1.defaultPriorityFilterTopTemplate\n }\n};\nexports[\"default\"] = PriorityFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultPriorityFilterItemTemplate = exports.defaultPriorityFilterTopTemplate = void 0;\nexports.defaultPriorityFilterTopTemplate = \"\\n {{name}}\\n\";\nexports.defaultPriorityFilterItemTemplate = \"\\n
{{value}}
\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.filterAction = exports.aggregationSetup = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param min\n * @param max\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, min, max) {\n var withMinMax = min === null || max === null;\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var filterType = withMinMax ? 'range_min_max' : 'range';\n var filterValues = withMinMax ? ['..'] : [min + '..' + max];\n clonedQuery.aggregateByRange(filterName, filterField, filterValues, apisearch_1.FILTER_AT_LEAST_ONE, filterType);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param from\n * @param to\n * @param deleteMinMaxAggregation\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, from, to) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var realValueFrom = Math.min(from, to);\n var realValueTo = Math.max(from, to);\n var toWithIncluded = realValueTo + ']';\n clonedQuery.filterByRange(filterName, filterField, [], [realValueFrom + \"..\" + toWithIncluded], apisearch_1.FILTER_AT_LEAST_ONE, 'range_min_max', false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Template_1 = require(\"../Template\");\nvar RangeFilterActions_1 = require(\"./RangeFilterActions\");\n/**\n * Range Filter Component\n */\nvar RangeFilterComponent = /** @class */ (function (_super) {\n __extends(RangeFilterComponent, _super);\n function RangeFilterComponent() {\n var _this = _super.call(this) || this;\n _this.uid = Math.random().toString(16).substr(2, 12);\n _this.observerFrom = _this.configureFromObserver();\n _this.observerTo = _this.configureToObserver();\n _this.rangeUid = 'range-' + _this.uid;\n _this.setState(function (prevState) {\n return {\n from: null,\n to: null,\n min: null,\n max: null,\n visible: true\n };\n });\n return _this;\n }\n /**\n * Components will mount\n */\n RangeFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n (0, RangeFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, filterField, props.minValue, props.maxValue);\n };\n RangeFilterComponent.prototype.configureFromObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_1 = mutationsList; _i < mutationsList_1.length; _i++) {\n var mutation = mutationsList_1[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.from) {\n return;\n }\n that.handleSliderChange([value, that.state.to]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.configureToObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_2 = mutationsList; _i < mutationsList_2.length; _i++) {\n var mutation = mutationsList_2[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.to) {\n return;\n }\n that.handleSliderChange([that.state.from, value]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.componentDidMount = function () {\n this.observerFrom.observe(document.getElementsByClassName('as-rangeFilter__from__' + this.uid)[0], { attributes: true });\n this.observerTo.observe(document.getElementsByClassName('as-rangeFilter__to__' + this.uid)[0], { attributes: true });\n };\n RangeFilterComponent.prototype.componentWillUnmount = function () {\n this.observerFrom.disconnect();\n this.observerTo.disconnect();\n };\n /**\n * Handle change\n *\n * @param e\n */\n RangeFilterComponent.prototype.handleChange = function (e) {\n var uid = this.uid;\n this.applyFilter(e.target.parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, e.target.parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n };\n ;\n RangeFilterComponent.prototype.handleSliderChange = function (values) {\n if (values[0] === this.state.from &&\n values[1] === this.state.to) {\n return false;\n }\n this.applyFilter(values[0], values[1]);\n };\n ;\n /**\n * @param values\n */\n RangeFilterComponent.prototype.handleSliderMove = function (values) {\n this.updateRangeLayer(this.props, this.state, values[0], values[1]);\n };\n ;\n /**\n * Component will receive props\n *\n * @param props\n */\n RangeFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var currentResult = props\n .store\n .getCurrentResult();\n var aggregation = currentResult.getAggregation(props.filterName);\n if (!(aggregation instanceof apisearch_1.ResultAggregation)) {\n this.setState(function (prevState) {\n return {\n from: prevState.from,\n to: prevState.to,\n min: prevState.min,\n max: prevState.max,\n currency_placeholder: prevState.currency_placeholder,\n visible: false\n };\n });\n return;\n }\n var metadata = aggregation.getMetadata();\n var filter = props\n .store\n .getCurrentQuery()\n .getFilter(props.filterName);\n var min = typeof props.minValue === \"number\" && props.minValue > 0\n ? props.minValue\n : (typeof metadata['min'] === \"number\"\n ? Math.floor(metadata['min'])\n : undefined);\n var max = typeof props.maxValue === \"number\" && props.maxValue > 0\n ? props.maxValue\n : (typeof metadata['max'] === \"number\"\n ? Math.ceil(metadata['max'])\n : undefined);\n var currencyPlaceholder = null;\n var firstItem = currentResult.getFirstItem();\n if (firstItem) {\n var firstItemPrice = firstItem.get('price');\n var firstItemPriceWithCurrency = firstItem.get('price_with_currency');\n if (firstItemPrice && firstItemPriceWithCurrency) {\n currencyPlaceholder = this.getCurrencyPlaceholderFromPriceAndPriceWithCurrency(firstItemPrice, firstItemPriceWithCurrency);\n }\n }\n var fromTo = this.getFromToFromFilter(filter, min, max);\n this.setState(function (prevState) {\n return {\n from: fromTo[0],\n to: fromTo[1],\n min: min,\n max: max,\n currency_placeholder: currencyPlaceholder,\n visible: ((typeof min === \"number\") && (typeof max === \"number\"))\n };\n });\n };\n /**\n * @param filter\n * @param min\n * @param max\n */\n RangeFilterComponent.prototype.getFromToFromFilter = function (filter, min, max) {\n var realMin = Math.min(min, max);\n var realMax = Math.max(min, max);\n if (filter instanceof apisearch_1.Filter) {\n var filterValue = filter.getValues()[0];\n if (typeof filterValue === \"string\") {\n var parts = filterValue.split('..');\n var from = parts[0];\n var to = parts[1].slice(0, -1);\n return [\n Math.max(realMin, parseInt(from)),\n Math.min(realMax, parseInt(to)),\n ];\n }\n }\n return [realMin, realMax];\n };\n /**\n * @param previousProps\n * @param previousState\n */\n RangeFilterComponent.prototype.componentDidUpdate = function (previousProps, previousState) {\n this.updateRangeLayer(previousProps, previousState, previousState.from, previousState.to);\n };\n /**\n * @param props\n * @param state\n * @param from\n * @param to\n */\n RangeFilterComponent.prototype.updateRangeLayer = function (props, state, from, to) {\n var min = state.min;\n var max = state.max;\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof props.callback === \"function\") {\n props.callback(Math.min(from, to), Math.max(from, to), min, max, this.rangeUid, state.currency_placeholder);\n }\n };\n /**\n * @param props\n * @param state\n */\n RangeFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var filterName = props.filterName;\n var ref = (0, compat_1.useRef)(null);\n var topTemplate = props.template.top;\n var sliderTemplate = props.template.slider;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var wrapperClassName = props.classNames.wrapper;\n var that = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n if (!ref.current) {\n return;\n }\n var uid = _this.uid;\n /**\n * Alert if clicked on outside of element\n */\n function handleChange(event) {\n var target = event.target;\n var parentNode = target.parentNode;\n self.applyFilter(parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n }\n // Bind the event listener\n ref.current.addEventListener(\"change\", handleChange);\n return function () {\n // Unbind the event listener on clean up\n ref.current.removeEventListener(\"change\", handleChange);\n };\n }, [ref]);\n var isNative = props.native;\n var isNotNative = !isNative;\n var type = isNative ? 'range' : 'number';\n var eventName = 'onClick';\n var from = state.from;\n var to = state.to;\n var min = state.min;\n var max = state.max;\n var isVisible = state.visible && !(props.store.currentResult.getTotalHits() === 0 &&\n from === min &&\n to === max);\n var visibleStyle = isVisible ? '' : 'display:none!important;';\n return ((0, preact_1.h)(\"div\", { id: this.rangeUid, className: \"as-rangeFilter \".concat(containerClassName), style: visibleStyle },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-rangeFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-rangeFilter__wrapper \".concat(wrapperClassName) },\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__from \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__from__\").concat(this.uid) }, props.attributes.from, { value: from, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onChange: function (e) {\n var positions = [parseInt(e.target.value), to];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__to \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__to__\").concat(this.uid) }, props.attributes.to, { value: to, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onChange: function (e) {\n var positions = [from, parseInt(e.target.value)];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"div\", { \"class\": \"slider\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: sliderTemplate, dictionary: this.props.dictionary })))));\n };\n /**\n * Apply filter\n */\n RangeFilterComponent.prototype.applyFilter = function (valueFrom, valueTo) {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, RangeFilterActions_1.filterAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, valueFrom, valueTo);\n };\n /**\n * @param price\n * @param priceWithCurrency\n * @private\n */\n RangeFilterComponent.prototype.getCurrencyPlaceholderFromPriceAndPriceWithCurrency = function (price, priceWithCurrency) {\n price = (price + '').replace('.', '').replace(',', '');\n priceWithCurrency = (priceWithCurrency + '').replace('.', '').replace(',', '');\n var regex = new RegExp(price + '0*');\n var currencyPlaceholder = priceWithCurrency.replace(regex, \"__price__\");\n return currencyPlaceholder;\n };\n return RangeFilterComponent;\n}(preact_1.Component));\nRangeFilterComponent.defaultProps = {\n maxValueIncluded: true,\n step: 1,\n minValue: null,\n maxValue: null,\n native: false,\n classNames: {\n container: '',\n top: '',\n wrapper: '',\n input: '',\n from: '',\n to: ''\n },\n attributes: {\n from: '',\n to: ''\n },\n template: {\n top: '',\n slider: ''\n }\n};\nexports[\"default\"] = RangeFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.reloadAction = void 0;\n/**\n * Clear filters actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Clear filters action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n */\nfunction reloadAction(environmentId, currentQuery, repository) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n if (repository instanceof apisearch_1.HttpRepository) {\n var httpClient = repository.getHttpClient();\n if (httpClient instanceof apisearch_1.CacheClient) {\n httpClient.flushCache();\n }\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.reloadAction = reloadAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ReloadActions_1 = require(\"./ReloadActions\");\n/**\n * ReloadComponent\n */\nvar ReloadComponent = /** @class */ (function (_super) {\n __extends(ReloadComponent, _super);\n function ReloadComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ReloadActions_1.reloadAction)(environmentId, currentQuery, repository);\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {}\n */\n ReloadComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n return ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName), onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary })));\n };\n return ReloadComponent;\n}(preact_1.Component));\nReloadComponent.defaultProps = {\n classNames: {\n container: \"\"\n },\n template: {\n container: \"Reload\"\n }\n};\nexports[\"default\"] = ReloadComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Template_1 = require(\"../Template\");\n/**\n * Item\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param nextProps\n * @param nextState\n */\n Item.prototype.shouldComponentUpdate = function (nextProps, nextState) {\n var shouldUpdate = this.props.data.uuid_composed !== nextProps.data.uuid_composed ||\n this.props.data.metadata.image !== nextProps.data.metadata.image ||\n this.props.data.query !== nextProps.data.query;\n if (!shouldUpdate) {\n this.highlight();\n }\n return shouldUpdate;\n };\n Item.prototype.componentDidMount = function () {\n this.highlight();\n };\n Item.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n Item.prototype.highlight = function () {\n var queryText = this.props.data.query_text;\n if (this.props.data.highlights_enabled && queryText !== \"\") {\n var element = document.getElementById(\"as-result-\" + this.props.data.uuid_composed);\n (0, Highlight_1.highlightElement)(element, queryText);\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n Item.prototype.render = function () {\n var _a;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var dictionary = (_a = props.dictionary) !== null && _a !== void 0 ? _a : {};\n var id = \"as-result-\" + data.uuid_composed;\n var isBestMatch = data.metadata.best_match ? \"best-match\" : \"\";\n var isExactMatch = data.metadata.exact_match ? \"exact-match\" : \"\";\n return (0, preact_1.h)(Template_1[\"default\"], { template: template, data: data, id: id, className: \"\".concat(props.className, \" \").concat(isBestMatch, \" \").concat(isExactMatch), dictionary: dictionary });\n };\n return Item;\n}(preact_1.Component));\nexports[\"default\"] = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.infiniteScrollNextPageAction = exports.configureQuery = void 0;\n/**\n * Search actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n *\n * Configure query\n *\n * @param environmentId\n * @param currentQuery\n * @param itemsPerPage\n * @param highlightsEnabled\n * @param promotedUUIDs\n * @param excludedUUIDs\n * @param fields\n * @param filter\n * @param minScore\n */\nfunction configureQuery(environmentId, currentQuery, itemsPerPage, highlightsEnabled, promotedUUIDs, excludedUUIDs, fields, filter, minScore) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n filter(clonedQuery);\n /**\n * Set result size\n */\n clonedQuery.size = itemsPerPage;\n /**\n * Set specific fields\n */\n clonedQuery.setFields(fields);\n /**\n * Promoted uuids\n */\n for (var i in promotedUUIDs) {\n if (promotedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.promoteUUID(promotedUUIDs[i]);\n }\n }\n /**\n * excluded uuids\n */\n for (var i in excludedUUIDs) {\n if (excludedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.excludeUUID(excludedUUIDs[i]);\n }\n }\n if (minScore > 0) {\n clonedQuery.minScore = minScore;\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.configureQuery = configureQuery;\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param nextPage\n */\nfunction infiniteScrollNextPageAction(environmentId, currentQuery, repository, nextPage) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = nextPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.infiniteScrollNextPageAction = infiniteScrollNextPageAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar ItemUUID_1 = require(\"apisearch/lib/Model/ItemUUID\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar Item_1 = require(\"./Item\");\nvar ResultActions_1 = require(\"./ResultActions\");\nvar Common_1 = require(\"../Common\");\n/**\n * Result Component\n */\nvar ResultComponent = /** @class */ (function (_super) {\n __extends(ResultComponent, _super);\n /**\n * Constructor\n */\n function ResultComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.fromLoadingNextPage = false;\n _this.observer = (0, compat_1.useRef)();\n _this.endResultsBoxRef = (0, compat_1.useCallback)(function (node) {\n if (_this.observer.current instanceof IntersectionObserver) {\n _this.observer.current.disconnect();\n }\n _this.observer.current = new IntersectionObserver(function (entries) {\n if (entries[0].isIntersecting) {\n _this.loadNextPage();\n }\n });\n if ((_this.observer.current instanceof IntersectionObserver) && node) {\n _this.observer.current.observe(node);\n }\n }, []);\n /**\n * @param word\n */\n _this.handleAlternativeClick = function (word) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n _this.state = {\n customResponse: \"\",\n focus: props.fadeInSelector === \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n return _this;\n }\n ResultComponent.prototype.loadNextPage = function () {\n var _a = this.props, environmentId = _a.environmentId, store = _a.store, repository = _a.repository;\n this.fromLoadingNextPage = true;\n this.currentExpectedPage = this.state.page + 1;\n (0, ResultActions_1.infiniteScrollNextPageAction)(environmentId, store.getCurrentQuery(), repository, this.currentExpectedPage);\n };\n /**\n * Hook that change state once mouse clicks inside or outside the container\n */\n ResultComponent.prototype.addMouseDownListeners = function (ref, fadeInSelector) {\n var _this = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event) {\n self.setState(function () {\n return {\n focus: event.target.closest(fadeInSelector) != null\n };\n });\n }\n // Bind the event listener\n document.addEventListener(\"mousedown\", handleClickOutside, { passive: true });\n return function () {\n // Unbind the event listener on clean up\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n ResultComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.store.getCurrentResult() == null) {\n this.setState(function (_) {\n return {\n customResponse: \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n });\n return;\n }\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var items = currentResult.getItems();\n var currentPage = this.page();\n var hasNewPage = (currentResult.getTotalHits() > (currentPage * currentQuery.getSize()));\n var currentItems = this.fromLoadingNextPage\n ? this.state.items.concat(items)\n : items;\n this.fromLoadingNextPage = false;\n this.currentExpectedPage = undefined;\n this.setState(function (_) {\n return {\n customResponse: currentResult.getMetadataValue(\"custom_response\"),\n hasNewPage: hasNewPage,\n items: currentItems,\n page: currentPage\n };\n });\n };\n /**\n * Component will mount\n */\n ResultComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, ResultActions_1.configureQuery)(props.environmentId, props.store.getCurrentQuery(), props.itemsPerPage, props.highlightsEnabled, props.promote.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.exclude.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.fields, props.filter, props.minScore);\n };\n /**\n * @private\n */\n ResultComponent.prototype.page = function () {\n var _a;\n return (_a = this.currentExpectedPage) !== null && _a !== void 0 ? _a : this.props.store.getCurrentQuery().getPage();\n };\n /**\n * Render\n *\n * @return {any}\n */\n ResultComponent.prototype.render = function () {\n var _this = this;\n var _a;\n var that = this;\n var props = this.props;\n var dirty = props.store.isDirty();\n var containerClassName = props.classNames.container;\n var itemsListClassName = props.classNames.itemsList;\n var placeholderClassName = props.classNames.placeholder;\n var itemsListTemplate = props.template.itemsList;\n var placeholderTemplate = (_a = props.template.placeholder) !== null && _a !== void 0 ? _a : \"\";\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var currentVisibleResults = props.currentVisibleResults;\n var subResults = Object.values(currentResult.getSubresults());\n var wrapperRef = (0, compat_1.useRef)(null);\n var customResponse = currentResult.getMetadataValue(\"custom_response\");\n var redirection = currentResult.getMetadataValue(\"redirection\");\n // Check for custom response html\n var customResponseBody;\n if (customResponse) {\n customResponseBody = ((0, preact_1.h)(Template_1[\"default\"], { template: customResponse.content, className: \"as-result__custom_response\", dictionary: this.props.dictionary }));\n if (customResponse.only) {\n return customResponseBody;\n }\n }\n var resetRedirectionOnEnter = true;\n if (redirection) {\n if (redirection.type === \"automatic\") {\n window.top.location.href = redirection.url;\n }\n else if (redirection.type === \"on_enter\") {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: redirection.url\n }, \"*\");\n resetRedirectionOnEnter = false;\n }\n if (this.props.template.redirection) {\n customResponseBody = (0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.redirection, data: {\n url: redirection.url,\n query: currentQuery.getQueryText()\n }, className: \"as-result__redirection\", dictionary: this.props.dictionary }),\n customResponseBody);\n }\n }\n if (resetRedirectionOnEnter) {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: undefined\n }, \"*\");\n }\n var hasInfiniteScrollNextPage = (props.infiniteScroll !== false) &&\n ((props.infiniteScroll === true) ||\n (props.infiniteScroll >= 0)) &&\n this.state.hasNewPage;\n var infiniteScrollMargin = hasInfiniteScrollNextPage\n ? (props.infiniteScroll === true\n ? 0\n : props.infiniteScroll)\n : undefined;\n if (props.fadeInSelector !== \"\") {\n this.addMouseDownListeners(wrapperRef, props.fadeInSelector);\n }\n if (!currentVisibleResults || !this.state.focus) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName) }));\n }\n /**\n * Data accessible to the template\n */\n var items = this.state.items;\n var reducedTemplateData = {\n query: currentQuery.getQueryText(),\n suggestions: currentResult.getSuggestions()\n };\n /**\n * We should add positions to items\n * When the number of items to render is higher than the page size, we are in front of infinite scroll\n */\n var page = this.state.page;\n var isInfiniteActive = page > 1;\n var firstItem = ((this.state.page - 1) * currentQuery.getSize());\n var itemsForEvent = items;\n if (isInfiniteActive) {\n itemsForEvent = Array.prototype.slice.call(items, firstItem);\n }\n Array.prototype.forEach.call(itemsForEvent, function (item) {\n item.position = ++firstItem;\n item.id = item.getId();\n });\n window.postMessage({\n name: \"apisearch_result_items\",\n query: currentQuery.toArray(),\n query_text: currentQuery.getQueryText(),\n with_results: items.length > 0,\n page: this.state.page,\n site: props.store.getSite(),\n device: props.store.getDevice(),\n items: itemsForEvent.map(function (item) {\n return {\n fields: item.fields,\n uuid: item.uuid\n };\n })\n }, \"*\");\n /**\n * Uses defined a custom items list. Old version\n */\n if (props.template.itemsList !== defaultTemplates_1.defaultItemsListTemplate) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef, style: \"position: relative\" },\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : (0, preact_1.h)(Template_1[\"default\"], { template: itemsListTemplate, data: __assign(__assign({}, reducedTemplateData), { items: (items)\n ? items.map(function (item, position) { return _this.hydrateItem(item, position); })\n : [] }), className: \"as-result__itemsList \".concat(itemsListClassName), dictionary: this.props.dictionary }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? (0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } }))\n : (0, preact_1.h)(\"div\", { ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative;\") }))\n : \"\"));\n }\n if (dirty) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: props.dictionary })));\n }\n /**\n * New version\n */\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n customResponseBody,\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : ((items.length > 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-result__itemsList \".concat(props.classNames.itemsList) },\n items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), { query: currentQuery.getQueryText() }), template: props.template.item, className: \"as-result__item \".concat(props.classNames.item), dictionary: props.dictionary });\n }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? \"\"\n : ((0, preact_1.h)(\"div\", { id: \"as-result__infinite_scroll_inspector\", ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative; width: 100%;\") })))\n : \"\"))\n : \"\"),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? ((0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } })))\n : \"\")\n : \"\",\n (subResults.length > 0)\n ? (0, preact_1.h)(\"div\", { className: \"as-result__alternativeList\" }, subResults.map(function (subResult) {\n return (0, preact_1.h)(\"div\", { className: \"as-result__alternative\" },\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_query\" },\n (0, preact_1.h)(\"span\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_title, data: {\n word: subResult.metadata.query_text_html\n }, dictionary: props.dictionary })),\n (0, preact_1.h)(\"a\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_all_results, data: {\n num: subResult.getTotalHits()\n }, dictionary: props.dictionary }))),\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_items\" }, subResult.items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), template: props.template.item, className: \"as-result__alternative_item \".concat(props.classNames.item), dictionary: _this.props.dictionary });\n })));\n }))\n : (((items.length === 0) && customResponseBody === undefined)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: props.template.noResults, data: {\n query: currentQuery.getQueryText()\n }, className: \"as-result__noresults \".concat(props.classNames.noResults), dictionary: props.dictionary })\n : \"\")));\n };\n /**\n * @param item\n * @param position\n * @private\n */\n ResultComponent.prototype.hydrateItem = function (item, position) {\n var props = this.props;\n var environmentId = props.environmentId;\n var config = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_CONFIG, \"__\").concat(environmentId));\n var apisearchUI = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId));\n var apisearchReference = apisearchUI.reference;\n var appId = config.app_id;\n var appUUID = item.getAppUUID();\n if (typeof appUUID === \"object\") {\n appId = appUUID.composedUUID();\n }\n var indexId = config.index_id;\n var indexUUID = item.getIndexUUID();\n if (typeof indexUUID === \"object\") {\n indexId = indexUUID.composedUUID();\n }\n var itemId = item.getUUID().composedUUID();\n var mainFields = {};\n Object.assign(mainFields, item.getMetadata(), item.getIndexedMetadata());\n var fieldsConciliation = {};\n Object.keys(props.fieldsConciliation).map(function (field, index) {\n var _a;\n fieldsConciliation[field] = (_a = mainFields[props.fieldsConciliation[field]]) !== null && _a !== void 0 ? _a : undefined;\n });\n Object.assign(mainFields, fieldsConciliation);\n item.fields = mainFields;\n var queryText = \"\";\n if (this.props.store.getCurrentQuery()) {\n queryText = this.props.store.getCurrentQuery().getQueryText();\n }\n return __assign(__assign({}, props.formatData(item)), {\n key: \"item_\" + itemId,\n uuid_composed: itemId,\n click: apisearchReference + '.click(\"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n add_to_cart: apisearchReference + '.interact(\"add_cart\", \"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n query_text: queryText,\n highlights_enabled: this.props.highlightsEnabled,\n striptags: function () {\n return function (val, render) { return render(val).replace(/(<([^>]+)>)/ig, \"\"); };\n }\n });\n };\n return ResultComponent;\n}(preact_1.Component));\nResultComponent.defaultProps = {\n fields: [],\n itemsPerPage: 10,\n highlightsEnabled: false,\n promote: [],\n exclude: [],\n filter: function (query) { return null; },\n subResult: false,\n classNames: {\n container: \"\",\n itemsList: \"\",\n item: \"\",\n noResults: \"\",\n placeholder: \"\"\n },\n template: {\n itemsList: defaultTemplates_1.defaultItemsListTemplate,\n item: defaultTemplates_1.defaultItemTemplate,\n noResults: defaultTemplates_1.defaultNoResultsItemTemplate,\n placeholder: null,\n alternative_title: defaultTemplates_1.defaultAlternativeTitleTemplate,\n alternative_all_results: defaultTemplates_1.defaultAlternativeAllResultsTemplate,\n next_page_button: defaultTemplates_1.defaultNextPageButtonTemplate,\n redirection: null\n },\n formatData: function (data) { return data; },\n fadeInSelector: \"\",\n fieldsConciliation: {}\n};\nexports[\"default\"] = ResultComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultNextPageButtonTemplate = exports.defaultAlternativeAllResultsTemplate = exports.defaultAlternativeTitleTemplate = exports.defaultNoResultsItemTemplate = exports.defaultItemTemplate = exports.defaultItemsListTemplate = void 0;\nexports.defaultItemsListTemplate = \"\\n
\\n {{#items}}\\n
\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n
\\n {{/items}}\\n
\\n {{^items}}No results{{/items}}\\n\";\nexports.defaultItemTemplate = \"\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n\";\nexports.defaultNoResultsItemTemplate = \"\\n No results\\n\";\nexports.defaultAlternativeTitleTemplate = \"{{{word}}}\";\nexports.defaultAlternativeAllResultsTemplate = \"All results ({{num}})\";\nexports.defaultNextPageButtonTemplate = \"Load page {{page}}\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * Autocomplete Component\n */\nvar AutocompleteComponent = /** @class */ (function (_super) {\n __extends(AutocompleteComponent, _super);\n /**\n * Constructor\n */\n function AutocompleteComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n autocomplete: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n AutocompleteComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.autocomplete !== null) {\n this.setState(function (prevState) {\n return {\n autocomplete: props.autocomplete\n };\n });\n }\n else {\n this.setState(function (prevState) {\n return {\n autocomplete: \"\"\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n AutocompleteComponent.prototype.render = function () {\n var autocomplete = this.state.autocomplete;\n var queryText = this.props.queryText;\n var inputClassName = this.props.inputClassName;\n var queryTextLength = queryText.length;\n var autocompleteText = autocomplete.substring(queryTextLength);\n var formattedAutocompleteText = autocompleteText === \"\"\n ? \"\"\n : queryText + autocompleteText + \" ⤷\";\n return ((0, preact_1.h)(\"input\", { type: \"text\", className: \"as-searchInput__input as-searchInput__autocomplete \".concat(inputClassName), placeholder: formattedAutocompleteText, style: \"position: absolute; top: 0px; left: 0px; background-color: white;\" }));\n };\n return AutocompleteComponent;\n}(preact_1.Component));\nexports[\"default\"] = AutocompleteComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.simpleSearchAction = exports.initialSearchSetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Initial Search\n *\n * @param environmentId\n * @param currentQuery\n * @param autocomplete\n * @param searchableFields\n * @param queryOperator\n */\nfunction initialSearchSetup(environmentId, currentQuery, autocomplete, searchableFields, queryOperator) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = 1;\n clonedQuery.queryOperator = queryOperator;\n if (searchableFields.length > 0) {\n clonedQuery.searchableFields = searchableFields;\n }\n if (autocomplete) {\n clonedQuery.enableAutocomplete();\n }\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSearchSetup = initialSearchSetup;\n/**\n * Search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param queryText\n * @param visibleResults\n */\nfunction simpleSearchAction(environmentId, currentQuery, repository, queryText, visibleResults) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [queryText];\n clonedQuery.page = 1;\n if (!visibleResults) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: null,\n visibleResults: visibleResults\n });\n return;\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result,\n visibleResults: visibleResults\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.simpleSearchAction = simpleSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"./SearchInputActions\");\nvar Template_1 = require(\"../Template\");\nvar AutocompleteComponent_1 = require(\"./AutocompleteComponent\");\nvar compat_1 = require(\"preact/compat\");\n/**\n * SearchInput Component\n */\nvar SearchInputComponent = /** @class */ (function (_super) {\n __extends(SearchInputComponent, _super);\n /**\n * Constructor\n */\n function SearchInputComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.inputRef = (0, compat_1.useRef)(null);\n /**\n * @param search\n */\n _this.handleSearch = function (search) {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var finalSpace = search.charAt(search.length - 1) === \" \" ? \" \" : \"\";\n var targetValueNoSpaces = search.trim() + finalSpace;\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, targetValueNoSpaces === \" \" ? \"\" : targetValueNoSpaces, search.length >= startSearchOn);\n };\n /**\n * Clear search\n */\n _this.clearSearch = function () {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var visibleResults = 0 === startSearchOn;\n (0, SearchInputActions_1.simpleSearchAction)(environmentId, currentQuery, repository, \"\", visibleResults);\n };\n if (props.autocomplete) {\n _this.state = { queryText: \"\" };\n }\n var that = _this;\n window.addEventListener(\"beforeunload\", function () {\n that.dispatchQueryStringEvent(props, 0);\n });\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n SearchInputComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState({\n queryText: props.store.getCurrentQuery().getQueryText()\n });\n };\n /**\n * Key down\n */\n SearchInputComponent.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case \"ArrowRight\":\n case \"Tab\":\n case \"Enter\":\n this.replaceWithAutocomplete(e);\n return;\n }\n switch (e.keyCode) {\n case 39:\n case 9:\n case 13:\n this.replaceWithAutocomplete(e);\n return;\n }\n };\n SearchInputComponent.prototype.replaceWithAutocomplete = function (e) {\n var props = this.props;\n var autocomplete = this.props.store.getCurrentResult().getAutocomplete();\n if (autocomplete !== null && autocomplete !== \"\") {\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, this.props.store.getCurrentResult().getAutocomplete(), true);\n e.preventDefault();\n return;\n }\n };\n /**\n * @param e\n */\n SearchInputComponent.prototype.doNothing = function (e) { };\n /**\n * @param config\n */\n SearchInputComponent.prototype.withConfig = function (config) {\n };\n /**\n * @param props\n * @param timeout\n */\n SearchInputComponent.prototype.dispatchQueryStringEvent = function (props, timeout) {\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n if (this.queryTextEvent) {\n this.lastQueryTextStringDispatched = null;\n clearTimeout(this.queryTextEvent);\n }\n if (this.lastQueryTextStringDispatched === currentQueryText) {\n return;\n }\n this.lastQueryTextStringDispatched = currentQueryText;\n if (currentQueryText !== \"\") {\n var that_1 = this;\n this.lastQueryTextStringDispatched = currentQueryText;\n this.queryTextEvent = setTimeout(function () {\n that_1.queryTextEvent = null;\n window.postMessage({\n name: \"apisearch_search\",\n query_text: currentQueryText,\n query: currentQuery.toArray(),\n site: props.store.getSite(),\n device: props.store.getDevice()\n }, \"*\");\n }, timeout);\n }\n };\n /**\n * Search\n *\n * @return {any}\n */\n SearchInputComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var placeholder = props.placeholder;\n var autofocus = props.autofocus;\n var clearSearch = props.clearSearch;\n var withContainer = props.withContainer;\n var containerClassName = props.classNames.container;\n var inputClassName = props.classNames.input;\n var clearSearchClassName = props.classNames.clearSearch;\n var clearSearchTemplate = props.template.clearSearch;\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n var htmlNodeInheritProps = props.htmlNodeInheritProps;\n var showAutocomplete = currentQuery.areAutocompleteEnabled();\n var autocomplete = props.store.getCurrentResult()\n ? props.store.getCurrentResult().getAutocomplete()\n : null;\n var keyDownCallback = showAutocomplete\n ? function (e) { return _this.handleKeyDown(e); }\n : function (e) { return _this.doNothing(e); };\n var keyDownAction = showAutocomplete\n ? function (e) { return _this.replaceWithAutocomplete(e); }\n : function (e) { return _this.doNothing(e); };\n var style = showAutocomplete\n ? \"position: relative; top: 0px; left: 0px; background-color: transparent; border-color: transparent;\"\n : \"\";\n var autocompletableClass = showAutocomplete\n ? \"autocompletable\"\n : \"\";\n this.dispatchQueryStringEvent(props, 2000);\n var searchInput = ((0, preact_1.h)(\"input\", __assign({ type: \"text\", className: \"as-searchInput__input \".concat(inputClassName, \" \").concat(autocompletableClass), placeholder: placeholder, autofocus: autofocus }, htmlNodeInheritProps, { onInput: function (event) { return _this.handleSearch(event.target.value); }, value: currentQueryText, style: style, onKeyDown: keyDownCallback, onTouchStart: keyDownAction, ref: this.inputRef })));\n if (showAutocomplete) {\n searchInput = ((0, preact_1.h)(\"div\", { style: \"position: relative\" },\n (0, preact_1.h)(AutocompleteComponent_1[\"default\"], { autocomplete: autocomplete, queryText: currentQueryText, inputClassName: inputClassName }),\n searchInput));\n }\n if (withContainer) {\n searchInput = ((0, preact_1.h)(\"div\", { className: \"as-searchInput \".concat(containerClassName) },\n searchInput,\n (clearSearch && currentQueryText && currentQueryText.length !== 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-searchInput__clearSearch \".concat(clearSearchClassName), onClick: this.clearSearch },\n (0, preact_1.h)(Template_1[\"default\"], { template: clearSearchTemplate, dictionary: props.dictionary }))) : null));\n }\n return searchInput;\n };\n return SearchInputComponent;\n}(preact_1.Component));\nSearchInputComponent.defaultProps = {\n placeholder: \"\",\n autofocus: false,\n autocomplete: false,\n startSearchOn: 0,\n clearSearch: true,\n withContainer: true,\n searchableFields: [],\n speechRecognition: false,\n classNames: {\n container: \"\",\n input: \"\",\n clearSearch: \"\"\n },\n template: {\n clearSearch: \"x\",\n speechRecognition: \"{S}\"\n }\n};\nexports[\"default\"] = SearchInputComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * SnapshotComponent\n */\nvar SnapshotComponent = /** @class */ (function (_super) {\n __extends(SnapshotComponent, _super);\n function SnapshotComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n SnapshotComponent.prototype.componentWillReceiveProps = function (props) {\n var query = props.store.getCurrentQuery();\n this.setState(function (prevState) {\n return { query: query };\n });\n };\n /**\n * Render\n *\n * @return {}\n */\n SnapshotComponent.prototype.render = function () {\n var queryAsJson = this.state.query == undefined\n ? ''\n : JSON.stringify(this.state.query.toArray());\n return ((0, preact_1.h)(\"div\", null, queryAsJson));\n };\n return SnapshotComponent;\n}(preact_1.Component));\nexports[\"default\"] = SnapshotComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.initialSortBySetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nvar SortByHelper_1 = require(\"./SortByHelper\");\n/**\n * Initial sortBy\n *\n * @param environmentId\n * @param currentQuery\n * @param initialOption\n */\nfunction initialSortBySetup(environmentId, currentQuery, initialOption) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, initialOption);\n clonedQuery.page = 1;\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSortBySetup = initialSortBySetup;\n/**\n * ON change search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedOption\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, selectedOption) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, selectedOption);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SortByActions_1 = require(\"./SortByActions\");\n/**\n * SortBy Filter Component\n */\nvar SortByComponent = /** @class */ (function (_super) {\n __extends(SortByComponent, _super);\n function SortByComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle change\n *\n * @param e\n */\n _this.handleChange = function (e) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var currentOption = e.target.value;\n _this.setState({\n value: currentOption\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.onChangeSearchAction)(environmentId, currentQuery, repository, currentOption);\n };\n return _this;\n }\n /**\n * Components will mount\n */\n SortByComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var options = props.options;\n var currentQuery = props.store.getCurrentQuery();\n var currentOption = options[0].value;\n this.setState({\n value: currentOption,\n visible: false\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.initialSortBySetup)(environmentId, currentQuery, currentOption);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SortByComponent.prototype.componentWillReceiveProps = function (props) {\n var nextFirstSortAsString = props.store.getCurrentQuery().getSortBy().getFirstSortAsString();\n var nextVisible = (props.store.getCurrentResult() != null)\n ? (props.store.getCurrentResult().getTotalHits() > 0)\n : false;\n if (this.state.value !== nextFirstSortAsString ||\n this.state.visible !== nextVisible) {\n this.setState(function (prevState) {\n return {\n value: nextFirstSortAsString,\n visible: nextVisible\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n SortByComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var selectClassName = props.classNames.select;\n if (!state.visible) {\n return;\n }\n var options = props.options;\n var coordinate = props.store.getCurrentQuery().toArray().coordinate;\n if (!coordinate) {\n options = options.filter(function (o) {\n return o.value !== \"distance\";\n });\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-sortBy \".concat(containerClassName) },\n (0, preact_1.h)(\"select\", { className: \"as-sortBy__selector \".concat(selectClassName), onChange: this.handleChange, value: state.value }, options.map(function (option) { return ((0, preact_1.h)(\"option\", { value: option.value }, option.name)); }))));\n };\n return SortByComponent;\n}(preact_1.Component));\nSortByComponent.defaultProps = {\n classNames: {\n container: \"\",\n select: \"\"\n }\n};\nexports[\"default\"] = SortByComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.applySortByToQuery = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\n/**\n * Apply sort by to query\n *\n * @param query Query\n * @param selectedOption string\n */\nfunction applySortByToQuery(query, selectedOption) {\n var sortByData = splitQueryValue(selectedOption);\n var sortBy = apisearch_1[\"default\"].createEmptySortBy();\n if (sortByData.field === \"distance\") {\n sortBy.byValue({\n type: apisearch_1.SORT_BY_TYPE_DISTANCE,\n unit: sortByData.sort\n ? sortByData.sort\n : \"km\"\n });\n }\n else if (sortByData.field === \"score\") {\n sortBy.byValue(apisearch_1.SORT_BY_SCORE);\n }\n else {\n sortBy.byFieldValue(sortByData.field, sortByData.sort);\n }\n query.sortBy(sortBy);\n return query;\n}\nexports.applySortByToQuery = applySortByToQuery;\n/**\n * Split sort by string representation\n *\n * @param string\n *\n * @return {{field: string, sort: string}}\n */\nfunction splitQueryValue(string) {\n var queryValue = string.split(\":\");\n return {\n field: queryValue[0],\n sort: queryValue[1]\n };\n}\n","\"use strict\";\nexports.__esModule = true;\nexports.enableSuggestions = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param numberOfSuggestions\n */\nfunction enableSuggestions(environmentId, currentQuery, numberOfSuggestions) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (numberOfSuggestions > 0) {\n clonedQuery.setNumberOfSuggestions(numberOfSuggestions);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.enableSuggestions = enableSuggestions;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Common_1 = require(\"../Common\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar SuggestionsFilterActions_1 = require(\"./SuggestionsFilterActions\");\nvar Template_1 = require(\"../Template\");\n/**\n * Suggestion Filter Component\n */\nvar SuggestionsFilterComponent = /** @class */ (function (_super) {\n __extends(SuggestionsFilterComponent, _super);\n function SuggestionsFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param word\n */\n _this.handleClick = function (word) {\n var props = _this.props;\n if (typeof word === \"string\") {\n word = word\n .replace(//g, \"\")\n .replace(/<\\/em>/g, \"\");\n }\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n return _this;\n }\n SuggestionsFilterComponent.prototype.componentDidMount = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.highlight = function () {\n var queryText = this.props.store.getCurrentQuery().getQueryText();\n if (queryText !== \"\") {\n var list = document.getElementsByClassName(\"as-suggestions\");\n for (var i = 0; i < list.length; i++) {\n (0, Highlight_1.highlightElement)(list[i], queryText);\n }\n }\n };\n /**\n * Component will mount\n */\n SuggestionsFilterComponent.prototype.componentWillMount = function () {\n this.setState(function (prevState) {\n return {\n words: []\n };\n });\n var props = this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, SuggestionsFilterActions_1.enableSuggestions)(environmentId, currentQuery, props.numberOfSuggestions);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SuggestionsFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n words: props\n .store\n .getCurrentResult()\n .getSuggestions()\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n SuggestionsFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var noSuggestionsClassName = state.words.length > 0\n ? \"\"\n : \"suggestions-empty\";\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions \".concat(containerClassName, \" \").concat(noSuggestionsClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-suggestions__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-suggestions__itemsList \".concat(itemsListClassName) }, state.words.map(function (word) {\n var templateData = {\n word: word\n };\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions__item \".concat(itemClassName), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(word);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: _this.props.dictionary })));\n }))));\n };\n return SuggestionsFilterComponent;\n}(preact_1.Component));\nSuggestionsFilterComponent.defaultProps = {\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = SuggestionsFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n {{word}}\\n\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Mustache = require(\"mustache\");\nvar Translate_1 = require(\"./Translate\");\n/**\n * Template\n */\nvar Template = /** @class */ (function (_super) {\n __extends(Template, _super);\n function Template() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Render template\n *\n * @param template\n * @param result\n * @param dictionary\n *\n * @return {any}\n */\n _this.renderTemplate = function (template, result, dictionary) {\n var trans = function () {\n return function (text, render) {\n return render(Translate_1[\"default\"].trans(text, dictionary));\n };\n };\n var output = Mustache.render(template, __assign(__assign({}, result), {\n \"trans\": trans\n }));\n return {\n __html: output\n };\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {any}\n */\n Template.prototype.render = function () {\n var _a, _b;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var className = props.className;\n var id = (_a = props.id) !== null && _a !== void 0 ? _a : \"\";\n var dictionary = (_b = props.dictionary) !== null && _b !== void 0 ? _b : {};\n return (template)\n ? (0, preact_1.h)(\"div\", { id: id, className: className, dangerouslySetInnerHTML: this.renderTemplate(template, data, dictionary) })\n : null;\n };\n return Template;\n}(preact_1.Component));\nexports[\"default\"] = Template;\n","\"use strict\";\nexports.__esModule = true;\nvar Translate = /** @class */ (function () {\n function Translate() {\n }\n Translate.trans = function (text, dictionary) {\n var _a, _b, _c;\n var parsed = [];\n try {\n parsed = JSON.parse(text);\n }\n catch (_d) {\n return (_a = dictionary[text]) !== null && _a !== void 0 ? _a : text;\n }\n var parsedText = (_b = parsed[0]) !== null && _b !== void 0 ? _b : text;\n parsedText = (_c = dictionary[parsedText]) !== null && _c !== void 0 ? _c : parsedText;\n for (var i = 1; i <= parsed.length; i++) {\n parsedText = parsedText.replace(\"$\" + i, parsed[i]);\n }\n return parsedText;\n };\n return Translate;\n}());\nexports[\"default\"] = Translate;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar BannerComponent_1 = require(\"../components/Banner/BannerComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Banner\n */\nvar Banner = /** @class */ (function (_super) {\n __extends(Banner, _super);\n /**\n * @param target\n * @param breakingPointSize\n * @param position\n * @param imagePrefix\n */\n function Banner(_a) {\n var target = _a.target, breakingPointSize = _a.breakingPointSize, position = _a.position, imagePrefix = _a.imagePrefix;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(BannerComponent_1[\"default\"], { target: target, breakingPointSize: breakingPointSize, position: position, imagePrefix: imagePrefix });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Banner.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return Banner;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Banner(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar CheckboxFilterComponent_1 = require(\"../components/CheckboxFilter/CheckboxFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * CheckboxFilter\n */\nvar CheckboxFilter = /** @class */ (function (_super) {\n __extends(CheckboxFilter, _super);\n function CheckboxFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, label = _a.label, filterValue = _a.filterValue, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(CheckboxFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, label: label, filterValue: filterValue, classNames: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n CheckboxFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n CheckboxFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n CheckboxFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n CheckboxFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return CheckboxFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new CheckboxFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ClearFiltersComponent_1 = require(\"../components/ClearFilters/ClearFiltersComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Clear Filters\n */\nvar ClearFilters = /** @class */ (function (_super) {\n __extends(ClearFilters, _super);\n /**\n * @param target\n * @param classNames\n * @param template\n * @param showIndividualFilterClear\n * @param showGlobalFilterClear\n * @param showIndividualFilterValueClear\n */\n function ClearFilters(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, showIndividualFilterClear = _a.showIndividualFilterClear, showGlobalFilterClear = _a.showGlobalFilterClear, showIndividualFilterValueClear = _a.showIndividualFilterValueClear;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ClearFiltersComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.classNames), classNames), showIndividualFilterClear: showIndividualFilterClear, showGlobalFilterClear: showGlobalFilterClear, showIndividualFilterValueClear: showIndividualFilterValueClear, template: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n ClearFilters.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return ClearFilters;\n}(Widget_1[\"default\"]));\n/**\n * Clear filters widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new ClearFilters(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar InformationComponent_1 = require(\"../components/Information/InformationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Information\n */\nvar Information = /** @class */ (function (_super) {\n __extends(Information, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n * @param formatData\n */\n function Information(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, formatData = _a.formatData;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(InformationComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.template), template), formatData: formatData });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Information.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Information;\n}(Widget_1[\"default\"]));\n/**\n * Information widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Information(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../components/MultipleFilter/Helpers\");\nvar MultipleFilterActions_1 = require(\"../components/MultipleFilter/MultipleFilterActions\");\nvar MultipleFilterComponent_1 = require(\"../components/MultipleFilter/MultipleFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Multiple Filter\n */\nvar MultipleFilter = /** @class */ (function (_super) {\n __extends(MultipleFilter, _super);\n /**\n * @param target\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param fetchLimit\n * @param viewLimit\n * @param sortBy\n * @param ranges\n * @param labels\n * @param classNames\n * @param template\n * @param formatData\n * @param activeFirst\n * @param promoted\n */\n function MultipleFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, aggregationField = _a.aggregationField, applicationType = _a.applicationType, fetchLimit = _a.fetchLimit, viewLimit = _a.viewLimit, sortBy = _a.sortBy, ranges = _a.ranges, labels = _a.labels, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, activeFirst = _a.activeFirst, promoted = _a.promoted;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.filterField = filterField;\n _this.aggregationField = aggregationField !== null && aggregationField !== void 0 ? aggregationField : filterField;\n _this.component = (0, preact_1.h)(MultipleFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: _this.filterField, aggregationField: _this.aggregationField, applicationType: applicationType, fetchLimit: fetchLimit, viewLimit: viewLimit, sortBy: sortBy, ranges: ranges, labels: labels, classNames: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, activeFirst: activeFirst, promoted: promoted });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n MultipleFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n MultipleFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filter = query.filters[filterName];\n var filterValues = filter.values;\n if (filterValues.length > 0) {\n if (filter.application_type === 6) {\n var levelsValues = (0, Helpers_1.getShadowFilterValuesFromQuery)(query, filterName, false);\n object[filterField] = {\n l: levelsValues,\n v: filter.values\n };\n }\n else {\n object[filterField] = filterValues;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n MultipleFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n var rangesValues = Object.keys(this.component.props.ranges);\n var filterType = (rangesValues.length > 0) ? \"range\" : \"field\";\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n (Array.isArray(fieldValues) && (fieldValues.length > 0) ||\n (typeof fieldValues === \"object\") && (Object.keys(fieldValues).length > 0))) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n var applicationType = this.component.props.applicationType;\n var fieldName = \"indexed_metadata.\" + this.component.props.filterField;\n if (applicationType === 6) {\n var originalFieldValues = fieldValues;\n fieldValues = originalFieldValues.v;\n var leveledValues = originalFieldValues.l;\n for (var it_1 = 0; it_1 < leveledValues.length; it_1++) {\n var level = it_1 + 1;\n var fieldNameWithoutPrefix = fieldName.substr(17);\n var leveledFilterName = fieldNameWithoutPrefix + \"_level_\" + level;\n var leveledFieldName = \"indexed_metadata.\" + leveledFilterName;\n query.filters[leveledFilterName] = {\n application_type: applicationType,\n field: leveledFieldName,\n filter_type: apisearch_1.FILTER_TYPE_FIELD,\n values: [leveledValues[it_1]]\n };\n }\n fieldName = fieldName + \"_level_\" + (leveledValues.length + 1);\n }\n query.filters[filterName] = {\n application_type: applicationType,\n field: fieldName,\n filter_type: filterType,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n MultipleFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n /**\n * @param environmentId\n * @param query\n */\n MultipleFilter.prototype.normalizeQuery = function (environmentId, query) {\n var filterName = this.component.props.filterName;\n if ((0, Helpers_1.isFilterAvailable)(query, filterName, 6)) {\n (0, MultipleFilterActions_1.modifyQueryAggregationWithProperLevelValue)(environmentId, query, filterName, this.filterField, this.aggregationField);\n }\n };\n return MultipleFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new MultipleFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PaginationComponent_1 = require(\"../components/Pagination/PaginationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Pagination\n */\nvar Pagination = /** @class */ (function (_super) {\n __extends(Pagination, _super);\n /**\n * Constructor\n *\n * @param target\n * @param padding\n * @param goFirstLast\n * @param classNames\n * @param template\n */\n function Pagination(_a) {\n var target = _a.target, padding = _a.padding, goFirstLast = _a.goFirstLast, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PaginationComponent_1[\"default\"], { target: target, padding: padding, goFirstLast: goFirstLast, classNames: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Pagination.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n /**\n * @param query\n */\n Pagination.prototype.reset = function (query) {\n delete query.page;\n };\n return Pagination;\n}(Widget_1[\"default\"]));\n/**\n * Pagination widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Pagination(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PriorityFilterComponent_1 = require(\"../components/PriorityFilter/PriorityFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * PriorityFilter\n */\nvar PriorityFilter = /** @class */ (function (_super) {\n __extends(PriorityFilter, _super);\n /**\n *\n * @param target\n * @param filters\n * @param template\n */\n function PriorityFilter(_a) {\n var target = _a.target, filters = _a.filters, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PriorityFilterComponent_1[\"default\"], { target: target, filters: filters, template: __assign(__assign({}, PriorityFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n PriorityFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return PriorityFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new PriorityFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar RangeFilterComponent_1 = require(\"../components/RangeFilter/RangeFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * RangeFilter\n */\nvar RangeFilter = /** @class */ (function (_super) {\n __extends(RangeFilter, _super);\n function RangeFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, minValue = _a.minValue, maxValue = _a.maxValue, minMaxCallback = _a.minMaxCallback, step = _a.step, callback = _a.callback, onSliderMove = _a.onSliderMove, template = _a.template, classNames = _a.classNames, attributes = _a.attributes, native = _a.native;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(RangeFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, minValue: minValue, maxValue: maxValue, minMaxCallback: minMaxCallback, step: step, callback: callback, onSliderMove: onSliderMove, native: native, template: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.template), template), classNames: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.classNames), classNames), attributes: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.attributes), attributes) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n RangeFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n RangeFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n if (query.filters !== undefined && query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n RangeFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues,\n filter_type: \"range\"\n };\n }\n };\n /**\n * @param query\n */\n RangeFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return RangeFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new RangeFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ReloadComponent_1 = require(\"../components/Reload/ReloadComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Reload\n */\nvar Reload = /** @class */ (function (_super) {\n __extends(Reload, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Reload(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ReloadComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ReloadComponent_1[\"default\"].defaultProps.classNames), classNames), template: template });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Reload.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Reload;\n}(Widget_1[\"default\"]));\n/**\n * Reload filter\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Reload(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ResultComponent_1 = require(\"../components/Result/ResultComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Result\n */\nvar Result = /** @class */ (function (_super) {\n __extends(Result, _super);\n /**\n * Constructor\n *\n * @param target\n * @param fields\n * @param itemsPerPage\n * @param promote\n * @param exclude\n * @param filter\n * @param highlightsEnabled\n * @param classNames\n * @param template\n * @param formatData\n * @param fadeInSelector\n * @param infiniteScroll\n * @param infiniteScrollButton\n * @param fieldsConciliation\n * @param minScore\n */\n function Result(_a) {\n var target = _a.target, fields = _a.fields, itemsPerPage = _a.itemsPerPage, promote = _a.promote, exclude = _a.exclude, filter = _a.filter, highlightsEnabled = _a.highlightsEnabled, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, fadeInSelector = _a.fadeInSelector, infiniteScroll = _a.infiniteScroll, infiniteScrollButton = _a.infiniteScrollButton, fieldsConciliation = _a.fieldsConciliation, minScore = _a.minScore;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(ResultComponent_1[\"default\"], { target: target, fields: fields, itemsPerPage: itemsPerPage, promote: promote, exclude: exclude, filter: filter, highlightsEnabled: highlightsEnabled, classNames: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, fadeInSelector: fadeInSelector, infiniteScroll: infiniteScroll, infiniteScrollButton: infiniteScrollButton, fieldsConciliation: fieldsConciliation, minScore: minScore });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Result.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, currentVisibleResults: store.resultsAreVisible(), dictionary: dictionary });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n */\n Result.prototype.reset = function (query) {\n delete query.page;\n this.component.state = {\n page: 1\n };\n };\n return Result;\n}(Widget_1[\"default\"]));\n/**\n * Result widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Result(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"../components/SearchInput/SearchInputActions\");\nvar SearchInputComponent_1 = require(\"../components/SearchInput/SearchInputComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SearchInput\n */\nvar SearchInput = /** @class */ (function (_super) {\n __extends(SearchInput, _super);\n /**\n * Constructor\n *\n * @param target\n * @param placeholder\n * @param startSearchOn\n * @param clearSearch\n * @param withContainer\n * @param autofocus\n * @param autocomplete\n * @param classNames\n * @param template\n * @param searchableFields\n * @param speechRecognition\n * @param queryOperator\n */\n function SearchInput(_a) {\n var target = _a.target, placeholder = _a.placeholder, startSearchOn = _a.startSearchOn, clearSearch = _a.clearSearch, withContainer = _a.withContainer, autofocus = _a.autofocus, autocomplete = _a.autocomplete, classNames = _a.classNames, template = _a.template, searchableFields = _a.searchableFields, speechRecognition = _a.speechRecognition, queryOperator = _a.queryOperator;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SearchInputComponent_1[\"default\"], { target: target, placeholder: placeholder, autofocus: autofocus, autocomplete: autocomplete, startSearchOn: startSearchOn, clearSearch: clearSearch, withContainer: withContainer, searchableFields: searchableFields, speechRecognition: speechRecognition, classNames: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.template), template), queryOperator: queryOperator, config: _this.config });\n _this.queryOperator = queryOperator;\n _this.autocomplete = autocomplete;\n _this.searchableFields = searchableFields;\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SearchInput.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, htmlNodeInheritProps: {\n autocomplete: \"off\",\n spellcheck: false\n }, dictionary: dictionary });\n if (this.target === null) {\n return;\n }\n if (!this.targetNode) {\n var targetNode = document.querySelector(this.target);\n var isInput = isInputElement(targetNode);\n if (isInput) {\n this.component.props = __assign(__assign({}, this.component.props), { withContainer: false, htmlNodeInheritProps: __assign(__assign({}, this.component.props.htmlNodeInheritedProps), getNodeAttributes(targetNode)) });\n var parentNode = targetNode.parentNode;\n targetNode.remove();\n this.targetNode = parentNode;\n }\n else {\n this.targetNode = targetNode;\n }\n }\n if (this.isSecondRender === undefined) {\n this.isSecondRender = true;\n }\n else if (this.isSecondRender === true) {\n this.isSecondRender = false;\n }\n if (!this.targetNode) {\n return;\n }\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n * @param object\n */\n SearchInput.prototype.toUrlObject = function (query, object) {\n var q = query.q;\n if (q !== undefined &&\n q !== \"\") {\n object.q = q;\n }\n };\n /**\n * @param object\n * @param query\n */\n SearchInput.prototype.fromUrlObject = function (object, query) {\n var q = object.q;\n if (q !== undefined &&\n q !== \"\") {\n query.q = q;\n }\n };\n /**\n * @param query\n */\n SearchInput.prototype.reset = function (query) {\n delete query.q;\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n SearchInput.prototype.initialSetup = function (environmentId, store, repository) {\n /**\n * Dispatch action\n */\n (0, SearchInputActions_1.initialSearchSetup)(environmentId, store.getCurrentQuery(), this.autocomplete, this.searchableFields, this.queryOperator);\n };\n return SearchInput;\n}(Widget_1[\"default\"]));\n/**\n * Returns an object of an\n * html node attributes.\n *\n * @param htmlNode\n * @returns {{}}\n */\nvar getNodeAttributes = function (htmlNode) {\n var _a;\n var nodeAttributes = {};\n for (var i = 0; i < htmlNode.attributes.length; i++) {\n var attr = htmlNode.attributes[i];\n if (attr.specified) {\n nodeAttributes = __assign(__assign({}, nodeAttributes), (_a = {}, _a[attr.name] = attr.value, _a));\n }\n }\n return nodeAttributes;\n};\n/**\n * Checks if an html node\n * is an input.\n *\n * @param targetNode\n * @returns {boolean}\n */\nvar isInputElement = function (targetNode) {\n return targetNode instanceof HTMLInputElement;\n};\n/**\n * Search Input widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SearchInput(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SnapshotComponent_1 = require(\"../components/Snapshot/SnapshotComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Snapshot\n */\nvar Snapshot = /** @class */ (function (_super) {\n __extends(Snapshot, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Snapshot(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SnapshotComponent_1[\"default\"], { target: target });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Snapshot.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Snapshot;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Snapshot(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar SortByComponent_1 = require(\"../components/SortBy/SortByComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SortBy\n */\nvar SortBy = /** @class */ (function (_super) {\n __extends(SortBy, _super);\n function SortBy(_a) {\n var target = _a.target, classNames = _a.classNames, options = _a.options;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(SortByComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, SortByComponent_1[\"default\"].defaultProps.classNames), classNames), options: options });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SortBy.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @private\n */\n SortBy.prototype.firstOptionAsString = function () {\n return this.component.props.options[0].value;\n };\n /**\n * @param query\n * @param object\n */\n SortBy.prototype.toUrlObject = function (query, object) {\n if (query.sort !== undefined) {\n var sort = query.sort[0];\n var sortInstance = apisearch_1.SortBy.createFromArray(query.sort);\n var sortAsString = sortInstance.getFirstSortAsString();\n var firstSortAsString = this.firstOptionAsString();\n if (sortAsString !== firstSortAsString) {\n if (sort.type === \"distance\") {\n object.sort = \"distance:\" + sort.unit + \":\" + sort.coordinate.lat + \":\" + sort.coordinate.lon;\n }\n else {\n object.sort = sort.field.substr(17) + \":\" + sort.order;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n SortBy.prototype.fromUrlObject = function (object, query) {\n if (object.sort !== undefined) {\n SortBy.setSortToQuery(query, object.sort);\n }\n };\n /**\n * @param query\n */\n SortBy.prototype.reset = function (query) {\n delete query.sort;\n var firstSortAsString = this.firstOptionAsString();\n SortBy.setSortToQuery(query, firstSortAsString);\n };\n /**\n * @param query\n * @param option\n * @private\n */\n SortBy.setSortToQuery = function (query, option) {\n if (option === \"score\") {\n return;\n }\n query.sort = [{}];\n if (option.indexOf(\"distance:\") === 0) {\n var distanceSortParts = option.split(\":\");\n query.sort[0].type = distanceSortParts[0];\n query.sort[0].unit = distanceSortParts[1];\n query.sort[0].coordinate = {\n lat: distanceSortParts[2],\n lon: distanceSortParts[3]\n };\n return;\n }\n var sortParts = option.split(\":\");\n query.sort[0].type = \"field\";\n query.sort[0].field = \"indexed_metadata.\" + sortParts[0];\n query.sort[0].order = sortParts[1];\n };\n return SortBy;\n}(Widget_1[\"default\"]));\n/**\n * SortBy widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SortBy(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SuggestionsFilterComponent_1 = require(\"../components/Suggestions/SuggestionsFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SuggestionsFilter\n */\nvar SuggestionsFilter = /** @class */ (function (_super) {\n __extends(SuggestionsFilter, _super);\n function SuggestionsFilter(_a) {\n var target = _a.target, numberOfSuggestions = _a.numberOfSuggestions, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SuggestionsFilterComponent_1[\"default\"], { target: target, numberOfSuggestions: numberOfSuggestions, classNames: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SuggestionsFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return SuggestionsFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SuggestionsFilter(settings); });\n","\"use strict\";\nexports.__esModule = true;\n/**\n * Widget\n */\nvar Widget = /** @class */ (function () {\n function Widget() {\n }\n Widget.prototype.withConfig = function (config) {\n if (\"withConfig\" in this.component) {\n this.component.withConfig(config);\n }\n };\n /**\n * @param query\n * @param object\n */\n Widget.prototype.toUrlObject = function (query, object) {\n };\n /**\n * @param object\n * @param query\n */\n Widget.prototype.fromUrlObject = function (object, query) {\n };\n /**\n * @param query\n */\n Widget.prototype.reset = function (query) {\n };\n /**\n * @param environmentId\n * @param query\n */\n Widget.prototype.normalizeQuery = function (environmentId, query) {\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n Widget.prototype.initialSetup = function (environmentId, store, repository) {\n };\n return Widget;\n}());\nexports[\"default\"] = Widget;\n","\"use strict\";\nexports.__esModule = true;\nvar CheckboxFilter_1 = require(\"./CheckboxFilter\");\nvar ClearFilters_1 = require(\"./ClearFilters\");\nvar Information_1 = require(\"./Information\");\nvar MultipleFilter_1 = require(\"./MultipleFilter\");\nvar Pagination_1 = require(\"./Pagination\");\nvar RangeFilter_1 = require(\"./RangeFilter\");\nvar Reload_1 = require(\"./Reload\");\nvar Result_1 = require(\"./Result\");\nvar SearchInput_1 = require(\"./SearchInput\");\nvar Snapshot_1 = require(\"./Snapshot\");\nvar SortBy_1 = require(\"./SortBy\");\nvar Suggestions_1 = require(\"./Suggestions\");\nvar Banner_1 = require(\"./Banner\");\nvar PriorityFilter_1 = require(\"./PriorityFilter\");\n/**\n * Widget factories\n */\nexports[\"default\"] = {\n searchInput: SearchInput_1[\"default\"],\n clearFilters: ClearFilters_1[\"default\"],\n multipleFilter: MultipleFilter_1[\"default\"],\n sortBy: SortBy_1[\"default\"],\n information: Information_1[\"default\"],\n result: Result_1[\"default\"],\n pagination: Pagination_1[\"default\"],\n checkboxFilter: CheckboxFilter_1[\"default\"],\n rangeFilter: RangeFilter_1[\"default\"],\n reload: Reload_1[\"default\"],\n snapshot: Snapshot_1[\"default\"],\n suggestions: Suggestions_1[\"default\"],\n banner: Banner_1[\"default\"],\n priorityFilter: PriorityFilter_1[\"default\"]\n};\n","/*\n\nTypeScript Md5\n==============\n\nBased on work by\n* Joseph Myers: http://www.myersdaily.org/joseph/javascript/md5-text.html\n* André Cruz: https://github.com/satazor/SparkMD5\n* Raymond Hill: https://github.com/gorhill/yamd5.js\n\nEffectively a TypeScrypt re-write of Raymond Hill JS Library\n\nThe MIT License (MIT)\n\nCopyright (C) 2014 Raymond Hill\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n Version 2, December 2004\n\n Copyright (C) 2015 André Cruz \n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT YOU WANT TO.\n\n\n*/\n;\nexport class Md5 {\n constructor() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state = new Int32Array(4);\n this._buffer = new ArrayBuffer(68);\n this._buffer8 = new Uint8Array(this._buffer, 0, 68);\n this._buffer32 = new Uint32Array(this._buffer, 0, 17);\n this.start();\n }\n static hashStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendStr(str)\n .end(raw);\n }\n static hashAsciiStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendAsciiStr(str)\n .end(raw);\n }\n static _hex(x) {\n const hc = Md5.hexChars;\n const ho = Md5.hexOut;\n let n;\n let offset;\n let j;\n let i;\n for (i = 0; i < 4; i += 1) {\n offset = i * 8;\n n = x[i];\n for (j = 0; j < 8; j += 2) {\n ho[offset + 1 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n ho[offset + 0 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n }\n }\n return ho.join('');\n }\n static _md5cycle(x, k) {\n let a = x[0];\n let b = x[1];\n let c = x[2];\n let d = x[3];\n // ff()\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n // gg()\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n // hh()\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n // ii()\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n /**\n * Initialise buffer to be hashed\n */\n start() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state.set(Md5.stateIdentity);\n return this;\n }\n // Char to code point to to array conversion:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\n // #Example.3A_Fixing_charCodeAt_to_handle_non-Basic-Multilingual-Plane_characters_if_their_presence_earlier_in_the_string_is_unknown\n /**\n * Append a UTF-8 string to the hash buffer\n * @param str String to append\n */\n appendStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let code;\n let i;\n for (i = 0; i < str.length; i += 1) {\n code = str.charCodeAt(i);\n if (code < 128) {\n buf8[bufLen++] = code;\n }\n else if (code < 0x800) {\n buf8[bufLen++] = (code >>> 6) + 0xC0;\n buf8[bufLen++] = code & 0x3F | 0x80;\n }\n else if (code < 0xD800 || code > 0xDBFF) {\n buf8[bufLen++] = (code >>> 12) + 0xE0;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n else {\n code = ((code - 0xD800) * 0x400) + (str.charCodeAt(++i) - 0xDC00) + 0x10000;\n if (code > 0x10FFFF) {\n throw new Error('Unicode standard supports code points up to U+10FFFF');\n }\n buf8[bufLen++] = (code >>> 18) + 0xF0;\n buf8[bufLen++] = (code >>> 12 & 0x3F) | 0x80;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n if (bufLen >= 64) {\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen -= 64;\n buf32[0] = buf32[16];\n }\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append an ASCII string to the hash buffer\n * @param str String to append\n */\n appendAsciiStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(str.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = str.charCodeAt(j++);\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append a byte array to the hash buffer\n * @param input array to append\n */\n appendByteArray(input) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(input.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = input[j++];\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Get the state of the hash buffer\n */\n getState() {\n const s = this._state;\n return {\n buffer: String.fromCharCode.apply(null, Array.from(this._buffer8)),\n buflen: this._bufferLength,\n length: this._dataLength,\n state: [s[0], s[1], s[2], s[3]]\n };\n }\n /**\n * Override the current state of the hash buffer\n * @param state New hash buffer state\n */\n setState(state) {\n const buf = state.buffer;\n const x = state.state;\n const s = this._state;\n let i;\n this._dataLength = state.length;\n this._bufferLength = state.buflen;\n s[0] = x[0];\n s[1] = x[1];\n s[2] = x[2];\n s[3] = x[3];\n for (i = 0; i < buf.length; i += 1) {\n this._buffer8[i] = buf.charCodeAt(i);\n }\n }\n /**\n * Hash the current state of the hash buffer and return the result\n * @param raw Whether to return the value as an `Int32Array`\n */\n end(raw = false) {\n const bufLen = this._bufferLength;\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n const i = (bufLen >> 2) + 1;\n this._dataLength += bufLen;\n const dataBitsLen = this._dataLength * 8;\n buf8[bufLen] = 0x80;\n buf8[bufLen + 1] = buf8[bufLen + 2] = buf8[bufLen + 3] = 0;\n buf32.set(Md5.buffer32Identity.subarray(i), i);\n if (bufLen > 55) {\n Md5._md5cycle(this._state, buf32);\n buf32.set(Md5.buffer32Identity);\n }\n // Do the final computation based on the tail and length\n // Beware that the final length may not fit in 32 bits so we take care of that\n if (dataBitsLen <= 0xFFFFFFFF) {\n buf32[14] = dataBitsLen;\n }\n else {\n const matches = dataBitsLen.toString(16).match(/(.*?)(.{0,8})$/);\n if (matches === null) {\n return;\n }\n const lo = parseInt(matches[2], 16);\n const hi = parseInt(matches[1], 16) || 0;\n buf32[14] = lo;\n buf32[15] = hi;\n }\n Md5._md5cycle(this._state, buf32);\n return raw ? this._state : Md5._hex(this._state);\n }\n}\n// Private Static Variables\nMd5.stateIdentity = new Int32Array([1732584193, -271733879, -1732584194, 271733878]);\nMd5.buffer32Identity = new Int32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\nMd5.hexChars = '0123456789abcdef';\nMd5.hexOut = [];\n// Permanent instance is to use for one-call hashing\nMd5.onePassHasher = new Md5();\nif (Md5.hashStr('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n throw new Error('Md5 self test failed.');\n}\n//# sourceMappingURL=md5.js.map","import { Md5 } from './md5';\n// Hashes any blob\nexport class Md5FileHasher {\n constructor(_callback, // Callback to return the result\n _async = true, // Async version is not always available in a web worker\n _partSize = 1048576) {\n this._callback = _callback;\n this._async = _async;\n this._partSize = _partSize;\n this._configureReader();\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n */\n hash(blob) {\n const self = this;\n self._blob = blob;\n // self._length = Math.ceil(blob.size / self._partSize);\n self._part = 0;\n self._md5 = new Md5();\n self._processPart();\n }\n _fail() {\n this._callback({\n success: false,\n result: 'data read failed'\n });\n }\n _hashData(e) {\n let self = this;\n self._md5.appendByteArray(new Uint8Array(e.target.result));\n if (self._part * self._partSize >= self._blob.size) {\n self._callback({\n success: true,\n result: self._md5.end()\n });\n }\n else {\n self._processPart();\n }\n }\n _processPart() {\n const self = this;\n let endbyte = 0;\n let current_part;\n self._part += 1;\n if (self._blob.size > self._partSize) { // If blob bigger then part_size we will slice it up\n endbyte = self._part * self._partSize;\n if (endbyte > self._blob.size) {\n endbyte = self._blob.size;\n }\n current_part = self._blob.slice((self._part - 1) * self._partSize, endbyte);\n }\n else {\n current_part = self._blob;\n }\n if (self._async) {\n self._reader.readAsArrayBuffer(current_part);\n }\n else {\n setTimeout(() => {\n try {\n self._hashData({\n target: {\n result: self._reader.readAsArrayBuffer(current_part)\n },\n });\n }\n catch (e) {\n self._fail();\n }\n }, 0);\n }\n }\n _configureReader() {\n const self = this;\n if (self._async) {\n self._reader = new FileReader();\n self._reader.onload = self._hashData.bind(self);\n self._reader.onerror = self._fail.bind(self);\n self._reader.onabort = self._fail.bind(self);\n }\n else {\n self._reader = new FileReaderSync();\n }\n }\n}\n//# sourceMappingURL=md5_file_hasher.js.map",";\nexport class ParallelHasher {\n constructor(workerUri, workerOptions) {\n this._queue = [];\n this._ready = true;\n const self = this;\n if (Worker) {\n self._hashWorker = new Worker(workerUri, workerOptions);\n self._hashWorker.onmessage = self._recievedMessage.bind(self);\n self._hashWorker.onerror = (err) => {\n self._ready = false;\n console.error('Hash worker failure', err);\n };\n }\n else {\n self._ready = false;\n console.error('Web Workers are not supported in this browser');\n }\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n * @returns Promise of the Hashed result\n */\n hash(blob) {\n const self = this;\n let promise;\n promise = new Promise((resolve, reject) => {\n self._queue.push({\n blob,\n resolve,\n reject,\n });\n self._processNext();\n });\n return promise;\n }\n /** Terminate any existing hash requests */\n terminate() {\n this._ready = false;\n this._hashWorker.terminate();\n }\n // Processes the next item in the queue\n _processNext() {\n if (this._ready && !this._processing && this._queue.length > 0) {\n this._processing = this._queue.pop();\n this._hashWorker.postMessage(this._processing.blob);\n }\n }\n // Hash result is returned from the worker\n _recievedMessage(evt) {\n var _a, _b;\n const data = evt.data;\n if (data.success) {\n (_a = this._processing) === null || _a === void 0 ? void 0 : _a.resolve(data.result);\n }\n else {\n (_b = this._processing) === null || _b === void 0 ? void 0 : _b.reject(data.result);\n }\n this._processing = undefined;\n this._processNext();\n }\n}\n//# sourceMappingURL=parallel_hasher.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.7\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\nexports.__esModule = true;\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\nexports[\"default\"] = ApisearchUI_1[\"default\"];\n"],"names":["root","factory","exports","module","define","amd","self","__esModule","tslib_1","AxiosClient_1","Query_1","Query_2","Query_3","SortBy_1","HttpRepository_1","Result_1","ResultAggregations_1","Transformer_1","CacheClient_1","Apisearch","createRepository","config","ensureRepositoryConfigIsValid","options","__assign","api_version","override_queries","timeout","httpClient","http_client","AxiosClient","endpoint","use_cache","CacheClient","HttpRepository","app_id","index_id","token","Transformer","ensureIsDefined","param","name","TypeError","createQueryLocated","coordinate","queryText","page","size","QUERY_DEFAULT_PAGE","QUERY_DEFAULT_SIZE","Query","createLocated","createQuery","create","createQueryMatchAll","createMatchAll","createQueryByUUID","uuid","createByUUID","createQueryByUUIDs","uuids","_i","arguments","length","createByUUIDs","apply","createEmptyResult","Result","ResultAggregations","createEmptySortBy","SortBy","createEmptyScoreStrategy","Config","DEFAULT_REPLICAS","DEFAULT_SHARDS","Synonym_1","language","storeSearchableMetadata","shards","replicas","this","synonyms","prototype","getLanguage","shouldSearchableMetadataBeStored","addSynonym","synonym","push","getSynonyms","getShards","getReplicas","toArray","store_searchable_metadata","map","createFromArray","array","Array","Synonym","words","getWords","createbyWords","Object","expand","join","ConnectionError","_super","__extends","getTransportableHTTPError","ErrorWithMessage","message","EventError","throwEndpointNotAvailable","ForbiddenError","createAppIdIsRequiredException","createIndexIsRequiredException","createTokenIsRequiredException","InvalidFormatError","itemRepresentationNotValid","itemUUIDRepresentationNotValid","composedItemUUIDNotValid","querySortedByDistanceWithoutCoordinate","queryFormatNotValid","coordinateFormatNotValid","configFormatNotValid","tokenFormatNotValid","indexFormatNotValid","indexUUIDFormatNotValid","appUUIDFormatNotValid","campaignFormatNotValid","changesFormatNotValid","boostClauseFormatNotValid","tokenUUIDFormatNotValid","userFormatNotValid","InvalidTokenError","createInvalidTokenPermissions","tokenReference","createInvalidTokenMaxHitsPerQuery","maxHitsPerQuery","ResourceExistsError","indexAvailable","eventsIndexAvailable","logsIndexAvailable","ResourceNotAvailableError","indexNotAvailable","resourceId","eventsIndexNotAvailable","logsIndexNotAvailable","engineNotAvailable","UnknownError","createUnknownError","UnsupportedContentTypeError","createUnsupportedContentTypeException","Square","Polygon","CoordinateAndDistance","LocationRange","Coordinate_1","fromFilterObject","object","type","getName","data","toFilterObject","distance","_this","call","Coordinate","coordinates","Error","i","topLeftCoordinate","bottomRightCoordinate","top_left","bottom_right","axios_1","__1","Client_1","Response_1","host","version","overrideQueries","abortControllers","get","url","method","credentials","parameters","__awaiter","headers","axiosRequestConfig","axiosResponse","error_1","__generator","_a","label","replace","toLowerCase","abort","baseURL","transformRequest","rawData","JSON","stringify","Client","objectToUrlParameters","signal","trys","fetch","sent","Response","status","response","urlIsFormatted","generateAbortController","AbortController","retries","request","then","error","undefined","code","ts_md5_1","cache","hits","flushCache","keys","getNumberOfHits","cacheUID","_b","_c","Md5","hashStr","toString","params","builtParams","HttpClient","body","getCode","getBody","AppUUID","InvalidFormatError_1","id","indexOf","createById","getId","parse","composedUUID","Changes","TYPE_ARRAY","TYPE_ARRAY_EXPECTS_ELEMENT","TYPE_ARRAY_ELEMENT_DELETE","TYPE_ARRAY_ELEMENT_ADD","TYPE_ARRAY_ELEMENT_UPDATE","TYPE_LITERAL","TYPE_VALUE","changes","addChange","field","value","updateElementFromList","condition","addElementInList","deleteElementFromList","getChanges","lat","lon","getLatitude","getLongitude","Index","IndexUUID_1","AppUUID_1","appUUID","isOK","docCount","getUUID","getAppUUID","isOk","getDocCount","getSize","is_ok","doc_count","IndexUUID","Item","ItemUUID_1","metadata","indexedMetadata","searchableMetadata","exactMatchingMetadata","suggest","highlights","promoted","getType","getCoordinate","getDistance","getMetadata","setMetadata","addMetadata","key","getIndexedMetadata","setIndexedMetadata","addIndexedMetadata","getSearchableMetadata","setSearchableMetadata","addSearchableMetadata","getExactMatchingMetadata","setExactMatchingMetadata","addExactMatchingMetadata","getAllMetadata","allMetadata","getSuggest","getHighlights","getHighlight","isPromoted","setScore","score","getScore","getIndexUUID","indexUUID","itemAsArray","indexed_metadata","searchable_metadata","exact_matching_metadata","is_promoted","app_uuid","index_uuid","item","ItemUUID","composeUUID","getPathByField","createByComposedUUID","parts","split","Metadata","toMetadata","fromMetadata","values","splittedParts","iterator","lastElement","part","User","attributes","getAttributes","Aggregation","AGGREGATION_NO_LIMIT","AGGREGATION_SORT_BY_NAME_DESC","AGGREGATION_SORT_BY_NAME_ASC","AGGREGATION_SORT_BY_COUNT_DESC","AGGREGATION_SORT_BY_COUNT_ASC","Filter_1","applicationType","filterType","subgroup","sort","limit","getField","getApplicationType","getFilterType","getSubgroup","getSort","getLimit","getPromoted","aggregationAsArray","FILTER_AT_LEAST_ONE","application_type","FILTER_TYPE_FIELD","filter_type","Filter","FILTER_TYPE_QUERY","FILTER_TYPE_GEO","FILTER_TYPE_DATE_RANGE","FILTER_TYPE_RANGE","FILTER_PROMOTE","FILTER_EXCLUDE","FILTER_MUST_ALL_WITH_LEVELS","FILTER_MUST_ALL","filterTerms","getValues","hasValue","getFilterTerms","filterAsArray","filter_terms","NO_MIN_SCORE","Item_1","User_1","Aggregation_1","Filter_2","Aggregation_2","Filter_3","ScoreStrategies_1","UUID","fields","universeFilters","filters","itemsPromoted","aggregations","resultsEnabled","aggregationsEnabled","numberOfSuggestions","highlightsEnabled","autocompleteEnabled","searchableFields","fuzziness","minScore","subqueries","queryOperator","sortByInstance","_query","query","Math","max","from","ids","disableAggregations","disableSuggestions","_id","createMultiquery","queries","setFields","getFields","filterUniverseByTypes","fieldPath","filterByTypes","aggregate","aggregationSort","filterUniverseByIds","filterByIds","filterUniverseBy","filterBy","filterName","aggregateBy","filterUniverseByRange","rangeType","filterUniverseByDateRange","filterByRange","ranges","aggregateByRange","filterByDateRange","filterUniverseByLocation","locationRange","setSearchableFields","getSearchableFields","sortBy","isSortedByGeoDistance","setCoordinate","aggregateByDateRange","getAggregations","getAggregation","aggregationName","getQueryText","filter","getUniverseFilters","getUniverseFilter","getFilters","getFilter","getFilterByField","fieldName","getSortBy","getFrom","getPage","enableResults","disableResults","areResultsEnabled","enableAggregations","areAggregationsEnabled","setNumberOfSuggestions","getNumberOfSuggestions","enableAutocomplete","disableAutocomplete","areAutocompleteEnabled","enableHighlights","disableHighlights","areHighlightsEnabled","promoteUUID","itemUUID","promoteUUIDs","getItemsPromoted","excludeUUID","excludeUUIDs","getScoreStrategies","scoreStrategies","setScoreStrategies","getFuzziness","setFuzziness","setAutoFuzziness","getMinScore","setMinScore","byUser","user","anonymously","getUser","setMetadataValue","addSubquery","subquery","getSubqueries","identifyWith","forceIndexUUID","setQueryOperator","getQueryOperator","q","universe_filters","universeFilter","aggregation","results_enabled","autocomplete_enabled","number_of_suggestions","highlight_enabled","aggregations_enabled","searchable_fields","ScoreStrategies","scoreStrategiesAsArray","score_strategies","min_score","items_promoted","query_operator","aggregationsAsArray","sortAsArray","filtersAsArray","universeFiltersAsArray","itemsPromotedAsArray","subqueriesAsArray","Range","RANGE_SEPARATOR","RANGE_INFINITE","RANGE_MINUS_INFINITE","stringToArray","string","to","finalFrom","finalTo","parseInt","arrayToString","finalValues","String","createRanges","incremental","nextTo","MIN","MAX","AVG","SUM","MULTIPLY","ScoreStrategy_1","createEmpty","scoreMode","addScoreStrategy","scoreStrategy","getScoreMode","score_mode","ScoreStrategy","DEFAULT_FACTOR","DEFAULT_MISSING","SCORE_MODE_MIN","SCORE_MODE_MAX","SCORE_MODE_AVG","SCORE_MODE_SUM","SCORE_MODE_NONE","MODIFIER_SQUARE","MODIFIER_LN","MODIFIER_LOG","MODIFIER_SQRT","MODIFIER_NONE","DECAY_GAUSS","DECAY_EXP","DECAY_LINEAR","DECAY","CUSTOM_FUNCTION","BOOSTING_FIELD_VALUE","DEFAULT_WEIGHT","DEFAULT_TYPE","weight","configuration","getConfigurationValue","element","getWeight","createDefault","createFieldBoosting","factor","missing","modifier","fixFilterFieldPath","createCustomFunction","func","createDecayFunction","origin","scale","offset","decay","SORT_BY_LOCATION_MI_ASC","SORT_BY_LOCATION_KM_ASC","SORT_BY_TYPE_DESC","SORT_BY_TYPE_ASC","SORT_BY_ID_DESC","SORT_BY_ID_ASC","SORT_BY_AL_TUN_TUN","SORT_BY_RANDOM","SORT_BY_SCORE","SORT_BY_MODE_MEDIAN","SORT_BY_MODE_MAX","SORT_BY_MODE_MIN","SORT_BY_MODE_SUM","SORT_BY_MODE_AVG","SORT_BY_DESC","SORT_BY_ASC","SORT_BY_TYPE_RANDOM","SORT_BY_TYPE_FUNCTION","SORT_BY_TYPE_DISTANCE","SORT_BY_TYPE_SCORE","SORT_BY_TYPE_NESTED","SORT_BY_TYPE_FIELD","order","unit","sortsBy","byFieldsValues","shortSortByElements","byFieldValue","all","byValue","byNestedField","mode","byNestedFieldAndFilter","byFunction","hasRandomSort","getFirstSortAsString","firstSortBy","sortsByAsArray","copy","innerArray","newSortBy","sortByAsArray","ConnectionError_1","InvalidTokenError_1","ResourceExistsError_1","ResourceNotAvailableError_1","UnknownError_1","Index_1","appId","indexId","transformer","getTransformer","addObject","toItem","addItem","deleteObject","toItemUUID","deleteItem","flushUpdateItems","itemsToUpdate","response_1","getCredentials","createErrorFromResponse","flushDeleteItems","itemsToDelete","response_2","response_3","result","applyTransformersToResult","getSimilarItems","itemUUIDs","similarity","response_4","items_uuid","getRecommendedItems","response_5","updateItems","response_6","createIndex","response_7","deleteIndex","response_8","resetIndex","response_9","checkIndex","response_10","getIndices","response_11","indexAsArray","configureIndex","response_12","pushInteraction","userId","queryString","interaction","site","device","position","response_13","query_string","user_id","purchase","response_14","getHttpClient","hasReadTransformers","subresults","getSubresults","bind","createMultiresults","getQueryUUID","getTotalItems","getTotalHits","getSuggestions","fromItems","getItems","getAutocomplete","Repository","resetCachedElements","addItems","items","deleteItems","itemsUUID","flush","bulkNumber","skipIfLess","promise","Promise","chunkArray","arrayOfItems","concat","arrayOfItemsUUID","chunk","arrayChunked","j","slice","Counter","Metadata_1","used","n","getSlug","slug","getLevel","level","isUsed","getN","createByActiveElements","activeElements","inActiveElements","queryUUID","totalItems","totalHits","autocomplete","suggestions","getItemsGroupedByTypes","itemsGroupedByTypeCache","itemsGroupedByTypes","getItemsByType","getItemsByTypes","types","getFirstItem","setAggregations","hasNotEmptyAggregation","getMetadataValue","query_uuid","total_items","total_hits","suggests","subresult","subresultsAsArray","ResultAggregation","Counter_1","totalElements","counters","highestActiveElement","activeElement","addCounter","counter","counterInstance","getCounters","isFilter","hasLevels","getCounter","getAllElements","getTotalElements","getActiveElements","cleanCountersByLevel","isEmpty","active_elements","total_elements","highest_active_level","activeElementsAsArray","activeElementAsArray","countersAsArray","counterAsArray","ResultAggregation_1","addAggregation","aggregationCollection","readTransformers","writeTransformers","addReadTransformer","readTransformer","addWriteTransformer","writeTransformer","objects","fromItem","isValidItem","toItems","isValidObject","toItemUUIDs","Apisearch_1","__exportStar","ReflectOwnKeys","R","Reflect","ReflectApply","target","receiver","args","Function","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","Number","isNaN","EventEmitter","init","once","emitter","resolve","reject","errorListener","err","removeListener","resolver","eventTargetAgnosticAddListener","handler","flags","on","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","_getMaxListeners","that","_addListener","prepend","m","events","existing","warning","newListener","emit","unshift","warned","w","count","console","warn","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","arr","ret","unwrapListeners","arrayClone","listenerCount","addEventListener","wrapListener","arg","removeEventListener","defineProperty","enumerable","set","RangeError","getPrototypeOf","setMaxListeners","getMaxListeners","doError","er","context","len","listeners","addListener","prependListener","prependOnceListener","list","originalListener","shift","index","pop","spliceOne","off","removeAllListeners","rawListeners","eventNames","objectToString","isArray","isFunction","escapeRegExp","hasProperty","obj","propName","regExpTest","RegExp","test","nonSpaceRe","isWhitespace","re","testRegExp","entityMap","whiteRe","spaceRe","equalsRe","curlyRe","tagRe","Scanner","tail","pos","Context","view","parentContext","parent","Writer","templateCache","_cache","clear","eos","scan","match","substring","scanUntil","search","lookup","primitive","hasOwnProperty","intermediateValue","names","lookupHit","clearCache","template","tags","cacheKey","mustache","isCacheEnabled","tokens","openingTagRe","closingTagRe","closingCurlyRe","lineHasNonSpace","sections","spaces","hasTag","nonSpace","indentation","tagIndex","stripSpace","compileTags","tagsToCompile","start","chr","openSection","scanner","valueLength","charAt","nestedTokens","collector","numTokens","nestTokens","lastToken","squashedTokens","squashTokens","parseTemplate","render","partials","getConfigTags","renderTokens","originalTemplate","symbol","buffer","renderSection","renderInverted","renderPartial","unescapedValue","escapedValue","rawValue","indentPartial","partial","filteredIndentation","partialByNl","indentedValue","escape","getConfigEscape","defaultWriter","s","t","u","r","o","c","__r","f","diffed","e","__c","a","unmount","v","__h","__H","__","p","k","setState","y","__s","l","h","_","current","A","F","sub","props","T","useDebugValue","d","componentDidCatch","some","__P","forEach","b","g","__e","__v","requestAnimationFrame","clearTimeout","x","cancelAnimationFrame","setTimeout","E","S","C","ref","shouldComponentUpdate","displayName","isReactComponent","__f","isPureReactComponent","__b","Symbol","for","$$typeof","O","only","N","L","__k","U","__u","M","default","D","componentWillUnmount","forceUpdate","fallback","children","I","delete","revealOrder","getChildContext","W","parentNode","removeChild","document","createTextNode","appendChild","P","Map","reverse","componentDidUpdate","componentDidMount","z","V","B","H","textContent","Z","configurable","writable","Y","event","$","cancelBubble","G","defaultPrevented","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","J","K","class","Q","className","X","vnode","multiple","selected","nn","tn","ReactCurrentDispatcher","readContext","__n","en","rn","un","cn","ln","base","nodeType","fn","an","useState","useReducer","useEffect","useLayoutEffect","useRef","useImperativeHandle","useMemo","useCallback","useContext","Children","hydrate","unmountComponentAtNode","createPortal","createElement","createContext","createFactory","cloneElement","createRef","Fragment","isValidElement","findDOMNode","Component","PureComponent","memo","forwardRef","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","defaultProps","__d","constructor","debounceRendering","ownerSVGElement","nextSibling","insertBefore","setProperty","style","cssText","removeAttributeNS","setAttributeNS","removeAttribute","setAttribute","contextType","__E","getDerivedStateFromProps","componentWillMount","componentWillReceiveProps","componentWillUpdate","getSnapshotBeforeUpdate","localName","createElementNS","is","childNodes","dangerouslySetInnerHTML","__html","innerHTML","checked","Consumer","Provider","splice","getDerivedStateFromError","SortByHelper_1","apisearch_1","ApisearchHelper","applySortByToQuery","boostByWeightAndFilter","__spreadArray","pack","ar","apisearch_2","ApisearchHelper_1","ApisearchUIFactory_1","Bootstrap_1","Constants_1","Container_1","Environment_1","Widgets_1","ApisearchUI","environmentId","repository","store","initialSetupPerformed","activeWidgets","widgets","helper","dictionary","firstQuery","widget","withConfig","toUrlObject","fromUrlObject","fetchQuery","window","dispatchEvent","Event","bubbles","reset","initialQuery","getCurrentQuery","setCurrentQuery","setEmptyResult","loadQuery","fetchInitialQuery","setDictionary","addWidget","addWidgets","initialSetup","normalizeQuery","hash","createEnvironmentId","bootstrap","apisearchUI","APISEARCH_UI","dispatcher","APISEARCH_DISPATCHER","registerListener","payload","renderInitialData","renderFetchedData","updateApisearchSetup","uiId","ceil","random","reference","fromConfig","click","itemId","navigator","sendBeacon","getSite","getDevice","sendClickBeacon","queryAsArray","resultAsArray","getCurrentResult","postMessage","item_id","FormData","append","interact","getQuery","write","text","trim","pushQuery","queryObject","ApisearchUI_1","ApisearchUIFactory","instance","createUI","Dispatcher_1","Store_1","configAsString","repositoryId","APISEARCH_REPOSITORY","storeId","APISEARCH_STORE","dispatcherId","configId","APISEARCH_CONFIG","asuiId","register","_d","_e","_f","generate_random_session_uuid","initial_state","Dispatcher","Container","services","serviceCallback","callback","dispatch","highlightLine","inputTextParts","lineText","lineTextParts","word","replaces","lineWord","inputWord","minLength","min","allowedDistance","levenshteinDistance","entries","replaceAll","str1","str2","track","fill","indicator","highlightElement","inputText","querySelectorAll","extendStatics","setPrototypeOf","__proto__","events_1","Store","generateRandomSessionUUID","initialState","withHash","doNotCleanUrlHashAtFirst","dirty","loadInitialQuery","top","isUnderIframe","urlHash","substr","currentVisibleResults","createUID","isDirty","currentQuery","currentResult","setCurrentResult","hasProperResult","resultsAreVisible","replaceUrl","visibleResults","floor","characters","queryAsObject","urlObject","decodeURI","objectAsJson","encodeURI","pathWithoutHash","location","href","history","replaceState","preact_1","Template_1","defaultTemplates_1","BannerComponent","mobile_img","desktop_img","banners","filteredBanners","banner","firstBanner","prevState","has_url","breaking_point_size","breakingPointSize","image_prefix","imagePrefix","defaultBannerTemplate","onChangeSearchAction","aggregationSetup","Clone_1","aggregationField","clonedQuery","filterField","isChecked","filterValue","Helpers_1","CheckboxFilterActions_1","CheckboxFilterComponent","handleChange","containerClassName","classNames","container","topClassName","itemClassName","activeClassName","active","topTemplate","itemTemplate","isActive","getFilterValuesFromQuery","uid","templateData","onClick","stopPropagation","preventDefault","defaultItemTemplate","clearFiltersAction","filterToClear","filterValueToClear","valueIndex","ClearFiltersActions_1","ClearFiltersComponent","handleClick","appliedFilters","showClearFilters","handleIndividualClick","filterKey","appliedFiltersFormatted","getFiltersToShow","filterToAvoid","num","filtersListClassName","filtersList","filterClassName","containerTemplate","filterTemplate","individualFilterClear","isEmptyClass","showIndividualFilterValueClear","values_1","showIndividualFilterClear","showGlobalFilterClear","Clone","assign","onWordClickAction","category","InformationComponent","total","visible","formatData","toLocaleString","moreThanLimit","formattedTemplateData","more_than_limit","isFilterAvailable","isLeveledFilter","getShadowFilterValuesFromQuery","manageCurrentFilterItems","wasElementRecentlySelected","selectedItem","currentItems","deleteIfWasRemoved","withCurrent","fieldNameParts","currentLevel","fieldNameWithoutLevel","it_1","iterationFieldName","configureQueryWithShadowLeveledFilters","modifyQueryAggregationWithProperLevelValue","filterAction","shadowLeveledFilters","originalFilterField","levelCounter_1","leveledFieldName","fetchLimit","rangesValues","filterValues","labels","selectedFilter","af","MultipleFilterActions_1","ShowMoreComponent_1","MultipleFilterComponent","propsReceived","selectedFilterAsString","valuesAsString","wasNotSelected","filterItems","handleShowMore","viewLimit","handleShowLess","isViewLimitProperlySet","activeFirst","itemsListClassName","itemsList","showMoreContainerClassName","showMoreContainer","showMoreTemplate","showMore","showLessTemplate","showLess","itemsIds","allItems","zeroItemsFilters_1","allItemsLength","levelCounter","topData","hasApplied","nApplied","includes","currentLimit","getEnd","getStart","totalPagesToArray","getTotalPages","hitsPerPage","totalPages","pages","padding","currentPage","spectreSize","isTouchingLeft","isTouchingRight","isVisible","paginationChangeAction","selectedPage","NavigationComponent_1","PaginationActions_1","PaginationComponent","currentQuerySize","goFirstLast","disabledClassName","disabled","nextClassName","next","previousClassName","previous","lastClassName","last","firstClassName","first","nextTemplate","previousTemplate","firstTemplate","lastTemplate","currentQueryPage","spectre","previousDisabledClass","nextDisabledClass","priorityFilterAction","setupPriorityFilters","PriorityFilterActions_1","PriorityFilterComponent","priorityFilterName","priorityFilterObject","priorityFilter","defaultPriorityFilterItemTemplate","defaultPriorityFilterTopTemplate","withMinMax","realValueFrom","toWithIncluded","compat_1","RangeFilterActions_1","RangeFilterComponent","observerFrom","configureFromObserver","observerTo","configureToObserver","rangeUid","minValue","maxValue","MutationObserver","mutationsList","observer","mutationsList_1","mutation","attributeName","handleSliderChange","mutationsList_2","observe","getElementsByClassName","disconnect","applyFilter","handleSliderMove","updateRangeLayer","currencyPlaceholder","firstItem","firstItemPrice","firstItemPriceWithCurrency","getCurrencyPlaceholderFromPriceAndPriceWithCurrency","fromTo","getFromToFromFilter","currency_placeholder","realMin","realMax","previousProps","previousState","sliderTemplate","slider","wrapperClassName","wrapper","isNative","native","isNotNative","visibleStyle","input","step","onTouchEnd","onChange","positions","valueFrom","valueTo","price","priceWithCurrency","regex","maxValueIncluded","reloadAction","ReloadActions_1","ReloadComponent","Highlight_1","nextProps","nextState","shouldUpdate","uuid_composed","image","highlight","query_text","highlights_enabled","getElementById","isBestMatch","best_match","isExactMatch","exact_match","infiniteScrollNextPageAction","configureQuery","itemsPerPage","promotedUUIDs","excludedUUIDs","nextPage","ResultActions_1","Common_1","ResultComponent","fromLoadingNextPage","endResultsBoxRef","node","IntersectionObserver","isIntersecting","loadNextPage","handleAlternativeClick","customResponse","focus","fadeInSelector","hasNewPage","currentExpectedPage","addMouseDownListeners","handleClickOutside","closest","passive","promote","exclude","customResponseBody","placeholderClassName","placeholder","itemsListTemplate","placeholderTemplate","subResults","wrapperRef","redirection","content","resetRedirectionOnEnter","hasInfiniteScrollNextPage","infiniteScroll","infiniteScrollMargin","reducedTemplateData","isInfiniteActive","itemsForEvent","with_results","defaultItemsListTemplate","hydrateItem","infiniteScrollButton","next_page_button","subResult","alternative_title","query_text_html","alternative_all_results","noResults","apisearchReference","mainFields","fieldsConciliation","add_to_cart","striptags","val","defaultNoResultsItemTemplate","defaultAlternativeTitleTemplate","defaultAlternativeAllResultsTemplate","defaultNextPageButtonTemplate","AutocompleteComponent","inputClassName","queryTextLength","autocompleteText","formattedAutocompleteText","simpleSearchAction","initialSearchSetup","SearchInputActions_1","AutocompleteComponent_1","SearchInputComponent","inputRef","handleSearch","startSearchOn","finalSpace","targetValueNoSpaces","clearSearch","dispatchQueryStringEvent","handleKeyDown","replaceWithAutocomplete","keyCode","doNothing","currentQueryText","queryTextEvent","lastQueryTextStringDispatched","that_1","autofocus","withContainer","clearSearchClassName","clearSearchTemplate","htmlNodeInheritProps","showAutocomplete","keyDownCallback","keyDownAction","autocompletableClass","searchInput","onInput","onKeyDown","onTouchStart","speechRecognition","SnapshotComponent","queryAsJson","initialSortBySetup","initialOption","selectedOption","SortByActions_1","SortByComponent","currentOption","nextFirstSortAsString","nextVisible","selectClassName","select","option","queryValue","sortByData","enableSuggestions","SuggestionsFilterActions_1","SuggestionsFilterComponent","noSuggestionsClassName","Mustache","Translate_1","Template","renderTemplate","trans","Translate","parsed","parsedText","BannerComponent_1","Banner","component","querySelector","settings","CheckboxFilterComponent_1","CheckboxFilter","fieldValues","ClearFiltersComponent_1","ClearFilters","InformationComponent_1","Information","targetNode","MultipleFilterComponent_1","MultipleFilter","levelsValues","originalFieldValues","leveledValues","leveledFilterName","PaginationComponent_1","Pagination","PriorityFilterComponent_1","PriorityFilter","RangeFilterComponent_1","RangeFilter","minMaxCallback","onSliderMove","ReloadComponent_1","Reload","ResultComponent_1","SearchInputComponent_1","SearchInput","spellcheck","isInputElement","htmlNodeInheritedProps","getNodeAttributes","remove","isSecondRender","htmlNode","nodeAttributes","attr","specified","HTMLInputElement","SnapshotComponent_1","Snapshot","SortByComponent_1","firstOptionAsString","setSortToQuery","firstSortAsString","distanceSortParts","sortParts","SuggestionsFilterComponent_1","SuggestionsFilter","Widget","CheckboxFilter_1","ClearFilters_1","Information_1","MultipleFilter_1","Pagination_1","RangeFilter_1","Reload_1","SearchInput_1","Snapshot_1","Suggestions_1","Banner_1","PriorityFilter_1","clearFilters","multipleFilter","information","pagination","checkboxFilter","rangeFilter","reload","snapshot","_dataLength","_bufferLength","_state","Int32Array","_buffer","ArrayBuffer","_buffer8","Uint8Array","_buffer32","Uint32Array","str","raw","onePassHasher","appendStr","end","hashAsciiStr","appendAsciiStr","_hex","hc","hexChars","ho","hexOut","_md5cycle","stateIdentity","buf8","buf32","bufLen","charCodeAt","appendByteArray","getState","fromCharCode","buflen","buf","dataBitsLen","buffer32Identity","subarray","matches","lo","hi","Md5FileHasher","_callback","_async","_partSize","_configureReader","blob","_blob","_part","_md5","_processPart","_fail","success","_hashData","current_part","endbyte","_reader","readAsArrayBuffer","FileReader","onload","onerror","onabort","FileReaderSync","ParallelHasher","workerUri","workerOptions","_queue","_ready","Worker","_hashWorker","onmessage","_recievedMessage","_processNext","terminate","_processing","evt","__rest","propertyIsEnumerable","__decorate","decorators","desc","getOwnPropertyDescriptor","decorate","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","thisArg","_arguments","generator","fulfilled","rejected","done","ops","verb","op","__createBinding","k2","__values","__read","__spread","__spreadArrays","il","jl","__await","__asyncGenerator","asyncIterator","resume","fulfill","settle","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__importStar","mod","__importDefault","__classPrivateFieldGet","privateMap","has","__classPrivateFieldSet","kindOf","thing","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isNumber","isObject","isPlainObject","toStringTag","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","findKey","_key","_global","globalThis","isContextDefined","isTypedArray","TypedArray","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","toUpperCase","isAsyncFn","utils$1","isBuffer","isFormData","kind","isArrayBufferView","isView","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","stripBOM","inherits","superConstructor","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","lastIndex","forEachEntry","pair","matchAll","regExp","exec","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","noop","toFiniteNumber","defaultValue","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","source","reducedValue","isThenable","catch","AxiosError","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","path","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","isFlatArray","el","exposedHelpers","build","encode$1","charMap","encodeURIComponent","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","parser","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","line","parseHeaders","tokensRE","parseTokens","matcher","deleted","deleteHeader","normalize","format","normalized","char","formatHeader","targets","asStrings","computed","accessor","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","expires","domain","secure","cookie","Date","toGMTString","read","decodeURIComponent","now","buildFullPath","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","userAgent","urlParsingNode","originURL","resolveURL","protocol","hostname","port","pathname","requestURL","progressEventReducer","isDownloadStream","bytesNotified","_speedometer","samplesCount","bytes","timestamps","firstSampleTS","head","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","lengthComputable","progressBytes","rate","progress","estimated","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","ECONNABORTED","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","cancel","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","CancelToken","executor","resolvePromise","onfulfilled","_resolve","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","VERSION","Cancel","promises","spread","isAxiosError","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"apisearch-ui.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,6CCRTJ,EAAQK,YAAa,EACrB,IAAIC,EAAU,EAAQ,MAClBC,EAAgB,EAAQ,MACxBC,EAAU,EAAQ,MAClBC,EAAU,EAAQ,MAClBC,EAAU,EAAQ,MAClBC,EAAW,EAAQ,MACnBC,EAAmB,EAAQ,MAC3BC,EAAW,EAAQ,MACnBC,EAAuB,EAAQ,MAC/BC,EAAgB,EAAQ,IACxBC,EAAgB,EAAQ,MAIxBC,EAA2B,WAC3B,SAASA,IACT,CAiIA,OAzHAA,EAAUC,iBAAmB,SAAUC,GACnCF,EAAUG,8BAA8BD,GACxCA,EAAOE,QAAUf,EAAQgB,SAAS,CAAEC,YAAa,KAAMC,kBAAkB,EAAMC,QAAS,KAAQN,EAAOE,SAIvG,IAAIK,OAAmD,IAA/BP,EAAOE,QAAQM,YACjCR,EAAOE,QAAQM,YACf,IAAIpB,EAAcqB,YAAYT,EAAOE,QAAQQ,SAAUV,EAAOE,QAAQE,YAAaJ,EAAOE,QAAQI,QAASN,EAAOE,QAAQG,kBAIhI,OAHIL,EAAOE,QAAQS,YACfJ,EAAa,IAAIV,EAAce,YAAYL,IAExC,IAAId,EAAiBoB,eAAeN,EAAYP,EAAOc,OAAQd,EAAOe,SAAUf,EAAOgB,MAAO,IAAIpB,EAAcqB,YAC3H,EAMAnB,EAAUG,8BAAgC,SAAUD,GAChDF,EAAUoB,gBAAgBlB,EAAOc,OAAQ,UACzChB,EAAUoB,gBAAgBl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ASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBjqE,IAAjBkqE,EACH,OAAOA,EAAa33E,QAGrB,IAAIC,EAASu3E,EAAyBE,GAAY,CAGjD13E,QAAS,CAAC,GAOX,OAHA43E,EAAoBF,GAAUvtE,KAAKlK,EAAOD,QAASC,EAAQA,EAAOD,QAASy3E,GAGpEx3E,EAAOD,OACf,CCrBAy3E,EAAoB53C,EAAI,CAAC7/B,EAAS63E,KACjC,IAAI,IAAItlE,KAAOslE,EACXJ,EAAoBx5C,EAAE45C,EAAYtlE,KAASklE,EAAoBx5C,EAAEj+B,EAASuS,IAC5EpM,OAAO+vB,eAAel2B,EAASuS,EAAK,CAAE4jB,YAAY,EAAM/qB,IAAKysE,EAAWtlE,IAE1E,ECNDklE,EAAoBt3C,EAAI,WACvB,GAA0B,iBAAfy6B,WAAyB,OAAOA,WAC3C,IACC,OAAO91D,MAAQ,IAAIstB,SAAS,cAAb,EAChB,CAAE,MAAOkM,GACR,GAAsB,iBAAXuN,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxB4rC,EAAoBx5C,EAAI,CAACjG,EAAKijC,IAAU90D,OAAOnB,UAAUk1B,eAAe/vB,KAAK6tB,EAAKijC,GCClFwc,EAAoBz5C,EAAKh+B,IACH,oBAAXqhC,QAA0BA,OAAO64B,aAC1C/zD,OAAO+vB,eAAel2B,EAASqhC,OAAO64B,YAAa,CAAElqD,MAAO,WAE7D7J,OAAO+vB,eAAel2B,EAAS,aAAc,CAAEgQ,OAAO,GAAO,4CCH1Dm/B,EAAgB,EAAQ,MAC5BnvC,EAAiB,QAAImvC,EAAuB","sources":["webpack://apisearchUI/webpack/universalModuleDefinition","webpack://apisearchUI/./node_modules/apisearch/lib/Apisearch.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Config.js","webpack://apisearchUI/./node_modules/apisearch/lib/Config/Synonym.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ConnectionError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ErrorWithMessage.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/EventError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ForbiddenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidFormatError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/InvalidTokenError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceExistsError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/ResourceNotAvailableError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnknownError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Error/UnsupportedContentTypeError.js","webpack://apisearchUI/./node_modules/apisearch/lib/Geo/LocationRange.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/AxiosClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/CacheClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Client.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/HttpClient.js","webpack://apisearchUI/./node_modules/apisearch/lib/Http/Response.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/AppUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Changes.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Coordinate.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Index.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/IndexUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Item.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/ItemUUID.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/Metadata.js","webpack://apisearchUI/./node_modules/apisearch/lib/Model/User.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Aggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Filter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Query.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/Range.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategies.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/ScoreStrategy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Query/SortBy.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/HttpRepository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Repository/Repository.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Counter.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/Result.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregation.js","webpack://apisearchUI/./node_modules/apisearch/lib/Result/ResultAggregations.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/ReadTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/Transformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/Transformer/WriteTransformer.js","webpack://apisearchUI/./node_modules/apisearch/lib/index.js","webpack://apisearchUI/./node_modules/events/events.js","webpack://apisearchUI/./node_modules/mustache/mustache.js","webpack://apisearchUI/./node_modules/preact/hooks/dist/hooks.module.js","webpack://apisearchUI/./node_modules/preact/compat/dist/compat.module.js","webpack://apisearchUI/./node_modules/preact/dist/preact.module.js","webpack://apisearchUI/./src/ApisearchHelper.ts","webpack://apisearchUI/./src/ApisearchUI.ts","webpack://apisearchUI/./src/ApisearchUIFactory.ts","webpack://apisearchUI/./src/Bootstrap.ts","webpack://apisearchUI/./src/Constants.ts","webpack://apisearchUI/./src/Container.ts","webpack://apisearchUI/./src/Dispatcher.ts","webpack://apisearchUI/./src/Environment.ts","webpack://apisearchUI/./src/Highlight.ts","webpack://apisearchUI/./src/Store.ts","webpack://apisearchUI/./src/components/Banner/BannerComponent.tsx","webpack://apisearchUI/./src/components/Banner/defaultTemplates.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterActions.ts","webpack://apisearchUI/./src/components/CheckboxFilter/CheckboxFilterComponent.tsx","webpack://apisearchUI/./src/components/CheckboxFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersActions.ts","webpack://apisearchUI/./src/components/ClearFilters/ClearFiltersComponent.tsx","webpack://apisearchUI/./src/components/Clone.ts","webpack://apisearchUI/./src/components/Common.ts","webpack://apisearchUI/./src/components/Information/InformationComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/Helpers.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterActions.ts","webpack://apisearchUI/./src/components/MultipleFilter/MultipleFilterComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/ShowMoreComponent.tsx","webpack://apisearchUI/./src/components/MultipleFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Pagination/Helpers.ts","webpack://apisearchUI/./src/components/Pagination/NavigationComponent.tsx","webpack://apisearchUI/./src/components/Pagination/PaginationActions.ts","webpack://apisearchUI/./src/components/Pagination/PaginationComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterActions.ts","webpack://apisearchUI/./src/components/PriorityFilter/PriorityFilterComponent.tsx","webpack://apisearchUI/./src/components/PriorityFilter/defaultTemplates.tsx","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterActions.ts","webpack://apisearchUI/./src/components/RangeFilter/RangeFilterComponent.tsx","webpack://apisearchUI/./src/components/Reload/ReloadActions.ts","webpack://apisearchUI/./src/components/Reload/ReloadComponent.tsx","webpack://apisearchUI/./src/components/Result/Item.tsx","webpack://apisearchUI/./src/components/Result/ResultActions.ts","webpack://apisearchUI/./src/components/Result/ResultComponent.tsx","webpack://apisearchUI/./src/components/Result/defaultTemplates.tsx","webpack://apisearchUI/./src/components/SearchInput/AutocompleteComponent.tsx","webpack://apisearchUI/./src/components/SearchInput/SearchInputActions.ts","webpack://apisearchUI/./src/components/SearchInput/SearchInputComponent.tsx","webpack://apisearchUI/./src/components/Snapshot/SnapshotComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByActions.ts","webpack://apisearchUI/./src/components/SortBy/SortByComponent.tsx","webpack://apisearchUI/./src/components/SortBy/SortByHelper.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterActions.ts","webpack://apisearchUI/./src/components/Suggestions/SuggestionsFilterComponent.tsx","webpack://apisearchUI/./src/components/Suggestions/defaultTemplates.tsx","webpack://apisearchUI/./src/components/Template.tsx","webpack://apisearchUI/./src/components/Translate.tsx","webpack://apisearchUI/./src/widgets/Banner.tsx","webpack://apisearchUI/./src/widgets/CheckboxFilter.tsx","webpack://apisearchUI/./src/widgets/ClearFilters.tsx","webpack://apisearchUI/./src/widgets/Information.tsx","webpack://apisearchUI/./src/widgets/MultipleFilter.tsx","webpack://apisearchUI/./src/widgets/Pagination.tsx","webpack://apisearchUI/./src/widgets/PriorityFilter.tsx","webpack://apisearchUI/./src/widgets/RangeFilter.tsx","webpack://apisearchUI/./src/widgets/Reload.tsx","webpack://apisearchUI/./src/widgets/Result.tsx","webpack://apisearchUI/./src/widgets/SearchInput.tsx","webpack://apisearchUI/./src/widgets/Snapshot.tsx","webpack://apisearchUI/./src/widgets/SortBy.tsx","webpack://apisearchUI/./src/widgets/Suggestions.tsx","webpack://apisearchUI/./src/widgets/Widget.ts","webpack://apisearchUI/./src/widgets/Widgets.ts","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/md5_file_hasher.js","webpack://apisearchUI/./node_modules/ts-md5/dist/esm/parallel_hasher.js","webpack://apisearchUI/./node_modules/tslib/tslib.es6.js","webpack://apisearchUI/./node_modules/axios/dist/browser/axios.cjs","webpack://apisearchUI/webpack/bootstrap","webpack://apisearchUI/webpack/runtime/define property getters","webpack://apisearchUI/webpack/runtime/global","webpack://apisearchUI/webpack/runtime/hasOwnProperty shorthand","webpack://apisearchUI/webpack/runtime/make namespace object","webpack://apisearchUI/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"apisearchUI\"] = factory();\n\telse\n\t\troot[\"apisearchUI\"] = factory();\n})(self, () => {\nreturn ","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar AxiosClient_1 = require(\"./Http/AxiosClient\");\nvar Query_1 = require(\"./Query/Query\");\nvar Query_2 = require(\"./Query/Query\");\nvar Query_3 = require(\"./Query/Query\");\nvar SortBy_1 = require(\"./Query/SortBy\");\nvar HttpRepository_1 = require(\"./Repository/HttpRepository\");\nvar Result_1 = require(\"./Result/Result\");\nvar ResultAggregations_1 = require(\"./Result/ResultAggregations\");\nvar Transformer_1 = require(\"./Transformer/Transformer\");\nvar CacheClient_1 = require(\"./Http/CacheClient\");\n/**\n * Apisearch class\n */\nvar Apisearch = /** @class */ (function () {\n function Apisearch() {\n }\n /**\n * Constructor\n *\n * @param config\n *\n * @return {HttpRepository}\n */\n Apisearch.createRepository = function (config) {\n Apisearch.ensureRepositoryConfigIsValid(config);\n config.options = tslib_1.__assign({ api_version: \"v1\", override_queries: true, timeout: 3000 }, config.options);\n /**\n * Client\n */\n var httpClient = typeof config.options.http_client !== \"undefined\"\n ? config.options.http_client\n : new AxiosClient_1.AxiosClient(config.options.endpoint, config.options.api_version, config.options.timeout, config.options.override_queries);\n if (config.options.use_cache) {\n httpClient = new CacheClient_1.CacheClient(httpClient);\n }\n return new HttpRepository_1.HttpRepository(httpClient, config.app_id, config.index_id, config.token, new Transformer_1.Transformer());\n };\n /**\n * Ensure the Repository configuration is valid\n *\n * @param config\n */\n Apisearch.ensureRepositoryConfigIsValid = function (config) {\n Apisearch.ensureIsDefined(config.app_id, \"app_id\");\n Apisearch.ensureIsDefined(config.index_id, \"index_id\");\n Apisearch.ensureIsDefined(config.token, \"token\");\n Apisearch.ensureIsDefined(config.options.endpoint, \"options.endpoint\");\n };\n /**\n * Ensure the value is not undefined\n *\n * @param param\n * @param name\n */\n Apisearch.ensureIsDefined = function (param, name) {\n if (typeof param === \"undefined\") {\n throw new TypeError(name + \" parameter must be defined.\");\n }\n };\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQueryLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.createLocated(coordinate, queryText, page, size);\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Apisearch.createQuery = function (queryText, page, size) {\n if (page === void 0) { page = Query_1.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = Query_2.QUERY_DEFAULT_SIZE; }\n return Query_3.Query.create(queryText, page, size);\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Apisearch.createQueryMatchAll = function () {\n return Query_3.Query.createMatchAll();\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUID = function (uuid) {\n return Query_3.Query.createByUUID(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Apisearch.createQueryByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n return Query_3.Query.createByUUIDs.apply(Query_3.Query, uuids);\n };\n /**\n * Create empty result\n *\n * @return {Result}\n */\n Apisearch.createEmptyResult = function () {\n return Result_1.Result.create(\"\", 0, 0, new ResultAggregations_1.ResultAggregations(0), [], []);\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptySortBy = function () {\n return SortBy_1.SortBy.create();\n };\n /**\n * Create empty sortby\n *\n * @return {SortBy}\n */\n Apisearch.createEmptyScoreStrategy = function () {\n return SortBy_1.SortBy.create();\n };\n return Apisearch;\n}());\nexports[\"default\"] = Apisearch;\n","\"use strict\";\nexports.__esModule = true;\nexports.Config = exports.DEFAULT_REPLICAS = exports.DEFAULT_SHARDS = void 0;\nvar Synonym_1 = require(\"./Synonym\");\nexports.DEFAULT_SHARDS = 1;\nexports.DEFAULT_REPLICAS = 0;\n/**\n * Result class\n */\nvar Config = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param language\n * @param storeSearchableMetadata\n * @param shards\n * @param replicas\n */\n function Config(language, storeSearchableMetadata, shards, replicas) {\n if (language === void 0) { language = null; }\n if (storeSearchableMetadata === void 0) { storeSearchableMetadata = true; }\n if (shards === void 0) { shards = exports.DEFAULT_SHARDS; }\n if (replicas === void 0) { replicas = exports.DEFAULT_REPLICAS; }\n this.synonyms = [];\n this.language = language;\n this.storeSearchableMetadata = storeSearchableMetadata;\n this.shards = shards;\n this.replicas = replicas;\n }\n /**\n * Get language\n *\n * @return {string}\n */\n Config.prototype.getLanguage = function () {\n return this.language;\n };\n /**\n * Should searchable metadata be stored\n *\n * @return {boolean}\n */\n Config.prototype.shouldSearchableMetadataBeStored = function () {\n return this.storeSearchableMetadata;\n };\n /**\n * Add synonym\n *\n * @param synonym\n */\n Config.prototype.addSynonym = function (synonym) {\n this.synonyms.push(synonym);\n };\n /**\n * Get synonyms\n *\n * @return {Synonym[]}\n */\n Config.prototype.getSynonyms = function () {\n return this.synonyms;\n };\n /**\n * Get shards\n *\n * @return {number}\n */\n Config.prototype.getShards = function () {\n return this.shards;\n };\n /**\n * Get replicas\n *\n * @return {number}\n */\n Config.prototype.getReplicas = function () {\n return this.replicas;\n };\n /**\n * to array\n */\n Config.prototype.toArray = function () {\n return {\n language: this.language,\n store_searchable_metadata: this.storeSearchableMetadata,\n synonyms: this.synonyms.map(function (synonym) { return synonym.toArray(); }),\n shards: this.shards,\n replicas: this.replicas\n };\n };\n /**\n * Create from array\n */\n Config.createFromArray = function (array) {\n var config = new Config(array.language ? array.language : null, typeof array.store_searchable_metadata == \"boolean\"\n ? array.store_searchable_metadata\n : true);\n if (array.synonyms instanceof Array &&\n array.synonyms.length > 0) {\n config.synonyms = array.synonyms.map(function (synonym) { return Synonym_1.Synonym.createFromArray(synonym); });\n }\n config.shards = typeof array.shards == \"number\"\n ? array.shards\n : exports.DEFAULT_SHARDS;\n config.replicas = typeof array.replicas == \"number\"\n ? array.replicas\n : exports.DEFAULT_REPLICAS;\n return config;\n };\n return Config;\n}());\nexports.Config = Config;\n","\"use strict\";\nexports.__esModule = true;\nexports.Synonym = void 0;\n/**\n * Result class\n */\nvar Synonym = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param words\n */\n function Synonym(words) {\n this.words = words;\n }\n /**\n * get words\n *\n * @return {string[]}\n */\n Synonym.prototype.getWords = function () {\n return this.words;\n };\n /**\n * Create by words\n *\n * @param words\n *\n * @return {Synonym}\n */\n Synonym.createbyWords = function (words) {\n return new Synonym(words);\n };\n /**\n * To array\n *\n * @return {{words: string[]}}\n */\n Synonym.prototype.toArray = function () {\n return {\n words: this.words\n };\n };\n /**\n * create from array\n *\n * @param array\n *\n * @returns {Synonym}\n */\n Synonym.createFromArray = function (array) {\n return new Synonym(array.words instanceof Object\n ? array.words\n : []);\n };\n /**\n * Expand\n *\n * @returns {string}\n */\n Synonym.prototype.expand = function () {\n return this.words.join(\",\");\n };\n return Synonym;\n}());\nexports.Synonym = Synonym;\n","\"use strict\";\nexports.__esModule = true;\nexports.ConnectionError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar ConnectionError = /** @class */ (function (_super) {\n tslib_1.__extends(ConnectionError, _super);\n function ConnectionError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ConnectionError.getTransportableHTTPError = function () {\n return 500;\n };\n return ConnectionError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ConnectionError = ConnectionError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ErrorWithMessage = void 0;\n/**\n * ConnectError\n */\nvar ErrorWithMessage = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param message\n */\n function ErrorWithMessage(message) {\n this.message = message;\n }\n return ErrorWithMessage;\n}());\nexports.ErrorWithMessage = ErrorWithMessage;\n","\"use strict\";\nexports.__esModule = true;\nexports.EventError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * EventError\n */\nvar EventError = /** @class */ (function (_super) {\n tslib_1.__extends(EventError, _super);\n function EventError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n EventError.throwEndpointNotAvailable = function () {\n return new EventError(\"Endpoint not available\");\n };\n return EventError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.EventError = EventError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ForbiddenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Forbidden Error\n */\nvar ForbiddenError = /** @class */ (function (_super) {\n tslib_1.__extends(ForbiddenError, _super);\n function ForbiddenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ForbiddenError.getTransportableHTTPError = function () {\n return 403;\n };\n /**\n * App id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createAppIdIsRequiredException = function () {\n return new ForbiddenError(\"AppId query parameter MUST be defined with a valid value\");\n };\n /**\n * Index id is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createIndexIsRequiredException = function () {\n return new ForbiddenError(\"Index query parameter MUST be defined with a valid value\");\n };\n /**\n * Token is required\n *\n * @return {ForbiddenError}\n */\n ForbiddenError.createTokenIsRequiredException = function () {\n return new ForbiddenError(\"Token query parameter MUST be defined with a valid value\");\n };\n return ForbiddenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ForbiddenError = ForbiddenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidFormatError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Class InvalidFormatError\n */\nvar InvalidFormatError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidFormatError, _super);\n function InvalidFormatError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidFormatError.getTransportableHTTPError = function () {\n return 400;\n };\n /**\n * Item representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item representation not valid. Expecting Item array serialized but found malformed data\");\n };\n /**\n * Item UUID representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.itemUUIDRepresentationNotValid = function () {\n return new InvalidFormatError(\"Item UUID representation not valid. Expecting UUID array serialized but found malformed data\");\n };\n /**\n * Create Composed UUID bad format.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.composedItemUUIDNotValid = function () {\n return new InvalidFormatError(\"A composed UUID should always follow this format: {id}~{type}.\");\n };\n /**\n * Create Query sorted by distance without coordinate.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.querySortedByDistanceWithoutCoordinate = function () {\n return new InvalidFormatError(\"In order to be able to sort by coordinates, you need to create a Query by using Query::createLocated() instead of Query::create()\");\n };\n /**\n * Query representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.queryFormatNotValid = function () {\n return new InvalidFormatError(\"Query Format not valid. Expecting a Query serialized but found malformed data\");\n };\n /**\n * Coordinate representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.coordinateFormatNotValid = function () {\n return new InvalidFormatError(\"A Coordinate should always contain a lat (Latitude) and a lon (Longitude)\");\n };\n /**\n * Config representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.configFormatNotValid = function () {\n return new InvalidFormatError(\"Config Format not valid. Expecting a Config serialized but found malformed data\");\n };\n /**\n * Token representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenFormatNotValid = function () {\n return new InvalidFormatError(\"Token Format not valid. Expecting a Token serialized but found malformed data\");\n };\n /**\n * Index format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexFormatNotValid = function () {\n return new InvalidFormatError('Index Format not valid. Expecting an Index serialized but found malformed data');\n };\n /**\n * IndexUUI format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.indexUUIDFormatNotValid = function () {\n return new InvalidFormatError('IndexUUID Format not valid. Expecting an IndexUUID serialized but found malformed data');\n };\n /**\n * App format not valid.\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.appUUIDFormatNotValid = function () {\n return new InvalidFormatError('AppUUID Format not valid. Expecting an AppUUID serialized but found malformed data');\n };\n /**\n * Campaign representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.campaignFormatNotValid = function () {\n return new InvalidFormatError(\"Campaign Format not valid. Expecting a Campaign serialized but found malformed data\");\n };\n /**\n * Changes representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.changesFormatNotValid = function () {\n return new InvalidFormatError(\"Changes Format not valid. Expecting a Changes serialized but found malformed data\");\n };\n /**\n * Boost clause representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.boostClauseFormatNotValid = function () {\n return new InvalidFormatError(\"Boost clause Format not valid. Expecting a Boost clause serialized but found malformed data\");\n };\n /**\n * token uuid representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.tokenUUIDFormatNotValid = function () {\n return new InvalidFormatError(\"Token UUID Format not valid. Expecting a TokenUUID serialized but found malformed data\");\n };\n /**\n * User representation not valid\n *\n * @return {InvalidFormatError}\n */\n InvalidFormatError.userFormatNotValid = function () {\n return new InvalidFormatError(\"User Format not valid. Expecting a User serialized but found malformed data\");\n };\n return InvalidFormatError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidFormatError = InvalidFormatError;\n","\"use strict\";\nexports.__esModule = true;\nexports.InvalidTokenError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Invalid token error\n */\nvar InvalidTokenError = /** @class */ (function (_super) {\n tslib_1.__extends(InvalidTokenError, _super);\n function InvalidTokenError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n InvalidTokenError.getTransportableHTTPError = function () {\n return 401;\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenPermissions = function (tokenReference) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid\");\n };\n /**\n * Invalid token permissions\n *\n * @param tokenReference\n * @param maxHitsPerQuery\n *\n * @return {InvalidTokenError}\n */\n InvalidTokenError.createInvalidTokenMaxHitsPerQuery = function (tokenReference, maxHitsPerQuery) {\n return new InvalidTokenError(\"Token \" + tokenReference + \"not valid. Max \" + maxHitsPerQuery + \" hits allowed\");\n };\n return InvalidTokenError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.InvalidTokenError = InvalidTokenError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceExistsError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource exists error\n */\nvar ResourceExistsError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceExistsError, _super);\n function ResourceExistsError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceExistsError.getTransportableHTTPError = function () {\n return 409;\n };\n /**\n * Index not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.indexAvailable = function () {\n return new ResourceExistsError(\"Index exists and cannot be created again\");\n };\n /**\n * Events not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.eventsIndexAvailable = function () {\n return new ResourceExistsError(\"Events index exists and cannot be created again\");\n };\n /**\n * Logs not available\n *\n * @return {InvalidFormatError}\n */\n ResourceExistsError.logsIndexAvailable = function () {\n return new ResourceExistsError(\"Logs index exists and cannot be created again\");\n };\n return ResourceExistsError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceExistsError = ResourceExistsError;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResourceNotAvailableError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Resource not available error\n */\nvar ResourceNotAvailableError = /** @class */ (function (_super) {\n tslib_1.__extends(ResourceNotAvailableError, _super);\n function ResourceNotAvailableError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n ResourceNotAvailableError.getTransportableHTTPError = function () {\n return 404;\n };\n /**\n * Index not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.indexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Index not available - \" + resourceId);\n };\n /**\n * Events not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.eventsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Events not available - \" + resourceId);\n };\n /**\n * Logs not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.logsIndexNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Logs not available - \" + resourceId);\n };\n /**\n * Engine not available\n *\n * @param resourceId\n *\n * @return {InvalidFormatError}\n */\n ResourceNotAvailableError.engineNotAvailable = function (resourceId) {\n return new ResourceNotAvailableError(\"Engine not available - \" + resourceId);\n };\n return ResourceNotAvailableError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.ResourceNotAvailableError = ResourceNotAvailableError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnknownError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Connection error\n */\nvar UnknownError = /** @class */ (function (_super) {\n tslib_1.__extends(UnknownError, _super);\n function UnknownError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Unknown error\n *\n * @return this\n */\n UnknownError.createUnknownError = function () {\n return new this(\"Unknown error.\");\n };\n return UnknownError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnknownError = UnknownError;\n","\"use strict\";\nexports.__esModule = true;\nexports.UnsupportedContentTypeError = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ErrorWithMessage_1 = require(\"./ErrorWithMessage\");\n/**\n * Unsupported content type error\n */\nvar UnsupportedContentTypeError = /** @class */ (function (_super) {\n tslib_1.__extends(UnsupportedContentTypeError, _super);\n function UnsupportedContentTypeError() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Get transportable http error\n *\n * @return {number}\n */\n UnsupportedContentTypeError.getTransportableHTTPError = function () {\n return 415;\n };\n /**\n * Unsupported content type\n *\n * @return {InvalidFormatError}\n */\n UnsupportedContentTypeError.createUnsupportedContentTypeException = function () {\n return new UnsupportedContentTypeError(\"This content type is not accepted. Please use application/json\");\n };\n return UnsupportedContentTypeError;\n}(ErrorWithMessage_1.ErrorWithMessage));\nexports.UnsupportedContentTypeError = UnsupportedContentTypeError;\n","\"use strict\";\nexports.__esModule = true;\nexports.Square = exports.Polygon = exports.CoordinateAndDistance = exports.LocationRange = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\n/**\n * Abstract Location Range class\n */\nvar LocationRange = /** @class */ (function () {\n function LocationRange() {\n }\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n LocationRange.fromFilterObject = function (object) {\n throw TypeError(\"Method not valid\");\n };\n /**\n * to array\n */\n LocationRange.prototype.toArray = function () {\n return {\n type: this.getName(),\n data: this.toFilterObject()\n };\n };\n /**\n * Create from array\n *\n * @param array\n */\n LocationRange.createFromArray = function (array) {\n if (array.type == \"CoordinateAndDistance\") {\n return CoordinateAndDistance.fromFilterObject(array.data);\n }\n if (array.type == \"Polygon\") {\n return Polygon.fromFilterObject(array.data);\n }\n if (array.type == \"Square\") {\n return Square.fromFilterObject(array.data);\n }\n };\n return LocationRange;\n}());\nexports.LocationRange = LocationRange;\n/**\n * CoordinateAndDistance\n */\nvar CoordinateAndDistance = /** @class */ (function (_super) {\n tslib_1.__extends(CoordinateAndDistance, _super);\n /**\n * Constructor\n *\n * @param coordinate\n * @param distance\n */\n function CoordinateAndDistance(coordinate, distance) {\n var _this = _super.call(this) || this;\n _this.coordinate = coordinate;\n _this.distance = distance;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n CoordinateAndDistance.prototype.toFilterObject = function () {\n return {\n coordinate: this.coordinate.toArray(),\n distance: this.distance\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n CoordinateAndDistance.prototype.getName = function () {\n return \"CoordinateAndDistance\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n CoordinateAndDistance.fromFilterObject = function (object) {\n return new CoordinateAndDistance(Coordinate_1.Coordinate.createFromArray(object.coordinate), object.distance);\n };\n return CoordinateAndDistance;\n}(LocationRange));\nexports.CoordinateAndDistance = CoordinateAndDistance;\n/**\n * Polygon\n */\nvar Polygon = /** @class */ (function (_super) {\n tslib_1.__extends(Polygon, _super);\n /**\n * Constructor\n *\n * @param coordinates\n */\n function Polygon(coordinates) {\n var _this = _super.call(this) || this;\n if (coordinates.length < 3) {\n throw new Error(\"A polygon needs more than two coordinates.\");\n }\n _this.coordinates = coordinates;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{coordinates: {lat:number, lon:number}[]}}\n */\n Polygon.prototype.toFilterObject = function () {\n var coordinates = [];\n for (var i in this.coordinates) {\n coordinates.push(this.coordinates[i].toArray());\n }\n return {\n coordinates: coordinates\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Polygon.prototype.getName = function () {\n return \"Polygon\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {Polygon}\n */\n Polygon.fromFilterObject = function (object) {\n var coordinates = [];\n for (var i in object.coordinates) {\n coordinates.push(Coordinate_1.Coordinate.createFromArray(object.coordinates[i]));\n }\n return new Polygon(coordinates);\n };\n return Polygon;\n}(LocationRange));\nexports.Polygon = Polygon;\n/**\n * Square\n */\nvar Square = /** @class */ (function (_super) {\n tslib_1.__extends(Square, _super);\n /**\n * Constructor\n *\n * @param topLeftCoordinate\n * @param bottomRightCoordinate\n */\n function Square(topLeftCoordinate, bottomRightCoordinate) {\n var _this = _super.call(this) || this;\n _this.topLeftCoordinate = topLeftCoordinate;\n _this.bottomRightCoordinate = bottomRightCoordinate;\n return _this;\n }\n /**\n * To filter object\n *\n * @return {{}}}\n */\n Square.prototype.toFilterObject = function () {\n return {\n top_left: this.topLeftCoordinate.toArray(),\n bottom_right: this.bottomRightCoordinate.toArray()\n };\n };\n /**\n * Get name\n *\n * @return {string}\n */\n Square.prototype.getName = function () {\n return \"Square\";\n };\n /**\n * From filter object\n *\n * @param object\n *\n * @return {LocationRange}\n */\n Square.fromFilterObject = function (object) {\n return new Square(Coordinate_1.Coordinate.createFromArray(object.top_left), Coordinate_1.Coordinate.createFromArray(object.bottom_right));\n };\n return Square;\n}(LocationRange));\nexports.Square = Square;\n","\"use strict\";\nexports.__esModule = true;\nexports.AxiosClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar axios_1 = require(\"axios\");\nvar __1 = require(\"..\");\nvar Client_1 = require(\"./Client\");\nvar Response_1 = require(\"./Response\");\n/**\n * AxiosClient\n */\nvar AxiosClient = /** @class */ (function (_super) {\n tslib_1.__extends(AxiosClient, _super);\n /**\n * Constructor\n *\n * @param host\n * @param version\n * @param timeout\n * @param overrideQueries\n */\n function AxiosClient(host, version, timeout, overrideQueries) {\n var _this = _super.call(this, version) || this;\n _this.host = host;\n _this.timeout = timeout;\n _this.overrideQueries = overrideQueries;\n _this.abortControllers = {};\n return _this;\n }\n /**\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n */\n AxiosClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var headers, axiosRequestConfig, axiosResponse, error_1, response;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n method = method.toLowerCase();\n if (\"get\" === method &&\n this.overrideQueries) {\n this.abort(url, true);\n }\n headers = \"get\" === method\n ? {}\n : {\n \"Content-Encoding\": \"gzip\",\n \"Content-Type\": \"application/json\"\n };\n axiosRequestConfig = {\n baseURL: this.host.replace(/\\/*$/g, \"\"),\n data: data,\n headers: headers,\n method: method,\n timeout: this.timeout,\n transformRequest: [function (rawData) { return JSON.stringify(rawData); }],\n url: url + \"?\" + Client_1.Client.objectToUrlParameters(tslib_1.__assign(tslib_1.__assign({}, parameters), {\n token: credentials.token\n })).replace(/#/g, \"%23\")\n };\n if (typeof this.abortControllers[url] !== \"undefined\") {\n axiosRequestConfig.signal = this.abortControllers[url].signal;\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.fetch(url, axiosRequestConfig, 3)];\n case 2:\n axiosResponse = _a.sent();\n return [2 /*return*/, new Response_1.Response(axiosResponse.status, axiosResponse.data)];\n case 3:\n error_1 = _a.sent();\n response = void 0;\n if (error_1.response) {\n response = new Response_1.Response(error_1.response.status, error_1.response.data);\n }\n else {\n response = new Response_1.Response(__1.ConnectionError.getTransportableHTTPError(), {\n message: error_1.message\n });\n }\n throw response;\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n AxiosClient.prototype.abort = function (url, urlIsFormatted) {\n if (!urlIsFormatted) {\n url = url.replace(/^\\/*|\\/*$/g, \"\");\n url = \"/\" + (this.version + \"/\" + url).replace(/^\\/*|\\/*$/g, \"\");\n }\n if (typeof this.abortControllers[url] !== \"undefined\") {\n this.abortControllers[url].abort();\n }\n this.generateAbortController(url);\n };\n /**\n * Generate a new cancellation token for a query\n *\n * @param url\n */\n AxiosClient.prototype.generateAbortController = function (url) {\n this.abortControllers[url] = new AbortController();\n };\n /**\n * @param url\n * @param options\n * @param retries\n */\n AxiosClient.prototype.fetch = function (url, options, retries) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, axios_1[\"default\"]\n .request(options)\n .then(function (response) {\n return {\n data: response.data,\n status: response.status\n };\n })[\"catch\"](function (error) {\n var response = error.response;\n if (error.code !== undefined &&\n error.code !== \"ECONNREFUSED\" &&\n error.code !== \"ECONNABORTED\" &&\n error.code !== \"ERR_BAD_REQUEST\" &&\n error.message !== \"Network Error\") {\n return {\n data: response.data,\n status: response.status\n };\n }\n if (retries <= 0) {\n throw error;\n }\n retries = retries - 1;\n return _this.fetch(url, options, retries);\n })];\n case 1: return [2 /*return*/, _a.sent()];\n }\n });\n });\n };\n return AxiosClient;\n}(Client_1.Client));\nexports.AxiosClient = AxiosClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.CacheClient = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ts_md5_1 = require(\"ts-md5\");\n/**\n * AxiosClient\n */\nvar CacheClient = /** @class */ (function () {\n function CacheClient(httpClient) {\n this.cache = {};\n this.hits = 0;\n this.httpClient = httpClient;\n }\n CacheClient.prototype.flushCache = function () {\n this.cache = {};\n };\n CacheClient.prototype.size = function () {\n return Object.keys(this.cache).length;\n };\n CacheClient.prototype.getNumberOfHits = function () {\n return this.hits;\n };\n /**\n * Get\n *\n * @param url\n * @param method\n * @param credentials\n * @param parameters\n * @param data\n *\n * @return {Promise}\n */\n CacheClient.prototype.get = function (url, method, credentials, parameters, data) {\n if (parameters === void 0) { parameters = {}; }\n if (data === void 0) { data = {}; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var cacheUID, _a, _b;\n return tslib_1.__generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (method !== 'get') {\n return [2 /*return*/, this.httpClient.get(url, method, credentials, parameters, data)];\n }\n cacheUID = ts_md5_1.Md5.hashStr(JSON.stringify({\n 'u': url,\n 'c': credentials,\n 'p': parameters,\n 'd': data\n })).toString();\n if (!!this.cache[cacheUID]) return [3 /*break*/, 2];\n _a = this.cache;\n _b = cacheUID;\n return [4 /*yield*/, this.httpClient.get(url, method, credentials, parameters, data)];\n case 1:\n _a[_b] = _c.sent();\n return [3 /*break*/, 3];\n case 2:\n this.httpClient.abort(url, false);\n this.hits++;\n _c.label = 3;\n case 3: return [2 /*return*/, this.cache[cacheUID]];\n }\n });\n });\n };\n /**\n * Abort current request\n * And regenerate the cancellation token\n *\n * @param url\n * @param urlIsFormatted\n */\n CacheClient.prototype.abort = function (url, urlIsFormatted) {\n };\n return CacheClient;\n}());\nexports.CacheClient = CacheClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Client = void 0;\n/**\n * Client\n */\nvar Client = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param version\n */\n function Client(version) {\n this.version = version.replace(/^\\/*|\\/*$/g, \"\");\n }\n /**\n * Build an url parameters array by an object\n *\n * @param params\n *\n * @returns {string}\n */\n Client.objectToUrlParameters = function (params) {\n var builtParams = [];\n for (var i in params) {\n builtParams.push(i + \"=\" + params[i]);\n }\n return builtParams.join(\"&\");\n };\n return Client;\n}());\nexports.Client = Client;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpClient = void 0;\n/**\n * Http class\n */\nvar HttpClient = /** @class */ (function () {\n function HttpClient() {\n }\n return HttpClient;\n}());\nexports.HttpClient = HttpClient;\n","\"use strict\";\nexports.__esModule = true;\nexports.Response = void 0;\n/**\n * Response\n */\nvar Response = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param code\n * @param body\n */\n function Response(code, body) {\n this.code = code;\n this.body = body;\n }\n /**\n * Get code\n *\n * @return {number}\n */\n Response.prototype.getCode = function () {\n return this.code;\n };\n /**\n * Get body\n *\n * @return {any}\n */\n Response.prototype.getBody = function () {\n return this.body;\n };\n return Response;\n}());\nexports.Response = Response;\n","\"use strict\";\nexports.__esModule = true;\nexports.AppUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * AppUUID class\n */\nvar AppUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function AppUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.appUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n AppUUID.createById = function (id) {\n return new AppUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n AppUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n AppUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n AppUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new AppUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n AppUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return AppUUID;\n}());\nexports.AppUUID = AppUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Changes = exports.TYPE_ARRAY = exports.TYPE_ARRAY_EXPECTS_ELEMENT = exports.TYPE_ARRAY_ELEMENT_DELETE = exports.TYPE_ARRAY_ELEMENT_ADD = exports.TYPE_ARRAY_ELEMENT_UPDATE = exports.TYPE_LITERAL = exports.TYPE_VALUE = void 0;\n/**\n * filter constants\n */\nexports.TYPE_VALUE = 1;\nexports.TYPE_LITERAL = 4;\nexports.TYPE_ARRAY_ELEMENT_UPDATE = 8;\nexports.TYPE_ARRAY_ELEMENT_ADD = 16;\nexports.TYPE_ARRAY_ELEMENT_DELETE = 32;\nexports.TYPE_ARRAY_EXPECTS_ELEMENT = 24;\nexports.TYPE_ARRAY = 56;\n/**\n * Changes Type cast\n * @param Changes\n */\nvar Changes = /** @class */ (function () {\n function Changes() {\n /**\n * Changes\n *\n * @type {Array}\n */\n this.changes = [];\n }\n /**\n * Add new change\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addChange = function (field, value, type) {\n if (type === void 0) { type = exports.TYPE_VALUE; }\n this.changes.push({\n field: field,\n type: type,\n value: value\n });\n };\n /**\n * Update element from list\n *\n * @param field\n * @param condition\n * @param value\n * @param type\n */\n Changes.prototype.updateElementFromList = function (field, condition, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_UPDATE,\n condition: condition,\n value: value\n });\n };\n /**\n * Add element in list\n *\n * @param field\n * @param value\n * @param type\n */\n Changes.prototype.addElementInList = function (field, value, type) {\n this.changes.push({\n field: field,\n type: type | exports.TYPE_ARRAY_ELEMENT_ADD,\n value: value\n });\n };\n /**\n * Delete element from list\n *\n * @param field\n * @param condition\n */\n Changes.prototype.deleteElementFromList = function (field, condition) {\n this.changes.push({\n field: field,\n type: exports.TYPE_ARRAY_ELEMENT_DELETE,\n condition: condition\n });\n };\n /**\n * Get changes\n *\n * @returns {[]}\n */\n Changes.prototype.getChanges = function () {\n return this.changes;\n };\n /**\n * Create\n *\n * @returns {Changes}\n */\n Changes.create = function () {\n return new Changes();\n };\n /**\n * To array\n *\n * @returns {[]}\n */\n Changes.prototype.toArray = function () {\n return JSON.parse(JSON.stringify(this.changes));\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Changes}\n */\n Changes.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var changes = Changes.create();\n changes.changes = array;\n return changes;\n };\n return Changes;\n}());\nexports.Changes = Changes;\n","\"use strict\";\nexports.__esModule = true;\nexports.Coordinate = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * Coordinate Type cast\n * @param coordinate\n */\nvar Coordinate = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param {number} lat\n * @param {number} lon\n */\n function Coordinate(lat, lon) {\n this.lat = lat;\n this.lon = lon;\n }\n /**\n * Get latitude\n *\n * @return float\n */\n Coordinate.prototype.getLatitude = function () {\n return this.lat;\n };\n /**\n * Get longitude\n *\n * @return float\n */\n Coordinate.prototype.getLongitude = function () {\n return this.lon;\n };\n /**\n * To array\n *\n * @return {{lat: number, lon: number}}\n */\n Coordinate.prototype.toArray = function () {\n return {\n lat: this.lat,\n lon: this.lon\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return Coordinate\n *\n * @throws InvalidFormatError\n */\n Coordinate.createFromArray = function (array) {\n if (typeof array.lat == \"undefined\" ||\n typeof array.lon == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n return new Coordinate(array.lat, array.lon);\n };\n return Coordinate;\n}());\nexports.Coordinate = Coordinate;\n","\"use strict\";\nexports.__esModule = true;\nexports.Index = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\n/**\n * Index class\n */\nvar Index = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param appUUID\n * @param isOK\n * @param docCount\n * @param size\n */\n function Index(uuid, appUUID, isOK, docCount, size) {\n if (isOK === void 0) { isOK = false; }\n if (docCount === void 0) { docCount = 0; }\n if (size === void 0) { size = '0kb'; }\n this.uuid = uuid;\n this.appUUID = appUUID;\n this.isOK = isOK;\n this.docCount = docCount;\n this.size = size;\n }\n /**\n * Get uuid\n *\n * @return {IndexUUID}\n */\n Index.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get app id\n *\n * @return {AppUUID}\n */\n Index.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Index is OK\n *\n * @return {boolean}\n */\n Index.prototype.isOk = function () {\n return this.isOK;\n };\n /**\n * Get doc count\n *\n * @return {number}\n */\n Index.prototype.getDocCount = function () {\n return this.docCount;\n };\n /**\n * get size\n *\n * @return {string}\n */\n Index.prototype.getSize = function () {\n return this.size;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n Index.prototype.toArray = function () {\n return {\n uuid: this.uuid.toArray(),\n app_id: this.appUUID.toArray(),\n is_ok: this.isOK,\n doc_count: this.docCount,\n size: this.size\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n Index.createFromArray = function (array) {\n if (typeof array.uuid == \"undefined\" ||\n typeof array.app_id == \"undefined\") {\n throw InvalidFormatError_1.InvalidFormatError.indexFormatNotValid();\n }\n return new Index(IndexUUID_1.IndexUUID.createFromArray(array.uuid), AppUUID_1.AppUUID.createFromArray(array.app_id), (typeof array.is_ok == \"undefined\" ? false : array.is_ok), (typeof array.doc_count == \"undefined\" ? 0 : array.doc_count), (typeof array.size == \"undefined\" ? '0kb' : array.size));\n };\n return Index;\n}());\nexports.Index = Index;\n","\"use strict\";\nexports.__esModule = true;\nexports.IndexUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * IndexUUID class\n */\nvar IndexUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n */\n function IndexUUID(id) {\n if (id.indexOf('_') >= 0) {\n throw InvalidFormatError_1.InvalidFormatError.indexUUIDFormatNotValid();\n }\n this.id = id;\n }\n /**\n * Create by id\n *\n * @param id\n *\n * @returns {ItemUUID}\n */\n IndexUUID.createById = function (id) {\n return new IndexUUID(id);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n IndexUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n IndexUUID.prototype.toArray = function () {\n return {\n id: this.id\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n IndexUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new IndexUUID(array.id);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n IndexUUID.prototype.composedUUID = function () {\n return this.id;\n };\n return IndexUUID;\n}());\nexports.IndexUUID = IndexUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Item = void 0;\nvar tslib_1 = require(\"tslib\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Coordinate_1 = require(\"./Coordinate\");\nvar ItemUUID_1 = require(\"./ItemUUID\");\nvar AppUUID_1 = require(\"./AppUUID\");\nvar IndexUUID_1 = require(\"./IndexUUID\");\n/**\n * Item class\n */\nvar Item = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n */\n function Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n this.metadata = {};\n this.indexedMetadata = {};\n this.searchableMetadata = {};\n this.exactMatchingMetadata = [];\n this.suggest = [];\n this.highlights = {};\n this.promoted = false;\n this.uuid = uuid;\n this.coordinate = coordinate;\n this.metadata = metadata;\n this.indexedMetadata = indexedMetadata;\n this.searchableMetadata = searchableMetadata;\n this.exactMatchingMetadata = exactMatchingMetadata;\n this.suggest = suggest;\n }\n /**\n * Create new Item\n *\n * @param uuid\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.create = function (uuid, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, null, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Create new located Item\n *\n * @param uuid\n * @param coordinate\n * @param metadata\n * @param indexedMetadata\n * @param searchableMetadata\n * @param exactMatchingMetadata\n * @param suggest\n * @returns {Item}\n */\n Item.createLocated = function (uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest) {\n if (metadata === void 0) { metadata = {}; }\n if (indexedMetadata === void 0) { indexedMetadata = {}; }\n if (searchableMetadata === void 0) { searchableMetadata = {}; }\n if (exactMatchingMetadata === void 0) { exactMatchingMetadata = []; }\n if (suggest === void 0) { suggest = []; }\n return new Item(uuid, coordinate, metadata, indexedMetadata, searchableMetadata, exactMatchingMetadata, suggest);\n };\n /**\n * Get uuid\n *\n * @returns ItemUUID\n */\n Item.prototype.getUUID = function () {\n return this.uuid;\n };\n /**\n * Get id\n *\n * @returns string\n */\n Item.prototype.getId = function () {\n return this.uuid.getId();\n };\n /**\n * Get type\n *\n * @returns string\n */\n Item.prototype.getType = function () {\n return this.uuid.getType();\n };\n /**\n * Get coordinate\n *\n * @returns Coordinate|null\n */\n Item.prototype.getCoordinate = function () {\n return this.coordinate;\n };\n /**\n * Get distance\n *\n * @returns int\n */\n Item.prototype.getDistance = function () {\n return this.distance;\n };\n /**\n * Get metadata\n *\n * @returns Array\n */\n Item.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Set metadata\n *\n * @param metadata\n */\n Item.prototype.setMetadata = function (metadata) {\n this.metadata = metadata;\n };\n /**\n * Add metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addMetadata = function (key, value) {\n this.metadata[key] = value;\n };\n /**\n * Get indexed metadata\n *\n * @returns Array\n */\n Item.prototype.getIndexedMetadata = function () {\n return this.indexedMetadata;\n };\n /**\n * Set indexed metadata\n *\n * @param indexedMetadata\n */\n Item.prototype.setIndexedMetadata = function (indexedMetadata) {\n this.indexedMetadata = indexedMetadata;\n };\n /**\n * Add indexed metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addIndexedMetadata = function (key, value) {\n this.indexedMetadata[key] = value;\n };\n /**\n * Get searchable metadata\n *\n * @returns Array\n */\n Item.prototype.getSearchableMetadata = function () {\n return this.searchableMetadata;\n };\n /**\n * Set searchable metadata\n *\n * @param searchableMetadata\n */\n Item.prototype.setSearchableMetadata = function (searchableMetadata) {\n this.searchableMetadata = searchableMetadata;\n };\n /**\n * Add searchable metadata\n *\n * @param key\n * @param value\n */\n Item.prototype.addSearchableMetadata = function (key, value) {\n this.searchableMetadata[key] = value;\n };\n /**\n * Get exactMatching metadata\n *\n * @returns Array\n */\n Item.prototype.getExactMatchingMetadata = function () {\n return this.exactMatchingMetadata;\n };\n /**\n * Set exactMatching metadata\n *\n * @param exactMatchingMetadata\n */\n Item.prototype.setExactMatchingMetadata = function (exactMatchingMetadata) {\n this.exactMatchingMetadata = exactMatchingMetadata;\n };\n /**\n * Add exactMatching metadata\n *\n * @param value\n */\n Item.prototype.addExactMatchingMetadata = function (value) {\n this.exactMatchingMetadata.push(value);\n };\n /**\n * Get all metadata\n *\n * @returns {{}}\n */\n Item.prototype.getAllMetadata = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.metadata), this.indexedMetadata);\n };\n /**\n * Get\n *\n * @param key\n *\n * @returns mixed|null\n */\n Item.prototype.get = function (key) {\n var allMetadata = this.getAllMetadata();\n return (typeof allMetadata[key] != \"undefined\")\n ? allMetadata[key]\n : null;\n };\n /**\n * Get suggest\n *\n * @returns Array\n */\n Item.prototype.getSuggest = function () {\n return this.suggest;\n };\n /**\n * Get highlights\n *\n * @returns Array\n */\n Item.prototype.getHighlights = function () {\n return this.highlights;\n };\n /**\n * Get highlight\n *\n * @param key\n *\n * @return string|null\n */\n Item.prototype.getHighlight = function (key) {\n return (typeof this.highlights[key] != \"undefined\")\n ? this.highlights[key]\n : null;\n };\n /**\n * Is promoted\n *\n * @returns boolean\n */\n Item.prototype.isPromoted = function () {\n return this.promoted;\n };\n /**\n * Set score\n *\n * @param score\n *\n * @return {Item}\n */\n Item.prototype.setScore = function (score) {\n this.score = score;\n return this;\n };\n /**\n * Get score\n *\n * @return {number}\n */\n Item.prototype.getScore = function () {\n return this.score;\n };\n /**\n * Set appUUID\n *\n * @return {AppUUID}\n */\n Item.prototype.getAppUUID = function () {\n return this.appUUID;\n };\n /**\n * Set indexUUID\n *\n * @return {IndexUUID}\n */\n Item.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n /**\n * To array\n */\n Item.prototype.toArray = function () {\n var itemAsArray = {\n uuid: this.uuid.toArray()\n };\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n itemAsArray.coordinate = this.coordinate.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n itemAsArray.metadata = this.metadata;\n }\n if (Object.keys(this.indexedMetadata).length > 0) {\n itemAsArray.indexed_metadata = this.indexedMetadata;\n }\n if (Object.keys(this.searchableMetadata).length > 0) {\n itemAsArray.searchable_metadata = this.searchableMetadata;\n }\n if (this.exactMatchingMetadata.length > 0) {\n itemAsArray.exact_matching_metadata = this.exactMatchingMetadata;\n }\n if (this.suggest.length > 0) {\n itemAsArray.suggest = this.suggest;\n }\n if (Object.keys(this.highlights).length > 0) {\n itemAsArray.highlights = this.highlights;\n }\n if (this.isPromoted()) {\n itemAsArray.is_promoted = true;\n }\n if (typeof this.distance != \"undefined\") {\n itemAsArray.distance = this.distance;\n }\n if (typeof this.score != \"undefined\") {\n itemAsArray.score = this.score;\n }\n if (typeof this.appUUID != \"undefined\") {\n itemAsArray.app_uuid = this.appUUID.toArray();\n }\n if (typeof this.indexUUID != \"undefined\") {\n itemAsArray.index_uuid = this.indexUUID.toArray();\n }\n return itemAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n */\n Item.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.uuid != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.itemUUIDRepresentationNotValid();\n }\n if (typeof array.coordinate != \"undefined\" &&\n typeof array.coordinate != \"object\") {\n throw InvalidFormatError_1.InvalidFormatError.coordinateFormatNotValid();\n }\n var item = (typeof array.coordinate == \"object\" &&\n array.coordinate != null)\n ? Item.createLocated(ItemUUID_1.ItemUUID.createFromArray(array.uuid), Coordinate_1.Coordinate.createFromArray(array.coordinate), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest))\n : Item.create(ItemUUID_1.ItemUUID.createFromArray(array.uuid), ((typeof array.metadata == \"undefined\") ? {} : array.metadata), ((typeof array.indexed_metadata == \"undefined\") ? {} : array.indexed_metadata), ((typeof array.searchable_metadata == \"undefined\") ? {} : array.searchable_metadata), ((typeof array.exact_matching_metadata == \"undefined\") ? [] : array.exact_matching_metadata), ((typeof array.suggest == \"undefined\") ? [] : array.suggest));\n if (typeof array.distance != \"undefined\" &&\n array.distance != null) {\n item.distance = array.distance;\n }\n if (typeof array.highlights == \"object\" &&\n array.highlights != null) {\n item.highlights = array.highlights;\n }\n if (typeof array.is_promoted != \"undefined\" &&\n array.is_promoted != null) {\n item.promoted = array.is_promoted;\n }\n if (typeof array.score != \"undefined\" &&\n array.score != null) {\n item.score = array.score;\n }\n if (typeof array.app_uuid != \"undefined\" &&\n array.app_uuid != null) {\n item.appUUID = AppUUID_1.AppUUID.createFromArray(array.app_uuid);\n }\n if (typeof array.index_uuid != \"undefined\" &&\n array.index_uuid != null) {\n item.indexUUID = IndexUUID_1.IndexUUID.createFromArray(array.index_uuid);\n }\n return item;\n };\n /**\n * Compose uuid\n *\n * @returns string\n */\n Item.prototype.composeUUID = function () {\n return this.uuid.composedUUID();\n };\n /**\n * Get path by field.\n *\n * @param field\n *\n * @returns {string}\n */\n Item.getPathByField = function (field) {\n return ([\"id\", \"type\"].indexOf(field) > -1)\n ? \"uuid.\" + field\n : \"indexed_metadata.\" + field;\n };\n return Item;\n}());\nexports.Item = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.ItemUUID = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * ItemUUID class\n */\nvar ItemUUID = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param id\n * @param type\n */\n function ItemUUID(id, type) {\n this.id = id;\n this.type = type;\n }\n /**\n * Create composed UUID\n *\n * @param composedUUID\n *\n * @returns {ItemUUID}\n */\n ItemUUID.createByComposedUUID = function (composedUUID) {\n var parts = composedUUID.split(\"~\");\n if (2 != parts.length) {\n throw InvalidFormatError_1.InvalidFormatError.composedItemUUIDNotValid();\n }\n return new ItemUUID(parts[0], parts[1]);\n };\n /**\n * Return id\n *\n * @returns {string}\n */\n ItemUUID.prototype.getId = function () {\n return this.id;\n };\n /**\n * Get type\n *\n * @returns {string}\n */\n ItemUUID.prototype.getType = function () {\n return this.type;\n };\n /**\n * To array\n *\n * @returns {{id: *, type: *}}\n */\n ItemUUID.prototype.toArray = function () {\n return {\n id: this.id,\n type: this.type\n };\n };\n /**\n * Create from array\n *\n * @param array {{id:string, type:string}}\n *\n * @return {ItemUUID}\n */\n ItemUUID.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new ItemUUID(array.id, array.type);\n };\n /**\n * Compose unique id\n *\n * @returns {string}\n */\n ItemUUID.prototype.composedUUID = function () {\n return this.id + \"~\" + this.type;\n };\n return ItemUUID;\n}());\nexports.ItemUUID = ItemUUID;\n","\"use strict\";\nexports.__esModule = true;\nexports.Metadata = void 0;\n/**\n * User class\n */\nvar Metadata = /** @class */ (function () {\n function Metadata() {\n }\n /**\n * To metadata\n *\n * @param array:{}\n *\n * @returns {string}\n */\n Metadata.toMetadata = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var parts = [];\n for (var key in array) {\n parts.push(key + \"##\" + array[key]);\n }\n return parts.join(\"~~\");\n };\n /**\n * From metadata\n *\n * @param metadata\n *\n * @return {{}}\n */\n Metadata.fromMetadata = function (metadata) {\n var values = {};\n var splittedParts = metadata.split(\"~~\");\n var iterator = 0;\n var size = 0;\n var lastElement = null;\n for (var key in splittedParts) {\n var part = splittedParts[key];\n var parts = part.split(\"##\");\n if (parts.length > 1) {\n lastElement = parts[1];\n values[parts[0]] = lastElement;\n }\n else {\n lastElement = part;\n values[iterator++] = lastElement;\n }\n size++;\n }\n if (size == 1) {\n values = {\n id: lastElement,\n name: lastElement\n };\n }\n if (typeof values.id == \"undefined\") {\n return null;\n }\n return values;\n };\n return Metadata;\n}());\nexports.Metadata = Metadata;\n","\"use strict\";\nexports.__esModule = true;\nexports.User = void 0;\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\n/**\n * User class\n */\nvar User = /** @class */ (function () {\n /**\n * Construct\n *\n * @param id string\n * @param attributes Array\n */\n function User(id, attributes) {\n if (attributes === void 0) { attributes = {}; }\n this.id = id;\n this.attributes = attributes;\n }\n /**\n * Return the user id\n *\n * @return {string}\n */\n User.prototype.getId = function () {\n return this.id;\n };\n /**\n * Return array\n *\n * @returns {{}}\n */\n User.prototype.getAttributes = function () {\n return this.attributes;\n };\n /**\n * To array\n *\n * @returns {{id: string, attributes: {}}}\n */\n User.prototype.toArray = function () {\n var array = {\n id: this.id\n };\n if (Object.keys(this.attributes).length > 0) {\n array.attributes = this.attributes;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return User\n */\n User.createFromArray = function (array) {\n if (array == null ||\n typeof array.id == \"undefined\" ||\n array.id == null) {\n throw InvalidFormatError_1.InvalidFormatError.userFormatNotValid();\n }\n var attributes = typeof array.attributes === typeof {}\n ? array.attributes\n : {};\n return new User(array.id, attributes);\n };\n return User;\n}());\nexports.User = User;\n","\"use strict\";\nexports.__esModule = true;\nexports.Aggregation = exports.AGGREGATION_NO_LIMIT = exports.AGGREGATION_SORT_BY_NAME_DESC = exports.AGGREGATION_SORT_BY_NAME_ASC = exports.AGGREGATION_SORT_BY_COUNT_DESC = exports.AGGREGATION_SORT_BY_COUNT_ASC = void 0;\nvar Filter_1 = require(\"./Filter\");\n/**\n * Aggregation constants\n */\nexports.AGGREGATION_SORT_BY_COUNT_ASC = [\"_count\", \"asc\"];\nexports.AGGREGATION_SORT_BY_COUNT_DESC = [\"_count\", \"desc\"];\nexports.AGGREGATION_SORT_BY_NAME_ASC = [\"_term\", \"asc\"];\nexports.AGGREGATION_SORT_BY_NAME_DESC = [\"_term\", \"desc\"];\nexports.AGGREGATION_NO_LIMIT = 0;\n/**\n * Aggregation class\n */\nvar Aggregation = /** @class */ (function () {\n /**\n * Construct\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n */\n function Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n this.subgroup = [];\n this.name = name;\n this.field = field;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.subgroup = subgroup;\n this.sort = sort;\n this.limit = limit;\n this.promoted = promoted;\n }\n /**\n * Get name\n *\n * @returns {string}\n */\n Aggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get field\n *\n * @returns {string}\n */\n Aggregation.prototype.getField = function () {\n return this.field;\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Aggregation.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Aggregation.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get subgroup\n *\n * @return {[]}\n */\n Aggregation.prototype.getSubgroup = function () {\n return this.subgroup;\n };\n /**\n * Get sort\n *\n * @return {[]}\n */\n Aggregation.prototype.getSort = function () {\n return this.sort;\n };\n /**\n * Get limit\n *\n * @return {number}\n */\n Aggregation.prototype.getLimit = function () {\n return this.limit;\n };\n /**\n * Get promoted\n *\n * @return {[]}\n */\n Aggregation.prototype.getPromoted = function () {\n return this.promoted;\n };\n /**\n * Create\n *\n * @param name\n * @param field\n * @param applicationType\n * @param filterType\n * @param subgroup\n * @param sort\n * @param limit\n * @param promoted\n *\n * @returns {Aggregation}\n */\n Aggregation.create = function (name, field, applicationType, filterType, subgroup, sort, limit, promoted) {\n if (subgroup === void 0) { subgroup = []; }\n if (sort === void 0) { sort = exports.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = exports.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return new Aggregation(name, field, applicationType, filterType, subgroup, sort, limit, promoted);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Aggregation.prototype.toArray = function () {\n var aggregationAsArray = {\n name: this.name\n };\n if (this.field !== \"uuid.type\") {\n aggregationAsArray.field = this.field;\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n aggregationAsArray.application_type = this.applicationType;\n }\n if (this.filterType !== Filter_1.FILTER_TYPE_FIELD) {\n aggregationAsArray.filter_type = this.filterType;\n }\n if (this.subgroup.length > 0) {\n aggregationAsArray.subgroup = this.subgroup;\n }\n if (JSON.stringify(this.sort) !== JSON.stringify(exports.AGGREGATION_SORT_BY_COUNT_DESC)) {\n aggregationAsArray.sort = this.sort;\n }\n if (this.limit !== exports.AGGREGATION_NO_LIMIT) {\n aggregationAsArray.limit = this.limit;\n }\n if (this.promoted.length > 0) {\n aggregationAsArray.promoted = this.promoted;\n }\n return aggregationAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Aggregation}\n */\n Aggregation.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field === \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.application_type === \"undefined\") {\n array.application_type = Filter_1.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type === \"undefined\") {\n array.filter_type = Filter_1.FILTER_TYPE_FIELD;\n }\n if (typeof array.subgroup === \"undefined\") {\n array.subgroup = [];\n }\n if (typeof array.sort === \"undefined\") {\n array.sort = exports.AGGREGATION_SORT_BY_COUNT_DESC;\n }\n if (typeof array.limit === \"undefined\") {\n array.limit = exports.AGGREGATION_NO_LIMIT;\n }\n if (typeof array.promoted === \"undefined\") {\n array.promoted = [];\n }\n return Aggregation.create(array.name, array.field, array.application_type, array.filter_type, array.subgroup, array.sort, array.limit, array.promoted);\n };\n return Aggregation;\n}());\nexports.Aggregation = Aggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.Filter = exports.FILTER_TYPE_QUERY = exports.FILTER_TYPE_GEO = exports.FILTER_TYPE_DATE_RANGE = exports.FILTER_TYPE_RANGE = exports.FILTER_TYPE_FIELD = exports.FILTER_PROMOTE = exports.FILTER_EXCLUDE = exports.FILTER_AT_LEAST_ONE = exports.FILTER_MUST_ALL_WITH_LEVELS = exports.FILTER_MUST_ALL = void 0;\n/**\n * filter constants\n */\nexports.FILTER_MUST_ALL = 4;\nexports.FILTER_MUST_ALL_WITH_LEVELS = 5;\nexports.FILTER_AT_LEAST_ONE = 8;\nexports.FILTER_EXCLUDE = 16;\nexports.FILTER_PROMOTE = 32;\nexports.FILTER_TYPE_FIELD = \"field\";\nexports.FILTER_TYPE_RANGE = \"range\";\nexports.FILTER_TYPE_DATE_RANGE = \"date_range\";\nexports.FILTER_TYPE_GEO = \"geo\";\nexports.FILTER_TYPE_QUERY = \"query\";\n/**\n * Filter class\n */\nvar Filter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n */\n function Filter(field, values, applicationType, filterType, filterTerms) {\n this.field = field;\n this.values = values;\n this.applicationType = applicationType;\n this.filterType = filterType;\n this.filterTerms = filterTerms;\n }\n /**\n * Get field\n *\n * @returns {string}\n */\n Filter.prototype.getField = function () {\n return this.field;\n };\n /**\n * Get values\n *\n * @returns {any}\n */\n Filter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Has value\n *\n * @param value\n *\n * @returns {boolean}\n */\n Filter.prototype.hasValue = function (value) {\n return typeof this.values[value] == \"undefined\";\n };\n /**\n * getApplicationType\n *\n * @returns {number}\n */\n Filter.prototype.getApplicationType = function () {\n return this.applicationType;\n };\n /**\n * Get filter type\n *\n * @return {string}\n */\n Filter.prototype.getFilterType = function () {\n return this.filterType;\n };\n /**\n * Get filter type\n *\n * @return {{}}\n */\n Filter.prototype.getFilterTerms = function () {\n return this.filterTerms;\n };\n /**\n * Create\n *\n * @param field\n * @param values\n * @param applicationType\n * @param filterType\n * @param filterTerms\n *\n * @return {Filter}\n */\n Filter.create = function (field, values, applicationType, filterType, filterTerms) {\n if (filterTerms === void 0) { filterTerms = []; }\n return new Filter(field, values, applicationType, filterType, filterTerms);\n };\n /**\n * To array\n *\n * @returns {Array}\n */\n Filter.prototype.toArray = function () {\n var filterAsArray = {};\n if (this.field != \"uuid.type\") {\n filterAsArray.field = this.field;\n }\n if (this.values.length > 0 ||\n Object.keys(this.values).length > 0) {\n filterAsArray.values = this.values;\n }\n if (this.applicationType != exports.FILTER_AT_LEAST_ONE) {\n filterAsArray.application_type = this.applicationType;\n }\n if (this.filterType != exports.FILTER_TYPE_FIELD) {\n filterAsArray.filter_type = this.filterType;\n }\n if (this.filterTerms.length > 0) {\n filterAsArray.filter_terms = this.filterTerms;\n }\n return filterAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Filter}\n */\n Filter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n if (typeof array.field == \"undefined\") {\n array.field = \"uuid.type\";\n }\n if (typeof array.values == \"undefined\") {\n array.values = [];\n }\n if (typeof array.application_type == \"undefined\") {\n array.application_type = exports.FILTER_AT_LEAST_ONE;\n }\n if (typeof array.filter_type == \"undefined\") {\n array.filter_type = exports.FILTER_TYPE_FIELD;\n }\n if (typeof array.filter_terms == \"undefined\") {\n array.filter_terms = [];\n }\n return Filter.create(array.field, array.values, array.application_type, array.filter_type, array.filter_terms);\n };\n return Filter;\n}());\nexports.Filter = Filter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Query = exports.NO_MIN_SCORE = exports.QUERY_DEFAULT_SIZE = exports.QUERY_DEFAULT_PAGE = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Coordinate_1 = require(\"../Model/Coordinate\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Item_1 = require(\"../Model/Item\");\nvar User_1 = require(\"../Model/User\");\nvar Aggregation_1 = require(\"./Aggregation\");\nvar Filter_1 = require(\"./Filter\");\nvar Filter_2 = require(\"./Filter\");\nvar Aggregation_2 = require(\"./Aggregation\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar Filter_3 = require(\"./Filter\");\nvar ScoreStrategies_1 = require(\"./ScoreStrategies\");\nvar SortBy_1 = require(\"./SortBy\");\nvar IndexUUID_1 = require(\"../Model/IndexUUID\");\n/**\n * Query constants\n */\nexports.QUERY_DEFAULT_PAGE = 1;\nexports.QUERY_DEFAULT_SIZE = 10;\nexports.NO_MIN_SCORE = 0.0;\n/**\n * Query class\n */\nvar Query = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryText\n */\n function Query(queryText) {\n this.UUID = null;\n this.fields = [];\n this.universeFilters = {};\n this.filters = {};\n this.itemsPromoted = [];\n this.aggregations = {};\n this.resultsEnabled = true;\n this.aggregationsEnabled = true;\n this.numberOfSuggestions = 0;\n this.highlightsEnabled = false;\n this.autocompleteEnabled = false;\n this.searchableFields = [];\n this.fuzziness = null;\n this.minScore = exports.NO_MIN_SCORE;\n this.metadata = {};\n this.subqueries = {};\n this.queryOperator = null;\n this.sortByInstance = SortBy_1.SortBy.create();\n this.filters._query = Filter_1.Filter.create(\"\", [queryText], 0, Filter_3.FILTER_TYPE_QUERY);\n }\n /**\n * Created located\n *\n * @param coordinate\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.createLocated = function (coordinate, queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n var query = Query.create(queryText, page, size);\n query.coordinate = coordinate;\n return query;\n };\n /**\n * Create\n *\n * @param queryText\n * @param page\n * @param size\n *\n * @returns {Query}\n */\n Query.create = function (queryText, page, size) {\n if (page === void 0) { page = exports.QUERY_DEFAULT_PAGE; }\n if (size === void 0) { size = exports.QUERY_DEFAULT_SIZE; }\n page = Math.max(1, page);\n var query = new Query(queryText);\n query.from = (page - 1) * size;\n query.size = size;\n query.page = page;\n return query;\n };\n /**\n * Create match all\n *\n * @return {Query}\n */\n Query.createMatchAll = function () {\n return Query.create(\"\", exports.QUERY_DEFAULT_PAGE, exports.QUERY_DEFAULT_SIZE);\n };\n /**\n * Create by UUID\n *\n * @param uuid\n *\n * @return {Query}\n */\n Query.createByUUID = function (uuid) {\n return Query.createByUUIDs(uuid);\n };\n /**\n * Create by UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.createByUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n var ids = [];\n for (var i in uuids) {\n ids.push(uuids[i].composedUUID());\n }\n var query = Query.create(\"\", exports.QUERY_DEFAULT_PAGE, ids.length)\n .disableAggregations()\n .disableSuggestions();\n query.filters._id = Filter_1.Filter.create(\"_id\", ids, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD);\n return query;\n };\n /**\n * Create by UUIDs\n *\n * @param queries\n *\n * @return {Query}\n */\n Query.createMultiquery = function (queries) {\n var query = Query.createMatchAll();\n query.subqueries = queries;\n return query;\n };\n /**\n * set fields\n *\n * @param fields\n *\n * @return {Query}\n */\n Query.prototype.setFields = function (fields) {\n this.fields = fields;\n return this;\n };\n /**\n * get fields\n *\n * @return {string[]}\n */\n Query.prototype.getFields = function () {\n return this.fields;\n };\n /**\n * Filter universe by types\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByTypes = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.type;\n }\n return this;\n };\n /**\n * Filter by types\n *\n * @param values\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByTypes = function (values, aggregate, aggregationSort) {\n var _a, _b;\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(\"type\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"type\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.type;\n }\n if (aggregate) {\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_b = {}, _b[\"type\"] = Aggregation_1.Aggregation.create(\"type\", fieldPath, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort), _b));\n }\n return this;\n };\n /**\n * Filter universe by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters.id;\n }\n return this;\n };\n /**\n * Filter by ids\n *\n * @param values\n *\n * @return {Query}\n */\n Query.prototype.filterByIds = function (values) {\n var _a;\n var fieldPath = Item_1.Item.getPathByField(\"id\");\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"id\"] = Filter_1.Filter.create(fieldPath, values, Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters.id;\n }\n return this;\n };\n /**\n * Filter universe by\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseBy = function (field, values, applicationType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter by\n *\n * @param filterName\n * @param field\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterBy = function (filterName, field, values, applicationType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, Filter_2.FILTER_TYPE_FIELD), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateBy(filterName, field, applicationType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter universe by range\n *\n * @param field\n * @param values\n * @param applicationType\n * @param rangeType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByRange = function (field, values, applicationType, rangeType) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length > 0) {\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[field] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.universeFilters[field];\n }\n return this;\n };\n /**\n * Filter universe by date range\n *\n * @param field\n * @param values\n * @param applicationType\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByDateRange = function (field, values, applicationType) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n return this.filterUniverseByRange(field, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE);\n };\n /**\n * Filter by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param values\n * @param applicationType\n * @param rangeType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByRange = function (filterName, field, ranges, values, applicationType, rangeType, aggregate, aggregationSort) {\n var _a;\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n var fieldPath = Item_1.Item.getPathByField(field);\n if (values.length !== 0) {\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[filterName] = Filter_1.Filter.create(fieldPath, values, applicationType, rangeType), _a));\n }\n else {\n delete this.filters[filterName];\n }\n if (aggregate) {\n this.aggregateByRange(filterName, fieldPath, ranges, applicationType, rangeType, aggregationSort);\n }\n return this;\n };\n /**\n * Filter by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param values\n * @param applicationType\n * @param aggregate\n * @param aggregationSort\n *\n * @return {Query}\n */\n Query.prototype.filterByDateRange = function (filterName, field, options, values, applicationType, aggregate, aggregationSort) {\n if (applicationType === void 0) { applicationType = Filter_2.FILTER_AT_LEAST_ONE; }\n if (aggregate === void 0) { aggregate = true; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n return this.filterByRange(filterName, field, options, values, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregate, aggregationSort);\n };\n /**\n * Filter universe by location\n *\n * @param locationRange\n *\n * @return {Query}\n */\n Query.prototype.filterUniverseByLocation = function (locationRange) {\n var _a;\n this.universeFilters = tslib_1.__assign(tslib_1.__assign({}, this.universeFilters), (_a = {}, _a[\"coordinate\"] = Filter_1.Filter.create(\"coordinate\", locationRange.toArray(), Filter_2.FILTER_AT_LEAST_ONE, Filter_2.FILTER_TYPE_GEO), _a));\n return this;\n };\n /**\n * Set filter fields\n *\n * @param searchableFields\n *\n * @return {Query}\n */\n Query.prototype.setSearchableFields = function (searchableFields) {\n this.searchableFields = searchableFields;\n return this;\n };\n /**\n * Get filter fields\n *\n * @return {string[]}\n */\n Query.prototype.getSearchableFields = function () {\n return this.searchableFields;\n };\n /**\n * Sort by\n *\n * @param sortBy\n *\n * @return {Query}\n */\n Query.prototype.sortBy = function (sortBy) {\n if (sortBy.isSortedByGeoDistance()) {\n if (!(this.coordinate instanceof Coordinate_1.Coordinate)) {\n throw InvalidFormatError_1.InvalidFormatError.querySortedByDistanceWithoutCoordinate();\n }\n sortBy.setCoordinate(this.coordinate);\n }\n this.sortByInstance = sortBy;\n return this;\n };\n /**\n * Aggregate by\n *\n * @param filterName\n * @param field\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateBy = function (filterName, field, applicationType, aggregationSort, limit, promoted) {\n var _a;\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, Filter_2.FILTER_TYPE_FIELD, [], aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by range\n *\n * @param filterName\n * @param field\n * @param ranges\n * @param applicationType\n * @param rangeType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByRange = function (filterName, field, ranges, applicationType, rangeType, aggregationSort, limit, promoted) {\n var _a;\n if (rangeType === void 0) { rangeType = Filter_2.FILTER_TYPE_RANGE; }\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n if (ranges.length === 0) {\n return this;\n }\n this.aggregations = tslib_1.__assign(tslib_1.__assign({}, this.aggregations), (_a = {}, _a[filterName] = Aggregation_1.Aggregation.create(filterName, Item_1.Item.getPathByField(field), applicationType, rangeType, ranges, aggregationSort, limit, promoted), _a));\n return this;\n };\n /**\n * Aggregate by date range\n *\n * @param filterName\n * @param field\n * @param options\n * @param applicationType\n * @param aggregationSort\n * @param limit\n * @param promoted\n *\n * @return {Query}\n */\n Query.prototype.aggregateByDateRange = function (filterName, field, options, applicationType, aggregationSort, limit, promoted) {\n if (aggregationSort === void 0) { aggregationSort = Aggregation_2.AGGREGATION_SORT_BY_COUNT_DESC; }\n if (limit === void 0) { limit = Aggregation_2.AGGREGATION_NO_LIMIT; }\n if (promoted === void 0) { promoted = []; }\n return this.aggregateByRange(filterName, field, options, applicationType, Filter_2.FILTER_TYPE_DATE_RANGE, aggregationSort, limit, promoted);\n };\n /**\n * Get aggregations\n *\n * @return {{}}\n */\n Query.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation by name\n *\n * @param aggregationName\n *\n * @return {Aggregation|null}\n */\n Query.prototype.getAggregation = function (aggregationName) {\n return this.aggregations[aggregationName] instanceof Aggregation_1.Aggregation\n ? this.aggregations[aggregationName]\n : null;\n };\n /**\n * Get query text\n *\n * @return {string}\n */\n Query.prototype.getQueryText = function () {\n var filter = this.filters._query;\n return filter instanceof Filter_1.Filter\n ? filter.getValues()[0]\n : \"\";\n };\n /**\n * Get universe filters\n *\n * @return {{}}\n */\n Query.prototype.getUniverseFilters = function () {\n return this.universeFilters;\n };\n /**\n * Get universe filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getUniverseFilter = function (filterName) {\n return this.universeFilters[filterName] instanceof Filter_1.Filter\n ? this.universeFilters[filterName]\n : null;\n };\n /**\n * Get filters\n *\n * @return {{}}\n */\n Query.prototype.getFilters = function () {\n return this.filters;\n };\n /**\n * Get filter by name\n *\n * @param filterName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilter = function (filterName) {\n return this.filters[filterName] instanceof Filter_1.Filter\n ? this.filters[filterName]\n : null;\n };\n /**\n * Get filter by field\n *\n * @param fieldName\n *\n * @return {Filter|null}\n */\n Query.prototype.getFilterByField = function (fieldName) {\n var fieldPath = Item_1.Item.getPathByField(fieldName);\n for (var i in this.filters) {\n if (this.filters[i].getField() == fieldPath) {\n return this.filters[i];\n }\n }\n return null;\n };\n /**\n * Get sort by\n *\n * @return {SortBy}\n */\n Query.prototype.getSortBy = function () {\n return this.sortByInstance;\n };\n /**\n * Get from\n *\n * @return {number}\n */\n Query.prototype.getFrom = function () {\n return this.from;\n };\n /**\n * Get size\n *\n * @return {number}\n */\n Query.prototype.getSize = function () {\n return this.size;\n };\n /**\n * Get page\n *\n * @return {number}\n */\n Query.prototype.getPage = function () {\n return this.page;\n };\n /**\n * Enable results\n *\n * @return {Query}\n */\n Query.prototype.enableResults = function () {\n this.resultsEnabled = true;\n return this;\n };\n /**\n * Disable results\n *\n * @return {Query}\n */\n Query.prototype.disableResults = function () {\n this.resultsEnabled = false;\n return this;\n };\n /**\n * Are results enabled\n *\n * @return {boolean}\n */\n Query.prototype.areResultsEnabled = function () {\n return this.resultsEnabled;\n };\n /**\n * Enable aggregations\n *\n * @return {Query}\n */\n Query.prototype.enableAggregations = function () {\n this.aggregationsEnabled = true;\n return this;\n };\n /**\n * Disable aggregations\n *\n * @return {Query}\n */\n Query.prototype.disableAggregations = function () {\n this.aggregationsEnabled = false;\n return this;\n };\n /**\n * Are aggregations enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAggregationsEnabled = function () {\n return this.aggregationsEnabled;\n };\n /**\n * Set number of suggestions\n *\n * @param numberOfSuggestions\n *\n * @return {Query}\n */\n Query.prototype.setNumberOfSuggestions = function (numberOfSuggestions) {\n this.numberOfSuggestions = numberOfSuggestions;\n return this;\n };\n /**\n * Disable suggestions\n *\n * @return {Query}\n */\n Query.prototype.disableSuggestions = function () {\n this.numberOfSuggestions = 0;\n return this;\n };\n /**\n * Get number of suggestions\n *\n * @return {number}\n */\n Query.prototype.getNumberOfSuggestions = function () {\n return this.numberOfSuggestions;\n };\n /**\n * Enable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.enableAutocomplete = function () {\n this.autocompleteEnabled = true;\n return this;\n };\n /**\n * Disable autocomplete\n *\n * @return {Query}\n */\n Query.prototype.disableAutocomplete = function () {\n this.autocompleteEnabled = false;\n return this;\n };\n /**\n * Are autocomplete enabled\n *\n * @return {boolean}\n */\n Query.prototype.areAutocompleteEnabled = function () {\n return this.autocompleteEnabled;\n };\n /**\n * Enable highlights\n *\n * @return {Query}\n */\n Query.prototype.enableHighlights = function () {\n this.highlightsEnabled = true;\n return this;\n };\n /**\n * Disable highlights\n *\n * @return {Query}\n */\n Query.prototype.disableHighlights = function () {\n this.highlightsEnabled = false;\n return this;\n };\n /**\n * Are highlights enabled\n *\n * @return {boolean}\n */\n Query.prototype.areHighlightsEnabled = function () {\n return this.highlightsEnabled;\n };\n /**\n * Promote uuid\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.promoteUUID = function (itemUUID) {\n this\n .itemsPromoted\n .push(itemUUID);\n return this;\n };\n /**\n * Promote UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.promoteUUIDs = function () {\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.itemsPromoted = uuids;\n return this;\n };\n /**\n * Get promoted UUIDs\n *\n * @return {ItemUUID[]}\n */\n Query.prototype.getItemsPromoted = function () {\n return this.itemsPromoted;\n };\n /**\n * Exclude id\n *\n * @param itemUUID\n *\n * @return {Query}\n */\n Query.prototype.excludeUUID = function (itemUUID) {\n this.excludeUUIDs(itemUUID);\n return this;\n };\n /**\n * Exclude UUIDs\n *\n * @param uuids\n *\n * @return {Query}\n */\n Query.prototype.excludeUUIDs = function () {\n var _a;\n var uuids = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n uuids[_i] = arguments[_i];\n }\n this.filters = tslib_1.__assign(tslib_1.__assign({}, this.filters), (_a = {}, _a[\"excluded_ids\"] = Filter_1.Filter.create(\"_id\", uuids.map(function (uuid) { return uuid.composedUUID(); }), Filter_2.FILTER_EXCLUDE, Filter_2.FILTER_TYPE_FIELD), _a));\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategies}\n */\n Query.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Set score strategies\n *\n * @param scoreStrategies\n */\n Query.prototype.setScoreStrategies = function (scoreStrategies) {\n this.scoreStrategies = scoreStrategies;\n return this;\n };\n /**\n * Get fuzziness\n *\n * @return any\n */\n Query.prototype.getFuzziness = function () {\n return this.fuzziness;\n };\n /**\n * Set fuzziness\n *\n * @param fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setFuzziness = function (fuzziness) {\n this.fuzziness = fuzziness;\n return this;\n };\n /**\n * Set auto fuzziness\n *\n * @return {Query}\n */\n Query.prototype.setAutoFuzziness = function () {\n this.fuzziness = 'AUTO';\n return this;\n };\n /**\n * Get min score\n *\n * @return any\n */\n Query.prototype.getMinScore = function () {\n return this.minScore;\n };\n /**\n * Set min score\n *\n * @param minScore\n *\n * @return {Query}\n */\n Query.prototype.setMinScore = function (minScore) {\n this.minScore = minScore;\n return this;\n };\n /**\n * By user\n *\n * @param user\n *\n * @return {Query}\n */\n Query.prototype.byUser = function (user) {\n this.user = user;\n return this;\n };\n /**\n * By anyone\n *\n * @return {null}\n */\n Query.prototype.anonymously = function () {\n this.user = null;\n return null;\n };\n /**\n * Get user\n *\n * @return {User}\n */\n Query.prototype.getUser = function () {\n return this.user;\n };\n /**\n * set metadata value\n *\n * @param name\n * @param value\n *\n * @return {Query}\n */\n Query.prototype.setMetadataValue = function (name, value) {\n this.metadata[name] = value;\n return this;\n };\n /**\n * Get metadata\n *\n * @return any\n */\n Query.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Add subquery\n *\n * @param name\n * @param subquery\n *\n * @return {Query}\n */\n Query.prototype.addSubquery = function (name, subquery) {\n this.subqueries[name] = subquery;\n return this;\n };\n /**\n * Get subqueries\n *\n * @return {Object}\n */\n Query.prototype.getSubqueries = function () {\n return this.subqueries;\n };\n /**\n * Identify it\n *\n * @param UUID\n *\n * @return {Query}\n */\n Query.prototype.identifyWith = function (UUID) {\n this.UUID = UUID;\n return this;\n };\n /**\n * Get identification\n *\n * @return {string|null}\n */\n Query.prototype.getUUID = function () {\n return this.UUID;\n };\n /**\n * Force Index UUID.\n *\n * @param indexUUID\n *\n * @return {Query}\n */\n Query.prototype.forceIndexUUID = function (indexUUID) {\n this.indexUUID = indexUUID;\n return this;\n };\n /**\n * Get IndexUUID\n *\n * @return {IndexUUID|null}\n */\n Query.prototype.getIndexUUID = function () {\n return this.indexUUID;\n };\n Query.prototype.setQueryOperator = function (queryOperator) {\n this.queryOperator = queryOperator;\n return this;\n };\n Query.prototype.getQueryOperator = function () {\n return this.queryOperator;\n };\n /**\n * To array\n *\n * @return {any}\n */\n Query.prototype.toArray = function () {\n var array = {};\n if (this.UUID !== null) {\n array.UUID = this.UUID;\n }\n if (this.getQueryText() !== \"\") {\n array.q = this.getQueryText();\n }\n if (this.coordinate instanceof Coordinate_1.Coordinate) {\n array.coordinate = this.coordinate.toArray();\n }\n /**\n * Fields\n */\n if (this.fields instanceof Array &&\n this.fields.length > 0) {\n array.fields = this.fields;\n }\n /**\n * Universe Filters\n */\n if (Object.keys(this.universeFilters).length) {\n array.universe_filters = {};\n for (var i in this.universeFilters) {\n var universeFilter = this.universeFilters[i];\n array.universe_filters[i] = universeFilter.toArray();\n }\n }\n /**\n * Filters\n */\n if (this.filters instanceof Object &&\n Object.keys(this.filters).length) {\n var filters = {};\n for (var i in this.filters) {\n var filter = this.filters[i];\n if (filter.getFilterType() !== Filter_3.FILTER_TYPE_QUERY) {\n filters[i] = filter.toArray();\n }\n }\n if (Object.keys(filters).length > 0) {\n array.filters = filters;\n }\n }\n /**\n * Aggregations\n */\n if (this.aggregations instanceof Object &&\n Object.keys(this.aggregations).length) {\n array.aggregations = {};\n for (var i in this.aggregations) {\n var aggregation = this.aggregations[i];\n array.aggregations[i] = aggregation.toArray();\n }\n }\n /**\n * Sort\n */\n var sort = this.sortByInstance.toArray();\n if (Object.keys(sort).length) {\n array.sort = sort;\n }\n /**\n * Page\n */\n var page = this.page;\n if (page !== exports.QUERY_DEFAULT_PAGE) {\n array.page = page;\n }\n /**\n * Size\n */\n var size = this.size;\n if (size !== exports.QUERY_DEFAULT_SIZE) {\n array.size = size;\n }\n /**\n * Booleans\n */\n if (this.resultsEnabled === false) {\n array.results_enabled = false;\n }\n if (this.autocompleteEnabled === true) {\n array.autocomplete_enabled = true;\n }\n if (this.numberOfSuggestions !== 0) {\n array.number_of_suggestions = this.numberOfSuggestions;\n }\n if (this.highlightsEnabled === true) {\n array.highlight_enabled = true;\n }\n if (this.aggregationsEnabled === false) {\n array.aggregations_enabled = false;\n }\n /**\n * Filter fields\n */\n if (this.searchableFields instanceof Array &&\n this.searchableFields.length > 0) {\n array.searchable_fields = this.searchableFields;\n }\n /**\n * Score strategies\n */\n if (this.scoreStrategies instanceof ScoreStrategies_1.ScoreStrategies) {\n var scoreStrategiesAsArray = this.scoreStrategies.toArray();\n if (Object.keys(scoreStrategiesAsArray).length > 0) {\n array.score_strategies = scoreStrategiesAsArray;\n }\n }\n if (this.fuzziness !== null) {\n array.fuzziness = this.fuzziness;\n }\n /**\n * Min score\n */\n var minScore = this.minScore;\n if (minScore !== exports.NO_MIN_SCORE) {\n array.min_score = minScore;\n }\n /**\n * User\n */\n if (this.user instanceof User_1.User) {\n array.user = this.user.toArray();\n }\n if (Object.keys(this.metadata).length > 0) {\n array.metadata = this.metadata;\n }\n if (this.subqueries instanceof Object &&\n Object.keys(this.subqueries).length) {\n array.subqueries = {};\n for (var i in this.subqueries) {\n var subquery = this.subqueries[i];\n array.subqueries[i] = subquery.toArray();\n }\n }\n if (this.indexUUID instanceof IndexUUID_1.IndexUUID) {\n array.index_uuid = this.indexUUID.toArray();\n }\n /**\n * items promoted\n */\n if (this.itemsPromoted.length > 0) {\n array.items_promoted = [];\n for (var i in this.itemsPromoted) {\n array\n .items_promoted\n .push(this.itemsPromoted[i].toArray());\n }\n }\n if (this.queryOperator !== \"or\" && this.queryOperator !== null) {\n array.query_operator = this.queryOperator;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {Query}\n */\n Query.createFromArray = function (array) {\n var query = array.coordinate instanceof Object\n ? Query.createLocated(Coordinate_1.Coordinate.createFromArray(array.coordinate), array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE)\n : Query.create(array.q ? array.q : \"\", array.page ? array.page : exports.QUERY_DEFAULT_PAGE, array.size ? array.size : exports.QUERY_DEFAULT_SIZE);\n query.UUID = typeof array.UUID === typeof \"\"\n ? array.UUID\n : undefined;\n /**\n * Fields\n */\n query.fields = array.fields instanceof Array\n ? array.fields\n : [];\n /**\n * Aggregations\n */\n var aggregationsAsArray = typeof array.aggregations === typeof {}\n ? array.aggregations\n : {};\n for (var i in aggregationsAsArray) {\n query.aggregations[i] = Aggregation_1.Aggregation.createFromArray(aggregationsAsArray[i]);\n }\n /**\n * Sort\n */\n var sortAsArray = typeof array.sort === typeof {}\n ? array.sort\n : {};\n if (Object.keys(sortAsArray).length > 0) {\n query.sortByInstance = SortBy_1.SortBy.createFromArray(sortAsArray);\n }\n /**\n * Filters\n */\n var filtersAsArray = typeof array.filters === typeof {}\n ? array.filters\n : {};\n for (var i in filtersAsArray) {\n query.filters[i] = Filter_1.Filter.createFromArray(filtersAsArray[i]);\n }\n /**\n * Universe Filters\n */\n var universeFiltersAsArray = typeof array.universe_filters === typeof {}\n ? array.universe_filters\n : {};\n for (var i in universeFiltersAsArray) {\n query.universeFilters[i] = Filter_1.Filter.createFromArray(universeFiltersAsArray[i]);\n }\n /**\n * Booleans\n */\n query.resultsEnabled = typeof array.results_enabled === \"boolean\"\n ? array.results_enabled\n : true;\n query.numberOfSuggestions = typeof array.number_of_suggestions === \"number\"\n ? array.number_of_suggestions\n : 0;\n query.autocompleteEnabled = typeof array.autocomplete_enabled === \"boolean\"\n ? array.autocomplete_enabled\n : false;\n query.aggregationsEnabled = typeof array.aggregations_enabled === \"boolean\"\n ? array.aggregations_enabled\n : true;\n query.highlightsEnabled = typeof array.highlight_enabled === \"boolean\"\n ? array.highlight_enabled\n : false;\n query.fuzziness = array.fuzziness ? array.fuzziness : null;\n query.minScore = array.min_score ? array.min_score : exports.NO_MIN_SCORE;\n /**\n * Items promoted\n */\n var itemsPromotedAsArray = typeof array.items_promoted === typeof {}\n ? array.items_promoted\n : {};\n for (var i in itemsPromotedAsArray) {\n query\n .itemsPromoted\n .push(ItemUUID_1.ItemUUID.createFromArray(itemsPromotedAsArray[i]));\n }\n /**\n * Subqueries\n */\n var subqueriesAsArray = typeof array.subqueries === typeof {}\n ? array.subqueries\n : {};\n for (var i in subqueriesAsArray) {\n query.subqueries[i] = Query.createFromArray(subqueriesAsArray[i]);\n }\n /**\n * Filter fields\n */\n query.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n query.searchableFields = array.searchable_fields instanceof Array\n ? array.searchable_fields\n : [];\n query.scoreStrategies = array.score_strategies instanceof Object\n ? ScoreStrategies_1.ScoreStrategies.createFromArray(array.score_strategies)\n : undefined;\n query.user = array.user instanceof Object\n ? User_1.User.createFromArray(array.user)\n : undefined;\n query.indexUUID = array.index_uuid instanceof Object\n ? IndexUUID_1.IndexUUID.createFromArray(array.index_uuid)\n : undefined;\n query.queryOperator = typeof array.query_operator === \"string\"\n ? array.query_operator\n : \"or\";\n return query;\n };\n return Query;\n}());\nexports.Query = Query;\n","\"use strict\";\nexports.__esModule = true;\nexports.Range = exports.RANGE_SEPARATOR = exports.RANGE_INFINITE = exports.RANGE_MINUS_INFINITE = void 0;\n/**\n * Aggregation constants\n */\nexports.RANGE_MINUS_INFINITE = null;\nexports.RANGE_INFINITE = null;\nexports.RANGE_SEPARATOR = \"..\";\n/**\n * Filter class\n */\nvar Range = /** @class */ (function () {\n function Range() {\n }\n /**\n * Strong to array\n *\n * @param string\n *\n * @returns {[number, number]}\n */\n Range.stringToArray = function (string) {\n var parts = string.split(exports.RANGE_SEPARATOR);\n var from = parts[0];\n var to = parts[1];\n var finalFrom = exports.RANGE_MINUS_INFINITE;\n var finalTo = exports.RANGE_INFINITE;\n if (from != \"\") {\n finalFrom = parseInt(from);\n }\n if (to != \"\") {\n finalTo = parseInt(to);\n }\n return [finalFrom, finalTo];\n };\n /**\n * Array to string\n *\n * @param values\n *\n * @return {string}\n */\n Range.arrayToString = function (values) {\n var finalValues = [\"\", \"\"];\n if (values[0] != exports.RANGE_MINUS_INFINITE) {\n finalValues[0] = String(values[0]);\n }\n if (values[1] != exports.RANGE_INFINITE) {\n finalValues[1] = String(values[1]);\n }\n return finalValues.join(exports.RANGE_SEPARATOR);\n };\n /**\n * Create ranges\n *\n * @param from\n * @param to\n * @param incremental\n */\n Range.createRanges = function (from, to, incremental) {\n var ranges = [];\n var nextTo;\n while (from < to) {\n nextTo = from + incremental;\n ranges.push(from + exports.RANGE_SEPARATOR + nextTo);\n from = nextTo;\n }\n return ranges;\n };\n return Range;\n}());\nexports.Range = Range;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategies = exports.MIN = exports.MAX = exports.AVG = exports.SUM = exports.MULTIPLY = void 0;\nvar ScoreStrategy_1 = require(\"./ScoreStrategy\");\n/**\n * ScoreStrategies constants\n */\nexports.MULTIPLY = 'multiply';\nexports.SUM = 'sum';\nexports.AVG = 'avg';\nexports.MAX = 'max';\nexports.MIN = 'min';\n/**\n * ScoreStrategies\n */\nvar ScoreStrategies = /** @class */ (function () {\n function ScoreStrategies() {\n this.scoreStrategies = [];\n }\n /**\n * Create empty\n *\n * @param scoreMode\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createEmpty = function (scoreMode) {\n if (scoreMode === void 0) { scoreMode = exports.SUM; }\n var scoreStrategies = new ScoreStrategies;\n scoreStrategies.scoreMode = scoreMode;\n return scoreStrategies;\n };\n /**\n * Add score strategy\n *\n * @param scoreStrategy\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.prototype.addScoreStrategy = function (scoreStrategy) {\n this.scoreStrategies.push(scoreStrategy);\n return this;\n };\n /**\n * Get score strategies\n *\n * @return {ScoreStrategy[]}\n */\n ScoreStrategies.prototype.getScoreStrategies = function () {\n return this.scoreStrategies;\n };\n /**\n * Get score mode\n *\n * @return {string}\n */\n ScoreStrategies.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * To array\n *\n * @return {{\n * score_mode: string,\n * score_strategies: any\n * }}\n */\n ScoreStrategies.prototype.toArray = function () {\n var scoreStrategiesAsArray = [];\n for (var i in this.scoreStrategies) {\n scoreStrategiesAsArray.push(this.scoreStrategies[i].toArray());\n }\n return {\n score_mode: this.scoreMode,\n score_strategies: scoreStrategiesAsArray\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategies}\n */\n ScoreStrategies.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategies = (typeof array.score_mode != \"undefined\")\n ? ScoreStrategies.createEmpty(array.score_mode)\n : ScoreStrategies.createEmpty();\n scoreStrategies.scoreStrategies = [];\n for (var i in array.score_strategies) {\n scoreStrategies\n .scoreStrategies\n .push(ScoreStrategy_1.ScoreStrategy.createFromArray(array.score_strategies[i]));\n }\n return scoreStrategies;\n };\n return ScoreStrategies;\n}());\nexports.ScoreStrategies = ScoreStrategies;\n","\"use strict\";\nexports.__esModule = true;\nexports.ScoreStrategy = exports.DEFAULT_FACTOR = exports.DEFAULT_MISSING = exports.SCORE_MODE_MIN = exports.SCORE_MODE_MAX = exports.SCORE_MODE_AVG = exports.SCORE_MODE_SUM = exports.SCORE_MODE_NONE = exports.MODIFIER_SQUARE = exports.MODIFIER_LN = exports.MODIFIER_LOG = exports.MODIFIER_SQRT = exports.MODIFIER_NONE = exports.DECAY_GAUSS = exports.DECAY_EXP = exports.DECAY_LINEAR = exports.DECAY = exports.CUSTOM_FUNCTION = exports.BOOSTING_FIELD_VALUE = exports.DEFAULT_WEIGHT = exports.DEFAULT_TYPE = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar Filter_1 = require(\"./Filter\");\n/**\n * ScoreStrategy constants\n */\nexports.DEFAULT_TYPE = 'default';\nexports.DEFAULT_WEIGHT = 1.0;\nexports.BOOSTING_FIELD_VALUE = 'field_value';\nexports.CUSTOM_FUNCTION = 'custom_function';\nexports.DECAY = 'decay';\nexports.DECAY_LINEAR = 'linear';\nexports.DECAY_EXP = 'exp';\nexports.DECAY_GAUSS = 'gauss';\nexports.MODIFIER_NONE = 'none';\nexports.MODIFIER_SQRT = 'sqrt';\nexports.MODIFIER_LOG = 'log';\nexports.MODIFIER_LN = 'ln';\nexports.MODIFIER_SQUARE = 'square';\nexports.SCORE_MODE_NONE = 'none';\nexports.SCORE_MODE_SUM = 'sum';\nexports.SCORE_MODE_AVG = 'avg';\nexports.SCORE_MODE_MAX = 'max';\nexports.SCORE_MODE_MIN = 'min';\nexports.DEFAULT_MISSING = 1.0;\nexports.DEFAULT_FACTOR = 1.0;\n/**\n * ScoreStrategy\n */\nvar ScoreStrategy = /** @class */ (function () {\n function ScoreStrategy() {\n this.type = exports.DEFAULT_TYPE;\n this.filter = null;\n this.weight = exports.DEFAULT_WEIGHT;\n this.scoreMode = exports.SCORE_MODE_AVG;\n this.configuration = {};\n }\n /**\n * Get type\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getType = function () {\n return this.type;\n };\n /**\n * Get configuration value\n *\n * @returns {string}\n */\n ScoreStrategy.prototype.getConfigurationValue = function (element) {\n if (typeof this.configuration[element] == \"undefined\") {\n return null;\n }\n return this.configuration[element];\n };\n /**\n * Get weight.\n *\n * @return {number}\n */\n ScoreStrategy.prototype.getWeight = function () {\n return this.weight;\n };\n /**\n * Get score mode.\n *\n * @return {string}\n */\n ScoreStrategy.prototype.getScoreMode = function () {\n return this.scoreMode;\n };\n /**\n * Get filter.\n *\n * @return {Filter}\n */\n ScoreStrategy.prototype.getFilter = function () {\n return this.filter;\n };\n /**\n * Create default\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDefault = function () {\n return new ScoreStrategy();\n };\n /**\n * Create field boosting\n *\n * @param field\n * @param factor\n * @param missing\n * @param modifier\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFieldBoosting = function (field, factor, missing, modifier, weight, filter, scoreMode) {\n if (factor === void 0) { factor = exports.DEFAULT_FACTOR; }\n if (missing === void 0) { missing = exports.DEFAULT_MISSING; }\n if (modifier === void 0) { modifier = exports.MODIFIER_NONE; }\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.BOOSTING_FIELD_VALUE;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['factor'] = factor;\n scoreStrategy.configuration['missing'] = missing;\n scoreStrategy.configuration['modifier'] = modifier;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create custom function\n *\n * @param func\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createCustomFunction = function (func, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.CUSTOM_FUNCTION;\n scoreStrategy.configuration['function'] = func;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Create decay function\n *\n * @param type\n * @param field\n * @param origin\n * @param scale\n * @param offset\n * @param decay\n * @param weight\n * @param filter\n * @param scoreMode\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createDecayFunction = function (type, field, origin, scale, offset, decay, weight, filter, scoreMode) {\n if (weight === void 0) { weight = exports.DEFAULT_WEIGHT; }\n if (filter === void 0) { filter = null; }\n if (scoreMode === void 0) { scoreMode = exports.SCORE_MODE_AVG; }\n var scoreStrategy = ScoreStrategy.createDefault();\n scoreStrategy.type = exports.DECAY;\n scoreStrategy.configuration['type'] = type;\n scoreStrategy.configuration['field'] = field;\n scoreStrategy.configuration['origin'] = origin;\n scoreStrategy.configuration['scale'] = scale;\n scoreStrategy.configuration['offset'] = offset;\n scoreStrategy.configuration['decay'] = decay;\n scoreStrategy.weight = weight;\n scoreStrategy.filter = ScoreStrategy.fixFilterFieldPath(filter);\n scoreStrategy.scoreMode = scoreMode;\n return scoreStrategy;\n };\n /**\n * Fix filter path.\n *\n * @param filter\n *\n * @return {Filter}\n */\n ScoreStrategy.fixFilterFieldPath = function (filter) {\n if (filter == null) {\n return filter;\n }\n var filterAsArray = filter.toArray();\n filterAsArray['field'] = Item_1.Item.getPathByField(filterAsArray['field']);\n return Filter_1.Filter.createFromArray(filterAsArray);\n };\n /**\n * To array\n *\n * @return {{\n * type: string,\n * configuration: any,\n * weight: number,\n * score_mode: string,\n * filter: any\n * }}\n */\n ScoreStrategy.prototype.toArray = function () {\n return {\n type: this.type,\n configuration: this.configuration,\n weight: this.weight,\n score_mode: this.scoreMode,\n filter: this.filter instanceof Filter_1.Filter\n ? this.filter.toArray()\n : null\n };\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ScoreStrategy}\n */\n ScoreStrategy.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n var scoreStrategy = ScoreStrategy.createDefault();\n if (typeof array.type != \"undefined\") {\n scoreStrategy.type = array.type;\n }\n if (typeof array.configuration != \"undefined\") {\n scoreStrategy.configuration = array.configuration;\n }\n if (typeof array.weight != \"undefined\") {\n scoreStrategy.weight = array.weight;\n }\n if (typeof array.score_mode != \"undefined\") {\n scoreStrategy.scoreMode = array.score_mode;\n }\n if (typeof array.filter === 'object' && array.filter !== null) {\n scoreStrategy.filter = Filter_1.Filter.createFromArray(array.filter);\n }\n return scoreStrategy;\n };\n return ScoreStrategy;\n}());\nexports.ScoreStrategy = ScoreStrategy;\n","\"use strict\";\nexports.__esModule = true;\nexports.SortBy = exports.SORT_BY_LOCATION_MI_ASC = exports.SORT_BY_LOCATION_KM_ASC = exports.SORT_BY_TYPE_DESC = exports.SORT_BY_TYPE_ASC = exports.SORT_BY_ID_DESC = exports.SORT_BY_ID_ASC = exports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM = exports.SORT_BY_SCORE = exports.SORT_BY_MODE_MEDIAN = exports.SORT_BY_MODE_MAX = exports.SORT_BY_MODE_MIN = exports.SORT_BY_MODE_SUM = exports.SORT_BY_MODE_AVG = exports.SORT_BY_DESC = exports.SORT_BY_ASC = exports.SORT_BY_TYPE_RANDOM = exports.SORT_BY_TYPE_FUNCTION = exports.SORT_BY_TYPE_DISTANCE = exports.SORT_BY_TYPE_SCORE = exports.SORT_BY_TYPE_NESTED = exports.SORT_BY_TYPE_FIELD = void 0;\nvar __1 = require(\"..\");\nvar Filter_1 = require(\"./Filter\");\n/**\n export * Sort by constants\n */\nexports.SORT_BY_TYPE_FIELD = 'field';\nexports.SORT_BY_TYPE_NESTED = 'nested';\nexports.SORT_BY_TYPE_SCORE = 'score';\nexports.SORT_BY_TYPE_DISTANCE = 'distance';\nexports.SORT_BY_TYPE_FUNCTION = 'function';\nexports.SORT_BY_TYPE_RANDOM = 'random';\nexports.SORT_BY_ASC = \"asc\";\nexports.SORT_BY_DESC = \"desc\";\nexports.SORT_BY_MODE_AVG = \"avg\";\nexports.SORT_BY_MODE_SUM = \"sum\";\nexports.SORT_BY_MODE_MIN = \"min\";\nexports.SORT_BY_MODE_MAX = \"max\";\nexports.SORT_BY_MODE_MEDIAN = \"median\";\nexports.SORT_BY_SCORE = {\n type: exports.SORT_BY_TYPE_SCORE\n};\nexports.SORT_BY_RANDOM = {\n type: exports.SORT_BY_TYPE_RANDOM\n};\nexports.SORT_BY_AL_TUN_TUN = exports.SORT_BY_RANDOM;\nexports.SORT_BY_ID_ASC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_ID_DESC = {\n field: \"uuid.id\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_TYPE_ASC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_ASC\n};\nexports.SORT_BY_TYPE_DESC = {\n field: \"uuid.type\",\n order: exports.SORT_BY_DESC\n};\nexports.SORT_BY_LOCATION_KM_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"km\"\n};\nexports.SORT_BY_LOCATION_MI_ASC = {\n type: exports.SORT_BY_TYPE_DISTANCE,\n unit: \"mi\"\n};\n/**\n * ScoreStrategy\n */\nvar SortBy = /** @class */ (function () {\n function SortBy() {\n this.sortsBy = [];\n }\n /**\n * Create\n *\n * @return {SortBy}\n */\n SortBy.create = function () {\n return new SortBy;\n };\n /**\n * Sort By fields values\n *\n * @param shortSortByElements\n *\n * @return {SortBy}\n */\n SortBy.byFieldsValues = function (shortSortByElements) {\n var sortBy = SortBy.create();\n for (var key in shortSortByElements) {\n sortBy.byFieldValue(key, shortSortByElements[key]);\n }\n return sortBy;\n };\n /**\n * All\n *\n * @return {Array}\n */\n SortBy.prototype.all = function () {\n return this.sortsBy.length > 0\n ? this.sortsBy\n : [exports.SORT_BY_SCORE];\n };\n /**\n * Sort by value\n *\n * @param value\n *\n * @return {SortBy}\n */\n SortBy.prototype.byValue = function (value) {\n if (exports.SORT_BY_SCORE != value &&\n exports.SORT_BY_RANDOM != value) {\n if (typeof value.type == \"undefined\") {\n value.type = exports.SORT_BY_TYPE_FIELD;\n }\n }\n if (exports.SORT_BY_SCORE != value) {\n this.sortsBy.push(value);\n }\n return this;\n };\n /**\n * Sort by field value\n *\n * @param field\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFieldValue = function (field, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FIELD,\n field: __1.Item.getPathByField(field),\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field\n *\n * @param field\n * @param order\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedField = function (field, order, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by nested field and filter\n *\n * @param field\n * @param order\n * @param filter\n * @param mode\n *\n * @return {SortBy}\n */\n SortBy.prototype.byNestedFieldAndFilter = function (field, order, filter, mode) {\n if (mode === void 0) { mode = exports.SORT_BY_MODE_AVG; }\n var fieldPath = __1.Item.getPathByField(filter.getField());\n var filterAsArray = filter.toArray();\n filterAsArray.field = fieldPath;\n filter = Filter_1.Filter.createFromArray(filterAsArray);\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_NESTED,\n mode: mode,\n filter: filter,\n field: 'indexed_metadata.' + field,\n order: order\n });\n return this;\n };\n /**\n * Sort by function\n *\n * @param func\n * @param order\n *\n * @return {SortBy}\n */\n SortBy.prototype.byFunction = function (func, order) {\n this.sortsBy.push({\n type: exports.SORT_BY_TYPE_FUNCTION,\n \"function\": func,\n order: order\n });\n return this;\n };\n /**\n * Is sorted by geo distance\n *\n * @return {boolean}\n */\n SortBy.prototype.isSortedByGeoDistance = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n return true;\n }\n }\n return false;\n };\n /**\n * Set coordinate\n *\n * @param coordinate\n *\n * @return {SortBy}\n */\n SortBy.prototype.setCoordinate = function (coordinate) {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_DISTANCE) {\n this.sortsBy[i].coordinate = coordinate;\n }\n }\n return this;\n };\n /**\n * Has random sort\n *\n * @return {boolean}\n */\n SortBy.prototype.hasRandomSort = function () {\n for (var i in this.sortsBy) {\n if (this.sortsBy[i].type === exports.SORT_BY_TYPE_RANDOM) {\n return true;\n }\n }\n return false;\n };\n /**\n * get first sort value as string\n *\n * @return {string}\n */\n SortBy.prototype.getFirstSortAsString = function () {\n if (this.sortsBy[0] === undefined) {\n return 'score';\n }\n var firstSortBy = this.sortsBy[0];\n if (firstSortBy.type === exports.SORT_BY_TYPE_RANDOM) {\n return 'random';\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_DISTANCE) {\n return firstSortBy.type + ':' + firstSortBy.unit;\n }\n if (firstSortBy.type === exports.SORT_BY_TYPE_SCORE) {\n return 'score';\n }\n var field = firstSortBy.field;\n var order = firstSortBy.order;\n var fieldParts = field.split('.');\n return fieldParts[1] + ':' + order;\n };\n /**\n * To array\n *\n * @return {[]}\n */\n SortBy.prototype.toArray = function () {\n var copySortBy = this.copy();\n var sortsByAsArray = copySortBy.sortsBy;\n for (var i in sortsByAsArray) {\n if (typeof sortsByAsArray[i].filter === typeof {} &&\n sortsByAsArray[i].filter != null) {\n sortsByAsArray[i].filter = sortsByAsArray[i].filter.toArray();\n }\n if (sortsByAsArray[i].coordinate !== null &&\n sortsByAsArray[i].coordinate instanceof __1.Coordinate) {\n sortsByAsArray[i].coordinate = sortsByAsArray[i].coordinate.toArray();\n }\n }\n return sortsByAsArray;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @returns {SortBy}\n */\n SortBy.createFromArray = function (array) {\n var innerArray = JSON.parse(JSON.stringify(array));\n var sortBy = SortBy.create();\n for (var i in innerArray) {\n var element = innerArray[i];\n if (typeof element.type == \"undefined\") {\n element.type = exports.SORT_BY_TYPE_FIELD;\n }\n if (typeof element.filter === typeof {} &&\n element.filter != null) {\n element.filter = Filter_1.Filter.createFromArray(element.filter);\n }\n if (element.coordinate != null &&\n typeof element.coordinate === typeof {}) {\n element.coordinate = __1.Coordinate.createFromArray(element.coordinate);\n }\n sortBy.sortsBy.push(element);\n }\n return sortBy;\n };\n /**\n * Make a copy of this\n *\n * @returns {SortBy}\n */\n SortBy.prototype.copy = function () {\n var newSortBy = SortBy.create();\n for (var i in this.sortsBy) {\n var sortBy = this.sortsBy[i];\n if (typeof sortBy !== \"function\") {\n var sortByAsArray = JSON.parse(JSON.stringify(sortBy));\n if (typeof sortBy.filter === typeof {} &&\n sortBy.filter != null) {\n sortByAsArray.filter = Filter_1.Filter.createFromArray(sortBy.filter.toArray());\n }\n if (sortBy.coordinate != null &&\n typeof sortBy.coordinate == typeof {}) {\n sortByAsArray.coordinate = __1.Coordinate.createFromArray(sortBy.coordinate.toArray());\n }\n newSortBy.sortsBy.push(sortByAsArray);\n }\n }\n return newSortBy;\n };\n return SortBy;\n}());\nexports.SortBy = SortBy;\n","\"use strict\";\nexports.__esModule = true;\nexports.HttpRepository = void 0;\nvar tslib_1 = require(\"tslib\");\nvar ConnectionError_1 = require(\"../Error/ConnectionError\");\nvar InvalidFormatError_1 = require(\"../Error/InvalidFormatError\");\nvar InvalidTokenError_1 = require(\"../Error/InvalidTokenError\");\nvar ResourceExistsError_1 = require(\"../Error/ResourceExistsError\");\nvar ResourceNotAvailableError_1 = require(\"../Error/ResourceNotAvailableError\");\nvar UnknownError_1 = require(\"../Error/UnknownError\");\nvar Response_1 = require(\"../Http/Response\");\nvar Index_1 = require(\"../Model/Index\");\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\nvar Result_1 = require(\"../Result/Result\");\nvar Repository_1 = require(\"./Repository\");\n/**\n * Aggregation class\n */\nvar HttpRepository = /** @class */ (function (_super) {\n tslib_1.__extends(HttpRepository, _super);\n /**\n * Constructor\n *\n * @param httpClient\n * @param appId\n * @param indexId\n * @param token\n * @param transformer\n */\n function HttpRepository(httpClient, appId, indexId, token, transformer) {\n var _this = _super.call(this, appId, indexId, token) || this;\n _this.httpClient = httpClient;\n _this.transformer = transformer;\n return _this;\n }\n /**\n * Get transformer\n *\n * @return {Transformer}\n */\n HttpRepository.prototype.getTransformer = function () {\n return this.transformer;\n };\n /**\n * Generate item document by a simple object.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.addObject = function (object) {\n var item = this\n .transformer\n .toItem(object);\n if (item instanceof Item_1.Item) {\n this.addItem(item);\n }\n };\n /**\n * Delete item document by uuid.\n *\n * @param object\n *\n * @returns {void}\n */\n HttpRepository.prototype.deleteObject = function (object) {\n var itemUUID = this\n .transformer\n .toItemUUID(object);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n this.deleteItem(itemUUID);\n }\n };\n /**\n * Flush update items\n *\n * @param {Item[]} itemsToUpdate\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushUpdateItems = function (itemsToUpdate) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_1;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToUpdate.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"put\", this.getCredentials(), {}, itemsToUpdate.map(function (item) {\n return item.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_1 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_1);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Flush delete items\n *\n * @param {ItemUUID[]} itemsToDelete\n *\n * @return {Promise}\n */\n HttpRepository.prototype.flushDeleteItems = function (itemsToDelete) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_2;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (itemsToDelete.length === 0) {\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items\", \"delete\", this.getCredentials(), {}, itemsToDelete.map(function (itemUUID) {\n return itemUUID.toArray();\n }))];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_2 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_2);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Query\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.query = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_3, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId, \"get\", this.getCredentials(), {\n query: JSON.stringify(query.toArray())\n .replace(/&/g, \"%26\")\n }, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_3 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_3);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get similar items\n *\n * @param {Query} query\n * @param {ItemUUID[]} itemUUIDs\n * @param {number} similarity\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getSimilarItems = function (query, itemUUIDs, similarity) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_4, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/similar-items', \"get\", this.getCredentials(), {}, {\n query: query.toArray(),\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n }),\n similarity: similarity\n })];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_4 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_4);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Get recommended items\n *\n * @param {Query} query\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getRecommendedItems = function (query) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_5, result;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + '/recommended-items', \"get\", this.getCredentials(), {}, query.toArray())];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_5 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_5);\n case 3:\n result = Result_1.Result.createFromArray(response.getBody());\n return [2 /*return*/, this.applyTransformersToResult(result)];\n }\n });\n });\n };\n /**\n * Update items\n *\n * @param {Query} query\n * @param {Changes} changes\n *\n * @return {Promise}\n */\n HttpRepository.prototype.updateItems = function (query, changes) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_6;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + this.indexId + \"/items/update-by-query\", \"put\", this.getCredentials(), {}, {\n changes: changes.toArray(),\n query: query.toArray()\n })];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_6 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_6);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Create index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.createIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_7;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_7 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_7);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Delete index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.deleteIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_8;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"delete\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_8 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_8);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Reset index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.resetIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_9;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/reset\", \"put\", this.getCredentials(), {}, {})];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_9 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_9);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @param {IndexUUID} indexUUID\n *\n * @return {Promise}\n */\n HttpRepository.prototype.checkIndex = function (indexUUID) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_10;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID(), \"head\", this.getCredentials(), {}, {})];\n case 1:\n response = _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_10 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_10);\n case 3: return [2 /*return*/, response.getCode() === 200];\n }\n });\n });\n };\n /**\n * Check index\n *\n * @return {Promise}\n */\n HttpRepository.prototype.getIndices = function () {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response, response_11, result, _i, _a, indexAsArray;\n return tslib_1.__generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\", \"get\", this.getCredentials(), {}, {})];\n case 1:\n response = _b.sent();\n return [3 /*break*/, 3];\n case 2:\n response_11 = _b.sent();\n throw HttpRepository.createErrorFromResponse(response_11);\n case 3:\n result = [];\n for (_i = 0, _a = response.getBody(); _i < _a.length; _i++) {\n indexAsArray = _a[_i];\n result.push(Index_1.Index.createFromArray(indexAsArray));\n }\n return [2 /*return*/, result];\n }\n });\n });\n };\n /**\n * Configure index\n *\n * @param {IndexUUID} indexUUID\n * @param {Config} config\n *\n * @return {Promise}\n */\n HttpRepository.prototype.configureIndex = function (indexUUID, config) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var response_12;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/configure\", \"put\", this.getCredentials(), {}, config.toArray())];\n case 1:\n _a.sent();\n return [3 /*break*/, 3];\n case 2:\n response_12 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_12);\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param indexUUID\n * @param itemUUID\n * @param userId\n * @param queryString\n * @param interaction\n * @param site\n * @param device\n * @param position\n */\n HttpRepository.prototype.pushInteraction = function (indexUUID, itemUUID, userId, queryString, interaction, site, device, position) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n if (position === void 0) { position = 0; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_13;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n query_string: queryString,\n site: site,\n device: device,\n user_id: userId,\n position: position\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/items/\" + itemUUID.composedUUID() + \"/interaction/\" + interaction, \"post\", {\n token: this.token\n }, parameters, {})];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_13 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_13);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n * @param {IndexUUID} indexUUID\n * @param {string} userId\n * @param {ItemUUID[]} itemUUIDs\n * @param {string} site\n * @param {string} device\n *\n * @return {Promise}\n */\n HttpRepository.prototype.purchase = function (indexUUID, userId, itemUUIDs, site, device) {\n if (site === void 0) { site = null; }\n if (device === void 0) { device = null; }\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var parameters, response_14;\n return tslib_1.__generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n parameters = {\n site: site,\n device: device,\n user_id: userId\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, this.httpClient.get(\"/\" + this.appId + \"/indices/\" + indexUUID.composedUUID() + \"/purchase\", \"post\", {\n token: this.token\n }, parameters, {\n items_uuid: itemUUIDs.map(function (itemUUID) {\n return itemUUID.toArray();\n })\n })];\n case 2:\n _a.sent();\n return [3 /*break*/, 4];\n case 3:\n response_14 = _a.sent();\n throw HttpRepository.createErrorFromResponse(response_14);\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n /**\n *\n */\n HttpRepository.prototype.getHttpClient = function () {\n return this.httpClient;\n };\n /**\n * Get query values\n *\n * @returns any\n */\n HttpRepository.prototype.getCredentials = function () {\n return {\n app_id: this.appId,\n token: this.token\n };\n };\n /**\n * Apply transformers to results\n *\n * @param {Result} result\n *\n * @return {Result}\n */\n HttpRepository.prototype.applyTransformersToResult = function (result) {\n if (!this.transformer.hasReadTransformers()) {\n return result;\n }\n var subresults = result.getSubresults();\n if (Object.keys(subresults).length > 0) {\n Object.keys(subresults).map(function (key) {\n subresults[key] = this.applyTransformersToResult(subresults[key]);\n }.bind(this));\n return Result_1.Result.createMultiresults(subresults);\n }\n return Result_1.Result.create(result.getQueryUUID(), result.getTotalItems(), result.getTotalHits(), result.getAggregations(), result.getSuggestions(), this\n .transformer\n .fromItems(result.getItems()), result.getAutocomplete());\n };\n /**\n * @param response\n * @private\n */\n HttpRepository.createErrorFromResponse = function (response) {\n var error;\n if (response instanceof Response_1.Response) {\n switch (response.getCode()) {\n case ResourceNotAvailableError_1.ResourceNotAvailableError.getTransportableHTTPError():\n error = new ResourceNotAvailableError_1.ResourceNotAvailableError(response.getBody().message);\n break;\n case InvalidTokenError_1.InvalidTokenError.getTransportableHTTPError():\n error = new InvalidTokenError_1.InvalidTokenError(response.getBody().message);\n break;\n case InvalidFormatError_1.InvalidFormatError.getTransportableHTTPError():\n error = new InvalidFormatError_1.InvalidFormatError(response.getBody().message);\n break;\n case ResourceExistsError_1.ResourceExistsError.getTransportableHTTPError():\n error = new ResourceExistsError_1.ResourceExistsError(response.getBody().message);\n break;\n case ConnectionError_1.ConnectionError.getTransportableHTTPError():\n error = new ConnectionError_1.ConnectionError(response.getBody().message);\n break;\n }\n }\n return undefined === error\n ? UnknownError_1.UnknownError.createUnknownError()\n : error;\n };\n return HttpRepository;\n}(Repository_1.Repository));\nexports.HttpRepository = HttpRepository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Repository = void 0;\nvar tslib_1 = require(\"tslib\");\n/**\n * Aggregation class\n */\nvar Repository = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param appId\n * @param indexId\n * @param token\n */\n function Repository(appId, indexId, token) {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n this.appId = appId;\n this.indexId = indexId;\n this.token = token;\n }\n /**\n * Reset cached elements\n */\n Repository.prototype.resetCachedElements = function () {\n this.itemsToUpdate = [];\n this.itemsToDelete = [];\n };\n /**\n * Add element\n *\n * @param item\n */\n Repository.prototype.addItem = function (item) {\n this.itemsToUpdate.push(item);\n };\n /**\n * Add elements\n *\n * @param items\n */\n Repository.prototype.addItems = function (items) {\n for (var i in items) {\n this.addItem(items[i]);\n }\n };\n /**\n * Delete item\n *\n * @param itemUUID\n */\n Repository.prototype.deleteItem = function (itemUUID) {\n this.itemsToDelete.push(itemUUID);\n };\n /**\n * Delete items\n *\n * @param itemsUUID\n */\n Repository.prototype.deleteItems = function (itemsUUID) {\n for (var i in itemsUUID) {\n this.deleteItem(itemsUUID[i]);\n }\n };\n /**\n * flush\n *\n * @param bulkNumber\n * @param skipIfLess\n *\n * @return {Promise}\n */\n Repository.prototype.flush = function (bulkNumber, skipIfLess) {\n return tslib_1.__awaiter(this, void 0, void 0, function () {\n var promise, resetCachedElements;\n var _this = this;\n return tslib_1.__generator(this, function (_a) {\n if (!bulkNumber) {\n bulkNumber = 500;\n }\n if (!skipIfLess) {\n skipIfLess = false;\n }\n if (skipIfLess &&\n this.itemsToUpdate.length < bulkNumber) {\n return [2 /*return*/];\n }\n promise = Promise.all(Repository\n .chunkArray(this.itemsToUpdate, bulkNumber)\n .map(function (arrayOfItems) {\n return _this.flushUpdateItems(arrayOfItems);\n })\n .concat(Repository\n .chunkArray(this.itemsToDelete, bulkNumber)\n .map(function (arrayOfItemsUUID) {\n return _this.flushDeleteItems(arrayOfItemsUUID);\n })));\n resetCachedElements = function () {\n _this.resetCachedElements();\n };\n promise.then(resetCachedElements, resetCachedElements);\n return [2 /*return*/, promise];\n });\n });\n };\n /**\n * Make chunks of n elements\n *\n * @param array\n * @param chunk\n *\n * @return any[]\n */\n Repository.chunkArray = function (array, chunk) {\n var arrayChunked = [];\n for (var i = 0, j = array.length; i < j; i += chunk) {\n arrayChunked.push(array.slice(i, i + chunk));\n }\n return arrayChunked;\n };\n return Repository;\n}());\nexports.Repository = Repository;\n","\"use strict\";\nexports.__esModule = true;\nexports.Counter = void 0;\nvar Metadata_1 = require(\"../Model/Metadata\");\n/**\n * Aggregation class\n */\nvar Counter = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param values\n * @param used\n * @param n\n */\n function Counter(values, used, n) {\n this.values = values;\n this.used = used;\n this.n = n;\n }\n /**\n * Get id\n *\n * @return {string|null}\n */\n Counter.prototype.getId = function () {\n return typeof this.values.id == \"string\"\n ? this.values.id\n : null;\n };\n /**\n * Get name\n *\n * @return {string|null}\n */\n Counter.prototype.getName = function () {\n return typeof this.values.name == \"string\"\n ? this.values.name\n : null;\n };\n /**\n * Get slug\n *\n * @return {string|null}\n */\n Counter.prototype.getSlug = function () {\n return typeof this.values.slug == \"string\"\n ? this.values.slug\n : null;\n };\n /**\n * Get level\n *\n * @return {number}\n */\n Counter.prototype.getLevel = function () {\n return typeof this.values.level == \"number\"\n ? this.values.level\n : 0;\n };\n /**\n * Get values\n *\n * @returns {{}}\n */\n Counter.prototype.getValues = function () {\n return this.values;\n };\n /**\n * Is used\n *\n * @returns {boolean}\n */\n Counter.prototype.isUsed = function () {\n return this.used;\n };\n /**\n * Get N\n *\n * @returns {number}\n */\n Counter.prototype.getN = function () {\n return this.n;\n };\n /**\n * Create by active elements\n *\n * @param name\n * @param n\n * @param activeElements\n */\n Counter.createByActiveElements = function (name, n, activeElements) {\n var values = Metadata_1.Metadata.fromMetadata(name);\n if (values == null) {\n return null;\n }\n var i = activeElements.length;\n var inActiveElements = false;\n while (i--) {\n if (activeElements[i] == values.id) {\n inActiveElements = true;\n }\n }\n return new Counter(values, inActiveElements, n);\n };\n /**\n * To array\n *\n * @return {{}}\n */\n Counter.prototype.toArray = function () {\n var values = {\n values: this.values,\n n: this.n\n };\n if (this.used === true) {\n values.used = true;\n }\n return values;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Counter}\n */\n Counter.createFromArray = function (array) {\n array = JSON.parse(JSON.stringify(array));\n return new Counter(array.values, (typeof array.used == \"boolean\")\n ? array.used\n : false, array.n);\n };\n return Counter;\n}());\nexports.Counter = Counter;\n","\"use strict\";\nexports.__esModule = true;\nexports.Result = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ResultAggregations_1 = require(\"./ResultAggregations\");\n/**\n * Result class\n */\nvar Result = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n */\n function Result(queryUUID, totalItems, totalHits) {\n this.items = [];\n this.autocomplete = null;\n this.suggestions = [];\n this.subresults = {};\n this.metadata = {};\n this.queryUUID = queryUUID;\n this.totalItems = totalItems;\n this.totalHits = totalHits;\n }\n /**\n * @param queryUUID\n * @param totalItems\n * @param totalHits\n * @param aggregations\n * @param suggestions\n * @param items\n * @param autocomplete\n * @param metadata\n */\n Result.create = function (queryUUID, totalItems, totalHits, aggregations, suggestions, items, autocomplete, metadata) {\n if (autocomplete === void 0) { autocomplete = null; }\n if (metadata === void 0) { metadata = {}; }\n var result = new Result(queryUUID, totalItems, totalHits);\n result.aggregations = aggregations;\n result.suggestions = suggestions;\n result.items = items;\n result.autocomplete = autocomplete;\n result.metadata = metadata;\n return result;\n };\n /**\n * Create multi results\n *\n * @param subresults\n *\n * @returns {Result}\n */\n Result.createMultiresults = function (subresults) {\n var result = new Result('', 0, 0);\n result.subresults = subresults;\n return result;\n };\n /**\n * Add item\n *\n * @param item\n */\n Result.prototype.addItem = function (item) {\n this.items.push(item);\n };\n /**\n * Get items\n *\n * @return {Item[]}\n */\n Result.prototype.getItems = function () {\n return this.items;\n };\n /**\n * Get items grouped by types\n *\n * @return {any[]}\n */\n Result.prototype.getItemsGroupedByTypes = function () {\n if (this.itemsGroupedByTypeCache instanceof Object &&\n Object.keys(this.itemsGroupedByTypeCache).length > 0) {\n return this.itemsGroupedByTypeCache;\n }\n var itemsGroupedByTypes = {};\n for (var i in this.items) {\n var item = this.items[i];\n if (!(itemsGroupedByTypes[item.getType()] instanceof Array)) {\n itemsGroupedByTypes[item.getType()] = [];\n }\n itemsGroupedByTypes[item.getType()].push(item);\n }\n this.itemsGroupedByTypeCache = itemsGroupedByTypes;\n return itemsGroupedByTypes;\n };\n /**\n * Get items by type\n *\n * @param type\n *\n * @return {Array}\n */\n Result.prototype.getItemsByType = function (type) {\n var itemsGroupedByTypes = this.getItemsGroupedByTypes();\n return itemsGroupedByTypes[type] == null\n ? []\n : itemsGroupedByTypes[type];\n };\n /**\n * Get items by types\n *\n * @param types\n */\n Result.prototype.getItemsByTypes = function (types) {\n return this.items.filter(function (item) { return types.indexOf(item.getType()) >= 0; });\n };\n /**\n * Get first item\n *\n * @return {Item}\n */\n Result.prototype.getFirstItem = function () {\n return this.items.length > 0\n ? this.items[0]\n : null;\n };\n /**\n * Set aggregations\n *\n * @param aggregations\n */\n Result.prototype.setAggregations = function (aggregations) {\n this.aggregations = aggregations;\n };\n /**\n * Get aggregations\n *\n * @return {ResultAggregations}\n */\n Result.prototype.getAggregations = function () {\n return this.aggregations instanceof ResultAggregations_1.ResultAggregations\n ? this.aggregations\n : null;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @return {null}\n */\n Result.prototype.getAggregation = function (name) {\n return this.aggregations == null\n ? null\n : this.aggregations.getAggregation(name);\n };\n /**\n * Has no empty aggregation\n *\n * @param name\n *\n * @return {boolean}\n */\n Result.prototype.hasNotEmptyAggregation = function (name) {\n return this.aggregations == null\n ? false\n : this.aggregations.hasNotEmptyAggregation(name);\n };\n /**\n * Get suggestions\n *\n * @return {string[]}\n */\n Result.prototype.getSuggestions = function () {\n return this.suggestions;\n };\n /**\n * Get autocomplete\n *\n * @return {string|null}\n */\n Result.prototype.getAutocomplete = function () {\n return this.autocomplete;\n };\n /**\n * Get query uuid\n *\n * @return {string}\n */\n Result.prototype.getQueryUUID = function () {\n return this.queryUUID;\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n Result.prototype.getTotalItems = function () {\n return this.totalItems;\n };\n /**\n * Get total hits\n *\n * @return {number}\n */\n Result.prototype.getTotalHits = function () {\n return this.totalHits;\n };\n /**\n * Get subresults\n *\n * @return Object\n */\n Result.prototype.getSubresults = function () {\n return this.subresults;\n };\n /**\n * @return any\n */\n Result.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * @param name\n */\n Result.prototype.getMetadataValue = function (name) {\n var _a;\n return (_a = this.metadata[name]) !== null && _a !== void 0 ? _a : null;\n };\n /**\n * to array\n *\n * @return {{query: any, total_items: number, total_hits: number, items:any[], aggregations: any, suggestions: string[]}}\n */\n Result.prototype.toArray = function () {\n var array = {\n query_uuid: this.queryUUID,\n total_items: this.totalItems,\n total_hits: this.totalHits,\n items: this.items.map(function (item) { return item.toArray(); }),\n aggregations: this.aggregations == null\n ? null\n : this.aggregations.toArray(),\n suggests: this.suggestions,\n autocomplete: this.autocomplete === null\n ? undefined\n : this.autocomplete,\n metadata: this.metadata\n };\n if (this.subresults instanceof Object &&\n Object.keys(this.subresults).length) {\n array.subresults = {};\n for (var i in this.subresults) {\n var subresult = this.subresults[i];\n array.subresults[i] = subresult.toArray();\n }\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {Result}\n */\n Result.createFromArray = function (array) {\n var result = Result.create(array.query_uuid\n ? array.query_uuid\n : '', array.total_items\n ? array.total_items\n : 0, array.total_hits\n ? array.total_hits\n : 0, array.aggregations instanceof Object\n ? ResultAggregations_1.ResultAggregations.createFromArray(array.aggregations)\n : null, array.suggests\n ? array.suggests\n : [], array.items instanceof Array\n ? array.items.map(function (itemAsArray) { return Item_1.Item.createFromArray(itemAsArray); })\n : [], array.autocomplete === undefined\n ? null\n : array.autocomplete, array.metadata === undefined\n ? {}\n : array.metadata);\n /**\n * Subqueries\n */\n var subresultsAsArray = typeof array.subresults === typeof {}\n ? array.subresults\n : {};\n for (var i in subresultsAsArray) {\n result.subresults[i] = Result.createFromArray(subresultsAsArray[i]);\n }\n return result;\n };\n return Result;\n}());\nexports.Result = Result;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregation = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Filter_1 = require(\"../Query/Filter\");\nvar Counter_1 = require(\"./Counter\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregation = /** @class */ (function () {\n /**\n * @param name\n * @param applicationType\n * @param totalElements\n * @param activeElements\n * @param metadata\n */\n function ResultAggregation(name, applicationType, totalElements, activeElements, metadata) {\n if (metadata === void 0) { metadata = {}; }\n this.counters = {};\n this.highestActiveElement = 0;\n this.name = name;\n this.applicationType = applicationType;\n this.totalElements = totalElements;\n this.activeElements = {};\n this.metadata = metadata;\n for (var i in activeElements) {\n var activeElement = activeElements[i];\n this.activeElements[activeElement] = activeElement;\n }\n }\n /**\n * Add counter\n *\n * @param name\n * @param counter\n */\n ResultAggregation.prototype.addCounter = function (name, counter) {\n if (counter == 0) {\n return;\n }\n var counterInstance = Counter_1.Counter.createByActiveElements(name, counter, Object.keys(this.activeElements));\n if (!(counterInstance instanceof Counter_1.Counter)) {\n return;\n }\n if ((this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) &&\n (this.applicationType & ~Filter_1.FILTER_MUST_ALL) &&\n counterInstance.isUsed()) {\n this.activeElements[counterInstance.getId()] = counterInstance;\n this.highestActiveElement = Math.max(counterInstance.getLevel(), this.highestActiveElement);\n return;\n }\n this.counters[counterInstance.getId()] = counterInstance;\n };\n /**\n * Get name\n *\n * @return {string}\n */\n ResultAggregation.prototype.getName = function () {\n return this.name;\n };\n /**\n * Get counter\n *\n * @return {any}\n */\n ResultAggregation.prototype.getCounters = function () {\n return this.counters;\n };\n /**\n *\n */\n ResultAggregation.prototype.getMetadata = function () {\n return this.metadata;\n };\n /**\n * Return if the aggregation belongs to a filter.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.isFilter = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL) > 0;\n };\n /**\n * Aggregation has levels.\n *\n * @return {boolean}\n */\n ResultAggregation.prototype.hasLevels = function () {\n return (this.applicationType & Filter_1.FILTER_MUST_ALL_WITH_LEVELS) > 0;\n };\n /**\n * Get counter by name\n *\n * @param name\n *\n * @return {null}\n */\n ResultAggregation.prototype.getCounter = function (name) {\n return this.counters[name] instanceof Counter_1.Counter\n ? this.counters[name]\n : null;\n };\n /**\n * Get all elements\n *\n * @return {{}}\n */\n ResultAggregation.prototype.getAllElements = function () {\n return tslib_1.__assign(tslib_1.__assign({}, this.activeElements), this.counters);\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregation.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * Get active elements\n *\n * @return {any}\n */\n ResultAggregation.prototype.getActiveElements = function () {\n if (Object.keys(this.activeElements).length === 0) {\n return {};\n }\n if (this.applicationType === Filter_1.FILTER_MUST_ALL_WITH_LEVELS) {\n var value = null;\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n if (!(activeElement instanceof Counter_1.Counter)) {\n continue;\n }\n if (value == null) {\n value = activeElement;\n }\n value = value.getLevel() > activeElement.getLevel()\n ? value\n : activeElement;\n }\n return value instanceof Counter_1.Counter\n ? { 0: value }\n : null;\n }\n return this.activeElements;\n };\n /**\n * Clean results by level and remove all levels higher than the lowest.\n */\n ResultAggregation.prototype.cleanCountersByLevel = function () {\n for (var i in this.counters) {\n var counter = this.counters[i];\n if (counter.getLevel() !== this.highestActiveElement + 1) {\n delete this.counters[i];\n }\n }\n };\n /**\n * Is empty\n *\n * @returns {boolean}\n */\n ResultAggregation.prototype.isEmpty = function () {\n return Object.keys(this.activeElements).length == 0 &&\n Object.keys(this.counters).length == 0;\n };\n /**\n * To array\n *\n * @return {any}\n */\n ResultAggregation.prototype.toArray = function () {\n var array = {\n name: this.name,\n counters: [],\n active_elements: [],\n metadata: this.metadata\n };\n for (var i in this.counters) {\n array.counters.push(this.counters[i].toArray());\n }\n if (this.applicationType !== Filter_1.FILTER_AT_LEAST_ONE) {\n array.application_type = this.applicationType;\n }\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n for (var i in this.activeElements) {\n var activeElement = this.activeElements[i];\n array.active_elements.push(activeElement instanceof Counter_1.Counter\n ? activeElement.toArray()\n : activeElement);\n }\n if (this.highestActiveElement > 0) {\n array.highest_active_level = this.highestActiveElement;\n }\n if (array.counters.length === 0) {\n delete array.counters;\n }\n if (array.active_elements.length === 0) {\n delete array.active_elements;\n }\n if (Object.keys(array.metadata).length === 0) {\n delete array.metadata;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n */\n ResultAggregation.createFromArray = function (array) {\n var activeElements = [];\n var activeElementsAsArray = array.active_elements;\n activeElementsAsArray = typeof activeElementsAsArray === typeof []\n ? activeElementsAsArray\n : [];\n for (var i in activeElementsAsArray) {\n var activeElementAsArray = activeElementsAsArray[i];\n activeElements.push(typeof activeElementAsArray === typeof {}\n ? Counter_1.Counter.createFromArray(activeElementAsArray)\n : activeElementAsArray);\n }\n var aggregation = new ResultAggregation(array.name, parseInt(array.application_type ? array.application_type : Filter_1.FILTER_AT_LEAST_ONE), parseInt(array.total_elements ? array.total_elements : 0), []);\n aggregation.activeElements = activeElements;\n var countersAsArray = typeof array.counters === typeof []\n ? array.counters\n : [];\n for (var i in countersAsArray) {\n var counterAsArray = countersAsArray[i];\n if (typeof counterAsArray !== \"function\") {\n var counter = Counter_1.Counter.createFromArray(counterAsArray);\n aggregation.counters['_' + counter.getId()] = counter;\n }\n }\n aggregation.highestActiveElement = typeof array.highest_active_level === \"number\"\n ? array.highest_active_level\n : 0;\n aggregation.metadata = typeof array.metadata === typeof {}\n ? array.metadata\n : {};\n return aggregation;\n };\n return ResultAggregation;\n}());\nexports.ResultAggregation = ResultAggregation;\n","\"use strict\";\nexports.__esModule = true;\nexports.ResultAggregations = void 0;\nvar ResultAggregation_1 = require(\"./ResultAggregation\");\n/**\n * ResultAggregation class\n */\nvar ResultAggregations = /** @class */ (function () {\n /**\n * Constructor\n *\n * @param totalElements\n */\n function ResultAggregations(totalElements) {\n this.aggregations = {};\n this.totalElements = totalElements;\n }\n /**\n * Add aggregation\n *\n * @param name\n * @param aggregation\n */\n ResultAggregations.prototype.addAggregation = function (name, aggregation) {\n this.aggregations[name] = aggregation;\n };\n /**\n * Get aggregations\n *\n * @returns {{}}\n */\n ResultAggregations.prototype.getAggregations = function () {\n return this.aggregations;\n };\n /**\n * Get aggregation\n *\n * @param name\n *\n * @returns {Aggregation|null}\n */\n ResultAggregations.prototype.getAggregation = function (name) {\n return this.aggregations[name] instanceof ResultAggregation_1.ResultAggregation\n ? this.aggregations[name]\n : null;\n };\n /**\n * Has not empty aggregation\n *\n * @param name\n *\n * @returns {boolean}\n */\n ResultAggregations.prototype.hasNotEmptyAggregation = function (name) {\n var aggregation = this.getAggregation(name);\n return (aggregation instanceof ResultAggregation_1.ResultAggregation) &&\n (!aggregation.isEmpty());\n };\n /**\n * Get total elements\n *\n * @return {number}\n */\n ResultAggregations.prototype.getTotalElements = function () {\n return this.totalElements;\n };\n /**\n * To array\n *\n * @return {{total_elements?: number, aggregations?: {}}}\n */\n ResultAggregations.prototype.toArray = function () {\n var aggregationCollection = {};\n for (var i in this.aggregations) {\n aggregationCollection[i] = this.aggregations[i].toArray();\n }\n var array = {};\n if (this.totalElements > 0) {\n array.total_elements = this.totalElements;\n }\n if (Object.keys(aggregationCollection).length > 0) {\n array.aggregations = aggregationCollection;\n }\n return array;\n };\n /**\n * Create from array\n *\n * @param array\n *\n * @return {ResultAggregations}\n */\n ResultAggregations.createFromArray = function (array) {\n var aggregations = new ResultAggregations(typeof array.total_elements === \"number\"\n ? array.total_elements\n : 0);\n if (typeof array.aggregations === typeof {}) {\n for (var i in array.aggregations) {\n aggregations.addAggregation(i, ResultAggregation_1.ResultAggregation.createFromArray(array.aggregations[i]));\n }\n }\n return aggregations;\n };\n return ResultAggregations;\n}());\nexports.ResultAggregations = ResultAggregations;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nexports.Transformer = void 0;\nvar Item_1 = require(\"../Model/Item\");\nvar ItemUUID_1 = require(\"../Model/ItemUUID\");\n/**\n * Transformer\n */\nvar Transformer = /** @class */ (function () {\n function Transformer() {\n this.readTransformers = [];\n this.writeTransformers = [];\n }\n /**\n * Add read transformer\n *\n * @param readTransformer\n */\n Transformer.prototype.addReadTransformer = function (readTransformer) {\n this\n .readTransformers\n .push(readTransformer);\n };\n /**\n * @return {boolean}\n */\n Transformer.prototype.hasReadTransformers = function () {\n return this.readTransformers.length > 0;\n };\n /**\n * Add write transformer\n *\n * @param writeTransformer\n */\n Transformer.prototype.addWriteTransformer = function (writeTransformer) {\n this\n .writeTransformers\n .push(writeTransformer);\n };\n /**\n * Items to objects\n *\n * @param items\n *\n * @returns {any[]}\n */\n Transformer.prototype.fromItems = function (items) {\n var objects = [];\n for (var i in items) {\n objects.push(this.fromItem(items[i]));\n }\n return objects;\n };\n /**\n * Item to object\n *\n * @param item\n *\n * @returns {any}\n */\n Transformer.prototype.fromItem = function (item) {\n for (var i in this.readTransformers) {\n var transformer = this.readTransformers[i];\n if (transformer.isValidItem(item)) {\n return transformer.fromItem(item);\n }\n }\n return item;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {Item[]}\n */\n Transformer.prototype.toItems = function (objects) {\n var items = [];\n for (var i in objects) {\n var item = this.toItem(objects[i]);\n if (item instanceof Item_1.Item) {\n items.push(item);\n }\n }\n return items;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItem = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItem(object);\n }\n }\n return object;\n };\n /**\n * Objects to items\n *\n * @param objects\n *\n * @returns {ItemUUID[]}\n */\n Transformer.prototype.toItemUUIDs = function (objects) {\n var itemUUIDs = [];\n for (var i in objects) {\n var itemUUID = this.toItemUUID(objects[i]);\n if (itemUUID instanceof ItemUUID_1.ItemUUID) {\n itemUUIDs.push(itemUUID);\n }\n }\n return itemUUIDs;\n };\n /**\n * Object to item\n *\n * @param object\n *\n * @returns {any}\n */\n Transformer.prototype.toItemUUID = function (object) {\n for (var i in this.writeTransformers) {\n var transformer = this.writeTransformers[i];\n if (transformer.isValidObject(object)) {\n return transformer.toItemUUID(object);\n }\n }\n return object;\n };\n return Transformer;\n}());\nexports.Transformer = Transformer;\n","\"use strict\";\nexports.__esModule = true;\n","\"use strict\";\nexports.__esModule = true;\nvar tslib_1 = require(\"tslib\");\nvar Apisearch_1 = require(\"./Apisearch\");\nexports[\"default\"] = Apisearch_1[\"default\"];\ntslib_1.__exportStar(require(\"./Config/Config\"), exports);\ntslib_1.__exportStar(require(\"./Config/Synonym\"), exports);\ntslib_1.__exportStar(require(\"./Error/ConnectionError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ErrorWithMessage\"), exports);\ntslib_1.__exportStar(require(\"./Error/EventError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ForbiddenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidFormatError\"), exports);\ntslib_1.__exportStar(require(\"./Error/InvalidTokenError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceExistsError\"), exports);\ntslib_1.__exportStar(require(\"./Error/ResourceNotAvailableError\"), exports);\ntslib_1.__exportStar(require(\"./Error/UnsupportedContentTypeError\"), exports);\ntslib_1.__exportStar(require(\"./Geo/LocationRange\"), exports);\ntslib_1.__exportStar(require(\"./Http/AxiosClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Client\"), exports);\ntslib_1.__exportStar(require(\"./Http/HttpClient\"), exports);\ntslib_1.__exportStar(require(\"./Http/Response\"), exports);\ntslib_1.__exportStar(require(\"./Http/CacheClient\"), exports);\ntslib_1.__exportStar(require(\"./Model/Changes\"), exports);\ntslib_1.__exportStar(require(\"./Model/Coordinate\"), exports);\ntslib_1.__exportStar(require(\"./Model/Item\"), exports);\ntslib_1.__exportStar(require(\"./Model/ItemUUID\"), exports);\ntslib_1.__exportStar(require(\"./Model/Metadata\"), exports);\ntslib_1.__exportStar(require(\"./Model/User\"), exports);\ntslib_1.__exportStar(require(\"./Query/Aggregation\"), exports);\ntslib_1.__exportStar(require(\"./Query/Filter\"), exports);\ntslib_1.__exportStar(require(\"./Query/Query\"), exports);\ntslib_1.__exportStar(require(\"./Query/Range\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategies\"), exports);\ntslib_1.__exportStar(require(\"./Query/ScoreStrategy\"), exports);\ntslib_1.__exportStar(require(\"./Query/SortBy\"), exports);\ntslib_1.__exportStar(require(\"./Repository/HttpRepository\"), exports);\ntslib_1.__exportStar(require(\"./Repository/Repository\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregation\"), exports);\ntslib_1.__exportStar(require(\"./Result/ResultAggregations\"), exports);\ntslib_1.__exportStar(require(\"./Result/Counter\"), exports);\ntslib_1.__exportStar(require(\"./Result/Result\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/ReadTransformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/Transformer\"), exports);\ntslib_1.__exportStar(require(\"./Transformer/WriteTransformer\"), exports);\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.Mustache = factory());\n}(this, (function () { 'use strict';\n\n /*!\n * mustache.js - Logic-less {{mustache}} templates with JavaScript\n * http://github.com/janl/mustache.js\n */\n\n var objectToString = Object.prototype.toString;\n var isArray = Array.isArray || function isArrayPolyfill (object) {\n return objectToString.call(object) === '[object Array]';\n };\n\n function isFunction (object) {\n return typeof object === 'function';\n }\n\n /**\n * More correct typeof string handling array\n * which normally returns typeof 'object'\n */\n function typeStr (obj) {\n return isArray(obj) ? 'array' : typeof obj;\n }\n\n function escapeRegExp (string) {\n return string.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, '\\\\$&');\n }\n\n /**\n * Null safe way of checking whether or not an object,\n * including its prototype, has a given property\n */\n function hasProperty (obj, propName) {\n return obj != null && typeof obj === 'object' && (propName in obj);\n }\n\n /**\n * Safe way of detecting whether or not the given thing is a primitive and\n * whether it has the given property\n */\n function primitiveHasOwnProperty (primitive, propName) {\n return (\n primitive != null\n && typeof primitive !== 'object'\n && primitive.hasOwnProperty\n && primitive.hasOwnProperty(propName)\n );\n }\n\n // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577\n // See https://github.com/janl/mustache.js/issues/189\n var regExpTest = RegExp.prototype.test;\n function testRegExp (re, string) {\n return regExpTest.call(re, string);\n }\n\n var nonSpaceRe = /\\S/;\n function isWhitespace (string) {\n return !testRegExp(nonSpaceRe, string);\n }\n\n var entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/',\n '`': '`',\n '=': '='\n };\n\n function escapeHtml (string) {\n return String(string).replace(/[&<>\"'`=\\/]/g, function fromEntityMap (s) {\n return entityMap[s];\n });\n }\n\n var whiteRe = /\\s*/;\n var spaceRe = /\\s+/;\n var equalsRe = /\\s*=/;\n var curlyRe = /\\s*\\}/;\n var tagRe = /#|\\^|\\/|>|\\{|&|=|!/;\n\n /**\n * Breaks up the given `template` string into a tree of tokens. If the `tags`\n * argument is given here it must be an array with two string values: the\n * opening and closing tags used in the template (e.g. [ \"<%\", \"%>\" ]). Of\n * course, the default is to use mustaches (i.e. mustache.tags).\n *\n * A token is an array with at least 4 elements. The first element is the\n * mustache symbol that was used inside the tag, e.g. \"#\" or \"&\". If the tag\n * did not contain a symbol (i.e. {{myValue}}) this element is \"name\". For\n * all text that appears outside a symbol this element is \"text\".\n *\n * The second element of a token is its \"value\". For mustache tags this is\n * whatever else was inside the tag besides the opening symbol. For text tokens\n * this is the text itself.\n *\n * The third and fourth elements of the token are the start and end indices,\n * respectively, of the token in the original template.\n *\n * Tokens that are the root node of a subtree contain two more elements: 1) an\n * array of tokens in the subtree and 2) the index in the original template at\n * which the closing tag for that section begins.\n *\n * Tokens for partials also contain two more elements: 1) a string value of\n * indendation prior to that tag and 2) the index of that tag on that line -\n * eg a value of 2 indicates the partial is the third tag on this line.\n */\n function parseTemplate (template, tags) {\n if (!template)\n return [];\n var lineHasNonSpace = false;\n var sections = []; // Stack to hold section tokens\n var tokens = []; // Buffer to hold the tokens\n var spaces = []; // Indices of whitespace tokens on the current line\n var hasTag = false; // Is there a {{tag}} on the current line?\n var nonSpace = false; // Is there a non-space char on the current line?\n var indentation = ''; // Tracks indentation for tags that use it\n var tagIndex = 0; // Stores a count of number of tags encountered on a line\n\n // Strips all whitespace tokens array for the current line\n // if there was a {{#tag}} on it and otherwise only space.\n function stripSpace () {\n if (hasTag && !nonSpace) {\n while (spaces.length)\n delete tokens[spaces.pop()];\n } else {\n spaces = [];\n }\n\n hasTag = false;\n nonSpace = false;\n }\n\n var openingTagRe, closingTagRe, closingCurlyRe;\n function compileTags (tagsToCompile) {\n if (typeof tagsToCompile === 'string')\n tagsToCompile = tagsToCompile.split(spaceRe, 2);\n\n if (!isArray(tagsToCompile) || tagsToCompile.length !== 2)\n throw new Error('Invalid tags: ' + tagsToCompile);\n\n openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\\\s*');\n closingTagRe = new RegExp('\\\\s*' + escapeRegExp(tagsToCompile[1]));\n closingCurlyRe = new RegExp('\\\\s*' + escapeRegExp('}' + tagsToCompile[1]));\n }\n\n compileTags(tags || mustache.tags);\n\n var scanner = new Scanner(template);\n\n var start, type, value, chr, token, openSection;\n while (!scanner.eos()) {\n start = scanner.pos;\n\n // Match any text between tags.\n value = scanner.scanUntil(openingTagRe);\n\n if (value) {\n for (var i = 0, valueLength = value.length; i < valueLength; ++i) {\n chr = value.charAt(i);\n\n if (isWhitespace(chr)) {\n spaces.push(tokens.length);\n indentation += chr;\n } else {\n nonSpace = true;\n lineHasNonSpace = true;\n indentation += ' ';\n }\n\n tokens.push([ 'text', chr, start, start + 1 ]);\n start += 1;\n\n // Check for whitespace on the current line.\n if (chr === '\\n') {\n stripSpace();\n indentation = '';\n tagIndex = 0;\n lineHasNonSpace = false;\n }\n }\n }\n\n // Match the opening tag.\n if (!scanner.scan(openingTagRe))\n break;\n\n hasTag = true;\n\n // Get the tag type.\n type = scanner.scan(tagRe) || 'name';\n scanner.scan(whiteRe);\n\n // Get the tag value.\n if (type === '=') {\n value = scanner.scanUntil(equalsRe);\n scanner.scan(equalsRe);\n scanner.scanUntil(closingTagRe);\n } else if (type === '{') {\n value = scanner.scanUntil(closingCurlyRe);\n scanner.scan(curlyRe);\n scanner.scanUntil(closingTagRe);\n type = '&';\n } else {\n value = scanner.scanUntil(closingTagRe);\n }\n\n // Match the closing tag.\n if (!scanner.scan(closingTagRe))\n throw new Error('Unclosed tag at ' + scanner.pos);\n\n if (type == '>') {\n token = [ type, value, start, scanner.pos, indentation, tagIndex, lineHasNonSpace ];\n } else {\n token = [ type, value, start, scanner.pos ];\n }\n tagIndex++;\n tokens.push(token);\n\n if (type === '#' || type === '^') {\n sections.push(token);\n } else if (type === '/') {\n // Check section nesting.\n openSection = sections.pop();\n\n if (!openSection)\n throw new Error('Unopened section \"' + value + '\" at ' + start);\n\n if (openSection[1] !== value)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + start);\n } else if (type === 'name' || type === '{' || type === '&') {\n nonSpace = true;\n } else if (type === '=') {\n // Set the tags for the next time around.\n compileTags(value);\n }\n }\n\n stripSpace();\n\n // Make sure there are no open sections when we're done.\n openSection = sections.pop();\n\n if (openSection)\n throw new Error('Unclosed section \"' + openSection[1] + '\" at ' + scanner.pos);\n\n return nestTokens(squashTokens(tokens));\n }\n\n /**\n * Combines the values of consecutive text tokens in the given `tokens` array\n * to a single token.\n */\n function squashTokens (tokens) {\n var squashedTokens = [];\n\n var token, lastToken;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n if (token) {\n if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {\n lastToken[1] += token[1];\n lastToken[3] = token[3];\n } else {\n squashedTokens.push(token);\n lastToken = token;\n }\n }\n }\n\n return squashedTokens;\n }\n\n /**\n * Forms the given array of `tokens` into a nested tree structure where\n * tokens that represent a section have two additional items: 1) an array of\n * all tokens that appear in that section and 2) the index in the original\n * template that represents the end of that section.\n */\n function nestTokens (tokens) {\n var nestedTokens = [];\n var collector = nestedTokens;\n var sections = [];\n\n var token, section;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n token = tokens[i];\n\n switch (token[0]) {\n case '#':\n case '^':\n collector.push(token);\n sections.push(token);\n collector = token[4] = [];\n break;\n case '/':\n section = sections.pop();\n section[5] = token[2];\n collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;\n break;\n default:\n collector.push(token);\n }\n }\n\n return nestedTokens;\n }\n\n /**\n * A simple string scanner that is used by the template parser to find\n * tokens in template strings.\n */\n function Scanner (string) {\n this.string = string;\n this.tail = string;\n this.pos = 0;\n }\n\n /**\n * Returns `true` if the tail is empty (end of string).\n */\n Scanner.prototype.eos = function eos () {\n return this.tail === '';\n };\n\n /**\n * Tries to match the given regular expression at the current position.\n * Returns the matched text if it can match, the empty string otherwise.\n */\n Scanner.prototype.scan = function scan (re) {\n var match = this.tail.match(re);\n\n if (!match || match.index !== 0)\n return '';\n\n var string = match[0];\n\n this.tail = this.tail.substring(string.length);\n this.pos += string.length;\n\n return string;\n };\n\n /**\n * Skips all text until the given regular expression can be matched. Returns\n * the skipped string, which is the entire tail if no match can be made.\n */\n Scanner.prototype.scanUntil = function scanUntil (re) {\n var index = this.tail.search(re), match;\n\n switch (index) {\n case -1:\n match = this.tail;\n this.tail = '';\n break;\n case 0:\n match = '';\n break;\n default:\n match = this.tail.substring(0, index);\n this.tail = this.tail.substring(index);\n }\n\n this.pos += match.length;\n\n return match;\n };\n\n /**\n * Represents a rendering context by wrapping a view object and\n * maintaining a reference to the parent context.\n */\n function Context (view, parentContext) {\n this.view = view;\n this.cache = { '.': this.view };\n this.parent = parentContext;\n }\n\n /**\n * Creates a new context using the given view with this context\n * as the parent.\n */\n Context.prototype.push = function push (view) {\n return new Context(view, this);\n };\n\n /**\n * Returns the value of the given name in this context, traversing\n * up the context hierarchy if the value is absent in this context's view.\n */\n Context.prototype.lookup = function lookup (name) {\n var cache = this.cache;\n\n var value;\n if (cache.hasOwnProperty(name)) {\n value = cache[name];\n } else {\n var context = this, intermediateValue, names, index, lookupHit = false;\n\n while (context) {\n if (name.indexOf('.') > 0) {\n intermediateValue = context.view;\n names = name.split('.');\n index = 0;\n\n /**\n * Using the dot notion path in `name`, we descend through the\n * nested objects.\n *\n * To be certain that the lookup has been successful, we have to\n * check if the last object in the path actually has the property\n * we are looking for. We store the result in `lookupHit`.\n *\n * This is specially necessary for when the value has been set to\n * `undefined` and we want to avoid looking up parent contexts.\n *\n * In the case where dot notation is used, we consider the lookup\n * to be successful even if the last \"object\" in the path is\n * not actually an object but a primitive (e.g., a string, or an\n * integer), because it is sometimes useful to access a property\n * of an autoboxed primitive, such as the length of a string.\n **/\n while (intermediateValue != null && index < names.length) {\n if (index === names.length - 1)\n lookupHit = (\n hasProperty(intermediateValue, names[index])\n || primitiveHasOwnProperty(intermediateValue, names[index])\n );\n\n intermediateValue = intermediateValue[names[index++]];\n }\n } else {\n intermediateValue = context.view[name];\n\n /**\n * Only checking against `hasProperty`, which always returns `false` if\n * `context.view` is not an object. Deliberately omitting the check\n * against `primitiveHasOwnProperty` if dot notation is not used.\n *\n * Consider this example:\n * ```\n * Mustache.render(\"The length of a football field is {{#length}}{{length}}{{/length}}.\", {length: \"100 yards\"})\n * ```\n *\n * If we were to check also against `primitiveHasOwnProperty`, as we do\n * in the dot notation case, then render call would return:\n *\n * \"The length of a football field is 9.\"\n *\n * rather than the expected:\n *\n * \"The length of a football field is 100 yards.\"\n **/\n lookupHit = hasProperty(context.view, name);\n }\n\n if (lookupHit) {\n value = intermediateValue;\n break;\n }\n\n context = context.parent;\n }\n\n cache[name] = value;\n }\n\n if (isFunction(value))\n value = value.call(this.view);\n\n return value;\n };\n\n /**\n * A Writer knows how to take a stream of tokens and render them to a\n * string, given a context. It also maintains a cache of templates to\n * avoid the need to parse the same template twice.\n */\n function Writer () {\n this.templateCache = {\n _cache: {},\n set: function set (key, value) {\n this._cache[key] = value;\n },\n get: function get (key) {\n return this._cache[key];\n },\n clear: function clear () {\n this._cache = {};\n }\n };\n }\n\n /**\n * Clears all cached templates in this writer.\n */\n Writer.prototype.clearCache = function clearCache () {\n if (typeof this.templateCache !== 'undefined') {\n this.templateCache.clear();\n }\n };\n\n /**\n * Parses and caches the given `template` according to the given `tags` or\n * `mustache.tags` if `tags` is omitted, and returns the array of tokens\n * that is generated from the parse.\n */\n Writer.prototype.parse = function parse (template, tags) {\n var cache = this.templateCache;\n var cacheKey = template + ':' + (tags || mustache.tags).join(':');\n var isCacheEnabled = typeof cache !== 'undefined';\n var tokens = isCacheEnabled ? cache.get(cacheKey) : undefined;\n\n if (tokens == undefined) {\n tokens = parseTemplate(template, tags);\n isCacheEnabled && cache.set(cacheKey, tokens);\n }\n return tokens;\n };\n\n /**\n * High-level method that is used to render the given `template` with\n * the given `view`.\n *\n * The optional `partials` argument may be an object that contains the\n * names and templates of partials that are used in the template. It may\n * also be a function that is used to load partial templates on the fly\n * that takes a single argument: the name of the partial.\n *\n * If the optional `config` argument is given here, then it should be an\n * object with a `tags` attribute or an `escape` attribute or both.\n * If an array is passed, then it will be interpreted the same way as\n * a `tags` attribute on a `config` object.\n *\n * The `tags` attribute of a `config` object must be an array with two\n * string values: the opening and closing tags used in the template (e.g.\n * [ \"<%\", \"%>\" ]). The default is to mustache.tags.\n *\n * The `escape` attribute of a `config` object must be a function which\n * accepts a string as input and outputs a safely escaped string.\n * If an `escape` function is not provided, then an HTML-safe string\n * escaping function is used as the default.\n */\n Writer.prototype.render = function render (template, view, partials, config) {\n var tags = this.getConfigTags(config);\n var tokens = this.parse(template, tags);\n var context = (view instanceof Context) ? view : new Context(view, undefined);\n return this.renderTokens(tokens, context, partials, template, config);\n };\n\n /**\n * Low-level method that renders the given array of `tokens` using\n * the given `context` and `partials`.\n *\n * Note: The `originalTemplate` is only ever used to extract the portion\n * of the original template that was contained in a higher-order section.\n * If the template doesn't use higher-order sections, this argument may\n * be omitted.\n */\n Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, config) {\n var buffer = '';\n\n var token, symbol, value;\n for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {\n value = undefined;\n token = tokens[i];\n symbol = token[0];\n\n if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate, config);\n else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate, config);\n else if (symbol === '>') value = this.renderPartial(token, context, partials, config);\n else if (symbol === '&') value = this.unescapedValue(token, context);\n else if (symbol === 'name') value = this.escapedValue(token, context, config);\n else if (symbol === 'text') value = this.rawValue(token);\n\n if (value !== undefined)\n buffer += value;\n }\n\n return buffer;\n };\n\n Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate, config) {\n var self = this;\n var buffer = '';\n var value = context.lookup(token[1]);\n\n // This function is used to render an arbitrary template\n // in the current context by higher-order sections.\n function subRender (template) {\n return self.render(template, context, partials, config);\n }\n\n if (!value) return;\n\n if (isArray(value)) {\n for (var j = 0, valueLength = value.length; j < valueLength; ++j) {\n buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate, config);\n }\n } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') {\n buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate, config);\n } else if (isFunction(value)) {\n if (typeof originalTemplate !== 'string')\n throw new Error('Cannot use higher-order sections without the original template');\n\n // Extract the portion of the original template that the section contains.\n value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);\n\n if (value != null)\n buffer += value;\n } else {\n buffer += this.renderTokens(token[4], context, partials, originalTemplate, config);\n }\n return buffer;\n };\n\n Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate, config) {\n var value = context.lookup(token[1]);\n\n // Use JavaScript's definition of falsy. Include empty arrays.\n // See https://github.com/janl/mustache.js/issues/186\n if (!value || (isArray(value) && value.length === 0))\n return this.renderTokens(token[4], context, partials, originalTemplate, config);\n };\n\n Writer.prototype.indentPartial = function indentPartial (partial, indentation, lineHasNonSpace) {\n var filteredIndentation = indentation.replace(/[^ \\t]/g, '');\n var partialByNl = partial.split('\\n');\n for (var i = 0; i < partialByNl.length; i++) {\n if (partialByNl[i].length && (i > 0 || !lineHasNonSpace)) {\n partialByNl[i] = filteredIndentation + partialByNl[i];\n }\n }\n return partialByNl.join('\\n');\n };\n\n Writer.prototype.renderPartial = function renderPartial (token, context, partials, config) {\n if (!partials) return;\n var tags = this.getConfigTags(config);\n\n var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];\n if (value != null) {\n var lineHasNonSpace = token[6];\n var tagIndex = token[5];\n var indentation = token[4];\n var indentedValue = value;\n if (tagIndex == 0 && indentation) {\n indentedValue = this.indentPartial(value, indentation, lineHasNonSpace);\n }\n var tokens = this.parse(indentedValue, tags);\n return this.renderTokens(tokens, context, partials, indentedValue, config);\n }\n };\n\n Writer.prototype.unescapedValue = function unescapedValue (token, context) {\n var value = context.lookup(token[1]);\n if (value != null)\n return value;\n };\n\n Writer.prototype.escapedValue = function escapedValue (token, context, config) {\n var escape = this.getConfigEscape(config) || mustache.escape;\n var value = context.lookup(token[1]);\n if (value != null)\n return (typeof value === 'number' && escape === mustache.escape) ? String(value) : escape(value);\n };\n\n Writer.prototype.rawValue = function rawValue (token) {\n return token[1];\n };\n\n Writer.prototype.getConfigTags = function getConfigTags (config) {\n if (isArray(config)) {\n return config;\n }\n else if (config && typeof config === 'object') {\n return config.tags;\n }\n else {\n return undefined;\n }\n };\n\n Writer.prototype.getConfigEscape = function getConfigEscape (config) {\n if (config && typeof config === 'object' && !isArray(config)) {\n return config.escape;\n }\n else {\n return undefined;\n }\n };\n\n var mustache = {\n name: 'mustache.js',\n version: '4.2.0',\n tags: [ '{{', '}}' ],\n clearCache: undefined,\n escape: undefined,\n parse: undefined,\n render: undefined,\n Scanner: undefined,\n Context: undefined,\n Writer: undefined,\n /**\n * Allows a user to override the default caching strategy, by providing an\n * object with set, get and clear methods. This can also be used to disable\n * the cache by setting it to the literal `undefined`.\n */\n set templateCache (cache) {\n defaultWriter.templateCache = cache;\n },\n /**\n * Gets the default or overridden caching object from the default writer.\n */\n get templateCache () {\n return defaultWriter.templateCache;\n }\n };\n\n // All high-level mustache.* functions use this writer.\n var defaultWriter = new Writer();\n\n /**\n * Clears all cached templates in the default writer.\n */\n mustache.clearCache = function clearCache () {\n return defaultWriter.clearCache();\n };\n\n /**\n * Parses and caches the given template in the default writer and returns the\n * array of tokens it contains. Doing this ahead of time avoids the need to\n * parse templates on the fly as they are rendered.\n */\n mustache.parse = function parse (template, tags) {\n return defaultWriter.parse(template, tags);\n };\n\n /**\n * Renders the `template` with the given `view`, `partials`, and `config`\n * using the default writer.\n */\n mustache.render = function render (template, view, partials, config) {\n if (typeof template !== 'string') {\n throw new TypeError('Invalid template! Template should be a \"string\" ' +\n 'but \"' + typeStr(template) + '\" was given as the first ' +\n 'argument for mustache#render(template, view, partials)');\n }\n\n return defaultWriter.render(template, view, partials, config);\n };\n\n // Export the escaping function so that the user may override it.\n // See https://github.com/janl/mustache.js/issues/244\n mustache.escape = escapeHtml;\n\n // Export these mainly for testing, but also for advanced usage.\n mustache.Scanner = Scanner;\n mustache.Context = Context;\n mustache.Writer = Writer;\n\n return mustache;\n\n})));\n","import{options as n}from\"preact\";var t,u,r,o=0,i=[],c=n.__r,f=n.diffed,e=n.__c,a=n.unmount;function v(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function m(n){return o=1,p(k,n)}function p(n,r,o){var i=v(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):k(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=v(t++,3);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function l(r,o){var i=v(t++,4);!n.__s&&j(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function h(n){return o=5,_(function(){return{current:n}},[])}function s(n,t,u){o=6,l(function(){\"function\"==typeof n?n(t()):n&&(n.current=t())},null==u?u:u.concat(n))}function _(n,u){var r=v(t++,7);return j(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,_(function(){return n},t)}function F(n){var r=u.context[n.__c],o=v(t++,9);return o.__c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function d(n){var r=v(t++,10),o=m();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function q(){i.some(function(t){if(t.__P)try{t.__H.__h.forEach(b),t.__H.__h.forEach(g),t.__H.__h=[]}catch(u){return t.__H.__h=[],n.__e(u,t.__v),!0}}),i=[]}n.__r=function(n){c&&c(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(b),r.__h.forEach(g),r.__h=[])},n.diffed=function(t){f&&f(t);var u=t.__c;u&&u.__H&&u.__H.__h.length&&(1!==i.push(u)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),x&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);x&&(t=requestAnimationFrame(u))})(q))},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(b),t.__h=t.__h.filter(function(n){return!n.__||g(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),e&&e(t,u)},n.unmount=function(t){a&&a(t);var u=t.__c;if(u&&u.__H)try{u.__H.__.forEach(b)}catch(t){n.__e(t,u.__v)}};var x=\"function\"==typeof requestAnimationFrame;function b(n){\"function\"==typeof n.u&&n.u()}function g(n){n.u=n.__()}function j(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function k(n,t){return\"function\"==typeof t?t(n):t}export{m as useState,p as useReducer,y as useEffect,l as useLayoutEffect,h as useRef,s as useImperativeHandle,_ as useMemo,A as useCallback,F as useContext,T as useDebugValue,d as useErrorBoundary};\n//# sourceMappingURL=hooks.module.js.map\n","import{useState as n,useReducer as t,useEffect as e,useLayoutEffect as r,useRef as u,useImperativeHandle as o,useMemo as i,useCallback as c,useContext as l,useDebugValue as f}from\"preact/hooks\";export*from\"preact/hooks\";import{Component as a,createElement as s,options as h,toChildArray as v,Fragment as p,hydrate as d,render as m,__u as b,cloneElement as y,createRef as _,createContext as g}from\"preact\";export{createElement,createContext,createRef,Fragment,Component}from\"preact\";function E(n,t){for(var e in t)n[e]=t[e];return n}function S(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function w(n){this.props=n}function C(n,t){function e(n){var e=this.props.ref,r=e==n.ref;return!r&&e&&(e.call?e(null):e.current=null),t?!t(this.props,n)||!r:S(this.props,n)}function r(t){return this.shouldComponentUpdate=e,s(n,t)}return r.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",r.prototype.isReactComponent=!0,r.__f=!0,r}(w.prototype=new a).isPureReactComponent=!0,w.prototype.shouldComponentUpdate=function(n,t){return S(this.props,n)||S(this.state,t)};var R=h.__b;h.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),R&&R(n)};var x=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function k(n){function t(t,e){var r=E({},t);return delete r.ref,n(r,(e=t.ref||e)&&(\"object\"!=typeof e||\"current\"in e)?e:null)}return t.$$typeof=x,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var O=function(n,t){return null==n?null:v(v(n).map(t))},A={map:O,forEach:O,count:function(n){return n?v(n).length:0},only:function(n){var t=v(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:v},N=h.__e;function L(n){return n&&((n=E({},n)).__c=null,n.__k=n.__k&&n.__k.map(L)),n}function U(n){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(U)),n}function F(){this.__u=0,this.t=null,this.__b=null}function M(n){var t=n.__.__c;return t&&t.__e&&t.__e(n)}function j(n){var t,e,r;function u(u){if(t||(t=n()).then(function(n){e=n.default||n},function(n){r=n}),r)throw r;if(!e)throw t;return s(e,u)}return u.displayName=\"Lazy\",u.__f=!0,u}function D(){this.u=null,this.o=null}h.__e=function(n,t,e){if(n.then)for(var r,u=t;u=u.__;)if((r=u.__c)&&r.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),r.__c(n,t.__c);N(n,t,e)},(F.prototype=new a).__c=function(n,t){var e=this;null==e.t&&(e.t=[]),e.t.push(t);var r=M(e.__v),u=!1,o=function(){u||(u=!0,t.componentWillUnmount=t.__c,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var n;if(!--e.__u)for(e.__v.__k[0]=U(e.state.__e),e.setState({__e:e.__b=null});n=e.t.pop();)n.forceUpdate()},c=e.__v;c&&!0===c.__h||e.__u++||e.setState({__e:e.__b=e.__v.__k[0]}),n.then(o,o)},F.prototype.componentWillUnmount=function(){this.t=[]},F.prototype.render=function(n,t){this.__b&&(this.__v.__k&&(this.__v.__k[0]=L(this.__b)),this.__b=null);var e=t.__e&&s(p,null,n.fallback);return e&&(e.__h=null),[s(p,null,t.__e?null:n.children),e]};var I=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]3)for(u=[u],o=3;o1&&T(t,l,u),l=x(u,t,t,n.__k,null,t.__e,l),\"function\"==typeof n.type&&(n.__d=l)))}function $(l,u,i,t,o,r,f,e,c){var a,h,v,y,_,w,k,g,b,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=n.__b)&&a(u);try{n:if(\"function\"==typeof P){if(g=u.props,b=(a=P.contextType)&&t[a.__c],x=a?b?b.props.value:a.__:t,i.__c?k=(h=u.__c=i.__c).__=h.__E:(\"prototype\"in P&&P.prototype.render?u.__c=h=new P(g,x):(u.__c=h=new d(g,x),h.constructor=P,h.render=M),b&&b.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,P.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,h.__h.length&&f.push(h),T(u,e,l);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,w)})}h.context=x,h.props=g,h.state=h.__s,(a=n.__r)&&a(u),h.__d=!1,h.__v=u,h.__P=l,a=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(w=h.getSnapshotBeforeUpdate(y,_)),A=null!=a&&a.type==p&&null==a.key?a.props.children:a,m(l,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),k&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=H(i.__e,u,i,t,o,r,f,c);(a=n.diffed)&&a(u)}catch(l){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),n.__e(l,u,i)}return u.__e}function j(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u)})}catch(l){n.__e(l,u.__v)}})}function H(n,l,u,i,t,o,r,c){var s,a,h,v,y,p=u.props,d=l.props;if(t=\"svg\"===l.type||t,null!=o)for(s=0;s3)for(u=[u],o=3;o= 5 && minLength < 10) {\n allowedDistance = 1;\n }\n else if (minLength >= 10) {\n allowedDistance = 2;\n }\n if (distance <= allowedDistance) {\n replaces[lineWord] = \"\" + lineWord + \"\";\n break;\n }\n }\n }\n for (var _i = 0, _a = Object.entries(replaces); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], value = _b[1];\n lineText = lineText.replaceAll(key, value);\n }\n element.innerHTML = lineText;\n}\nexports.highlightLine = highlightLine;\nfunction levenshteinDistance(str1, str2) {\n if (str1 === void 0) { str1 = \"\"; }\n if (str2 === void 0) { str2 = \"\"; }\n var track = Array(str2.length + 1).fill(null).map(function () {\n return Array(str1.length + 1).fill(null);\n });\n for (var i = 0; i <= str1.length; i += 1) {\n track[0][i] = i;\n }\n for (var j = 0; j <= str2.length; j += 1) {\n track[j][0] = j;\n }\n for (var j = 1; j <= str2.length; j += 1) {\n for (var i = 1; i <= str1.length; i += 1) {\n var indicator = str1[i - 1] === str2[j - 1] ? 0 : 1;\n track[j][i] = Math.min(track[j][i - 1] + 1, // deletion\n track[j - 1][i] + 1, // insertion\n track[j - 1][i - 1] + indicator);\n }\n }\n return track[str2.length][str1.length];\n}\nexports.levenshteinDistance = levenshteinDistance;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar events_1 = require(\"events\");\nvar Constants_1 = require(\"./Constants\");\nvar Container_1 = require(\"./Container\");\n/**\n * Flux pattern store class\n */\nvar Store = /** @class */ (function (_super) {\n __extends(Store, _super);\n /**\n * @param coordinate\n * @param minScore\n * @param hash\n * @param userId\n * @param site\n * @param language\n * @param device\n * @param generateRandomSessionUUID\n * @param initialState\n */\n function Store(coordinate, minScore, hash, userId, site, language, device, generateRandomSessionUUID, initialState) {\n var _this = _super.call(this) || this;\n _this.withHash = false;\n _this.doNotCleanUrlHashAtFirst = false;\n _this.dirty = true;\n _this.site = site;\n _this.device = device;\n _this.initialState = initialState;\n var initialQuery = Store.loadInitialQuery(coordinate, userId, site, language, device);\n _this.window = window.top;\n _this.isUnderIframe = (window !== window.top);\n if ((typeof hash === \"string\")) {\n _this.withHash = true;\n _this.urlHash = (hash === \"\") ? \"{}\" : hash;\n if (_this.urlHash.charAt(0) === \"#\") {\n _this.urlHash = _this.urlHash.substr(1);\n }\n }\n if (minScore) {\n initialQuery.setMinScore(minScore);\n }\n /**\n * Data received\n */\n _this.setEmptyResult();\n _this.currentVisibleResults = false;\n if (generateRandomSessionUUID) {\n initialQuery.setMetadataValue(\"session_uid\", Store.createUID(16));\n }\n _this.setCurrentQuery(initialQuery);\n return _this;\n }\n /**\n * Is dirty\n *\n * @return {any}\n */\n Store.prototype.isDirty = function () {\n return this.dirty;\n };\n /**\n *\n */\n Store.prototype.getSite = function () {\n return this.site;\n };\n /**\n *\n */\n Store.prototype.getDevice = function () {\n return this.device;\n };\n /**\n * Get current query\n *\n * @return {Query}\n */\n Store.prototype.getCurrentQuery = function () {\n return this.currentQuery;\n };\n /**\n * @param query\n */\n Store.prototype.setCurrentQuery = function (query) {\n this.currentQuery = query;\n };\n /**\n * Get current result\n *\n * @return {Result}\n */\n Store.prototype.getCurrentResult = function () {\n return this.currentResult;\n };\n /**\n * @param result\n */\n Store.prototype.setCurrentResult = function (result) {\n this.currentResult = result;\n };\n /**\n *\n */\n Store.prototype.setEmptyResult = function () {\n this.currentResult = apisearch_1[\"default\"].createEmptyResult();\n };\n /**\n * Get current result\n *\n * @return {boolean}\n */\n Store.prototype.hasProperResult = function () {\n return this.currentResult.getTotalItems() > 0;\n };\n /**\n * Results are visible\n *\n * @return {boolean}\n */\n Store.prototype.resultsAreVisible = function () {\n return this.currentVisibleResults;\n };\n /**\n * @param payload\n */\n Store.prototype.updateApisearchSetup = function (payload) {\n this.currentQuery = payload.query;\n };\n /**\n * @param payload\n */\n Store.prototype.renderInitialData = function (payload) {\n var result = payload.result, query = payload.query, _ = payload._;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n this.currentVisibleResults = query !== undefined;\n this.emit(\"render\");\n this.replaceUrl(query, result, this.currentVisibleResults);\n };\n /**\n * @param payload\n */\n Store.prototype.renderFetchedData = function (payload) {\n var result = payload.result, query = payload.query, visibleResults = payload.visibleResults;\n this.dirty = false;\n this.currentResult = result;\n this.currentQuery = query;\n if (visibleResults !== undefined) {\n this.currentVisibleResults = visibleResults;\n }\n this.emit(\"render\");\n this.replaceUrl(query, result, visibleResults);\n };\n /**\n * Create an uid\n */\n Store.createUID = function (length) {\n var result = \"\";\n var characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n var charactersLength = characters.length;\n for (var i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n };\n /**\n * @param environmentId\n * @param repository\n * @param loadQuery\n */\n Store.prototype.fetchInitialQuery = function (environmentId, repository, loadQuery) {\n var _this = this;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n this.currentQuery = loadQuery\n ? this.loadQuery(this.currentQuery)\n : this.currentQuery;\n dispatcher.dispatch(\"NORMALIZE_QUERY\", {\n query: this.currentQuery\n });\n /**\n * In initial query, we must delete user\n */\n var queryAsArray = this.currentQuery.toArray();\n queryAsArray.user = null;\n repository\n .query(apisearch_1.Query.createFromArray(queryAsArray))\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_INITIAL_DATA\", {\n query: _this.currentQuery,\n result: result\n });\n });\n };\n /**\n * @param coordinate\n * @param userId\n * @param site\n * @param language\n * @param device\n *\n * @private\n */\n Store.loadInitialQuery = function (coordinate, userId, site, language, device) {\n var withCoordinate = (coordinate &&\n coordinate.lat !== undefined &&\n coordinate.lon !== undefined);\n var q = {};\n if (withCoordinate) {\n q.coordinate = coordinate;\n }\n if (userId !== \"\") {\n q.user = { id: userId };\n }\n if (q.metadata === undefined) {\n q.metadata = { device: device };\n }\n if (site !== \"\") {\n q.metadata.site = site;\n }\n if (language !== \"\") {\n q.metadata.language = language;\n }\n return apisearch_1.Query.createFromArray(q);\n };\n /**\n * @param query\n */\n Store.prototype.loadQuery = function (query) {\n var queryAsObject = query.toArray();\n if (Object.keys(this.initialState).length > 0) {\n this.emit(\"fromUrlObject\", this.initialState, queryAsObject);\n return apisearch_1.Query.createFromArray(queryAsObject);\n }\n if (!this.withHash) {\n return query;\n }\n var urlObject = {};\n if (this.urlHash.match(\"q=.*\") !== null) {\n var urlHashQuery = decodeURI(this.urlHash.slice(2));\n urlObject = { q: urlHashQuery };\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n else {\n try {\n urlObject = (this.urlHash !== undefined &&\n this.urlHash !== null &&\n this.urlHash !== \"\" &&\n this.urlHash !== \"/\")\n ? JSON.parse(decodeURI(this.urlHash))\n : {};\n if (Object.keys(urlObject).length > 0) {\n this.emit(\"fromUrlObject\", urlObject, queryAsObject);\n }\n }\n catch (e) {\n // Silent pass\n this.doNotCleanUrlHashAtFirst = true;\n }\n }\n return apisearch_1.Query.createFromArray(queryAsObject);\n };\n /**\n *\n * @param query\n * @param result\n * @param visibleResults\n */\n Store.prototype.replaceUrl = function (query, result, visibleResults) {\n if (!this.withHash) {\n return;\n }\n var queryAsObject = query.toArray();\n var urlObject = {};\n this.emit(\"toUrlObject\", queryAsObject, urlObject);\n var objectAsJson;\n if (Object.keys(urlObject).length === 1 &&\n typeof urlObject.q !== \"undefined\") {\n objectAsJson = \"q=\" + urlObject.q;\n }\n else {\n objectAsJson = decodeURI(JSON.stringify(urlObject));\n objectAsJson = (objectAsJson === \"{}\") ? \"\" : objectAsJson;\n objectAsJson = encodeURI(objectAsJson);\n }\n if (!this.isUnderIframe) {\n var path = window.location.href;\n var pathWithoutHash = path.split(\"#\", 2)[0];\n history.replaceState(\"\", \"\", pathWithoutHash + \"#\" + objectAsJson);\n if (objectAsJson === \"\") {\n history.replaceState(\"\", \"\", pathWithoutHash);\n }\n }\n else {\n if (!this.doNotCleanUrlHashAtFirst) {\n this.window.postMessage({\n name: \"apisearch_replace_hash\",\n hash: objectAsJson\n }, \"*\");\n }\n this.doNotCleanUrlHashAtFirst = false;\n }\n };\n return Store;\n}(events_1.EventEmitter));\nexports[\"default\"] = Store;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Result Information Component\n */\nvar BannerComponent = /** @class */ (function (_super) {\n __extends(BannerComponent, _super);\n /**\n * Constructor\n */\n function BannerComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n BannerComponent.prototype.componentWillReceiveProps = function (props) {\n var _a;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var banners = (_a = props.store.getCurrentResult().metadata.banners) !== null && _a !== void 0 ? _a : [];\n if (!banners) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var filteredBanners = banners.filter(function (banner) { return banner.position === props.position; });\n if (filteredBanners.length === 0) {\n this.setState(function (prevState) {\n return {\n mobile_img: \"\",\n desktop_img: \"\",\n url: \"\"\n };\n });\n return;\n }\n var firstBanner = filteredBanners[0];\n this.setState(function (prevState) {\n return {\n mobile_img: firstBanner.mobile_img,\n desktop_img: firstBanner.desktop_img,\n url: firstBanner.url\n };\n });\n };\n BannerComponent.prototype.render = function () {\n var _a;\n if (this.state.desktop_img === \"\") {\n return;\n }\n var data = {\n desktop_img: this.state.desktop_img,\n mobile_img: (_a = this.state.mobile_img) !== null && _a !== void 0 ? _a : this.state.desktop_img,\n url: this.state.url,\n has_url: this.state.url !== \"\",\n breaking_point_size: this.props.breakingPointSize,\n image_prefix: this.props.imagePrefix\n };\n return ((0, preact_1.h)(Template_1[\"default\"], { template: defaultTemplates_1.defaultBannerTemplate, data: data, dictionary: this.props.dictionary }));\n };\n return BannerComponent;\n}(preact_1.Component));\nexports[\"default\"] = BannerComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultBannerTemplate = void 0;\nexports.defaultBannerTemplate = \"\\n
\\n {{#has_url}}{{/has_url}}\\n \\n \\n \\n \\n {{#has_url}}{{/has_url}}\\n
\\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.aggregationSetup = void 0;\n/**\n * Checkbox filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param aggregationField\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, aggregationField) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.aggregateBy(filterName, aggregationField, apisearch_1.FILTER_TYPE_FIELD);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param isChecked\n * @param filterValue\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, filterName, filterField, isChecked, filterValue) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, isChecked\n ? [filterValue]\n : [], apisearch_1.FILTER_MUST_ALL, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../MultipleFilter/Helpers\");\nvar CheckboxFilterActions_1 = require(\"./CheckboxFilterActions\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Checkbox Filter Component\n */\nvar CheckboxFilterComponent = /** @class */ (function (_super) {\n __extends(CheckboxFilterComponent, _super);\n function CheckboxFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param activeElement\n */\n _this.handleChange = function (activeElement) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.onChangeSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, activeElement, props.filterValue);\n };\n return _this;\n }\n /**\n * Component will mount\n */\n CheckboxFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var aggregationField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, CheckboxFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, aggregationField);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n CheckboxFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n aggregation: props\n .store\n .getCurrentResult()\n .getAggregation(props.filterName)\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n CheckboxFilterComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var filterValue = props.filterValue;\n if (typeof filterValue === \"boolean\") {\n filterValue = filterValue ? \"true\" : \"false\";\n }\n var n = 0;\n var isActive = (0, Helpers_1.getFilterValuesFromQuery)(props.store.getCurrentQuery(), props.filterName)[0];\n var aggregation = state.aggregation;\n if (aggregation != null) {\n var counters = aggregation.getCounters();\n for (var i in counters) {\n var counter = counters[i];\n if (counter.values.name === filterValue) {\n n = counter.getN();\n break;\n }\n }\n }\n var label = props.label\n ? props.label\n : props.filterName;\n var that = this;\n var uid = Math.floor(Math.random() * 10000000000);\n var templateData = {\n n: n,\n isActive: isActive,\n label: label,\n uid: uid\n };\n if (n === 0) {\n return null;\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-checkboxFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-checkboxFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-checkboxFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((isActive) ? activeClassName : \"\"), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleChange(!isActive);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: this.props.dictionary }))));\n };\n return CheckboxFilterComponent;\n}(preact_1.Component));\nCheckboxFilterComponent.defaultProps = {\n filterValue: 'true',\n classNames: {\n container: \"\",\n top: \"\",\n item: \"\",\n active: \"as-checkboxFilter__item--active\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = CheckboxFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{label}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.clearFiltersAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterToClear\n * @param filterValueToClear\n */\nfunction clearFiltersAction(environmentId, currentQuery, repository, filterToClear, filterValueToClear) {\n if (filterToClear === void 0) { filterToClear = null; }\n if (filterValueToClear === void 0) { filterValueToClear = null; }\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (filterToClear === null) {\n clonedQuery.filters = {\n _query: currentQuery.getFilter(\"_query\")\n };\n }\n else if (filterValueToClear === null) {\n delete clonedQuery.filters[filterToClear];\n }\n else {\n var values = clonedQuery.filters[filterToClear].values;\n var valueIndex = values.indexOf(filterValueToClear, 0);\n if (valueIndex > -1) {\n clonedQuery.filters[filterToClear].values.splice(valueIndex, 1);\n }\n if (clonedQuery.filters[filterToClear].values.length === 0) {\n delete clonedQuery.filters[filterToClear];\n }\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.clearFiltersAction = clearFiltersAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ClearFiltersActions_1 = require(\"./ClearFiltersActions\");\n/**\n * Result Information Component\n */\nvar ClearFiltersComponent = /** @class */ (function (_super) {\n __extends(ClearFiltersComponent, _super);\n /**\n * Constructor\n */\n function ClearFiltersComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n _this.setState(function (prevState) {\n return {\n appliedFilters: [],\n showClearFilters: false\n };\n });\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository);\n };\n /**\n * Handle individual click\n */\n _this.handleIndividualClick = function (filterKey, filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ClearFiltersActions_1.clearFiltersAction)(environmentId, currentQuery, repository, filterKey, filterValue);\n };\n _this.state = {\n appliedFilters: [],\n showClearFilters: false\n };\n return _this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n ClearFiltersComponent.prototype.componentWillReceiveProps = function (props) {\n var appliedFiltersFormatted = this.getFiltersToShow();\n this.setState(function (prevState) {\n return {\n appliedFilters: appliedFiltersFormatted,\n showClearFilters: appliedFiltersFormatted.length > 0\n };\n });\n };\n /**\n * @param filterToAvoid\n */\n ClearFiltersComponent.prototype.getFiltersToShow = function (filterToAvoid) {\n if (filterToAvoid === void 0) { filterToAvoid = null; }\n var appliedFilters = this.props.store.getCurrentQuery().getFilters();\n var appliedFiltersFormatted = [];\n for (var _i = 0, _a = Object.entries(appliedFilters); _i < _a.length; _i++) {\n var _b = _a[_i], key = _b[0], filter = _b[1];\n if (filter instanceof apisearch_1.Filter && (key !== \"_query\") && (key !== filterToAvoid)) {\n appliedFiltersFormatted.push({\n filter: key,\n num: filter.getValues().length,\n values: filter.getValues()\n });\n }\n }\n return appliedFiltersFormatted;\n };\n /**\n * Render\n *\n * @return {}\n */\n ClearFiltersComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var containerClassName = props.classNames.container;\n var filtersListClassName = props.classNames.filtersList;\n var filterClassName = props.classNames.filter;\n var containerTemplate = props.template.container;\n var appliedFiltersFormatted = this.state.appliedFilters;\n var individualFilterClear = null;\n var isEmptyClass = (this.state.appliedFilters.length === 0) ? \"empty\" : \"\";\n if (props.showIndividualFilterValueClear) {\n var values_1 = [];\n this.state.appliedFilters.forEach(function (filter) {\n filter.values.forEach(function (value) { return values_1.push({\n filter: filter.filter,\n value: value\n }); });\n });\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, values_1.map(function (filter) {\n var _a, _b;\n var isFilterPrice = filter.value.indexOf(\"..\") >= 0;\n var template = isFilterPrice\n ? _this.props.template.filter_price\n : _this.props.template.filter;\n if (isFilterPrice) {\n filter.parts = filter.value.replace(/[\\[\\]]/, \"\").split(\"..\");\n if (((_a = filter.parts[0]) !== null && _a !== void 0 ? _a : \"\") === \"0\") {\n template = _this.props.template.filter_price_only_to;\n }\n else if (((_b = filter.parts[1]) !== null && _b !== void 0 ? _b : \"\") === \"\") {\n template = _this.props.template.filter_price_only_from;\n }\n }\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, filter.value); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: template, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n else if (props.showIndividualFilterClear) {\n individualFilterClear = (0, preact_1.h)(\"ul\", { className: \"as-clearFilters__filtersList \".concat(filtersListClassName) }, appliedFiltersFormatted.map(function (filter) {\n return (0, preact_1.h)(\"li\", { className: \"as-clearFilters__filter \".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, null); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: _this.props.template.filter, dictionary: _this.props.dictionary, data: filter }));\n }));\n }\n return (this.state.showClearFilters)\n ? ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName, \" \").concat(isEmptyClass) },\n props.showGlobalFilterClear\n ? (0, preact_1.h)(\"div\", { onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary }))\n : \"\",\n individualFilterClear)) : null;\n };\n return ClearFiltersComponent;\n}(preact_1.Component));\nClearFiltersComponent.defaultProps = {\n classNames: {\n container: \"\",\n filter: \"\",\n filtersList: \"\"\n },\n showGlobalFilterClear: true,\n showIndividualFilterClear: false,\n showIndividualFilterValueClear: false,\n template: {\n container: \"Clear filters\",\n filter: \"Clear {{filter}} ({{num}})\"\n }\n};\nexports[\"default\"] = ClearFiltersComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar Clone = /** @class */ (function () {\n function Clone() {\n }\n Clone.object = function (object) {\n return Object.assign(Object.create(Object.getPrototypeOf(object)), object);\n };\n return Clone;\n}());\nexports[\"default\"] = Clone;\n","\"use strict\";\nexports.__esModule = true;\nexports.onWordClickAction = void 0;\nvar apisearch_1 = require(\"apisearch\");\nvar Clone_1 = require(\"./Clone\");\nvar Container_1 = require(\"../Container\");\nvar Constants_1 = require(\"../Constants\");\n/**\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param word\n * @param category\n */\nfunction onWordClickAction(environmentId, currentQuery, repository, word, category) {\n if (category === void 0) { category = null; }\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [word];\n clonedQuery.page = 1;\n if (category) {\n clonedQuery = apisearch_1.Query.createFromArray(clonedQuery);\n clonedQuery.filterBy(\"Categoría\", \"category_level_0\", [category]);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onWordClickAction = onWordClickAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Result Information Component\n */\nvar InformationComponent = /** @class */ (function (_super) {\n __extends(InformationComponent, _super);\n /**\n * Constructor\n */\n function InformationComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n hits: 0,\n total: 0,\n visible: false\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n InformationComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return (props.store.getCurrentResult() == null)\n ? {\n hits: 0,\n total: 0,\n visible: false\n }\n : {\n hits: props.store.getCurrentResult().getTotalHits(),\n total: props.store.getCurrentResult().getTotalItems(),\n visible: true\n };\n });\n };\n InformationComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n var formatData = props.formatData;\n if (!this.state.visible) {\n return;\n }\n var currentQuery = this.props.store.getCurrentQuery();\n var size = currentQuery.getSize();\n var page = currentQuery.getPage();\n var from = (page - 1) * size;\n var to = from + size;\n var totalHits = this.state.hits.toLocaleString();\n var moreThanLimit = false;\n if (totalHits === \"10,000\") {\n totalHits = '+10,000';\n moreThanLimit = true;\n }\n /**\n * Data accessible to the template\n */\n var reducedTemplateData = {\n total_hits: totalHits,\n total_items: this.state.total.toLocaleString(),\n page: page,\n size: size,\n from: from + 1,\n to: to,\n more_than_limit: moreThanLimit\n };\n var formattedTemplateData = formatData(reducedTemplateData);\n return ((0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, data: formattedTemplateData, className: \"as-information \".concat(containerClassName), dictionary: this.props.dictionary }));\n };\n return InformationComponent;\n}(preact_1.Component));\nInformationComponent.defaultProps = {\n classNames: {\n container: ''\n },\n template: {\n container: 'Found {{total_hits}}/{{total_items}}'\n },\n formatData: function (data) { return data; }\n};\nexports[\"default\"] = InformationComponent;\n","\"use strict\";\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nexports.isLeveledFilter = exports.getFilterValuesFromQuery = exports.isFilterAvailable = exports.getShadowFilterValuesFromQuery = exports.manageCurrentFilterItems = exports.wasElementRecentlySelected = void 0;\n/**\n * @param selectedItem\n * @param currentItems\n */\nfunction wasElementRecentlySelected(selectedItem, currentItems) {\n return !currentItems.some(function (item) { return item === selectedItem; });\n}\nexports.wasElementRecentlySelected = wasElementRecentlySelected;\n/**\n * Manage filter items\n *\n * If an item is on the list, remove it\n * else, add it!\n *\n * @param selectedItem\n * @param currentItems\n * @param wasElementRecentlySelected\n * @param deleteIfWasRemoved\n *\n * @returns {any}\n */\nfunction manageCurrentFilterItems(selectedItem, currentItems, wasElementRecentlySelected, deleteIfWasRemoved) {\n if (!wasElementRecentlySelected) {\n return deleteIfWasRemoved\n ? currentItems.filter(function (item) { return item !== selectedItem; })\n : currentItems;\n }\n else {\n return __spreadArray(__spreadArray([], currentItems, true), [\n selectedItem,\n ], false);\n }\n}\nexports.manageCurrentFilterItems = manageCurrentFilterItems;\n/**\n * @param query\n * @param filterName\n * @param withCurrent\n */\nfunction getShadowFilterValuesFromQuery(query, filterName, withCurrent) {\n var fields = [];\n if (isFilterAvailable(query, filterName, 6)) {\n var fieldName = query.filters[filterName].field.substr(17);\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n for (var it_1 = 1; it_1 < currentLevel; it_1++) {\n var iterationFieldName = fieldNameWithoutLevel + \"_\" + it_1;\n if (query.filters[iterationFieldName] !== undefined) {\n fields.push(query.filters[iterationFieldName].values[0]);\n }\n }\n if (withCurrent) {\n fields.push(query.filters[filterName].values[0]);\n }\n }\n return fields;\n}\nexports.getShadowFilterValuesFromQuery = getShadowFilterValuesFromQuery;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction isFilterAvailable(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return (query.filters !== undefined &&\n query.filters !== null &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined &&\n query.filters[filterName] !== null &&\n (applicationType === null ||\n query.filters[filterName].applicationType === applicationType ||\n query.filters[filterName].application_type === applicationType));\n}\nexports.isFilterAvailable = isFilterAvailable;\n/**\n * @param query\n * @param filterName\n * @param applicationType\n */\nfunction getFilterValuesFromQuery(query, filterName, applicationType) {\n if (applicationType === void 0) { applicationType = null; }\n return isFilterAvailable(query, filterName, applicationType)\n ? query.filters[filterName].values\n : [];\n}\nexports.getFilterValuesFromQuery = getFilterValuesFromQuery;\n/**\n * @param filter\n */\nfunction isLeveledFilter(filter) {\n return filter.application_type === 6 ||\n filter.applicationType === 6;\n}\nexports.isLeveledFilter = isLeveledFilter;\n","\"use strict\";\nexports.__esModule = true;\nexports.configureQueryWithShadowLeveledFilters = exports.modifyQueryAggregationWithProperLevelValue = exports.filterAction = exports.aggregationSetup = void 0;\n/**\n * Multiple filter actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar apisearch_2 = require(\"apisearch\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Define aggregations setup\n *\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param promoted\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, aggregationField, applicationType, sortBy, fetchLimit, ranges, promoted) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit, promoted);\n }\n else {\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * Filter action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param filterValues\n * @param applicationType\n * @param sortBy\n * @param fetchLimit\n * @param ranges\n * @param labels\n * @param shadowLeveledFilters\n * @param originalFilterField\n * @param promoted\n * @param selectedFilter\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterValues, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, promoted, selectedFilter) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var rangesValues = Object.keys(ranges);\n if (rangesValues.length > 0) {\n clonedQuery.filterByRange(filterName, filterField, rangesValues, filterValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, false, sortBy);\n clonedQuery.aggregateByRange(filterName, aggregationField, rangesValues, applicationType, apisearch_2.FILTER_TYPE_RANGE, sortBy, fetchLimit);\n }\n else {\n clonedQuery.filterBy(filterName, filterField, filterValues, applicationType, false, sortBy);\n clonedQuery.aggregateBy(filterName, aggregationField, applicationType, sortBy, fetchLimit, promoted);\n }\n if (applicationType === 6) {\n configureQueryWithShadowLeveledFilters(clonedQuery, shadowLeveledFilters, originalFilterField);\n }\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n // We must explicitly tell that a filter was added at this point\n if (selectedFilter) {\n clonedQuery.setMetadataValue(\"af\", [filterField, selectedFilter]);\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param aggregationField\n */\nfunction modifyQueryAggregationWithProperLevelValue(environmentId, currentQuery, filterName, filterField, aggregationField) {\n if (currentQuery.filters !== undefined &&\n currentQuery.filters[filterName] !== undefined) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var fieldName = currentQuery.filters[filterName].field;\n var fieldNameParts = fieldName.split(\"_\");\n var currentLevel = parseInt(fieldNameParts[fieldNameParts.length - 1], 10);\n var fieldNameWithoutLevel = fieldNameParts.slice(0, fieldNameParts.length - 1).join(\"_\");\n clonedQuery.aggregations[filterName].field = fieldNameWithoutLevel + \"_\" + (currentLevel + 1);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n }\n}\nexports.modifyQueryAggregationWithProperLevelValue = modifyQueryAggregationWithProperLevelValue;\n/**\n * @param query\n * @param shadowLeveledFilters\n * @param originalFilterField\n */\nfunction configureQueryWithShadowLeveledFilters(query, shadowLeveledFilters, originalFilterField) {\n for (var it_1 = 1; it_1 < 10; it_1++) {\n var iterationFieldName = originalFilterField + \"_level_\" + it_1;\n delete (query.filters[iterationFieldName]);\n delete (query.aggregations[iterationFieldName]);\n }\n if (shadowLeveledFilters.length > 0) {\n var levelCounter_1 = 1;\n shadowLeveledFilters.forEach(function (filterValue) {\n var leveledFieldName = originalFilterField + \"_level_\" + (levelCounter_1++);\n query.filterBy(leveledFieldName, leveledFieldName, [filterValue], apisearch_1.FILTER_AT_LEAST_ONE);\n });\n }\n}\nexports.configureQueryWithShadowLeveledFilters = configureQueryWithShadowLeveledFilters;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar MultipleFilterActions_1 = require(\"./MultipleFilterActions\");\nvar Helpers_1 = require(\"./Helpers\");\nvar Template_1 = require(\"../Template\");\nvar ShowMoreComponent_1 = require(\"./ShowMoreComponent\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\n/**\n * Filter Component\n */\nvar MultipleFilterComponent = /** @class */ (function (_super) {\n __extends(MultipleFilterComponent, _super);\n /**\n * Constructor\n */\n function MultipleFilterComponent() {\n var _this = _super.call(this) || this;\n _this.currentLevel = 0;\n _this.propsReceived = false;\n /**\n * @param selectedFilter\n * @param level\n */\n _this.handleClick = function (selectedFilter, level) {\n var _a;\n var props = _this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : filterField;\n var applicationType = props.applicationType;\n var sortBy = props.sortBy;\n var ranges = props.ranges;\n var labels = props.labels;\n var fetchLimit = props.fetchLimit;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var selectedFilterAsString = String(selectedFilter);\n var valuesAsString = (applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, filterName);\n var wasNotSelected = (0, Helpers_1.wasElementRecentlySelected)(selectedFilterAsString, valuesAsString);\n var filterItems = (0, Helpers_1.manageCurrentFilterItems)(selectedFilterAsString, valuesAsString, wasNotSelected, (applicationType !== 6));\n var currentLevel = level;\n if (applicationType === 6) {\n currentLevel = wasNotSelected ? currentLevel : (currentLevel - 1);\n }\n var shadowLeveledFilters = [];\n var originalFilterField = filterField;\n if (applicationType === 6) {\n filterField = filterField + \"_level_\" + (currentLevel);\n aggregationField = aggregationField + \"_level_\" + (currentLevel + 1);\n filterItems = filterItems.slice(0, currentLevel);\n shadowLeveledFilters = filterItems.slice(0, -1);\n filterItems = filterItems.slice(-1);\n }\n _this.currentLevel = currentLevel;\n /**\n * Dispatch filter action\n */\n (0, MultipleFilterActions_1.filterAction)(environmentId, currentQuery, repository, filterName, filterField, aggregationField, filterItems, applicationType, sortBy, fetchLimit, ranges, labels, shadowLeveledFilters, originalFilterField, props.promoted, wasNotSelected ? selectedFilterAsString : null);\n };\n /**\n * Handle show more\n */\n _this.handleShowMore = function () {\n var viewLimit = _this.state.aggregations.length;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n /**\n * Handle show less\n */\n _this.handleShowLess = function () {\n var viewLimit = _this.props.viewLimit;\n _this.setState(function (prevState) {\n return { viewLimit: viewLimit };\n });\n };\n _this.state = {\n aggregations: [],\n viewLimit: 0\n };\n return _this;\n }\n /**\n * Components will mount\n */\n MultipleFilterComponent.prototype.componentWillMount = function () {\n var _a;\n var props = this.props;\n var aggregationField = (_a = props.aggregationField) !== null && _a !== void 0 ? _a : props.filterField;\n var applicationType = props.applicationType;\n var fetchLimit = props.fetchLimit;\n var viewLimit = props.viewLimit;\n /**\n * Set view items limit\n */\n var isViewLimitProperlySet = (viewLimit && viewLimit < fetchLimit);\n this.setState(function (_) {\n return {\n viewLimit: (isViewLimitProperlySet)\n ? viewLimit\n : fetchLimit\n };\n });\n if (applicationType === 6) {\n aggregationField = aggregationField + \"_level_1\";\n }\n /**\n * Dispatch action\n */\n (0, MultipleFilterActions_1.aggregationSetup)(props.environmentId, props.store.getCurrentQuery(), props.filterName, props.filterField, aggregationField, applicationType, props.sortBy, fetchLimit, props.ranges, props.promoted);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n MultipleFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var filterName = props.filterName;\n if (props.store.getCurrentResult() == null) {\n this.setState(function (prevState) {\n return {\n aggregations: [],\n filters: []\n };\n });\n return;\n }\n var result = props.store.getCurrentResult();\n var aggregation = result.getAggregation(filterName);\n var aggregations = [];\n if (aggregation && typeof aggregation.getCounters === \"function\") {\n /**\n * Getting aggregation from aggregations\n */\n var counters = aggregation.getCounters();\n var countersAsArray = Object.values(counters);\n aggregations = props.activeFirst\n ? __spreadArray(__spreadArray([], countersAsArray.filter(function (counter) {\n return true === counter.isUsed();\n }), true), countersAsArray.filter(function (counter) {\n return (false === counter.isUsed() ||\n null === counter.isUsed());\n }), true) : countersAsArray;\n }\n this.setState(function (prevState) {\n return {\n aggregations: aggregations\n };\n });\n if (props.applicationType === 6 &&\n this.propsReceived === false) {\n var filter = props.store.getCurrentQuery().getFilter(filterName);\n this.currentLevel = (filter === undefined || filter === null)\n ? this.currentLevel\n : filter.values\n ? (filter.values.length + 1)\n : this.currentLevel;\n this.propsReceived = true;\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n MultipleFilterComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var viewLimit = props.viewLimit;\n var fetchLimit = props.fetchLimit;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var showMoreContainerClassName = props.classNames.showMoreContainer;\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var showMoreTemplate = props.template.showMore;\n var showLessTemplate = props.template.showLess;\n var currentQuery = props.store.getCurrentQuery();\n var formatData = props.formatData;\n var labels = Object.keys(props.ranges).length > 0\n ? props.ranges\n : props.labels;\n /**\n * Get aggregation items\n */\n var that = this;\n var itemsIds = {};\n var allItems = this.state.aggregations.map(function (item) {\n var uid = Math.floor(Math.random() * 10000000000);\n var values = item.getValues();\n values.name = labels[values.name] ? labels[values.name] : values.name;\n itemsIds[values.id] = true;\n return {\n isActive: item.isUsed(),\n n: item.getN(),\n uid: uid,\n values: values\n };\n });\n /**\n * Shadow filters. These filters are not part of the aggregation list but are applied. Should always be listed\n * first\n */\n var appliedFilters = (props.applicationType === 6)\n ? (0, Helpers_1.getShadowFilterValuesFromQuery)(currentQuery, props.filterName, true)\n : (0, Helpers_1.getFilterValuesFromQuery)(currentQuery, props.filterName);\n if (appliedFilters.length > 0) {\n var zeroItemsFilters_1 = [];\n appliedFilters.forEach(function (filter) {\n if (itemsIds[filter] === undefined) {\n var uid = Math.floor(Math.random() * 10000000000);\n zeroItemsFilters_1.push({\n isActive: true,\n n: 0,\n uid: uid,\n values: {\n id: filter,\n name: filter\n }\n });\n }\n });\n allItems = __spreadArray(__spreadArray([], zeroItemsFilters_1, true), allItems, true);\n }\n /**\n * Get existing applied filters if they exist\n */\n if (allItems.length === 0) {\n return null;\n }\n var items = allItems.slice(0, this.state.viewLimit);\n var allItemsLength = allItems.length;\n var levelCounter = 1;\n var topData = {\n hasApplied: appliedFilters.length > 0,\n nApplied: appliedFilters.length\n };\n /**\n * Check available view limit\n */\n var isViewLimitProperlySet = (viewLimit &&\n viewLimit < fetchLimit &&\n allItemsLength > viewLimit);\n return ((0, preact_1.h)(\"div\", { className: \"as-multipleFilter \".concat(containerClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-multipleFilter__top \".concat(topClassName), dictionary: this.props.dictionary, data: topData }),\n (0, preact_1.h)(\"div\", { className: \"as-multipleFilter__itemsList \".concat(itemsListClassName) },\n (0, preact_1.h)(\"ul\", null, items.map(function (item) {\n var formattedTemplateData = formatData(item);\n var level = Math.min(levelCounter, _this.currentLevel + 1);\n levelCounter++;\n return ((0, preact_1.h)(\"li\", { className: \"as-multipleFilter__item \" +\n \"\".concat(itemClassName, \" \") +\n \"\".concat((item.isActive) ? activeClassName : \"\") +\n \"\".concat((props.promoted.includes(item.values.name) ? \"as-multipleFilter__item_featured\" : \"\")), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(item.values.id, level);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: formattedTemplateData, dictionary: _this.props.dictionary })));\n }))),\n (isViewLimitProperlySet)\n ? (0, preact_1.h)(ShowMoreComponent_1[\"default\"], { allItemsLength: allItemsLength, currentLimit: this.state.viewLimit, handleShowMore: this.handleShowMore, handleShowLess: this.handleShowLess, showMoreContainerClassName: showMoreContainerClassName, showMoreTemplate: showMoreTemplate, showLessTemplate: showLessTemplate, dictionary: this.props.dictionary }) : null));\n };\n return MultipleFilterComponent;\n}(preact_1.Component));\nMultipleFilterComponent.defaultProps = {\n aggregationField: null,\n applicationType: 8,\n fetchLimit: 10,\n viewLimit: null,\n sortBy: ['_term', 'desc'],\n ranges: {},\n labels: {},\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\",\n active: \"as-multipleFilter__item--active\",\n showMoreContainer: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate,\n showMore: \"+ Show more\",\n showLess: \"- Show less\"\n },\n formatData: function (data) { return data; },\n activeFirst: true,\n promoted: []\n};\nexports[\"default\"] = MultipleFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Show more component\n *\n * Provides two items\n * -> Show more element\n * -> Show less element\n */\nvar ShowMoreComponent = function (_a) {\n var allItemsLength = _a.allItemsLength, currentLimit = _a.currentLimit, handleShowMore = _a.handleShowMore, handleShowLess = _a.handleShowLess, showMoreContainerClassName = _a.showMoreContainerClassName, showMoreTemplate = _a.showMoreTemplate, showLessTemplate = _a.showLessTemplate, dictionary = _a.dictionary;\n return (allItemsLength > currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowMore },\n (0, preact_1.h)(Template_1[\"default\"], { template: showMoreTemplate, className: \"as-showMore--more\", dictionary: dictionary })))\n : (allItemsLength === currentLimit)\n ? ((0, preact_1.h)(\"div\", { className: \"as-showMore \".concat(showMoreContainerClassName), onClick: handleShowLess },\n (0, preact_1.h)(Template_1[\"default\"], { template: showLessTemplate, className: \"as-showMore--less\", dictionary: dictionary })))\n : null;\n};\nexports[\"default\"] = ShowMoreComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n \\n \\n {{{values.name}}}\\n \\n \\n {{n}}\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.getEnd = exports.getStart = exports.totalPagesToArray = exports.getTotalPages = void 0;\n/**\n * Get total pages from the total reached hits\n * divided by the hits per page configured\n *\n * If there are more than 10.000 items\n * We reduce the max num of items to 9.999\n * to take care of performance\n *\n * If total resulted pages are bigger than 999\n * we set 999 as the max number of pages\n *\n * @param totalHits\n * @param hitsPerPage\n *\n * @return {number}\n */\nfunction getTotalPages(totalHits, hitsPerPage) {\n totalHits = (totalHits >= 10000)\n ? 9999\n : totalHits;\n var totalPages = Math.ceil(totalHits / hitsPerPage);\n return (totalPages > 999)\n ? 999\n : totalPages;\n}\nexports.getTotalPages = getTotalPages;\n/**\n * Pass total pages number into an array of numbers\n *\n * @param totalPages\n *\n * @return {number[]}\n */\nfunction totalPagesToArray(totalPages) {\n var pages = [];\n for (var index = 1; index <= totalPages; index++) {\n pages.push(index);\n }\n return pages;\n}\nexports.totalPagesToArray = totalPagesToArray;\n/**\n * Get the starting point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getStart(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return currentPage - (currentPage % spectreSize);\n }\n if (isTouchingRight) {\n var start = currentPage - (spectreSize - (totalPages % currentPage));\n return (start > 0) ? start : 0;\n }\n return currentPage - (padding + 1);\n}\nexports.getStart = getStart;\n/**\n * Get the ending point of the pages spectre\n *\n * @param totalPages\n * @param padding\n * @param currentPage\n * @param spectreSize\n * @param isTouchingLeft\n * @param isTouchingRight\n *\n * @return {number}\n */\nfunction getEnd(totalPages, padding, currentPage, spectreSize, isTouchingLeft, isTouchingRight) {\n if (isTouchingLeft) {\n return spectreSize;\n }\n if (isTouchingRight) {\n return totalPages;\n }\n return currentPage + padding;\n}\nexports.getEnd = getEnd;\n","\"use strict\";\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\n/**\n * Arrow navigation component\n */\nfunction NavigationComponent(_a) {\n var isVisible = _a.isVisible, classNames = _a.classNames, template = _a.template, handleClick = _a.handleClick;\n return (isVisible)\n ? ((0, preact_1.h)(\"li\", { className: classNames, onClick: handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: template, dictionary: this.props.dictionary })))\n : null;\n}\nexports[\"default\"] = NavigationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.paginationChangeAction = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedPage\n */\nfunction paginationChangeAction(environmentId, currentQuery, repository, selectedPage) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = selectedPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.paginationChangeAction = paginationChangeAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar Helpers_1 = require(\"./Helpers\");\nvar NavigationComponent_1 = require(\"./NavigationComponent\");\nvar PaginationActions_1 = require(\"./PaginationActions\");\n/**\n * Pagination Component\n */\nvar PaginationComponent = /** @class */ (function (_super) {\n __extends(PaginationComponent, _super);\n /**\n * Constructor\n */\n function PaginationComponent() {\n var _this = _super.call(this) || this;\n /**\n * Handle click\n *\n * @param page\n */\n _this.handleClick = function (page) {\n var _a = _this.props, store = _a.store, environmentId = _a.environmentId, repository = _a.repository;\n var currentResult = store.getCurrentResult();\n var currentQuery = store.getCurrentQuery();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuery.getSize());\n /**\n * Do not let go further\n */\n if (page <= 0)\n page = 1;\n if (page >= totalPages)\n page = totalPages;\n if (currentQuery.getPage() === page) {\n return;\n }\n /**\n * Dispatch change page action\n */\n (0, PaginationActions_1.paginationChangeAction)(environmentId, currentQuery, repository, page);\n };\n _this.state = {\n page: 1\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n PaginationComponent.prototype.componentWillReceiveProps = function (props) {\n var page = props.store.getCurrentQuery().getPage();\n this.setState(function (prevState) {\n return {\n page: page\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PaginationComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var currentResult = props.store.getCurrentResult();\n if (props.store.getCurrentResult() == null) {\n return;\n }\n var currentQuerySize = props.store.getCurrentQuery().getSize();\n var totalPages = (0, Helpers_1.getTotalPages)(currentResult.getTotalHits(), currentQuerySize);\n /**\n * Hide container if hits are empty\n */\n if (currentResult.getTotalHits() === 0 ||\n totalPages === 1) {\n return null;\n }\n var padding = props.padding;\n var goFirstLast = props.goFirstLast;\n var containerClassName = props.classNames.container;\n var itemClassName = props.classNames.item;\n var activeClassName = props.classNames.active;\n var disabledClassName = props.classNames.disabled;\n var nextClassName = props.classNames.next;\n var previousClassName = props.classNames.previous;\n var lastClassName = props.classNames.last;\n var firstClassName = props.classNames.first;\n var itemTemplate = props.template.item;\n var nextTemplate = props.template.next;\n var previousTemplate = props.template.previous;\n var firstTemplate = props.template.first;\n var lastTemplate = props.template.last;\n var currentQueryPage = props.store.getCurrentQuery().getPage();\n /**\n * Get Total pages\n */\n var pages = (0, Helpers_1.totalPagesToArray)(totalPages);\n /**\n * Get pages spectre\n */\n var spectreSize = (padding * 2) + 1;\n var isTouchingLeft = currentQueryPage <= (padding + 1);\n var isTouchingRight = (currentQueryPage + padding) >= totalPages;\n var spectre = pages.slice((0, Helpers_1.getStart)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight), (0, Helpers_1.getEnd)(totalPages, padding, currentQueryPage, spectreSize, isTouchingLeft, isTouchingRight));\n /**\n * Dynamic disabled classes\n */\n var previousDisabledClass = (currentQueryPage === 1) ? disabledClassName : '';\n var nextDisabledClass = (currentQueryPage === totalPages) ? disabledClassName : '';\n return ((0, preact_1.h)(\"ul\", { className: \"as-pagination \".concat(containerClassName) },\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--first \".concat(firstClassName, \" \").concat(previousDisabledClass), template: firstTemplate, handleClick: function () { return _this.handleClick(1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--previous \".concat(previousClassName, \" \").concat(previousDisabledClass), template: previousTemplate, handleClick: function () { return _this.handleClick(currentQueryPage - 1); } }),\n spectre.map(function (page) { return ((0, preact_1.h)(\"li\", { className: \"as-pagination__item as-pagination__item--link \".concat(itemClassName, \" \").concat((currentQueryPage === page) ? activeClassName : ''), onClick: function () { return _this.handleClick(page); } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: { page: page.toLocaleString('de-DE') }, dictionary: _this.props.dictionary }))); }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: true, classNames: \"as-pagination__item as-pagination__item--next \".concat(nextClassName, \" \").concat(nextDisabledClass), template: nextTemplate, handleClick: function () { return _this.handleClick(currentQueryPage + 1); } }),\n (0, preact_1.h)(NavigationComponent_1[\"default\"], { isVisible: goFirstLast, classNames: \"as-pagination__item as-pagination__item--last \".concat(lastClassName, \" \").concat(nextDisabledClass), template: lastTemplate, handleClick: function () { return _this.handleClick(totalPages); } })));\n };\n return PaginationComponent;\n}(preact_1.Component));\nPaginationComponent.defaultProps = {\n padding: 3,\n goFirstLast: false,\n classNames: {\n container: '',\n item: '',\n active: 'as-pagination__item--active',\n disabled: 'as-pagination__item--disabled',\n next: '',\n first: '',\n previous: '',\n last: ''\n },\n template: {\n item: '{{page}}',\n next: '>',\n previous: '<',\n first: '<<',\n last: '>>'\n }\n};\nexports[\"default\"] = PaginationComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.priorityFilterAction = exports.setupPriorityFilters = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nfunction setupPriorityFilters(environmentId, currentQuery, filters) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.setMetadataValue(\"pf\", filters);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.setupPriorityFilters = setupPriorityFilters;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param filterValue\n * @param applicationType\n */\nfunction priorityFilterAction(environmentId, currentQuery, repository, filterName, filterField, filterValue, applicationType) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filterBy(filterName, filterField, [filterValue], applicationType, false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n clonedQuery.setMetadataValue(\"af\", [filterField, filterValue]);\n repository\n .query(clonedQuery)\n .then(function (result) {\n delete clonedQuery.metadata.af;\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.priorityFilterAction = priorityFilterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar PriorityFilterActions_1 = require(\"./PriorityFilterActions\");\n/**\n * PriorityFilterComponent\n */\nvar PriorityFilterComponent = /** @class */ (function (_super) {\n __extends(PriorityFilterComponent, _super);\n /**\n * Constructor\n */\n function PriorityFilterComponent() {\n var _this = _super.call(this) || this;\n _this.handleClick = function (filterValue) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var repository = props.repository;\n var currentQuery = props.store.getCurrentQuery();\n var priorityFilter = _this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n var priorityFilterName = priorityFilter.name;\n var priorityFilterObject = props.store.getCurrentQuery().getAggregation(priorityFilterName);\n (0, PriorityFilterActions_1.priorityFilterAction)(environmentId, currentQuery, repository, priorityFilterName, priorityFilterObject.getField().replace(\"indexed_metadata.\", \"\"), filterValue, priorityFilterObject.getApplicationType());\n };\n _this.state = {\n filterName: \"\"\n };\n return _this;\n }\n /**\n * Components will mount\n */\n PriorityFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, PriorityFilterActions_1.setupPriorityFilters)(props.environmentId, props.store.getCurrentQuery(), props.filters);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n PriorityFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (_) {\n return {\n filterName: props.store.getCurrentResult().getMetadataValue(\"priority_filter\")\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n PriorityFilterComponent.prototype.render = function () {\n var _this = this;\n var priorityFilter = this.props.store.getCurrentResult().getMetadataValue(\"priority_filter\");\n if (!priorityFilter) {\n return null;\n }\n var priorityFilterName = priorityFilter.name;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-priorityFilter\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.top, className: \"as-priorityFilter__top\", dictionary: this.props.dictionary, data: {\n name: priorityFilterName\n } }),\n (0, preact_1.h)(\"div\", { className: \"as-priorityFilter__itemsList\" },\n (0, preact_1.h)(\"ul\", null, Object.keys(priorityFilter.values).map(function (key) {\n var data = priorityFilter.values[key];\n return ((0, preact_1.h)(\"li\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(key);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: _this.props.template.item, data: __assign(__assign({}, data), { value: key }), dictionary: _this.props.dictionary })));\n })))));\n };\n return PriorityFilterComponent;\n}(preact_1.Component));\nPriorityFilterComponent.defaultProps = {\n aggregationField: null,\n template: {\n item: defaultTemplates_1.defaultPriorityFilterItemTemplate,\n top: defaultTemplates_1.defaultPriorityFilterTopTemplate\n }\n};\nexports[\"default\"] = PriorityFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultPriorityFilterItemTemplate = exports.defaultPriorityFilterTopTemplate = void 0;\nexports.defaultPriorityFilterTopTemplate = \"\\n {{name}}\\n\";\nexports.defaultPriorityFilterItemTemplate = \"\\n
{{value}}
\\n \\n\";\n","\"use strict\";\nexports.__esModule = true;\nexports.filterAction = exports.aggregationSetup = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param filterName\n * @param filterField\n * @param min\n * @param max\n */\nfunction aggregationSetup(environmentId, currentQuery, filterName, filterField, min, max) {\n var withMinMax = min === null || max === null;\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var filterType = withMinMax ? 'range_min_max' : 'range';\n var filterValues = withMinMax ? ['..'] : [min + '..' + max];\n clonedQuery.aggregateByRange(filterName, filterField, filterValues, apisearch_1.FILTER_AT_LEAST_ONE, filterType);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.aggregationSetup = aggregationSetup;\n/**\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param filterName\n * @param filterField\n * @param from\n * @param to\n * @param deleteMinMaxAggregation\n */\nfunction filterAction(environmentId, currentQuery, repository, filterName, filterField, from, to) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var realValueFrom = Math.min(from, to);\n var realValueTo = Math.max(from, to);\n var toWithIncluded = realValueTo + ']';\n clonedQuery.filterByRange(filterName, filterField, [], [realValueFrom + \"..\" + toWithIncluded], apisearch_1.FILTER_AT_LEAST_ONE, 'range_min_max', false);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.filterAction = filterAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Template_1 = require(\"../Template\");\nvar RangeFilterActions_1 = require(\"./RangeFilterActions\");\n/**\n * Range Filter Component\n */\nvar RangeFilterComponent = /** @class */ (function (_super) {\n __extends(RangeFilterComponent, _super);\n function RangeFilterComponent() {\n var _this = _super.call(this) || this;\n _this.uid = Math.random().toString(16).substr(2, 12);\n _this.observerFrom = _this.configureFromObserver();\n _this.observerTo = _this.configureToObserver();\n _this.rangeUid = 'range-' + _this.uid;\n _this.setState(function (prevState) {\n return {\n from: null,\n to: null,\n min: null,\n max: null,\n visible: true\n };\n });\n return _this;\n }\n /**\n * Components will mount\n */\n RangeFilterComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var filterName = props.filterName;\n var filterField = props.filterField;\n var currentQuery = props.store.getCurrentQuery();\n (0, RangeFilterActions_1.aggregationSetup)(environmentId, currentQuery, filterName, filterField, props.minValue, props.maxValue);\n };\n RangeFilterComponent.prototype.configureFromObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_1 = mutationsList; _i < mutationsList_1.length; _i++) {\n var mutation = mutationsList_1[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.from) {\n return;\n }\n that.handleSliderChange([value, that.state.to]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.configureToObserver = function () {\n var that = this;\n return new MutationObserver(function (mutationsList, observer) {\n // Use traditional 'for loops' for IE 11\n for (var _i = 0, mutationsList_2 = mutationsList; _i < mutationsList_2.length; _i++) {\n var mutation = mutationsList_2[_i];\n if (mutation.attributeName === 'value') {\n var value = parseInt(mutation.target[\"defaultValue\"]);\n if (value == that.state.to) {\n return;\n }\n that.handleSliderChange([that.state.from, value]);\n }\n }\n });\n };\n RangeFilterComponent.prototype.componentDidMount = function () {\n this.observerFrom.observe(document.getElementsByClassName('as-rangeFilter__from__' + this.uid)[0], { attributes: true });\n this.observerTo.observe(document.getElementsByClassName('as-rangeFilter__to__' + this.uid)[0], { attributes: true });\n };\n RangeFilterComponent.prototype.componentWillUnmount = function () {\n this.observerFrom.disconnect();\n this.observerTo.disconnect();\n };\n /**\n * Handle change\n *\n * @param e\n */\n RangeFilterComponent.prototype.handleChange = function (e) {\n var uid = this.uid;\n this.applyFilter(e.target.parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, e.target.parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n };\n ;\n RangeFilterComponent.prototype.handleSliderChange = function (values) {\n if (values[0] === this.state.from &&\n values[1] === this.state.to) {\n return false;\n }\n this.applyFilter(values[0], values[1]);\n };\n ;\n /**\n * @param values\n */\n RangeFilterComponent.prototype.handleSliderMove = function (values) {\n this.updateRangeLayer(this.props, this.state, values[0], values[1]);\n };\n ;\n /**\n * Component will receive props\n *\n * @param props\n */\n RangeFilterComponent.prototype.componentWillReceiveProps = function (props) {\n var currentResult = props\n .store\n .getCurrentResult();\n var aggregation = currentResult.getAggregation(props.filterName);\n if (!(aggregation instanceof apisearch_1.ResultAggregation)) {\n this.setState(function (prevState) {\n return {\n from: prevState.from,\n to: prevState.to,\n min: prevState.min,\n max: prevState.max,\n currency_placeholder: prevState.currency_placeholder,\n visible: false\n };\n });\n return;\n }\n var metadata = aggregation.getMetadata();\n var filter = props\n .store\n .getCurrentQuery()\n .getFilter(props.filterName);\n var min = typeof props.minValue === \"number\" && props.minValue > 0\n ? props.minValue\n : (typeof metadata['min'] === \"number\"\n ? Math.floor(metadata['min'])\n : undefined);\n var max = typeof props.maxValue === \"number\" && props.maxValue > 0\n ? props.maxValue\n : (typeof metadata['max'] === \"number\"\n ? Math.ceil(metadata['max'])\n : undefined);\n var currencyPlaceholder = null;\n var firstItem = currentResult.getFirstItem();\n if (firstItem) {\n var firstItemPrice = firstItem.get('price');\n var firstItemPriceWithCurrency = firstItem.get('price_with_currency');\n if (firstItemPrice && firstItemPriceWithCurrency) {\n currencyPlaceholder = this.getCurrencyPlaceholderFromPriceAndPriceWithCurrency(firstItemPrice, firstItemPriceWithCurrency);\n }\n }\n var fromTo = this.getFromToFromFilter(filter, min, max);\n this.setState(function (prevState) {\n return {\n from: fromTo[0],\n to: fromTo[1],\n min: min,\n max: max,\n currency_placeholder: currencyPlaceholder,\n visible: ((typeof min === \"number\") && (typeof max === \"number\"))\n };\n });\n };\n /**\n * @param filter\n * @param min\n * @param max\n */\n RangeFilterComponent.prototype.getFromToFromFilter = function (filter, min, max) {\n var realMin = Math.min(min, max);\n var realMax = Math.max(min, max);\n if (filter instanceof apisearch_1.Filter) {\n var filterValue = filter.getValues()[0];\n if (typeof filterValue === \"string\") {\n var parts = filterValue.split('..');\n var from = parts[0];\n var to = parts[1].slice(0, -1);\n return [\n Math.max(realMin, parseInt(from)),\n Math.min(realMax, parseInt(to)),\n ];\n }\n }\n return [realMin, realMax];\n };\n /**\n * @param previousProps\n * @param previousState\n */\n RangeFilterComponent.prototype.componentDidUpdate = function (previousProps, previousState) {\n this.updateRangeLayer(previousProps, previousState, previousState.from, previousState.to);\n };\n /**\n * @param props\n * @param state\n * @param from\n * @param to\n */\n RangeFilterComponent.prototype.updateRangeLayer = function (props, state, from, to) {\n var min = state.min;\n var max = state.max;\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof props.callback === \"function\") {\n props.callback(Math.min(from, to), Math.max(from, to), min, max, this.rangeUid, state.currency_placeholder);\n }\n };\n /**\n * @param props\n * @param state\n */\n RangeFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var filterName = props.filterName;\n var ref = (0, compat_1.useRef)(null);\n var topTemplate = props.template.top;\n var sliderTemplate = props.template.slider;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var wrapperClassName = props.classNames.wrapper;\n var that = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n if (!ref.current) {\n return;\n }\n var uid = _this.uid;\n /**\n * Alert if clicked on outside of element\n */\n function handleChange(event) {\n var target = event.target;\n var parentNode = target.parentNode;\n self.applyFilter(parentNode.getElementsByClassName('as-rangeFilter__from__' + uid)[0].value, parentNode.getElementsByClassName('as-rangeFilter__to__' + uid)[0].value);\n }\n // Bind the event listener\n ref.current.addEventListener(\"change\", handleChange);\n return function () {\n // Unbind the event listener on clean up\n ref.current.removeEventListener(\"change\", handleChange);\n };\n }, [ref]);\n var isNative = props.native;\n var isNotNative = !isNative;\n var type = isNative ? 'range' : 'number';\n var eventName = 'onClick';\n var from = state.from;\n var to = state.to;\n var min = state.min;\n var max = state.max;\n var isVisible = state.visible && !(props.store.currentResult.getTotalHits() === 0 &&\n from === min &&\n to === max);\n var visibleStyle = isVisible ? '' : 'display:none!important;';\n return ((0, preact_1.h)(\"div\", { id: this.rangeUid, className: \"as-rangeFilter \".concat(containerClassName), style: visibleStyle },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-rangeFilter__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-rangeFilter__wrapper \".concat(wrapperClassName) },\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__from \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__from__\").concat(this.uid) }, props.attributes.from, { value: from, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([parseInt(e.target.value), to]);\n }, onChange: function (e) {\n var positions = [parseInt(e.target.value), to];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"input\", __assign({ type: type, \"class\": \"as-rangeFilter__to \".concat(props.classNames.input, \" as-rangeFilter__\").concat(this.uid, \" as-rangeFilter__to__\").concat(this.uid) }, props.attributes.to, { value: to, min: min, max: max, step: props.step, onClick: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onTouchEnd: function (e) {\n if (isNotNative)\n return false;\n that.handleSliderChange([from, parseInt(e.target.value)]);\n }, onChange: function (e) {\n var positions = [from, parseInt(e.target.value)];\n if (isNative) {\n that.handleSliderMove(positions);\n return false;\n }\n that.handleSliderChange(positions);\n }, autocomplete: \"off\" })),\n (0, preact_1.h)(\"div\", { \"class\": \"slider\" },\n (0, preact_1.h)(Template_1[\"default\"], { template: sliderTemplate, dictionary: this.props.dictionary })))));\n };\n /**\n * Apply filter\n */\n RangeFilterComponent.prototype.applyFilter = function (valueFrom, valueTo) {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, RangeFilterActions_1.filterAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, props.filterName, props.filterField, valueFrom, valueTo);\n };\n /**\n * @param price\n * @param priceWithCurrency\n * @private\n */\n RangeFilterComponent.prototype.getCurrencyPlaceholderFromPriceAndPriceWithCurrency = function (price, priceWithCurrency) {\n price = (price + '').replace('.', '').replace(',', '');\n priceWithCurrency = (priceWithCurrency + '').replace('.', '').replace(',', '');\n var regex = new RegExp(price + '0*');\n var currencyPlaceholder = priceWithCurrency.replace(regex, \"__price__\");\n return currencyPlaceholder;\n };\n return RangeFilterComponent;\n}(preact_1.Component));\nRangeFilterComponent.defaultProps = {\n maxValueIncluded: true,\n step: 1,\n minValue: null,\n maxValue: null,\n native: false,\n classNames: {\n container: '',\n top: '',\n wrapper: '',\n input: '',\n from: '',\n to: ''\n },\n attributes: {\n from: '',\n to: ''\n },\n template: {\n top: '',\n slider: ''\n }\n};\nexports[\"default\"] = RangeFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.reloadAction = void 0;\n/**\n * Clear filters actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Clear filters action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n */\nfunction reloadAction(environmentId, currentQuery, repository) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n if (repository instanceof apisearch_1.HttpRepository) {\n var httpClient = repository.getHttpClient();\n if (httpClient instanceof apisearch_1.CacheClient) {\n httpClient.flushCache();\n }\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.reloadAction = reloadAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Template_1 = require(\"../Template\");\nvar ReloadActions_1 = require(\"./ReloadActions\");\n/**\n * ReloadComponent\n */\nvar ReloadComponent = /** @class */ (function (_super) {\n __extends(ReloadComponent, _super);\n function ReloadComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle click\n */\n _this.handleClick = function () {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n /**\n * Dispatch a clear filter action\n */\n (0, ReloadActions_1.reloadAction)(environmentId, currentQuery, repository);\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {}\n */\n ReloadComponent.prototype.render = function () {\n var props = this.props;\n var containerClassName = props.classNames.container;\n var containerTemplate = props.template.container;\n return ((0, preact_1.h)(\"div\", { className: \"as-clearFilters \".concat(containerClassName), onClick: this.handleClick },\n (0, preact_1.h)(Template_1[\"default\"], { template: containerTemplate, dictionary: this.props.dictionary })));\n };\n return ReloadComponent;\n}(preact_1.Component));\nReloadComponent.defaultProps = {\n classNames: {\n container: \"\"\n },\n template: {\n container: \"Reload\"\n }\n};\nexports[\"default\"] = ReloadComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Template_1 = require(\"../Template\");\n/**\n * Item\n */\nvar Item = /** @class */ (function (_super) {\n __extends(Item, _super);\n function Item() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param nextProps\n * @param nextState\n */\n Item.prototype.shouldComponentUpdate = function (nextProps, nextState) {\n var shouldUpdate = this.props.data.uuid_composed !== nextProps.data.uuid_composed ||\n this.props.data.metadata.image !== nextProps.data.metadata.image ||\n this.props.data.query !== nextProps.data.query;\n if (!shouldUpdate) {\n this.highlight();\n }\n return shouldUpdate;\n };\n Item.prototype.componentDidMount = function () {\n this.highlight();\n };\n Item.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n Item.prototype.highlight = function () {\n var queryText = this.props.data.query_text;\n if (this.props.data.highlights_enabled && queryText !== \"\") {\n var element = document.getElementById(\"as-result-\" + this.props.data.uuid_composed);\n (0, Highlight_1.highlightElement)(element, queryText);\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n Item.prototype.render = function () {\n var _a;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var dictionary = (_a = props.dictionary) !== null && _a !== void 0 ? _a : {};\n var id = \"as-result-\" + data.uuid_composed;\n var isBestMatch = data.metadata.best_match ? \"best-match\" : \"\";\n var isExactMatch = data.metadata.exact_match ? \"exact-match\" : \"\";\n return (0, preact_1.h)(Template_1[\"default\"], { template: template, data: data, id: id, className: \"\".concat(props.className, \" \").concat(isBestMatch, \" \").concat(isExactMatch), dictionary: dictionary });\n };\n return Item;\n}(preact_1.Component));\nexports[\"default\"] = Item;\n","\"use strict\";\nexports.__esModule = true;\nexports.infiniteScrollNextPageAction = exports.configureQuery = void 0;\n/**\n * Search actions\n */\nvar apisearch_1 = require(\"apisearch\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n *\n * Configure query\n *\n * @param environmentId\n * @param currentQuery\n * @param itemsPerPage\n * @param highlightsEnabled\n * @param promotedUUIDs\n * @param excludedUUIDs\n * @param fields\n * @param filter\n * @param minScore\n */\nfunction configureQuery(environmentId, currentQuery, itemsPerPage, highlightsEnabled, promotedUUIDs, excludedUUIDs, fields, filter, minScore) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n filter(clonedQuery);\n /**\n * Set result size\n */\n clonedQuery.size = itemsPerPage;\n /**\n * Set specific fields\n */\n clonedQuery.setFields(fields);\n /**\n * Promoted uuids\n */\n for (var i in promotedUUIDs) {\n if (promotedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.promoteUUID(promotedUUIDs[i]);\n }\n }\n /**\n * excluded uuids\n */\n for (var i in excludedUUIDs) {\n if (excludedUUIDs[i] instanceof apisearch_1.ItemUUID) {\n clonedQuery.excludeUUID(excludedUUIDs[i]);\n }\n }\n if (minScore > 0) {\n clonedQuery.minScore = minScore;\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.configureQuery = configureQuery;\n/**\n * Pagination change\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param nextPage\n */\nfunction infiniteScrollNextPageAction(environmentId, currentQuery, repository, nextPage) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = nextPage;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.infiniteScrollNextPageAction = infiniteScrollNextPageAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar ItemUUID_1 = require(\"apisearch/lib/Model/ItemUUID\");\nvar preact_1 = require(\"preact\");\nvar compat_1 = require(\"preact/compat\");\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Template_1 = require(\"../Template\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar Item_1 = require(\"./Item\");\nvar ResultActions_1 = require(\"./ResultActions\");\nvar Common_1 = require(\"../Common\");\n/**\n * Result Component\n */\nvar ResultComponent = /** @class */ (function (_super) {\n __extends(ResultComponent, _super);\n /**\n * Constructor\n */\n function ResultComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.fromLoadingNextPage = false;\n _this.observer = (0, compat_1.useRef)();\n _this.endResultsBoxRef = (0, compat_1.useCallback)(function (node) {\n if (_this.observer.current instanceof IntersectionObserver) {\n _this.observer.current.disconnect();\n }\n _this.observer.current = new IntersectionObserver(function (entries) {\n if (entries[0].isIntersecting) {\n _this.loadNextPage();\n }\n });\n if ((_this.observer.current instanceof IntersectionObserver) && node) {\n _this.observer.current.observe(node);\n }\n }, []);\n /**\n * @param word\n */\n _this.handleAlternativeClick = function (word) {\n var props = _this.props;\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n _this.state = {\n customResponse: \"\",\n focus: props.fadeInSelector === \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n return _this;\n }\n ResultComponent.prototype.loadNextPage = function () {\n var _a = this.props, environmentId = _a.environmentId, store = _a.store, repository = _a.repository;\n this.fromLoadingNextPage = true;\n this.currentExpectedPage = this.state.page + 1;\n (0, ResultActions_1.infiniteScrollNextPageAction)(environmentId, store.getCurrentQuery(), repository, this.currentExpectedPage);\n };\n /**\n * Hook that change state once mouse clicks inside or outside the container\n */\n ResultComponent.prototype.addMouseDownListeners = function (ref, fadeInSelector) {\n var _this = this;\n (0, compat_1.useEffect)(function () {\n var self = _this;\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event) {\n self.setState(function () {\n return {\n focus: event.target.closest(fadeInSelector) != null\n };\n });\n }\n // Bind the event listener\n document.addEventListener(\"mousedown\", handleClickOutside, { passive: true });\n return function () {\n // Unbind the event listener on clean up\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [ref]);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n ResultComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.store.getCurrentResult() == null) {\n this.setState(function (_) {\n return {\n customResponse: \"\",\n hasNewPage: false,\n items: [],\n page: 0\n };\n });\n return;\n }\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var items = currentResult.getItems();\n var currentPage = this.page();\n var hasNewPage = (currentResult.getTotalHits() > (currentPage * currentQuery.getSize()));\n var currentItems = this.fromLoadingNextPage\n ? this.state.items.concat(items)\n : items;\n this.fromLoadingNextPage = false;\n this.currentExpectedPage = undefined;\n this.setState(function (_) {\n return {\n customResponse: currentResult.getMetadataValue(\"custom_response\"),\n hasNewPage: hasNewPage,\n items: currentItems,\n page: currentPage\n };\n });\n };\n /**\n * Component will mount\n */\n ResultComponent.prototype.componentWillMount = function () {\n var props = this.props;\n /**\n * Dispatch action\n */\n (0, ResultActions_1.configureQuery)(props.environmentId, props.store.getCurrentQuery(), props.itemsPerPage, props.highlightsEnabled, props.promote.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.exclude.map(function (itemUUID) {\n return itemUUID instanceof ItemUUID_1.ItemUUID\n ? itemUUID\n : ItemUUID_1.ItemUUID.createFromArray(itemUUID);\n }), props.fields, props.filter, props.minScore);\n };\n /**\n * @private\n */\n ResultComponent.prototype.page = function () {\n var _a;\n return (_a = this.currentExpectedPage) !== null && _a !== void 0 ? _a : this.props.store.getCurrentQuery().getPage();\n };\n /**\n * Render\n *\n * @return {any}\n */\n ResultComponent.prototype.render = function () {\n var _this = this;\n var _a;\n var that = this;\n var props = this.props;\n var dirty = props.store.isDirty();\n var containerClassName = props.classNames.container;\n var itemsListClassName = props.classNames.itemsList;\n var placeholderClassName = props.classNames.placeholder;\n var itemsListTemplate = props.template.itemsList;\n var placeholderTemplate = (_a = props.template.placeholder) !== null && _a !== void 0 ? _a : \"\";\n var currentResult = props.store.getCurrentResult();\n var currentQuery = props.store.getCurrentQuery();\n var currentVisibleResults = props.currentVisibleResults;\n var subResults = Object.values(currentResult.getSubresults());\n var wrapperRef = (0, compat_1.useRef)(null);\n var customResponse = currentResult.getMetadataValue(\"custom_response\");\n var redirection = currentResult.getMetadataValue(\"redirection\");\n // Check for custom response html\n var customResponseBody;\n if (customResponse) {\n customResponseBody = ((0, preact_1.h)(Template_1[\"default\"], { template: customResponse.content, className: \"as-result__custom_response\", dictionary: this.props.dictionary }));\n if (customResponse.only) {\n return customResponseBody;\n }\n }\n var resetRedirectionOnEnter = true;\n if (redirection) {\n if (redirection.type === \"automatic\") {\n window.top.location.href = redirection.url;\n }\n else if (redirection.type === \"on_enter\") {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: redirection.url\n }, \"*\");\n resetRedirectionOnEnter = false;\n }\n if (this.props.template.redirection) {\n customResponseBody = (0, preact_1.h)(\"div\", null,\n (0, preact_1.h)(Template_1[\"default\"], { template: this.props.template.redirection, data: {\n url: redirection.url,\n query: currentQuery.getQueryText()\n }, className: \"as-result__redirection\", dictionary: this.props.dictionary }),\n customResponseBody);\n }\n }\n if (resetRedirectionOnEnter) {\n window.postMessage({\n name: \"apisearch_bind_enter_redirection\",\n url: undefined\n }, \"*\");\n }\n var hasInfiniteScrollNextPage = (props.infiniteScroll !== false) &&\n ((props.infiniteScroll === true) ||\n (props.infiniteScroll >= 0)) &&\n this.state.hasNewPage;\n var infiniteScrollMargin = hasInfiniteScrollNextPage\n ? (props.infiniteScroll === true\n ? 0\n : props.infiniteScroll)\n : undefined;\n if (props.fadeInSelector !== \"\") {\n this.addMouseDownListeners(wrapperRef, props.fadeInSelector);\n }\n if (!currentVisibleResults || !this.state.focus) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName) }));\n }\n /**\n * Data accessible to the template\n */\n var items = this.state.items;\n var reducedTemplateData = {\n query: currentQuery.getQueryText(),\n suggestions: currentResult.getSuggestions()\n };\n /**\n * We should add positions to items\n * When the number of items to render is higher than the page size, we are in front of infinite scroll\n */\n var page = this.state.page;\n var isInfiniteActive = page > 1;\n var firstItem = ((this.state.page - 1) * currentQuery.getSize());\n var itemsForEvent = items;\n if (isInfiniteActive) {\n itemsForEvent = Array.prototype.slice.call(items, firstItem);\n }\n Array.prototype.forEach.call(itemsForEvent, function (item) {\n item.position = ++firstItem;\n item.id = item.getId();\n });\n window.postMessage({\n name: \"apisearch_result_items\",\n query: currentQuery.toArray(),\n query_text: currentQuery.getQueryText(),\n with_results: items.length > 0,\n page: this.state.page,\n site: props.store.getSite(),\n device: props.store.getDevice(),\n items: itemsForEvent.map(function (item) {\n return {\n fields: item.fields,\n uuid: item.uuid\n };\n })\n }, \"*\");\n /**\n * Uses defined a custom items list. Old version\n */\n if (props.template.itemsList !== defaultTemplates_1.defaultItemsListTemplate) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef, style: \"position: relative\" },\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : (0, preact_1.h)(Template_1[\"default\"], { template: itemsListTemplate, data: __assign(__assign({}, reducedTemplateData), { items: (items)\n ? items.map(function (item, position) { return _this.hydrateItem(item, position); })\n : [] }), className: \"as-result__itemsList \".concat(itemsListClassName), dictionary: this.props.dictionary }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? (0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } }))\n : (0, preact_1.h)(\"div\", { ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative;\") }))\n : \"\"));\n }\n if (dirty) {\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: props.dictionary })));\n }\n /**\n * New version\n */\n return ((0, preact_1.h)(\"div\", { className: \"as-result \".concat(containerClassName), ref: wrapperRef },\n customResponseBody,\n (dirty)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: placeholderTemplate, className: \"as-result__placeholder \".concat(placeholderClassName), dictionary: this.props.dictionary })\n : ((items.length > 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-result__itemsList \".concat(props.classNames.itemsList) },\n items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), { query: currentQuery.getQueryText() }), template: props.template.item, className: \"as-result__item \".concat(props.classNames.item), dictionary: props.dictionary });\n }),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? \"\"\n : ((0, preact_1.h)(\"div\", { id: \"as-result__infinite_scroll_inspector\", ref: this.endResultsBoxRef, style: \"bottom: \".concat(infiniteScrollMargin, \"px; position: relative; width: 100%;\") })))\n : \"\"))\n : \"\"),\n hasInfiniteScrollNextPage\n ? (props.infiniteScrollButton\n ? ((0, preact_1.h)(\"div\", { onClick: function (e) {\n that.loadNextPage();\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.next_page_button, data: {\n page: this.state.page + 1\n } })))\n : \"\")\n : \"\",\n (subResults.length > 0)\n ? (0, preact_1.h)(\"div\", { className: \"as-result__alternativeList\" }, subResults.map(function (subResult) {\n return (0, preact_1.h)(\"div\", { className: \"as-result__alternative\" },\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_query\" },\n (0, preact_1.h)(\"span\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_title, data: {\n word: subResult.metadata.query_text_html\n }, dictionary: props.dictionary })),\n (0, preact_1.h)(\"a\", { onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleAlternativeClick(subResult.metadata.query_text);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: props.template.alternative_all_results, data: {\n num: subResult.getTotalHits()\n }, dictionary: props.dictionary }))),\n (0, preact_1.h)(\"div\", { className: \"as-result__alternative_items\" }, subResult.items.map(function (item, position) {\n return (0, preact_1.h)(Item_1[\"default\"], { data: __assign(__assign({}, reducedTemplateData), _this.hydrateItem(item, position)), template: props.template.item, className: \"as-result__alternative_item \".concat(props.classNames.item), dictionary: _this.props.dictionary });\n })));\n }))\n : (((items.length === 0) && customResponseBody === undefined)\n ? (0, preact_1.h)(Template_1[\"default\"], { template: props.template.noResults, data: {\n query: currentQuery.getQueryText()\n }, className: \"as-result__noresults \".concat(props.classNames.noResults), dictionary: props.dictionary })\n : \"\")));\n };\n /**\n * @param item\n * @param position\n * @private\n */\n ResultComponent.prototype.hydrateItem = function (item, position) {\n var props = this.props;\n var environmentId = props.environmentId;\n var config = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_CONFIG, \"__\").concat(environmentId));\n var apisearchUI = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_UI, \"__\").concat(environmentId));\n var apisearchReference = apisearchUI.reference;\n var appId = config.app_id;\n var appUUID = item.getAppUUID();\n if (typeof appUUID === \"object\") {\n appId = appUUID.composedUUID();\n }\n var indexId = config.index_id;\n var indexUUID = item.getIndexUUID();\n if (typeof indexUUID === \"object\") {\n indexId = indexUUID.composedUUID();\n }\n var itemId = item.getUUID().composedUUID();\n var mainFields = {};\n Object.assign(mainFields, item.getMetadata(), item.getIndexedMetadata());\n var fieldsConciliation = {};\n Object.keys(props.fieldsConciliation).map(function (field, index) {\n var _a;\n fieldsConciliation[field] = (_a = mainFields[props.fieldsConciliation[field]]) !== null && _a !== void 0 ? _a : undefined;\n });\n Object.assign(mainFields, fieldsConciliation);\n item.fields = mainFields;\n var queryText = \"\";\n if (this.props.store.getCurrentQuery()) {\n queryText = this.props.store.getCurrentQuery().getQueryText();\n }\n return __assign(__assign({}, props.formatData(item)), {\n key: \"item_\" + itemId,\n uuid_composed: itemId,\n click: apisearchReference + '.click(\"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n add_to_cart: apisearchReference + '.interact(\"add_cart\", \"' + appId + '\", \"' + indexId + '\", \"' + itemId + '\", ' + position + \");\",\n query_text: queryText,\n highlights_enabled: this.props.highlightsEnabled,\n striptags: function () {\n return function (val, render) { return render(val).replace(/(<([^>]+)>)/ig, \"\"); };\n }\n });\n };\n return ResultComponent;\n}(preact_1.Component));\nResultComponent.defaultProps = {\n fields: [],\n itemsPerPage: 10,\n highlightsEnabled: false,\n promote: [],\n exclude: [],\n filter: function (query) { return null; },\n subResult: false,\n classNames: {\n container: \"\",\n itemsList: \"\",\n item: \"\",\n noResults: \"\",\n placeholder: \"\"\n },\n template: {\n itemsList: defaultTemplates_1.defaultItemsListTemplate,\n item: defaultTemplates_1.defaultItemTemplate,\n noResults: defaultTemplates_1.defaultNoResultsItemTemplate,\n placeholder: null,\n alternative_title: defaultTemplates_1.defaultAlternativeTitleTemplate,\n alternative_all_results: defaultTemplates_1.defaultAlternativeAllResultsTemplate,\n next_page_button: defaultTemplates_1.defaultNextPageButtonTemplate,\n redirection: null\n },\n formatData: function (data) { return data; },\n fadeInSelector: \"\",\n fieldsConciliation: {}\n};\nexports[\"default\"] = ResultComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultNextPageButtonTemplate = exports.defaultAlternativeAllResultsTemplate = exports.defaultAlternativeTitleTemplate = exports.defaultNoResultsItemTemplate = exports.defaultItemTemplate = exports.defaultItemsListTemplate = void 0;\nexports.defaultItemsListTemplate = \"\\n
\\n {{#items}}\\n
\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n
\\n {{/items}}\\n
\\n {{^items}}No results{{/items}}\\n\";\nexports.defaultItemTemplate = \"\\n Score: {{score}}
\\n Uuid: {{uuid.type}} - {{uuid.id}}
\\n Title: {{{fields.title}}}
\\n Description: {{fields.description}}
\\n Link: {{metadata.link}}\\n\";\nexports.defaultNoResultsItemTemplate = \"\\n No results\\n\";\nexports.defaultAlternativeTitleTemplate = \"{{{word}}}\";\nexports.defaultAlternativeAllResultsTemplate = \"All results ({{num}})\";\nexports.defaultNextPageButtonTemplate = \"Load page {{page}}\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * Autocomplete Component\n */\nvar AutocompleteComponent = /** @class */ (function (_super) {\n __extends(AutocompleteComponent, _super);\n /**\n * Constructor\n */\n function AutocompleteComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.state = {\n autocomplete: \"\"\n };\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n AutocompleteComponent.prototype.componentWillReceiveProps = function (props) {\n if (props.autocomplete !== null) {\n this.setState(function (prevState) {\n return {\n autocomplete: props.autocomplete\n };\n });\n }\n else {\n this.setState(function (prevState) {\n return {\n autocomplete: \"\"\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n AutocompleteComponent.prototype.render = function () {\n var autocomplete = this.state.autocomplete;\n var queryText = this.props.queryText;\n var inputClassName = this.props.inputClassName;\n var queryTextLength = queryText.length;\n var autocompleteText = autocomplete.substring(queryTextLength);\n var formattedAutocompleteText = autocompleteText === \"\"\n ? \"\"\n : queryText + autocompleteText + \" ⤷\";\n return ((0, preact_1.h)(\"input\", { type: \"text\", className: \"as-searchInput__input as-searchInput__autocomplete \".concat(inputClassName), placeholder: formattedAutocompleteText, style: \"position: absolute; top: 0px; left: 0px; background-color: white;\" }));\n };\n return AutocompleteComponent;\n}(preact_1.Component));\nexports[\"default\"] = AutocompleteComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.simpleSearchAction = exports.initialSearchSetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * Initial Search\n *\n * @param environmentId\n * @param currentQuery\n * @param autocomplete\n * @param searchableFields\n * @param queryOperator\n */\nfunction initialSearchSetup(environmentId, currentQuery, autocomplete, searchableFields, queryOperator) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.page = 1;\n clonedQuery.queryOperator = queryOperator;\n if (searchableFields.length > 0) {\n clonedQuery.searchableFields = searchableFields;\n }\n if (autocomplete) {\n clonedQuery.enableAutocomplete();\n }\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSearchSetup = initialSearchSetup;\n/**\n * Search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param queryText\n * @param visibleResults\n */\nfunction simpleSearchAction(environmentId, currentQuery, repository, queryText, visibleResults) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n clonedQuery.filters._query.values = [queryText];\n clonedQuery.page = 1;\n if (!visibleResults) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: null,\n visibleResults: visibleResults\n });\n return;\n }\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result,\n visibleResults: visibleResults\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.simpleSearchAction = simpleSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"./SearchInputActions\");\nvar Template_1 = require(\"../Template\");\nvar AutocompleteComponent_1 = require(\"./AutocompleteComponent\");\nvar compat_1 = require(\"preact/compat\");\n/**\n * SearchInput Component\n */\nvar SearchInputComponent = /** @class */ (function (_super) {\n __extends(SearchInputComponent, _super);\n /**\n * Constructor\n */\n function SearchInputComponent(props) {\n var _this = _super.call(this, props) || this;\n _this.inputRef = (0, compat_1.useRef)(null);\n /**\n * @param search\n */\n _this.handleSearch = function (search) {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var finalSpace = search.charAt(search.length - 1) === \" \" ? \" \" : \"\";\n var targetValueNoSpaces = search.trim() + finalSpace;\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, targetValueNoSpaces === \" \" ? \"\" : targetValueNoSpaces, search.length >= startSearchOn);\n };\n /**\n * Clear search\n */\n _this.clearSearch = function () {\n var props = _this.props;\n var startSearchOn = props.startSearchOn;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var visibleResults = 0 === startSearchOn;\n (0, SearchInputActions_1.simpleSearchAction)(environmentId, currentQuery, repository, \"\", visibleResults);\n };\n if (props.autocomplete) {\n _this.state = { queryText: \"\" };\n }\n var that = _this;\n window.addEventListener(\"beforeunload\", function () {\n that.dispatchQueryStringEvent(props, 0);\n });\n return _this;\n }\n /**\n * Component will receive props\n *\n * @param props\n */\n SearchInputComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState({\n queryText: props.store.getCurrentQuery().getQueryText()\n });\n };\n /**\n * Key down\n */\n SearchInputComponent.prototype.handleKeyDown = function (e) {\n switch (e.key) {\n case \"ArrowRight\":\n case \"Tab\":\n case \"Enter\":\n this.replaceWithAutocomplete(e);\n return;\n }\n switch (e.keyCode) {\n case 39:\n case 9:\n case 13:\n this.replaceWithAutocomplete(e);\n return;\n }\n };\n SearchInputComponent.prototype.replaceWithAutocomplete = function (e) {\n var props = this.props;\n var autocomplete = this.props.store.getCurrentResult().getAutocomplete();\n if (autocomplete !== null && autocomplete !== \"\") {\n (0, SearchInputActions_1.simpleSearchAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, this.props.store.getCurrentResult().getAutocomplete(), true);\n e.preventDefault();\n return;\n }\n };\n /**\n * @param e\n */\n SearchInputComponent.prototype.doNothing = function (e) { };\n /**\n * @param config\n */\n SearchInputComponent.prototype.withConfig = function (config) {\n };\n /**\n * @param props\n * @param timeout\n */\n SearchInputComponent.prototype.dispatchQueryStringEvent = function (props, timeout) {\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n if (this.queryTextEvent) {\n this.lastQueryTextStringDispatched = null;\n clearTimeout(this.queryTextEvent);\n }\n if (this.lastQueryTextStringDispatched === currentQueryText) {\n return;\n }\n this.lastQueryTextStringDispatched = currentQueryText;\n if (currentQueryText !== \"\") {\n var that_1 = this;\n this.lastQueryTextStringDispatched = currentQueryText;\n this.queryTextEvent = setTimeout(function () {\n that_1.queryTextEvent = null;\n window.postMessage({\n name: \"apisearch_search\",\n query_text: currentQueryText,\n query: currentQuery.toArray(),\n site: props.store.getSite(),\n device: props.store.getDevice()\n }, \"*\");\n }, timeout);\n }\n };\n /**\n * Search\n *\n * @return {any}\n */\n SearchInputComponent.prototype.render = function () {\n var _this = this;\n var props = this.props;\n var placeholder = props.placeholder;\n var autofocus = props.autofocus;\n var clearSearch = props.clearSearch;\n var withContainer = props.withContainer;\n var containerClassName = props.classNames.container;\n var inputClassName = props.classNames.input;\n var clearSearchClassName = props.classNames.clearSearch;\n var clearSearchTemplate = props.template.clearSearch;\n var currentQuery = props.store.getCurrentQuery();\n var currentQueryText = currentQuery.getQueryText();\n var htmlNodeInheritProps = props.htmlNodeInheritProps;\n var showAutocomplete = currentQuery.areAutocompleteEnabled();\n var autocomplete = props.store.getCurrentResult()\n ? props.store.getCurrentResult().getAutocomplete()\n : null;\n var keyDownCallback = showAutocomplete\n ? function (e) { return _this.handleKeyDown(e); }\n : function (e) { return _this.doNothing(e); };\n var keyDownAction = showAutocomplete\n ? function (e) { return _this.replaceWithAutocomplete(e); }\n : function (e) { return _this.doNothing(e); };\n var style = showAutocomplete\n ? \"position: relative; top: 0px; left: 0px; background-color: transparent; border-color: transparent;\"\n : \"\";\n var autocompletableClass = showAutocomplete\n ? \"autocompletable\"\n : \"\";\n this.dispatchQueryStringEvent(props, 2000);\n var searchInput = ((0, preact_1.h)(\"input\", __assign({ type: \"text\", className: \"as-searchInput__input \".concat(inputClassName, \" \").concat(autocompletableClass), placeholder: placeholder, autofocus: autofocus }, htmlNodeInheritProps, { onInput: function (event) { return _this.handleSearch(event.target.value); }, value: currentQueryText, style: style, onKeyDown: keyDownCallback, onTouchStart: keyDownAction, ref: this.inputRef })));\n if (showAutocomplete) {\n searchInput = ((0, preact_1.h)(\"div\", { style: \"position: relative\" },\n (0, preact_1.h)(AutocompleteComponent_1[\"default\"], { autocomplete: autocomplete, queryText: currentQueryText, inputClassName: inputClassName }),\n searchInput));\n }\n if (withContainer) {\n searchInput = ((0, preact_1.h)(\"div\", { className: \"as-searchInput \".concat(containerClassName) },\n searchInput,\n (clearSearch && currentQueryText && currentQueryText.length !== 0)\n ? ((0, preact_1.h)(\"div\", { className: \"as-searchInput__clearSearch \".concat(clearSearchClassName), onClick: this.clearSearch },\n (0, preact_1.h)(Template_1[\"default\"], { template: clearSearchTemplate, dictionary: props.dictionary }))) : null));\n }\n return searchInput;\n };\n return SearchInputComponent;\n}(preact_1.Component));\nSearchInputComponent.defaultProps = {\n placeholder: \"\",\n autofocus: false,\n autocomplete: false,\n startSearchOn: 0,\n clearSearch: true,\n withContainer: true,\n searchableFields: [],\n speechRecognition: false,\n classNames: {\n container: \"\",\n input: \"\",\n clearSearch: \"\"\n },\n template: {\n clearSearch: \"x\",\n speechRecognition: \"{S}\"\n }\n};\nexports[\"default\"] = SearchInputComponent;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\n/**\n * SnapshotComponent\n */\nvar SnapshotComponent = /** @class */ (function (_super) {\n __extends(SnapshotComponent, _super);\n function SnapshotComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Component receive props\n *\n * @param props\n */\n SnapshotComponent.prototype.componentWillReceiveProps = function (props) {\n var query = props.store.getCurrentQuery();\n this.setState(function (prevState) {\n return { query: query };\n });\n };\n /**\n * Render\n *\n * @return {}\n */\n SnapshotComponent.prototype.render = function () {\n var queryAsJson = this.state.query == undefined\n ? ''\n : JSON.stringify(this.state.query.toArray());\n return ((0, preact_1.h)(\"div\", null, queryAsJson));\n };\n return SnapshotComponent;\n}(preact_1.Component));\nexports[\"default\"] = SnapshotComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.onChangeSearchAction = exports.initialSortBySetup = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\nvar SortByHelper_1 = require(\"./SortByHelper\");\n/**\n * Initial sortBy\n *\n * @param environmentId\n * @param currentQuery\n * @param initialOption\n */\nfunction initialSortBySetup(environmentId, currentQuery, initialOption) {\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, initialOption);\n clonedQuery.page = 1;\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.initialSortBySetup = initialSortBySetup;\n/**\n * ON change search action\n *\n * @param environmentId\n * @param currentQuery\n * @param repository\n * @param selectedOption\n */\nfunction onChangeSearchAction(environmentId, currentQuery, repository, selectedOption) {\n window.postMessage({\n name: \"apisearch_scroll_top\"\n }, \"*\");\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n (0, SortByHelper_1.applySortByToQuery)(clonedQuery, selectedOption);\n clonedQuery.page = 1;\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n repository\n .query(clonedQuery)\n .then(function (result) {\n dispatcher.dispatch(\"RENDER_FETCHED_DATA\", {\n query: clonedQuery,\n result: result\n });\n })[\"catch\"](function (error) {\n // Do nothing\n });\n}\nexports.onChangeSearchAction = onChangeSearchAction;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SortByActions_1 = require(\"./SortByActions\");\n/**\n * SortBy Filter Component\n */\nvar SortByComponent = /** @class */ (function (_super) {\n __extends(SortByComponent, _super);\n function SortByComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Handle change\n *\n * @param e\n */\n _this.handleChange = function (e) {\n var props = _this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n var repository = props.repository;\n var currentOption = e.target.value;\n _this.setState({\n value: currentOption\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.onChangeSearchAction)(environmentId, currentQuery, repository, currentOption);\n };\n return _this;\n }\n /**\n * Components will mount\n */\n SortByComponent.prototype.componentWillMount = function () {\n var props = this.props;\n var environmentId = props.environmentId;\n var options = props.options;\n var currentQuery = props.store.getCurrentQuery();\n var currentOption = options[0].value;\n this.setState({\n value: currentOption,\n visible: false\n });\n /**\n * Dispatch action\n */\n (0, SortByActions_1.initialSortBySetup)(environmentId, currentQuery, currentOption);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SortByComponent.prototype.componentWillReceiveProps = function (props) {\n var nextFirstSortAsString = props.store.getCurrentQuery().getSortBy().getFirstSortAsString();\n var nextVisible = (props.store.getCurrentResult() != null)\n ? (props.store.getCurrentResult().getTotalHits() > 0)\n : false;\n if (this.state.value !== nextFirstSortAsString ||\n this.state.visible !== nextVisible) {\n this.setState(function (prevState) {\n return {\n value: nextFirstSortAsString,\n visible: nextVisible\n };\n });\n }\n };\n /**\n * Render\n *\n * @return {any}\n */\n SortByComponent.prototype.render = function (props, state) {\n var containerClassName = props.classNames.container;\n var selectClassName = props.classNames.select;\n if (!state.visible) {\n return;\n }\n var options = props.options;\n var coordinate = props.store.getCurrentQuery().toArray().coordinate;\n if (!coordinate) {\n options = options.filter(function (o) {\n return o.value !== \"distance\";\n });\n }\n return ((0, preact_1.h)(\"div\", { className: \"as-sortBy \".concat(containerClassName) },\n (0, preact_1.h)(\"select\", { className: \"as-sortBy__selector \".concat(selectClassName), onChange: this.handleChange, value: state.value }, options.map(function (option) { return ((0, preact_1.h)(\"option\", { value: option.value }, option.name)); }))));\n };\n return SortByComponent;\n}(preact_1.Component));\nSortByComponent.defaultProps = {\n classNames: {\n container: \"\",\n select: \"\"\n }\n};\nexports[\"default\"] = SortByComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.applySortByToQuery = void 0;\n/**\n * SortBy actions\n */\nvar apisearch_1 = require(\"apisearch\");\n/**\n * Apply sort by to query\n *\n * @param query Query\n * @param selectedOption string\n */\nfunction applySortByToQuery(query, selectedOption) {\n var sortByData = splitQueryValue(selectedOption);\n var sortBy = apisearch_1[\"default\"].createEmptySortBy();\n if (sortByData.field === \"distance\") {\n sortBy.byValue({\n type: apisearch_1.SORT_BY_TYPE_DISTANCE,\n unit: sortByData.sort\n ? sortByData.sort\n : \"km\"\n });\n }\n else if (sortByData.field === \"score\") {\n sortBy.byValue(apisearch_1.SORT_BY_SCORE);\n }\n else {\n sortBy.byFieldValue(sortByData.field, sortByData.sort);\n }\n query.sortBy(sortBy);\n return query;\n}\nexports.applySortByToQuery = applySortByToQuery;\n/**\n * Split sort by string representation\n *\n * @param string\n *\n * @return {{field: string, sort: string}}\n */\nfunction splitQueryValue(string) {\n var queryValue = string.split(\":\");\n return {\n field: queryValue[0],\n sort: queryValue[1]\n };\n}\n","\"use strict\";\nexports.__esModule = true;\nexports.enableSuggestions = void 0;\nvar Constants_1 = require(\"../../Constants\");\nvar Container_1 = require(\"../../Container\");\nvar Clone_1 = require(\"../Clone\");\n/**\n * @param environmentId\n * @param currentQuery\n * @param numberOfSuggestions\n */\nfunction enableSuggestions(environmentId, currentQuery, numberOfSuggestions) {\n var clonedQuery = Clone_1[\"default\"].object(currentQuery);\n if (numberOfSuggestions > 0) {\n clonedQuery.setNumberOfSuggestions(numberOfSuggestions);\n }\n var dispatcher = Container_1[\"default\"].get(\"\".concat(Constants_1.APISEARCH_DISPATCHER, \"__\").concat(environmentId));\n dispatcher.dispatch(\"UPDATE_APISEARCH_SETUP\", {\n query: clonedQuery\n });\n}\nexports.enableSuggestions = enableSuggestions;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Highlight_1 = require(\"../../Highlight\");\nvar Common_1 = require(\"../Common\");\nvar defaultTemplates_1 = require(\"./defaultTemplates\");\nvar SuggestionsFilterActions_1 = require(\"./SuggestionsFilterActions\");\nvar Template_1 = require(\"../Template\");\n/**\n * Suggestion Filter Component\n */\nvar SuggestionsFilterComponent = /** @class */ (function (_super) {\n __extends(SuggestionsFilterComponent, _super);\n function SuggestionsFilterComponent() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * @param word\n */\n _this.handleClick = function (word) {\n var props = _this.props;\n if (typeof word === \"string\") {\n word = word\n .replace(//g, \"\")\n .replace(/<\\/em>/g, \"\");\n }\n /**\n * Dispatch action\n */\n (0, Common_1.onWordClickAction)(props.environmentId, props.store.getCurrentQuery(), props.repository, word);\n };\n return _this;\n }\n SuggestionsFilterComponent.prototype.componentDidMount = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.componentDidUpdate = function () {\n this.highlight();\n };\n SuggestionsFilterComponent.prototype.highlight = function () {\n var queryText = this.props.store.getCurrentQuery().getQueryText();\n if (queryText !== \"\") {\n var list = document.getElementsByClassName(\"as-suggestions\");\n for (var i = 0; i < list.length; i++) {\n (0, Highlight_1.highlightElement)(list[i], queryText);\n }\n }\n };\n /**\n * Component will mount\n */\n SuggestionsFilterComponent.prototype.componentWillMount = function () {\n this.setState(function (prevState) {\n return {\n words: []\n };\n });\n var props = this.props;\n var environmentId = props.environmentId;\n var currentQuery = props.store.getCurrentQuery();\n /**\n * Dispatch action\n */\n (0, SuggestionsFilterActions_1.enableSuggestions)(environmentId, currentQuery, props.numberOfSuggestions);\n };\n /**\n * Component will receive props\n *\n * @param props\n */\n SuggestionsFilterComponent.prototype.componentWillReceiveProps = function (props) {\n this.setState(function (prevState) {\n return {\n words: props\n .store\n .getCurrentResult()\n .getSuggestions()\n };\n });\n };\n /**\n * Render\n *\n * @return {any}\n */\n SuggestionsFilterComponent.prototype.render = function (props, state) {\n var _this = this;\n var containerClassName = props.classNames.container;\n var topClassName = props.classNames.top;\n var itemsListClassName = props.classNames.itemsList;\n var itemClassName = props.classNames.item;\n var noSuggestionsClassName = state.words.length > 0\n ? \"\"\n : \"suggestions-empty\";\n var topTemplate = props.template.top;\n var itemTemplate = props.template.item;\n var that = this;\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions \".concat(containerClassName, \" \").concat(noSuggestionsClassName) },\n (0, preact_1.h)(Template_1[\"default\"], { template: topTemplate, className: \"as-suggestions__top \".concat(topClassName), dictionary: this.props.dictionary }),\n (0, preact_1.h)(\"div\", { className: \"as-suggestions__itemsList \".concat(itemsListClassName) }, state.words.map(function (word) {\n var templateData = {\n word: word\n };\n return ((0, preact_1.h)(\"div\", { className: \"as-suggestions__item \".concat(itemClassName), onClick: function (e) {\n e.stopPropagation();\n e.preventDefault();\n that.handleClick(word);\n } },\n (0, preact_1.h)(Template_1[\"default\"], { template: itemTemplate, data: templateData, dictionary: _this.props.dictionary })));\n }))));\n };\n return SuggestionsFilterComponent;\n}(preact_1.Component));\nSuggestionsFilterComponent.defaultProps = {\n classNames: {\n container: \"\",\n top: \"\",\n itemsList: \"\",\n item: \"\"\n },\n template: {\n top: null,\n item: defaultTemplates_1.defaultItemTemplate\n }\n};\nexports[\"default\"] = SuggestionsFilterComponent;\n","\"use strict\";\nexports.__esModule = true;\nexports.defaultItemTemplate = void 0;\nexports.defaultItemTemplate = \"\\n {{word}}\\n\";\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar Mustache = require(\"mustache\");\nvar Translate_1 = require(\"./Translate\");\n/**\n * Template\n */\nvar Template = /** @class */ (function (_super) {\n __extends(Template, _super);\n function Template() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /**\n * Render template\n *\n * @param template\n * @param result\n * @param dictionary\n *\n * @return {any}\n */\n _this.renderTemplate = function (template, result, dictionary) {\n var trans = function () {\n return function (text, render) {\n return render(Translate_1[\"default\"].trans(text, dictionary));\n };\n };\n var output = Mustache.render(template, __assign(__assign({}, result), {\n \"trans\": trans\n }));\n return {\n __html: output\n };\n };\n return _this;\n }\n /**\n * Render\n *\n * @return {any}\n */\n Template.prototype.render = function () {\n var _a, _b;\n var props = this.props;\n var template = props.template;\n var data = props.data;\n var className = props.className;\n var id = (_a = props.id) !== null && _a !== void 0 ? _a : \"\";\n var dictionary = (_b = props.dictionary) !== null && _b !== void 0 ? _b : {};\n return (template)\n ? (0, preact_1.h)(\"div\", { id: id, className: className, dangerouslySetInnerHTML: this.renderTemplate(template, data, dictionary) })\n : null;\n };\n return Template;\n}(preact_1.Component));\nexports[\"default\"] = Template;\n","\"use strict\";\nexports.__esModule = true;\nvar Translate = /** @class */ (function () {\n function Translate() {\n }\n Translate.trans = function (text, dictionary) {\n var _a, _b, _c;\n var parsed = [];\n try {\n parsed = JSON.parse(text);\n }\n catch (_d) {\n return (_a = dictionary[text]) !== null && _a !== void 0 ? _a : text;\n }\n var parsedText = (_b = parsed[0]) !== null && _b !== void 0 ? _b : text;\n parsedText = (_c = dictionary[parsedText]) !== null && _c !== void 0 ? _c : parsedText;\n for (var i = 1; i <= parsed.length; i++) {\n parsedText = parsedText.replace(\"$\" + i, parsed[i]);\n }\n return parsedText;\n };\n return Translate;\n}());\nexports[\"default\"] = Translate;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar BannerComponent_1 = require(\"../components/Banner/BannerComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Banner\n */\nvar Banner = /** @class */ (function (_super) {\n __extends(Banner, _super);\n /**\n * @param target\n * @param breakingPointSize\n * @param position\n * @param imagePrefix\n */\n function Banner(_a) {\n var target = _a.target, breakingPointSize = _a.breakingPointSize, position = _a.position, imagePrefix = _a.imagePrefix;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(BannerComponent_1[\"default\"], { target: target, breakingPointSize: breakingPointSize, position: position, imagePrefix: imagePrefix });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Banner.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return Banner;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Banner(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar CheckboxFilterComponent_1 = require(\"../components/CheckboxFilter/CheckboxFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * CheckboxFilter\n */\nvar CheckboxFilter = /** @class */ (function (_super) {\n __extends(CheckboxFilter, _super);\n function CheckboxFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, label = _a.label, filterValue = _a.filterValue, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(CheckboxFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, label: label, filterValue: filterValue, classNames: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, CheckboxFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n CheckboxFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n CheckboxFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n CheckboxFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n CheckboxFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return CheckboxFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new CheckboxFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ClearFiltersComponent_1 = require(\"../components/ClearFilters/ClearFiltersComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Clear Filters\n */\nvar ClearFilters = /** @class */ (function (_super) {\n __extends(ClearFilters, _super);\n /**\n * @param target\n * @param classNames\n * @param template\n * @param showIndividualFilterClear\n * @param showGlobalFilterClear\n * @param showIndividualFilterValueClear\n */\n function ClearFilters(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, showIndividualFilterClear = _a.showIndividualFilterClear, showGlobalFilterClear = _a.showGlobalFilterClear, showIndividualFilterValueClear = _a.showIndividualFilterValueClear;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ClearFiltersComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.classNames), classNames), showIndividualFilterClear: showIndividualFilterClear, showGlobalFilterClear: showGlobalFilterClear, showIndividualFilterValueClear: showIndividualFilterValueClear, template: __assign(__assign({}, ClearFiltersComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n ClearFilters.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return ClearFilters;\n}(Widget_1[\"default\"]));\n/**\n * Clear filters widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new ClearFilters(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar InformationComponent_1 = require(\"../components/Information/InformationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Information\n */\nvar Information = /** @class */ (function (_super) {\n __extends(Information, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n * @param formatData\n */\n function Information(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template, formatData = _a.formatData;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(InformationComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, InformationComponent_1[\"default\"].defaultProps.template), template), formatData: formatData });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Information.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Information;\n}(Widget_1[\"default\"]));\n/**\n * Information widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Information(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar Helpers_1 = require(\"../components/MultipleFilter/Helpers\");\nvar MultipleFilterActions_1 = require(\"../components/MultipleFilter/MultipleFilterActions\");\nvar MultipleFilterComponent_1 = require(\"../components/MultipleFilter/MultipleFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Multiple Filter\n */\nvar MultipleFilter = /** @class */ (function (_super) {\n __extends(MultipleFilter, _super);\n /**\n * @param target\n * @param filterName\n * @param filterField\n * @param aggregationField\n * @param applicationType\n * @param fetchLimit\n * @param viewLimit\n * @param sortBy\n * @param ranges\n * @param labels\n * @param classNames\n * @param template\n * @param formatData\n * @param activeFirst\n * @param promoted\n */\n function MultipleFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, aggregationField = _a.aggregationField, applicationType = _a.applicationType, fetchLimit = _a.fetchLimit, viewLimit = _a.viewLimit, sortBy = _a.sortBy, ranges = _a.ranges, labels = _a.labels, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, activeFirst = _a.activeFirst, promoted = _a.promoted;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.filterField = filterField;\n _this.aggregationField = aggregationField !== null && aggregationField !== void 0 ? aggregationField : filterField;\n _this.component = (0, preact_1.h)(MultipleFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: _this.filterField, aggregationField: _this.aggregationField, applicationType: applicationType, fetchLimit: fetchLimit, viewLimit: viewLimit, sortBy: sortBy, ranges: ranges, labels: labels, classNames: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, MultipleFilterComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, activeFirst: activeFirst, promoted: promoted });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n MultipleFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n MultipleFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n if (aggregation !== undefined &&\n query.filters !== undefined &&\n query.filters[filterName] !== undefined) {\n var filter = query.filters[filterName];\n var filterValues = filter.values;\n if (filterValues.length > 0) {\n if (filter.application_type === 6) {\n var levelsValues = (0, Helpers_1.getShadowFilterValuesFromQuery)(query, filterName, false);\n object[filterField] = {\n l: levelsValues,\n v: filter.values\n };\n }\n else {\n object[filterField] = filterValues;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n MultipleFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var aggregation = query.aggregations[filterName];\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n var rangesValues = Object.keys(this.component.props.ranges);\n var filterType = (rangesValues.length > 0) ? \"range\" : \"field\";\n if (aggregation !== undefined &&\n fieldValues !== undefined &&\n (Array.isArray(fieldValues) && (fieldValues.length > 0) ||\n (typeof fieldValues === \"object\") && (Object.keys(fieldValues).length > 0))) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n var applicationType = this.component.props.applicationType;\n var fieldName = \"indexed_metadata.\" + this.component.props.filterField;\n if (applicationType === 6) {\n var originalFieldValues = fieldValues;\n fieldValues = originalFieldValues.v;\n var leveledValues = originalFieldValues.l;\n for (var it_1 = 0; it_1 < leveledValues.length; it_1++) {\n var level = it_1 + 1;\n var fieldNameWithoutPrefix = fieldName.substr(17);\n var leveledFilterName = fieldNameWithoutPrefix + \"_level_\" + level;\n var leveledFieldName = \"indexed_metadata.\" + leveledFilterName;\n query.filters[leveledFilterName] = {\n application_type: applicationType,\n field: leveledFieldName,\n filter_type: apisearch_1.FILTER_TYPE_FIELD,\n values: [leveledValues[it_1]]\n };\n }\n fieldName = fieldName + \"_level_\" + (leveledValues.length + 1);\n }\n query.filters[filterName] = {\n application_type: applicationType,\n field: fieldName,\n filter_type: filterType,\n values: fieldValues\n };\n }\n };\n /**\n * @param query\n */\n MultipleFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n /**\n * @param environmentId\n * @param query\n */\n MultipleFilter.prototype.normalizeQuery = function (environmentId, query) {\n var filterName = this.component.props.filterName;\n if ((0, Helpers_1.isFilterAvailable)(query, filterName, 6)) {\n (0, MultipleFilterActions_1.modifyQueryAggregationWithProperLevelValue)(environmentId, query, filterName, this.filterField, this.aggregationField);\n }\n };\n return MultipleFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new MultipleFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PaginationComponent_1 = require(\"../components/Pagination/PaginationComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Pagination\n */\nvar Pagination = /** @class */ (function (_super) {\n __extends(Pagination, _super);\n /**\n * Constructor\n *\n * @param target\n * @param padding\n * @param goFirstLast\n * @param classNames\n * @param template\n */\n function Pagination(_a) {\n var target = _a.target, padding = _a.padding, goFirstLast = _a.goFirstLast, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PaginationComponent_1[\"default\"], { target: target, padding: padding, goFirstLast: goFirstLast, classNames: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, PaginationComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Pagination.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n /**\n * @param query\n */\n Pagination.prototype.reset = function (query) {\n delete query.page;\n };\n return Pagination;\n}(Widget_1[\"default\"]));\n/**\n * Pagination widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Pagination(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar PriorityFilterComponent_1 = require(\"../components/PriorityFilter/PriorityFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * PriorityFilter\n */\nvar PriorityFilter = /** @class */ (function (_super) {\n __extends(PriorityFilter, _super);\n /**\n *\n * @param target\n * @param filters\n * @param template\n */\n function PriorityFilter(_a) {\n var target = _a.target, filters = _a.filters, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(PriorityFilterComponent_1[\"default\"], { target: target, filters: filters, template: __assign(__assign({}, PriorityFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n PriorityFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { dictionary: dictionary, environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return PriorityFilter;\n}(Widget_1[\"default\"]));\n/**\n * Multiple filter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new PriorityFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar RangeFilterComponent_1 = require(\"../components/RangeFilter/RangeFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * RangeFilter\n */\nvar RangeFilter = /** @class */ (function (_super) {\n __extends(RangeFilter, _super);\n function RangeFilter(_a) {\n var target = _a.target, filterName = _a.filterName, filterField = _a.filterField, minValue = _a.minValue, maxValue = _a.maxValue, minMaxCallback = _a.minMaxCallback, step = _a.step, callback = _a.callback, onSliderMove = _a.onSliderMove, template = _a.template, classNames = _a.classNames, attributes = _a.attributes, native = _a.native;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(RangeFilterComponent_1[\"default\"], { target: target, filterName: filterName, filterField: filterField, minValue: minValue, maxValue: maxValue, minMaxCallback: minMaxCallback, step: step, callback: callback, onSliderMove: onSliderMove, native: native, template: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.template), template), classNames: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.classNames), classNames), attributes: __assign(__assign({}, RangeFilterComponent_1[\"default\"].defaultProps.attributes), attributes) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n RangeFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n /**\n * @param query\n * @param object\n */\n RangeFilter.prototype.toUrlObject = function (query, object) {\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n if (query.filters !== undefined && query.filters[filterName] !== undefined) {\n var filterValues = query.filters[filterName].values;\n if (filterValues.length > 0) {\n object[filterField] = filterValues;\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n RangeFilter.prototype.fromUrlObject = function (object, query) {\n var _a;\n var filterName = this.component.props.filterName;\n var filterField = this.component.props.filterField;\n var fieldValues = (_a = object[filterField]) !== null && _a !== void 0 ? _a : object[filterName];\n if (fieldValues !== undefined &&\n Array.isArray(fieldValues) &&\n fieldValues.length > 0) {\n if (query.filters === undefined) {\n query.filters = {};\n }\n query.filters[filterName] = {\n field: \"indexed_metadata.\" + this.component.props.filterField,\n values: fieldValues,\n filter_type: \"range\"\n };\n }\n };\n /**\n * @param query\n */\n RangeFilter.prototype.reset = function (query) {\n var filterName = this.component.props.filterName;\n if (query.filters !== undefined &&\n typeof query.filters === \"object\" &&\n query.filters[filterName] !== undefined) {\n delete query.filters[filterName];\n }\n };\n return RangeFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new RangeFilter(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ReloadComponent_1 = require(\"../components/Reload/ReloadComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Reload\n */\nvar Reload = /** @class */ (function (_super) {\n __extends(Reload, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Reload(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(ReloadComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, ReloadComponent_1[\"default\"].defaultProps.classNames), classNames), template: template });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Reload.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Reload;\n}(Widget_1[\"default\"]));\n/**\n * Reload filter\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Reload(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar ResultComponent_1 = require(\"../components/Result/ResultComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Result\n */\nvar Result = /** @class */ (function (_super) {\n __extends(Result, _super);\n /**\n * Constructor\n *\n * @param target\n * @param fields\n * @param itemsPerPage\n * @param promote\n * @param exclude\n * @param filter\n * @param highlightsEnabled\n * @param classNames\n * @param template\n * @param formatData\n * @param fadeInSelector\n * @param infiniteScroll\n * @param infiniteScrollButton\n * @param fieldsConciliation\n * @param minScore\n */\n function Result(_a) {\n var target = _a.target, fields = _a.fields, itemsPerPage = _a.itemsPerPage, promote = _a.promote, exclude = _a.exclude, filter = _a.filter, highlightsEnabled = _a.highlightsEnabled, classNames = _a.classNames, template = _a.template, formatData = _a.formatData, fadeInSelector = _a.fadeInSelector, infiniteScroll = _a.infiniteScroll, infiniteScrollButton = _a.infiniteScrollButton, fieldsConciliation = _a.fieldsConciliation, minScore = _a.minScore;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(ResultComponent_1[\"default\"], { target: target, fields: fields, itemsPerPage: itemsPerPage, promote: promote, exclude: exclude, filter: filter, highlightsEnabled: highlightsEnabled, classNames: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, ResultComponent_1[\"default\"].defaultProps.template), template), formatData: formatData, fadeInSelector: fadeInSelector, infiniteScroll: infiniteScroll, infiniteScrollButton: infiniteScrollButton, fieldsConciliation: fieldsConciliation, minScore: minScore });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Result.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, currentVisibleResults: store.resultsAreVisible(), dictionary: dictionary });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n */\n Result.prototype.reset = function (query) {\n delete query.page;\n this.component.state = {\n page: 1\n };\n };\n return Result;\n}(Widget_1[\"default\"]));\n/**\n * Result widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Result(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SearchInputActions_1 = require(\"../components/SearchInput/SearchInputActions\");\nvar SearchInputComponent_1 = require(\"../components/SearchInput/SearchInputComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SearchInput\n */\nvar SearchInput = /** @class */ (function (_super) {\n __extends(SearchInput, _super);\n /**\n * Constructor\n *\n * @param target\n * @param placeholder\n * @param startSearchOn\n * @param clearSearch\n * @param withContainer\n * @param autofocus\n * @param autocomplete\n * @param classNames\n * @param template\n * @param searchableFields\n * @param speechRecognition\n * @param queryOperator\n */\n function SearchInput(_a) {\n var target = _a.target, placeholder = _a.placeholder, startSearchOn = _a.startSearchOn, clearSearch = _a.clearSearch, withContainer = _a.withContainer, autofocus = _a.autofocus, autocomplete = _a.autocomplete, classNames = _a.classNames, template = _a.template, searchableFields = _a.searchableFields, speechRecognition = _a.speechRecognition, queryOperator = _a.queryOperator;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SearchInputComponent_1[\"default\"], { target: target, placeholder: placeholder, autofocus: autofocus, autocomplete: autocomplete, startSearchOn: startSearchOn, clearSearch: clearSearch, withContainer: withContainer, searchableFields: searchableFields, speechRecognition: speechRecognition, classNames: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SearchInputComponent_1[\"default\"].defaultProps.template), template), queryOperator: queryOperator, config: _this.config });\n _this.queryOperator = queryOperator;\n _this.autocomplete = autocomplete;\n _this.searchableFields = searchableFields;\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SearchInput.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, htmlNodeInheritProps: {\n autocomplete: \"off\",\n spellcheck: false\n }, dictionary: dictionary });\n if (this.target === null) {\n return;\n }\n if (!this.targetNode) {\n var targetNode = document.querySelector(this.target);\n var isInput = isInputElement(targetNode);\n if (isInput) {\n this.component.props = __assign(__assign({}, this.component.props), { withContainer: false, htmlNodeInheritProps: __assign(__assign({}, this.component.props.htmlNodeInheritedProps), getNodeAttributes(targetNode)) });\n var parentNode = targetNode.parentNode;\n targetNode.remove();\n this.targetNode = parentNode;\n }\n else {\n this.targetNode = targetNode;\n }\n }\n if (this.isSecondRender === undefined) {\n this.isSecondRender = true;\n }\n else if (this.isSecondRender === true) {\n this.isSecondRender = false;\n }\n if (!this.targetNode) {\n return;\n }\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @param query\n * @param object\n */\n SearchInput.prototype.toUrlObject = function (query, object) {\n var q = query.q;\n if (q !== undefined &&\n q !== \"\") {\n object.q = q;\n }\n };\n /**\n * @param object\n * @param query\n */\n SearchInput.prototype.fromUrlObject = function (object, query) {\n var q = object.q;\n if (q !== undefined &&\n q !== \"\") {\n query.q = q;\n }\n };\n /**\n * @param query\n */\n SearchInput.prototype.reset = function (query) {\n delete query.q;\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n SearchInput.prototype.initialSetup = function (environmentId, store, repository) {\n /**\n * Dispatch action\n */\n (0, SearchInputActions_1.initialSearchSetup)(environmentId, store.getCurrentQuery(), this.autocomplete, this.searchableFields, this.queryOperator);\n };\n return SearchInput;\n}(Widget_1[\"default\"]));\n/**\n * Returns an object of an\n * html node attributes.\n *\n * @param htmlNode\n * @returns {{}}\n */\nvar getNodeAttributes = function (htmlNode) {\n var _a;\n var nodeAttributes = {};\n for (var i = 0; i < htmlNode.attributes.length; i++) {\n var attr = htmlNode.attributes[i];\n if (attr.specified) {\n nodeAttributes = __assign(__assign({}, nodeAttributes), (_a = {}, _a[attr.name] = attr.value, _a));\n }\n }\n return nodeAttributes;\n};\n/**\n * Checks if an html node\n * is an input.\n *\n * @param targetNode\n * @returns {boolean}\n */\nvar isInputElement = function (targetNode) {\n return targetNode instanceof HTMLInputElement;\n};\n/**\n * Search Input widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SearchInput(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SnapshotComponent_1 = require(\"../components/Snapshot/SnapshotComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * Snapshot\n */\nvar Snapshot = /** @class */ (function (_super) {\n __extends(Snapshot, _super);\n /**\n * Constructor\n *\n * @param target\n * @param classNames\n * @param template\n */\n function Snapshot(_a) {\n var target = _a.target, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SnapshotComponent_1[\"default\"], { target: target });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n Snapshot.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n var targetNode = document.querySelector(this.target);\n (0, preact_1.render)(this.component, targetNode);\n };\n return Snapshot;\n}(Widget_1[\"default\"]));\n/**\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new Snapshot(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar apisearch_1 = require(\"apisearch\");\nvar preact_1 = require(\"preact\");\nvar SortByComponent_1 = require(\"../components/SortBy/SortByComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SortBy\n */\nvar SortBy = /** @class */ (function (_super) {\n __extends(SortBy, _super);\n function SortBy(_a) {\n var target = _a.target, classNames = _a.classNames, options = _a.options;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.targetNode = document.querySelector(_this.target);\n _this.component = (0, preact_1.h)(SortByComponent_1[\"default\"], { target: target, classNames: __assign(__assign({}, SortByComponent_1[\"default\"].defaultProps.classNames), classNames), options: options });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SortBy.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store });\n (0, preact_1.render)(this.component, this.targetNode);\n };\n /**\n * @private\n */\n SortBy.prototype.firstOptionAsString = function () {\n return this.component.props.options[0].value;\n };\n /**\n * @param query\n * @param object\n */\n SortBy.prototype.toUrlObject = function (query, object) {\n if (query.sort !== undefined) {\n var sort = query.sort[0];\n var sortInstance = apisearch_1.SortBy.createFromArray(query.sort);\n var sortAsString = sortInstance.getFirstSortAsString();\n var firstSortAsString = this.firstOptionAsString();\n if (sortAsString !== firstSortAsString) {\n if (sort.type === \"distance\") {\n object.sort = \"distance:\" + sort.unit + \":\" + sort.coordinate.lat + \":\" + sort.coordinate.lon;\n }\n else {\n object.sort = sort.field.substr(17) + \":\" + sort.order;\n }\n }\n }\n };\n /**\n * @param object\n * @param query\n */\n SortBy.prototype.fromUrlObject = function (object, query) {\n if (object.sort !== undefined) {\n SortBy.setSortToQuery(query, object.sort);\n }\n };\n /**\n * @param query\n */\n SortBy.prototype.reset = function (query) {\n delete query.sort;\n var firstSortAsString = this.firstOptionAsString();\n SortBy.setSortToQuery(query, firstSortAsString);\n };\n /**\n * @param query\n * @param option\n * @private\n */\n SortBy.setSortToQuery = function (query, option) {\n if (option === \"score\") {\n return;\n }\n query.sort = [{}];\n if (option.indexOf(\"distance:\") === 0) {\n var distanceSortParts = option.split(\":\");\n query.sort[0].type = distanceSortParts[0];\n query.sort[0].unit = distanceSortParts[1];\n query.sort[0].coordinate = {\n lat: distanceSortParts[2],\n lon: distanceSortParts[3]\n };\n return;\n }\n var sortParts = option.split(\":\");\n query.sort[0].type = \"field\";\n query.sort[0].field = \"indexed_metadata.\" + sortParts[0];\n query.sort[0].order = sortParts[1];\n };\n return SortBy;\n}(Widget_1[\"default\"]));\n/**\n * SortBy widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SortBy(settings); });\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nexports.__esModule = true;\nvar preact_1 = require(\"preact\");\nvar SuggestionsFilterComponent_1 = require(\"../components/Suggestions/SuggestionsFilterComponent\");\nvar Widget_1 = require(\"./Widget\");\n/**\n * SuggestionsFilter\n */\nvar SuggestionsFilter = /** @class */ (function (_super) {\n __extends(SuggestionsFilter, _super);\n function SuggestionsFilter(_a) {\n var target = _a.target, numberOfSuggestions = _a.numberOfSuggestions, classNames = _a.classNames, template = _a.template;\n var _this = _super.call(this) || this;\n _this.target = target;\n _this.component = (0, preact_1.h)(SuggestionsFilterComponent_1[\"default\"], { target: target, numberOfSuggestions: numberOfSuggestions, classNames: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.classNames), classNames), template: __assign(__assign({}, SuggestionsFilterComponent_1[\"default\"].defaultProps.template), template) });\n return _this;\n }\n /**\n * @param environmentId\n * @param store\n * @param repository\n * @param dictionary\n */\n SuggestionsFilter.prototype.render = function (environmentId, store, repository, dictionary) {\n this.component.props = __assign(__assign({}, this.component.props), { environmentId: environmentId, repository: repository, store: store, dictionary: dictionary });\n (0, preact_1.render)(this.component, document.querySelector(this.target));\n };\n return SuggestionsFilter;\n}(Widget_1[\"default\"]));\n/**\n * CheckboxFilter widget\n *\n * @param settings\n */\nexports[\"default\"] = (function (settings) { return new SuggestionsFilter(settings); });\n","\"use strict\";\nexports.__esModule = true;\n/**\n * Widget\n */\nvar Widget = /** @class */ (function () {\n function Widget() {\n }\n Widget.prototype.withConfig = function (config) {\n if (\"withConfig\" in this.component) {\n this.component.withConfig(config);\n }\n };\n /**\n * @param query\n * @param object\n */\n Widget.prototype.toUrlObject = function (query, object) {\n };\n /**\n * @param object\n * @param query\n */\n Widget.prototype.fromUrlObject = function (object, query) {\n };\n /**\n * @param query\n */\n Widget.prototype.reset = function (query) {\n };\n /**\n * @param environmentId\n * @param query\n */\n Widget.prototype.normalizeQuery = function (environmentId, query) {\n };\n /**\n * @param environmentId\n * @param store\n * @param repository\n */\n Widget.prototype.initialSetup = function (environmentId, store, repository) {\n };\n return Widget;\n}());\nexports[\"default\"] = Widget;\n","\"use strict\";\nexports.__esModule = true;\nvar CheckboxFilter_1 = require(\"./CheckboxFilter\");\nvar ClearFilters_1 = require(\"./ClearFilters\");\nvar Information_1 = require(\"./Information\");\nvar MultipleFilter_1 = require(\"./MultipleFilter\");\nvar Pagination_1 = require(\"./Pagination\");\nvar RangeFilter_1 = require(\"./RangeFilter\");\nvar Reload_1 = require(\"./Reload\");\nvar Result_1 = require(\"./Result\");\nvar SearchInput_1 = require(\"./SearchInput\");\nvar Snapshot_1 = require(\"./Snapshot\");\nvar SortBy_1 = require(\"./SortBy\");\nvar Suggestions_1 = require(\"./Suggestions\");\nvar Banner_1 = require(\"./Banner\");\nvar PriorityFilter_1 = require(\"./PriorityFilter\");\n/**\n * Widget factories\n */\nexports[\"default\"] = {\n searchInput: SearchInput_1[\"default\"],\n clearFilters: ClearFilters_1[\"default\"],\n multipleFilter: MultipleFilter_1[\"default\"],\n sortBy: SortBy_1[\"default\"],\n information: Information_1[\"default\"],\n result: Result_1[\"default\"],\n pagination: Pagination_1[\"default\"],\n checkboxFilter: CheckboxFilter_1[\"default\"],\n rangeFilter: RangeFilter_1[\"default\"],\n reload: Reload_1[\"default\"],\n snapshot: Snapshot_1[\"default\"],\n suggestions: Suggestions_1[\"default\"],\n banner: Banner_1[\"default\"],\n priorityFilter: PriorityFilter_1[\"default\"]\n};\n","/*\n\nTypeScript Md5\n==============\n\nBased on work by\n* Joseph Myers: http://www.myersdaily.org/joseph/javascript/md5-text.html\n* André Cruz: https://github.com/satazor/SparkMD5\n* Raymond Hill: https://github.com/gorhill/yamd5.js\n\nEffectively a TypeScrypt re-write of Raymond Hill JS Library\n\nThe MIT License (MIT)\n\nCopyright (C) 2014 Raymond Hill\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n Version 2, December 2004\n\n Copyright (C) 2015 André Cruz \n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n DO WHAT YOU WANT TO PUBLIC LICENSE\n TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT YOU WANT TO.\n\n\n*/\n;\nexport class Md5 {\n constructor() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state = new Int32Array(4);\n this._buffer = new ArrayBuffer(68);\n this._buffer8 = new Uint8Array(this._buffer, 0, 68);\n this._buffer32 = new Uint32Array(this._buffer, 0, 17);\n this.start();\n }\n static hashStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendStr(str)\n .end(raw);\n }\n static hashAsciiStr(str, raw = false) {\n return this.onePassHasher\n .start()\n .appendAsciiStr(str)\n .end(raw);\n }\n static _hex(x) {\n const hc = Md5.hexChars;\n const ho = Md5.hexOut;\n let n;\n let offset;\n let j;\n let i;\n for (i = 0; i < 4; i += 1) {\n offset = i * 8;\n n = x[i];\n for (j = 0; j < 8; j += 2) {\n ho[offset + 1 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n ho[offset + 0 + j] = hc.charAt(n & 0x0F);\n n >>>= 4;\n }\n }\n return ho.join('');\n }\n static _md5cycle(x, k) {\n let a = x[0];\n let b = x[1];\n let c = x[2];\n let d = x[3];\n // ff()\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n // gg()\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n // hh()\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n // ii()\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n /**\n * Initialise buffer to be hashed\n */\n start() {\n this._dataLength = 0;\n this._bufferLength = 0;\n this._state.set(Md5.stateIdentity);\n return this;\n }\n // Char to code point to to array conversion:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt\n // #Example.3A_Fixing_charCodeAt_to_handle_non-Basic-Multilingual-Plane_characters_if_their_presence_earlier_in_the_string_is_unknown\n /**\n * Append a UTF-8 string to the hash buffer\n * @param str String to append\n */\n appendStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let code;\n let i;\n for (i = 0; i < str.length; i += 1) {\n code = str.charCodeAt(i);\n if (code < 128) {\n buf8[bufLen++] = code;\n }\n else if (code < 0x800) {\n buf8[bufLen++] = (code >>> 6) + 0xC0;\n buf8[bufLen++] = code & 0x3F | 0x80;\n }\n else if (code < 0xD800 || code > 0xDBFF) {\n buf8[bufLen++] = (code >>> 12) + 0xE0;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n else {\n code = ((code - 0xD800) * 0x400) + (str.charCodeAt(++i) - 0xDC00) + 0x10000;\n if (code > 0x10FFFF) {\n throw new Error('Unicode standard supports code points up to U+10FFFF');\n }\n buf8[bufLen++] = (code >>> 18) + 0xF0;\n buf8[bufLen++] = (code >>> 12 & 0x3F) | 0x80;\n buf8[bufLen++] = (code >>> 6 & 0x3F) | 0x80;\n buf8[bufLen++] = (code & 0x3F) | 0x80;\n }\n if (bufLen >= 64) {\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen -= 64;\n buf32[0] = buf32[16];\n }\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append an ASCII string to the hash buffer\n * @param str String to append\n */\n appendAsciiStr(str) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(str.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = str.charCodeAt(j++);\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Append a byte array to the hash buffer\n * @param input array to append\n */\n appendByteArray(input) {\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n let bufLen = this._bufferLength;\n let i;\n let j = 0;\n for (;;) {\n i = Math.min(input.length - j, 64 - bufLen);\n while (i--) {\n buf8[bufLen++] = input[j++];\n }\n if (bufLen < 64) {\n break;\n }\n this._dataLength += 64;\n Md5._md5cycle(this._state, buf32);\n bufLen = 0;\n }\n this._bufferLength = bufLen;\n return this;\n }\n /**\n * Get the state of the hash buffer\n */\n getState() {\n const s = this._state;\n return {\n buffer: String.fromCharCode.apply(null, Array.from(this._buffer8)),\n buflen: this._bufferLength,\n length: this._dataLength,\n state: [s[0], s[1], s[2], s[3]]\n };\n }\n /**\n * Override the current state of the hash buffer\n * @param state New hash buffer state\n */\n setState(state) {\n const buf = state.buffer;\n const x = state.state;\n const s = this._state;\n let i;\n this._dataLength = state.length;\n this._bufferLength = state.buflen;\n s[0] = x[0];\n s[1] = x[1];\n s[2] = x[2];\n s[3] = x[3];\n for (i = 0; i < buf.length; i += 1) {\n this._buffer8[i] = buf.charCodeAt(i);\n }\n }\n /**\n * Hash the current state of the hash buffer and return the result\n * @param raw Whether to return the value as an `Int32Array`\n */\n end(raw = false) {\n const bufLen = this._bufferLength;\n const buf8 = this._buffer8;\n const buf32 = this._buffer32;\n const i = (bufLen >> 2) + 1;\n this._dataLength += bufLen;\n const dataBitsLen = this._dataLength * 8;\n buf8[bufLen] = 0x80;\n buf8[bufLen + 1] = buf8[bufLen + 2] = buf8[bufLen + 3] = 0;\n buf32.set(Md5.buffer32Identity.subarray(i), i);\n if (bufLen > 55) {\n Md5._md5cycle(this._state, buf32);\n buf32.set(Md5.buffer32Identity);\n }\n // Do the final computation based on the tail and length\n // Beware that the final length may not fit in 32 bits so we take care of that\n if (dataBitsLen <= 0xFFFFFFFF) {\n buf32[14] = dataBitsLen;\n }\n else {\n const matches = dataBitsLen.toString(16).match(/(.*?)(.{0,8})$/);\n if (matches === null) {\n return;\n }\n const lo = parseInt(matches[2], 16);\n const hi = parseInt(matches[1], 16) || 0;\n buf32[14] = lo;\n buf32[15] = hi;\n }\n Md5._md5cycle(this._state, buf32);\n return raw ? this._state : Md5._hex(this._state);\n }\n}\n// Private Static Variables\nMd5.stateIdentity = new Int32Array([1732584193, -271733879, -1732584194, 271733878]);\nMd5.buffer32Identity = new Int32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\nMd5.hexChars = '0123456789abcdef';\nMd5.hexOut = [];\n// Permanent instance is to use for one-call hashing\nMd5.onePassHasher = new Md5();\nif (Md5.hashStr('hello') !== '5d41402abc4b2a76b9719d911017c592') {\n throw new Error('Md5 self test failed.');\n}\n//# sourceMappingURL=md5.js.map","import { Md5 } from './md5';\n// Hashes any blob\nexport class Md5FileHasher {\n constructor(_callback, // Callback to return the result\n _async = true, // Async version is not always available in a web worker\n _partSize = 1048576) {\n this._callback = _callback;\n this._async = _async;\n this._partSize = _partSize;\n this._configureReader();\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n */\n hash(blob) {\n const self = this;\n self._blob = blob;\n // self._length = Math.ceil(blob.size / self._partSize);\n self._part = 0;\n self._md5 = new Md5();\n self._processPart();\n }\n _fail() {\n this._callback({\n success: false,\n result: 'data read failed'\n });\n }\n _hashData(e) {\n let self = this;\n self._md5.appendByteArray(new Uint8Array(e.target.result));\n if (self._part * self._partSize >= self._blob.size) {\n self._callback({\n success: true,\n result: self._md5.end()\n });\n }\n else {\n self._processPart();\n }\n }\n _processPart() {\n const self = this;\n let endbyte = 0;\n let current_part;\n self._part += 1;\n if (self._blob.size > self._partSize) { // If blob bigger then part_size we will slice it up\n endbyte = self._part * self._partSize;\n if (endbyte > self._blob.size) {\n endbyte = self._blob.size;\n }\n current_part = self._blob.slice((self._part - 1) * self._partSize, endbyte);\n }\n else {\n current_part = self._blob;\n }\n if (self._async) {\n self._reader.readAsArrayBuffer(current_part);\n }\n else {\n setTimeout(() => {\n try {\n self._hashData({\n target: {\n result: self._reader.readAsArrayBuffer(current_part)\n },\n });\n }\n catch (e) {\n self._fail();\n }\n }, 0);\n }\n }\n _configureReader() {\n const self = this;\n if (self._async) {\n self._reader = new FileReader();\n self._reader.onload = self._hashData.bind(self);\n self._reader.onerror = self._fail.bind(self);\n self._reader.onabort = self._fail.bind(self);\n }\n else {\n self._reader = new FileReaderSync();\n }\n }\n}\n//# sourceMappingURL=md5_file_hasher.js.map",";\nexport class ParallelHasher {\n constructor(workerUri, workerOptions) {\n this._queue = [];\n this._ready = true;\n const self = this;\n if (Worker) {\n self._hashWorker = new Worker(workerUri, workerOptions);\n self._hashWorker.onmessage = self._recievedMessage.bind(self);\n self._hashWorker.onerror = (err) => {\n self._ready = false;\n console.error('Hash worker failure', err);\n };\n }\n else {\n self._ready = false;\n console.error('Web Workers are not supported in this browser');\n }\n }\n /**\n * Hash a blob of data in the worker\n * @param blob Data to hash\n * @returns Promise of the Hashed result\n */\n hash(blob) {\n const self = this;\n let promise;\n promise = new Promise((resolve, reject) => {\n self._queue.push({\n blob,\n resolve,\n reject,\n });\n self._processNext();\n });\n return promise;\n }\n /** Terminate any existing hash requests */\n terminate() {\n this._ready = false;\n this._hashWorker.terminate();\n }\n // Processes the next item in the queue\n _processNext() {\n if (this._ready && !this._processing && this._queue.length > 0) {\n this._processing = this._queue.pop();\n this._hashWorker.postMessage(this._processing.blob);\n }\n }\n // Hash result is returned from the worker\n _recievedMessage(evt) {\n var _a, _b;\n const data = evt.data;\n if (data.success) {\n (_a = this._processing) === null || _a === void 0 ? void 0 : _a.resolve(data.result);\n }\n else {\n (_b = this._processing) === null || _b === void 0 ? void 0 : _b.reject(data.result);\n }\n this._processing = undefined;\n this._processNext();\n }\n}\n//# sourceMappingURL=parallel_hasher.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors\n'use strict';\n\nfunction bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n};\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n};\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n};\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz';\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n};\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0];\n }\n\n return str;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj, 0);\n};\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nvar utils$1 = {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils$1.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils$1.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype$1 = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype$1, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype$1);\n\n utils$1.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\n// eslint-disable-next-line strict\nvar httpAdapter = null;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils$1.isPlainObject(thing) || utils$1.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils$1.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils$1.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils$1.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils$1.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);\n\n if (!utils$1.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils$1.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils$1.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils$1.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils$1.isArray(value) && isFlatArray(value)) ||\n ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils$1.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils$1.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils$1.forEach(value, function each(el, key) {\n const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils$1.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode$1(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode$1);\n } : encode$1;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nfunction buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils$1.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils$1.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nvar InterceptorManager$1 = InterceptorManager;\n\nvar transitionalDefaults = {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n\nvar URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n\nvar FormData$1 = typeof FormData !== 'undefined' ? FormData : null;\n\nvar Blob$1 = typeof Blob !== 'undefined' ? Blob : null;\n\nvar platform$1 = {\n isBrowser: true,\n classes: {\n URLSearchParams: URLSearchParams$1,\n FormData: FormData$1,\n Blob: Blob$1\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nvar utils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n hasBrowserEnv: hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv: hasStandardBrowserEnv\n});\n\nvar platform = {\n ...utils,\n ...platform$1\n};\n\nfunction toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils$1.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils$1.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils$1.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils$1.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils$1.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils$1.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {\n const obj = {};\n\n utils$1.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils$1.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils$1.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils$1.isObject(data);\n\n if (isObjectPayload && utils$1.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils$1.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils$1.isArrayBuffer(data) ||\n utils$1.isBuffer(data) ||\n utils$1.isStream(data) ||\n utils$1.isFile(data) ||\n utils$1.isBlob(data)\n ) {\n return data;\n }\n if (utils$1.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils$1.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nvar defaults$1 = defaults;\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils$1.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nvar parseHeaders = rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils$1.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils$1.isString(value)) return;\n\n if (utils$1.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils$1.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils$1.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils$1.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils$1.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils$1.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils$1.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils$1.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils$1.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils$1.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils$1.forEach(this, (value, header) => {\n const key = utils$1.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils$1.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils$1.freezeMethods(AxiosHeaders);\n\nvar AxiosHeaders$1 = AxiosHeaders;\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nfunction transformData(fns, response) {\n const config = this || defaults$1;\n const context = response || config;\n const headers = AxiosHeaders$1.from(context.headers);\n let data = context.data;\n\n utils$1.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n\nfunction isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils$1.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nfunction settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n\nvar cookies = platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils$1.isString(path) && cookie.push('path=' + path);\n\n utils$1.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nfunction isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nfunction buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n\nvar isURLSameOrigin = platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n\nfunction parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nvar xhrAdapter = isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils$1.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders$1.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils$1.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n};\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n};\n\nutils$1.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;\n\nvar adapters = {\n getAdapter: (adapters) => {\n adapters = utils$1.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n};\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nfunction dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders$1.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders$1.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders$1.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {\n return utils$1.merge.call({caseless}, target, source);\n } else if (utils$1.isPlainObject(source)) {\n return utils$1.merge({}, source);\n } else if (utils$1.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils$1.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils$1.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\nconst VERSION = \"1.6.7\";\n\nconst validators$1 = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators$1[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators$1.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nvar validator = {\n assertOptions,\n validators: validators$1\n};\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager$1(),\n response: new InterceptorManager$1()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack;\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils$1.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n };\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils$1.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils$1.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders$1.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nvar Axios$1 = Axios;\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nvar CancelToken$1 = CancelToken;\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nfunction spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nfunction isAxiosError(payload) {\n return utils$1.isObject(payload) && (payload.isAxiosError === true);\n}\n\nconst HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nvar HttpStatusCode$1 = HttpStatusCode;\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios$1(defaultConfig);\n const instance = bind(Axios$1.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils$1.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults$1);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios$1;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken$1;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders$1;\n\naxios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode$1;\n\naxios.default = axios;\n\nmodule.exports = axios;\n//# sourceMappingURL=axios.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\"use strict\";\nexports.__esModule = true;\nvar ApisearchUI_1 = require(\"./ApisearchUI\");\nexports[\"default\"] = ApisearchUI_1[\"default\"];\n"],"names":["root","factory","exports","module","define","amd","self","__esModule","tslib_1","AxiosClient_1","Query_1","Query_2","Query_3","SortBy_1","HttpRepository_1","Result_1","ResultAggregations_1","Transformer_1","CacheClient_1","Apisearch","createRepository","config","ensureRepositoryConfigIsValid","options","__assign","api_version","override_queries","timeout","httpClient","http_client","AxiosClient","endpoint","use_cache","CacheClient","HttpRepository","app_id","index_id","token","Transformer","ensureIsDefined","param","name","TypeError","createQueryLocated","coordinate","queryText","page","size","QUERY_DEFAULT_PAGE","QUERY_DEFAULT_SIZE","Query","createLocated","createQuery","create","createQueryMatchAll","createMatchAll","createQueryByUUID","uuid","createByUUID","createQueryByUUIDs","uuids","_i","arguments","length","createByUUIDs","apply","createEmptyResult","Result","ResultAggregations","createEmptySortBy","SortBy","createEmptyScoreStrategy","Config","DEFAULT_REPLICAS","DEFAULT_SHARDS","Synonym_1","language","storeSearchableMetadata","shards","replicas","this","synonyms","prototype","getLanguage","shouldSearchableMetadataBeStored","addSynonym","synonym","push","getSynonyms","getShards","getReplicas","toArray","store_searchable_metadata","map","createFromArray","array","Array","Synonym","words","getWords","createbyWords","Object","expand","join","ConnectionError","_super","__extends","getTransportableHTTPError","ErrorWithMessage","message","EventError","throwEndpointNotAvailable","ForbiddenError","createAppIdIsRequiredException","createIndexIsRequiredException","createTokenIsRequiredException","InvalidFormatError","itemRepresentationNotValid","itemUUIDRepresentationNotValid","composedItemUUIDNotValid","querySortedByDistanceWithoutCoordinate","queryFormatNotValid","coordinateFormatNotValid","configFormatNotValid","tokenFormatNotValid","indexFormatNotValid","indexUUIDFormatNotValid","appUUIDFormatNotValid","campaignFormatNotValid","changesFormatNotValid","boostClauseFormatNotValid","tokenUUIDFormatNotValid","userFormatNotValid","InvalidTokenError","createInvalidTokenPermissions","tokenReference","createInvalidTokenMaxHitsPerQuery","maxHitsPerQuery","ResourceExistsError","indexAvailable","eventsIndexAvailable","logsIndexAvailable","ResourceNotAvailableError","indexNotAvailable","resourceId","eventsIndexNotAvailable","logsIndexNotAvailable","engineNotAvailable","UnknownError","createUnknownError","UnsupportedContentTypeError","createUnsupportedContentTypeException","Square","Polygon","CoordinateAndDistance","LocationRange","Coordinate_1","fromFilterObject","object","type","getName","data","toFilterObject","distance","_this","call","Coordinate","coordinates","Error","i","topLeftCoordinate","bottomRightCoordinate","top_left","bottom_right","axios_1","__1","Client_1","Response_1","host","version","overrideQueries","abortControllers","get","url","method","credentials","parameters","__awaiter","headers","axiosRequestConfig","axiosResponse","error_1","__generator","_a","label","replace","toLowerCase","abort","baseURL","transformRequest","rawData","JSON","stringify","Client","objectToUrlParameters","signal","trys","fetch","sent","Response","status","response","urlIsFormatted","generateAbortController","AbortController","retries","request","then","error","undefined","code","ts_md5_1","cache","hits","flushCache","keys","getNumberOfHits","cacheUID","_b","_c","Md5","hashStr","toString","params","builtParams","HttpClient","body","getCode","getBody","AppUUID","InvalidFormatError_1","id","indexOf","createById","getId","parse","composedUUID","Changes","TYPE_ARRAY","TYPE_ARRAY_EXPECTS_ELEMENT","TYPE_ARRAY_ELEMENT_DELETE","TYPE_ARRAY_ELEMENT_ADD","TYPE_ARRAY_ELEMENT_UPDATE","TYPE_LITERAL","TYPE_VALUE","changes","addChange","field","value","updateElementFromList","condition","addElementInList","deleteElementFromList","getChanges","lat","lon","getLatitude","getLongitude","Index","IndexUUID_1","AppUUID_1","appUUID","isOK","docCount","getUUID","getAppUUID","isOk","getDocCount","getSize","is_ok","doc_count","IndexUUID","Item","ItemUUID_1","metadata","indexedMetadata","searchableMetadata","exactMatchingMetadata","suggest","highlights","promoted","getType","getCoordinate","getDistance","getMetadata","setMetadata","addMetadata","key","getIndexedMetadata","setIndexedMetadata","addIndexedMetadata","getSearchableMetadata","setSearchableMetadata","addSearchableMetadata","getExactMatchingMetadata","setExactMatchingMetadata","addExactMatchingMetadata","getAllMetadata","allMetadata","getSuggest","getHighlights","getHighlight","isPromoted","setScore","score","getScore","getIndexUUID","indexUUID","itemAsArray","indexed_metadata","searchable_metadata","exact_matching_metadata","is_promoted","app_uuid","index_uuid","item","ItemUUID","composeUUID","getPathByField","createByComposedUUID","parts","split","Metadata","toMetadata","fromMetadata","values","splittedParts","iterator","lastElement","part","User","attributes","getAttributes","Aggregation","AGGREGATION_NO_LIMIT","AGGREGATION_SORT_BY_NAME_DESC","AGGREGATION_SORT_BY_NAME_ASC","AGGREGATION_SORT_BY_COUNT_DESC","AGGREGATION_SORT_BY_COUNT_ASC","Filter_1","applicationType","filterType","subgroup","sort","limit","getField","getApplicationType","getFilterType","getSubgroup","getSort","getLimit","getPromoted","aggregationAsArray","FILTER_AT_LEAST_ONE","application_type","FILTER_TYPE_FIELD","filter_type","Filter","FILTER_TYPE_QUERY","FILTER_TYPE_GEO","FILTER_TYPE_DATE_RANGE","FILTER_TYPE_RANGE","FILTER_PROMOTE","FILTER_EXCLUDE","FILTER_MUST_ALL_WITH_LEVELS","FILTER_MUST_ALL","filterTerms","getValues","hasValue","getFilterTerms","filterAsArray","filter_terms","NO_MIN_SCORE","Item_1","User_1","Aggregation_1","Filter_2","Aggregation_2","Filter_3","ScoreStrategies_1","UUID","fields","universeFilters","filters","itemsPromoted","aggregations","resultsEnabled","aggregationsEnabled","numberOfSuggestions","highlightsEnabled","autocompleteEnabled","searchableFields","fuzziness","minScore","subqueries","queryOperator","sortByInstance","_query","query","Math","max","from","ids","disableAggregations","disableSuggestions","_id","createMultiquery","queries","setFields","getFields","filterUniverseByTypes","fieldPath","filterByTypes","aggregate","aggregationSort","filterUniverseByIds","filterByIds","filterUniverseBy","filterBy","filterName","aggregateBy","filterUniverseByRange","rangeType","filterUniverseByDateRange","filterByRange","ranges","aggregateByRange","filterByDateRange","filterUniverseByLocation","locationRange","setSearchableFields","getSearchableFields","sortBy","isSortedByGeoDistance","setCoordinate","aggregateByDateRange","getAggregations","getAggregation","aggregationName","getQueryText","filter","getUniverseFilters","getUniverseFilter","getFilters","getFilter","getFilterByField","fieldName","getSortBy","getFrom","getPage","enableResults","disableResults","areResultsEnabled","enableAggregations","areAggregationsEnabled","setNumberOfSuggestions","getNumberOfSuggestions","enableAutocomplete","disableAutocomplete","areAutocompleteEnabled","enableHighlights","disableHighlights","areHighlightsEnabled","promoteUUID","itemUUID","promoteUUIDs","getItemsPromoted","excludeUUID","excludeUUIDs","getScoreStrategies","scoreStrategies","setScoreStrategies","getFuzziness","setFuzziness","setAutoFuzziness","getMinScore","setMinScore","byUser","user","anonymously","getUser","setMetadataValue","addSubquery","subquery","getSubqueries","identifyWith","forceIndexUUID","setQueryOperator","getQueryOperator","q","universe_filters","universeFilter","aggregation","results_enabled","autocomplete_enabled","number_of_suggestions","highlight_enabled","aggregations_enabled","searchable_fields","ScoreStrategies","scoreStrategiesAsArray","score_strategies","min_score","items_promoted","query_operator","aggregationsAsArray","sortAsArray","filtersAsArray","universeFiltersAsArray","itemsPromotedAsArray","subqueriesAsArray","Range","RANGE_SEPARATOR","RANGE_INFINITE","RANGE_MINUS_INFINITE","stringToArray","string","to","finalFrom","finalTo","parseInt","arrayToString","finalValues","String","createRanges","incremental","nextTo","MIN","MAX","AVG","SUM","MULTIPLY","ScoreStrategy_1","createEmpty","scoreMode","addScoreStrategy","scoreStrategy","getScoreMode","score_mode","ScoreStrategy","DEFAULT_FACTOR","DEFAULT_MISSING","SCORE_MODE_MIN","SCORE_MODE_MAX","SCORE_MODE_AVG","SCORE_MODE_SUM","SCORE_MODE_NONE","MODIFIER_SQUARE","MODIFIER_LN","MODIFIER_LOG","MODIFIER_SQRT","MODIFIER_NONE","DECAY_GAUSS","DECAY_EXP","DECAY_LINEAR","DECAY","CUSTOM_FUNCTION","BOOSTING_FIELD_VALUE","DEFAULT_WEIGHT","DEFAULT_TYPE","weight","configuration","getConfigurationValue","element","getWeight","createDefault","createFieldBoosting","factor","missing","modifier","fixFilterFieldPath","createCustomFunction","func","createDecayFunction","origin","scale","offset","decay","SORT_BY_LOCATION_MI_ASC","SORT_BY_LOCATION_KM_ASC","SORT_BY_TYPE_DESC","SORT_BY_TYPE_ASC","SORT_BY_ID_DESC","SORT_BY_ID_ASC","SORT_BY_AL_TUN_TUN","SORT_BY_RANDOM","SORT_BY_SCORE","SORT_BY_MODE_MEDIAN","SORT_BY_MODE_MAX","SORT_BY_MODE_MIN","SORT_BY_MODE_SUM","SORT_BY_MODE_AVG","SORT_BY_DESC","SORT_BY_ASC","SORT_BY_TYPE_RANDOM","SORT_BY_TYPE_FUNCTION","SORT_BY_TYPE_DISTANCE","SORT_BY_TYPE_SCORE","SORT_BY_TYPE_NESTED","SORT_BY_TYPE_FIELD","order","unit","sortsBy","byFieldsValues","shortSortByElements","byFieldValue","all","byValue","byNestedField","mode","byNestedFieldAndFilter","byFunction","hasRandomSort","getFirstSortAsString","firstSortBy","sortsByAsArray","copy","innerArray","newSortBy","sortByAsArray","ConnectionError_1","InvalidTokenError_1","ResourceExistsError_1","ResourceNotAvailableError_1","UnknownError_1","Index_1","appId","indexId","transformer","getTransformer","addObject","toItem","addItem","deleteObject","toItemUUID","deleteItem","flushUpdateItems","itemsToUpdate","response_1","getCredentials","createErrorFromResponse","flushDeleteItems","itemsToDelete","response_2","response_3","result","applyTransformersToResult","getSimilarItems","itemUUIDs","similarity","response_4","items_uuid","getRecommendedItems","response_5","updateItems","response_6","createIndex","response_7","deleteIndex","response_8","resetIndex","response_9","checkIndex","response_10","getIndices","response_11","indexAsArray","configureIndex","response_12","pushInteraction","userId","queryString","interaction","site","device","position","response_13","query_string","user_id","purchase","response_14","getHttpClient","hasReadTransformers","subresults","getSubresults","bind","createMultiresults","getQueryUUID","getTotalItems","getTotalHits","getSuggestions","fromItems","getItems","getAutocomplete","Repository","resetCachedElements","addItems","items","deleteItems","itemsUUID","flush","bulkNumber","skipIfLess","promise","Promise","chunkArray","arrayOfItems","concat","arrayOfItemsUUID","chunk","arrayChunked","j","slice","Counter","Metadata_1","used","n","getSlug","slug","getLevel","level","isUsed","getN","createByActiveElements","activeElements","inActiveElements","queryUUID","totalItems","totalHits","autocomplete","suggestions","getItemsGroupedByTypes","itemsGroupedByTypeCache","itemsGroupedByTypes","getItemsByType","getItemsByTypes","types","getFirstItem","setAggregations","hasNotEmptyAggregation","getMetadataValue","query_uuid","total_items","total_hits","suggests","subresult","subresultsAsArray","ResultAggregation","Counter_1","totalElements","counters","highestActiveElement","activeElement","addCounter","counter","counterInstance","getCounters","isFilter","hasLevels","getCounter","getAllElements","getTotalElements","getActiveElements","cleanCountersByLevel","isEmpty","active_elements","total_elements","highest_active_level","activeElementsAsArray","activeElementAsArray","countersAsArray","counterAsArray","ResultAggregation_1","addAggregation","aggregationCollection","readTransformers","writeTransformers","addReadTransformer","readTransformer","addWriteTransformer","writeTransformer","objects","fromItem","isValidItem","toItems","isValidObject","toItemUUIDs","Apisearch_1","__exportStar","ReflectOwnKeys","R","Reflect","ReflectApply","target","receiver","args","Function","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","Number","isNaN","EventEmitter","init","once","emitter","resolve","reject","errorListener","err","removeListener","resolver","eventTargetAgnosticAddListener","handler","flags","on","addErrorHandlerIfEventEmitter","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","listener","_getMaxListeners","that","_addListener","prepend","m","events","existing","warning","newListener","emit","unshift","warned","w","count","console","warn","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","arr","ret","unwrapListeners","arrayClone","listenerCount","addEventListener","wrapListener","arg","removeEventListener","defineProperty","enumerable","set","RangeError","getPrototypeOf","setMaxListeners","getMaxListeners","doError","er","context","len","listeners","addListener","prependListener","prependOnceListener","list","originalListener","shift","index","pop","spliceOne","off","removeAllListeners","rawListeners","eventNames","objectToString","isArray","isFunction","escapeRegExp","hasProperty","obj","propName","regExpTest","RegExp","test","nonSpaceRe","isWhitespace","re","testRegExp","entityMap","whiteRe","spaceRe","equalsRe","curlyRe","tagRe","Scanner","tail","pos","Context","view","parentContext","parent","Writer","templateCache","_cache","clear","eos","scan","match","substring","scanUntil","search","lookup","primitive","hasOwnProperty","intermediateValue","names","lookupHit","clearCache","template","tags","cacheKey","mustache","isCacheEnabled","tokens","openingTagRe","closingTagRe","closingCurlyRe","lineHasNonSpace","sections","spaces","hasTag","nonSpace","indentation","tagIndex","stripSpace","compileTags","tagsToCompile","start","chr","openSection","scanner","valueLength","charAt","nestedTokens","collector","numTokens","nestTokens","lastToken","squashedTokens","squashTokens","parseTemplate","render","partials","getConfigTags","renderTokens","originalTemplate","symbol","buffer","renderSection","renderInverted","renderPartial","unescapedValue","escapedValue","rawValue","indentPartial","partial","filteredIndentation","partialByNl","indentedValue","escape","getConfigEscape","defaultWriter","s","t","u","r","o","c","__r","f","diffed","e","__c","a","unmount","v","__h","__H","__","p","k","setState","y","__s","l","h","_","current","A","F","sub","props","T","useDebugValue","d","componentDidCatch","some","__P","forEach","b","g","__e","__v","requestAnimationFrame","clearTimeout","x","cancelAnimationFrame","setTimeout","E","S","C","ref","shouldComponentUpdate","displayName","isReactComponent","__f","isPureReactComponent","__b","Symbol","for","$$typeof","O","only","N","L","__k","U","__u","M","default","D","componentWillUnmount","forceUpdate","fallback","children","I","delete","revealOrder","getChildContext","W","parentNode","removeChild","document","createTextNode","appendChild","P","Map","reverse","componentDidUpdate","componentDidMount","z","V","B","H","textContent","Z","configurable","writable","Y","event","$","cancelBubble","G","defaultPrevented","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","J","K","class","Q","className","X","vnode","multiple","selected","nn","tn","ReactCurrentDispatcher","readContext","__n","en","rn","un","cn","ln","base","nodeType","fn","an","useState","useReducer","useEffect","useLayoutEffect","useRef","useImperativeHandle","useMemo","useCallback","useContext","Children","hydrate","unmountComponentAtNode","createPortal","createElement","createContext","createFactory","cloneElement","createRef","Fragment","isValidElement","findDOMNode","Component","PureComponent","memo","forwardRef","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","defaultProps","__d","constructor","debounceRendering","ownerSVGElement","nextSibling","insertBefore","setProperty","style","cssText","removeAttributeNS","setAttributeNS","removeAttribute","setAttribute","contextType","__E","getDerivedStateFromProps","componentWillMount","componentWillReceiveProps","componentWillUpdate","getSnapshotBeforeUpdate","localName","createElementNS","is","childNodes","dangerouslySetInnerHTML","__html","innerHTML","checked","Consumer","Provider","splice","getDerivedStateFromError","SortByHelper_1","apisearch_1","ApisearchHelper","applySortByToQuery","boostByWeightAndFilter","__spreadArray","pack","ar","apisearch_2","ApisearchHelper_1","ApisearchUIFactory_1","Bootstrap_1","Constants_1","Container_1","Environment_1","Widgets_1","ApisearchUI","environmentId","repository","store","initialSetupPerformed","activeWidgets","widgets","helper","dictionary","firstQuery","widget","withConfig","toUrlObject","fromUrlObject","fetchQuery","window","dispatchEvent","Event","bubbles","reset","initialQuery","getCurrentQuery","setCurrentQuery","setEmptyResult","loadQuery","fetchInitialQuery","setDictionary","addWidget","addWidgets","initialSetup","normalizeQuery","hash","createEnvironmentId","bootstrap","apisearchUI","APISEARCH_UI","dispatcher","APISEARCH_DISPATCHER","registerListener","payload","renderInitialData","renderFetchedData","updateApisearchSetup","uiId","ceil","random","reference","fromConfig","click","itemId","navigator","sendBeacon","getSite","getDevice","sendClickBeacon","queryAsArray","resultAsArray","getCurrentResult","postMessage","item_id","FormData","append","interact","getQuery","write","text","trim","pushQuery","queryObject","ApisearchUI_1","ApisearchUIFactory","instance","createUI","Dispatcher_1","Store_1","configAsString","repositoryId","APISEARCH_REPOSITORY","storeId","APISEARCH_STORE","dispatcherId","configId","APISEARCH_CONFIG","asuiId","register","_d","_e","_f","generate_random_session_uuid","initial_state","Dispatcher","Container","services","serviceCallback","callback","dispatch","highlightLine","inputTextParts","lineText","lineTextParts","word","replaces","lineWord","inputWord","minLength","min","allowedDistance","levenshteinDistance","entries","replaceAll","str1","str2","track","fill","indicator","highlightElement","inputText","querySelectorAll","extendStatics","setPrototypeOf","__proto__","events_1","Store","generateRandomSessionUUID","initialState","withHash","doNotCleanUrlHashAtFirst","dirty","loadInitialQuery","top","isUnderIframe","urlHash","substr","currentVisibleResults","createUID","isDirty","currentQuery","currentResult","setCurrentResult","hasProperResult","resultsAreVisible","replaceUrl","visibleResults","floor","characters","queryAsObject","urlObject","decodeURI","objectAsJson","encodeURI","pathWithoutHash","location","href","history","replaceState","preact_1","Template_1","defaultTemplates_1","BannerComponent","mobile_img","desktop_img","banners","filteredBanners","banner","firstBanner","prevState","has_url","breaking_point_size","breakingPointSize","image_prefix","imagePrefix","defaultBannerTemplate","onChangeSearchAction","aggregationSetup","Clone_1","aggregationField","clonedQuery","filterField","isChecked","filterValue","Helpers_1","CheckboxFilterActions_1","CheckboxFilterComponent","handleChange","containerClassName","classNames","container","topClassName","itemClassName","activeClassName","active","topTemplate","itemTemplate","isActive","getFilterValuesFromQuery","uid","templateData","onClick","stopPropagation","preventDefault","defaultItemTemplate","clearFiltersAction","filterToClear","filterValueToClear","valueIndex","ClearFiltersActions_1","ClearFiltersComponent","handleClick","appliedFilters","showClearFilters","handleIndividualClick","filterKey","appliedFiltersFormatted","getFiltersToShow","filterToAvoid","num","filtersListClassName","filtersList","filterClassName","containerTemplate","individualFilterClear","isEmptyClass","showIndividualFilterValueClear","values_1","isFilterPrice","filter_price","filter_price_only_to","filter_price_only_from","showIndividualFilterClear","showGlobalFilterClear","Clone","assign","onWordClickAction","category","InformationComponent","total","visible","formatData","toLocaleString","moreThanLimit","formattedTemplateData","more_than_limit","isFilterAvailable","isLeveledFilter","getShadowFilterValuesFromQuery","manageCurrentFilterItems","wasElementRecentlySelected","selectedItem","currentItems","deleteIfWasRemoved","withCurrent","fieldNameParts","currentLevel","fieldNameWithoutLevel","it_1","iterationFieldName","configureQueryWithShadowLeveledFilters","modifyQueryAggregationWithProperLevelValue","filterAction","shadowLeveledFilters","originalFilterField","levelCounter_1","leveledFieldName","fetchLimit","rangesValues","filterValues","labels","selectedFilter","af","MultipleFilterActions_1","ShowMoreComponent_1","MultipleFilterComponent","propsReceived","selectedFilterAsString","valuesAsString","wasNotSelected","filterItems","handleShowMore","viewLimit","handleShowLess","isViewLimitProperlySet","activeFirst","itemsListClassName","itemsList","showMoreContainerClassName","showMoreContainer","showMoreTemplate","showMore","showLessTemplate","showLess","itemsIds","allItems","zeroItemsFilters_1","allItemsLength","levelCounter","topData","hasApplied","nApplied","includes","currentLimit","getEnd","getStart","totalPagesToArray","getTotalPages","hitsPerPage","totalPages","pages","padding","currentPage","spectreSize","isTouchingLeft","isTouchingRight","isVisible","paginationChangeAction","selectedPage","NavigationComponent_1","PaginationActions_1","PaginationComponent","currentQuerySize","goFirstLast","disabledClassName","disabled","nextClassName","next","previousClassName","previous","lastClassName","last","firstClassName","first","nextTemplate","previousTemplate","firstTemplate","lastTemplate","currentQueryPage","spectre","previousDisabledClass","nextDisabledClass","priorityFilterAction","setupPriorityFilters","PriorityFilterActions_1","PriorityFilterComponent","priorityFilterName","priorityFilterObject","priorityFilter","defaultPriorityFilterItemTemplate","defaultPriorityFilterTopTemplate","withMinMax","realValueFrom","toWithIncluded","compat_1","RangeFilterActions_1","RangeFilterComponent","observerFrom","configureFromObserver","observerTo","configureToObserver","rangeUid","minValue","maxValue","MutationObserver","mutationsList","observer","mutationsList_1","mutation","attributeName","handleSliderChange","mutationsList_2","observe","getElementsByClassName","disconnect","applyFilter","handleSliderMove","updateRangeLayer","currencyPlaceholder","firstItem","firstItemPrice","firstItemPriceWithCurrency","getCurrencyPlaceholderFromPriceAndPriceWithCurrency","fromTo","getFromToFromFilter","currency_placeholder","realMin","realMax","previousProps","previousState","sliderTemplate","slider","wrapperClassName","wrapper","isNative","native","isNotNative","visibleStyle","input","step","onTouchEnd","onChange","positions","valueFrom","valueTo","price","priceWithCurrency","regex","maxValueIncluded","reloadAction","ReloadActions_1","ReloadComponent","Highlight_1","nextProps","nextState","shouldUpdate","uuid_composed","image","highlight","query_text","highlights_enabled","getElementById","isBestMatch","best_match","isExactMatch","exact_match","infiniteScrollNextPageAction","configureQuery","itemsPerPage","promotedUUIDs","excludedUUIDs","nextPage","ResultActions_1","Common_1","ResultComponent","fromLoadingNextPage","endResultsBoxRef","node","IntersectionObserver","isIntersecting","loadNextPage","handleAlternativeClick","customResponse","focus","fadeInSelector","hasNewPage","currentExpectedPage","addMouseDownListeners","handleClickOutside","closest","passive","promote","exclude","customResponseBody","placeholderClassName","placeholder","itemsListTemplate","placeholderTemplate","subResults","wrapperRef","redirection","content","resetRedirectionOnEnter","hasInfiniteScrollNextPage","infiniteScroll","infiniteScrollMargin","reducedTemplateData","isInfiniteActive","itemsForEvent","with_results","defaultItemsListTemplate","hydrateItem","infiniteScrollButton","next_page_button","subResult","alternative_title","query_text_html","alternative_all_results","noResults","apisearchReference","mainFields","fieldsConciliation","add_to_cart","striptags","val","defaultNoResultsItemTemplate","defaultAlternativeTitleTemplate","defaultAlternativeAllResultsTemplate","defaultNextPageButtonTemplate","AutocompleteComponent","inputClassName","queryTextLength","autocompleteText","formattedAutocompleteText","simpleSearchAction","initialSearchSetup","SearchInputActions_1","AutocompleteComponent_1","SearchInputComponent","inputRef","handleSearch","startSearchOn","finalSpace","targetValueNoSpaces","clearSearch","dispatchQueryStringEvent","handleKeyDown","replaceWithAutocomplete","keyCode","doNothing","currentQueryText","queryTextEvent","lastQueryTextStringDispatched","that_1","autofocus","withContainer","clearSearchClassName","clearSearchTemplate","htmlNodeInheritProps","showAutocomplete","keyDownCallback","keyDownAction","autocompletableClass","searchInput","onInput","onKeyDown","onTouchStart","speechRecognition","SnapshotComponent","queryAsJson","initialSortBySetup","initialOption","selectedOption","SortByActions_1","SortByComponent","currentOption","nextFirstSortAsString","nextVisible","selectClassName","select","option","queryValue","sortByData","enableSuggestions","SuggestionsFilterActions_1","SuggestionsFilterComponent","noSuggestionsClassName","Mustache","Translate_1","Template","renderTemplate","trans","Translate","parsed","parsedText","BannerComponent_1","Banner","component","querySelector","settings","CheckboxFilterComponent_1","CheckboxFilter","fieldValues","ClearFiltersComponent_1","ClearFilters","InformationComponent_1","Information","targetNode","MultipleFilterComponent_1","MultipleFilter","levelsValues","originalFieldValues","leveledValues","leveledFilterName","PaginationComponent_1","Pagination","PriorityFilterComponent_1","PriorityFilter","RangeFilterComponent_1","RangeFilter","minMaxCallback","onSliderMove","ReloadComponent_1","Reload","ResultComponent_1","SearchInputComponent_1","SearchInput","spellcheck","isInputElement","htmlNodeInheritedProps","getNodeAttributes","remove","isSecondRender","htmlNode","nodeAttributes","attr","specified","HTMLInputElement","SnapshotComponent_1","Snapshot","SortByComponent_1","firstOptionAsString","setSortToQuery","firstSortAsString","distanceSortParts","sortParts","SuggestionsFilterComponent_1","SuggestionsFilter","Widget","CheckboxFilter_1","ClearFilters_1","Information_1","MultipleFilter_1","Pagination_1","RangeFilter_1","Reload_1","SearchInput_1","Snapshot_1","Suggestions_1","Banner_1","PriorityFilter_1","clearFilters","multipleFilter","information","pagination","checkboxFilter","rangeFilter","reload","snapshot","_dataLength","_bufferLength","_state","Int32Array","_buffer","ArrayBuffer","_buffer8","Uint8Array","_buffer32","Uint32Array","str","raw","onePassHasher","appendStr","end","hashAsciiStr","appendAsciiStr","_hex","hc","hexChars","ho","hexOut","_md5cycle","stateIdentity","buf8","buf32","bufLen","charCodeAt","appendByteArray","getState","fromCharCode","buflen","buf","dataBitsLen","buffer32Identity","subarray","matches","lo","hi","Md5FileHasher","_callback","_async","_partSize","_configureReader","blob","_blob","_part","_md5","_processPart","_fail","success","_hashData","current_part","endbyte","_reader","readAsArrayBuffer","FileReader","onload","onerror","onabort","FileReaderSync","ParallelHasher","workerUri","workerOptions","_queue","_ready","Worker","_hashWorker","onmessage","_recievedMessage","_processNext","terminate","_processing","evt","__rest","propertyIsEnumerable","__decorate","decorators","desc","getOwnPropertyDescriptor","decorate","__param","paramIndex","decorator","__metadata","metadataKey","metadataValue","thisArg","_arguments","generator","fulfilled","rejected","done","ops","verb","op","__createBinding","k2","__values","__read","__spread","__spreadArrays","il","jl","__await","__asyncGenerator","asyncIterator","resume","fulfill","settle","__asyncDelegator","__asyncValues","__makeTemplateObject","cooked","__importStar","mod","__importDefault","__classPrivateFieldGet","privateMap","has","__classPrivateFieldSet","kindOf","thing","kindOfTest","typeOfTest","isUndefined","isArrayBuffer","isString","isNumber","isObject","isPlainObject","toStringTag","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","findKey","_key","_global","globalThis","isContextDefined","isTypedArray","TypedArray","isHTMLForm","prop","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","toUpperCase","isAsyncFn","utils$1","isBuffer","isFormData","kind","isArrayBufferView","isView","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","stripBOM","inherits","superConstructor","toFlatObject","sourceObj","destObj","propFilter","merged","endsWith","searchString","lastIndex","forEachEntry","pair","matchAll","regExp","exec","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","toCamelCase","p1","p2","noop","toFiniteNumber","defaultValue","isFinite","global","generateString","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","source","reducedValue","isThenable","catch","AxiosError","captureStackTrace","toJSON","description","number","fileName","lineNumber","columnNumber","prototype$1","isVisitable","removeBrackets","renderKey","path","dots","customProps","axiosError","cause","predicates","toFormData","formData","metaTokens","indexes","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","isFlatArray","el","exposedHelpers","build","encode$1","charMap","encodeURIComponent","AxiosURLSearchParams","_pairs","encode","buildURL","_encode","serializeFn","serialize","serializedParams","hashmarkIndex","encoder","InterceptorManager$1","handlers","use","synchronous","runWhen","eject","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","platform","freeze","formDataToJSON","buildPath","isNumericKey","isLast","arrayToObject","parsePropPath","defaults","transitional","adapter","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","parser","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","defaults$1","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","line","parseHeaders","tokensRE","parseTokens","matcher","deleted","deleteHeader","normalize","format","normalized","char","formatHeader","targets","asStrings","computed","accessor","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","AxiosHeaders$1","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","cookies","expires","domain","secure","cookie","Date","toGMTString","read","decodeURIComponent","now","buildFullPath","requestedURL","relativeURL","combineURLs","isURLSameOrigin","msie","userAgent","urlParsingNode","originURL","resolveURL","protocol","hostname","port","pathname","requestURL","progressEventReducer","isDownloadStream","bytesNotified","_speedometer","samplesCount","bytes","timestamps","firstSampleTS","head","chunkLength","startedAt","bytesCount","passed","round","speedometer","loaded","lengthComputable","progressBytes","rate","progress","estimated","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","Boolean","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","responseText","statusText","open","paramsSerializer","onreadystatechange","readyState","responseURL","ECONNABORTED","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","xsrfValue","setRequestHeader","withCredentials","onDownloadProgress","onUploadProgress","upload","cancel","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","httpAgent","httpsAgent","socketPath","responseEncoding","configValue","validators$1","deprecatedWarnings","validator","formatMessage","opt","opts","ERR_DEPRECATED","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","validators","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","responseInterceptorChain","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","Axios$1","CancelToken","executor","resolvePromise","onfulfilled","_resolve","CancelToken$1","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","HttpStatusCode$1","axios","createInstance","defaultConfig","VERSION","Cancel","promises","spread","isAxiosError","formToJSON","getAdapter","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/components/ClearFilters/ClearFiltersComponent.js b/lib/components/ClearFilters/ClearFiltersComponent.js index 016a953a..4bc8c068 100644 --- a/lib/components/ClearFilters/ClearFiltersComponent.js +++ b/lib/components/ClearFilters/ClearFiltersComponent.js @@ -112,7 +112,6 @@ var ClearFiltersComponent = /** @class */ (function (_super) { var filtersListClassName = props.classNames.filtersList; var filterClassName = props.classNames.filter; var containerTemplate = props.template.container; - var filterTemplate = props.template.filter; var appliedFiltersFormatted = this.state.appliedFilters; var individualFilterClear = null; var isEmptyClass = (this.state.appliedFilters.length === 0) ? "empty" : ""; @@ -125,14 +124,28 @@ var ClearFiltersComponent = /** @class */ (function (_super) { }); }); }); individualFilterClear = (0, preact_1.h)("ul", { className: "as-clearFilters__filtersList ".concat(filtersListClassName) }, values_1.map(function (filter) { + var _a, _b; + var isFilterPrice = filter.value.indexOf("..") >= 0; + var template = isFilterPrice + ? _this.props.template.filter_price + : _this.props.template.filter; + if (isFilterPrice) { + filter.parts = filter.value.replace(/[\[\]]/, "").split(".."); + if (((_a = filter.parts[0]) !== null && _a !== void 0 ? _a : "") === "0") { + template = _this.props.template.filter_price_only_to; + } + else if (((_b = filter.parts[1]) !== null && _b !== void 0 ? _b : "") === "") { + template = _this.props.template.filter_price_only_from; + } + } return (0, preact_1.h)("li", { className: "as-clearFilters__filter ".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, filter.value); } }, - (0, preact_1.h)(Template_1["default"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter })); + (0, preact_1.h)(Template_1["default"], { template: template, dictionary: _this.props.dictionary, data: filter })); })); } else if (props.showIndividualFilterClear) { individualFilterClear = (0, preact_1.h)("ul", { className: "as-clearFilters__filtersList ".concat(filtersListClassName) }, appliedFiltersFormatted.map(function (filter) { return (0, preact_1.h)("li", { className: "as-clearFilters__filter ".concat(filterClassName), onClick: function () { return _this.handleIndividualClick(filter.filter, null); } }, - (0, preact_1.h)(Template_1["default"], { template: filterTemplate, dictionary: _this.props.dictionary, data: filter })); + (0, preact_1.h)(Template_1["default"], { template: _this.props.template.filter, dictionary: _this.props.dictionary, data: filter })); })); } return (this.state.showClearFilters) diff --git a/src/components/ClearFilters/ClearFiltersComponent.tsx b/src/components/ClearFilters/ClearFiltersComponent.tsx index 5009db93..3988e1c0 100644 --- a/src/components/ClearFilters/ClearFiltersComponent.tsx +++ b/src/components/ClearFilters/ClearFiltersComponent.tsx @@ -118,7 +118,6 @@ class ClearFiltersComponent extends Component {values.map((filter) => { + const isFilterPrice = filter.value.indexOf("..") >= 0; + + let template = isFilterPrice + ? this.props.template.filter_price + : this.props.template.filter; + + if (isFilterPrice) { + filter.parts = filter.value.replace(/[\[\]]/, "").split(".."); + if ((filter.parts[0] ?? "") === "0") { + template = this.props.template.filter_price_only_to; + } else if ((filter.parts[1] ?? "") === "") { + template = this.props.template.filter_price_only_from; + } + } + return
  • this.handleIndividualClick(filter.filter, filter.value)}>