/** * Skipped minification because the original files appears to be already minified. * Original file: /npm/@docsearch/js@3.8.3/dist/umd/index.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! @docsearch/js 3.8.3 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).docsearch=t()}(this,(function(){"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;t2&&(c.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===c[a]&&(c[a]=e.defaultProps[a]);return S(e,c,o,i,null)}function S(e,t,n,i,a){var c={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++o:a,__i:-1,__u:0};return null==a&&null!=r.vnode&&r.vnode(c),c}function O(e){return e.children}function w(e,t){this.props=e,this.context=t}function E(e,t){if(null==t)return e.__?E(e.__,e.__i+1):null;for(var n;tt&&i.sort(u));I.__r=0}function k(e,t,n,r,o,i,a,c,u,l,s){var f,p,m,d,_,g,b=r&&r.__k||h,w=t.length;for(u=function(e,t,n,r,o){var i,a,c,u,l,s=n.length,f=s,p=0;for(e.__k=new Array(o),i=0;i0?S(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,c=null,-1!==(l=a.__i=x(a,n,u,f))&&(f--,(c=n[l])&&(c.__u|=2)),null==c||null===c.__v?(-1==l&&p--,"function"!=typeof a.type&&(a.__u|=4)):l!=u&&(l==u-1?p--:l==u+1?p++:(l>u?p--:p++,a.__u|=4))):e.__k[i]=null;if(f)for(i=0;i(null==u||2&u.__u?0:1))for(o=n-1,i=n+1;o>=0||i=0){if((u=t[o])&&!(2&u.__u)&&a==u.key&&c===u.type)return o;o--}if(i2&&(u.children=arguments.length>3?n.call(arguments,2):r),S(e.type,u,o||e.key,i||e.ref,null)}n=h.slice,r={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},o=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=_({},this.state),"function"==typeof e&&(e=e(_({},n),this.props)),e&&_(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},w.prototype.render=O,i=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},I.__r=0,l=/(PointerCapture)$|Capture$/i,s=0,f=T(!1),p=T(!0),m=0;var K,W,z,J,Q=0,$=[],Z=r,G=Z.__b,Y=Z.__r,X=Z.diffed,ee=Z.__c,te=Z.unmount,ne=Z.__;function re(e,t){Z.__h&&Z.__h(W,e,Q||t),Q=0;var n=W.__H||(W.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function oe(e){return Q=1,ie(Se,e)}function ie(e,t,n){var r=re(K++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Se(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=W,!W.u)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter((function(e){return!!e.__c}));if(o.every((function(e){return!e.__N})))return!i||i.call(this,e,t,n);var a=r.__c.props!==e;return o.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),i&&i.call(this,e,t,n)||a};W.u=!0;var i=W.shouldComponentUpdate,a=W.componentWillUpdate;W.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},W.shouldComponentUpdate=o}return r.__N||r.__}function ae(e,t){var n=re(K++,3);!Z.__s&&be(n.__H,t)&&(n.__=e,n.i=t,W.__H.__h.push(n))}function ce(e,t){var n=re(K++,4);!Z.__s&&be(n.__H,t)&&(n.__=e,n.i=t,W.__h.push(n))}function ue(e){return Q=5,se((function(){return{current:e}}),[])}function le(e,t,n){Q=6,ce((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==n?n:n.concat(e))}function se(e,t){var n=re(K++,7);return be(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function fe(e,t){return Q=8,se((function(){return e}),t)}function pe(e){var t=W.context[e.__c],n=re(K++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(W)),t.props.value):e.__}function me(e,t){Z.useDebugValue&&Z.useDebugValue(t?t(e):e)}function ve(){var e=re(K++,11);if(!e.__){for(var t=W.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function he(){for(var e;e=$.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_e),e.__H.__h.forEach(ge),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}Z.__b=function(e){W=null,G&&G(e)},Z.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ne&&ne(e,t)},Z.__r=function(e){Y&&Y(e),K=0;var t=(W=e.__c).__H;t&&(z===W?(t.__h=[],W.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(_e),t.__h.forEach(ge),t.__h=[],K=0)),z=W},Z.diffed=function(e){X&&X(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==$.push(t)&&J===Z.requestAnimationFrame||((J=Z.requestAnimationFrame)||ye)(he)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),z=W=null},Z.__c=function(e,t){t.some((function(e){try{e.__h.forEach(_e),e.__h=e.__h.filter((function(e){return!e.__||ge(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Z.__e(n,e.__v)}})),ee&&ee(e,t)},Z.unmount=function(e){te&&te(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{_e(e)}catch(e){t=e}})),n.__H=void 0,t&&Z.__e(t,n.__v))};var de="function"==typeof requestAnimationFrame;function ye(e){var t,n=function(){clearTimeout(r),de&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);de&&(t=requestAnimationFrame(n))}function _e(e){var t=W,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),W=t}function ge(e){var t=W;e.__c=e.__(),W=t}function be(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Se(e,t){return"function"==typeof t?t(e):t}function Oe(e,t){for(var n in t)e[n]=t[n];return e}function we(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ee(e,t){var n=t(),r=oe({t:{__:n,u:t}}),o=r[0].t,i=r[1];return ce((function(){o.__=n,o.u=t,je(o)&&i({t:o})}),[e,n,t]),ae((function(){return je(o)&&i({t:o}),e((function(){je(o)&&i({t:o})}))}),[e]),n}function je(e){var t,n,r=e.u,o=e.__;try{var i=r();return!((t=o)===(n=i)&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(e){return!0}}function Pe(e){e()}function Ie(e){return e}function ke(){return[!1,Pe]}var De=ce;function Ce(e,t){this.props=e,this.context=t}(Ce.prototype=new w).isPureReactComponent=!0,Ce.prototype.shouldComponentUpdate=function(e,t){return we(this.props,e)||we(this.state,t)};var xe=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xe&&xe(e)};var Ae="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Ne=function(e,t){return null==e?null:C(C(e).map(t))},Te={map:Ne,forEach:Ne,count:function(e){return e?C(e).length:0},only:function(e){var t=C(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:C},Re=r.__e;r.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Re(e,t,n,r)};var Le=r.unmount;function qe(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=Oe({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return qe(e,t,n)}))),e}function Me(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Me(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function He(){this.__u=0,this.o=null,this.__b=null}function Ue(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Fe(){this.i=null,this.l=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Le&&Le(e)},(He.prototype=new w).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=Ue(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(c):c())};n.__R=a;var c=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Me(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},He.prototype.componentWillUnmount=function(){this.o=[]},He.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=qe(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&b(O,null,e.fallback);return o&&(o.__u&=-33),[b(O,null,t.__a?null:e.children),o]};var Be=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.h.removeChild(e)}}),F(b(Ve,{context:t.context},e.__v),t.v)}function We(e,t){var n=b(Ke,{__v:e,h:t});return n.containerInfo=t,n}(Fe.prototype=new w).__a=function(e){var t=this,n=Ue(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Be(t,e,r)):o()};n?n(i):i()}},Fe.prototype.render=function(e){this.i=null,this.l=new Map;var t=C(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Fe.prototype.componentDidUpdate=Fe.prototype.componentDidMount=function(){var e=this;this.l.forEach((function(t,n){Be(e,n,t)}))};var ze="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Je=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Qe=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,$e=/[A-Z0-9]/g,Ze="undefined"!=typeof document,Ge=function(e){return("undefined"!=typeof Symbol&&"symbol"==t(Symbol())?/fil|che|rad/:/fil|che|ra/).test(e)};function Ye(e,t,n){return null==t.__k&&(t.textContent=""),F(e,t),"function"==typeof n&&n(),e?e.__c:null}w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Xe=r.event;function et(){}function tt(){return this.cancelBubble}function nt(){return this.defaultPrevented}r.event=function(e){return Xe&&(e=Xe(e)),e.persist=et,e.isPropagationStopped=tt,e.isDefaultPrevented=nt,e.nativeEvent=e};var rt,ot={enumerable:!1,configurable:!0,get:function(){return this.class}},it=r.vnode;r.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1===n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||Ze&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var c=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===c&&"no"===a?a=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?i="ondblclick":"onchange"!==c||"input"!==n&&"textarea"!==n||Ge(t.type)?"onfocus"===c?i="onfocusin":"onblur"===c?i="onfocusout":Qe.test(i)&&(i=c):c=i="oninput":o&&Je.test(i)?i=i.replace($e,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===c&&r[i=c]&&(i="oninputCapture"),r[i]=a}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=C(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=C(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ot)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=ze,it&&it(e)};var at=r.__r;r.__r=function(e){at&&at(e),rt=e.__c};var ct=r.diffed;r.diffed=function(e){ct&&ct(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),rt=null};var ut={ReactCurrentDispatcher:{current:{readContext:function(e){return rt.__n[e.__c].props.value},useCallback:fe,useContext:pe,useDebugValue:me,useDeferredValue:Ie,useEffect:ae,useId:ve,useImperativeHandle:le,useInsertionEffect:De,useLayoutEffect:ce,useMemo:se,useReducer:ie,useRef:ue,useState:oe,useSyncExternalStore:Ee,useTransition:ke}}};function lt(e){return!!e&&e.$$typeof===ze}var st={useState:oe,useId:ve,useReducer:ie,useEffect:ae,useLayoutEffect:ce,useInsertionEffect:De,useTransition:ke,useDeferredValue:Ie,useSyncExternalStore:Ee,startTransition:Pe,useRef:ue,useImperativeHandle:le,useMemo:se,useCallback:fe,useContext:pe,useDebugValue:me,version:"18.3.1",Children:Te,render:Ye,hydrate:function(e,t,n){return B(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(F(null,e),!0)},createPortal:We,createElement:b,createContext:function(e,t){var n={__c:t="__cC"+m++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.forEach((function(e){e.__e=!0,P(e)}))},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(e){return b.bind(null,e)},cloneElement:function(e){return lt(e)?V.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:O,isValidElement:lt,isElement:lt,isFragment:function(e){return lt(e)&&e.type===O},isMemo:function(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:w,PureComponent:Ce,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:we(this.props,e)}function r(t){return this.shouldComponentUpdate=n,b(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(e){function t(t){var n=Oe({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ae,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:O,Suspense:He,SuspenseList:Fe,lazy:function(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return b(n,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ut};function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},n}function Pt(e,t){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pt(e,t)}function It(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,c=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(e,t)||Dt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e){return function(e){if(Array.isArray(e))return ft(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Dt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dt(e,t){if(e){if("string"==typeof e)return ft(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(e,t):void 0}}function Ct(e){var t="function"==typeof Map?new Map:void 0;return Ct=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(St())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Pt(o,n.prototype),o}(e,arguments,gt(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Pt(n,e)},Ct(e)}function xt(){return st.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},st.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function At(){return st.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},st.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Nt=["translations"],Tt="Ctrl",Rt=st.forwardRef((function(e,t){var n=e.translations,r=void 0===n?{}:n,o=Et(e,Nt),i=r.buttonText,a=void 0===i?"Search":i,c=r.buttonAriaLabel,u=void 0===c?"Search":c,l=It(oe(null),2),s=l[0],f=l[1];ae((function(){"undefined"!=typeof navigator&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("⌘"):f(Tt))}),[]);var p=It(s===Tt?[Tt,"Ctrl",st.createElement(xt,null)]:["Meta","Command",s],3),m=p[0],v=p[1],h=p[2];return st.createElement("button",_t({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(u," (").concat(v,"+K)")},o,{ref:t}),st.createElement("span",{className:"DocSearch-Button-Container"},st.createElement(At,null),st.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),st.createElement("span",{className:"DocSearch-Button-Keys"},null!==s&&st.createElement(st.Fragment,null,st.createElement(Lt,{reactsToKey:m},h),st.createElement(Lt,{reactsToKey:"k"},"K"))))}));function Lt(e){var t=e.reactsToKey,n=e.children,r=It(oe(!1),2),o=r[0],i=r[1];return ae((function(){if(t)return window.addEventListener("keydown",e),window.addEventListener("keyup",n),function(){window.removeEventListener("keydown",e),window.removeEventListener("keyup",n)};function e(e){e.key===t&&i(!0)}function n(e){e.key!==t&&"Meta"!==e.key||i(!1)}}),[t]),st.createElement("kbd",{className:o?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},n)}function qt(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function en(e){for(var t=1;t=3||2===n&&r>=4||1===n&&r>=10);function i(t,n,r){if(o&&void 0!==r){var i=r[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(Zt(n),[{headers:a}]))}else e.apply(void 0,[t].concat(Zt(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("clickedObjectIDsAfterSearch",nn(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("clickedObjectIDs",nn(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("convertedObjectIDsAfterSearch",nn(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&i("convertedObjectIDs",nn(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&t.reduce((function(e,t){var n=t.items,r=Yt(t,Qt);return[].concat(Zt(e),Zt(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function on(e){var t=e.items.reduce((function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e}),{});return Object.keys(t).map((function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}}))}function an(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function cn(e){return cn="function"==typeof Symbol&&"symbol"==t(Symbol.iterator)?function(e){return t(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},cn(e)}function un(e){return function(e){if(Array.isArray(e))return ln(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ln(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ln(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ln(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&hn({onItemsChange:o,items:n,insights:l,state:t}))}}),0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function o(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:fn(fn({},c?{clickAnalytics:!0}:{}),e?{userToken:_n(e)}:{}),insights:l}})}u("addAlgoliaAgent","insights-plugin"),o(),u("onUserTokenChange",(function(e){o(e)})),u("getUserToken",null,(function(e,t){o(t)})),n((function(e){var t=e.item,n=e.state,r=e.event,o=e.source;an(t)&&i({state:n,event:r,insights:l,item:t,insightsEvents:[fn({eventName:"Item Selected"},Wt({item:t,items:o.getItems().filter(an)}))]})})),r((function(e){var t=e.item,n=e.source,r=e.state,o=e.event;an(t)&&a({state:r,event:o,insights:l,item:t,insightsEvents:[fn({eventName:"Item Active"},Wt({item:t,items:n.getItems().filter(an)}))]})}))},onStateChange:function(e){var t=e.state;f({state:t})},__autocomplete_pluginOptions:e}}function yn(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(un(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],un(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function _n(e){return"number"==typeof e?e.toString():e}function gn(e,t){var n=t;return{then:function(t,r){return gn(e.then(Sn(t,n,e),Sn(r,n,e)),n)},catch:function(t){return gn(e.catch(Sn(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),gn(e.finally(Sn(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach((function(e){e()}))},isCanceled:function(){return!0===n.isCanceled}}}function bn(e){return gn(e,{isCanceled:!1,onCancelList:[]})}function Sn(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function On(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function En(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(Ht++),plugins:o,initialState:Fn({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(function(e){return function(e){if(Array.isArray(e))return Hn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Hn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then((function(e){return Promise.all(e.filter((function(e){return Boolean(e)})).map((function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:Vt,onResolve:Vt};Object.keys(t).forEach((function(e){t[e].__default=!0}));var r=En(En({},t),e);return Promise.resolve(r)})))}))}(e,n)}))).then((function(e){return Mt(e)})).then((function(e){return e.map((function(e){return Fn(Fn({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))},onResolve:function(n){e.onResolve(n),t.forEach((function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Fn({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==t(Symbol.iterator)?function(e){return t(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},Kn(e)}function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,rr);sr&&o.environment.clearTimeout(sr);var l=u.setCollections,s=u.setIsOpen,f=u.setQuery,p=u.setActiveItemId,m=u.setStatus,v=u.setContext;if(f(i),p(o.defaultActiveItemId),!i&&!1===o.openOnFocus){var h,d=c.getState().collections.map((function(e){return ir(ir({},e),{},{items:[]})}));m("idle"),l(d),s(null!==(h=r.isOpen)&&void 0!==h?h:o.shouldPanelOpen({state:c.getState()}));var y=bn(fr(d).then((function(){return Promise.resolve()})));return c.pendingRequests.add(y)}m("loading"),sr=o.environment.setTimeout((function(){m("stalled")}),o.stallThreshold);var _=bn(fr(o.getSources(ir({query:i,refresh:a,state:c.getState()},u)).then((function(e){return Promise.all(e.map((function(e){return Promise.resolve(e.getItems(ir({query:i,refresh:a,state:c.getState()},u))).then((function(t){return function(e,t,n){if(o=e,Boolean(null==o?void 0:o.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(Yn(Object.keys(n.context).map((function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters}))))):{};return Zn(Zn({},e),{},{requests:e.queries.map((function(n){return{query:"algolia"===e.requesterId?Zn(Zn({},n),{},{params:Zn(Zn({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}}))})}var o;return{items:e,sourceId:t}}(t,e.sourceId,c.getState())}))}))).then(tr).then((function(t){var n,r=t.some((function(e){return function(e){return!Array.isArray(e)&&Boolean(null==e?void 0:e._automaticInsights)}(e.items)}));return r&&v({algoliaInsightsPlugin:ir(ir({},(null===(n=c.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map((function(t){var r,o=e.filter((function(e){return e.sourceId===t.sourceId})),i=o.map((function(e){return e.items})),a=o[0].transformResponse,c=a?a({results:r=i,hits:r.map((function(e){return e.hits})).filter(Boolean),facetHits:r.map((function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map((function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}}))})).filter(Boolean)}):i;return t.onResolve({source:t,results:i,items:c,state:n.getState()}),c.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:c}}))}(t,e,c)})).then((function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce((function(e,t){return zn(zn({},e),{},Jn({},t.source.sourceId,zn(zn({},t.source),{},{getItems:function(){return Mt(t.items)}})))}),{}),o=t.plugins.reduce((function(e,t){return t.reshape?t.reshape(e):e}),{sourcesBySourceId:r,state:n}).sourcesBySourceId;return Mt(t.reshape({sourcesBySourceId:o,sources:Object.values(o),state:n})).filter(Boolean).map((function(e){return{source:e,items:e.getItems()}}))}({collections:e,props:o,state:c.getState()})}))})))).then((function(e){var n;m("idle"),l(e);var f=o.shouldPanelOpen({state:c.getState()});s(null!==(n=r.isOpen)&&void 0!==n?n:o.openOnFocus&&!i&&f||f);var p=In(c.getState());if(null!==c.getState().activeItemId&&p){var v=p.item,h=p.itemInputValue,d=p.itemUrl,y=p.source;y.onActive(ir({event:t,item:v,itemInputValue:h,itemUrl:d,refresh:a,source:y,state:c.getState()},u))}})).finally((function(){m("idle"),sr&&o.environment.clearTimeout(sr)}));return c.pendingRequests.add(_)}function mr(e){return mr="function"==typeof Symbol&&"symbol"==t(Symbol.iterator)?function(e){return t(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},mr(e)}var vr=["event","props","refresh","store"];function hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dr(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Dr(e){var t=e.props,n=e.refresh,r=e.store,o=kr(e,gr);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,i].some((function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return Pr({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},kr(e,br))},getRootProps:function(e){return Pr({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return kn(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":kn(t.id,"label")},e)},getFormProps:function(e){return e.inputElement,Pr({action:"",noValidate:!0,role:"search",onSubmit:function(i){var a;i.preventDefault(),t.onSubmit(Pr({event:i,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()},onReset:function(i){var a;i.preventDefault(),t.onReset(Pr({event:i,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},kr(e,Sr))},getLabelProps:function(e){return Pr({htmlFor:kn(t.id,"input"),id:kn(t.id,"label")},e)},getInputProps:function(e){var i;function a(e){(t.openOnFocus||Boolean(r.getState().query))&&pr(Pr({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var c=e||{};c.inputElement;var u=c.maxLength,l=void 0===u?512:u,s=kr(c,Or),f=In(r.getState()),p=function(e){return Boolean(e&&e.match(Dn))}((null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||""),m=t.enterKeyHint||(null!=f&&f.itemUrl&&!p?"go":"search");return Pr({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?kn(t.id,"item-".concat(r.getState().activeItemId),null==f?void 0:f.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.map((function(e){var n=e.source;return kn(t.id,"list",n)})).join(" "):void 0,"aria-labelledby":kn(t.id,"label"),value:r.getState().completion||r.getState().query,id:kn(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:m,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:l,type:"search",onChange:function(e){var i=e.currentTarget.value;t.ignoreCompositionEvents&&Cn(e).isComposing?o.setQuery(i):pr(Pr({event:e,props:t,query:i.slice(0,l),refresh:n,store:r},o))},onCompositionEnd:function(e){pr(Pr({event:e,props:t,query:e.currentTarget.value.slice(0,l),refresh:n,store:r},o))},onKeyDown:function(e){Cn(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,vr);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=In(o.getState()),t=n.environment.document.getElementById(kn(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},c=function(){var e=In(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,a=e.itemInputValue,c=e.itemUrl,u=e.source;u.onActive(dr({event:t,item:n,itemInputValue:a,itemUrl:c,refresh:r,source:u,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?pr(dr({event:t,props:n,query:o.getState().query,refresh:r,store:o},i)).then((function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),c(),setTimeout(a,0)})):(o.dispatch(t.key,{}),c(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||o.pendingRequests.cancelAll());t.preventDefault();var u=In(o.getState()),l=u.item,s=u.itemInputValue,f=u.itemUrl,p=u.source;if(t.metaKey||t.ctrlKey)void 0!==f&&(p.onSelect(dr({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i)),n.navigator.navigateNewTab({itemUrl:f,item:l,state:o.getState()}));else if(t.shiftKey)void 0!==f&&(p.onSelect(dr({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i)),n.navigator.navigateNewWindow({itemUrl:f,item:l,state:o.getState()}));else if(t.altKey);else{if(void 0!==f)return p.onSelect(dr({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i)),void n.navigator.navigate({itemUrl:f,item:l,state:o.getState()});pr(dr({event:t,nextState:{isOpen:!1},props:n,query:s,refresh:r,store:o},i)).then((function(){p.onSelect(dr({event:t,item:l,itemInputValue:s,itemUrl:f,refresh:r,source:p,state:o.getState()},i))}))}}}(Pr({event:e,props:t,refresh:n,store:r},o))},onFocus:a,onBlur:Vt,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||a(n)}},s)},getPanelProps:function(e){return Pr({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=kr(n,wr);return Pr({role:"listbox","aria-labelledby":kn(t.id,"label"),id:kn(t.id,"list",r)},o)},getItemProps:function(e){var i=e.item,a=e.source,c=kr(e,Er);return Pr({id:kn(t.id,"item-".concat(i.__autocomplete_id),a),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(e){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var t=In(r.getState());if(null!==r.getState().activeItemId&&t){var a=t.item,c=t.itemInputValue,u=t.itemUrl,l=t.source;l.onActive(Pr({event:e,item:a,itemInputValue:c,itemUrl:u,refresh:n,source:l,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var c=a.getItemInputValue({item:i,state:r.getState()}),u=a.getItemUrl({item:i,state:r.getState()});(u?Promise.resolve():pr(Pr({event:e,nextState:{isOpen:!1},props:t,query:c,refresh:n,store:r},o))).then((function(){a.onSelect(Pr({event:e,item:i,itemInputValue:c,itemUrl:u,refresh:n,source:a,state:r.getState()},o))}))}},c)}}}function Cr(e){return Cr="function"==typeof Symbol&&"symbol"==t(Symbol.iterator)?function(e){return t(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},Cr(e)}function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t0&&st.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},st.createElement("p",{className:"DocSearch-Help"},c,":"),st.createElement("ul",null,p.slice(0,3).reduce((function(e,t){return[].concat(kt(e),[st.createElement("li",{key:t},st.createElement("button",{className:"DocSearch-Prefill",key:t,type:"button",onClick:function(){r.setQuery(t.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},t))])}),[]))),r.getMissingResultsUrl&&st.createElement("p",{className:"DocSearch-Help"},"".concat(l," "),st.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var so=["hit","attribute","tagName"];function fo(e,t){return t.split(".").reduce((function(e,t){return null!=e&&e[t]?e[t]:null}),e)}function po(e){var t=e.hit,n=e.attribute,r=e.tagName;return b(void 0===r?"span":r,wt(wt({},Et(e,so)),{},{dangerouslySetInnerHTML:{__html:fo(t,"_snippetResult.".concat(n,".value"))||fo(t,n)}}))}function mo(e){return e.collection&&0!==e.collection.items.length?st.createElement("section",{className:"DocSearch-Hits"},st.createElement("div",{className:"DocSearch-Hit-source"},e.title),st.createElement("ul",e.getListProps(),e.collection.items.map((function(t,n){return st.createElement(vo,_t({key:[e.title,t.objectID].join(":"),item:t,index:n},e))})))):null}function vo(e){var t=e.item,n=e.index,r=e.renderIcon,o=e.renderAction,i=e.getItemProps,a=e.onItemClick,c=e.collection,u=e.hitComponent,l=It(st.useState(!1),2),s=l[0],f=l[1],p=It(st.useState(!1),2),m=p[0],v=p[1],h=st.useRef(null),d=u;return st.createElement("li",_t({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",s&&"DocSearch-Hit--deleting",m&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){h.current&&h.current()}},i({item:t,source:c.source,onClick:function(e){a(t,e)}})),st.createElement(d,{hit:t},st.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:n}),t.hierarchy[t.type]&&"lvl1"===t.type&&st.createElement("div",{className:"DocSearch-Hit-content-wrapper"},st.createElement(po,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&st.createElement(po,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&("lvl2"===t.type||"lvl3"===t.type||"lvl4"===t.type||"lvl5"===t.type||"lvl6"===t.type)&&st.createElement("div",{className:"DocSearch-Hit-content-wrapper"},st.createElement(po,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),st.createElement(po,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),"content"===t.type&&st.createElement("div",{className:"DocSearch-Hit-content-wrapper"},st.createElement(po,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),st.createElement(po,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),o({item:t,runDeleteTransition:function(e){f(!0),h.current=e},runFavoriteTransition:function(e){v(!0),h.current=e}}))))}function ho(e,t,n){return e.reduce((function(e,r){var o=t(r);return e.hasOwnProperty(o)||(e[o]=[]),e[o].length<(n||5)&&e[o].push(r),e}),{})}function yo(e){return e}function _o(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function go(){}var bo=/(|<\/mark>)/g,So=RegExp(bo.source);function Oo(e){var t,n,r=e;if(!r.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=r.__docsearch_parent?null===(t=r.__docsearch_parent)||void 0===t||null===(t=t._highlightResult)||void 0===t||null===(t=t.hierarchy)||void 0===t?void 0:t.lvl0:null===(n=e._highlightResult)||void 0===n||null===(n=n.hierarchy)||void 0===n?void 0:n.lvl0;return o?o.value&&So.test(o.value)?o.value.replace(bo,""):o.value:e.hierarchy.lvl0}function wo(e){return st.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map((function(t){if(0===t.items.length)return null;var n=Oo(t.items[0]);return st.createElement(mo,_t({},e,{key:t.source.sourceId,title:n,collection:t,renderIcon:function(e){var n,r=e.item,o=e.index;return st.createElement(st.Fragment,null,r.__docsearch_parent&&st.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},st.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},r.__docsearch_parent!==(null===(n=t.items[o+1])||void 0===n?void 0:n.__docsearch_parent)?st.createElement("path",{d:"M8 6v21M20 27H8.3"}):st.createElement("path",{d:"M8 6v42M20 27H8.3"}))),st.createElement("div",{className:"DocSearch-Hit-icon"},st.createElement(to,{type:r.type})))},renderAction:function(){return st.createElement("div",{className:"DocSearch-Hit-action"},st.createElement(Xr,null))}}))})),e.resultsFooterComponent&&st.createElement("section",{className:"DocSearch-HitsFooter"},st.createElement(e.resultsFooterComponent,{state:e.state})))}var Eo=["translations"];function jo(e){var t=e.translations,n=void 0===t?{}:t,r=Et(e,Eo),o=n.recentSearchesTitle,i=void 0===o?"Recent":o,a=n.noRecentSearchesText,c=void 0===a?"No recent searches":a,u=n.saveRecentSearchButtonTitle,l=void 0===u?"Save this search":u,s=n.removeRecentSearchButtonTitle,f=void 0===s?"Remove this search from history":s,p=n.favoriteSearchesTitle,m=void 0===p?"Favorite":p,v=n.removeFavoriteSearchButtonTitle,h=void 0===v?"Remove this search from favorites":v;return"idle"===r.state.status&&!1===r.hasCollections?r.disableUserPersonalization?null:st.createElement("div",{className:"DocSearch-StartScreen"},st.createElement("p",{className:"DocSearch-Help"},c)):!1===r.hasCollections?null:st.createElement("div",{className:"DocSearch-Dropdown-Container"},st.createElement(mo,_t({},r,{title:i,collection:r.state.collections[0],renderIcon:function(){return st.createElement("div",{className:"DocSearch-Hit-icon"},st.createElement(Gr,null))},renderAction:function(e){var t=e.item,n=e.runFavoriteTransition,o=e.runDeleteTransition;return st.createElement(st.Fragment,null,st.createElement("div",{className:"DocSearch-Hit-action"},st.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.add(t),r.recentSearches.remove(t),r.refresh()}))}},st.createElement(oo,null))),st.createElement("div",{className:"DocSearch-Hit-action"},st.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),o((function(){r.recentSearches.remove(t),r.refresh()}))}},st.createElement(Yr,null))))}})),st.createElement(mo,_t({},r,{title:m,collection:r.state.collections[1],renderIcon:function(){return st.createElement("div",{className:"DocSearch-Hit-icon"},st.createElement(oo,null))},renderAction:function(e){var t=e.item,n=e.runDeleteTransition;return st.createElement("div",{className:"DocSearch-Hit-action"},st.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(e){e.preventDefault(),e.stopPropagation(),n((function(){r.favoriteSearches.remove(t),r.refresh()}))}},st.createElement(Yr,null)))}})))}var Po=["translations"],Io=st.memo((function(e){var t=e.translations,n=void 0===t?{}:t,r=Et(e,Po);if("error"===r.state.status)return st.createElement(co,{translations:null==n?void 0:n.errorScreen});var o=r.state.collections.some((function(e){return e.items.length>0}));return r.state.query?!1===o?st.createElement(lo,_t({},r,{translations:null==n?void 0:n.noResultsScreen})):st.createElement(wo,r):st.createElement(jo,_t({},r,{hasCollections:o,translations:null==n?void 0:n.startScreen}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status})),ko=["translations"];function Do(e){var t=e.translations,n=void 0===t?{}:t,r=Et(e,ko),o=n.resetButtonTitle,i=void 0===o?"Clear the query":o,a=n.resetButtonAriaLabel,c=void 0===a?"Clear the query":a,u=n.cancelButtonText,l=void 0===u?"Cancel":u,s=n.cancelButtonAriaLabel,f=void 0===s?"Cancel":s,p=n.searchInputLabel,m=void 0===p?"Search":p,v=r.getFormProps({inputElement:r.inputRef.current}).onReset;return st.useEffect((function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()}),[r.autoFocus,r.inputRef]),st.useEffect((function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()}),[r.isFromSelection,r.inputRef]),st.createElement(st.Fragment,null,st.createElement("form",{className:"DocSearch-Form",onSubmit:function(e){e.preventDefault()},onReset:v},st.createElement("label",_t({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),st.createElement(At,null),st.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},m)),st.createElement("div",{className:"DocSearch-LoadingIndicator"},st.createElement(Zr,null)),st.createElement("input",_t({className:"DocSearch-Input",ref:r.inputRef},r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:64}))),st.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!r.state.query},st.createElement(Yr,null))),st.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:r.onClose},l))}var Co=["_highlightResult","_snippetResult"];function xo(e){var t=e.key,n=e.limit,r=void 0===n?5:n,o=function(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(e){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}(t),i=o.getItem().slice(0,r);return{add:function(e){var t=e;t._highlightResult,t._snippetResult;var n=Et(t,Co),a=i.findIndex((function(e){return e.objectID===n.objectID}));a>-1&&i.splice(a,1),i.unshift(n),i=i.slice(0,r),o.setItem(i)},remove:function(e){i=i.filter((function(t){return t.objectID!==e.objectID})),o.setItem(i)},getAll:function(){return i}}}function Ao(e){var t,n="algolia-client-js-".concat(e.key);function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(r().getItem(n)||"{}")}function i(e){r().setItem(n,JSON.stringify(e))}return{get:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){var n,r,a;return n=e.timeToLive?1e3*e.timeToLive:null,r=o(),i(a=Object.fromEntries(Object.entries(r).filter((function(e){return void 0!==It(e,2)[1].timestamp})))),n&&i(Object.fromEntries(Object.entries(a).filter((function(e){var t=It(e,2)[1],r=(new Date).getTime();return!(t.timestamp+n2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,n.miss(e)])})).then((function(e){return It(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(e,r,o).catch((function(){return No({caches:t}).get(e,r,o)}))},set:function(e,r){return n.set(e,r).catch((function(){return No({caches:t}).set(e,r)}))},delete:function(e){return n.delete(e).catch((function(){return No({caches:t}).delete(e)}))},clear:function(){return n.clear().catch((function(){return No({caches:t}).clear()}))}}}function To(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(n);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);var a=r();return a.then((function(e){return o.miss(e)})).then((function(){return a}))},set:function(n,r){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Ro(e){var t=e.algoliaAgents,n=e.client,r=e.version,o=function(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var n="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(n)&&(t.value="".concat(t.value).concat(n)),t}};return t}(r).add({segment:n,version:r});return t.forEach((function(e){return o.add(e)})),o}var Lo=12e4;function qo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"up",n=Date.now();return wt(wt({},e),{},{status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>Lo},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=Lo}})}var Mo=function(){function e(t,n){var r;return ht(this,e),yt(r=vt(this,e,[t]),"name","AlgoliaError"),n&&(r.name=n),r}return bt(e,Ct(Error)),dt(e)}(),Ho=function(){function e(t,n,r){var o;return ht(this,e),yt(o=vt(this,e,[t,r]),"stackTrace",void 0),o.stackTrace=n,o}return bt(e,Mo),dt(e)}(),Uo=function(){function e(t){return ht(this,e),vt(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return bt(e,Ho),dt(e)}(),Fo=function(){function e(t,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ApiError";return ht(this,e),yt(o=vt(this,e,[t,r,i]),"status",void 0),o.status=n,o}return bt(e,Ho),dt(e)}(),Bo=function(){function e(t,n){var r;return ht(this,e),yt(r=vt(this,e,[t,"DeserializationError"]),"response",void 0),r.response=n,r}return bt(e,Mo),dt(e)}(),Vo=function(){function e(t,n,r,o){var i;return ht(this,e),yt(i=vt(this,e,[t,n,o,"DetailedApiError"]),"error",void 0),i.error=r,i}return bt(e,Fo),dt(e)}();function Ko(e,t,n){var r,o=(r=n,Object.keys(r).filter((function(e){return void 0!==r[e]})).sort().map((function(e){return"".concat(e,"=").concat(encodeURIComponent("[object Array]"===Object.prototype.toString.call(r[e])?r[e].join(","):r[e]).replace(/\+/g,"%20"))})).join("&")),i="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat("/"===t.charAt(0)?t.substring(1):t);return o.length&&(i+="?".concat(o)),i}function Wo(e,t){if("GET"!==e.method&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:wt(wt({},e.data),t.data);return JSON.stringify(n)}}function zo(e,t,n){var r=wt(wt(wt({Accept:"application/json"},e),t),n),o={};return Object.keys(r).forEach((function(e){var t=r[e];o[e.toLowerCase()]=t})),o}function Jo(e){try{return JSON.parse(e.content)}catch(t){throw new Bo(t.message,e)}}function Qo(e,t){var n=e.content,r=e.status;try{var o=JSON.parse(n);return"error"in o?new Vo(o.message,r,o.error,t):new Fo(o.message,r,t)}catch(e){}return new Fo(n,r,t)}function $o(e){return e.map((function(e){return Zo(e)}))}function Zo(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return wt(wt({},e),{},{request:wt(wt({},e.request),{},{headers:wt(wt({},e.request.headers),t)})})}var Go=["appId","apiKey","authMode","algoliaAgents"],Yo=["params"],Xo="5.19.0";function ei(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){for(var t=e,n=e.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),o=e[n];t[n]=e[r],t[r]=o}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var ti="3.8.3";function ni(e,t,n){return st.useMemo((function(){var r=function(e,t){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,n=e.apiKey,r=e.authMode,o=e.algoliaAgents,i=Et(e,Go),a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"WithinHeaders",r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:function(){return"WithinHeaders"===n?r:{}},queryParameters:function(){return"WithinQueryParameters"===n?r:{}}}}(t,n,r),c=function(e){var t=e.hosts,n=e.hostsCache,r=e.baseHeaders,o=e.logger,i=e.baseQueryParameters,a=e.algoliaAgent,c=e.timeouts,u=e.requester,l=e.requestsCache,s=e.responsesCache;function f(e){return p.apply(this,arguments)}function p(){return(p=mt(jt().mark((function e(t){var r,o,i,a,c;return jt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(t.map((function(e){return n.get(e,(function(){return Promise.resolve(qo(e))}))})));case 2:return r=e.sent,o=r.filter((function(e){return e.isUp()})),i=r.filter((function(e){return e.isTimedOut()})),a=[].concat(kt(o),kt(i)),c=a.length>0?a:t,e.abrupt("return",{hosts:c,getTimeout:function(e,t){return(0===i.length&&0===e?1:i.length+3+e)*t}});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return v.apply(this,arguments)}function v(){return v=mt(jt().mark((function e(l,s){var p,m,v,h,d,y,_,g,b,S,O,w,E,j=arguments;return jt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p=!(j.length>2&&void 0!==j[2])||j[2],m=[],v=Wo(l,s),h=zo(r,l.headers,s.headers),d="GET"===l.method?wt(wt({},l.data),s.data):{},y=wt(wt(wt({},i),l.queryParameters),d),a.value&&(y["x-algolia-agent"]=a.value),s&&s.queryParameters)for(_=0,g=Object.keys(s.queryParameters);_1&&void 0!==arguments[1]?arguments[1]:{},n=e.useReadTransporter||"GET"===e.method;if(!n)return m(e,t,n);var o=function(){return m(e,t)};if(!0!==(t.cacheable||e.cacheable))return o();var a={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return s.get(a,(function(){return l.get(a,(function(){return l.set(a,o()).then((function(e){return Promise.all([l.delete(a),e])}),(function(e){return Promise.all([l.delete(a),Promise.reject(e)])})).then((function(e){var t=It(e,2);return t[0],t[1]}))}))}),{miss:function(e){return s.set(a,e)}})},requestsCache:l,responsesCache:s}}(wt(wt({hosts:ei(t)},i),{},{algoliaAgent:Ro({algoliaAgents:o,client:"Lite",version:Xo}),baseHeaders:wt(wt({"content-type":"text/plain"},a.headers()),i.baseHeaders),baseQueryParameters:wt(wt({},a.queryParameters()),i.baseQueryParameters)}));return{transporter:c,appId:t,apiKey:n,clearCache:function(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then((function(){}))},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent:function(e,t){c.algoliaAgent.add({segment:e,version:t})},setClientApiKey:function(e){var t=e.apiKey;r&&"WithinHeaders"!==r?c.baseQueryParameters["x-algolia-api-key"]=t:c.baseHeaders["x-algolia-api-key"]=t},searchForHits:function(e,t){return this.search(e,t)},searchForFacets:function(e,t){return this.search(e,t)},customPost:function(e,t){var n=e.path,r=e.parameters,o=e.body;if(!n)throw new Error("Parameter `path` is required when calling `customPost`.");var i={method:"POST",path:"/{path}".replace("{path}",n),queryParameters:r||{},headers:{},data:o||{}};return c.request(i,t)},getRecommendations:function(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var n={requests:e.map((function(e){var t=e.params,n=Et(e,Yo);return"facet"===n.type?wt(wt(wt({},n),t),{},{type:"facet"}):wt(wt(wt({},n),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=n}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(r,t)}}}(wt({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(e,t){return Promise.resolve()},info:function(e,t){return Promise.resolve()},error:function(e,t){return Promise.resolve()}},requester:{send:function(e){return new Promise((function(t){var n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return n.setRequestHeader(t,e.headers[t])}));var r,o=function(e,r){return setTimeout((function(){n.abort(),t({status:0,content:r,isTimedOut:!0})}),e)},i=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=function(){n.readyState>n.OPENED&&void 0===r&&(clearTimeout(i),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=function(){0===n.status&&(clearTimeout(i),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=function(){clearTimeout(i),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:To(),requestsCache:To({serializable:!1}),hostsCache:No({caches:[Ao({key:"".concat(Xo,"-").concat(e)}),To()]})},void 0))}(e,t);return r.addAlgoliaAgent("docsearch",ti),!1===/docsearch.js \(.*\)/.test(r.transporter.algoliaAgent.value)&&r.addAlgoliaAgent("docsearch-react",ti),n(r)}),[e,t,n])}var ri=["footer","searchBox"];function oi(e){var t=e.appId,n=e.apiKey,r=e.indexName,o=e.placeholder,i=void 0===o?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,u=e.onClose,l=void 0===u?go:u,s=e.transformItems,f=void 0===s?yo:s,p=e.hitComponent,m=void 0===p?$r:p,v=e.resultsFooterComponent,h=void 0===v?function(){return null}:v,d=e.navigator,y=e.initialScrollY,_=void 0===y?0:y,g=e.transformSearchClient,b=void 0===g?yo:g,S=e.disableUserPersonalization,O=void 0!==S&&S,w=e.initialQuery,E=void 0===w?"":w,j=e.translations,P=void 0===j?{}:j,I=e.getMissingResultsUrl,k=e.insights,D=void 0!==k&&k,C=P.footer,x=P.searchBox,A=Et(P,ri),N=It(st.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),T=N[0],R=N[1],L=st.useRef(null),q=st.useRef(null),M=st.useRef(null),H=st.useRef(null),U=st.useRef(null),F=st.useRef(10),B=st.useRef("undefined"!=typeof window?window.getSelection().toString().slice(0,64):"").current,V=st.useRef(E||B).current,K=ni(t,n,b),W=st.useRef(xo({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,z=st.useRef(xo({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:0===W.getAll().length?7:4})).current,J=st.useCallback((function(e){if(!O){var t="content"===e.type?e.__docsearch_parent:e;t&&-1===W.getAll().findIndex((function(e){return e.objectID===t.objectID}))&&z.add(t)}}),[W,z,O]),Q=st.useCallback((function(e){if(T.context.algoliaInsightsPlugin&&e.__autocomplete_id){var t=e,n={eventName:"Item Selected",index:t.__autocomplete_indexName,items:[t],positions:[e.__autocomplete_id],queryID:t.__autocomplete_queryID};T.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(n)}}),[T.context.algoliaInsightsPlugin]),$=st.useMemo((function(){return Wr({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:V,context:{searchSuggestions:[]}},insights:D,navigator:d,onStateChange:function(e){R(e.state)},getSources:function(e){var o=e.query,i=e.state,u=e.setContext,s=e.setStatus;if(!o)return O?[]:[{sourceId:"recentSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),_o(n)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return z.getAll()}},{sourceId:"favoriteSearches",onSelect:function(e){var t=e.item,n=e.event;J(t),_o(n)||l()},getItemUrl:function(e){return e.item.url},getItems:function(){return W.getAll()}}];var p=Boolean(D);return K.search({requests:[wt({query:o,indexName:r,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(F.current),"hierarchy.lvl2:".concat(F.current),"hierarchy.lvl3:".concat(F.current),"hierarchy.lvl4:".concat(F.current),"hierarchy.lvl5:".concat(F.current),"hierarchy.lvl6:".concat(F.current),"content:".concat(F.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:p},a)]}).catch((function(e){throw"RetryError"===e.name&&s("error"),e})).then((function(e){var o=e.results[0],a=o.hits,s=o.nbHits,m=ho(a,(function(e){return Oo(e)}),c);i.context.searchSuggestions.length0&&(Y(),U.current&&U.current.focus())}),[V,Y]),st.useEffect((function(){function e(){if(q.current){var e=.01*window.innerHeight;q.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),st.createElement("div",_t({ref:L},G({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===T.status&&"DocSearch-Container--Stalled","error"===T.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(e){e.target===e.currentTarget&&l()}}),st.createElement("div",{className:"DocSearch-Modal",ref:q},st.createElement("header",{className:"DocSearch-SearchBar",ref:M},st.createElement(Do,_t({},$,{state:T,autoFocus:0===V.length,inputRef:U,isFromSelection:Boolean(V)&&V===B,translations:x,onClose:l}))),st.createElement("div",{className:"DocSearch-Dropdown",ref:H},st.createElement(Io,_t({},$,{indexName:r,state:T,hitComponent:m,resultsFooterComponent:h,disableUserPersonalization:O,recentSearches:z,favoriteSearches:W,inputRef:U,translations:A,getMissingResultsUrl:I,onItemClick:function(e,t){Q(e),J(e),_o(t)||l()}}))),st.createElement("footer",{className:"DocSearch-Footer"},st.createElement(Qr,{translations:C}))))}function ii(e){var t,n,r=st.useRef(null),o=It(st.useState(!1),2),i=o[0],a=o[1],c=It(st.useState((null==e?void 0:e.initialQuery)||void 0),2),u=c[0],l=c[1],s=st.useCallback((function(){a(!0)}),[a]),f=st.useCallback((function(){a(!1),l(null==e?void 0:e.initialQuery)}),[a,e.initialQuery]);return function(e){var t=e.isOpen,n=e.onOpen,r=e.onClose,o=e.onInput,i=e.searchButtonRef;st.useEffect((function(){function e(e){var a;if("Escape"===e.code&&t||"k"===(null===(a=e.key)||void 0===a?void 0:a.toLowerCase())&&(e.metaKey||e.ctrlKey)||!function(e){var t=e.target,n=t.tagName;return t.isContentEditable||"INPUT"===n||"SELECT"===n||"TEXTAREA"===n}(e)&&"/"===e.key&&!t)return e.preventDefault(),void(t?r():document.body.classList.contains("DocSearch--active")||n());i&&i.current===document.activeElement&&o&&/[a-zA-Z0-9]/.test(String.fromCharCode(e.keyCode))&&o(e)}return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t,n,r,o,i])}({isOpen:i,onOpen:s,onClose:f,onInput:st.useCallback((function(e){a(!0),l(e.key)}),[a,l]),searchButtonRef:r}),st.createElement(st.Fragment,null,st.createElement(Rt,{ref:r,translations:null==e||null===(t=e.translations)||void 0===t?void 0:t.button,onClick:s}),i&&We(st.createElement(oi,_t({},e,{initialScrollY:window.scrollY,initialQuery:u,translations:null==e||null===(n=e.translations)||void 0===n?void 0:n.modal,onClose:f})),document.body))}return function(t){Ye(st.createElement(ii,e({},t,{transformSearchClient:function(e){return e.addAlgoliaAgent("docsearch.js",ti),t.transformSearchClient?t.transformSearchClient(e):e}})),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return"string"==typeof e?t.document.querySelector(e):e}(t.container,t.environment))}})); //# sourceMappingURL=index.js.map