The WYN Journal

Cobertura inteligente.
Miami Lifestyle.

Consejos de expertos sobre la protección de su riqueza, la inteligencia AI, y navegar por el mercado de seguros de Florida.

Historia Destacada

Storm Prep
Hogar & Seguridad
Hoy 7 min leer

Temporada de Huracanes: 7 Jugadas de Seguro que Tienes que Hacer Antes de la Tormenta

Deducibles, periodos de espera, e inundaciones contra propietarios. Aquí está la estrategia ganadora para asegurar sus activos antes de que comience la temporada.

Lea la guía completa
Sedán moderno manejando por las calles de Miami Auto

¿Qué Cobertura Necesito Realmente en un Carro Financiado en Florida?

Mínimos de Florida vs. lo que el banco realmente exige. Desglosamos comprehensive, collision y GAP para los drivers de Miami.

Carro en un bulevar soleado de Miami Auto

Cobertura UM en Florida: La Casilla que Firmaste Sin Leer

Casi 1 de cada 5 conductores en Florida no tiene seguro. Por qué la forma de rechazo en el dealership puede costarte seis cifras.

Condos de Miami con vista al mar Condo

Seguro de Condo en Miami: Qué Cubre Tu HOA (y Qué No)

¿Walls-in o walls-out? Por qué los dueños de condo necesitan su propia cobertura para interiores y liability.

Casa moderna de Florida con palmeras Hogar

Seguro de Hogar en Florida vs Citizens: Cómo Decidir

Citizens cayó 73% desde 2023. Si sigues ahí, quizás estás pagando de más — y la regla del 20% te puede obligar a moverte.

Bote de pesca deportiva cruzando aguas turquesa Marino

Seguro de Bote para Viajes a las Bahamas

Navigation limits, endorsements para Bahamas, y requisitos para boteros de Miami que cruzan.

Doctor revisando opciones con paciente Salud

HMO vs PPO en Florida: ¿Cuál Red de Verdad te Conviene?

Miami tiene tres sistemas hospitalarios grandes a veinte minutos uno del otro. La red que elijas importa más aquí.

Adulto mayor reuniéndose con asesor Medicare

¿Cumpliendo 65? 7 Decisiones de Medicare

La regla 3-3-3, Part A/B, Advantage vs Supplement, y las penalidades a evitar. No lo dejes para último minuto.

Familia revisando planes financieros Vida

Seguro de Vida Term vs Permanent: El Breakdown para Familias de Miami

Si term es 10x más barato, ¿por qué existe permanent? Porque resuelven problemas distintos. Cómo mezclar los dos.

Equipo de startup colaborando en oficina creativa Negocios

5 Errores de Seguro que Cometen los Startups de Miami

Sin liability, límites mal puestos, mezclar personal y negocio, y saltarse cyber coverage.

"/about.html": { flow: "chat" }, "/careers.html": { flow: "chat" }, "/insights.html": { flow: "chat" }, "/legal.html": { flow: "chat" }, "/es": { flow: "quote" }, "/es/": { flow: "quote" }, "/es/index.html": { flow: "quote" }, "/es/auto.html": { flow: "quote", productKey: "auto" }, "/es/home.html": { flow: "quote", productKey: "home" }, "/es/life.html": { flow: "quote", productKey: "life" }, "/es/health.html": { flow: "quote", productKey: "health" }, "/es/pet.html": { flow: "quote", productKey: "pet" }, "/es/motorcycle.html": { flow: "quote", productKey: "motorcycle" }, "/es/marine.html": { flow: "quote", productKey: "marine" }, "/es/business.html": { flow: "quote", productKey: "business" }, "/es/cyber.html": { flow: "quote", productKey: "cyber" }, "/es/employee-benefits.html": { flow: "quote", productKey: "employee-benefits" }, "/es/renters.html": { flow: "quote", productKey: "renters" }, "/es/luxury.html": { flow: "quote", productKey: "luxury" }, "/es/claims.html": { flow: "claim" }, "/es/service.html": { flow: "service" }, "/es/contact.html": { flow: "chat" }, "/es/about.html": { flow: "chat" }, "/es/careers.html": { flow: "chat" }, "/es/insights.html": { flow: "chat" }, "/es/legal.html": { flow: "chat" } }; var frameReady = false; var pendingActions = []; var inflightByKey = {}; var lastExpandAckAt = 0; var POSITION_STORAGE_KEY = "lunaWidgetDesktopPosition:v1"; var dragState = null; var dragHandleSyncRafId = 0; var dragHandleSyncDeadline = 0; function normalizeFlow(value) { var flow = String(value || "").trim().toLowerCase(); return flow === "quote" || flow === "chat" || flow === "claim" || flow === "service" ? flow : "chat"; } function normalizeLanguage(value) { var raw = String(value || "").trim().toLowerCase(); return raw.indexOf("es") === 0 ? "es" : "en"; } function normalizeProduct(value) { return String(value || "").trim().toLowerCase().replace(/[\s_]+/g, "-"); } function normalizePath(pathname) { var value = String(pathname || "/").trim().toLowerCase(); if (!value) return "/"; if (value !== "/" && value.endsWith("/")) { value = value.slice(0, -1); } return value; } function resolveLang() { var path = normalizePath(window.location.pathname || "/"); var docLang = String((document.documentElement && document.documentElement.lang) || "").toLowerCase(); if (path === "/es" || path.indexOf("/es/") === 0 || docLang.indexOf("es") === 0) { return "es"; } return "en"; } function resolveActionForPath() { var path = normalizePath(window.location.pathname || "/"); if (FLOW_MAP[path]) { return FLOW_MAP[path]; } return { flow: "quote" }; } function getFrame() { return document.getElementById("luna-widget-frame"); } function getDragHandle() { return document.getElementById("luna-widget-drag-handle"); } function isDesktopViewport() { return window.innerWidth > 768; } function getStoredDesktopPosition() { try { var raw = window.localStorage.getItem(POSITION_STORAGE_KEY); if (!raw) return null; var parsed = JSON.parse(raw); var left = Number(parsed.left); var top = Number(parsed.top); if (!Number.isFinite(left) || !Number.isFinite(top)) return null; return { left: left, top: top }; } catch (err) { return null; } } function storeDesktopPosition(position) { if (!position || !Number.isFinite(position.left) || !Number.isFinite(position.top)) return; try { window.localStorage.setItem( POSITION_STORAGE_KEY, JSON.stringify({ left: Math.round(position.left), top: Math.round(position.top) }) ); } catch (err) { } } function clearInlineDesktopPosition() { var frame = getFrame(); if (!frame) return; frame.style.removeProperty("left"); frame.style.removeProperty("top"); frame.style.removeProperty("right"); frame.style.removeProperty("bottom"); } function clampDesktopPosition(left, top, width, height) { var minX = 8; var minY = 8; var maxX = Math.max(minX, window.innerWidth - width - 8); var maxY = Math.max(minY, window.innerHeight - height - 8); return { left: Math.min(maxX, Math.max(minX, left)), top: Math.min(maxY, Math.max(minY, top)) }; } function stopDragHandleSyncLoop() { if (dragHandleSyncRafId) { window.cancelAnimationFrame(dragHandleSyncRafId); dragHandleSyncRafId = 0; } dragHandleSyncDeadline = 0; } function startDragHandleSyncLoop(durationMs) { dragHandleSyncDeadline = Date.now() + Math.max(0, Number(durationMs) || 0); if (dragHandleSyncRafId) return; function tick() { dragHandleSyncRafId = 0; var frame = getFrame(); if (!frame || !frame.classList.contains("expanded") || !isDesktopViewport()) { stopDragHandleSyncLoop(); return; } syncDragHandlePosition(); if (Date.now() < dragHandleSyncDeadline) { dragHandleSyncRafId = window.requestAnimationFrame(tick); } } dragHandleSyncRafId = window.requestAnimationFrame(tick); } function syncDragHandlePosition() { var frame = getFrame(); var handle = getDragHandle(); if (!frame || !handle || !frame.classList.contains("expanded") || !isDesktopViewport()) return; var rect = frame.getBoundingClientRect(); var handleWidth = Math.max(handle.offsetWidth || 64, 64); var handleHeight = Math.max(handle.offsetHeight || 24, 24); var edgePadding = 8; var horizontalInset = 0; var verticalGap = 8; var preferredLeft = rect.right - handleWidth - horizontalInset; var preferredTop = rect.top - handleHeight - verticalGap; var left = Math.max(edgePadding, Math.min(preferredLeft, window.innerWidth - handleWidth - edgePadding)); var top = Math.max(edgePadding, Math.min(preferredTop, window.innerHeight - handleHeight - edgePadding)); handle.style.left = Math.round(left) + "px"; handle.style.top = Math.round(top) + "px"; } function setDragHandleVisible(visible) { var handle = getDragHandle(); if (!handle) return; if (visible && isDesktopViewport()) { stopDragHandleSyncLoop(); syncDragHandlePosition(); handle.classList.add("visible"); startDragHandleSyncLoop(520); } else { stopDragHandleSyncLoop(); handle.classList.remove("visible"); handle.classList.remove("dragging"); handle.style.removeProperty("left"); handle.style.removeProperty("top"); } } function applyStoredDesktopPosition() { var frame = getFrame(); if (!frame || !frame.classList.contains("expanded") || !isDesktopViewport()) return; var stored = getStoredDesktopPosition(); if (!stored) { clearInlineDesktopPosition(); window.requestAnimationFrame(syncDragHandlePosition); return; } var rect = frame.getBoundingClientRect(); var clamped = clampDesktopPosition(stored.left, stored.top, rect.width, rect.height); frame.style.left = Math.round(clamped.left) + "px"; frame.style.top = Math.round(clamped.top) + "px"; frame.style.right = "auto"; frame.style.bottom = "auto"; window.requestAnimationFrame(syncDragHandlePosition); } function clearStoredDesktopPosition() { try { window.localStorage.removeItem(POSITION_STORAGE_KEY); } catch (err) { } } function isBottomLeftResetZone(frameRect) { if (!frameRect) return false; var resetZone = 40; var leftGap = Math.max(0, frameRect.left); var bottomGap = Math.max(0, window.innerHeight - frameRect.bottom); return leftGap <= resetZone && bottomGap <= resetZone; } function resetDesktopPositionToDefault() { clearStoredDesktopPosition(); clearInlineDesktopPosition(); window.requestAnimationFrame(syncDragHandlePosition); } function attachDragHandleEvents() { var handle = getDragHandle(); if (!handle || handle.getAttribute("data-bound") === "true") return; handle.setAttribute("data-bound", "true"); function endDrag(pointerId) { if (!dragState) return; if (pointerId != null && dragState.pointerId !== pointerId) return; var frame = dragState.frame || getFrame(); var activeHandle = getDragHandle(); window.removeEventListener("pointermove", dragState.onMove); window.removeEventListener("pointerup", dragState.onUp); window.removeEventListener("pointercancel", dragState.onCancel); window.removeEventListener("blur", dragState.onBlur); if (activeHandle) { activeHandle.classList.remove("dragging"); if (typeof activeHandle.releasePointerCapture === "function") { try { activeHandle.releasePointerCapture(dragState.pointerId); } catch (err) { } } } if (frame) { var currentRect = frame.getBoundingClientRect(); if (isDesktopViewport() && frame.classList.contains("expanded") && isBottomLeftResetZone(currentRect)) { resetDesktopPositionToDefault(); } else { storeDesktopPosition({ left: currentRect.left, top: currentRect.top }); } } dragState = null; } handle.addEventListener("pointerdown", function(event) { var frame = getFrame(); if (!frame || !isDesktopViewport() || !frame.classList.contains("expanded")) return; if (event.button !== 0) return; event.preventDefault(); var rect = frame.getBoundingClientRect(); function onMove(moveEvent) { if (!dragState) return; if (moveEvent.pointerId !== dragState.pointerId) return; if ((moveEvent.buttons & 1) === 0) { endDrag(moveEvent.pointerId); return; } var deltaX = moveEvent.clientX - dragState.pointerStartX; var deltaY = moveEvent.clientY - dragState.pointerStartY; var nextLeft = dragState.frameStartLeft + deltaX; var nextTop = dragState.frameStartTop + deltaY; var frameRect = frame.getBoundingClientRect(); var clamped = clampDesktopPosition(nextLeft, nextTop, frameRect.width, frameRect.height); frame.style.left = Math.round(clamped.left) + "px"; frame.style.top = Math.round(clamped.top) + "px"; frame.style.right = "auto"; frame.style.bottom = "auto"; syncDragHandlePosition(); } function onUp(upEvent) { endDrag(upEvent.pointerId); } function onCancel(cancelEvent) { endDrag(cancelEvent.pointerId); } function onBlur() { endDrag(null); } dragState = { pointerId: event.pointerId, pointerStartX: event.clientX, pointerStartY: event.clientY, frameStartLeft: rect.left, frameStartTop: rect.top, frame: frame, onMove: onMove, onUp: onUp, onCancel: onCancel, onBlur: onBlur }; handle.classList.add("dragging"); if (typeof handle.setPointerCapture === "function") { try { handle.setPointerCapture(event.pointerId); } catch (err) { } } window.addEventListener("pointermove", onMove); window.addEventListener("pointerup", onUp); window.addEventListener("pointercancel", onCancel); window.addEventListener("blur", onBlur); }); handle.addEventListener("dblclick", function(event) { event.preventDefault(); resetDesktopPositionToDefault(); }); } function ensureIframeParams(frame) { try { var url = new URL(frame.getAttribute("src"), window.location.href); url.searchParams.set("embedded", "true"); url.searchParams.set("agencyId", "wyn-ins-79"); url.searchParams.set("minimized", "true"); url.searchParams.set("theme", "auto"); url.searchParams.set("lang", resolveLang()); frame.setAttribute("src", url.toString()); } catch (err) { } } function expandFrame() { var frame = getFrame(); if (!frame) return; frame.classList.add("expanded"); if (isDesktopViewport()) { applyStoredDesktopPosition(); setDragHandleVisible(true); } else { clearInlineDesktopPosition(); setDragHandleVisible(false); } } function collapseFrame() { var frame = getFrame(); if (!frame) return; frame.classList.remove("expanded"); clearInlineDesktopPosition(); setDragHandleVisible(false); } function postToWidget(type, payload) { var frame = getFrame(); if (!frame || !frame.contentWindow) return false; try { frame.contentWindow.postMessage({ type: type, payload: payload }, WIDGET_ORIGIN); return true; } catch (err) { return false; } } function buildActionPayload(raw) { var sourcePage = normalizePath(window.location.pathname || "/"); var metadata = raw && typeof raw.metadata === "object" ? raw.metadata : {}; return { flow: normalizeFlow(raw && (raw.flow || raw.action || "chat")), productKey: normalizeProduct(raw && (raw.productKey || raw.product || "")), language: normalizeLanguage((raw && (raw.language || raw.lang)) || resolveLang()), sourcePage: String((raw && raw.sourcePage) || sourcePage || "").trim(), sourceButtonId: String((raw && (raw.sourceButtonId || raw.source)) || "").trim(), metadata: metadata, }; } function actionKey(payload) { return [ payload.flow || "", payload.productKey || "", payload.language || "", payload.sourcePage || "", payload.sourceButtonId || "" ].join("|"); } function postAction(payload) { return postToWidget("LUNA_ACTION", payload); } function clearInflight(key) { var entry = inflightByKey[key]; if (!entry) return; if (entry.intervalId) window.clearInterval(entry.intervalId); if (entry.timeoutId) window.clearTimeout(entry.timeoutId); delete inflightByKey[key]; } function sendActionWithRetry(rawPayload) { var payload = buildActionPayload(rawPayload || {}); var key = actionKey(payload); clearInflight(key); expandFrame(); function deliverOnce() { if (!frameReady) return false; return postAction(payload); } if (deliverOnce()) { return payload; } var alreadyQueued = pendingActions.some(function(action) { return actionKey(action) === key; }); if (!alreadyQueued) { pendingActions.push(payload); } var timeoutId = window.setTimeout(function() { if (frameReady) { flushPendingActions(); } clearInflight(key); }, 350); inflightByKey[key] = { intervalId: 0, timeoutId: timeoutId }; return payload; } function flushPendingActions() { if (!frameReady || !pendingActions.length) return; var queue = pendingActions.slice(); pendingActions = []; queue.forEach(function(action) { sendActionWithRetry(action); }); } function getActionFromPath(path) { if (path && FLOW_MAP[path]) { return { flow: normalizeFlow(FLOW_MAP[path].flow || "quote"), productKey: normalizeProduct(FLOW_MAP[path].productKey || "") }; } return null; } function parseLocalHrefPath(node) { if (!node || typeof node.getAttribute !== "function") return ""; var rawHref = String(node.getAttribute("href") || "").trim(); if (!rawHref) return ""; if (/^(mailto:|tel:|sms:|javascript:|#)/i.test(rawHref)) return ""; try { var url = new URL(rawHref, window.location.href); if (url.origin !== window.location.origin) return ""; return normalizePath(url.pathname || "/"); } catch (err) { return ""; } } function detectProductFromText(text) { var value = String(text || "").toLowerCase(); if (!value) return ""; if (/(employee\s*benefits?|beneficios?\s+para\s+empleados|beneficios?\s+laborales)/i.test(value)) return "employee-benefits"; if (/(motorcycle|motorbike|moto(cicleta)?|toy\s+fast)/i.test(value)) return "motorcycle"; if (/(marine|boat|yacht|bote|barco|lancha)/i.test(value)) return "marine"; if (/(renters?|inquilin|renta|bundle\s+rates?|bundle\s+tarifas?)/i.test(value)) return "renters"; if (/(medicare|aca|health|salud|private\s+plans?|planes?\s+privad)/i.test(value)) return "health"; if (/(whole\s+life|term\s+life|term\s+quote|cash\s+value|valor\s+de\s+efectivo|iul|\blife\b|\bvida\b|cobertura)/i.test(value)) return "life"; if (/(\bhome\b|hogar|\bcasa\b)/i.test(value)) return "home"; if (/(pet|mascota|dog|cat)/i.test(value)) return "pet"; if (/(cyber|ciber)/i.test(value)) return "cyber"; if (/(business|\bbiz\b|negocio|commercial)/i.test(value)) return "business"; if (/(luxury|private\s+consultation|consulta\s+privada)/i.test(value)) return "luxury"; if (/(\bauto\b|\bcar\b|vehicle|vehicul|carro|coche)/i.test(value)) return "auto"; return ""; } function isSubsidyCalculatorText(text) { var value = String(text || "").toLowerCase(); return /(check\s+my\s+subsidy|comprueba\s+mi\s+subvenc|subsidy\s+calculator|calculadora\s+de\s+subvenc)/i.test(value); } function isQuoteTriggerText(text) { var value = String(text || "").toLowerCase(); if (!value) return false; var hasActionVerb = /(get|start|check|view|protect|request|calculate|build|explore|need|quote|review|revisar|obtener|ver|proteger|protege|solicitar|calcular|construir|construye|construya|necesito|comprueba|explora|cotiza|cotizar)/i.test(value); var hasQuoteSignal = /(quote|cotiz|citas?|presupuesto|rates?|tarifas?|plans?|planes?|coverage|cobertura|consultation|consulta|eligibility|elegibilidad|protection|protecci[o?]n|proteccion|medicare|cash\s+value|valor\s+de\s+efectivo|review|term|life|vida|home|hogar|auto|pet|mascota|marine|boat|motorcycle|moto|renters|inquilin|cyber|ciber|business|\bbiz\b|negocio|employee\s*benefits?|beneficios?)/i.test(value); return hasActionVerb && hasQuoteSignal; } function resolveQuoteProduct(explicitProduct, textProduct, pathAction, pageAction) { if (explicitProduct) return explicitProduct; if (textProduct) return textProduct; if (pathAction && pathAction.flow === "quote") { return pathAction.productKey || ""; } return pageAction.productKey || ""; } function inferActionForNode(node, pageAction) { if (!node || typeof node.getAttribute !== "function") return null; if (node.getAttribute("data-luna-ignore") === "true") return null; var explicitFlowRaw = node.getAttribute("data-luna-action") || node.getAttribute("data-luna-intent") || node.getAttribute("data-luna-flow") || ""; var explicitFlow = explicitFlowRaw ? normalizeFlow(explicitFlowRaw) : ""; var explicitProduct = normalizeProduct(node.getAttribute("data-luna-product") || ""); var hrefPath = parseLocalHrefPath(node); var pathAction = getActionFromPath(hrefPath); var textRaw = String(node.textContent || "").trim(); var textProduct = detectProductFromText(textRaw); if (explicitFlow) { return { flow: explicitFlow, productKey: explicitFlow === "quote" ? resolveQuoteProduct(explicitProduct, textProduct, pathAction, pageAction) : "" }; } var rawHref = String(node.getAttribute("href") || "").trim(); var hasCommsHref = /^(mailto:|tel:|sms:)/i.test(rawHref); if (hasCommsHref) { return null; } if (isSubsidyCalculatorText(textRaw)) { return null; } if (isQuoteTriggerText(textRaw)) { return { flow: "quote", productKey: resolveQuoteProduct(explicitProduct, textProduct, pathAction, pageAction) }; } if (node.hasAttribute("data-luna-open") || node.hasAttribute("data-luna-source-id")) { return { flow: pageAction.flow || "quote", productKey: pageAction.flow === "quote" ? resolveQuoteProduct(explicitProduct, textProduct, pathAction, pageAction) : "" }; } return null; } function applyPageCtaBindings() { var pageAction = resolveActionForPath(); var lang = resolveLang(); var nodes = document.querySelectorAll( 'a[href],button,[data-luna-open],[data-luna-action],[data-luna-intent],[data-luna-flow]' ); if (!nodes.length) { return false; } var boundCount = 0; nodes.forEach(function(node, index) { if (!node) return; var inferred = inferActionForNode(node, pageAction); if (!inferred) return; node.setAttribute("data-luna-action", inferred.flow || "quote"); node.setAttribute("data-luna-lang", lang); if (inferred.flow === "quote" && inferred.productKey) { node.setAttribute("data-luna-product", inferred.productKey); } else { node.removeAttribute("data-luna-product"); } if (!node.getAttribute("data-luna-source-id")) { node.setAttribute("data-luna-source-id", "auto_bind_" + String(index + 1)); } boundCount += 1; }); return boundCount > 0; } function bindHostCtaDelegation() { if (window.__lunaHostCtaBound) return; window.__lunaHostCtaBound = true; document.addEventListener("click", function(event) { var target = event.target; if (!target || typeof target.closest !== "function") return; var cta = target.closest("[data-luna-action],[data-luna-open],[data-luna-intent],[data-luna-flow]"); if (!cta) return; var pageAction = resolveActionForPath(); var inferred = inferActionForNode(cta, pageAction); if (!inferred) return; var payload = { flow: inferred.flow, productKey: inferred.flow === "quote" ? inferred.productKey : "", language: cta.getAttribute("data-luna-lang") || resolveLang(), sourcePage: normalizePath(window.location.pathname || "/"), sourceButtonId: cta.getAttribute("data-luna-source-id") || cta.id || "", metadata: { text: String(cta.textContent || "").trim().slice(0, 120) } }; event.preventDefault(); sendActionWithRetry(payload); }); } function sendTheme() { var frame = getFrame(); if (!frame || !frame.contentWindow) return; var isDarkMode = document.documentElement.classList.contains("dark"); var theme = isDarkMode ? "dark" : "light"; frame.contentWindow.postMessage({ type: "SET_THEME", payload: { theme: theme } }, WIDGET_ORIGIN); } function installHostLunaApi() { window.Luna = window.Luna || {}; window.Luna.open = function(payload) { return sendActionWithRetry(payload || {}); }; window.Luna.sendAction = window.Luna.open; if (typeof window.Luna.close !== "function") { window.Luna.close = function() { collapseFrame(); }; } if (typeof window.Luna.init !== "function") { window.Luna.init = function() { return window.Luna; }; } } function handleWidgetMessages(event) { if (event.origin !== WIDGET_ORIGIN) return; var type = event && event.data && event.data.type; if (!type) return; frameReady = true; if (type === "LUNA_DIAL_REQUEST") { var href = event && event.data && event.data.payload && typeof event.data.payload.href === "string" ? event.data.payload.href.trim() : ""; if (href) { try { window.location.href = href; } catch (err) { try { window.open(href, "_top"); } catch (innerErr) { } } } return; } if (type === "LUNA_OPENED" || type === "LUNA_EXPANDED") { lastExpandAckAt = Date.now(); expandFrame(); return; } if (type === "LUNA_CLOSED" || type === "LUNA_MINIMIZED" || type === "CLOSE_LUNA_WIDGET") { collapseFrame(); } } function boot() { var frame = getFrame(); if (!frame) return; attachDragHandleEvents(); ensureIframeParams(frame); installHostLunaApi(); bindHostCtaDelegation(); applyPageCtaBindings(); var tries = 0; var timer = window.setInterval(function() { tries += 1; if (applyPageCtaBindings() || tries > 40) { window.clearInterval(timer); } }, 150); frame.addEventListener("load", function() { frameReady = true; sendTheme(); flushPendingActions(); }); window.setTimeout(function() { if (frame && frame.contentWindow) { frameReady = true; sendTheme(); flushPendingActions(); } }, 260); window.addEventListener("message", handleWidgetMessages); window.addEventListener("resize", function() { var activeFrame = getFrame(); if (!activeFrame) return; if (!activeFrame.classList.contains("expanded")) { setDragHandleVisible(false); return; } if (!isDesktopViewport()) { clearInlineDesktopPosition(); setDragHandleVisible(false); return; } applyStoredDesktopPosition(); setDragHandleVisible(true); }); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.attributeName === "class") { sendTheme(); } }); }); observer.observe(document.documentElement, { attributes: true }); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", boot); } else { boot(); } })();