{"version":3,"sources":["webpack:///./src/views/AgentProfileAppraisal.vue?394f","webpack:///./src/views/AgentProfileAppraisal.vue?a859","webpack:///./src/views/AgentProfileAppraisal.vue","webpack:///./src/views/AgentProfileAppraisal.vue?711c","webpack:///./src/views/AgentProfileAppraisal.vue?e408"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","_v","_s","profile","FullName","Position","PROLISTPhoto","Preview","Url","_e","formData","staticRenderFns","id","$route","params","length","updateAgent","Slugs","Resolve","then","resolved","Type","Id","html","el","document","createElement","innerHTML","innerText","about","stripHtml","AboutAgent","substring","title","description","image","Photo","undefined","Profiles","Get","$emit","Items","Context","EnquiryTargetProfile","ClientWebsiteId","Website","WebsiteId","Settings","WebsiteLevel","resolveId","Analytics","FromProfile","components","Masthead","Form","component"],"mappings":"2IAAA,W,yCCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,OAAO,CAAEJ,EAAW,QAAE,CAACI,EAAG,WAAW,CAACE,YAAY,0BAA0BC,MAAM,CAAC,MAAQ,sCAAsC,oBAAmB,EAAK,QAAS,IAAO,CAACH,EAAG,mBAAmB,CAACE,YAAY,8BAA8B,CAACF,EAAG,MAAM,CAACE,YAAY,yBAAyB,CAACF,EAAG,MAAM,CAACE,YAAY,kCAAkC,CAACF,EAAG,KAAK,CAACE,YAAY,uBAAuB,CAACN,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIU,QAAQC,aAAaP,EAAG,KAAK,CAACE,YAAY,2BAA2B,CAACN,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIU,QAAQE,eAAgBZ,EAAIU,QAAoB,aAAEN,EAAG,MAAM,CAACE,YAAY,gCAAgC,CAACF,EAAG,MAAM,CAACE,YAAY,qBAAqBC,MAAM,CAAC,IAAMP,EAAIU,QAAQG,aAAaC,QAAQC,SAASf,EAAIgB,UAAU,GAAGZ,EA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UAAW,OAAOD,QAAQE,SAAUD,UACpCE,aAAc,OAAOH,QAAQE,SAAUC,mBA5D/C,qBAiEE,WACEtD,KAAKuD,cAlET,8BAqEE,WACE,OAAqB,OAAjBvD,KAAKS,QAAyB,KAE3B+C,EAAA,KAAqBC,YAAYzD,KAAKS,aAxEjD,GAA0C,eAAO,SAA5B,EAAY,yBANhC,eAAU,CACTiD,WAAY,CACVC,WAAA,KACAC,OAAA,SAGiB,WC7C2X,I,wBCQ5YC,EAAY,eACd,EACA/D,EACAmB,GACA,EACA,KACA,WACA,MAIa,aAAA4C,E","file":"js/chunk-509ef1bc.971954e2.js","sourcesContent":["export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=style&index=0&id=c8687584&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Page',[(_vm.profile)?[_c('Masthead',{staticClass:\"agent-profile__masthead\",attrs:{\"image\":\"/assets/images/default/masthead.jpg\",\"relative-content\":true,\"darken\":true}},[_c('ContentContainer',{staticClass:\"agent-profile__header-wrap\"},[_c('div',{staticClass:\"agent-profile__header\"},[_c('div',{staticClass:\"agent-profile__header__details\"},[_c('h1',{staticClass:\"agent-profile__name\"},[_vm._v(_vm._s(_vm.profile.FullName))]),_c('h2',{staticClass:\"agent-profile__position\"},[_vm._v(_vm._s(_vm.profile.Position))])]),(_vm.profile.PROLISTPhoto)?_c('div',{staticClass:\"agent-profile__header__image\"},[_c('img',{staticClass:\"agent-profile__img\",attrs:{\"src\":_vm.profile.PROLISTPhoto.Preview.Url}})]):_vm._e()])])],1),_c('ContentRow',[_c('ContentContainer',[_c('SectionTitle',[_vm._v(\"Get an Appraisal\")]),(_vm.formData)?_c('Form',{attrs:{\"context\":_vm.formData,\"type\":\"Generic.AppraisalRequestForm\"}}):_vm._e()],1)],1)]:_vm._e()],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport { Component, Mixins } from 'vue-property-decorator';\r\nimport { Profile, ListingStatus, WebsiteLevel, Context } from 'client-website-ts-library/types';\r\nimport { API, Config } from 'client-website-ts-library/services';\r\nimport { AsyncView, RouteMeta } from 'client-website-ts-library/plugins';\r\n\r\nimport Masthead from '@/components/Common/Masthead.vue';\r\nimport { AnalyticsEventObject } from 'client-website-ts-library/services/Analytics';\r\nimport Form from '@/components/Forms/Form.vue';\r\nimport { ContextItemType } from 'client-website-ts-library/types/Context';\r\n\r\n@Component({\r\n components: {\r\n Masthead,\r\n Form,\r\n },\r\n})\r\nexport default class AgentProfile extends Mixins(AsyncView) {\r\n private profile: Profile | null = null;\r\n\r\n private formData: Context | null = null;\r\n\r\n resolveId() {\r\n const { id } = this.$route.params;\r\n\r\n if (id.length === 36) {\r\n // If the ID is 36 long we'll treat it as a guid\r\n\r\n this.updateAgent(id);\r\n } else {\r\n API.Slugs.Resolve(id).then((resolved) => {\r\n if (resolved.Type === 'Profile') {\r\n this.updateAgent(resolved.Id);\r\n }\r\n });\r\n }\r\n }\r\n\r\n stripHtml(html: string): string {\r\n const el = document.createElement('div');\r\n\r\n el.innerHTML = html;\r\n\r\n return el.innerText;\r\n }\r\n\r\n head(): RouteMeta | null {\r\n if (this.profile === null) return null;\r\n\r\n let about = this.stripHtml(this.profile.AboutAgent);\r\n\r\n if (about.length > 156) {\r\n about = `${about.substring(0, 156)}...`;\r\n }\r\n\r\n return {\r\n title: `Get an Appraisal - ${this.profile.FullName} - ${this.profile.Position}`,\r\n description: about,\r\n image: this.profile.Photo ? this.profile.Photo.Preview.Url : undefined,\r\n };\r\n }\r\n\r\n updateAgent(id: string) {\r\n this.formData = null;\r\n\r\n API.Profiles.Get(id).then((profile) => {\r\n this.profile = profile;\r\n\r\n this.$emit('updateView');\r\n\r\n this.formData = {\r\n Items: [{\r\n Type: ContextItemType.EnquiryTargetProfile,\r\n Id: profile.Id,\r\n }],\r\n ClientWebsiteId: Config.Website.Id,\r\n WebsiteId: Config.Website.Settings!.WebsiteId,\r\n WebsiteLevel: Config.Website.Settings!.WebsiteLevel,\r\n };\r\n });\r\n }\r\n\r\n mounted() {\r\n this.resolveId();\r\n }\r\n\r\n getAnalyticsData(): AnalyticsEventObject | null {\r\n if (this.profile === null) return null;\r\n\r\n return AnalyticsEventObject.FromProfile(this.profile);\r\n }\r\n}\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./AgentProfileAppraisal.vue?vue&type=template&id=c8687584&scoped=true&\"\nimport script from \"./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"\nexport * from \"./AgentProfileAppraisal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./AgentProfileAppraisal.vue?vue&type=style&index=0&id=c8687584&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c8687584\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}