(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["usedview.detail"],{"0235":function(t,e,r){},"04b3":function(t,e,r){"use strict";var a=r("d718"),i=r.n(a);i.a},1143:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container placed-message pt-8 pb-lg-8"},[r("div",{staticClass:"row justify-content-center stars mb-8 px-8"},[r("u-icon",{attrs:{icon:"star",size:"3.5rem"}}),r("u-icon",{attrs:{icon:"star",size:"7rem"}}),r("u-icon",{attrs:{icon:"star",size:"3.5rem"}})],1),r("div",{staticClass:"row flex-column text-center px-8"},[r("div",{staticClass:"col congratulation"},[r("div",{staticClass:"text-700"},[t._v("Congratulations!")]),r("div",[t._v("Your ad has been "+t._s(t.getMessageType)+"!")])])]),r("div",{staticClass:"row flex-column text-center placed-message-buttons mt-12"},[r("div",{staticClass:"col align-items-center bg-light-grey mb-3 pt-3 pb-5"},[r("div",{staticClass:"h5"},[t._v("Share your ad on social")]),r("div",{staticClass:"px-8"},[r("Share",{attrs:{ad:t.ad}})],1)])])])},i=[],n=r("17a4"),s={components:{Share:n["default"]},computed:{getMessageType:function(){return this.edit?"updated":"posted"}},props:{edit:{type:Boolean,default:!1},ad:{type:Object}}},o=s,c=(r("6b6f"),r("2877")),l=Object(c["a"])(o,a,i,!1,null,null,null);e["default"]=l.exports},1175:function(t,e,r){},"17a4":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.showNavigatorShare?r("div",[r("div",{staticClass:"btn d-flex justify-content-center align-items-center text-sm text-white text-700 text-uppercase pointer bg-secondary",on:{click:function(e){return t.share()}}},[t._v(" Share ")])]):r("div",[r("ShareButton",{staticClass:"mb-2",attrs:{ad:t.ad,network:"facebook",icon:t.icon}}),r("ShareButton",{staticClass:"mb-2",attrs:{ad:t.ad,network:"twitter",icon:t.icon}}),r("ShareButton",{staticClass:"mb-2",attrs:{ad:t.ad,network:"pinterest",icon:t.icon}}),r("ShareButton",{staticClass:"mb-2",attrs:{ad:t.ad,network:"email",icon:t.icon}})],1)])},i=[],n=(r("a4d3"),r("99af"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("983d"),o=r("2f62");function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d={components:{ShareButton:s["i"]},props:{ad:{type:Object,required:!0},icon:{type:Boolean,default:!1}},methods:{share:function(){var t={title:this.ad.getFullTitle(),text:this.ad.getDescription(),url:"".concat(this.hostname).concat(this.ad.getCanonicalPath())};navigator.share(t).catch((function(t){console.log("error sharing",t)}))}},computed:l({},Object(o["c"])("client",["hostname"]),{isMobile:function(){return/Mobi|Android/i.test(navigator.userAgent)},showNavigatorShare:function(){return"share"in navigator&&this.isMobile}})},u=d,h=r("2877"),f=Object(h["a"])(u,a,i,!1,null,null,null);e["default"]=f.exports},"1bbf":function(t,e,r){},"1f0f":function(t,e,r){"use strict";var a=r("f179"),i=r.n(a);i.a},2375:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"loader",style:{width:t.size,height:t.size,border:t.borderWidth+" solid "+t.lightColor,"border-top":t.borderWidth+" solid "+t.darkColor}})},i=[],n={name:"Spinner",props:{size:{type:String,default:"120px"},borderWidth:{type:String,default:"16px"},lightColor:{type:String,default:"#f3f3f3"},darkColor:{type:String,default:"#32cbad"}}},s=n,o=(r("ef72"),r("2877")),c=Object(o["a"])(s,a,i,!1,null,null,null);e["a"]=c.exports},2651:function(t,e,r){"use strict";var a=r("5f34");r.d(e,"b",(function(){return a["default"]}));var i=r("67b5");r.d(e,"c",(function(){return i["default"]}));var n=r("5d50");r.d(e,"a",(function(){return n["a"]}));r("c358")},"2bca":function(t,e,r){"use strict";var a=r("ff5e"),i=r.n(a);i.a},3028:function(t,e,r){},"3f26":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.old?r("OldDetailPage",{attrs:{ad:t.ad,error:t.error,loading:t.loading,missing:t.missing,removed:t.removed,"prev-route":t.prevRoute}}):r("DetailPage",{attrs:{ad:t.ad,error:t.error,loading:t.loading,missing:t.missing,removed:t.removed,"prev-route":t.prevRoute}})},i=[],n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[r("div",{staticClass:"ad-view-container mb-4",attrs:{itemscope:"",itemtype:"http://schema.org/Product"}},[t.removed?[r("base-container",{staticClass:"mb-4 ",attrs:{title:"Removed"}},[r("div",{staticClass:"row p-4"},[r("p",[t._v("Ad ID "+t._s(t.ad.getId())+" has been removed. If you have any questions, please contact us at "),r("a",{attrs:{href:"mailto:feedbacks@used.ca",target:"_blank"}},[t._v("feedbacks@used.ca")]),t._v(".")])])])]:t.missing?[r("base-container",{staticClass:"mb-4 ",attrs:{title:"404 Error"}},[r("div",{staticClass:"row p-4"},[t._v("We could not find your ad.")])])]:t.error?[r("base-container",{staticClass:"mb-4 ",attrs:{title:"Error"}},[r("div",{staticClass:"row p-4"},[t._v("Sorry there is an error fetching the ad "+t._s(t.ad.getId())+".")])])]:[r("div",{staticClass:"d-none d-lg-block"},[r("TwoColumn",{scopedSlots:t._u([{key:"content",fn:function(){return[t.$viewport.desktop?r("google-ad",{staticClass:"mb-4",attrs:{name:"used-leaderboard-top","scroll-refresh":"",old:!1,justify:"center"}}):t._e(),r("div",{staticClass:"row pl-4 mb-4"},[r("div",{staticClass:"mb-4",class:t.ad.hasPhotos()?"ml-n4 mr-4 col-12 col-lg-6":"col-12 order-2"},[r("Photos",{staticClass:"mb-4",attrs:{data:t.ad.getPhotos()}})],1),r("div",{class:t.ad.hasPhotos()?"col-12 col-lg-6 ml-n4 ml-lg-0":"col-12 order-1"},[r("Title",{staticClass:"col h4 mb-4",attrs:{ad:t.ad}}),r("Description",{staticClass:"col mb-4 overflow-auto",staticStyle:{"max-height":"400px"},attrs:{ad:t.ad}})],1),r("div",{staticClass:"order-3",class:t.ad.canShowOnMap()?"col-12 col-lg-6 ml-n4 mr-4 ":""},[t.client&&t.ad.used_ad_id&&t.ad.canShowOnMap()?r("Map",{staticClass:"mb-4",staticStyle:{height:"300px"},attrs:{zoom:"14",circle:"",radius:"0.4",disable:"",center:t.ad.getCoordinates()}}):t._e()],1),r("div",{staticClass:"ml-n4 ml-lg-0 order-3 row",class:t.ad.canShowOnMap()?"col-12 col-lg-6 ":"col-12"},[r("User",{class:t.ad.canShowOnMap()?"col-12":"col-6",attrs:{ad:t.ad}}),r("Details",{staticClass:"col",class:t.ad.canShowOnMap()?"col-12":"col-6",attrs:{ad:t.ad}})],1)]),r("div",{staticClass:"p-4 bg-light-grey"},[t._v("You may also like")]),r("google-ad",{staticClass:"mt-4",attrs:{name:"used-leaderboard-bottom","scroll-refresh":"",old:!1}})]},proxy:!0},{key:"side",fn:function(){return[t.$viewport.desktop?r("MarketingButton",{staticClass:"mb-4"}):t._e(),t.$viewport.desktop?r("google-ad",{staticClass:"mb-4",attrs:{name:"used-inline1","scroll-refresh":"",old:!1,justify:"end"}}):t._e(),t.$viewport.desktop?r("google-ad",{staticClass:"mb-4",attrs:{name:"used-inline4","scroll-refresh":"",sticky:t.$viewport.desktop,old:!1,justify:"end"}}):t._e(),r("client-only",[r("news-carousel",{staticClass:"mb-4",attrs:{category:t.ad.getCategoryLevel1(),stored:!0}})],1)]},proxy:!0}])})],1),r("div",{staticClass:"d-lg-none"},[r("div",{staticClass:"d-flex flex-column"},[r("CategoryLinks",{staticClass:"mb-4 px-4",attrs:{category:t.ad.getPostedCategory()}}),r("User",{staticClass:"px-4 mb-4",attrs:{ad:t.ad}}),r("Photos",{staticClass:"mb-4",attrs:{data:t.ad.getPhotos()}}),r("Title",{staticClass:"col h4 mb-4 px-4",attrs:{ad:t.ad}}),r("Description",{staticClass:"col px-4",attrs:{ad:t.ad}}),r("Details",{staticClass:"col mb-4 px-4",attrs:{ad:t.ad}}),t.client&&t.ad.used_ad_id&&t.ad.canShowOnMap()?r("Map",{staticClass:"rounded",staticStyle:{height:"300px"},attrs:{zoom:"14",circle:"",radius:"0.4",disable:"",center:t.ad.getCoordinates()}}):t._e(),r("MarketingButton",{staticClass:"mb-4"}),r("trending",{staticClass:"mb-4"}),r("client-only",[r("news-carousel",{staticClass:"mb-4 d-none d-lg-block",attrs:{category:t.ad.getCategoryLevel1(),stored:!0}})],1)],1)])]],2),t.fromPlacement?r("u-modal",{attrs:{"align-top":"","y-offset":"4rem","hide-close":"","max-width":"400px"},model:{value:t.fromPlacement,callback:function(e){t.fromPlacement=e},expression:"fromPlacement"}},[r("ClientOnly",[r("PlacedMessage",{attrs:{ad:t.ad,edit:t.edit}})],1)],1):t._e()],1)},s=[],o=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),c=r("44f9"),l=r("7b04"),d=r("3439"),u=r("a52e"),h=r("29d2"),f=r("9f1a"),p=r("4a27"),b=r("a0be"),g=r("2f62"),v=r("9c5a"),m=r("f566"),y=r("3fba"),w=r("1143"),O=r("983d"),j=r("ac81");function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function _(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var C={mixins:[m["c"],m["b"],j["a"]],data:function(){return{edit:!1,fromPlacement:!1}},name:"AdView",components:{TwoColumn:c["a"],BaseContainer:l["a"],MarketingButton:p["a"],Photos:v["e"],Contact:v["a"],Details:v["c"],Map:b["a"],NewsCarousel:f["default"],Trending:u["a"],GoogleAd:d["default"],ClientOnly:h["a"],PlacedMessage:w["default"],CategoryLinks:O["b"],User:v["g"],Title:v["f"],Description:v["b"]},computed:_({},Object(g["c"])("client",["auth"]),{isUsers:function(){return this.ad.getUserId()==this.auth.user}}),methods:{checkFromPlacement:function(){y["W"].place in this.$route.query&&this.ad.getStatus()==y["bb"].notsold&&this.isUsers&&(this.fromPlacement=!0,this.$route.query[y["W"].place]===y["X"].updated&&(this.edit=!0))}},mounted:function(){this.checkFromPlacement()},watch:{ad:"checkFromPlacement"}},P=C,k=(r("9dbe"),r("2877")),S=Object(k["a"])(P,n,s,!1,null,null,null),D=S.exports,E=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("two-column",{staticClass:"old",scopedSlots:t._u([{key:"content",fn:function(){return[r("div",{staticClass:"ad-view-container mb-4 row",attrs:{itemscope:"",itemtype:"http://schema.org/Product"}},[t.removed?[r("base-container",{staticClass:"mb-4 ",attrs:{title:"Removed"}},[r("div",{staticClass:"row p-4"},[r("p",[t._v("Ad ID "+t._s(t.ad.getId())+" has been removed. If you have any questions, please contact us at "),r("a",{attrs:{href:"mailto:feedbacks@used.ca",target:"_blank"}},[t._v("feedbacks@used.ca")]),t._v(".")])])])]:t.missing?[r("base-container",{staticClass:"mb-4 ",attrs:{title:"404 Error"}},[r("div",{staticClass:"row p-4"},[t._v("We could not find your ad.")])])]:t.error?[r("base-container",{staticClass:"mb-4 ",attrs:{title:"Error"}},[r("div",{staticClass:"row p-4"},[t._v("Sorry there is an error fetching the ad "+t._s(t.ad.getId())+".")])])]:[r("ad-header",{attrs:{ad:t.ad,back:t.prevRoute}}),r("photos",{staticClass:"mb-4",attrs:{data:t.ad.getPhotos()}}),r("div",{staticClass:"adview-detail-content p-lg-3",staticStyle:{width:"100%"}},[r("ad-details",{attrs:{ad:t.ad}}),t.$viewport.mobile?r("google-ad",{staticClass:"mx-auto mb-4",attrs:{"scroll-refresh":"",name:"used-inline1"}}):t._e(),t.client&&t.ad.used_ad_id&&t.ad.canShowOnMap()?r("Map",{staticClass:"rounded",staticStyle:{height:"300px"},attrs:{zoom:"15",maxZoom:"18",circle:"",radius:"0.4",center:t.ad.getCoordinates()}}):t._e()],1)]],2),r("news-carousel",{staticClass:"mb-4 d-none d-lg-block",attrs:{category:t.ad.getCategoryLevel1(),stored:!0}})]},proxy:!0},{key:"side",fn:function(){return[t.removed||t.missing?t._e():r("contact",{staticClass:"mb-4",attrs:{ad:t.ad}}),r("google-ad",{staticClass:"mx-auto mb-4",attrs:{"scroll-refresh":"",name:"used-inline2"}}),r("google-ad",{staticClass:"mx-auto mb-4",attrs:{"scroll-refresh":"",name:"used-inline3"}}),r("trending",{staticClass:"mb-4"}),r("google-ad",{staticClass:"mx-auto mb-4",attrs:{"scroll-refresh":"",name:"used-inline4",sticky:t.$viewport.desktop}})]},proxy:!0},{key:"default",fn:function(){return[t.fromPlacement?r("u-modal",{attrs:{"align-top":"","y-offset":"4rem","hide-close":"","max-width":"400px"},model:{value:t.fromPlacement,callback:function(e){t.fromPlacement=e},expression:"fromPlacement"}},[r("ClientOnly",[r("PlacedMessage",{attrs:{ad:t.ad,edit:t.edit}})],1)],1):t._e(),r("google-ad",{attrs:{"scroll-refresh":"",name:"used-leaderboard-bottom",justify:"start"}})]},proxy:!0}])})],1)},A=[],$=(r("d3b7"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[r("div",{staticClass:"row align-items-center justify-content-center adlist-nav bg-primary rounded w-100 d-none d-lg-flex"},[r("div",{staticClass:"col-auto"},[t.fromAnAdlist?r("span",{staticClass:"adview-header-nav pointer p-3 d-block text-white text-uppercase text-600 text-xs border-right border-white rounded-left",on:{click:function(e){return t.toBack()}}},[t._v("Back to listings")]):r("router-link",{staticClass:"adview-header-nav pointer p-3 d-block text-white text-uppercase text-600 text-xs border-right border-white rounded-left",attrs:{to:t.toCategoryListing()}},[t._v("Back to listings")])],1),r("div",{staticClass:"col"}),r("div",{staticClass:"text-right",attrs:{size:"auto"}},[t.photoGalleryTitleSuffix.length?r("router-link",{staticClass:"adview-header-nav pointer p-3 d-block text-white text-uppercase text-600 text-xs border-left border-white rounded-right",attrs:{to:t.toAdView()}},[t._v("Back to ad description")]):r("u-menu",{model:{value:t.share,callback:function(e){t.share=e},expression:"share"}},[r("span",{staticClass:"px-9 py-3 pointer d-block text-white text-uppercase text-600 text-xs border-left border-white rounded-right",attrs:{slot:"activator"},on:{click:function(e){t.share=!t.share}},slot:"activator"},[t._v("Share")]),r("div",{staticClass:"row flex-column rounded bg-light-grey shadow p-2 align-items-center"},[r("Share",{attrs:{ad:t.ad,icon:""}})],1)])],1)]),r("div",{staticClass:"row justify-content-bcetween align-items-center w-100"},[r("div",{staticClass:"col-auto d-none d-lg-block mr-2"},[t.photoGalleryTitleSuffix.length?t._e():r("favourite-button",{attrs:{ad:t.ad.getId()}})],1),r("div",{staticClass:"col h4 mb-0"},[t.photoGalleryTitleSuffix.length?r("span",{domProps:{innerHTML:t._s(t.ad.getFullTitle()+t.photoGalleryTitleSuffix)}}):r("h1",{staticClass:"text-400 h4 mb-0",attrs:{itemprop:"name"},domProps:{innerHTML:t._s(t.ad.getFullTitle())}})]),r("div",{staticClass:"col-auto ml-3 py-3 d-none d-lg-flex"},[r("report-ad-button",{attrs:{ad:t.ad}})],1)])])}),T=[],L=(r("caad"),r("b0c0"),r("2532"),r("2651")),I=r("17a4"),R=r("d046");function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function B(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var F={data:function(){return{share:!1}},components:{FavouriteButton:L["b"],ReportAdButton:L["c"],Share:I["default"]},props:{ad:{type:Object,required:!0},back:{type:Object,default:function(){return{}}},photoGalleryTitleSuffix:{type:String,default:""}},mounted:function(){},methods:{toBack:function(){var t=-1;""!=this.photoGalleryTitleSuffix&&(t=-2),this.$router.go(t)},toCategoryListing:function(){return R["N"].browse({category:this.ad.getPostedCategory()})},toAdView:function(){return R["N"].adview({ad:this.ad,category:this.ad.getPostedCategory()})}},computed:B({},Object(g["c"])("region",["site"]),{fromAnAdlist:function(){return[R["J"].browse,R["J"].browse_listing].includes(this.back.name)||[R["J"].public_profile,R["J"].dashboard,R["J"].my_ads].includes(this.back.name)},getPhotoGalleryTitleSuffix:function(){return this.photoGalleryTitleSuffix}})},z=F,U=(r("b0d2"),Object(k["a"])(z,$,T,!1,null,null,null)),M=U.exports,W=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasPhotos?r("div",{staticClass:"container"},[r("div",{staticClass:"row justify-content-center align-items-center position-relative"},[r("div",{staticClass:"col-12"},[r("div",{ref:"photos",staticClass:"row d-flex align-items-center flex-nowrap",staticStyle:{overflow:"hidden"},on:{touchstart:t.startSwipe,touchmove:t.swiping,touchend:t.endSwipe}},t._l(t.data,(function(e,a){return r("div",{key:a,staticClass:"adview-photos col-12 d-flex align-items-center flex-nowrap position-relative",class:{"adview-photos-transition":!t.dragging},style:{transform:"translateX("+t.photoPos+"px)"}},[r("router-link",{staticClass:"d-block mx-auto",attrs:{to:t.to(a),draggable:"false",title:"Photo "+(a+1)}},[r("img",{directives:[{name:"show",rawName:"v-show",value:t.photoReady[a],expression:"photoReady[i]"}],staticClass:"rounded",class:{"d-block":t.photoReady[a]},staticStyle:{width:"auto",height:"auto",margin:"0 auto","max-width":"100%"},style:{"max-height":t.maxHeight+"px"},attrs:{src:e.getPhoto(t.size),draggable:"false",alt:t.ad.getTitle()+" image "+(a+1),itemprop:"image"},on:{load:function(e){return t.imgLoad(a,t.photoReady)},error:function(e){return t.imgError(a,t.photoReady,e)}}}),t.photoReady[a]?t._e():r("div",{staticClass:"adview-photos-placeholder",style:{width:t.adviewPhotoPlaceholderSize+"px",height:t.adviewPhotoPlaceholderSize+"px"}},[r("spinner",{attrs:{size:"50%"}})],1)])],1)})),0)])]),t.data.length>1?r("div",{staticClass:"row justify-content-center mt-4 d-flex d-lg-flex position-relative"},[t._l(t.data,(function(e,a){return r("div",{key:a,ref:"thumbnail-"+a,refInFor:!0,staticClass:"col-auto mx-1 mb-4"},[r("router-link",{attrs:{to:t.to(a),title:"Photo "+(a+1)}},[r("img",{directives:[{name:"show",rawName:"v-show",value:t.thumbnailReady[a],expression:"thumbnailReady[i]"}],staticClass:"rounded",staticStyle:{width:"50px"},attrs:{src:e.getPhoto(t.tnSize),alt:t.ad.getTitle()+" thumbnail image "+(a+1)},on:{mouseover:function(e){return t.setDisplayPhoto(a)},load:function(e){return t.imgLoad(a,t.thumbnailReady)},error:function(e){return t.imgError(a,t.thumbnailReady,e)}}}),t.thumbnailReady[a]?t._e():r("div",{staticClass:"adview-photo-thumbnail-placeholder",on:{mouseover:function(e){return t.setDisplayPhoto(a)}}},[r("spinner",{attrs:{size:"70%","border-width":"5px"}})],1)])],1)})),t.indicator.show?r("div",{staticClass:"pb-1 position-absolute bg-secondary rounded",style:{width:t.indicator.width+"px",left:t.indicator.left+"px",top:t.indicator.top+"px"},attrs:{id:"img-indicator"}}):t._e()],2):t._e()]):t._e()},q=[],H=(r("d81d"),r("a434"),r("0d03"),r("2375"));function V(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?V(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var X={name:"Photos",data:function(){return{size:614,tnSize:114,swipeStart:null,swipePos:null,difference:100,dragging:!1,photoPos:0,swipeLeft:null,maxWidth:0,maxHeight:425,indicator:{show:!1,index:0,left:0,top:0,topOffset:8,width:44},photoReady:[],thumbnailReady:[]}},components:{Spinner:H["a"]},mounted:function(){this.maxWidth=this.$refs.photos?this.$refs.photos.clientWidth:0,this.updateIndicator(),window.addEventListener("resize",this.updateIndicator)},created:function(){this.photoReady=this.data.map((function(t,e){return!0})),this.thumbnailReady=this.data.map((function(t,e){return!0}))},beforeDestroy:function(){window.removeEventListener("resize",this.updateIndicator)},props:{data:{type:Array,default:function(){return[]}}},methods:{updateIndicator:function(){if(this.data.length>1){this.indicator.show=!0;var t=this.$refs["thumbnail-".concat(-this.indicator.index)][0],e=t.offsetWidth/2+t.offsetLeft;this.indicator.left=e-this.indicator.width/2,this.indicator.top=t.offsetTop+t.offsetHeight+this.indicator.topOffset}},getEventXValue:function(t){var e=null;if(["mousedown","mouseup","mousemove"].includes(t.type))e=t.x;else if(["touchstart","touchend","touchmove"].includes(t.type)){var r=t.targetTouches[0]||t.changedTouches[0];e=r.clientX}return e},isSwipeLeft:function(t){return this.swipePos-t>10},isSwipeRight:function(t){return this.swipePos-t<-10},startSwipe:function(t){this.dragging=!0,this.swipePos=this.getEventXValue(t)},swiping:function(t){if(this.dragging){var e=this.getEventXValue(t),r=this.$refs.photos?this.$refs.photos.clientWidth:0;this.photoPos=r*this.indicator.index+-1*(this.swipePos-e)}},endSwipe:function(t){var e=this.getEventXValue(t);this.isSwipeLeft(e)?(this.indicator.index--,this.setDisplayPhoto()):this.isSwipeRight(e)&&(this.indicator.index++,this.setDisplayPhoto()),this.swipePos=null,this.dragging=!1},stopSwiping:function(t){this.swipePos=null,this.dragging=!1},setDisplayPhoto:function(t){void 0!=t&&(this.indicator.index=-t);var e=this.$refs.photos?this.$refs.photos.clientWidth:0;this.maxWidth=e,this.indicator.index>0&&(this.indicator.index=0),this.indicator.index<=-this.data.length&&this.indicator.index++,this.photoPos=e*this.indicator.index},to:function(t){return this.$viewport.mobile?"":R["N"].adview({ad:this.ad,region:this.site.getAlias(),category:this.$route.params.category,view_gallery:!0,initial_pos:t})},imgError:function(t,e,r){e.splice(t,1,!1),setTimeout((function(){r.target.src+="#"+(new Date).getTime()}),3e3)},imgLoad:function(t,e){e.splice(t,1,!0)}},computed:G({},Object(g["c"])("ad",["ad"]),{},Object(g["c"])("region",["site"]),{hasPhotos:function(){return this.data.length>0},adviewPhotoPlaceholderSize:function(){return this.maxWidth>this.maxHeight?this.maxHeight:this.maxWidth}}),watch:{$viewport:function(){this.setDisplayPhoto()},"indicator.index":"updateIndicator",data:function(t){this.photoReady=this.data.map((function(t,e){return!0})),this.thumbnailReady=this.data.map((function(t,e){return!0}))}}},J=X,Z=(r("4995"),Object(k["a"])(J,W,q,!1,null,null,null)),Q=Z.exports,Y=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container rounded bg-light-grey"},[r("div",{staticClass:"row h6 mb-0 px-4 py-2 text-400 bg-primary rounded-top d-none d-lg-flex"},[t._v("Contact User")]),r("div",{staticClass:"row mb-3 p-3"},[r("div",{staticClass:"col-auto"},[t.ad.hasUser()?r("router-link",{attrs:{to:t.toUser()}},[r("img",{staticClass:"rounded",staticStyle:{width:"90px"},attrs:{src:t.ad.user.getPhotoURL(),alt:t.ad.user.getHandle()+" profile image"}})]):r("img",{staticClass:"rounded",staticStyle:{width:"90px"},attrs:{src:t.ad.user.getPhotoURL(),alt:t.ad.user.getHandle()+" profile image"}})],1),r("div",{staticClass:"col rounded bg-white p-2 ml-3 text-sm"},[r("ul",[r("li",{staticClass:"d-flex justify-content-between align-items-end",staticStyle:{"word-break":"break-word"}},[t.ad.hasUser()?r("router-link",{attrs:{to:t.toUser()}},[t._v(t._s(t.ad.getUserHandle()))]):t._e(),t.ad.hasUser()?r("FavouriteButton",{attrs:{seller:t.ad.user.getId()}}):t._e()],1),r("li",[r("span",{staticClass:"text-700"},[t._v(t._s(t.adLocation()))]),t.ad.canShowOnMap()?[t._v(" - "),r("router-link",{attrs:{to:"#map"},nativeOn:{click:function(e){return e.preventDefault(),t.goToMap()}}},[t._v("map")])]:t._e()],2),"NOT SOLD"==t.ad.status?r("li",[t._v(" Phone: "),r("PhoneAdButton",{staticClass:"d-sm-inline",attrs:{ad:t.ad,"as-link":""}})],1):t._e()])]),t.ad.wantEmail()&&"NOT SOLD"==t.ad.status?r("email-user-link",{staticClass:"mt-3",attrs:{full:"",ad:t.ad}}):t._e(),t.vpdLink?r("a",{staticClass:"mt-3 btn-full btn btn-accent d-flex align-items-center justify-content-center",attrs:{id:"vpd-link",href:t.ad.getUrl(),target:"_blank"}},[t._v(" "+t._s(t.vpdLink)+" ")]):t._e()],1),r("div",{staticClass:"row align-items-center justify-content-between bg-white shadow-top pt-4 px-8 d-flex d-lg-none",staticStyle:{"padding-bottom":"60px"},attrs:{id:"contact-seller-bar"}},[r("div",{staticClass:"col px-4 d-flex align-items-center justify-content-start"},[r("favourite-button",{staticClass:"mr-8",attrs:{ad:t.ad.getId()}}),t.canShare?r("u-button",{attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.shareAd()}}},[r("u-icon",{attrs:{icon:"share-android",color:"grey"}})],1):r("u-menu",{model:{value:t.share,callback:function(e){t.share=e},expression:"share"}},[r("u-button",{attrs:{slot:"activator",icon:"",color:"transparent"},on:{click:function(e){t.share=!t.share}},slot:"activator"},[r("u-icon",{attrs:{icon:"share-android",color:"grey"}})],1),r("div",{staticClass:"row flex-column rounded bg-light-grey shadow p-2 align-items-center"},[r("div",[r("Share",{attrs:{ad:t.ad,icon:""}})],1)])],1)],1),r("div",{staticClass:"col text-center"},[t.ad.wantEmail()?r("email-user-link",{attrs:{ad:t.ad}}):t._e(),t.ad.hasPhone()?r("div",{staticClass:"pt-2 d-flex justify-content-center flex-wrap"},[r("div",{staticClass:"col-sm-auto col-12"},[t._v("Phone:")]),r("PhoneAdButton",{staticClass:"d-sm-inline ml-sm-2 ml-0",attrs:{ad:t.ad,"as-link":""}})],1):t._e()],1),r("div",{staticClass:"col text-right"},[r("ReportAdButton",{attrs:{ad:t.ad}})],1)])])},K=[],tt=(r("99af"),r("c975"),r("9911"),r("7b5b"));function et(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function rt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?et(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):et(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var at=function(){return Promise.resolve().then(r.bind(null,"5f34"))},it=function(){return Promise.resolve().then(r.bind(null,"67b5"))},nt=function(){return Promise.resolve().then(r.bind(null,"c358"))},st=function(){return Promise.resolve().then(r.bind(null,"e326"))},ot=function(){return Promise.resolve().then(r.bind(null,"17a4"))},ct={components:{FavouriteButton:at,EmailUserLink:nt,Share:ot,ReportAdButton:it,PhoneAdButton:st},mixins:[tt["a"]],data:function(){return{share:!1,canShare:!1}},props:{ad:{type:Object,required:!0}},mounted:function(){this.canShare="share"in navigator,this.isSafariDesktop&&(this.canShare=!1)},methods:{toUser:function(){return R["N"].user({user:this.ad.user.getHandle()})},goToMap:function(){var t=document.getElementById("map");t.scrollIntoView({behavior:"smooth"})},shareAd:function(){var t={title:this.ad.getFullTitle(),text:this.ad.getDescription(),url:"".concat(this.hostname).concat(this.ad.getCanonicalPath())};navigator.share(t).catch((function(t){console.log("error sharing",t)}))},adLocation:function(){try{var t=this.ad.getSmallestRegion();if(t)return this.getRegionByCode(t).getName();throw"Could not resolve region code: "+this.ad.getSmallestRegion()+" for ad "+this.ad.getId()}catch(e){return""}}},computed:rt({},Object(g["c"])("region",["getRegionByCode"]),{},Object(g["c"])("client",["hostname"]),{isSafariDesktop:function(){var t=window.navigator.vendor,e=window.navigator.userAgent.toLowerCase();return t.indexOf("Apple")>-1&&e&&-1==e.indexOf("ipad")&&-1==e.indexOf("iphone")},vpdLink:function(){if(this.ad.isPartnerAd()&&null!=this.ad.getUrl()&&!this.partnerInfoLoading){var t=this.partner_info(this.ad.partner).adview,e=this.ad.getCategoryLevel1();return t.link&&t.link[e]}return!1}})},lt=ct,dt=(r("99b3"),Object(k["a"])(lt,Y,K,!1,null,null,null)),ut=dt.exports,ht=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container adview-ad-details rounded mb-4"},[r("div",{staticClass:"row mb-4 p-3 bg-white rounded d-block",staticStyle:{overflow:"hidden"}},[t.ad.hasAttributes()?r("div",{staticClass:"col-auto mb-3 ml-3",staticStyle:{float:"right","min-width":"225px"}},[r("ul",[t._l(t.ad.getAttributes(),(function(e){return["Dates"==e.name?t._l(e.value,(function(a){return r("li",{key:a,staticClass:"d-flex align-items-center"},[r("span",{staticClass:"text-xs text-700 text-uppercase text-right",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(t.generateDateTitle(a,e.value)))]),r("span",{staticClass:"text-sm border-left ml-3 pl-3 col-auto",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(a.split("T")[0]))])])})):[e.display.atlas?r("li",{key:e.attr_id,staticClass:"d-flex align-items-center"},[r("span",{staticClass:"text-xs text-700 text-uppercase text-right",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(e.name))]),r("span",{staticClass:"text-sm border-left ml-3 pl-3 col-auto",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(t.resolveValue(e.name,e.value)))])]):t._e()]]}))],2)]):t._e(),r("p",{staticStyle:{"white-space":"pre-line","word-break":"break-word"},attrs:{itemprop:"description"}},[t._l(t.formatAdDescription(t.ad.getDescription()),(function(e,a){return[e.isHashtag?r("router-link",{key:a,attrs:{to:t.toLink(e.word)}},[t._v(t._s(e.word+" "))]):[t._v(t._s(e.word+" "))]]}))],2)]),r("div",{staticClass:"row adview-ad-details-sub flex-lg-nowrap",attrs:{itemprop:"offers",itemscope:"",itemtype:"http://schema.org/Offer"}},[t.ad.getPrice()?r("meta",{attrs:{itemprop:"price",content:t.ad.getPrice()}}):t._e(),r("meta",{attrs:{itemprop:"itemOffered",content:t.ad.getTitle()}}),r("meta",{attrs:{itemprop:"priceCurrency",content:"CAD"}}),r("div",{staticClass:"mr-3 p-3 p-lg-0 col-12 col-lg-7"},[t._l(t.details,(function(e,a){return[e.show?r("div",{key:a,staticClass:"row align-items-center"},[r("div",{staticClass:"col-3 labels text-700 text-uppercase text-xs text-right pr-2 pt-1"},[t._v(t._s(e.label))]),r("div",{staticClass:"col-9 bg-white text-sm px-2 pt-1",class:{"pt-1 rounded-top":0===a}},["website"==e.label.toLowerCase()?r("span",[r("a",{staticStyle:{display:"block","white-space":"break-spaces",overflow:"hidden","text-overflow":"ellipsis"},attrs:{target:"_blank",href:e.value.href},on:{click:t.adUrlClicked}},[t._v(t._s(e.value.host))])]):r("span",{attrs:{itemprop:e.itemProp}},[t._v(t._s(e.value))])])]):t._e()]})),r("div",{staticClass:"row"},[r("div",{staticClass:"col-3 labels text-700 text-uppercase text-xs text-right pr-2 pt-1"},[t._v("Category")]),r("category-links",{staticClass:"bg-white text-sm px-2 col",class:{"rounded-bottom pb-1":!t.canEdit},attrs:{itemprop:"category",category:t.ad.getPostedCategory()}})],1),r("div",{directives:[{name:"show",rawName:"v-show",value:t.canEdit,expression:"canEdit"}],staticClass:"row align-items-center position-relative"},[r("div",{staticClass:"col-3 labels text-700 text-uppercase text-xs text-right pr-2"},[t._v("Edit")]),r("div",{staticClass:"col bg-white text-sm px-2 pb-1 rounded-bottom"},[r("router-link",{attrs:{to:t.toEdit()}},[t._v("My Ad")])],1),r("report-ad-button",{staticClass:"d-block d-lg-none",staticStyle:{position:"absolute",bottom:"0.5rem",right:"0.5rem"},attrs:{ad:t.ad}})],1)],2),r("div",{staticClass:"col p-3 p-lg-0 col-12 col-lg-5 flex-shrink-1"},["NOT SOLD"==t.ad.status?r("div",{staticClass:"row mb-3 d-none d-lg-flex"},[t._m(0),r("div",{staticClass:"col"},[r("ul",{staticClass:"rounded bg-white text-sm p-2"},[r("PhoneAdButton",{attrs:{ad:t.ad,"as-link":""}})],1),t.ad.wantEmail()?r("email-user-link",{staticClass:"mt-3",attrs:{full:"",ad:t.ad}}):t._e()],1)]):t._e(),t._m(1),r("div",{staticClass:"row align-items-center"},[r("div",{staticClass:"col-3 labels text-700 text-uppercase text-xs text-right pr-2"},[t._v(" Views ")]),r("div",{staticClass:"col rounded-top bg-white text-center text-sm "},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-4"},[t._v(t._s(t.ad.views_last_1))]),r("div",{staticClass:"col-4"},[t._v(t._s(t.ad.views_last_24))]),r("div",{staticClass:"col-4"},[t._v(t._s(t.ad.views_total))])])])]),r("div",{staticClass:"row align-items-center"},[r("div",{staticClass:"col-3 labels text-700 text-uppercase text-xs text-right pr-2"},[t._v(" Browsed ")]),r("div",{staticClass:"col rounded-bottom bg-white text-center text-sm"},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-4"},[t._v(t._s(t.ad.browses_last_1))]),r("div",{staticClass:"col-4"},[t._v(t._s(t.ad.browses_last_24))]),r("div",{staticClass:"col-4"},[t._v(t._s(t.ad.browses_total))])])])])])])])},ft=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"col-3 labels text-700 text-uppercase text-xs text-right p-2"},[r("ul",[r("li",[t._v("Phone")])])])},function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"row"},[r("div",{staticClass:"col-3"}),r("div",{staticClass:"col text-100 text-uppercase text-center text-xs"},[r("div",{staticClass:"row align-items-center"},[r("div",{staticClass:"col-4"},[t._v("Last hour")]),r("div",{staticClass:"col-4"},[t._v("Last 24 hours")]),r("div",{staticClass:"col-4"},[t._v("Total")])])])])}],pt=(r("e01a"),r("d28b"),r("ac1f"),r("3ca3"),r("841c"),r("1276"),r("ddb0"),r("c358")),bt=r("e326"),gt=r("3d24"),vt=r("40fe");function mt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function yt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var wt={components:{ReportAdButton:L["c"],EmailUserLink:pt["default"],CategoryLinks:L["a"],PhoneAdButton:bt["default"]},data:function(){return{}},mixins:[vt["a"]],props:{ad:{type:Object,required:!0}},methods:{toCategory:function(t){return R["N"].browse({category:t})},toEdit:function(){var t=this.ad.used_ad_id,e=this.site.getAlias();return R["N"].place_ad({region:e,used_ad_id:t})},adUrlClicked:function(t){Object(gt["Q"])({used_ad_id:this.ad.used_ad_id,event_type:"ad_url_clicked",region:this.site.getCode()}).catch((function(t){console.log("ad_url_clicked event error",t)}))},resolveValue:function(t,e){var r=t.toLowerCase(),a="pets"==r||"smoking"==r;return a?e?"Yes":"No":e},toLink:function(t){return{path:"/all",query:{q:t,r:this.search.region.length?this.search.region:this.site.getCode()}}},formatAdDescription:function(t){var e=/^#[^ !@#$%^&*(),.?":{}|<>][\w+]*$/i,r=t.split(/(\r?\n|\s+)/).filter((function(t){return 0!==t.length&&" "!==t})),a=[],i=!0,n=!1,s=void 0;try{for(var o,c=r[Symbol.iterator]();!(i=(o=c.next()).done);i=!0){var l=o.value;a.push({word:l,isHashtag:e.test(l)})}}catch(d){n=!0,s=d}finally{try{i||null==c.return||c.return()}finally{if(n)throw s}}return a},generateDateTitle:function(t,e){return t==e[0]?"Dates:":""}},computed:yt({},Object(g["c"])("region",["site"]),{},Object(g["c"])("user",["hasPermissions","loadingSettings"]),{},Object(g["c"])("client",["auth","search","authenticated"]),{canEdit:function(){return this.auth&&this.auth.user==this.ad.getUserId()},details:function(){return[{label:"Website",value:this.ad.getWebsite(),show:this.ad.getWebsite()},{label:"Ad #",value:this.ad.used_ad_id,show:!0,itemProp:"sku"},{label:"Posted",value:this.ad.getTimePosted(),show:!0},{label:"Renewed",value:this.ad.getTimeRenewed(),show:this.ad.isRenewed()},{label:"Expiry",value:this.ad.getTimeExpiry(),show:!0},{label:"Status",value:this.getStatusPresentation(this.ad.category,this.ad.status),show:!0,itemProp:"availability"},{label:"Details",value:this.ad.getDetails(),show:this.ad.hasDetails()}]}})},Ot=wt,jt=(r("96ee"),Object(k["a"])(Ot,ht,ft,!1,null,null,null)),xt=jt.exports;function _t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(r),!0).forEach((function(e){Object(o["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Pt=function(){return Promise.resolve().then(r.bind(null,"9f1a"))},kt=function(){return Promise.resolve().then(r.bind(null,"1143"))},St={mixins:[m["c"],m["b"],j["a"]],data:function(){return{edit:!1,fromPlacement:!1}},name:"AdView",components:{TwoColumn:c["a"],BaseContainer:l["a"],Photos:Q,Contact:ut,"ad-header":M,"ad-details":xt,Map:b["a"],NewsCarousel:Pt,Trending:u["a"],GoogleAd:d["default"],ClientOnly:h["a"],PlacedMessage:kt},computed:Ct({},Object(g["c"])("client",["auth"]),{isUsers:function(){return this.ad.getUserId()==this.auth.user}}),methods:{checkFromPlacement:function(){y["W"].place in this.$route.query&&this.ad.getStatus()==y["bb"].notsold&&this.isUsers&&(this.fromPlacement=!0,this.$route.query[y["W"].place]===y["X"].updated&&(this.edit=!0))}},mounted:function(){this.checkFromPlacement()},watch:{ad:"checkFromPlacement"}},Dt=St,Et=(r("5367"),Object(k["a"])(Dt,E,A,!1,null,null,null)),At=Et.exports,$t={components:{DetailPage:D,OldDetailPage:At},props:["old"],mixins:[m["b"]]},Tt=$t,Lt=Object(k["a"])(Tt,a,i,!1,null,null,null);e["default"]=Lt.exports},"40fe":function(t,e,r){"use strict";r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b");var a=r("2fe6"),i=r("3fba"),n=r("2f62");function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){Object(a["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e["a"]={computed:o({},Object(n["c"])("category",{getCategories:"categories"})),methods:{getStatusPresentation:function(t,e){var r="",a=this.getCategories(t);if(a.length>0)if(e==i["bb"].notsold||e==i["bb"].sold){var n=a[a.length-1].sold_text;r=e==i["bb"].notsold?"NOT "+n:n}else"pets"==a[0].category_code&&e==i["bb"].expired&&(r="AD EXPIRED");return r||(r=e),r.toUpperCase()}}}},"44bb":function(t,e,r){},"44f9":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"two-column container bg-white px-8 px-lg-0 mb-4"},[r("div",{staticClass:"row justify-content-center justify-content-lg-between"},[r("div",{staticClass:"two-column-content",class:t.extraContentClasses},[t._t("content")],2),r("div",{staticClass:"two-column-side",class:t.extraSideClasses},[t._t("side")],2)]),t._t("default")],2)},i=[],n=(r("26e9"),{props:{reverse:{type:Boolean},reverseMobile:{type:Boolean}},computed:{extraSideClasses:function(){var t="col-12 col-lg-auto ";return this.reverse?this.reverseMobile?t+="order-1":t+="order-lg-1":(t+="ml-lg-4",this.reverseMobile&&(t+="order-1 order-lg-12")),t},extraContentClasses:function(){var t="col-12 col-lg-auto ";return this.reverse?this.reverseMobile?t+="order-12":t+="order-lg-12":this.reverseMobile&&(t+="order-12 order-lg-1"),t}}}),s=n,o=(r("2bca"),r("2877")),c=Object(o["a"])(s,a,i,!1,null,null,null);e["a"]=c.exports},"46fd":function(t,e,r){},4995:function(t,e,r){"use strict";var a=r("5c27"),i=r.n(a);i.a},"4a27":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"row"},[t._m(0),r("div",{staticClass:"col-12 row mb-2 justify-content-center"},[t.$viewport.desktop?r("google-ad",{attrs:{name:"used-marketing","scroll-refresh":"",old:!1}}):t._e()],1),r("div",{staticClass:"col-12 row bg-primary p-2 justify-content-end"},[r("a",{staticClass:"text-white",attrs:{href:t.advertiseWithUsLink}},[r("span",{staticClass:"text-sm text-100 "},[t._v("Advertise with us")])])])])},i=[function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"col-12 row bg-primary py-1 mb-2 justify-content-center"},[r("span",{staticClass:"text-700 text-lg mr-1"},[t._v("Used.ca")]),r("span",{staticClass:"text-100 text-lg"},[t._v("proudly supports")])])}],n=r("3fba"),s=r("3439"),o={components:{GoogleAd:s["default"]},computed:{advertiseWithUsLink:function(){return n["c"]}}},c=o,l=r("2877"),d=Object(l["a"])(c,a,i,!1,null,null,null);e["a"]=d.exports},5366:function(t,e,r){"use strict";var a=r("a25a"),i=r.n(a);i.a},5367:function(t,e,r){"use strict";var a=r("1bbf"),i=r.n(a);i.a},5395:function(t,e,r){},"5b6f":function(t,e,r){"use strict";r("a4d3"),r("4de4"),r("4160"),r("a15b"),r("e439"),r("dbb4"),r("b64b"),r("ac1f"),r("1276"),r("159b");var a=r("2fe6"),i=r("2f62");function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){Object(a["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var o="canada";e["a"]={computed:s({},Object(i["c"])("region",{siteRegion:"site"}),{},Object(i["c"])("wordpress",{storedNews:"news"}),{allNewsRegions:function(){var t=this.siteRegion.parent?this.siteRegion.parent.split("."):[];return t.push(this.siteRegion.getCode()),t.unshift(o),t},allNewsRegionsKey:function(){return this.allNewsRegions.join(".")}}),methods:s({},Object(i["b"])("wordpress",["requestNews"]))}},"5c27":function(t,e,r){},"5cc4":function(t,e,r){"use strict";var a=r("44bb"),i=r.n(a);i.a},"5d50":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"d-flex flex-wrap"},[t._l(t.categories,(function(e,a){return[r("router-link",{key:e.category_code,attrs:{to:t.toCategory(e.getCode())}},[t._v(t._s(e.getShortTitle()))]),a<t.categories.length-1?r("span",{key:a,staticClass:"mx-1"},[t._v("›")]):t._e()]}))],2)},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("2f62"),o=r("d046");function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d={props:{category:{type:String}},methods:{toCategory:function(t){return o["N"].browse({category:t})}},computed:l({},Object(s["c"])("category",{getTreeByCode:"categories"}),{categories:function(){return this.getTreeByCode(this.category)}})},u=d,h=r("2877"),f=Object(h["a"])(u,a,i,!1,null,null,null);e["a"]=f.exports},"5f34":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("u-button",{staticClass:"favourite",attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.doFavourite()}}},[r("transition",{attrs:{name:"center-scale"}},[r("u-icon",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"bg-transparent mx-auto",attrs:{icon:"heart",color:t.active?"orange":"grey"}})],1)],1)},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("a9e3"),r("e439"),r("dbb4"),r("b64b"),r("ac1f"),r("5319"),r("159b"),r("2fe6")),s=r("3d24"),o=r("ad5c"),c=r("3fba"),l=r("2f62");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h={data:function(){return{active:!1,fav_id:null,disabled:!1,show:!0}},props:{fav:{type:[String,Number]},ad:{type:[String,Number]},seller:{type:[String,Number]}},mounted:function(){this.checkFavourite()},computed:u({},Object(l["c"])("client",["auth","authenticated"]),{},Object(l["c"])("region",["site"]),{},Object(l["c"])("favourite",["isFavouriteAd","isFavouriteSeller","loading"])),watch:{seller:"checkFavourite",ad:"checkFavourite",fav:"checkFavourite",loading:"checkFavourite"},methods:u({},Object(l["b"])("favourite",["delete","add"]),{checkFavourite:function(){this.fav&&(this.fav_id=this.fav),this.ad&&(this.fav_id=this.isFavouriteAd(this.ad)),this.seller&&(this.fav_id=this.isFavouriteSeller(this.seller)),this.active=null!=this.fav_id},doFavourite:function(){var t=this;if(!this.disabled)if(this.disabled=!0,this.show=!1,this.authenticated){var e=this.auth;if(this.fav_id){var r=this.fav_id;Object(s["R"])({auth:e,fav_id:r}).then((function(e){t.delete({fav_id:r})})).catch((function(t){console.log("error removing favourite",t)})).then((function(){t.active=!1,t.fav_id=null,t.disabled=!1,t.show=!0}))}else{var a=this.ad,i=this.seller,n=this.ad?o["f"].type.ad:o["f"].type.seller;Object(s["g"])({auth:e,type:n,seller:i,used_ad:a}).then((function(e){t.fav_id=e.data.fav_id,t.add({fav:e.data})})).then((function(){n==o["f"].type.ad&&Object(s["Q"])({used_ad_id:t.ad,event_type:"ad_favourited",region:t.site.getCode()}).catch((function(t){console.log("ad_favourited event error",t)}))})).catch((function(t){console.log("error favouriting",t)})).then((function(){t.active=null!=t.fav_id,t.disabled=!1,t.show=!0}))}}else{if(this.show=!0,this.disabled=!1,this.$route.hash!==c["F"].auth){var l={hash:c["F"].auth},d=u({},this.$route,{},l);this.$router.replace(d)}this.$reusable.toast_alert(c["ab"],"Please login or sign up to favourite.")}}})},f=h,p=(r("6670"),r("2877")),b=Object(p["a"])(f,a,i,!1,null,null,null);e["default"]=b.exports},6341:function(t,e,r){"use strict";var a=r("5395"),i=r.n(a);i.a},"63ee":function(t,e,r){"use strict";var a=r("46fd"),i=r.n(a);i.a},"64b0":function(t,e,r){"use strict";var a=r("6981"),i=r.n(a);i.a},6670:function(t,e,r){"use strict";var a=r("f35f"),i=r.n(a);i.a},"67b5":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("label",{staticClass:"text-uppercase text-700 text-xs",staticStyle:{cursor:"pointer"},on:{click:function(e){return t.showReportAd()}}},[t._v(" Report Ad "),r("u-icon",{staticStyle:{width:"15px"},attrs:{icon:"exclamation",color:"warning"}})],1)])},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("2f62");function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var l={props:{ad:{type:Object,required:!0}},methods:c({},Object(s["b"])("drawer",["showReportAd"]))},d=l,u=r("2877"),h=Object(u["a"])(d,a,i,!1,null,null,null);e["default"]=h.exports},6981:function(t,e,r){},"6b6f":function(t,e,r){"use strict";var a=r("3028"),i=r.n(a);i.a},"7b04":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container rounded bg-light-grey"},[r("div",{staticClass:"row justify-content-between bg-primary rounded-top"},[t._t("header-left",[r("div",{staticClass:"col h5 mb-0 px-4 py-2 text-400 ",class:{h6:t.small}},[t._v(" "+t._s(t.title)+" ")])]),t._t("header-right")],2),t._t("default")],2)},i=[],n={data:function(){return{}},props:{title:{type:String,default:"Title"},small:{type:Boolean,default:!1}}},s=n,o=r("2877"),c=Object(o["a"])(s,a,i,!1,null,null,null);e["a"]=c.exports},"7b5b":function(t,e,r){"use strict";r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b");var a=r("2fe6"),i=r("2f62");function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){Object(a["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}e["a"]={data:function(){return{partnerInfoLoading:!0}},computed:s({},Object(i["c"])("partner_info",["partner_info"]),{},Object(i["c"])("partner_info",{partnerInfoLoadingGetter:"loading"})),methods:s({},Object(i["b"])("partner_info",["requestPartnerInfo"]),{loadPartnerInfo:function(){var t=this;return this.requestPartnerInfo().then((function(e){e&&(t.partnerInfoLoading=!1)}))}}),serverPrefetch:function(){this.loadPartnerInfo()},mounted:function(){this.loadPartnerInfo()},watch:{partnerInfoLoadingGetter:function(t){!1===t&&(this.partnerInfoLoading=!1)}}}},8614:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.loadingSettings&&t.client?r("div",{staticClass:"w-100 d-flex align-items-center justify-content-center"},[r("Spinner",{attrs:{size:"25px","border-width":"5px"}})],1):t.ad.wantEmail()?r("u-button",{attrs:{color:"accent",full:t.full},on:{click:function(e){return t.emailUser()}}},[t._v("Email")]):t._e()},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("ac1f"),r("5319"),r("159b"),r("2fe6")),s=r("2f62"),o=r("3fba"),c=r("2375"),l=r("ac81");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h={mixins:[l["a"]],components:{Spinner:c["a"]},props:{ad:{type:Object,required:!0},full:{type:Boolean,default:!1}},mounted:function(){this.$route.query.email&&this.setEmailUserStatus({payload:!0})},computed:u({},Object(s["c"])("user",["hasPermissions","loadingSettings"]),{},Object(s["c"])("client",["authenticated"])),methods:u({},Object(s["b"])("user",["settingRequest"]),{},Object(s["b"])("drawer",["showLogin","showEmailAd"]),{emailUser:function(){var t=this;if(this.authenticated)this.hasPermissions?this.showEmailAd():this.settingRequest().then((function(){t.hasPermissions?t.showEmailAd():t.$reusable.toast_alert(o["ab"],o["cb"].error.activate_email)})).catch((function(e){t.$reusable.toast_alert(o["ab"],o["cb"].error.server)})).then((function(){}));else{var e={};e[o["W"].info]=o["X"].emailAd;var r=u({},this.$route,{},{hash:"#auth",query:e});this.$router.replace(r),this.showLogin()}}})},f=h,p=r("2877"),b=Object(p["a"])(f,a,i,!1,null,null,null);e["default"]=b.exports},"894b":function(t,e,r){"use strict";var a=r("a8f9"),i=r.n(a);i.a},"8b56":function(t,e,r){},"8f05":function(t,e,r){},"96ee":function(t,e,r){"use strict";var a=r("1175"),i=r.n(a);i.a},"983d":function(t,e,r){"use strict";var a=r("f78f"),i=r("a97c"),n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("u-button",{attrs:{icon:"",color:"transparent"}},[r("u-icon",{staticClass:"bg-transparent mx-auto",attrs:{icon:"rocket",color:"secondary"}})],1)],1)},s=[],o={},c=o,l=r("2877"),d=Object(l["a"])(c,n,s,!1,null,null,null),u=d.exports,h=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"d-flex flex-wrap"},[t.showHome?[r("router-link",{attrs:{to:"/"}},[t._v("Home")]),r("span",{staticClass:"mx-1"},[t._v("›")])]:t._e(),t._l(t.categories,(function(e,a){return[r("router-link",{key:e.category_code,class:{"text-600":t.categories.length-1==a&&t.boldLast},attrs:{to:t.toCategory(e.getCode())}},[t._v(t._s(e.getShortTitle()))]),a<t.categories.length-1?r("span",{key:a,staticClass:"mx-1"},[t._v("›")]):t._e()]}))],2)},f=[],p=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),b=r("2f62"),g=r("d046"),v=r("ad5c"),m=r("3fba");function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){Object(p["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var O={props:{category:{type:String},showHome:{type:Boolean,default:!1},boldLast:{type:Boolean,default:!1}},methods:{toCategory:function(t){return g["N"].browse({category:t})}},computed:w({},Object(b["c"])("category",{getTreeByCode:"categories"}),{categories:function(){return this.category==m["o"].all?[new v["e"]({category_title:"Latest Ads",category_code:m["o"].all,short_title:"Latest",children:this.stuffTree})]:this.getTreeByCode(this.category)}})},j=O,x=Object(l["a"])(j,h,f,!1,null,null,null),_=x.exports,C=r("9e9a"),P=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("u-button",{staticClass:"share-ad-button",attrs:{icon:"",color:"transparent"},on:{click:t.share}},[r("transition",{attrs:{name:"center-scale"}},[r("u-icon",{staticClass:"bg-transparent mx-auto",attrs:{icon:"u-share",color:"grey"}})],1)],1)},k=[],S={data:function(){return{}},props:{ad:{type:Object,required:!0}},mounted:function(){},computed:{},methods:{share:function(){this.$emit("share-ad",this.ad)}}},D=S,E=(r("6341"),Object(l["a"])(D,P,k,!1,null,null,null)),A=E.exports,$=r("e326"),T=r("8614"),L=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t.icon?r("u-button",{staticClass:"ml-2",attrs:{icon:"",color:"primary"},on:{click:function(e){return t.showFilter()}}},[r("u-icon",{attrs:{icon:"u-filter",color:"white"}})],1):r("div",{staticClass:"d-flex align-items-center justify-content-start"},[r("div",{staticClass:"mr-4",class:t.textClass,on:{click:function(e){return t.showFilter()}}},[t._v(" Filter "),r("u-icon",{attrs:{icon:"u-filter",size:"1.5rem"}})],1),r("div",{class:t.textClass,on:{click:function(e){return t.showSort()}}},[t._v(" Sort "),r("u-icon",{attrs:{icon:"u-sort",size:"1.5rem"}})],1)])],1)},I=[];function R(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?R(Object(r),!0).forEach((function(e){Object(p["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var B={props:{icon:{type:Boolean,default:!1}},computed:{textClass:function(){return"d-flex bg-light-grey rounded p-2 justify-content-between align-items-center col-3 cursor-pointer"}},methods:N({},Object(b["b"])("drawer",["showFilter","showSort"]))},F=B,z=Object(l["a"])(F,L,I,!1,null,null,null),U=z.exports;r.d(e,"d",(function(){return a["default"]})),r.d(e,"g",(function(){return i["default"]})),r.d(e,"a",(function(){return u})),r.d(e,"b",(function(){return _})),r.d(e,"f",(function(){return $["default"]})),r.d(e,"c",(function(){return T["default"]})),r.d(e,"i",(function(){return C["a"]})),r.d(e,"e",(function(){return U})),r.d(e,"h",(function(){return A}))},"99b3":function(t,e,r){"use strict";var a=r("eae2"),i=r.n(a);i.a},"9c5a":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container"},[r("div",{staticClass:"row align-items-center justify-content-center adlist-nav bg-primary rounded w-100 d-none d-lg-flex"},[r("div",{staticClass:"col-auto"},[t.fromAnAdlist?r("span",{staticClass:"adview-header-nav pointer p-3 d-block text-white text-uppercase text-600 text-xs border-right border-white rounded-left",on:{click:function(e){return t.toBack()}}},[t._v("Back to listings")]):r("router-link",{staticClass:"adview-header-nav pointer p-3 d-block text-white text-uppercase text-600 text-xs border-right border-white rounded-left",attrs:{to:t.toCategoryListing()}},[t._v("Back to listings")])],1),r("div",{staticClass:"col"}),r("div",{staticClass:"text-right",attrs:{size:"auto"}},[t.photoGalleryTitleSuffix.length?r("router-link",{staticClass:"adview-header-nav pointer p-3 d-block text-white text-uppercase text-600 text-xs border-left border-white rounded-right",attrs:{to:t.toAdView()}},[t._v("Back to ad description")]):r("u-menu",{model:{value:t.share,callback:function(e){t.share=e},expression:"share"}},[r("span",{staticClass:"px-9 py-3 pointer d-block text-white text-uppercase text-600 text-xs border-left border-white rounded-right",attrs:{slot:"activator"},on:{click:function(e){t.share=!t.share}},slot:"activator"},[t._v("Share")]),r("div",{staticClass:"row flex-column rounded bg-light-grey shadow p-2 align-items-center"},[r("Share",{attrs:{ad:t.ad,icon:""}})],1)])],1)]),r("div",{staticClass:"row justify-content-bcetween align-items-center w-100"},[r("div",{staticClass:"col-auto d-none d-lg-block mr-2"},[t.photoGalleryTitleSuffix.length?t._e():r("favourite-button",{attrs:{ad:t.ad.getId()}})],1),r("div",{staticClass:"col h4 mb-0"},[t.photoGalleryTitleSuffix.length?r("span",{domProps:{innerHTML:t._s(t.ad.getFullTitle()+t.photoGalleryTitleSuffix)}}):r("span",{domProps:{innerHTML:t._s(t.ad.getFullTitle())}})]),r("div",{staticClass:"col-auto ml-3 py-3 d-none d-lg-flex"},[r("report-ad-button",{attrs:{ad:t.ad}})],1)])])},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("caad"),r("b0c0"),r("e439"),r("dbb4"),r("b64b"),r("2532"),r("159b"),r("2fe6")),s=r("983d"),o=r("17a4"),c=r("d046"),l=r("2f62");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h={data:function(){return{share:!1}},components:{FavouriteButton:s["d"],ReportAdButton:s["g"],Share:o["default"]},props:{ad:{type:Object,required:!0},back:{type:Object,default:function(){return{}}},photoGalleryTitleSuffix:{type:String,default:""}},mounted:function(){},methods:{toBack:function(){var t=-1;""!=this.photoGalleryTitleSuffix&&(t=-2),this.$router.go(t)},toCategoryListing:function(){return c["N"].browse({category:this.ad.getPostedCategory()})},toAdView:function(){return c["N"].adview({ad:this.ad,category:this.ad.getPostedCategory()})}},computed:u({},Object(l["c"])("region",["site"]),{fromAnAdlist:function(){return[c["J"].browse,c["J"].browse_listing].includes(this.back.name)||[c["J"].public_profile,c["J"].dashboard,c["J"].my_ads].includes(this.back.name)},getPhotoGalleryTitleSuffix:function(){return this.photoGalleryTitleSuffix}})},f=h,p=(r("64b0"),r("2877")),b=Object(p["a"])(f,a,i,!1,null,null,null),g=b.exports,v=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"usedad-view-photos"}},[t.hasPhotos?r("div",{staticClass:"row justify-content-center align-items-center position-relative"},[r("div",{staticClass:"col-12"},[r("div",{ref:"photos",staticClass:"row d-flex align-items-center flex-nowrap bg-light-grey",staticStyle:{overflow:"hidden"},on:{touchstart:t.startSwipe,touchmove:t.swiping,touchend:t.endSwipe}},t._l(t.data,(function(e,a){return r("div",{key:a,staticClass:"adview-photos col-12 d-flex align-items-center flex-nowrap position-relative",class:{"adview-photos-transition":!t.dragging},style:{transform:"translateX("+t.photoPos+"px)"}},[r("router-link",{staticClass:"d-block mx-auto",attrs:{to:t.to(a),draggable:"false",title:"Photo "+(a+1)}},[r("img",{directives:[{name:"show",rawName:"v-show",value:t.photoReady[a],expression:"photoReady[i]"}],class:{"d-block":t.photoReady[a]},staticStyle:{width:"auto",height:"auto",margin:"0 auto"},style:{"max-width":t.maxWidth+"px","max-height":t.maxHeight+"px"},attrs:{src:e.getPhoto(t.size),draggable:"false",alt:t.ad.getTitle()+" image "+(a+1),itemprop:"image"},on:{load:function(e){return t.imgLoad(a,t.photoReady)},error:function(e){return t.imgError(a,t.photoReady,e)}}}),t.photoReady[a]?t._e():r("div",{staticClass:"adview-photos-placeholder",style:{width:t.adviewPhotoPlaceholderSize+"px",height:t.adviewPhotoPlaceholderSize+"px"}},[r("spinner",{attrs:{size:"50%"}})],1)])],1)})),0)])]):t._e(),r("div",{staticClass:"px-4 px-lg-0 row ",class:t.ad.hasPhotos()?"justify-content-around":"justify-content-end",attrs:{id:"photo-nav-and-action"}},[r("div",{staticClass:"col-auto"},[r("ReportAdButton",{attrs:{ad:t.ad}})],1),t.ad.hasPhotos()?r("div",{staticClass:"col d-flex align-items-center justify-content-center"},[t.data.length>1?[r("u-button",{attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.prevImage()}}},[r("u-icon",{attrs:{icon:"chevron-right",direction:"left",color:"grey"}})],1),t._l(t.data,(function(e,a){return r("div",{key:a,staticClass:"rounded-circle mx-2",class:a==-t.activeIndicator?"bg-secondary":"bg-primary",staticStyle:{width:"0.7rem",height:"0.7rem"},on:{mouseover:function(e){return t.setDisplayPhoto(a)}}})})),r("u-button",{attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.nextImage()}}},[r("u-icon",{attrs:{icon:"chevron-right",color:"grey"}})],1)]:t._e()],2):t._e(),r("div",{staticClass:"col-auto d-flex justify-content-end align-items-center"},[r("favourite-button",{staticClass:"mx-2",attrs:{ad:t.ad.getId()}}),r("u-menu",{model:{value:t.share,callback:function(e){t.share=e},expression:"share"}},[r("u-button",{attrs:{slot:"activator",icon:"",color:"transparent"},on:{click:function(e){t.share=!t.share}},slot:"activator"},[r("u-icon",{attrs:{icon:"u-share",color:"grey"}})],1),r("div",{staticClass:"row flex-column rounded bg-light-grey shadow p-2 align-items-center"},[r("div",[r("Share",{attrs:{ad:t.ad,icon:""}})],1)])],1)],1)]),(t.data.length,t._e())])},m=[],y=(r("d81d"),r("a434"),r("0d03"),r("2375"));function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function O(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?w(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var j={name:"Photos",data:function(){return{size:614,tnSize:114,swipeStart:null,swipePos:null,difference:100,dragging:!1,photoPos:0,swipeLeft:null,maxWidth:0,maxHeight:425,activeIndicator:0,photoReady:[],thumbnailReady:[],share:!1}},components:{Spinner:y["a"],ReportAdButton:s["g"],FavouriteButton:s["d"],Share:o["default"]},mounted:function(){this.maxWidth=this.$refs.photos?this.$refs.photos.clientWidth:0},created:function(){this.photoReady=this.data.map((function(t,e){return!0})),this.thumbnailReady=this.data.map((function(t,e){return!0}))},props:{data:{type:Array,default:function(){return[]}}},methods:{getEventXValue:function(t){var e=null;if(["mousedown","mouseup","mousemove"].includes(t.type))e=t.x;else if(["touchstart","touchend","touchmove"].includes(t.type)){var r=t.targetTouches[0]||t.changedTouches[0];e=r.clientX}return e},isSwipeLeft:function(t){return this.swipePos-t>10},isSwipeRight:function(t){return this.swipePos-t<-10},startSwipe:function(t){this.dragging=!0,this.swipePos=this.getEventXValue(t)},swiping:function(t){if(this.dragging){var e=this.getEventXValue(t),r=this.$refs.photos?this.$refs.photos.clientWidth:0;this.photoPos=r*this.activeIndicator+-1*(this.swipePos-e)}},endSwipe:function(t){var e=this.getEventXValue(t);this.isSwipeLeft(e)?this.activeIndicator--:this.isSwipeRight(e)&&this.activeIndicator++,this.activeIndicator>0&&(this.activeIndicator=0),this.activeIndicator<=-this.data.length&&this.activeIndicator++,this.setDisplayPhoto(),this.swipePos=null,this.dragging=!1},stopSwiping:function(t){this.swipePos=null,this.dragging=!1},setDisplayPhoto:function(t){void 0!=t&&(this.activeIndicator=-t);var e=this.$refs.photos?this.$refs.photos.clientWidth:0;this.maxWidth=e,this.photoPos=e*this.activeIndicator},nextImage:function(){this.activeIndicator--,this.checkIndicator(),this.setDisplayPhoto()},prevImage:function(){this.activeIndicator++,this.checkIndicator(),this.setDisplayPhoto()},checkIndicator:function(){this.activeIndicator>0&&(this.activeIndicator=-(this.data.length-1)),this.activeIndicator<=-this.data.length&&(this.activeIndicator=0)},to:function(t){return this.$viewport.mobile?"":c["N"].adview({ad:this.ad,view_gallery:!0,initial_pos:t})},imgError:function(t,e,r){e.splice(t,1,!1),setTimeout((function(){r.target.src+="#"+(new Date).getTime()}),3e3)},imgLoad:function(t,e){e.splice(t,1,!0)}},computed:O({},Object(l["c"])("ad",["ad"]),{},Object(l["c"])("region",["site"]),{hasPhotos:function(){return this.data.length>0},adviewPhotoPlaceholderSize:function(){return this.maxWidth>this.maxHeight?this.maxHeight:this.maxWidth}}),watch:{$viewport:function(){this.setDisplayPhoto()},data:function(t){this.photoReady=this.data.map((function(t,e){return!0})),this.thumbnailReady=this.data.map((function(t,e){return!0}))}}},x=j,_=(r("1f0f"),Object(p["a"])(x,v,m,!1,null,null,null)),C=_.exports,P=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container rounded bg-light-grey"},[r("div",{staticClass:"row h6 mb-0 px-4 py-2 text-400 bg-primary rounded-top d-none d-lg-flex"},[t._v("Contact User")]),r("div",{staticClass:"row mb-3 p-3"},[r("div",{staticClass:"col-auto"},[r("router-link",{attrs:{to:t.toUser()}},[r("img",{staticClass:"rounded",staticStyle:{width:"90px"},attrs:{src:t.ad.user.getPhotoURL(),alt:t.ad.user.getUserHandle()+" profile photo"}})])],1),r("div",{staticClass:"col rounded bg-white p-2 ml-3 text-sm"},[r("ul",[r("li",{staticClass:"d-flex justify-content-between align-items-end",staticStyle:{"word-break":"break-word"}},[t.ad.hasUser()?r("router-link",{attrs:{to:t.toUser()}},[t._v(t._s(t.ad.getUserHandle()))]):t._e(),t.ad.hasUser()?r("FavouriteButton",{attrs:{seller:t.ad.user.getId()}}):t._e()],1),r("li",[r("span",{staticClass:"text-700"},[t._v(t._s(t.adLocation()))]),t.ad.canShowOnMap()?[t._v(" - "),r("router-link",{attrs:{to:"#map"},nativeOn:{click:function(e){return e.preventDefault(),t.goToMap()}}},[t._v("map")])]:t._e()],2),"NOT SOLD"==t.ad.status?r("li",[t._v(" Phone: "),r("PhoneAdButton",{staticClass:"d-sm-inline",attrs:{ad:t.ad,"as-link":""}})],1):t._e()])]),t.ad.wantEmail()&&"NOT SOLD"==t.ad.status?r("EmailAdButton",{staticClass:"mt-3",attrs:{full:"",ad:t.ad}}):t._e(),t.vpdLink?r("a",{staticClass:"mt-3 btn-full btn btn-accent d-flex align-items-center justify-content-center",attrs:{id:"vpd-link",href:t.ad.getUrl(),target:"_blank"}},[t._v(" "+t._s(t.vpdLink)+" ")]):t._e()],1),r("div",{staticClass:"row align-items-center justify-content-between bg-white shadow-top py-4 px-8 d-flex d-lg-none",attrs:{id:"contact-seller-bar"}},[r("div",{staticClass:"col px-4 d-flex align-items-center justify-content-start"},[r("favourite-button",{staticClass:"mr-8",attrs:{ad:t.ad.getId()}}),t.canShare?r("u-button",{attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.shareAd()}}},[r("u-icon",{attrs:{icon:"share-android",color:"grey"}})],1):r("u-menu",{model:{value:t.share,callback:function(e){t.share=e},expression:"share"}},[r("u-button",{attrs:{slot:"activator",icon:"",color:"transparent"},on:{click:function(e){t.share=!t.share}},slot:"activator"},[r("u-icon",{attrs:{icon:"share-android",color:"grey"}})],1),r("div",{staticClass:"row flex-column rounded bg-light-grey shadow p-2 align-items-center"},[r("div",[r("Share",{attrs:{ad:t.ad,icon:""}})],1)])],1)],1),r("div",{staticClass:"col text-center"},[t.ad.wantEmail()?r("email-user-link",{attrs:{ad:t.ad}}):t._e(),t.ad.hasPhone()?r("div",{staticClass:"pt-2",staticStyle:{"white-space":"nowrap"}},[t._v(" Phone: "),r("a",{attrs:{href:"tel:"+t.ad.getPhoneDigits()}},[t._v(t._s(t.ad.getPhone()))])]):t._e()],1),r("div",{staticClass:"col text-right"},[r("ReportAdButton",{attrs:{ad:t.ad}})],1)])])},k=[],S=(r("99af"),r("c975"),r("d3b7"),r("9911"),r("7b5b"));function D(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?D(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var A=function(){return Promise.resolve().then(r.bind(null,"f78f"))},$=function(){return Promise.resolve().then(r.bind(null,"a97c"))},T=function(){return Promise.resolve().then(r.bind(null,"8614"))},L=function(){return Promise.resolve().then(r.bind(null,"e326"))},I=function(){return Promise.resolve().then(r.bind(null,"17a4"))},R={components:{FavouriteButton:A,EmailAdButton:T,Share:I,ReportAdButton:$,PhoneAdButton:L},mixins:[S["a"]],data:function(){return{share:!1,canShare:!1,phoneNumIsVisible:!1}},props:{ad:{type:Object,required:!0}},mounted:function(){this.canShare="share"in navigator,this.isSafariDesktop&&(this.canShare=!1)},methods:{toUser:function(){return c["N"].user({user:this.ad.user.getHandle()})},goToMap:function(){var t=document.getElementById("map");t.scrollIntoView({behavior:"smooth"})},shareAd:function(){var t={title:this.ad.getFullTitle(),text:this.ad.getDescription(),url:"".concat(this.hostname).concat(this.ad.getCanonicalPath())};navigator.share(t).catch((function(t){console.log("error sharing",t)}))},adLocation:function(){try{var t=this.ad.getSmallestRegion();if(t)return this.getRegionByCode(t).getName();throw"Could not resolve region code: "+this.ad.getSmallestRegion()+" for ad "+this.ad.getId()}catch(e){return""}}},computed:E({},Object(l["c"])("region",["getRegionByCode"]),{},Object(l["c"])("client",["hostname"]),{isSafariDesktop:function(){var t=window.navigator.vendor,e=window.navigator.userAgent.toLowerCase();return t.indexOf("Apple")>-1&&e&&-1==e.indexOf("ipad")&&-1==e.indexOf("iphone")},vpdLink:function(){if(this.ad.isPartnerAd()&&null!=this.ad.getUrl()&&!this.partnerInfoLoading){var t=this.partner_info(this.ad.partner).adview,e=this.ad.getCategoryLevel1();return t.link&&t.link[e]}return!1}})},N=R,B=(r("04b3"),Object(p["a"])(N,P,k,!1,null,null,null)),F=B.exports,z=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"row flex-column",attrs:{itemprop:"offers",itemscope:"",itemtype:"http://schema.org/Offer"}},[t.ad.getPrice()?r("meta",{attrs:{itemprop:"price",content:t.ad.getPrice()}}):t._e(),r("meta",{attrs:{itemprop:"itemOffered",content:t.ad.getTitle()}}),r("meta",{attrs:{itemprop:"priceCurrency",content:"CAD"}}),r("div",{staticClass:"col d-flex",class:t.ad.canShowOnMap()?"border-top pt-4":""},[r("div",{staticClass:"col-8"},[t._l(t.details,(function(e,a){return[e.show?r("div",{key:a,staticClass:"row align-items-center"},[r("u-icon",{attrs:{icon:e.icon,color:"grey",size:"1rem"}}),r("div",{staticClass:"col-9 text-sm ml-2 py-1"},["website"==e.label.toLowerCase()?r("span",[r("a",{staticStyle:{display:"block","white-space":"break-spaces",overflow:"hidden","text-overflow":"ellipsis"},attrs:{target:"_blank",href:e.value.href},on:{click:t.adUrlClicked}},[t._v(t._s(e.value.host))])]):r("span",{attrs:{itemprop:e.itemProp}},[t._v(t._s(e.value))])])],1):t._e()]})),r("div",{staticClass:"row align-items-center"},[r("u-icon",{attrs:{icon:"u-views",color:"grey",size:"1rem"}}),r("div",{staticClass:"col-9 text-sm ml-2 py-1"},[t._v(" "+t._s(t.ad.views_total)+" ")])],1)],2),t.ad.isLive()?r("div",{staticClass:"col-4 d-flex flex-column align-items-end justify-content-center"},[t.ad.wantEmail()?r("EmailAdButton",{attrs:{ad:t.ad,full:""}}):t._e(),t.ad.hasPhone()?r("PhoneAdButton",{staticClass:"mt-4",attrs:{ad:t.ad,full:""}}):t._e()],1):t._e()]),r("div",{staticClass:"row mb-4 p-3 bg-white rounded d-block",staticStyle:{overflow:"hidden"}},[t.ad.hasAttributes()?r("div",{staticClass:"col-auto mb-3 ml-3",staticStyle:{float:"right","min-width":"225px"}},[r("ul",[t._l(t.ad.getAttributes(),(function(e){return["Dates"==e.name?t._l(e.value,(function(a){return r("li",{key:a,staticClass:"d-flex align-items-center"},[r("span",{staticClass:"text-xs text-700 text-uppercase text-right",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(t.generateDateTitle(a,e.value)))]),r("span",{staticClass:"text-sm border-left ml-3 pl-3 col-auto",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(a.split("T")[0]))])])})):[e.display.atlas?r("li",{key:e.attr_id,staticClass:"d-flex align-items-center"},[r("span",{staticClass:"text-xs text-700 text-uppercase text-right",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(e.name))]),r("span",{staticClass:"text-sm border-left ml-3 pl-3 col-auto",staticStyle:{flex:"0 0 50%"}},[t._v(t._s(t.resolveValue(e.name,e.value)))])]):t._e()]]}))],2)]):t._e()])])},U=[],M=r("3d24"),W=r("40fe");function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function H(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var V={components:{EmailAdButton:s["c"],PhoneAdButton:s["f"]},mixins:[W["a"]],props:{ad:{type:Object,required:!0}},methods:{adUrlClicked:function(t){Object(M["Q"])({used_ad_id:this.ad.used_ad_id,event_type:"ad_url_clicked",region:this.site.getCode()}).catch((function(t){console.log("ad_url_clicked event error",t)}))},resolveValue:function(t,e){var r=t.toLowerCase(),a="pets"==r||"smoking"==r;return a?e?"Yes":"No":e},adLocation:function(){try{var t=this.ad.getSmallestRegion();if(t)return this.getRegionByCode(t).getName();throw"Could not resolve region code: "+this.ad.getSmallestRegion()+" for ad "+this.ad.getId()}catch(e){return""}},generateDateTitle:function(t,e){return t==e[0]?"Dates:":""}},computed:H({},Object(l["c"])("region",["site","getRegionByCode"]),{details:function(){return[{label:"Ad #",value:this.ad.used_ad_id,show:!0,icon:"u-hashtag",itemProp:"sku"},{label:"Posted",value:this.ad.getTimePosted(),show:!0,icon:"u-date"},{label:"Location",value:this.adLocation(),show:!0,icon:"u-location",itemProp:"eligibleRegion"},{label:"Website",value:this.ad.getWebsite(),show:this.ad.getWebsite(),icon:"u-url",itemProp:"availability"}]}})},G=V,X=Object(p["a"])(G,z,U,!1,null,null,null),J=X.exports,Z=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"row align-items-center"},[r("router-link",{attrs:{to:t.toUser()}},[r("img",{staticClass:"rounded",staticStyle:{width:"60px"},attrs:{src:t.ad.user.getPhotoURL(),alt:t.ad.user.getHandle()+" user image"}})]),r("router-link",{staticClass:"ml-4",attrs:{to:t.toUser()}},[t._v(" "+t._s(t.ad.getUserHandle())+" ")])],1)},Q=[],Y={props:{ad:{type:Object,required:!1}},methods:{toUser:function(){return c["N"].user({user:this.ad.user.getHandle()})}}},K=Y,tt=Object(p["a"])(K,Z,Q,!1,null,null,null),et=tt.exports,rt=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"d-flex justify-content-between align-items-center"},[r("div",{staticClass:"text-black",class:{"text-overflow":t.noWrap}},[t.ad.hasPrice()?r("span",{staticClass:"text-700"},[t._v(t._s(t.ad.getPrice())+" · ")]):t._e(),r("span",{attrs:{itemprop:"name"}},[t._v(t._s(t.ad.getTitle()))])])])},at=[],it={props:{ad:{type:Object,required:!0},noWrap:{type:Boolean,default:!1}}},nt=it,st=Object(p["a"])(nt,rt,at,!1,null,null,null),ot=st.exports,ct=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticStyle:{"white-space":"pre-line","word-break":"break-word"},attrs:{itemprop:"description"}},[t._l(t.formatAdDescription(t.ad.getDescription()),(function(e,a){return[e.isHashtag?r("router-link",{key:a,attrs:{to:t.toLink(e.word)}},[t._v(t._s(e.word+" "))]):[t._v(t._s(e.word+" "))]]}))],2)},lt=[];r("e01a"),r("d28b"),r("ac1f"),r("3ca3"),r("841c"),r("1276"),r("ddb0");function dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function ut(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?dt(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var ht={props:{ad:{type:Object,required:!0}},methods:{formatAdDescription:function(t){var e=/^#[^ !@#$%^&*(),.?":{}|<>][\w+]*$/i,r=t.split(/(\r?\n|\s+)/).filter((function(t){return 0!==t.length&&" "!==t})),a=[],i=!0,n=!1,s=void 0;try{for(var o,c=r[Symbol.iterator]();!(i=(o=c.next()).done);i=!0){var l=o.value;a.push({word:l,isHashtag:e.test(l)})}}catch(d){n=!0,s=d}finally{try{i||null==c.return||c.return()}finally{if(n)throw s}}return a},toLink:function(t){return{path:"/all",query:{q:t,r:this.search.region.length?this.search.region:this.site.getCode()}}}},computed:ut({},Object(l["c"])("region",["site"]),{},Object(l["c"])("client",["search"]))},ft=ht,pt=Object(p["a"])(ft,ct,lt,!1,null,null,null),bt=pt.exports;r.d(e,"d",(function(){return g})),r.d(e,"f",(function(){return ot})),r.d(e,"b",(function(){return bt})),r.d(e,"e",(function(){return C})),r.d(e,"a",(function(){return F})),r.d(e,"c",(function(){return J})),r.d(e,"g",(function(){return et}))},"9dbe":function(t,e,r){"use strict";var a=r("a43d"),i=r.n(a);i.a},"9e9a":function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ShareNetwork",{staticClass:"text-sm text-white text-700 text-uppercase d-flex align-items-center text-center pointer",class:{"rounded justify-content-between px-2 ":!t.icon,"rounded-circle justify-content-center share-icon":t.icon,"bg-primary":"email"==t.network,"facebook-color":"facebook"==t.network,"pinterest-color":"pinterest"==t.network,"twitter-color":"twitter"==t.network},attrs:{network:t.network,url:t.url,title:t.ad.getFullTitle(),description:t.ad.getDescription(),media:t.ad.getDisplayPhoto(614),hashtags:"usedca"}},[r("u-icon",{staticClass:"col-auto my-2",attrs:{icon:t.getIcon,size:"1.3rem",color:"white"}}),t.icon?t._e():r("span",{staticClass:"col text-capitalize"},[t._v(t._s(t.network))]),t.icon?t._e():r("span",{staticClass:"col-auto"})],1)},i=[],n=(r("a4d3"),r("99af"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("ad5c"),o=r("2f62");function c(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d={props:{ad:{type:Object,default:new s["n"]},icon:{type:Boolean,default:!1},network:{type:String,required:!0}},computed:l({},Object(o["c"])("client",["hostname"]),{url:function(){return"".concat(this.hostname).concat(this.ad.getCanonicalPath())},getIcon:function(){switch(this.network){case"facebook":return"facebook";case"pinterest":return"pinterest";case"twitter":return"twitter";case"email":return"mail";default:return"exclamation"}}})},u=d,h=(r("63ee"),r("2877")),f=Object(h["a"])(u,a,i,!1,null,null,null);e["a"]=f.exports},"9f1a":function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("base-container",{directives:[{name:"show",rawName:"v-show",value:t.newsLength>0&&!t.loading,expression:"newsLength > 0 && !loading"}],attrs:{title:"Usedful News"}},[r("div",{staticStyle:{position:"relative"}},[r("div",{staticClass:"row align-items-center justify-content-center news-nav w-100 h-100"},[r("div",{staticClass:"col col-auto"},[t.showBack?r("u-button",{staticClass:"p-0 rounded-circle",staticStyle:{width:"4rem",height:"4rem"},attrs:{color:"transparent"},on:{click:t.back}},[r("u-icon",{attrs:{icon:"chevron",color:"primary",direction:"left"}})],1):t._e()],1),r("div",{staticClass:"col col-auto"},[t.showNext?r("u-button",{staticClass:"p-0 rounded-circle",staticStyle:{width:"4rem",height:"4rem"},attrs:{color:"transparent"},on:{click:t.next}},[r("u-icon",{attrs:{icon:"chevron",color:"primary",direction:"right"}})],1):t._e()],1)]),r("div",{ref:"carousel",staticClass:"news-carousel mx-4 py-4",staticStyle:{overflow:"hidden"}},[r("div",{ref:"wrapper",staticClass:"row wrapper",staticStyle:{"flex-wrap":"nowrap"}},t._l(t.news,(function(e,a){return r("news-item",{key:a,ref:"items",refInFor:!0,staticClass:"px-2",class:t.colClasses,attrs:{title:e.title,to:e.routePath,image:e.carouselImage}})})),1)])])])},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("a15b"),r("d81d"),r("fb6a"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("7b04"),o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"col position-relative"},[r("img",{staticClass:"rounded d-block w-100",attrs:{src:t.image,alt:t.title+" image"}}),r("router-link",{staticClass:"link-content d-block text-700 text-sm",attrs:{to:t.to}},[t._v(t._s(t.title))])],1)},c=[],l={props:{title:String,image:String,to:Object}},d=l,u=r("2877"),h=Object(u["a"])(d,o,c,!1,null,null,null),f=h.exports,p=r("2f62"),b=r("5b6f"),g=r("3fba");function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var y=9,w={components:{BaseContainer:s["a"],NewsItem:f},mixins:[b["a"]],props:{displayCounts:{type:Object,default:function(){return{xs:2,md:3}}},category:{type:String},stored:{type:Boolean,default:!1}},data:function(){return{itemWidth:0,index:0,loading:!1,displayCount:1}},serverPrefetch:function(){return this.loadNews(!1)},mounted:function(){this.loadNews(),this.$nextTick((function(){window.addEventListener("resize",this.setItemWidth)}))},destroyed:function(){window.removeEventListener("resize",this.setItemWidth)},methods:{loadNews:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.loading=!0,this.requestNews({regions:this.allNewsRegions,category:this.newsCategory,stored:this.stored}).then((function(){t.loading=!1,t.$nextTick((function(){e&&this.setItemWidth()}))}))},next:function(){this.index>this.displayCount-this.newsLength&&this.index--},back:function(){this.index<0&&this.index++},setItemWidth:function(){this.$refs.items&&this.$refs.items.length>0?(this.itemWidth=this.$refs.items[0].$el.offsetWidth,this.displayCount=Math.round(this.$refs.carousel.offsetWidth/this.itemWidth)):(this.itemWidth=0,this.displayCount=1)}},computed:m({},Object(p["c"])("category",{getCategoryTreeByCode:"categories"}),{showBack:function(){return this.index<0},showNext:function(){return this.index>this.displayCount-this.newsLength},newsLength:function(){return this.news.length},news:function(){return this.storedNews({regionsKey:this.allNewsRegionsKey,categoriesKey:this.newsCategory?this.newsCategory.join("."):this.newsCategory}).slice(0,y)},newsCategory:function(){var t=this.getCategoryTreeByCode(this.category);if(0!=t.length)return[t[0].category_code,g["lb"].all_category]},colClasses:function(){var t=this;return Object.keys(this.displayCounts).map((function(e){return"col-"+("xs"==e?"":e+"-")+12/t.displayCounts[e]})).join(" ")}}),watch:{index:function(t){this.$refs.wrapper.style.transform="translate(".concat(t*this.itemWidth,"px)")},siteRegion:function(t,e){this.index=0,this.loadNews()},newsCategory:function(t,e){this.index=0,this.loadNews()}}},O=w,j=(r("adee"),Object(u["a"])(O,a,i,!1,null,null,null));e["default"]=j.exports},a0be:function(t,e,r){"use strict";var a,i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:{"map-disable":t.mapDisable},attrs:{id:"used-map"}},[t.controls?r("div",{staticClass:"used-map-control position-absolute",staticStyle:{"z-index":"3",top:"0.5rem",right:"0.5rem"}},[r("u-switch",{staticClass:"shadow",attrs:{size:"1.2"},model:{value:t.mapDisable,callback:function(e){t.mapDisable=e},expression:"mapDisable"}}),r("transition",{attrs:{name:"fade"}},[r("span",{directives:[{name:"show",rawName:"v-show",value:t.mapDisable,expression:"mapDisable"}],staticClass:"bg-white p-1 mt-1 rounded text-xs text-700 text-uppercase position-absolute text-center"},[t._v("Map Locked")])])],1):t._e(),r("l-map",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:{callback:t.invalidateSize},expression:"{\n      callback: invalidateSize,\n    }"}],ref:"map",staticStyle:{"z-index":"0"},attrs:{zoom:t.mapZoom,center:t.center,options:{zoomControl:!1},minZoom:parseInt(t.minZoom),maxZoom:parseInt(t.maxZoom),"max-bounds":t.mapMaxBounds},on:{click:function(e){return t.mapClicked(e)},move:t.mapEventMove,"update:center":t.mapEventUpdate,ready:t.invalidateSize}},[t.mapDisable?t._e():r("l-control-zoom",{attrs:{position:"topleft"}}),r("l-tile-layer",{attrs:{url:t.mapLayer}}),t.radius>0?r("l-circle",{attrs:{radius:1e3*t.radius,color:t.mapCircle.color,fillColor:t.mapCircle.color,"lat-lng":t.mapCircle.center}}):t._e(),t.marker?r("l-marker",{attrs:{"lat-lng":t.markerCenter}},[r("l-icon",{attrs:{"icon-size":t.icon.size,"icon-url":t.icon.url,"shadow-url":t.icon.shadow}})],1):t._e()],1)],1)},n=[],s=(r("d81d"),r("a9e3"),r("acd8"),r("e25e"),"undefined"!==typeof window);s&&(a=r("e11e"));var o={props:{center:{type:Array,default:function(){return[48.4919,-123.4168]}},radius:{type:[String,Number],default:0},zoom:{type:[String,Number],default:12},maxZoom:{type:[String,Number],default:18},minZoom:{type:[String,Number],default:0},circle:{type:Boolean,default:!1},marker:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},controls:{type:Boolean,default:!1}},mounted:function(){this.mapDisable=this.disable,this.invalidateSize()},data:function(){return{mapCircle:{color:"#4f2984",center:this.center},markerCenter:this.center,mapLayer:"https://map.used.ca/osm/{z}/{x}/{y}.png",icon:{size:[40,30],url:"https://d3ddc8317k5jut.cloudfront.net/logos/images/speechBubble_purple_small.png",shadow:"https://usedlogos.s3-us-west-2.amazonaws.com/images/1v1transparent.gif"},mapDisable:!1}},computed:{mapZoom:function(){var t=12;try{t=parseInt(this.zoom)}catch(e){}return t},mapMaxBounds:function(){if(this.controls)return null;var t=[[0,0],[0,0]];try{var e=parseFloat(this.center[0])-1e-4,r=parseFloat(this.center[1])-1e-4,i=parseFloat(this.center[0])+1e-4,n=parseFloat(this.center[1])+1e-4,s=[e,r],o=[i,n];t=a.latLngBounds([s,o])}catch(c){}return t},options:function(){return{zoomControl:!this.mapDisable}}},methods:{mapClicked:function(t){this.$emit("click",t)},mapEventMove:function(t){var e=[t.target.getCenter().lat,t.target.getCenter().lng];this.mapCircle.center=e,this.markerCenter=e,this.$emit("move",t)},mapEventUpdate:function(t){this.$emit("center-update",t),this.$emit("update:center",[t.lat,t.lng])},invalidateSize:function(){var t=this;this.$nextTick((function(){t.$refs.map&&t.$refs.map.mapObject.invalidateSize()}))}}},c=o,l=(r("894b"),r("2877")),d=Object(l["a"])(c,i,n,!1,null,null,null);e["a"]=d.exports},a25a:function(t,e,r){},a43d:function(t,e,r){},a52e:function(t,e,r){"use strict";var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.getAds.length>0?r("base-container",{staticClass:"pb-2",attrs:{title:t.title,small:""}},[r("div",{staticClass:"row  mt-2 justify-content-center"},t._l(t.getAds,(function(e,a){return r("div",{key:a,staticClass:"col col-auto m-1 trending-ad"},[r("div",{staticClass:"pop-up bg-white rounded p-2 text-sm"},[r("router-link",{staticClass:"d-block",attrs:{to:t.linkToAd(e)}},[t._v(t._s(e.title))]),r("span",{staticClass:"text-xs"},[t._v(t._s(e.getTimeRenewed()))])],1),r("router-link",{staticClass:"rounded d-block",staticStyle:{overflow:"hidden"},attrs:{to:t.linkToAd(e)}},[r("img",{directives:[{name:"observe-visibility",rawName:"v-observe-visibility",value:{callback:function(r,a){return t.visibilityChanged(r,a,e.used_ad_id)}},expression:"{callback: (isVisible, entry) => visibilityChanged(isVisible, entry, ad.used_ad_id)}"}],attrs:{src:e.getDisplayPhoto(),width:t.size,height:t.size,alt:"Trending ad image #"+(a+1)}})])],1)})),0)]):t._e()},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("fb6a"),r("a9e3"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("7b04"),o=r("2f62"),c=r("d046"),l=r("3d24");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h={props:{limit:{type:[Number,String],default:9},size:{type:[Number,String],default:85}},data:function(){return{ads:[],eventsSent:{}}},components:{BaseContainer:s["a"]},mounted:function(){this.$nextTick((function(){this.region.getCode()&&this.fetchTrendingAds(this.region.getCode())}))},computed:u({},Object(o["c"])("region",{region:"site"}),{},Object(o["c"])("search",["trendingAds"]),{getAds:function(){return this.ads},title:function(){return"Trending ads in "+this.region.getName()}}),methods:u({},Object(o["b"])("search",["trending"]),{linkToAd:function(t){var e=t;return c["N"].adview({ad:e})},fetchTrendingAds:function(t){var e=this;this.trending(t).then((function(t){e.ads=e.trendingAds.slice(0,e.limit),e.eventsSent={}})).catch((function(t){console.warn("error on trending",t)}))},visibilityChanged:function(t,e,r){var a=this;t&&!this.eventsSent[r]&&(this.eventsSent[r]=!0,Object(l["Q"])({used_ad_id:r,event_type:"ad_browsed",region:this.region.getCode()}).catch((function(t){a.eventsSent[r]=!1,console.log("trending ad_browsed event error",t)})))}}),watch:{region:function(t){this.fetchTrendingAds(t.getCode())}}},f=h,p=(r("5cc4"),r("2877")),b=Object(p["a"])(f,a,i,!1,null,null,null);e["a"]=b.exports},a8f9:function(t,e,r){},a97c:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("u-button",{staticClass:"text-uppercase text-700 text-xs",staticStyle:{cursor:"pointer"},attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.showReportAd()}}},[r("u-icon",{attrs:{icon:"u-report",color:"grey"}})],1)],1)},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("159b"),r("2fe6")),s=r("2f62");function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var l={props:{ad:{type:Object,required:!0}},methods:c({},Object(s["b"])("drawer",["showReportAd"]))},d=l,u=r("2877"),h=Object(u["a"])(d,a,i,!1,null,null,null);e["default"]=h.exports},a9e3:function(t,e,r){"use strict";var a=r("83ab"),i=r("da84"),n=r("94ca"),s=r("6eeb"),o=r("5135"),c=r("c6b6"),l=r("7156"),d=r("c04e"),u=r("d039"),h=r("7c73"),f=r("241c").f,p=r("06cf").f,b=r("9bf2").f,g=r("58a8").trim,v="Number",m=i[v],y=m.prototype,w=c(h(y))==v,O=function(t){var e,r,a,i,n,s,o,c,l=d(t,!1);if("string"==typeof l&&l.length>2)if(l=g(l),e=l.charCodeAt(0),43===e||45===e){if(r=l.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+l}for(n=l.slice(2),s=n.length,o=0;o<s;o++)if(c=n.charCodeAt(o),c<48||c>i)return NaN;return parseInt(n,a)}return+l};if(n(v,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var j,x=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof x&&(w?u((function(){y.valueOf.call(r)})):c(r)!=v)?l(new m(O(e)),r,x):O(e)},_=a?f(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),C=0;_.length>C;C++)o(m,j=_[C])&&!o(x,j)&&b(x,j,p(m,j));x.prototype=y,y.constructor=x,s(i,v,x)}},ac81:function(t,e,r){"use strict";e["a"]={data:function(){return{client:!1}},mounted:function(){this.client=!0}}},adee:function(t,e,r){"use strict";var a=r("0235"),i=r.n(a);i.a},b0d2:function(t,e,r){"use strict";var a=r("8b56"),i=r.n(a);i.a},c358:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.loadingSettings&&t.client?r("div",{staticClass:"w-100 d-flex align-items-center justify-content-center"},[r("Spinner",{attrs:{size:"25px","border-width":"5px"}})],1):t.ad.wantEmail()?r("div",{staticClass:"btn btn-accent d-flex align-items-center justify-content-center cursor-pointer",class:{"btn-full":t.full},on:{click:function(e){return t.emailUser()}}},[t._v("Email User")]):t._e()},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("e439"),r("dbb4"),r("b64b"),r("ac1f"),r("5319"),r("159b"),r("2fe6")),s=r("2f62"),o=r("3fba"),c=r("2375"),l=r("ac81");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h={mixins:[l["a"]],components:{Spinner:c["a"]},props:{ad:{type:Object,required:!0},full:{type:Boolean,default:!1}},mounted:function(){},computed:u({},Object(s["c"])("user",["hasPermissions","loadingSettings"]),{},Object(s["c"])("client",["authenticated"])),methods:u({},Object(s["d"])("ad",["setEmailUserStatus"]),{},Object(s["b"])("user",["settingRequest"]),{},Object(s["b"])("drawer",["showLogin","showEmailAd"]),{emailUser:function(){var t=this;if(this.authenticated)this.hasPermissions?this.showEmailAd():this.settingRequest().then((function(){t.hasPermissions?t.showEmailAd():t.$reusable.toast_alert(o["ab"],o["cb"].error.activate_email)})).catch((function(e){t.$reusable.toast_alert(o["ab"],o["cb"].error.server)})).then((function(){}));else{var e={};e[o["W"].info]=o["X"].emailAd;var r=u({},this.$route,{},{hash:"#auth",query:e});this.$router.replace(r),this.showLogin()}}})},f=h,p=r("2877"),b=Object(p["a"])(f,a,i,!1,null,null,null);e["default"]=b.exports},c975:function(t,e,r){"use strict";var a=r("23e7"),i=r("4d64").indexOf,n=r("b301"),s=[].indexOf,o=!!s&&1/[1].indexOf(1,-0)<0,c=n("indexOf");a({target:"Array",proto:!0,forced:o||c},{indexOf:function(t){return o?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},d718:function(t,e,r){},e326:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.loadingSettings&&t.client?r("div",{staticClass:"w-100 d-flex align-items-center justify-content-center"},[r("Spinner",{attrs:{size:"25px","border-width":"5px"}})],1):!t.show&&t.wantToShowPhone?r("div",{staticClass:"d-flex align-items-center phone-button",class:t.buttonClasses,on:{click:function(e){return t.showPhoneNum()}}},[t._v(" Click to show ")]):r("div",[r("a",{staticClass:"d-lg-none",attrs:{href:t.phone()}},[t._v(t._s(t.ad.getPhone()))]),r("span",{staticClass:"d-lg-inline d-none"},[t._v(t._s(t.ad.getPhone()))])])},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("a15b"),r("e439"),r("dbb4"),r("b64b"),r("ac1f"),r("5319"),r("159b"),r("2fe6")),s=r("2f62"),o=r("3fba"),c=r("3d24"),l=r("2375"),d=r("ac81");function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f={components:{Spinner:l["a"]},mixins:[d["a"]],data:function(){return{show:!1}},props:{ad:{type:Object,required:!0},full:{type:Boolean,default:!1},asLink:{type:Boolean,default:!1},old:{type:Boolean,default:!1}},methods:h({},Object(s["b"])("user",["requestSettings"]),{},Object(s["b"])("drawer",["showLogin"]),{phone:function(){return"tel:"+this.ad.getPhoneDigits()},showPhoneNum:function(){var t=this;if(this.authenticated)this.hasPermissions?this.show=!0:this.settingRequest().then((function(){t.hasPermissions?t.show=!0:t.$reusable.toast_alert(o["ab"],o["cb"].error.activate_email)})).catch((function(e){t.$reusable.toast_alert(o["ab"],o["cb"].error.server)})).then((function(){}));else{var e={};e[o["W"].info]=o["X"].phoneAd;var r=h({},this.$route,{},{hash:"#auth",query:e});this.$router.replace(r),this.showLogin()}Object(c["Q"])({used_ad_id:this.ad.getId(),event_type:"phone_button_pressed",region:this.ad.getRegion()})}}),computed:h({},Object(s["c"])("user",["hasPermissions","loadingSettings"]),{},Object(s["c"])("client",["authenticated"]),{wantToShowPhone:function(){return/\d/.test(this.ad.getPhone())},buttonClasses:function(){var t=[];return this.asLink?(this.full&&t.push("w-100"),t.push("as-link")):(this.full&&t.push("btn-full"),t.push("btn btn-accent justify-content-center")),t.join(" ")}})},p=f,b=(r("f013"),r("2877")),g=Object(b["a"])(p,a,i,!1,null,null,null);e["default"]=g.exports},eae2:function(t,e,r){},ef72:function(t,e,r){"use strict";var a=r("f95b"),i=r.n(a);i.a},f013:function(t,e,r){"use strict";var a=r("8f05"),i=r.n(a);i.a},f179:function(t,e,r){},f35f:function(t,e,r){},f78f:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("u-button",{staticClass:"favourite",attrs:{icon:"",color:"transparent"},on:{click:function(e){return t.doFavourite()}}},[r("transition",{attrs:{name:"center-scale"}},[r("u-icon",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"show"}],staticClass:"bg-transparent mx-auto",attrs:{icon:"u-save",color:t.active?"orange":"grey"}})],1)],1)},i=[],n=(r("a4d3"),r("4de4"),r("4160"),r("a9e3"),r("e439"),r("dbb4"),r("b64b"),r("ac1f"),r("5319"),r("159b"),r("2fe6")),s=r("3d24"),o=r("ad5c"),c=r("3fba"),l=r("2f62");function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){Object(n["a"])(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h={data:function(){return{active:!1,fav_id:null,disabled:!1,show:!0}},props:{fav:{type:[String,Number]},ad:{type:[String,Number]},seller:{type:[String,Number]}},mounted:function(){this.checkFavourite()},computed:u({},Object(l["c"])("client",["auth","authenticated"]),{},Object(l["c"])("region",["site"]),{},Object(l["c"])("favourite",["isFavouriteAd","isFavouriteSeller","loading"])),watch:{seller:"checkFavourite",ad:"checkFavourite",fav:"checkFavourite",loading:"checkFavourite"},methods:u({},Object(l["b"])("favourite",["delete","add"]),{checkFavourite:function(){this.fav&&(this.fav_id=this.fav),this.ad&&(this.fav_id=this.isFavouriteAd(this.ad)),this.seller&&(this.fav_id=this.isFavouriteSeller(this.seller)),this.active=null!=this.fav_id},doFavourite:function(){var t=this;if(!this.disabled)if(this.disabled=!0,this.show=!1,this.authenticated){var e=this.auth;if(this.fav_id){var r=this.fav_id;Object(s["R"])({auth:e,fav_id:r}).then((function(e){t.delete({fav_id:r})})).catch((function(t){console.log("error removing favourite",t)})).then((function(){t.active=!1,t.fav_id=null,t.disabled=!1,t.show=!0}))}else{var a=this.ad,i=this.seller,n=this.ad?o["f"].type.ad:o["f"].type.seller;Object(s["g"])({auth:e,type:n,seller:i,used_ad:a}).then((function(e){t.fav_id=e.data.fav_id,t.add({fav:e.data})})).then((function(){n==o["f"].type.ad&&Object(s["Q"])({used_ad_id:t.ad,event_type:"ad_favourited",region:t.site.getCode()}).catch((function(t){console.log("ad_favourited event error",t)}))})).catch((function(t){console.log("error favouriting",t)})).then((function(){t.active=null!=t.fav_id,t.disabled=!1,t.show=!0}))}}else{if(this.show=!0,this.disabled=!1,this.$route.hash!==c["F"].auth){var l={hash:c["F"].auth},d=u({},this.$route,{},l);this.$router.replace(d)}this.$reusable.toast_alert(c["ab"],"Please login or sign up to favourite.")}}})},f=h,p=(r("5366"),r("2877")),b=Object(p["a"])(f,a,i,!1,null,null,null);e["default"]=b.exports},f95b:function(t,e,r){},ff5e:function(t,e,r){}}]);