// Production entry: served as /editor/onpage-editor.js and loaded by the page's // own loader only when the preview cookie is set (docs/onpage-editor.md ยง2). // It re-checks, so loading it by mistake never shows editor UI to visitors. import { boot } from './boot' import { PREVIEW_FRAME_NAME } from './style/DevicePreview' export const previewEnabled = () => /(?:^|;\s*)cms_preview=1/.test(document.cookie) // The device-preview iframe shows the page only; it must not boot a second editor. if (previewEnabled() && window.name !== PREVIEW_FRAME_NAME) boot() export { boot } export * from './registry'