1var J=(o,s,v)=>new Promise((c,l)=>{var y=t=>{try{i(v.next(t))}catch(a){l(a)}},p=t=>{try{i(v.throw(t))}catch(a){l(a)}},i=t=>t.done?c(t.value):Promise.resolve(t.value).then(y,p);i((v=v.apply(o,s)).next())});import{_ as ve}from"./faq-api.Dg97QsrL.js";import{C as j,r as k,N as ae,E as D,I as _,Y as ne,D as S,J as f,H as G,ad as le,G as u,U as N,_ as Q,ab as q,F as B,Z as de,a0 as fe,R as ue,S as P,T as E,B as pe,j as X,w as Y,P as Z,Q as ee,an as he}from"./vendor-vue.D9QQoaml.js";import{a as _e}from"./mt-input.D2Fg7b3H.js";import{a as K,n as O}from"./vendor-dcloudio.upkQA-fz.js";import{i as T,q as A,b as ye,L as oe,_ as V,D as te,u as ce,r as me,P as re,t as se}from"./index-DhGNiy9L.js";var ge=o=>{var s="/user/foundation/show/search/v1",v={keyword:o.keyword,sorting:o.sorting,locationCode:o.locationCode,homeUiExperiment:o.homeUiExperiment,offset:o.offset,length:o.length};return T.post(s,v)},Se=o=>{var s="/user/foundation/show/search/v1",v={keyword:o.keyword,sorting:o.sorting,locationCode:o.locationCode,homeUiExperiment:o.homeUiExperiment,offset:o.offset,length:o.length};return T.post(s,v)},we=o=>{var s="/user/foundation/pub/show/list/v1";return T.post(s,A({sorting:"HOT_SELL"},o))},ke=o=>{var s="/user/invite/v1/invite_code";return T.get(s,o)},$e=o=>{var s="/user/foundation/pub/search/keywords/v1";return T.get(s,{home_hot_search:o},{header:{"X-Home-Hot-Search":o},extra:{noToast:!0}})};const Ce=j({__name:"popup-pc",props:{customStyle:{},innerStyle:{},hideMask:{type:Boolean}},emits:["close"],setup(o,{expose:s,emit:v}){const c=k(!1),l=v,y=()=>J(this,null,function*(){uni.$emit("settings",!1),c.value=!1,l("close")});return s({open:()=>{c.value=!0},close:()=>{c.value=!1,l("close")}}),(t,a)=>{const r=G;return c.value?(_(),ae(ne,{key:0},[t.hideMask?D("",!0):(_(),S(r,{key:0,class:"mask-pc",onClick:le(y,["stop"])})),f(r,{class:"pop-container",style:K(t.customStyle)},{default:u(()=>[f(r,{class:"inner",style:K(t.innerStyle)},{default:u(()=>[f(r,{class:"arrow"}),N(t.$slots,"header",{},void 0,!0),N(t.$slots,"default",{},void 0,!0),N(t.$slots,"footer",{},void 0,!0)]),_:3},8,["style"])]),_:3},8,["style"])],64)):D("",!0)}}}),xe=Q(Ce,[["__scopeId","data-v-a7f9f842"]]);function Pe(o){var s=ye(),{currentLocation:v}=s,c=k(),l=k(),y=k([]),p=k([]),i=k([]),t=k(!1),a=k(!1),r=k(!1),{pageParams:m,resetPagination:h,setPagination:w}=oe(20),{pageParams:n,resetPagination:H,setPagination:z}=oe(20),I=0,U=function(){var C=V(function*(e){var d=++I;try{if(e&&(h(),y.value=[]),t.value=!0,!c.value)return;var{data:g,pagination:x={}}=yield ge(A({keyword:c.value,locationCode:v.code||"",homeUiExperiment:(o==null?void 0:o())===!0},m.value));if(d!==I)return;g!=null&&g.length&&x&&(w(x),y.value=y.value.concat(g))}
1catch(M){if(d!==I)return}finally{d===I&&(t.value=!1)}});return function(d){return C.apply(this,arguments)}}(),b=q(U,te),L=q(function(){var C=V(function*(e){try{e&&(H(),p.value=[]);var d=e||l.value;if(!d||a.value)return;a.value=!0;var{data:g,pagination:x={}}=yield Se(A({keyword:d,homeUiExperiment:(o==null?void 0:o())===!0},n.value));g!=null&&g.length&&x&&(z(x),p.value=p.value.concat(g))}catch(M){}finally{a.value=!1}});return function(e){return C.apply(this,arguments)}}(),te),F=function(){var C=V(function*(){try{if(r.value)return;r.value=!0;var{data:e}=yield we({locationCode:v.code||"",offset:0,length:10});i.value=e||[]}catch(d){}finally{r.value=!1}});return function(){return C.apply(this,arguments)}}(),R=function(){var C=V(function*(e){try{if(!e||!e.trim())return null;var{data:d}=yield ke({keyword:e});return d}catch(g){}return null});return function(d){return C.apply(this,arguments)}}(),$=()=>{I++,c.value="",l.value="",y.value=[],p.value=[],h(),H(),t.value=!1,a.value=!1};return{searchText:c,hintsText:l,searchShow:b,doSearchShow:U,queryHints:L,queryHotSearchShows:F,queryInviteTour:R,hotSearchItems:i,resetSearchState:$,searchResultList:y,hintsResults:p,searchRequesting:t,hintsRequesting:a,hotSearchRequesting:r}}const Ie=j({__name:"hints-result",props:{dataSource:{}},emits:["select"],setup(o,{emit:s}){const v=s,{isPC:c}=ce(),l=(a="",r="")=>{v("select",{tourId:a,id:r})},y=a=>{const r=a;return r.cover||r.imgUrl||r.posterUrl||r.imageUrl||""},p=a=>{var m;const r=a;return((m=r.price)==null?void 0:m.currencySymbol)||r.currencySymbol||r.currency||"HK$"},i=a=>{var h;const r=a,m=((h=r.price)==null?void 0:h.minSalePrice)||r.minSalePrice;return m?String(m):""},t=a=>{var m;const r=a;return((m=r.price)==null?void 0:m.discountTag)||r.discountTag||r.discount||""};return(a,r)=>{const m=fe,h=G,w=ue;return _(),S(h,{class:O(["hint-container",{pc:B(c)}])},{default:u(()=>[(_(!0),ae(ne,null,de(a.dataSource,n=>(_(),S(h,{key:n.id,class:"show-item",onClick:()=>l(n.tourId,n.id)},{default:u(()=>[y(n)?(_(),S(m,{key:0,class:"cover",src:y(n),mode:"aspectFill"},null,8,["src"])):(_(),S(h,{key:1,class:"cover"})),f(h,{class:"show-info"},{default:u(()=>[f(w,{class:"show-title"},{default:u(()=>[P(E(n==null?void 0:n.showName),1)]),_:2},1024),n.showDate?(_(),S(w,{key:0,class:"show-time"},{default:u(()=>[P(E(n.showDate),1)]),_:2},1024)):D("",!0),f(w,{class:"show-location"},{default:u(()=>[P(E(n==null?void 0:n.location),1)]),_:2},1024)]),_:2},1024),n.statusDesc||i(n)?(_(),S(h,{key:2,class:"price-info"},{default:u(()=>[n.statusDesc?(_(),S(w,{key:0,class:"stock-status"},{default:u(()=>[P(E(n.statusDesc),1)]),_:2},1024)):(_(),S(h,{key:1,class:"price-row"},{default:u(()=>[f(w,{class:"currency"},{default:u(()=>[P(E(p(n)),1)]),_:2},1024),f(w,{class:"price"},{default:u(()=>[P(E(i(n)),1)]),_:2},1024),f(w,{class:"plus"},{default:u(()=>[P("+")]),_:1})]),_:2},1024)),!n.statusDesc&&t(n)?(_(),S(h,{key:2,class:"discount"},{default:u(()=>[f(w,null,{default:u(()=>[P(E(t(n)),1)]),_:2},1024)]),_:2},1024)):D("",!0)]),_:2},1024)):D("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["class"])}}}),Ee=Q(Ie,[["__scopeId","data-v-6a08d561"]]),He=j({__name:"search-input",props:{modelValue:{default:void 0},focus:{type:Boolean},prefix:{type:Boolean},suffix:{type:Boolean},customStyle:{default:void 0},navigateFirstHintOnSearch:{type:Boolean,default:!0},placeholder:{default:""},useHomeUiExperiment:{type:Boolean,default:!1}},emits:["update:modelValue","input","search","tap"],setup(o,{emit:s}){const{queryHints:v,hintsResults:c}=Pe(),{isPC:l}=ce(),{t:y}=pe(),p=s,i=o,t=k(i.modelValue||""),a=k(i.focus),r=X(()=>i.useHomeUiExperiment?`color: #95949D; font-size: 28rpx; line-height: ${l.value?"46px":"84rpx"}`:"color: #95949D; font-size: 28rpx"),m=()=>l.value?"46px":i.useHomeUiExperiment?"84rpx":"80rpx",h=()=>i.useHomeUiExperiment?"#F7F7F8":l.value?"#f6f6f7":void 0,w=()=>{if(!i.useHomeUiExperiment)return l.value?"#cccccc":"#FF294B"},n=X(()=>({width:"100%",height:m(),borderRadius:"8rpx",border:i.useHomeUiExperiment?"0":"2rpx solid #FF294B",backgroundColor:h(),borderColor:w()})),H=k();Y(()=>i.modelValue,e=>{t.value=e||""});const z=()=>{var e;a.value=!0,l.value&&((e=H.value)==null||e.open(),c.value.length&&$())},I=()=>{var e;a.value=!1,l.value&&((e=H.value)==null||e.close(),C())},U=q(e=>{t.value=e,p("update:modelValue",e),p("input",e),l.value&&(e?v(e):c.value=[])},500),b=()=>{if(p("search",t.value),i.navigateFirstHintOnSearch&&l.value&&c.value.length){const e=c.value[0];F(e)}},L=()=>{p("search",t.value)},F=e=>{me.open(re.tourDetail,{tourCode:e.tourCode||e.tourId||"",showId:e.id,preRoute:re.search}),se("click_Tag",{fromPage:"show_search_associative",showName:e.showName,showOID:e.id})},R=(e,d)=>{se(`${e}_page`,{page:d})},$=()=>{l.value&&R("display","show_search_associative")},C=()=>{l.value&&R("hide","show_search_associative")};return Y(c,q(()=>{c.value.length?$():C()},500)),(e,d)=>{const g=Z(ee("mt-icon"),ve),x=G,M=ue,ie=Z(ee("mt-input"),_e);return _(),S(x,{class:O({pc:B(l)}),style:K(e.customStyle),onClick:d[1]||(d[1]=W=>e.$emit("tap"))},{default:u(()=>
1[f(ie,{modelValue:t.value,"onUpdate:modelValue":d[0]||(d[0]=W=>t.value=W),"custom-class":"input","custom-style":n.value,"allow-clear":!e.useHomeUiExperiment,focus:a.value,placeholder:e.placeholder||B(y)("search.placeholder"),"placeholder-style":r.value,onFocus:z,onBlur:I,onInput:B(U),onConfirm:L},he({_:2},[e.prefix?{name:"prefix",fn:u(()=>[f(g,{type:"search",color:e.useHomeUiExperiment?"#111111":"#98979B",size:20},null,8,["color"])]),key:"0"}:void 0,e.suffix?{name:"suffix",fn:u(()=>[e.useHomeUiExperiment?(_(),S(x,{key:0,class:"revision-search-action",onClick:le(b,["stop"])},{default:u(()=>[f(x,{class:"revision-search-divider"}),f(g,{type:"search",color:"#111111",size:20})]),_:1})):t.value?(_(),S(M,{key:1,class:"search",onClick:b},{default:u(()=>[f(g,{type:"search",size:20,color:"#ffffff"})]),_:1})):D("",!0)]),key:"1"}:void 0]),1032,["modelValue","custom-style","allow-clear","focus","placeholder","placeholder-style","onInput"]),f(xe,{ref_key:"popup",ref:H,"hide-mask":""},{default:u(()=>[f(x,{class:O(["tour-list",B(c).length&&"pt-15"])},{default:u(()=>[f(Ee,{dataSource:B(c),onSelect:F},null,8,["dataSource"])]),_:1},8,["class"])]),_:1},512)]),_:1},8,["class","style"])}}}),Ve=Q(He,[["__scopeId","data-v-ee79e78d"]]);var Be=o=>{var s=Array.isArray(o)?o[0]:o;return(s==null?void 0:s.trim())||""},qe=o=>{var s=Be(o);if(s)return{keyword:s}},ze=function(s){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!s&&!v&&s!=="home"},Le=o=>o==="searchResult";export{Ee as H,Ve as S,ge as a,qe as b,$e as g,Le as i,Be as n,ze as s,Pe as u};
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.