@getmicdrop/venue-calendar 4.0.95 → 4.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/{CartView-Cq0DU1Cy.js → CartView-DC-YjxhJ.js} +721 -726
  2. package/dist/CartView-DC-YjxhJ.js.map +1 -0
  3. package/dist/{Checkout-BV5f49vY.js → Checkout-DFEzsNwm.js} +8 -4
  4. package/dist/Checkout-DFEzsNwm.js.map +1 -0
  5. package/dist/{Checkout-BA43iGDc.js → Checkout-SGb68I5A.js} +271 -259
  6. package/dist/Checkout-SGb68I5A.js.map +1 -0
  7. package/dist/{CheckoutTimer-KyKyInco.js → CheckoutTimer-BUlr4C7O.js} +5 -5
  8. package/dist/{CheckoutTimer-KyKyInco.js.map → CheckoutTimer-BUlr4C7O.js.map} +1 -1
  9. package/dist/{ClockIcon-BD24dBol.js → ClockIcon-CI96OiJj.js} +2 -2
  10. package/dist/{ClockIcon-BD24dBol.js.map → ClockIcon-CI96OiJj.js.map} +1 -1
  11. package/dist/{CollectionView-CKIxku9-.js → CollectionView-kDS8R_bu.js} +35 -35
  12. package/dist/CollectionView-kDS8R_bu.js.map +1 -0
  13. package/dist/{Event-BPdt1Io5.js → Event-DUViqNEG.js} +497 -497
  14. package/dist/{Event-BPdt1Io5.js.map → Event-DUViqNEG.js.map} +1 -1
  15. package/dist/{EventPage-DRnTMGTK.js → EventPage-CbYWOehC.js} +6 -6
  16. package/dist/{EventPage-DRnTMGTK.js.map → EventPage-CbYWOehC.js.map} +1 -1
  17. package/dist/{Heading-pQuVpBrL.js → Heading-DtOhaDMn.js} +10 -10
  18. package/dist/{Heading-pQuVpBrL.js.map → Heading-DtOhaDMn.js.map} +1 -1
  19. package/dist/{ScarcityBadge-DoYdujCs.js → ScarcityBadge-CBKc57di.js} +16 -16
  20. package/dist/{ScarcityBadge-DoYdujCs.js.map → ScarcityBadge-CBKc57di.js.map} +1 -1
  21. package/dist/{SeriesPage-vw7Hva9F.js → SeriesPage-BPDSiLWH.js} +5 -5
  22. package/dist/{SeriesPage-vw7Hva9F.js.map → SeriesPage-BPDSiLWH.js.map} +1 -1
  23. package/dist/{Spinner-BfFZMaDP.js → Spinner-BUWcjtbI.js} +2 -2
  24. package/dist/{Spinner-BfFZMaDP.js.map → Spinner-BUWcjtbI.js.map} +1 -1
  25. package/dist/{Success-Cjj6CC4w.js → Success-6kCesfnC.js} +15 -9
  26. package/dist/Success-6kCesfnC.js.map +1 -0
  27. package/dist/{Text-CT79Zi5n.js → Text-B5MZ6L1O.js} +2 -2
  28. package/dist/{Text-CT79Zi5n.js.map → Text-B5MZ6L1O.js.map} +1 -1
  29. package/dist/{VenueCalendar-Cz7_VBC6.js → VenueCalendar-BRTDpyWV.js} +1504 -1498
  30. package/dist/VenueCalendar-BRTDpyWV.js.map +1 -0
  31. package/dist/{ViewTicketsEmbed-BvCfoKY3.js → ViewTicketsEmbed-BgIXGtz6.js} +5 -5
  32. package/dist/ViewTicketsEmbed-BgIXGtz6.js.map +1 -0
  33. package/dist/api/api/transformers/event.d.ts +6 -4
  34. package/dist/api/api.cjs +1 -1
  35. package/dist/api/api.cjs.map +1 -1
  36. package/dist/api/api.mjs +204 -207
  37. package/dist/api/api.mjs.map +1 -1
  38. package/dist/{data-toggle-store.svelte-BHwbM34q.js → data-toggle-store.svelte-D3w7V3t9.js} +2 -2
  39. package/dist/data-toggle-store.svelte-D3w7V3t9.js.map +1 -0
  40. package/dist/{labels-_x9WkVuZ.js → labels-wyDolzF_.js} +8 -8
  41. package/dist/labels-wyDolzF_.js.map +1 -0
  42. package/dist/{modalManager.svelte-Csm1WlvP.js → modalManager.svelte-DBBSS3Zi.js} +2 -2
  43. package/dist/{modalManager.svelte-Csm1WlvP.js.map → modalManager.svelte-DBBSS3Zi.js.map} +1 -1
  44. package/dist/seo/seo.cjs.map +1 -1
  45. package/dist/seo/seo.mjs.map +1 -1
  46. package/dist/{transform-WRPgSKLN.js → transform-Bcl3riJb.js} +2 -2
  47. package/dist/{transform-WRPgSKLN.js.map → transform-Bcl3riJb.js.map} +1 -1
  48. package/dist/venue-calendar.css +1 -1
  49. package/dist/venue-calendar.es.js +4 -4
  50. package/dist/venue-calendar.iife.js +33 -33
  51. package/dist/venue-calendar.iife.js.map +1 -1
  52. package/dist/venue-calendar.umd.js +33 -33
  53. package/dist/venue-calendar.umd.js.map +1 -1
  54. package/package.json +5 -2
  55. package/dist/CartView-Cq0DU1Cy.js.map +0 -1
  56. package/dist/Checkout-BA43iGDc.js.map +0 -1
  57. package/dist/Checkout-BV5f49vY.js.map +0 -1
  58. package/dist/CollectionView-CKIxku9-.js.map +0 -1
  59. package/dist/Success-Cjj6CC4w.js.map +0 -1
  60. package/dist/VenueCalendar-Cz7_VBC6.js.map +0 -1
  61. package/dist/ViewTicketsEmbed-BvCfoKY3.js.map +0 -1
  62. package/dist/data-toggle-store.svelte-BHwbM34q.js.map +0 -1
  63. package/dist/labels-_x9WkVuZ.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ScarcityBadge-DoYdujCs.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ChevronDownOutline.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/AddIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/SubtractIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/WarningCircleIcon.svelte","../__SKIP_NAVIGATION__","../src/components/ScarcityBadge.svelte"],"sourcesContent":["<script lang=\"ts\">\n interface Props {\n size?: string;\n color?: string;\n class?: string;\n }\n let { size = \"24\", color = \"currentColor\", class: className = \"\" }: Props = $props();\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n fill=\"none\"\n stroke={color}\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\" />\n</svg>\n","<script lang=\"ts\">\n /**\n * Add — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z\"/>{:else}<line x1=\"40\" y1=\"128\" x2=\"216\" y2=\"128\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"128\" y1=\"40\" x2=\"128\" y2=\"216\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * Subtract — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z\"/>{:else}<line x1=\"40\" y1=\"128\" x2=\"216\" y2=\"128\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * WarningCircle — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z\"/>{:else}<circle cx=\"128\" cy=\"128\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-miterlimit=\"10\" stroke-width=\"16\"/><line x1=\"128\" y1=\"136\" x2=\"128\" y2=\"80\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><circle cx=\"128\" cy=\"172\" r=\"12\"/>{/if}\n</svg>\n","\n export function goto(url, opts) {\n if (typeof window !== 'undefined' && window.location) {\n if (opts?.replaceState) {\n window.history.replaceState({}, '', url);\n } else {\n window.location.href = url;\n }\n }\n }\n export function beforeNavigate(callback) {\n // No-op for library builds\n }\n export function afterNavigate(callback) {\n // No-op for library builds\n }\n export function disable() {\n // No-op for library builds\n }\n export function enable() {\n // No-op for library builds\n }\n ","<script>\n import { Badge } from '@getmicdrop/svelte-components';\n import { WarningCircleIcon } from '@getmicdrop/svelte-components/primitives/Icons/phosphor/index.js';\n import { computeScarcityLevel } from '$lib/constants/scarcity';\n\n /**\n * ScarcityBadge - Shows urgency indicators based on ticket availability.\n *\n * Wraps SC <Badge> with venue-calendar's threshold logic. Renders to\n * the same primitive every other status badge uses (List, Gallery,\n * Calendar embed) so a \"Selling fast\" / \"Sold out\" pill is visually\n * identical wherever it appears.\n *\n * Thresholds are canonicalized in $lib/constants/scarcity:\n * URGENT_PCT=10, LOW_PCT=25, MAX_EXACT_COUNT=20.\n * TicketBlock.svelte uses the same source so the badge tier matches the\n * urgency copy on the ticket selection page.\n *\n * - 0 remaining: \"Sold out\" (red, no flame)\n * - <=10% remaining: \"Only X left\" with exact count (warning + flame)\n * - <=20% remaining (80%+ sold): \"Selling fast\" (warning + flame)\n * - >20% remaining: No badge\n *\n * @prop {\"browse\"|\"event\"|\"ticket\"} context - browse=vague only; event/ticket=exact at urgent\n * @prop {\"default\"|\"minimal\"} variant - default=SC Badge pill; minimal=transparent text+icon\n * @prop {boolean} isFree - Suppress scarcity badges for free events/tickets\n */\n let {\n remaining,\n total,\n context = 'browse',\n variant = 'default',\n isFree = false,\n labels = {},\n } = $props();\n\n const MAX_EXACT_COUNT = 20;\n const URGENT_PCT = 10;\n const LOW_PCT = 20;\n\n let percent = $derived(total > 0 ? (remaining / total) * 100 : 100);\n\n let badgeInfo = $derived.by(() => {\n const soldOutText = labels.statusSoldOut || 'Sold out';\n const sellingFastText = labels.statusSellingFast || 'Selling fast';\n const onlyNLeftTemplate =\n labels.scarcityOnlyNLeft || 'Only {remaining} left';\n\n if (remaining <= 0) {\n return { type: 'sold-out', text: soldOutText, showFlame: false };\n }\n if (isFree) return null;\n\n if (context === 'browse') {\n if (percent <= LOW_PCT) {\n return { type: 'scarcity', text: sellingFastText, showFlame: true };\n }\n return null;\n }\n\n if (percent <= URGENT_PCT && remaining <= MAX_EXACT_COUNT) {\n return {\n type: 'scarcity',\n text: onlyNLeftTemplate.replace('{remaining}', String(remaining)),\n showFlame: true,\n };\n }\n if (percent <= LOW_PCT) {\n return { type: 'scarcity', text: sellingFastText, showFlame: true };\n }\n\n // Event page / Ticket page: vague at low.\n return { type: 'scarcity', text: sellingFastText, showFlame: true };\n });\n\n let scVariant = $derived(\n /** @type {'error' | 'warning'} */ (\n badgeInfo?.type === 'sold-out' ? 'error' : 'warning'\n )\n );\n let ariaLabel = $derived(\n badgeInfo?.type === 'sold-out'\n ? labels.statusSoldOut || 'Sold out'\n : `${labels.scarcityLowAvailability || 'Low availability'}: ${badgeInfo?.text}`\n );\n</script>\n\n{#if badgeInfo}\n {#if variant === 'minimal'}\n <span\n class=\"inline-flex items-center gap-1 type-caption {badgeInfo.type ===\n 'sold-out'\n ? 'text-status-error-text'\n : 'text-accent-warning'}\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={ariaLabel}\n >\n {#if badgeInfo.showFlame}\n <WarningCircleIcon size=\"16\" />\n {/if}\n {badgeInfo.text}\n </span>\n {:else}\n <Badge variant={scVariant} size=\"sm\">\n {#snippet leftIcon()}\n {#if badgeInfo.showFlame}\n <WarningCircleIcon size=\"16\" />\n {/if}\n {/snippet}\n {badgeInfo.text}\n </Badge>\n {/if}\n{/if}\n"],"names":["size","$","$$props","color","className","svg","root","ctx","useIconWeight","resolved","root_2","path","$$render","consequent","alternate","styles","line","root_1","goto","url","opts","context","variant","isFree","labels","MAX_EXACT_COUNT","URGENT_PCT","LOW_PCT","percent","badgeInfo","soldOutText","sellingFastText","onlyNLeftTemplate","scVariant","ariaLabel","span","WarningCircleIcon","$$anchor","text","Badge","consequent_2","text_1","consequent_1","consequent_3"],"mappings":";;;;iBAAA;AAME,MAAMA,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;MAGjEC,IAAEC,EAAA;;AAAF,IAAAL,EAAA,UAAAI,aACQD,EAAS,CAAA,CAAA,GADjBH,EAAA,cAAAI,YAGQL,EAAI,CAAA,GAHZC,EAAA,cAAAI,aAISL,EAAI,CAAA,GAJbC,EAAA,cAAAI,aAMSF,EAAK,CAAA;AAAA,kBANdE,CAAE;AAFK;;iBCPR;;AAmBE,MAAML,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;AAEhE,QAAMG,IAAMC,EAAa;AACzB,MAAIC,IAAoBR,EAAA,QAAA,MAAAC,EAAA,UAAsBK,GAAK,UAAU,SAAS;MAGvEF,IAAEK,EAAA;;kBAAFL,CAAE;;;UAUyBM,IAAIL,EAAA;kBAAJK,CAAI;AAAA;;;;;AAAzB,MAAAV,EAAA,IAAAQ,CAAQ,MAAK,SAAMG,EAAAC,CAAA,IAAAD,EAAAE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,YAASV,EAAA8B,CAAA,IAAA9B,EAAAE,GAAA,EAAA;AAAA;;;;;YADvBe,CAAS,KAAAjB,EAAA+B,CAAA;AAAA;;;AAFN;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"ScarcityBadge-CBKc57di.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/ChevronDownOutline.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/AddIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/SubtractIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/WarningCircleIcon.svelte","../__SKIP_NAVIGATION__","../src/components/ScarcityBadge.svelte"],"sourcesContent":["<script lang=\"ts\">\n interface Props {\n size?: string;\n color?: string;\n class?: string;\n }\n let { size = \"24\", color = \"currentColor\", class: className = \"\" }: Props = $props();\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n fill=\"none\"\n stroke={color}\n stroke-width=\"2\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\" />\n</svg>\n","<script lang=\"ts\">\n /**\n * Add — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z\"/>{:else}<line x1=\"40\" y1=\"128\" x2=\"216\" y2=\"128\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"128\" y1=\"40\" x2=\"128\" y2=\"216\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * Subtract — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z\"/>{:else}<line x1=\"40\" y1=\"128\" x2=\"216\" y2=\"128\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * WarningCircle — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z\"/>{:else}<circle cx=\"128\" cy=\"128\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-miterlimit=\"10\" stroke-width=\"16\"/><line x1=\"128\" y1=\"136\" x2=\"128\" y2=\"80\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><circle cx=\"128\" cy=\"172\" r=\"12\"/>{/if}\n</svg>\n","\n export function goto(url, opts) {\n if (typeof window !== 'undefined' && window.location) {\n if (opts?.replaceState) {\n window.history.replaceState({}, '', url);\n } else {\n window.location.href = url;\n }\n }\n }\n export function beforeNavigate(callback) {\n // No-op for library builds\n }\n export function afterNavigate(callback) {\n // No-op for library builds\n }\n export function disable() {\n // No-op for library builds\n }\n export function enable() {\n // No-op for library builds\n }\n ","<script>\n import { Badge } from '@getmicdrop/svelte-components';\n import { WarningCircleIcon } from '@getmicdrop/svelte-components/primitives/Icons/phosphor/index.js';\n import { computeScarcityLevel } from '$lib/constants/scarcity';\n\n /**\n * ScarcityBadge - Shows urgency indicators based on ticket availability.\n *\n * Wraps SC <Badge> with venue-calendar's threshold logic. Renders to\n * the same primitive every other status badge uses (List, Gallery,\n * Calendar embed) so a \"Selling fast\" / \"Sold out\" pill is visually\n * identical wherever it appears.\n *\n * Thresholds are canonicalized in $lib/constants/scarcity:\n * URGENT_PCT=10, LOW_PCT=25, MAX_EXACT_COUNT=20.\n * TicketBlock.svelte uses the same source so the badge tier matches the\n * urgency copy on the ticket selection page.\n *\n * - 0 remaining: \"Sold out\" (red, no flame)\n * - <=10% remaining: \"Only X left\" with exact count (warning + flame)\n * - <=20% remaining (80%+ sold): \"Selling fast\" (warning + flame)\n * - >20% remaining: No badge\n *\n * @prop {\"browse\"|\"event\"|\"ticket\"} context - browse=vague only; event/ticket=exact at urgent\n * @prop {\"default\"|\"minimal\"} variant - default=SC Badge pill; minimal=transparent text+icon\n * @prop {boolean} isFree - Suppress scarcity badges for free events/tickets\n */\n let {\n remaining,\n total,\n context = 'browse',\n variant = 'default',\n isFree = false,\n labels = {},\n } = $props();\n\n const MAX_EXACT_COUNT = 20;\n const URGENT_PCT = 10;\n const LOW_PCT = 20;\n\n let percent = $derived(total > 0 ? (remaining / total) * 100 : 100);\n\n let badgeInfo = $derived.by(() => {\n const soldOutText = labels.statusSoldOut || 'Sold out';\n const sellingFastText = labels.statusSellingFast || 'Selling fast';\n const onlyNLeftTemplate =\n labels.scarcityOnlyNLeft || 'Only {remaining} left';\n\n if (remaining <= 0) {\n return { type: 'sold-out', text: soldOutText, showFlame: false };\n }\n if (isFree) return null;\n\n if (context === 'browse') {\n if (percent <= LOW_PCT) {\n return { type: 'scarcity', text: sellingFastText, showFlame: true };\n }\n return null;\n }\n\n if (percent <= URGENT_PCT && remaining <= MAX_EXACT_COUNT) {\n return {\n type: 'scarcity',\n text: onlyNLeftTemplate.replace('{remaining}', String(remaining)),\n showFlame: true,\n };\n }\n if (percent <= LOW_PCT) {\n return { type: 'scarcity', text: sellingFastText, showFlame: true };\n }\n\n // Event page / Ticket page: vague at low.\n return { type: 'scarcity', text: sellingFastText, showFlame: true };\n });\n\n let scVariant = $derived(\n /** @type {'error' | 'warning'} */ (\n badgeInfo?.type === 'sold-out' ? 'error' : 'warning'\n )\n );\n let ariaLabel = $derived(\n badgeInfo?.type === 'sold-out'\n ? labels.statusSoldOut || 'Sold out'\n : `${labels.scarcityLowAvailability || 'Low availability'}: ${badgeInfo?.text}`\n );\n</script>\n\n{#if badgeInfo}\n {#if variant === 'minimal'}\n <span\n class=\"inline-flex items-center gap-1 type-caption {badgeInfo.type ===\n 'sold-out'\n ? 'text-status-error-text'\n : 'text-accent-warning'}\"\n role=\"status\"\n aria-live=\"polite\"\n aria-label={ariaLabel}\n >\n {#if badgeInfo.showFlame}\n <WarningCircleIcon size=\"16\" />\n {/if}\n {badgeInfo.text}\n </span>\n {:else}\n <Badge variant={scVariant} size=\"sm\">\n {#snippet leftIcon()}\n {#if badgeInfo.showFlame}\n <WarningCircleIcon size=\"16\" />\n {/if}\n {/snippet}\n {badgeInfo.text}\n </Badge>\n {/if}\n{/if}\n"],"names":["size","$","$$props","color","className","svg","root","ctx","useIconWeight","resolved","root_2","path","$$render","consequent","alternate","styles","line","root_1","goto","url","opts","context","variant","isFree","labels","MAX_EXACT_COUNT","URGENT_PCT","LOW_PCT","percent","badgeInfo","soldOutText","sellingFastText","onlyNLeftTemplate","scVariant","ariaLabel","span","WarningCircleIcon","$$anchor","text","Badge","consequent_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AAAC,EAAiBC,GAAA,EAAA,MAAA,KAAA,CAAA;AAAA;;AADf,cAAApC,EAAA,IAAA4B,CAAS,EAAC,aAASjB,EAAAC,CAAA;AAAA;;;kBATzBsB,CAAG;wBAAHA,GAAG,GAAA,+CAAAlC,EAAA,IACkD4B,CAAS,EAAC,SAC9D,aACI,2BACA,qBAAqB,EAAA,GAJ1B5B,EAAA,cAAAkC,uBAOaD,CAAS,CAAA,GAKpBjC,EAAA,SAAAqC,GAAA,IAAArC,EAAA,IAAA4B,CAAS,EAAC,QAAI,EAAA,EAAA;AAAA,0BAZhBM,CAAG;AAAA;AAeH,UAAAI,EAAKF,GAAA;AAAA;2BAAUJ,CAAS;AAAA;;YACb,UAAQ,CAAAI,MAAA;;;;AAEb,kBAAAD,EAAiBC,GAAA,EAAA,MAAA,KAAA,CAAA;AAAA;;AADf,kBAAApC,EAAA,IAAA4B,CAAS,EAAC,aAASjB,EAAA4B,CAAA;AAAA;;;;;;;AAIzB,cAAAvC,EAAA,gBAAA,MAAAA,EAAA,SAAAwC,GAAAxC,EAAA,IAAA4B,CAAS,EAAC,IAAI,CAAA;;;;;;AAtBd,UAAAP,EAAO,MAAK,YAASV,EAAA8B,CAAA,IAAA9B,EAAAE,GAAA,EAAA;AAAA;;;;;YADvBe,CAAS,KAAAjB,EAAA+B,CAAA;AAAA;;;AAFN;","x_google_ignoreList":[0,1,2,3]}
@@ -1,9 +1,9 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as e from "svelte/internal/client";
3
- import { g } from "./ScarcityBadge-DoYdujCs.js";
4
- import { E as l } from "./Event-BPdt1Io5.js";
5
- import { a as d } from "./transform-WRPgSKLN.js";
6
- import { l as u } from "./VenueCalendar-Cz7_VBC6.js";
3
+ import { g } from "./ScarcityBadge-CBKc57di.js";
4
+ import { E as l } from "./Event-DUViqNEG.js";
5
+ import { a as d } from "./transform-Bcl3riJb.js";
6
+ import { l as u } from "./VenueCalendar-BRTDpyWV.js";
7
7
  function P(n, i) {
8
8
  e.push(i, !0), u("SeriesPage");
9
9
  let r = e.prop(i, "onNavigateToOccurrence", 3, void 0), a = e.derived(() => i.series ? d(i.series) : null);
@@ -30,4 +30,4 @@ function P(n, i) {
30
30
  export {
31
31
  P as default
32
32
  };
33
- //# sourceMappingURL=SeriesPage-vw7Hva9F.js.map
33
+ //# sourceMappingURL=SeriesPage-BPDSiLWH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SeriesPage-vw7Hva9F.js","sources":["../src/components/Views/SeriesPage.svelte"],"sourcesContent":["<!-- @route-escape: widget-intentional. -->\n<script lang=\"ts\">\n import { goto } from '$app/navigation';\n import EventExperience from '$lib/public-calendar-flow/Event.svelte';\n import { createLogger } from '@getmicdrop/svelte-components';\n import { transformSeriesPageData } from '$lib/public-calendar-flow/transform';\n\n const logger = createLogger('SeriesPage');\n\n // --- Props (matches old SeriesPage external interface) ---\n interface Props {\n series: any;\n onNavigateToOccurrence?: (id: number, slug: string, name?: string) => void;\n }\n\n let { series, onNavigateToOccurrence = undefined }: Props = $props();\n\n // Transform series data to EventData for EventExperience\n let eventData = $derived(series ? transformSeriesPageData(series) : null);\n\n // Handle occurrence click — delegate to callback or navigate directly\n function handleShowtimeClick(occurrence: { id: number; slug: string }): void {\n if (onNavigateToOccurrence) {\n onNavigateToOccurrence(occurrence.id, occurrence.slug);\n } else {\n // @url-builder-escape: widget-internal route; SC's url-builders cover /a admin paths, not embedded calendar navigation.\n goto(`/${occurrence.id}/${occurrence.slug}`);\n }\n }\n</script>\n\n{#if eventData}\n <EventExperience\n event={eventData}\n isSeriesMaster\n onShowtimeClick={handleShowtimeClick}\n />\n{/if}\n"],"names":["createLogger","onNavigateToOccurrence","$","$$props","eventData","transformSeriesPageData","handleShowtimeClick","occurrence","goto","EventExperience","$$anchor","$$render","consequent"],"mappings":";;;;;;iBACA;iBAMiBA,EAAa,YAAY;AAQxC,MAAcC,IAAsBC,EAAA,KAAAC,GAAA,0BAAA,GAAG,MAAS,GAG5CC,IAASF,EAAA,QAAA,MAAAC,EAAA,SAAqBE,EAAuBF,EAAA,MAAA,IAAW,IAAI;AAGxE,WAASG,EAAoBC,GAAgD;AAC3E,IAAIN,EAAsB,IACxBA,EAAsB,EAACM,EAAW,IAAIA,EAAW,IAAI,IAGrDC,MAASD,EAAW,EAAE,IAAIA,EAAW,IAAI,EAAA;AAAA,EAE7C;;;;AAICE,MAAAA,EAAcC,GAAA;AAAA;uBACNN,CAAS;AAAA;;yBAECE;AAAA;;;YAJhBF,CAAS,KAAAO,EAAAC,CAAA;AAAA;;;AAFN;"}
1
+ {"version":3,"file":"SeriesPage-BPDSiLWH.js","sources":["../src/components/Views/SeriesPage.svelte"],"sourcesContent":["<!-- @route-escape: widget-intentional. -->\n<script lang=\"ts\">\n import { goto } from '$app/navigation';\n import EventExperience from '$lib/public-calendar-flow/Event.svelte';\n import { createLogger } from '@getmicdrop/svelte-components';\n import { transformSeriesPageData } from '$lib/public-calendar-flow/transform';\n\n const logger = createLogger('SeriesPage');\n\n // --- Props (matches old SeriesPage external interface) ---\n interface Props {\n series: any;\n onNavigateToOccurrence?: (id: number, slug: string, name?: string) => void;\n }\n\n let { series, onNavigateToOccurrence = undefined }: Props = $props();\n\n // Transform series data to EventData for EventExperience\n let eventData = $derived(series ? transformSeriesPageData(series) : null);\n\n // Handle occurrence click — delegate to callback or navigate directly\n function handleShowtimeClick(occurrence: { id: number; slug: string }): void {\n if (onNavigateToOccurrence) {\n onNavigateToOccurrence(occurrence.id, occurrence.slug);\n } else {\n // @url-builder-escape: widget-internal route; SC's url-builders cover /a admin paths, not embedded calendar navigation.\n goto(`/${occurrence.id}/${occurrence.slug}`);\n }\n }\n</script>\n\n{#if eventData}\n <EventExperience\n event={eventData}\n isSeriesMaster\n onShowtimeClick={handleShowtimeClick}\n />\n{/if}\n"],"names":["createLogger","onNavigateToOccurrence","$","$$props","eventData","transformSeriesPageData","handleShowtimeClick","occurrence","goto","EventExperience","$$anchor","$$render","consequent"],"mappings":";;;;;;iBACA;iBAMiBA,EAAa,YAAY;AAQxC,MAAcC,IAAsBC,EAAA,KAAAC,GAAA,0BAAA,GAAG,MAAS,GAG5CC,IAASF,EAAA,QAAA,MAAAC,EAAA,SAAqBE,EAAuBF,EAAA,MAAA,IAAW,IAAI;AAGxE,WAASG,EAAoBC,GAAgD;AAC3E,IAAIN,EAAsB,IACxBA,EAAsB,EAACM,EAAW,IAAIA,EAAW,IAAI,IAGrDC,MAASD,EAAW,EAAE,IAAIA,EAAW,IAAI,EAAA;AAAA,EAE7C;;;;AAICE,MAAAA,EAAcC,GAAA;AAAA;uBACNN,CAAS;AAAA;;yBAECE;AAAA;;;YAJhBF,CAAS,KAAAO,EAAAC,CAAA;AAAA;;;AAFN;"}
@@ -1,6 +1,6 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as e from "svelte/internal/client";
3
- import { ap as r, aq as i } from "./VenueCalendar-Cz7_VBC6.js";
3
+ import { aq as r, ar as i } from "./VenueCalendar-BRTDpyWV.js";
4
4
  var f = e.from_html('<svg aria-hidden="true" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg" role="status"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"></path></svg> <span class="sr-only"> </span>', 1);
5
5
  function w(o, t) {
6
6
  e.push(t, !0);
@@ -14,4 +14,4 @@ function w(o, t) {
14
14
  export {
15
15
  w as S
16
16
  };
17
- //# sourceMappingURL=Spinner-BfFZMaDP.js.map
17
+ //# sourceMappingURL=Spinner-BUWcjtbI.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner-BfFZMaDP.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Spinner/Spinner.svelte"],"sourcesContent":["<script lang=\"ts\">\n import {\n spinnerColorVariants,\n type SpinnerColorVariant,\n } from '../../tokens/variants.js';\n import { iconSizes, type IconSize } from '../../tokens/sizing.js';\n\n const defaultLabels = {\n loading: 'Loading...',\n };\n\n interface Props {\n size?: IconSize;\n color?: SpinnerColorVariant;\n class?: string;\n labels?: Partial<typeof defaultLabels>;\n }\n\n let {\n size = 'md',\n color = 'blue',\n class: className = '',\n labels: userLabels = {},\n }: Props = $props();\n\n let labels = $derived({ ...defaultLabels, ...userLabels });\n\n let sizeClass = $derived(iconSizes[size] || iconSizes.md);\n let colorClass = $derived(spinnerColorVariants[color] || spinnerColorVariants.blue);\n</script>\n\n<svg\n aria-hidden=\"true\"\n class=\"{sizeClass} tone-muted animate-spin {colorClass} {className}\"\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"status\"\n>\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n</svg>\n<span class=\"sr-only\">{labels.loading}</span>\n"],"names":["defaultLabels","size","$","$$props","color","className","userLabels","labels","sizeClass","iconSizes","colorClass","spinnerColorVariants","svg","fragment","span","text"],"mappings":";;;;iBAAA;;AAOE,QAAMA,IAAa,EACjB,SAAS,aAAY;AAUvB,MACEC,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GACXC,0BAAQ,MAAM,GACPC,0BAAY,EAAE,GACbC,IAAUJ,EAAA,KAAAC,GAAA,UAAA,IAAA,OAAA,CAAA,EAAA,GAGhBI,IAAML,EAAA,QAAA,OAAA,EAAA,GAAiBF,GAAa,GAAKM,EAAU,EAAA,EAAA,GAEnDE,oBAAqBC,EAAUR,EAAI,CAAA,KAAKQ,EAAU,EAAE,GACpDC,oBAAsBC,EAAqBP,EAAK,CAAA,KAAKO,EAAqB,IAAI;eAGnFC,IAAEV,EAAA,YAAAW,CAAA,GAiBFC,cAjBAF,GAAE,CAAA,eAiBFE,GAAI,EAAA;UAAJA,CAAI;AAjBJ,IAAAZ,EAAA,UAAAU,GAAE,GAAA,GAAAV,EAAA,IAEOM,CAAS,KAAA,EAAA,4BAAAN,EAAA,IAA2BQ,CAAU,WAAGL,EAAS,KAAA,EAAA,EAAA,GAe7CH,EAAA,SAAAa,GAAAb,EAAA,IAAAK,CAAM,EAAC,OAAO;AAAA;AAnB7B;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"Spinner-BUWcjtbI.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Spinner/Spinner.svelte"],"sourcesContent":["<script lang=\"ts\">\n import {\n spinnerColorVariants,\n type SpinnerColorVariant,\n } from '../../tokens/variants.js';\n import { iconSizes, type IconSize } from '../../tokens/sizing.js';\n\n const defaultLabels = {\n loading: 'Loading...',\n };\n\n interface Props {\n size?: IconSize;\n color?: SpinnerColorVariant;\n class?: string;\n labels?: Partial<typeof defaultLabels>;\n }\n\n let {\n size = 'md',\n color = 'blue',\n class: className = '',\n labels: userLabels = {},\n }: Props = $props();\n\n let labels = $derived({ ...defaultLabels, ...userLabels });\n\n let sizeClass = $derived(iconSizes[size] || iconSizes.md);\n let colorClass = $derived(spinnerColorVariants[color] || spinnerColorVariants.blue);\n</script>\n\n<svg\n aria-hidden=\"true\"\n class=\"{sizeClass} tone-muted animate-spin {colorClass} {className}\"\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"status\"\n>\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n</svg>\n<span class=\"sr-only\">{labels.loading}</span>\n"],"names":["defaultLabels","size","$","$$props","color","className","userLabels","labels","sizeClass","iconSizes","colorClass","spinnerColorVariants","svg","fragment","span","text"],"mappings":";;;;iBAAA;;AAOE,QAAMA,IAAa,EACjB,SAAS,aAAY;AAUvB,MACEC,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GACXC,0BAAQ,MAAM,GACPC,0BAAY,EAAE,GACbC,IAAUJ,EAAA,KAAAC,GAAA,UAAA,IAAA,OAAA,CAAA,EAAA,GAGhBI,IAAML,EAAA,QAAA,OAAA,EAAA,GAAiBF,GAAa,GAAKM,EAAU,EAAA,EAAA,GAEnDE,oBAAqBC,EAAUR,EAAI,CAAA,KAAKQ,EAAU,EAAE,GACpDC,oBAAsBC,EAAqBP,EAAK,CAAA,KAAKO,EAAqB,IAAI;eAGnFC,IAAEV,EAAA,YAAAW,CAAA,GAiBFC,cAjBAF,GAAE,CAAA,eAiBFE,GAAI,EAAA;UAAJA,CAAI;AAjBJ,IAAAZ,EAAA,UAAAU,GAAE,GAAA,GAAAV,EAAA,IAEOM,CAAS,KAAA,EAAA,4BAAAN,EAAA,IAA2BQ,CAAU,WAAGL,EAAS,KAAA,EAAA,EAAA,GAe7CH,EAAA,SAAAa,GAAAb,EAAA,IAAAK,CAAM,EAAC,OAAO;AAAA;AAnB7B;","x_google_ignoreList":[0]}
@@ -1,12 +1,12 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as e from "svelte/internal/client";
3
3
  import { onMount as re, onDestroy as ye } from "svelte";
4
- import { u as ae, P as we, Q as Ce, R as Ie, y as te, S as Te, T as Ee, U as W, V as ze, X as Se, Y as De, Z as Pe, _ as Ae, $ as Ne, a0 as Ue, a1 as Me, a2 as Le, l as Oe } from "./VenueCalendar-Cz7_VBC6.js";
5
- import { c as Re, E as Ve, L as je, t as He } from "./transform-WRPgSKLN.js";
6
- import { d as Q, m as Be, a as Fe, b as qe, c as Ge } from "./data-toggle-store.svelte-BHwbM34q.js";
7
- import { O as Ze, C as de, m as We, c as Ye } from "./labels-_x9WkVuZ.js";
8
- import { C as me, H as Ke } from "./Heading-pQuVpBrL.js";
9
- import { T as Y, I as Qe } from "./Text-CT79Zi5n.js";
4
+ import { u as ae, P as we, Q as Ce, R as Ie, y as te, S as Te, T as Ee, U as W, V as ze, X as Se, Y as De, Z as Pe, _ as Ae, $ as Ne, a0 as Ue, a1 as Me, a2 as Le, l as Oe } from "./VenueCalendar-BRTDpyWV.js";
5
+ import { c as Re, E as Ve, L as je, t as He } from "./transform-Bcl3riJb.js";
6
+ import { d as Q, m as Be, a as Fe, b as qe, c as Ge } from "./data-toggle-store.svelte-D3w7V3t9.js";
7
+ import { O as Ze, C as de, m as We, c as Ye } from "./labels-wyDolzF_.js";
8
+ import { C as me, H as Ke } from "./Heading-DtOhaDMn.js";
9
+ import { T as Y, I as Qe } from "./Text-B5MZ6L1O.js";
10
10
  var Xe = e.from_svg('<path d="M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"></path>'), Je = e.from_svg('<line x1="128" y1="144" x2="128" y2="32" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></line><polyline points="216 144 216 208 40 208 40 144" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline><polyline points="168 104 128 144 88 104" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"></polyline>', 1), $e = e.from_svg('<svg aria-hidden="true" viewBox="0 0 256 256" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><!></svg>');
11
11
  function et(O, t) {
12
12
  e.push(t, !0);
@@ -192,7 +192,10 @@ function ue(O, t) {
192
192
  return document.addEventListener("click", b), () => document.removeEventListener("click", b);
193
193
  });
194
194
  let r = e.derived(() => (() => {
195
- const b = new Date(t.event.startDateTime), P = t.event.endDateTime ? new Date(t.event.endDateTime) : new Date(b.getTime() + 7200 * 1e3), T = (g) => g.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, ""), R = [t.event.venue.name, t.event.venue.address].filter(Boolean).join(", ");
195
+ const b = new Date(t.event.startDateTime), P = t.event.endDateTime ? new Date(t.event.endDateTime) : (
196
+ // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent
197
+ new Date(b.getTime() + 7200 * 1e3)
198
+ ), T = (g) => g.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, ""), R = [t.event.venue.name, t.event.venue.address].filter(Boolean).join(", ");
196
199
  return `https://calendar.google.com/calendar/render?${new URLSearchParams({
197
200
  action: "TEMPLATE",
198
201
  text: t.event.title,
@@ -204,7 +207,10 @@ Ticket confirmation #${t.orderId}`
204
207
  }).toString()}`;
205
208
  })());
206
209
  function p() {
207
- const b = new Date(t.event.startDateTime), P = t.event.endDateTime ? new Date(t.event.endDateTime) : new Date(b.getTime() + 7200 * 1e3), T = (i) => i.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, ""), A = `order-${t.orderId}-event-${t.event.id}@micdrop.com`, R = T(/* @__PURE__ */ new Date()), g = [t.event.venue.name, t.event.venue.address].filter(Boolean).join(", "), v = (i) => i ? i.replace(/\\/g, "\\\\").replace(/;/g, "\\;").replace(/,/g, "\\,").replace(/\n/g, "\\n") : "", x = `BEGIN:VCALENDAR
210
+ const b = new Date(t.event.startDateTime), P = t.event.endDateTime ? new Date(t.event.endDateTime) : (
211
+ // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent
212
+ new Date(b.getTime() + 7200 * 1e3)
213
+ ), T = (i) => i.toISOString().replace(/[-:]/g, "").replace(/\.\d{3}/, ""), A = `order-${t.orderId}-event-${t.event.id}@micdrop.com`, R = T(/* @__PURE__ */ new Date()), g = [t.event.venue.name, t.event.venue.address].filter(Boolean).join(", "), v = (i) => i ? i.replace(/\\/g, "\\\\").replace(/;/g, "\\;").replace(/,/g, "\\,").replace(/\n/g, "\\n") : "", x = `BEGIN:VCALENDAR
208
214
  VERSION:2.0
209
215
  PRODID:-//MicDrop//Ticket Confirmation//EN
210
216
  CALSCALE:GREGORIAN
@@ -859,4 +865,4 @@ function Nt(O, t) {
859
865
  export {
860
866
  Nt as default
861
867
  };
862
- //# sourceMappingURL=Success-Cjj6CC4w.js.map
868
+ //# sourceMappingURL=Success-6kCesfnC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Success-6kCesfnC.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/DownloadIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/HelpIcon.svelte","../node_modules/@getmicdrop/svelte-components/dist/primitives/Icons/phosphor/MailIcon.svelte","../src/lib/public-calendar-flow/SuccessTicket.svelte","../src/lib/public-calendar-flow/SuccessActions.svelte","../src/lib/public-calendar-flow/Success.svelte","../src/components/Views/Success.svelte"],"sourcesContent":["<script lang=\"ts\">\n /**\n * Download — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z\"/>{:else}<line x1=\"128\" y1=\"144\" x2=\"128\" y2=\"32\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><polyline points=\"216 144 216 208 40 208 40 144\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><polyline points=\"168 104 128 144 88 104\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * Help — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,168a12,12,0,1,1,12-12A12,12,0,0,1,128,192Zm8-48.72V144a8,8,0,0,1-16,0v-8a8,8,0,0,1,8-8c13.23,0,24-9,24-20s-10.77-20-24-20-24,9-24,20v4a8,8,0,0,1-16,0v-4c0-19.85,17.94-36,40-36s40,16.15,40,36C168,125.38,154.24,139.93,136,143.28Z\"/>{:else}<circle cx=\"128\" cy=\"180\" r=\"12\"/><path d=\"M128,144v-8c17.67,0,32-12.54,32-28s-14.33-28-32-28S96,92.54,96,108v4\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><circle cx=\"128\" cy=\"128\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n /**\n * Mail — Phosphor icon (canonical Micdrop icon family).\n * Outline by default; pass `weight=\"fill\"` for solid, or let a stateful parent\n * (NavItem / Tabs / BottomNav / status badge) drive it via icon-weight context.\n */\n import { useIconWeight, type IconWeight } from './iconWeight.js';\n\n interface Props {\n /** Pixel size (width + height). */\n size?: string;\n /** Icon color; defaults to `currentColor` (inherits text color). */\n color?: string;\n /** Extra classes. */\n class?: string;\n /** `regular` (outline) or `fill` (solid). Overrides ambient state weight. */\n weight?: IconWeight;\n }\n\n let { size = '24', color = 'currentColor', class: className = '', weight }: Props = $props();\n\n const ctx = useIconWeight();\n let resolved: IconWeight = $derived(weight ?? ctx?.weight ?? 'regular');\n</script>\n\n<svg\n class={className}\n aria-hidden=\"true\"\n width={size}\n height={size}\n viewBox=\"0 0 256 256\"\n fill=\"currentColor\"\n style:color={color}\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n {#if resolved === 'fill'}<path d=\"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM98.71,128,40,181.81V74.19Zm11.84,10.85,12,11.05a8,8,0,0,0,10.82,0l12-11.05,58,53.15H52.57ZM157.29,128,216,74.18V181.82Z\"/>{:else}<polyline points=\"224 56 128 144 32 56\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><path d=\"M32,56H224a0,0,0,0,1,0,0V192a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56A0,0,0,0,1,32,56Z\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"110.55\" y1=\"128\" x2=\"34.47\" y2=\"197.74\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/><line x1=\"221.53\" y1=\"197.74\" x2=\"145.45\" y2=\"128\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"16\"/>{/if}\n</svg>\n","<script lang=\"ts\">\n import { MailIcon } from '@getmicdrop/svelte-components/primitives/Icons/phosphor/index.js';\n import { Card, Heading, Text } from '@getmicdrop/svelte-components';\n import type { EventData, OrderTotals } from '$lib/public-calendar-flow/types';\n import OrderSummary from './OrderSummary.svelte';\n\n interface Props {\n event: EventData;\n orderId: string;\n orderTotals: OrderTotals;\n customerEmail: string;\n showCheckmark: boolean;\n showContent: boolean;\n labels?: Record<string, string>;\n }\n\n let {\n event,\n orderId,\n orderTotals,\n customerEmail,\n showCheckmark,\n showContent,\n labels = {},\n }: Props = $props();\n\n let ticketCount = $derived(\n orderTotals.lines.reduce((sum, l) => sum + l.quantity, 0)\n );\n\n let headingText = $derived(\n event.isRegistrationEvent\n ? labels.youreRegistered || \"You're registered!\"\n : labels.youreIn || \"You're in!\"\n );\n</script>\n\n<Card\n border\n padding={false}\n class=\"rounded-xl shadow-lg overflow-hidden bg-surface-primary\"\n>\n <div class=\"p-6 md:p-8\">\n <!-- Spinner → Checkmark animation -->\n <div class=\"flex justify-center mb-6\">\n <div class=\"indicator-container\">\n <!-- Spinner (visible while loading) -->\n <div class=\"processing-spinner\" class:fade-out={showCheckmark}></div>\n\n <!-- Animated checkmark (appears after spinner) -->\n <svg\n class=\"checkmark-svg\"\n class:active={showCheckmark}\n viewBox=\"0 0 52 52\"\n aria-hidden=\"true\"\n >\n <circle cx=\"26\" cy=\"26\" r=\"24\" class=\"checkmark-circle\" />\n <circle cx=\"26\" cy=\"26\" r=\"24\" class=\"checkmark-fill\" />\n <path d=\"M14 27l7 7 17-17\" class=\"checkmark-check\" />\n </svg>\n </div>\n </div>\n\n <!-- Content (fades in after checkmark completes) -->\n <div class=\"content-section\" class:visible={showContent}>\n <!-- Heading -->\n <!-- TODO: swap back to <Stack gap=\"3\"> once SC's root index.js exports Stack\n\t\t\t (the `export *` re-export of primitives doesn't surface it, so\n\t\t\t `import { Stack }` fails to resolve). flex-col gap-3 is equivalent. -->\n <div class=\"flex flex-col gap-3 text-center mb-6\">\n <Heading level={1} size=\"xl\" weight=\"bold\">\n {headingText}\n </Heading>\n <Text size=\"lg\" weight=\"semibold\" class=\"block\">\n {event.title}\n </Text>\n <Text size=\"sm\" color=\"secondary\" class=\"block\">\n {ticketCount}\n {ticketCount === 1\n ? labels.ticket || 'ticket'\n : labels.tickets || 'tickets'} confirmed\n </Text>\n </div>\n\n <!-- Order summary (same format as checkout) -->\n <div class=\"mb-6\">\n <OrderSummary {orderTotals} {labels} />\n </div>\n\n <!-- Order info -->\n <div\n class=\"flex justify-between items-center py-3 border-t border-default\"\n >\n <Text size=\"sm\" weight=\"semibold\" class=\"font-mono\">#{orderId}</Text>\n </div>\n\n <!-- Email confirmation -->\n <div\n class=\"flex items-center justify-center gap-2 p-3 rounded-lg bg-surface-secondary mt-4\"\n >\n <MailIcon size=\"16\" class=\"shrink-0 text-color-muted\" />\n <Text size=\"xs\" color=\"secondary\">\n {labels.confirmationSentTo || 'Confirmation sent to'}\n {customerEmail}\n </Text>\n </div>\n </div>\n </div>\n</Card>\n\n<style>\n /* Indicator container — holds spinner and checkmark in same space */\n .indicator-container {\n position: relative;\n width: 64px;\n height: 64px;\n }\n\n /* Spinner — rotating partial circle */\n .processing-spinner {\n position: absolute;\n inset: 0;\n border: 3px solid hsl(var(--stroke-primary) / 15%);\n border-top-color: hsl(var(--accent-success, 142 71% 45%));\n border-radius: 50%;\n animation: sc-spin 0.7s linear infinite; /* SC canonical spinner keyframes */\n transition: opacity 0.2s var(--ease-smooth);\n }\n\n .processing-spinner.fade-out {\n opacity: 0;\n }\n\n /* Checkmark SVG — scales in when active */\n .checkmark-svg {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n transform: scale(0.6);\n transition:\n opacity 0.3s var(--ease-smooth),\n transform 0.4s var(--ease-bouncy);\n }\n\n .checkmark-svg.active {\n opacity: 1;\n transform: scale(1);\n }\n\n /* Circle outline — draws itself */\n .checkmark-circle {\n stroke-dasharray: 151;\n stroke-dashoffset: 151;\n stroke-width: 2;\n stroke: hsl(var(--accent-success, 142 71% 45%));\n fill: none;\n transform-origin: center;\n }\n\n .checkmark-svg.active .checkmark-circle {\n animation: circle-draw 0.5s var(--ease-smooth) 0.1s forwards;\n }\n\n @keyframes circle-draw {\n to {\n stroke-dashoffset: 0;\n }\n }\n\n /* Circle fill — fades in after outline completes */\n .checkmark-fill {\n fill: hsl(var(--accent-success, 142 71% 45%));\n opacity: 0;\n }\n\n .checkmark-svg.active .checkmark-fill {\n animation: fill-in 0.25s var(--ease-smooth) 0.5s forwards;\n }\n\n @keyframes fill-in {\n to {\n opacity: 1;\n }\n }\n\n /* Checkmark stroke — draws after fill */\n .checkmark-check {\n stroke-dasharray: 36;\n stroke-dashoffset: 36;\n stroke-width: 3;\n stroke: hsl(var(--bg-primary));\n fill: none;\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n\n .checkmark-svg.active .checkmark-check {\n animation: check-draw 0.3s var(--ease-smooth) 0.6s forwards;\n }\n\n @keyframes check-draw {\n to {\n stroke-dashoffset: 0;\n }\n }\n\n /* Content section — fades in after checkmark */\n .content-section {\n opacity: 0;\n transform: translateY(8px);\n transition:\n opacity 0.5s var(--ease-smooth),\n transform 0.5s var(--ease-smooth);\n }\n\n .content-section.visible {\n opacity: 1;\n transform: translateY(0);\n }\n\n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n .processing-spinner {\n animation-duration: 0s;\n }\n\n .checkmark-svg {\n transition-duration: 0s;\n }\n\n .checkmark-svg .checkmark-circle,\n .checkmark-svg .checkmark-fill,\n .checkmark-svg .checkmark-check {\n animation-duration: 0s;\n animation-delay: 0s;\n }\n\n .content-section {\n transition-duration: 0s;\n }\n }\n</style>\n","<!-- native-element-exception: VC is an embeddable widget — native <button>s are intentional here (widget-controlled styling on calendar cells, date selectors, checkout/nav CTAs). -->\n<script lang=\"ts\">\n import { onMount, onDestroy } from 'svelte';\n import {\n ExportIcon,\n HelpIcon,\n ArrowLeftIcon,\n CalendarIcon,\n ChevronDownIcon,\n DownloadIcon,\n LocationIcon,\n } from '@getmicdrop/svelte-components/primitives/Icons/phosphor/index.js';\n import { Button, Card, Image, Text } from '@getmicdrop/svelte-components';\n import { createShareCopyFeedback } from '$lib/public-calendar-flow/shareCopyFeedback.svelte';\n import type { EventData } from '$lib/public-calendar-flow/types';\n import {\n formatBrowseDate,\n formatEventTime,\n } from '$lib/public-calendar-flow/defaults';\n import { PLACEHOLDER_IMAGE } from '$lib/utils/constants.js';\n\n interface Props {\n event: EventData;\n orderId: string;\n eventUrl: string;\n showContent: boolean;\n labels?: Record<string, string>;\n }\n\n let { event, orderId, eventUrl, showContent, labels = {} }: Props = $props();\n\n // --- Calendar dropdown ---\n let calendarOpen = $state(false);\n\n // --- Share-link copy + wallet feedback (inline — VC has no toasts) ---\n // Shared inline copy-feedback state machine (single source, also used by the\n // event header).\n const shareFeedback = createShareCopyFeedback();\n let walletNote = $state('');\n\n function toggleCalendar() {\n calendarOpen = !calendarOpen;\n }\n\n // Close calendar dropdown when clicking outside\n onMount(() => {\n function handleClickOutside(e: MouseEvent) {\n const target = e.target as HTMLElement;\n if (!target.closest('.calendar-dropdown')) {\n calendarOpen = false;\n }\n }\n document.addEventListener('click', handleClickOutside);\n return () => document.removeEventListener('click', handleClickOutside);\n });\n\n // --- Google Calendar URL ---\n let googleCalendarUrl = $derived(\n (() => {\n const startDate = new Date(event.startDateTime); // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent\n const endDate = event.endDateTime\n ? new Date(event.endDateTime) // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent\n : new Date(startDate.getTime() + 2 * 60 * 60 * 1000); // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent\n\n const formatForGoogle = (date: Date): string => {\n return date\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, ''); // ICS/Google calendar URL format (strips ms from the UTC ISO)\n };\n\n const locationParts = [event.venue.name, event.venue.address].filter(\n Boolean\n );\n const fullLocation = locationParts.join(', ');\n\n const params = new URLSearchParams({\n action: 'TEMPLATE',\n text: event.title,\n dates: `${formatForGoogle(startDate)}/${formatForGoogle(endDate)}`,\n location: fullLocation,\n details: `Event: ${eventUrl}\\n\\nTicket confirmation #${orderId}`,\n });\n\n return `https://calendar.google.com/calendar/render?${params.toString()}`;\n })()\n );\n\n // --- ICS file download (Apple Calendar) ---\n function downloadICS() {\n const startDate = new Date(event.startDateTime); // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent\n const endDate = event.endDateTime\n ? new Date(event.endDateTime) // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent\n : new Date(startDate.getTime() + 2 * 60 * 60 * 1000); // @datetime-escape: ICS/calendar-URL instant serialized to UTC — tz-independent\n\n const formatForICS = (date: Date): string => {\n return date\n .toISOString()\n .replace(/[-:]/g, '')\n .replace(/\\.\\d{3}/, ''); // ICS/Google calendar URL format (strips ms from the UTC ISO)\n };\n\n const uid = `order-${orderId}-event-${event.id}@micdrop.com`;\n const now = formatForICS(new Date()); // @datetime-escape: ICS DTSTAMP generation instant — tz-irrelevant\n const locationParts = [event.venue.name, event.venue.address].filter(\n Boolean\n );\n const fullLocation = locationParts.join(', ');\n\n const escapeICS = (str: string): string => {\n if (!str) return '';\n return str\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/;/g, '\\\\;')\n .replace(/,/g, '\\\\,')\n .replace(/\\n/g, '\\\\n');\n };\n\n const icsContent = `BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//MicDrop//Ticket Confirmation//EN\nCALSCALE:GREGORIAN\nMETHOD:PUBLISH\nBEGIN:VEVENT\nUID:${uid}\nDTSTAMP:${now}\nDTSTART:${formatForICS(startDate)}\nDTEND:${formatForICS(endDate)}\nSUMMARY:${escapeICS(event.title)}\nLOCATION:${escapeICS(fullLocation)}\nDESCRIPTION:${escapeICS(`Order #${orderId}\\n\\nView event: ${eventUrl}`)}\nURL:${eventUrl}\nSTATUS:CONFIRMED\nEND:VEVENT\nEND:VCALENDAR`;\n\n const blob = new Blob([icsContent], {\n type: 'text/calendar;charset=utf-8',\n });\n // @image-handling-escape: programmatic blob-URL download (export/.ics) — SC Image canonical cannot express in-memory-blob → browser-download\n const url = URL.createObjectURL(blob);\n try {\n const link = document.createElement('a');\n link.href = url;\n const safeFilename = (event.title || 'event')\n .replace(/[^a-zA-Z0-9\\s-]/g, '')\n .replace(/\\s+/g, '-');\n link.download = `${safeFilename}.ics`;\n document.body.appendChild(link);\n link.click();\n link.remove();\n } finally {\n // Revoke in finally so a throw between create and revoke can't leak the URL.\n URL.revokeObjectURL(url);\n }\n\n calendarOpen = false;\n }\n\n function handleGoogleCalendar() {\n calendarOpen = false;\n }\n\n // --- Share event ---\n function shareEvent() {\n shareFeedback.share(eventUrl);\n }\n\n // --- Wallet handlers (mock — requires backend in production) ---\n // Wallet passes need backend signing that isn't built yet. Surface the\n // \"coming soon\" note inline rather than as a toast. Both badges share it.\n function showWalletNote() {\n walletNote =\n labels.walletComingSoon ||\n 'Wallet passes are coming soon. Your ticket is confirmed — check your email.';\n }\n\n onDestroy(shareFeedback.dispose);\n\n // --- Directions ---\n let directionsUrl = $derived(\n (() => {\n const locationParts = [event.venue.name, event.venue.address].filter(\n Boolean\n );\n const query = encodeURIComponent(locationParts.join(', '));\n return `https://www.google.com/maps/search/?api=1&query=${query}`;\n })()\n );\n\n // --- Navigation ---\n function handleBackToEvent() {\n window.location.href = eventUrl;\n }\n</script>\n\n<!--\n\tSuccessActions: Sidebar card matching BookingWidget / CheckoutSidebar pattern.\n\tSingle Card with event thumbnail, date summary, wallet badges, action buttons, and links.\n-->\n<div class=\"actions-wrapper\" class:visible={showContent}>\n <Card\n border\n padding={false}\n class=\"rounded-xl shadow-lg overflow-hidden bg-surface-secondary\"\n >\n <!-- Event poster (same treatment as HeroImage — object-contain, no crop) -->\n <div class=\"rounded-t-xl overflow-hidden bg-surface-tertiary\">\n <Image\n src={event.imageUrl}\n alt={event.title}\n fallback={PLACEHOLDER_IMAGE}\n fit=\"contain\"\n class=\"w-full max-h-60 min-h-24\"\n />\n </div>\n\n <div class=\"p-5 space-y-4\">\n <!-- Event info -->\n <div>\n <Text size=\"sm\" weight=\"semibold\" class=\"block leading-tight\">\n {event.title}\n </Text>\n <div class=\"flex items-center gap-1.5 mt-1.5\">\n <CalendarIcon size=\"16\" class=\"shrink-0 icon-muted\" />\n <Text size=\"xs\" color=\"muted\">\n {formatBrowseDate(event.startDateTime, event.timezone)}\n {#if event.displayStartTime !== false}\n &middot; {formatEventTime(event.startDateTime, event.timezone)}\n {/if}\n </Text>\n </div>\n <div class=\"mt-0.5\">\n <Text size=\"xs\" color=\"muted\" class=\"block\">\n {event.venue.name}\n </Text>\n </div>\n </div>\n\n <!-- Wallet badges (official brand assets) -->\n <div class=\"flex flex-col items-center gap-3\">\n <button type=\"button\" class=\"wallet-badge-btn\" onclick={showWalletNote}>\n <!-- @component-image-escape: scoped-CSS selector targets this img -->\n <img\n src=\"/wallet-badges/apple-wallet.svg\"\n alt={labels.addToAppleWallet || 'Add to Apple Wallet'}\n class=\"wallet-badge-img\"\n />\n </button>\n <button type=\"button\" class=\"wallet-badge-btn\" onclick={showWalletNote}>\n <!-- @component-image-escape: scoped-CSS selector targets this img -->\n <img\n src=\"/wallet-badges/google-wallet-dark.svg\"\n alt={labels.saveToGoogleWallet || 'Save to Google Wallet'}\n class=\"wallet-badge-img google-dark\"\n />\n <!-- @component-image-escape: scoped-CSS selector targets this img -->\n <img\n src=\"/wallet-badges/google-wallet-light.svg\"\n alt={labels.saveToGoogleWallet || 'Save to Google Wallet'}\n class=\"wallet-badge-img google-light\"\n />\n </button>\n {#if walletNote}\n <p class=\"wallet-note caption\" role=\"status\">{walletNote}</p>\n {/if}\n </div>\n\n <!-- Divider -->\n <div class=\"divider\"></div>\n\n <!-- Calendar dropdown (full width) -->\n <div class=\"calendar-dropdown relative\">\n <Button\n variant=\"default\"\n size=\"md\"\n class=\"w-full\"\n onclick={toggleCalendar}\n >\n <CalendarIcon size=\"16\" />\n {labels.addToCalendar || 'Add to Calendar'}\n <ChevronDownIcon\n size=\"16\"\n class=\"ml-auto transition-transform {calendarOpen\n ? 'rotate-180'\n : ''}\"\n />\n </Button>\n\n {#if calendarOpen}\n <div class=\"dropdown-menu bg-surface-primary border-default\">\n <a\n href={googleCalendarUrl}\n rel=\"noopener noreferrer\"\n class=\"dropdown-item text-color-primary hover:bg-surface-secondary\"\n onclick={handleGoogleCalendar}\n >\n <svg\n aria-hidden=\"true\"\n class=\"shrink-0\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18A10.96 10.96 0 0 0 1 12c0 1.77.42 3.45 1.18 4.93l3.66-2.84z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z\"\n fill=\"#EA4335\"\n />\n </svg>\n {labels.googleCalendar || 'Google Calendar'}\n </a>\n <button\n type=\"button\"\n class=\"dropdown-item text-color-primary hover:bg-surface-secondary\"\n onclick={downloadICS}\n >\n <DownloadIcon size=\"16\" class=\"shrink-0\" />\n {labels.appleCalendar || 'Apple Calendar (.ics)'}\n </button>\n </div>\n {/if}\n </div>\n\n <!-- Share + Directions row -->\n <div class=\"flex gap-2\">\n <Button variant=\"default\" size=\"md\" class=\"flex-1\" onclick={shareEvent}>\n <ExportIcon size=\"16\" />\n {shareFeedback.copyState === 'copied'\n ? 'Link copied'\n : labels.share || 'Share'}\n </Button>\n\n {#if event.venue.address}\n <Button\n variant=\"default\"\n size=\"md\"\n class=\"flex-1\"\n href={directionsUrl}\n >\n <LocationIcon size=\"16\" />\n {labels.map || 'Map'}\n </Button>\n {/if}\n </div>\n\n {#if shareFeedback.copyState === 'failed'}\n <p class=\"copy-fallback caption\" role=\"alert\">\n Copy failed — select to copy:\n <span class=\"copy-url\">{shareFeedback.copyFailedUrl}</span>\n </p>\n {/if}\n\n <!-- Text links -->\n <div class=\"flex items-center justify-center gap-4 pt-1\">\n <button\n type=\"button\"\n class=\"text-link text-color-muted hover:text-color-secondary\"\n onclick={handleBackToEvent}\n >\n <ArrowLeftIcon size=\"16\" class=\"shrink-0\" />\n {labels.backToEvent || 'Back to event'}\n </button>\n\n {#if event.venue.contactEmail}\n <span class=\"text-color-muted\">·</span>\n <a\n href=\"mailto:{event.venue\n .contactEmail}?subject=Help with Order {orderId}\"\n class=\"text-link text-color-muted hover:text-color-secondary\"\n >\n <HelpIcon size=\"16\" class=\"shrink-0\" />\n {labels.needHelp || 'Need help?'}\n </a>\n {/if}\n </div>\n </div>\n </Card>\n</div>\n\n<style>\n /* Wrapper — fades in with content */\n .actions-wrapper {\n opacity: 0;\n transform: translateY(8px);\n transition:\n opacity 0.5s var(--ease-smooth),\n transform 0.5s var(--ease-smooth);\n }\n\n .actions-wrapper.visible {\n opacity: 1;\n transform: translateY(0);\n }\n\n /* Sidebar poster — same object-contain treatment as HeroImage */\n /* Inline wallet / share-copy feedback — VC surfaces feedback inline, never\n as a toast. */\n .wallet-note {\n text-align: center;\n color: hsl(var(--text-secondary));\n }\n\n .copy-fallback {\n color: hsl(var(--accent-danger));\n }\n\n .copy-url {\n user-select: all;\n word-break: break-all;\n color: hsl(var(--text-secondary));\n }\n\n /* Wallet badges — official brand assets, no modifications per guidelines */\n .wallet-badge-btn {\n display: block;\n transition-property: opacity;\n transition-timing-function: var(--ease-smooth);\n transition-duration: 150ms;\n }\n\n .wallet-badge-btn:hover {\n opacity: 0.85;\n }\n\n .wallet-badge-btn:active {\n opacity: 0.7;\n }\n\n .wallet-badge-img {\n height: 44px;\n width: auto;\n }\n\n /* Google badge: show dark variant in light mode, light variant in dark mode */\n .google-light {\n display: none;\n }\n\n /* Calendar dropdown menu */\n .dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n margin-top: 0.25rem;\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n border-radius: 0.5rem;\n box-shadow:\n 0 10px 15px -3px rgb(0 0 0 / 10%),\n 0 4px 6px -4px rgb(0 0 0 / 10%);\n z-index: var(--z-navigation);\n border-width: 1px;\n border-style: solid;\n }\n\n .dropdown-item {\n display: flex;\n align-items: center;\n gap: 0.625rem;\n width: 100%;\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n text-align: left;\n transition-property: color, background-color;\n transition-timing-function: var(--ease-smooth);\n transition-duration: 150ms;\n }\n\n /* Text links */\n .text-link {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n font-size: 0.75rem;\n line-height: 1rem;\n transition-property: color;\n transition-timing-function: var(--ease-smooth);\n transition-duration: 150ms;\n }\n\n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n .actions-wrapper {\n transition-duration: 0s;\n }\n }\n</style>\n","<script lang=\"ts\">\n\timport { toTicketId } from '@getmicdrop/svelte-components';\n\timport { onMount } from 'svelte';\n\timport type { EventData, OrderTotals, OrderLine, SuccessData } from '$lib/public-calendar-flow/types';\n\timport {\n\t\tmockEvent,\n\t\tmockFreeEvent,\n\t\tmockRegistrationEvent,\n\t\tmockDonationEvent\n\t} from '$lib/public-calendar-flow/mock-data';\n\timport { calculateTax } from '$lib/public-calendar-flow/defaults';\n\n\timport SuccessTicket from './SuccessTicket.svelte';\n\timport SuccessActions from './SuccessActions.svelte';\n\timport { mergeLabels } from '$lib/public-calendar-flow/i18n/labels.js';\n\timport { dataToggleStore, type ToggleOption } from '$lib/public-calendar-flow/data-toggle-store.svelte';\n\n\t// --- DataToggle ---\n\ttype SuccessVariant = 'default' | 'free' | 'registration' | 'donation';\n\n\tconst successStateOptions: ToggleOption[] = [\n\t\t{ value: 'default', label: 'Standard', color: 'bg-accent-success' },\n\t\t{ value: 'free', label: 'Free', color: 'bg-sky-500' },\n\t\t{ value: 'registration', label: 'Registration', color: 'bg-brand-primary' },\n\t\t{ value: 'donation', label: 'Donation', color: 'bg-accent-danger' }\n\t];\n\n\tlet dataVariant = $derived(dataToggleStore.current as SuccessVariant);\n\n\t// --- Props (dual-mode: showcase vs production) ---\n\tinterface Props {\n\t\t/** Pre-built success data for production mode. Absence = showcase. */\n\t\tdata?: SuccessData;\n\t\t/** Event page URL for production navigation and sharing. */\n\t\teventUrl?: string;\n\t\tlabels?: Record<string, string>;\n\t}\n\n\tlet {\n\t\tdata: dataProp = undefined,\n\t\teventUrl: eventUrlProp = undefined,\n\t\tlabels = {},\n\t}: Props = $props();\n\n\tconst mergedLabels = $derived(mergeLabels(labels));\n\n\tlet isShowcaseMode = $derived(!dataProp);\n\n\t$effect(() => {\n\t\tif (!isShowcaseMode) return;\n\t\tdataToggleStore.options = successStateOptions;\n\t\tdataToggleStore.current = 'default';\n\t\tdataToggleStore.isActive = true;\n\t\treturn () => {\n\t\t\tdataToggleStore.isActive = false;\n\t\t\tdataToggleStore.options = [];\n\t\t};\n\t});\n\n\t// --- Mock data per variant ---\n\tconst variantData: Record<SuccessVariant, SuccessData> = {\n\t\tdefault: {\n\t\t\tevent: mockEvent,\n\t\t\torderId: '12847',\n\t\t\tlines: [\n\t\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- mock data: static showcase ticketIds\n\t\t\t\t{ ticketId: toTicketId(101), ticketName: 'General Admission', quantity: 2, unitPrice: 25, fee: 2.5, subtotal: 50 },\n\t\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- mock data: static showcase ticketIds\n\t\t\t\t{ ticketId: toTicketId(102), ticketName: 'VIP Front Row', quantity: 1, unitPrice: 55, fee: 5.5, subtotal: 55 }\n\t\t\t],\n\t\t\tcustomerEmail: 'customer@example.com'\n\t\t},\n\t\tfree: {\n\t\t\tevent: mockFreeEvent,\n\t\t\torderId: '12848',\n\t\t\tlines: [\n\t\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- mock data: static showcase ticketIds\n\t\t\t\t{ ticketId: toTicketId(201), ticketName: 'Free Entry', quantity: 2, unitPrice: 0, fee: 0, subtotal: 0 }\n\t\t\t],\n\t\t\tcustomerEmail: 'comedy.fan@gmail.com'\n\t\t},\n\t\tregistration: {\n\t\t\tevent: mockRegistrationEvent,\n\t\t\torderId: '12849',\n\t\t\tlines: [\n\t\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- mock data: static showcase ticketIds\n\t\t\t\t{ ticketId: toTicketId(301), ticketName: 'Workshop Seat', quantity: 1, unitPrice: 75, fee: 7.5, subtotal: 75 }\n\t\t\t],\n\t\t\tcustomerEmail: 'learner@example.com'\n\t\t},\n\t\tdonation: {\n\t\t\tevent: mockDonationEvent,\n\t\t\torderId: '12850',\n\t\t\tlines: [\n\t\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- mock data: static showcase ticketIds\n\t\t\t\t{ ticketId: toTicketId(401), ticketName: 'Donation', quantity: 1, unitPrice: 25, fee: 0, subtotal: 25 },\n\t\t\t\t// eslint-disable-next-line micdrop/boundary-only-as-cast -- mock data: static showcase ticketIds\n\t\t\t\t{ ticketId: toTicketId(402), ticketName: 'Standard Admission', quantity: 1, unitPrice: 30, fee: 3, subtotal: 30 }\n\t\t\t],\n\t\t\tcustomerEmail: 'generous@example.com'\n\t\t}\n\t};\n\n\tlet current: SuccessData = $derived(isShowcaseMode ? variantData[dataVariant] : dataProp!);\n\n\t// Build OrderTotals — the server's persisted order is authoritative\n\t// (basePrice/tax/surcharge/totalPrice match what Stripe charged).\n\t// Fall back to a local sum-of-lines for showcase mode only.\n\tlet orderTotals: OrderTotals = $derived((() => {\n\t\tconst lines = current.lines;\n\t\tif (current.serverTotals) {\n\t\t\treturn {\n\t\t\t\tlines,\n\t\t\t\tsubtotal: current.serverTotals.subtotal,\n\t\t\t\tfees: current.serverTotals.fees,\n\t\t\t\ttaxes: current.serverTotals.taxes,\n\t\t\t\ttotal: current.serverTotals.total,\n\t\t\t\tpromoDiscount: current.serverTotals.promoDiscount,\n\t\t\t\tgiftCardAmount: current.serverTotals.giftCardAmount\n\t\t\t};\n\t\t}\n\t\tconst subtotal = lines.reduce((sum, l) => sum + l.subtotal, 0);\n\t\tconst fees = lines.reduce((sum, l) => sum + l.fee * l.quantity, 0);\n\t\tconst taxes = calculateTax(subtotal + fees, current.event.venue.taxPercentage);\n\t\treturn {\n\t\t\tlines,\n\t\t\tsubtotal,\n\t\t\tfees,\n\t\t\ttaxes,\n\t\t\ttotal: subtotal + fees + taxes,\n\t\t\tpromoDiscount: 0,\n\t\t\tgiftCardAmount: 0\n\t\t};\n\t})());\n\n\tlet eventUrl = $derived(\n\t\tisShowcaseMode\n\t\t\t? (() => {\n\t\t\t\tif (typeof window === 'undefined') return '#';\n\t\t\t\treturn `${window.location.origin}/e/${current.event.id}-${current.event.slug}`;\n\t\t\t})()\n\t\t\t: (eventUrlProp || '#')\n\t);\n\n\t// --- Animation ---\n\tlet showCheckmark = $state(false);\n\tlet showContent = $state(false);\n\tlet reducedMotion = $state(false);\n\n\tfunction runAnimations() {\n\t\tif (reducedMotion) {\n\t\t\tshowCheckmark = true;\n\t\t\tshowContent = true;\n\t\t\treturn;\n\t\t}\n\t\tshowCheckmark = false;\n\t\tshowContent = false;\n\t\tsetTimeout(() => { showCheckmark = true; }, 800);\n\t\tsetTimeout(() => { showContent = true; }, 1600);\n\t}\n\n\t$effect(() => {\n\t\tif (!isShowcaseMode) return;\n\t\tconst _v = dataVariant;\n\t\trunAnimations();\n\t});\n\n\tonMount(() => {\n\t\treducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n\t\trunAnimations();\n\t});\n</script>\n\n<div class=\"w-full min-h-screen bg-surface-primary text-color-primary\">\n\t<div class=\"max-w-6xl mx-auto px-4 py-6 md:px-6 md:py-8\">\n\n\t\t<!-- ============================================== -->\n\t\t<!-- DESKTOP: Two-column layout (1fr 360px) -->\n\t\t<!-- ============================================== -->\n\t\t<div class=\"hidden md:grid grid-cols-booking-split gap-8 items-start\">\n\n\t\t\t<!-- LEFT COLUMN: Confirmation card -->\n\t\t\t<SuccessTicket\n\t\t\t\tevent={current.event}\n\t\t\t\torderId={current.orderId}\n\t\t\t\t{orderTotals}\n\t\t\t\tcustomerEmail={current.customerEmail}\n\t\t\t\t{showCheckmark}\n\t\t\t\t{showContent}\n\t\t\t\tlabels={mergedLabels}\n\t\t\t/>\n\n\t\t\t<!-- RIGHT COLUMN: Sticky sidebar with event info + actions -->\n\t\t\t<div class=\"sticky top-6\">\n\t\t\t\t<SuccessActions\n\t\t\t\t\tevent={current.event}\n\t\t\t\t\torderId={current.orderId}\n\t\t\t\t\t{eventUrl}\n\t\t\t\t\t{showContent}\n\t\t\t\t\tlabels={mergedLabels}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<!-- ============================================== -->\n\t\t<!-- MOBILE: Single column -->\n\t\t<!-- ============================================== -->\n\t\t<div class=\"md:hidden space-y-6\">\n\t\t\t<SuccessTicket\n\t\t\t\tevent={current.event}\n\t\t\t\torderId={current.orderId}\n\t\t\t\t{orderTotals}\n\t\t\t\tcustomerEmail={current.customerEmail}\n\t\t\t\t{showCheckmark}\n\t\t\t\t{showContent}\n\t\t\t\tlabels={mergedLabels}\n\t\t\t/>\n\n\t\t\t<SuccessActions\n\t\t\t\tevent={current.event}\n\t\t\t\torderId={current.orderId}\n\t\t\t\t{eventUrl}\n\t\t\t\t{showContent}\n\t\t\t\tlabels={mergedLabels}\n\t\t\t/>\n\t\t</div>\n\t</div>\n</div>\n\n","<script module>\n import { createLogger, toTicketId } from '@getmicdrop/svelte-components';\n import type { TicketId } from '@getmicdrop/svelte-components';\n const logger = createLogger('Success');\n</script>\n\n<script lang=\"ts\">\n import { onMount } from 'svelte';\n import {\n getOrder,\n clearCheckoutCookies,\n removeCookie,\n } from '$lib/utils/utils.js';\n import { getEmbedConfig } from '$lib/config.js';\n import { postCheckoutComplete } from '$lib/embed-bridge.js';\n import { trackPurchase } from '$lib/tracking';\n import { firePixelPurchase } from '$lib/pixels';\n import {\n getSessionStorage,\n setSessionStorage,\n } from '@getmicdrop/svelte-components';\n import { transformApiEvent } from '$lib/public-calendar-flow/transform';\n import SuccessMain from '$lib/public-calendar-flow/Success.svelte';\n import type { SuccessData, OrderLine } from '$lib/public-calendar-flow/types';\n\n // --- Props ---\n interface Props {\n data?: any;\n browseUrl?: string;\n /**\n * Override for the canonical event URL used by the success actions\n * (\"view event\" / share). The full-page get-micdrop.com route lets this\n * default to the current origin; the embed (running on the venue's\n * origin) must pass the get-micdrop.com URL so those links don't 404.\n */\n eventUrl?: string;\n /** Saved-widget id, threaded from CalendarContainer onto the purchase beacon. */\n widgetId?: string | null;\n /** Widget venue id, threaded onto the purchase beacon (per-instance). */\n venueId?: string | number | null;\n labels?: Record<string, string>;\n }\n\n let {\n data = {},\n browseUrl = '/',\n eventUrl: eventUrlProp = undefined,\n widgetId = null,\n venueId = null,\n labels = {},\n }: Props = $props();\n\n // --- State ---\n let successData = $state<SuccessData | null>(null);\n let eventUrl = $state('');\n let loadError = $state<string | null>(null);\n let loading = $state(true);\n\n // Stripe appends `redirect_status` to the checkout return_url ONLY on the\n // redirect (3DS / redirect-method) confirm path; its sole success value is\n // the literal 'succeeded'. This page is ALSO reached by the inline confirm\n // path and by the embed's in-SPA success transition — both of which validate\n // the charge server-side BEFORE landing here and carry no redirect_status.\n // So an ABSENT value means \"already validated\" (success); only a PRESENT,\n // non-'succeeded' value (failed / canceled / still-processing) means the\n // charge did not complete. In that case we must NOT fire the purchase pixels\n // or render the receipt — a failed 3DS payment was showing green + firing a\n // Purchase conversion. (routes/[id]/[slug]/checkout/success/+page.js)\n // `data` is typed `any` (loose loader/embed payload), so property access\n // needs no cast.\n let redirectStatus = $derived(String(data?.redirectStatus || ''));\n let paymentNotCompleted = $derived(\n redirectStatus !== '' && redirectStatus !== 'succeeded'\n );\n // `pending` / `processing` are indeterminate — the charge may still settle, so\n // we must NOT tell the buyer it failed or offer a \"try again\" that restarts\n // checkout (double-charge risk). Only a definite non-'succeeded' status gets\n // the retry. (Ticket checkout is card-only today, where redirect_status is\n // just succeeded/failed, so `pending` isn't reachable yet — but the two\n // success pages must not diverge on the same Stripe contract.)\n let paymentIndeterminate = $derived(\n redirectStatus === 'pending' || redirectStatus === 'processing'\n );\n\n // Where the neutral failure state sends the buyer to retry: the event page,\n // which restarts checkout. The failed-redirect state only ever renders on the\n // full-page route (the embed transitions in-SPA and never sets\n // redirect_status), so this same-origin path is always valid there. Requires\n // BOTH id and slug — `/${id}/` with an empty slug is not a valid event route.\n let retryUrl = $derived(\n data?.id && data?.slug ? `/${data.id}/${data.slug}` : browseUrl\n );\n\n onMount(async () => {\n // Gate the ENTIRE success side-effect chain (host postMessage, purchase\n // beacon, operator Purchase pixel, order fetch, cookie clear) on a\n // completed charge. On a failed/aborted redirect payment we render the\n // neutral \"payment wasn't completed\" state and leave the cart cookies\n // intact so the buyer can go back and retry.\n if (paymentNotCompleted) {\n loading = false;\n return;\n }\n\n const {\n id,\n slug,\n event: rawEvent,\n orderId: paramOrderId,\n orderUuid: paramOrderUuid,\n customerEmail: paramEmail,\n ticketCount: paramTicketCount,\n // Order total + currency threaded from Checkout → CalendarContainer\n // (MISSION-TRUTH C6). Present on the embed purchase path; undefined on the\n // full-page route (its pixels/postMessage fire at mount, before getOrder).\n value: paramValue,\n currency: paramCurrency,\n } = data || {};\n\n // Opt-in host notification (configureVenueCalendar({embed:{...}})).\n // Emitted at mount: the order is already complete when Success renders,\n // and a later getOrder failure must not swallow the event. Non-PII payload.\n {\n const { postMessageOnSuccess, postMessageTargetOrigin } =\n getEmbedConfig();\n if (postMessageOnSuccess) {\n // orderId covers the embed successData shape; orderUuid covers the\n // full-page route, whose +page.js reads BOTH ?orderId= and ?orderUuid=\n // query params (success/+page.js:26-27) and either may be the populated\n // one. Success.svelte already destructures both (paramOrderId/\n // paramOrderUuid above). Non-PII payload (id + eventId).\n const completePayload: {\n orderId: string;\n eventId: string | number | null;\n value?: number;\n currency?: string;\n } = {\n orderId: String(paramOrderId || paramOrderUuid || ''),\n eventId: id ?? data?.eventId ?? rawEvent?.id ?? null,\n };\n // Additive (MISSION-TRUTH C6): value+currency let the host fire its own\n // conversion pixel with the amount. Added only when the order total is\n // known (embed path threads it from Checkout) — otherwise the payload\n // keeps its original { orderId, eventId } shape.\n if (typeof paramValue === 'number' && Number.isFinite(paramValue)) {\n completePayload.value = paramValue;\n completePayload.currency = paramCurrency || 'USD';\n }\n // postCheckoutComplete validates the origin and never throws — a bad\n // origin logs one warning and no-ops inside the bridge, so it can't\n // crash this render. We deliberately ignore the boolean here.\n postCheckoutComplete(completePayload, postMessageTargetOrigin);\n }\n }\n\n // Funnel: the order is complete when Success renders — fire the purchase\n // moment (covers card, gift-card-only and free orders since every completed\n // order lands here). Fire-and-forget with this widgetId. The purchase beacon\n // is never deduped by the funnel key, so guard on the ORDER id here so a\n // confirmation-page refresh / remount can't double-count the same order.\n {\n const purchaseEventId = id ?? data?.eventId ?? rawEvent?.id ?? null;\n const orderKey = String(paramOrderId || paramOrderUuid || '');\n const PURCHASED_KEY = 'micdrop_purchased_orders';\n const purchased = getSessionStorage<string[]>(PURCHASED_KEY, []) ?? [];\n const alreadyTracked = !!orderKey && purchased.includes(orderKey);\n if (purchaseEventId != null && !alreadyTracked) {\n trackPurchase(\n purchaseEventId,\n widgetId,\n venueId || rawEvent?.venueID || rawEvent?.venueId || null\n );\n // Operator pixel: Purchase / purchase with value+currency (MISSION-TRUTH\n // C6), mirroring the purchase beacon. Same order-id guard so a\n // confirmation-page refresh can't double-count. Consent-gated + silent\n // when no pixel is configured.\n firePixelPurchase({\n eventId: purchaseEventId,\n orderId: orderKey,\n value: typeof paramValue === 'number' ? paramValue : null,\n currency: paramCurrency,\n contentName: rawEvent?.name || rawEvent?.title || '',\n });\n if (orderKey)\n setSessionStorage(PURCHASED_KEY, [...purchased, orderKey]);\n }\n }\n\n // Build event URL — an explicit override (embed → get-micdrop.com origin)\n // wins; otherwise use the current origin (the full-page route).\n eventUrl = eventUrlProp || `${window.location.origin}/e/${id}-${slug}`;\n\n // Transform event data\n let eventData;\n try {\n eventData = transformApiEvent(rawEvent);\n } catch (e) {\n logger.warn('Success: transformApiEvent failed:', e);\n loadError = labels.failedToLoadEventData || 'Failed to load event data.';\n loading = false;\n return;\n }\n\n // Fetch order data\n let resolvedOrderId = paramOrderId || '';\n let resolvedEmail = paramEmail || '';\n let orderLines: OrderLine[] = [];\n let serverTotals: any = null;\n\n if (resolvedOrderId) {\n try {\n const order = await getOrder(resolvedOrderId);\n if (order) {\n // Extract email\n resolvedEmail = order.customerEmail || resolvedEmail;\n // Map purchased tickets to OrderLine[] by grouping by ticketTypeId + ticketName.\n // The order-confirmation wire is looser than the domain PurchasedTicket: some\n // payloads key rows under `tickets` and carry legacy field aliases\n // (ticketId/name/price). Model that loose row shape locally so the grouping\n // below reads it without an `as any` escape — runtime is unchanged.\n type OrderTicketRow = {\n ticketTypeId?: number;\n ticketId?: number;\n ticketName?: string;\n name?: string;\n purchasePrice?: number;\n price?: number;\n };\n // `order` is the legacy `OrderResponse` bag ({ [key]: unknown } in\n // orderApi.ts) — deliberately untyped and retirement-blocked, so its\n // fields read as `unknown` and are narrowed with a concrete assertion\n // (the module header notes these \"survive only via `as` casts\"), never\n // an `as any`.\n const tickets: OrderTicketRow[] =\n (order.purchasedTickets as OrderTicketRow[] | undefined) ||\n (order.tickets as OrderTicketRow[] | undefined) ||\n [];\n const grouped = new Map<string, OrderLine>();\n\n for (const ticket of tickets) {\n const key = `${ticket.ticketTypeId || ticket.ticketId || 0}-${ticket.ticketName || ticket.name || ''}`;\n const existing = grouped.get(key);\n if (existing) {\n existing.quantity += 1;\n existing.subtotal += ticket.purchasePrice || ticket.price || 0;\n } else {\n grouped.set(key, {\n // @type-escape: OrderLine.ticketId is a branded TicketId, but the\n // order-confirmation wire carries a raw numeric type-id (0 for\n // legacy/unknown rows, which the validating toTicketId rejects as\n // <= 0). Preserve the exact value with a scoped cast — an honest\n // brand mint here needs the bs29 F1 shared wire<->domain contract.\n ticketId: (ticket.ticketTypeId ||\n ticket.ticketId ||\n 0) as TicketId,\n ticketName:\n ticket.ticketName ||\n ticket.name ||\n labels.ticketFallbackName ||\n 'Ticket',\n quantity: 1,\n unitPrice: ticket.purchasePrice || ticket.price || 0,\n fee: 0,\n subtotal: ticket.purchasePrice || ticket.price || 0,\n });\n }\n }\n\n orderLines = Array.from(grouped.values());\n\n // Capture the persisted, server-authoritative totals. `totalPrice`\n // is the GROSS order total (basePrice + tax + surcharge); the gift\n // card is a separate deduction. OrderSummary renders `total` as-is\n // and shows the gift card as an informational line (\"total already\n // reflects it\"), so `total` must be the residual the buyer was\n // actually charged — otherwise the receipt overstates the total and\n // disagrees with the checkout page. That residual is the stripeAmount.\n if (typeof order.totalPrice === 'number') {\n const amountCharged =\n Number(order.totalPrice) -\n Number(order.giftCardPaymentAmount ?? 0);\n serverTotals = {\n subtotal: order.basePrice ?? 0,\n fees: order.surcharge ?? 0,\n taxes: order.tax ?? 0,\n total: amountCharged,\n promoDiscount: order.promoCodeStoredDiscountAmount ?? 0,\n giftCardAmount: order.giftCardPaymentAmount ?? 0,\n stripeAmount: amountCharged,\n };\n }\n }\n } catch (e) {\n logger.warn('Success: getOrder failed, using route params:', e);\n // Graceful degradation -- continue with whatever data we have\n }\n }\n\n // If no order lines from API, build a placeholder from route params\n if (orderLines.length === 0 && paramTicketCount > 0) {\n orderLines = [\n {\n ticketId: toTicketId(0),\n ticketName: labels.ticketFallbackName || 'Ticket',\n quantity: paramTicketCount,\n unitPrice: 0,\n fee: 0,\n subtotal: 0,\n },\n ];\n }\n\n // Build SuccessData\n successData = {\n event: eventData,\n orderId: String(resolvedOrderId),\n lines: orderLines,\n customerEmail: resolvedEmail,\n ...(serverTotals ? { serverTotals } : {}),\n };\n\n // Clear checkout cookies AFTER data is loaded (Pitfall 4)\n clearCheckoutCookies(String(id));\n removeCookie('checkout-cartid');\n\n loading = false;\n });\n</script>\n\n<!-- @pageloader-escape: bespoke post-purchase loading/error/payment-failed states\n themed via the component's own <style> color vars (.loading-container/\n .error-container/.payment-failed-container); the arms are intentional plain\n text + a retry link, not PageLoader's danger-Alert + retry. -->\n{#if paymentNotCompleted}\n <div\n class=\"flex flex-col items-center justify-center py-24 text-center gap-4 payment-failed-container\"\n >\n {#if paymentIndeterminate}\n <p class=\"payment-failed-title\">\n {labels.paymentNotConfirmedTitle || 'Payment not confirmed'}\n </p>\n <p class=\"payment-failed-message\">\n {labels.paymentNotConfirmedMessage ||\n 'We couldn’t confirm this payment yet. If it completes, a confirmation email will arrive shortly — please don’t try again until then.'}\n </p>\n {:else}\n <p class=\"payment-failed-title\">\n {labels.paymentNotCompletedTitle || \"Payment wasn't completed\"}\n </p>\n <p class=\"payment-failed-message\">\n {labels.paymentNotCompletedMessage ||\n 'The payment didn’t go through, so no tickets were issued. You can head back to the event and try again.'}\n </p>\n <a class=\"payment-failed-retry\" href={retryUrl}>\n {labels.backToEvent || 'Back to event'}\n </a>\n {/if}\n </div>\n{:else if loadError}\n <div\n class=\"flex flex-col items-center justify-center py-24 text-center gap-4 error-container\"\n >\n <p>{loadError}</p>\n </div>\n{:else if loading || !successData}\n <div\n class=\"flex items-center justify-center py-24 text-center loading-container\"\n >\n <p>{labels.loadingYourOrder || 'Loading your order'}</p>\n </div>\n{:else}\n <SuccessMain data={successData} {eventUrl} />\n{/if}\n\n<style>\n .loading-container {\n color: hsl(var(--text-secondary, 215 16% 47%));\n }\n\n .error-container p {\n color: hsl(var(--status-sold-out, 0 72% 51%));\n }\n\n .payment-failed-title {\n font-weight: 600;\n color: hsl(var(--text-primary, 222 47% 11%));\n }\n\n .payment-failed-message {\n color: hsl(var(--text-secondary, 215 16% 47%));\n max-width: 28rem;\n }\n\n .payment-failed-retry {\n color: hsl(var(--brand-primary, 221 83% 53%));\n font-weight: 600;\n text-decoration: none;\n }\n\n .payment-failed-retry:hover {\n text-decoration: underline;\n }\n</style>\n"],"names":["size","$","$$props","color","className","ctx","useIconWeight","resolved","svg","root_2","path","root","$$render","consequent","alternate","styles","labels","ticketCount","sum","l","headingText","Card","$$anchor","div","div_1","div_2","div_3","div_4","div_5","Heading","node","Text","node_1","node_2","div_6","OrderSummary","node_3","div_7","node_4","div_8","MailIcon","node_5","node_6","classes","classes_1","classes_2","calendarOpen","shareFeedback","createShareCopyFeedback","walletNote","toggleCalendar","onMount","handleClickOutside","e","googleCalendarUrl","startDate","endDate","formatForGoogle","date","fullLocation","downloadICS","formatForICS","uid","now","escapeICS","str","icsContent","blob","url","link","safeFilename","handleGoogleCalendar","shareEvent","showWalletNote","onDestroy","directionsUrl","locationParts","handleBackToEvent","root_8","fragment","Image","PLACEHOLDER_IMAGE","CalendarIcon","formatEventTime","formatBrowseDate","text_3","button","img","button_1","img_1","img_2","p","root_1","consequent_1","Button","node_8","node_9","ChevronDownIcon","node_10","root_3","a","text_6","button_2","DownloadIcon","node_12","consequent_2","div_9","node_13","ExportIcon","node_14","LocationIcon","node_16","consequent_3","p_1","root_5","span","text_10","consequent_4","div_10","node_17","button_3","ArrowLeftIcon","node_18","a_1","fragment_9","node_20","HelpIcon","consequent_5","successStateOptions","dataVariant","dataToggleStore","dataProp","eventUrlProp","mergedLabels","mergeLabels","isShowcaseMode","variantData","mockEvent","toTicketId","mockFreeEvent","mockRegistrationEvent","mockDonationEvent","current","orderTotals","lines","subtotal","fees","taxes","calculateTax","eventUrl","showCheckmark","showContent","reducedMotion","runAnimations","SuccessTicket","SuccessActions","logger","createLogger","data","browseUrl","widgetId","venueId","successData","loadError","loading","redirectStatus","paymentNotCompleted","paymentIndeterminate","retryUrl","id","slug","rawEvent","paramOrderId","paramOrderUuid","paramEmail","paramTicketCount","paramValue","paramCurrency","postMessageOnSuccess","postMessageTargetOrigin","getEmbedConfig","completePayload","postCheckoutComplete","purchaseEventId","orderKey","PURCHASED_KEY","purchased","getSessionStorage","alreadyTracked","trackPurchase","firePixelPurchase","setSessionStorage","eventData","transformApiEvent","resolvedOrderId","resolvedEmail","orderLines","serverTotals","order","getOrder","tickets","grouped","ticket","key","existing","amountCharged","clearCheckoutCookies","removeCookie","fragment_1","p_2","fragment_2","p_3","p_4","root_4","p_5","SuccessMain","alternate_1"],"mappings":";;;;;;;;;;kBAAA;;AAmBE,MAAMA,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;AAEhE,QAAMC,IAAMC,GAAa;AACzB,MAAIC,IAAoBN,EAAA,QAAA,MAAAC,EAAA,UAAsBG,GAAK,UAAU,SAAS;MAGvEG,IAAEC,GAAA;;kBAAFD,CAAE;;;UAUyBE,IAAIC,GAAA;kBAAJD,CAAI;AAAA;;;;;AAAzB,MAAAT,EAAA,IAAAM,CAAQ,MAAK,SAAMK,EAAAC,CAAA,IAAAD,EAAAE,GAAA,EAAA;AAAA;;UAVzBN,CAAE;AAAF,IAAAP,EAAA,UAAAO,aACQJ,EAAS,CAAA,CAAA,GADjBH,EAAA,cAAAO,YAGQR,EAAI,CAAA,GAHZC,EAAA,cAAAO,aAISR,EAAI,CAAA,GAJbe,IAAAd,EAAA,UAAAO,mBAOcL,EAAK,GAAA;AAAA,kBAPnBK,CAAE;AAFK;;kBCvBR;;AAmBE,MAAMR,IAAIC,EAAA,KAAAC,GAAA,QAAA,GAAG,IAAI,GAAEC,0BAAQ,cAAc,GAASC,0BAAY,EAAE;AAEhE,QAAMC,IAAMC,GAAa;AACzB,MAAIC,IAAoBN,EAAA,QAAA,MAAAC,EAAA,UAAsBG,GAAK,UAAU,SAAS;MAGvEG,IAAEC,GAAA;;kBAAFD,CAAE;;;UAUyBE,IAAIC,GAAA;kBAAJ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,CAAE,eAAFA,CAAE;AAAA;UAyBFC,IAAE2E,GAAA,GAGAiH,YAHF5L,CAAE,eAGA4L,GAAC,EAAA;cAADA,CAAC,WAHH5L,CAAE,+CAGG2I,CAAS,CAAA,CAAA,eAHd3I,CAAE;AAAA;UAMFC,IAAE4L,GAAA,GAGAC,YAHF7L,CAAE,eAGA6L,GAAC,EAAA;cAADA,CAAC,WAHH7L,CAAE,yCAGGT,EAAM,EAAC,oBAAoB,oBAAoB,CAAA,eAHpDS,CAAE;AAAA;AAMF8L,MAAAA,GAAWjM,GAAA;AAAA;uBAAO4I,CAAW;AAAA;;uBAAGb,CAAQ;AAAA;;;;AAtCtC,MAAApJ,EAAA,IAAAqK,CAAmB,IAAA1J,EAAAiF,CAAA,IAAA5F,EAAA,IAyBdkK,CAAS,IAAAvJ,EAAA6F,GAAA,CAAA,IAAAxG,EAAA,IAMTmK,CAAO,YAAKF,CAAW,IAAAtJ,EAAAoG,GAAA,CAAA,IAAApG,EAAA4M,GAAA,EAAA;AAAA;;;AArCzB;","x_google_ignoreList":[0,1,2]}
@@ -1,6 +1,6 @@
1
1
  import "svelte/internal/disclose-version";
2
2
  import * as e from "svelte/internal/client";
3
- import { l as D, aw as E } from "./VenueCalendar-Cz7_VBC6.js";
3
+ import { l as D, ax as E } from "./VenueCalendar-BRTDpyWV.js";
4
4
  var O = e.from_html('<div><img alt="" class="sc-image__blur svelte-12gell2" aria-hidden="true" decoding="async"/> <img decoding="async"/></div>'), V = e.from_html('<img decoding="async"/>'), W = e.from_html('<div role="img"></div>'), X = e.from_html('<div aria-hidden="true"></div>');
5
5
  function H(L, t) {
6
6
  e.push(t, !0), D("Image"), typeof process < "u" && process.env?.VITEST;
@@ -168,4 +168,4 @@ export {
168
168
  H as I,
169
169
  J as T
170
170
  };
171
- //# sourceMappingURL=Text-CT79Zi5n.js.map
171
+ //# sourceMappingURL=Text-B5MZ6L1O.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text-CT79Zi5n.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Image/Image.svelte","../node_modules/@getmicdrop/svelte-components/dist/components/Text.svelte"],"sourcesContent":["<!--\n Image.svelte\n\n The canonical image primitive for Micdrop. Variable-aspect, user-uploaded\n sources (event posters, performer headshots, venue photos) where we do NOT\n control the aspect ratio. This component is now the single home for the\n whole image family — `Avatar` composes it, and `BlurBackdropImage` is a\n thin `@deprecated` shim.\n\n Premium contract (Atlas brief 04 — perf 5 / completeness 5):\n\n 1. ZERO CLS — pass `width`/`height` (intrinsic px) or `aspectRatio`\n (e.g. `'2/3'`, `'16/9'`, `'1'`). The component reserves that space\n BEFORE the image loads so the page never reflows when it arrives.\n Dev-only `console.warn` if you provide neither dimensions nor a\n sizing class (we can't reserve space and CLS can creep back in).\n\n 2. BLUR-UP LOADING — the main image starts slightly blurred and SHARPENS\n (blur → 0) once the real bitmap has decoded (`img.decode()` +\n `decoding=\"async\"`). In blur-backdrop framing a blurred copy of the\n SAME already-fetched bitmap fills the letterbox gaps — no second\n network fetch, no LQIP asset to ship. Fade timing reads the motion\n tokens, so `prefers-reduced-motion` collapses it automatically.\n\n 3. BLUR-BACKDROP IS THE DEFAULT FRAMING — `fit` defaults to\n `'blur-backdrop'`: the image is `object-fit: contain` (never cropped)\n and a blurred copy of itself fills the letterbox gaps. This handles\n BOTH tall posters and wide photos with no cropping and no flat-gray\n bars. `'cover'` / `'contain'` / `'fill'` / `'scale-down'` / `'none'`\n remain as escape hatches and render the plain single-`<img>` path\n (identical DOM to the pre-premium component).\n\n 4. BRANDED FALLBACK — when `src` (and `fallback`) are missing or both\n error, we render a branded placeholder (the Micdrop mark on a tint)\n instead of a flat gray div. Override the asset with `fallback`, or\n suppress the mark with `branded={false}`.\n\n Passthrough props for raw-<img> parity (so consumers can migrate\n existing `<img>` sites to `<Image>`):\n - `draggable` — forwarded to the underlying `<img draggable>`.\n - `onload` — forwarded to the `<img>` load event.\n - `fetchpriority` — forwarded to `<img fetchpriority>` (resource hint).\n - `onError` — fires ONCE, only after the internal fallback chain is\n exhausted (i.e. the branded placeholder takes over). It does NOT fire\n on the first error while a distinct `fallback` is still going to be\n tried. The raw `onerror` handler stays owned internally to drive the\n src→fallback→placeholder degradation; `onError` composes with it\n rather than replacing it.\n Deliberately NOT exposed: `srcset`/`sizes` — zero consumer demand.\n\n Example:\n <Image src={event.posterUrl} alt={event.name} aspectRatio=\"2/3\" class=\"w-full rounded-xl\" />\n <Image src={user.avatarUrl} alt={user.name} width={80} height={80} fit=\"cover\" class=\"rounded-full\" />\n <Image src={banner.url} alt=\"\" aspectRatio=\"16/9\" class=\"w-full\" loading=\"eager\" fetchpriority=\"high\" />\n-->\n<script lang=\"ts\">\n import { DEV } from 'esm-env';\n import { cn } from '../../utils/classNames.js';\n import { createLogger } from '../../utils/logger.js';\n\n const log = createLogger('Image');\n\n // Silence the dev CLS nudge under the test runner (the suite intentionally\n // renders without dimensions to exercise other behaviour). Reads the Node\n // env var Vitest sets — bundler-agnostic.\n const IS_TEST =\n typeof process !== 'undefined' && !!process.env?.VITEST;\n\n interface Props {\n /** Image source URL. When empty/missing, falls back to `fallback`. */\n src?: string;\n /** Alt text. Empty string marks decorative images per WCAG. */\n alt?: string;\n /** Additional CSS classes (sizing, shape, rounded corners). Wins last. */\n class?: string;\n /** Fallback URL used when src is empty or errors (before the branded mark). */\n fallback?: string;\n /** Loading strategy. Default 'lazy'; pass 'eager' for above-fold. */\n loading?: 'eager' | 'lazy';\n /**\n * Framing mode. Default `'blur-backdrop'` — `object-fit: contain` over a\n * blurred copy of the same image so tall AND wide sources are never\n * cropped and never letterboxed with flat gray. The remaining values are\n * escape hatches that render a plain single `<img object-fit:…>`.\n */\n fit?: 'blur-backdrop' | 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';\n /**\n * Intrinsic width in CSS px — reserves space before load (zero CLS) and\n * sets the `<img width>` attribute. Pair with `height` for a fixed box.\n */\n width?: number;\n /**\n * Intrinsic height in CSS px — reserves space before load (zero CLS) and\n * sets the `<img height>` attribute. Pair with `width` for a fixed box.\n */\n height?: number;\n /**\n * CSS `aspect-ratio` string (e.g. `'2/3'` posters, `'16/9'` banners,\n * `'1'` square). Reserves space before load when you size by one axis\n * (`w-full`) — the zero-CLS path for fluid layouts.\n */\n aspectRatio?: string;\n /**\n * Blur-up loading: render blurred, then sharpen once the real bitmap\n * decodes. Default true. Set false to skip the effect (e.g. tiny icons\n * where the blur is imperceptible but the extra work isn't worth it).\n */\n blurUp?: boolean;\n /**\n * When the fallback chain is exhausted, show the branded Micdrop mark on\n * a tint. Default true. Set false for a plain tinted placeholder.\n */\n branded?: boolean;\n /** Forwarded to `<img draggable>`. Omitted when undefined. */\n draggable?: boolean;\n /** Forwarded to the `<img>` load event. */\n // eslint-disable-next-line no-unused-vars -- intentionally retained (prop/slot/forward-compat or Svelte-5 reactive binding eslint cannot see)\n onload?: (e: Event) => void;\n /** Forwarded to `<img fetchpriority>` (fetch-priority resource hint). */\n fetchpriority?: 'high' | 'low' | 'auto';\n /**\n * Fires once when the fallback chain is exhausted and the branded\n * placeholder takes over — NOT on the first error if a distinct\n * `fallback` is still going to be tried. Composes with the internal\n * `onerror` machine.\n */\n onError?: () => void;\n }\n\n let {\n src = '',\n alt = '',\n class: className = '',\n fallback = '',\n loading = 'lazy',\n fit = 'blur-backdrop',\n width,\n height,\n aspectRatio,\n blurUp = true,\n branded = true,\n draggable,\n onload,\n fetchpriority,\n onError,\n }: Props = $props();\n\n // Track loading attempts: which URL we're showing right now.\n // When the current URL errors, drop to 'failed' and render the placeholder.\n // Distinct from src/fallback inputs because we need to remember which\n // candidate we already tried. Reset whenever inputs change.\n let attempt: 'src' | 'fallback' | 'failed' = $state(\n // eslint-disable-next-line svelte/valid-compile -- known Svelte compiler note, accepted for this primitive\n src ? 'src' : fallback ? 'fallback' : 'failed'\n );\n\n // Guard so `onError` fires at most once per input set, even if a stale\n // <img> re-emits a duplicate final `error`. Reset when inputs change so a\n // fresh src/fallback can legitimately fail-and-notify again.\n let notifiedError = $state(false);\n\n // Blur-up: starts blurred, sharpens once the real bitmap decodes. Reset on\n // every new candidate URL so each swap re-runs the blur-up reveal.\n let decoded = $state(false);\n\n // The rendered main <img>, so we can detect an already-decoded bitmap that\n // won't fire `load` again (a cached src re-assigned, or a re-mount onto a\n // cached URL). Without this, `decoded` sticks at false and the image stays\n // blurred forever — the \"avatar goes blurry after save\" bug.\n let mainImg: HTMLImageElement | undefined = $state();\n\n $effect(() => {\n // Re-derive when inputs change. (Read both to register dependencies.)\n const _s = src;\n const _f = fallback;\n attempt = _s ? 'src' : _f ? 'fallback' : 'failed';\n notifiedError = false;\n decoded = false;\n });\n\n let activeSrc = $derived(\n attempt === 'src' ? src : attempt === 'fallback' ? fallback : ''\n );\n\n // Cached-bitmap reveal: after the shown URL settles, a browser that already\n // has the image marks the <img> `complete` WITHOUT re-firing `load` (cache\n // hit, or a mount whose load event landed before the handler attached). Reveal\n // it immediately so it never sticks blurred; a genuinely-loading image is\n // `complete: false` here and still waits for `handleLoad`. Depends on the SAME\n // inputs as the reset effect (src/fallback) — plus activeSrc — so it always\n // re-runs right after the reset (declaration order) and reads the post-update\n // <img>, even when the resolved URL is unchanged.\n $effect(() => {\n void src;\n void fallback;\n void activeSrc;\n if (mainImg?.complete && mainImg.naturalWidth > 0) decoded = true;\n });\n let showImg = $derived(attempt !== 'failed' && !!activeSrc);\n\n // blur-backdrop is the only framing mode that wraps; everything else is a\n // plain single <img object-fit:…> (identical DOM to the legacy component).\n let backdrop = $derived(fit === 'blur-backdrop');\n let objectFit = $derived(backdrop ? 'contain' : fit);\n\n // Does the consumer reserve a DEFINITE box — one that fixes the rendered\n // HEIGHT before the bitmap's intrinsic dimensions are known? Only these\n // prevent vertical CLS:\n // - aspectRatio (height derives from width via the ratio), OR\n // - both width AND height (a fully fixed box), OR\n // - a `size-*` utility (sets width AND height together), OR\n // - a definite height / aspect-ratio class (`h-*`, `aspect-*`).\n // Deliberately NOT counted: width alone, `w-full`, `max-h-*`, `h-auto`,\n // AND `min-h-*` — min-h only reserves a FLOOR, so a taller bitmap still\n // grows the box and shifts the page. None of these reserve the actual\n // vertical extent before metadata, so CLS can still creep in.\n const DEFINITE_BOX_CLASS = /(?:^|\\s)(?:aspect-|size-|h-(?!auto\\b))/;\n let hasReservedBox = $derived(\n !!aspectRatio ||\n (width != null && height != null) ||\n DEFINITE_BOX_CLASS.test(className)\n );\n\n // Dev-only nudge: without a definite box we cannot reserve VERTICAL space,\n // so CLS can creep back in. Warn, never throw.\n $effect(() => {\n // Dev-only (tree-shaken from prod via esm-env DEV) and never under test.\n if (DEV && !IS_TEST && !hasReservedBox) {\n log.warn(\n 'No aspectRatio, no width+height pair, and no definite height/aspect ' +\n 'sizing class — vertical layout space cannot be reserved and the ' +\n 'page may shift when the image loads (CLS). Pass aspectRatio=\"2/3\", ' +\n 'both width and height, or an h-*/aspect-* class. (width alone or ' +\n 'w-full does not reserve vertical space.)'\n );\n }\n });\n\n // Reserve intrinsic space on the box that owns layout. For blur-backdrop\n // that's the wrapper; for the plain path it's the <img> itself.\n let reserveStyle = $derived(\n [\n width != null ? `width:${width}px` : '',\n height != null ? `height:${height}px` : '',\n aspectRatio ? `aspect-ratio:${aspectRatio}` : '',\n ]\n .filter(Boolean)\n .join(';')\n );\n\n // mark the real bitmap as decoded → triggers the blur→sharp fade.\n async function handleLoad(e: Event) {\n const img = e.currentTarget as HTMLImageElement;\n // Capture which URL this load is FOR. If `src` swaps mid-decode (the\n // active candidate changes), this stale resolution must NOT sharpen — or\n // fire onload for — the new image. Compare against the live activeSrc\n // after the await and bail if it moved on.\n const loadedSrc = activeSrc;\n try {\n // decode() resolves once the bitmap is paint-ready; avoids revealing a\n // half-painted image. Falls through if unsupported / aborted.\n await img.decode?.();\n } catch {\n // decode can reject on detached/aborted images — reveal anyway.\n }\n // Src swapped while we awaited decode() → this is a stale load. Drop it;\n // the new candidate's own load event will drive the reveal.\n if (activeSrc !== loadedSrc) return;\n decoded = true;\n onload?.(e);\n }\n\n function handleError() {\n // If we were on src and have a distinct fallback to try, advance.\n if (attempt === 'src' && fallback && fallback !== src) {\n attempt = 'fallback';\n return;\n }\n // Either fallback already attempted, or no distinct fallback exists.\n // The chain is exhausted — the branded placeholder takes over. Notify the\n // consumer exactly here (final failure only), never on the transient\n // src→fallback hop, and at most once per input set.\n attempt = 'failed';\n if (!notifiedError) {\n notifiedError = true;\n onError?.();\n }\n }\n</script>\n\n{#if showImg && backdrop}\n <!-- blur-backdrop framing (default): contain + same-image blurred fill.\n The wrapper owns layout + reserves space; the blur layer is a second\n cheap reuse of the already-fetched bitmap (no extra network fetch). -->\n <div\n class={cn('sc-image sc-image--backdrop', className)}\n class:sc-image--backdrop-reserved={hasReservedBox}\n style={reserveStyle || undefined}\n >\n <img\n src={activeSrc}\n alt=\"\"\n class=\"sc-image__blur\"\n aria-hidden=\"true\"\n decoding=\"async\"\n {loading}\n {draggable}\n {fetchpriority}\n />\n <img\n bind:this={mainImg}\n src={activeSrc}\n {alt}\n class=\"sc-image__main\"\n class:sc-image__main--reserved={hasReservedBox}\n class:sc-image__main--loading={blurUp && !decoded}\n style:object-fit={objectFit}\n {width}\n {height}\n {loading}\n {draggable}\n {fetchpriority}\n decoding=\"async\"\n onerror={handleError}\n onload={handleLoad}\n />\n </div>\n{:else if showImg}\n <!-- escape-hatch framing (cover/contain/fill/none/scale-down): plain single\n <img>, identical DOM to the legacy component, plus blur-up + dims. -->\n <img\n bind:this={mainImg}\n src={activeSrc}\n {alt}\n {loading}\n {draggable}\n {fetchpriority}\n {width}\n {height}\n class={cn(\n 'sc-image image',\n blurUp && !decoded && 'sc-image--loading',\n className\n )}\n style:object-fit={objectFit}\n style:aspect-ratio={aspectRatio || undefined}\n decoding=\"async\"\n onerror={handleError}\n onload={handleLoad}\n />\n{:else}\n <!-- No usable src — branded placeholder (Micdrop mark on a tint), or a plain\n tinted box when branded={false}. Empty alt marks decorative images (per\n WCAG); hide from assistive tech via aria-hidden + no role. -->\n {#if alt}\n <div\n class={cn(\n 'sc-image image sc-image-placeholder image-placeholder',\n branded && 'sc-image-placeholder--branded',\n className\n )}\n style={reserveStyle || undefined}\n role=\"img\"\n aria-label={alt}\n ></div>\n {:else}\n <div\n class={cn(\n 'sc-image image sc-image-placeholder image-placeholder',\n branded && 'sc-image-placeholder--branded',\n className\n )}\n style={reserveStyle || undefined}\n aria-hidden=\"true\"\n ></div>\n {/if}\n{/if}\n\n<style>\n /* `.image` is a legacy back-compat alias of `.sc-image` on the plain\n escape-hatch <img> + placeholder (consumer CSS / tests may target it). */\n .sc-image,\n .image {\n display: block;\n max-width: 100%;\n }\n\n /* --- blur-backdrop framing --- */\n .sc-image--backdrop {\n position: relative;\n overflow: hidden;\n container-type: inline-size;\n background: hsl(var(--bg-quaternary));\n }\n\n .sc-image__blur {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n max-width: none;\n object-fit: cover;\n transform: scale(1.15);\n filter: blur(16px) saturate(1.2);\n /* purely decorative fill; the absolutely-positioned blur paints first and\n the in-flow main layer (position:relative) stacks above it by source\n order — no explicit z-index needed. */\n }\n\n /* Small containers (<=80px): blur() applies before scale() in the render\n pipeline, so the blur halo gets scaled too. Need enough scale that the\n opaque image extends past the container edge even after the halo grows. */\n @container (max-width: 5rem) {\n .sc-image__blur {\n transform: scale(2);\n filter: blur(6px) saturate(1.2);\n }\n }\n\n .sc-image__main {\n position: relative;\n display: block;\n width: 100%;\n /* No reserved box (legacy / no-fit default): the in-flow main image\n DRIVES the wrapper height and sizes ITSELF to the consumer's sizing\n classes — which land on the wrapper. `max-height: inherit` /\n `max-width: inherit` pull the wrapper's `max-h-*` / `max-w-*` onto the\n image so object-fit:contain shrinks it to fit (image height == wrapper\n height). The image therefore NEVER exceeds the wrapper, so the wrapper's\n overflow:hidden (which clips the decorative blur fill) cannot clip the\n MAIN image — it renders exactly as the pre-premium single <img> did,\n constrained by max-h-* / h-auto, no reflow. Only force the image to fill\n a fixed box when the consumer reserved a DEFINITE one (explicit height /\n aspectRatio / size-* / h-* / aspect-*) — there the wrapper owns layout\n and the image fills it (true zero-CLS letterbox). */\n height: auto;\n max-width: inherit;\n max-height: inherit;\n object-fit: contain;\n }\n\n .sc-image--backdrop-reserved .sc-image__main--reserved {\n height: 100%;\n max-width: none;\n max-height: none;\n }\n\n /* --- blur-up reveal (CSS-only; reduced-motion gated via motion tokens) ---\n The main image / plain image starts slightly blurred + scaled and\n sharpens on decode. Durations read from --motion-* so\n prefers-reduced-motion collapses them. */\n .sc-image--loading,\n .sc-image__main {\n transition:\n filter var(--motion-normal, 300ms) var(--ease-out, ease),\n transform var(--motion-normal, 300ms) var(--ease-out, ease);\n }\n\n .sc-image--loading,\n .sc-image__main--loading {\n filter: blur(12px);\n transform: scale(1.02);\n }\n\n /* --- placeholder --- */\n .sc-image-placeholder {\n background: hsl(var(--bg-quaternary));\n }\n\n .sc-image-placeholder--branded {\n background-color: hsl(var(--bg-tertiary));\n background-image: url('../../assets/images/micdrop-logo.png');\n background-repeat: no-repeat;\n background-position: center;\n /* keep the mark a small, calm watermark — never edge-to-edge */\n background-size: min(48%, 96px) auto;\n opacity: 0.92;\n }\n</style>\n","<script lang=\"ts\">\n import type { Snippet } from 'svelte';\n import type { TypographyRole, TypographyTone } from '../tokens/typography.js';\n\n interface Props {\n /** Text role — the closed type system. Sets size+weight+line-height+tracking. Preferred. */\n variant?: TypographyRole;\n /** Tone (color) — orthogonal to variant. */\n tone?: TypographyTone;\n as?: 'span' | 'p' | 'label' | 'div';\n truncate?: boolean;\n class?: string;\n /** @deprecated use `variant` */ size?: 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | '2xl';\n /** @deprecated set via `variant` */ leading?: 'none' | 'tight' | 'snug' | 'normal' | 'relaxed' | 'loose';\n /** @deprecated use `tone` */ color?: 'default' | 'muted' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'none';\n /** @deprecated set via `variant` */ weight?: 'normal' | 'medium' | 'semibold' | 'bold';\n children: Snippet;\n }\n\n let {\n variant,\n tone,\n as = 'span',\n truncate = false,\n class: className = '',\n size,\n leading,\n color = 'default',\n weight,\n children,\n }: Props = $props();\n\n // ── New role API ──\n const toneClass: Record<string, string> = {\n primary: 'tone-primary', secondary: 'tone-secondary', muted: 'tone-muted',\n brand: 'tone-brand', success: 'tone-success', warning: 'tone-warning', danger: 'tone-danger',\n };\n\n // ── Deprecated prop maps (back-compat until consumers migrate to `variant`) ──\n const sizeClasses: Record<string, string> = {\n xs: 'type-caption', sm: 'type-body', base: 'type-bodyLarge', md: 'type-bodyLarge',\n lg: 'text-lg', xl: 'text-xl', '2xl': 'text-2xl',\n };\n const legacyColorClasses: Record<string, string> = {\n default: 'tone-primary', muted: 'tone-muted', primary: 'text-brand-primary',\n secondary: 'tone-secondary', success: 'text-accent-success', warning: 'text-accent-warning',\n error: 'text-accent-danger', none: '',\n };\n const leadingClasses: Record<string, string> = {\n none: 'leading-none', tight: 'leading-tight', snug: 'leading-snug',\n normal: 'leading-normal', relaxed: 'leading-relaxed', loose: 'leading-loose',\n };\n const weightClasses: Record<string, string> = {\n normal: 'font-normal', medium: 'font-medium', semibold: 'font-semibold', bold: 'font-bold',\n };\n\n let classes = $derived(\n (variant\n ? [`type-${variant}`, tone ? toneClass[tone] : '']\n : [\n sizeClasses[size ?? 'md'] || 'type-bodyLarge',\n leading ? leadingClasses[leading] : '',\n tone ? toneClass[tone] : legacyColorClasses[color] || '',\n weight ? weightClasses[weight] : 'font-normal',\n ])\n .concat(truncate ? 'truncate' : '', className)\n .filter(Boolean)\n .join(' '),\n );\n</script>\n\n<svelte:element this={as} class={classes}>{@render children()}</svelte:element>\n"],"names":["createLogger","src","$","$$props","alt","className","fallback","loading","fit","blurUp","branded","attempt","notifiedError","decoded","mainImg","_s","_f","activeSrc","showImg","backdrop","objectFit","DEFINITE_BOX_CLASS","hasReservedBox","reserveStyle","handleLoad","e","img","loadedSrc","handleError","div","root","img_1","img_2","$$value","classes","classes_1","styles","cn","img_3","root_1","$0","styles_1","div_1","root_2","div_2","root_3","$$render","consequent_2","alternate","consequent","consequent_1","alternate_1","as","truncate","color","toneClass","sizeClasses","legacyColorClasses","leadingClasses","weightClasses","$$element","$$anchor"],"mappings":";;;;iBAuDA;iBAKcA,EAAa,OAAO,GAKnB,OACJ,UAAY,OAAiB,QAAQ,KAAK;AA+DnD,MACEC,IAAGC,EAAA,KAAAC,GAAA,OAAA,GAAG,EAAE,GACRC,wBAAM,EAAE,GACDC,0BAAY,EAAE,GACrBC,6BAAW,EAAE,GACbC,4BAAU,MAAM,GAChBC,wBAAM,eAAe,GAIrBC,2BAAS,EAAI,GACbC,4BAAU,EAAI,GAWZC,IAAyCT,EAAA,MAAMA,EAAA;AAAA;AAAA,IAEjDD,MAAM,QAAQK,EAAQ,IAAG,aAAa;AAAA,MAMpCM,IAAgBV,EAAA,MAAO,EAAK,GAI5BW,IAAUX,EAAA,MAAO,EAAK,GAMtBY,IAAwCZ,EAAA,MAAM,MAAA;AAElD,EAAAA,EAAA,YAAO,MAAO;AAEZ,UAAMa,IAAKd,EAAG,GACRe,IAAKV,EAAQ;UACnBK,GAAUI,IAAK,QAAQC,IAAK,aAAa,UAAQ,EAAA,GACjDd,EAAA,IAAAU,GAAgB,EAAK,GACrBV,EAAA,IAAAW,GAAU,EAAK;AAAA,EACjB,CAAC;AAED,MAAII,IAASf,EAAA,QAAA,MAAAA,EAAA,IACXS,CAAO,MAAK,QAAQV,EAAG,IAAGC,EAAA,IAAAS,CAAO,MAAK,aAAaL,EAAQ,IAAG,EAAC;AAWjE,EAAAJ,EAAA,YAAO,MAAO;IACPD,EAAG,GACHK,EAAQ,SACRW,CAAS,GACZf,EAAA,IAAEY,CAAO,GAAE,YAAQZ,EAAA,IAAIY,CAAO,EAAC,eAAe,KAACZ,EAAA,IAAEW,GAAU,EAAI;AAAA,EACnE,CAAC;AACD,MAAIK,IAAOhB,EAAA,QAAA,MAAAA,EAAA,IAAYS,CAAO,MAAK,oBAAcM,CAAS,CAAA,GAItDE,IAA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AAkB,OAAO;AAAA,IAC7D,OAAO;AAAA,IAAc,SAAS;AAAA,IAAgB,SAAS;AAAA,IAAgB,QAAQ;AAAA,KAI3EC,IAAmC;AAAA,IACvC,IAAI;AAAA,IAAgB,IAAI;AAAA,IAAa,MAAM;AAAA,IAAkB,IAAI;AAAA,IACjE,IAAI;AAAA,IAAW,IAAI;AAAA,IAAW,OAAO;AAAA,KAEjCC,IAA0C;AAAA,IAC9C,SAAS;AAAA,IAAgB,OAAO;AAAA,IAAc,SAAS;AAAA,IACvD,WAAW;AAAA,IAAkB,SAAS;AAAA,IAAuB,SAAS;AAAA,IACtE,OAAO;AAAA,IAAsB,MAAM;AAAA,KAE/BC,IAAsC;AAAA,IAC1C,MAAM;AAAA,IAAgB,OAAO;AAAA,IAAiB,MAAM;AAAA,IACpD,QAAQ;AAAA,IAAkB,SAAS;AAAA,IAAmB,OAAO;AAAA,KAEzDC,IAAqC;AAAA,IACzC,QAAQ;AAAA,IAAe,QAAQ;AAAA,IAAe,UAAU;AAAA,IAAiB,MAAM;AAAA;AAGjF,MAAIzB,IAAOhC,EAAA,QAAA,OAAAC,EAAA;;IAEsBA,EAAA,OAAAoD,YAAkB;AAAA;IAE3CC,EAAWrD,EAAA,QAAS,IAAI,KAAK;AAAA,IACnBA,EAAA,UAAAuD,eAA0B;AAAA,aAC7BH,EAASpD,EAAA,IAAA,IAASsD,EAAmBH,EAAK,CAAA,KAAK;AAAA,IAC7CnD,EAAA,SAAAwD,cAAwB;AAAA,EAEpC,GAAA,OAAON,MAAW,aAAa,IAAIhD,GAAS,EAC5C,OAAO,OAAO,EACd,KAAK,GAAG,CAAA;;eAIO+C,GAAE,IAAA,CAAAQ,GAAAC,MAAA;gDAAS3B,CAAO,EAAA,EAAA;;;;AAFhC;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"Text-B5MZ6L1O.js","sources":["../node_modules/@getmicdrop/svelte-components/dist/primitives/Image/Image.svelte","../node_modules/@getmicdrop/svelte-components/dist/components/Text.svelte"],"sourcesContent":["<!--\n Image.svelte\n\n The canonical image primitive for Micdrop. Variable-aspect, user-uploaded\n sources (event posters, performer headshots, venue photos) where we do NOT\n control the aspect ratio. This component is now the single home for the\n whole image family — `Avatar` composes it, and `BlurBackdropImage` is a\n thin `@deprecated` shim.\n\n Premium contract (Atlas brief 04 — perf 5 / completeness 5):\n\n 1. ZERO CLS — pass `width`/`height` (intrinsic px) or `aspectRatio`\n (e.g. `'2/3'`, `'16/9'`, `'1'`). The component reserves that space\n BEFORE the image loads so the page never reflows when it arrives.\n Dev-only `console.warn` if you provide neither dimensions nor a\n sizing class (we can't reserve space and CLS can creep back in).\n\n 2. BLUR-UP LOADING — the main image starts slightly blurred and SHARPENS\n (blur → 0) once the real bitmap has decoded (`img.decode()` +\n `decoding=\"async\"`). In blur-backdrop framing a blurred copy of the\n SAME already-fetched bitmap fills the letterbox gaps — no second\n network fetch, no LQIP asset to ship. Fade timing reads the motion\n tokens, so `prefers-reduced-motion` collapses it automatically.\n\n 3. BLUR-BACKDROP IS THE DEFAULT FRAMING — `fit` defaults to\n `'blur-backdrop'`: the image is `object-fit: contain` (never cropped)\n and a blurred copy of itself fills the letterbox gaps. This handles\n BOTH tall posters and wide photos with no cropping and no flat-gray\n bars. `'cover'` / `'contain'` / `'fill'` / `'scale-down'` / `'none'`\n remain as escape hatches and render the plain single-`<img>` path\n (identical DOM to the pre-premium component).\n\n 4. BRANDED FALLBACK — when `src` (and `fallback`) are missing or both\n error, we render a branded placeholder (the Micdrop mark on a tint)\n instead of a flat gray div. Override the asset with `fallback`, or\n suppress the mark with `branded={false}`.\n\n Passthrough props for raw-<img> parity (so consumers can migrate\n existing `<img>` sites to `<Image>`):\n - `draggable` — forwarded to the underlying `<img draggable>`.\n - `onload` — forwarded to the `<img>` load event.\n - `fetchpriority` — forwarded to `<img fetchpriority>` (resource hint).\n - `onError` — fires ONCE, only after the internal fallback chain is\n exhausted (i.e. the branded placeholder takes over). It does NOT fire\n on the first error while a distinct `fallback` is still going to be\n tried. The raw `onerror` handler stays owned internally to drive the\n src→fallback→placeholder degradation; `onError` composes with it\n rather than replacing it.\n Deliberately NOT exposed: `srcset`/`sizes` — zero consumer demand.\n\n Example:\n <Image src={event.posterUrl} alt={event.name} aspectRatio=\"2/3\" class=\"w-full rounded-xl\" />\n <Image src={user.avatarUrl} alt={user.name} width={80} height={80} fit=\"cover\" class=\"rounded-full\" />\n <Image src={banner.url} alt=\"\" aspectRatio=\"16/9\" class=\"w-full\" loading=\"eager\" fetchpriority=\"high\" />\n-->\n<script lang=\"ts\">\n import { DEV } from 'esm-env';\n import { cn } from '../../utils/classNames.js';\n import { createLogger } from '../../utils/logger.js';\n\n const log = createLogger('Image');\n\n // Silence the dev CLS nudge under the test runner (the suite intentionally\n // renders without dimensions to exercise other behaviour). Reads the Node\n // env var Vitest sets — bundler-agnostic.\n const IS_TEST =\n typeof process !== 'undefined' && !!process.env?.VITEST;\n\n interface Props {\n /** Image source URL. When empty/missing, falls back to `fallback`. */\n src?: string;\n /** Alt text. Empty string marks decorative images per WCAG. */\n alt?: string;\n /** Additional CSS classes (sizing, shape, rounded corners). Wins last. */\n class?: string;\n /** Fallback URL used when src is empty or errors (before the branded mark). */\n fallback?: string;\n /** Loading strategy. Default 'lazy'; pass 'eager' for above-fold. */\n loading?: 'eager' | 'lazy';\n /**\n * Framing mode. Default `'blur-backdrop'` — `object-fit: contain` over a\n * blurred copy of the same image so tall AND wide sources are never\n * cropped and never letterboxed with flat gray. The remaining values are\n * escape hatches that render a plain single `<img object-fit:…>`.\n */\n fit?: 'blur-backdrop' | 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';\n /**\n * Intrinsic width in CSS px — reserves space before load (zero CLS) and\n * sets the `<img width>` attribute. Pair with `height` for a fixed box.\n */\n width?: number;\n /**\n * Intrinsic height in CSS px — reserves space before load (zero CLS) and\n * sets the `<img height>` attribute. Pair with `width` for a fixed box.\n */\n height?: number;\n /**\n * CSS `aspect-ratio` string (e.g. `'2/3'` posters, `'16/9'` banners,\n * `'1'` square). Reserves space before load when you size by one axis\n * (`w-full`) — the zero-CLS path for fluid layouts.\n */\n aspectRatio?: string;\n /**\n * Blur-up loading: render blurred, then sharpen once the real bitmap\n * decodes. Default true. Set false to skip the effect (e.g. tiny icons\n * where the blur is imperceptible but the extra work isn't worth it).\n */\n blurUp?: boolean;\n /**\n * When the fallback chain is exhausted, show the branded Micdrop mark on\n * a tint. Default true. Set false for a plain tinted placeholder.\n */\n branded?: boolean;\n /** Forwarded to `<img draggable>`. Omitted when undefined. */\n draggable?: boolean;\n /** Forwarded to the `<img>` load event. */\n // eslint-disable-next-line no-unused-vars -- intentionally retained (prop/slot/forward-compat or Svelte-5 reactive binding eslint cannot see)\n onload?: (e: Event) => void;\n /** Forwarded to `<img fetchpriority>` (fetch-priority resource hint). */\n fetchpriority?: 'high' | 'low' | 'auto';\n /**\n * Fires once when the fallback chain is exhausted and the branded\n * placeholder takes over — NOT on the first error if a distinct\n * `fallback` is still going to be tried. Composes with the internal\n * `onerror` machine.\n */\n onError?: () => void;\n }\n\n let {\n src = '',\n alt = '',\n class: className = '',\n fallback = '',\n loading = 'lazy',\n fit = 'blur-backdrop',\n width,\n height,\n aspectRatio,\n blurUp = true,\n branded = true,\n draggable,\n onload,\n fetchpriority,\n onError,\n }: Props = $props();\n\n // Track loading attempts: which URL we're showing right now.\n // When the current URL errors, drop to 'failed' and render the placeholder.\n // Distinct from src/fallback inputs because we need to remember which\n // candidate we already tried. Reset whenever inputs change.\n let attempt: 'src' | 'fallback' | 'failed' = $state(\n // eslint-disable-next-line svelte/valid-compile -- known Svelte compiler note, accepted for this primitive\n src ? 'src' : fallback ? 'fallback' : 'failed'\n );\n\n // Guard so `onError` fires at most once per input set, even if a stale\n // <img> re-emits a duplicate final `error`. Reset when inputs change so a\n // fresh src/fallback can legitimately fail-and-notify again.\n let notifiedError = $state(false);\n\n // Blur-up: starts blurred, sharpens once the real bitmap decodes. Reset on\n // every new candidate URL so each swap re-runs the blur-up reveal.\n let decoded = $state(false);\n\n // The rendered main <img>, so we can detect an already-decoded bitmap that\n // won't fire `load` again (a cached src re-assigned, or a re-mount onto a\n // cached URL). Without this, `decoded` sticks at false and the image stays\n // blurred forever — the \"avatar goes blurry after save\" bug.\n let mainImg: HTMLImageElement | undefined = $state();\n\n $effect(() => {\n // Re-derive when inputs change. (Read both to register dependencies.)\n const _s = src;\n const _f = fallback;\n attempt = _s ? 'src' : _f ? 'fallback' : 'failed';\n notifiedError = false;\n decoded = false;\n });\n\n let activeSrc = $derived(\n attempt === 'src' ? src : attempt === 'fallback' ? fallback : ''\n );\n\n // Cached-bitmap reveal: after the shown URL settles, a browser that already\n // has the image marks the <img> `complete` WITHOUT re-firing `load` (cache\n // hit, or a mount whose load event landed before the handler attached). Reveal\n // it immediately so it never sticks blurred; a genuinely-loading image is\n // `complete: false` here and still waits for `handleLoad`. Depends on the SAME\n // inputs as the reset effect (src/fallback) — plus activeSrc — so it always\n // re-runs right after the reset (declaration order) and reads the post-update\n // <img>, even when the resolved URL is unchanged.\n $effect(() => {\n void src;\n void fallback;\n void activeSrc;\n if (mainImg?.complete && mainImg.naturalWidth > 0) decoded = true;\n });\n let showImg = $derived(attempt !== 'failed' && !!activeSrc);\n\n // blur-backdrop is the only framing mode that wraps; everything else is a\n // plain single <img object-fit:…> (identical DOM to the legacy component).\n let backdrop = $derived(fit === 'blur-backdrop');\n let objectFit = $derived(backdrop ? 'contain' : fit);\n\n // Does the consumer reserve a DEFINITE box — one that fixes the rendered\n // HEIGHT before the bitmap's intrinsic dimensions are known? Only these\n // prevent vertical CLS:\n // - aspectRatio (height derives from width via the ratio), OR\n // - both width AND height (a fully fixed box), OR\n // - a `size-*` utility (sets width AND height together), OR\n // - a definite height / aspect-ratio class (`h-*`, `aspect-*`).\n // Deliberately NOT counted: width alone, `w-full`, `max-h-*`, `h-auto`,\n // AND `min-h-*` — min-h only reserves a FLOOR, so a taller bitmap still\n // grows the box and shifts the page. None of these reserve the actual\n // vertical extent before metadata, so CLS can still creep in.\n const DEFINITE_BOX_CLASS = /(?:^|\\s)(?:aspect-|size-|h-(?!auto\\b))/;\n let hasReservedBox = $derived(\n !!aspectRatio ||\n (width != null && height != null) ||\n DEFINITE_BOX_CLASS.test(className)\n );\n\n // Dev-only nudge: without a definite box we cannot reserve VERTICAL space,\n // so CLS can creep back in. Warn, never throw.\n $effect(() => {\n // Dev-only (tree-shaken from prod via esm-env DEV) and never under test.\n if (DEV && !IS_TEST && !hasReservedBox) {\n log.warn(\n 'No aspectRatio, no width+height pair, and no definite height/aspect ' +\n 'sizing class — vertical layout space cannot be reserved and the ' +\n 'page may shift when the image loads (CLS). Pass aspectRatio=\"2/3\", ' +\n 'both width and height, or an h-*/aspect-* class. (width alone or ' +\n 'w-full does not reserve vertical space.)'\n );\n }\n });\n\n // Reserve intrinsic space on the box that owns layout. For blur-backdrop\n // that's the wrapper; for the plain path it's the <img> itself.\n let reserveStyle = $derived(\n [\n width != null ? `width:${width}px` : '',\n height != null ? `height:${height}px` : '',\n aspectRatio ? `aspect-ratio:${aspectRatio}` : '',\n ]\n .filter(Boolean)\n .join(';')\n );\n\n // mark the real bitmap as decoded → triggers the blur→sharp fade.\n async function handleLoad(e: Event) {\n const img = e.currentTarget as HTMLImageElement;\n // Capture which URL this load is FOR. If `src` swaps mid-decode (the\n // active candidate changes), this stale resolution must NOT sharpen — or\n // fire onload for — the new image. Compare against the live activeSrc\n // after the await and bail if it moved on.\n const loadedSrc = activeSrc;\n try {\n // decode() resolves once the bitmap is paint-ready; avoids revealing a\n // half-painted image. Falls through if unsupported / aborted.\n await img.decode?.();\n } catch {\n // decode can reject on detached/aborted images — reveal anyway.\n }\n // Src swapped while we awaited decode() → this is a stale load. Drop it;\n // the new candidate's own load event will drive the reveal.\n if (activeSrc !== loadedSrc) return;\n decoded = true;\n onload?.(e);\n }\n\n function handleError() {\n // If we were on src and have a distinct fallback to try, advance.\n if (attempt === 'src' && fallback && fallback !== src) {\n attempt = 'fallback';\n return;\n }\n // Either fallback already attempted, or no distinct fallback exists.\n // The chain is exhausted — the branded placeholder takes over. Notify the\n // consumer exactly here (final failure only), never on the transient\n // src→fallback hop, and at most once per input set.\n attempt = 'failed';\n if (!notifiedError) {\n notifiedError = true;\n onError?.();\n }\n }\n</script>\n\n{#if showImg && backdrop}\n <!-- blur-backdrop framing (default): contain + same-image blurred fill.\n The wrapper owns layout + reserves space; the blur layer is a second\n cheap reuse of the already-fetched bitmap (no extra network fetch). -->\n <div\n class={cn('sc-image sc-image--backdrop', className)}\n class:sc-image--backdrop-reserved={hasReservedBox}\n style={reserveStyle || undefined}\n >\n <img\n src={activeSrc}\n alt=\"\"\n class=\"sc-image__blur\"\n aria-hidden=\"true\"\n decoding=\"async\"\n {loading}\n {draggable}\n {fetchpriority}\n />\n <img\n bind:this={mainImg}\n src={activeSrc}\n {alt}\n class=\"sc-image__main\"\n class:sc-image__main--reserved={hasReservedBox}\n class:sc-image__main--loading={blurUp && !decoded}\n style:object-fit={objectFit}\n {width}\n {height}\n {loading}\n {draggable}\n {fetchpriority}\n decoding=\"async\"\n onerror={handleError}\n onload={handleLoad}\n />\n </div>\n{:else if showImg}\n <!-- escape-hatch framing (cover/contain/fill/none/scale-down): plain single\n <img>, identical DOM to the legacy component, plus blur-up + dims. -->\n <img\n bind:this={mainImg}\n src={activeSrc}\n {alt}\n {loading}\n {draggable}\n {fetchpriority}\n {width}\n {height}\n class={cn(\n 'sc-image image',\n blurUp && !decoded && 'sc-image--loading',\n className\n )}\n style:object-fit={objectFit}\n style:aspect-ratio={aspectRatio || undefined}\n decoding=\"async\"\n onerror={handleError}\n onload={handleLoad}\n />\n{:else}\n <!-- No usable src — branded placeholder (Micdrop mark on a tint), or a plain\n tinted box when branded={false}. Empty alt marks decorative images (per\n WCAG); hide from assistive tech via aria-hidden + no role. -->\n {#if alt}\n <div\n class={cn(\n 'sc-image image sc-image-placeholder image-placeholder',\n branded && 'sc-image-placeholder--branded',\n className\n )}\n style={reserveStyle || undefined}\n role=\"img\"\n aria-label={alt}\n ></div>\n {:else}\n <div\n class={cn(\n 'sc-image image sc-image-placeholder image-placeholder',\n branded && 'sc-image-placeholder--branded',\n className\n )}\n style={reserveStyle || undefined}\n aria-hidden=\"true\"\n ></div>\n {/if}\n{/if}\n\n<style>\n /* `.image` is a legacy back-compat alias of `.sc-image` on the plain\n escape-hatch <img> + placeholder (consumer CSS / tests may target it). */\n .sc-image,\n .image {\n display: block;\n max-width: 100%;\n }\n\n /* --- blur-backdrop framing --- */\n .sc-image--backdrop {\n position: relative;\n overflow: hidden;\n container-type: inline-size;\n background: hsl(var(--bg-quaternary));\n }\n\n .sc-image__blur {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n max-width: none;\n object-fit: cover;\n transform: scale(1.15);\n filter: blur(16px) saturate(1.2);\n /* purely decorative fill; the absolutely-positioned blur paints first and\n the in-flow main layer (position:relative) stacks above it by source\n order — no explicit z-index needed. */\n }\n\n /* Small containers (<=80px): blur() applies before scale() in the render\n pipeline, so the blur halo gets scaled too. Need enough scale that the\n opaque image extends past the container edge even after the halo grows. */\n @container (max-width: 5rem) {\n .sc-image__blur {\n transform: scale(2);\n filter: blur(6px) saturate(1.2);\n }\n }\n\n .sc-image__main {\n position: relative;\n display: block;\n width: 100%;\n /* No reserved box (legacy / no-fit default): the in-flow main image\n DRIVES the wrapper height and sizes ITSELF to the consumer's sizing\n classes — which land on the wrapper. `max-height: inherit` /\n `max-width: inherit` pull the wrapper's `max-h-*` / `max-w-*` onto the\n image so object-fit:contain shrinks it to fit (image height == wrapper\n height). The image therefore NEVER exceeds the wrapper, so the wrapper's\n overflow:hidden (which clips the decorative blur fill) cannot clip the\n MAIN image — it renders exactly as the pre-premium single <img> did,\n constrained by max-h-* / h-auto, no reflow. Only force the image to fill\n a fixed box when the consumer reserved a DEFINITE one (explicit height /\n aspectRatio / size-* / h-* / aspect-*) — there the wrapper owns layout\n and the image fills it (true zero-CLS letterbox). */\n height: auto;\n max-width: inherit;\n max-height: inherit;\n object-fit: contain;\n }\n\n .sc-image--backdrop-reserved .sc-image__main--reserved {\n height: 100%;\n max-width: none;\n max-height: none;\n }\n\n /* --- blur-up reveal (CSS-only; reduced-motion gated via motion tokens) ---\n The main image / plain image starts slightly blurred + scaled and\n sharpens on decode. Durations read from --motion-* so\n prefers-reduced-motion collapses them. */\n .sc-image--loading,\n .sc-image__main {\n transition:\n filter var(--motion-normal, 300ms) var(--ease-out, ease),\n transform var(--motion-normal, 300ms) var(--ease-out, ease);\n }\n\n .sc-image--loading,\n .sc-image__main--loading {\n filter: blur(12px);\n transform: scale(1.02);\n }\n\n /* --- placeholder --- */\n .sc-image-placeholder {\n background: hsl(var(--bg-quaternary));\n }\n\n .sc-image-placeholder--branded {\n background-color: hsl(var(--bg-tertiary));\n background-image: url('../../assets/images/micdrop-logo.png');\n background-repeat: no-repeat;\n background-position: center;\n /* keep the mark a small, calm watermark — never edge-to-edge */\n background-size: min(48%, 96px) auto;\n opacity: 0.92;\n }\n</style>\n","<script lang=\"ts\">\n import type { Snippet } from 'svelte';\n import type { TypographyRole, TypographyTone } from '../tokens/typography.js';\n\n interface Props {\n /** Text role — the closed type system. Sets size+weight+line-height+tracking. Preferred. */\n variant?: TypographyRole;\n /** Tone (color) — orthogonal to variant. */\n tone?: TypographyTone;\n as?: 'span' | 'p' | 'label' | 'div';\n truncate?: boolean;\n class?: string;\n /** @deprecated use `variant` */ size?: 'xs' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | '2xl';\n /** @deprecated set via `variant` */ leading?: 'none' | 'tight' | 'snug' | 'normal' | 'relaxed' | 'loose';\n /** @deprecated use `tone` */ color?: 'default' | 'muted' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'none';\n /** @deprecated set via `variant` */ weight?: 'normal' | 'medium' | 'semibold' | 'bold';\n children: Snippet;\n }\n\n let {\n variant,\n tone,\n as = 'span',\n truncate = false,\n class: className = '',\n size,\n leading,\n color = 'default',\n weight,\n children,\n }: Props = $props();\n\n // ── New role API ──\n const toneClass: Record<string, string> = {\n primary: 'tone-primary', secondary: 'tone-secondary', muted: 'tone-muted',\n brand: 'tone-brand', success: 'tone-success', warning: 'tone-warning', danger: 'tone-danger',\n };\n\n // ── Deprecated prop maps (back-compat until consumers migrate to `variant`) ──\n const sizeClasses: Record<string, string> = {\n xs: 'type-caption', sm: 'type-body', base: 'type-bodyLarge', md: 'type-bodyLarge',\n lg: 'text-lg', xl: 'text-xl', '2xl': 'text-2xl',\n };\n const legacyColorClasses: Record<string, string> = {\n default: 'tone-primary', muted: 'tone-muted', primary: 'text-brand-primary',\n secondary: 'tone-secondary', success: 'text-accent-success', warning: 'text-accent-warning',\n error: 'text-accent-danger', none: '',\n };\n const leadingClasses: Record<string, string> = {\n none: 'leading-none', tight: 'leading-tight', snug: 'leading-snug',\n normal: 'leading-normal', relaxed: 'leading-relaxed', loose: 'leading-loose',\n };\n const weightClasses: Record<string, string> = {\n normal: 'font-normal', medium: 'font-medium', semibold: 'font-semibold', bold: 'font-bold',\n };\n\n let classes = $derived(\n (variant\n ? [`type-${variant}`, tone ? toneClass[tone] : '']\n : [\n sizeClasses[size ?? 'md'] || 'type-bodyLarge',\n leading ? leadingClasses[leading] : '',\n tone ? toneClass[tone] : legacyColorClasses[color] || '',\n weight ? weightClasses[weight] : 'font-normal',\n ])\n .concat(truncate ? 'truncate' : '', className)\n .filter(Boolean)\n .join(' '),\n );\n</script>\n\n<svelte:element this={as} class={classes}>{@render children()}</svelte:element>\n"],"names":["createLogger","src","$","$$props","alt","className","fallback","loading","fit","blurUp","branded","attempt","notifiedError","decoded","mainImg","_s","_f","activeSrc","showImg","backdrop","objectFit","DEFINITE_BOX_CLASS","hasReservedBox","reserveStyle","handleLoad","e","img","loadedSrc","handleError","div","root","img_1","img_2","$$value","classes","classes_1","styles","cn","img_3","root_1","$0","styles_1","div_1","root_2","div_2","root_3","$$render","consequent_2","alternate","consequent","consequent_1","alternate_1","as","truncate","color","toneClass","sizeClasses","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