apisearch-autocomplete
Version:
Javascript User interface for a fully customized autocomplete search.
1 lines • 161 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.apisearchAutocomplete=e():t.apisearchAutocomplete=e()}("undefined"!=typeof self?self:this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=38)}([function(t,e,n){var r=n(22),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(48),i=n(53);t.exports=r},function(t,e,n){"use strict";function r(){}function o(t,e){var n,o,i,u,a=N;for(u=arguments.length;u-- >2;)L.push(arguments[u]);for(e&&null!=e.children&&(L.length||L.push(e.children),delete e.children);L.length;)if((o=L.pop())&&void 0!==o.pop)for(u=o.length;u--;)L.push(o[u]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof t)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?a[a.length-1]+=o:a===N?a=[o]:a.push(o),n=i;var c=new r;return c.nodeName=t,c.children=a,c.attributes=null==e?void 0:e,c.key=null==e?void 0:e.key,void 0!==P.vnode&&P.vnode(c),c}function i(t,e){for(var n in e)t[n]=e[n];return t}function u(t,e){return o(t.nodeName,i(i({},t.attributes),e),arguments.length>2?[].slice.call(arguments,2):t.children)}function a(t){!t._dirty&&(t._dirty=!0)&&1==F.push(t)&&(P.debounceRendering||B)(c)}function c(){var t,e=F;for(F=[];t=e.pop();)t._dirty&&I(t)}function f(t,e,n){return"string"==typeof e||"number"==typeof e?void 0!==t.splitText:"string"==typeof e.nodeName?!t._componentConstructor&&s(t,e.nodeName):n||t._componentConstructor===e.nodeName}function s(t,e){return t.normalizedNodeName===e||t.nodeName.toLowerCase()===e.toLowerCase()}function l(t){var e=i({},t.attributes);e.children=t.children;var n=t.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===e[r]&&(e[r]=n[r]);return e}function p(t,e){var n=e?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t);return n.normalizedNodeName=t,n}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function d(t,e,n,r,o){if("className"===e&&(e="class"),"key"===e);else if("ref"===e)n&&n(null),r&&r(t);else if("class"!==e||o)if("style"===e){if(r&&"string"!=typeof r&&"string"!=typeof n||(t.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(t.style[i]="");for(var i in r)t.style[i]="number"==typeof r[i]&&!1===U.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===e)r&&(t.innerHTML=r.__html||"");else if("o"==e[0]&&"n"==e[1]){var u=e!==(e=e.replace(/Capture$/,""));e=e.toLowerCase().substring(2),r?n||t.addEventListener(e,_,u):t.removeEventListener(e,_,u),(t._listeners||(t._listeners={}))[e]=r}else if("list"!==e&&"type"!==e&&!o&&e in t)v(t,e,null==r?"":r),null!=r&&!1!==r||t.removeAttribute(e);else{var a=o&&e!==(e=e.replace(/^xlink\:?/,""));null==r||!1===r?a?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.removeAttribute(e):"function"!=typeof r&&(a?t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),r):t.setAttribute(e,r))}else t.className=r||""}function v(t,e,n){try{t[e]=n}catch(t){}}function _(t){return this._listeners[t.type](P.event&&P.event(t)||t)}function y(){for(var t;t=D.pop();)P.afterMount&&P.afterMount(t),t.componentDidMount&&t.componentDidMount()}function g(t,e,n,r,o,i){M++||(z=null!=o&&void 0!==o.ownerSVGElement,G=null!=t&&!("__preactattr_"in t));var u=b(t,e,n,r,i);return o&&u.parentNode!==o&&o.appendChild(u),--M||(G=!1,i||y()),u}function b(t,e,n,r,o){var i=t,u=z;if(null!=e&&"boolean"!=typeof e||(e=""),"string"==typeof e||"number"==typeof e)return t&&void 0!==t.splitText&&t.parentNode&&(!t._component||o)?t.nodeValue!=e&&(t.nodeValue=e):(i=document.createTextNode(e),t&&(t.parentNode&&t.parentNode.replaceChild(i,t),w(t,!0))),i.__preactattr_=!0,i;var a=e.nodeName;if("function"==typeof a)return k(t,e,n,r);if(z="svg"===a||"foreignObject"!==a&&z,a=String(a),(!t||!s(t,a))&&(i=p(a,z),t)){for(;t.firstChild;)i.appendChild(t.firstChild);t.parentNode&&t.parentNode.replaceChild(i,t),w(t,!0)}var c=i.firstChild,f=i.__preactattr_,l=e.children;if(null==f){f=i.__preactattr_={};for(var h=i.attributes,d=h.length;d--;)f[h[d].name]=h[d].value}return!G&&l&&1===l.length&&"string"==typeof l[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=l[0]&&(c.nodeValue=l[0]):(l&&l.length||null!=c)&&m(i,l,n,r,G||null!=f.dangerouslySetInnerHTML),E(i,e.attributes,f),z=u,i}function m(t,e,n,r,o){var i,u,a,c,s,l=t.childNodes,p=[],d={},v=0,_=0,y=l.length,g=0,m=e?e.length:0;if(0!==y)for(var x=0;x<y;x++){var E=l[x],O=E.__preactattr_,T=m&&O?E._component?E._component.__key:O.key:null;null!=T?(v++,d[T]=E):(O||(void 0!==E.splitText?!o||E.nodeValue.trim():o))&&(p[g++]=E)}if(0!==m)for(var x=0;x<m;x++){c=e[x],s=null;var T=c.key;if(null!=T)v&&void 0!==d[T]&&(s=d[T],d[T]=void 0,v--);else if(!s&&_<g)for(i=_;i<g;i++)if(void 0!==p[i]&&f(u=p[i],c,o)){s=u,p[i]=void 0,i===g-1&&g--,i===_&&_++;break}s=b(s,c,n,r),a=l[x],s&&s!==t&&s!==a&&(null==a?t.appendChild(s):s===a.nextSibling?h(a):t.insertBefore(s,a))}if(v)for(var x in d)void 0!==d[x]&&w(d[x],!1);for(;_<=g;)void 0!==(s=p[g--])&&w(s,!1)}function w(t,e){var n=t._component;n?S(n):(null!=t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),!1!==e&&null!=t.__preactattr_||h(t),x(t))}function x(t){for(t=t.lastChild;t;){var e=t.previousSibling;w(t,!0),t=e}}function E(t,e,n){var r;for(r in n)e&&null!=e[r]||null==n[r]||d(t,r,n[r],n[r]=void 0,z);for(r in e)"children"===r||"innerHTML"===r||r in n&&e[r]===("value"===r||"checked"===r?t[r]:n[r])||d(t,r,n[r],n[r]=e[r],z)}function O(t){var e=t.constructor.name;(Y[e]||(Y[e]=[])).push(t)}function T(t,e,n){var r,o=Y[t.name];if(t.prototype&&t.prototype.render?(r=new t(e,n),R.call(r,e,n)):(r=new R(e,n),r.constructor=t,r.render=j),o)for(var i=o.length;i--;)if(o[i].constructor===t){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function j(t,e,n){return this.constructor(t,n)}function A(t,e,n,r,o){t._disable||(t._disable=!0,(t.__ref=e.ref)&&delete e.ref,(t.__key=e.key)&&delete e.key,!t.base||o?t.componentWillMount&&t.componentWillMount():t.componentWillReceiveProps&&t.componentWillReceiveProps(e,r),r&&r!==t.context&&(t.prevContext||(t.prevContext=t.context),t.context=r),t.prevProps||(t.prevProps=t.props),t.props=e,t._disable=!1,0!==n&&(1!==n&&!1===P.syncComponentUpdates&&t.base?a(t):I(t,1,o)),t.__ref&&t.__ref(t))}function I(t,e,n,r){if(!t._disable){var o,u,a,c=t.props,f=t.state,s=t.context,p=t.prevProps||c,h=t.prevState||f,d=t.prevContext||s,v=t.base,_=t.nextBase,b=v||_,m=t._component,x=!1;if(v&&(t.props=p,t.state=h,t.context=d,2!==e&&t.shouldComponentUpdate&&!1===t.shouldComponentUpdate(c,f,s)?x=!0:t.componentWillUpdate&&t.componentWillUpdate(c,f,s),t.props=c,t.state=f,t.context=s),t.prevProps=t.prevState=t.prevContext=t.nextBase=null,t._dirty=!1,!x){o=t.render(c,f,s),t.getChildContext&&(s=i(i({},s),t.getChildContext()));var E,O,j=o&&o.nodeName;if("function"==typeof j){var k=l(o);u=m,u&&u.constructor===j&&k.key==u.__key?A(u,k,1,s,!1):(E=u,t._component=u=T(j,k,s),u.nextBase=u.nextBase||_,u._parentComponent=t,A(u,k,0,s,!1),I(u,1,n,!0)),O=u.base}else a=b,E=m,E&&(a=t._component=null),(b||1===e)&&(a&&(a._component=null),O=g(a,o,s,n||!v,b&&b.parentNode,!0));if(b&&O!==b&&u!==m){var R=b.parentNode;R&&O!==R&&(R.replaceChild(O,b),E||(b._component=null,w(b,!1)))}if(E&&S(E),t.base=O,O&&!r){for(var C=t,L=t;L=L._parentComponent;)(C=L).base=O;O._component=C,O._componentConstructor=C.constructor}}if(!v||n?D.unshift(t):x||(t.componentDidUpdate&&t.componentDidUpdate(p,h,d),P.afterUpdate&&P.afterUpdate(t)),null!=t._renderCallbacks)for(;t._renderCallbacks.length;)t._renderCallbacks.pop().call(t);M||r||y()}}function k(t,e,n,r){for(var o=t&&t._component,i=o,u=t,a=o&&t._componentConstructor===e.nodeName,c=a,f=l(e);o&&!c&&(o=o._parentComponent);)c=o.constructor===e.nodeName;return o&&c&&(!r||o._component)?(A(o,f,3,n,r),t=o.base):(i&&!a&&(S(i),t=u=null),o=T(e.nodeName,f,n),t&&!o.nextBase&&(o.nextBase=t,u=null),A(o,f,1,n,r),t=o.base,u&&t!==u&&(u._component=null,w(u,!1))),t}function S(t){P.beforeUnmount&&P.beforeUnmount(t);var e=t.base;t._disable=!0,t.componentWillUnmount&&t.componentWillUnmount(),t.base=null;var n=t._component;n?S(n):e&&(e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),t.nextBase=e,h(e),O(t),x(e)),t.__ref&&t.__ref(null)}function R(t,e){this._dirty=!0,this.context=e,this.props=t,this.state=this.state||{}}function C(t,e,n){return g(n,t,{},!1,e,!1)}Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"h",function(){return o}),n.d(e,"createElement",function(){return o}),n.d(e,"cloneElement",function(){return u}),n.d(e,"Component",function(){return R}),n.d(e,"render",function(){return C}),n.d(e,"rerender",function(){return c}),n.d(e,"options",function(){return P});var P={},L=[],N=[],B="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,U=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,F=[],D=[],M=0,z=!1,G=!1,Y={};i(R.prototype,{setState:function(t,e){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof t?t(n,this.props):t),e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),a(this)},forceUpdate:function(t){t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),I(this,2)},render:function(){}});var q={h:o,createElement:o,cloneElement:u,Component:R,render:C,rerender:c,options:P};e.default=q},function(t,e,n){function r(t){return null==t?void 0===t?c:a:f&&f in Object(t)?i(t):u(t)}var o=n(6),i=n(49),u=n(50),a="[object Null]",c="[object Undefined]",f=o?o.toStringTag:void 0;t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){var r=n(0),o=r.Symbol;t.exports=o},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var o=n(76),i=n(77),u=n(78),a=n(79),c=n(80);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=u,r.prototype.has=a,r.prototype.set=c,t.exports=r},function(t,e,n){function r(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}var o=n(31);t.exports=r},function(t,e,n){var r=n(2),o=r(Object,"create");t.exports=o},function(t,e,n){function r(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}var o=n(94);t.exports=r},function(t,e,n){function r(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}var o=n(20),i=1/0;t.exports=r},function(t,e,n){function r(t,e){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}function o(t){return"string"==typeof t&&(t=t.split(/\s*,\s*/)),function(e){for(var n={},r=0;r<t.length;r++)n[t[r]]=e[t[r]];return n}}function i(t,e){for(var n in e)t[n]=e[n];return t}function u(t,e){return"function"!=typeof t&&(t=o(t||[])),function(n){function o(o,u){var a=this,f=u.store,s=t(f?f.getState():{},o),l=e?r(e,f):{store:f},p=function(){var e=t(f?f.getState():{},a.props);for(var n in e)if(e[n]!==s[n])return s=e,a.setState(null);for(var r in s)if(!(r in e))return s=e,a.setState(null)};this.componentDidMount=function(){p(),f.subscribe(p)},this.componentWillUnmount=function(){f.unsubscribe(p)},this.render=function(t){return c.h(n,i(i(i({},l),t),s))}}return(o.prototype=new c.Component).constructor=o}}function a(t){this.getChildContext=function(){return{store:t.store}}}var c=n(3);a.prototype.render=function(t){return t.children[0]},e.connect=u,e.Provider=a},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t){return u(t)?o(t):i(t)}var o=n(61),i=n(68),u=n(29);t.exports=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e,n){var r=n(2),o=n(0),i=r(o,"Map");t.exports=i},function(t,e,n){function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var o=n(86),i=n(93),u=n(95),a=n(96),c=n(97);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=u,r.prototype.has=a,r.prototype.set=c,t.exports=r},function(t,e,n){function r(t,e){if(o(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!u.test(t)||null!=e&&t in Object(e))}var o=n(1),i=n(20),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=r},function(t,e,n){function r(t){return"symbol"==typeof t||i(t)&&o(t)==u}var o=n(4),i=n(5),u="[object Symbol]";t.exports=r},function(t,e,n){function r(t){if(!i(t))return!1;var e=o(t);return e==a||e==c||e==u||e==f}var o=n(4),i=n(13),u="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",f="[object Proxy]";t.exports=r},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,n(23))},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){function n(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var r=Function.prototype,o=r.toString;t.exports=n},function(t,e,n){var r=n(63),o=n(5),i=Object.prototype,u=i.hasOwnProperty,a=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&u.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,e,n){(function(t){var r=n(0),o=n(64),i="object"==typeof e&&e&&!e.nodeType&&e,u=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=u&&u.exports===i,c=a?r.Buffer:void 0,f=c?c.isBuffer:void 0,s=f||o;t.exports=s}).call(e,n(15)(t))},function(t,e){function n(t,e){var n=typeof t;return!!(e=null==e?r:e)&&("number"==n||"symbol"!=n&&o.test(t))&&t>-1&&t%1==0&&t<e}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){var r=n(65),o=n(66),i=n(67),u=i&&i.isTypedArray,a=u?o(u):r;t.exports=a},function(t,e,n){function r(t){return null!=t&&i(t.length)&&!o(t)}var o=n(21),i=n(16);t.exports=r},function(t,e,n){function r(t){var e=this.__data__=new o(t);this.size=e.size}var o=n(7),i=n(81),u=n(82),a=n(83),c=n(84),f=n(85);r.prototype.clear=i,r.prototype.delete=u,r.prototype.get=a,r.prototype.has=c,r.prototype.set=f,t.exports=r},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){function r(t,e,n,u,a){return t===e||(null==t||null==e||!i(t)&&!i(e)?t!==t&&e!==e:o(t,e,n,u,r,a))}var o=n(98),i=n(5);t.exports=r},function(t,e,n){function r(t,e,n,r,f,s){var l=n&a,p=t.length,h=e.length;if(p!=h&&!(l&&h>p))return!1;var d=s.get(t);if(d&&s.get(e))return d==e;var v=-1,_=!0,y=n&c?new o:void 0;for(s.set(t,e),s.set(e,t);++v<p;){var g=t[v],b=e[v];if(r)var m=l?r(b,g,v,e,t,s):r(g,b,v,t,e,s);if(void 0!==m){if(m)continue;_=!1;break}if(y){if(!i(e,function(t,e){if(!u(y,e)&&(g===t||f(g,t,n,r,s)))return y.push(e)})){_=!1;break}}else if(g!==b&&!f(g,b,n,r,s)){_=!1;break}}return s.delete(t),s.delete(e),_}var o=n(99),i=n(102),u=n(103),a=1,c=2;t.exports=r},function(t,e,n){function r(t){return t===t&&!o(t)}var o=n(13);t.exports=r},function(t,e){function n(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}t.exports=n},function(t,e,n){function r(t,e){e=o(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[i(e[n++])];return n&&n==r?t:void 0}var o=n(37),i=n(11);t.exports=r},function(t,e,n){function r(t,e){return o(t)?t:i(t,e)?[t]:u(a(t))}var o=n(1),i=n(19),u=n(123),a=n(126);t.exports=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(39),i=r(o),u=n(40),a=r(u),c=n(41);t.exports=function(t){var e=(0,i.default)(t);return function(t){var n=t.inputTarget,r=t.resultTarget,o=t.poweredBy,i=t.itemsPerResult,u=t.startSearchOn,s=t.datasets;f(n);var l={client:e,poweredBy:o,datasets:s,itemsPerResult:i||10,startSearchOn:u||0,queryText:"",resultBoxOpen:!1,currentCursorIndex:0,items:[],total_hits:0},p=(0,a.default)(l);(0,c.renderInput)({store:p,target:n}),(0,c.renderResult)({store:p,target:r,defaultTarget:n})}};var f=function(t){if(void 0===t)throw new Error("A valid DOM target must be defined.")}},function(t,e,n){!function(e,n){t.exports=n()}("undefined"!=typeof self&&self,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=14)}([function(t,e,n){"use strict";function r(t){return"[object Array]"===O.call(t)}function o(t){return"[object ArrayBuffer]"===O.call(t)}function i(t){return"undefined"!=typeof FormData&&t instanceof FormData}function u(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function a(t){return"string"==typeof t}function c(t){return"number"==typeof t}function f(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function l(t){return"[object Date]"===O.call(t)}function p(t){return"[object File]"===O.call(t)}function h(t){return"[object Blob]"===O.call(t)}function d(t){return"[object Function]"===O.call(t)}function v(t){return s(t)&&d(t.pipe)}function _(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function m(){function t(t,n){"object"==typeof e[n]&&"object"==typeof t?e[n]=m(e[n],t):e[n]=t}for(var e={},n=0,r=arguments.length;n<r;n++)b(arguments[n],t);return e}function w(t,e,n){return b(e,function(e,r){t[r]=n&&"function"==typeof e?x(e,n):e}),t}var x=n(5),E=n(18),O=Object.prototype.toString;t.exports={isArray:r,isArrayBuffer:o,isBuffer:E,isFormData:i,isArrayBufferView:u,isString:a,isNumber:c,isObject:s,isUndefined:f,isDate:l,isFile:p,isBlob:h,isFunction:d,isStream:v,isURLSearchParams:_,isStandardBrowserEnv:g,forEach:b,merge:m,extend:w,trim:y}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e,n){if(r(this,t),void 0===e||void 0===e)throw new Error("Not valid coordinates object type given.");this.lat=e,this.lon=n};e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function t(){if(r(this,t),this.constructor.name===t)throw TypeError("You can't instantiate an Abstract class");if(void 0===this.toFilterObject)throw new TypeError("toFilterObject() method must be implemented.")};e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(){r(this,t)}return o(t,null,[{key:"isDefined",value:function(t){if(void 0===t)throw new TypeError("Method parameter must be defined.")}},{key:"isInteger",value:function(t){if("number"!=typeof t)throw new TypeError('\n "'+t+'" must be type of Integer, \n "'+t.constructor.name+'" given.\n ')}},{key:"isBool",value:function(t){if("boolean"!=typeof t)throw new TypeError('\n "'+t+'" must be type of Boolean, \n "'+t.constructor.name+'" given.\n ')}},{key:"isString",value:function(t){if("string"!=typeof t)throw new TypeError('\n "'+t+'" must be type of String, \n "'+t.constructor.name+'" given.\n ')}},{key:"isArray",value:function(t){if(t instanceof Array==!1)throw new TypeError('\n "'+t+'" must be type of Array, \n "'+t.constructor.name+'" given.\n ')}},{key:"isObjectTypeOf",value:function(t,e){if(t instanceof e!=!0)throw new TypeError('\n "'+t.constructor.name+'" must be type '+e.name+', \n "'+t.constructor.name+'" given.\n ')}}]),t}();e.default=i},function(t,e,n){"use strict";(function(e){function r(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var o=n(0),i=n(20),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(7):void 0!==e&&(t=n(7)),t}(),transformRequest:[function(t,e){return i(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t)?t:o.isArrayBufferView(t)?t.buffer:o.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):o.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(t){a.headers[t]={}}),o.forEach(["post","put","patch"],function(t){a.headers[t]=o.merge(u)}),t.exports=a}).call(e,n(6))},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(s===setTimeout)return setTimeout(t,0);if((s===n||!s)&&setTimeout)return s=setTimeout,setTimeout(t,0);try{return s(t,0)}catch(e){try{return s.call(null,t,0)}catch(e){return s.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function u(){v&&h&&(v=!1,h.length?d=h.concat(d):_=-1,d.length&&a())}function a(){if(!v){var t=o(u);v=!0;for(var e=d.length;e;){for(h=d,d=[];++_<e;)h&&h[_].run();_=-1,e=d.length}h=null,v=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function f(){}var s,l,p=t.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:n}catch(t){s=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(t){l=r}}();var h,d=[],v=!1,_=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||v||o(a)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=f,p.addListener=f,p.once=f,p.off=f,p.removeListener=f,p.removeAllListeners=f,p.emit=f,p.prependListener=f,p.prependOnceListener=f,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,n){"use strict";(function(e){var r=n(0),o=n(21),i=n(23),u=n(24),a=n(25),c=n(8),f="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(26);t.exports=function(t){return new Promise(function(s,l){var p=t.data,h=t.headers;r.isFormData(p)&&delete h["Content-Type"];var d=new XMLHttpRequest,v="onreadystatechange",_=!1;if("test"===e.env.NODE_ENV||"undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||a(t.url)||(d=new window.XDomainRequest,v="onload",_=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var y=t.auth.username||"",g=t.auth.password||"";h.Authorization="Basic "+f(y+":"+g)}if(d.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[v]=function(){if(d&&(4===d.readyState||_)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,n=t.responseType&&"text"!==t.responseType?d.response:d.responseText,r={data:n,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:e,config:t,request:d};o(s,l,r),d=null}},d.onerror=function(){l(c("Network Error",t,null,d)),d=null},d.ontimeout=function(){l(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var b=n(27),m=(t.withCredentials||a(t.url))&&t.xsrfCookieName?b.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in d&&r.forEach(h,function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete h[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),l(t),d=null)}),void 0===p&&(p=null),d.send(p)})}}).call(e,n(6))},function(t,e,n){"use strict";var r=n(22);t.exports=function(t,e,n,o,i){var u=new Error(t);return r(u,e,n,o,i)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new o(t),e(n.reason))})}var o=n(10);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function(){function t(e,n){r(this,t),this.id=e,this.type=n}return o(t,[{key:"composedUUID",value:function(){return this.id+"~"+this.type}}]),t}();e.default=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=(e.FILTER_IT_DOESNT_MATTER=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",function(){function t(e,n,o,i){var u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return r(this,t),this.field=e,this.values=n,this.application_type=o,this.filter_type=i,this.filter_terms=u,this}return o(t,null,[{key:"getFilterPathByField",value:function(t){return["id","type"].indexOf(t)>-1?"uuid."+t:"indexed_metadata."+t}}]),t}());e.default=i},function(t,e,n){"use strict";function r(t,e){if(void 0===t)throw new TypeError(e+" parameter must be defined.")}var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(15),u=function(t){return t&&t.__esModule?t:{default:t}}(i);t.exports=function(t){var e=t.appId,n=t.indexId,i=t.token,a=t.options,c=void 0===a?{}:a;return r(e,"appId"),r(n,"indexId"),r(i,"token"),c=o({endpoint:"https://apisearch.global.ssl.fastly.net",apiVersion:"v1",timeout:1e4,overrideQueries:!0,cache:!0},c),new u.default({appId:e,indexId:n,token:i,options:c})}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(16),a=r(u),c=n(34),f=r(c),s=n(38),l=r(s),p=n(43),h=r(p),d=function(){function t(e){var n=e.appId,r=e.indexId,i=e.token,u=e.options,c=u.endpoint,s=u.apiVersion,p=u.timeout,d=u.overrideQueries,v=u.cache;o(this,t),this.appId=n,this.indexId=r,this.token=i,this.apiVersion=s,this.endpoint=c,this.timeout=p,this.overrideQueries=d,this.query=l.default,this.createObject=f.default,this.client=new a.default(!!v&&new h.default)}return i(t,[{key:"search",value:function(t,e){var n=encodeURIComponent(JSON.stringify(t)),r=this.endpoint+"/"+this.apiVersion+"?app_id="+this.appId+"&index="+this.indexId+"&token="+this.token+"&query="+n;return this.fetch(r).then(function(t){return e(t,null)}).catch(function(t){return e(null,t)})}},{key:"events",value:function(t,e){var n=encodeURIComponent(JSON.stringify(t)),r=this.endpoint+"/"+this.apiVersion+"/events?app_id="+this.appId+"&index="+this.indexId+"&token="+this.token+"&query="+n;return this.fetch(r).then(function(t){return e(t,null)}).catch(function(t){return e(null,t)})}},{key:"fetch",value:function(t){var e={url:t,options:{timeout:this.timeout}};return this.overrideQueries&&this.client.abort(),this.client.query(e)}}]),t}();e.default=d},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(17),a=n(11),c=function(){function t(e){r(this,t),this.cache=e,this.cancelToken=a.source()}return i(t,[{key:"query",value:function(t){if(this.cache){var e=this.cache.get(t.url);if(e)return new Promise(function(t){return t(e)})}return this.fetchData(t)}},{key:"fetchData",value:function(t){t.options=o({},t.options,{cancelToken:this.cancelToken.token});var e=this;return new Promise(function(n,r){u.get(t.url,t.options).then(function(r){return e.cache&&e.cache.set(t.url,r.data),n(r.data)}).catch(function(t){return r(t)})})}},{key:"abort",value:function(){this.cancelToken.cancel(),this.cancelToken=a.source()}}]),t}();e.default=c},function(t,e,n){"use strict";function r(t){var e=new u(t),n=i(u.prototype.request,e);return o.extend(n,u.prototype,e),o.extend(n,e),n}var o=n(0),i=n(5),u=n(19),a=n(4),c=r(a);c.Axios=u,c.create=function(t){return r(o.merge(a,t))},c.Cancel=n(10),c.CancelToken=n(11),c.isCancel=n(9),c.all=function(t){return Promise.all(t)},c.spread=n(33),t.exports=c,t.exports.default=c},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function r(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new u,response:new u}}var o=n(4),i=n(0),u=n(28),a=n(29);r.prototype.request=function(t){"string"==typeof t&&(t=i.merge({url:arguments[0]},arguments[1])),t=i.merge(o,this.defaults,{method:"get"},t),t.method=t.method.toLowerCase();var e=[a,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},i.forEach(["delete","get","head","options"],function(t){r.prototype[t]=function(e,n){return this.request(i.merge(n||{},{method:t,url:e}))}}),i.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(i.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(0);t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(o.isURLSearchParams(e))i=e.toString();else{var u=[];o.forEach(e,function(t,e){null!==t&&void 0!==t&&(o.isArray(t)&&(e+="[]"),o.isArray(t)||(t=[t]),o.forEach(t,function(t){o.isDate(t)?t=t.toISOString():o.isObject(t)&&(t=JSON.stringify(t)),u.push(r(e)+"="+r(t))}))}),i=u.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";var r=n(0),o=["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"];t.exports=function(t){var e,n,i,u={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(u[e]&&o.indexOf(e)>=0)return;u[e]="set-cookie"===e?(u[e]?u[e]:[]).concat([n]):u[e]?u[e]+", "+n:n}}),u):u}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(o.setAttribute("href",e),e=o.href),o.setAttribute("href",e),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return e=t(window.location.href),function(n){var o=r.isString(n)?t(n):n;return o.protocol===e.protocol&&o.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";function r(){this.message="String contains an invalid character"}function o(t){for(var e,n,o=String(t),u="",a=0,c=i;o.charAt(0|a)||(c="=",a%1);u+=c.charAt(63&e>>8-a%1*8)){if((n=o.charCodeAt(a+=.75))>255)throw new r;e=e<<8|n}return u}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=o},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,o,i,u){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===u&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){o.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var o=n(0),i=n(30),u=n(9),a=n(4),c=n(31),f=n(32);t.exports=function(t){return r(t),t.baseURL&&!c(t.url)&&(t.url=f(t.baseURL,t.url)),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=o.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||a.adapter)(t).then(function(e){return r(t),e.data=i(e.data,e.headers,t.transformResponse),e},function(e){return u(e)||(r(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=n(12),a=r(u),c=n(1),f=r(c),s=n(35),l=r(s),p=n(36),h=r(p),d=n(37),v=r(d),_=function(){function t(){o(this,t)}return i(t,null,[{key:"uuid",value:function(t,e){return new a.default(t,e)}},{key:"coordinate",value:function(t,e){return new f.default(t,e)}},{key:"coordinateAndDistance",value:function(t,e){return new l.default(t,e)}},{key:"square",value:function(t,e){return new h.default(t,e)}},{key:"polygon",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return new(Function.prototype.bind.apply(v.default,[null].concat(e)))}}]),t}();e.default=_},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),f=r(c),s=n(1),l=r(s),p=n(3),h=r(p),d=function(t){function e(t,n){var r;o(this,e);var u=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return h.default.isObjectTypeOf(t,l.default),h.default.isString(n),u.coordinate=t,u.distance=n,r=u,i(u,r)}return u(e,t),a(e,[{key:"toFilterObject",value:function(){return{type:this.constructor.name,data:{coordinate:this.coordinate,distance:this.distance}}}}]),e}(f.default);e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),f=r(c),s=n(1),l=r(s),p=n(3),h=r(p),d=function(t){function e(t,n){var r;o(this,e),h.default.isObjectTypeOf(t,l.default),h.default.isObjectTypeOf(n,l.default);var u=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return u.topLeftCoordinate=t,u.bottomRightCoordinate=n,r=u,i(u,r)}return u(e,t),a(e,[{key:"toFilterObject",value:function(){return{type:this.constructor.name,data:{0:this.topLeftCoordinate,1:this.bottomRightCoordinate}}}}]),e}(f.default);e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(2),f=r(c),s=n(1),l=r(s),p=n(3),h=r(p),d=function(t){function e(){var t;o(this,e);for(var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),r=arguments.length,u=Array(r),a=0;a<r;a++)u[a]=arguments[a];if(u.length<3)throw new Error("A polygon needs more than two coordinates.");return n.coordinates=u.map(function(t){return h.default.isObjectTypeOf(t,l.default),t}),t=n,i(n,t)}return u(e,t),a(e,[{key:"toFilterObject",value:function(){return{type:this.constructor.name,data:this.coordinates}}}]),e}(f.default);e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),c=n(39),f=r(c),s=n(13),l=r(s),p=function(){function t(){i(this,t)}return a(t,null,[{key:"create",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.QUERY_DEFAULT_PAGE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.QUERY_DEFAULT_SIZE;return new f.default({q:t,from:(e-1)*n,page:e,size:n})}},{key:"createMatchAll",value:function(){return new f.default({q:"",page:c.QUERY_DEFAULT_PAGE,size:c.QUERY_INFINITE_SIZE})}},{key:"createLocated",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.QUERY_DEFAULT_PAGE,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c.QUERY_DEFAULT_SIZE;return new f.default({coordinate:t,page:n,size:r,q:e})}},{key:"createByUUID",value:function(t){return this.createByUUIDs(t)}},{key:"createByUUIDs",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.map(function(t){return t.composedUUID()}),i=new f.default({q:"",page:c.QUERY_DEFAULT_PAGE,size:c.QUERY_INFINITE_SIZE});return i.disableAggregations().disableSuggestions(),i.filters=u({},i.filters,o({},"_id",new l.default("_id",r.filter(function(t,e){return r.indexOf(t)===e}),s.FILTER_AT_LEAST_ONE,s.FILTER_TYPE_FIELD))),i}}]),t}();e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.QUERY_INFINITE_SIZE=e.QUERY_DEFAULT_SIZE=e.QUERY_DEFAULT_PAGE=e.QUERY_DEFAULT_FROM=void 0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f=n(12),s=r(f),l=n(1),p=r(l),h=n(3),d=r(h),v=n(40),_=r(v),y=n(41),g=r(y),b=n(13),m=r(b),w=n(2),x=r(w),E=(n(42),e.QUERY_DEFAULT_FROM=0),O=e.QUERY_DEFAULT_PAGE=1,T=e.QUERY_DEFAULT_SIZE=10,j=(e.QUERY_INFINITE_SIZE=1e3,function(){function t(e){return u(this,t),this.q=e.q,this.universe_filters=e.universe_filters||[],this.filters=e.filters||[],this.items_promoted=e.items_promoted||[],this.aggregations=e.aggregations||[],this.page=e.page||O,this.size=e.size||T,this.from=e.from||E,this.results_enabled=e.results_enabled||null,this.aggregations_enabled=e.aggregations_enabled||null,this.suggestions_enabled=e.suggestions_enabled||null,this.highlight_enabled=e.highlight_enabled||null,this.filter_fields=e.filter_fields||[],this.user=e.user||null,this.coordinate=void 0!==e.coordinate?new p.default(e.coordinate.lat,e.coordinate.lon):null,this.sort=null,this}return c(t,[{key:"setQueryText",value:function(t){return this.q=t,this}},{key:"setPage",value:function(t){return this.page=t,this}},{key:"setResultSize",value:function(t){return d.default.isInteger(t),this.size=t,this}},{key:"filterBy",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b.FILTER_AT_LEAST_ONE,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:y.AGGREGATION_SORT_BY_COUNT_DESC;d.default.isArray(n),d.default.isArray(u);var c=m.default.getFilterPathByField(e);return 0!==n.length?this.filters=a({},this.filters,i({},t,new m.default(c,n,r,b.FILTER_TYPE_FIELD))):delete this.filters[t],o&&this.aggregateBy(t,e,r,u),this}},{key:"filterByTypes",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y.AGGREGATION_SORT_BY_COUNT_DESC;d.default.isArray(t);var r=m.default.getFilterPathByField("type");return 0!==t.length?this.filters=a({},this.filters,i({},"type",new m.default(r,t,b.FILTER_AT_LEAST_ONE,b.FILTER_TYPE_FIELD))):delete this.filters.type,e&&(this.aggregations=a({},this.aggregations,i({},"type",new g.default("type",r,b.FILTER_AT_LEAST_ONE,b.FILTER_TYPE_FIELD,[],n)))),this}},{key:"filterByIds",value:function(t){d.default.isArray(t);var e=m.default.getFilterPathByField("id");return 0!==t.length?this.filters=a({},this.filters,i({},"id",new m.default(e,t,b.FILTER_AT_LEAST_ONE,b.FILTER_TYPE_FIELD))):delete this.filters.id,this}},{key:"filterByRange",value:function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b.FILTER_AT_LEAST_ONE,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:b.FILTER_TYPE_RANGE,c=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:y.AGGREGATION_SORT_BY_COUNT_DESC;d.default.isArray(n),d.default.isArray(r);var