{
  "version": 3,
  "sources": ["language.js"],
  "sourcesContent": ["import { config } from \"./config.js\";\n\n/**\n * Make `language` the one pages are served in, on every platform host.\n *\n * Pages are rendered before the photographer is known, so `LocaleMiddleware`\n * finds their choice in its cookie, shared by the platform's hosts through its\n * domain. Returns whether the page has to be reloaded to show it - never when\n * the browser refused the cookie, which would only reload the page for ever.\n */\nexport function useLanguage(language) {\n    if (language === config.language) {\n        return false;\n    }\n    const { name, domain, maxAge } = config.languageCookie;\n    const cookie = `${name}=${encodeURIComponent(language)}`;\n    document.cookie = `${cookie}; domain=${domain}; path=/; max-age=${maxAge}; samesite=lax`;\n    return document.cookie.split(\"; \").includes(cookie);\n}\n"],
  "mappings": "AAAA,OAAS,UAAAA,MAAc,cAUhB,gBAAS,YAAYC,EAAU,CAClC,GAAIA,IAAaD,EAAO,SACpB,MAAO,GAEX,KAAM,CAAE,KAAAE,EAAM,OAAAC,EAAQ,OAAAC,CAAO,EAAIJ,EAAO,eAClCK,EAAS,GAAGH,CAAI,IAAI,mBAAmBD,CAAQ,CAAC,GACtD,gBAAS,OAAS,GAAGI,CAAM,YAAYF,CAAM,qBAAqBC,CAAM,iBACjE,SAAS,OAAO,MAAM,IAAI,EAAE,SAASC,CAAM,CACtD",
  "names": ["config", "language", "name", "domain", "maxAge", "cookie"]
}
