{{-- ══════════════════════════════════════════════════════════════════════ VS INTRO SCREEN — arena card overlaid on the first 5 s of the match. Rendered as a FIXED 1920×1080 (landscape) or 1080×1920 (portrait) canvas that is transform-scaled to fit the parent player box. Every child uses ABSOLUTE PIXELS on that canvas so the layout is identical at every zoom level and never scales off the viewport width. ══════════════════════════════════════════════════════════════════════ --}} @php $vsRed = $hd['red'] ?? null; $vsBlue = $hd['blue'] ?? null; $vsShow = $hd && (($vsRed['name'] ?? null) || ($vsBlue['name'] ?? null)); $vsFlagBg = fn(?string $c) => (($c = strtolower(trim((string) $c))) !== '' ? $c : 'xx'); $vsCountryName = fn (?string $code) => \App\Data\Countries::name($code); $vsImg = fn(?string $path) => $path ? route('media.thumbnail', $path) : null; // Every placeholder from the artifact renders regardless of whether the // data exists — CSS `.vs-nullable:empty { display: none }` hides any // element that came back empty, so the layout adapts but the DOM shape // matches the original design file 1:1. $vsStr = fn ($x) => (is_string($x) && trim($x) !== '') ? trim($x) : ''; $vsEvent = $vsStr($hd['championship'] ?? ''); $vsStage = $vsStr($hd['division'] ?? '') ?: $vsStr($hd['format'] ?? ''); $vsWeight = $vsStr($hd['weight_category'] ?? ''); $vsMatchNo = $vsStr($hd['match_number'] ?? ''); $vsCourt = $vsStr($hd['court'] ?? ''); $vsRef = $vsStr($hd['referee']['name'] ?? ''); $vsRefFlag = $vsStr($hd['referee']['flag'] ?? ''); $vsVenue = $vsStr($hd['venue']['name'] ?? ''); // Extra per-fighter chips from the artifact (record / rank / stats). // headerData() doesn't expose them today; fall back to the raw // participants JSON so the placeholders wire up the moment the fields // start being written by the uploader form. $vsParts = $video->sportsMatch?->participants ?? []; $vsRedRecord = $vsStr($vsParts['p2_record'] ?? ''); $vsRedRank = $vsStr($vsParts['p2_rank'] ?? ''); $vsRedStats = $vsStr($vsParts['p2_stats'] ?? ''); $vsBlueRecord = $vsStr($vsParts['p1_record'] ?? ''); $vsBlueRank = $vsStr($vsParts['p1_rank'] ?? ''); $vsBlueStats = $vsStr($vsParts['p1_stats'] ?? ''); // Fighter identity strings. $vsRedName = $vsStr($vsRed['name'] ?? ''); $vsBlueName = $vsStr($vsBlue['name'] ?? ''); $vsRedClub = $vsStr($vsRed['club'] ?? ''); $vsBlueClub = $vsStr($vsBlue['club'] ?? ''); $vsRedFlag = $vsStr($vsRed['flag'] ?? ''); $vsBlueFlag = $vsStr($vsBlue['flag'] ?? ''); $vsRedLogo = $vsImg($vsRed['club_logo'] ?? null); $vsBlueLogo = $vsImg($vsBlue['club_logo'] ?? null); @endphp @if ($vsShow)