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AK,IAAI,CAAC,CACxD,EAIE,IAAIS,EAAQ,SAAS,aAAe,WACpC,MAAMC,EAAQ,IAAM,CACdD,IACJA,EAAQ,GACRD,EAAM,QAAQ,EAClB,EACMC,EACFD,EAAM,QAAQ,GAEd,SAAS,iBAAiB,mBAAoBE,EAAO,CAAE,KAAM,EAAM,GACnE,OAAO,iBAAiB,OAAQA,EAAO,CAAE,KAAM,EAAM,IAEvD,IAAI,iBAAkBC,GAAc,CAClC,GAAKF,GACL,UAAWG,KAAYD,EACrB,UAAWE,KAAQD,EAAS,WAC1B,GAAIC,EAAK,WAAa,KAAK,aAC3B,IAAIjB,EAAciB,EAAK,SAAS,EAAG,CACjCX,EAAiBW,EAAK,SAAS,EAC/B,MACV,CACQL,EAAMK,CAAI,GAGlB,CAAG,EAAE,QAAQ,SAAS,gBAAiB,CAAE,UAAW,GAAM,QAAS,EAAM,EACzE,CClEAC,EAAsB,EACtBC,EAAO,eAAgBC,CAAW,EAClCD,EAAO,4BAA6BE,CAAsB,EAC1DF,EAAO,eAAgBG,CAAW,EAClCH,EAAO,iBAAkBI,CAAa,EACtCJ,EAAO,iBAAkBK,CAAa,EACtCL,EAAO,yBAA0BM,CAA2B,EAC5DN,EAAO,iBAAkBO,CAAa,EAEtCC,EAAW,EACXhB,EAA2B","names":["EDITOR_REGISTRY_TAGS","loading","needsRegistry","tag","undefinedOwnTags","root","tags","element","loadFullRegistry","reason","importWithRecovery","__vitePreload","error","watchForUndefinedComponents","check","ready","start","mutations","mutation","node","registerBaseComponents","define","ModalDialog","ModalDialogWithButtons","ModalSlider","OptionsDialog","IconComponent","PremiumCompareSliderElement","TemplatesGrid","initPostToc"],"ignoreList":[],"sources":["../js/src/utils/fullRegistryFallback.js","../js/src/indexLandings.js"],"sourcesContent":["// Safety net for pages that load the light landings bundle (src/indexLandings.js). If one of OUR\n// components (the tags src/index.js defines) is found in the document and nothing has defined it, the\n// full component registry (src/index.js, the editor's) is downloaded once and defines it; the browser\n// upgrades the element in place. Pages the inventory covers never trigger this; a page that was missed\n// works as before, paying the download only there. Any other dashed tag (browser extensions inject\n// their own, embedded widgets too) is none of our business and never triggers a download.\n// It watches the light DOM: our components create what they need themselves.\nimport { importWithRecovery } from \"./lazyImport.js\"\n\n// Keep in sync with the define() calls of src/index.js (fullRegistryFallback.test.js checks it).\nexport const EDITOR_REGISTRY_TAGS = new Set([\n  \"account-creator\", \"account-selector\", \"analytics-dashboard\", \"animation-picker\", \"asset-picker\",\n  \"atom-link\", \"atom-links-list\", \"background-color-customization\", \"button-style-recommendations\",\n  \"whatsapp-order-unit-modal-content\", \"background-image\", \"background-picker\", \"boonds-picker\", \"button-preview\",\n  \"category-select\", \"color-picker\", \"cropper-image\", \"cropper-image-request\", \"delete-confirmation\",\n  \"domain-name-form\", \"domain-purchase-manager\", \"element-picker\", \"external-image-gallery\", \"giphy-picker\",\n  \"google-maps-link\", \"gradients-component\", \"icon-component\", \"iframe-preview\", \"inline-color-picker\",\n  \"items-selection\", \"layout-select\", \"link-font-size\", \"links-list\", \"modal-dialog\",\n  \"modal-dialog-with-buttons\", \"modal-slider\", \"onboarding-component\", \"options-dialog\", \"palette-select\",\n  \"phone-component\", \"premium-compare-slider\", \"preview-context\", \"profile-details\", \"progress-bar\",\n  \"public-qr-code\", \"pwa-install-prompt\", \"qr-code-styling\", \"reviews-component\", \"rich-text\",\n  \"rows-component\", \"scroll-list\", \"server-modal-dialog\", \"share-options\", \"slider-picker\", \"ssr-modal\",\n  \"star-rating\", \"templates-grid\", \"theme-customization\", \"thumbnail-picker\", \"tooltip-popup\",\n  \"tutorial-tooltip\", \"unsplash-component\", \"welcome-component\", \"welcome-links-builder\",\n  \"welcome-page-blocks-step\", \"welcome-preview-shell\", \"welcome-ready\", \"whatsapp-order-settings\",\n])\n\nlet loading = null\n\nfunction needsRegistry(tag) {\n  return EDITOR_REGISTRY_TAGS.has(tag) && !customElements.get(tag)\n}\n\nfunction undefinedOwnTags(root) {\n  const tags = new Set()\n  root.querySelectorAll(\"*\").forEach((element) => {\n    if (needsRegistry(element.localName)) tags.add(element.localName)\n  })\n  return tags\n}\n\nfunction loadFullRegistry(reason) {\n  loading ??= importWithRecovery(() => import(\"../index.js\")).catch((error) => {\n    loading = null\n    console.warn(\"Could not load the full component registry for\", reason, error)\n  })\n  return loading\n}\n\nexport function watchForUndefinedComponents() {\n  const check = (root) => {\n    const tags = undefinedOwnTags(root)\n    if (tags.size) loadFullRegistry([...tags].join(\", \"))\n  }\n  // Deferred module scripts run while readyState is already \"interactive\" and before DOMContentLoaded;\n  // other entries of the page (main_tools.js defines the generators) may still be pending, so nothing is\n  // judged before DOMContentLoaded. When the module is evaluated after a complete load, it scans at once.\n  let ready = document.readyState === \"complete\"\n  const start = () => {\n    if (ready) return\n    ready = true\n    check(document)\n  }\n  if (ready) {\n    check(document)\n  } else {\n    document.addEventListener(\"DOMContentLoaded\", start, { once: true })\n    window.addEventListener(\"load\", start, { once: true })\n  }\n  new MutationObserver((mutations) => {\n    if (!ready) return\n    for (const mutation of mutations) {\n      for (const node of mutation.addedNodes) {\n        if (node.nodeType !== Node.ELEMENT_NODE) continue\n        if (needsRegistry(node.localName)) {\n          loadFullRegistry(node.localName)\n          return\n        }\n        check(node)\n      }\n    }\n  }).observe(document.documentElement, { childList: true, subtree: true })\n}\n","// Components of the marketing, SEO and blog pages (every template that loads out/main_index.js). Until\n// Nov 2026 these pages loaded src/index.js, the editor's full registry (~580 KB gzipped of JavaScript).\n// The inventory of custom elements in those templates and in the components they render is: the header\n// menus, Toast, the modal dialogs and sliders, option dialogs, icons, the Premium comparison slider\n// (pricing pages) and the templates grid. Anything else is caught by the fallback below.\nimport { define, registerBaseComponents } from \"./baseComponents.js\"\nimport ModalDialog from \"./components/Shared/ModalDialog.js\"\nimport ModalDialogWithButtons from \"./components/Shared/ModalDialogWithButtons.js\"\nimport ModalSlider from \"./components/Shared/ModalSlider.js\"\nimport OptionsDialog from \"./components/Shared/OptionsDialog.js\"\nimport IconComponent from \"./components/Shared/Icon.js\"\nimport { PremiumCompareSliderElement } from \"./components/Shared/PremiumCompareSlider.js\"\nimport TemplatesGrid from \"./components/Shared/TemplatesGrid.js\"\nimport { initPostToc } from \"./utils/postToc.js\"\nimport { watchForUndefinedComponents } from \"./utils/fullRegistryFallback.js\"\n\nregisterBaseComponents()\ndefine(\"modal-dialog\", ModalDialog)\ndefine(\"modal-dialog-with-buttons\", ModalDialogWithButtons)\ndefine(\"modal-slider\", ModalSlider)\ndefine(\"options-dialog\", OptionsDialog)\ndefine(\"icon-component\", IconComponent)\ndefine(\"premium-compare-slider\", PremiumCompareSliderElement)\ndefine(\"templates-grid\", TemplatesGrid)\n\ninitPostToc()\nwatchForUndefinedComponents()\n"],"file":"main_index.js"}