// Copyright 2014 Apple Inc.  All Rights Reserved.
(function(){return function(e,a){var t,s,r;if(/reservas@restaurantes\.com/i.test(a.from)&&""===e.startTime){t=Scanner.fromMessage(a),t.setLocale("es_ES");var c=t.getSpan().allDates();e.startTime=combineDateAndTime(c[0],c[1])}if(/roomservice@hotel\.com\.au/i.test(a.from)&&!e.checkinDate)return null;if(/customer\.service@booking\.com/i.test(a.from)&&!e.checkinDate)return null;if(/confirmation@mail\.hotele?s\.com/i.test(a.from)&&e.checkinDate.indexOf("00:00:00")>-1&&e.checkoutDate.indexOf("00:00:00")>1){a.plain=a.plain.replace(/[\(\)]/g,""),s=loadHelper("cachedClassifier.js")(a).locale,r=loadHelper("vocab.js")(s),t=Scanner.fromMessage(a),t.setLocale(s);var i=loadHelper("starttime.js")(r,t),l=loadHelper("endtime.js")(r,t,i);i&&!i.isNullSpan_&&(e.checkinDate=e.checkinDate.split("T")[0],e.checkinDate=e.checkinDate+"T"+unSpanDate_(i).split("T")[1]),l&&!l.isNullSpan_&&(e.checkoutDate=e.checkoutDate.split("T")[0],e.checkoutDate=e.checkoutDate+"T"+unSpanDate_(l).split("T")[1])}if(/reservations@(?:(?:jw)?marriott|courtyard|autographcollectionhotels|renaissancehotels|springhillsuites)-res\.com/i.test(a.from)){s=loadHelper("UseCase.js")(loadHelper("UseCaseClassifierModeEnum.js").Regular,a.subject,a.from).locale,r=loadHelper("vocab.js")(s),t=Scanner.fromMessage(a),t.setLocale(s);var n=t.getSpan().allDates(),o=loadHelper("CheckInDate.js")(r,t,n),p=loadHelper("CheckOutDate.js")(r,t,n,o),u=loadHelper("CheckInTime.js")(r,t,n),m=loadHelper("CheckOutTime.js")(r,t,n);o=o.exists()?unSpanDate_(o):e.checkinDate,p=p.exists()?unSpanDate_(p):e.checkoutDate,u=u.exists()?"T"+unSpanDate_(u).split("T")[1]:"",m=m.exists()?"T"+unSpanDate_(m).split("T")[1]:"",e.checkinDate=o.split("T")[0]+u,e.checkoutDate=p.split("T")[0]+m,e.reservationI&&(e.reservationId=e.reservationId.replace(/.+:[\s\n\r]+?([A-Z\d-]{6,})/,"$1"))}return e}}).call();