@meetelise/chat 1.20.43 → 1.20.45
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
package/public/dist/index.js
CHANGED
|
@@ -1549,16 +1549,15 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1549
1549
|
.lds-ring {
|
|
1550
1550
|
display: inline-block;
|
|
1551
1551
|
position: relative;
|
|
1552
|
-
width:
|
|
1553
|
-
height:
|
|
1552
|
+
width: 28px;
|
|
1553
|
+
height: 28px;
|
|
1554
1554
|
}
|
|
1555
1555
|
.lds-ring div {
|
|
1556
1556
|
box-sizing: border-box;
|
|
1557
1557
|
display: block;
|
|
1558
1558
|
position: absolute;
|
|
1559
|
-
width:
|
|
1560
|
-
height:
|
|
1561
|
-
margin: 8px;
|
|
1559
|
+
width: 28px;
|
|
1560
|
+
height: 28px;
|
|
1562
1561
|
border: 8px solid #fff;
|
|
1563
1562
|
border-radius: 50%;
|
|
1564
1563
|
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
@@ -1854,7 +1853,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1854
1853
|
width: 50%;
|
|
1855
1854
|
}
|
|
1856
1855
|
}
|
|
1857
|
-
`,Vt],ci([ae({attribute:!1})],pi.prototype,"leadSources",void 0),ci([ae({attribute:!1})],pi.prototype,"onCloseClicked",void 0),ci([ae({attribute:!0})],pi.prototype,"chatId",void 0),ci([ae({attribute:!1})],pi.prototype,"buildingId",void 0),ci([ae({attribute:!0})],pi.prototype,"buildingSlug",void 0),ci([ae({attribute:!0})],pi.prototype,"orgSlug",void 0),ci([ae()],pi.prototype,"privatePolicyUrl",void 0),ci([ae()],pi.prototype,"termsOfServiceUrl",void 0),ci([se()],pi.prototype,"firstName",void 0),ci([se()],pi.prototype,"lastName",void 0),ci([se()],pi.prototype,"email",void 0),ci([se()],pi.prototype,"phoneNumber",void 0),ci([se()],pi.prototype,"message",void 0),ci([ue("me-select#leadSource")],pi.prototype,"selectedLeadSource",void 0),ci([ae({attribute:!0})],pi.prototype,"currentLeadSource",void 0),ci([se()],pi.prototype,"hasNameError",void 0),ci([se()],pi.prototype,"hasEmailError",void 0),ci([se()],pi.prototype,"hasPhoneNumberError",void 0),ci([se()],pi.prototype,"hasMessageError",void 0),ci([se()],pi.prototype,"hasLeadSourceError",void 0),ci([se()],pi.prototype,"hasSubmittedForm",void 0),ci([se()],pi.prototype,"windowHeight",void 0),ci([se()],pi.prototype,"hasSubmissionError",void 0),ci([se()],pi.prototype,"isSubmitting",void 0),pi=ci([re("email-us-window")],pi);const fi=async(e,t,n,i,r,o,a,s,u)=>{const l="+1"+i.replace("(","").replace(")","").replace(" ","").replace("-",""),d=new URLSearchParams(window.location.search),c={email_address:n,building_id:o,lead_sources:u,first_message:r,first_name:e,last_name:t,phone_number:l,referrer:document.referrer,query_params:Object.fromEntries(d.entries())};await Kt().post("https://app.meetelise.com/platformApi/state/create/emailMe",c,{headers:{"building-slug":s,"org-slug":a,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG"}})};var hi=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 mi=class extends ne{constructor(){super(...arguments),this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.inPopup=!1,this.phoneNumberInputRef=Se(),this.phoneNumber="",this.hasSubmittedForm=!1,this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.isSubmitting=!1,this.onChangePhoneNumber=e=>{if(!e.target||!this.phoneNumberInputRef.value)return;if(Ae(e))return;const t=e.target;this.phoneNumber=Re(t.value),this.phoneNumberInputRef.value.value=this.phoneNumber},this.enforceFormat=e=>{Ce(e)||Ae(e)||e.preventDefault()},this.validateFormFields=()=>{this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumber&&14===this.phoneNumber.length||(this.hasPhoneNumberError=!0)},this.onClick=async()=>{if(this.validateFormFields(),!this.hasPhoneNumberError)try{this.isSubmitting=!0,await vi(this.phoneNumber,this.buildingId,this.orgSlug,this.buildingSlug),this.hasSubmittedForm=!0,this.isSubmitting=!1}catch(e){this.isSubmitting=!1,this.hasSubmissionError=!0}},this.renderTextUs=()=>D` <div class="text-us-wrapper">
|
|
1856
|
+
`,Vt],ci([ae({attribute:!1})],pi.prototype,"leadSources",void 0),ci([ae({attribute:!1})],pi.prototype,"onCloseClicked",void 0),ci([ae({attribute:!0})],pi.prototype,"chatId",void 0),ci([ae({attribute:!1})],pi.prototype,"buildingId",void 0),ci([ae({attribute:!0})],pi.prototype,"buildingSlug",void 0),ci([ae({attribute:!0})],pi.prototype,"orgSlug",void 0),ci([ae()],pi.prototype,"privatePolicyUrl",void 0),ci([ae()],pi.prototype,"termsOfServiceUrl",void 0),ci([se()],pi.prototype,"firstName",void 0),ci([se()],pi.prototype,"lastName",void 0),ci([se()],pi.prototype,"email",void 0),ci([se()],pi.prototype,"phoneNumber",void 0),ci([se()],pi.prototype,"message",void 0),ci([ue("me-select#leadSource")],pi.prototype,"selectedLeadSource",void 0),ci([ae({attribute:!0})],pi.prototype,"currentLeadSource",void 0),ci([se()],pi.prototype,"hasNameError",void 0),ci([se()],pi.prototype,"hasEmailError",void 0),ci([se()],pi.prototype,"hasPhoneNumberError",void 0),ci([se()],pi.prototype,"hasMessageError",void 0),ci([se()],pi.prototype,"hasLeadSourceError",void 0),ci([se()],pi.prototype,"hasSubmittedForm",void 0),ci([se()],pi.prototype,"windowHeight",void 0),ci([se()],pi.prototype,"hasSubmissionError",void 0),ci([se()],pi.prototype,"isSubmitting",void 0),pi=ci([re("email-us-window")],pi);const fi=async(e,t,n,i,r,o,a,s,u)=>{const l="+1"+i.replace("(","").replace(")","").replace(" ","").replace("-",""),d=new URLSearchParams(window.location.search),c={email_address:n,building_id:o,lead_sources:u,first_message:r,first_name:e,last_name:t,phone_number:l,referrer:document.referrer,query_params:Object.fromEntries(d.entries())};await Kt().post("https://app.meetelise.com/platformApi/state/create/emailMe",c,{headers:{"building-slug":s,"org-slug":a,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG"}})};var hi=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 mi=class extends ne{constructor(){super(...arguments),this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.inPopup=!1,this.phoneNumberInputRef=Se(),this.phoneNumber="",this.hasSubmittedForm=!1,this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.isSubmitting=!1,this.currentLeadSource="",this.onChangePhoneNumber=e=>{if(!e.target||!this.phoneNumberInputRef.value)return;if(Ae(e))return;const t=e.target;this.phoneNumber=Re(t.value),this.phoneNumberInputRef.value.value=this.phoneNumber},this.enforceFormat=e=>{Ce(e)||Ae(e)||e.preventDefault()},this.validateFormFields=()=>{this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumber&&14===this.phoneNumber.length||(this.hasPhoneNumberError=!0)},this.onClick=async()=>{if(this.validateFormFields(),!this.hasPhoneNumberError)try{this.isSubmitting=!0,await vi(this.phoneNumber,this.buildingId,this.orgSlug,this.buildingSlug,this.currentLeadSource?[this.currentLeadSource,"property-website"]:["property-website"]),this.hasSubmittedForm=!0,this.isSubmitting=!1}catch(e){this.isSubmitting=!1,this.hasSubmissionError=!0}},this.renderTextUs=()=>D` <div class="text-us-wrapper">
|
|
1858
1857
|
<div class="text-us-window__description">Send us a text</div>
|
|
1859
1858
|
<div class="text-us-window__vertical-spacer"></div>
|
|
1860
1859
|
<div class="text-us-window__input-container">
|
|
@@ -1969,7 +1968,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
1969
1968
|
line-height: 22px;
|
|
1970
1969
|
margin-top: 8px;
|
|
1971
1970
|
}
|
|
1972
|
-
`,Vt],hi([ae({attribute:!1})],mi.prototype,"onCloseClicked",void 0),hi([ae({attribute:!1})],mi.prototype,"buildingId",void 0),hi([ae({attribute:!0})],mi.prototype,"buildingSlug",void 0),hi([ae({attribute:!0})],mi.prototype,"orgSlug",void 0),hi([ae({attribute:!0})],mi.prototype,"inPopup",void 0),hi([se()],mi.prototype,"phoneNumber",void 0),hi([se()],mi.prototype,"hasSubmittedForm",void 0),hi([se()],mi.prototype,"hasPhoneNumberError",void 0),hi([se()],mi.prototype,"hasSubmissionError",void 0),hi([se()],mi.prototype,"isSubmitting",void 0),mi=hi([re("text-us-window")],mi);const vi=async(e,t,n,i)=>{const
|
|
1971
|
+
`,Vt],hi([ae({attribute:!1})],mi.prototype,"onCloseClicked",void 0),hi([ae({attribute:!1})],mi.prototype,"buildingId",void 0),hi([ae({attribute:!0})],mi.prototype,"buildingSlug",void 0),hi([ae({attribute:!0})],mi.prototype,"orgSlug",void 0),hi([ae({attribute:!0})],mi.prototype,"inPopup",void 0),hi([se()],mi.prototype,"phoneNumber",void 0),hi([se()],mi.prototype,"hasSubmittedForm",void 0),hi([se()],mi.prototype,"hasPhoneNumberError",void 0),hi([se()],mi.prototype,"hasSubmissionError",void 0),hi([se()],mi.prototype,"isSubmitting",void 0),hi([ae({attribute:!0})],mi.prototype,"currentLeadSource",void 0),mi=hi([re("text-us-window")],mi);const vi=async(e,t,n,i,r)=>{const o="+1"+e.replace("(","").replace(")","").replace(" ","").replace("-",""),a=new URLSearchParams(window.location.search),s={building_id:t,lead_sources:r,phone_number:o,referrer:document.referrer,query_params:Object.fromEntries(a.entries())};await Kt().post("https://app.meetelise.com/platformApi/state/create/textMe",s,{headers:{"building-slug":i,"org-slug":n,"X-SecurityKey":"JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG"}})},gi=q`<svg width="18" height="20" viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1973
1972
|
<path d="M17.5286 6.72109H0.00730896C0.065762 4.35374 2.00202 2.45401 4.38399 2.45401H4.93198V3.91534C4.93198 4.22222 5.18041 4.46333 5.47998 4.46333C5.77955 4.46333 6.02798 4.22222 6.02798 3.91534V2.45401H11.508V3.91534C11.508 4.22222 11.7564 4.46333 12.056 4.46333C12.3555 4.46333 12.604 4.22222 12.604 3.91534V2.45401H13.1519C15.5339 2.45401 17.4702 4.35374 17.5286 6.72109V6.72109Z" fill="#B6C2FE"/>
|
|
1974
1973
|
<path d="M17.5359 7.45181V15.606C17.5359 18.0318 15.5704 19.99 13.1519 19.99H4.38398C1.96548 19.99 0 18.0318 0 15.606V7.45181H17.5359Z" fill="white"/>
|
|
1975
1974
|
<path d="M5.47998 1V2.46133" stroke="#B6C2FE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -2013,7 +2012,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2013
2012
|
<path d="M5.42513 8.09964C5.24713 8.09964 5.07313 8.15242 4.92514 8.25131C4.77714 8.3502 4.66179 8.49076 4.59367 8.6552C4.52556 8.81965 4.50773 9.0006 4.54246 9.17517C4.57719 9.34975 4.6629 9.51011 4.78876 9.63597C4.91462 9.76183 5.07498 9.84754 5.24955 9.88227C5.42413 9.91699 5.60508 9.89917 5.76953 9.83106C5.93397 9.76294 6.07453 9.64759 6.17342 9.49959C6.27231 9.35159 6.32509 9.1776 6.32509 8.9996C6.32509 8.76092 6.23027 8.53201 6.0615 8.36323C5.89272 8.19446 5.66381 8.09964 5.42513 8.09964ZM9.02497 8.09964C8.84697 8.09964 8.67297 8.15242 8.52498 8.25131C8.37698 8.3502 8.26163 8.49076 8.19351 8.6552C8.1254 8.81965 8.10758 9.0006 8.1423 9.17517C8.17703 9.34975 8.26274 9.51011 8.3886 9.63597C8.51446 9.76183 8.67482 9.84754 8.84939 9.88227C9.02397 9.91699 9.20492 9.89917 9.36937 9.83106C9.53382 9.76294 9.67437 9.64759 9.77326 9.49959C9.87215 9.35159 9.92493 9.1776 9.92493 8.9996C9.92493 8.76092 9.83011 8.53201 9.66134 8.36323C9.49256 8.19446 9.26365 8.09964 9.02497 8.09964ZM12.6248 8.09964C12.4468 8.09964 12.2728 8.15242 12.1248 8.25131C11.9768 8.3502 11.8615 8.49076 11.7934 8.6552C11.7252 8.81965 11.7074 9.0006 11.7421 9.17517C11.7769 9.34975 11.8626 9.51011 11.9884 9.63597C12.1143 9.76183 12.2747 9.84754 12.4492 9.88227C12.6238 9.91699 12.8048 9.89917 12.9692 9.83106C13.1337 9.76294 13.2742 9.64759 13.3731 9.49959C13.472 9.35159 13.5248 9.1776 13.5248 8.9996C13.5248 8.76092 13.43 8.53201 13.2612 8.36323C13.0924 8.19446 12.8635 8.09964 12.6248 8.09964ZM9.02497 0C7.84312 0 6.67285 0.232782 5.58097 0.685054C4.48909 1.13733 3.49698 1.80023 2.66129 2.63592C0.973536 4.32368 0.0253666 6.61276 0.0253666 8.9996C0.017499 11.0777 0.737048 13.0931 2.05928 14.6963L0.259356 16.4963C0.13448 16.6228 0.049887 16.7835 0.0162518 16.9581C-0.0173834 17.1327 0.00144614 17.3133 0.0703646 17.4772C0.145113 17.6392 0.26629 17.7752 0.418511 17.8682C0.570733 17.9611 0.747135 18.0067 0.925327 17.9992H9.02497C11.4118 17.9992 13.7009 17.051 15.3886 15.3633C17.0764 13.6755 18.0246 11.3864 18.0246 8.9996C18.0246 6.61276 17.0764 4.32368 15.3886 2.63592C13.7009 0.94817 11.4118 0 9.02497 0ZM9.02497 16.1993H3.09423L3.93119 15.3623C4.01623 15.279 4.08388 15.1796 4.13022 15.0699C4.17657 14.9602 4.20069 14.8424 4.20118 14.7233C4.1978 14.486 4.10076 14.2595 3.93119 14.0934C2.75277 12.9163 2.01894 11.367 1.85471 9.70948C1.69048 8.05199 2.10602 6.38882 3.03054 5.00335C3.95505 3.61787 5.33134 2.59581 6.92492 2.11128C8.51851 1.62676 10.2308 1.70975 11.77 2.34612C13.3093 2.98249 14.5803 4.13286 15.3665 5.60125C16.1527 7.06964 16.4054 8.7652 16.0817 10.399C15.7579 12.0329 14.8777 13.5039 13.591 14.5616C12.3042 15.6192 10.6906 16.198 9.02497 16.1993Z" fill="#1E1E1E" />
|
|
2014
2013
|
</svg>`,q`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-telephone-fill" viewBox="0 0 16 16">
|
|
2015
2014
|
<path fill-rule="evenodd" d="M1.885.511a1.745 1.745 0 0 1 2.61.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.678.678 0 0 0 .178.643l2.457 2.457a.678.678 0 0 0 .644.178l2.189-.547a1.745 1.745 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.634 18.634 0 0 1-7.01-4.42 18.634 18.634 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877L1.885.511z"/>
|
|
2016
|
-
</svg>`),Ci={},Ni=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];var Ai=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 Ei=class extends ne{constructor(){super(...arguments),this.phoneNumber="1-855-531-5131",this.buildingId=0,this.chatCallUsHeader="",this.hasTextUsEnabled="",this.firstUpdated=async()=>{this.buildingId&&(this.officeHoursTextInfo=await(async e=>{const t=await(async e=>{if(Ci[e])return Ci[e];const t=`https://app.meetelise.com/platformApi/connectors/talk_js/leasing_office_hours/${e}`,n=await Kt().get(t);return Ci[e]=n.data,n.data})(e);return Ni.map((e=>{const n=t[e];return n?{dayOfWeek:e,startTime:n.start,endTime:n.end}:e}))})(this.buildingId))},this.officeHoursTextInfo=[],this.getCallLink=e=>{const t=(e.match(/\d+/g)||[]).join(""),n=t.length<11?`1${t}`:t,i=`+${n[0]}-${n.slice(1,4)}-${n.slice(4,7)}-${n.slice(7)}`;return D`<a href="tel:${i}"
|
|
2015
|
+
</svg>`),Ci={},Ni=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];var Ai=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 Ei=class extends ne{constructor(){super(...arguments),this.phoneNumber="1-855-531-5131",this.buildingId=0,this.chatCallUsHeader="",this.hasTextUsEnabled="",this.currentLeadSource="",this.firstUpdated=async()=>{this.buildingId&&(this.officeHoursTextInfo=await(async e=>{const t=await(async e=>{if(Ci[e])return Ci[e];const t=`https://app.meetelise.com/platformApi/connectors/talk_js/leasing_office_hours/${e}`,n=await Kt().get(t);return Ci[e]=n.data,n.data})(e);return Ni.map((e=>{const n=t[e];return n?{dayOfWeek:e,startTime:n.start,endTime:n.end}:e}))})(this.buildingId))},this.officeHoursTextInfo=[],this.getCallLink=e=>{const t=(e.match(/\d+/g)||[]).join(""),n=t.length<11?`1${t}`:t,i=`+${n[0]}-${n.slice(1,4)}-${n.slice(4,7)}-${n.slice(7)}`;return D`<a href="tel:${i}"
|
|
2017
2016
|
>${e}</a
|
|
2018
2017
|
>`},this.render=()=>D`
|
|
2019
2018
|
<details-window
|
|
@@ -2049,6 +2048,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2049
2048
|
${this.hasTextUsEnabled?D` <text-us-window
|
|
2050
2049
|
.buildingId=${this.buildingId}
|
|
2051
2050
|
inPopup=${!this.hasTextUsEnabled}
|
|
2051
|
+
currentLeadSource="${this.currentLeadSource}"
|
|
2052
2052
|
></text-us-window>`:""}
|
|
2053
2053
|
</details-window>
|
|
2054
2054
|
`}};Ei.styles=[a`
|
|
@@ -2103,7 +2103,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2103
2103
|
.call-us-window__open-times {
|
|
2104
2104
|
text-transform: lowercase;
|
|
2105
2105
|
}
|
|
2106
|
-
`],Ai([ae({attribute:!1})],Ei.prototype,"onCloseClicked",void 0),Ai([ae()],Ei.prototype,"phoneNumber",void 0),Ai([ae({attribute:!1})],Ei.prototype,"buildingId",void 0),Ai([ae({attribute:!0})],Ei.prototype,"chatCallUsHeader",void 0),Ai([ae({attribute:!0})],Ei.prototype,"hasTextUsEnabled",void 0),Ai([ae({attribute:!1})],Ei.prototype,"officeHoursTextInfo",void 0),Ei=Ai([re("call-us-window")],Ei);const _i={};var Fi=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 Mi=class extends ne{constructor(){super(...arguments),this.isMobile=!1,this.isFirstMount=!1,this.backgroundColor="rgba(255, 255, 255, 0.75)",this.textColor="#202020",this.isMini=!0,this.autoOpenChatWidget=!1,this.phoneNumber="",this.chatId="",this.chatCallUsHeader="",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.sgtUrl="",this.buildingABTestType="",this.leadSources=[],this.currentLeadSource="",this.escortedToursLink="",this.virtualToursLink="",this.hasCallUsEnabled=!1,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasSSTEnabled=!1,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.launcherStyles={},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber&&this.hasCallUsEnabled,this.hasSSTEnabled,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=Se(),this.textUsWindowRef=Se(),this.tourSchedulerRef=Se(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(_i[e])return _i[e];const t=`https://app.meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,n=await Kt().get(t);return _i[e]=n.data,n.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&this.hasTextUsEnabled&&4895!==this.buildingId,await async function(e){return!!e}(this.buildingId)&&this.hasSSTEnabled&&(this.hasSSTEnabled=!0)}},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToTextUsWindow=()=>{const e=this.textUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseTextUsWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerRef.value;e&&(e.onCloseClicked=this.onCloseSSTWindow)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.renderEmailOption=()=>{const e=this.getNumCallToActions()>2?"Email":"Email us";return D`
|
|
2106
|
+
`],Ai([ae({attribute:!1})],Ei.prototype,"onCloseClicked",void 0),Ai([ae()],Ei.prototype,"phoneNumber",void 0),Ai([ae({attribute:!1})],Ei.prototype,"buildingId",void 0),Ai([ae({attribute:!0})],Ei.prototype,"chatCallUsHeader",void 0),Ai([ae({attribute:!0})],Ei.prototype,"hasTextUsEnabled",void 0),Ai([ae({attribute:!0})],Ei.prototype,"currentLeadSource",void 0),Ai([ae({attribute:!1})],Ei.prototype,"officeHoursTextInfo",void 0),Ei=Ai([re("call-us-window")],Ei);const _i={};var Fi=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 Mi=class extends ne{constructor(){super(...arguments),this.isMobile=!1,this.isFirstMount=!1,this.backgroundColor="rgba(255, 255, 255, 0.75)",this.textColor="#202020",this.isMini=!0,this.autoOpenChatWidget=!1,this.phoneNumber="",this.chatId="",this.chatCallUsHeader="",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.sgtUrl="",this.buildingABTestType="",this.leadSources=[],this.currentLeadSource="",this.escortedToursLink="",this.virtualToursLink="",this.hasCallUsEnabled=!1,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasSSTEnabled=!1,this.hasTextUsEnabled=!1,this.layoutOptions=[],this.unitOptions=[],this.tourTypeOptions=[],this.onChatTapped=()=>{},this.launcherStyles={},this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.getNumCallToActions=()=>[this.hasEmailEnabled,!!this.phoneNumber&&this.hasCallUsEnabled,this.hasSSTEnabled,this.hasTextUsEnabled].filter((e=>e)).length,this.emailUsWindowRef=Se(),this.textUsWindowRef=Se(),this.tourSchedulerRef=Se(),this.updated=async()=>{if(this.attachOnClickToEmailUsWindow(),this.attachOnClickToTextUsWindow(),this.attachOnClickToSSTWindow(),this.buildingId){const e=await(async e=>{if(_i[e])return _i[e];const t=`https://app.meetelise.com/sms_management_numbers/webchat/building/${e}/numbers`,n=await Kt().get(t);return _i[e]=n.data,n.data})(this.buildingId);this.hasTextUsEnabled=e.length>0&&this.hasTextUsEnabled&&4895!==this.buildingId,await async function(e){return!!e}(this.buildingId)&&this.hasSSTEnabled&&(this.hasSSTEnabled=!0)}},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToTextUsWindow=()=>{const e=this.textUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseTextUsWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerRef.value;e&&(e.onCloseClicked=this.onCloseSSTWindow)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.renderEmailOption=()=>{const e=this.getNumCallToActions()>2?"Email":"Email us";return D`
|
|
2107
2107
|
<div
|
|
2108
2108
|
@click=${this.onClickEmailOption}
|
|
2109
2109
|
class="launcher__call-to-action-option"
|
|
@@ -2196,6 +2196,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2196
2196
|
buildingSlug="${this.buildingSlug}"
|
|
2197
2197
|
${Oe(this.textUsWindowRef)}
|
|
2198
2198
|
.buildingId=${this.buildingId}
|
|
2199
|
+
currentLeadSource="${this.currentLeadSource}"
|
|
2199
2200
|
></text-us-window>
|
|
2200
2201
|
</div>`:""}
|
|
2201
2202
|
${this.isSSTWindowOpen?D`<div class="launcher__window-wrapper">
|
|
@@ -2223,6 +2224,7 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2223
2224
|
.buildingId=${this.buildingId}
|
|
2224
2225
|
chatCallUsHeader="${this.chatCallUsHeader}"
|
|
2225
2226
|
hasTextUsEnabled=${!!this.hasTextUsEnabled||""}
|
|
2227
|
+
currentLeadSource="${this.currentLeadSource}"
|
|
2226
2228
|
></call-us-window>
|
|
2227
2229
|
</div>
|
|
2228
2230
|
`:""}
|
|
@@ -405,6 +405,7 @@ export class Launcher extends LitElement {
|
|
|
405
405
|
buildingSlug="${this.buildingSlug}"
|
|
406
406
|
${ref(this.textUsWindowRef)}
|
|
407
407
|
.buildingId=${this.buildingId}
|
|
408
|
+
currentLeadSource="${this.currentLeadSource}"
|
|
408
409
|
></text-us-window>
|
|
409
410
|
</div>`
|
|
410
411
|
: ""}
|
|
@@ -436,6 +437,7 @@ export class Launcher extends LitElement {
|
|
|
436
437
|
.buildingId=${this.buildingId}
|
|
437
438
|
chatCallUsHeader="${this.chatCallUsHeader}"
|
|
438
439
|
hasTextUsEnabled=${this.hasTextUsEnabled ? true : ""}
|
|
440
|
+
currentLeadSource="${this.currentLeadSource}"
|
|
439
441
|
></call-us-window>
|
|
440
442
|
</div>
|
|
441
443
|
`
|
|
@@ -47,16 +47,15 @@ export class ActionConfirmButton extends LitElement {
|
|
|
47
47
|
.lds-ring {
|
|
48
48
|
display: inline-block;
|
|
49
49
|
position: relative;
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
50
|
+
width: 28px;
|
|
51
|
+
height: 28px;
|
|
52
52
|
}
|
|
53
53
|
.lds-ring div {
|
|
54
54
|
box-sizing: border-box;
|
|
55
55
|
display: block;
|
|
56
56
|
position: absolute;
|
|
57
|
-
width:
|
|
58
|
-
height:
|
|
59
|
-
margin: 8px;
|
|
57
|
+
width: 28px;
|
|
58
|
+
height: 28px;
|
|
60
59
|
border: 8px solid #fff;
|
|
61
60
|
border-radius: 50%;
|
|
62
61
|
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
@@ -74,6 +74,9 @@ export class CallUsWindow extends LitElement {
|
|
|
74
74
|
@property({ attribute: true })
|
|
75
75
|
hasTextUsEnabled = "";
|
|
76
76
|
|
|
77
|
+
@property({ attribute: true })
|
|
78
|
+
currentLeadSource = "";
|
|
79
|
+
|
|
77
80
|
firstUpdated = async (): Promise<void> => {
|
|
78
81
|
if (!this.buildingId) {
|
|
79
82
|
return;
|
|
@@ -143,6 +146,7 @@ export class CallUsWindow extends LitElement {
|
|
|
143
146
|
? html` <text-us-window
|
|
144
147
|
.buildingId=${this.buildingId}
|
|
145
148
|
inPopup=${!this.hasTextUsEnabled}
|
|
149
|
+
currentLeadSource="${this.currentLeadSource}"
|
|
146
150
|
></text-us-window>`
|
|
147
151
|
: ""}
|
|
148
152
|
</details-window>
|
|
@@ -91,6 +91,9 @@ export class TextUsWindow extends LitElement {
|
|
|
91
91
|
@state()
|
|
92
92
|
isSubmitting = false;
|
|
93
93
|
|
|
94
|
+
@property({ attribute: true })
|
|
95
|
+
currentLeadSource = "";
|
|
96
|
+
|
|
94
97
|
onChangePhoneNumber = (e: Event): void => {
|
|
95
98
|
if (!e.target || !this.phoneNumberInputRef.value) {
|
|
96
99
|
return;
|
|
@@ -130,7 +133,10 @@ export class TextUsWindow extends LitElement {
|
|
|
130
133
|
this.phoneNumber,
|
|
131
134
|
this.buildingId,
|
|
132
135
|
this.orgSlug,
|
|
133
|
-
this.buildingSlug
|
|
136
|
+
this.buildingSlug,
|
|
137
|
+
this.currentLeadSource
|
|
138
|
+
? [this.currentLeadSource, "property-website"]
|
|
139
|
+
: ["property-website"]
|
|
134
140
|
);
|
|
135
141
|
this.hasSubmittedForm = true;
|
|
136
142
|
this.isSubmitting = false;
|
|
@@ -245,7 +251,8 @@ const createTextWithUs = async (
|
|
|
245
251
|
rawPhoneNumber: string,
|
|
246
252
|
buildingId: number,
|
|
247
253
|
orgSlug: string,
|
|
248
|
-
buildingSlug: string
|
|
254
|
+
buildingSlug: string,
|
|
255
|
+
leadSources: string[]
|
|
249
256
|
) => {
|
|
250
257
|
const formattedPhoneNumber =
|
|
251
258
|
"+1" +
|
|
@@ -257,7 +264,7 @@ const createTextWithUs = async (
|
|
|
257
264
|
const queryParams = new URLSearchParams(window.location.search);
|
|
258
265
|
const requestBody = {
|
|
259
266
|
building_id: buildingId,
|
|
260
|
-
lead_sources:
|
|
267
|
+
lead_sources: leadSources,
|
|
261
268
|
phone_number: formattedPhoneNumber,
|
|
262
269
|
referrer: document.referrer,
|
|
263
270
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|