1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-25 00:47:17 +02:00
Files
oauth2-proxy/assets/js/1a4e3797.47f2376f.js
2023-09-13 11:01:58 +00:00

1 line
4.9 KiB
JavaScript

"use strict";(self.webpackChunkdocusaurus=self.webpackChunkdocusaurus||[]).push([[7920],{2027:function(e,t,r){r.r(t),r.d(t,{default:function(){return _}});var n=r(4165),a=r(5861),l=r(7294),u=r(2263),s=r(179),c=r(5742),o=r(9960),m=r(5999),i=r(373),h=["zero","one","two","few","many","other"];function p(e){return h.filter((function(t){return e.includes(t)}))}var f={locale:"en",pluralForms:p(["one","other"]),select:function(e){return 1===e?"one":"other"}};function d(){var e=(0,u.Z)().i18n.currentLocale;return(0,l.useMemo)((function(){try{return t=e,r=new Intl.PluralRules(t),{locale:t,pluralForms:p(r.resolvedOptions().pluralCategories),select:function(e){return r.select(e)}}}catch(n){return console.error('Failed to use Intl.PluralRules for locale "'+e+'".\nDocusaurus will fallback to the default (English) implementation.\nError: '+n.message+"\n"),f}var t,r}),[e])}function g(){var e=d();return{selectMessage:function(t,r){return function(e,t,r){var n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error("For locale="+r.locale+", a maximum of "+r.pluralForms.length+" plural forms are expected ("+r.pluralForms.join(",")+"), but the message contains "+n.length+": "+e);var a=r.select(t),l=r.pluralForms.indexOf(a);return n[Math.min(l,n.length-1)]}(r,t,e)}}}var v=r(143),y=r(6550),E=r(412);var I=function(){var e=(0,y.k6)(),t=(0,y.TH)(),r=(0,u.Z)().siteConfig.baseUrl;return{searchValue:E.Z.canUseDOM&&new URLSearchParams(t.search).get("q")||"",updateSearchPath:function(r){var n=new URLSearchParams(t.search);r?n.set("q",r):n.delete("q"),e.replace({search:n.toString()})},generateSearchPageLink:function(e){return r+"search?q="+encodeURIComponent(e)}}},S=r(22),R=r(8202),w=r(2539),P=r(726),b=r(1073),F=r(311),k={searchQueryInput:"searchQueryInput_CFBF",searchResultItem:"searchResultItem_U687",searchResultItemPath:"searchResultItemPath_uIbk",searchResultItemSummary:"searchResultItemSummary_oZHr"},Z=r(3926);function C(){var e=(0,u.Z)().siteConfig.baseUrl,t=(0,v.gA)(),r=e,s=(0,i.J)(null==t?void 0:t.pluginId).preferredVersion;s&&!s.isLast&&(r=s.path+"/");var o=g().selectMessage,h=I(),p=h.searchValue,f=h.updateSearchPath,d=(0,l.useState)(p),y=d[0],E=d[1],w=(0,l.useState)(),P=w[0],b=w[1],Z=(0,l.useState)(),C=Z[0],_=Z[1],q=(0,l.useMemo)((function(){return y?(0,m.I)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:y}):(0,m.I)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"})}),[y]);(0,l.useEffect)((function(){f(y),P&&(y?P(y,(function(e){_(e)})):_(void 0))}),[y,P]);var T=(0,l.useCallback)((function(e){E(e.target.value)}),[]);return(0,l.useEffect)((function(){p&&p!==y&&E(p)}),[p]),(0,l.useEffect)((function(){var e;!function(){(e=e||(0,a.Z)((0,n.Z)().mark((function e(){var t,a,l;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.w)(r);case 2:t=e.sent,a=t.wrappedIndexes,l=t.zhDictionary,b((function(){return(0,R.v)(a,l,100)}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}()}),[r]),l.createElement(l.Fragment,null,l.createElement(c.Z,null,l.createElement("meta",{property:"robots",content:"noindex, follow"}),l.createElement("title",null,q)),l.createElement("div",{className:"container margin-vert--lg"},l.createElement("h1",null,q),l.createElement("input",{type:"search",name:"q",className:k.searchQueryInput,"aria-label":"Search",onChange:T,value:y,autoComplete:"off",autoFocus:!0}),!P&&y&&l.createElement("div",null,l.createElement(F.Z,null)),C&&(C.length>0?l.createElement("p",null,o(C.length,(0,m.I)({id:"theme.SearchPage.documentsFound.plurals",message:"1 document found|{count} documents found",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)'},{count:C.length}))):l.createElement("p",null,(0,m.I)({id:"theme.SearchPage.noResultsText",message:"No documents were found",description:"The paragraph for empty search result"}))),l.createElement("section",null,C&&C.map((function(e){return l.createElement(x,{key:e.document.i,searchResult:e})})))))}function x(e){var t=e.searchResult,r=t.document,n=t.type,a=t.page,u=t.tokens,s=t.metadata,c=0===n,m=2===n,i=(c?r.b:a.b).slice(),h=m?r.s:r.t;return c||i.push(a.t),l.createElement("article",{className:k.searchResultItem},l.createElement("h2",null,l.createElement(o.Z,{to:r.u+(r.h||""),dangerouslySetInnerHTML:{__html:m?(0,w.C)(h,u):(0,P.o)(h,(0,b.m)(s,"t"),u,100)}})),i.length>0&&l.createElement("p",{className:k.searchResultItemPath},(0,Z.e)(i)),m&&l.createElement("p",{className:k.searchResultItemSummary,dangerouslySetInnerHTML:{__html:(0,P.o)(r.t,(0,b.m)(s,"t"),u,100)}}))}var _=function(){return l.createElement(s.Z,null,l.createElement(C,null))}}}]);