PageSourceSearch

https://www.boaterskingston.com/dist/gk-jss-app/js/ReviewsWidget.304a4188.js

js boaterskingston.com collected 2026-10-08 17:34:49 UTC 4,540 bytes, 2 lines download raw bytes

1"use strict";(globalThis["webpackChunkgk_jss_app"]=globalThis["webpackChunkgk_jss_app"]||[]).push([[5646],{13148:(e,t,r)=>{r.r(t),r.d(t,{default:()=>g});r(20116);var s=r(20641),i=r(90033),a=r(50953),n=r(50258),o=r(15662);const u={class:"sr-only"},c={class:"reviews-widget__reviews-rating font-s-copy","aria-hidden":"true"},l={key:2,class:"reviews-widget__error font-s-copy"},d=5,h={__name:"ReviewsWidget",props:{locationId:{type:[String,Number],required:!0},source:{type:String,default:"GOOGLE_PLACES"},dates:{type:Object,default:()=>({})},headingType:{type:String,default:"h3"},venueId:{type:[String,Number]},showVenueInfoFirst:{type:Boolean,default:!1}},emits:["reviewsClick"],setup(e,{emit:t}){const h=(0,s.$V)((()=>Promise.all([r.e(7066),r.e(3291)]).then(r.bind(r,94995)))),{t:v}=(0,n.s9)(),g=t,f=e,p=(0,a.KR)(null),{data:w,isPending:P}=(0,o.H6)(f.locationId),m=(0,s.EW)((()=>w.value?.summary?.sources?.find((e=>e.id===f.source)))),y=()=>{p.value&&(g("reviewsClick",m.value?.name?.toLowerCase()),p.value.openModal())};return(t,r)=>((0,s.uX)(),(0,s.CE)(s.FK,null,[(0,s.Lk)("div",{class:(0,i.C4)(["reviews-widget",`reviews-widget--${e.source.toLowerCase()}`])},[r[3]||(r[3]=(0,s.Lk)("div",{class:"reviews-widget__logo","aria-hidden":"true"},null,-1)),m.value?((0,s.uX)(),(0,s.CE)(s.FK,{key:0},[(0,s.Lk)("div",u,(0,i.v_)(m.value.name)+" reviews. Rating: "+(0,i.v_)(m.value.rating)+" out of "+(0,i.v_)(d),1),(0,s.Lk)("span",c,(0,i.v_)(m.value.rating)+"/"+(0,i.v_)(d),1),(0,s.Lk)("button",{class:"reviews-widget__reviews-count font-s-copy",onClick:y},[(0,s.eW)((0,i.v_)(`${m.value.count} review${m.value.count>1?"s":""}`)+" ",1),r[0]||(r[0]=(0,s.Lk)("span",{class:"sr-only"},"Click to open reviews modal",-1))])],64)):(0,a.R1)(P)?((0,s.uX)(),(0,s.CE)(s.FK,{key:1},[r[1]||(r[1]=(0,s.Lk)("span",{class:"sr-only"},"Loading reviews",-1)),r[2]||(r[2]=(0,s.Lk)("div",{"aria-hidden":"true",class:"reviews-widget__loader"},[(0,s.Lk)("span"),(0,s.Lk)("span"),(0,s.Lk)("span")],-1))],64)):((0,s.uX)(),(0,s.CE)("div",l,[(0,s.Lk)("span",null,(0,i.v_)((0,a.R1)(v)("reviews-widget-error")),1)]))],2),(0,s.bF)((0,a.R1)(h),(0,s.v6)({ref_key:"modalRef",ref:p},f),null,16)],64))}},v=h,g=v},15662:(e,t,r)=>{r.d(t,{H6:()=>h,Sx:()=>v,uo:()=>f});var s=r(10141),i=r(48020),a=r(23041),n=r(99940),o=r(30843);const u="/api/reputation/",c="Feature.Venues.ReputationProxyApiUrl",l=()=>{const e=(0,o.B)(),t=e.$state;return t[c]||u},d=(e,t)=>(0,a.A)({url:`${e}summary`,params:{locationIDs:t,groupBy:"Source"}}).then((e=>e.data)),h=e=>{const t=l();return(0,s.I)({queryKey:["reputation-summary",e],queryFn:()=>d(t,e),retry:3,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:864e5,enabled:!(0,n.isEditorActive)()})},v=e=>{const t=l();return(0,a.A)(`${t}reviews/${e}/responses`).then((e=>e.data))},g=(e,t,r,s,i,n,o=0)=>{const u={locationID:t,sourceID:r,limit:s,offset:o};return i||n?(u.from=i,u.to=n):u.range="LifeToDate",a.A.get(`${e}reviews`,{params:u}).then((e=>e.data))},f=({venueId:e,sourceID:t,limit:r=5,offset:s={value:0},from:a=null,to:o=null})=>{const u=l();return(0,i.q)({queryKey:["reputation-reviews",e,t,a,o,r],queryFn:()=>g(u,e,t,r,a,o,s.value),initialPageParam:0,retry:3,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:864e5,getNextPageParam:(e,t,r)=>e?.paging?.next?r+1:null,enabled:!(0,n.isEditorActive)()})}},48020:(e,t,r)=>{r.d(t,{q:()=>o});var s=r(1651),i=r(58959),a=class extends s.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,i.PL)()})}getOptimisticResult(e){return e.behavior=(0,i.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,s=super.createResult(e,t),{isFetching:a,isRefetching:n,isError:o,isRefetchError:u}=s,c=r.fetchMeta?.fetchMore?.direction,l=o&&"forward"===c,d=a&&"forward"===c,h=o&&"backward"===c,v=a&&"backward"===c,g={...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,i.rB)(t,r.data),hasPreviousPage:(0,i.RQ)(t,r.data),isFetchNextPageError:l,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:v,isRefetchError:u&&!l&&!h,isRefetching:n&&!d&&!v};return g}},n=r(41642);function o(e,t){return(0,n.t)(a,e,t)}}}]);
2//# sourceMappingURL=ReviewsWidget.304a4188.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.