(function(){return function(e,t,n,r){var a,i,s=t.getNullSpan(),d=t.getNullSpan(),o=/^(\d+[a-z]{2}\d+|\d+-\d+\/[a-zA-Z\d]+|[\d.]{12,}|[A-Za-z\d:]{4,}|[A-Z\d-]{6,}|[A-Z\d-\s]{15,}|\d{2,}|[\d\- ]{4,})$/;if(n&&void 0!==e.reservationIdInSubject)for(a=0;a<e.reservationIdInSubject.length&&!s.exists();a++)s=t.getDetachedSpan(n).innerCapture(e.reservationIdInSubject[a],1);if(r&&void 0!==e.reservationIdInURL){var I=t.getDetachedSpan(r);for(a=0;a<e.reservationIdInURL.length&&!s.exists();a++)d=I.innerCapture(e.reservationIdInURL[a],1),d.exists()&&0!=d&&(s=d)}for(a=0;a<e.reservationId.length&&!s.exists();a++)for(i=t.getSpan().next(e.reservationId[a]);i.exists();){if(d=i.innerCapture(e.reservationId[a],1),d.exists()&&o.test((""+d).trim())){s=d;break}i=i.next(e.reservationId[a])}if(!s.exists())for(a=0;a<e.altReservationId.length&&!s.exists();a++)for(i=t.getSpan().next(e.altReservationId[a]);i.exists();){var v=i.nextAnyTag("td");if(v.exists()&&(d=v.tagContents().trim().innerCapture(o,1),d.exists()&&d.getStart()-i.getEnd()<144)){s=d;break}i=i.next(e.altReservationId[a])}return s}}).call();