{
  "version": 3,
  "sources": ["../src/image.ts"],
  "sourcesContent": ["/**\n * Use Cloudinary to create the `meta` tag image URL.\n *\n * @param opts `filename` should include the extension.\n */\nexport function MetaImage ({ cloudName, filename, text }:{\n    cloudName:string;\n    filename:string;\n    text?:string;\n}):string {\n    const baseUrl = `https://res.cloudinary.com/${cloudName}/image/upload/`\n\n    if (!text) {\n        // Simple case: no text, just fit the image\n        const imageTransformations = ['w_1200', 'h_627', 'c_fit', 'q_auto',\n            'f_auto'].join(',')\n        return `${baseUrl}${imageTransformations}/${filename}`\n    }\n\n    // Extract the public_id (filename without extension) for overlay reference\n    const publicId = filename.replace(/\\.[^/.]+$/, '')\n\n    // Canvas dimensions: 50px top + 500px image + 250px bottom = 800px total\n    const canvasHeight = 800\n    const topPadding = 50\n    const imageMaxHeight = 500\n\n    // 50 + 500 + 100 = 650\n    const textYPosition = topPadding + imageMaxHeight + 100\n\n    // Step 1: Fit the cube image to 1200x500\n    const fitImage = 'w_1200,h_500,c_fit,q_auto,f_auto'\n\n    // Step 2: Create white canvas (1200x800) as underlay and position the\n    // fitted image at y=50\n    // Use underlay with same image colored white to create the\n    // white background\n    const createCanvas = `u_${publicId},e_colorize:100,co_white,w_1200,` +\n        `h_${canvasHeight},c_fill/fl_layer_apply,g_north,y_-${topPadding}`\n\n    // Step 3: Add text overlay positioned in the white space at y=650, centered\n    const textOverlay = text ? `l_text:roboto_64:${encodeURIComponent(text)},` +\n        `co_black/fl_layer_apply,g_north,y_${textYPosition}/` : ''\n\n    const url = `${baseUrl}${fitImage}/${createCanvas}/` +\n        `${textOverlay}${filename}`\n    return url\n}\n"],
  "mappings": "4dAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAKO,SAASI,EAAW,CAAE,UAAAC,EAAW,SAAAC,EAAU,KAAAC,CAAK,EAI7C,CACN,MAAMC,EAAU,8BAA8BH,CAAS,iBAEvD,GAAI,CAACE,EAAM,CAEP,MAAME,EAAuB,CAAC,SAAU,QAAS,QAAS,SACtD,QAAQ,EAAE,KAAK,GAAG,EACtB,MAAO,GAAGD,CAAO,GAAGC,CAAoB,IAAIH,CAAQ,EACxD,CAGA,MAAMI,EAAWJ,EAAS,QAAQ,YAAa,EAAE,EAG3CK,EAAe,IACfC,EAAa,GAIbC,EAAgBD,EAHC,IAG6B,IAG9CE,EAAW,mCAMXC,EAAe,KAAKL,CAAQ,qCACzBC,CAAY,qCAAqCC,CAAU,GAG9DI,EAAcT,EAAO,oBAAoB,mBAAmBA,CAAI,CAAC,sCAC9BM,CAAa,IAAM,GAI5D,MAFY,GAAGL,CAAO,GAAGM,CAAQ,IAAIC,CAAY,IAC1CC,CAAW,GAAGV,CAAQ,EAEjC,CA1CgBW,EAAAb,EAAA",
  "names": ["image_exports", "__export", "MetaImage", "__toCommonJS", "MetaImage", "cloudName", "filename", "text", "baseUrl", "imageTransformations", "publicId", "canvasHeight", "topPadding", "textYPosition", "fitImage", "createCanvas", "textOverlay", "__name"]
}
