UNPKG

1.18 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../../client/dev/fouc.js"],"names":["displayContent","callback","window","requestAnimationFrame","setTimeout","x","document","querySelectorAll","i","length","parentNode","removeChild"],"mappings":"2EAAA;AACA;AACA;AACO,QAASA,CAAAA,cAAT,CAAwBC,QAAxB,CAAkC,CACvC,CAAC,CAACC,MAAM,CAACC,qBAAP,EAAgCC,UAAjC,EAA6C,UAAY,CACxD,IACE,GAAIC,CAAAA,CAAC,CAAGC,QAAQ,CAACC,gBAAT,CAA0B,uBAA1B,CAAR,CAA4DC,CAAC,CAAGH,CAAC,CAACI,MADpE,CAEED,CAAC,EAFH,EAIE,CACAH,CAAC,CAACG,CAAD,CAAD,CAAKE,UAAL,CAAgBC,WAAhB,CAA4BN,CAAC,CAACG,CAAD,CAA7B,EACD,CACD,GAAIP,QAAJ,CAAc,CACZA,QAAQ,GACT,CACF,CAXA,EAYF","sourcesContent":["// This function is used to remove Next.js' no-FOUC styles workaround for using\n// `style-loader` in development. It must be called before hydration, or else\n// rendering won't have the correct computed values in effects.\nexport function displayContent(callback) {\n ;(window.requestAnimationFrame || setTimeout)(function () {\n for (\n var x = document.querySelectorAll('[data-next-hide-fouc]'), i = x.length;\n i--;\n\n ) {\n x[i].parentNode.removeChild(x[i])\n }\n if (callback) {\n callback()\n }\n })\n}\n"]}
\No newline at end of file