puppeteer/assets/js/1a4e3797.c0aaef32.js

2 lines
16 KiB
JavaScript
Raw Normal View History

/*! For license information please see 1a4e3797.c0aaef32.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[97920],{79935:(e,a,t)=>{t.r(a),t.d(a,{default:()=>j});var r=t(58087),l=t(71098),n=t(31984),s=t(55995),c=t(40060),o=t(80958),u=t(18168),i=t(37806),m=t(89712),h=t(54995),g=t(92210),p=t(8241),d=t(71348),f=t(70290),v=t.n(f),y=t(8131),b=t.n(y),E=t(90512),P=t(67294),R=t(68263);const w={searchQueryInput:"searchQueryInput_cpyO",searchVersionInput:"searchVersionInput_wf2r",searchResultsColumn:"searchResultsColumn_PLpb",algoliaLogo:"algoliaLogo_YElR",algoliaLogoPathFill:"algoliaLogoPathFill_grp5",searchResultItem:"searchResultItem_AlWU",searchResultItemHeading:"searchResultItemHeading_HJFH",searchResultItemPath:"searchResultItemPath_x9Ef",searchResultItemSummary:"searchResultItemSummary_jej3",searchQueryColumn:"searchQueryColumn_hQFc",searchVersionColumn:"searchVersionColumn_GkmC",searchLogoColumn:"searchLogoColumn_Mj_0",loadingSpinner:"loadingSpinner_E_zt","loading-spin":"loading-spin_hlTL",loader:"loader_ujSQ"};function S(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function I(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(a){S(e,a,t[a])}))}return e}function O(e,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):function(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);a&&(r=r.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,r)}return t}(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})),e}function V({docsSearchVersionsHelpers:e}){const a=Object.entries(e.allDocsData).filter((([,e])=>e.versions.length>1));return P.createElement("div",{className:(0,E.Z)("col","col--3","padding-left--none",w.searchVersionColumn)},a.map((([t,r])=>{const l=a.length>1?`${t}: `:"";return P.createElement("select",{key:t,onChange:a=>e.setSearchVersion(t,a.target.value),defaultValue:e.searchVersions[t],className:w.searchVersionInput},r.versions.map(((e,a)=>P.createElement("option",{key:a,label:`${l}${e.label}`,value:e.name}))))})))}function _(){const{siteConfig:{themeConfig:e},i18n:{currentLocale:a}}=(0,p.Z)(),{algolia:{appId:t,apiKey:m,indexName:f,externalUrlRegex:y}}=e,S=function(){const{selectMessage:e}=(0,c.c)();return a=>e(a,(0,g.I)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:a}))}(),_=function(){const e=(0,s._r)(),[a,t]=(0,P.useState)((()=>Object.entries(e).reduce(((e,[a,t])=>O(I({},e),{[a]:t.versions[0].name})),{}))),r=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:r,searchVersions:a,setSearchVersion:(e,a)=>t((t=>O(I({},t),{[e]:a})))}}(),[j,z]=(0,o.K)(),N={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[C,L]=(0,P.useReducer)(((e,a)=>{switch(a.type){case"reset":return N;case"loading":return O(I({},e),{loading:!0});case"update":return j!==a.value.query?e:O(I({},a.value),{items:0===a.value.lastPage?a.value.items:e.items.concat(a.value.items)});case"advance":{const a=e.totalPages>e.lastPage+1;return O(I({},e),{lastPage:a?e.lastPage+1:e.lastPage,hasMore:a})}default:return e}}),N),F=v()(t,m),T=b()(F,f,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","counter"]});T.on("result",(({results:{query:e,hits:a,page:t,nbHits:r,nbPages:l}})=>{if(""===e||!Array.isArray(a))return void L({type:"reset"});const n=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),s=a.map(((