:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
{"version":3,"file":"index-W25VBdhh.mjs","sources":["../../src/cart.js","../../src/ui/badge.js","../../src/index.js"],"sourcesContent":["export function formatPrice(cents) {\n return `$${(cents / 100).toFixed(2)}`\n}\n\nexport function parseQuantity(value) {\n const parsed = Number.parseInt(value, 10)\n if (Number.isNaN(parsed)) {\n throw new TypeError(`Invalid quantity: ${value}`)\n }\n return parsed\n}\n","export function renderBadge(label) {\n const badge = { kind: 'badge', label, createdAt: 'é日😀' }\n return JSON.stringify(badge)\n}\n","import { formatPrice, parseQuantity } from './cart.js'\nimport { renderBadge } from './ui/badge.js'\n\nexport function checkout(items) {\n let total = 0\n for (const item of items) {\n total += item.price * parseQuantity(item.quantity)\n }\n if (total <= 0) {\n throw new Error('Cart total must be positive')\n }\n return renderBadge(`Total: ${formatPrice(total)}`)\n}\n\nexport async function loadReviews() {\n const { fetchReviews } = await import('./reviews.js')\n return fetchReviews('example-product')\n}\n"],"names":[],"mappings":"AAAO,SAAS,WAAW,CAAC,KAAK,EAAE;AACnC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AACxC;;AAEO,SAAS,aAAa,CAAC,KAAK,EAAE;AACrC,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE;AAC5C,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AAC9B,QAAQ,MAAM,IAAI,SAAS,CAAC,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AACxD,IAAI;AACJ,IAAI,OA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