1"use strict";(globalThis.webpackChunkui_js_core||=[]).push([[2018],{2438(e,n,a){var o=a(8527),t=a(5699);let r=null,s=null;a.d(n,["I4",0,async(e,n=[],a={})=>{const c=(e=>e?{"en-US":"en","lb-LU":"lb","bg-BG":"bg","sk-SK":"sk","sl-SI":"sl"}[e]||e:"en")(e);s&&await s,r||(s=(async()=>{r=o.Ay.createInstance(),await r.use(t.r9).init({compatibilityJSON:"v3",lng:c,fallbackLng:"en",debug:!1,returnEmptyString:!1,returnNull:!1,interpolation:{escapeValue:!1,format:(e,n,a="en-US")=>"number"===n&&"number"==typeof e?e.toLocaleString(a):e},ns:[],react:{useSuspense:!1},...a})})(),await s,s=null);const l=n.flatMap((({namespace:e,resources:n})=>{const a=[];return r&&!r.hasResourceBundle("en",e)&&a.push((async()=>{try{const a=await n.en();r.addResourceBundle("en",e,a.default,!0,!1)}catch(n){console.error(`Failed to load fallback (en) namespace "${e}":`,n)}})()),"en"!==c&&r&&!r.hasResourceBundle(c,e)&&a.push((async()=>{try{const a=await n[c]();r.addResourceBundle(c,e,a.default,!0,!1)}catch(n){console.error(`Failed to load namespace "${e}" for locale "${c}":`,n)}})()),a}));return await Promise.all(l),r&&r.language!==c&&await r.changeLanguage(c),r}])},2018(e,n,a){a.d(n,{render:()=>render});a(9478),a(6427),a(8085),a(4012),a(3937),a(7116),a(6084),a(8342),a(4707),a(7744),a(59),a(5579),a(3126),a(559),a(2122),a(6609),a(8639);var o=a(6540),t=a(5338),r=a(961),s=a(5323),c=a(4631),l=a(2230),u=(a(2034),a(2438)),i=a(5466);var d=a(4848);const getAccountId=e=>{const n={...window.App?.Settings?.get?.("user:info")??{},...window.serverParameters?.["user:info"]??{}};if(!1!==n.isLoggedIn&&null!==e?.username)return n.accountId??e?.accountId},chrome_root=e=>{const{chrome:n,handleLanguageSelection:t,env:g,footerOnly:h,showLegalOnly:w,showLogoOnly:f}=e,{findCount:m=0}=n||{},p=(0,o.useRef)(null),y=(0,o.useRef)(document.getElementById("gc-footer-root")),S=(0,o.useMemo)((()=>getAccountId(n)),[n]),[L,b]=(0,o.useState)(!1),B=window.location.pathname.includes("/map");(0,o.useEffect)((()=>{(async()=>{const e=await(0,u.I4)(n.locale,[{namespace:"header",resources:a(5769).E},{namespace:"footer",resources:a(1091).E}],{defaultNS:"header"});p.current=e,b(!0)})()}),[n.locale]);const{data:v}=function useAsyncData(e,n,a){const t=(0,o.useRef)(a),r=(0,o.useRef)(e);r.current=e;const[s,c]=(0,o.useState)({data:t.current,error:void 0,isLoading:Boolean(e)}),l=(0,o.useRef)(!0);return(0,o.useEffect)((()=>{const e=r.current;if(l.current||c({data:t.current,error:void 0,isLoading:Boolean(e)}),l.current=!1,!e)return;let n=!0;return e().then((e=>{n&&c({data:e,error:void 0,isLoading:!1})}),(e=>{n&&c({data:t.current,error:e,isLoading:!1})})),()=>{n=!1}}),n),s}((e=>null!=e&&""!==e)(S)?()=>(async e=>{const n=await fetch(`${i.API_PROXY_BASE}/accounts/${encodeURIComponent(e)}/emails/primary`,{credentials:"include",headers:{accept:"application/json"},method:"GET"});if(!n.ok)throw new Error(`Failed to fetch primary email: ${n.status}`);return n.json()})(S).then((e=>e?.email)):null,[S],void 0),O=(0,o.useMemo)((()=>{const e=p.current;if(!e)return{};const n=e.getResourceBundle(e.language,"header")??{};n.finds=e.t("header:find",{count:m});return{footer:e.getResourceBundle(e.language,"footer"),header:n}}),[L,m]);if(!L)return null;const I=y.current?(0,r.createPortal)((0,d.jsx)(s.Ay,{...n,accountId:S,email:v??n?.email,env:g,resources:O.footer,showLegalOnly:w,onLanguageSelection:t}),y.current):null;return(0,d.jsxs)(l.x,{i18n:p.current,children:[!h&&(0,d.jsx)(c.a,{...n,desktopNavClassName:"w-full md:w-[unset]",env:g,findCount:m,fullWidth:B,resources:O.header,showLogoOnly:f,showSearchAnywhere:window.showSearchAnywhere,showShareables:window.showShareables,showShareablesNewBadge:window.showShareablesNewBadge}),I]})},render=()=>{const e=window.headerSettings||window.chromeSettings||{},n=window.location.hostname.toLowerCase();let a="development";/^((staging|paystage)-?(one|xor|sos|tbd)?\.?geocaching)/i.exec(n)?a="staging":/^((www|payments)?\.?geocaching)/i.exec(n)&&(a="production");const o=document.getElementById("gc-header-root"),r=document.getElementById("gc-footer-root"),s="true"===o?.dataset.logoOnly,c="true"===r?.dataset.legalOnly,handleLanguageSelection=n=>{let a;a=null===e.username?`${i.API_PROXY_BASE}/public/users/locale`:`${i.API_PROXY_BASE}/users/locale`,fetch(a,{credentials:"include",body:JSON.stringify({locale:n}),headers:{accept:"application/json","content-type":"application/json"},method:"PUT"}).then((e=>{if(!e.ok)throw new Error})).catch((e=>console.log(e))).finally((()=>{document.location.reload(!0)}))};o&&(0,t.H)(o).render((0,d.jsx)(chrome_root,{chrome:e,env:a,handleLanguageSelection,showLegalOnly:c,showLogoOnly:s})),!o&&r&&(0,t.H)(r).render((0,d.jsx)(chrome_root,{chrome:e,env:a,footerOnly:!0,handleLanguageSelection,showLegalOnly:c}))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.