/** * HAIQ embedded checkout widget. * Expects wp_localize_script object `haiqCheckout`: * stripePublishableKey, edgeCreateCheckoutUrl, optional defaultPartner ('sac' | 'msc' | 'pdr'). */ ;(function () { 'use strict' var localized = typeof window.haiqCheckout !== 'undefined' && window.haiqCheckout !== null ? window.haiqCheckout : {} var STRIPE_PUBLISHABLE_KEY = localized.stripePublishableKey || '' var EDGE_FUNCTION_URL = localized.edgeCreateCheckoutUrl || '' if (window.createHaiqWidget) return window.__HAIQ_WIDGETS = [] window.__HAIQ_EMBEDDED_CHECKOUT__ = null window.destroyAllHaiqCheckouts = function () { if (window.__HAIQ_EMBEDDED_CHECKOUT__) { try { window.__HAIQ_EMBEDDED_CHECKOUT__.destroy() } catch (err) { /* ignore */ } window.__HAIQ_EMBEDDED_CHECKOUT__ = null } window.__HAIQ_WIDGETS.forEach(function (w) { w.reset() }) } window.createHaiqWidget = function (config) { var matchingElements = document.querySelectorAll('#' + config.containerId) var root = null for (var i = 0; i < matchingElements.length; i++) { if (!matchingElements[i].getAttribute('data-haiq-built')) { root = matchingElements[i] root.setAttribute('data-haiq-built', 'true') break } } if (!root) return var subtitleRaw = config.subtitle != null && String(config.subtitle).trim() !== '' ? String(config.subtitle).trim() : '' var subtitleBlock = subtitleRaw === '' ? '' : '

' + escapeHtml(subtitleRaw) + '

' root.innerHTML = '
' + '
' + '
' + '' + '' + '
' + '
' + '

' + escapeHtml(config.title) + '

' + subtitleBlock + '
' + '
' + escapeHtml(config.monthlyPrice) + '
' + '
Every month
' + '
' + '

' + escapeHtml(config.description) + '

' + '
' + '' + '
' + '
' + '

Opening secure checkout...

' + '
' + '
' + '' + '
' + '
' + '
' var activePlan = 'monthly' var PRODUCTS = { monthly: { priceText: config.monthlyPrice, suffix: 'Every month', term: 1, }, two_month: { priceText: config.twoMonthPrice, suffix: 'Every 2 months', term: 2, }, } var planBtns = root.querySelectorAll('.haiq-plan-btn') var priceEl = root.querySelector('.haiq-price') var suffixEl = root.querySelector('.haiq-price-suffix') var subscribeBtn = root.querySelector('.haiq-subscribe-btn') var checkoutSection = root.querySelector('.haiq-checkout-section') var loadingText = root.querySelector('.haiq-loading-text') var checkoutMountEl = root.querySelector('.haiq-checkout-container') var cancelBtn = root.querySelector('.haiq-cancel-btn') window.__HAIQ_WIDGETS.push({ reset: function () { checkoutSection.style.display = 'none' subscribeBtn.disabled = false subscribeBtn.style.opacity = '1' checkoutMountEl.innerHTML = '' }, }) function scrollCheckoutSectionIntoView(opts) { var snap = opts && opts.snap === true var b = snap ? 'auto' : 'smooth' window.requestAnimationFrame(function () { checkoutSection.scrollIntoView({ behavior: b, block: 'center', inline: 'nearest', }) }) } function renderPlan() { var cfg = PRODUCTS[activePlan] priceEl.textContent = cfg.priceText suffixEl.textContent = cfg.suffix planBtns.forEach(function (b) { var isActive = b.getAttribute('data-plan') === activePlan b.classList.toggle('is-active', isActive) b.setAttribute('aria-pressed', isActive ? 'true' : 'false') }) } function getPartner(config) { var partnerRaw = ( (config.partner != null ? String(config.partner) : '') || (localized.defaultPartner != null ? String(localized.defaultPartner) : '') ) .trim() .toLowerCase() if (partnerRaw === 'msc' || partnerRaw === 'sac' || partnerRaw === 'pdr') { return partnerRaw } return '' } async function openCheckout() { if (!STRIPE_PUBLISHABLE_KEY || !EDGE_FUNCTION_URL) { checkoutSection.style.display = 'block' loadingText.style.display = 'block' loadingText.textContent = 'Checkout is not configured. Please contact the site administrator.' subscribeBtn.disabled = false subscribeBtn.style.opacity = '1' scrollCheckoutSectionIntoView() return } window.destroyAllHaiqCheckouts() subscribeBtn.disabled = true subscribeBtn.style.opacity = '0.7' checkoutSection.style.display = 'block' loadingText.style.display = 'block' loadingText.textContent = 'Opening secure checkout...' scrollCheckoutSectionIntoView() try { if (!window.__HAIQ_SHARED_STRIPE__) { window.__HAIQ_SHARED_STRIPE__ = window.Stripe(STRIPE_PUBLISHABLE_KEY) } var stripe = window.__HAIQ_SHARED_STRIPE__ var requestPayload = { productKey: config.productKey, term: PRODUCTS[activePlan].term, source_url: window.location.href, source_page_title: document.title, } var partner = getPartner(config) if (partner !== '') { requestPayload.partner = partner } var response = await fetch(EDGE_FUNCTION_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(requestPayload), }) var data = await response.json().catch(function () { return {} }) if (!response.ok) { throw new Error(data && data.error ? data.error : 'Failed to create checkout.') } var checkout = await stripe.initEmbeddedCheckout({ clientSecret: data.clientSecret, }) window.__HAIQ_EMBEDDED_CHECKOUT__ = checkout loadingText.style.display = 'none' checkout.mount(checkoutMountEl) scrollCheckoutSectionIntoView() window.setTimeout(function () { scrollCheckoutSectionIntoView({ snap: true }) }, 400) } catch (err) { console.error(err) loadingText.textContent = err && err.message ? String(err.message) : 'Checkout unavailable right now.' subscribeBtn.disabled = false subscribeBtn.style.opacity = '1' scrollCheckoutSectionIntoView() } } planBtns.forEach(function (btn) { btn.addEventListener('click', function () { var newPlan = btn.getAttribute('data-plan') if (activePlan === newPlan) return activePlan = newPlan renderPlan() if (checkoutSection.style.display === 'block') { openCheckout() } }) }) subscribeBtn.addEventListener('click', function (e) { e.preventDefault() openCheckout() }) if (cancelBtn) { cancelBtn.addEventListener('click', function (e) { e.preventDefault() window.destroyAllHaiqCheckouts() root.scrollIntoView({ behavior: 'smooth', block: 'center' }) }) } renderPlan() } function escapeHtml(text) { if (text == null) return '' var div = document.createElement('div') div.textContent = String(text) return div.innerHTML } function bootWidgets() { var mounts = document.querySelectorAll('[data-haiq-widget]') mounts.forEach(function (el) { var raw = el.getAttribute('data-haiq-config') if (!raw) return try { var cfg = JSON.parse(raw) if (!cfg.containerId && el.id) { cfg.containerId = el.id } if (window.createHaiqWidget) { window.createHaiqWidget(cfg) } } catch (e) { console.error('HAIQ Checkout: invalid data-haiq-config', e) } }) } function runBoot() { bootWidgets() } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', runBoot, { once: true }) } else { runBoot() } })() Cardiopulmonary Findings in a Newborn for USMLE | ProspectiveDoctor

Cardiopulmonary Findings in a Newborn for USMLE

In Episode 7 of Med School Question of the Week for USMLE, Leigh Finnegan answers the following: A 37-year-old G1P1001 delivers a 38-week female infant via spontaneous vaginal delivery. At birth, the infant is noted to have slanted palpebral fissures, a single palmar crease, and a wide gap between the first and second toes. A murmur is auscultated on cardiac exam, and a congenital heart defect is suspected. What is most likely to be present on further evaluation?
Click to Reveal the Correct Answer

Severe regurgitation between the ventricles and the atria

Exit mobile version