1try{!function(){var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9f3d26da-b554-4617-9d7f-477317cb1e91",e._sentryDebugIdIdentifier="sentry-dbid-9f3d26da-b554-4617-9d7f-477317cb1e91")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1267],{1267:(e,t,r)=>{r.d(t,{GlobalStateProvider:()=>w,Q:()=>S});var n=r(95155),o=r(12115),l=r(30079),c=r(2552);let u="bf_currency_choice",s="selectedCurrency",i="currencyMode",a=(e,t)=>{try{return e?e.getItem(t):null}catch{return null}},d=(e,t,r)=>{try{e?.setItem(t,r)}catch{}};function y(e,t,r){d(e.session,s,t),d(e.session,"selectedCurrencySymbol",e.symbolFor(t)),d(e.session,i,r)}function f(e){let t=a(e.local,u);if(t&&(0,c.Hg)(t)){let r=(0,c.Iv)(t);return y(e,r,"manual"),{currency:r,source:"explicit"}}let r=a(e.session,s),n=a(e.session,i);if(r&&"auto"===n&&(0,c.Hg)(r))return{currency:(0,c.Iv)(r),source:"auto"};if(r&&"manual"===n&&(0,c.Hg)(r)){let t,n=g(a(e.session,"detectedCountryCode"));if(n&&(0,c.Iv)(r)!==(t=g(n),(0,c.Iv)(t?p[t]:void 0)))return{currency:b(e,r),source:"explicit"}}return null}function b(e,t){let r=(0,c.Iv)(t);return d(e.local,u,r),y(e,r,"manual"),r}function m(e,t){let r=f(e);if(r?.source==="explicit")return r.currency;let n=(0,c.Iv)(t||c.Yt);return y(e,n,"auto"),n}let p={GB:"GBP",GG:"GBP",JE:"GBP",IM:"GBP",IN:"INR",US:"USD",AE:"AED",CA:"CAD",AU:"AUD",SG:"SGD",...Object.fromEntries(["AT","BE","CY","DE","EE","ES","FI","FR","GR","HR","IE","IT","LT","LU","LV","MT","NL","PT","SI","SK"].map(e=>[e,"EUR"]))};function g(e){let t=(e||"").trim().toUpperCase();return/^[A-Z]{2}$/.test(t)&&"XX"!==t&&"T1"!==t?t:null}let C=(0,o.createContext)(void 0),I=e=>l.qx.find(t=>t.code===e)?.symbol||e,D=()=>{let e=null,t=null;try{e=window.localStorage}catch{}try{t=window.sessionStorage}catch{}return{local:e,session:t,symbolFor:I}},w=({children:e})=>{let[t,r]=(0,o.useState)("initial"),[l,s]=(0,o.useState)("GBP"),i=I(l);return(0,o.useEffect)(()=>{let e=f(D());e&&s(e.currency);let t=e=>{e.key===u&&e.newValue&&s(b(D(),e.newValue))};if(window.addEventListener("storage",t),e)return()=>window.removeEventListener("storage",t);let r=!1,n=async()=>{if(!r)try{let e=await fetch("/api/utils/geo"),t=await e.json(),n=(0,c.Iv)(t.currency||"GBP");if(r)return;if(s(m(D(),n)),"string"==typeof t.country_code&&/^[A-Z]{2}$/.test(t.country_code)&&sessionStorage.setItem("detectedCountryCode",t.country_code),"string"==typeof t.country_name&&t.country_name.length<60&&sessionStorage.setItem("detectedCountryName",t.country_name),"string"==typeof t.country_calling_code){let e=t.country_calling_code.replace(/[^0-9]/g,"");e.length>=1&&e.length<=4&&sessionStorage.setItem("detectedDialCode",e)}}catch(e){if(console.error("Currency auto detection failed",e),r)return;s(m(D(),"GBP"))}},o=window,l="function"==typeof o.requestIdleCallback?o.requestIdleCallback(n,{timeout:3e3}):window.setTimeout(n,1500);return()=>{window.removeEventListener("storage",t),r=!0,"function"==typeof o.cancelIdleCallback?o.cancelIdleCallback(l):clearTimeout(l)}},[]),(0,n.jsx)(C.Provider,{value:{activeView:t,setActiveView:r,currency:l,setCurrency:e=>{s(b(D(),e))},currencySymbol:i,setCurrencySymbol:e=>{}},children:e})},S=()=>{let e=(0,o.useContext)(C);if(!e)throw Error("useGlobalState must be used within a GlobalStateProvider");return e}},2552:(e,t,r)=>{r.d(t,{Hg:()=>l,Iv:()=>c,Yt:()=>o});var n=r(11629);let o="GBP";function l(e){return null!==(0,n._J)(e)&&2===(0,n.lW)(e)}function c(e){return l(e)?(0,n._J)(e):o}},11629:(e,t,r)=>{r.d(t,{_J:()=>o,aK:()=>c,lW:()=>l});let n={GBP:2,EUR:2,USD:2,INR:2,AED:2,CAD:2,AUD:2,SGD:2,CHF:2,JPY:0,KRW:0};function o(e){if("string"!=typeof e)return null;let t=e.trim().toUpperCase();return Object.prototype.hasOwnProperty.call(n,t)?t:null}function l(e){let t=o(e);return null===t?null:n[t]}function c(e,t){let r=l(t);if(null===r)return null;let n="number"!=typeof e||!Number.isFinite(e)||!Number.isInteger(e)||e<0||e>1e8?null:e;return null===n?null:0===r?n:n/Math.pow(10,r)}},30079:(e,t,r)=>{r.d(t,{Ej:()=>s,NZ:()=>c,Qn:()=>a,convertCurrency:()=>i,fetchExchangeRates:()=>u,ku:()=>l,qx:()=>o});var n=r(2552);let o=[{code:"INR",symbol:"â¹"},{code:"USD",symbol:"$"},{code:"EUR",symbol:"â¬"}
1,{code:"GBP",symbol:"\xa3"},{code:"CAD",symbol:"C$"},{code:"AUD",symbol:"A$"},{code:"SGD",symbol:"S$"},{code:"NZD",symbol:"NZ$"},{code:"AED",symbol:"د.Ø¥"},{code:"SAR",symbol:"ï·¼"},{code:"QAR",symbol:"ï·¼"},{code:"OMR",symbol:"ï·¼"},{code:"KWD",symbol:"د.Ù"},{code:"BHD",symbol:".د.ب"},{code:"MYR",symbol:"RM"},{code:"THB",symbol:"฿"},{code:"JPY",symbol:"\xa5"}],l=o.filter(e=>(0,n.Hg)(e.code)),c=new Proxy({INR:1,USD:1/92.4,EUR:1/107,GBP:1/123.5,CAD:1/68.5,AUD:1/66.5,NZD:1/56,SGD:1/69,MYR:1/19.5,THB:1/2.6,JPY:1/.58,AED:1/25.2,SAR:1/24.6,QAR:1/25.3,OMR:1/240,KWD:1/300,BHD:1/245},{get(e,t){if("string"==typeof t){let e=function(e){try{let t=globalThis.__BF_FX?.rates?.[e];return"number"==typeof t&&Number.isFinite(t)&&t>0?t:void 0}catch{return}}(t);if(void 0!==e)return e}return Reflect.get(e,t)}}),u=async()=>c,s=(e,t)=>{let r=e.toUpperCase(),n=t.toUpperCase();if(r===n)return 1;let o=1/(c[r]||0),l=c[n]||0;return o&&l?o*l:1},i=(e,t,r)=>{let n=t.toUpperCase(),o=r.toUpperCase();return e?n===o?5*Math.ceil(e/5):5*Math.ceil(e*s(t,r)/5):0},a=e=>{let t=o.find(t=>t.code.toUpperCase()===e.toUpperCase());return t?t.symbol:e}}}]);
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.