@meetelise/chat 1.20.103 → 1.20.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.20.103",
3
+ "version": "1.20.104",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -123,18 +123,21 @@
123
123
  // building: "3fc93384-91f5-11ed-98a3-43f5a2f42588",
124
124
 
125
125
  // Taylor Street Apartments
126
- organization: "test-company",
127
- building: "e2e-test-yardi-building",
126
+ // organization: "test-company",
127
+ // building: "e2e-test-yardi-building",
128
128
 
129
129
  // Cambridge House
130
130
  // organization: "elise-ai",
131
131
  // building: "the-cambridge-house-3",
132
132
 
133
133
  // Artistry on 10th
134
- // organization: "lindy",
135
- // building: "c4cfc3ec-c4da-11ec-bda4-43aed00ca1b2",
134
+ organization: "lindy",
135
+ building: "c4cfc3ec-c4da-11ec-bda4-43aed00ca1b2",
136
136
 
137
137
  // brandColor: "#a44ef5",
138
+
139
+ // organization: "Pacific Urban Residential",
140
+ // building: "1ac49f90-6150-11ed-b327-1b3f05e7b9db",
138
141
  });
139
142
  </script>
140
143
  <main>
@@ -890,7 +890,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
890
890
  .nameInput {
891
891
  width: 100%;
892
892
  }
893
- `;var Wn=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Vn=class extends ae{constructor(){super(...arguments),this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.sgtUrl="",this.escortedToursLink="",this.virtualToursLink="",this.orgSlug="",this.buildingName="",this.tourType=null,this.shouldShowTourType={[Kn.Guided]:!0,[Kn.Self]:!0,[Kn.Virtual]:!0},this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.leadSources=[],this.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.firstUpdated=async()=>{const e=await(async()=>{var e,t,n,i,r,o;return{[Kn.Guided]:!!(null===(t=null===(e=await xn(nn.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[Kn.Self]:!!(null===(i=null===(n=await xn(nn.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[Kn.Virtual]:!!(null===(o=null===(r=await xn(nn.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}})();this.shouldShowTourType={[Kn.Guided]:this.tourTypeOptions.map((e=>e.value)).includes("WITH_AGENT")&&e[Kn.Guided],[Kn.Self]:this.tourTypeOptions.map((e=>e.value)).includes("SELF_GUIDED")&&e[Kn.Self],[Kn.Virtual]:this.tourTypeOptions.map((e=>e.value)).includes("VIRTUAL_SHOWING")&&e[Kn.Virtual]},1===Object.values(this.shouldShowTourType).reduce(((e,t)=>!0===t?e+1:e),0)&&(this.tourType=Object.keys(this.shouldShowTourType).find((e=>this.shouldShowTourType[e]))),null!==this.tourType?(this.availabilitiesGroupedByDay=await On(Xn[this.tourType]),this.waitingForAvailabilities=!1):this.waitingForAvailabilities=!1},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await On(Xn[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const n=e.target.selectionStart;if(1!==e.key.length||Fe(e)){if("Backspace"===e.key){if(Fe(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,i=this.phoneNumber.slice(0,n).replace(/\D/g,""),r=this.phoneNumber.slice(n).replace(/\D/g,""),o=`${i.slice(0,-1)}${r}`;this.phoneNumber=Re(o),this.phoneInput.value=this.phoneNumber;const a=n-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Fe(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,n).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,i=n-e>-1?n-e:0;this.phoneInput.setSelectionRange(i,i)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(n).split(/\d+/)[0].length||0)+1,t=n+e<this.phoneNumber.length?n+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,n)+e.key+this.phoneNumber.slice(n);this.phoneNumber=Re(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(!e.key)return;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const n=this.phoneInput.selectionStart,i=n?this.phoneInput.value.slice(n).replace(/\D/g,""):"";this.phoneNumber=Re(this.phoneInput.value);let r=0,o=i.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&(null===(n=this.emailInput)||void 0===n?void 0:n.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,n]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(n)]},this.submit=async()=>{var e,n;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const i=new URLSearchParams(window.location.search),r=this.selectedLeadSource&&this.selectedLeadSource.value?this.selectedLeadSource.value:this.currentLeadSource,o=[...new Set(r?[r,"property-website"]:["property-website"])];Jn("scheduleTourSubmitted",{email:this.email,phone:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,firstName:this.firstNameInput.value,lastName:this.lastNameInput.value,tourType:Yn[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,layouts:this.layoutTypeSelect.value?[this.layoutTypeSelect.value]:null,unitNumbers:this.unitTypeSelect&&this.unitTypeSelect.value?[this.unitTypeSelect.value]:null,originatingSource:o.find((e=>"property-website"!==e))||null});const a={referrer:document.referrer,email_address:this.email,phone_number:`+1${null===(n=this.phoneNumber.match(/\d/g))||void 0===n?void 0:n.join("")}`,building_id:this.buildingId,first_name:this.firstNameInput.value,last_name:this.lastNameInput.value,tour_type:Yn[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,layouts:this.layoutTypeSelect.value?[this.layoutTypeSelect.value]:null,unit_numbers:this.unitTypeSelect&&this.unitTypeSelect.value?[this.unitTypeSelect.value]:null,lead_sources:[...new Set(r?[r,"property-website"]:["property-website"])],query_params:Object.fromEntries(i.entries())};this.isSubmitting=!0;try{await t().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",a,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG","org-slug":this.orgSlug}}),await Dn({chatId:this.chatId,website:window.location.origin,referrer:document.referrer,buildingSlug:this.buildingSlug,selectedLeadSource:null!=r?r:""}),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e.response.data.detail||"Failed to book tour";alert(t),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>B`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>B`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>B`<action-confirm-button
893
+ `;var Wn=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Vn=class extends ae{constructor(){super(...arguments),this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.sgtUrl="",this.escortedToursLink="",this.virtualToursLink="",this.orgSlug="",this.buildingName="",this.tourType=null,this.shouldShowTourType={[Kn.Guided]:!0,[Kn.Self]:!0,[Kn.Virtual]:!0},this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.leadSources=[],this.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.firstUpdated=async()=>{const e=await(async()=>{var e,t,n,i,r,o;return{[Kn.Guided]:!!(null===(t=null===(e=await xn(nn.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[Kn.Self]:!!(null===(i=null===(n=await xn(nn.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[Kn.Virtual]:!!(null===(o=null===(r=await xn(nn.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}})();this.shouldShowTourType={[Kn.Guided]:this.tourTypeOptions.map((e=>e.value)).includes("WITH_AGENT")&&e[Kn.Guided],[Kn.Self]:this.tourTypeOptions.map((e=>e.value)).includes("SELF_GUIDED")&&e[Kn.Self],[Kn.Virtual]:this.tourTypeOptions.map((e=>e.value)).includes("VIRTUAL_SHOWING")&&e[Kn.Virtual]},1===Object.values(this.shouldShowTourType).reduce(((e,t)=>!0===t?e+1:e),0)?this.tourType=Object.keys(this.shouldShowTourType).find((e=>this.shouldShowTourType[e])):"1ac49f90-6150-11ed-b327-1b3f05e7b9db"===this.buildingSlug&&this.shouldShowTourType[Kn.Guided]&&(this.tourType=Kn.Guided),null!==this.tourType?(this.availabilitiesGroupedByDay=await On(Xn[this.tourType]),this.waitingForAvailabilities=!1):this.waitingForAvailabilities=!1},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await On(Xn[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const n=e.target.selectionStart;if(1!==e.key.length||Fe(e)){if("Backspace"===e.key){if(Fe(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,i=this.phoneNumber.slice(0,n).replace(/\D/g,""),r=this.phoneNumber.slice(n).replace(/\D/g,""),o=`${i.slice(0,-1)}${r}`;this.phoneNumber=Re(o),this.phoneInput.value=this.phoneNumber;const a=n-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Fe(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,n).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,i=n-e>-1?n-e:0;this.phoneInput.setSelectionRange(i,i)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(n).split(/\d+/)[0].length||0)+1,t=n+e<this.phoneNumber.length?n+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,n)+e.key+this.phoneNumber.slice(n);this.phoneNumber=Re(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(!e.key)return;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const n=this.phoneInput.selectionStart,i=n?this.phoneInput.value.slice(n).replace(/\D/g,""):"";this.phoneNumber=Re(this.phoneInput.value);let r=0,o=i.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&(null===(n=this.emailInput)||void 0===n?void 0:n.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,n]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(n)]},this.submit=async()=>{var e,n;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const i=new URLSearchParams(window.location.search),r=this.selectedLeadSource&&this.selectedLeadSource.value?this.selectedLeadSource.value:this.currentLeadSource,o=[...new Set(r?[r,"property-website"]:["property-website"])];Jn("scheduleTourSubmitted",{email:this.email,phone:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,firstName:this.firstNameInput.value,lastName:this.lastNameInput.value,tourType:Yn[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,layouts:this.layoutTypeSelect.value?[this.layoutTypeSelect.value]:null,unitNumbers:this.unitTypeSelect&&this.unitTypeSelect.value?[this.unitTypeSelect.value]:null,originatingSource:o.find((e=>"property-website"!==e))||null});const a={referrer:document.referrer,email_address:this.email,phone_number:`+1${null===(n=this.phoneNumber.match(/\d/g))||void 0===n?void 0:n.join("")}`,building_id:this.buildingId,first_name:this.firstNameInput.value,last_name:this.lastNameInput.value,tour_type:Yn[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,layouts:this.layoutTypeSelect.value?[this.layoutTypeSelect.value]:null,unit_numbers:this.unitTypeSelect&&this.unitTypeSelect.value?[this.unitTypeSelect.value]:null,lead_sources:[...new Set(r?[r,"property-website"]:["property-website"])],query_params:Object.fromEntries(i.entries())};this.isSubmitting=!0;try{await t().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",a,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG","org-slug":this.orgSlug}}),await Dn({chatId:this.chatId,website:window.location.origin,referrer:document.referrer,buildingSlug:this.buildingSlug,selectedLeadSource:null!=r?r:""}),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e.response.data.detail||"Failed to book tour";alert(t),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>B`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>B`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo(),nextButtonText:null,renderNextButton:()=>B`<action-confirm-button
894
894
  id="schedule-bttn"
895
895
  .onClick=${this.submit}
896
896
  .isLoading=${this.isSubmitting}
@@ -900,45 +900,45 @@ otherwise there's some empty space at the bottom of the button, which interferes
900
900
  ?disabled=${!this.formIsValidForSubmission()}
901
901
  ></action-confirm-button>`,nextButtonAction:null,render:()=>B`${this.userInfoAndLayoutMenu()}`}]}tourTypeMenu(){return B`<h2 class="journey-header">Tour Type</h2>
902
902
  <div id="tour-type-menu">
903
- ${this.shouldShowTourType[Kn.Guided]?B` <tour-type-option
904
- heading="Guided tour"
905
- subtitle="with an agent"
906
- @click="${async()=>{this.tourType=Kn.Guided,this.escortedToursLink&&window.open(this.escortedToursLink,"_blank"),this.availabilitiesGroupedByDay=await On(Xn[Kn.Guided])}}"
907
- @keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=Kn.Guided)}}"
908
- ?selected="${this.tourType===Kn.Guided}"
903
+ ${this.shouldShowTourType[Kn.Self]?B`<tour-type-option
904
+ heading="Take a tour"
905
+ subtitle="on your own"
906
+ @click="${async()=>{this.tourType=Kn.Self,this.sgtUrl&&window.open(this.sgtUrl,"_blank"),this.availabilitiesGroupedByDay=await On(Xn[Kn.Self])}}"
907
+ @keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=Kn.Self)}}"
908
+ ?selected="${this.tourType===Kn.Self}"
909
909
  >
910
910
  <svg
911
911
  slot="icon"
912
- width="31"
912
+ width="28"
913
913
  height="31"
914
- viewBox="0 0 31 31"
914
+ viewBox="0 0 28 31"
915
915
  fill="none"
916
916
  xmlns="http://www.w3.org/2000/svg"
917
917
  >
918
918
  <path
919
- d="M0.833252 30.1666C0.833252 27.1608 2.0273 24.2782 4.15271 22.1527C6.27812 20.0273 9.1608 18.8333 12.1666 18.8333C15.1724 18.8333 18.0551 20.0273 20.1805 22.1527C22.3059 24.2782 23.4999 27.1608 23.4999 30.1666H0.833252ZM12.1666 17.4166C7.47034 17.4166 3.66659 13.6129 3.66659 8.91663C3.66659 4.22038 7.47034 0.416626 12.1666 0.416626C16.8628 0.416626 20.6666 4.22038 20.6666 8.91663C20.6666 13.6129 16.8628 17.4166 12.1666 17.4166ZM22.5975 20.58C24.7645 21.137 26.7006 22.3634 28.13 24.0846C29.5595 25.8059 30.4096 27.9342 30.5592 30.1666H26.3333C26.3333 26.4691 24.9166 23.1031 22.5975 20.58ZM19.7316 17.3557C20.9187 16.2939 21.8681 14.9932 22.5175 13.5388C23.167 12.0845 23.5017 10.5094 23.4999 8.91663C23.5029 6.9807 23.0078 5.07657 22.062 3.38738C23.6666 3.70979 25.11 4.5779 26.1469 5.84415C27.1838 7.1104 27.7502 8.69666 27.7499 10.3333C27.7503 11.3426 27.5349 12.3404 27.1182 13.2597C26.7016 14.179 26.0932 14.9986 25.3339 15.6636C24.5746 16.3285 23.6819 16.8236 22.7157 17.1154C21.7495 17.4072 20.7321 17.4892 19.7316 17.3557V17.3557Z"
920
- fill="${this.tourType===Kn.Guided?"#ffffff":"#202020"}"
919
+ d="M14.8334 19.1903V30.1667H0.666687C0.666248 28.4367 1.06183 26.7297 1.82311 25.1763C2.58439 23.6229 3.69118 22.2644 5.05866 21.2049C6.42614 20.1453 8.01802 19.4129 9.71232 19.0637C11.4066 18.7145 13.1584 18.7578 14.8334 19.1903ZM12 17.4167C7.30377 17.4167 3.50002 13.6129 3.50002 8.91666C3.50002 4.22041 7.30377 0.416656 12 0.416656C16.6963 0.416656 20.5 4.22041 20.5 8.91666C20.5 13.6129 16.6963 17.4167 12 17.4167ZM20.5 23.0833V18.125L27.5834 24.5L20.5 30.875V25.9167H16.25V23.0833H20.5Z"
920
+ fill="${this.tourType===Kn.Self?"#ffffff":"#202020"}"
921
921
  />
922
922
  </svg>
923
923
  </tour-type-option>`:""}
924
- ${this.shouldShowTourType[Kn.Self]?B`<tour-type-option
925
- heading="Take a tour"
926
- subtitle="on your own"
927
- @click="${async()=>{this.tourType=Kn.Self,this.sgtUrl&&window.open(this.sgtUrl,"_blank"),this.availabilitiesGroupedByDay=await On(Xn[Kn.Self])}}"
928
- @keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=Kn.Self)}}"
929
- ?selected="${this.tourType===Kn.Self}"
924
+ ${this.shouldShowTourType[Kn.Guided]?B` <tour-type-option
925
+ heading="Guided tour"
926
+ subtitle="with an agent"
927
+ @click="${async()=>{this.tourType=Kn.Guided,this.escortedToursLink&&window.open(this.escortedToursLink,"_blank"),this.availabilitiesGroupedByDay=await On(Xn[Kn.Guided])}}"
928
+ @keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=Kn.Guided)}}"
929
+ ?selected="${this.tourType===Kn.Guided}"
930
930
  >
931
931
  <svg
932
932
  slot="icon"
933
- width="28"
933
+ width="31"
934
934
  height="31"
935
- viewBox="0 0 28 31"
935
+ viewBox="0 0 31 31"
936
936
  fill="none"
937
937
  xmlns="http://www.w3.org/2000/svg"
938
938
  >
939
939
  <path
940
- d="M14.8334 19.1903V30.1667H0.666687C0.666248 28.4367 1.06183 26.7297 1.82311 25.1763C2.58439 23.6229 3.69118 22.2644 5.05866 21.2049C6.42614 20.1453 8.01802 19.4129 9.71232 19.0637C11.4066 18.7145 13.1584 18.7578 14.8334 19.1903ZM12 17.4167C7.30377 17.4167 3.50002 13.6129 3.50002 8.91666C3.50002 4.22041 7.30377 0.416656 12 0.416656C16.6963 0.416656 20.5 4.22041 20.5 8.91666C20.5 13.6129 16.6963 17.4167 12 17.4167ZM20.5 23.0833V18.125L27.5834 24.5L20.5 30.875V25.9167H16.25V23.0833H20.5Z"
941
- fill="${this.tourType===Kn.Self?"#ffffff":"#202020"}"
940
+ d="M0.833252 30.1666C0.833252 27.1608 2.0273 24.2782 4.15271 22.1527C6.27812 20.0273 9.1608 18.8333 12.1666 18.8333C15.1724 18.8333 18.0551 20.0273 20.1805 22.1527C22.3059 24.2782 23.4999 27.1608 23.4999 30.1666H0.833252ZM12.1666 17.4166C7.47034 17.4166 3.66659 13.6129 3.66659 8.91663C3.66659 4.22038 7.47034 0.416626 12.1666 0.416626C16.8628 0.416626 20.6666 4.22038 20.6666 8.91663C20.6666 13.6129 16.8628 17.4166 12.1666 17.4166ZM22.5975 20.58C24.7645 21.137 26.7006 22.3634 28.13 24.0846C29.5595 25.8059 30.4096 27.9342 30.5592 30.1666H26.3333C26.3333 26.4691 24.9166 23.1031 22.5975 20.58ZM19.7316 17.3557C20.9187 16.2939 21.8681 14.9932 22.5175 13.5388C23.167 12.0845 23.5017 10.5094 23.4999 8.91663C23.5029 6.9807 23.0078 5.07657 22.062 3.38738C23.6666 3.70979 25.11 4.5779 26.1469 5.84415C27.1838 7.1104 27.7502 8.69666 27.7499 10.3333C27.7503 11.3426 27.5349 12.3404 27.1182 13.2597C26.7016 14.179 26.0932 14.9986 25.3339 15.6636C24.5746 16.3285 23.6819 16.8236 22.7157 17.1154C21.7495 17.4072 20.7321 17.4892 19.7316 17.3557V17.3557Z"
941
+ fill="${this.tourType===Kn.Guided?"#ffffff":"#202020"}"
942
942
  />
943
943
  </svg>
944
944
  </tour-type-option>`:""}
@@ -2725,7 +2725,65 @@ otherwise there's some empty space at the bottom of the button, which interferes
2725
2725
  </div>
2726
2726
  </div>
2727
2727
  </div>
2728
- `:B` <div class="vertical-pill-list">
2728
+ `:"1ac49f90-6150-11ed-b327-1b3f05e7b9db"===this.buildingSlug?B` <div class="vertical-pill-list">
2729
+ <button @click=${this.onClickMinimize} class="minimize-bttn">
2730
+ <div class="chevron-down">${er}</div>
2731
+ </button>
2732
+ ${this.hasSSTEnabled?B`
2733
+ <div
2734
+ @click=${this.onClickSSTOption}
2735
+ style=${jn({background:this.brandColor})}
2736
+ id="overlay-inner-pill"
2737
+ class="inner-pill-wrapper"
2738
+ >
2739
+ <div class="vertical-pill-left">
2740
+ <div class="vertical-pill-icon">
2741
+ ${Wi}
2742
+ </div>
2743
+ <div class="vertical-pill-title">
2744
+ <span class="vertical-pill-bold">Book</span> a tour
2745
+ </div>
2746
+ </div>
2747
+ <div class="chevron-right">${$i}</div>
2748
+ </div>
2749
+ `:""}
2750
+ ${this.hasChatEnabled?B`
2751
+ <div class="inner-pill-wrapper"
2752
+ @click=${this.onChatTapped}>
2753
+ <div class="vertical-pill-left">
2754
+ <div class="vertical-pill-icon">${Yi}</div>
2755
+ <div class="vertical-pill-title">
2756
+ <span class="vertical-pill-bold">Chat</span> with us
2757
+ </div>
2758
+ </div>
2759
+ <div class="chevron-right">${er}</div>
2760
+ </div>
2761
+ </div>
2762
+ `:""}
2763
+ ${this.hasEmailEnabled?B`
2764
+ <div @click=${this.onClickEmailOption} class="inner-pill-wrapper">
2765
+ <div class="vertical-pill-left">
2766
+ <div class="vertical-pill-icon">${Ki}</div>
2767
+ <div class="vertical-pill-title">
2768
+ <span class="vertical-pill-bold">Email</span> an agent
2769
+ </div>
2770
+ </div>
2771
+ <div class="chevron-right">${er}</div>
2772
+ </div>
2773
+ `:""}
2774
+ ${this.phoneNumber&&this.hasCallUsEnabled?B`
2775
+ <div @click=${this.onClickPhoneOption} class="inner-pill-wrapper">
2776
+ <div class="vertical-pill-left">
2777
+ <div class="vertical-pill-icon">${Vi}</div>
2778
+ <div class="vertical-pill-title">
2779
+ <span class="vertical-pill-bold">Call</span>
2780
+ ${this.hasTextUsEnabled?B`or <span class="vertical-pill-bold">text</span> us`:"us"}
2781
+ </div>
2782
+ </div>
2783
+ <div class="chevron-right">${er}</div>
2784
+ </div>
2785
+ `:""}
2786
+ </div>`:B` <div class="vertical-pill-list">
2729
2787
  <button @click=${this.onClickMinimize} class="minimize-bttn">
2730
2788
  <div class="chevron-down">${er}</div>
2731
2789
  </button>
@@ -160,10 +160,22 @@ export class TourScheduler extends LitElement {
160
160
  return acc;
161
161
  }
162
162
  }, 0) === 1;
163
+
163
164
  if (hasOneShowTourType) {
164
165
  this.tourType = Object.keys(this.shouldShowTourType).find(
165
166
  (key) => this.shouldShowTourType[key as TourType]
166
167
  ) as TourType;
168
+ } else {
169
+ // if we have multiple tour types, then check if there is a default that the client wants selected
170
+
171
+ // HACK: FOR THE DEMO, FOR https://www.sofioceanhills.com/ -
172
+ // THIS SHOULD BE ADDED TO WEBCHAT CONFIGURATION
173
+ if (
174
+ this.buildingSlug === "1ac49f90-6150-11ed-b327-1b3f05e7b9db" &&
175
+ this.shouldShowTourType[TourType.Guided]
176
+ ) {
177
+ this.tourType = TourType.Guided;
178
+ }
167
179
  }
168
180
 
169
181
  if (this.tourType === null) {
@@ -470,79 +482,79 @@ export class TourScheduler extends LitElement {
470
482
  tourTypeMenu(): TemplateResult {
471
483
  return html`<h2 class="journey-header">Tour Type</h2>
472
484
  <div id="tour-type-menu">
473
- ${this.shouldShowTourType[TourType.Guided]
474
- ? html` <tour-type-option
475
- heading="Guided tour"
476
- subtitle="with an agent"
485
+ ${this.shouldShowTourType[TourType.Self]
486
+ ? html`<tour-type-option
487
+ heading="Take a tour"
488
+ subtitle="on your own"
477
489
  @click="${async () => {
478
- this.tourType = TourType.Guided;
479
-
480
- if (this.escortedToursLink) {
481
- window.open(this.escortedToursLink, "_blank");
490
+ this.tourType = TourType.Self;
491
+ if (this.sgtUrl) {
492
+ window.open(this.sgtUrl, "_blank");
482
493
  }
483
494
  this.availabilitiesGroupedByDay =
484
495
  await getAvailabilitiesGroupedByDay(
485
- tourTypeMap[TourType.Guided]
496
+ tourTypeMap[TourType.Self]
486
497
  );
487
498
  }}"
488
499
  @keydown="${(e: KeyboardEvent) => {
489
500
  if ([" ", "Enter"].includes(e.key)) {
490
501
  e.preventDefault();
491
- this.tourType = TourType.Guided;
502
+ this.tourType = TourType.Self;
492
503
  }
493
504
  }}"
494
- ?selected="${this.tourType === TourType.Guided}"
505
+ ?selected="${this.tourType === TourType.Self}"
495
506
  >
496
507
  <svg
497
508
  slot="icon"
498
- width="31"
509
+ width="28"
499
510
  height="31"
500
- viewBox="0 0 31 31"
511
+ viewBox="0 0 28 31"
501
512
  fill="none"
502
513
  xmlns="http://www.w3.org/2000/svg"
503
514
  >
504
515
  <path
505
- d="M0.833252 30.1666C0.833252 27.1608 2.0273 24.2782 4.15271 22.1527C6.27812 20.0273 9.1608 18.8333 12.1666 18.8333C15.1724 18.8333 18.0551 20.0273 20.1805 22.1527C22.3059 24.2782 23.4999 27.1608 23.4999 30.1666H0.833252ZM12.1666 17.4166C7.47034 17.4166 3.66659 13.6129 3.66659 8.91663C3.66659 4.22038 7.47034 0.416626 12.1666 0.416626C16.8628 0.416626 20.6666 4.22038 20.6666 8.91663C20.6666 13.6129 16.8628 17.4166 12.1666 17.4166ZM22.5975 20.58C24.7645 21.137 26.7006 22.3634 28.13 24.0846C29.5595 25.8059 30.4096 27.9342 30.5592 30.1666H26.3333C26.3333 26.4691 24.9166 23.1031 22.5975 20.58ZM19.7316 17.3557C20.9187 16.2939 21.8681 14.9932 22.5175 13.5388C23.167 12.0845 23.5017 10.5094 23.4999 8.91663C23.5029 6.9807 23.0078 5.07657 22.062 3.38738C23.6666 3.70979 25.11 4.5779 26.1469 5.84415C27.1838 7.1104 27.7502 8.69666 27.7499 10.3333C27.7503 11.3426 27.5349 12.3404 27.1182 13.2597C26.7016 14.179 26.0932 14.9986 25.3339 15.6636C24.5746 16.3285 23.6819 16.8236 22.7157 17.1154C21.7495 17.4072 20.7321 17.4892 19.7316 17.3557V17.3557Z"
506
- fill="${this.tourType === TourType.Guided
516
+ d="M14.8334 19.1903V30.1667H0.666687C0.666248 28.4367 1.06183 26.7297 1.82311 25.1763C2.58439 23.6229 3.69118 22.2644 5.05866 21.2049C6.42614 20.1453 8.01802 19.4129 9.71232 19.0637C11.4066 18.7145 13.1584 18.7578 14.8334 19.1903ZM12 17.4167C7.30377 17.4167 3.50002 13.6129 3.50002 8.91666C3.50002 4.22041 7.30377 0.416656 12 0.416656C16.6963 0.416656 20.5 4.22041 20.5 8.91666C20.5 13.6129 16.6963 17.4167 12 17.4167ZM20.5 23.0833V18.125L27.5834 24.5L20.5 30.875V25.9167H16.25V23.0833H20.5Z"
517
+ fill="${this.tourType === TourType.Self
507
518
  ? "#ffffff"
508
519
  : "#202020"}"
509
520
  />
510
521
  </svg>
511
522
  </tour-type-option>`
512
523
  : ""}
513
- ${this.shouldShowTourType[TourType.Self]
514
- ? html`<tour-type-option
515
- heading="Take a tour"
516
- subtitle="on your own"
524
+ ${this.shouldShowTourType[TourType.Guided]
525
+ ? html` <tour-type-option
526
+ heading="Guided tour"
527
+ subtitle="with an agent"
517
528
  @click="${async () => {
518
- this.tourType = TourType.Self;
519
- if (this.sgtUrl) {
520
- window.open(this.sgtUrl, "_blank");
529
+ this.tourType = TourType.Guided;
530
+
531
+ if (this.escortedToursLink) {
532
+ window.open(this.escortedToursLink, "_blank");
521
533
  }
522
534
  this.availabilitiesGroupedByDay =
523
535
  await getAvailabilitiesGroupedByDay(
524
- tourTypeMap[TourType.Self]
536
+ tourTypeMap[TourType.Guided]
525
537
  );
526
538
  }}"
527
539
  @keydown="${(e: KeyboardEvent) => {
528
540
  if ([" ", "Enter"].includes(e.key)) {
529
541
  e.preventDefault();
530
- this.tourType = TourType.Self;
542
+ this.tourType = TourType.Guided;
531
543
  }
532
544
  }}"
533
- ?selected="${this.tourType === TourType.Self}"
545
+ ?selected="${this.tourType === TourType.Guided}"
534
546
  >
535
547
  <svg
536
548
  slot="icon"
537
- width="28"
549
+ width="31"
538
550
  height="31"
539
- viewBox="0 0 28 31"
551
+ viewBox="0 0 31 31"
540
552
  fill="none"
541
553
  xmlns="http://www.w3.org/2000/svg"
542
554
  >
543
555
  <path
544
- d="M14.8334 19.1903V30.1667H0.666687C0.666248 28.4367 1.06183 26.7297 1.82311 25.1763C2.58439 23.6229 3.69118 22.2644 5.05866 21.2049C6.42614 20.1453 8.01802 19.4129 9.71232 19.0637C11.4066 18.7145 13.1584 18.7578 14.8334 19.1903ZM12 17.4167C7.30377 17.4167 3.50002 13.6129 3.50002 8.91666C3.50002 4.22041 7.30377 0.416656 12 0.416656C16.6963 0.416656 20.5 4.22041 20.5 8.91666C20.5 13.6129 16.6963 17.4167 12 17.4167ZM20.5 23.0833V18.125L27.5834 24.5L20.5 30.875V25.9167H16.25V23.0833H20.5Z"
545
- fill="${this.tourType === TourType.Self
556
+ d="M0.833252 30.1666C0.833252 27.1608 2.0273 24.2782 4.15271 22.1527C6.27812 20.0273 9.1608 18.8333 12.1666 18.8333C15.1724 18.8333 18.0551 20.0273 20.1805 22.1527C22.3059 24.2782 23.4999 27.1608 23.4999 30.1666H0.833252ZM12.1666 17.4166C7.47034 17.4166 3.66659 13.6129 3.66659 8.91663C3.66659 4.22038 7.47034 0.416626 12.1666 0.416626C16.8628 0.416626 20.6666 4.22038 20.6666 8.91663C20.6666 13.6129 16.8628 17.4166 12.1666 17.4166ZM22.5975 20.58C24.7645 21.137 26.7006 22.3634 28.13 24.0846C29.5595 25.8059 30.4096 27.9342 30.5592 30.1666H26.3333C26.3333 26.4691 24.9166 23.1031 22.5975 20.58ZM19.7316 17.3557C20.9187 16.2939 21.8681 14.9932 22.5175 13.5388C23.167 12.0845 23.5017 10.5094 23.4999 8.91663C23.5029 6.9807 23.0078 5.07657 22.062 3.38738C23.6666 3.70979 25.11 4.5779 26.1469 5.84415C27.1838 7.1104 27.7502 8.69666 27.7499 10.3333C27.7503 11.3426 27.5349 12.3404 27.1182 13.2597C26.7016 14.179 26.0932 14.9986 25.3339 15.6636C24.5746 16.3285 23.6819 16.8236 22.7157 17.1154C21.7495 17.4072 20.7321 17.4892 19.7316 17.3557V17.3557Z"
557
+ fill="${this.tourType === TourType.Guided
546
558
  ? "#ffffff"
547
559
  : "#202020"}"
548
560
  />
@@ -24,6 +24,7 @@ import {
24
24
  HeyThereEmoji,
25
25
  ChevronIconBlack,
26
26
  ChevronIconWhite,
27
+ ChatBlackOutlineIcon,
27
28
  } from "../../svgIcons";
28
29
  import { defaultBrandColor } from "../../themes";
29
30
  import { hexToAlmostWhite } from "../../utils";
@@ -458,6 +459,83 @@ export class Launcher extends LitElement {
458
459
  `;
459
460
  }
460
461
 
462
+ {
463
+ /* THIS IS A HACK FOR BUILDING DEMO */
464
+ }
465
+ if (this.buildingSlug === "1ac49f90-6150-11ed-b327-1b3f05e7b9db") {
466
+ return html` <div class="vertical-pill-list">
467
+ <button @click=${this.onClickMinimize} class="minimize-bttn">
468
+ <div class="chevron-down">${ChevronIconBlack}</div>
469
+ </button>
470
+ ${this.hasSSTEnabled
471
+ ? html`
472
+ <div
473
+ @click=${this.onClickSSTOption}
474
+ style=${styleMap({
475
+ background: this.brandColor,
476
+ })}
477
+ id="overlay-inner-pill"
478
+ class="inner-pill-wrapper"
479
+ >
480
+ <div class="vertical-pill-left">
481
+ <div class="vertical-pill-icon">
482
+ ${BookTourBlackOutlineIcon}
483
+ </div>
484
+ <div class="vertical-pill-title">
485
+ <span class="vertical-pill-bold">Book</span> a tour
486
+ </div>
487
+ </div>
488
+ <div class="chevron-right">${ChevronIconWhite}</div>
489
+ </div>
490
+ `
491
+ : ""}
492
+ ${this.hasChatEnabled
493
+ ? html`
494
+ <div class="inner-pill-wrapper"
495
+ @click=${this.onChatTapped}>
496
+ <div class="vertical-pill-left">
497
+ <div class="vertical-pill-icon">${ChatBlackOutlineIcon}</div>
498
+ <div class="vertical-pill-title">
499
+ <span class="vertical-pill-bold">Chat</span> with us
500
+ </div>
501
+ </div>
502
+ <div class="chevron-right">${ChevronIconBlack}</div>
503
+ </div>
504
+ </div>
505
+ `
506
+ : ""}
507
+ ${this.hasEmailEnabled
508
+ ? html`
509
+ <div @click=${this.onClickEmailOption} class="inner-pill-wrapper">
510
+ <div class="vertical-pill-left">
511
+ <div class="vertical-pill-icon">${EmailBlackOutlineIcon}</div>
512
+ <div class="vertical-pill-title">
513
+ <span class="vertical-pill-bold">Email</span> an agent
514
+ </div>
515
+ </div>
516
+ <div class="chevron-right">${ChevronIconBlack}</div>
517
+ </div>
518
+ `
519
+ : ""}
520
+ ${this.phoneNumber && this.hasCallUsEnabled
521
+ ? html`
522
+ <div @click=${this.onClickPhoneOption} class="inner-pill-wrapper">
523
+ <div class="vertical-pill-left">
524
+ <div class="vertical-pill-icon">${PhoneBlackOutlineIcon}</div>
525
+ <div class="vertical-pill-title">
526
+ <span class="vertical-pill-bold">Call</span>
527
+ ${this.hasTextUsEnabled
528
+ ? html`or <span class="vertical-pill-bold">text</span> us`
529
+ : "us"}
530
+ </div>
531
+ </div>
532
+ <div class="chevron-right">${ChevronIconBlack}</div>
533
+ </div>
534
+ `
535
+ : ""}
536
+ </div>`;
537
+ }
538
+
461
539
  return html` <div class="vertical-pill-list">
462
540
  <button @click=${this.onClickMinimize} class="minimize-bttn">
463
541
  <div class="chevron-down">${ChevronIconBlack}</div>