{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/uU1mtMKXsrVAg8N5hW7w/wltkapIGIk88vadN6BJZ/cachedIndex.js"],
  "sourcesContent": ["import{checkForCachedData,setCachedData}from\"https://framer.com/m/cache-YMiL.js@b9aplVZjN51x28yfNK16\";const VERSION=1;const defaultLocaleId=\"default\";export function isDefaultLocaleId(localeId){return!localeId||localeId===\"default\";}const INDEX_KEY=\"searchIndexCache\";function getIndexKey(localeId){if(isDefaultLocaleId(localeId))return INDEX_KEY;return`${INDEX_KEY}-${localeId}`;}const METADATA_KEY=\"searchCacheMetadata\";function getMetadataKey(localeId){if(isDefaultLocaleId(localeId))return METADATA_KEY;return`${METADATA_KEY}-${localeId}`;}export async function getCachedIndex(localeId,indexHash){// A check here for metadata can be added later if we need to\n// migrate or expire the index. Though most likely, any version change\n// should result in deleting the cache and starting again.\nconst metadataKey=getMetadataKey(localeId);const indexKey=getIndexKey(localeId);const[metadata,cachedIndex]=await Promise.all([checkForCachedData(metadataKey),checkForCachedData(indexKey)]);if(cachedIndex){return{status:indexHash&&(metadata===null||metadata===void 0?void 0:metadata.indexHash)===indexHash?\"fresh\":\"stale\",searchIndex:cachedIndex};}return{status:\"miss\"};}export function setCachedIndex(localeId,index,indexHash){const indexKey=getIndexKey(localeId);setCachedData(indexKey,index);const metadata={version:VERSION,timestamp:Date.now(),indexHash};const metadataKey=getMetadataKey(localeId);setCachedData(metadataKey,metadata);}\nexport const __FramerMetadata__ = {\"exports\":{\"getCachedIndex\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setCachedIndex\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isDefaultLocaleId\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./cachedIndex.map"],
  "mappings": "gDAAsG,IAAMA,EAAQ,EAAyC,SAASC,EAAkBC,EAAS,CAAC,MAAM,CAACA,GAAUA,IAAW,SAAU,CAAC,IAAMC,EAAU,mBAAmB,SAASC,EAAYF,EAAS,CAAC,OAAGD,EAAkBC,CAAQ,EAASC,EAAgB,GAAGA,CAAS,IAAID,CAAQ,EAAG,CAAC,IAAMG,EAAa,sBAAsB,SAASC,EAAeJ,EAAS,CAAC,OAAGD,EAAkBC,CAAQ,EAASG,EAAmB,GAAGA,CAAY,IAAIH,CAAQ,EAAG,CAAC,eAAsBK,EAAeL,EAASM,EAAU,CAGxlB,IAAMC,EAAYH,EAAeJ,CAAQ,EAAQQ,EAASN,EAAYF,CAAQ,EAAO,CAACS,EAASC,CAAW,EAAE,MAAM,QAAQ,IAAI,CAACC,EAAmBJ,CAAW,EAAEI,EAAmBH,CAAQ,CAAC,CAAC,EAAE,OAAGE,EAAmB,CAAC,OAAOJ,GAAsDG,GAAS,YAAaH,EAAU,QAAQ,QAAQ,YAAYI,CAAW,EAAS,CAAC,OAAO,MAAM,CAAE,CAAQ,SAASE,EAAeZ,EAASa,EAAMP,EAAU,CAAC,IAAME,EAASN,EAAYF,CAAQ,EAAEc,EAAcN,EAASK,CAAK,EAAE,IAAMJ,EAAS,CAAC,QAAQM,EAAQ,UAAU,KAAK,IAAI,EAAE,UAAAT,CAAS,EAAQC,EAAYH,EAAeJ,CAAQ,EAAEc,EAAcP,EAAYE,CAAQ,CAAE",
  "names": ["VERSION", "isDefaultLocaleId", "localeId", "INDEX_KEY", "getIndexKey", "METADATA_KEY", "getMetadataKey", "getCachedIndex", "indexHash", "metadataKey", "indexKey", "metadata", "cachedIndex", "checkForCachedData", "setCachedIndex", "index", "setCachedData", "VERSION"]
}
