@redsift/products 12.5.7-muiv8-alpha.1 → 12.5.7

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.
@@ -404,47 +404,6 @@ var EXTRACTOR_STRINGS = {
404
404
  "card.bimi.vmc.issuer_md": "**Issuer: {issuer}**",
405
405
  "card.bimi.vmc.trademarkAuthority_md": "**Trademark Authority: {trademarkAuthority}**",
406
406
  "card.bimi.vmc.valid-for-domain_md": "**Valid for domains:** `{domains}`",
407
- // BIMI VMC/CMC published-certificate metadata (WEB-1137 / DS-93)
408
- // Validity
409
- "card.bimi.vmc.cert-section-validity": "Validity",
410
- "card.bimi.vmc.cert-valid-from_md": "**Start:** {date}",
411
- "card.bimi.vmc.cert-expiry_md": "**Expiry:** {date}",
412
- // Humanized validity/expiry durations (WEB-1138) — render layer fills the {date}/{count} slots
413
- "card.bimi.vmc.cert-active-for_md_one": "Active for {count} day \u2014 Since {date}",
414
- "card.bimi.vmc.cert-active-for_md_other": "Active for {count} days \u2014 Since {date}",
415
- "card.bimi.vmc.cert-expires-in_md_one": "Expires in {count} day \u2014 On {date}",
416
- "card.bimi.vmc.cert-expires-in_md_other": "Expires in {count} days \u2014 On {date}",
417
- "card.bimi.vmc.cert-expired-ago_md_one": "Expired {count} day ago \u2014 On {date}",
418
- "card.bimi.vmc.cert-expired-ago_md_other": "Expired {count} days ago \u2014 On {date}",
419
- "card.bimi.vmc.cert-expires-today_md": "Expires today \u2014 On {date}",
420
- "card.bimi.vmc.cert-not-yet-active_md": "Not yet active \u2014 From {date}",
421
- // Certificate
422
- "card.bimi.vmc.cert-section-certificate": "Certificate",
423
- "card.bimi.vmc.cert-issuer-common-name_md": "**Issuer:** {issuerCommonName}",
424
- "card.bimi.vmc.cert-issuer-organization_md": "**Issuer organization:** {issuerOrganization}",
425
- "card.bimi.vmc.cert-issuer-country_md": "**Issuer country:** {issuerCountry}",
426
- "card.bimi.vmc.cert-type_md": "**Certificate type:** {assertionMarkType}",
427
- "card.bimi.vmc.cert-certified-domains_md": "**Certified domains:** `{certifiedDomains}`",
428
- // Subject identity
429
- "card.bimi.vmc.cert-section-subject-identity": "Subject identity",
430
- "card.bimi.vmc.cert-serial-number_md": "**Serial number:** {serialNumber}",
431
- "card.bimi.vmc.cert-organization_md": "**Organization:** {organization}",
432
- "card.bimi.vmc.cert-common-name_md": "**Common name:** {commonName}",
433
- "card.bimi.vmc.cert-business-category_md": "**Business category:** {businessCategory}",
434
- "card.bimi.vmc.cert-organization-identifier_md": "**Organization identifier:** {organizationIdentifier}",
435
- "card.bimi.vmc.cert-legal-entity-identifier_md": "**Legal entity identifier:** {legalEntityIdentifier}",
436
- "card.bimi.vmc.cert-jurisdiction_md": "**Jurisdiction:** {jurisdiction}",
437
- "card.bimi.vmc.cert-address_md": "**Address:** {address}",
438
- // Mark evidence
439
- "card.bimi.vmc.cert-section-mark-evidence": "Mark evidence",
440
- "card.bimi.vmc.cert-trademark-registration_md": "**Trademark registration:** {trademarkRegistration}",
441
- "card.bimi.vmc.cert-trademark-office_md": "**Trademark office:** {trademarkOfficeName}",
442
- "card.bimi.vmc.cert-mark-type_md": "**Mark type:** {markType}",
443
- "card.bimi.vmc.cert-trademark-country_md": "**Trademark country or region:** {trademarkCountryOrRegion}",
444
- // Verification issues
445
- "card.bimi.vmc.cert-section-verification-issues": "Verification issues",
446
- "card.bimi.vmc.cert-no-issues-reported_md": "None reported",
447
- "card.bimi.vmc.cert-ambiguous-leaf_md": "Ambiguous leaf certificate selection",
448
407
  // BIMI section titles
449
408
  "section-titles.bimi-domain": "DMARC Domains",
450
409
  "section-titles.bimi-policy": "Your BIMI Policy",
@@ -884,47 +843,6 @@ var EXTRACTOR_STRINGS = {
884
843
  "card.bimi.vmc.issuer_md": "**Issuer : {issuer}**",
885
844
  "card.bimi.vmc.trademarkAuthority_md": "**Autorit\xE9 de la marque : {trademarkAuthority}**",
886
845
  "card.bimi.vmc.valid-for-domain_md": "**Valide pour les domaines :** `{domains}`",
887
- // BIMI VMC/CMC published-certificate metadata (WEB-1137 / DS-93)
888
- // Validity
889
- "card.bimi.vmc.cert-section-validity": "Validit\xE9",
890
- "card.bimi.vmc.cert-valid-from_md": "**D\xE9but :** {date}",
891
- "card.bimi.vmc.cert-expiry_md": "**Expiration :** {date}",
892
- // Humanized validity/expiry durations (WEB-1138) — render layer fills the {date}/{count} slots
893
- "card.bimi.vmc.cert-active-for_md_one": "Actif depuis {count} jour \u2014 Depuis le {date}",
894
- "card.bimi.vmc.cert-active-for_md_other": "Actif depuis {count} jours \u2014 Depuis le {date}",
895
- "card.bimi.vmc.cert-expires-in_md_one": "Expire dans {count} jour \u2014 Le {date}",
896
- "card.bimi.vmc.cert-expires-in_md_other": "Expire dans {count} jours \u2014 Le {date}",
897
- "card.bimi.vmc.cert-expired-ago_md_one": "Expir\xE9 il y a {count} jour \u2014 Le {date}",
898
- "card.bimi.vmc.cert-expired-ago_md_other": "Expir\xE9 il y a {count} jours \u2014 Le {date}",
899
- "card.bimi.vmc.cert-expires-today_md": "Expire aujourd'hui \u2014 Le {date}",
900
- "card.bimi.vmc.cert-not-yet-active_md": "Pas encore actif \u2014 \xC0 partir du {date}",
901
- // Certificate
902
- "card.bimi.vmc.cert-section-certificate": "Certificat",
903
- "card.bimi.vmc.cert-issuer-common-name_md": "**\xC9metteur :** {issuerCommonName}",
904
- "card.bimi.vmc.cert-issuer-organization_md": "**Organisation de l'\xE9metteur :** {issuerOrganization}",
905
- "card.bimi.vmc.cert-issuer-country_md": "**Pays de l'\xE9metteur :** {issuerCountry}",
906
- "card.bimi.vmc.cert-type_md": "**Type de certificat :** {assertionMarkType}",
907
- "card.bimi.vmc.cert-certified-domains_md": "**Domaines certifi\xE9s :** `{certifiedDomains}`",
908
- // Subject identity
909
- "card.bimi.vmc.cert-section-subject-identity": "Identit\xE9 du sujet",
910
- "card.bimi.vmc.cert-serial-number_md": "**Num\xE9ro de s\xE9rie :** {serialNumber}",
911
- "card.bimi.vmc.cert-organization_md": "**Organisation :** {organization}",
912
- "card.bimi.vmc.cert-common-name_md": "**Nom commun :** {commonName}",
913
- "card.bimi.vmc.cert-business-category_md": "**Cat\xE9gorie d'activit\xE9 :** {businessCategory}",
914
- "card.bimi.vmc.cert-organization-identifier_md": "**Identifiant de l'organisation :** {organizationIdentifier}",
915
- "card.bimi.vmc.cert-legal-entity-identifier_md": "**Identifiant d'entit\xE9 juridique :** {legalEntityIdentifier}",
916
- "card.bimi.vmc.cert-jurisdiction_md": "**Juridiction :** {jurisdiction}",
917
- "card.bimi.vmc.cert-address_md": "**Adresse :** {address}",
918
- // Mark evidence
919
- "card.bimi.vmc.cert-section-mark-evidence": "Preuve de la marque",
920
- "card.bimi.vmc.cert-trademark-registration_md": "**Enregistrement de la marque :** {trademarkRegistration}",
921
- "card.bimi.vmc.cert-trademark-office_md": "**Office des marques :** {trademarkOfficeName}",
922
- "card.bimi.vmc.cert-mark-type_md": "**Type de marque :** {markType}",
923
- "card.bimi.vmc.cert-trademark-country_md": "**Pays ou r\xE9gion de la marque :** {trademarkCountryOrRegion}",
924
- // Verification issues
925
- "card.bimi.vmc.cert-section-verification-issues": "Probl\xE8mes de v\xE9rification",
926
- "card.bimi.vmc.cert-no-issues-reported_md": "Aucun signal\xE9",
927
- "card.bimi.vmc.cert-ambiguous-leaf_md": "S\xE9lection ambigu\xEB du certificat feuille",
928
846
  // BIMI section titles
929
847
  "section-titles.bimi-domain": "Domaines DMARC",
930
848
  "section-titles.bimi-policy": "Votre politique BIMI",
@@ -7275,16 +7193,7 @@ const BIMI_KEY_TO_TESTID = {
7275
7193
  'card.bimi.vmc-not-vmc-title_md': 'vmc-validity-invalid',
7276
7194
  'card.bimi.pemErrors.cert-not-found_md': 'vmc-cert-not-found',
7277
7195
  'card.bimi.vmc.expired-date_md': 'vmc-expiration-expired',
7278
- 'card.bimi.vmc.expiry-date_md': 'vmc-expiration-valid',
7279
- // Legacy VMC rows superseded by the DS-93 published-certificate sections.
7280
- // Stamped with stable testids so SignalCardBimi can suppress them by testid
7281
- // rather than by fragile label-text matching (see SignalCardBimi vmcSection).
7282
- 'card.bimi.vmc.issuer_md': 'vmc-issuer',
7283
- 'card.bimi.vmc.valid-for-domain_md': 'vmc-valid-for-domains',
7284
- 'card.bimi.vmc.trademarkAuthority_md': 'vmc-trademark-authority',
7285
- // Legacy "Assertion Mark:" row — duplicated by Mark evidence › "Mark type:"
7286
- // (both render the trademark mark class, e.g. "Registered Mark").
7287
- 'card.bimi.vmc.assertionMark_md': 'vmc-assertion-mark'
7196
+ 'card.bimi.vmc.expiry-date_md': 'vmc-expiration-valid'
7288
7197
  };
7289
7198
 
7290
7199
  // =============================================================================
@@ -8048,311 +7957,6 @@ const uncompressLogo = svgUrl => {
8048
7957
 
8049
7958
  var SVGLogo$1 = SVGLogo;
8050
7959
 
8051
- /**
8052
- * A rendered published-certificate section: a titled group of Checklist items.
8053
- */
8054
-
8055
- /**
8056
- * Reference URL for the BIMI certificate-type explainer, used by the VMC/CMC
8057
- * type badge. Follows the existing external-link convention in the card.
8058
- */
8059
- const CERT_TYPE_REFERENCE_URL = 'https://bimigroup.org/verified-mark-certificates-vmc-and-bimi/';
8060
- const DAY_MS = 24 * 60 * 60 * 1000;
8061
-
8062
- /**
8063
- * Parse a YYYY-MM-DD date string to a UTC Date. Returns null when the input is
8064
- * missing or unparseable so callers can degrade gracefully.
8065
- */
8066
- const parseIsoDate = value => {
8067
- if (!value) return null;
8068
- const parsed = new Date(`${value}T00:00:00Z`);
8069
- return Number.isNaN(parsed.getTime()) ? null : parsed;
8070
- };
8071
-
8072
- /** Whole-day difference between two dates (b - a), truncated toward zero. */
8073
- const diffInDays = (a, b) => Math.trunc((b.getTime() - a.getTime()) / DAY_MS);
8074
-
8075
- /**
8076
- * Humanize the certificate validity start: "Active for {n} days — Since {date}".
8077
- * The humanized duration is a render-layer responsibility (the API returns only
8078
- * the raw validFrom date). All phrasing is translatable via `t`; `count` drives
8079
- * i18next pluralization. Falls back to undefined when the date can't be parsed.
8080
- */
8081
- const humanizeValidFrom = (validFrom, t, now) => {
8082
- const from = parseIsoDate(validFrom);
8083
- if (!from) return undefined;
8084
- const days = diffInDays(from, now);
8085
- if (days < 0) {
8086
- // validFrom is in the future — not yet active; show the raw date only.
8087
- return t('card.bimi.vmc.cert-not-yet-active_md', {
8088
- date: validFrom
8089
- });
8090
- }
8091
- // `count` drives both plural selection and the {count} placeholder in the key.
8092
- return t('card.bimi.vmc.cert-active-for_md', {
8093
- count: days,
8094
- date: validFrom
8095
- });
8096
- };
8097
-
8098
- /**
8099
- * Humanize the certificate expiry: "Expires in {n} days — On {date}", "Expires
8100
- * today — On {date}" on the expiry day, or "Expired {n} days ago — On {date}"
8101
- * once past. A certificate whose expiry is today is treated as no longer valid
8102
- * (the boundary day is not counted as remaining validity). All phrasing is
8103
- * translatable via `t`. Falls back to undefined when the date can't be parsed.
8104
- */
8105
- const humanizeExpiry = (expiry, t, now) => {
8106
- const to = parseIsoDate(expiry);
8107
- if (!to) return undefined;
8108
- const days = diffInDays(now, to);
8109
- if (days === 0) {
8110
- // Expires today — the boundary day is not remaining validity.
8111
- return t('card.bimi.vmc.cert-expires-today_md', {
8112
- date: expiry
8113
- });
8114
- }
8115
- if (days < 0) {
8116
- const ago = Math.abs(days);
8117
- return t('card.bimi.vmc.cert-expired-ago_md', {
8118
- count: ago,
8119
- date: expiry
8120
- });
8121
- }
8122
- return t('card.bimi.vmc.cert-expires-in_md', {
8123
- count: days,
8124
- date: expiry
8125
- });
8126
- };
8127
-
8128
- /** Join defined, non-empty parts with a separator; undefined when nothing remains. */
8129
- const joinParts = function (parts) {
8130
- let sep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ', ';
8131
- const filtered = parts.map(p => p === null || p === void 0 ? void 0 : p.trim()).filter(p => !!p);
8132
- return filtered.length ? filtered.join(sep) : undefined;
8133
- };
8134
-
8135
- /**
8136
- * Build a single info ChecklistItem when its value is present. Returns null so
8137
- * callers can filter absent fields out and only render populated rows.
8138
- */
8139
- const infoRow = (t, key, params, testId, value) => {
8140
- if (!value) return null;
8141
- // 'no-icon' renders the label/value with no leading icon — these dense
8142
- // metadata rows read as a plain key/value list, so an info dot per row is
8143
- // just noise.
8144
- return {
8145
- type: 'no-icon',
8146
- text: t(key, params),
8147
- 'data-testid': testId
8148
- };
8149
- };
8150
-
8151
- /** External-link anchor rendered inline inside a Checklist item. */
8152
- const ExternalLink = _ref => {
8153
- let {
8154
- href,
8155
- children,
8156
- 'data-testid': testId
8157
- } = _ref;
8158
- return /*#__PURE__*/React__default.createElement("a", {
8159
- href: href,
8160
- target: "_blank",
8161
- rel: "noopener noreferrer",
8162
- "data-testid": testId
8163
- }, children);
8164
- };
8165
-
8166
- /**
8167
- * Build the five published-certificate sections (Validity, Certificate, Subject
8168
- * identity, Mark evidence, Verification issues) from IPForensics
8169
- * VmcPublishedCertificate + VmcPemEvidence data.
8170
- *
8171
- * `assertionMarkType` ('VMC' | 'CMC') is the certificate type and lives on the
8172
- * parent `vmc` object, NOT inside the published certificate — the certificate's
8173
- * own `markType` field is the trademark mark *class* ("Registered Mark" etc.),
8174
- * which is rendered separately under Mark evidence. The "Certificate type:" row
8175
- * must use `assertionMarkType`.
8176
- *
8177
- * All labels come from @redsift/signal-logic BIMI_KEYS via `t` so they remain
8178
- * translatable. `now` is injected for deterministic humanized durations in
8179
- * tests and stories.
8180
- */
8181
- const buildPublishedCertificateSections = (cert, pem, t, now, assertionMarkType) => {
8182
- var _cert$certifiedDomain, _cert$certifiedDomain2, _pem$errors;
8183
- const sections = [];
8184
-
8185
- // --- Validity ---
8186
- const validFromText = humanizeValidFrom(cert.validFrom, t, now);
8187
- const expiryText = humanizeExpiry(cert.expiry, t, now);
8188
- const validityItems = [infoRow(t, 'card.bimi.vmc.cert-valid-from_md', {
8189
- date: validFromText
8190
- }, 'bimi-cert-valid-from', validFromText), infoRow(t, 'card.bimi.vmc.cert-expiry_md', {
8191
- date: expiryText
8192
- }, 'bimi-cert-expiry', expiryText)].filter(i => i !== null);
8193
- if (validityItems.length) {
8194
- sections.push({
8195
- id: 'bimi-cert-validity',
8196
- title: t('card.bimi.vmc.cert-section-validity'),
8197
- items: validityItems,
8198
- testId: 'bimi-cert-validity-section'
8199
- });
8200
- }
8201
-
8202
- // --- Certificate ---
8203
- const certItems = [];
8204
- const issuerCommon = infoRow(t, 'card.bimi.vmc.cert-issuer-common-name_md', {
8205
- issuerCommonName: cert.issuerCommonName
8206
- }, 'bimi-cert-issuer-common-name', cert.issuerCommonName);
8207
- if (issuerCommon) certItems.push(issuerCommon);
8208
- const issuerOrg = infoRow(t, 'card.bimi.vmc.cert-issuer-organization_md', {
8209
- issuerOrganization: cert.issuerOrganization
8210
- }, 'bimi-cert-issuer-organization', cert.issuerOrganization);
8211
- if (issuerOrg) certItems.push(issuerOrg);
8212
- const issuerCountry = infoRow(t, 'card.bimi.vmc.cert-issuer-country_md', {
8213
- issuerCountry: cert.issuerCountry
8214
- }, 'bimi-cert-issuer-country', cert.issuerCountry);
8215
- if (issuerCountry) certItems.push(issuerCountry);
8216
-
8217
- // Certificate type row: a bold "Certificate type:" label (which itself
8218
- // contains spaces, e.g. "Certificate type:" / FR "Type de certificat :")
8219
- // with the VMC/CMC value as an external-link badge. We interpolate a NUL
8220
- // sentinel for the value so the label markdown (**…**) parses correctly, then
8221
- // split the template at that exact sentinel and splice the linked badge in
8222
- // where the value goes — only the value links, not the label. Splitting on
8223
- // the sentinel (never a bare space) is what keeps multi-word labels intact.
8224
- //
8225
- // Value is `assertionMarkType` ('VMC'/'CMC') from the parent vmc object — NOT
8226
- // the certificate's own `markType`, which is the trademark mark class and is
8227
- // rendered under Mark evidence instead.
8228
- if (assertionMarkType) {
8229
- const VALUE_TOKEN = '';
8230
- const template = t('card.bimi.vmc.cert-type_md', {
8231
- assertionMarkType: VALUE_TOKEN
8232
- });
8233
- const tokenIndex = template.indexOf(VALUE_TOKEN);
8234
- // If the placeholder is somehow absent, keep the whole label before the
8235
- // badge rather than dropping any text.
8236
- const before = tokenIndex === -1 ? template : template.slice(0, tokenIndex);
8237
- const after = tokenIndex === -1 ? '' : template.slice(tokenIndex + VALUE_TOKEN.length);
8238
- certItems.push({
8239
- type: 'no-icon',
8240
- 'data-testid': 'bimi-cert-type',
8241
- text: /*#__PURE__*/React__default.createElement("span", null, parseGlossaryMarkdown(before), /*#__PURE__*/React__default.createElement(ExternalLink, {
8242
- href: CERT_TYPE_REFERENCE_URL,
8243
- "data-testid": "bimi-cert-type-link"
8244
- }, assertionMarkType), after && parseGlossaryMarkdown(after))
8245
- });
8246
- }
8247
-
8248
- // Certified domains as chips with external links, comma-separated.
8249
- const certifiedDomains = (_cert$certifiedDomain = (_cert$certifiedDomain2 = cert.certifiedDomains) === null || _cert$certifiedDomain2 === void 0 ? void 0 : _cert$certifiedDomain2.filter(d => !!d)) !== null && _cert$certifiedDomain !== void 0 ? _cert$certifiedDomain : [];
8250
- if (certifiedDomains.length) {
8251
- certItems.push({
8252
- type: 'no-icon',
8253
- 'data-testid': 'bimi-cert-certified-domains',
8254
- text: /*#__PURE__*/React__default.createElement("span", {
8255
- "data-testid": "bimi-cert-certified-domains-chips"
8256
- }, certifiedDomains.map((domain, idx) => /*#__PURE__*/React__default.createElement(React__default.Fragment, {
8257
- key: domain
8258
- }, idx > 0 && ', ', domain.includes('*') ? domain : /*#__PURE__*/React__default.createElement(ExternalLink, {
8259
- href: `https://${domain}`
8260
- }, domain))))
8261
- });
8262
- }
8263
- if (certItems.length) {
8264
- sections.push({
8265
- id: 'bimi-cert-certificate',
8266
- title: t('card.bimi.vmc.cert-section-certificate'),
8267
- items: certItems,
8268
- testId: 'bimi-cert-certificate-section'
8269
- });
8270
- }
8271
-
8272
- // --- Subject identity ---
8273
- const jurisdiction = joinParts([cert.jurisdictionLocality, cert.jurisdictionStateOrProvince, cert.jurisdictionCountry]);
8274
- const address = joinParts([cert.streetAddress, cert.locality, cert.stateOrProvince, cert.country]);
8275
- const organizationIdentifier = cert.organizationIdentifier ? cert.organizationIdentifierScheme ? `${cert.organizationIdentifier} (${cert.organizationIdentifierScheme})` : cert.organizationIdentifier : undefined;
8276
- const subjectItems = [infoRow(t, 'card.bimi.vmc.cert-serial-number_md', {
8277
- serialNumber: cert.serialNumber
8278
- }, 'bimi-cert-serial-number', cert.serialNumber), infoRow(t, 'card.bimi.vmc.cert-organization_md', {
8279
- organization: cert.organization
8280
- }, 'bimi-cert-organization', cert.organization), infoRow(t, 'card.bimi.vmc.cert-common-name_md', {
8281
- commonName: cert.commonName
8282
- }, 'bimi-cert-common-name', cert.commonName), infoRow(t, 'card.bimi.vmc.cert-business-category_md', {
8283
- businessCategory: cert.businessCategory
8284
- }, 'bimi-cert-business-category', cert.businessCategory), infoRow(t, 'card.bimi.vmc.cert-organization-identifier_md', {
8285
- organizationIdentifier
8286
- }, 'bimi-cert-organization-identifier', organizationIdentifier), infoRow(t, 'card.bimi.vmc.cert-legal-entity-identifier_md', {
8287
- legalEntityIdentifier: cert.legalEntityIdentifier
8288
- }, 'bimi-cert-legal-entity-identifier', cert.legalEntityIdentifier), infoRow(t, 'card.bimi.vmc.cert-jurisdiction_md', {
8289
- jurisdiction
8290
- }, 'bimi-cert-jurisdiction', jurisdiction), infoRow(t, 'card.bimi.vmc.cert-address_md', {
8291
- address
8292
- }, 'bimi-cert-address', address)].filter(i => i !== null);
8293
- if (subjectItems.length) {
8294
- sections.push({
8295
- id: 'bimi-cert-subject-identity',
8296
- title: t('card.bimi.vmc.cert-section-subject-identity'),
8297
- items: subjectItems,
8298
- testId: 'bimi-cert-subject-identity-section'
8299
- });
8300
- }
8301
-
8302
- // --- Mark evidence ---
8303
- const markItems = [infoRow(t, 'card.bimi.vmc.cert-trademark-registration_md', {
8304
- trademarkRegistration: cert.trademarkRegistration
8305
- }, 'bimi-cert-trademark-registration', cert.trademarkRegistration), infoRow(t, 'card.bimi.vmc.cert-trademark-office_md', {
8306
- trademarkOfficeName: cert.trademarkOfficeName
8307
- }, 'bimi-cert-trademark-office', cert.trademarkOfficeName), infoRow(t, 'card.bimi.vmc.cert-mark-type_md', {
8308
- markType: cert.markType
8309
- }, 'bimi-cert-mark-type', cert.markType), infoRow(t, 'card.bimi.vmc.cert-trademark-country_md', {
8310
- trademarkCountryOrRegion: cert.trademarkCountryOrRegion
8311
- }, 'bimi-cert-trademark-country', cert.trademarkCountryOrRegion)].filter(i => i !== null);
8312
- if (markItems.length) {
8313
- sections.push({
8314
- id: 'bimi-cert-mark-evidence',
8315
- title: t('card.bimi.vmc.cert-section-mark-evidence'),
8316
- items: markItems,
8317
- testId: 'bimi-cert-mark-evidence-section'
8318
- });
8319
- }
8320
-
8321
- // --- Verification issues ---
8322
- // Sourced from PEM evidence errors plus an ambiguous leaf-selection signal.
8323
- const errorMessages = ((_pem$errors = pem === null || pem === void 0 ? void 0 : pem.errors) !== null && _pem$errors !== void 0 ? _pem$errors : []).map(e => typeof e === 'string' ? e : e === null || e === void 0 ? void 0 : e.message).filter(m => !!m);
8324
- const isAmbiguous = (pem === null || pem === void 0 ? void 0 : pem.leafSelectionMethod) === 'AMBIGUOUS';
8325
- const issueItems = [];
8326
- if (isAmbiguous) {
8327
- issueItems.push({
8328
- type: 'warning',
8329
- text: t('card.bimi.vmc.cert-ambiguous-leaf_md'),
8330
- 'data-testid': 'bimi-cert-issue-ambiguous'
8331
- });
8332
- }
8333
- errorMessages.forEach((message, idx) => {
8334
- issueItems.push({
8335
- type: 'warning',
8336
- text: message,
8337
- 'data-testid': `bimi-cert-issue-${idx}`
8338
- });
8339
- });
8340
- if (!issueItems.length) {
8341
- issueItems.push({
8342
- type: 'good',
8343
- text: t('card.bimi.vmc.cert-no-issues-reported_md'),
8344
- 'data-testid': 'bimi-cert-no-issues'
8345
- });
8346
- }
8347
- sections.push({
8348
- id: 'bimi-cert-verification-issues',
8349
- title: t('card.bimi.vmc.cert-section-verification-issues'),
8350
- items: issueItems,
8351
- testId: 'bimi-cert-verification-issues-section'
8352
- });
8353
- return sections;
8354
- };
8355
-
8356
7960
  const _excluded$2 = ["jmap", "onHeightChange", "useInvestigateColors", "isCollapsible", "areAllCollapsed", "onCollapseAll", "className"];
8357
7961
  const COMPONENT_NAME$2 = 'SignalCardBimi';
8358
7962
  const CLASSNAME$2 = 'redsift-signal-card-bimi';
@@ -8362,7 +7966,6 @@ const CLASSNAME$2 = 'redsift-signal-card-bimi';
8362
7966
  * BIMI record validation, VMC certificate details, and SVG logo validation.
8363
7967
  */
8364
7968
  const SignalCardBimi = /*#__PURE__*/forwardRef((props, ref) => {
8365
- var _bimi$vmc;
8366
7969
  const {
8367
7970
  t
8368
7971
  } = useSignalCardTranslation('investigate');
@@ -8421,76 +8024,31 @@ const SignalCardBimi = /*#__PURE__*/forwardRef((props, ref) => {
8421
8024
  items
8422
8025
  });
8423
8026
  }, [adapterResult === null || adapterResult === void 0 ? void 0 : adapterResult.svgSection, bimi, isDeclinationToPublish]);
8424
- const hasPublishedCertificate = !!(bimi !== null && bimi !== void 0 && (_bimi$vmc = bimi.vmc) !== null && _bimi$vmc !== void 0 && _bimi$vmc.publishedCertificate);
8425
8027
 
8426
8028
  // Inject SVGLogo into VMC section (React-specific)
8427
8029
  const vmcSection = useMemo(() => {
8428
- var _bimi$vmc2;
8030
+ var _bimi$vmc;
8429
8031
  if (isDeclinationToPublish || !(adapterResult !== null && adapterResult !== void 0 && adapterResult.vmcSection)) return null;
8430
- let items = [...adapterResult.vmcSection.items];
8431
-
8432
- // When the full published certificate is present, the new metadata sections
8433
- // (below) supersede several legacy VMC rows with richer equivalents, so drop
8434
- // the duplicated legacy rows to avoid showing each field twice (DS-93):
8435
- // issuer → Certificate › Issuer
8436
- // expiry → Validity › Expiry (matched by testid)
8437
- // valid-for-domains → Certificate › Certified domains
8438
- // trademark authority → Mark evidence › Trademark office
8439
- // assertion mark → Mark evidence › Mark type (both are the mark class)
8440
- // The legacy VMC validity-status row has no equivalent in the new sections
8441
- // and is kept.
8442
- if (hasPublishedCertificate) {
8443
- // Suppress by stable data-testid (stamped in the extractor adapter's
8444
- // BIMI_KEY_TO_TESTID map) rather than by label text. Matching on wording
8445
- // is fragile — a copy change in signal-logic would silently stop matching
8446
- // and reintroduce the duplicated rows. The adapter owns these testids:
8447
- // issuer → vmc-issuer (Certificate › Issuer)
8448
- // valid-for-domains → vmc-valid-for-domains (Certificate › Certified domains)
8449
- // trademark authority → vmc-trademark-authority (Mark evidence › Trademark office)
8450
- // expiry → vmc-expiration-* (Validity › Expiry)
8451
- const suppressedTestIds = new Set(['vmc-issuer', 'vmc-valid-for-domains', 'vmc-trademark-authority', 'vmc-assertion-mark', 'vmc-expiration-valid', 'vmc-expiration-expired']);
8452
- items = items.filter(item => {
8453
- const testId = item['data-testid'];
8454
- return !(testId && suppressedTestIds.has(testId));
8455
- });
8456
- }
8457
- const logoSrc = bimi === null || bimi === void 0 ? void 0 : (_bimi$vmc2 = bimi.vmc) === null || _bimi$vmc2 === void 0 ? void 0 : _bimi$vmc2.logoSrc;
8458
- if (logoSrc) {
8459
- // Insert logo before the first 'no-icon' item (matching original helpers behavior)
8460
- const noIconIdx = items.findIndex(item => item.type === 'no-icon');
8461
- const svgItem = {
8462
- text: /*#__PURE__*/React__default.createElement(SVGLogo$1, {
8463
- svgUrl: logoSrc
8464
- }),
8465
- type: 'image'
8466
- };
8467
- if (noIconIdx >= 0) {
8468
- items.splice(noIconIdx, 0, svgItem);
8469
- } else {
8470
- items.push(svgItem);
8471
- }
8032
+ const logoSrc = bimi === null || bimi === void 0 ? void 0 : (_bimi$vmc = bimi.vmc) === null || _bimi$vmc === void 0 ? void 0 : _bimi$vmc.logoSrc;
8033
+ if (!logoSrc) return adapterResult.vmcSection;
8034
+ const items = [...adapterResult.vmcSection.items];
8035
+ // Insert logo before the first 'no-icon' item (matching original helpers behavior)
8036
+ const noIconIdx = items.findIndex(item => item.type === 'no-icon');
8037
+ const svgItem = {
8038
+ text: /*#__PURE__*/React__default.createElement(SVGLogo$1, {
8039
+ svgUrl: logoSrc
8040
+ }),
8041
+ type: 'image'
8042
+ };
8043
+ if (noIconIdx >= 0) {
8044
+ items.splice(noIconIdx, 0, svgItem);
8045
+ } else {
8046
+ items.push(svgItem);
8472
8047
  }
8473
8048
  return _objectSpread2(_objectSpread2({}, adapterResult.vmcSection), {}, {
8474
8049
  items
8475
8050
  });
8476
- }, [adapterResult === null || adapterResult === void 0 ? void 0 : adapterResult.vmcSection, bimi, isDeclinationToPublish, hasPublishedCertificate]);
8477
-
8478
- // Build the published-certificate metadata sections (VMC/CMC leaf identity,
8479
- // mark evidence, verification issues). Only present when IPForensics resolved
8480
- // a unique leaf; otherwise this is empty and the card degrades to the legacy
8481
- // VMC section above (DS-93). `now` drives the humanized validity durations.
8482
- const publishedCertSections = useMemo(() => {
8483
- var _bimi$vmc3, _bimi$vmc4, _bimi$vmc5;
8484
- if (isDeclinationToPublish) return [];
8485
- const cert = bimi === null || bimi === void 0 ? void 0 : (_bimi$vmc3 = bimi.vmc) === null || _bimi$vmc3 === void 0 ? void 0 : _bimi$vmc3.publishedCertificate;
8486
- if (!cert) return [];
8487
- const pem = bimi === null || bimi === void 0 ? void 0 : (_bimi$vmc4 = bimi.vmc) === null || _bimi$vmc4 === void 0 ? void 0 : _bimi$vmc4.pem;
8488
- // assertionMarkType ('VMC'/'CMC') is a sibling of publishedCertificate on
8489
- // vmc, not a field of the certificate itself — pass it through for the
8490
- // "Certificate type:" row (cert.markType is the trademark mark class).
8491
- const assertionMarkType = bimi === null || bimi === void 0 ? void 0 : (_bimi$vmc5 = bimi.vmc) === null || _bimi$vmc5 === void 0 ? void 0 : _bimi$vmc5.assertionMarkType;
8492
- return buildPublishedCertificateSections(cert, pem, t, new Date(), assertionMarkType);
8493
- }, [bimi, t, isDeclinationToPublish]);
8051
+ }, [adapterResult === null || adapterResult === void 0 ? void 0 : adapterResult.vmcSection, bimi, isDeclinationToPublish]);
8494
8052
  const getTranslatedCaption = useCallback(caption => {
8495
8053
  if (!caption) return undefined;
8496
8054
  return t(EXTRACTION_CAPTION_KEYS[caption]);
@@ -8548,20 +8106,6 @@ const SignalCardBimi = /*#__PURE__*/forwardRef((props, ref) => {
8548
8106
  testId: 'bimi-vmc-section'
8549
8107
  });
8550
8108
  }
8551
-
8552
- // Full published-certificate metadata sections (DS-93). Rendered only when
8553
- // vmc.publishedCertificate is present; otherwise the card keeps its legacy
8554
- // VMC rendering above.
8555
- publishedCertSections.forEach(section => {
8556
- sections.push({
8557
- id: section.id,
8558
- title: section.title,
8559
- content: /*#__PURE__*/React__default.createElement(Checklist$1, {
8560
- items: section.items
8561
- }),
8562
- testId: section.testId
8563
- });
8564
- });
8565
8109
  if (svgSection) {
8566
8110
  sections.push({
8567
8111
  id: 'safeSVG',