{"version":3,"sources":["../../../src/client/navigation-build-id.ts"],"sourcesContent":["// This gets assigned as a side-effect during app initialization. Because it\n// represents the build used to create the JS bundle, it should never change\n// after being set, so we store it in a global variable.\n//\n// When performing RSC requests, if the incoming data has a different build ID,\n// we perform an MPA navigation/refresh to load the updated build and ensure\n// that the client and server in sync.\n//\n// Starts as an empty string. In practice, because setNavigationBuildId is called during initialization\n// before hydration starts, this will always get reassigned to the actual ID before it's ever needed\n// by a navigation. If for some reasons it didn't, due to a bug or race condition, then on\n// navigation the build comparision would fail and trigger an MPA navigation.\n//\n// Note that this can also be initialized with the deployment id instead (if available). So it's not\n// the same as \"the build id\", but we are running out of alternative names for \"build id or\n// deployment id\".\nlet globalBuildId: string = ''\n\nexport function setNavigationBuildId(buildId: string) {\n  globalBuildId = buildId\n}\n\nexport function getNavigationBuildId(): string {\n  return globalBuildId\n}\n"],"names":["globalBuildId","setNavigationBuildId","buildId","getNavigationBuildId"],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,wDAAwD;AACxD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,sCAAsC;AACtC,EAAE;AACF,uGAAuG;AACvG,oGAAoG;AACpG,0FAA0F;AAC1F,6EAA6E;AAC7E,EAAE;AACF,oGAAoG;AACpG,2FAA2F;AAC3F,kBAAkB;AAClB,IAAIA,gBAAwB;AAE5B,OAAO,SAASC,qBAAqBC,OAAe;IAClDF,gBAAgBE;AAClB;AAEA,OAAO,SAASC;IACd,OAAOH;AACT","ignoreList":[0]}