1(window.webpackJsonp=window.webpackJsonp||[]).push([[51],{1273:function(t,e,n){t.exports=n.p+"tripla-logo.f4c54ac0e46ca8fb3f79c95bdf9d08e7.svg"},1274:function(t,e,n){},1393:function(t,e,n){t.exports=n.p+"magnifier.b0df8f60abae39cd013719e046243dee.svg"},1394:function(t,e,n){t.exports=n.p+"building.c49ce79bb16ba55afd51c90805b12bff.svg"},1395:function(t,e,n){"use strict";n(1274)},1434:function(t,e,n){"use strict";var r=n(259),o=n(858),s=n.n(o),i=n(17),a=n(29),c=n(19);function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(n,!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function asyncGeneratorStep(t,e,n,r,o,s,i){try{var a=t[s](i),c=a.value}catch(u){return void n(u)}a.done?e(c):Promise.resolve(c).then(r,o)}function _asyncToGenerator(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function _next(t){asyncGeneratorStep(s,r,o,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(s,r,o,_next,_throw,"throw",t)}_next(void 0)}))}}function searchInput(t){return _searchInput.apply(this,arguments)}function _searchInput(){return(_searchInput=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var e,n;return regeneratorRuntime.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,i.a.getData(Object(a.a)("".concat(Object(c.a)(),"/hotels"),{name:t}));case 2:return e=r.sent,n=t.normalize("NFKC").toLocaleLowerCase(),e.data=e.data.map((function(t){return _objectSpread({},t,{_isAutoComplete:t.name.normalize("NFKC").toLocaleLowerCase().startsWith(n)})})).sort((function(t){return t._isAutoComplete?-1:1})),r.abrupt("return",e);case 6:case"end":return r.stop()}}),_callee)})))).apply(this,arguments)}var u=n(157),l=n(885);function OtaSearchvue_type_script_lang_js_asyncGeneratorStep(t,e,n,r,o,s,i){try{var a=t[s](i),c=a.value}catch(u){return void n(u)}a.done?e(c):Promise.resolve(c).then(r,o)}var p={directives:{clickOutside:n.n(l).a.directive},props:{recommendList:{type:Array,default:function _default(){return[]}}},data:function data(){var t;return{uuid:r.v4,input:null!==(t=this.$route.query.q)&&void 0!==t?t:"",selectedIndex:-1,isLoading:!1,showOptions:!1,options:[]}},computed:{processedCharacters:function processedCharacters(){return this.input.normalize("NFKC").toLocaleLowerCase().split("")}},mounted:function mounted(){window.addEventListener("keydown",this.keyDownHandle)},beforeDestroy:function beforeDestroy(){window.removeEventListener("keydown",this.keyDownHandle)},methods:{query:s()(function(){var t=function OtaSearchvue_type_script_lang_js_asyncToGenerator(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var s=t.apply(e,n);function _next(t){OtaSearchvue_type_script_lang_js_asyncGeneratorStep(s,r,o,_next,_throw,"next",t)}function _throw(t){OtaSearchvue_type_script_lang_js_asyncGeneratorStep(s,r,o,_next,_throw,"throw",t)}_next(void 0)}))}}(regeneratorRuntime.mark((function _callee(t){var e,n;return regeneratorRuntime.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:if(0!==t.length){r.next=3;break}return this.options=[],r.abrupt("return");case 3:return this.isLoading=!0,r.next=6,searchInput(t);case 6:e=r.sent,n=e.data,this.input===t&&(this.options=n,this.isLoading=!1,this.showOptions=!0,this.selectedIndex=-1);case 9:case"end":return r.stop()}}),_callee,this)})));return function(e){return t.apply(this,arguments)}}(),500),searchHotelList:function searchHotelList(t){this.$emit("search",{q:t,type:u.c.hotelList})},searchHotelPlanList:function searchHotelPlanList(t){this.$emit("search",{q:t.triplabot_code,type:u.c.hotelPlanList})},keyDownHandle:function keyDownHandle(t){var e=t.key;if(["ArrowUp","ArrowDown"].includes(e)){t.preventDefault();var n="ArrowUp"===e?-1:1;return this.selectedIndex=Math.min(Math.max(this.selectedIndex+n,-1),this.options.length),void(this.selectedIndex>=0&&this.selectedIndex<this.options.length&&this.$refs["option-".concat(this.selectedIndex)][0].focus())}["Enter"].includes(e)&&this.selectedIndex>=0&&this.selectedIndex<this.options.length&&this.searchHotelPlanList(this.options[this.selectedIndex])},optionFocus:function optionFocus(t){this.selectedIndex=t,this.$refs["option-".concat(this.selectedIndex)][0].focus()}}},h=(n(1395),n(33)),d=Object(h.a)(p,(function render(){var t=this,e=t._self._c;return e("b-form",{on:{submit:function submit(e){return e.preventDefault(),t.searchHotelList(t.input)}}},[t.recommendList.length>0?e("div",{staticClass:"d-flex flex-md-row flex-column px-md-0 mb-3",style:{gap:"1rem"}}
1,t._l(t.recommendList,(function(n,r){return e("b-button",{key:n,staticClass:"border p-2 show-up text-left",style:{animationDelay:"".concat(.2*r,"s")},attrs:{variant:"light"},on:{click:function click(e){return t.searchHotelList(n)}}},[t._v("\n "+t._s(n)+"\n ")])})),1):t._e(),t._v(" "),e("div",{staticClass:"w-100 d-flex flex-column flex-sm-row"},[e("div",{staticClass:"mr-3 mb-3 mb-sm-0 w-100 position-relative"},[e("img",{staticClass:"position-absolute top-0 start ml-4 m-2",staticStyle:{"z-index":"2"},attrs:{src:n(1393),width:"24",height:"24"}}),t._v(" "),e("b-input",{staticStyle:{"padding-left":"3.5rem"},attrs:{autocomplete:"off",placeholder:t.$t("ota.homepage.placeholder")},on:{input:t.query,focus:function focus(e){t.selectedIndex=-1}},model:{value:t.input,callback:function callback(e){t.input=e},expression:"input"}}),t._v(" "),e("ul",{directives:[{name:"show",rawName:"v-show",value:t.showOptions&&t.options.length>0,expression:"showOptions && options.length > 0"},{name:"click-outside",rawName:"v-click-outside",value:function value(){return t.showOptions=!1},expression:"() => (showOptions = false)"}],staticClass:"dropdown px-0 position-absolute top-0 start-0 w-100 my-0"},t._l(t.options,(function(r,o){return e("li",{key:r.id,ref:"option-".concat(o),refInFor:!0,class:["dropdown-item",t.selectedIndex===o&&"active"],attrs:{tabindex:"0"},on:{mouseenter:function mouseenter(e){return t.optionFocus(o)},focus:function focus(e){return t.optionFocus(o)},click:function click(e){return t.searchHotelPlanList(r)}}},[e("img",{staticClass:"mr-2",attrs:{src:n(1394),width:"24",height:"24"}}),t._v(" "),r._isAutoComplete?[e("strong",[t._v(t._s(r.name.slice(0,t.input.length)))]),t._v("\n "+t._s(r.name.slice(t.input.length))+"\n ")]:[t._l(r.name.split(""),(function(n){return[t.processedCharacters.includes(n.toLocaleLowerCase())?e("strong",{key:"".concat(t.uuid()).concat(n)},[t._v(t._s(n))]):[t._v(t._s(n))]]}))]],2)})),0)],1),t._v(" "),e("b-button",{staticClass:"minw-4 t-theme-btn search-btn",attrs:{type:"submit",disabled:!t.input},on:{focus:function focus(e){var n,r;t.selectedIndex=null!==(n=null===(r=t.options)||void 0===r?void 0:r.length)&&void 0!==n?n:-1}}},[t._v(t._s(t.$t("ota.search")))])],1)])}),[],!1,null,"3c24bbb0",null);e.a=d.exports},1526:function(t,e,n){},1654:function(t,e,n){"use strict";n(1526)},940:function(t,e,n){"use strict";n.r(e);n(471);var r=n(1434),o=n(11),s=n(322),i=n(157),a={components:{OtaSearch:r.a},data:function data(){var t=this;return{recommendList:Array(4).fill(null).map((function(e,n){return t.$t("ota.homepage.recommend".concat(n+1))}))}},methods:{search:function search(t){var e=t.type,n=t.q,r=this.$route.params.country;0!==n.length&&(e===i.c.hotelList&&this.$router.push({name:Object(s.c)(o.a.ota.searchHotels,r),params:Object(s.b)(r),query:{q:n}}),e===i.c.hotelPlanList&&this.$router.push({name:Object(s.c)(o.a.ota.searchRooms,r),params:Object(s.b)(r,{code:n})}))}}},c=(n(1654),n(33)),u=Object(c.a)(a,(function render(){var t=this._self._c;return t("section",{staticClass:"d-flex justify-content-center align-items-center flex-column m-auto homepage px-4 px-sm",staticStyle:{flex:"unset"}},[t("img",{staticClass:"mb-4",attrs:{src:n(1273),width:"264",height:"74"}}),this._v(" "),t("ota-search",{staticClass:"w-100 d-flex flex-column",attrs:{"recommend-list":this.recommendList},on:{search:this.search}})],1)}),[],!1,null,"4a2130bc",null);e.default=u.exports}}]); 2//# sourceMappingURL=page-OtaView-OtaHome-vue.0b99acbd62ecbca2ac59.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.