-
Notifications
You must be signed in to change notification settings - Fork 0
/
Search.cfd89d31.js
10 lines (8 loc) · 77.5 KB
/
Search.cfd89d31.js
1
2
3
4
5
6
7
8
9
10
import{R as i,r as U}from"./chunks/index.e680eb7f.js";import{j as $,A as Ce}from"./chunks/jsx-runtime.5828288f.js";/* empty css */import{r as tr}from"./chunks/index.5e490bcb.js";function rr(){return i.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},i.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"}))}function le(e){return e.reduce(function(r,t){return r.concat(t)},[])}var nr=0;function ar(){return"autocomplete-".concat(nr++)}function Ae(e){return e.collections.length===0?0:e.collections.reduce(function(r,t){return r+t.items.length},0)}var $t=function(){},or="1.7.4",ir=[{segment:"autocomplete-core",version:or}];function ye(e,r){var t=r;return{then:function(a,o){return ye(e.then(me(a,t,e),me(o,t,e)),t)},catch:function(a){return ye(e.catch(me(a,t,e)),t)},finally:function(a){return a&&t.onCancelList.push(a),ye(e.finally(me(a&&function(){return t.onCancelList=[],a()},t,e)),t)},cancel:function(){t.isCanceled=!0;var a=t.onCancelList;t.onCancelList=[],a.forEach(function(o){o()})},isCanceled:function(){return t.isCanceled===!0}}}function Je(e){return ye(e,{isCanceled:!1,onCancelList:[]})}function me(e,r,t){return e?function(a){return r.isCanceled?a:e(a)}:t}function cr(){var e=[];return{add:function(t){return e.push(t),t.finally(function(){e=e.filter(function(n){return n!==t})})},cancelAll:function(){e.forEach(function(t){return t.cancel()})},isEmpty:function(){return e.length===0}}}function sr(){var e=-1,r=-1,t=void 0;return function(a){e++;var o=e;return Promise.resolve(a).then(function(s){return t&&o<r?t:(r=o,t=s,s)})}}function Ze(e,r,t,n){if(!t)return null;if(e<0&&(r===null||n!==null&&r===0))return t+e;var a=(r===null?-1:r)+e;return a<=-1||a>=t?n===null?null:0:a}function Ye(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function lr(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ye(Object(t),!0).forEach(function(n){ur(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ye(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ur(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function fr(e,r){var t=[];return Promise.resolve(e(r)).then(function(n){return Promise.all(n.filter(function(a){return Boolean(a)}).map(function(a){if(a.sourceId,t.includes(a.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(a.sourceId)," is not unique."));t.push(a.sourceId);var o=lr({getItemInputValue:function(c){var l=c.state;return l.query},getItemUrl:function(){},onSelect:function(c){var l=c.setIsOpen;l(!1)},onActive:$t},a);return Promise.resolve(o)}))})}function mr(e){var r=e.collections.map(function(n){return n.items.length}).reduce(function(n,a,o){var s=n[o-1]||0,c=s+a;return n.push(c),n},[]),t=r.reduce(function(n,a){return a<=e.activeItemId?n+1:n},0);return e.collections[t]}function pr(e){for(var r=e.state,t=e.collection,n=!1,a=0,o=0;n===!1;){var s=r.collections[a];if(s===t){n=!0;break}o+=s.items.length,a++}return r.activeItemId-o}function Y(e){var r=mr(e);if(!r)return null;var t=r.items[pr({state:e,collection:r})],n=r.source,a=n.getItemInputValue({item:t,state:e}),o=n.getItemUrl({item:t,state:e});return{item:t,itemInputValue:a,itemUrl:o,source:n}}function dr(e,r){return e===r||e.contains(r)}var hr=/((gt|sm)-|galaxy nexus)|samsung[- ]/i;function vr(e){return Boolean(e&&e.match(hr))}function Ge(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function pe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Ge(Object(t),!0).forEach(function(n){gr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ge(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function gr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function yr(e){var r=e.map(function(t){var n;return pe(pe({},t),{},{hits:(n=t.hits)===null||n===void 0?void 0:n.map(function(a){return pe(pe({},a),{},{__autocomplete_indexName:t.index,__autocomplete_queryID:t.queryID})})})});return{results:r,hits:r.map(function(t){return t.hits}).filter(Boolean),facetHits:r.map(function(t){var n;return(n=t.facetHits)===null||n===void 0?void 0:n.map(function(a){return{label:a.value,count:a.count,_highlightResult:{label:{value:a.highlighted}}}})}).filter(Boolean)}}function Xe(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function br(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Xe(Object(t),!0).forEach(function(n){Or(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Xe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Or(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Sr(e,r,t){var n=r.initialState;return{getState:function(){return n},dispatch:function(o,s){var c=br({},n);n=e(n,{type:o,props:r,payload:s}),t({state:n,prevState:c})},pendingRequests:cr()}}function et(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function de(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?et(Object(t),!0).forEach(function(n){Er(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):et(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Er(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Pr(e){var r=e.store,t=function(u){r.dispatch("setActiveItemId",u)},n=function(u){r.dispatch("setQuery",u)},a=function(u){var h=0,m=u.map(function(d){return de(de({},d),{},{items:le(d.items).map(function(y){return de(de({},y),{},{__autocomplete_id:h++})})})});r.dispatch("setCollections",m)},o=function(u){r.dispatch("setIsOpen",u)},s=function(u){r.dispatch("setStatus",u)},c=function(u){r.dispatch("setContext",u)};return{setActiveItemId:t,setQuery:n,setCollections:a,setIsOpen:o,setStatus:s,setContext:c}}function wr(e){return Dr(e)||_r(e)||jr(e)||Ir()}function Ir(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jr(e,r){if(!!e){if(typeof e=="string")return Re(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Re(e,r)}}function _r(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dr(e){if(Array.isArray(e))return Re(e)}function Re(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function tt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function Q(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?tt(Object(t),!0).forEach(function(n){Cr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):tt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Cr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function $r(e,r){var t,n=typeof window<"u"?window:{},a=e.plugins||[];return Q(Q({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,environment:n,shouldPanelOpen:function(s){var c=s.state;return Ae(c)>0},reshape:function(s){var c=s.sources;return c}},e),{},{id:(t=e.id)!==null&&t!==void 0?t:ar(),plugins:a,initialState:Q({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(s){var c;(c=e.onStateChange)===null||c===void 0||c.call(e,s),a.forEach(function(l){var u;return(u=l.onStateChange)===null||u===void 0?void 0:u.call(l,s)})},onSubmit:function(s){var c;(c=e.onSubmit)===null||c===void 0||c.call(e,s),a.forEach(function(l){var u;return(u=l.onSubmit)===null||u===void 0?void 0:u.call(l,s)})},onReset:function(s){var c;(c=e.onReset)===null||c===void 0||c.call(e,s),a.forEach(function(l){var u;return(u=l.onReset)===null||u===void 0?void 0:u.call(l,s)})},getSources:function(s){return Promise.all([].concat(wr(a.map(function(c){return c.getSources})),[e.getSources]).filter(Boolean).map(function(c){return fr(c,s)})).then(function(c){return le(c)}).then(function(c){return c.map(function(l){return Q(Q({},l),{},{onSelect:function(h){l.onSelect(h),r.forEach(function(m){var d;return(d=m.onSelect)===null||d===void 0?void 0:d.call(m,h)})},onActive:function(h){l.onActive(h),r.forEach(function(m){var d;return(d=m.onActive)===null||d===void 0?void 0:d.call(m,h)})}})})})},navigator:Q({navigate:function(s){var c=s.itemUrl;n.location.assign(c)},navigateNewTab:function(s){var c=s.itemUrl,l=n.open(c,"_blank","noopener");l?.focus()},navigateNewWindow:function(s){var c=s.itemUrl;n.open(c,"_blank","noopener")}},e.navigator)})}function rt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function he(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?rt(Object(t),!0).forEach(function(n){xt(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):rt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xt(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function xr(e){var r=e.collections,t=e.props,n=e.state,a=r.reduce(function(s,c){return he(he({},s),{},xt({},c.source.sourceId,he(he({},c.source),{},{getItems:function(){return le(c.items)}})))},{}),o=t.reshape({sources:Object.values(a),sourcesBySourceId:a,state:n});return le(o).filter(Boolean).map(function(s){return{source:s,items:s.getItems()}})}function Ar(e){return kr(e)||Nr(e)||Tr(e)||Rr()}function Rr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tr(e,r){if(!!e){if(typeof e=="string")return Te(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Te(e,r)}}function Nr(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kr(e){if(Array.isArray(e))return Te(e)}function Te(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function nt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function at(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?nt(Object(t),!0).forEach(function(n){Lr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Lr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ve(e){return Boolean(e.execute)}function Mr(e){return Boolean(e?.execute)}function Hr(e,r){return Mr(e)?at(at({},e),{},{requests:e.queries.map(function(t){return{query:t,sourceId:r,transformResponse:e.transformResponse}})}):{items:e,sourceId:r}}function qr(e){var r=e.reduce(function(n,a){if(!ve(a))return n.push(a),n;var o=a.searchClient,s=a.execute,c=a.requesterId,l=a.requests,u=n.find(function(d){return ve(a)&&ve(d)&&d.searchClient===o&&Boolean(c)&&d.requesterId===c});if(u){var h;(h=u.items).push.apply(h,Ar(l))}else{var m={execute:s,requesterId:c,items:l,searchClient:o};n.push(m)}return n},[]),t=r.map(function(n){if(!ve(n))return Promise.resolve(n);var a=n,o=a.execute,s=a.items,c=a.searchClient;return o({searchClient:c,requests:s})});return Promise.all(t).then(function(n){return le(n)})}function Fr(e,r){return r.map(function(t){var n=e.filter(function(c){return c.sourceId===t.sourceId}),a=n.map(function(c){var l=c.items;return l}),o=n[0].transformResponse,s=o?o(yr(a)):a;return s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`.
Did you forget to return items?
See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:t,items:s}})}var Br=["event","nextState","props","query","refresh","store"];function ot(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function ae(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ot(Object(t),!0).forEach(function(n){Ur(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Ur(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Kr(e,r){if(e==null)return{};var t=Vr(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Vr(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}var oe=null,it=sr();function Z(e){var r=e.event,t=e.nextState,n=t===void 0?{}:t,a=e.props,o=e.query,s=e.refresh,c=e.store,l=Kr(e,Br);oe&&a.environment.clearTimeout(oe);var u=l.setCollections,h=l.setIsOpen,m=l.setQuery,d=l.setActiveItemId,y=l.setStatus;if(m(o),d(a.defaultActiveItemId),!o&&a.openOnFocus===!1){var f,v=c.getState().collections.map(function(p){return ae(ae({},p),{},{items:[]})});y("idle"),u(v),h((f=n.isOpen)!==null&&f!==void 0?f:a.shouldPanelOpen({state:c.getState()}));var E=Je(it(v).then(function(){return Promise.resolve()}));return c.pendingRequests.add(E)}y("loading"),oe=a.environment.setTimeout(function(){y("stalled")},a.stallThreshold);var g=Je(it(a.getSources(ae({query:o,refresh:s,state:c.getState()},l)).then(function(p){return Promise.all(p.map(function(b){return Promise.resolve(b.getItems(ae({query:o,refresh:s,state:c.getState()},l))).then(function(P){return Hr(P,b.sourceId)})})).then(qr).then(function(b){return Fr(b,p)}).then(function(b){return xr({collections:b,props:a,state:c.getState()})})}))).then(function(p){var b;y("idle"),u(p);var P=a.shouldPanelOpen({state:c.getState()});h((b=n.isOpen)!==null&&b!==void 0?b:a.openOnFocus&&!o&&P||P);var S=Y(c.getState());if(c.getState().activeItemId!==null&&S){var I=S.item,R=S.itemInputValue,T=S.itemUrl,D=S.source;D.onActive(ae({event:r,item:I,itemInputValue:R,itemUrl:T,refresh:s,source:D,state:c.getState()},l))}}).finally(function(){y("idle"),oe&&a.environment.clearTimeout(oe)});return c.pendingRequests.add(g)}var Wr=["event","props","refresh","store"];function ct(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function F(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ct(Object(t),!0).forEach(function(n){zr(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ct(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function zr(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Qr(e,r){if(e==null)return{};var t=Jr(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Jr(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function Zr(e){var r=e.event,t=e.props,n=e.refresh,a=e.store,o=Qr(e,Wr);if(r.key==="ArrowUp"||r.key==="ArrowDown"){var s=function(){var f=t.environment.document.getElementById("".concat(t.id,"-item-").concat(a.getState().activeItemId));f&&(f.scrollIntoViewIfNeeded?f.scrollIntoViewIfNeeded(!1):f.scrollIntoView(!1))},c=function(){var f=Y(a.getState());if(a.getState().activeItemId!==null&&f){var v=f.item,E=f.itemInputValue,g=f.itemUrl,p=f.source;p.onActive(F({event:r,item:v,itemInputValue:E,itemUrl:g,refresh:n,source:p,state:a.getState()},o))}};r.preventDefault(),a.getState().isOpen===!1&&(t.openOnFocus||Boolean(a.getState().query))?Z(F({event:r,props:t,query:a.getState().query,refresh:n,store:a},o)).then(function(){a.dispatch(r.key,{nextActiveItemId:t.defaultActiveItemId}),c(),setTimeout(s,0)}):(a.dispatch(r.key,{}),c(),s())}else if(r.key==="Escape")r.preventDefault(),a.dispatch(r.key,null),a.pendingRequests.cancelAll();else if(r.key==="Tab")a.dispatch("blur",null),a.pendingRequests.cancelAll();else if(r.key==="Enter"){if(a.getState().activeItemId===null||a.getState().collections.every(function(y){return y.items.length===0})){t.debug||a.pendingRequests.cancelAll();return}r.preventDefault();var l=Y(a.getState()),u=l.item,h=l.itemInputValue,m=l.itemUrl,d=l.source;if(r.metaKey||r.ctrlKey)m!==void 0&&(d.onSelect(F({event:r,item:u,itemInputValue:h,itemUrl:m,refresh:n,source:d,state:a.getState()},o)),t.navigator.navigateNewTab({itemUrl:m,item:u,state:a.getState()}));else if(r.shiftKey)m!==void 0&&(d.onSelect(F({event:r,item:u,itemInputValue:h,itemUrl:m,refresh:n,source:d,state:a.getState()},o)),t.navigator.navigateNewWindow({itemUrl:m,item:u,state:a.getState()}));else if(!r.altKey){if(m!==void 0){d.onSelect(F({event:r,item:u,itemInputValue:h,itemUrl:m,refresh:n,source:d,state:a.getState()},o)),t.navigator.navigate({itemUrl:m,item:u,state:a.getState()});return}Z(F({event:r,nextState:{isOpen:!1},props:t,query:h,refresh:n,store:a},o)).then(function(){d.onSelect(F({event:r,item:u,itemInputValue:h,itemUrl:m,refresh:n,source:d,state:a.getState()},o))})}}}var Yr=["props","refresh","store"],Gr=["inputElement","formElement","panelElement"],Xr=["inputElement"],en=["inputElement","maxLength"],tn=["item","source"];function st(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?st(Object(t),!0).forEach(function(n){rn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):st(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function rn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ie(e,r){if(e==null)return{};var t=nn(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function nn(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function an(e){var r=e.props,t=e.refresh,n=e.store,a=ie(e,Yr),o=function(f){var v=f.inputElement,E=f.formElement,g=f.panelElement,p=ie(f,Gr);function b(P){var S=n.getState().isOpen||!n.pendingRequests.isEmpty();if(!(!S||P.target===v)){var I=[E,g].some(function(R){return dr(R,P.target)});I===!1&&(n.dispatch("blur",null),r.debug||n.pendingRequests.cancelAll())}}return j({onTouchStart:b,onMouseDown:b,onTouchMove:function(S){n.getState().isOpen===!1||v!==r.environment.document.activeElement||S.target===v||v.blur()}},p)},s=function(f){return j({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(r.id,"-list"):void 0,"aria-labelledby":"".concat(r.id,"-label")},f)},c=function(f){f.inputElement;var v=ie(f,Xr);return j({action:"",noValidate:!0,role:"search",onSubmit:function(g){var p;g.preventDefault(),r.onSubmit(j({event:g,refresh:t,state:n.getState()},a)),n.dispatch("submit",null),(p=f.inputElement)===null||p===void 0||p.blur()},onReset:function(g){var p;g.preventDefault(),r.onReset(j({event:g,refresh:t,state:n.getState()},a)),n.dispatch("reset",null),(p=f.inputElement)===null||p===void 0||p.focus()}},v)},l=function(f){var v;function E(D){(r.openOnFocus||Boolean(n.getState().query))&&Z(j({event:D,props:r,query:n.getState().completion||n.getState().query,refresh:t,store:n},a)),n.dispatch("focus",null)}var g=f||{};g.inputElement;var p=g.maxLength,b=p===void 0?512:p,P=ie(g,en),S=Y(n.getState()),I=((v=r.environment.navigator)===null||v===void 0?void 0:v.userAgent)||"",R=vr(I),T=S!=null&&S.itemUrl&&!R?"go":"search";return j({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&n.getState().activeItemId!==null?"".concat(r.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(r.id,"-list"):void 0,"aria-labelledby":"".concat(r.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(r.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:T,spellCheck:"false",autoFocus:r.autoFocus,placeholder:r.placeholder,maxLength:b,type:"search",onChange:function(L){Z(j({event:L,props:r,query:L.currentTarget.value.slice(0,b),refresh:t,store:n},a))},onKeyDown:function(L){Zr(j({event:L,props:r,refresh:t,store:n},a))},onFocus:E,onBlur:$t,onClick:function(L){f.inputElement===r.environment.document.activeElement&&!n.getState().isOpen&&E(L)}},P)},u=function(f){return j({htmlFor:"".concat(r.id,"-input"),id:"".concat(r.id,"-label")},f)},h=function(f){return j({role:"listbox","aria-labelledby":"".concat(r.id,"-label"),id:"".concat(r.id,"-list")},f)},m=function(f){return j({onMouseDown:function(E){E.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},f)},d=function(f){var v=f.item,E=f.source,g=ie(f,tn);return j({id:"".concat(r.id,"-item-").concat(v.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===v.__autocomplete_id,onMouseMove:function(b){if(v.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",v.__autocomplete_id);var P=Y(n.getState());if(n.getState().activeItemId!==null&&P){var S=P.item,I=P.itemInputValue,R=P.itemUrl,T=P.source;T.onActive(j({event:b,item:S,itemInputValue:I,itemUrl:R,refresh:t,source:T,state:n.getState()},a))}}},onMouseDown:function(b){b.preventDefault()},onClick:function(b){var P=E.getItemInputValue({item:v,state:n.getState()}),S=E.getItemUrl({item:v,state:n.getState()}),I=S?Promise.resolve():Z(j({event:b,nextState:{isOpen:!1},props:r,query:P,refresh:t,store:n},a));I.then(function(){E.onSelect(j({event:b,item:v,itemInputValue:P,itemUrl:S,refresh:t,source:E,state:n.getState()},a))})}},g)};return{getEnvironmentProps:o,getRootProps:s,getFormProps:c,getLabelProps:u,getInputProps:l,getPanelProps:m,getListProps:h,getItemProps:d}}function lt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function on(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?lt(Object(t),!0).forEach(function(n){At(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):lt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function At(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function cn(e){var r,t,n,a,o=e.plugins,s=e.options,c=(r=(((t=s.__autocomplete_metadata)===null||t===void 0?void 0:t.userAgents)||[])[0])===null||r===void 0?void 0:r.segment,l=c?At({},c,Object.keys(((n=s.__autocomplete_metadata)===null||n===void 0?void 0:n.options)||{})):{};return{plugins:o.map(function(u){return{name:u.name,options:Object.keys(u.__autocomplete_pluginOptions||[])}}),options:on({"autocomplete-core":Object.keys(s)},l),ua:ir.concat(((a=s.__autocomplete_metadata)===null||a===void 0?void 0:a.userAgents)||[])}}function sn(e){var r,t,n=e.metadata,a=e.environment,o=(r=a.navigator)===null||r===void 0||(t=r.userAgent)===null||t===void 0?void 0:t.includes("Algolia Crawler");if(o){var s=a.document.createElement("meta"),c=a.document.querySelector("head");s.name="algolia:metadata",setTimeout(function(){s.content=JSON.stringify(n),c.appendChild(s)},0)}}function ut(e){var r,t=e.state;return t.isOpen===!1||t.activeItemId===null?null:((r=Y(t))===null||r===void 0?void 0:r.itemInputValue)||null}function ft(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function O(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ft(Object(t),!0).forEach(function(n){ln(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ft(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function ln(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var un=function(r,t){switch(t.type){case"setActiveItemId":return O(O({},r),{},{activeItemId:t.payload});case"setQuery":return O(O({},r),{},{query:t.payload,completion:null});case"setCollections":return O(O({},r),{},{collections:t.payload});case"setIsOpen":return O(O({},r),{},{isOpen:t.payload});case"setStatus":return O(O({},r),{},{status:t.payload});case"setContext":return O(O({},r),{},{context:O(O({},r.context),t.payload)});case"ArrowDown":{var n=O(O({},r),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:Ze(1,r.activeItemId,Ae(r),t.props.defaultActiveItemId)});return O(O({},n),{},{completion:ut({state:n})})}case"ArrowUp":{var a=O(O({},r),{},{activeItemId:Ze(-1,r.activeItemId,Ae(r),t.props.defaultActiveItemId)});return O(O({},a),{},{completion:ut({state:a})})}case"Escape":return r.isOpen?O(O({},r),{},{activeItemId:null,isOpen:!1,completion:null}):O(O({},r),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return O(O({},r),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return O(O({},r),{},{activeItemId:t.props.openOnFocus===!0?t.props.defaultActiveItemId:null,status:"idle",query:""});case"focus":return O(O({},r),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(r.query))&&t.props.shouldPanelOpen({state:r})});case"blur":return t.props.debug?r:O(O({},r),{},{isOpen:!1,activeItemId:null});case"mousemove":return O(O({},r),{},{activeItemId:t.payload});case"mouseleave":return O(O({},r),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),r}};function mt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function B(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?mt(Object(t),!0).forEach(function(n){fn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function fn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function mn(e){var r=[],t=$r(e,r),n=Sr(un,t,s),a=Pr({store:n}),o=an(B({props:t,refresh:c,store:n},a));function s(l){var u=l.prevState,h=l.state;t.onStateChange(B({prevState:u,state:h,refresh:c},a))}function c(){return Z(B({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:t,query:n.getState().query,refresh:c,store:n},a))}return t.plugins.forEach(function(l){var u;return(u=l.subscribe)===null||u===void 0?void 0:u.call(l,B(B({},a),{},{refresh:c,onSelect:function(m){r.push({onSelect:m})},onActive:function(m){r.push({onActive:m})}}))}),sn({metadata:cn({plugins:t.plugins,options:e}),environment:t.environment}),B(B({refresh:c},o),a)}var Rt=64;function pn(e){var r=e.translations,t=r===void 0?{}:r,n=t.searchByText,a=n===void 0?"Search by":n;return i.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},i.createElement("span",{className:"DocSearch-Label"},a),i.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},i.createElement("defs",null,i.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),i.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),i.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),i.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),i.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),i.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),i.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),i.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),i.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),i.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function ge(e){return i.createElement("svg",{width:"15",height:"15","aria-label":e.ariaLabel,role:"img"},i.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function dn(e){var r=e.translations,t=r===void 0?{}:r,n=t.selectText,a=n===void 0?"to select":n,o=t.selectKeyAriaLabel,s=o===void 0?"Enter key":o,c=t.navigateText,l=c===void 0?"to navigate":c,u=t.navigateUpKeyAriaLabel,h=u===void 0?"Arrow up":u,m=t.navigateDownKeyAriaLabel,d=m===void 0?"Arrow down":m,y=t.closeText,f=y===void 0?"to close":y,v=t.closeKeyAriaLabel,E=v===void 0?"Escape key":v,g=t.searchByText,p=g===void 0?"Search by":g;return i.createElement(i.Fragment,null,i.createElement("div",{className:"DocSearch-Logo"},i.createElement(pn,{translations:{searchByText:p}})),i.createElement("ul",{className:"DocSearch-Commands"},i.createElement("li",null,i.createElement("kbd",{className:"DocSearch-Commands-Key"},i.createElement(ge,{ariaLabel:s},i.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),i.createElement("span",{className:"DocSearch-Label"},a)),i.createElement("li",null,i.createElement("kbd",{className:"DocSearch-Commands-Key"},i.createElement(ge,{ariaLabel:d},i.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),i.createElement("kbd",{className:"DocSearch-Commands-Key"},i.createElement(ge,{ariaLabel:h},i.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),i.createElement("span",{className:"DocSearch-Label"},l)),i.createElement("li",null,i.createElement("kbd",{className:"DocSearch-Commands-Key"},i.createElement(ge,{ariaLabel:E},i.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),i.createElement("span",{className:"DocSearch-Label"},f))))}function hn(e){var r=e.hit,t=e.children;return i.createElement("a",{href:r.url},t)}function vn(){return i.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},i.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),i.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},i.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function gn(){return i.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),i.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function Ne(){return i.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function yn(){return i.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),i.createElement("path",{d:"M8 17l-6-6 6-6"})))}var bn=function(){return i.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function On(e){switch(e.type){case"lvl1":return i.createElement(bn,null);case"content":return i.createElement(En,null);default:return i.createElement(Sn,null)}}function Sn(){return i.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function En(){return i.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function pt(){return i.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},i.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Pn(){return i.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function wn(){return i.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function In(e){var r=e.translations,t=r===void 0?{}:r,n=t.titleText,a=n===void 0?"Unable to fetch results":n,o=t.helpText,s=o===void 0?"You might want to check your network connection.":o;return i.createElement("div",{className:"DocSearch-ErrorScreen"},i.createElement("div",{className:"DocSearch-Screen-Icon"},i.createElement(Pn,null)),i.createElement("p",{className:"DocSearch-Title"},a),i.createElement("p",{className:"DocSearch-Help"},s))}var jn=["translations"];function _n(e){return xn(e)||$n(e)||Cn(e)||Dn()}function Dn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cn(e,r){if(!!e){if(typeof e=="string")return ke(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ke(e,r)}}function $n(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xn(e){if(Array.isArray(e))return ke(e)}function ke(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function An(e,r){if(e==null)return{};var t=Rn(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Rn(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function Tn(e){var r=e.translations,t=r===void 0?{}:r,n=An(e,jn),a=t.noResultsText,o=a===void 0?"No results for":a,s=t.suggestedQueryText,c=s===void 0?"Try searching for":s,l=t.reportMissingResultsText,u=l===void 0?"Believe this query should return results?":l,h=t.reportMissingResultsLinkText,m=h===void 0?"Let us know.":h,d=n.state.context.searchSuggestions;return i.createElement("div",{className:"DocSearch-NoResults"},i.createElement("div",{className:"DocSearch-Screen-Icon"},i.createElement(wn,null)),i.createElement("p",{className:"DocSearch-Title"},o,' "',i.createElement("strong",null,n.state.query),'"'),d&&d.length>0&&i.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},i.createElement("p",{className:"DocSearch-Help"},c,":"),i.createElement("ul",null,d.slice(0,3).reduce(function(y,f){return[].concat(_n(y),[i.createElement("li",{key:f},i.createElement("button",{className:"DocSearch-Prefill",key:f,type:"button",onClick:function(){n.setQuery(f.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},f))])},[]))),n.getMissingResultsUrl&&i.createElement("p",{className:"DocSearch-Help"},"".concat(u," "),i.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Nn=["hit","attribute","tagName"];function dt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function ht(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?dt(Object(t),!0).forEach(function(n){kn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):dt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ln(e,r){if(e==null)return{};var t=Mn(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Mn(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function vt(e,r){var t=r.split(".");return t.reduce(function(n,a){return n!=null&&n[a]?n[a]:null},e)}function J(e){var r=e.hit,t=e.attribute,n=e.tagName,a=n===void 0?"span":n,o=Ln(e,Nn);return U.exports.createElement(a,ht(ht({},o),{},{dangerouslySetInnerHTML:{__html:vt(r,"_snippetResult.".concat(t,".value"))||vt(r,t)}}))}function gt(e,r){return Bn(e)||Fn(e,r)||qn(e,r)||Hn()}function Hn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qn(e,r){if(!!e){if(typeof e=="string")return yt(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yt(e,r)}}function yt(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Fn(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],a=!0,o=!1,s,c;try{for(t=t.call(e);!(a=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));a=!0);}catch(l){o=!0,c=l}finally{try{!a&&t.return!=null&&t.return()}finally{if(o)throw c}}return n}}function Bn(e){if(Array.isArray(e))return e}function be(){return be=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},be.apply(this,arguments)}function Le(e){return!e.collection||e.collection.items.length===0?null:i.createElement("section",{className:"DocSearch-Hits"},i.createElement("div",{className:"DocSearch-Hit-source"},e.title),i.createElement("ul",e.getListProps(),e.collection.items.map(function(r,t){return i.createElement(Un,be({key:[e.title,r.objectID].join(":"),item:r,index:t},e))})))}function Un(e){var r=e.item,t=e.index,n=e.renderIcon,a=e.renderAction,o=e.getItemProps,s=e.onItemClick,c=e.collection,l=e.hitComponent,u=i.useState(!1),h=gt(u,2),m=h[0],d=h[1],y=i.useState(!1),f=gt(y,2),v=f[0],E=f[1],g=i.useRef(null),p=l;function b(S){d(!0),g.current=S}function P(S){E(!0),g.current=S}return i.createElement("li",be({className:["DocSearch-Hit",r.__docsearch_parent&&"DocSearch-Hit--Child",m&&"DocSearch-Hit--deleting",v&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){g.current&&g.current()}},o({item:r,source:c.source,onClick:function(){s(r)}})),i.createElement(p,{hit:r},i.createElement("div",{className:"DocSearch-Hit-Container"},n({item:r,index:t}),r.hierarchy[r.type]&&r.type==="lvl1"&&i.createElement("div",{className:"DocSearch-Hit-content-wrapper"},i.createElement(J,{className:"DocSearch-Hit-title",hit:r,attribute:"hierarchy.lvl1"}),r.content&&i.createElement(J,{className:"DocSearch-Hit-path",hit:r,attribute:"content"})),r.hierarchy[r.type]&&(r.type==="lvl2"||r.type==="lvl3"||r.type==="lvl4"||r.type==="lvl5"||r.type==="lvl6")&&i.createElement("div",{className:"DocSearch-Hit-content-wrapper"},i.createElement(J,{className:"DocSearch-Hit-title",hit:r,attribute:"hierarchy.".concat(r.type)}),i.createElement(J,{className:"DocSearch-Hit-path",hit:r,attribute:"hierarchy.lvl1"})),r.type==="content"&&i.createElement("div",{className:"DocSearch-Hit-content-wrapper"},i.createElement(J,{className:"DocSearch-Hit-title",hit:r,attribute:"content"}),i.createElement(J,{className:"DocSearch-Hit-path",hit:r,attribute:"hierarchy.lvl1"})),a({item:r,runDeleteTransition:b,runFavoriteTransition:P}))))}function bt(e,r){return e.reduce(function(t,n){var a=r(n);return t.hasOwnProperty(a)||(t[a]=[]),t[a].length<5&&t[a].push(n),t},{})}function Ot(e){return e}function Kn(){}var Tt=/(<mark>|<\/mark>)/g,Vn=RegExp(Tt.source);function Nt(e){var r,t,n,a,o,s=e;if(!s.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var c=(s.__docsearch_parent?(r=s.__docsearch_parent)===null||r===void 0||(t=r._highlightResult)===null||t===void 0||(n=t.hierarchy)===null||n===void 0?void 0:n.lvl0:(a=e._highlightResult)===null||a===void 0||(o=a.hierarchy)===null||o===void 0?void 0:o.lvl0)||{},l=c.value;return l&&Vn.test(l)?l.replace(Tt,""):l}function Me(){return Me=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Me.apply(this,arguments)}function Wn(e){return i.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map(function(r){if(r.items.length===0)return null;var t=Nt(r.items[0]);return i.createElement(Le,Me({},e,{key:r.source.sourceId,title:t,collection:r,renderIcon:function(a){var o,s=a.item,c=a.index;return i.createElement(i.Fragment,null,s.__docsearch_parent&&i.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},i.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},s.__docsearch_parent!==((o=r.items[c+1])===null||o===void 0?void 0:o.__docsearch_parent)?i.createElement("path",{d:"M8 6v21M20 27H8.3"}):i.createElement("path",{d:"M8 6v42M20 27H8.3"}))),i.createElement("div",{className:"DocSearch-Hit-icon"},i.createElement(On,{type:s.type})))},renderAction:function(){return i.createElement("div",{className:"DocSearch-Hit-action"},i.createElement(yn,null))}}))}),e.resultsFooterComponent&&i.createElement("section",{className:"DocSearch-HitsFooter"},i.createElement(e.resultsFooterComponent,{state:e.state})))}var zn=["translations"];function Oe(){return Oe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Oe.apply(this,arguments)}function Qn(e,r){if(e==null)return{};var t=Jn(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Jn(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function Zn(e){var r=e.translations,t=r===void 0?{}:r,n=Qn(e,zn),a=t.recentSearchesTitle,o=a===void 0?"Recent":a,s=t.noRecentSearchesText,c=s===void 0?"No recent searches":s,l=t.saveRecentSearchButtonTitle,u=l===void 0?"Save this search":l,h=t.removeRecentSearchButtonTitle,m=h===void 0?"Remove this search from history":h,d=t.favoriteSearchesTitle,y=d===void 0?"Favorite":d,f=t.removeFavoriteSearchButtonTitle,v=f===void 0?"Remove this search from favorites":f;return n.state.status==="idle"&&n.hasCollections===!1?n.disableUserPersonalization?null:i.createElement("div",{className:"DocSearch-StartScreen"},i.createElement("p",{className:"DocSearch-Help"},c)):n.hasCollections===!1?null:i.createElement("div",{className:"DocSearch-Dropdown-Container"},i.createElement(Le,Oe({},n,{title:o,collection:n.state.collections[0],renderIcon:function(){return i.createElement("div",{className:"DocSearch-Hit-icon"},i.createElement(gn,null))},renderAction:function(g){var p=g.item,b=g.runFavoriteTransition,P=g.runDeleteTransition;return i.createElement(i.Fragment,null,i.createElement("div",{className:"DocSearch-Hit-action"},i.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(I){I.preventDefault(),I.stopPropagation(),b(function(){n.favoriteSearches.add(p),n.recentSearches.remove(p),n.refresh()})}},i.createElement(pt,null))),i.createElement("div",{className:"DocSearch-Hit-action"},i.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(I){I.preventDefault(),I.stopPropagation(),P(function(){n.recentSearches.remove(p),n.refresh()})}},i.createElement(Ne,null))))}})),i.createElement(Le,Oe({},n,{title:y,collection:n.state.collections[1],renderIcon:function(){return i.createElement("div",{className:"DocSearch-Hit-icon"},i.createElement(pt,null))},renderAction:function(g){var p=g.item,b=g.runDeleteTransition;return i.createElement("div",{className:"DocSearch-Hit-action"},i.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(S){S.preventDefault(),S.stopPropagation(),b(function(){n.favoriteSearches.remove(p),n.refresh()})}},i.createElement(Ne,null)))}})))}var Yn=["translations"];function Se(){return Se=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Se.apply(this,arguments)}function Gn(e,r){if(e==null)return{};var t=Xn(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Xn(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}var ea=i.memo(function(e){var r=e.translations,t=r===void 0?{}:r,n=Gn(e,Yn);if(n.state.status==="error")return i.createElement(In,{translations:t?.errorScreen});var a=n.state.collections.some(function(o){return o.items.length>0});return n.state.query?a===!1?i.createElement(Tn,Se({},n,{translations:t?.noResultsScreen})):i.createElement(Wn,n):i.createElement(Zn,Se({},n,{hasCollections:a,translations:t?.startScreen}))},function(r,t){return t.state.status==="loading"||t.state.status==="stalled"}),ta=["translations"];function Ee(){return Ee=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ee.apply(this,arguments)}function ra(e,r){if(e==null)return{};var t=na(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function na(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function aa(e){var r=e.translations,t=r===void 0?{}:r,n=ra(e,ta),a=t.resetButtonTitle,o=a===void 0?"Clear the query":a,s=t.resetButtonAriaLabel,c=s===void 0?"Clear the query":s,l=t.cancelButtonText,u=l===void 0?"Cancel":l,h=t.cancelButtonAriaLabel,m=h===void 0?"Cancel":h,d=n.getFormProps({inputElement:n.inputRef.current}),y=d.onReset;return i.useEffect(function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()},[n.autoFocus,n.inputRef]),i.useEffect(function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()},[n.isFromSelection,n.inputRef]),i.createElement(i.Fragment,null,i.createElement("form",{className:"DocSearch-Form",onSubmit:function(v){v.preventDefault()},onReset:y},i.createElement("label",Ee({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),i.createElement(rr,null)),i.createElement("div",{className:"DocSearch-LoadingIndicator"},i.createElement(vn,null)),i.createElement("input",Ee({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:Rt}))),i.createElement("button",{type:"reset",title:o,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},i.createElement(Ne,null))),i.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":m,onClick:n.onClose},u))}var oa=["_highlightResult","_snippetResult"];function ia(e,r){if(e==null)return{};var t=ca(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function ca(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function sa(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch{return!1}}function la(e){return sa()===!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):[]}}}function St(e){var r=e.key,t=e.limit,n=t===void 0?5:t,a=la(r),o=a.getItem().slice(0,n);return{add:function(c){var l=c;l._highlightResult,l._snippetResult;var u=ia(l,oa),h=o.findIndex(function(m){return m.objectID===u.objectID});h>-1&&o.splice(h,1),o.unshift(u),o=o.slice(0,n),a.setItem(o)},remove:function(c){o=o.filter(function(l){return l.objectID!==c.objectID}),a.setItem(o)},getAll:function(){return o}}}function ua(e){const r=`algoliasearch-client-js-${e.key}`;let t;const n=()=>(t===void 0&&(t=e.localStorage||window.localStorage),t),a=()=>JSON.parse(n().getItem(r)||"{}");return{get(o,s,c={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>{const l=JSON.stringify(o),u=a()[l];return Promise.all([u||s(),u!==void 0])}).then(([l,u])=>Promise.all([l,u||c.miss(l)])).then(([l])=>l)},set(o,s){return Promise.resolve().then(()=>{const c=a();return c[JSON.stringify(o)]=s,n().setItem(r,JSON.stringify(c)),s})},delete(o){return Promise.resolve().then(()=>{const s=a();delete s[JSON.stringify(o)],n().setItem(r,JSON.stringify(s))})},clear(){return Promise.resolve().then(()=>{n().removeItem(r)})}}}function ce(e){const r=[...e.caches],t=r.shift();return t===void 0?fa():{get(n,a,o={miss:()=>Promise.resolve()}){return t.get(n,a,o).catch(()=>ce({caches:r}).get(n,a,o))},set(n,a){return t.set(n,a).catch(()=>ce({caches:r}).set(n,a))},delete(n){return t.delete(n).catch(()=>ce({caches:r}).delete(n))},clear(){return t.clear().catch(()=>ce({caches:r}).clear())}}}function fa(){return{get(e,r,t={miss:()=>Promise.resolve()}){return r().then(a=>Promise.all([a,t.miss(a)])).then(([a])=>a)},set(e,r){return Promise.resolve(r)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function $e(e={serializable:!0}){let r={};return{get(t,n,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(t);if(o in r)return Promise.resolve(e.serializable?JSON.parse(r[o]):r[o]);const s=n(),c=a&&a.miss||(()=>Promise.resolve());return s.then(l=>c(l)).then(()=>s)},set(t,n){return r[JSON.stringify(t)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete(t){return delete r[JSON.stringify(t)],Promise.resolve()},clear(){return r={},Promise.resolve()}}}function ma(e,r,t){const n={"x-algolia-api-key":t,"x-algolia-application-id":r};return{headers(){return e===Pe.WithinHeaders?n:{}},queryParameters(){return e===Pe.WithinQueryParameters?n:{}}}}function pa(e){let r=e.length-1;for(r;r>0;r--){const t=Math.floor(Math.random()*(r+1)),n=e[r];e[r]=e[t],e[t]=n}return e}function kt(e,r){return r&&Object.keys(r).forEach(t=>{e[t]=r[t](e)}),e}function we(e,...r){let t=0;return e.replace(/%s/g,()=>encodeURIComponent(r[t++]))}const He="4.14.3",Pe={WithinQueryParameters:0,WithinHeaders:1};function Et(e,r){const t=e||{},n=t.data||{};return Object.keys(t).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(n[a]=t[a])}),{data:Object.entries(n).length>0?n:void 0,timeout:t.timeout||r,headers:t.headers||{},queryParameters:t.queryParameters||{},cacheable:t.cacheable}}const G={Read:1,Write:2,Any:3},ue={Up:1,Down:2,Timeouted:3},Lt=2*60*1e3;function Mt(e,r=ue.Up){return{...e,status:r,lastUpdate:Date.now()}}function da(e){return e.status===ue.Up||Date.now()-e.lastUpdate>Lt}function ha(e){return e.status===ue.Timeouted&&Date.now()-e.lastUpdate<=Lt}function Ht(e){return typeof e=="string"?{protocol:"https",url:e,accept:G.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||G.Any}}const K={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};function va(e,r){return Promise.all(r.map(t=>e.get(t,()=>Promise.resolve(Mt(t))))).then(t=>{const n=t.filter(c=>da(c)),a=t.filter(c=>ha(c)),o=[...n,...a],s=o.length>0?o.map(c=>Ht(c)):r;return{getTimeout(c,l){return(a.length===0&&c===0?1:a.length+3+c)*l},statelessHosts:s}})}const ga=({isTimedOut:e,status:r})=>!e&&~~r===0,ya=e=>{const r=e.status;return e.isTimedOut||ga(e)||~~(r/100)!==2&&~~(r/100)!==4},ba=({status:e})=>~~(e/100)===2,Oa=(e,r)=>ya(e)?r.onRetry(e):ba(e)?r.onSuccess(e):r.onFail(e);function Pt(e,r,t,n){const a=[],o=ja(t,n),s=_a(e,n),c=t.method,l=t.method!==K.Get?{}:{...t.data,...n.data},u={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let h=0;const m=(d,y)=>{const f=d.pop();if(f===void 0)throw $a(wt(a));const v={data:o,headers:s,method:c,url:Ia(f,t.path,u),connectTimeout:y(h,e.timeouts.connect),responseTimeout:y(h,n.timeout)},E=p=>{const b={request:v,response:p,host:f,triesLeft:d.length};return a.push(b),b},g={onSuccess:p=>Pa(p),onRetry(p){const b=E(p);return p.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",Ft(b)),e.hostsCache.set(f,Mt(f,p.isTimedOut?ue.Timeouted:ue.Down))]).then(()=>m(d,y))},onFail(p){throw E(p),wa(p,wt(a))}};return e.requester.send(v).then(p=>Oa(p,g))};return va(e.hostsCache,r).then(d=>m([...d.statelessHosts].reverse(),d.getTimeout))}function Sa(e){const{hostsCache:r,logger:t,requester:n,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,hosts:l,queryParameters:u,headers:h}=e,m={hostsCache:r,logger:t,requester:n,requestsCache:a,responsesCache:o,timeouts:s,userAgent:c,headers:h,queryParameters:u,hosts:l.map(d=>Ht(d)),read(d,y){const f=Et(y,m.timeouts.read),v=()=>Pt(m,m.hosts.filter(p=>(p.accept&G.Read)!==0),d,f);if((f.cacheable!==void 0?f.cacheable:d.cacheable)!==!0)return v();const g={request:d,mappedRequestOptions:f,transporter:{queryParameters:m.queryParameters,headers:m.headers}};return m.responsesCache.get(g,()=>m.requestsCache.get(g,()=>m.requestsCache.set(g,v()).then(p=>Promise.all([m.requestsCache.delete(g),p]),p=>Promise.all([m.requestsCache.delete(g),Promise.reject(p)])).then(([p,b])=>b)),{miss:p=>m.responsesCache.set(g,p)})},write(d,y){return Pt(m,m.hosts.filter(f=>(f.accept&G.Write)!==0),d,Et(y,m.timeouts.write))}};return m}function Ea(e){const r={value:`Algolia for JavaScript (${e})`,add(t){const n=`; ${t.segment}${t.version!==void 0?` (${t.version})`:""}`;return r.value.indexOf(n)===-1&&(r.value=`${r.value}${n}`),r}};return r}function Pa(e){try{return JSON.parse(e.content)}catch(r){throw Ca(r.message,e)}}function wa({content:e,status:r},t){let n=e;try{n=JSON.parse(e).message}catch{}return Da(n,r,t)}function Ia(e,r,t){const n=qt(t);let a=`${e.protocol}://${e.url}/${r.charAt(0)==="/"?r.substr(1):r}`;return n.length&&(a+=`?${n}`),a}function qt(e){const r=t=>Object.prototype.toString.call(t)==="[object Object]"||Object.prototype.toString.call(t)==="[object Array]";return Object.keys(e).map(t=>we("%s=%s",t,r(e[t])?JSON.stringify(e[t]):e[t])).join("&")}function ja(e,r){if(e.method===K.Get||e.data===void 0&&r.data===void 0)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}function _a(e,r){const t={...e.headers,...r.headers},n={};return Object.keys(t).forEach(a=>{const o=t[a];n[a.toLowerCase()]=o}),n}function wt(e){return e.map(r=>Ft(r))}function Ft(e){const r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function Da(e,r,t){return{name:"ApiError",message:e,status:r,transporterStackTrace:t}}function Ca(e,r){return{name:"DeserializationError",message:e,response:r}}function $a(e){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:e}}const xa=e=>{const r=e.appId,t=ma(e.authMode!==void 0?e.authMode:Pe.WithinHeaders,r,e.apiKey),n=Sa({hosts:[{url:`${r}-dsn.algolia.net`,accept:G.Read},{url:`${r}.algolia.net`,accept:G.Write}].concat(pa([{url:`${r}-1.algolianet.com`},{url:`${r}-2.algolianet.com`},{url:`${r}-3.algolianet.com`}])),...e,headers:{...t.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...t.queryParameters(),...e.queryParameters}});return kt({transporter:n,appId:r,addAlgoliaAgent(o,s){n.userAgent.add({segment:o,version:s})},clearCache(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(()=>{})}},e.methods)},Aa=e=>(r,t)=>r.method===K.Get?e.transporter.read(r,t):e.transporter.write(r,t),Bt=e=>(r,t={})=>{const n={transporter:e.transporter,appId:e.appId,indexName:r};return kt(n,t.methods)},It=e=>(r,t)=>{const n=r.map(a=>({...a,params:qt(a.params||{})}));return e.transporter.read({method:K.Post,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},t)},jt=e=>(r,t)=>Promise.all(r.map(n=>{const{facetName:a,facetQuery:o,...s}=n.params;return Bt(e)(n.indexName,{methods:{searchForFacetValues:Ut}}).searchForFacetValues(a,o,{...t,...s})})),Ra=e=>(r,t,n)=>e.transporter.read({method:K.Post,path:we("1/answers/%s/prediction",e.indexName),data:{query:r,queryLanguages:t},cacheable:!0},n),Ta=e=>(r,t)=>e.transporter.read({method:K.Post,path:we("1/indexes/%s/query",e.indexName),data:{query:r},cacheable:!0},t),Ut=e=>(r,t,n)=>e.transporter.read({method:K.Post,path:we("1/indexes/%s/facets/%s/query",e.indexName,r),data:{facetQuery:t},cacheable:!0},n),qe={Debug:1,Info:2,Error:3};function Na(e){return{debug(r,t){return qe.Debug>=e&&console.debug(r,t),Promise.resolve()},info(r,t){return qe.Info>=e&&console.info(r,t),Promise.resolve()},error(r,t){return console.error(r,t),Promise.resolve()}}}function ka(){return{send(e){return new Promise(r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(s=>t.setRequestHeader(s,e.headers[s]));const n=(s,c)=>setTimeout(()=>{t.abort(),r({status:0,content:c,isTimedOut:!0})},s*1e3),a=n(e.connectTimeout,"Connection timeout");let o;t.onreadystatechange=()=>{t.readyState>t.OPENED&&o===void 0&&(clearTimeout(a),o=n(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(a),clearTimeout(o),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(a),clearTimeout(o),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)})}}}function Kt(e,r,t){const n={appId:e,apiKey:r,timeouts:{connect:1,read:2,write:30},requester:ka(),logger:Na(qe.Error),responsesCache:$e(),requestsCache:$e({serializable:!1}),hostsCache:ce({caches:[ua({key:`${He}-${e}`}),$e()]}),userAgent:Ea(He).add({segment:"Browser",version:"lite"}),authMode:Pe.WithinQueryParameters};return xa({...n,...t,methods:{search:It,searchForFacetValues:jt,multipleQueries:It,multipleSearchForFacetValues:jt,customRequest:Aa,initIndex:a=>o=>Bt(a)(o,{methods:{search:Ta,searchForFacetValues:Ut,findAnswers:Ra}})}})}Kt.version=He;var _t="3.3.2";function La(e,r,t){var n=i.useMemo(function(){var a=Kt(e,r);return a.addAlgoliaAgent("docsearch",_t),/docsearch.js \(.*\)/.test(a.transporter.userAgent.value)===!1&&a.addAlgoliaAgent("docsearch-react",_t),t(a)},[e,r,t]);return n}function Ma(e){var r=e.getEnvironmentProps,t=e.panelElement,n=e.formElement,a=e.inputElement;i.useEffect(function(){if(!!(t&&n&&a)){var o=r({panelElement:t,formElement:n,inputElement:a}),s=o.onTouchStart,c=o.onTouchMove;return window.addEventListener("touchstart",s),window.addEventListener("touchmove",c),function(){window.removeEventListener("touchstart",s),window.removeEventListener("touchmove",c)}}},[r,t,n,a])}function Ha(e){var r=e.container;i.useEffect(function(){if(!r)return;var t=r.querySelectorAll("a[href]:not([disabled]), button:not([disabled]), input:not([disabled])"),n=t[0],a=t[t.length-1];function o(s){s.key==="Tab"&&(s.shiftKey?document.activeElement===n&&(s.preventDefault(),a.focus()):document.activeElement===a&&(s.preventDefault(),n.focus()))}return r.addEventListener("keydown",o),function(){r.removeEventListener("keydown",o)}},[r])}var qa=["footer","searchBox"];function se(){return se=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},se.apply(this,arguments)}function Dt(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function xe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Dt(Object(t),!0).forEach(function(n){Fa(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Dt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Fa(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Ba(e,r){return Wa(e)||Va(e,r)||Ka(e,r)||Ua()}function Ua(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ka(e,r){if(!!e){if(typeof e=="string")return Ct(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ct(e,r)}}function Ct(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function Va(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n=[],a=!0,o=!1,s,c;try{for(t=t.call(e);!(a=(s=t.next()).done)&&(n.push(s.value),!(r&&n.length===r));a=!0);}catch(l){o=!0,c=l}finally{try{!a&&t.return!=null&&t.return()}finally{if(o)throw c}}return n}}function Wa(e){if(Array.isArray(e))return e}function za(e,r){if(e==null)return{};var t=Qa(e,r),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(r.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(t[n]=e[n]))}return t}function Qa(e,r){if(e==null)return{};var t={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(r.indexOf(a)>=0)&&(t[a]=e[a]);return t}function Ja(e){var r=e.appId,t=e.apiKey,n=e.indexName,a=e.placeholder,o=a===void 0?"Search docs":a,s=e.searchParameters,c=e.onClose,l=c===void 0?Kn:c,u=e.transformItems,h=u===void 0?Ot:u,m=e.hitComponent,d=m===void 0?hn:m,y=e.resultsFooterComponent,f=y===void 0?function(){return null}:y,v=e.navigator,E=e.initialScrollY,g=E===void 0?0:E,p=e.transformSearchClient,b=p===void 0?Ot:p,P=e.disableUserPersonalization,S=P===void 0?!1:P,I=e.initialQuery,R=I===void 0?"":I,T=e.translations,D=T===void 0?{}:T,L=e.getMissingResultsUrl,Vt=D.footer,Wt=D.searchBox,zt=za(D,qa),Qt=i.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),Fe=Ba(Qt,2),X=Fe[0],Jt=Fe[1],Be=i.useRef(null),Ie=i.useRef(null),Ue=i.useRef(null),fe=i.useRef(null),ee=i.useRef(null),M=i.useRef(10),Ke=i.useRef(typeof window<"u"?window.getSelection().toString().slice(0,Rt):"").current,H=i.useRef(R||Ke).current,Ve=La(r,t,b),V=i.useRef(St({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,te=i.useRef(St({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:V.getAll().length===0?7:4})).current,re=i.useCallback(function(w){if(!S){var W=w.type==="content"?w.__docsearch_parent:w;W&&V.getAll().findIndex(function(je){return je.objectID===W.objectID})===-1&&te.add(W)}},[V,te,S]),ne=i.useMemo(function(){return mn({id:"docsearch",defaultActiveItemId:0,placeholder:o,openOnFocus:!0,initialState:{query:H,context:{searchSuggestions:[]}},navigator:v,onStateChange:function(w){Jt(w.state)},getSources:function(w){var W=w.query,je=w.state,ze=w.setContext,Gt=w.setStatus;return W?Ve.search([{query:W,indexName:n,params:xe({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(M.current),"hierarchy.lvl2:".concat(M.current),"hierarchy.lvl3:".concat(M.current),"hierarchy.lvl4:".concat(M.current),"hierarchy.lvl5:".concat(M.current),"hierarchy.lvl6:".concat(M.current),"content:".concat(M.current)],snippetEllipsisText:"\u2026",highlightPreTag:"<mark>",highlightPostTag:"</mark>",hitsPerPage:20},s)}]).catch(function(x){throw x.name==="RetryError"&&Gt("error"),x}).then(function(x){var C=x.results,A=C[0],N=A.hits,Xt=A.nbHits,_e=bt(N,function(De){return Nt(De)});return je.context.searchSuggestions.length<Object.keys(_e).length&&ze({searchSuggestions:Object.keys(_e)}),ze({nbHits:Xt}),Object.values(_e).map(function(De,er){return{sourceId:"hits".concat(er),onSelect:function(k){var q=k.item,z=k.event;re(q),!z.shiftKey&&!z.ctrlKey&&!z.metaKey&&l()},getItemUrl:function(k){var q=k.item;return q.url},getItems:function(){return Object.values(bt(De,function(k){return k.hierarchy.lvl1})).map(h).map(function(k){return k.map(function(q){return xe(xe({},q),{},{__docsearch_parent:q.type!=="lvl1"&&k.find(function(z){return z.type==="lvl1"&&z.hierarchy.lvl1===q.hierarchy.lvl1})})})}).flat()}}})}):S?[]:[{sourceId:"recentSearches",onSelect:function(C){var A=C.item,N=C.event;re(A),!N.shiftKey&&!N.ctrlKey&&!N.metaKey&&l()},getItemUrl:function(C){var A=C.item;return A.url},getItems:function(){return te.getAll()}},{sourceId:"favoriteSearches",onSelect:function(C){var A=C.item,N=C.event;re(A),!N.shiftKey&&!N.ctrlKey&&!N.metaKey&&l()},getItemUrl:function(C){var A=C.item;return A.url},getItems:function(){return V.getAll()}}]}})},[n,s,Ve,l,te,V,re,H,o,v,h,S]),Zt=ne.getEnvironmentProps,Yt=ne.getRootProps,We=ne.refresh;return Ma({getEnvironmentProps:Zt,panelElement:fe.current,formElement:Ue.current,inputElement:ee.current}),Ha({container:Be.current}),i.useEffect(function(){return document.body.classList.add("DocSearch--active"),function(){var _,w;document.body.classList.remove("DocSearch--active"),(_=(w=window).scrollTo)===null||_===void 0||_.call(w,0,g)}},[]),i.useEffect(function(){var _=window.matchMedia("(max-width: 768px)");_.matches&&(M.current=5)},[]),i.useEffect(function(){fe.current&&(fe.current.scrollTop=0)},[X.query]),i.useEffect(function(){H.length>0&&(We(),ee.current&&ee.current.focus())},[H,We]),i.useEffect(function(){function _(){if(Ie.current){var w=window.innerHeight*.01;Ie.current.style.setProperty("--docsearch-vh","".concat(w,"px"))}}return _(),window.addEventListener("resize",_),function(){window.removeEventListener("resize",_)}},[]),i.createElement("div",se({ref:Be},Yt({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",X.status==="stalled"&&"DocSearch-Container--Stalled",X.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(w){w.target===w.currentTarget&&l()}}),i.createElement("div",{className:"DocSearch-Modal",ref:Ie},i.createElement("header",{className:"DocSearch-SearchBar",ref:Ue},i.createElement(aa,se({},ne,{state:X,autoFocus:H.length===0,inputRef:ee,isFromSelection:Boolean(H)&&H===Ke,translations:Wt,onClose:l}))),i.createElement("div",{className:"DocSearch-Dropdown",ref:fe},i.createElement(ea,se({},ne,{indexName:n,state:X,hitComponent:d,resultsFooterComponent:f,disableUserPersonalization:S,recentSearches:te,favoriteSearches:V,inputRef:ee,translations:zt,getMissingResultsUrl:L,onItemClick:function(w){re(w),l()}}))),i.createElement("footer",{className:"DocSearch-Footer"},i.createElement(dn,{translations:Vt}))))}function Za(e){var r=e.target,t=r.tagName;return r.isContentEditable||t==="INPUT"||t==="SELECT"||t==="TEXTAREA"}function Ya(e){var r=e.isOpen,t=e.onOpen,n=e.onClose,a=e.onInput,o=e.searchButtonRef;i.useEffect(function(){function s(c){function l(){document.body.classList.contains("DocSearch--active")||t()}(c.keyCode===27&&r||c.key.toLowerCase()==="k"&&(c.metaKey||c.ctrlKey)||!Za(c)&&c.key==="/"&&!r)&&(c.preventDefault(),r?n():document.body.classList.contains("DocSearch--active")||l()),o&&o.current===document.activeElement&&a&&/[a-zA-Z0-9]/.test(String.fromCharCode(c.keyCode))&&a(c)}return window.addEventListener("keydown",s),function(){window.removeEventListener("keydown",s)}},[r,t,n,a,o])}const Ga=Ja||void 0,Xa=Ya||void 0;function ao(){const[e,r]=U.exports.useState(!1),t=U.exports.useRef(null),[n,a]=U.exports.useState(""),o=U.exports.useCallback(()=>{r(!0)},[r]),s=U.exports.useCallback(()=>{r(!1)},[r]),c=U.exports.useCallback(l=>{r(!0),a(l.key)},[r,a]);return Xa({isOpen:e,onOpen:o,onClose:s,onInput:c,searchButtonRef:t}),$.exports.jsxs($.exports.Fragment,{children:[$.exports.jsxs("button",{type:"button",ref:t,onClick:o,className:"search-input",children:[$.exports.jsx("svg",{width:"24",height:"24",fill:"none",children:$.exports.jsx("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),$.exports.jsx("span",{children:"Search"}),$.exports.jsxs("span",{className:"search-hint",children:[$.exports.jsx("span",{className:"sr-only",children:"Press "}),$.exports.jsx("kbd",{children:"/"}),$.exports.jsx("span",{className:"sr-only",children:" to search"})]})]}),e&&tr.exports.createPortal($.exports.jsx(Ga,{initialQuery:n,initialScrollY:window.scrollY,onClose:s,indexName:Ce.indexName,appId:Ce.appId,apiKey:Ce.apiKey,transformItems:l=>l.map(u=>{const h=document.createElement("a");h.href=u.url;const m=h.hash==="#overview"?"":h.hash;return{...u,url:`${h.pathname}${m}`}})}),document.body)]})}export{ao as default};