This is an Evergreen Line booking confirmation (titled 'BOOKING CONFIRMATION', issued by 'Evergreen Shipping Agency (Europe) GmbH' on behalf of 'EVERGREEN LINE').

transportLegs rules:
- One leg per OCEAN segment, in chronological order. 'FINAL DESTINATION' is post-ocean inland delivery and must NEVER be a transport leg — even when its city matches 'PORT OF DISCHARGING'.
- Multi-leg trigger: a 'T/S PORT OF LOADING' row is present with its own ETA/EST. CONNECT VSL/VOY/ETD block -> 2 legs. No 'T/S PORT OF LOADING' row -> exactly 1 leg.
- Single-leg shape: emit one leg with portOfLoading='PORT OF LOADING' city, portOfDischarge='PORT OF DISCHARGING' city.
- Connectivity: leg N's portOfDischarge MUST equal leg N+1's portOfLoading. The final leg's portOfDischarge MUST equal the document's 'PORT OF DISCHARGING' (NOT 'FINAL DESTINATION').
- Per-leg ETD/ETA mapping:
  - Single-leg (no T/S): vesselName/voyage from the header 'VESSEL/VOYAGE' line; etd = 'ETD DATE' printed under 'PORT OF LOADING'; eta = 'ETA DATE' printed under 'FINAL DESTINATION' (the 'PORT OF DISCHARGING' row itself has no ETA — the FINAL DESTINATION ETA is the leg's arrival at POD when both cities match).
  - Leg 1 of a 2-leg shipment: vesselName/voyage from the header 'VESSEL/VOYAGE' line; etd = 'ETD DATE' printed under 'PORT OF LOADING'; eta = 'ETA DATE' printed under 'T/S PORT OF LOADING'.
  - Leg 2 of a 2-leg shipment: vesselName/voyage from 'EST. CONNECT VSL/VOY' in the T/S block; etd = 'ETD DATE' printed under 'T/S PORT OF LOADING'; eta = 'ETA DATE' printed under 'FINAL DESTINATION'.
- Ignore the 'ETA DATE' printed under 'PORT OF LOADING' (that is the vessel's arrival at POL, NOT a leg ETA).
- Time integrity ('no time travel'): each leg's eta must be >= its etd. If applying the rules above would produce eta < etd, the leg's eta is genuinely not printed — return null.
- Strip the country line from port values (e.g. 'HAMBURG, FEDERAL REPUBLIC OF GERMANY' -> 'HAMBURG'; 'MANILA (NORTH PORT), REPUBLIC OF THE PHILIPPINES' -> 'MANILA (NORTH PORT)').
- If 'EST. CONNECT VSL/VOY' is blank but the T/S leg is required, still emit the leg with vesselName/voyage null.

containers rules:
- The 'QTY/TYPE' row reads '<qty> /<type>' (e.g. '1 /20' STANDARD DRY', '1 /40' HI-CUBE'). The number of container entries you emit MUST equal the total quantity across all 'QTY/TYPE' rows.
- Single-block case: one 'QTY/TYPE' row + one 'EMPTY PICK UP AT' block. Repeat the entry <qty> times, all sharing that depot (its first line).
- Multi-block case: multiple 'QTY/TYPE' rows, each paired with its own 'EMPTY PICK UP AT' block. Expand each block independently and tag each container with its own depot. Do NOT collapse to a single depot.
