Ship.Web/test/携程旅行网触屏版_files/main.js

(完整代码) 160KB

/**
 * @license RequireJS text 2.0.5+ Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

function getViewsPath(){return window.PATH.TEMPLATE_PATH}function buildViewPath(e){return getViewsPath()+e}function buildViewTemplatesPath(e){return"text!"+getViewsPath()+e}window.PATH={DEFAULTINDEX:"index",VIEWS_PATH:"hotel/dest/views/",TEMPLATE_PATH:"hotel/dest/templates/",BASEURL:"/webapp/"},require.config({baseUrl:window.PATH.BASEURL,urlArgs:"ver=2.3.sp3.6.4",paths:{HotelBaseModel:"hotel/models/hotelbasemodel",OldRestfulModel:"hotel/models/oldrestfulmodel",HotelModel:"hotel/models/hotelmodel",HotelStore:"hotel/models/hotelstore",HotelBusiness:"hotel/models/hotelbusiness",HotelWidgetTipslayer:"hotel/common/hotel.widget.tipslayer",HotelUIBubbleLayer:"hotel/common/hotel.ui.bubble.layer",HotelRoomCalendar:"hotel/common/roomcalendar",Toolkit:"hotel/src/utility/utility",BizCityList:"hotel/src/bizcommon/bizcitylist"}}),require(["libs","App"],function(e,t){var n=new t({defaultView:window.PATH.DEFAULTINDEX,viewRootPath:window.PATH.VIEWS_PATH,animatSwitch:!1,channel:"hotel"})}),define("main_r",function(){}),define("text",["module"],function(e){var t,n,r,i,s=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],o=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,u=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,a=typeof location!="undefined"&&location.href,f=a&&location.protocol&&location.protocol.replace(/\:/,""),l=a&&location.hostname,c=a&&(location.port||undefined),h=[],p=e.config&&e.config()||{};t={version:"2.0.5+",strip:function(e){if(e){e=e.replace(o,"");var t=e.match(u);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:p.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=s[t];try{e=new ActiveXObject(n)}catch(r){}if(e){s=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,p.isBuild&&(h[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}p.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),h=p.useXhr||t.useXhr;!a||h(u,f,l,c)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(h.hasOwnProperty(n)){var s=t.jsEscape(h[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(p.env==="node"||!p.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node)n=require.nodeRequire("fs"),t.get=function(e,t){var r=n.readFileSync(e,"utf8");r.indexOf("")===0&&(r=r.substring(1)),t(r)};else if(p.env==="xhr"||!p.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);p.onXhr&&p.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r(o)):n(s.responseText))},s.send(null)};else if(p.env==="rhino"||!p.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(p.env==="xpconnect"||!p.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),t.get=function(e,t){var n,s,o={},u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),s=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),s.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),s.readString(n.available(),o),s.close(),n.close(),t(o.value)}catch(a){throw new Error((u&&u.path||"")+": "+a)}};return t}),define("OldRestfulModel",["cModel","cBase","CommonStore"],function(e,t,n){var r=e.prototype.excute,i=n.UnionStore.getInstance(),s=t.Class(e,{__propertys__:function(){},initialize:function($super,e){$super(e)},excute:function(){var e=i.getAttr("AllianceID"),t=i.getAttr("SID"),n=i.getAttr("OUID");(e||t||n)&&this.setParam({alliance:{aid:e||"",sid:t||"",ouid:n||""}}),r.apply(this,arguments)},buildurl:function(){var e=this.baseurl(this.protocol),t=this.protocol+"://"+e.domain+"/"+e.path+(typeof this.url=="function"?this.url():this.url);return t},baseurl:function(t){var n=location.host,t=t||location.protocol.replace(":",""),r="m.ctrip.com",i="restapi";return n.match(/^(localhost|172\.16|127\.0)/i)?(r="restful.m.fat19.qa.nt.ctripcorp.com",i="restapi5"):n.match(/^m.fat/i)||n.match(/^m.test/i)?(r="restful.m.fat19.qa.nt.ctripcorp.com",i="restapi5"):n.match(/^m\.uat\.qa/i)?(e.isHttps(t)?r="restful.m.uat.qa.ctripcorp.com":r="m.uat.qa.ctripcorp.com",i="restapi"):n.match(/10\.8/ig)?(e.isHttps(t)?r="wpg.ctrip.com":r="10.8.2.111",i="restapi"):(e.isHttps(t)?r="wpg.ctrip.com":r="m.ctrip.com",i="restapi"),{domain:r,path:i}}});return s}),define("cWidgetGeolocation",["cBase","cUtility","cWidgetFactory","cStore","cHybridFacade"],function(e,t,n,r,i){var s="Geolocation",o="0b895f63ca21c9e82eb158f46fe7f502";if(!n.hasWidget(s)){var u=u||{};u.requestGeographic=function(e,t){var n=function(t){e&&e(t)},r=function(e){var n="未能获取到您当前位置,请重试或选择城市";switch(e.code){case e.TIMEOUT:n="获取您当前位置超时,请重试或选择城市!";break;case e.PERMISSION_DENIED:n="您拒绝了使用位置共享服务,查询已取消,请开启位置共享或选择城市!";break;case e.POSITION_UNAVAILABLE:n="获取您当前位置信息失败,请重试或选择城市!"}t&&t(e,n)};window.navigator.geolocation.getCurrentPosition(n,r,{enableHighAccuracy:!0,maximumAge:5e3,timeout:2e4})},u.requestAMapAddress=function(e,t,n,r,i){var s="121.473704,31.230393";e&&t&&(s=e+","+t);var u=$.param({location:s,key:o,radius:0,extensions:"all"});i=i||8e3,$.ajax({url:"http://restapi.amap.com/v3/geocode/regeo?"+u,dataType:"jsonp",success:function(r){var i=r&&r.regeocode||"",o=i.addressComponent.city,u=i.addressComponent.province,a="";_.isString(o)?a=o:_.isString(u)&&(a=u);var l={address:_.isString(i.formatted_address)?i.formatted_address:"",location:s,info:i&&i.addressComponent,city:a,lng:e,lat:t};n&&n(l)},error:function(e){r&&r(e)},timeout:i})},u.requestAMapAround=function(e,t,n,r,i){var s="121.473704,31.230393";e&&t&&(s=e+","+t);var u=$.param({location:s,key:o,radius:500,offset:4,page:1});i=i||8e3,$.ajax({url:"http://restapi.amap.com/v3/place/around?"+u,dataType:"jsonp",success:function(e){var t=e&&e.pois||[];n&&n(t)},error:function(e){r&&r(e)},timeout:i})},u.requestAMapKeyword=function(e,t,n,r,i){var s=$.param({keywords:e,city:t,key:o,offset:10,page:1,extensions:"all"});i=i||8e3,$.ajax({url:"http://restapi.amap.com/v3/place/text?"+s,dataType:"jsonp",success:function(e){var t=e&&e.pois||[];n&&n(t)},error:function(e){r&&r(e)},timeout:i})},u.tansformLongitude=function(e,t,n,r,i){var s=$.param({locations:e+","+t,key:o,coordsys:"gps"});i=i||8e3,$.ajax({url:"http://restapi.amap.com/v3/assistant/coordinate/convert?"+s,dataType:"jsonp",success:function(e){if(e&&"1"===e.status){var t=e.locations.split(",");n&&n(t[0],t[1])}else r&&r()},error:function(e){r&&r(e)},timeout:i})},u.requestCityInfo=function(e,n,r,s,o){var a=function(){var t=function(t){if(t&&t.locateStatus){if(-1==t.locateStatus)return void r("网络不通,当前无法定位",1);if(-2==t.locateStatus)return void r("定位没有开启",2)}t&&t.value&&t.value.poi&&(t.value.poi.address&&""!=t.value.poi.address?t.value.addrs=t.value.poi.address:t.value.poi.name&&""!=t.value.poi.name&&(t.value.addrs=t.value.poi.name),t.value.poi.y&&""!=t.value.poi.y&&(t.value.lat=t.value.poi.y),t.value.poi.x&&""!=t.value.poi.x&&(t.value.lng=t.value.poi.x));var i=null;t&&t.value&&t.value.ctyName?i=t.value.ctyName:t&&t.value&&t.value.cityName?i=t.value.cityName:t&&t.value&&"香港特別行政區"==t.value.province?i="香港特別行政區":t&&t.value&&t.value.province&&(i=t.value.province.indexOf("市")>-1?t.value.province:t.value.subLocality);var s=null;t&&t.value&&t.value.addrs&&(s=t.value.addrs);var o=t.value.lat,a=t.value.lng;if(i&&s)e(s.indexOf(i)>-1?{city:i,address:s,lng:a,lat:o}:{city:i,address:i+s,lng:a,lat:o});else if(o&&a){var f=function(t){e&&(t.lng=a,t.lat=o,e(t))},l=function(){n&&n()};u.requestAMapAddress(a,o,f,l)}else r("Error",0)},r=function(e,t){return"function"==typeof s?void s(e,t):void (n&&n(t))};i.request({name:i.METHOD_LOCATE,success:t,error:r})},f=function(){var t=function(t){var i=t.coords.longitude,s=t.coords.latitude;r&&r(i,s);var a=function(t){e&&e(t)},f=function(){n&&n()};o?u.tansformLongitude(i,s,function(e,t){u.requestAMapAddress(e,t,a,f)},function(e){f(e)}):u.requestAMapAddress(i,s,a,f)},i=function(e,t){return"function"==typeof s?void s(t,e):void (n&&n(t))};u.requestGeographic(t,i)},l=t.isInApp()?a:f;l()},u.requestAroundInfo=function(e,t,n){var r=e.split(",")[0],i=e.split(",")[1],s=function(e){t&&t(e)},o=function(){n&&n()};u.requestAMapAround(r,i,s,o)},u.requestKeywordInfo=function(e,t,n,r){var i=function(e){n&&n(e)},s=function(){r&&r()};u.requestAMapKeyword(e,t,i,s)};var a=u.PositionStore=e.Class(r,{__propertys__:function(){this.key="POSITION_CITY",this.lifeTime="10M"},initialize:function($super,e){$super(e)}});u.requestCacheCityInfo=function(e,t,n){var r=a.getInstance(),i=r.get();i?e&&e.call(n,i):u.requestCityInfo(function(t){r.set(t),e&&e.call(n,t)},function(e,r){t&&t.call(n,e,r)})},u.requestMap=function(e){var n=function(e){if(!(AMap&&e&&e.lat&&e.lng&&e.id))return!1;var t=13,n=new AMap.Map(e.id,{center:new AMap.LngLat(e.lng,e.lat),level:e.level||t}),r=document.createElement("div");r.className="map-content";var i=document.createElement("img");if(i.src="http://res.m.ctrip.com/html5/Content/images/map_address.png",r.appendChild(i),e.content){var s=document.createElement("span");s.innerHTML=e.content,r.appendChild(s)}var o=new AMap.Marker({position:new AMap.LngLat(e.lng,e.lat)});o.setContent(r),o.setMap(n)},r=function(){},i=t.isInApp()?r:n;i(e)},u.show_map=function(e){if(!e)throw new Error('function show_map error is "param is null"');e.name=i.METHOD_SHOW_MAP,i.request(e)},n.register({name:s,fn:u})}}),define("cGeoService",["cWidgetFactory","cWidgetGeolocation","cWidgetGuider"],function(e){var t={},n=e.create("Geolocation"),r=e.create("Guider"),i=n.PositionStore.getInstance();return t.GeoLocation=function(){function e(e,t,n){for(var r in a)a[r]&&"function"==typeof a[r][e]&&a[r][e].apply(a[r].scope,t);n&&(a={})}var t=0,s=1,o=2,u=3,a={},f=t,l=null;return{Subscribe:function(t,p,v,m){p=p||{},a[t]||(a[t]={name:t,onStart:p.onStart,onComplete:p.onComplete,onError:p.onError,onPosComplete:p.onPosComplete,onPosError:p.onPosError,scope:v});var y=i.get();if(m&&(y=null),y)f=s,e("onStart",null),f=o,e("onPosComplete",[y.lng,y.lat]),e("onComplete",[y],!0);else{if(clearTimeout(l),l=setTimeout(function(){f===s&&(f=u,r.print({log:"#cGeoService -- 22 second timeout call onError"}),e("onError",[null],!0))},35e3),f===s)return void (a[t]&&"function"==typeof a[t].onStart&&a[t].onStart.call(v));f=s,e("onStart",null),r.print({log:"#cGeoService -- start request city info"}),n.requestCityInfo(function(t){f=o,i.set(t),e("onComplete",[t],!0)},function(t,n){f=u,"number"==typeof n&&2===n&&(n={code:1}),r.print({log:"#cGeoService -- locate onError"}),e("onError",[t,n],!0)},function(t,n){e("onPosComplete",[t,n])},function(t,n){f=u,"number"==typeof n&&2===n&&(n={code:1}),e("onPosError",[t,n],!0)},!0)}},UnSubscribe:function(e){e=_.isArray(e)?e:[e];for(var t=0;t<e.length;t++)delete a[e[t]]},ClearPosition:function(){i.remove()}}}(),t.GeoAround=function(){return{Subscribe:function(e,t,r,i){n.requestAroundInfo(e,function(e){t.call(i,e)},function(){r.call(i)})}}}(),t.GeoKeyword=function(){return{Subscribe:function(e,t,r,i,s){n.requestKeywordInfo(e,t,function(e){r.call(s,e)},function(){i.call(s)})}}}(),t}),define("cWidgetAbstractCalendar",["cCoreInherit","cUIAbstractView","cWidgetFactory"],function(e,t,n){"user strict";var r="Abstract.Calendar";if(!n.hasWidget(r)){var i=new e.Class(t,{__propertys__:function(){this.CONSTANT={CALENDAR_CHINESE_LUNAR_INFO:[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,21952,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19415,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835],CALENDAR_CHINESE_WEEKDAY:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],CALENDAR_CHINESE_NUMBER:["日","一","二","三","四","五","六","七","八","九","十"],CALENDAR_CHINESE_CARRT:["初","十","廿","卅"," "],CALENDAR_CHINESE_HOLIDAY:{1230:"除夕","0101":"初一","0115":"元宵","0505":"端午","0707":"七夕","0815":"中秋","0909":"重阳"},CALENDAR_COMMON_HOLIDAY:{"0101":"元旦","0214":"情人节","0501":"五一",1001:"国庆",1225:"圣诞节"},CALENDAR_WEEKDAY_NAME:{0:"星期日",1:"星期一",2:"星期二",3:"星期三",4:"星期四",5:"星期五",6:"星期六"},CALENDAR_WEEKDAY_SHORTNAME:{0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"},CALENDAR_WEEKDAY_SHORTNAME2:{0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"},CALENDAR_INIT_DATE:1,CALENDAR_MONTH:5,INIT_DATE_TIME:{H:0,M:0,S:0,MS:0},CALENDAR:"calendar"}},initialize:function($super,e){this.isLeapYear(this.startMonth.getFullYear())||this.isLeapYear(this.startMonth.getFullYear()-1)?(this.CONSTANT.CALENDAR_COMMON_HOLIDAY["0404"]="清明",delete this.CONSTANT.CALENDAR_COMMON_HOLIDAY["0405"]):(this.CONSTANT.CALENDAR_COMMON_HOLIDAY["0405"]="清明",delete this.CONSTANT.CALENDAR_COMMON_HOLIDAY["0404"]),$super(e)},setCalendarDate:function(e){this.dateObj="undefined"!==e?e:new Date,this.SY=this.dateObj.getFullYear(),this.SM=this.dateObj.getMonth(),this.SD=this.dateObj.getDate(),this.lunarInfo=this.CONSTANT.CALENDAR_CHINESE_LUNAR_INFO},leapMonth:function(e){return 15&this.lunarInfo[e-1900]},monthDays:function(e,t){return this.lunarInfo[e-1900]&65536>>t?30:29},leapDays:function(e){return this.leapMonth(e)?65536&this.lunarInfo[e-1900]?30:29:0},lYearDays:function(e){for(var t=348,n=32768;n>8;n>>=1)t+=this.lunarInfo[e-1900]&n?1:0;return t+this.leapDays(e)},Lunar:function(e){var t,n=0,r=0,i={},s=new Date(1900,0,31),o=(e-s)/864e5;for(i.dayCyl=o+40,i.monCyl=14,t=1900;2050>t&&o>0;t++)r=this.lYearDays(t),o-=r,i.monCyl+=12;for(0>o&&(o+=r,t--,i.monCyl-=12),i.year=t,i.yearCyl=t-1864,n=this.leapMonth(t),i.isLeap=!1,t=1;13>t&&o>0;t++)n>0&&t===n+1&&i.isLeap===!1?(--t,i.isLeap=!0,r=this.leapDays(i.year)):r=this.monthDays(i.year,t),i.isLeap===!0&&t===n+1&&(i.isLeap=!1),o-=r,i.isLeap===!1&&i.monCyl++;return 0===o&&n>0&&t===n+1&&(i.isLeap?i.isLeap=!1:(i.isLeap=!0,--t,--i.monCyl)),0>o&&(o+=r,--t,--i.monCyl),i.month=t,i.day=o+1,i},cDay:function(e,t){var n,r=this.CONSTANT.CALENDAR_CHINESE_NUMBER,i=this.CONSTANT.CALENDAR_CHINESE_CARRT;switch(n=e>10?"十"+r[e-10]:r[e],n+="月",t){case 10:n+="初十";break;case 20:n+="二十";break;case 30:n+="三十";break;default:n+=i[Math.floor(t/10)],n+=r[t%10]}return n},solarDay2:function(e){this.setCalendarDate(e);var t=new Date(this.SY,this.SM,this.SD),n=this.Lunar(t),r=(n.month>=10?n.month:"0"+n.month)+""+(n.day>=10?n.day:"0"+n.day);return n=null,r},weekday:function(){var e=this.CONSTANT.CALENDAR_CHINESE_WEEKDAY;return e[this.dateObj.getDay()]},YYMMDD:function(){var e=[this.SY,"年",this.SM+1,"月",this.SD,"日"];return e.join("")},_isDate:function(e){var t=Object.prototype.toString.call(e);return"[object Date]"===t},_objectKey:function(e){var t=[];if(e)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},isLeapYear:function(e){return 0===e?!1:e%4!=0?!1:e%100==0&&e%400!=0?!1:!0}});n.register({name:r,fn:i})}}),define("cWidgetCalendar",["cCoreInherit","cUtility","cUIBase","cUIHashObserve","cWidgetFactory","cWidgetAbstractCalendar"],function(e,t,n,r,s){"user strict";var o="Calendar";if(!s.hasWidget(o)){var u=s.create("Abstract.Calendar"),a=new e.Class(u,{__propertys__:function(){this.chineseHoliday=this.CONSTANT.CALENDAR_CHINESE_HOLIDAY,this.holiday=this.CONSTANT.CALENDAR_COMMON_HOLIDAY,this.DAYTITLE=this.CONSTANT.CALENDAR_WEEKDAY_SHORTNAME,this.SDAYTITLE=this.CONSTANT.CALENDAR_WEEKDAY_SHORTNAME2,this.DAYTITLE2=this.CONSTANT.CALENDAR_WEEKDAY_NAME,this.addClass(n.config.prefix+this.CONSTANT.CALENDAR),this.startMonth=t.getServerDate(),this.startMonth.setDate(this.CONSTANT.CALENDAR_INIT_DATE),this.Months=this.CONSTANT.CALENDAR_MONTH,this.validStartDate=t.getServerDate(),this.validStartDate.setHours(this.CONSTANT.INIT_DATE_TIME.H,this.CONSTANT.INIT_DATE_TIME.M,this.CONSTANT.INIT_DATE_TIME.S,this.CONSTANT.INIT_DATE_TIME.MS),this.validEndDate,this.date,this.dateVal={},this.titledom,this.leftback,this.cls=[this.CONSTANT.CALENDAR],this.title,this.noabsolute=!1,this.curDate,this.dateDoms={},this.html,this.clickEnabled=!0,this.msg="",this.callback=function(){},this.hashObserve=new r({hash:this.id,callback:function(){this._hide()},scope:this}),this.animatSwitch=!1,this.timeNum=250},initialize:function($super,e){this.setOption(function(e,t){switch(e){case"Months":case"timeNum":case"date":case"curDate":case"root":case"callback":case"title":case"noabsolute":case"msg":case"clickEnabled":case"animatSwitch":this[e]=t;break;case"cls":this.cls.push(t);break;case"validStartDate":case"validEndDate":this[e]=t,this[e].setHours(0,0,0,0);break;case"startMonth":this[e]=t,this[e].setDate(1)}}),$super(e),this.buildEvent()},selectedDate:function(){var e;for(var t in this.date)e=this.root.find("."+this.buildSelectCls(t))[0],this.dateDoms[t]=e,this.dateVal[t]=this.date[t].value;!this.curDate&&(this.curDate=t)},buildEvent:function(){this.addEvent("onCreate",this.onCreate),this.addEvent("onShow",this.onShow),this.addEvent("onHide",this.onHide)},buildElement:function(){this.titledom=this.root.find("header"),this.leftback=this.root.find("#js_return")},onCreate:function(){this.selectedDate(),this.buildElement(),this.buildElementsEvent(),this.noabsolute||this.root.css({position:"absolute"}),this.windowResizeHander=$.proxy(this.position,this)},onShow:function(){if(this.root.css({top:0,left:0,width:"100%"}),$(window).bind("resize",this.windowResizeHander),this.setzIndexTop(),this.hashObserve.start(),this.animatSwitch){var e=this;window.scrollTo(0,0),this.root.animate({"-webkit-transform":"translate(100%, 0px) translateZ(0px)",top:"0px"},0,function(){e.root.animate({"-webkit-transform":"translate(0px, 0px) translateZ(0px)"},e.timeNum,function(){e.windowResizeHander()})})}},position:function(){this.root.css({left:"0px",top:"0px"});var e=n.getPageSize();this.root.css({width:$(window).width(),height:e.height})},onHide:function(){$(window).unbind("resize",this.windowResizeHander),this.hashObserve.end()},createHtml:function(){return this.createCalendar()},buildElementsEvent:function(){var e=this;this.clickEnabled&&this.root.delegate(".cui_cld_daybox li","click",function(){b=$(this),b.hasClass("valid")||(b=b.closest(".valid"));var n=b.attr("data-date");n&&(n=t.Date.parse(n).valueOf(),e.isAccordBound(n)&&e._setDate(n,b))}),this.root.delegate("#js_return","click",$.proxy(function(){this._hide()},this))},_hide:function(){if(this.animatSwitch){var e=this;this.root.animate({"-webkit-transform":"translate(0px, 0px) translateZ(0px)",top:"0px"},0,function(){e.root.animate({"-webkit-transform":"translate(100%, 0px) translateZ(0px)"},e.timeNum,function(){e.hide()})})}else this.hide()},isAccordBound:function(e){var t=this.date[this.curDate];if(!t.bound)return!0;if(!t.bound.rules||!t.bound.error)return!0;var n,r=t.bound.rules;for(var i in r)if(n="string"==typeof r[i]?this.dateVal[r[i]]:this._isDate(r[i])&&r[i],e.setHours(0,0,0,0),n)switch(n.setHours(0,0,0,0),i){case"<":if(!(n>e))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1;break;case">":if(!(e>n))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1;break;case"<=":if(!(n>=e))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1;break;case">=":if(!(e>=n))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1}return!0},_setDate:function(e,n){var r=this.root.find("."+this.buildSelectCls(this.curDate));r.each($.proxy(function(e,n){var i=$(n);i.html(this.formatTitle(t.Date.parse(r.attr("data-date")).valueOf())),i.removeClass(this.buildSelectCls(this.curDate)),i.removeClass(this.buildSelectCls())},this)),this.dateDoms[this.curDate]=n;var i,s=$(n),o=this.date[this.curDate].title;i="function"==typeof o?this.formatTitle2(o):this.formatTitle,s.html(i.call(this,e)),s.removeClass("cui_cld_dayfuture"),s.removeClass("cui_cld_day_hint"),s.addClass("cui_cld_day_havetxt"),s.addClass(this.buildSelectCls(this.curDate)),s.addClass(this.buildSelectCls()),this.dateVal[this.curDate]=e,this.callback&&this.callback.call(this,e,this.curDate,this.dateVal,this.getDateInfo(e),this.calendarend)},setCurDate:function(e){this.curDate=e,this.create();var t=this.getCurTitle();this.titledom.html(t)},getEndDate:function(){return this.calendarend},buildSelectCls:function(e){return e?"selected-"+e:"cui_cld_daycrt"},getCurTitle:function(){var e=this.date[this.curDate],t="";return e&&(t=e.headtitle||this.title),t||this.title},createCalendar:function(){var e,n=[],r=this.getCurTitle(),i=t.isInApp(),s=i?' style=" margin-top: 0"':"";this.title&&!i&&n.push(["<header>","<h1>"+r+'</h1><i class="returnico i_bef" id="js_return"></i>',"</header>"].join("")),n.push(['<article class="cont_wrap"',s,'><div class="cui_cldwrap">'].join("")),n.push(this.createWeek(i));for(var o=0;o<this.Months;o++)e=new Date(this.startMonth),e.setMonth(e.getMonth()+o),n.push(this.createMonth(e));return n.push(["</div></atricle>"].join("")),n.join("")},createWeek:function(e){var t=e?" cui_cldweek_top0":"",n=['<ul class="cui_cldweek'+t+'">'];this.msg&&n.push('<p  class="cui_cldmsg">'+this.msg+"</p>");for(i in this.SDAYTITLE)n.push("<li>"+this.SDAYTITLE[i]+"</li>");return n.push("</ul>"),n.join("")},createMonth:function(e){var n,r=this.calcStructData(e),i=[];i.push('<section class="cui_cldunit">'),i.push('<h1 class="cui_cldmonth">'+t.Date.format(e,"Y年n月")+"</h1>"),i.push('<ul class="cui_cld_daybox">');for(var s,o,u=r.days.length,n=0;u>n;n++){o=r.days[n].length;for(var a=0;o>a;a++){s={};var f=r.days[n][a];if(f){var l=this.validStartDate||r.start,h=this.validEndDate||r.end;f>=l&&h>=f?s.valid=!0:(s.cui_cld_daypass=!0,s.invalid=!0)}else s.cui_cld_dayfuture=!0,s.invalid=!0;var p,d=this.getDateInfo(f);if(d?(p=d.daytitle||d.holiday||d.chineseday,p?(s.cui_cld_day_havetxt=!0,(d.holiday||d.chineseday)&&(s.cui_cld_day_hint=!0),p="<em>"+d.date+"</em><i>"+p+"</i>"):p="<em>"+d.date+"</em>"):p="",this.date)for(var v in this.date)f&&t.Date.format(this.dateVal[v]||this.date[v].value,"Y-m-d")==t.Date.format(f,"Y-m-d")&&(delete s.cui_cld_dayfuture,delete s.cui_cld_day_hint,s.cui_cld_day_havetxt=!0,s[this.buildSelectCls()]=!0,s[this.buildSelectCls(v)]=!0,p=this.date[v].title(f,function(){return d.daytitle||d.holiday||d.chineseday||d.date}),p="<em>"+p+"</em>");i.push('<li data-date="'+t.Date.format(f,"Y-m-d")+'" '+(s?' class="'+this._objectKey(s).join(" ")+'"':"")+">"+p+"</li>")}}return i.push("</ul></section>"),i.join("")},formatTitle:function(e){if(e){var t=this.getDateInfo(e);return t.holiday||t.chineseday||t.daytitle||t.date}return""},getDateInfo:function(e){if(e){var n=t.getServerDate(),r=new Date(e);r.setHours(1,1,1,0),n.setHours(1,1,1,0);var i=(r-n)/864e5,s={};s.daytitle=t.Date.format(n,"Ymd")==t.Date.format(e,"Ymd")?"今天":1==i?"明天":2==i?"后天":"";var o=this.solarDay2(e);s.chineseday=this.chineseHoliday[o]?this.chineseHoliday[o]:"";var u=t.Date.format(e,"md");return s.holiday=this.holiday[u]?this.holiday[u]:"",s.week=this.DAYTITLE[e.getDay()],s.week2=this.DAYTITLE2[e.getDay()],s.date=t.Date.format(e,"j"),s}},formatTitle2:function(e){return $.proxy(function(t){return e(t,$.proxy(function(e){return this.formatTitle(e)},this))},this)},calcStructData:function(e){var t=new Date(e),n=new Date(e);t.setDate(1),t.setHours(0,0,0,0);var r=t.getDay();n.setMonth(n.getMonth()+1,1),n.setHours(-24,0,0,0);for(var i,s=n.getDay(),o=(n.getDate()+(r+(6-s)))/7,u=[],a=0,f=0;o>a;a++){u[a]=[];for(var l=0;7>l;l++)if(0==a&&r>l)u[a].push("");else{if(i=new Date(t),i.setDate(i.getDate()+f),i>n)break;u[a].push(i),f++}}return this.calendarend=n,{start:t,end:n,days:u,loops:o}},setDate:function(e){this.create();for(var n in e)if(this.date[n]&&this._isDate(e[n])){e[n].setHours(0,0,0,0),this.date[n].value=e[n],this.dateVal[n]=e[n];var r=this.root.find("."+this.buildSelectCls(n));if(r.length){var i=t.Date.parse(r.data("date")).valueOf();r.removeClass(this.buildSelectCls(n)),r.removeClass(this.buildSelectCls()),r.html(this.formatTitle(i))}var s=this.root.find('[data-date="'+t.Date.format(e[n],"Y-m-d")+'"]');s.each($.proxy(function(t,r){r=$(r),r.hasClass("valid")&&(r.addClass(this.buildSelectCls(n)),r.addClass(this.buildSelectCls()),r.html(this.formatTitle2(this.date[n].title)(e[n])))},this)),this.dateDoms[n]=s}},addDate:function(e,n){this.create();var r,i,s;for(var o in e)if(!this.date[o]||n){this.date[o]=e[o],r=this.date[o]&&this.date[o].value,i=this.date[o]&&this.date[o].title,i="function"==typeof i?this.formatTitle2(i):$.proxy(this.formatTitle,this);var u=this.root.find("."+this.buildSelectCls(o));u.length&&(u.removeClass(this.buildSelectCls(o)),u.removeClass(this.buildSelectCls())),r&&(s=this.root.find('[data-date="'+t.Date.format(r,"Y-m-d")+'"]'),s.each($.proxy(function(e,t){t=$(t),t.hasClass("valid")&&(t.html(i(r)),t.addClass(this.buildSelectCls(o)),t.addClass(this.buildSelectCls()),this.dateVal[o]=r)},this)))}},removeDate:function(e){this.create();for(var n,r=0,i=e.length;i>r;r++)if(n=e[r],this.date[n]){var s=this.root.find("."+this.buildSelectCls(n));s.each($.proxy(function(e,r){var i=$(r);i.removeClass(this.buildSelectCls(n)),i.removeClass(this.buildSelectCls()),i.html(this.formatTitle(t.Date.parse(i.data("date")).valueOf()))},this)),delete this.date[n],delete this.dateVal[n]}},getDate:function(){var e={};for(var t in this.date)e[t]=this.date[t].value;return _.isEmpty(this.dateVal)?_.isEmpty(e)?{}:e:this.dateVal},update:function(e){this.setOption(function(e,t){switch(e){case"Months":case"date":case"curDate":case"root":case"callback":case"title":case"noabsolute":this[e]=t;break;case"cls":this.cls.push(t);break;case"validStartDate":case"validEndDate":this[e]=t,this[e].setHours(0,0,0,0);break;case"startMonth":this[e]=t,this[e].setDate(1)}}),this.readOption(e),this.create(),this.root.html(this.createCalendar()),this.trigger("onChange")}});s.register({name:o,fn:a})}}),define("cSessionStorage",["cBase","cAbstractStorage"],function(e,t){var n=new e.Class(t,{__propertys__:function(){},initialize:function($super,e){this.proxy=window.sessionStorage,$super(e)}});return n.getInstance=function(){return this.instance?this.instance:this.instance=new this},n.sessionStorage=n.getInstance(),n}),define("cSessionStore",["cBase","cAbstractStore","cSessionStorage"],function(e,t,n){var r=new e.Class(t,{__propertys__:function(){this.sProxy=n.getInstance()},initialize:function($super,e){$super(e)}});return r}),define("cWidgetListView",["cBase","cUICore","cWidgetFactory"],function(e,t,n){var r="ListView";if(!n.hasWidget(r)){var i=function(t){for(var n=new e.Hash,r=0;r<t.length;r++)n.add($(t[r]).data("hash"),$(t[r]));return n},s=s||{};s.__propertys__=function(){},s.initialize=function($super,e){if(e.container&&(this.rootBox=e.container),this.noResultText="您还没有记录哦",this.autoEmptyView="undefined"!=typeof e.autoEmptyView?e.autoEmptyView:!0,e.noResultText&&(this.noResultText=e.noResultText),e.listadapter&&(this.listadapter=e.listadapter,this.listadapter.regiseterObserver(this)),e.origin&&(this.origin=e.origin),!e.itemView)throw"ListView:no item view template";this.templateFactory=this.template(e.itemView),this.bindItemViewEvent=e.bindItemViewEvent,this.onUpdatePrepared=e.onUpdatePrepared,this.onUpdateFinished=e.onUpdateFinished,$super(e)},s.createHtml=function(){return this.update()},s.createItemView=function(e,t){var n=this.templateFactory(e);return $(n).addClass("c-item-view").data("hash",t)},s.update=function(){var t=this.rootBox.find(".c-item-view");this.map=i(t),this.onUpdatePrepared&&"function"==typeof this.onUpdatePrepared&&this.onUpdatePrepared();var n=new e.Hash,r=this,s=function(e,t,i){var s=r.map.getItem(t);s||(e.C_ITEM_INDEX=i,e.__origin__=r.origin,s=r.createItemView(e,t),r.bindItemViewEvent(s)),n.add(t,s)};if(this.listadapter.map.each(s),this.rootBox.hide(),this.rootBox.empty(),this.listadapter.list.length>0){var o=function(e){r.rootBox.append(e)};n.each(o)}else this.autoEmptyView&&this.rootBox.append('<div class="cui-load-error"><div class="cui-i cui-wifi cui-exclam"></div>'+this.noResultText+"</div>");this.rootBox.show(),this.onUpdateFinished&&"function"==typeof this.onUpdateFinished&&this.onUpdateFinished()},s.onUpdatePrepared=function(){},s.onUpdateFinished=function(){},s.openAutoEmptyView=function(){this.autoEmptyView=!0},s.closeAutoEmptyView=function(){this.autoEmptyView=!1};var o=new e.Class(t.AbstractView,s);n.register({name:r,fn:o})}}),define("cCommonListPage",["libs","cUI","cBasePageView","cWidgetFactory","cCommonPageFactory","cWidgetListView"],function(e,t,n,r,i){var s="CommonListPage";if(!i.hasPage(s)){var o=o||{};o.injectListView=function(e){e.workspace||(e.workspace=$(this.defaultHtml)),this.$el.append(e.workspace),e.container=e.container?this.$el.find(e.container):e.workspace.find("#c-list-view-container");var t=r.create("ListView");this.listview=new t(e)},o._onWidnowScroll=null,o.__isComplete__=!1,o.__isLoading__=!1,o.bottomLoading=null,o.addScrollListener=function(){this.__isComplete__=!1,this.__isLoading__=!1,$(window).bind("scroll",this._onWidnowScroll)},o.removeScrollListener=function(){$(window).unbind("scroll",this._onWidnowScroll),this.bottomLoading&&(this.bottomLoading.remove(),this.bottomLoading=null)},o.onWidnowScroll=function(){var e=t.Tools.getPageScrollPos();if(0!=e.top){var n=e.pageHeight-(e.top+e.height);81>=n&&!this.__isComplete__&&!this.__isLoading__&&(this.__isLoading__=!0,this.onBottomPull&&this.onBottomPull())}},o.closeBottomPull=function(){this.__isComplete__=!0},o.endPull=function(){this.__isLoading__=!1},o.showBottomLoading=function(){this.bottomLoading||(this.bottomLoading=$('<div class="cui-zl-load" id="zlLoading" style=""> <div class="cui-i cui-b-loading"></div><div class="cui-i  cui-mb-logo"></div> <p>加载中</p></div>')),this.$el.append(this.bottomLoading),this.bottomLoading.show()},o.hideBottomLoading=function(){this.bottomLoading&&this.bottomLoading.hide(),this.__isLoading__=!1},o.defaultHtml='<section class="res_list"><ul class="res_list_tab_arr_r" id="c-list-view-container"></ul></section>';var u=n.extend(o);i.register({name:s,fn:u})}}),define("cWidgetSlide",["cBase","cUICore","cWidgetFactory","libs"],function(e,t,n){var r="Slide";if(!n.hasWidget(r)){var i=0,s=new e.Class({__propertys__:function(){this.images=[],this.index=1,this.delay=3,this.defaultIndex,this.autoplay=!1,this.root,this.imageinter,this.imageouter,this.navbox,this.navs,this.navinter,this.container,this.interWidth,this.itemWidth,this.onchange=function(){},this.onerror=function(){},this.loop=!0,this.ENUM_STATE_EMPTY=0,this.ENUM_STATE_NOTEMPTY=1,this.state=this.ENUM_STATE_EMPTY,this.notimage="",this.notimagedom,this.setTimeoutResoure,this.isMove=!1,this.isadaptive=!1,this.dirs={left:"next",right:"pre"},this.dir="left",this.startX=0,this.startY=0},initialize:function(e){this.setOption(e),this.createLayout(),this.addImageItems();var n=function(){this.calcinterWidth(),this.state===this.ENUM_STATE_NOTEMPTY&&(this.initposition(),this.autoplay&&this.play(),this.images&&this.images.length>1&&this.buildEvent())};setTimeout($.proxy(n,this),0);var r=this;this.isadaptive&&$(window).on("resize",function(){r.calcinterWidth(),r.initposition();var e=0;$("."+t.config.prefix+"slide-img-item img").each(function(t,n){$(n).height()>e&&(e=$(n).height())}),r.imageinter.height(e),r.imageouter.height(e),r.container.height(e)})},setOption:function(e){for(var t in e)switch(t){case"autoplay":case"defaultIndex":case"container":case"notimage":case"delay":case"dir":case"loop":case"onchange":case"onerror":case"isadaptive":this[t]=e[t];break;case"images":if(e[t]&&"string"==typeof e[t][0]){for(var n=[],r=0,i=e[t].length;i>r;r++)n.push({src:e[t][r]});this[t]=n}else this[t]=e[t]}},calcinterWidth:function(){var e=this.imageinter.find("."+t.config.prefix+"slide-img-item"),n=0;this.interWidth=n,this.itemWidth=this.imageouter.width(),e.css("width",this.itemWidth+"px"),e.each(function(){n+=$(this).width()}),this.imageinter.css("width",n+"px")},createLayout:function(){this.root=$(['<div class="'+t.config.prefix+'slide">','<div class="'+t.config.prefix+'slide-imgsouter">','<div class="'+t.config.prefix+'slide-imgsinter">',"</div>","</div>",'<div class="'+t.config.prefix+'slide-nav">','<div class="'+t.config.prefix+'slide-nav-padding">',"</div>","</div>","</div>"].join("")),this.imageouter=this.root.find("."+t.config.prefix+"slide-imgsouter"),this.imageinter=this.root.find("."+t.config.prefix+"slide-imgsinter"),this.navbox=this.root.find("."+t.config.prefix+"slide-nav"),this.navinter=this.root.find("."+t.config.prefix+"slide-nav-padding"),this.isadaptive&&this.container.height(i),this.container.empty().append(this.root)},createImageItem:function(e,n,r){var i=[t.config.prefix+"slide-img-item"];n&&i.push(t.config.prefix+"slide-img-item-current"),r&&[].push.call(i,r);var s=$(['<div class="'+i.join(" ")+'">','<a href="'+(e.link?e.link:"javascript:void(0);")+'"><img src="'+e.src+'" title="'+(e.title||"")+'"/></a>',"</div>"].join("")),o=this;return s.find("img").bind("error",function(){var e=this;setTimeout(function(){o.notimage&&(e.src=o.notimage),o.onerror&&o.onerror(e),$(e).unbind("error")},100)}),s},addImageItems:function(){for(var e=0,n=this.images.length;n>e;e++)this.addItem(this.images[e],this.defaultIndex===e);var r,i;if(this.images.length){if(this.state=this.ENUM_STATE_NOTEMPTY,r=this.createImageItem(this.images[0],null,[t.config.prefix+"slide-img-pre"]),i=this.createImageItem(this.images[Math.max(0,this.images.length-1)],null,[t.config.prefix+"slide-img-last"]),this.loop||(r.css({visibility:"hidden"}),i.css({visibility:"hidden"})),this.isadaptive){var s=this,o=r.find("img");o.on("load",function(){s.container.height(o.height())})}this.imageinter.append(r),this.imageinter.prepend(i),this.navs=this.navinter.find("."+t.config.prefix+"slide-nav-item")}else this.state=this.ENUM_STATE_EMPTY,this.addEmptyItem(this.notimage)},initposition:function(){this.go(this.index,function(){},!0),this.onchange(this.index,this.index);var e=this.calcNextIndex();this.setNavCurrent(e)},addEmptyItem:function(e){var n=[t.config.prefix+"slide-img-item",t.config.prefix+"slide-img-item-empey"];this.notimagedom=$('<div class="'+n.join(" ")+'"></div>'),this.notimagedom.append(e),this.imageinter.append(this.notimagedom)},buildEvent:function(){this.imageouter.bind("touchstart",$.proxy(this.onTouchStart,this)),this.imageouter.bind("touchmove",$.proxy(this.onTouchMove,this)),this.imageouter.bind("touchend",$.proxy(this.onTouchEnd,this)),this.imageouter.bind("touchcancel",$.proxy(this.onTouchEnd,this))},onTouchStart:function(e){if(e.preventDefault(),this.isMove)return void (this.isTouchStart=!1);this.isTouchStart=!0;var n=t.Tools.getMousePosOfElement(e.targetTouches[0],e.currentTarget);this.stop(),this.startX=n.x,this.startY=n.y,this.imageinterLeft=parseInt(this.imageinter.css("left"))},onTouchMove:function(e){if(e.preventDefault(),!this.isMove&&this.isTouchStart){var n=t.Tools.getMousePosOfElement(e.targetTouches[0],e.currentTarget),r=n.x-this.startX;n.y-this.startY,this.imageinter.css("left",this.imageinterLeft+r+"px")}},onTouchEnd:function(e){if(e.preventDefault(),!this.isMove&&this.isTouchStart){var n=t.Tools.getMousePosOfElement(e.changedTouches[0],e.currentTarget),r=n.x-this.startX,i=(n.y-this.startY,$.proxy(function(){this.autoplay&&this.loop&&this.play()},this)),s=this.calcNextIndex()+1,o=this.images.length;r>50&&this.loop||r>50&&!this.loop&&1!==s?this.pre(i):-50>r&&this.loop||-50>r&&!this.loop&&o>s?this.next(i):this.imageinter.animate({left:this.imageinterLeft+"px"},null,i)}},createNavItem:function(e){return $(['<span class="'+t.config.prefix+"slide-nav-item"+(e?t.config.prefix+"slide-nav-item-current":"")+'"></span>'].join(""))},addItem:function(e,t){var n=this.createImageItem(e,t),r=this.createNavItem(t);this.imageinter.append(n),this.navinter.append(r)},play:function(){clearInterval(this.setTimeoutResoure),!this.images||this.images.length<2||(this.setTimeoutResoure=setInterval($.proxy(function(){this[this.dirs[this.dir]]()},this),1e3*this.delay))},stop:function(){clearInterval(this.setTimeoutResoure)},go:function(e,t,n){this.isMove=!0;var r=-(this.itemWidth*e);n?(this.imageinter.css({left:r+"px"}),this.isMove=!1,t&&t()):this.imageinter.animate({left:r+"px"},null,null,$.proxy(function(){this.isMove=!1,t&&t()},this))},next:function(e){var t=this.index;this.go(++this.index,$.proxy(function(){if(this.index===this.images.length+1){this.index=1;var n=-(this.itemWidth*this.index);this.imageinter.css({left:n+"px"})}var r=this.calcNextIndex();this.setNavCurrent(r),this.onchange(this.index,t),e&&e()},this))},setNavCurrent:function(e){this.navs.removeClass(t.config.prefix+"slide-nav-item-current"),$(this.navs.get(e)).addClass(t.config.prefix+"slide-nav-item-current")},calcNextIndex:function(){return this.index>this.images.length?0:this.index-1},pre:function(e){0==this.index&&(this.index=1);var t=this.index;this.go(--this.index,$.proxy(function(){if(0===this.index){this.index=this.images.length;var n=-(this.itemWidth*this.index);this.imageinter.css({left:n+"px"})}var r=this.calcPreIndex();this.setNavCurrent(r),this.onchange(this.index,t),e&&e()},this))},calcPreIndex:function(){return this.index<1?Math.max(0,this.images.length-1):this.index-1},empty:function(){this.stop(),this.imageinter.find("img").remove()}});n.register({name:r,fn:s})}}),define("HotelBaseModel",["cModel","cBase","CommonStore","cUtility"],function(e,t,n,r){e.baseurl=function(){var t=location.host,n=this.protocol||location.protocol.replace(":",""),i="m.ctrip.com",s="hotelapi";return r.isInApp()?r.isPreProduction()=="1"?(i="10.8.2.111",s="hotelapi"):r.isPreProduction()=="0"?(i="m.fat63.qa.nt.ctripcorp.com",s="hotelapi"):r.isPreProduction()=="2"?(e.isHttps(n)?i="restful.m.uat.qa.ctripcorp.com":i="m.uat.qa.ctripcorp.com",s="hotelapi"):(i="m.ctrip.com",s="hotelapi"):t.match(/^(localhost|172\.16|127\.0|192\.168)/i)?(i="m.fat63.qa.nt.ctripcorp.com",s="hotelapi"):t.match(/^m.fat/i)||t.match(/^m.test/i)?(i="m.fat63.qa.nt.ctripcorp.com",s="hotelapi"):t.match(/^m\.uat\.qa/i)?(e.isHttps(n)?i="restful.m.uat.qa.ctripcorp.com":i="m.uat.qa.ctripcorp.com",s="hotelapi"):t.match(/10\.8/ig)?(i="10.8.2.111",s="hotelapi"):(i="m.ctrip.com",s="hotelapi"),{domain:i,path:s}};var i=e.prototype.excute,s=n.UnionStore.getInstance(),o=t.Class(e,{__propertys__:function(){},initialize:function($super,e){$super(e)},excute:function(){var e=s.getAttr("AllianceID"),t=s.getAttr("SID"),n=s.getAttr("OUID");(e||t||n)&&this.setParam({alliance:{aid:e||"",sid:t||"",ouid:n||""}}),i.apply(this,arguments)}});return o}),define("HotelStore",["cStore","cBase","cUtility","cSessionStore"],function(e,t,n,r){var i={};i.SearchHotelList=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_SEARCHLIST",this.lifeTime="3M",this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.cityListStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_CITYLIST",this.lifeTime="30D",this.defaultData={inland:{categoryCities:null,cityList:null,historyCities:null,hotCities:null,wordList:null},oversea:null}},initialize:function($super,e){$super(e)}}),i.protoCityListStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_CITYLIST_PROTOCITYLIST",this.lifeTime="30D",this.defaultData={inland:[],oversea:[]}},initialize:function($super,e){$super(e)}}),i.renderCategoryCitiesStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_CITYLIST_RENDERCATEGORYCITIES",this.lifeTime="30D",this.defaultData={inland:[],oversea:[]}},initialize:function($super,e){$super(e)}}),i.renderHisHotCityListStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_CITYLIST_RENDERHISHOTCITYLIST",this.lifeTime="30D",this.defaultData={inland:{historyCities:null,hotCities:null},oversea:null}},initialize:function($super,e){$super(e)}}),i.wordsCityListStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_CITYLIST_WORDSCITYLIST",this.lifeTime="30D",this.defaultData={inland:[],oversea:[]}},initialize:function($super,e){$super(e)}}),i.hotelDetailStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_DETAIL",this.lifeTime="1D"},initialize:function($super,e){$super(e)}}),i.queryStore=new t.Class(e,function(){var e={detailHtml:{id:0,setInfo:{cityId:0,dstId:0,inDay:"",outDay:""},pay:0,contrl:2,needRoom:!0,num:0,biz:1,sourBiz:0,priceBiz:0,icldrid:0,alliance:{aid:0,ouid:"",sid:0},membertype:null}};return{__propertys__:function(){this.key="P_HOTEL_QUERYSTORE",this.lifeTime="1D",this.defaultData={detailHtml:e.detailHtml}},initialize:function($super,e){$super(e)},formatDefaultData:function(t){var n=this.getAttr(t);if(!_.isEmpty(t)){if(!n)throw"the html name "+t+" is not found!";return this.setAttr(t,e[t]),this}throw"the html name is required!"}}}()),i.SearchHotelList=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_SEARCHLIST",this.lifeTime="1D",this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.SearchParam=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_SEARCHPARAM",this.lifeTime="1D",this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.SearchHoteCommonlList=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_COMMONSEARCHLIST",this.lifeTime="1D",this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.TuanStatusStore=new t.Class(e,{__propertys__:function(){this.key="COMMON_TUAN_STATUS",this.lifeTime="30S"},initialize:function($super,e){$super(e)}});var s=new t.Class(e,{__propertys__:function(){this.lifeTime="2D",this.defaultData={hotelType:0,hotelId:"",backUrl:"",backAction:"",kwd:"",count:0,custPt:0,faclPt:0,raatPt:0,ratPt:0,servPt:0}},initialize:function($super,e){$super(e)}});i.TuanCommentListStore=new t.Class(e,{__propertys__:function(){this.key="TUAN_COMMENTLIST",this.lifeTime="10S"},initialize:function($super,e){$super(e)}}),i.HotelCommentListStore=new t.Class(e,{__propertys__:function(){this.key="HOTEL_COMMENTLIST",this.lifeTime="10S"},initialize:function($super,e){$super(e)}}),i.HXHotelInfoStore=new t.Class(e,{__propertys__:function(){this.key="HXHOTEL_INFO",this.lifeTime="30M"},initialize:function($super,e){$super(e)}}),i.HXHotelInfoParamStore=new t.Class(e,{__propertys__:function(){this.key="HXHOTEL_INFO_PARAM",this.lifeTime="30M"},initialize:function($super,e){$super(e)}}),i.HotelInfoStore=new t.Class(e,{__propertys__:function(){this.key="HOTEL_INFO",this.lifeTime="30M"},initialize:function($super,e){$super(e)}}),i.HotelInfoParamStore=new t.Class(e,{__propertys__:function(){this.key="HOTEL_INFO_PARAM",this.lifeTime="30M"},initialize:function($super,e){$super(e)}}),i.CommentListParamStore=new t.Class(e,{__propertys__:function(){this.key="COMMENTLIST_PARAM",this.lifeTime="30M"},initialize:function($super,e){$super(e)}}),i.ExplainPageStore=new t.Class(e,{__propertys__:function(){this.key="EXPLAIN_PAGE",this.lifeTime="30M"},initialize:function($super,e){$super(e)}}),i.CustomerHotelOrderId=new t.Class(e,{__propertys__:function(){this.key="CUSTOMER_HOTELORDER_ID",this.lifeTime="5H"},initialize:function($super,e){$super(e)}}),i.CustomerHotelOrderDetailStore=new t.Class(e,{__propertys__:function(){this.key="CUSTOMER_HOTELORDER_DETAIL",this.lifeTime="3M",this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HotelQueryStore=new t.Class(e,function(){var e={city:{cEN:"",cJP:"",cPY:"",cTryEN:"",cfrl:"",cityId:0,cname:"",ctryCN:"",ctryId:0,did:0,hot:0,idx:0,state:"0",stateEN:"0",type:0}};return{__propertys__:function(){this.key="S_HOTEL_QUERY",this.lifeTime="2D",this.defaultData={value:{brand_filter:null,inDay:(new t.Date(t.getServerDate())).format("Y-m-d"),outDay:(new t.Date(t.getServerDate())).addDay(1).format("Y-m-d"),query:[],kwText:"",kwCurCatType:"",kwCurVal:null,kwHasGeos:null},city:e.city,isSearchListWithCity:!0,address:null}},initialize:function($super,e){$super(e)},formatDefaultData:function(t){var n=this.getAttr(t);if(!_.isEmpty(t)){if(!n)throw"the html name "+t+" is not found!";return this.setAttr(t,e[t]),this}throw"the html name is required!"}}}()),i.MENU_BUSINESS=1,i.MENU_REGION=2,i.MENU_METRO=3,i.MENU_AIRPORT=4,i.MENU_BRAND=5,i.MENU_EVENT=6,i.MENU_SPOT=9,i.MENU_FEATURE=8,i.MENU_DISTANCE=20,i.MENU_FACILITY=30,i.MENU_PAYS=40,i.MENU_BOOKABLE=50,i.MENU_BARGAIN=60,i.MENU_AFFIRM=70,i.MENU_PRICE=80,i.MENU_STAR=90,i.MENU_AREA=100,i.MENUS=[i.MENU_BUSINESS,i.MENU_REGION,i.MENU_METRO,i.MENU_AIRPORT,i.MENU_BRAND,i.MENU_EVENT,i.MENU_FEATURE,i.MENU_SPOT];var o={getCurTab:function(){return this.getAttr(this.buildPrefix()+"curtab."+this.getCurrentBranch())},setCurTab:function(e){this.setAttr(this.buildPrefix()+"curtab."+this.getCurrentBranch(),e)},clearCurTab:function(){this.setAttr(this.buildPrefix()+"curtab."+this.getCurrentBranch(),null)},delSelectOfType:function(e,t){var n=this;if(typeof t=="undefined")_.isArray(e)?_.each(e,function(e){n.setAttr(n.buildPrefix()+"selected."+n.getCurrentBranch()+"."+e,{})}):this.setAttr(this.buildPrefix()+"selected."+n.getCurrentBranch()+"."+e,{});else if(typeof e=="undefined")this.setAttr(this.buildPrefix()+"selected"+n.getCurrentBranch(),{});else{var r=this.getAttr(this.buildPrefix()+"selected."+n.getCurrentBranch()+"."+e)||{};_.isArray(t)?_.each(t,function(e){delete r[e]}):delete r[t],this.setAttr(this.buildPrefix()+"selected."+n.getCurrentBranch()+"."+e,r)}},getSelectOfType:function(e){var t=this.getAttr(this.buildPrefix()+"selected."+this.getCurrentBranch()+"."+e);return _.isBoolean(t)?t:t||null},addSelectOfType:function(e,t,n){n=n||!0;var r=this.getSelectOfType(e)||{};_.isArray(t)?_.each(t,function(e){typeof r[e]!="undefined"&&(r[e]=n)}):_.isObject(t)?_.each(t,function(e,t){r[t]=e}):_.isBoolean(t)?r=t:typeof r[t]=="undefined"&&(r[t]=n),this.setAttr(this.buildPrefix()+"selected."+this.getCurrentBranch()+"."+e,r)},clearSelectOftype:function(){this.setAttr(this.buildPrefix()+"selected."+this.getCurrentBranch(),{})},getSelectedId:function(){var e=this.getAttr(this.buildPrefix()+"selected."+this.getCurrentBranch()),t={};return _.each(e,function(e,n){t[n]={title:"",select:{}},_.each(e,function(e,r){_.isObject(e)?_.each(e,function(e,r){isNaN(r)?t[n].title=e:t[n].select[r]||(t[n].select[r]=e)}):t[n].select[r]||(t[n].select[r]=e)})}),t},getAllSelect:function(){var e=this.getAttr(this.buildPrefix()+"selected."+this.getCurrentBranch())||{},t={};return _.each(e,function(e,n){if(!_.isEmpty(e)||typeof e=="boolean")t[n]=e}),t},buildPrefix:function(){return this.prefix?this.prefix.indexOf(".")>-1?this.prefix:this.prefix+".":""},prefix:"",switchPrefix:function(e){this.prefix=e},BRANCH_TYPE_MASTER:"master",BRANCH_TYPE_PHANTOM:"phantom",switchBranch:function(e){this.setAttr("__branchName__",e)},getCurrentBranch:function(){return this.getAttr("__branchName__")||this.BRANCH_TYPE_MASTER},switchMasterBranch:function(){this.switchBranch(this.BRANCH_TYPE_MASTER)},switchPhantomBranch:function(){this.switchBranch(this.BRANCH_TYPE_PHANTOM)},cpMasterToPhantomBranch:function(){var e=this.getAttr(this.buildPrefix()+"selected."+this.BRANCH_TYPE_MASTER)||{};this.setAttr(this.buildPrefix()+"selected."+this.BRANCH_TYPE_PHANTOM,e)},cpPhantomToMasterBranch:function(){var e=this.getAttr(this.buildPrefix()+"selected."+this.BRANCH_TYPE_PHANTOM)||{};this.setAttr(this.buildPrefix()+"selected."+this.BRANCH_TYPE_MASTER,e)},clearPhantomBranch:function(){this.setAttr(this.buildPrefix()+"selected."+this.BRANCH_TYPE_PHANTOM,{})},setMasterBranchData:function(e){this.setAttr(this.buildPrefix()+"selected."+this.BRANCH_TYPE_MASTER,e)},getBAttr:function(e){var t=this.buildPrefix();return this.getAttr((t?t+".":"")+this.getCurrentBranch()+"."+e)},setBAttr:function(e,t){var n=this.buildPrefix();this.setAttr((n?n+".":"")+this.getCurrentBranch()+"."+e,t)},getB:function(){var e=this.buildPrefix();return this.getAttr((e?e+".":"")+this.getCurrentBranch())},setB:function(e){var t=this.buildPrefix();this.setAttr((t?t+".":"")+this.getCurrentBranch(),e)}};return i.HotelFilterStore=new t.Class(e,_.extend({__propertys__:function(){this.key="S_HOTEL_FILTER",this.lifeTime="2D",this.defaultData={}},initialize:function($super,e){$super(e)}},o)),i.HotelAreaFilterStore=new t.Class(i.HotelFilterStore,_.extend({__propertys__:function(){this.key="S_HOTEL_AREA_FILTER",this.lifeTime="2D"},initialize:function($super,e){$super(e)}},o)),i.HotelFilterTypeStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_FILTER_TYPE",this.lifeTime="2D"},initialize:function($super,e){$super(e)}}),i.HotelRemoteFilterDataStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_REMOTE_FILTER_DATA",this.lifeTime="10D"},initialize:function($super,e){$super(e)}}),i.HotelFilterTypeParamStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_FILTER_TYPE_PARAM",this.lifeTime="2D",this.defaultData={cityId:2,cidate:"2014/04/23",codate:"2014/05/25",type:255}},initialize:function($super,e){$super(e)}}),i.HotelFilterBrandCondStore=new t.Class(e,_.extend({__propertys__:function(){this.key="S_HOTEL_FILTER_BRAND_COND",this.lifeTime="2D"},initialize:function($super,e){$super(e)}},o)),i.HotelFilterSubPageStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_FILTER_SUB_PAGE",this.lifeTime="2D"},initialize:function($super,e){$super(e)}}),i.HotelFilterTempStore=new t.Class(i.HotelFilterStore,_.extend({__propertys__:function(){this.key="S_HOTEL_FILTER_TEMP",this.lifeTime="2D"},initialize:function($super,e){$super(e)}},o)),i.HotelFilterTempStore.PREFIX_PRICE="price",i.HotelFilterTempStore.PREFIX_STAR="star",i.HotelFilterTempStore.PREFIX_DISTANCE="distance",i.HotelFilterTempStore.PREFIX_EVENT="event",i.HotelFilterTempStore.PREFIX_FACILITY="facility",i.HotelFilterTempStore.PREFIX_FEATURE="feature",i.HotelFilterTempStore.PREFIX_PAY="pay",i.HotelBookingFormStore=new t.Class(e,{__propertys__:function(){this.key="F_HOTEL_BOOKING_FORM",this.lifeTime="1D",this.isUserData=!0,this.defaultData={roominfo:{num:1},contact:{confirm:1},invoice:{},remks:[],price:{}}},initialize:function($super,e){$super(e)}}),i.HotelBookingCheckRequestStore=new t.Class(e,{__propertys__:function(){this.key="U_HOTEL_BOOKING_CHECK_REQUEST",this.lifeTime="1D",this.isUserData=!0,this.defaultData={}},initialize:function($super,e){$super(e)}}),i.HotelBookingCheckStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_BOOKING_CHECK_REQUEST",this.lifeTime="1D",this.isUserData=!0,this.defaultData={}},initialize:function($super,e){$super(e)}}),i.HotelBookingResultStore=new t.Class(e,{__propertys__:function(){this.key="U_HOTEL_BOOKING_RESULT",this.lifeTime="1D",this.isUserData=!0,this.defaultData={oid:0,rc:!1,rmsg:"",scode:"",sexpire:"",extno:"",rrefs:{modul:1,key:1,msg:""},hotelName:"",coupon:0,price:0,pay:0}},initialize:function($super,e){$super(e)}}),i.HotelPassengerPhoneStore=new t.Class(e,{__propertys__:function(){this.key="U_HOTEL_PASSENGER_PHONE",this.lifeTime="30D",this.isUserData=!0,this.defaultData={phone:""}},initialize:function($super,e){$super(e)}}),i.HotelQueryKeywordsFilterStore=new t.Class(e,{__propertys__:function(){this.key="U_HOTEL_QUERY_FILTER",this.lifeTime="30D",this.defaultData={value:{cityId:2,cidate:"",codate:"",filterOptionSet:0,count:0}}},initialize:function($super,e){$super(e)}}),i.HotelKWHistoryStore=new t.Class(e,{__propertys__:function(){this.key="U_HOTEL_KEYWORD_HISTORY",this.lifeTime="30D",this.defaultData={value:{hisList:[]}}},initialize:function($super,e){$super(e)}}),i.SelectedCityStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_SELECTCITY",this.lifeTime="1M",this.defaultData={cityId:0,dstId:0,cname:"",state:"",ctry:"",gps:{}}},initialize:function($super,e){$super(e)}}),i.Morning=new t.Class(e,{__propertys__:function(){this.key="U_HOTEL_ISMORNING",this.lifeTime="12H",this.defaultData=!1},initialize:function($super,e){$super(e)},isMorning:function(){var e=i.HotelQueryStore.getInstance(),n=e.getAttr("inDay"),r=t.getServerDate(),s=r.getHours();if(s>=6)return this.set(!1),!1;if(n){n=t.Date.parse(n).date;var o=t.getServerDate();o.setHours(0),o.setMinutes(0),o.setMilliseconds(0),o.setSeconds(0),n<o&&(this.set(!0),e.setAttr("inDay",(new t.Date(o)).format("Y-m-d")))}else this.set(!1);return!!this.get()},setStatus:function(e){this.set(!!e)}}),i.HotelAreaFilterPageStore=new t.Class(e,{__propertys__:function(){this.key="S_HOTEL_AREA_FILTER_PAGE",this.lifeTime="10D"},initialize:function($super,e){$super(e)}}),i.filterData={},i.filterData.prices={"0,150":"¥150元以下","150,300":"¥150-¥300","301,450":"¥301-¥450","451,600":"¥451-¥600","601,1000":"¥601-¥1000",1e3:"¥1000以上"},i.filterData.stars={liansuo:"快捷连锁","0|1|2":"二星级及以下/经济",3:"三星级/舒适",4:"四星级/高档",5:"五星级/豪华"},i.filterData.facilitys={1:"免费无线",2:"停车场",4:"酒店公寓",8:"含早餐",16:"三人房/家庭房",32:"免费有线",64:"游泳池",128:"接送服务",256:"健身房",512:"穿梭机场巴士",1024:"大床房",2048:"双床房",4096:"新装修/新开业"},i.filterData.pays={1:"预付",2:"现付",4:"支持礼品卡"},i.filterData.distance={500:"500米以内",1e3:"1公里以内",2e3:"2公里以内",4e3:"4公里以内",8e3:"8公里以内",1e4:"10公里以内"},i.filterData.singleCheck={},i.filterData.singleCheck[i.MENU_BOOKABLE]="and,4093",i.filterData.singleCheck[i.MENU_BARGAIN]="or,64",i.filterData.singleCheck[i.MENU_AFFIRM]="or,256",i.filterDataKeyMap={},i.filterDataKeyMap[i.MENU_DISTANCE]="distance",i.filterDataKeyMap[i.MENU_PAYS]="pays",i.filterDataKeyMap[i.MENU_FACILITY]="facilitys",i.filterDataKeyMap[i.MENU_STAR]="stars",i.filterDataKeyMap[i.MENU_PRICE]="prices",i.filterQuerySettingMap={},i.filterQuerySettingMap[i.MENU_PRICE]=1,i.filterQuerySettingMap[i.MENU_STAR]=2,i.filterQuerySettingMap[i.MENU_BRAND]=3,i.filterQuerySettingMap[i.MENU_REGION]=4,i.filterQuerySettingMap[i.MENU_BUSINESS]=5,i.filterQuerySettingMap[i.MENU_METRO]=6,i.filterQuerySettingMap[i.MENU_EVENT]=15,i.getFilterListData=function(e){var t;return(t=i.filterDataKeyMap[e])?i.filterData[t]:null},i.getFilterFieldTitle=function(e,t){var n=i.getFilterListData(e);return n?n[t]||null:null},i.HotelSubChannelParamStore=new t.Class(e,{__propertys__:function(){this.key="X_HOTEL_SUBCHANNEL",this.lifeTime="7D"},initialize:function($super,e){$super(e)}}),i.AddHotelFavoriteStore=new t.Class(e,{__propertys__:function(){this.key="P_HOTEL_ADDFAVORITE",this.lifeTime="1D",this.isUserData=!0},initialize:function($super,e){$super(e)}}),i}),define("HotelModel",["HotelBaseModel","OldRestfulModel","cBase","HotelStore"],function(e,t,n,r){var i={},s=new n.Class(e,{__propertys__:function(){this.method="POST",this.param={bdate:"",edate:"",pid:0,ext:"",flag:0,ver:0}},initialize:function($super,e){$super(e)}});i.cityListModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/static/cityget",this.method="POST",this.param={}},initialize:function($super,e){$super(e)}}),i.cityListSearchOverseaModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/static/overseacityget",this.method="POST",this.param={}},initialize:function($super,e){$super(e)}}),i.hotelDetailModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/product/hoteldetailget",this.param={},this.method="POST",this.result=r.hotelDetailStore.getInstance()},initialize:function($super,e){$super(e)}}),i.hotelFavorite=new n.Class(e,{__propertys__:function(){this.url="/hotel/Favorite/Edit",this.param={},this.method="POST"},initialize:function($super,e){$super(e)}}),i.TuanStatusModel=new n.Class(s,{__propertys__:function(){this.url="/Group/Room/Status/Query",this.result=r.TuanStatusStore.getInstance()},initialize:function($super,e){$super(e)}});var o=new n.Class(e,{__propertys__:function(){this.method="POST",this.param={ext:"",flag:0,hotelId:0,pageIdx:1,ver:0}},initialize:function($super,e){$super(e)}});i.TuanCommentListModel=new n.Class(e,{__propertys__:function(){this.url="/Group/CommentList/Query",this.result=r.TuanCommentListStore.getInstance(),this.param=r.CommentListParamStore.getInstance(),this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HotelCommentListModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/product/commentget",this.method="POST",this.result=r.HotelCommentListStore.getInstance(),this.param=r.CommentListParamStore.getInstance(),this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HXHotelInfoModel=new n.Class(e,{__propertys__:function(){this.method="POST",this.url="/hotel/product/hoteldetailget",this.result=r.HXHotelInfoStore.getInstance(),this.param=r.HXHotelInfoParamStore.getInstance()},initialize:function($super,e){$super(e)}}),i.CustomerHotelOrderDetailModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/Order/Query",this.method="POST",this.param={ver:1,id:0,flag:9,status:0},this.result=r.CustomerHotelOrderDetailStore.getInstance(),this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.CustomerHotelOrderCancelModel=new n.Class(t,{__propertys__:function(){var e=location.host;this.url="/Hotel/order/cancel",this.method="POST",this.param={ver:1,oid:0,reason:""},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.SearchHotelList=new n.Class(e,{__propertys__:function(){this.url="/Hotel/Product/HotelGet",this.method="POST",this.param={},this.result=r.SearchHotelList.getInstance(),this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.SearchHoteCommonlList=new n.Class(e,{__propertys__:function(){this.url="/Hotel/product/commonhotelget",this.method="POST",this.param={},this.result=r.SearchHoteCommonlList.getInstance(),this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HotelOrderCreateModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/booking/orderpost",this.method="POST",this.param={},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.NonmemberLoginModel=new n.Class(t,{__propertys__:function(){this.url="/User/Nonmember/Login",this.method="POST",this.param={},this.isUserData=!0,this.protocol="https"},initialize:function($super,e){$super(e)}}),i.BookingCheckModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/booking/bookcheckpost",this.method="POST",this.param={},this.result=r.HotelBookingCheckStore.getInstance(),this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.PaymentModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/payment/submitpost",this.method="POST",this.param={},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.PaymentThirdModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/payment/thridsubmitpost",this.method="POST",this.param={},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HotelFilterTypeModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/static/filtertypeget",this.method="POST",this.isUserData=!0,this.param=r.HotelFilterTypeParamStore.getInstance(),this.result=r.HotelFilterTypeStore.getInstance(),this.keyMaps},initialize:function($super,e){$super(e)},getAreaTitles:function(e,t,n,r){var i=this,s=function(n){var s=this.keyMaps||this._getkeyMaps(n),o={};_.each(e,function(e,t){var r=s[t];if(!r){o[t]=null;return}o[t]={};var u,a;i._dispose[t]&&(_.isArray(e)?(u={},_.each(e,function(e,s){a=i._dispose[t].call(i,e.id,t,n[r]||{},e.sid),u[e.id]=a}),o[t]=u):o[t]=i._dispose[t].call(i,e.id,t,n[r]||{},e.sid))}),t.call(r||this,o)},i=this;this.excute(function(e){s.call(i,e)},function(e){n&&n(e)},!1,r||this)},getAreaInfos:function(e,t,n,r){e=e||{};var i=this,s=parseInt(e.mtype),o=e.id,u=e.sid,a=function(e){var n=this.keyMaps||this._getkeyMaps(e),a={};if(s!==-1){var f=n[s];if(!f){t.call(r||this,null);return}}a[s]={};var l,c,h;i._dispose[s]&&(h=(s===-1?e:e[f])||{},s===-1?a=i._dispose[s].call(i,o,s,h,u,f):a[s]=i._dispose[s].call(i,o,s,h,u,f)),t.call(r||this,a)},i=this;this.excute(function(e){a.call(i,e)},function(e){n&&n(e)},!1,r||this)},getTitles:function(e,t,n,r){var i=this,s=function(n){var s=this.keyMaps||this._getkeyMaps(n),o={};_.each(e,function(e,t){var r=s[t];if(!r){o[t]=null;return}o[t]={};var u,a;i._dispose[t]&&(_.isArray(e)?(u={},_.each(e,function(e,s){a=i._dispose[t].call(i,e,t,n[r]||{}),u[e]=a}),o[t]=u):(u={},u[e]=i._dispose[t].call(i,e,t,n[r]||{}),o[t]=u))}),t.call(r||this,o)},i=this;this.excute(function(e){s.call(i,e)},function(){n&&n()},!1,r||this)},_getkeyMaps:function(e){var t={};return _.each(e,function(e,n){e&&e.mtype&&(t[e.mtype]=n)}),this.keyMaps=t},_cache:{},_substrateCache:{},_subcache:{},_subextra:{},_airportsextra:{},_dispose:{"-1":function(e,t,n,r,i){var s=n.ariportObj,o=this._dispose[4].call(this,e,4,s||{});if(o&&o.title)return o.mtype=4,o={4:o},o;var u=n.spotObj,a=this._dispose[9].call(this,e,9,u||{});return a&&a.title?(a.mtype=9,a={9:a},a):{id:e,title:""}},1:function(e,t,n){var r={},i=this._cache[t]||function(e){var n={};return _.each(e.zones||[],function(e,t){n[e.id]=e.name}),this._cache[t]=n}.call(this,n);return r.id=e,r.mtype=1,r.title=i[e],r},2:function(e,t,n){var r={},i=this._cache[t]||function(e){var n={};return _.each(e.locations||[],function(e,t){n[e.id]=e.name}),this._cache[t]=n}.call(this,n);return r.id=e,r.mtype=2,r.title=i[e],r},3:function(e,t,n,r){var i=this._cache[t]||function(e){var n={},r={};return _.each(e.metros||[],function(e,t){n[e.metId]=e.metName,r[e.metId]=e.stations}),this._substrateCache[t]=r,this._cache[t]=n}.call(this,n),s={};!e&&r&&(e=this._getIdBySid(this._substrateCache[t],r)),s.id=e,s.mtype=3,i[e]&&(s.title=i[e]);if(r>-1){var o=this._subcache[t+"_"+e]||function(){var n={},r={};return _.each(this._substrateCache[t][e],function(e,t){n[e.sid]=e.sname,r[e.sid]=e}),this._subextra[t+"_"+e]=r,this._subcache[t+"_"+e]=n}.call(this,n),u=this._subextra[t+"_"+e]||{};if(o[r]){var a=u[r]||{};s.sid=r,s.sname=o[r],s.lat=a.cordinfo&&a.cordinfo.lat,s.lon=a.cordinfo&&a.cordinfo.lon}}return s},4:function(e,t,n){var r={},i=this,s=this._cache[t]||function(e){var n={},r={};return _.each(e.airports||[],function(e,t){n[e.sid]=e.sname,r[e.sid]=e}),i._airportsextra[t]=r,this._cache[t]=n}.call(this,n),o=i._airportsextra[t],u=o[e]||{};return u&&(r.lat=u.cordinfo&&u.cordinfo.lat,r.lon=u.cordinfo&&u.cordinfo.lon),r.id=e,r.mtype=4,r.title=s[e],r},5:function(e,t,n){var r=this._cache[t]||function(e){var n={};return _.each(e.brands||[],function(e,t){n[e.id]={biz:e.biz,title:e.name}}),this._cache[t]=n}.call(this,n);return r[e]},6:function(e,t,n){var r=this._cache[t]||function(e){var n={};return _.each(e.events||[],function(e,t){n[e.eid]=e.name}),this._cache[t]=n}.call(this,n);return r[e]},8:function(e,t,n){var r=this._cache[t]||function(e){var n={};return _.each(e.features||[],function(e,t){n[e.id]=e.name}),this._cache[t]=n}.call(this,n);return r[e]},9:function(e,t,n){var r={},i=this._cache[t]||function(e){var n={};return _.each(e.spots||[],function(e,t){n[e.id]=e}),this._cache[t]=n}.call(this,n);r.id=e,r.mtype=9,r.title=i[e]&&i[e].name;if(i[e]&&i[e].cordinfo&&i[e].cordinfo.length){var s=i[e].cordinfo.pop();r.lat=s&&s.lat,r.lon=s&&s.lon}return r}},_getIdBySid:function(e,t){var n,r;for(var i in e){n=e[i];for(var s=0,o=n.length;s<o;s++){r=n[s];if(t==r.sid)return parseInt(i)}}return null}}),i.HotelOrderDetailModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/booking/OrderGet",this.method="POST",this.param={},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HotelOrderRemindModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/booking/orderremindpost",this.method="POST",this.param={},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.HotelOrderCancelModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/Order/Cancel",this.method="POST",this.param={ver:1,oid:0,reason:""},this.isUserData=!0},initialize:function($super,e){$super(e)}}),i.AbstractRunnable=new n.Class({run:function(){throw"请覆写run方法!"}}),i.AbstractRunnable.getInstance=e.getInstance,i.HotelPageContro=new n.Class({__propertys__:function(){this.store=r.HotelFilterSubPageStore.getInstance()},setCurrent:function(e,t,n,r,i,s){this.store.set({title:e,modelName:t,param:n,complete:r,cancel:i,selected:s})},getTitle:function(){return this.store.getAttr("title")},getModelName:function(){return this.store.getAttr("modelName")},getParam:function(){return this.store.getAttr("param")},getSelected:function(){return this.store.getAttr("selected")},callComplete:function(e,t){var n=this.store.getAttr("complete"),r=i[n];r&&r.getInstance()instanceof i.AbstractRunnable&&r.getInstance().run(e,t)},callCancel:function(e,t){var n=this.store.getAttr("cancel"),r=i[n];r&&r.getInstance()instanceof i.AbstractRunnable&&r.getInstance().run(e,t)}}),i.HotelPageContro.getInstance=e.getInstance,i.FilterSubPageMetro=new n.Class(i.HotelFilterTypeModel,{initialize:function($super){$super()},combine:function(e,t){var n=t.id,r,i=e.metroLineObj||{};i.metros&&i.metros.length&&(r=_.filter(i.metros,function(e){return e.metId==n}));if(!r)return null;var s=[];return _.each(r[0].stations,function(e){s.push({id:e.sid,title:e.sname,extra:{param:t,fulldata:e}})}),s.unshift({id:-1,title:"全部",extra:{param:t}}),s}});var u=[r.MENU_BUSINESS,r.MENU_AIRPORT,r.MENU_REGION,r.MENU_METRO,r.MENU_SPOT];return i.HotelQueryKWFilterInfoModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/static/filtertypeget",this.method="POST",this.param={ver:1,cityId:2,type:511,did:-1,cidate:"",codate:""},this.isUserData=!1},initialize:function($super,e){$super(e)}}),i.HotelQueryKWACModel=new n.Class(e,{__propertys__:function(){this.url="/Hotel/static/keywordget",this.method="POST",this.param={cityId:2,key:""},this.isUserData=!1},initialize:function($super,e){$super(e)}}),i.HotelCommentModel=new n.Class(e,{__propertys__:function(){this.url="/hotel/product/commentget",this.method="POST",this.param={id:0,idx:1,priceBiz:1,opr:0},this.isUserData=!1},initialize:function($super,e){$super(e)}}),i}),define("HotelBusiness",["cModel","cBase","HotelStore","HotelModel"],function(e,t,n,r){var i={},s=n.HotelQueryStore.getInstance(),o=n.SearchParam.getInstance();i.AbstractRunnable=new t.Class({run:function(){throw"请覆写run方法!"}}),i.AbstractRunnable.getInstance=e.getInstance,i.AbstractPageContro=new t.Class({__propertys__:function(){this.store=n.HotelFilterSubPageStore.getInstance()},setCurrent:function(e,t,n,r,i,s){this.store.set({title:e,modelName:t,param:n,complete:r,cancel:i,selected:s})},getTitle:function(){return this.store.getAttr("title")},getModelName:function(){return this.store.getAttr("modelName")},getParam:function(){return this.store.getAttr("param")},getSelected:function(){return this.store.getAttr("selected")},getCompleteName:function(){return this.store.getAttr("complete")},getCancelName:function(){return this.store.getAttr("cancel")},callComplete:function(e,t){var n=this.store.getAttr("complete"),r=i[n];r&&r.getInstance()instanceof i.AbstractRunnable&&r.getInstance().run(e,t)},callCancel:function(e,t){var n=this.store.getAttr("cancel"),r=i[n];r&&r.getInstance()instanceof i.AbstractRunnable&&r.getInstance().run(e,t)}}),i.AbstractPageContro.getInstance=e.getInstance,i.HotelPageContro=new t.Class(i.AbstractPageContro,{__propertys__:function(){this.store=n.HotelFilterSubPageStore.getInstance()}});var u=[n.MENU_BUSINESS,n.MENU_AIRPORT,n.MENU_REGION,n.MENU_METRO,n.MENU_SPOT];return i.FilterMetroComplete=new t.Class(i.AbstractRunnable,{run:function(e,t){var r=n.HotelAreaFilterStore.getInstance(),s=e.extra.param.mtype,o=e.extra.param.id,a=e.extra.param.linename,f=u.slice(0),l={},c={},h=c[s]={id:o,title:a};l[e.id]=e.title;if(e.id>-1){var p=e.extra.fulldata.cordinfo.lat,d=e.extra.fulldata.cordinfo.lon;h.sid=e.id,h.sname=e.title,h.lat=p,h.lon=d}r.delSelectOfType(f),r.addSelectOfType(s,o,l),i.HotelFilterPageContro.getInstance().callComplete(c,t)}}),i.FilterMetroCancel=new t.Class(i.AbstractRunnable,{run:function(e,t){t.back("areafilter")}}),i.HotelFilterPageContro=new t.Class(i.AbstractPageContro,{__propertys__:function(){this.store=n.HotelAreaFilterPageStore.getInstance()}}),i.FilterAreaFilterComplete=new t.Class(i.AbstractRunnable,{run:function(e,t){var r=n.HotelFilterStore.getInstance();r.delSelectOfType(n.MENU_AREA),_.each(e,function(t){t.id>-1&&r.addSelectOfType(n.MENU_AREA,e)}),t.back("searchfilter?from=map")}}),i.FilterAreaFilterCancel=new t.Class(i.AbstractRunnable,{run:function(e,t){t.back("searchfilter?from=map")}}),i.ListAreaFilterBtnComplete=new t.Class(i.AbstractRunnable,{run:function(e,t){var r={4:!0,5:!0,6:!0,9:!0,11:!0,12:!0};if(e&&!_.isEmpty(e)){var i={},s=!1,u;for(var a in e){u=e[a],a=parseInt(a);var f={};if(u.id<0){s=!0;var l=n.filterQuerySettingMap[a];i[l]=f;break}a===n.MENU_BUSINESS?(f.type=5,f.val=[u.id]):a===n.MENU_REGION?(f.type=4,f.val=[u.id]):a===n.MENU_METRO?u.sid?(f.type=12,f.code=u.sid,f.lineobj={catId:u.id,itemId:u.sid}):(f.type=6,f.val=[u.id]):a===n.MENU_AIRPORT?(f.type=11,f.val=[u.id]):a===n.MENU_SPOT&&(f.type=16,f.val=[u.id]),i[f.type]=f}var c=o.getAttr("query_filter")||[];for(var a=c.length-1;a>-1;a--)(i[c[a].type]||r[c[a].type])&&c.splice(a,1);s||_.each(i,function(e,t){c.push(e)}),o.setAttr("query_filter",c),o.setAttr("area_param",e)}t.back("searchlist")}}),i.ListAreaFilterBtnCancel=new t.Class(i.AbstractRunnable,{run:function(e,t){t.back("searchlist?from=filter_cancel")}}),i}),define("HotelWidgetTipslayer",["cBase","cUICore","cWidgetFactory","cUIScroll"],function(e,t,n,r){var i="TipsLayerHotel";if(n.hasWidget(i))return;var s=new e.Class(t.Layer,{__propertys__:function(){this.showTitle=!0,this.contentDom,this.title="",this.body="",this.mask=new t.Mask({classNames:[t.config.prefix+"opacitymask"]});var e=this;this.mask.addEvent("onShow",function(){this.setzIndexTop(-1),$(window).bind("resize",this.onResize),this.onResize();var t=this;this.root.bind("click",function(){t.hide(),t.root.unbind("click"),e.hide()})}),this._loadButtonHtml=function(){if(this.buttons.length==0)return"";var e=['<div class="cui-roller-btns">'];return $.each(this.buttons,function(t,n){var r="cui-btns-sure";n.type=="cancle"&&(r="cui-btns-cancle"),e.push('<div class="cui-flexbd '+r+'">'+n.text+"</div>")}),e.push("</div>"),e.join("")},this.html=""},initialize:function($super,e){$super({onCreate:function(){},onShow:function(){this.title=e.title||"",this.buttons=e.buttons||[],this.html=e.html||"",this._cusEvt=e.cusEvt,this._headerHeight=e.headerHeight,typeof e.showTitle!="undefined"&&(this.showTitle=e.showTitle),this.html=$($.trim(this.html)),this.btns=$($.trim(this._loadButtonHtml())),this.header=e.header,this.footer=e.footer,this.fixedCusFooter=e.fixedCusFooter,this.buttons=e.buttons||[],this.contentDom.html(['<div class="cui-pop-box">','<div class="cui-hd">'+this.title+'<div class="lab-close-area"><span class="cui-top-close">×</span></div></div>','<div class="cui-bd" style="overflow: hidden; position: relative; background-color: #fafafa; width: 100%;"></div>',"</div>"].join("")),e.width&&this.contentDom.find(".cui-pop-box").css({width:e.width+"px"}),this.mask.show(),this.reposition(),this.closeDom=this.contentDom.find(".cui-top-close").parent(),this.body=this.contentDom.find(".cui-bd"),this.header&&this.body.before($(this.header)),this.footer&&this.body.after($(this.footer));var t=0;this.fixedCusFooter&&(this.body.after($('<div class="cui-ft-fixed">'+this.fixedCusFooter+"</div>")),this.fixedCusFooter=this.contentDom.find(".cui-ft-fixed"),t=this.fixedCusFooter.height()),this.html.length>1&&(this.html=$('<div style="width: 100%;"></div>').append(this.html)),this.html.css("background-color","white"),this.body.append(this.html);var n=parseInt($(window).height()*.7),i=this.html.height()+t,s=i;e.height&&(s=e.height),s>n&&(s=n),this.body.css({height:s+"px"}),this.showTitle||this.contentDom.find(".cui-hd").hide();var o={wrapper:this.body,scroller:this.html};$.extend(o,e),s<i&&(this.s=new r(o)),this.contentDom.find(".cui-pop-box").append(this.btns);var u=this;this.closeDom.on("click",function(){u.hide()}),$.each(this.btns,function(e,t){var n=u.buttons[e].click;$(t).on("click",function(){n.call(u)})}),function(){if(typeof u._cusEvt=="object"){var e=u._cusEvt;for(var t in e){var n=t;u.evtTargetRoot=n;if(typeof e[t]=="function"){var r=e[t];u.contentDom.find(n).on("click",function(){r.call(u)})}}}}(),function(){if(!!u._headerHeight)switch(u._headerHeight){case"auto":u.contentDom.find(".cui-hd").addClass("hotel-hd-title");break;case typeof u._headerHeight=="Number":u.contentDom.find(".cui-hd").css({height:parseInt(u._headerHeight,10)})}}(),this.setHtml=function(e){u.body.html(e)};var a=""},onHide:function(){var e=this;this.s&&this.s.destroy(),this.mask.hide(),this.evtTargetRoot&&this.contentDom.find(e.evtTargetRoot).off("click"),this.closeDom.off("click"),this.root.remove(),this.mask.root.remove()}})}});n.register({name:i,fn:s})}),define("HotelUIBubbleLayer",["cBase","cUIAbstractView","cUIMask"],function(e,t,n){var r={},i=new n;return r.__propertys__=function(){this.itemTemplate=!1,this.triggerEl=null,this.click=function(){},this.curData=null,this.curDataInside=null},r.initialize=function($super,e){for(var t in e)this[t]=e[t];$super(e),this.bindEvent(),this.show(),this.hide()},r.showMenu=function(e){for(var t in e)this[t]=e[t];e.data&&this.init(),e.dir&&(this.el.removeClass("f-layer-before"),this.el.removeClass("f-layer-after"),e.dir=="up"?this.el.addClass("f-layer-before"):this.el.addClass("f-layer-after")),this.adjustEl(),this.show()},r.bindEvent=function(){this.addEvent("onHide",function(){i.hide(),this.root.off("click"),this.clsLayer&&document.removeEventListener("click",this.clsLayer,!0)}),this.addEvent("onShow",function(){this.init(),this.adjustEl(),this.setzIndexTop(),this.root.on("click",$.proxy(function(e){var t=$(e.target),n=!1;for(;;){if(t.attr("id")==this.id)break;if(t.attr("data-flag")=="c"){n=!0;break}t=t.parent()}if(!n)return;typeof this.click=="function"&&this.click.call(this,this.data[t.attr("data-index")]),this.curDataInside={by:parseInt(t.attr("data-by"),10)||0,dir:parseInt(t.attr("data-dir"),10)||1}},this)),this.clsLayer=$.proxy(function(e){var t=$(e.target),n=!1;for(;;){if(t.attr("id")==this.id){n=!0;break}if(!t[0])break;t=t.parent()}n==0&&this.hide()},this),document.addEventListener("click",this.clsLayer,!0);if(this.el&&this.el.length){var e=parseInt(this.root.css("z-index"),10);i.show(),this.el.css("z-index",e+1)}}),$(window).resize(function(){r.adjustEl()})},r.adjustEl=function(){if(!this.triggerEl)return;var e=this.triggerEl.offset();this.el.css({width:"",transform:""});var t=0,n=this.triggerEl.parent().parent().height();this.dir=="up"?this.el.css({width:e.width-t,top:n+10,left:e.left-5}):this.el.css({width:e.width-t,bottom:n+10,left:e.left-5})},r.init=function(){if(!this.data)return;this.tmpt=_.template(['<ul class="cui-f-layer '+(this.dir?this.dir=="up"?"f-layer-before":"f-layer-after":"")+'" style="position: fixed; ">',"<% for(var i = 0, len = data.length; i < len; i++) { %>","<% var itemData = data[i]; %>",'<li data-index="<%=i%>" data-flag="c" data-by="<%= itemData.data.by %>" data-dir="<%= itemData.data.dir %>" ','<% if ((curData.by === itemData.data.by) && (curData.dir === itemData.data.dir)) { %> class="cui-fl-current"<% } %>>',this.itemTemplate?this.itemTemplate:"<%=itemData.name %>","</li>","<% } %>","</ul>"].join(""));var e=this.curData,t=this.tmpt({data:this.data,curData:e});this.root.html(t),this.el=this.root.find(".cui-f-layer")},r.createHtml=function(){return""},new e.Class(t,r)}),define("HotelRoomCalendar",["libs","c","cUITab","HotelStore","cCoreInherit","cUtility","cUIBase","cUIHashObserve","cWidgetFactory","cWidgetAbstractCalendar"],function(e,t,n,r,s,o,u,a,f){"user strict";var l="RoomCalendar";if(f.hasWidget(l))return;var c=f.create("Abstract.Calendar"),h=r.Morning.getInstance(),p=r.queryStore.getInstance(),d=new s.Class(c,{__propertys__:function(){this.chineseHoliday=this.CONSTANT.CALENDAR_CHINESE_HOLIDAY,this.holiday=this.CONSTANT.CALENDAR_COMMON_HOLIDAY,this.DAYTITLE=this.CONSTANT.CALENDAR_WEEKDAY_SHORTNAME,this.SDAYTITLE=this.CONSTANT.CALENDAR_WEEKDAY_SHORTNAME2,this.DAYTITLE2=this.CONSTANT.CALENDAR_WEEKDAY_NAME,this.addClass(u.config.prefix+this.CONSTANT.CALENDAR),this.startMonth=o.getServerDate(),this.startMonth.setDate(this.CONSTANT.CALENDAR_INIT_DATE),this.Months=this.CONSTANT.CALENDAR_MONTH,this.validStartDate=o.getServerDate(),this.validStartDate.setHours(this.CONSTANT.INIT_DATE_TIME.H,this.CONSTANT.INIT_DATE_TIME.M,this.CONSTANT.INIT_DATE_TIME.S,this.CONSTANT.INIT_DATE_TIME.MS),this.validEndDate,this.date,this.dateVal={},this.titledom,this.leftback,this.cls=[this.CONSTANT.CALENDAR],this.title,this.noabsolute=!1,this.curDate,this.dateDoms={},this.html,this.clickEnabled=!0,this.msg="",this.callback=function(){},this.numCallback=function(){},this.hashObserve=new a({hash:this.id,callback:function(){this._hide()},scope:this}),this.animatSwitch=!1,this.timeNum=250,this.curNum=1},initialize:function($super,e){this.setOption(function(e,t){switch(e){case"Months":case"timeNum":case"date":case"curDate":case"root":case"callback":case"numCallback":case"title":case"noabsolute":case"msg":case"clickEnabled":case"animatSwitch":case"curNum":this[e]=t;break;case"cls":this.cls.push(t);break;case"validStartDate":case"validEndDate":this[e]=t,this[e].setHours(0,0,0,0);break;case"startMonth":this[e]=t,this[e].setDate(1)}}),$super(e),this.buildEvent()},selectedDate:function(){var e;for(var t in this.date)e=this.root.find("."+this.buildSelectCls(t))[0],this.dateDoms[t]=e,this.dateVal[t]=this.date[t].value;!this.curDate&&(this.curDate=t)},buildEvent:function(){this.addEvent("onCreate",this.onCreate),this.addEvent("onShow",this.onShow),this.addEvent("onHide",this.onHide)},buildElement:function(){this.titledom=this.root.find("header"),this.leftback=this.root.find("#js_return"),this.elmArrivalTimeBox=this.root.find("#js_arrivaltime"),this.elmArrivalTimeUiTab=this.root.find("#js_arrivaltime span")},onCreate:function(){this.selectedDate(),this.buildElement(),this.buildElementsEvent(),this.createArrivalUI(),this.noabsolute||this.root.css({position:"absolute"}),this.windowResizeHander=$.proxy(this.position,this)},onShow:function(){this.root.css({top:0,left:0,width:"100%"}),$(window).bind("resize",this.windowResizeHander),this.setzIndexTop(),this.hashObserve.start();if(this.animatSwitch){var e=this;this.root.animate({"-webkit-transform":"translate3D(100%, 0px,0px)",top:"0px"},0,function(){e.root.animate({"-webkit-transform":"translate3D(0px, 0px,0px)"},e.timeNum,function(){setTimeout(function(){window.scrollTo(0,1)},0),e.root.css("-webkit-transform","none"),e.windowResizeHander()})})}},position:function(){this.root.css({left:"0px",top:"0px"});var e=u.getPageSize();this.root.css({width:$(window).width(),height:e.height})},onHide:function($super){$(window).unbind("resize",this.windowResizeHander),this.hashObserve.end()},createHtml:function(){return this.createCalendar()},createArrivalUI:function(){var e=this.elmArrivalTimeBox.parents("ul"),r=[{id:1,name:"今晨6点前"},{id:2,name:"今晨6点后"}],i=this,s=t.base.getServerDate(),o=new t.base.Date(s),u=o.format("H")|0,a=h.isMorning()?1:2,f=o.format("Ymd"),l=this.date.departdate.value.format("Ymd");!this.elmArrivalTimeUiTab||(e.addClass("hotel-morning-mt"),i.uiTablist=new n({rootBox:this.elmArrivalTimeUiTab,data:r,selectedKey:a,changed:function(e){e.id===1?h.setStatus(!0):h.setStatus(!1)},changeAble:function(){}})),u<6&&f===l?this.setHideArrivalUI("show"):this.setHideArrivalUI("hide")},setHideArrivalUI:function(e){var t=e==="show"?!0:!1;!this.elmArrivalTimeUiTab||(t?(this.elmArrivalTimeBox.parents("ul").addClass("hotel-morning-mt"),this.elmArrivalTimeBox.show()):(this.elmArrivalTimeBox.parents("ul").removeClass("hotel-morning-mt"),this.elmArrivalTimeBox.hide()))},setArrivalUIByDate:function(e){var n=t.base.getServerDate(),r=new t.base.Date(n),i=r.format("H")|0,s=r.format("Ymd"),o=e.format("Ymd");s===o&&i<6?(this.setHideArrivalUI("show"),h.setStatus(!0),this.uiTablist.setVal("1")):(this.setHideArrivalUI("hide"),h.setStatus(!1))},buildElementsEvent:function(){function n(e){var t=$(".hotel-date-rooms-tips > span"),n="";!e||(n=e.format("Y年m月d"),t.html(n))}var e=this;this.clickEnabled&&this.root.delegate(".cui_cld_daybox li","click",function(){b=$(this),b.hasClass("valid")||(b=b.closest(".valid"));var t=b.attr("data-date"),r=t;if(!t)return;t=o.Date.parse(t).valueOf(),e.isAccordBound(t)&&e._setDate(t,b),n(o.Date.parse(r)),e.setArrivalUIByDate(o.Date.parse(r))}),e.stayCount?e.stayCount.setVal(this.curNum):e.stayCount=new t.ui.cuiNum({rootBox:this.root.find("#js_roomcalnum"),min:1,max:28,curNum:this.curNum,unit:"晚",needText:!1,changed:function(t){e.root.find("#js_roomcalnumtext").html("住"+(t==0?"几":t)+"晚"),e.cuiNum=t,e.numCallback(t)}}),this.root.delegate("#js_return","click",$.proxy(function(){this._hide()},this)),this.root.delegate("#js_roomcalok","click",$.proxy(function(){this.callback&&this.callback.call(this,this.dateVal,this.cuiNum)},this))},_hide:function(){if(this.animatSwitch){var e=this;this.root.animate({"-webkit-transform":"translate3D(0px, 0px,0px)",top:"0px"},0,function(){e.root.animate({"-webkit-transform":"translate3D(100%, 0px,0px)"},e.timeNum,function(){e.root.css("-webkit-transform","none"),e.hide()})})}else this.hide()},isAccordBound:function(e){var t=this.date[this.curDate];if(!t.bound)return!0;if(!t.bound.rules||!t.bound.error)return!0;var n=t.bound.rules,r;for(var i in n){r=typeof n[i]=="string"?this.dateVal[n[i]]:this._isDate(n[i])&&n[i],e.setHours(0,0,0,0);if(r){r.setHours(0,0,0,0);switch(i){case"<":if(!(e<r))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1;break;case">":if(!(e>r))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1;break;case"<=":if(!(e<=r))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1;break;case">=":if(!(e>=r))return t.bound.error.call(this,e,this.curDate,this.dateVal),!1}}}return!0},_setDate:function(e,t){var n=this.root.find("."+this.buildSelectCls(this.curDate));n.each($.proxy(function(e,t){var r=$(t);r.html(this.resetTitle(o.Date.parse(n.attr("data-date")).valueOf())),r.removeClass(this.buildSelectCls(this.curDate)),r.removeClass(this.buildSelectCls())},this)),this.dateDoms[this.curDate]=t;var r=$(t),i,s=this,u=this.date[this.curDate].title;typeof u=="function"?i=this.formatTitle2(u):i=this.formatTitle,r.html(i.call(this,e)),r.removeClass("cui_cld_dayfuture"),r.removeClass("cui_cld_day_hint"),r.addClass("cui_cld_day_havetxt"),r.addClass(this.buildSelectCls(this.curDate)),r.addClass(this.buildSelectCls()),this.dateVal[this.curDate]=e},setCurDate:function(e){this.curDate=e,this.create();var t=this.getCurTitle();this.titledom.html(t)},getEndDate:function(){return this.calendarend},buildSelectCls:function(e){return e?"selected-"+e:"cui_cld_daycrt"},getCurTitle:function(){var e=this.date[this.curDate],t="";return e&&(t=e.headtitle||this.title),t||this.title},createCalendar:function(){var e=[],t,n=this.getCurTitle(),r=o.isInApp(),i=r?' style=" margin-top: 0"':"";this.title&&!r&&e.push(["<header>","<h1>"+n+'</h1><i class="returnico i_bef" id="js_return"></i>','<i class="header_r" id="js_roomcalok">完成</i>',"</header>"].join("")),e.push(['<article class="wrap_pb"',i,'><div class="cui_cldwrap">'].join("")),e.push(this.createWeek(r));for(var s=0;s<this.Months;s++)t=new Date(this.startMonth),t.setMonth(t.getMonth()+s),e.push(this.createMonth(t));return e.push(["</div>","</atricle>",'<div class="hotel-date-rooms cui-bottom-fixed">','<span id="js_roomcalnumtext">住几晚</span>','<div id="js_roomcalnum" class="fr"></div>',"</div>"].join("")),e.join("")},createWeek:function(e){var t=this.date.departdate.value.format("Y年m月d"),n=e?" cui_cldweek_top0":"",r=['<ul class="cui_cldweek'+n+' hotel-select-date-tips ">'+'<p class="hotel-date-rooms-tips"><span class="fr">'+t+"</span>选择入住日期</p>"+'<div id="js_arrivaltime" class="hotel-date-morning">到店时间<span class="hotel-morning"></span></div>'];this.msg&&r.push('<p  class="cui_cldmsg">'+this.msg+"</p>");for(i in this.SDAYTITLE)r.push("<li>"+this.SDAYTITLE[i]+"</li>");return r.push("</ul>"),r.join("")},createMonth:function(e){var t=this.calcStructData(e),n=[],r;n.push('<section class="cui_cldunit">'),n.push('<h1 class="cui_cldmonth">'+o.Date.format(e,"Y年n月")+"</h1>"),n.push('<ul class="cui_cld_daybox">');var i,s,u=t.days.length,a=this;for(var r=0;r<u;r++){s=t.days[r].length;for(var f=0;f<s;f++){i={};var l=t.days[r][f];if(l){var c=this.validStartDate||t.start,h=this.validEndDate||t.end;l>=c&&l<=h?i.valid=!0:(i.cui_cld_daypass=!0,i.invalid=!0)}else i.cui_cld_dayfuture=!0,i.invalid=!0;var p,d=this.getDateInfo(l);if(d){p=d.daytitle||d.holiday||d.chineseday;if(p){i.cui_cld_day_havetxt=!0;if(d.holiday||d.chineseday)i.cui_cld_day_hint=!0;p="<em>"+d.date+"</em><i>"+p+"</i>"}else p="<em>"+d.date+"</em>"}else p="";if(this.date)for(var v in this.date)l&&o.Date.format(this.dateVal[v]||this.date[v].value,"Y-m-d")==o.Date.format(l,"Y-m-d")&&(delete i.cui_cld_dayfuture,delete i.cui_cld_day_hint,i.cui_cld_day_havetxt=!0,i[this.buildSelectCls()]=!0,i[this.buildSelectCls(v)]=!0,p=this.date[v].title(l,function(){return d.daytitle||d.holiday||d.chineseday||d.date}),p="<em>"+p+"</em>");n.push('<li data-date="'+o.Date.format(l,"Y-m-d")+'" '+(i?' class="'+this._objectKey(i).join(" ")+'"':"")+">"+p+"</li>")}}return n.push("</ul></section>"),n.join("")},formatTitle:function(e){if(!e)return"";var t=this.getDateInfo(e);return t.daytitle||t.holiday||t.chineseday||t.date},getDateInfo:function(e){if(!e)return;var t=o.getServerDate(),n=new Date(e);n.setHours(1,1,1,0),t.setHours(1,1,1,0);var r=(n-t)/864e5,i={};o.Date.format(t,"Ymd")==o.Date.format(e,"Ymd")?i.daytitle="今天":r==1?i.daytitle="明天":r==2?i.daytitle="后天":i.daytitle="";var s=this.solarDay2(e);this.chineseHoliday[s]?i.chineseday=this.chineseHoliday[s]:i.chineseday="";var u=o.Date.format(e,"md");return this.holiday[u]?i.holiday=this.holiday[u]:i.holiday="",i.week=this.DAYTITLE[e.getDay()],i.week2=this.DAYTITLE2[e.getDay()],i.date=o.Date.format(e,"j"),i},formatTitle2:function(e){return $.proxy(function(t){return e(t,$.proxy(function(e){return this.formatTitle(e)},this))},this)},calcStructData:function(e){var t=new Date(e),n=new Date(e);t.setDate(1),t.setHours(0,0,0,0);var r=t.getDay();n.setMonth(n.getMonth()+1,1),n.setHours(-24,0,0,0);var i=n.getDay(),s=(n.getDate()+(r+(6-i)))/7,o=[],u;for(var a=0,f=0;a<s;a++){o[a]=[];for(var l=0;l<7;l++)if(a==0&&l<r)o[a].push("");else{u=new Date(t),u.setDate(u.getDate()+f);if(u>n)break;o[a].push(u),f++}}return this.calendarend=n,{start:t,end:n,days:o,loops:s}},setDate:function(e){this.create();for(var t in e)if(this.date[t]&&this._isDate(e[t])){e[t].setHours(0,0,0,0),this.date[t].value=e[t],this.dateVal[t]=e[t];var n=this.root.find("."+this.buildSelectCls(t));if(n.length){var r=o.Date.parse(n.data("date")).valueOf();n.removeClass(this.buildSelectCls(t)),n.removeClass(this.buildSelectCls()),n.html(this.formatTitle(r))}var i=this.root.find('[data-date="'+o.Date.format(e[t],"Y-m-d")+'"]');i.each($.proxy(function(n,r){r=$(r),r.hasClass("valid")&&(r.addClass(this.buildSelectCls(t)),r.addClass(this.buildSelectCls()),r.html(this.formatTitle2(this.date[t].title)(e[t])))},this)),this.dateDoms[t]=i}},addDate:function(e,t){this.create();var n,r,i;for(var s in e)if(!this.date[s]||t){this.date[s]=e[s],n=this.date[s]&&this.date[s].value,r=this.date[s]&&this.date[s].title,r=typeof r=="function"?this.formatTitle2(r):$.proxy(this.formatTitle,this);var u=this.root.find("."+this.buildSelectCls(s));u.length&&(u.removeClass(this.buildSelectCls(s)),u.removeClass(this.buildSelectCls())),n&&(i=this.root.find('[data-date="'+o.Date.format(n,"Y-m-d")+'"]'),i.each($.proxy(function(e,t){t=$(t),t.hasClass("valid")&&(t.html(r(n)),t.addClass(this.buildSelectCls(s)),t.addClass(this.buildSelectCls()),this.dateVal[s]=n)},this)))}},removeDate:function(e){this.create();for(var t=0,n,r=e.length;t<r;t++){n=e[t];if(this.date[n]){var i=this.root.find("."+this.buildSelectCls(n));i.each($.proxy(function(e,t){var r=$(t);r.removeClass(this.buildSelectCls(n)),r.removeClass(this.buildSelectCls()),r.html(this.formatTitle(o.Date.parse(r.data("date")).valueOf()))},this)),delete this.date[n],delete this.dateVal[n]}}},getDate:function(){var e={};for(var t in this.date)e[t]=this.date[t].value;return _.isEmpty(this.dateVal)?_.isEmpty(e)?{}:e:this.dateVal},update:function(e){this.setOption(function(e,t){switch(e){case"Months":case"date":case"curDate":case"root":case"callback":case"title":case"noabsolute":case"curNum":this[e]=t;break;case"cls":this.cls.push(t);break;case"validStartDate":case"validEndDate":this[e]=t,this[e].setHours(0,0,0,0);break;case"startMonth":this[e]=t,this[e].setDate(1)}}),this.readOption(e),this.create(),this.root.html(this.createCalendar()),this.trigger("onChange")},resetTitle:function(e){var t="",n=this.getDateInfo(e);return n&&(t=n.daytitle||n.holiday||n.chineseday,t?t="<em>"+n.date+"</em><i>"+t+"</i>":t=n.date),t}});f.register({name:l,fn:d})}),define("Toolkit",[],function(){var e={ArrayIndexOf:Array.prototype.indexOf?function(e,t){return e=[].slice.call(e,0),e.indexOf(t)}:function(e,t){for(var n=e.length,r=!1;n--&&!r;){r=e[n]===t;if(r)return n}return n},QueryStringBuilder:function(t){function r(t){return t=t&&t.toLowerCase(),e.ArrayIndexOf(i,t)}function d(e,t){if(e&&t){var n=r(e);n>=0&&n<o.length?o[n]=t:(s.push(e),o.push(t),i.push(e.toLowerCase())),u[e]=t}return t}function v(e){var t=e?o[r(e)]:u;return t}function m(e){var t=u,n=r(e);e&&n>0?(delete u[e],s.splice(n,1),o.splice(n,1),i.splice(n,1)):(u={},s=[],o=[],i=[])}var n=arguments.callee;if(!(this instanceof n))return new n(t);var i=[],s=[],o=[],u={};if(t){var a=t.split("&");if(a)for(var f=a.length-1;f>=0;f--){var l=a[f],c=l&&l.split("="),h=c&&c[0],p=c&&c[1];h&&(u[h]=p,d(h,p))}}var g=function(e){try{e=e?decodeURIComponent(e):""}catch(t){}return encodeURIComponent(e).replace(/\*/g,"%2A").replace(/-/g,"%2D").replace(/_/g,"%5F").replace(/\./g,"%2E").replace(/!/g,"%21").replace(/~/g,"%7E").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")};this.set=d,this.get=v,this.remove=m,this.toString=function(e,t){e=e||"=",t=t||"&";var n=[];for(var r=0;r<s.length;r++)o[r]&&n.push(g(s[r])+e+g(o[r]));return n.join(t)||""}}};return e.localStorage=function(e){var t={_ls:e.localStorage};return t.set=function(e,t){this._ls.setItem(e,t.toString())},t.get=function(e){return this._ls.getItem(e)},t.getAll=function(){return this._ls},t.del=function(e){var t=this.get(e);!t||this.__ls.removeItem("c")},t.clearAll=function(){e.localStorage.clear()},t}(window),e.getQueryStringByName=function(e){var t=window.location.hash.match(new RegExp("[?&]"+e+"=([^&]+)","i"));return t==null||t.length<1?"":t[1]},e.deepClone=function(e){var t;if(e instanceof Array){var n=e.length;t=[];while(n--)t[n]=this.deepClone(e[n]);return t}if(e instanceof Object){t={};for(var r in e)t[r]=this.deepClone(e[r]);return t}return e},e.log=function(e){return!1},e}),define("BizCityList",["HotelModel","HotelStore","Toolkit"],function(e,t,n){function l(e,t){var i=0,l=null,c=n.deepClone(f),h=null,p="";e=r.restoreData(e);if(!(e&&e.cities&&e.cities.length>0))return;return e.cities=_.sortBy(e.cities,function(e){return e.idx}),_.each(e.cities,function(e,t){p=e.cname.trim(),p.indexOf("市")>0&&(p=p.replace("市","").trim()),c.wordList[p]=e,c.hotCities.length<20&&!!e.hot&&c.hotCities.push(e),!e.cfrl||(l=e.cfrl.toUpperCase().trim(),h=c.categoryCities[l],!!h&&h.length>0?h.push(e):(h=[],h.push(e)),c.categoryCities[l]=h)}),_.each(c.hotCities,function(t,n){_.each(e.cities,function(n,r){t.cityId===n.cityId&&!n.hot&&n.did<0&&e.cities.splice(r,1)})}),c.cityList=e.cities,s.setAttr(t,c.cityList),o.setAttr(t,c.categoryCities),u.setAttr(t,{historyCities:c.historyCities,hotCities:c.hotCities}),a.setAttr(t,c.wordList),c}function c(e,t){var n=null;i.excute(function(r){!!r&&!!t&&(n=l(r,t)),_.isObject(e)&&n&&e.success(n)},function(t){typeof e.error=="function"&&e.error(t)},!1,this)}var r={},i=e.cityListModel.getInstance(),s=t.protoCityListStore.getInstance(),o=t.renderCategoryCitiesStore.getInstance(),u=t.renderHisHotCityListStore.getInstance(),a=t.wordsCityListStore.getInstance(),f={historyCities:[],hotCities:[],categoryCities:{A:[],B:[],C:[],D:[],E:[],F:[],G:[],H:[],I:[],J:[],K:[],L:[],M:[],N:[],O:[],P:[],Q:[],R:[],S:[],T:[],U:[],V:[],W:[],X:[],Y:[],Z:[]},cityList:null,wordList:{}};return r.restoreData=function(e){var t=[],n={},r=[];return!!e&&e.cities&&e.cities.length>0&&!!e.hash&&(_.each(e.hash,function(e,t){r[e]=t}),_.each(e.cities,function(e,i){n=_.object(r,e),t.push(n)}),e.cities=t),e},r.getInLandCityList=function(e){i.setParamStore({type:1}),c(e,"inland")},r.getOverseaCityList=function(e){i.setParamStore({type:2}),c(e,"oversea")},r.__getCity=function(e,t,n){function u(e){var t=null;!!e&&e.indexOf("市")>0&&(e=e.replace("市","").trim());try{t=o[e]}catch(n){}return t}function f(t){var n=null;for(var r in o)o[r].cityId==e.id&&o[r].did<=0&&(n=o[r]);return n}function l(t){t?typeof e.callback=="function"&&e.callback(t):typeof e.error=="function"&&e.error(s)}var r=this,i=null,s={cJP:"sh",cPY:"shanghai",cfrl:"S",cityId:2,cname:"上海",ctryCN:"中国",ctryId:0,did:-1,hot:!0,idx:200,type:1},o=a.getAttr("inland");if(!!o&&!_.isEmpty(o))if(!e||!n)l(null);else{i=n==="id"?f(e.id):u(e.name);if(!!t)return i;l(i)}else r.getInLandCityList({success:function(){i=r.__getCity(e,!0,n),l(i)},error:function(){typeof e.error=="function"&&e.error(s)}})},r.getCityByName=function(e){this.__getCity(e,null,"name")},r.getCityByID=function(e){this.__getCity(e,null,"id")},r}),define("hotel/dest/views/index",["libs","c","BizCityList","cBasePageView","CommonStore",buildViewTemplatesPath("index.html"),"cWidgetFactory","cGeoService","cWidgetCalendar","cUITab","HotelStore","HotelModel"],function(e,t,n,r,i,s,o,u,a,f,l,c){function h(){var e=this;this.init=function(t,n){e.mask=n,e.els=t},this.showStarPrice=function(){e.updateStarPriceSelected(),e.els.starPricePop.css("z-index","99999").show(),e.mask.show()},this.saveStarPrice=function(){var t=e.els.starPricePop.find(".js_price_h.current"),n=e.els.starPricePop.find(".js_star_h.current"),r={value:0,text:""},i={value:[],text:[]};r.value=t.attr("data-price")||0,r.text=$.trim(t.text())||"",n.each(function(){var e=$(this);e.length&&(i.value.push(e.attr("data-star")||""),i.text.push(e.attr("data-text")||""))}),y.setAttr("price",r),y.setAttr("star",i),e.mask.hide(),e.els.starPricePop.hide(),e.updateStarPriceText()},this.checkPrice=function(t){e.els.starPricePop.find(".js_price_h").removeClass("current"),$(t.currentTarget).addClass("current")},this.checkStar=function(t){$(t.currentTarget).hasClass("js_star_all")?e.els.starPricePop.find(".js_star_h").removeClass("current"):e.els.starPricePop.find(".js_star_h").eq(0).removeClass("current"),$(t.currentTarget).toggleClass("current"),0==e.els.starPricePop.find(".js_star_h.current").length&&e.els.starPricePop.find(".js_star_h").eq(0).addClass("current")},this.updateStarPriceText=function(){var t=y.getAttr("star"),n=y.getAttr("price"),r="";if(n&&(r+=n.text||"不限"),t&&t.value){var i=t.text.join(", ");r+=n.value?", "+(i||"不限"):i?", "+i:""}e.els.starPriceTextEl.text(r&&"不限"!==r?r:"不限")},this.updateStarPriceSelected=function(){var t=y.getAttr("price")||{},n=y.getAttr("star")||{},r=[],i=e.els.starPricePop.find(".js_price_h"),s=[],o=e.els.starPricePop.find(".js_star_h"),u=0;if(t.value?(r=i.filter('[data-price="'+t.value+'"]'),i.removeClass("current"),r.length?r.addClass("current"):i.eq(0).addClass("current")):(i.removeClass("current"),i.eq(0).addClass("current")),n.value&&n.value.length){o.removeClass("current");for(var a=0,f=n.value.length;f>a;a++)s=o.filter('[data-star="'+n.value[a]+'"]'),s.length&&(s.addClass("current"),u++);u||o.eq(0).addClass("current")}else o.removeClass("current"),o.eq(0).addClass("current")}}function p(){var e=y.getAttr("city"),t=null,n=y.getAttr("needGetGeo"),r=y.getAttr("isSearchListWithCity");e&&e.cityId&&!n&&r?(this.locateInfo.status=!0,t=e.cname,this.hasCityId=!0,t&&t.length>0&&this.els.city.html(t)):(this.els.city.html(S),this.getPosition(!1),this.hasCityId=!1)}var d=t.base,v=u.GeoLocation,m=o.create("Calendar"),g=d.Date,y=l.HotelQueryStore.getInstance(),b=l.SelectedCityStore.getInstance(),w=l.Morning.getInstance(),E=(l.cityListStore.getInstance(),c.cityListModel.getInstance()),S="我附近的酒店",x=new h,T=r.extend({pageid:"212092",hasAd:!0,stayCount:1,cidat:0,codat:0,hasCityId:!1,locateInfo:{status:!0,msg:""},isMorning:!1,go2KWCat:function(){this.hasCityId&&this.forward("querykeywords")},updateKeywordsText:function(){var e=y.getAttr("kwText");e?this.els.keywordsTextBox.removeClass("hotel-fontgrey").html(e):this.els.keywordsTextBox.addClass("hotel-fontgrey").html("位置/品牌/酒店名")},getPosition:function(e,t){var r=this;e=e===!1?!1:!0,this.locateInfo.status=!1,v.Subscribe("hotel/index",{onStart:function(){r.startGeoStatus(),S="我附近的酒店",r.els.city.html(S),y.setAttr("address",null),y.setAttr("city.cityId",2),y.setAttr("city.cname","上海"),y.setAttr("isSearchListWithCity",!1)},onComplete:function(e){var r=this,i=r.checkAddress(e);i?n.getCityByName({name:e.city,callback:function(n){S="我附近的酒店",r.locateInfo.status=!0,r.els.city.html(S),r.stopGeoStatus(),r.clearCityData(),y.setAttr("address",e),y.setAttr("city.cityId",n.cityId),y.setAttr("city.cname",S),y.setAttr("isSearchListWithCity",!1),r.hasCityId=!0,"function"==typeof t&&t()},error:function(){r.geoError()}}):r.goToOversea(null,e)},onError:this.geoError,onPosError:this.geoError},this,e)},geoError:function(){var e=this;this.stopGeoStatus(),this.els.city.html("上海"),y.setAttr("city.cname","上海"),y.setAttr("city.cityId",2),y.setAttr("address",null),y.setAttr("isSearchListWithCity",!0),this.alert=new t.ui.Alert({title:"提示信息",message:"定位失败,您可以通过在设置中开启定位服务,开启WIFI,以提高定位成功率;或选择城市查询",buttons:[{text:"知道了",type:t.ui.Alert.STYLE_CANCEL,click:function(){this.hide()}},{text:"选择城市",click:function(){this.hide(),e.eventSelectCity()}}]}),this.alert.show(),this.locateInfo.status=!0,this.hasCityId=!0},startGeoStatus:function(){this.els.btnSearch.text("定位中...."),this.els.btnSearch.attr("disabled","disabled").addClass("g_btns_disable"),this.els.geoIcon.hide(),this.els.geoIconLoading.show()},stopGeoStatus:function(){this.els.btnSearch.text("查询"),this.els.btnSearch.removeAttr("disabled").removeClass("g_btns_disable"),this.els.geoIcon.show(),this.els.geoIconLoading.hide()},showCalendar:function(){!this.calendar&&this.createCalendar();var e=this.cidat;this.calendar.update({date:{departdate:{title:function(e,t){var n=t(e),r="";return r=parseInt(n,10)?"<em>"+n+"</em><em>入住</em>":"<em>"+g.format(e,"j")+"</em><em>"+t(e)+"</em>"},value:e}}}),$(".fix_bottom").css("z-index",3e3),this.calendar.show()},createCalendar:function(){var e=this.getServerDate(),t=this;this.calendar=new m({date:{departdate:{title:function(e,t){var n=t(e),r="";return r=parseInt(n,10)?"<em>"+n+"</em><em>入住</em>":"<em>"+g.format(e,"j")+"</em><em>"+t(e)+"</em>"},value:e}},title:"选择日期",callback:function(e,n,r,i){this._hide();var s="object"==typeof t.stayCount?t.stayCount.getVal():1,o=new g(t.getServerDate());t.cidat=new g(r.departdate);var u=0===g.getIntervalDay(o.format("Y-m-d"),t.cidat.format("Y-m-d"));t.isMorning=u?t.isMorning:!1,t.isMorning&&(s-=1),t.codat=(new g(t.cidat)).addDay(s),t.dateInfo=i,t.updateStoreDate(t.cidat.format("Y-m-d"),t.codat.format("Y-m-d")),t.updateHtmlDate(),t.checkMorning(),$(".fix_bottom").css("z-index",9999)},Months:6,onCreate:function(){},onShow:function(){},onHide:function(){}})},updateStoreDate:function(e,t){y.setAttr("inDay",e),y.setAttr("outDay",t)},updateHtmlDate:function(){var e=new g(this.getServerDate()),t="",n="";this.dateInfo=this.dateInfo||{holiday:"",chineseday:""};var r=g.getIntervalDay(e.format("Y/m/d"),this.cidat.format("Y/m/d")),i=this.codat.format("n月j日")+"<br>("+g.weekday(this.codat)+")离店";switch(n=this.cidat.format("Y年n月j日"),r){case 0:t="今天";break;case 1:t="明天";break;case 2:t="后天";break;default:t=this.cidat.format("n月j日"),n=this.codat.format("Y年 ")+g.weekday(this.cidat),n=""==this.dateInfo.holiday&&""==this.dateInfo.chineseday?this.codat.format("Y年 ")+g.weekday(this.cidat):this.codat.format("Y年 ")+(""==this.dateInfo.holiday?this.dateInfo.chineseday:this.dateInfo.holiday)}(1==r||0==r||2==r)&&(""!=this.dateInfo.holiday||""!=this.dateInfo.chineseday)&&(n=this.codat.format("Y年 ")+(""==this.dateInfo.holiday?this.dateInfo.chineseday:this.dateInfo.holiday)),this.els.checkInDateLeft.text(t),this.els.checkInDateRight.text(n),this.els.checkOutDate.html(i)},submitAction:function(){this.validateStoreDate(),this.validateStoreGeo(),this.locateInfo.status&&this.forward("searchlist")},initModules:function(){var e=this,n=!0;this.checkMorning(),this.validateStoreDate();var r=this.getDays();return _.isObject(this.stayCount)?this.stayCount.setVal(r):this.stayCount=new t.ui.cuiNum({rootBox:this.$el.find("#js_cki_num"),min:1,max:28,curNum:r,unit:"晚",needText:!1,changed:function(t){y.setAttr("days",t),e.codat=(new g(e.cidat)).addDay(e.isMorning?t-1:t),e.updateStoreDate(e.cidat.format("Y-m-d"),e.codat.format("Y-m-d")),e.updateHtmlDate()}}),"oversea"===this.request.query.from?(this.cityData=b.get()||{},this.cityData.type=1,y.setAttr("city",this.cityData),location.hash="index"):this.cityData=y.getAttr("city")||{},2===this.cityData.type&&58!=this.cityData.cityId&&59!=this.cityData.cityId?(e.goToOversea(this.cityData),n=!1):(this.cityData.cityId?(this.hasCityId=!0,S=this.cityData.cname,this.els.city.html(S)):(this.hasCityId=!1,this.getPosition()),n)},eventSelectCity:function(){this.forward("cityList")},checkAddress:function(e){var t={info:{province:[],citycode:[]}},e=_.extend(t,e),n=!0;return e.address||e.info.province.length||e.info.citycode.length||(n=!1),n},goToOversea:function(e,t){e||(e={});var n={cityId:e.cityId,dstId:e.did||0,cname:e.cname,state:e.state,ctry:e.ctryCN,gps:t||{}};b.setAttr(n),this.jump(location.origin+"/webapp/oversea/#search?from=inland")},clearCityData:function(){var e=y.getAttr("city")||{};for(var t in e)e[t]=null;e.cname=S,y.setAttr("city",e)},checkURL:function(){var e=this.getQuery("from")||"",t=b.get();e&&"oversea"===e&&(y.setAttr("city.cityId",t.cityId||2),y.setAttr("city.did",t.dstid||0),y.setAttr("city.cname",t.cname||"上海"),y.setAttr("city.state",t.state),y.setAttr("city.ctryCN",t.ctry),this.els.city.text(t.cname||"上海"))},getAppUrl:function(){var e,t="/hotel_inquire",n=new RegExp("-","g"),r=y.getAttr("inDay").replace(n,""),i=this.getOutDate().replace(n,""),s=y.getAttr("city.cityId"),o="",u="",a="",f=0,l=y.getAttr("query");if(l&&l.length>0)for(var c=l.length,h=c-1;h>=0;h--){var p=l[h];16==p.type?o=p.val:3==p.type&&(u=p.val[0])}return e="?c1="+(r||"")+"&c2="+(i||"")+"&c3="+(s||"")+"&c4="+(o||"")+"&c5="+(u||"")+"&c6="+(a||"")+"&c7="+(f||""),t+e},validateStoreDate:function(){var e=y.get(),t=e.inDay||(new g(this.getServerDate())).format("Y-m-d"),n=this.getOutDate(),r=new Date(this.getServerDate()),i=g.getIntervalDay(r,t);0>=i&&(t=g.format(r,"Y-m-d"));var s=g.getIntervalDay(t,n),o=this.isMorning?s>=0:s>0,u=this.getDays();o||(this.isMorning&&(u=u>=1?u-1:0),n=g.parse(t).addDay(u).format("Y-m-d")),e.inDay=t,e.days=u,e.outDay=n,y.set(e),this.cidat=g.parse(t),this.codat=g.parse(n)},validateStoreGeo:function(){var e=y.getAttr("city")||{},t=y.getAttr("address"),n=this;return e.cityId||t?void 0:(this.getPosition(!0,function(){n.submitAction()}),!1)},checkMorning:function(){var e=this,t=this.getServerDate(),n=t.getHours(),r=y.getAttr("inDay")||(new g(this.getServerDate())).format("Y-m-d"),i=this.getOutDate(),s=0===g.getIntervalDay(r,(new g(t)).format("Y-m-d")),o=s&&n>=0&&6>n;if(o){this.els.morningWrap.show();var u=1;this.isMorning=w.isMorning(),this.isMorning?(u=1,this.switchMorning({value:!0})):(u=2,this.switchMorning({value:!1})),this.morningSwitch=new f({data:[{id:1,name:"今晨6点前",value:!0},{id:2,name:"今晨6点后",value:!1}],rootBox:e.els.morningWrap.find(".hotel-morning"),selectedKey:u,changed:function(t){e.switchMorning(t,!0)}})}else this.cidat=g.parse(r),this.codat=g.parse(i),this.els.morningWrap.hide(),y.removeAttr("lastMorning"),w.setStatus(!1)},switchMorning:function(e){this.isMorning=e.value||!1;var t=y.get(),n=t.inDay||(new g(this.getServerDate())).format("Y-m-d"),r=this.getOutDate(this.isMorning);this.cidat=g.parse(n),this.codat=g.parse(r),t.outDay=r,y.set(t),w.setStatus(this.isMorning),this.updateHtmlDate()},getOutDate:function(e){this.isMorning="boolean"==typeof e?e:w.isMorning();var t=y.get()||{},n=t.inDay||(new g(this.getServerDate())).format("Y-m-d"),r=this.getDays();this.isMorning&&(r=r>=1?r-1:0);var i=g.parse(n).addDay(r).format("Y-m-d");return i},getDays:function(){var e=y.getAttr("days")||1;return~~e},homeHandler:function(){var e="/html5/",t=i.SalesObjectStore.getInstance(),n=parseInt((t.get()||{}).sid||0);1896===n&&(e="map://leftClick()"),this.jump(e)},render:function(){this.$el.html(s);var e=this;this.els={city:this.$el.find("#js_city"),btnSearch:this.$el.find("#js_submit"),geoIcon:this.$el.find("#js_geo_icon"),geoIconLoading:this.$el.find("#js_geo_loading"),checkInDateRight:this.$el.find("#js_cki_date_right"),checkInDateLeft:this.$el.find("#js_cki_date_left"),checkOutDate:this.$el.find("#js_cko_date"),keywordsTextBox:this.$el.find("#js_kw_text_box"),starPriceTextEl:this.$el.find("#js_query_star_price").find(".hotel-m-cont"),starPricePop:this.$el.find(".js_price_star_filter"),morningWrap:this.$el.find("#js_morning_wrap")},this.mask=new t.ui.Mask,this.mask.addEvent("onShow",function(){$(window).bind("resize",this.onResize),this.onResize();var t=this;this.root.bind("click",function(){t.hide(),t.root.unbind("click"),e.$el.find(".js_price_star_filter").hide()})})},events:{"click .hotel-mysite":"getPosition","click #js_select_date":"showCalendar","click #js_submit":"submitAction","click #js_city":"eventSelectCity","click #js_query_kw":"go2KWCat","click #js_query_star_price":x.showStarPrice,"click .js_price_star_filter_ok":x.saveStarPrice,"click .js_price_star_filter .js_price_h":x.checkPrice,"click .js_price_star_filter .js_star_h":x.checkStar},onCreate:function(){this.render()},onLoad:function(e){var t=this.initModules(e);return t?(this.updateHtmlDate(),"citylist"===e&&p.call(this),x.init(this.els,this.mask),this.injectHeaderView(),this.headerview.show(),void this.turning()):!1},onShow:function(){var e=this;e.headerview.set({title:"国内/海外酒店",back:!0,view:e,tel:{},home:!0,events:{homeHandler:function(){e.homeHandler()},returnHandler:function(){e.homeHandler()}}}),this.headerview.show(),this.updateKeywordsText(),e.updateStoreDate(e.cidat.format("Y-m-d"),e.codat.format("Y-m-d")),x.updateStarPriceText(),x.updateStarPriceSelected()},onHide:function(){v.UnSubscribe("hotel/index"),E.abort(),this.alert&&this.alert.hide(),this.stopGeoStatus()}});return T}),define("hotel/dest/views/searchlist",["libs","c","cCommonListPage","cCommonPageFactory","CommonStore","HotelStore","HotelModel","cGeoService","cWidgetFactory","cWidgetGeolocation","HotelUIBubbleLayer","HotelBusiness","Toolkit","BizCityList",buildViewTemplatesPath("searchlist.html")],function(e,t,n,r,i,s,o,u,a,f,l,c,h,p,d){function v(e,t,n,r){r?p.getCityByID({id:e,callback:t,error:n}):p.getCityByName({name:e,callback:t,error:n})}function m(e,n){var r=t.base.Date.parse(e),i=t.base.Date.parse(n),s=(i.getTime()-r.getTime())/60/60/24/1e3;return s}var g=(t.base,o.SearchHotelList.getInstance()),y=(o.cityListModel.getInstance(),o.SearchHoteCommonlList.getInstance()),b=o.HotelFilterTypeModel.getInstance(),w=s.SearchHotelList.getInstance(),E=s.HotelQueryStore.getInstance(),S=s.HotelFilterStore.getInstance(),x=s.SearchParam.getInstance(),T=s.HotelRemoteFilterDataStore.getInstance(),N=s.queryStore.getInstance(),C=(s.HotelFilterTypeParamStore.getInstance(),s.cityListStore.getInstance(),s.Morning.getInstance()),k=s.cityListStore.getInstance(),L=s.HotelSubChannelParamStore.getInstance(),A=c.HotelFilterPageContro.getInstance(),O=r.create("CommonListPage"),f=a.create("Geolocation"),M=i.UserStore.getInstance(),D=M.getUser();window.sc={hotelStore:w,hotelQuery:E,hotelParam:x,hotelFilter:S,hotelRemoteFilterDataStore:T,hotelDetail:N,Store:s,cityListStore:k,morning:C};var P={locateInfo:{status:!0,msg:""},map:function(){},getPosition:function(e){var n=null;$(e.currentTarget),P.locateInfo.status=!1;var r=this.$el.find(".js_hotel_away .js_away_text").html();u.GeoLocation.Subscribe("hotel/searchlist",{onStart:function(){this.$el.find(".js_hotel_away .js_away_text").html("正在定位中..."),this.$el.find(".js_hotel_away .js_away_refresh").addClass("refresh-rotate")},onComplete:function(e){P.locateInfo.status=!0;var t=this.dataHelper.param||{};t.params=t.params||[];var n=new ArrayEx(t.params),r=n.get(9),i=[];i=r.val instanceof Array?r.val:r.val.split("|"),r&&r.val&&i[2]?n.set(9,{type:9,val:[e.lat,e.lng,i[2]]}):n.set(9,{type:9,val:[e.lat,e.lng,4]}),t.params=n.getData(),this.dataHelper.getList(t)},onError:n=function(){P.locateInfo.status=!1,this.$el.find(".js_hotel_away .js_away_text").html(r),this.$el.find(".js_away_refresh").removeClass("refresh-rotate"),this.alert=new t.ui.Alert({title:"提示信息",message:"定位失败,您可以通过在设置中开启定位服务,开启WIFI,以提高定位成功率;或选择城市查询",buttons:[{text:"知道了",click:function(){this.hide()}}]}),this.alert.show()},onPosError:n},this)},priceStar:{show:function(){this.mask.show();var e=this.dataHelper.getParam();this.priceStarInit(e),this.$el.find(".js_price_star_filter").css("z-index","9999").show()},ok:function(){this.$el.find(".js_price_star_filter").hide(),this.mask.hide();var e=[],t="",n="",r=this.$el.find(".js_price_star_filter .js_star_h").filter(".current"),i=this.$el.find(".js_price_star_filter .js_price_h").filter(".current");"all"!=i.attr("data-price")?(t=i.text(),n=i.attr("data-price").split("|").join(","),e.push({type:1,val:i.attr("data-price").split("|")})):(e.push({type:1,val:[]}),x.setAttr("price",{}));var s=[],o=[],u=[];r.each(function(e,t){"all"!=$(t).attr("data-star")&&(s=s.concat($(t).attr("data-star").split("|")),o.push($(t).text()),u.push($(t).attr("data-star")))}),s.length>0?e.push({type:2,val:s}):(e.push({type:2,val:[]}),x.setAttr("star",{}));var a=new ArrayEx(e),f=this.dataHelper.getParam(),l=new ArrayEx(x.getAttr("query"));l.set(1,a.get(1)),l.set(2,a.get(2)),f.params=l.getData(),x.setAttr("query_filter",l.getData()),x.setAttr("query",l.getData()),E.setAttr("query_filter",l.getData()),this.priceStarInit(f),this.filterInit(f),this.dataHelper.getList(f)},priceCheckBox:function(e){this.$el.find(".js_price_star_filter .js_price_h").removeClass("current"),$(e.currentTarget).addClass("current")},starCheckBox:function(e){$(e.currentTarget).hasClass("js_star_all")?this.$el.find(".js_price_star_filter .js_star_h").removeClass("current"):this.$el.find(".js_price_star_filter .js_star_h").eq(0).removeClass("current"),$(e.currentTarget).toggleClass("current"),0==this.$el.find(".js_price_star_filter .js_star_h.current").length&&this.$el.find(".js_price_star_filter .js_star_h").eq(0).addClass("current")}},sort:{show:function(e){var t=this;t.$el.find(".js_in_Footer").css("z-index","3000"),this.bubbleLayer.showMenu({dir:"down",triggerEl:$(e.currentTarget),click:function(e){var n=t.dataHelper.param;n.by=e.data.by,n.direct=e.data.dir,n.idx=1,E.setAttr("direct",e.data.dir),E.setAttr("by",e.data.by),x.setAttr("direct",e.data.dir),x.setAttr("by",e.data.by),t.dataHelper.page=2,t.dataHelper.getList(n);var r="";r=0==e.index?e.name:1==e.data.dir?e.name+'<i class="cui-fl-sort cui-fl-sort-down"></i>':e.name+'<i class="cui-fl-sort"></i>',t.$el.find(".js_sort_h").addClass("cond-bar-current").html(r),t.$el.find(".js_in_Footer").css("z-index","9999"),this.hide()},itemTemplate:'<i class="<%if(itemData.index!=0){%>cui-fl-sort<%}%> <%if(itemData.data.dir==1){%>cui-fl-sort-down<%}%>"></i><%=itemData.name%><%=itemData.iscur%>',data:[{name:"携程排序",data:{by:0,dir:1},index:0},{name:"评分",data:{by:3,dir:1},index:1},{name:"价格",data:{by:1,dir:2},index:2},{name:"价格",data:{by:1,dir:1},index:3},{name:"距离",data:{by:4,dir:2},index:4}],curData:{by:x.getAttr("by")||0,dir:x.getAttr("direct")||1}})}},heardSwitch:function(e,t){var n=$(e.currentTarget),r="number"==typeof t?t:n.index();r=r||0,x.setAttr("heardIndex",r);var i=this;i.hideWarning404(),i.$el.find(".js_switch_h").removeClass("current"),n.addClass("current"),0==r?(i.$el.find(".js_filter,js_in_Footer").show(),i.$el.find(".js_searchbody1").show(),i.$el.find(".js_searchbody2").hide(),i.$el.find(".js_mapbtn").show(),i.listRender(w.get()),i.isComplate=!1):(i.$el.find(".js_filter").hide(),i.$el.find(".js_searchbody1").hide(),i.$el.find(".js_searchbody2").show(),i.$el.find(".js_mapbtn").hide(),i.isComplate=!0,i.dataHelper.getCommList(i.dataHelper.param),D&&D.Auth||(i.elsBox.hotelComListBox1.html(i.elsBox.noLoginTpl.html()).show(),i.$el.find(".js_more_myfavhotel_link").hide()))},showAll:function(){var e=this;e.$el.find(".js_switch_h").removeClass("current"),e.$el.find(".js_switch_h").eq(0).addClass("current"),e.$el.find(".js_mapbtn").show(),e.$el.find(".js_in_Footer,js_filter").show(),e.$el.find(".js_searchbody1").show(),e.$el.find(".js_searchbody2").hide(),e.isComplate=!1},showComm:function(){var e=this;e.$el.find(".js_switch_h").removeClass("current"),e.$el.find(".js_switch_h").eq(1).addClass("current"),e.$el.find(".js_mapbtn").hide(),e.$el.find(".js_searchbody2").show(),e.$el.find(".js_searchbody1").hide(),e.isComplate=!0,e.dataHelper.getCommList(e.dataHelper.param),D&&D.Auth||(e.elsBox.hotelComListBox1.html(e.elsBox.noLoginTpl.html()).show(),e.$el.find(".js_more_myfavhotel_link").hide())},loginNow:function(){var e="/webapp/myctrip/#account/login?from="+encodeURIComponent(this.getRoot()+"#searchlist?switch=1");this.jump(e)},listmap:function(){this.forward("searchlistmap")},listFilter:function(){this.forward("searchfilter")},listReturn:function(){this.back("index")},listAreaFilter:function(){var e=P._getSelectArea();A.setCurrent(null,null,null,"ListAreaFilterBtnComplete","ListAreaFilterBtnCancel",e),this.forward("areafilter")},_getSelectArea:function(){var e=x.getAttr("area_param"),t=[];return e?(_.each(e,function(e,n){var r={};r.type=parseInt(n),r.id=parseInt(e.id),t.push(r),e.sid&&t.push({id:parseInt(e.sid)})}),t):t},listClick:function(e){var n=this.getSelfParams(),r=$(e.currentTarget),i=r.attr("data-hotelid"),s=1,o=x.getAttr("city"),u=E.getAttr("days")||1;o&&o.ctryId>1&&(s=2),C.isMorning()?(n.contrl=4|n.contrl,n.outDay=t.base.Date.parse(n.inDay).addDay(u-1).format("Y-m-d")):n.outDay=t.base.Date.parse(n.inDay).addDay(u).format("Y-m-d"),N.set({detailHtml:{id:i,setInfo:{cityId:~~n.cityId,dstId:~~n.dstId,inDay:n.inDay,outDay:n.outDay},pay:n.pay,contrl:254&n.contrl,needRoom:!1,num:1,biz:s,sourBiz:0,priceBiz:0,icldrid:-1}}),this.scrollTop=$(window).scrollTop();var a=m((new t.base.Date(t.base.getServerDate())).format("Y-m-d"),n.inDay),f=new h.QueryStringBuilder;f.set("hotelid",i),f.set("days",u),f.set("daylater",1*a),f.set("pay",n.pay),f.set("biz",n.biz),f.set("contrl",254&n.contrl),this.forward("detail?"+f.toString())}},H=function(e){this.view=e,this.page=2};H.prototype={page:2,getNextPage:function(){var e=this.view,t=this,n=w.getAttr("reccount"),r=this.getParam();return r.size*(this.page-1)>n?void e.$el.find(".js_notmorelistrs").show():(e.listShowLoading(),e.$el.find(".js_notmorelistrs").hide(),this.page=x.getAttr("idx"),this.page=this.page||2,r.idx=this.page,this.saveParam(r),g.setParamStore(t.paramStringify(r)),t.liststore=$.extend({},w.get()),void g.excute(function(t){e.listHideLoading(),e.addListRender(t)},function(){e.hideLoading(),e.turning(),e.showWarning404(function(){location.reload()})},!0,t,function(){e.hideLoading(),e.turning(),e.showWarning404(function(){location.reload()})}))},checkDate:function(e){return e&&void 0!==e.reccount&&e.htlInfos?!0:!1},getList:function(e){var t=this.view,n=this;this.saveParam(e),g.setParamStore(n.paramStringify(e)),t.showLoading(),g.excute(function(e){return this.checkDate(e)?(t.scrollTop=0,setTimeout(function(){window.scrollTo(0,0)},0),t.listRender(e),x.setAttr("idx",2),this.page=2,t.turning(),void t.hideLoading()):(t.hideLoading(),t.turning(),void t.showWarning404(function(){location.reload()}))},function(){t.hideLoading(),t.turning(),t.showWarning404(function(){location.reload()}),w.set({})},!0,n,function(){t.hideLoading(),t.turning(),t.showWarning404(function(){location.reload()}),w.set({})})},getCommList:function(){var e=this.view,t=this,n=E.getAttr("address"),r=E.getAttr("city");r.did=r.did||0;var i={biz:1,contrl:7,cordinfo:{ctype:3,lat:0,lon:0},raduis:4,setInfo:{cityId:0,dstId:0,inDay:"",outDay:""}};n&&(i.cordinfo.lat=n.lat,i.cordinfo.lon=n.lng),r&&(i.setInfo.cityId=r.cityId,i.setInfo.dstId=r.did<0?0:r.did),i.setInfo.inDay=E.getAttr("inDay"),i.setInfo.outDay=E.getAttr("outDay"),C.isMorning()&&(i.contrl=8|i.contrl),y.setParamStore(i),e.showLoading(),y.excute(function(t){e.scrollTop=0,setTimeout(function(){window.scrollTo(0,0)},0);var n={},r={},i={};for(var s in t.commhotels)1==t.commhotels[s].contrl?n=t.commhotels[s]:2==t.commhotels[s].contrl?r=t.commhotels[s]:i=t.commhotels[s];D&&D.Auth?(n.htlInfos&&n.htlInfos.length>0?(n.htlInfos.length>=5?(n.htlInfos.length=5,e.$el.find(".js_more_myfavhotel_link").show()):e.$el.find(".js_more_myfavhotel_link").hide(),e.elsBox.hotelComListBox1.html("").hide(),e.elsBox.hotelComListBox2.html(e.favHotelListFun($.extend(B,n))).show()):(e.elsBox.hotelComListBox1.html(e.elsBox.noFavoriteTpl.html()).show(),e.elsBox.hotelComListBox2.html("").hide(),e.$el.find(".js_more_myfavhotel_link").hide()),r.htlInfos&&r.htlInfos.length>0&&e.elsBox.livedHotelListBox.show().find(".js_mylived_hotel_list").html(e.favHotelListFun($.extend(B,r)))):(e.elsBox.hotelComListBox1.html(e.elsBox.noLoginTpl.html()).show(),e.$el.find(".js_more_myfavhotel_link").hide()),i.htlInfos&&i.htlInfos.length>0&&e.elsBox.hotHotelListBox.show().find(".js_hot_hotel_list").html(e.hotelListFun($.extend(B,i))),e.hideLoading()},function(){e.hideLoading(),e.showWarning404(function(){location.reload()})},!0,t,function(){e.hideLoading(),e.showWarning404(function(){location.reload()})})},createParams:function(e){var t=[],n=e.slice(0);for(var r in n){switch(n[r].type){case 1:n[r].val[0]&&!n[r].val[1]&&(n[r].val[1]=0);break;case 2:for(var i in n[r].val)"liansuo"==n[r].val[i]&&(n[r].val[i]="-101");break;case 9:!n[r].val[2]&&n[r].val[1]&&n[r].val[0]?n[r].val[2]=4:n[r].val[2]<0&&(n[r].val[1]&&n[r].val[0]?n[r].val[2]=999:n[r].val=0)}n[r].val&&n[r].val.join&&n[r].val.length>0?(n[r].val=n[r].val.join("|"),n[r].val.length>0&&t.push(n[r])):n[r].val&&(n[r].val=n[r].val.toString(),n[r].val.length>0&&t.push(n[r]))}return t},paramStringify:function(e,t){var n={biz:1,contrl:e.contrl||0,facility:e.facility||0,key:e.key||"",keytp:0,pay:e.pay||0,querys:[],setInfo:{cityId:~~e.cityId,dstId:~~e.dstId,inDay:e.inDay,outDay:e.outDay},sort:{dir:e.direct||1,idx:e.idx||1,ordby:e.by||0,size:25}};t=t||{},n=$.extend(t,n),C.isMorning()&&(n.contrl=4|n.contrl);var r=new ArrayEx(e.params);return r.get(17)&&(r.get(14)?r.set(14,{type:14,val:r.get(17).val.concat(r.get(14).val)}):r.set(14,{type:14,val:r.get(17).val}),r.set(17,{})),e.params=r.getData(),n.querys=this.createParams(e.params),n=this.saleParam(n)},saleParam:function(e){return this.view.getQuery("subchannel")&&L.setAttr("subchannel",this.view.getQuery("subchannel")),L.getAttr("subchannel")&&(e.setInfo.membertype=L.getAttr("subchannel")),e},saveParam:function(e){w.setAttr("s_param",e),this.param=e},getParam:function(){var e={cityId:0,dstId:0,params:[],facility:0,pay:0,contrl:3,biz:1,idx:1,size:25,by:0,direct:1,key:"",keytp:0},e=w.getAttr("s_param")||e;return this.param=this.param||{},e=$.extend(e,this.param)}},ArrayEx=function(e){this.data=e},ArrayEx.prototype={get:function(e){try{var t=this.data;if(t&t.length)return null;for(var n=0;n<t.length;n++)if(t[n].type==e)return t[n];return null}catch(r){return null}},set:function(e,t){try{for(var n=this.data,r=0;r<n.length;r++)if(n[r].type==e)return n[r]=t,!0;return n.push(t),!0}catch(i){return!1}},getData:function(){return this.data}};var B={htlInfos:[]},j=O.extend({pageid:"212093",hasAd:!0,adContainer:"in_footer",isComplate:!0,events:{"click .js_price_star_filter_h":P.priceStar.show,"click .js_price_star_filter_ok":P.priceStar.ok,"click .js_sort_h":P.sort.show,"click .js_price_star_filter .js_price_h":P.priceStar.priceCheckBox,"click .js_price_star_filter .js_star_h":P.priceStar.starCheckBox,"click .js_away_refresh":P.getPosition,"click .js_switch_h":P.heardSwitch,"click .js_loginnow":P.loginNow,"click .js_mapbtn":P.listmap,"click .js_searchlist_filter_btn":P.listFilter,"click .js_search_return_btn":P.listReturn,"click .js_hotel_detail":P.listClick,"click .js_searchlist_filter_area":P.listAreaFilter,"click .js_more_myfavhotel_link":function(){this.jump("/webapp/myctrip/#myinfo/myfavorites")}},getAppUrl:function(){var e="/hotel_inland_list",n=this.getSelfParams();n=this.dataHelper.paramStringify(n);var r,i=(new t.base.Date(n.setInfo.inDay)).format("Ymd"),s=(new t.base.Date(n.setInfo.outDay)).format("Ymd"),o=n.setInfo.cityId,u=n.setInfo.dstId,a=0,f="",l="",c=0,h=1,p="",d="",v=new ArrayEx(n.querys);if(v){var m=v.get(3);m&&(f=m.val.split("|")[0])}return x.getAttr("isSearchListWithCity")||(p=x.getAttr("address.lat"),d=x.getAttr("address.lng"),p&&d&&(h=2)),r="?c1="+(i||"")+"&c2="+(s||"")+"&c3="+(o||"")+"&c4="+(u||"")+"&c5="+(a||"")+"&c6="+(f||"")+"&c7="+(l||"")+"&c8="+(c||"")+"&c9="+(h||"")+"&c10="+(p||"")+"&c11="+(d||""),e+r},onCreate:function(){this.render(),this.dataHelper=new H(this),this.bubbleLayer=new l;var e=this;e.mask=new t.ui.Mask,e.mask.addEvent("onShow",function(){$(window).bind("resize",this.onResize),this.onResize();var t=this;this.root.bind("click",function(){t.hide(),t.root.unbind("click"),e.$el.find(".js_price_star_filter").hide()})})},listRender:function(e){var t=this;if(!t.dataHelper.checkDate(e))return t.hideLoading(),void t.showWarning404(function(){location.reload()});t.$el.find(".js_allcount").html("全部"+e.reccount);var n=[],r=[];for(var i in e.htlInfos)3==e.htlInfos[i].baseInfo.priceBiz?n.push(e.htlInfos[i]):r.push(e.htlInfos[i]);0==e.reccount?(t.closeBottomPull(),t.isComplate=!0,t.elsBox.hotelListBox.html(""),t.elsBox.hotelListNoRsTpl.show(),n.length>0&&t.elsBox.hotelRmdListBox.html(t.hotelListFun($.extend(B,{htlInfos:n}))).parent().show()):(t.isComplate=!1,t.elsBox.hotelListNoRsTpl.hide(),t.elsBox.hotelListBox.html(t.hotelListFun($.extend(B,{htlInfos:r}))).parent().show(),t.elsBox.hotelRmdListBox.html("").parent().hide(),1==e.reccount&&(t.closeBottomPull(),t.isComplate=!0));var s={cordinfo:{lat:116.397428,lon:39.90923,ctype:3},posrem:"定位失败",raduis:4,key:{type:0,id:0,code:"0"}};e.curpos&&""==e.curpos.posrem?x.getAttr("isSearchListWithCity")?(x.setAttr("isSearchListWithCity",!0),e.curpos.posrem=x.getAttr("kwText")?x.getAttr("kwText"):"未知区域"):(x.setAttr("isSearchListWithCity",!1),e.curpos.posrem="您的位置&nbsp;"+((E.getAttr("address")||{}).address||"")):x.setAttr("isSearchListWithCity",!0),t.elsBox.hotelAwayBox.html(t.hotelAwayFun($.extend(s,e.curpos))),x.getAttr("isSearchListWithCity")?t.elsBox.hotelAwayBox.find(".js_away_refresh").hide():t.elsBox.hotelAwayBox.find(".js_away_refresh").show(),this.getSelfParams()},addListRender:function(e){var t=this,n=[],r=[];t.dataHelper.page++,x.setAttr("idx",t.dataHelper.page);for(var i in e.htlInfos)1==e.htlInfos[i].baseInfo.sourBiz?n.push(e.htlInfos[i]):r.push(e.htlInfos[i]);if(w.getAttr("htlInfos")){var s=w.getAttr("htlInfos");s=t.dataHelper.liststore.htlInfos.concat(s),w.setAttr("htlInfos",s)}r.length>0?(t.isComplate=!1,t.$el.find(".js_notmorelistrs").hide(),t.elsBox.hotelListBox.append(t.hotelListFun($.extend(B,{htlInfos:r}))),t.endPull()):(t.isComplate=!0,t.$el.find(".js_notmorelistrs").show(),t.closeBottomPull())},onLoad:function(e){var n=this;n.backflg=e;var r,i=E.getAttr("days");switch(e){case"index":E.setAttr("contrl",3),E.setAttr("facility",0),E.setAttr("pay",0),E.setAttr("by",0),E.setAttr("direct",1),E.setAttr("area_filter",[]),x.set(E.get()),x.setAttr("query_filter",x.getAttr("query")),E.setAttr("query_filter",x.getAttr("query")),this.$el.find(".js_filter").show(),r=this.getSearchParams(),this.dataHelper.param=r,this.priceStarInit(r),this.filterInit(r),this.areaInit(r),this.sortInit(r),this.getUrlQuery(r),this.shareflg=!0,this.dataHelper.getList(r);break;case"detail":r=this.getSelfParams(),this.priceStarInit(r),this.filterInit(r),this.areaInit(r),this.sortInit(r),this.dataHelper.saveParam(r),i=i||1,E.getAttr("inDay")&&(C.isMorning()?x.setAttr("outDay",t.base.Date.parse(E.getAttr("inDay")).addDay(i-1).format("Y-m-d")):x.setAttr("outDay",t.base.Date.parse(E.getAttr("inDay")).addDay(i).format("Y-m-d")));var s=w.getAttr("htlInfos");_.isEmpty(s)?(this.dataHelper.getList(r),this.turning()):(this.listRender(w.get()),this.turning());break;case"searchlistmap":this.turning(),r=this.getSelfParams(),this.dataHelper.param=r,this.priceStarInit(r),this.filterInit(r),this.areaInit(r),this.sortInit(r),this.dataHelper.saveParam(r),this.listRender(w.get());break;case"searchfilter":case"filtersubpage":case"areafilter":"filter_cancel"==this.getQuery("from")?(r=this.getSelfParams(),this.priceStarInit(r),this.filterInit(r),this.areaInit(r),this.sortInit(r),this.dataHelper.saveParam(r),this.listRender(w.get()),this.turning()):(r=this.getSelfParams(),this.dataHelper.param=r,this.filterInit(r),this.areaInit(r),this.priceStarInit(r),this.sortInit(r),this.dataHelper.getList(r));break;case"searchlist":default:var o=this.getQueryParams();if(o){if(this.shareflg)return;C.setStatus(this.getQuery("ismorning")>0?!0:!1),this.getQueryExParams(o,function(){r=this.getSelfParams(),r.dstId=o.dstId,r.inDay=o.inDay,r.outDay=o.outDay;var e=E.getAttr("days");x.setAttr("days",e),this.dataHelper.param=r,this.priceStarInit(r),this.filterInit(r),this.areaInit(r),this.sortInit(r),this.dataHelper.getList(r)})}else r=this.getSelfParams(),this.dataHelper.param=r,this.priceStarInit(r),this.filterInit(r),this.areaInit(r),this.sortInit(r),this.dataHelper.getList(r);var u=x.getAttr("heardIndex");"number"==typeof u&&P.heardSwitch.call(this,{},u)}},onShow:function(){$("#headerview").hide();var e=x.getAttr("heardIndex")||0;this.getQuery("switch")||1===e?P.showComm.call(this):(P.showAll.call(this),this.$el.find(".js_in_Footer").show()),x.getAttr("isSearchListWithCity")?this.$el.find(".js_away_refresh").hide():this.$el.find(".js_away_refresh").show();var t=this.scrollTop||0;setTimeout(function(){window.scrollTo(0,t)},0)},onHide:function(){$("#headerview").show()},getSearchParams:function(){var e={cityId:0,dstId:0,params:[],facility:0,pay:0,contrl:3,biz:1,idx:1,size:25,by:0,direct:1,key:"",keytp:0},t=[],n=new ArrayEx(t),r=x,i=r.getAttr("city"),s=r.getAttr("address"),o=r.getAttr("query"),u=new ArrayEx(o);if(r.getAttr("inDay")&&(e.inDay=r.getAttr("inDay")),r.getAttr("outDay")&&(e.outDay=r.getAttr("outDay")),r.getAttr("isSearchListWithCity"))i&&(e.cityId=i.cityId,e.dstId=i.did<0?0:i.did,n.set(9,{type:9,val:[]}));else if(s){var a=[4,5,6],f=!0;for(var l in a)u.get(a[l])&&(f=!1,r.setAttr("isSearchListWithCity",!0),i&&(e.cityId=i.cityId,e.dstId=i.did<0?0:i.did));f&&(r.setAttr("isSearchListWithCity",!1),r.getAttr("raduis")&&r.getAttr("raduis")>0?n.set(9,{type:9,val:[s.lat,s.lng,r.getAttr("raduis")]}):r.getAttr("raduis")&&r.getAttr("raduis")<0?n.set(9,{type:9,val:[s.lat,s.lng]}):(n.set(9,{type:9,val:[s.lat,s.lng,4]}),r.setAttr("raduis",4)),e.cityId=0,e.dstId=0,this.backflg=this.backflg||"",0==r.getAttr("by")&&"searchlistmap"!=this.backflg&&(e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2)))}if(r.getAttr("facility")&&(e.facility=r.getAttr("facility")),r.getAttr("pay")&&(e.pay=~~r.getAttr("pay")),r.getAttr("contrl")&&(e.contrl=r.getAttr("contrl")),r.getAttr("price")&&r.getAttr("price").value){var c=r.getAttr("price").value.split(",");n.set(1,{type:1,val:c})}else{var h=n.get(1);h&&h.val.join&&r.setAttr("price",{val:h.val.join(",")})}if(r.getAttr("star")&&r.getAttr("star").value&&r.getAttr("star").value.join&&r.getAttr("star").value.join("").length>0)n.set(2,{type:2,val:r.getAttr("star.value")}),i&&(e.cityId=i.cityId,e.dstId=i.did<0?0:i.did);else{var p=n.get(2);p&&p.val.join&&p.val.join("").length>0&&(r.setAttr("star",{val:p.val.join(",")}),i&&(e.cityId=i.cityId,e.dstId=i.did<0?0:i.did))}if(o){var d=(u.get(9),!0),v=r.getAttr("kwHasGeos"),m=r.getAttr("area_param");m=m||{};for(var g in o)switch(o[g].type){case 7:v&&(d=!1,v.geos=v.geos||{lat:0,lon:0},n.set(9,{type:9,val:[v.geos.lat,v.geos.lon,4,1,v.id,v.name]})),e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2),r.setAttr("raduis",4),r.setAttr("isSearchListWithCity",!0);break;case 11:if(r.getAttr("raduis")||r.setAttr("raduis",4),m&&(m[4]||m[9])){d=!1;var y;y=m[4]?m[4]:m[9],n.set(9,{type:9,val:[y.lat,y.lon,r.getAttr("raduis"),8,y.id,y.title]}),x.setAttr("kwText",y.title),0==r.getAttr("by")&&(e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2))}else v&&(d=!1,v.geos=v.geos||{lat:0,lon:0},n.set(9,{type:9,val:[v.geos.lat,v.geos.lon,r.getAttr("raduis"),8,v.id,v.name]}),m[4]={lat:v.geos.lat,lon:v.geos.lon,id:v.id,title:v.name},e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2));r.setAttr("isSearchListWithCity",!0);break;case 12:r.getAttr("raduis")||r.setAttr("raduis",4),m&&m[3]?(d=!1,n.set(9,{type:9,val:[m[3].lat,m[3].lon,r.getAttr("raduis"),7,m[3].id,m[3].title]}),x.setAttr("kwText",m[3].sname),0==r.getAttr("by")&&(e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2))):v&&(d=!1,v.geos=v.geos||{lat:0,lon:0},n.set(9,{type:9,val:[v.geos.lat,v.geos.lon,r.getAttr("raduis"),7,v.id,v.name]}),m[3]={id:r.getAttr("kwCurVal.catId"),lat:v.geos.lat,lon:v.geos.lon,sid:v.id,sname:v.name},e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2)),r.setAttr("isSearchListWithCity",!0);break;case 16:r.getAttr("raduis")||r.setAttr("raduis",4),m&&m[9]?(d=!1,n.set(9,{type:9,val:[m[9].lat,m[9].lon,r.getAttr("raduis"),5,m[9].id,m[9].title]}),x.setAttr("kwText",m[9].title),0==r.getAttr("by")&&(e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2))):v&&(d=!1,v.geos=v.geos||{lat:0,lon:0},n.set(9,{type:9,val:[v.geos.lat,v.geos.lon,r.getAttr("raduis"),5,v.id,v.name]}),m[9]={lat:v.geos.lat,lon:v.geos.lon,id:v.id,title:v.name},e.direct=2,e.by=4,r.setAttr("by",4),r.setAttr("direct",2)),r.setAttr("isSearchListWithCity",!0);break;case 9:d&&(o[g].val[2]=r.getAttr("raduis"),n.set(9,o[g]));break;case 4:n.set(9,{type:9,val:[]});default:var b={4:2,6:3,12:3,5:1,11:4,16:9};i&&(e.cityId=i.cityId,e.dstId=i.did<0?0:i.did),n.set(o[g].type,o[g]),!m[b[o[g].type]]&&b[o[g].type]&&(m[b[o[g].type]]={id:o[g].val,title:x.getAttr("kwText")})}r.setAttr("area_param",m)}if(r.getAttr("raduis")){var w=n.get(9);w&&w.val.length>0?(w.val[2]=r.getAttr("raduis"),n.set(9,w)):n.set(9,{type:9,val:["","",r.getAttr("raduis")]})}return e.by=r.getAttr("by"),e.direct=r.getAttr("direct"),e.params=n.getData(),e.dstId=e.dstId||0,r.setAttr("query",n.getData()),r.setAttr("query_filter",n.getData()),e},getQueryParams:function(){var e=function(e){this.seo_param={cityId:0,dstId:0,params:[],facility:0,pay:0,contrl:3,biz:1,idx:1,size:25,by:0,direct:1,key:"",keytp:0,inDay:(new t.base.Date(t.base.getServerDate())).format("Y-m-d"),outDay:(new t.base.Date(t.base.getServerDate())).addDay(1).format("Y-m-d")},E.setAttr("contrl",3),E.setAttr("facility",0),E.setAttr("pay",0),E.setAttr("by",0),E.setAttr("direct",1),E.setAttr("inDay",(new t.base.Date(t.base.getServerDate())).format("Y-m-d")),E.setAttr("outDay",(new t.base.Date(t.base.getServerDate())).addDay(1).format("Y-m-d")),this.seo_ex_arr=new ArrayEx([]),this.hotelQuery=E,this.hotelParam=x,this.view=e};e.prototype={addParam:function(e,n){var r=this.hotelQuery,i=this.hotelParam,s=this.view,o={group:10,brand:3,star:2,price:1},u={landmk:11,dst:4,zone:5,line:6,lsit:12};switch(e){case"cityid":this.seo_param.cityId=~~n,r.setAttr("city.cityId",~~n),v(n,function(e){e.did=this.seo_param&&this.seo_param.dstId?this.seo_param.dstId:-1,r.setAttr("city",e),r.setAttr("isSearchListWithCity",!0),i.setAttr("isSearchListWithCity",!0),i.setAttr("city",e)},function(){},!0);break;case"area":this.seo_param.dstId=n,r.setAttr("isSearchListWithCity",!0),i.setAttr("isSearchListWithCity",!0);break;case"key":this.seo_param.key=n,this.seo_ex_arr.set(8,{type:8,val:n}),r.setAttr("isSearchListWithCity",!0),i.setAttr("isSearchListWithCity",!0);break;case"dst":case"zone":case"line":case"lsit":case"landmk":this.seo_ex_arr.set(u[e],{type:u[e],val:n}),r.setAttr("isSearchListWithCity",!0),i.setAttr("isSearchListWithCity",!0);break;case"group":case"brand":case"star":case"price":var a=n.split(",");$(a).each(function(e,t){a[e]=~~t}),this.seo_ex_arr.set(o[e],{type:o[e],val:a});break;case"pos":var l=n;_.isString(l)&&(l=l.split(","));var s=this.view;l&&2===l.length&&(l[2]=4,this.seo_ex_arr.set(9,{type:9,val:l}),i.setAttr("isSearchListWithCity",!1),r.setAttr("isSearchListWithCity",!1),f.requestAMapAddress(l[1],l[0],function(e){e.address&&(i.setAttr("address",e),r.setAttr("address",e),s.elsBox.hotelAwayBox.html(s.hotelAwayFun({posrem:"您的位置&nbsp;"+e.address})),x.getAttr("isSearchListWithCity")?s.elsBox.hotelAwayBox.find(".js_away_refresh").hide():s.elsBox.hotelAwayBox.find(".js_away_refresh").show(),s.setAddressParam(e))},function(){s.toast.show("定位失败")}));break;case"daylater":var c=~~n,h=new t.base.Date(t.base.getServerDate());h.addDay(c),this.seo_param.inDay=h.format("Y-m-d"),this.seo_param.outDay=h.addDay(1).format("Y-m-d"),r.setAttr("inDay",this.seo_param.inDay),r.setAttr("outDay",this.seo_param.outDay);break;case"days":var p=~~n,d=new t.base.Date(this.seo_param.inDay);d.addDay(p),this.seo_param.outDay=d.format("Y-m-d"),r.setAttr("inDay",this.seo_param.inDay),r.setAttr("outDay",this.seo_param.outDay),r.setAttr("days",p);break;case"ismorning":C.isMorning(),~~n>0?(C.setStatus(!0),this.seo_param.outDay=t.base.Date.parse(this.seo_param.outDay).addDay(-1).format("Y-m-d"),r.setAttr("outDay",this.seo_param.outDay)):C.setStatus(!1)}},getParam:function(){return this.seo_param.params=this.seo_ex_arr.getData(),this.seo_param}};for(var n=new e(this),r=null,i=["cityid","area","key","landmk","dst","zone","group","brand","star","price","pos","daylater","days","line","lsit","ismorning"],s=0;s<i.length;s++)this.getQuery(i[s])&&(n.addParam(i[s],this.getQuery(i[s])),r=n.getParam());if(r){var o=E.get();o.query=r.params,o.query_filter=r.params,o.inDay=r.inDay,o.outDay=r.outDay,x.set(o),(this.getQuery("brand")||this.getQuery("group"))&&x.setAttr("brand_filter",null)}return r},getQueryExParams:function(e,t){for(var n=e.params,r=this,i={11:!0,12:!0,4:!0,5:!0,6:!0},s={4:2,6:3,12:3,5:1,11:-1},o=0;o<n.length;o++)if(i[n[o].type]){var u={mtype:s[n[o].type]};return 12==n[o].type?u.sid=~~n[o].val:u.id=~~n[o].val,void b.getAreaInfos(u,function(e){x.setAttr("area_param",e),t&&t.call(r,e)})}t&&t.call(r,null)},getUrlQuery:function(e){var n=new h.QueryStringBuilder;n.set("cityid",e.cityId),n.set("area",e.dstId);var r=new ArrayEx(e.params);if(r.get(2)){var i=r.get(2),s=[];$(i.val).each(function(e,t){s.push("liansuo"==t?-101:~~t)}),n.set("star",s.join(","))}if(r.get(1)){var o=r.get(1);1e3!=o.val[0]||o.val[1]||(o.val[1]=0),n.set("price",o.val.join(","))}if(r.get(10)&&n.set("group",r.get(10).val.join(",")),r.get(3)&&n.set("brand",r.get(3).val.join(",")),r.get(5)&&n.set("zone",r.get(5).val),r.get(4)&&n.set("dst",r.get(4).val),0==x.getAttr("isSearchListWithCity")){var u=x.getAttr("address");u&&n.set("pos",u.lat+","+u.lng)}x.getAttr("days")&&n.set("days",x.getAttr("days")),C.isMorning()?n.set("ismorning",1):n.set("ismorning",0);var a=m((new t.base.Date(t.base.getServerDate())).format("Y-m-d"),e.inDay);return n.set("daylater",1*a),location.hash="searchlist?"+n.toString(),n.toString()},setAddressParam:function(e){v(e.city,function(e){x.setAttr("city",e),E.setAttr("city",e)},function(){})},getSelfParams:function(){return x.setAttr("query",x.getAttr("query_filter")),x.getAttr("area_filter")&&x.getAttr("area_filter").length>1&&x.setAttr("kwCurVal",{catAll:!1,catId:x.getAttr("area_filter")[0].id,itemId:-1}),this.getSearchParams()},priceStarInit:function(e){if(e&&e.params){var t=e.params,n=new ArrayEx(t),r=n.get(1),i=n.get(2),s=this.$el.find(".js_price_star_filter"),o=0;if(s.find(".js_price_h").removeClass("current"),s.find(".js_star_h").removeClass("current"),s.find(".js_star_all").addClass("current"),s.find(".js_price_all").addClass("current"),r&&r.val&&r.val.length>0&&(s.find(".js_price_all").removeClass("current"),r.val.join&&r.val.join("").length>0?(r.val[1]||1e3!=r.val[0]||(r.val[1]=0),s.find(".js_price_h[data-price='"+r.val.join("|")+"']").addClass("current").length>0&&(o=1|o)):s.find(".js_price_h[data-price='"+r.val+"']").addClass("current").length>0&&(o=1|o)),i&&i.val&&i.val.length>0){o=2|o,s.find(".js_star_all").removeClass("current");var u=i.val;_.isString(u)&&(u=u.split("|"),$(u).each(function(e,t){-101==t&&(u[e]="liansuo")}));for(var a in u)""==u[a]?(s.find(".js_star_all").addClass("current"),o=8189&o):s.find(".js_star_h[data-star*='"+u[a]+"']").addClass("current")}o>0?this.$el.find(".js_price_star_filter_h .hotel-bar-cnum").html(o.toString(2).replace(/0/gi,"").length).show():this.$el.find(".js_price_star_filter_h .hotel-bar-cnum").hide()}},getfilterObj:function(e){var t=null;return _.each(e,function(e,n){t=e,t.type=n,t.sname&&(t.title=t.sname)}),t},filterInit:function(e){var t=function(e){var t=e.toString(2).split(""),n=[];for(var r in t)1==t[r]&&n.push(Math.pow(2,t.length-r-1));return n};if(e){var n={},r=e.params||[],i=(this.$el.find(".js_price_star_filter"),0),o=new ArrayEx(r),u=x.get();u.facility&&(i+=1,n[s.MENU_FACILITY]=t(u.facility)),u.pay&&(i+=2,n[s.MENU_PAYS]=t(u.pay)),u.raduis&&u.raduis>0&&(i+=4,n[s.MENU_DISTANCE]=[1e3*u.raduis]),e.contrl&&64==(64&e.contrl)&&(i+=8,n[s.MENU_BARGAIN]=!0),e.contrl&&256==(256&e.contrl)&&(i+=16,n[s.MENU_AFFIRM]=!0),e.contrl&&8189==(8189|e.contrl)&&(i+=32,n[s.MENU_BOOKABLE]=!0),o.get(1)&&o.get(1).val&&o.get(1).val.length>0&&(n[s.MENU_PRICE]=1e3==o.get(1).val[0]?["1000"]:[o.get(1).val.join(",")]);var a=function(e,t){e&&(e.val&&e.val.length>0&&e.val.join&&e.val.join("").length>0?n[t]=e.val:!(e.val instanceof Array)&&e.val.toString().length>0&&(n[t]=[e.val]))};u.area_param&&(n[s.MENU_AREA]=u.area_param),a(o.get(2),s.MENU_STAR),a(o.get(3),s.MENU_BRAND),a(o.get(15),s.MENU_EVENT),"brandObj"===u.kwCurCatType?a(o.get(14),s.MENU_BRAND):a(o.get(14),s.MENU_FEATURE),a(o.get(4),s.MENU_REGION),a(o.get(5),s.MENU_BUSINESS),a(o.get(6),s.MENU_METRO),a(o.get(10),s.MENU_BRAND),a(o.get(17),s.MENU_BRAND);for(var f=[3,10,15,14,17],l=[1,1,2,3,4],c=0;c<f.length;c++){var h=o.get(f[c]);h&&h.val&&h.val.length>0&&h.val.join&&h.val.join("").length>0?i+=Math.pow(2,l[c]+6):h&&h.val>0&&(i+=Math.pow(2,l[c]+6))}i>0?this.$el.find(".js_searchlist_filter_btn i").removeClass().addClass("hotel-bar-cnum").html(i.toString(2).replace(/0/gi,"").length).show():this.$el.find(".js_searchlist_filter_btn i").removeClass().addClass("cui-fl-sort cui-fl-filter").html(""),T.set(n)}},areaInit:function(){for(var e=x.get(),t=this.getfilterObj(e.area_param),n=e.query_filter||[],r=(this.$el.find(".js_searchlist_filter_area"),0),i=new ArrayEx(n),s=[4,5,6,11,12],o={4:2,6:3,12:3,5:1,11:4},u=[],a={},f=0;f<s.length;f++){var l=i.get(s[f]);switch(s[f]){case 11:"ariportObj"==x.getAttr("kwCurCatType")}l&&l.val&&l.val.toString().length>0&&(r+=Math.pow(2,f+6),12==s[f]||(u.push({type:o[s[f]],id:~~l.val}),a[o[s[f]]]={type:o[s[f]],id:~~l.val}))}t&&t.title?this.$el.find(".js_searchlist_filter_area").addClass("cond-bar-current ellips").html(t.title):this.$el.find(".js_searchlist_filter_area").removeClass("cond-bar-current ").html("位置区域"),x.setAttr("area_filter",u)},sortInit:function(e){e.by=e.by||0;var t=["携程排序","价格","","评分","距离"];this.$el.find(".js_sort_h").addClass("cond-bar-current").html(0==e.by?t[e.by]:2==e.direct?t[e.by]+'<i class="cui-fl-sort"></i>':t[e.by]+'<i class="cui-fl-sort cui-fl-sort-down"></i>')},onBottomPull:function(){this.isComplate||this.dataHelper.getNextPage()},listShowLoading:function(){this.$el.find(".js_listview_loading").show()},listHideLoading:function(){this.$el.find(".js_listview_loading").hide()},render:function(){this.$el.html(d);var e=this;e.elsBox={hotelListTpl:e.$el.find("#js_hotel_list"),hotelListBox:e.$el.find(".js_hotel_list .hotel-g-list"),saleHotelTpl:e.$el.find("#js_salehotel"),saleHotelBox:e.$el.find(".js_salehotel"),hotelAwayTpl:e.$el.find("#js_hotel_away"),hotelAwayBox:e.$el.find(".js_hotel_away"),hotelListNoRsTpl:e.$el.find("#js_hotel_search_noresults"),hotelRmdListBox:e.$el.find(".js_recommend_list .hotel-g-list"),hotelComListBox1:e.$el.find(".js_hotel_commp1"),hotelComListBox2:e.$el.find(".js_hotel_commp2"),noLoginTpl:e.$el.find("#js_hotel_search_noloading"),noFavoriteTpl:e.$el.find("#js_hotel_search_nofavorite"),favHotelListTpl:e.$el.find("#js_hotel_search_favorite"),livedHotelListBox:e.$el.find(".js_mylived_hotel"),hotHotelListBox:e.$el.find(".js_hot_hotel")},e.hotelListFun=_.template(this.elsBox.hotelListTpl.html()),e.saleHotelFun=_.template(this.elsBox.saleHotelTpl.html()),e.hotelAwayFun=_.template(this.elsBox.hotelAwayTpl.html()),e.favHotelListFun=_.template(this.elsBox.favHotelListTpl.html())}});return j}),define("text!hotel/dest/templates/index.html",[],function(){return'<article class="p10">\r\n    <ul class="hotel-comlist hotel-lmr">\r\n        <li>\r\n            <div class="hotel-mysite hotel-r">\r\n                <i class="hotel-mysite-icon" id="js_geo_icon"></i>\r\n                <div class="hotel-greyload-icon" id="js_geo_loading" style="display: none;">\r\n		 		  	<span class="cui-pro-radius"></span>\r\n		 		  	<span class="cui-i cui-pro-logo"></span>\r\n		 		</div>\r\n                我的位置\r\n            </div>\r\n            <div class="hotel-l"><i class="hotel-icon-bed"></i>入住 </div>\r\n            <div class="hotel-m hotel-arr hotel-m-ellips">\r\n                <span class="hotel-m-cont hotel-pll" id="js_city" >我附近的酒店</span>\r\n            </div>\r\n        </li>\r\n        <li class=" hotel-arr" id="js_select_date">\r\n            <div class="hotel-mydate hotel-r" id="js_cki_date_right"></div>\r\n            <div class="hotel-l"><i class="hotel-icon-date"></i>日期</div>\r\n            <div class="hotel-m">\r\n                <span class=" hotel-m-cont hotel-pll" id="js_cki_date_left" >今天</span>\r\n            </div>\r\n        </li>\r\n        <li id="js_morning_wrap">\r\n            <div class="hotel-l"><i class="hotel-toshop-time"></i>到店时间</div>\r\n            <div class="hotel-m hotel-morning">\r\n            </div>\r\n        </li>\r\n        <li>\r\n            <div class="hotel-mydays hotel-r"><i id="js_cko_date"></i></div>\r\n            <div class="hotel-l"><i class="hotel-icon-night"></i>住几晚 </div>\r\n            <div class="hotel-m hotel-pls" id="js_cki_num"></div>\r\n        </li>\r\n    </ul>\r\n\r\n    <ul class="hotel-comlist hotel-arrlist mt10">\r\n       <li id="js_query_kw">\r\n            <div class="hotel-l"><i class="hotel-icon-keywords"></i>关键字</div>\r\n            <div class="hotel-m hotel-m-ellips" >\r\n                <span class="hotel-m-cont hotel-plm  hotel-fontgrey" id="js_kw_text_box">位置/品牌/酒店名</span>\r\n            </div>\r\n        </li>\r\n        <li id="js_query_star_price">\r\n            <div class="hotel-l"><i class="hotel-icon-price"></i>价格/星级</div>\r\n            <div class="hotel-m hotel-m-ellips">\r\n                <span class="hotel-m-cont hotel-pls" >不限</span>\r\n            </div>\r\n        </li>\r\n    </ul>\r\n\r\n    <p class=" hotel-mt20"><button class="g_btn_s" id="js_submit">查询</button></p>\r\n</article>\r\n\r\n<!--价格星级筛选-->\r\n<div class="hotel-p-s-filter js_price_star_filter" style="display:none;">\r\n     <dl>\r\n        <dt>价格</dt>\r\n        <dd class="current js_price_h js_price_all">不限</dd><dd class="js_price_h" data-price="0,150">&yen;150元以下</dd><dd class="js_price_h" data-price="150,300">&yen;150-&yen;300</dd><dd class="js_price_h" data-price="301,450">&yen;301-&yen;450</dd><dd class="js_price_h" data-price="451,600">&yen;451-&yen;600</dd><dd class="js_price_h" data-price="601,1000">&yen;601-&yen;1000</dd><dd class="js_price_h" data-price="1000">&yen;1000以上</dd>\r\n        <dt>星级</dt>\r\n        <dd class="current js_star_h js_star_all">不限</dd><dd class="js_star_h" data-star="liansuo" data-text="快捷连锁">快捷连锁</dd><dd class="js_star_h" data-star="0|1|2" data-text="二星级及以下/经济">二星级及以下/经济</dd><dd class="js_star_h" data-star="3" data-text="三星级/舒适">三星级/舒适</dd><dd class="js_star_h" data-star="4" data-text="四星级/高档">四星级/高档</dd><dd class="js_star_h" data-star="5" data-text="五星级/豪华">五星级/豪华</dd>\r\n        <div class="mt10"><button class="g_btn_s js_price_star_filter_ok">确定</button></div>\r\n     </dl>\r\n</div>'}),define("text!hotel/dest/templates/searchlist.html",[],function(){return'\r\n    <!--header-->\r\n    <div style="height:48px;">\r\n         <header>\r\n             <i class="returnico i_bef js_search_return_btn"></i>\r\n             <h1 class="title-switch js_switch">\r\n                 <span class="current js_allcount js_switch_h">全部0</span>\r\n                 <span class="js_switch_h">常用</span>\r\n             </h1>\r\n             <i id="loginBtn" class="header_r js_mapbtn">地图</i>\r\n         </header>\r\n    </div>\r\n    \r\n    <!--body box-->\r\n    <article class="js_tabp js_searchbody1"> \r\n          <!--search results-->  \r\n          <div class="search-results-mod">\r\n               <!--距离-->\r\n               <div class="hotel-away js_hotel_away ellips"></div>\r\n               <div class="hotel-g-space2"></div>\r\n               <!--酒店特价超市-->\r\n               <ul class="hotel-g-list js_salehotel" style="display:none;">\r\n               </ul>    \r\n               <!--受欢迎酒店-->  \r\n               <div class="hotel-g-bd hotel-hot js_hotel_list" style="display:none;">\r\n                    <ul class="hotel-g-list">\r\n                        \r\n                    </ul>\r\n               </div>\r\n               <div class="hotel-g-bd hotel-hot" id="js_hotel_search_noresults" style="display:none;">\r\n                    <div class="hotel-noresults-tips">没有找到符合条件的结果,<br/>请修改条件重新查询。\r\n                        <div class="hotel-ordtail-btn">\r\n                                <a href="tel:4008209660" class="__hreftel__"><button>联系客服</button></a>\r\n                        </div>\r\n                    </div>\r\n               </div>\r\n               <div class="hotel-g-bd hotel-hot js_recommend_list" style="display:none;">\r\n                    <h3>您可能感兴趣的酒店</h3>\r\n                    <ul class="hotel-g-list">\r\n                    </ul>\r\n               </div>\r\n               <div class="hotel-dpage-loading p10 js_listview_loading" style="display:none;">\r\n                        <span class="cui-pro-load">\r\n                                <span class="cui-pro-radius"></span>\r\n                                <span class="cui-i cui-pro-logo"></span>\r\n                        </span>\r\n                        <span class="g-load-txtpl">加载中</span>\r\n                </div>\r\n                <div class="hotel-dpage-loading p10 cgray js_notmorelistrs" style="display:none;">\r\n                     没有更多结果了\r\n                </div>\r\n                <!--底部有筛选时,留出的间隙高度-->\r\n                <div class="hotel-g-space"></div>\r\n                <div class="hotel-g-space"></div>\r\n          </div>\r\n\r\n           \r\n    </article>\r\n <!--底部筛选排序...-->\r\n<div id="in_footer" class="fix_bottom js_in_Footer" style="z-index:3000">\r\n    <ul class="cui-cond-bar hotel-cond-bar js_filter">\r\n        <li class="js_searchlist_filter_btn">筛选<i class="cui-fl-sort cui-fl-filter"></i></li>\r\n        <li class="js_searchlist_filter_area">位置区域<i class="hotel-bar-cnum">1</i></li>\r\n        <li class="js_price_star_filter_h">价格星级<i class="hotel-bar-cnum">1</i></li>\r\n        <li class="js_sort_h">携程排序</li>\r\n    </ul>\r\n</div>    \r\n    <article class="js_tabp js_searchbody2" style="display:none;"> \r\n          <!--search results-->  \r\n          <div class="search-results-mod">\r\n               \r\n               <!--我收藏的酒店-->  \r\n               <div class="hotel-g-bd">\r\n                    <h3><span class="fr hotel-font-color js_more_myfavhotel_link" style="display: none;">更多</span>我收藏的酒店</h3>\r\n                    <!--已登录正常状态-->\r\n                    <ul class="hotel-g-list js_hotel_commp1" style="display:none;"></ul>\r\n                    <ul class="hotel-g-list hotle-pd-arr js_hotel_commp2" style="display:none;"></ul>\r\n                    \r\n                    \r\n               </div>\r\n\r\n               <!--我住过的酒店-->  \r\n               <div class="hotel-g-bd js_mylived_hotel" style="display:none;">\r\n                    <h3>我住过的酒店</h3>\r\n                    <ul class="hotel-g-list hotle-pd-arr js_mylived_hotel_list">\r\n                    </ul>\r\n               </div>\r\n\r\n               <!--受欢迎酒店-->  \r\n               <div class="hotel-g-bd hotel-hot js_hot_hotel" style="display:none">\r\n                    <h3>受欢迎酒店</h3>\r\n                    <ul class="hotel-g-list js_hot_hotel_list">\r\n                       \r\n                    </ul>\r\n                    \r\n                   \r\n               </div>\r\n                <!--底部有筛选时,留出的间隙高度-->\r\n                <div class="hotel-g-space"></div>\r\n                <div class="hotel-g-space"></div>\r\n          </div>\r\n        \r\n    </article>\r\n\r\n\r\n<!--价格星级筛选-->\r\n<div class="hotel-p-s-filter js_price_star_filter" style="display:none;">\r\n     <dl>\r\n        <dt>价格</dt>\r\n        <dd class="current js_price_h js_price_all" data-price="all">不限</dd><dd class="js_price_h" data-price="0|150">&yen;150元以下</dd><dd class="js_price_h" data-price="150|300">&yen;150-&yen;300</dd><dd class="js_price_h" data-price="301|450">&yen;301-&yen;450</dd><dd class="js_price_h" data-price="451|600">&yen;451-&yen;600</dd><dd class="js_price_h" data-price="601|1000">&yen;601-&yen;1000</dd><dd class="js_price_h" data-price="1000|0">&yen;1000以上</dd>\r\n        <dt>星级</dt>\r\n        <dd class="current js_star_h js_star_all" data-star="all">不限</dd><dd class="js_star_h" data-star="liansuo" data-text="快捷连锁">快捷连锁</dd><dd class="js_star_h" data-star="0|1|2" data-text="二星级及以下/经济">二星级及以下/经济</dd><dd class="js_star_h" data-star="3" data-text="三星级/舒适">三星级/舒适</dd><dd class="js_star_h" data-star="4" data-text="四星级/高档">四星级/高档</dd><dd class="js_star_h" data-star="5" data-text="五星级/豪华">五星级/豪华</dd>\r\n        <div class="mt10"><button class="g_btn_s js_price_star_filter_ok">确定</button></div>\r\n     </dl>\r\n</div>\r\n<script id="js_hotel_list" type="text/template">\r\n                        <%\r\n                        for(var hotelindex in htlInfos) {\r\n                            var htlInfo=htlInfos[hotelindex];\r\n                            var htlprice=0;\r\n                        %>                          \r\n                        <li class="js_hotel_detail" data-hotelid="<%=htlInfo.baseInfo.id %>">\r\n                            <div class="hotel-g-proimg"><img src="<%=htlInfo.baseInfo.logo %>" width="96" height="96"></div>\r\n                            <div class="hotel-g-cbd">\r\n                                 <h4 class="ellips"><%=htlInfo.baseInfo.name %></h4>\r\n                                 <div class="list-c">\r\n                                      <%if((htlInfo.status & 2048)!=2048){ %>\r\n                                      <%for(var price_key in htlInfo.prices){\r\n                                            \r\n                                            if(htlInfo.prices[price_key].pbiz==2){\r\n                                                htlprice = htlInfo.prices[price_key].detail.price || 0;\r\n                                                var cur="&yen;"\r\n                                                if(htlInfo.prices[price_key].detail.type==2){\r\n                                                    cur=htlInfo.prices[price_key].detail.cur;\r\n                                                }\r\n                                      %>                                   \r\n                                      <span class="price-num fr"><b class="num"><small><%=cur %></small><%=htlprice %></b>起</span>\r\n                                      <%    }\r\n                                        } %>\r\n\r\n                                      <%}else{ %>\r\n                                        <span class="rate-num fr">APP专享</span>\r\n                                      <%} %>\r\n                                      <%if(htlInfo.extend.point>0) {%> \r\n                                      <span class="rate-num"><b><%=htlInfo.extend.point.toFixed(1) %></b>分</span>\r\n                                     \r\n                                      <%} %>\r\n                                      <%\r\n                                        \r\n                                        var facility=htlInfo.activeinfo.facility;                                        \r\n                                        var facility_order=[1,2];//,6,8,9,10,3,4,5,11,0,7,12,13];\r\n                                        var facility_class=["hotel-icon-wifi","hotel-icon-park","hotel-icon-airport-bus","hotel-icon-bus-service","hotel-icon-24h","hotel-icon-luggage","hotel-icon-food","hotel-icon-swim","hotel-icon-fitness","hotel-icon-spa","hotel-icon-browser","hotel-icon-park-meeting","hotel-icon-park-money","hotel-icon-park"]\r\n                                      %>\r\n                                      <%for(var falyi=0;falyi<facility_order.length;falyi++) {\r\n                                            if((facility>>facility_order[falyi])%2>0) {%>\r\n                                        <i class="<%=facility_class[falyi] %>"></i>\r\n                                      <%    }\r\n                                        }%>                                    \r\n                                 </div>\r\n                                 <div class="list-c">\r\n                                    <%\r\n                                        var hotellevel_str;\r\n                                        if(htlInfo.activeinfo.license){\r\n                                            hotellevel_str=["","二星级酒店","二星级酒店","三星级酒店","四星级酒店","五星级酒店"];\r\n                                        }else{\r\n                                            hotellevel_str=["","经济型酒店","经济型酒店","舒适型酒店","高档型酒店","豪华型酒店"];  \r\n                                        }\r\n                                    %>\r\n                                      <span class="cgray"><%=hotellevel_str[htlInfo.activeinfo.star] %></span>\r\n                                      <span class="ico-txt fr">\r\n                                            <%=((htlInfo.status & 1024) == 1024)?\'<em class="ico-3">团</em>\':\'\'%>\r\n                                            <%=((htlInfo.status & 128) == 128)?\'<em class="ico-2">礼</em>\':\'\'%>\r\n                                            <%=((htlInfo.status & 256) == 256)?\'<em class="ico-2">促</em>\':\'\'%>\r\n                                            \r\n                                            <%if(((htlInfo.status >> 11) & 1) ==0) {%>\r\n                                                <%if(htlInfo.extend && htlInfo.extend.specprice && htlInfo.extend.specprice.tag){%>\r\n                                            <em class="ico-1"><%=htlInfo.extend.specprice.tag %></em>\r\n                                                <%} %>\r\n                                            <%} %>\r\n                                            <%for(var tickets_index=0;tickets_index<htlInfo.tickets.length;tickets_index++) {\r\n                                                if(htlInfo.tickets[tickets_index].ptype==1 && (htlInfo.status & 1)==1){\r\n                                                    if(htlInfo.tickets[tickets_index].ctype==1){\r\n                                            %>          <em class="ico-2">返<%=htlInfo.tickets[tickets_index].amout %>%</em>\r\n                                                    \r\n                                            <%      }else{\r\n                                            %>            <em class="ico-2">返&yen;<%=htlInfo.tickets[tickets_index].amout %></em>\r\n                                            <%\r\n                                                    }\r\n                                                }\r\n                                              } %>\r\n                                           <%if(htlInfo.tickets.length==0 && (htlInfo.status & 1) == 1){%><em class="ico-2">可返</em><%}%>                                          \r\n                                      </span>\r\n                                 </div>\r\n                                 <div class="list-c">\r\n                                      <span class="cgray fr"><%=htlInfo.extend.distance%></span>\r\n                                      <span class="cgray"><%=htlInfo.baseInfo.zone %></span>\r\n                                 </div>\r\n                            </div>\r\n                            <%=((htlInfo.status & 32) == 32)?\'<span class="hotel-icon-full-house"></span>\':\'\'%>\r\n                        </li>\r\n                        <%} %>\r\n</script>\r\n<script id="js_salehotel" type="text/template">\r\n<li class="hotel-arr"><%=tile %><br/><%=subtitle %></li>\r\n</script>\r\n<script id="js_hotel_away" type="text/template">\r\n<i class="hotel-icon-refresh fr js_away_refresh" style="display:none;"></i>距离:<span class="js_away_text"><%=posrem %></span>\r\n</script>\r\n\r\n\r\n<!--没有收藏的酒店-->\r\n<script id="js_hotel_search_nofavorite"  type="text/template">\r\n        <li>\r\n            收藏的酒店会出现在这里哦!<br/>快去添加收藏吧!\r\n        </li>\r\n</script>\r\n<!--未登录-->\r\n<script id="js_hotel_search_noloading"  type="text/template">                  \r\n        <li>\r\n            <p class="hotel-login-tips">登录后会看到收藏的酒店。</p>\r\n            <button class="hotel-g-btn js_loginnow">立即登录</button>\r\n        </li>\r\n</script>\r\n<script id="js_hotel_search_favorite" type="text/template">\r\n    <%\r\n    for(var hotelindex in htlInfos) {\r\n        var htlInfo=htlInfos[hotelindex];\r\n        var htlprice=0;        \r\n    %>  \r\n    <li class="hotel-arr js_hotel_detail" data-hotelid="<%= htlInfo.baseInfo.id %>">\r\n        <div class="list-c">\r\n        <%if((htlInfo.status & 2048)!=2048){ %>\r\n            <%for(var price_key in htlInfo.prices){\r\n                                            \r\n                if(htlInfo.prices[price_key].pbiz==2){\r\n                    htlprice = htlInfo.prices[price_key].detail.price || 0;\r\n                    var cur="&yen;"\r\n                    if(htlInfo.prices[price_key].detail.type==2){\r\n                        cur=htlInfo.prices[price_key].detail.cur;\r\n                    }\r\n            %>                                   \r\n            <span class="price-num fr"><b class="num"><small><%=cur %></small><%=htlprice %></b>起</span>\r\n            <%    }\r\n            } %>\r\n\r\n        <%}else{ %>\r\n        <span class="rate-num fr">APP专享</span>\r\n        <%} %>\r\n                <h4 class="ellips"><%=htlInfo.baseInfo.name %></h4>\r\n        </div>\r\n        <div class="list-c">\r\n            <span class="ico-txt fr">\r\n                <%=((htlInfo.status & 1024) == 1024)?\'<em class="ico-3">团</em>\':\'\'%>\r\n                <%=((htlInfo.status & 128) == 128)?\'<em class="ico-2">礼</em>\':\'\'%>\r\n                <%=((htlInfo.status & 256) == 256)?\'<em class="ico-2">促</em>\':\'\'%>\r\n               \r\n                <%if(((htlInfo.status >> 11) & 1) ==0) {%>\r\n                    <%if(htlInfo.extend.specprice.tag){%>\r\n                <em class="ico-1"><%=htlInfo.extend.specprice.tag %></em>\r\n                    <%} %>\r\n                <%} %>\r\n                <%for(var tickets_index=0;tickets_index<htlInfo.tickets.length;tickets_index++) {\r\n                    if(htlInfo.tickets[tickets_index].ptype==1 && (htlInfo.status & 1)==1){\r\n                        if(htlInfo.tickets[tickets_index].ctype==1){\r\n                %>          <em class="ico-2">返<%=htlInfo.tickets[tickets_index].amout %>%</em>\r\n                                                    \r\n                <%      }else{\r\n                %>            <em class="ico-2">返&yen;<%=htlInfo.tickets[tickets_index].amout %></em>\r\n                <%\r\n                        }\r\n                    }\r\n                    } %>     \r\n                <%if(htlInfo.tickets.length==0 && (htlInfo.status & 1) == 1){%><em class="ico-2">可返</em><%}%>                                          \r\n            </span>\r\n            <span class="rate-num"><b><%=htlInfo.extend.point %></b>分</span>\r\n        </div>\r\n        <%=((htlInfo.status & 32) == 32)?\'<span class="hotel-icon-full-house"></span>\':\'\'%>\r\n    </li>\r\n    <%\r\n    }\r\n    %>\r\n</script>\r\n'});

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。