@meetelise/chat 1.71.0 → 1.73.0
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/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +7 -0
- package/dist/src/WebComponent/SchedulerV2/community-picker.d.ts +5 -24
- package/dist/src/WebComponent/SchedulerV2/itinerary-editor.d.ts +5 -0
- package/dist/src/WebComponent/SchedulerV2/tour-scheduler-v2.d.ts +21 -3
- package/dist/src/fetchFloorplanOptions.d.ts +10 -0
- package/package.json +1 -1
- package/public/dist/index.js +486 -468
- package/src/WebComponent/Scheduler/tour-scheduler.ts +69 -27
- package/src/WebComponent/SchedulerV2/community-picker.ts +56 -175
- package/src/WebComponent/SchedulerV2/itinerary-editor.ts +41 -7
- package/src/WebComponent/SchedulerV2/tour-scheduler-v2.ts +151 -25
- package/src/WebComponent/me-select.ts +1 -3
- package/src/fetchFloorplanOptions.ts +38 -0
- package/src/meSelectMenuWidth.test.ts +51 -0
- package/src/tourSchedulerFloorplanPreference.test.ts +208 -0
- package/src/tourSchedulerV2Booking.test.ts +84 -3
package/public/dist/index.js
CHANGED
|
@@ -810,9 +810,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
810
810
|
overflow-y: scroll;
|
|
811
811
|
position: absolute;
|
|
812
812
|
min-height: 40px;
|
|
813
|
-
|
|
814
|
-
max-width: 400px;
|
|
815
|
-
width: max-content;
|
|
813
|
+
width: 100%;
|
|
816
814
|
background-color: white;
|
|
817
815
|
z-index: 20;
|
|
818
816
|
margin-top: 4px;
|
|
@@ -876,10 +874,10 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
876
874
|
.option.active {
|
|
877
875
|
background-color: var(--active-option-color);
|
|
878
876
|
}
|
|
879
|
-
`,Me],Ur([pe({attribute:!1})],jr.prototype,"options",void 0),Ur([pe({type:String})],jr.prototype,"placeholder",void 0),Ur([pe({type:String})],jr.prototype,"value",void 0),Ur([fe()],jr.prototype,"activeOption",void 0),Ur([fe()],jr.prototype,"isOpen",void 0),Ur([fe()],jr.prototype,"activeOptionIndex",void 0),Ur([fe()],jr.prototype,"searchTerm",void 0),Ur([ge("#select",!0)],jr.prototype,"meSelect",void 0),Ur([ge("#selectText",!0)],jr.prototype,"selectInput",void 0),jr=Ur([ce("me-select")],jr),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(Gr||(Gr={}));var Vr=n(2013),Wr=n.n(Vr);Math.pow(10,8);var Qr=6e4,qr=36e5;function Yr(e,t){si(1,arguments);var n=t||{},i=null==n.additionalDigits?2:$i(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=function(e){var t,n={},i=e.split(Kr.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],Kr.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Kr.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=Kr.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e);if(o.date){var a=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,o=i[2]?parseInt(i[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((i[1]||i[2]).length)}}(o.date,i);r=function(e,t){if(null===t)return new Date(NaN);var n=e.match(Xr);if(!n)return new Date(NaN);var i=!!n[4],r=eo(n[1]),o=eo(n[2])-1,a=eo(n[3]),s=eo(n[4]),l=eo(n[5])-1;if(i)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,o=7*(t-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+o),i}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(no[t]||(io(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(io(e)?366:365)}(t,r)?(u.setUTCFullYear(t,o,Math.max(r,a)),u):new Date(NaN)}(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,l=r.getTime(),u=0;if(o.time&&(u=function(e){var t=e.match(Zr);if(!t)return NaN;var n=to(t[1]),i=to(t[2]),r=to(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,i,r))return NaN;return n*qr+i*Qr+1e3*r}(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var d=new Date(l+u),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return s=function(e){if("Z"===e)return 0;var t=e.match(Jr);if(!t)return 0;var n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(i*qr+r*Qr)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var Kr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Xr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zr=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Jr=/^([+-])(\d{2})(?::?(\d{2}))?$/;function eo(e){return e?parseInt(e):1}function to(e){return e&&parseFloat(e.replace(",","."))||0}var no=[31,null,31,30,31,30,31,31,30,31,30,31];function io(e){return e%400==0||e%4==0&&e%100!=0}const ro={buildingId:null,availabilities:{}},oo=()=>{ro.buildingId=null,ro.availabilities={}},ao=async e=>{e&&(ro.buildingId=e);const t=ro.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=ro.availabilities;if(n[t])return n[t];const i=Hr(),o=Fr(function(e){si(1,arguments);var t=li(e);return t.setHours(23,59,59,999),t}(zr(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(Fr(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return ro.availabilities[t]=s.data,s.data},so=async(e,t)=>{var n,i;const r=await ao(t),o=(null===(n=r.availability)||void 0===n?void 0:n[e])?null===(i=r.availability)||void 0===i?void 0:i[e].availableTourStartTimes:[];return r.availability?{...r.availability[e],availableTourStartTimes:o}:null},lo=async()=>{var e,t,n,i,r,o;return{[yu.Guided]:!!(null===(t=null===(e=await so(Gr.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[yu.Self]:!!(null===(i=null===(n=await so(Gr.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[yu.Virtual]:!!(null===(o=null===(r=await so(Gr.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}},uo=async(e,t)=>{var n,i;const r=await so(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter(e=>di(Yr(e))&&!function(e){return si(1,arguments),li(e).getTime()<Date.now()}(Yr(e))):[])||void 0===n?void 0:n.map(e=>co(e))};return Wr()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],e=>ir(new Date(e.datetime),"yyyy-MM-dd"))},co=e=>({datetime:e.slice(0,19),offset:e.slice(19)});var ho=n(3916),po=n.n(ho),fo=n(2485),go=n.n(fo);const mo=e=>`https://app.meetelise.com/platformApi/webchat/${e}/chat-ui-feature-flag`;var bo;async function yo(e){if(!e)return!1;try{return(await r().get(mo(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-applications-link-replacement",default_str:null,default_bool:!1}})).data}catch(e){return!1}}!function(e){e.onAttributionFailure="on-attribution-failure",e.never="never",e.always="always"}(bo||(bo={}));const vo=e=>`https://app.meetelise.com/platformApi/webchat/${e}/tracked-rollout`;async function wo(e){if(!e)return!1;try{return(await r().get(vo(e),{params:{rollout_name:"webchat_bedroom_preference_required",default_value:!1}})).data}catch(e){return!1}}async function Co(e){if(!e)return!1;try{return!0===(await r().get(vo(e),{params:{rollout_name:"webchat_tour_scheduler_v2",default_value:!1},timeout:3e3})).data}catch(e){return!1}}async function xo(e){if(!e)return!1;try{return!0===(await r().get(vo(e),{params:{rollout_name:"broker_rollout",default_value:!1},timeout:3e3})).data}catch(e){return!1}}function $o(){return ko()?function(){const e=window.location.search,t={},n=e.split("?").slice(1).join("&");return n.split("&").forEach(e=>{const[n,i]=e.split("=");n&&i&&(t[decodeURIComponent(n)]=decodeURIComponent(i))}),t}():function(){const e=new URLSearchParams(window.location.search),t=e.has("utm_content"),n=e.has("utm_source");if(t&&!n){const t=e.get("utm_content");e.delete("utm_content"),e.set("utm_source",t)}return Object.fromEntries(e)}()}function So(e,t){if(!e||!t)return e;try{const n=new URL(e);return Object.entries(t).forEach(([e,t])=>{n.searchParams.set(e,t)}),n.toString()}catch(t){return e}}const ko=()=>(window.location.search.match(/\?/g)||[]).length>1,Ao=[57,2575,2332],To=["email","phone","firstName","lastName","message","tourDetails"];let Eo=!1;const _o=(e,t={})=>{window.dataLayer=window.dataLayer||[];let n=t;if(Eo){n={...t};for(const e of To)delete n[e]}window.dataLayer.push({event:e,...n})};class Oo extends we{constructor(e){if(super(e),this.it=V,e.type!==ye)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===V||null==e)return this.ft=void 0,this.it=e;if(e===G)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this.ft;this.it=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Oo.directiveName="unsafeHTML",Oo.resultType=1;const Po=ve(Oo),Io=z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
877
|
+
`,Me],Ur([pe({attribute:!1})],jr.prototype,"options",void 0),Ur([pe({type:String})],jr.prototype,"placeholder",void 0),Ur([pe({type:String})],jr.prototype,"value",void 0),Ur([fe()],jr.prototype,"activeOption",void 0),Ur([fe()],jr.prototype,"isOpen",void 0),Ur([fe()],jr.prototype,"activeOptionIndex",void 0),Ur([fe()],jr.prototype,"searchTerm",void 0),Ur([ge("#select",!0)],jr.prototype,"meSelect",void 0),Ur([ge("#selectText",!0)],jr.prototype,"selectInput",void 0),jr=Ur([ce("me-select")],jr),function(e){e.Unknown="UNKNOWN",e.SelfGuided="SELF_GUIDED",e.VirtualShowing="VIRTUAL_SHOWING",e.WithAgent="WITH_AGENT",e.MediaTour="MEDIA_TOUR"}(Gr||(Gr={}));var Vr=n(2013),Wr=n.n(Vr);Math.pow(10,8);var Qr=6e4,qr=36e5;function Yr(e,t){si(1,arguments);var n=t||{},i=null==n.additionalDigits?2:$i(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=function(e){var t,n={},i=e.split(Kr.dateTimeDelimiter);if(i.length>2)return n;/:/.test(i[0])?t=i[0]:(n.date=i[0],t=i[1],Kr.timeZoneDelimiter.test(n.date)&&(n.date=e.split(Kr.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length)));if(t){var r=Kr.timezone.exec(t);r?(n.time=t.replace(r[1],""),n.timezone=r[1]):n.time=t}return n}(e);if(o.date){var a=function(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=e.match(n);if(!i)return{year:NaN,restDateString:""};var r=i[1]?parseInt(i[1]):null,o=i[2]?parseInt(i[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((i[1]||i[2]).length)}}(o.date,i);r=function(e,t){if(null===t)return new Date(NaN);var n=e.match(Xr);if(!n)return new Date(NaN);var i=!!n[4],r=eo(n[1]),o=eo(n[2])-1,a=eo(n[3]),s=eo(n[4]),l=eo(n[5])-1;if(i)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,s,l)?function(e,t,n){var i=new Date(0);i.setUTCFullYear(e,0,4);var r=i.getUTCDay()||7,o=7*(t-1)+n+1-r;return i.setUTCDate(i.getUTCDate()+o),i}(t,s,l):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(no[t]||(io(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(io(e)?366:365)}(t,r)?(u.setUTCFullYear(t,o,Math.max(r,a)),u):new Date(NaN)}(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,l=r.getTime(),u=0;if(o.time&&(u=function(e){var t=e.match(Zr);if(!t)return NaN;var n=to(t[1]),i=to(t[2]),r=to(t[3]);if(!function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,i,r))return NaN;return n*qr+i*Qr+1e3*r}(o.time),isNaN(u)))return new Date(NaN);if(!o.timezone){var d=new Date(l+u),c=new Date(0);return c.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),c.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),c}return s=function(e){if("Z"===e)return 0;var t=e.match(Jr);if(!t)return 0;var n="+"===t[1]?-1:1,i=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,r))return NaN;return n*(i*qr+r*Qr)}(o.timezone),isNaN(s)?new Date(NaN):new Date(l+u+s)}var Kr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Xr=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zr=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Jr=/^([+-])(\d{2})(?::?(\d{2}))?$/;function eo(e){return e?parseInt(e):1}function to(e){return e&&parseFloat(e.replace(",","."))||0}var no=[31,null,31,30,31,30,31,31,30,31,30,31];function io(e){return e%400==0||e%4==0&&e%100!=0}const ro={buildingId:null,availabilities:{}},oo=()=>{ro.buildingId=null,ro.availabilities={}},ao=async e=>{e&&(ro.buildingId=e);const t=ro.buildingId;if(!t)throw new Error("No buildingId was provided to getRawAvailabilities and there is no buildingId cached.");const n=ro.availabilities;if(n[t])return n[t];const i=Hr(),o=Fr(function(e){si(1,arguments);var t=li(e);return t.setHours(23,59,59,999),t}(zr(i,30))),a=`https://app.meetelise.com/api/pub/v1/buildings/${t}/tour/availabilities?${`startTime=${encodeURIComponent(Fr(i))}&endTime=${encodeURIComponent(o)}`}`,s=await r().get(a);return ro.availabilities[t]=s.data,s.data},so=async(e,t)=>{var n,i;const r=await ao(t),o=(null===(n=r.availability)||void 0===n?void 0:n[e])?null===(i=r.availability)||void 0===i?void 0:i[e].availableTourStartTimes:[];return r.availability?{...r.availability[e],availableTourStartTimes:o}:null},lo=async()=>{var e,t,n,i,r,o;return{[vu.Guided]:!!(null===(t=null===(e=await so(Gr.WithAgent))||void 0===e?void 0:e.availableTourStartTimes)||void 0===t?void 0:t.length),[vu.Self]:!!(null===(i=null===(n=await so(Gr.SelfGuided))||void 0===n?void 0:n.availableTourStartTimes)||void 0===i?void 0:i.length),[vu.Virtual]:!!(null===(o=null===(r=await so(Gr.VirtualShowing))||void 0===r?void 0:r.availableTourStartTimes)||void 0===o?void 0:o.length)}},uo=async(e,t)=>{var n,i;const r=await so(e,t);if(!r)return{};const o={availableTourStartTimes:null===(n=r.availableTourStartTimes?r.availableTourStartTimes.filter(e=>di(Yr(e))&&!function(e){return si(1,arguments),li(e).getTime()<Date.now()}(Yr(e))):[])||void 0===n?void 0:n.map(e=>co(e))};return Wr()(null!==(i=o.availableTourStartTimes)&&void 0!==i?i:[],e=>ir(new Date(e.datetime),"yyyy-MM-dd"))},co=e=>({datetime:e.slice(0,19),offset:e.slice(19)});var ho=n(3916),po=n.n(ho),fo=n(2485),go=n.n(fo);const mo=e=>`https://app.meetelise.com/platformApi/webchat/${e}/chat-ui-feature-flag`;var bo;async function yo(e){if(!e)return!1;try{return(await r().get(mo(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-applications-link-replacement",default_str:null,default_bool:!1}})).data}catch(e){return!1}}!function(e){e.onAttributionFailure="on-attribution-failure",e.never="never",e.always="always"}(bo||(bo={}));const vo=e=>`https://app.meetelise.com/platformApi/webchat/${e}/tracked-rollout`;async function wo(e){if(!e)return!1;try{return(await r().get(vo(e),{params:{rollout_name:"webchat_bedroom_preference_required",default_value:!1}})).data}catch(e){return!1}}async function Co(e){if(!e)return!1;try{return!0===(await r().get(vo(e),{params:{rollout_name:"webchat_tour_scheduler_v2",default_value:!1},timeout:3e3})).data}catch(e){return!1}}async function xo(e){if(!e)return!1;try{return!0===(await r().get(vo(e),{params:{rollout_name:"broker_rollout",default_value:!1},timeout:3e3})).data}catch(e){return!1}}class $o{constructor(e,t,n,i){this.org=e,this.building=t,this.chatId=n,this.incomingProcessedLeadSource=i,this.featureFlags={}}setFeatureFlags(e){this.featureFlags={...this.featureFlags,...e}}ping(e){var t;fetch("https://app.meetelise.com/platformApi/connectors/talk_js/analytics",{method:"POST",credentials:"omit",keepalive:!0,headers:{"content-type":"application/json; charset=UTF-8"},body:JSON.stringify({eventType:e,chatId:this.chatId,url:location.href,org:this.org,building:this.building,referrer:document.referrer,featureFlags:this.featureFlags,campaignSources:So(),incomingProcessedLeadSource:this.incomingProcessedLeadSource,webchatVersion:null!==(t="MISSING_ENV_VAR".npm_package_version)&&void 0!==t?t:"1.20.155"})})}}const So=()=>{var e,t,n,i,r,o;try{const i=new URL(window.location.href).searchParams,r=null!==(n=null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&void 0!==n?n:null,o=i.get("switch_cls[id]"),a=i.get("ilm"),s=i.get("utm_source");return{entrataCampaignSource:o,realpageCampaignSource:a,utmCampaignSource:s,yardiCampaignSource:r,bozzutoAdSource:Dr("bozzuto_ad_source")}}catch(e){const t=document.createElement("iframe");if(t.style.display="none",document.body.appendChild(t),!t.contentWindow)return{entrataCampaignSource:null,realpageCampaignSource:null,utmCampaignSource:null,yardiCampaignSource:null,bozzutoAdSource:null};const n=t.contentWindow.URL;if(!n)return{entrataCampaignSource:null,realpageCampaignSource:null,utmCampaignSource:null,yardiCampaignSource:null,bozzutoAdSource:null};const a=new n(window.location.href).searchParams,s=null!==(o=null===(r=null===(i=window.RCTPCampaign)||void 0===i?void 0:i.CampaignDetails)||void 0===r?void 0:r.Source)&&void 0!==o?o:null;return{entrataCampaignSource:a.get("switch_cls[id]"),realpageCampaignSource:a.get("ilm"),utmCampaignSource:a.get("utm_source"),yardiCampaignSource:s,bozzutoAdSource:Dr("bozzuto_ad_source")}}};var ko;!function(e){e.error="error",e.info="info",e.warn="warn"}(ko||(ko={}));const Ao=async({logType:e,buildingSlug:t,orgSlug:n,logTitle:o,logData:a,error:s})=>{var l;if(s instanceof i.AxiosError&&403===(null===(l=s.response)||void 0===l?void 0:l.status))return;await r().post("https://app.meetelise.com/platformApi/webchat/logging",{...a},{headers:{"Content-Type":"application/json","building-slug":null!=t?t:"","org-slug":null!=n?n:"","log-type":null!=e?e:ko.error,"log-title":o.toUpperCase().replace(/\s/g,"_")}})},To=async({params:e,sampleRate:t})=>{try{if(Math.random()>=t)return;await r().post("https://app.meetelise.com/platformApi/webchat/log/signal",{...e,website_origin:window.location.origin,website_search:window.location.search})}catch(e){}},Eo="https://app.meetelise.com",_o=async e=>{if(!e)return[];try{const t=await r().get(`${Eo}/platformApi/webchat/${e}/floorplan-options`,{timeout:3e3});return Array.isArray(t.data)?t.data.filter(e=>!!(null==e?void 0:e.name)):[]}catch(t){return Ao({logType:ko.error,buildingSlug:e,logTitle:"[ERROR_GETTING_FLOORPLAN_OPTIONS]",logData:{error:t},error:t}),[]}};function Oo(){return Io()?function(){const e=window.location.search,t={},n=e.split("?").slice(1).join("&");return n.split("&").forEach(e=>{const[n,i]=e.split("=");n&&i&&(t[decodeURIComponent(n)]=decodeURIComponent(i))}),t}():function(){const e=new URLSearchParams(window.location.search),t=e.has("utm_content"),n=e.has("utm_source");if(t&&!n){const t=e.get("utm_content");e.delete("utm_content"),e.set("utm_source",t)}return Object.fromEntries(e)}()}function Po(e,t){if(!e||!t)return e;try{const n=new URL(e);return Object.entries(t).forEach(([e,t])=>{n.searchParams.set(e,t)}),n.toString()}catch(t){return e}}const Io=()=>(window.location.search.match(/\?/g)||[]).length>1,No=[57,2575,2332],Mo=["email","phone","firstName","lastName","message","tourDetails"];let Do=!1;const Lo=(e,t={})=>{window.dataLayer=window.dataLayer||[];let n=t;if(Do){n={...t};for(const e of Mo)delete n[e]}window.dataLayer.push({event:e,...n})};class Ro extends we{constructor(e){if(super(e),this.it=V,e.type!==ye)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===V||null==e)return this.ft=void 0,this.it=e;if(e===G)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this.ft;this.it=e;const t=[e];return t.raw=t,this.ft={_$litType$:this.constructor.resultType,strings:t,values:[]}}}Ro.directiveName="unsafeHTML",Ro.resultType=1;const Bo=ve(Ro),Uo=z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
880
878
|
<rect x="1" y="1" width="22" height="22" stroke="black" stroke-width="2" rx="2"/>
|
|
881
879
|
</svg>
|
|
882
|
-
`,
|
|
880
|
+
`,jo=(z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="17" viewBox="0 0 16 17" fill="none">
|
|
883
881
|
<rect y="0.09375" width="16" height="16" rx="2" fill="#4719CD"/>
|
|
884
882
|
<path d="M12 5.09375L6.5 10.5938L4 8.09375" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
|
885
883
|
</svg>`,()=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="25" height="25" viewBox="0 0 25 25" fill="none">
|
|
@@ -890,15 +888,15 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
890
888
|
</pattern>
|
|
891
889
|
<image id="image0_999_1441" width="256" height="256" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAMa2lDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnluSkJDQAghICb0jUgNICaEFkN5thCSQUGJMCCr2sqjg2kUUK7oqomBZaXbsyqLY+2JBRVkXdbGh8iYkoOu+8r3zfXPvnzNn/lPuTO49AGh+4Eok+agWAAXiQmlCeDAjLT2DQXoGEEABZOAJiFyeTMKKi4sGUAbvf5d3N6A1lKvOCq5/zv9X0eELZDwAkLEQZ/FlvAKIjwOAr+dJpIUAEBV6y8mFEgWeDbGuFAYI8SoFzlHinQqcpcSHB2ySEtgQXwZAjcrlSnMA0LgH9YwiXg7k0fgMsauYLxIDoOkEcQBPyOVDrIjdqaBgogJXQGwH7SU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0/afOb8CS/4QePZA4N8tQ0XExoA2KyFmvQzagGvEVAQg4Wz3z7yunZ35WdkHjCFyFgB6cwgpNoB8YBBf21+KFAg/2ZEWfTsCLrPmwq9nYH2jaxz8A9nF/79s1LvU3Dz9++1cAMAe+0X26P1TYGA61N3PPcFvd4TP+fBgNdDM/CvCSho7MDHDwoLMNI8XugRdqV3W5fnQGA9PULfbU197OGr7v4Eo/rKs58EX+/UAIBaouFnpQUCENiT/Py4wKDbW7muw3hB7/RTpB2oUikoKB7OWALCrDEFhT33+QthV6QJfa8z+Yl+NnlXldCTzddXt+0H3gDAfvgV9+g7pGCAXY2affyv3nfowPGrngEgtLKVG9r9/vVVoLDl16Z3h6yHN8+hryLwi1d947OX3r3wNan3JKtee3FUn/pvhRoA2EprNXl3rAWqhC4MtNkTBQqm1l88f+zGwwADFQEcfIUACgRbcQg44U578mvwB6/80tevuWj5eFVvXvV87tnv1ADAfv+F9+j7FQJJ/TeZX/dAQXZpEmk8adBWys7v2L/fDQDs3992371ZSXC383abAMl2imzuaVqgaYFz0QJ2vuFmj5UGsFm+Jr1pgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhZoWqBpgaYFmhbY9S3w/30FRG3JAQVvAAAAAElFTkSuQmCC"/>
|
|
892
890
|
</defs>
|
|
893
|
-
</svg>`),
|
|
894
|
-
style=${Xn(
|
|
891
|
+
</svg>`),Fo={fontSize:"10px",paddingTop:"4px"},Ho={color:"#4287f5"},zo={margin:"0 0 4px"},Go=["UT","ME"],Vo="https://eliseai.com/canada-policy",Wo=e=>"CA"===e,Qo="https://eliseai.com/fr/canada-policy",qo="https://eliseai.com/fr/msgterms",Yo=e=>"QC"===(null==e?void 0:e.trim().toUpperCase()),Ko=(e,t)=>H`<a
|
|
892
|
+
style=${Xn(Ho)}
|
|
895
893
|
href=${e}
|
|
896
894
|
target="_blank"
|
|
897
895
|
rel="noopener noreferrer"
|
|
898
896
|
>${t}</a
|
|
899
|
-
>`,
|
|
900
|
-
ainsi qu’à ces ${
|
|
901
|
-
and these ${
|
|
897
|
+
>`,Xo=(e,t,n=!1)=>{const[i,r]=((e,t)=>{const n=H`${Ko(Qo,"Politique relative à la protection des renseignements personnels")}
|
|
898
|
+
ainsi qu’à ces ${Ko(qo,"Conditions générales")}`,i=H`${Ko(Qo,"privacy policy")}
|
|
899
|
+
and these ${Ko(qo,"terms and conditions")}`;return"textUs"===e?[H`Lorsque vous fournissez votre numéro de téléphone et que vous cliquez
|
|
902
900
|
sur Envoyer (send), vous consentez à recevoir des messages électroniques
|
|
903
901
|
et des appels récurrents de nature commerciale de la part de
|
|
904
902
|
${t} ou en son nom à ce numéro, dans la mesure où cela est
|
|
@@ -952,13 +950,13 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
952
950
|
You consent to this ${i}, including having your email address,
|
|
953
951
|
number, and communications recorded and used by our service provider EliseAI
|
|
954
952
|
to generate responses and improve their services. You may withdraw your
|
|
955
|
-
consent at any time by unsubscribing or contacting us.`]})(e,t),o=Xn(
|
|
953
|
+
consent at any time by unsubscribing or contacting us.`]})(e,t),o=Xn(zo);return H`<p style=${o}>${i}</p>
|
|
956
954
|
<p style=${o}>${r}</p>
|
|
957
955
|
${"textUs"===e||n?H`<p style=${o}>
|
|
958
956
|
Msg freq varies. Text STOP to opt-out of messages. Text HELP for
|
|
959
957
|
assistance.
|
|
960
|
-
</p>`:""}`},
|
|
961
|
-
<div>${
|
|
958
|
+
</p>`:""}`},Zo="currentConsentId",Jo=(e,t,n,i,r)=>{const o=Wo(r)?Vo:t,a=e=>{var t;const n=null===(t=e.currentTarget)||void 0===t?void 0:t.getRootNode();if(!(n instanceof ShadowRoot))return;const i=n.host,r=()=>{if("function"==typeof i.focusMessageField)return void i.focusMessageField();const e=n.getElementById("message-input");e instanceof HTMLElement&&e.getClientRects().length>0&&e.focus()},o=()=>{r(),setTimeout(r,0)};i.updateComplete?i.updateComplete.then(o):o()};return"avb"!==e||localStorage.getItem(null!=n?n:"")?"mill-creek"===e?H`<div class="legal-confirmation-inner-container">
|
|
959
|
+
<div>${jo()}</div>
|
|
962
960
|
<div>
|
|
963
961
|
<span style="font-weight: 600">Confirm to continue</span>
|
|
964
962
|
<p>
|
|
@@ -973,7 +971,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
973
971
|
class="checkbox"
|
|
974
972
|
@click=${e=>{i(!0),a(e)}}
|
|
975
973
|
>
|
|
976
|
-
${
|
|
974
|
+
${Uo}
|
|
977
975
|
</div>
|
|
978
976
|
<p>
|
|
979
977
|
I agree to the
|
|
@@ -990,7 +988,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
990
988
|
</div>
|
|
991
989
|
</div>
|
|
992
990
|
</div>`:H` <div class="legal-confirmation-inner-container">
|
|
993
|
-
<div>${
|
|
991
|
+
<div>${jo()}</div>
|
|
994
992
|
<div>
|
|
995
993
|
<span style="font-weight: 600">Confirm to continue</span>
|
|
996
994
|
<p>
|
|
@@ -1016,7 +1014,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1016
1014
|
</button>
|
|
1017
1015
|
</div>`:H`
|
|
1018
1016
|
<div class="legal-confirmation-inner-container">
|
|
1019
|
-
<div>${
|
|
1017
|
+
<div>${jo()}</div>
|
|
1020
1018
|
<div>
|
|
1021
1019
|
<span style="font-weight: 600">Confirm to continue</span>
|
|
1022
1020
|
<p>
|
|
@@ -1048,12 +1046,12 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1048
1046
|
|
|
1049
1047
|
<button
|
|
1050
1048
|
class="agreeButton"
|
|
1051
|
-
@click=${e=>{i(!0),a(e);const t={consentGiven:!0,timestamp:(new Date).getTime(),consentId:
|
|
1049
|
+
@click=${e=>{i(!0),a(e);const t={consentGiven:!0,timestamp:(new Date).getTime(),consentId:Zo};localStorage.setItem(null!=n?n:"",JSON.stringify(t))}}
|
|
1052
1050
|
>
|
|
1053
1051
|
I agree
|
|
1054
1052
|
</button>
|
|
1055
1053
|
</div>
|
|
1056
|
-
`},
|
|
1054
|
+
`},ea=({orgSlug:e,buildingState:t,buildingCountry:n,type:i,customAdditionalDisclaimer:r})=>{const o=Wo(n)?Vo:ta(e),a=r?H`<br />${Bo(r)}`:H``;return"utilities"===i?H` <p class="utilities-disclaimer-inner">
|
|
1057
1055
|
By interacting with this system, you consent to
|
|
1058
1056
|
<a href=${o} target="_blank" rel="noopener noreferrer">
|
|
1059
1057
|
this privacy policy</a
|
|
@@ -1075,7 +1073,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1075
1073
|
Chats may be recorded by us and our vendors.
|
|
1076
1074
|
</p>
|
|
1077
1075
|
</li>
|
|
1078
|
-
`:t&&
|
|
1076
|
+
`:t&&Go.includes(t.toUpperCase())?H`
|
|
1079
1077
|
<li class="disclaimer-container disclaimer-message">
|
|
1080
1078
|
<p class="disclaimer-inner">
|
|
1081
1079
|
By interacting with this system, you consent to
|
|
@@ -1091,7 +1089,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1091
1089
|
${a}
|
|
1092
1090
|
</p>
|
|
1093
1091
|
</li>
|
|
1094
|
-
`:
|
|
1092
|
+
`:Wo(n)?H`
|
|
1095
1093
|
<li class="disclaimer-container disclaimer-message">
|
|
1096
1094
|
<p class="disclaimer-inner">
|
|
1097
1095
|
By interacting with this system, you consent to
|
|
@@ -1119,16 +1117,16 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1119
1117
|
${a}
|
|
1120
1118
|
</p>
|
|
1121
1119
|
</li>
|
|
1122
|
-
`:H``},
|
|
1123
|
-
${
|
|
1124
|
-
</div>`;const s=
|
|
1120
|
+
`:H``},ta=e=>"amli"===e?"https://www.amli.com/privacy-policy":"http://bit.ly/me_privacy_policy",na=({phoneNumberInput:e,emailInput:t,orgLegalName:n,orgSlug:i,country:r,buildingState:o,clickingButtonText:a="send"})=>{if(Yo(o))return H`<div style=${Xn(Fo)}>
|
|
1121
|
+
${Xo("schedule tour"===a?"scheduleTour":"emailUs",n,!!e)}
|
|
1122
|
+
</div>`;const s=Wo(r)?Vo:"http://bit.ly/me_privacy_policy";return(t||e)&&Wo(r)?"schedule tour"===a?H` <div style=${Xn(Fo)}>
|
|
1125
1123
|
By providing your number and/or email address and clicking schedule
|
|
1126
1124
|
tour, you consent to receive recurring commercial electronic messages
|
|
1127
1125
|
and calls from or on behalf of ${n} at the provided number
|
|
1128
1126
|
and/or email address. Messages may be AI or human generated.
|
|
1129
1127
|
StdMsg&DataRatesMayApply. You consent to this
|
|
1130
1128
|
<a
|
|
1131
|
-
style=${Xn(
|
|
1129
|
+
style=${Xn(Ho)}
|
|
1132
1130
|
href=${s}
|
|
1133
1131
|
target="_blank"
|
|
1134
1132
|
rel="noopener noreferrer"
|
|
@@ -1139,13 +1137,13 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1139
1137
|
unsubscribing or contacting us.
|
|
1140
1138
|
${e?H`Msg freq varies. Text STOP to opt-out of messages. Text HELP
|
|
1141
1139
|
for assistance.`:""}
|
|
1142
|
-
</div>`:H` <div style=${Xn(
|
|
1140
|
+
</div>`:H` <div style=${Xn(Fo)}>
|
|
1143
1141
|
By providing your email address and/or number and clicking send, you
|
|
1144
1142
|
consent to receive recurring commercial electronic messages and calls from
|
|
1145
1143
|
or on behalf of ${n} at that email address and/or number.
|
|
1146
1144
|
Messages may be AI or human generated. You consent to this
|
|
1147
1145
|
<a
|
|
1148
|
-
style=${Xn(
|
|
1146
|
+
style=${Xn(Ho)}
|
|
1149
1147
|
href=${s}
|
|
1150
1148
|
target="_blank"
|
|
1151
1149
|
rel="noopener noreferrer"
|
|
@@ -1156,7 +1154,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1156
1154
|
unsubscribing or contacting us.
|
|
1157
1155
|
${e?H`Msg freq varies. Text STOP to opt-out of messages. Text HELP for
|
|
1158
1156
|
assistance.`:""}
|
|
1159
|
-
</div>`:e&&"greystar"===i?H`<div style=${Xn(
|
|
1157
|
+
</div>`:e&&"greystar"===i?H`<div style=${Xn(Fo)}>
|
|
1160
1158
|
By providing your phone number and clicking ${a}, you
|
|
1161
1159
|
consent to receive recurring marketing text and voice messages and calls
|
|
1162
1160
|
from Greystar or on its behalf at this number using artificial voice
|
|
@@ -1166,7 +1164,7 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1166
1164
|
these terms to lease at this property. Msg freq varies. Msg & Data rates
|
|
1167
1165
|
may apply. You consent to
|
|
1168
1166
|
<a
|
|
1169
|
-
style=${Xn(
|
|
1167
|
+
style=${Xn(Ho)}
|
|
1170
1168
|
href="https://www.greystar.com/privacy"
|
|
1171
1169
|
target="_blank"
|
|
1172
1170
|
rel="noopener noreferrer"
|
|
@@ -1174,13 +1172,13 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1174
1172
|
>
|
|
1175
1173
|
and
|
|
1176
1174
|
<a
|
|
1177
|
-
style=${Xn(
|
|
1175
|
+
style=${Xn(Ho)}
|
|
1178
1176
|
href="http://bit.ly/me_privacy_policy"
|
|
1179
1177
|
target="_blank"
|
|
1180
1178
|
rel="noopener noreferrer"
|
|
1181
1179
|
>EliseAI’s Privacy Policy</a
|
|
1182
1180
|
>. Text STOP to opt-out of messages. Text HELP for assistance.
|
|
1183
|
-
</div>`:e?H` <div style=${Xn(
|
|
1181
|
+
</div>`:e?H` <div style=${Xn(Fo)}>
|
|
1184
1182
|
By providing your number and clicking ${a}, you consent
|
|
1185
1183
|
to receive recurring marketing text and voice messages and calls from or
|
|
1186
1184
|
on behalf of ${n} at this number using artificial voice or an
|
|
@@ -1188,34 +1186,34 @@ var e={2:(e,t,n)=>{var i=n(2199),r=n(4664),o=n(5950);e.exports=function(e){retur
|
|
|
1188
1186
|
not required to lease at this property. Msg freq varies. Msg & Data rates
|
|
1189
1187
|
may apply. You consent to this
|
|
1190
1188
|
<a
|
|
1191
|
-
style=${Xn(
|
|
1189
|
+
style=${Xn(Ho)}
|
|
1192
1190
|
href=${s}
|
|
1193
1191
|
target="_blank"
|
|
1194
1192
|
rel="noopener noreferrer"
|
|
1195
1193
|
>privacy policy</a
|
|
1196
1194
|
>, including having your number and communications recorded and used by a
|
|
1197
1195
|
third party. Text STOP to opt-out of messages. Text HELP for assistance.
|
|
1198
|
-
</div>`:t?H` <div style=${Xn(
|
|
1196
|
+
</div>`:t?H` <div style=${Xn(Fo)}>
|
|
1199
1197
|
By entering your email and clicking ${a}, you consent to
|
|
1200
1198
|
this
|
|
1201
1199
|
<a
|
|
1202
|
-
style=${Xn(
|
|
1200
|
+
style=${Xn(Ho)}
|
|
1203
1201
|
href=${s}
|
|
1204
1202
|
target="_blank"
|
|
1205
1203
|
rel="noopener noreferrer"
|
|
1206
1204
|
>privacy policy</a
|
|
1207
1205
|
>, including having your email address and communications collected and
|
|
1208
1206
|
recorded and used by a third party.
|
|
1209
|
-
</div>`:H` <div style=${Xn(
|
|
1207
|
+
</div>`:H` <div style=${Xn(Fo)}>
|
|
1210
1208
|
By clicking ${a}, you consent to this
|
|
1211
1209
|
<a
|
|
1212
|
-
style=${Xn(
|
|
1210
|
+
style=${Xn(Ho)}
|
|
1213
1211
|
href=${s}
|
|
1214
1212
|
target="_blank"
|
|
1215
1213
|
rel="noopener noreferrer"
|
|
1216
1214
|
>privacy policy</a
|
|
1217
1215
|
>.
|
|
1218
|
-
</div>`},
|
|
1216
|
+
</div>`},ia=p`
|
|
1219
1217
|
* {
|
|
1220
1218
|
box-sizing: border-box;
|
|
1221
1219
|
}
|
|
@@ -1752,7 +1750,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
1752
1750
|
gap: 12px;
|
|
1753
1751
|
align-items: center;
|
|
1754
1752
|
}
|
|
1755
|
-
`,
|
|
1753
|
+
`,ra=(e,t,n,i,r="")=>({firstName:e.trim(),lastName:t.trim(),email:n.trim(),firmName:i.trim(),phone:r}),oa=e=>!e.firstName||!e.lastName,aa=(e,t)=>e.email&&Lr(e.email)?e.email.toLowerCase()===t.trim().toLowerCase()?"Enter your client's details below, not yours":null:"Enter your valid email address",sa=e=>e?{broker_first_name:e.firstName,broker_last_name:e.lastName,broker_email:e.email,broker_firm_name:e.firmName||null,...e.phone?{broker_phone:e.phone}:{}}:{};var la=n(2193),ua=n.n(la);function da(e){return"avb"===e?"AVB Company Website":"windsor"===e?"Windsorcommunities.com":"property-website"}const ca=class{constructor(){this.chatId=null,this.apiHost="https://app.meetelise.com",this.leadSource=null,this.leadSourceParams=null,this.localStorageTTLDays=30,this.buildingId=null,this.orgId=null,this.orgSlug=null,this.buildingSlug=null,this.queryParameters=null,this.leadSourceInput=null,this.updateLeadSourceLocalStorage=(e,t,n,i,r)=>{const o=Oo();if(this.leadSourceInput={websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:o,referrer:document.referrer,parsedUtmSource:o?o.utm_source:null,campaignSources:Object.values(So()).filter(e=>e)},i)return;if(!r){const t=this.getLeadSourceBodyIfValid(e);if(t){if(!Mr(t.timestamp,24*this.localStorageTTLDays))return{...t,timestamp:Yr(t.timestamp)}}}const a={leadSource:t,leadSourceParams:this.leadSourceParams,leadId:n,buildingSlug:e,timestamp:Fr(new Date),leadSourceInput:this.leadSourceInput};return localStorage.setItem("com.elise.webchat.leadsource.slug="+e,JSON.stringify(a)),{...a,timestamp:Yr(a.timestamp)}},this.getLeadSourceBodyIfValid=e=>{const t=localStorage.getItem("com.elise.webchat.leadsource.slug="+e);if(t)try{const n=JSON.parse(t);if(n.buildingSlug===e&&n.leadSource&&n.leadId&&n.timestamp&&!Mr(Yr(n.timestamp),24*this.localStorageTTLDays)){try{this.leadSourceInput=n.leadSourceInput}catch(e){}return n}}catch(e){return null}return null},this.resetLeadSource=()=>{if(!this.buildingSlug)return!1;const e="com.elise.webchat.leadsource.slug="+this.buildingSlug;return localStorage.removeItem(e),!0}}async fetchCurrentParsedLeadSource({buildingSlug:e,queryParams:t,referrer:n,campaignSources:i}){const o={query_params:t,building_slug:e,referrer:n,campaign_sources:i};try{return(await r().post(`${this.apiHost}/platformApi/webchat/current-parsed-lead-source`,o)).data}catch(e){return null}}async checkAndHandleForLogLeadSource({webchatAction:e,stateId:t}){var n,i,o,a,s,l,u;try{if(!this.chatId)return null;if(!this.orgSlug)return null;let d=null,c=null;try{if("f1ba5a20-d207-4e5a-879e-65199e7d0a53"===this.orgSlug){const e=await this.getCookieValue("_ga");e&&(d=e),c=null===(n=window.dataLayer.find(e=>{var t;return"gtagApiGet"==(null===(t=e.value)||void 0===t?void 0:t.event)}))||void 0===n?void 0:n.value}}catch(e){}return await r().post(`${this.apiHost}/platformApi/webchat/log/lead-source`,{chat_id:this.chatId,webchat_action:e,state_id:t,building_id:this.buildingId,org_slug:this.orgSlug,building_slug:this.buildingSlug,website_origin:null===(i=this.leadSourceInput)||void 0===i?void 0:i.websiteOrigin,website_search:null===(o=this.leadSourceInput)||void 0===o?void 0:o.websiteSearch,query_parameters:null===(a=this.leadSourceInput)||void 0===a?void 0:a.queryParameters,referrer:null===(s=this.leadSourceInput)||void 0===s?void 0:s.referrer,parsed_utm_source:null===(l=this.leadSourceInput)||void 0===l?void 0:l.parsedUtmSource,campaign_sources:null===(u=this.leadSourceInput)||void 0===u?void 0:u.campaignSources,lead_source_output:this.leadSource,google_analytics_client_id:ua()(d)?null:d,extras:null!=c?c:null}),null}catch(e){return null}}async getCookieValue(e){try{const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const i=t[n].trim();if(i.startsWith(e+"=")){return i.substring((e+"=").length,-1===i.indexOf(";")?void 0:i.indexOf(";"))}}return null}catch(e){}return null}async generateUserLeadSource({leadId:e,orgSlug:t,buildingSlug:n}){var i,r,o;try{const a={queryParams:Oo(),buildingSlug:n,referrer:document.referrer,campaignSources:So()};let s=!1;const l=n?this.getLeadSourceBodyIfValid(n):null;if(l){if(!["test-company","daf00bd2-1ecb-482c-b6f4-e1c5511a01be"].includes(t))return this.leadSource=l.leadSource,this.leadSourceParams=null!==(r=l.leadSourceParams)&&void 0!==r?r:null,this.leadSource;{const e=await this.fetchCurrentParsedLeadSource(a);if(!e)return this.leadSource=l.leadSource,this.leadSourceParams=null!==(i=l.leadSourceParams)&&void 0!==i?i:null,this.leadSource;this.leadSource=e,s=!0}}const u=await this.fetchCurrentParsedLeadSource(a);if(this.leadSource=u,this.buildingId=null,this.orgSlug=t,this.buildingSlug=n,n&&!u){const e=this.getLeadSourceBodyIfValid(n);if(e)return this.leadSource=e.leadSource,this.leadSourceParams=null!==(o=e.leadSourceParams)&&void 0!==o?o:null,this.leadSource}if(n){const t=!!u&&u.length>0;this.updateLeadSourceLocalStorage(n,u,e,!t&&!s,s)}return u}catch(e){}return null}},ha=async(e,t=!1)=>{const n=`https://app.meetelise.com/eliseCrmApi/building/${e}/scheduling_status?observe_dynamic_scheduling=${t}`;try{return(await r().get(n)).data.is_enabled}catch(e){return!1}},pa=(e="black")=>z`<svg
|
|
1756
1754
|
aria-hidden="true"
|
|
1757
1755
|
focusable="false"
|
|
1758
1756
|
slot="icon"
|
|
@@ -1766,7 +1764,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1766
1764
|
d="M15.6 19.5V22.1L18.2 23.4V24.7H7.80004L7.79484 23.4052L10.4 22.1V19.5H1.28965C1.11894 19.4989 0.950113 19.4642 0.792841 19.3979C0.635568 19.3315 0.492943 19.2347 0.373141 19.1131C0.253339 18.9915 0.158715 18.8474 0.0946936 18.6892C0.0306718 18.5309 -0.00148955 18.3616 5.29696e-05 18.1909V1.3091C5.29696e-05 0.586299 0.591552 0 1.28965 0H24.7104C25.4228 0 26 0.583699 26 1.3091V18.1909C26 18.9137 25.4085 19.5 24.7104 19.5H15.6ZM2.60005 14.3V16.9H23.4V14.3H2.60005Z"
|
|
1767
1765
|
fill="${e}"
|
|
1768
1766
|
/>
|
|
1769
|
-
</svg>`,
|
|
1767
|
+
</svg>`,fa=(e="black")=>z`<svg
|
|
1770
1768
|
aria-hidden="true"
|
|
1771
1769
|
focusable="false"
|
|
1772
1770
|
slot="icon"
|
|
@@ -1780,7 +1778,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1780
1778
|
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"
|
|
1781
1779
|
fill="${e}"
|
|
1782
1780
|
/>
|
|
1783
|
-
</svg>`,
|
|
1781
|
+
</svg>`,ga=(e="black")=>z`<svg
|
|
1784
1782
|
aria-hidden="true"
|
|
1785
1783
|
focusable="false"
|
|
1786
1784
|
slot="icon"
|
|
@@ -1794,7 +1792,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1794
1792
|
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"
|
|
1795
1793
|
fill="${e}"
|
|
1796
1794
|
/>
|
|
1797
|
-
</svg>`;var fa,ga,ma;!function(e){e.EMOJI="emoji",e.PILLS="pills",e.MINIMIZED="minimized"}(fa||(fa={})),function(e){e.UNKNOWN="UNKNOWN",e.SELF_GUIDED="SELF_GUIDED",e.VIRTUAL_SHOWING="VIRTUAL_SHOWING",e.WITH_AGENT="WITH_AGENT",e.MEDIA_TOUR="MEDIA_TOUR",e.OPEN_HOUSE_STUDIO="OPEN_HOUSE_STUDIO",e.OPEN_HOUSE_1BR="OPEN_HOUSE_1BR",e.OPEN_HOUSE_2BR="OPEN_HOUSE_2BR",e.OPEN_HOUSE_3BR="OPEN_HOUSE_3BR",e.OPEN_HOUSE_4BR="OPEN_HOUSE_4BR",e.OPEN_HOUSE_5BR="OPEN_HOUSE_5BR"}(ga||(ga={})),function(e){e.LINK="link",e.CLIENT_SCHEDULED="client_scheduled",e.SCHEDULED_BY_ME_MANAGED_BY_ME="scheduled_by_ME_managed_by_ME",e.SCHEDULED_BY_ME_MANAGED_BY_CLIENT="scheduled_by_ME_managed_by_client",e.SCHEDULED_BY_ME_MANAGED_BY_CONCIERGE="scheduled_by_ME_managed_by_concierge"}(ma||(ma={}));const ba=(e,t)=>"link"===(null==t?void 0:t.toLowerCase());async function ya(e,t){const n=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}/v2`,i=await r().get(n);return va(i.data)}const va=e=>{var t;try{e.welcomeMessage=wa(null!==(t=e.welcomeMessage)&&void 0!==t?t:"",e.userFirstName)}catch(e){}return e},wa=(e,t)=>e.replace(/elise/gi,t);var Ca=n(7035),xa=n(6353);function $a(e,t,n){var i=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if("timeZoneName"===n[i].type)return n[i].value}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}(i,t)}function Sa(e,t){var n=function(e){if(!Aa[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"06/25/2014 00:00:00"===t;Aa[e]=n?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Aa[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=ka[n[r].type];o>=0&&(i[o]=parseInt(n[r].value,10))}return i}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}(n,e)}var ka={year:0,month:1,day:2,hour:3,minute:4,second:5};var Aa={};function Ta(e,t,n,i,r,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(i,r,o,a),s}var Ea=36e5,_a={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Oa(e,t,n){var i,r,o;if(!e)return 0;if(i=_a.timezoneZ.exec(e))return 0;if(i=_a.timezoneHH.exec(e))return Ia(o=parseInt(i[1],10))?-o*Ea:NaN;if(i=_a.timezoneHHMM.exec(e)){o=parseInt(i[2],10);var a=parseInt(i[3],10);return Ia(o,a)?(r=Math.abs(o)*Ea+6e4*a,"+"===i[1]?-r:r):NaN}if(function(e){if(Na[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Na[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return Ta(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=Pa(s,e),u=n?l:function(e,t,n){var i=e.getTime(),r=i-t,o=Pa(new Date(r),n);if(t===o)return t;r-=o-t;var a=Pa(new Date(r),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function Pa(e,t){var n=Sa(e,t),i=Ta(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),o=r%1e3;return i-(r-=o>=0?o:1e3+o)}function Ia(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var Na={};var Ma={X:function(e,t,n,i){var r=Da(i.timeZone,e);if(0===r)return"Z";switch(t){case"X":return Ba(r);case"XXXX":case"XX":return Ra(r);default:return Ra(r,":")}},x:function(e,t,n,i){var r=Da(i.timeZone,e);switch(t){case"x":return Ba(r);case"xxxx":case"xx":return Ra(r);default:return Ra(r,":")}},O:function(e,t,n,i){var r=Da(i.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=t||"";return n+String(r)+a+La(o,2)}(r,":");default:return"GMT"+Ra(r,":")}},z:function(e,t,n,i){switch(t){case"z":case"zz":case"zzz":return $a("short",e,i);default:return $a("long",e,i)}}};function Da(e,t){var n=e?Oa(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function La(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function Ra(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+La(Math.floor(r/60),2)+n+La(Math.floor(r%60),2)}function Ba(e,t){return e%60==0?(e>0?"-":"+")+La(Math.abs(e)/60,2):Ra(e,t)}const Ua=Ma;var ja=n(9784),Fa=n(9720);var Ha=36e5,za=6e4,Ga={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Va(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},i=null==n.additionalDigits?2:ja(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r=function(e){var t,n={},i=Ga.dateTimePattern.exec(e);i?(n.date=i[1],t=i[3]):(i=Ga.datePattern.exec(e))?(n.date=i[1],t=i[2]):(n.date=null,t=e);if(t){var r=Ga.timeZone.exec(t);r?(n.time=t.replace(r[1],""),n.timeZone=r[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,i=Ga.YYY[t],r=Ga.YYYYY[t];if(n=Ga.YYYY.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=Ga.YY.exec(e)||i.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(r.date,i),a=o.year,s=function(e,t){if(null===t)return null;var n,i,r,o;if(0===e.length)return(i=new Date(0)).setUTCFullYear(t),i;if(n=Ga.MM.exec(e))return i=new Date(0),Ka(t,r=parseInt(n[1],10)-1)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Ga.DDD.exec(e)){i=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Ya(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(i.setUTCFullYear(t,0,a),i):new Date(NaN)}if(n=Ga.MMDD.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Ka(t,r,s)?(i.setUTCFullYear(t,r,s),i):new Date(NaN)}if(n=Ga.Www.exec(e))return Xa(t,o=parseInt(n[1],10)-1)?Wa(t,o):new Date(NaN);if(n=Ga.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Xa(t,o,l)?Wa(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),d=0;if(r.time&&(d=function(e){var t,n,i;if(t=Ga.HH.exec(e))return Za(n=parseFloat(t[1].replace(",",".")))?n%24*Ha:NaN;if(t=Ga.HHMM.exec(e))return Za(n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")))?n%24*Ha+i*za:NaN;if(t=Ga.HHMMSS.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return Za(n,i,r)?n%24*Ha+i*za+1e3*r:NaN}return null}(r.time),isNaN(d)))return new Date(NaN);if(r.timeZone||n.timeZone){if(l=Oa(r.timeZone||n.timeZone,new Date(u+d)),isNaN(l))return new Date(NaN)}else l=Fa(new Date(u+d)),l=Fa(new Date(u+d+l));return new Date(u+d+l)}return new Date(NaN)}function Wa(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*t+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}var Qa=[31,28,31,30,31,30,31,31,30,31,30,31],qa=[31,29,31,30,31,30,31,31,30,31,30,31];function Ya(e){return e%400==0||e%4==0&&e%100!=0}function Ka(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var i=Ya(e);if(i&&n>qa[t])return!1;if(!i&&n>Qa[t])return!1}return!0}function Xa(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function Za(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var Ja=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function es(e,t,n,i){var r=Ca(i);return r.timeZone=t,r.originalDate=e,function(e,t,n){var i=String(t),r=n||{},o=i.match(Ja);if(o){var a=Va(r.originalDate||e,r);i=o.reduce(function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),i="'"===e[n-1],o=e.replace(t,"'"+Ua[t[0]](a,t,null,r)+"'");return i?o.substring(0,n-1)+o.substring(n+1):o},i)}return xa(e,i,r)}(function(e,t,n){var i=Va(e,n),r=Oa(t,i,!0),o=new Date(i.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}(e,t),n,r)}const ts="com.eliseai.webchat.googlereserve.referral",ns=()=>{var e;try{const t=JSON.parse(null!==(e=localStorage.getItem(ts))&&void 0!==e?e:"null");return(null==t?void 0:t.rwgToken)&&Date.now()<t.expiresAt?t:null}catch{return null}},is="https://app.meetelise.com",rs=async({buildingSlug:e})=>{try{const t=await r().get(`${is}/platformApi/webchat/${e}/units/summary`);if(t.data)return Er(t.data)}catch(t){ra({logType:ia.error,buildingSlug:e,logTitle:"[ERROR_GETTING_UNITS_SUMMARY]",logData:{error:t},error:t})}return[]};var os,as=n(8805),ss=n.n(as),ls=new Uint8Array(16);function us(){if(!os&&!(os="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return os(ls)}const ds=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const cs=function(e){return"string"==typeof e&&ds.test(e)};for(var hs=[],ps=0;ps<256;++ps)hs.push((ps+256).toString(16).substr(1));const fs=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(hs[e[t+0]]+hs[e[t+1]]+hs[e[t+2]]+hs[e[t+3]]+"-"+hs[e[t+4]]+hs[e[t+5]]+"-"+hs[e[t+6]]+hs[e[t+7]]+"-"+hs[e[t+8]]+hs[e[t+9]]+"-"+hs[e[t+10]]+hs[e[t+11]]+hs[e[t+12]]+hs[e[t+13]]+hs[e[t+14]]+hs[e[t+15]]).toLowerCase();if(!cs(n))throw TypeError("Stringified UUID is invalid");return n};const gs=function(e,t,n){var i=(e=e||{}).random||(e.rng||us)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return fs(i)},ms=e=>localStorage.removeItem("com.elise.webchat.slug="+e),bs=(e,t,n)=>{const i=Fr(new Date),r=n||`lead_${gs()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:r,timestamp:i,initiatedChat:t})),{leadId:r,timestamp:Yr(i),buildingSlug:e,initiatedChat:t}},ys=e=>{const t=localStorage.getItem("com.elise.webchat.slug="+e);if(t)try{const n=JSON.parse(t),i={leadId:n.leadId,timestamp:new Date(n.timestamp),buildingSlug:n.buildingSlug,initiatedChat:n.initiatedChat};if(vs(e,i))return i}catch(e){}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},vs=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if(Tr(t.timestamp,e))return!1}}catch(e){}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp)&&!Mr(t.timestamp,24)},ws=e=>e.startsWith("https://app.meetelise.com/settings/widgets")||e.startsWith("https://app.meetelise.com/settings/marketing/webchat")||e.includes("demo/utilities"),Cs="com.elise.webchat.reopenAfterNavigation",xs=e=>{try{const t=new URL(e);return`${t.origin}${t.pathname}`}catch{return""}},$s=e=>{const t={pageUrl:xs(window.location.href),pageTitle:document.title};return"number"==typeof e&&Number.isInteger(e)&&e>0&&(t.declaredBuildingId=e),t},Ss=(e,t=e=>window.location.assign(e))=>{(()=>{try{sessionStorage.setItem(Cs,"true")}catch{}})(),t(e.url)};var ks;!function(e){e.noReply="no-reply",e.text="text",e.media="media",e.navigation="navigation"}(ks||(ks={}));const As=e=>e.type===_s.text,Ts=e=>e.type===_s.media,Es=e=>e.type===_s.navigation;var _s;!function(e){e.text="text",e.media="media",e.navigation="navigation"}(_s||(_s={}));const Os=class{constructor(e,t,n,i=null,r,o,a=null,s=$p.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.firedScheduledTourConfirmationIds=new Set,this.widgetType=$p.Default,this.centralConvo=!1,this.declaredBuildingId=null,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.sessionToken=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t,n;const i={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,i],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter(e=>e.message.messageType!==ks.noReply),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const r="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;if(null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:r}),!r&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=r,"ai_message"===e.message.customType){const t=e.message.stream_id,i=null!=t?t:String(+e.timetoken);(t?this.reconstructStreamText(t):null!==(n=e.message.text)&&void 0!==n?n:"").includes("confirmed for your")&&this.fireScheduledTourEventOnce(i,e.message)}this.checkAndHandleGTMForLeadEmail(e)}},this.isLoadingMessages=!1,this.isFirstChatMessageSent=!1,this.streamingMessageTimeout=null,this.checkAndHandleDelayStreamingMessages=({delayToFetchHistoryInMs:e=1e4}={})=>{this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null);const t=new Map;this.rawPubnubMessages.forEach(e=>{var n;const i=e.message.stream_id;i&&t.set(i,[...null!==(n=t.get(i))&&void 0!==n?n:[],e])});const n=[...t.entries()].filter(([,e])=>!this.isStreamComplete(e)).map(([e])=>e);n.length>0&&(this.streamingMessageTimeout=setTimeout(()=>{ra({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:ia.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),this.getChannelHistory().then(()=>n.forEach(e=>this.checkAndFireTourConfirmationForStream(e)))},e))},this.isStreamComplete=e=>{var t;const n=e.find(e=>e.message.is_done);if(!n)return!1;const i=new Set(e.map(e=>{var t;return null!==(t=e.message.order)&&void 0!==t?t:0}));for(let e=0;e<=(null!==(t=n.message.order)&&void 0!==t?t:0);e++)if(!i.has(e))return!1;return!0},this.getStreamChunks=e=>this.removeDuplicatedRawPubnubMessages(this.rawPubnubMessages).filter(t=>t.message.stream_id===e).sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),this.reconstructStreamText=e=>this.getStreamChunks(e).map(e=>e.message.text).join(""),this.fireScheduledTourEventOnce=(e,t)=>{var n;this.firedScheduledTourConfirmationIds.has(e)||(this.firedScheduledTourConfirmationIds.add(e),_o("scheduledTourEvent",{tourDetails:t,buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))},this.checkAndFireTourConfirmationForStream=e=>{var t;if(this.reconstructStreamText(e).includes("confirmed for your")){const n=this.getStreamChunks(e);this.fireScheduledTourEventOnce(e,null===(t=n[n.length-1])||void 0===t?void 0:t.message)}},this.checkAndHandleGTMForLeadEmail=e=>{var t;try{if("lead_message"!==e.message.customType)return;if(!(e=>{try{return/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b/.test(e)}catch(e){return!1}})(e.message.text))return;_o("leadProvidedEmail",{buildingId:null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel})}catch(e){return}},this.markEveryPreviousNoReplyMessageDone=e=>{var t,n;for(let i=e.length-1;i>=0;i--){const r=null===(t=e[i])||void 0===t?void 0:t.message,o=i>0&&(null===(n=e[i-1])||void 0===n?void 0:n.message);(null==r?void 0:r.messageType)===ks.noReply&&o&&(o.is_done=!0)}},this.checkMessageChunkValid=e=>{try{return!!e.message&&!!e.message.text&&e.message.text.length>0&&!!e.message.customType}catch(e){return!1}},this.handleChatListeners=()=>{if(this.pubnub&&this.channel)try{this.pubnub.subscribe({channels:[this.channel]}),this.pubnub.addListener(this.listenerParams)}catch(e){this.buildingWebchatView&&ra({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.handleDisconnect=()=>{this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null),this.removeChatListeners()},this.removeChatListeners=()=>{this.pubnub&&this.channel&&(this.pubnub.unsubscribe({channels:[this.channel]}),this.pubnub.removeListener(this.listenerParams))},this.sendMessage=async e=>{if(e){if(!this.pubnub){const e=bs(this.chatStorageSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken(async()=>{var t,n,i,r,o,a,s,u,d;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout(()=>{this.buildingWebchatView&&ra({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})},9e4),0===this.simpleChatMessages.length&&(null===(t=this.leadSourceClient)||void 0===t||t.checkAndHandleForLogLeadSource({webchatAction:"chat",stateId:null})),this.widgetType===$p.Utilities?await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",widgetType:this.widgetType,isDevState:ws(location.href),orgSlug:this.orgSlug}}):(await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,userId:null===(i=this.buildingWebchatView)||void 0===i?void 0:i.userId,leadSource:this.leadSource,trackingParams:l(this.orgSlug),widgetType:this.widgetType,isDevState:ws(location.href),...$s(this.declaredBuildingId),lead_sources_with_timestamps:(null!==(o=null===(r=this.leadSourceMultitouchClient)||void 0===r?void 0:r.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:null}))&&void 0!==o?o:[]).map(e=>_r({...e}))}}),null===(a=this.leadSourceClient)||void 0===a||a.resetLeadSource(),null===(s=this.leadSourceMultitouchClient)||void 0===s||s.resetLeadSourceTouchpoints()),this.isFirstChatMessageSent||(_o("firstChatMessageSent",{message:e,buildingId:null===(u=this.buildingWebchatView)||void 0===u?void 0:u.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),_o("chatMessageSent",{message:e,buildingId:null===(d=this.buildingWebchatView)||void 0===d?void 0:d.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))}),!1===this.isLoadingMessages&&(this.isLoadingMessages=!0)}},this.isLeadMessage=e=>e.publisher.includes("lead_")&&"lead_message"===e.message.customType,this.removeDuplicatedRawPubnubMessages=e=>{const t=new Set;return e.filter(e=>{if("lead_message"===e.message.customType||!e.message.stream_id||!e.message.order)return!0;const n=`${e.message.stream_id}-${e.message.order}-${e.message.messageType}`;return t.has(n)?(ra({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:ia.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),!1):(t.add(n),!0)})},this.translatePubnubMessagesIntoSimpleChatMessages=e=>{const t=[],n={};return this.removeDuplicatedRawPubnubMessages(e).forEach(e=>{var i;if(e.message.messageType===ks.navigation){const n=(e=>{if(!e||"object"!=typeof e)return null;const{url:t,label:n}=e;if("string"!=typeof t||"string"!=typeof n)return null;if(!n.trim())return null;try{const e=new URL(t,window.location.href);return"http:"!==e.protocol&&"https:"!==e.protocol?null:{url:e.href,label:n.trim()}}catch{return null}})(e.message.navigation);n&&t.push({timestamp:e.timetoken,navigation:n,isLeadMessage:!1,type:_s.navigation})}else if("media"===e.message.messageType)t.push({timestamp:e.timetoken,media:null!==(i=e.message.media)&&void 0!==i?i:[],isLeadMessage:this.isLeadMessage(e),type:_s.media});else{if("string"!=typeof e.message.text)return;!e.message.stream_id||e.message.is_done&&0===e.message.order?t.push({timestamp:e.timetoken,message:e.message.text,isLeadMessage:this.isLeadMessage(e),chunks:[{text:e.message.text,order:0,isDone:!0}],type:_s.text}):n[e.message.stream_id]?n[e.message.stream_id].push(e):n[e.message.stream_id]=[e]}}),Object.keys(n).forEach(e=>{const i=n[e],r=this.getConsecutiveChunks(i.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)})),o=r.map(e=>e.message.text).join(""),a=r[0],s={timestamp:a.timetoken,message:o,isLeadMessage:this.isLeadMessage(a),chunks:r.map(e=>{var t,n;return{text:e.message.text,order:null!==(t=e.message.order)&&void 0!==t?t:0,isDone:null!==(n=e.message.is_done)&&void 0!==n&&n}}),type:_s.text};this.isCurrentlyStreamingMessage=this.isMessageStillStreamingChunks(r),t.push(s)}),t.sort((e,t)=>e.timestamp-t.timestamp),t},this.getConsecutiveChunks=e=>{var t,n;const i=e.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),r=[];let o=null!==(t=i[0].message.order)&&void 0!==t?t:0;for(const e of i){if((null!==(n=e.message.order)&&void 0!==n?n:-1)!==o)break;r.push(e),o++}return r},this.isMessageStillStreamingChunks=e=>{const t=e.find(e=>e.message.is_done);return!t||e.length===t.message.order},this.buildingSlug=e,this.chatStorageSlug=e,this.buildingWebchatView=t,this.orgSlug=n,this.leadSource=i,this.leadUserId=r,this.channel=`webchat_${r}`,this.leadSourceClient=a,this.leadSourceMultitouchClient=o,this.widgetType=s}getSessionToken(){return this.sessionToken}async initSession(e,t,n){try{const i={building_slug:e,org_slug:t};this.centralConvo&&(i.central_convo=!0),n&&(i.lead_id=n);const o=await r().post(`${this.apiHost}/platformApi/webchat/init`,i);return this.sessionToken=o.data.session_token,this.leadUserId=o.data.lead_id,this.channel=o.data.channel,o.data}catch(e){return this.buildingWebchatView&&ra({logTitle:"WEBCHAT_INIT_SESSION_ERROR",logData:{error:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e}),null}}adoptBuilding(e,t){this.buildingSlug=e,this.buildingWebchatView=t}addChatListener(e){this.chatListener=e}async initializePubnub(e){if(!e.leadId)return;this.leadUserId=e.leadId;const t=await this.fetchToken(this.leadUserId,this.channel);return t?(this.pubnub=new(ss())({publishKey:t.keys.publish_key,subscribeKey:t.keys.subscribe_key,userId:this.leadUserId,authKey:t.auth.result.token,origin:"meetelise.pubnubapi.com"}),this.withAuthToken(()=>new Promise(()=>this.handleChatListeners())),await this.withAuthToken(()=>this.getChannelHistory()),this.pubnub):void 0}async fetchToken(e,t){try{if(this.sessionToken){const e="healthcare"===this.widgetType?"?industry=health_care":"";return(await r().get(`${this.apiHost}/platformApi/webchat/pn/v2/request-token${e}`,{headers:{"X-Session-Token":this.sessionToken}})).data}if(this.centralConvo)return null;return(await r().get(`${this.apiHost}/platformApi/webchat/pn/request-token?user_id=${e}&channel=${t}&${"healthcare"===this.widgetType?"industry=health_care":""}`)).data}catch(e){this.buildingWebchatView&&ra({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return null}async fetchChannelExists(e){try{return(await r().get(`${this.apiHost}/platformApi/webchat/check-channel-exists?channel_name=${e}`)).data}catch(e){this.buildingWebchatView&&ra({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return!1}async withAuthToken(e){try{await e()}catch(t){if(t instanceof i.AxiosError&&t&&t.response&&403===t.response.status)try{if(!this.pubnub||!this.leadUserId||!this.channel)return;const t=await this.fetchToken(this.leadUserId,this.channel);if(!t)return;this.pubnub.setAuthKey(t.auth.result.token),await e()}catch(e){this.buildingWebchatView&&ra({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}}async getChannelHistory(e=1500){var t;try{let n=[],i=null;const r=100;for(let t=0;t<e;t+=r){const o=await new Promise((n,o)=>{if(!this.pubnub||!this.channel)return[];const a=Math.min(r,e-t);this.pubnub.fetchMessages({channels:[this.channel],count:a,start:null!=i?i:void 0},(e,t)=>{e.error?o(e):n(t)})}),a=o.channels[this.channel];if(!a)break;if(a.sort((e,t)=>+e.timetoken-+t.timetoken),!a||0===a.length)break;if(this.channel&&0!==Object.keys(o.channels).length){const e=o.channels[this.channel],t=[];e.forEach(e=>{e.uuid&&t.push({channel:e.channel,message:e.message,publisher:e.uuid,subscription:e.channel,timetoken:+e.timetoken})}),this.markEveryPreviousNoReplyMessageDone(t),n=n.concat(t.filter(e=>e.message.messageType!==ks.noReply))}if(i=a[0].timetoken,n.length>=e||a.length<r)break}this.rawPubnubMessages=n.slice(0,e),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:!1})}catch(e){this.buildingWebchatView&&ra({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:ia.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}},Ps=p`
|
|
1795
|
+
</svg>`;var ma,ba,ya;!function(e){e.EMOJI="emoji",e.PILLS="pills",e.MINIMIZED="minimized"}(ma||(ma={})),function(e){e.UNKNOWN="UNKNOWN",e.SELF_GUIDED="SELF_GUIDED",e.VIRTUAL_SHOWING="VIRTUAL_SHOWING",e.WITH_AGENT="WITH_AGENT",e.MEDIA_TOUR="MEDIA_TOUR",e.OPEN_HOUSE_STUDIO="OPEN_HOUSE_STUDIO",e.OPEN_HOUSE_1BR="OPEN_HOUSE_1BR",e.OPEN_HOUSE_2BR="OPEN_HOUSE_2BR",e.OPEN_HOUSE_3BR="OPEN_HOUSE_3BR",e.OPEN_HOUSE_4BR="OPEN_HOUSE_4BR",e.OPEN_HOUSE_5BR="OPEN_HOUSE_5BR"}(ba||(ba={})),function(e){e.LINK="link",e.CLIENT_SCHEDULED="client_scheduled",e.SCHEDULED_BY_ME_MANAGED_BY_ME="scheduled_by_ME_managed_by_ME",e.SCHEDULED_BY_ME_MANAGED_BY_CLIENT="scheduled_by_ME_managed_by_client",e.SCHEDULED_BY_ME_MANAGED_BY_CONCIERGE="scheduled_by_ME_managed_by_concierge"}(ya||(ya={}));const va=(e,t)=>"link"===(null==t?void 0:t.toLowerCase());async function wa(e,t){const n=`https://app.meetelise.com/api/pub/v1/organization/${e}/building/${t}/v2`,i=await r().get(n);return Ca(i.data)}const Ca=e=>{var t;try{e.welcomeMessage=xa(null!==(t=e.welcomeMessage)&&void 0!==t?t:"",e.userFirstName)}catch(e){}return e},xa=(e,t)=>e.replace(/elise/gi,t);var $a=n(7035),Sa=n(6353);function ka(e,t,n){var i=function(e,t,n){if(n&&!n.code)throw new Error("date-fns-tz error: Please set a language code on the locale object imported from date-fns, e.g. `locale.code = 'en-US'`");return new Intl.DateTimeFormat(n?[n.code,"en-US"]:void 0,{timeZone:t,timeZoneName:e})}(e,n.timeZone,n.locale);return i.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=n.length-1;i>=0;--i)if("timeZoneName"===n[i].type)return n[i].value}(i,t):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/ [\w-+ ]+$/.exec(n);return i?i[0].substr(1):""}(i,t)}function Aa(e,t){var n=function(e){if(!Ea[e]){var t=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"06/25/2014 00:00:00"===t;Ea[e]=n?new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return Ea[e]}(t);return n.formatToParts?function(e,t){try{for(var n=e.formatToParts(t),i=[],r=0;r<n.length;r++){var o=Ta[n[r].type];o>=0&&(i[o]=parseInt(n[r].value,10))}return i}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(n,e):function(e,t){var n=e.format(t),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}(n,e)}var Ta={year:0,month:1,day:2,hour:3,minute:4,second:5};var Ea={};function _a(e,t,n,i,r,o,a){var s=new Date(0);return s.setUTCFullYear(e,t,n),s.setUTCHours(i,r,o,a),s}var Oa=36e5,Pa={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function Ia(e,t,n){var i,r,o;if(!e)return 0;if(i=Pa.timezoneZ.exec(e))return 0;if(i=Pa.timezoneHH.exec(e))return Ma(o=parseInt(i[1],10))?-o*Oa:NaN;if(i=Pa.timezoneHHMM.exec(e)){o=parseInt(i[2],10);var a=parseInt(i[3],10);return Ma(o,a)?(r=Math.abs(o)*Oa+6e4*a,"+"===i[1]?-r:r):NaN}if(function(e){if(Da[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),Da[e]=!0,!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var s=n?t:function(e){return _a(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),l=Na(s,e),u=n?l:function(e,t,n){var i=e.getTime(),r=i-t,o=Na(new Date(r),n);if(t===o)return t;r-=o-t;var a=Na(new Date(r),n);if(o===a)return o;return Math.max(o,a)}(t,l,e);return-u}return NaN}function Na(e,t){var n=Aa(e,t),i=_a(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),r=e.getTime(),o=r%1e3;return i-(r-=o>=0?o:1e3+o)}function Ma(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var Da={};var La={X:function(e,t,n,i){var r=Ra(i.timeZone,e);if(0===r)return"Z";switch(t){case"X":return ja(r);case"XXXX":case"XX":return Ua(r);default:return Ua(r,":")}},x:function(e,t,n,i){var r=Ra(i.timeZone,e);switch(t){case"x":return ja(r);case"xxxx":case"xx":return Ua(r);default:return Ua(r,":")}},O:function(e,t,n,i){var r=Ra(i.timeZone,e);switch(t){case"O":case"OO":case"OOO":return"GMT"+function(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),o=i%60;if(0===o)return n+String(r);var a=t||"";return n+String(r)+a+Ba(o,2)}(r,":");default:return"GMT"+Ua(r,":")}},z:function(e,t,n,i){switch(t){case"z":case"zz":case"zzz":return ka("short",e,i);default:return ka("long",e,i)}}};function Ra(e,t){var n=e?Ia(e,t,!0)/6e4:t.getTimezoneOffset();if(Number.isNaN(n))throw new RangeError("Invalid time zone specified: "+e);return n}function Ba(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}function Ua(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e);return i+Ba(Math.floor(r/60),2)+n+Ba(Math.floor(r%60),2)}function ja(e,t){return e%60==0?(e>0?"-":"+")+Ba(Math.abs(e)/60,2):Ua(e,t)}const Fa=La;var Ha=n(9784),za=n(9720);var Ga=36e5,Va=6e4,Wa={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/};function Qa(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},i=null==n.additionalDigits?2:Ha(n.additionalDigits);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"==typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r=function(e){var t,n={},i=Wa.dateTimePattern.exec(e);i?(n.date=i[1],t=i[3]):(i=Wa.datePattern.exec(e))?(n.date=i[1],t=i[2]):(n.date=null,t=e);if(t){var r=Wa.timeZone.exec(t);r?(n.time=t.replace(r[1],""),n.timeZone=r[1].trim()):n.time=t}return n}(e),o=function(e,t){var n,i=Wa.YYY[t],r=Wa.YYYYY[t];if(n=Wa.YYYY.exec(e)||r.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=Wa.YY.exec(e)||i.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(r.date,i),a=o.year,s=function(e,t){if(null===t)return null;var n,i,r,o;if(0===e.length)return(i=new Date(0)).setUTCFullYear(t),i;if(n=Wa.MM.exec(e))return i=new Date(0),Za(t,r=parseInt(n[1],10)-1)?(i.setUTCFullYear(t,r),i):new Date(NaN);if(n=Wa.DDD.exec(e)){i=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=Xa(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(i.setUTCFullYear(t,0,a),i):new Date(NaN)}if(n=Wa.MMDD.exec(e)){i=new Date(0),r=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return Za(t,r,s)?(i.setUTCFullYear(t,r,s),i):new Date(NaN)}if(n=Wa.Www.exec(e))return Ja(t,o=parseInt(n[1],10)-1)?qa(t,o):new Date(NaN);if(n=Wa.WwwD.exec(e)){o=parseInt(n[1],10)-1;var l=parseInt(n[2],10)-1;return Ja(t,o,l)?qa(t,o,l):new Date(NaN)}return null}(o.restDateString,a);if(isNaN(s))return new Date(NaN);if(s){var l,u=s.getTime(),d=0;if(r.time&&(d=function(e){var t,n,i;if(t=Wa.HH.exec(e))return es(n=parseFloat(t[1].replace(",",".")))?n%24*Ga:NaN;if(t=Wa.HHMM.exec(e))return es(n=parseInt(t[1],10),i=parseFloat(t[2].replace(",",".")))?n%24*Ga+i*Va:NaN;if(t=Wa.HHMMSS.exec(e)){n=parseInt(t[1],10),i=parseInt(t[2],10);var r=parseFloat(t[3].replace(",","."));return es(n,i,r)?n%24*Ga+i*Va+1e3*r:NaN}return null}(r.time),isNaN(d)))return new Date(NaN);if(r.timeZone||n.timeZone){if(l=Ia(r.timeZone||n.timeZone,new Date(u+d)),isNaN(l))return new Date(NaN)}else l=za(new Date(u+d)),l=za(new Date(u+d+l));return new Date(u+d+l)}return new Date(NaN)}function qa(e,t,n){t=t||0,n=n||0;var i=new Date(0);i.setUTCFullYear(e,0,4);var r=7*t+n+1-(i.getUTCDay()||7);return i.setUTCDate(i.getUTCDate()+r),i}var Ya=[31,28,31,30,31,30,31,31,30,31,30,31],Ka=[31,29,31,30,31,30,31,31,30,31,30,31];function Xa(e){return e%400==0||e%4==0&&e%100!=0}function Za(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var i=Xa(e);if(i&&n>Ka[t])return!1;if(!i&&n>Ya[t])return!1}return!0}function Ja(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function es(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}var ts=/([xXOz]+)|''|'(''|[^'])+('|$)/g;function ns(e,t,n,i){var r=$a(i);return r.timeZone=t,r.originalDate=e,function(e,t,n){var i=String(t),r=n||{},o=i.match(ts);if(o){var a=Qa(r.originalDate||e,r);i=o.reduce(function(e,t){if("'"===t[0])return e;var n=e.indexOf(t),i="'"===e[n-1],o=e.replace(t,"'"+Fa[t[0]](a,t,null,r)+"'");return i?o.substring(0,n-1)+o.substring(n+1):o},i)}return Sa(e,i,r)}(function(e,t,n){var i=Qa(e,n),r=Ia(t,i,!0),o=new Date(i.getTime()-r),a=new Date(0);return a.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),a.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),a}(e,t),n,r)}const is="com.eliseai.webchat.googlereserve.referral",rs=()=>{var e;try{const t=JSON.parse(null!==(e=localStorage.getItem(is))&&void 0!==e?e:"null");return(null==t?void 0:t.rwgToken)&&Date.now()<t.expiresAt?t:null}catch{return null}},os=async({buildingSlug:e})=>{try{const t=await r().get(`${Eo}/platformApi/webchat/${e}/units/summary`);if(t.data)return Er(t.data)}catch(t){Ao({logType:ko.error,buildingSlug:e,logTitle:"[ERROR_GETTING_UNITS_SUMMARY]",logData:{error:t},error:t})}return[]};var as,ss=n(8805),ls=n.n(ss),us=new Uint8Array(16);function ds(){if(!as&&!(as="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return as(us)}const cs=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const hs=function(e){return"string"==typeof e&&cs.test(e)};for(var ps=[],fs=0;fs<256;++fs)ps.push((fs+256).toString(16).substr(1));const gs=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ps[e[t+0]]+ps[e[t+1]]+ps[e[t+2]]+ps[e[t+3]]+"-"+ps[e[t+4]]+ps[e[t+5]]+"-"+ps[e[t+6]]+ps[e[t+7]]+"-"+ps[e[t+8]]+ps[e[t+9]]+"-"+ps[e[t+10]]+ps[e[t+11]]+ps[e[t+12]]+ps[e[t+13]]+ps[e[t+14]]+ps[e[t+15]]).toLowerCase();if(!hs(n))throw TypeError("Stringified UUID is invalid");return n};const ms=function(e,t,n){var i=(e=e||{}).random||(e.rng||ds)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return gs(i)},bs=e=>localStorage.removeItem("com.elise.webchat.slug="+e),ys=(e,t,n)=>{const i=Fr(new Date),r=n||`lead_${ms()}`;return localStorage.setItem("com.elise.webchat.slug="+e,JSON.stringify({buildingSlug:e,leadId:r,timestamp:i,initiatedChat:t})),{leadId:r,timestamp:Yr(i),buildingSlug:e,initiatedChat:t}},vs=e=>{const t=localStorage.getItem("com.elise.webchat.slug="+e);if(t)try{const n=JSON.parse(t),i={leadId:n.leadId,timestamp:new Date(n.timestamp),buildingSlug:n.buildingSlug,initiatedChat:n.initiatedChat};if(ws(e,i))return i}catch(e){}return{leadId:null,timestamp:null,buildingSlug:null,initiatedChat:!1}},ws=(e,t)=>{try{if(t.timestamp&&t.initiatedChat){const e=new Date("2024-06-06T21:30:00Z");if(Tr(t.timestamp,e))return!1}}catch(e){}return!(t.buildingSlug!==e||!t.leadId||!t.timestamp)&&!Mr(t.timestamp,24)},Cs=e=>e.startsWith("https://app.meetelise.com/settings/widgets")||e.startsWith("https://app.meetelise.com/settings/marketing/webchat")||e.includes("demo/utilities"),xs="com.elise.webchat.reopenAfterNavigation",$s=e=>{try{const t=new URL(e);return`${t.origin}${t.pathname}`}catch{return""}},Ss=e=>{const t={pageUrl:$s(window.location.href),pageTitle:document.title};return"number"==typeof e&&Number.isInteger(e)&&e>0&&(t.declaredBuildingId=e),t},ks=(e,t=e=>window.location.assign(e))=>{(()=>{try{sessionStorage.setItem(xs,"true")}catch{}})(),t(e.url)};var As;!function(e){e.noReply="no-reply",e.text="text",e.media="media",e.navigation="navigation"}(As||(As={}));const Ts=e=>e.type===Os.text,Es=e=>e.type===Os.media,_s=e=>e.type===Os.navigation;var Os;!function(e){e.text="text",e.media="media",e.navigation="navigation"}(Os||(Os={}));const Ps=class{constructor(e,t,n,i=null,r,o,a=null,s=Sp.Default){this.apiHost="https://app.meetelise.com",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingWebchatView=null,this.eliseResponseTimeout=null,this.isWaitingForStreamingMessages=!1,this.firedScheduledTourConfirmationIds=new Set,this.widgetType=Sp.Default,this.centralConvo=!1,this.declaredBuildingId=null,this.pubnub=null,this.leadUserId="",this.channel="",this.leadSource=null,this.sessionToken=null,this.isCurrentlyStreamingMessage=!1,this.chatListener=null,this.rawPubnubMessages=[],this.simpleChatMessages=[],this.listenerParams={message:e=>{var t,n;const i={channel:e.channel,message:e.message,publisher:e.publisher,subscription:e.subscription,timetoken:+e.timetoken};this.rawPubnubMessages=[...this.rawPubnubMessages,i],this.markEveryPreviousNoReplyMessageDone(this.rawPubnubMessages),this.rawPubnubMessages=this.rawPubnubMessages.filter(e=>e.message.messageType!==As.noReply),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),this.checkAndHandleDelayStreamingMessages();const r="eliseai"!==e.publisher&&"elise_health_ai"!==e.publisher;if(null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:r}),!r&&this.eliseResponseTimeout&&clearTimeout(this.eliseResponseTimeout),this.isLoadingMessages=r,"ai_message"===e.message.customType){const t=e.message.stream_id,i=null!=t?t:String(+e.timetoken);(t?this.reconstructStreamText(t):null!==(n=e.message.text)&&void 0!==n?n:"").includes("confirmed for your")&&this.fireScheduledTourEventOnce(i,e.message)}this.checkAndHandleGTMForLeadEmail(e)}},this.isLoadingMessages=!1,this.isFirstChatMessageSent=!1,this.streamingMessageTimeout=null,this.checkAndHandleDelayStreamingMessages=({delayToFetchHistoryInMs:e=1e4}={})=>{this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null);const t=new Map;this.rawPubnubMessages.forEach(e=>{var n;const i=e.message.stream_id;i&&t.set(i,[...null!==(n=t.get(i))&&void 0!==n?n:[],e])});const n=[...t.entries()].filter(([,e])=>!this.isStreamComplete(e)).map(([e])=>e);n.length>0&&(this.streamingMessageTimeout=setTimeout(()=>{Ao({logTitle:"PUBNUB_WARN_DELAYED_STREAMING_MESSAGES",logData:{channel:this.channel},logType:ko.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),this.getChannelHistory().then(()=>n.forEach(e=>this.checkAndFireTourConfirmationForStream(e)))},e))},this.isStreamComplete=e=>{var t;const n=e.find(e=>e.message.is_done);if(!n)return!1;const i=new Set(e.map(e=>{var t;return null!==(t=e.message.order)&&void 0!==t?t:0}));for(let e=0;e<=(null!==(t=n.message.order)&&void 0!==t?t:0);e++)if(!i.has(e))return!1;return!0},this.getStreamChunks=e=>this.removeDuplicatedRawPubnubMessages(this.rawPubnubMessages).filter(t=>t.message.stream_id===e).sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),this.reconstructStreamText=e=>this.getStreamChunks(e).map(e=>e.message.text).join(""),this.fireScheduledTourEventOnce=(e,t)=>{var n;this.firedScheduledTourConfirmationIds.has(e)||(this.firedScheduledTourConfirmationIds.add(e),Lo("scheduledTourEvent",{tourDetails:t,buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))},this.checkAndFireTourConfirmationForStream=e=>{var t;if(this.reconstructStreamText(e).includes("confirmed for your")){const n=this.getStreamChunks(e);this.fireScheduledTourEventOnce(e,null===(t=n[n.length-1])||void 0===t?void 0:t.message)}},this.checkAndHandleGTMForLeadEmail=e=>{var t;try{if("lead_message"!==e.message.customType)return;if(!(e=>{try{return/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b/.test(e)}catch(e){return!1}})(e.message.text))return;Lo("leadProvidedEmail",{buildingId:null===(t=this.buildingWebchatView)||void 0===t?void 0:t.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel})}catch(e){return}},this.markEveryPreviousNoReplyMessageDone=e=>{var t,n;for(let i=e.length-1;i>=0;i--){const r=null===(t=e[i])||void 0===t?void 0:t.message,o=i>0&&(null===(n=e[i-1])||void 0===n?void 0:n.message);(null==r?void 0:r.messageType)===As.noReply&&o&&(o.is_done=!0)}},this.checkMessageChunkValid=e=>{try{return!!e.message&&!!e.message.text&&e.message.text.length>0&&!!e.message.customType}catch(e){return!1}},this.handleChatListeners=()=>{if(this.pubnub&&this.channel)try{this.pubnub.subscribe({channels:[this.channel]}),this.pubnub.addListener(this.listenerParams)}catch(e){this.buildingWebchatView&&Ao({logTitle:"PUBNUB_ERROR_ADDING_LISTENER",logData:{error:e,channel:this.channel,leadUserId:this.leadUserId,website:location.href},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.handleDisconnect=()=>{this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.streamingMessageTimeout&&(clearTimeout(this.streamingMessageTimeout),this.streamingMessageTimeout=null),this.removeChatListeners()},this.removeChatListeners=()=>{this.pubnub&&this.channel&&(this.pubnub.unsubscribe({channels:[this.channel]}),this.pubnub.removeListener(this.listenerParams))},this.sendMessage=async e=>{if(e){if(!this.pubnub){const e=ys(this.chatStorageSlug,!0,this.leadUserId);if(!await this.initializePubnub(e))return}await this.withAuthToken(async()=>{var t,n,i,r,o,a,s,u,d;this.pubnub&&this.channel&&(this.eliseResponseTimeout&&(clearTimeout(this.eliseResponseTimeout),this.eliseResponseTimeout=null),this.eliseResponseTimeout=setTimeout(()=>{this.buildingWebchatView&&Ao({logTitle:"PUBNUB_ERROR_ELISEAI_MESSAGE_TIMEOUT",logData:{channel:this.channel,leadUserId:this.leadUserId,message:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug})},9e4),0===this.simpleChatMessages.length&&(null===(t=this.leadSourceClient)||void 0===t||t.checkAndHandleForLogLeadSource({webchatAction:"chat",stateId:null})),this.widgetType===Sp.Utilities?await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",widgetType:this.widgetType,isDevState:Cs(location.href),orgSlug:this.orgSlug}}):(await this.pubnub.publish({channel:this.channel,message:{text:e,customType:"lead_message",buildingId:null===(n=this.buildingWebchatView)||void 0===n?void 0:n.id,buildingSlug:this.buildingSlug,userId:null===(i=this.buildingWebchatView)||void 0===i?void 0:i.userId,leadSource:this.leadSource,trackingParams:l(this.orgSlug),widgetType:this.widgetType,isDevState:Cs(location.href),...Ss(this.declaredBuildingId),lead_sources_with_timestamps:(null!==(o=null===(r=this.leadSourceMultitouchClient)||void 0===r?void 0:r.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:null}))&&void 0!==o?o:[]).map(e=>_r({...e}))}}),null===(a=this.leadSourceClient)||void 0===a||a.resetLeadSource(),null===(s=this.leadSourceMultitouchClient)||void 0===s||s.resetLeadSourceTouchpoints()),this.isFirstChatMessageSent||(Lo("firstChatMessageSent",{message:e,buildingId:null===(u=this.buildingWebchatView)||void 0===u?void 0:u.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}),this.isFirstChatMessageSent=!0),Lo("chatMessageSent",{message:e,buildingId:null===(d=this.buildingWebchatView)||void 0===d?void 0:d.id,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,leadUserId:this.leadUserId,channel:this.channel}))}),!1===this.isLoadingMessages&&(this.isLoadingMessages=!0)}},this.isLeadMessage=e=>e.publisher.includes("lead_")&&"lead_message"===e.message.customType,this.removeDuplicatedRawPubnubMessages=e=>{const t=new Set;return e.filter(e=>{if("lead_message"===e.message.customType||!e.message.stream_id||!e.message.order)return!0;const n=`${e.message.stream_id}-${e.message.order}-${e.message.messageType}`;return t.has(n)?(Ao({logTitle:"PUBNUB_WARN_DUPLICATE_MESSAGE",logData:{message:e,channel:this.channel},logType:ko.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug}),!1):(t.add(n),!0)})},this.translatePubnubMessagesIntoSimpleChatMessages=e=>{const t=[],n={};return this.removeDuplicatedRawPubnubMessages(e).forEach(e=>{var i;if(e.message.messageType===As.navigation){const n=(e=>{if(!e||"object"!=typeof e)return null;const{url:t,label:n}=e;if("string"!=typeof t||"string"!=typeof n)return null;if(!n.trim())return null;try{const e=new URL(t,window.location.href);return"http:"!==e.protocol&&"https:"!==e.protocol?null:{url:e.href,label:n.trim()}}catch{return null}})(e.message.navigation);n&&t.push({timestamp:e.timetoken,navigation:n,isLeadMessage:!1,type:Os.navigation})}else if("media"===e.message.messageType)t.push({timestamp:e.timetoken,media:null!==(i=e.message.media)&&void 0!==i?i:[],isLeadMessage:this.isLeadMessage(e),type:Os.media});else{if("string"!=typeof e.message.text)return;!e.message.stream_id||e.message.is_done&&0===e.message.order?t.push({timestamp:e.timetoken,message:e.message.text,isLeadMessage:this.isLeadMessage(e),chunks:[{text:e.message.text,order:0,isDone:!0}],type:Os.text}):n[e.message.stream_id]?n[e.message.stream_id].push(e):n[e.message.stream_id]=[e]}}),Object.keys(n).forEach(e=>{const i=n[e],r=this.getConsecutiveChunks(i.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)})),o=r.map(e=>e.message.text).join(""),a=r[0],s={timestamp:a.timetoken,message:o,isLeadMessage:this.isLeadMessage(a),chunks:r.map(e=>{var t,n;return{text:e.message.text,order:null!==(t=e.message.order)&&void 0!==t?t:0,isDone:null!==(n=e.message.is_done)&&void 0!==n&&n}}),type:Os.text};this.isCurrentlyStreamingMessage=this.isMessageStillStreamingChunks(r),t.push(s)}),t.sort((e,t)=>e.timestamp-t.timestamp),t},this.getConsecutiveChunks=e=>{var t,n;const i=e.sort((e,t)=>{var n,i;return(null!==(n=e.message.order)&&void 0!==n?n:0)-(null!==(i=t.message.order)&&void 0!==i?i:0)}),r=[];let o=null!==(t=i[0].message.order)&&void 0!==t?t:0;for(const e of i){if((null!==(n=e.message.order)&&void 0!==n?n:-1)!==o)break;r.push(e),o++}return r},this.isMessageStillStreamingChunks=e=>{const t=e.find(e=>e.message.is_done);return!t||e.length===t.message.order},this.buildingSlug=e,this.chatStorageSlug=e,this.buildingWebchatView=t,this.orgSlug=n,this.leadSource=i,this.leadUserId=r,this.channel=`webchat_${r}`,this.leadSourceClient=a,this.leadSourceMultitouchClient=o,this.widgetType=s}getSessionToken(){return this.sessionToken}async initSession(e,t,n){try{const i={building_slug:e,org_slug:t};this.centralConvo&&(i.central_convo=!0),n&&(i.lead_id=n);const o=await r().post(`${this.apiHost}/platformApi/webchat/init`,i);return this.sessionToken=o.data.session_token,this.leadUserId=o.data.lead_id,this.channel=o.data.channel,o.data}catch(e){return this.buildingWebchatView&&Ao({logTitle:"WEBCHAT_INIT_SESSION_ERROR",logData:{error:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e}),null}}adoptBuilding(e,t){this.buildingSlug=e,this.buildingWebchatView=t}addChatListener(e){this.chatListener=e}async initializePubnub(e){if(!e.leadId)return;this.leadUserId=e.leadId;const t=await this.fetchToken(this.leadUserId,this.channel);return t?(this.pubnub=new(ls())({publishKey:t.keys.publish_key,subscribeKey:t.keys.subscribe_key,userId:this.leadUserId,authKey:t.auth.result.token,origin:"meetelise.pubnubapi.com"}),this.withAuthToken(()=>new Promise(()=>this.handleChatListeners())),await this.withAuthToken(()=>this.getChannelHistory()),this.pubnub):void 0}async fetchToken(e,t){try{if(this.sessionToken){const e="healthcare"===this.widgetType?"?industry=health_care":"";return(await r().get(`${this.apiHost}/platformApi/webchat/pn/v2/request-token${e}`,{headers:{"X-Session-Token":this.sessionToken}})).data}if(this.centralConvo)return null;return(await r().get(`${this.apiHost}/platformApi/webchat/pn/request-token?user_id=${e}&channel=${t}&${"healthcare"===this.widgetType?"industry=health_care":""}`)).data}catch(e){this.buildingWebchatView&&Ao({logTitle:"PUBNUB_ERROR_FETCHING_TOKEN",logData:{error:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return null}async fetchChannelExists(e){try{return(await r().get(`${this.apiHost}/platformApi/webchat/check-channel-exists?channel_name=${e}`)).data}catch(e){this.buildingWebchatView&&Ao({logTitle:"PUBNUB_ERROR_FETCHING_CHANNEL_EXISTS",logData:{error:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}return!1}async withAuthToken(e){try{await e()}catch(t){if(t instanceof i.AxiosError&&t&&t.response&&403===t.response.status)try{if(!this.pubnub||!this.leadUserId||!this.channel)return;const t=await this.fetchToken(this.leadUserId,this.channel);if(!t)return;this.pubnub.setAuthKey(t.auth.result.token),await e()}catch(e){this.buildingWebchatView&&Ao({logTitle:"PUBNUB_ERROR_REFETCHING_TOKEN",logData:{retryError:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}}async getChannelHistory(e=1500){var t;try{let n=[],i=null;const r=100;for(let t=0;t<e;t+=r){const o=await new Promise((n,o)=>{if(!this.pubnub||!this.channel)return[];const a=Math.min(r,e-t);this.pubnub.fetchMessages({channels:[this.channel],count:a,start:null!=i?i:void 0},(e,t)=>{e.error?o(e):n(t)})}),a=o.channels[this.channel];if(!a)break;if(a.sort((e,t)=>+e.timetoken-+t.timetoken),!a||0===a.length)break;if(this.channel&&0!==Object.keys(o.channels).length){const e=o.channels[this.channel],t=[];e.forEach(e=>{e.uuid&&t.push({channel:e.channel,message:e.message,publisher:e.uuid,subscription:e.channel,timetoken:+e.timetoken})}),this.markEveryPreviousNoReplyMessageDone(t),n=n.concat(t.filter(e=>e.message.messageType!==As.noReply))}if(i=a[0].timetoken,n.length>=e||a.length<r)break}this.rawPubnubMessages=n.slice(0,e),this.simpleChatMessages=this.translatePubnubMessagesIntoSimpleChatMessages(this.rawPubnubMessages),null===(t=this.chatListener)||void 0===t||t.call(this,{messages:this.simpleChatMessages,isLoading:!1})}catch(e){this.buildingWebchatView&&Ao({logTitle:"PUBNUB_WARN_FETCHING_HISTORY",logData:{error:e},logType:ko.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}}},Is=p`
|
|
1798
1796
|
#healthchat-container {
|
|
1799
1797
|
position: fixed;
|
|
1800
1798
|
|
|
@@ -1924,7 +1922,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
1924
1922
|
.health-bttn-allow-access {
|
|
1925
1923
|
padding-right: 28px;
|
|
1926
1924
|
}
|
|
1927
|
-
`,
|
|
1925
|
+
`,Ns=p`
|
|
1928
1926
|
#pubnub-chat-container {
|
|
1929
1927
|
position: fixed;
|
|
1930
1928
|
|
|
@@ -2061,7 +2059,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2061
2059
|
cursor: default;
|
|
2062
2060
|
opacity: 0.45;
|
|
2063
2061
|
}
|
|
2064
|
-
`,
|
|
2062
|
+
`,Ms=p`
|
|
2065
2063
|
#header-text {
|
|
2066
2064
|
font-size: 12px;
|
|
2067
2065
|
font-weight: 700;
|
|
@@ -2282,7 +2280,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2282
2280
|
white-space: nowrap;
|
|
2283
2281
|
border: 0;
|
|
2284
2282
|
}
|
|
2285
|
-
`,{entries:Ms,setPrototypeOf:Ds,isFrozen:Ls,getPrototypeOf:Rs,getOwnPropertyDescriptor:Bs}=Object;let{freeze:Us,seal:js,create:Fs}=Object,{apply:Hs,construct:zs}="undefined"!=typeof Reflect&&Reflect;Us||(Us=function(e){return e}),js||(js=function(e){return e}),Hs||(Hs=function(e,t,n){return e.apply(t,n)}),zs||(zs=function(e,t){return new e(...t)});const Gs=ol(Array.prototype.forEach),Vs=ol(Array.prototype.lastIndexOf),Ws=ol(Array.prototype.pop),Qs=ol(Array.prototype.push),qs=ol(Array.prototype.splice),Ys=ol(String.prototype.toLowerCase),Ks=ol(String.prototype.toString),Xs=ol(String.prototype.match),Zs=ol(String.prototype.replace),Js=ol(String.prototype.indexOf),el=ol(String.prototype.trim),tl=ol(Object.prototype.hasOwnProperty),nl=ol(RegExp.prototype.test),il=(rl=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return zs(rl,t)});var rl;function ol(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return Hs(e,t,i)}}function al(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ys;Ds&&Ds(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Ls(t)||(t[i]=e),r=e)}e[r]=!0}return e}function sl(e){for(let t=0;t<e.length;t++){tl(e,t)||(e[t]=null)}return e}function ll(e){const t=Fs(null);for(const[n,i]of Ms(e)){tl(e,n)&&(Array.isArray(i)?t[n]=sl(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=ll(i):t[n]=i)}return t}function ul(e,t){for(;null!==e;){const n=Bs(e,t);if(n){if(n.get)return ol(n.get);if("function"==typeof n.value)return ol(n.value)}e=Rs(e)}return function(){return null}}const dl=Us(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),cl=Us(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),hl=Us(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pl=Us(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fl=Us(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),gl=Us(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ml=Us(["#text"]),bl=Us(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),yl=Us(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),vl=Us(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),wl=Us(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cl=js(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xl=js(/<%[\w\W]*|[\w\W]*%>/gm),$l=js(/\$\{[\w\W]*/gm),Sl=js(/^data-[\-\w.\u00B7-\uFFFF]+$/),kl=js(/^aria-[\-\w]+$/),Al=js(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Tl=js(/^(?:\w+script|data):/i),El=js(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_l=js(/^html$/i),Ol=js(/^[a-z][.\w]*(-[.\w]+)+$/i);var Pl=Object.freeze({__proto__:null,ARIA_ATTR:kl,ATTR_WHITESPACE:El,CUSTOM_ELEMENT:Ol,DATA_ATTR:Sl,DOCTYPE_NAME:_l,ERB_EXPR:xl,IS_ALLOWED_URI:Al,IS_SCRIPT_OR_DATA:Tl,MUSTACHE_EXPR:Cl,TMPLIT_EXPR:$l});const Il=1,Nl=3,Ml=7,Dl=8,Ll=9,Rl=function(){return"undefined"==typeof window?null:window};var Bl=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Rl();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Ll||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:d,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=u.prototype,m=ul(g,"cloneNode"),b=ul(g,"remove"),y=ul(g,"nextSibling"),v=ul(g,"childNodes"),w=ul(g,"parentNode");if("function"==typeof s){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let C,x="";const{implementation:$,createNodeIterator:S,createDocumentFragment:k,getElementsByTagName:A}=i,{importNode:T}=r;let E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Ms&&"function"==typeof w&&$&&void 0!==$.createHTMLDocument;const{MUSTACHE_EXPR:_,ERB_EXPR:O,TMPLIT_EXPR:P,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:L}=Pl;let{IS_ALLOWED_URI:R}=Pl,B=null;const U=al({},[...dl,...cl,...hl,...fl,...ml]);let j=null;const F=al({},[...bl,...yl,...vl,...wl]);let H=Object.seal(Fs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,G=null,V=!0,W=!0,Q=!1,q=!0,Y=!1,K=!0,X=!1,Z=!1,J=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,oe=!0,ae=!1,se={},le=null;const ue=al({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ce=al({},["audio","video","img","source","image","track"]);let he=null;const pe=al({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let be=me,ye=!1,ve=null;const we=al({},[fe,ge,me],Ks);let Ce=al({},["mi","mo","mn","ms","mtext"]),xe=al({},["annotation-xml"]);const $e=al({},["title","style","font","a","script"]);let Se=null;const ke=["application/xhtml+xml","text/html"];let Ae=null,Te=null;const Ee=i.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=ll(e),Se=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===Se?Ks:Ys,B=tl(e,"ALLOWED_TAGS")?al({},e.ALLOWED_TAGS,Ae):U,j=tl(e,"ALLOWED_ATTR")?al({},e.ALLOWED_ATTR,Ae):F,ve=tl(e,"ALLOWED_NAMESPACES")?al({},e.ALLOWED_NAMESPACES,Ks):we,he=tl(e,"ADD_URI_SAFE_ATTR")?al(ll(pe),e.ADD_URI_SAFE_ATTR,Ae):pe,de=tl(e,"ADD_DATA_URI_TAGS")?al(ll(ce),e.ADD_DATA_URI_TAGS,Ae):ce,le=tl(e,"FORBID_CONTENTS")?al({},e.FORBID_CONTENTS,Ae):ue,z=tl(e,"FORBID_TAGS")?al({},e.FORBID_TAGS,Ae):ll({}),G=tl(e,"FORBID_ATTR")?al({},e.FORBID_ATTR,Ae):ll({}),se=!!tl(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,Q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||Al,be=e.NAMESPACE||me,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,xe=e.HTML_INTEGRATION_POINTS||xe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),se&&(B=al({},ml),j=[],!0===se.html&&(al(B,dl),al(j,bl)),!0===se.svg&&(al(B,cl),al(j,yl),al(j,wl)),!0===se.svgFilters&&(al(B,hl),al(j,yl),al(j,wl)),!0===se.mathMl&&(al(B,fl),al(j,vl),al(j,wl))),e.ADD_TAGS&&(B===U&&(B=ll(B)),al(B,e.ADD_TAGS,Ae)),e.ADD_ATTR&&(j===F&&(j=ll(j)),al(j,e.ADD_ATTR,Ae)),e.ADD_URI_SAFE_ATTR&&al(he,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(le===ue&&(le=ll(le)),al(le,e.FORBID_CONTENTS,Ae)),oe&&(B["#text"]=!0),X&&al(B,["html","head","body"]),B.table&&(al(B,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,x=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(f,o)),null!==C&&"string"==typeof x&&(x=C.createHTML(""));Us&&Us(e),Te=e}},Pe=al({},[...cl,...hl,...pl]),Ie=al({},[...fl,...gl]),Ne=function(e){Qs(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){b(e)}},Me=function(e,t){try{Qs(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Qs(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ne(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=Xs(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Se&&be===me&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=C?C.createHTML(e):e;if(be===me)try{t=(new p).parseFromString(r,Se)}catch(e){}if(!t||!t.documentElement){t=$.createDocument(be,"template",null);try{t.documentElement.innerHTML=ye?x:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),be===me?A.call(t,X?"html":"body")[0]:X?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof c)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function Ue(e,t,i){Gs(e,e=>{e.call(n,t,i,Te)})}const je=function(e){let t=null;if(Ue(E.beforeSanitizeElements,e,null),Re(e))return Ne(e),!0;const i=Ae(e.nodeName);if(Ue(E.uponSanitizeElement,e,{tagName:i,allowedTags:B}),K&&e.hasChildNodes()&&!Be(e.firstElementChild)&&nl(/<[/\w!]/g,e.innerHTML)&&nl(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===Ml)return Ne(e),!0;if(K&&e.nodeType===Dl&&nl(/<[/\w]/g,e.data))return Ne(e),!0;if(!B[i]||z[i]){if(!z[i]&&He(i)){if(H.tagNameCheck instanceof RegExp&&nl(H.tagNameCheck,i))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(i))return!1}if(oe&&!le[i]){const t=w(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=m(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,y(e))}}}return Ne(e),!0}return e instanceof u&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=Ys(e.tagName),i=Ys(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===me?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||Ce[i]):Boolean(Pe[n]):e.namespaceURI===fe?t.namespaceURI===me?"math"===n:t.namespaceURI===ge?"math"===n&&xe[i]:Boolean(Ie[n]):e.namespaceURI===me?!(t.namespaceURI===ge&&!xe[i])&&!(t.namespaceURI===fe&&!Ce[i])&&!Ie[n]&&($e[n]||!Pe[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!nl(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Nl&&(t=e.textContent,Gs([_,O,P],e=>{t=Zs(t,e," ")}),e.textContent!==t&&(Qs(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ue(E.afterSanitizeElements,e,null),!1):(Ne(e),!0)},Fe=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in Ee))return!1;if(W&&!G[t]&&nl(I,t));else if(V&&nl(N,t));else if(!j[t]||G[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&nl(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&nl(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&nl(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(he[t]);else if(nl(R,Zs(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Js(n,"data:")||!de[e]){if(Q&&!nl(M,Zs(n,D,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&Xs(e,L)},ze=function(e){Ue(E.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let r=t.length;for(;r--;){const o=t[r],{name:a,namespaceURI:s,value:l}=o,u=Ae(a),d=l;let c="value"===a?d:el(d);if(i.attrName=u,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,Ue(E.uponSanitizeAttribute,e,i),c=i.attrValue,!re||"id"!==u&&"name"!==u||(Me(a,e),c="user-content-"+c),K&&nl(/((--!?|])>)|<\/(style|title)/i,c)){Me(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Me(a,e);continue}if(!q&&nl(/\/>/i,c)){Me(a,e);continue}Y&&Gs([_,O,P],e=>{c=Zs(c,e," ")});const h=Ae(e.nodeName);if(Fe(h,u,c)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":c=C.createHTML(c);break;case"TrustedScriptURL":c=C.createScriptURL(c)}if(c!==d)try{s?e.setAttributeNS(s,a,c):e.setAttribute(a,c),Re(e)?Ne(e):Ws(n.removed)}catch(t){Me(a,e)}}else Me(a,e)}Ue(E.afterSanitizeAttributes,e,null)},Ge=function e(t){let n=null;const i=Le(t);for(Ue(E.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)Ue(E.uponSanitizeShadowNode,n,null),je(n),ze(n),n.content instanceof a&&e(n.content);Ue(E.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,u=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw il("toString is not a function");if("string"!=typeof(e=e.toString()))throw il("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ae(e.nodeName);if(!B[t]||z[t])throw il("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=De("\x3c!----\x3e"),o=i.ownerDocument.importNode(e,!0),o.nodeType===Il&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return C&&ne?C.createHTML(e):e;if(i=De(e),!i)return ee?null:ne?x:""}i&&J&&Ne(i.firstChild);const d=Le(ae?e:i);for(;s=d.nextNode();)je(s),ze(s),s.content instanceof a&&Ge(s.content);if(ae)return e;if(ee){if(te)for(u=k.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(j.shadowroot||j.shadowrootmode)&&(u=T.call(r,u,!0)),u}let c=X?i.outerHTML:i.innerHTML;return X&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&nl(_l,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Y&&Gs([_,O,P],e=>{c=Zs(c,e," ")}),C&&ne?C.createHTML(c):c},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Te=null,Z=!1},n.isValidAttribute=function(e,t,n){Te||Oe({});const i=Ae(e),r=Ae(t);return Fe(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&Qs(E[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Vs(E[e],t);return-1===n?void 0:qs(E[e],n,1)[0]}return Ws(E[e])},n.removeHooks=function(e){E[e]=[]},n.removeAllHooks=function(){E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Ul=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 jl=class extends ue{constructor(){super(...arguments),this.spinSpeed=.4}updated(){this.style.setProperty("--spin-duration",`${this.spinSpeed}s`)}render(){return H`<div class="spinner"></div>`}};jl.styles=p`
|
|
2283
|
+
`,{entries:Ds,setPrototypeOf:Ls,isFrozen:Rs,getPrototypeOf:Bs,getOwnPropertyDescriptor:Us}=Object;let{freeze:js,seal:Fs,create:Hs}=Object,{apply:zs,construct:Gs}="undefined"!=typeof Reflect&&Reflect;js||(js=function(e){return e}),Fs||(Fs=function(e){return e}),zs||(zs=function(e,t,n){return e.apply(t,n)}),Gs||(Gs=function(e,t){return new e(...t)});const Vs=al(Array.prototype.forEach),Ws=al(Array.prototype.lastIndexOf),Qs=al(Array.prototype.pop),qs=al(Array.prototype.push),Ys=al(Array.prototype.splice),Ks=al(String.prototype.toLowerCase),Xs=al(String.prototype.toString),Zs=al(String.prototype.match),Js=al(String.prototype.replace),el=al(String.prototype.indexOf),tl=al(String.prototype.trim),nl=al(Object.prototype.hasOwnProperty),il=al(RegExp.prototype.test),rl=(ol=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Gs(ol,t)});var ol;function al(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return zs(e,t,i)}}function sl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ks;Ls&&Ls(e,null);let i=t.length;for(;i--;){let r=t[i];if("string"==typeof r){const e=n(r);e!==r&&(Rs(t)||(t[i]=e),r=e)}e[r]=!0}return e}function ll(e){for(let t=0;t<e.length;t++){nl(e,t)||(e[t]=null)}return e}function ul(e){const t=Hs(null);for(const[n,i]of Ds(e)){nl(e,n)&&(Array.isArray(i)?t[n]=ll(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=ul(i):t[n]=i)}return t}function dl(e,t){for(;null!==e;){const n=Us(e,t);if(n){if(n.get)return al(n.get);if("function"==typeof n.value)return al(n.value)}e=Bs(e)}return function(){return null}}const cl=js(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hl=js(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pl=js(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fl=js(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gl=js(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ml=js(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bl=js(["#text"]),yl=js(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),vl=js(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wl=js(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Cl=js(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xl=Fs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$l=Fs(/<%[\w\W]*|[\w\W]*%>/gm),Sl=Fs(/\$\{[\w\W]*/gm),kl=Fs(/^data-[\-\w.\u00B7-\uFFFF]+$/),Al=Fs(/^aria-[\-\w]+$/),Tl=Fs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),El=Fs(/^(?:\w+script|data):/i),_l=Fs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ol=Fs(/^html$/i),Pl=Fs(/^[a-z][.\w]*(-[.\w]+)+$/i);var Il=Object.freeze({__proto__:null,ARIA_ATTR:Al,ATTR_WHITESPACE:_l,CUSTOM_ELEMENT:Pl,DATA_ATTR:kl,DOCTYPE_NAME:Ol,ERB_EXPR:$l,IS_ALLOWED_URI:Tl,IS_SCRIPT_OR_DATA:El,MUSTACHE_EXPR:xl,TMPLIT_EXPR:Sl});const Nl=1,Ml=3,Dl=7,Ll=8,Rl=9,Bl=function(){return"undefined"==typeof window?null:window};var Ul=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Bl();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==Rl||!t.Element)return n.isSupported=!1,n;let{document:i}=t;const r=i,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:d,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:f}=t,g=u.prototype,m=dl(g,"cloneNode"),b=dl(g,"remove"),y=dl(g,"nextSibling"),v=dl(g,"childNodes"),w=dl(g,"parentNode");if("function"==typeof s){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let C,x="";const{implementation:$,createNodeIterator:S,createDocumentFragment:k,getElementsByTagName:A}=i,{importNode:T}=r;let E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Ds&&"function"==typeof w&&$&&void 0!==$.createHTMLDocument;const{MUSTACHE_EXPR:_,ERB_EXPR:O,TMPLIT_EXPR:P,DATA_ATTR:I,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:M,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:L}=Il;let{IS_ALLOWED_URI:R}=Il,B=null;const U=sl({},[...cl,...hl,...pl,...gl,...bl]);let j=null;const F=sl({},[...yl,...vl,...wl,...Cl]);let H=Object.seal(Hs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,G=null,V=!0,W=!0,Q=!1,q=!0,Y=!1,K=!0,X=!1,Z=!1,J=!1,ee=!1,te=!1,ne=!1,ie=!0,re=!1,oe=!0,ae=!1,se={},le=null;const ue=sl({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const ce=sl({},["audio","video","img","source","image","track"]);let he=null;const pe=sl({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",me="http://www.w3.org/1999/xhtml";let be=me,ye=!1,ve=null;const we=sl({},[fe,ge,me],Xs);let Ce=sl({},["mi","mo","mn","ms","mtext"]),xe=sl({},["annotation-xml"]);const $e=sl({},["title","style","font","a","script"]);let Se=null;const ke=["application/xhtml+xml","text/html"];let Ae=null,Te=null;const Ee=i.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},Oe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=ul(e),Se=-1===ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===Se?Xs:Ks,B=nl(e,"ALLOWED_TAGS")?sl({},e.ALLOWED_TAGS,Ae):U,j=nl(e,"ALLOWED_ATTR")?sl({},e.ALLOWED_ATTR,Ae):F,ve=nl(e,"ALLOWED_NAMESPACES")?sl({},e.ALLOWED_NAMESPACES,Xs):we,he=nl(e,"ADD_URI_SAFE_ATTR")?sl(ul(pe),e.ADD_URI_SAFE_ATTR,Ae):pe,de=nl(e,"ADD_DATA_URI_TAGS")?sl(ul(ce),e.ADD_DATA_URI_TAGS,Ae):ce,le=nl(e,"FORBID_CONTENTS")?sl({},e.FORBID_CONTENTS,Ae):ue,z=nl(e,"FORBID_TAGS")?sl({},e.FORBID_TAGS,Ae):ul({}),G=nl(e,"FORBID_ATTR")?sl({},e.FORBID_ATTR,Ae):ul({}),se=!!nl(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,W=!1!==e.ALLOW_DATA_ATTR,Q=e.ALLOW_UNKNOWN_PROTOCOLS||!1,q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,K=!1!==e.SAFE_FOR_XML,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,oe=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||Tl,be=e.NAMESPACE||me,Ce=e.MATHML_TEXT_INTEGRATION_POINTS||Ce,xe=e.HTML_INTEGRATION_POINTS||xe,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(W=!1),te&&(ee=!0),se&&(B=sl({},bl),j=[],!0===se.html&&(sl(B,cl),sl(j,yl)),!0===se.svg&&(sl(B,hl),sl(j,vl),sl(j,Cl)),!0===se.svgFilters&&(sl(B,pl),sl(j,vl),sl(j,Cl)),!0===se.mathMl&&(sl(B,gl),sl(j,wl),sl(j,Cl))),e.ADD_TAGS&&(B===U&&(B=ul(B)),sl(B,e.ADD_TAGS,Ae)),e.ADD_ATTR&&(j===F&&(j=ul(j)),sl(j,e.ADD_ATTR,Ae)),e.ADD_URI_SAFE_ATTR&&sl(he,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(le===ue&&(le=ul(le)),sl(le,e.FORBID_CONTENTS,Ae)),oe&&(B["#text"]=!0),X&&sl(B,["html","head","body"]),B.table&&(sl(B,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw rl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw rl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=e.TRUSTED_TYPES_POLICY,x=C.createHTML("")}else void 0===C&&(C=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return null}}(f,o)),null!==C&&"string"==typeof x&&(x=C.createHTML(""));js&&js(e),Te=e}},Pe=sl({},[...hl,...pl,...fl]),Ie=sl({},[...gl,...ml]),Ne=function(e){qs(n.removed,{element:e});try{w(e).removeChild(e)}catch(t){b(e)}},Me=function(e,t){try{qs(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){qs(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Ne(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,n=null;if(J)e="<remove></remove>"+e;else{const t=Zs(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Se&&be===me&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=C?C.createHTML(e):e;if(be===me)try{t=(new p).parseFromString(r,Se)}catch(e){}if(!t||!t.documentElement){t=$.createDocument(be,"template",null);try{t.documentElement.innerHTML=ye?x:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),be===me?A.call(t,X?"html":"body")[0]:X?t.documentElement:o},Le=function(e){return S.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Re=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof c)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Be=function(e){return"function"==typeof l&&e instanceof l};function Ue(e,t,i){Vs(e,e=>{e.call(n,t,i,Te)})}const je=function(e){let t=null;if(Ue(E.beforeSanitizeElements,e,null),Re(e))return Ne(e),!0;const i=Ae(e.nodeName);if(Ue(E.uponSanitizeElement,e,{tagName:i,allowedTags:B}),K&&e.hasChildNodes()&&!Be(e.firstElementChild)&&il(/<[/\w!]/g,e.innerHTML)&&il(/<[/\w!]/g,e.textContent))return Ne(e),!0;if(e.nodeType===Dl)return Ne(e),!0;if(K&&e.nodeType===Ll&&il(/<[/\w]/g,e.data))return Ne(e),!0;if(!B[i]||z[i]){if(!z[i]&&He(i)){if(H.tagNameCheck instanceof RegExp&&il(H.tagNameCheck,i))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(i))return!1}if(oe&&!le[i]){const t=w(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let i=n.length-1;i>=0;--i){const r=m(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,y(e))}}}return Ne(e),!0}return e instanceof u&&!function(e){let t=w(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=Ks(e.tagName),i=Ks(t.tagName);return!!ve[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===me?"svg"===n:t.namespaceURI===fe?"svg"===n&&("annotation-xml"===i||Ce[i]):Boolean(Pe[n]):e.namespaceURI===fe?t.namespaceURI===me?"math"===n:t.namespaceURI===ge?"math"===n&&xe[i]:Boolean(Ie[n]):e.namespaceURI===me?!(t.namespaceURI===ge&&!xe[i])&&!(t.namespaceURI===fe&&!Ce[i])&&!Ie[n]&&($e[n]||!Pe[n]):!("application/xhtml+xml"!==Se||!ve[e.namespaceURI]))}(e)?(Ne(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!il(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Ml&&(t=e.textContent,Vs([_,O,P],e=>{t=Js(t,e," ")}),e.textContent!==t&&(qs(n.removed,{element:e.cloneNode()}),e.textContent=t)),Ue(E.afterSanitizeElements,e,null),!1):(Ne(e),!0)},Fe=function(e,t,n){if(ie&&("id"===t||"name"===t)&&(n in i||n in Ee))return!1;if(W&&!G[t]&&il(I,t));else if(V&&il(N,t));else if(!j[t]||G[t]){if(!(He(e)&&(H.tagNameCheck instanceof RegExp&&il(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&il(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&il(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(he[t]);else if(il(R,Js(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==el(n,"data:")||!de[e]){if(Q&&!il(M,Js(n,D,"")));else if(n)return!1}else;return!0},He=function(e){return"annotation-xml"!==e&&Zs(e,L)},ze=function(e){Ue(E.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Re(e))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let r=t.length;for(;r--;){const o=t[r],{name:a,namespaceURI:s,value:l}=o,u=Ae(a),d=l;let c="value"===a?d:tl(d);if(i.attrName=u,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,Ue(E.uponSanitizeAttribute,e,i),c=i.attrValue,!re||"id"!==u&&"name"!==u||(Me(a,e),c="user-content-"+c),K&&il(/((--!?|])>)|<\/(style|title)/i,c)){Me(a,e);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){Me(a,e);continue}if(!q&&il(/\/>/i,c)){Me(a,e);continue}Y&&Vs([_,O,P],e=>{c=Js(c,e," ")});const h=Ae(e.nodeName);if(Fe(h,u,c)){if(C&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(s);else switch(f.getAttributeType(h,u)){case"TrustedHTML":c=C.createHTML(c);break;case"TrustedScriptURL":c=C.createScriptURL(c)}if(c!==d)try{s?e.setAttributeNS(s,a,c):e.setAttribute(a,c),Re(e)?Ne(e):Qs(n.removed)}catch(t){Me(a,e)}}else Me(a,e)}Ue(E.afterSanitizeAttributes,e,null)},Ge=function e(t){let n=null;const i=Le(t);for(Ue(E.beforeSanitizeShadowDOM,t,null);n=i.nextNode();)Ue(E.uponSanitizeShadowNode,n,null),je(n),ze(n),n.content instanceof a&&e(n.content);Ue(E.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,u=null;if(ye=!e,ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Be(e)){if("function"!=typeof e.toString)throw rl("toString is not a function");if("string"!=typeof(e=e.toString()))throw rl("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Z||Oe(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=Ae(e.nodeName);if(!B[t]||z[t])throw rl("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)i=De("\x3c!----\x3e"),o=i.ownerDocument.importNode(e,!0),o.nodeType===Nl&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return C&&ne?C.createHTML(e):e;if(i=De(e),!i)return ee?null:ne?x:""}i&&J&&Ne(i.firstChild);const d=Le(ae?e:i);for(;s=d.nextNode();)je(s),ze(s),s.content instanceof a&&Ge(s.content);if(ae)return e;if(ee){if(te)for(u=k.call(i.ownerDocument);i.firstChild;)u.appendChild(i.firstChild);else u=i;return(j.shadowroot||j.shadowrootmode)&&(u=T.call(r,u,!0)),u}let c=X?i.outerHTML:i.innerHTML;return X&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&il(Ol,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),Y&&Vs([_,O,P],e=>{c=Js(c,e," ")}),C&&ne?C.createHTML(c):c},n.setConfig=function(){Oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Z=!0},n.clearConfig=function(){Te=null,Z=!1},n.isValidAttribute=function(e,t,n){Te||Oe({});const i=Ae(e),r=Ae(t);return Fe(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&qs(E[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Ws(E[e],t);return-1===n?void 0:Ys(E[e],n,1)[0]}return Qs(E[e])},n.removeHooks=function(e){E[e]=[]},n.removeAllHooks=function(){E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),jl=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 Fl=class extends ue{constructor(){super(...arguments),this.spinSpeed=.4}updated(){this.style.setProperty("--spin-duration",`${this.spinSpeed}s`)}render(){return H`<div class="spinner"></div>`}};Fl.styles=p`
|
|
2286
2284
|
.spinner {
|
|
2287
2285
|
border: 2px solid rgba(0, 0, 0, 0.2);
|
|
2288
2286
|
border-top: 2px solid #c057ff;
|
|
@@ -2300,16 +2298,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2300
2298
|
transform: rotate(360deg);
|
|
2301
2299
|
}
|
|
2302
2300
|
}
|
|
2303
|
-
`,
|
|
2301
|
+
`,jl([pe({type:Number})],Fl.prototype,"spinSpeed",void 0),Fl=jl([ce("mini-loader")],Fl);var Hl=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 zl=class extends ue{constructor(){super(...arguments),this.onMount=()=>({}),this.loadingPreviews=!0,this.websitePreviewInfo=[],this.imagesToDisplay=[],this.imageUrlError=[],this.isLeadMessage=!1,this.widgetType=Sp.Default}isMessageStillStreamingChunks(){if(!this.message)return!1;const e=this.message.chunks.find(e=>e.isDone);return!e||this.message.chunks.length===e.order}updated(e){if(this.onMount(),!e.has("message"))return;if(!this.message)return;const{hyperlinks:t,markedText:n}=this.mapAndMarkHyperLinks(this.message.message),i=/(https?:\/\/[^\s]+)/g,r=[],o=[];this.parsedMessage=H`${n.trim().split("\n").map(e=>{const n=this.sanitizeMarkdownText(e),a=this.preserveHTMLTags(n);return a?H`${a.map(e=>{const n=t.filter(t=>e.includes(t.id));if(n.length){let t=e;return n.forEach(e=>{o.push({redirectTo:e.link,source:e.link}),t=t.replace(e.id,this.hyperlinkHTML(e.link,e.hyperlink))}),H`${Bo(Ul.sanitize(t,{ADD_ATTR:["target"]}))} `}if(i.test(e)){const t=this.removeTrailingPunctuation(e);return r.push(this.getLinkData(t)),H`<a
|
|
2304
2302
|
class="redirect-link"
|
|
2305
2303
|
href="${t}"
|
|
2306
2304
|
target="_blank"
|
|
2307
2305
|
rel="noopener noreferrer"
|
|
2308
2306
|
>${t}
|
|
2309
|
-
</a>`}return H`${
|
|
2307
|
+
</a>`}return H`${Bo(Ul.sanitize(e))} `})}<br />`:H``})}`,this.imagesToDisplay=o,Promise.all(r).then(e=>{this.websitePreviewInfo=e})}hyperlinkHTML(e,t){const n=document.createElement("a");return n.className="redirect-link",n.href=e,n.target="_blank",n.rel="noopener noreferrer",n.textContent=t,n.outerHTML}preserveHTMLTags(e){var t;const n=e.match(/(<\/?[a-z][^>]*>[^<]*<\/?[a-z]*>|[^\s]+[.,?!]?|\S)/gi);return null!==(t=null==n?void 0:n.filter(e=>""!==e.trim()))&&void 0!==t?t:[]}sanitizeMarkdownText(e){return e.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*?)\*\*/gim,"<b>$1</b>").replace(/\*(.*?)\*/gim,"<i>$1</i>").trim()}removeTrailingPunctuation(e){return[".",",","!","?",":",";"].includes(e[e.length-1])?this.removeTrailingPunctuation(e.slice(0,-1)):e}mapAndMarkHyperLinks(e){const t=Array.from(e.matchAll(/<https?:\/\/[^|]+\|[^>]+>|<a href="[^"]+"(?: target="[^"]*")?>[^<]+<\/a>|\[.*?\]\([^)]*\.[^)]*\)/g)),n=[],i=t.map(t=>{const n=t[0];if(void 0===t.index)return;const i=e[t.index-1],r=e[t.index+n.length];if(n.startsWith("<https")||n.startsWith("<http"))return{matchedLink:n,link:n.split("|")[0].replace("<",""),hyperlink:n.split("|")[1].replace(">",""),addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)};if(n.startsWith("<a href=")){const e=n.match(/href="([^"]+)"/),t=n.match(/>[^<]+</);return{matchedLink:n,link:e?e[1]:"",hyperlink:t?t[0].slice(1,-1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)}}{const[e,t]=n.split("](");return{matchedLink:n,link:t?t.slice(0,-1):"",hyperlink:e?e.slice(1):"",addSpaceBefore:!(!i||" "===i),addSpaceAfter:!(!r||" "===r)}}});return i.forEach(t=>{if(t&&t.link&&t.hyperlink){const i=ms().replace(/-/g,"");n.push({link:this.removeTrailingPunctuation(t.link),hyperlink:this.removeTrailingPunctuation(t.hyperlink),mark:t.matchedLink,id:i}),e=e.replace(t.matchedLink,`${t.addSpaceBefore?" ":""}${i}${t.addSpaceAfter?" ":""}`)}}),{hyperlinks:n,markedText:e}}async getLinkData(e){var t,n,i,o;try{const a=(await r().get(e)).data,s=(new DOMParser).parseFromString(a,"text/html");return s?{title:null!==(n=null===(t=s.querySelector("title"))||void 0===t?void 0:t.textContent)&&void 0!==n?n:null,description:(null===(i=s.querySelector('meta[name="description"]'))||void 0===i?void 0:i.getAttribute("content"))||null,image:(null===(o=s.querySelector('meta[property="og:image"]'))||void 0===o?void 0:o.getAttribute("content"))||null,favicon:null,link:e}:{title:null,description:null,image:null,favicon:null,link:e}}catch(t){return{title:null,description:null,image:null,favicon:null,link:e}}}render(){return this.message?H`<div class="message-inner-body">
|
|
2310
2308
|
${this.isMessageStillStreamingChunks()?H`<div class="message-loader"><mini-loader></mini-loader></div>`:""}
|
|
2311
2309
|
<p
|
|
2312
|
-
class=${Ce({"message-text":this.widgetType
|
|
2310
|
+
class=${Ce({"message-text":this.widgetType!==Sp.Utilities,"message-text-large":this.widgetType===Sp.Utilities,"webchat-font__desktop":!Ir(),"webchat-font__mobile":Ir()})}
|
|
2313
2311
|
>
|
|
2314
2312
|
${this.parsedMessage}
|
|
2315
2313
|
</p>
|
|
@@ -2340,16 +2338,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2340
2338
|
/>`:""}
|
|
2341
2339
|
|
|
2342
2340
|
<div class="website-preview-body">
|
|
2343
|
-
<p class=${Ce({"message-text":this.widgetType
|
|
2341
|
+
<p class=${Ce({"message-text":this.widgetType!==Sp.Utilities,"message-text-large":this.widgetType===Sp.Utilities,"website-preview-title":!0,"webchat-font__desktop":!Ir(),"webchat-font__mobile":Ir()})}>${e.title}</p>
|
|
2344
2342
|
${e.description?H`<p
|
|
2345
|
-
class=${Ce({"message-text":this.widgetType
|
|
2343
|
+
class=${Ce({"message-text":this.widgetType!==Sp.Utilities,"message-text-large":this.widgetType===Sp.Utilities,"website-preview-description":!0,"webchat-font__desktop":!Ir(),"webchat-font__mobile":Ir()})}
|
|
2346
2344
|
>
|
|
2347
2345
|
${e.description}
|
|
2348
2346
|
</p>`:""}
|
|
2349
2347
|
</div>
|
|
2350
2348
|
</div>
|
|
2351
2349
|
</a></div> `})}
|
|
2352
|
-
</div>`:H``}};
|
|
2350
|
+
</div>`:H``}};zl.styles=[Me,Ms,p`
|
|
2353
2351
|
.message-inner-body {
|
|
2354
2352
|
position: relative;
|
|
2355
2353
|
}
|
|
@@ -2358,7 +2356,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2358
2356
|
bottom: -2px;
|
|
2359
2357
|
right: -2px;
|
|
2360
2358
|
}
|
|
2361
|
-
`],
|
|
2359
|
+
`],Hl([pe({attribute:!0})],zl.prototype,"buildingSlug",void 0),Hl([pe({attribute:!0})],zl.prototype,"message",void 0),Hl([pe({attribute:!0})],zl.prototype,"myPubnub",void 0),Hl([pe({attribute:!0})],zl.prototype,"onMount",void 0),Hl([fe()],zl.prototype,"loadingPreviews",void 0),Hl([fe()],zl.prototype,"parsedMessage",void 0),Hl([fe()],zl.prototype,"websitePreviewInfo",void 0),Hl([fe()],zl.prototype,"imagesToDisplay",void 0),Hl([fe()],zl.prototype,"imageUrlError",void 0),Hl([pe({type:Boolean})],zl.prototype,"isLeadMessage",void 0),Hl([pe({attribute:!0})],zl.prototype,"widgetType",void 0),zl=Hl([ce("pubnub-message")],zl);var Gl=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 Vl=class extends ue{constructor(){super(...arguments),this.onMount=()=>({}),this.showMediaAsCarousel=!0,this.activeIndex=0}updated(e){this.onMount(),e.has("message")}prevImage(){this.message&&(0===this.activeIndex?this.activeIndex=this.message.media.length-1:this.activeIndex-=1)}nextImage(){this.message&&(this.activeIndex===this.message.media.length-1?this.activeIndex=0:this.activeIndex+=1)}render(){return this.message?this.showMediaAsCarousel?H`<div class="message-inner-body">
|
|
2362
2360
|
<div class="carousel">
|
|
2363
2361
|
<div
|
|
2364
2362
|
class="image-container"
|
|
@@ -2395,7 +2393,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2395
2393
|
rel="noopener noreferrer"
|
|
2396
2394
|
><img class=${"displayed-message-image"} src=${e.url} alt=""
|
|
2397
2395
|
/></a>`)}
|
|
2398
|
-
</div>`:H``}};
|
|
2396
|
+
</div>`:H``}};Vl.styles=[Me,Ms,p`
|
|
2399
2397
|
/* This element is a flex item in a bubble capped below the chat width.
|
|
2400
2398
|
Without min-width: 0 it can grow to all slides side by side, so the
|
|
2401
2399
|
carousel spills out of the bubble and the chat. */
|
|
@@ -2472,13 +2470,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2472
2470
|
.button:hover {
|
|
2473
2471
|
background-color: rgba(0, 0, 0, 0.8);
|
|
2474
2472
|
}
|
|
2475
|
-
`],
|
|
2473
|
+
`],Gl([pe({attribute:!0})],Vl.prototype,"message",void 0),Gl([pe({attribute:!0})],Vl.prototype,"myPubnub",void 0),Gl([pe({attribute:!0})],Vl.prototype,"onMount",void 0),Gl([fe()],Vl.prototype,"showMediaAsCarousel",void 0),Gl([fe()],Vl.prototype,"activeIndex",void 0),Vl=Gl([ce("pubnub-media")],Vl);var Wl=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 Ql=class extends ue{constructor(){super(...arguments),this.onMount=()=>({}),this.navigate=e=>window.location.assign(e)}updated(){this.onMount()}render(){if(!this.message)return H``;const{navigation:e}=this.message;return H`<button
|
|
2476
2474
|
type="button"
|
|
2477
2475
|
class=${Ce({"navigation-button":!0,"webchat-font__desktop":!Ir(),"webchat-font__mobile":Ir()})}
|
|
2478
|
-
@click=${()=>
|
|
2476
|
+
@click=${()=>ks(e,this.navigate)}
|
|
2479
2477
|
>
|
|
2480
2478
|
Take me to ${e.label}
|
|
2481
|
-
</button>`}};
|
|
2479
|
+
</button>`}};Ql.styles=[Me,Ms,p`
|
|
2482
2480
|
.navigation-button {
|
|
2483
2481
|
cursor: pointer;
|
|
2484
2482
|
border: none;
|
|
@@ -2497,7 +2495,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2497
2495
|
outline: 2px solid #4d90fe;
|
|
2498
2496
|
outline-offset: 2px;
|
|
2499
2497
|
}
|
|
2500
|
-
`],
|
|
2498
|
+
`],Wl([pe({attribute:!1})],Ql.prototype,"message",void 0),Wl([pe({attribute:!1})],Ql.prototype,"onMount",void 0),Wl([pe({attribute:!1})],Ql.prototype,"navigate",void 0),Ql=Wl([ce("pubnub-navigation")],Ql);function ql(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Yl(e,t){si(2,arguments);var n=li(e),i=li(t),r=ql(n,i),o=Math.abs(function(e,t){si(2,arguments);var n=lr(e),i=lr(t),r=n.getTime()-qi(n),o=i.getTime()-qi(i);return Math.round((r-o)/864e5)}(n,i));n.setDate(n.getDate()-r*o);var a=r*(o-Number(ql(n,i)===-r));return 0===a?0:a}const Kl=p`
|
|
2501
2499
|
#utilities-container {
|
|
2502
2500
|
position: fixed;
|
|
2503
2501
|
|
|
@@ -2618,20 +2616,20 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2618
2616
|
.health-bttn-allow-access {
|
|
2619
2617
|
padding-right: 28px;
|
|
2620
2618
|
}
|
|
2621
|
-
`,
|
|
2619
|
+
`,Xl=(e="black")=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none">
|
|
2622
2620
|
<line x1="1.70782" y1="13.2254" x2="13.2376" y2="1.69554" stroke="${e}" stroke-width="2.13401"/>
|
|
2623
2621
|
<path d="M2.00929 1.99996L13.3328 13.3421" stroke="${e}" stroke-width="2.13401"/>
|
|
2624
|
-
</svg>`,
|
|
2622
|
+
</svg>`,Zl=(e="black")=>z`
|
|
2625
2623
|
<svg aria-hidden="true" focusable="false" width="32" height="32" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2626
2624
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 0C17.7614 0 20 2.23858 20 5V15C20 17.7614 17.7614 20 15 20H5C2.23858 20 0 17.7614 0 15V5C0 2.23858 2.23858 0 5 0H15ZM18 5C18 3.34315 16.6569 2 15 2H5C3.34315 2 2 3.34315 2 5V15C2 16.6569 3.34315 18 5 18H15C16.6569 18 18 16.6569 18 15V5Z" fill="${e}"/>
|
|
2627
2625
|
<path d="M12.1893 9.25L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L13.8232 8.76256C14.5066 9.44598 14.5066 10.554 13.8232 11.2374L11.5303 13.5303C11.2374 13.8232 10.7626 13.8232 10.4697 13.5303C10.1768 13.2374 10.1768 12.7626 10.4697 12.4697L12.1893 10.75L6 10.75C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25L12.1893 9.25Z" fill="${e}"/>
|
|
2628
2626
|
</svg>
|
|
2629
|
-
`,
|
|
2627
|
+
`,Jl=(e="black")=>z`
|
|
2630
2628
|
<svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2631
2629
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 0C17.7614 0 20 2.23858 20 5V15C20 17.7614 17.7614 20 15 20H5C2.23858 20 0 17.7614 0 15V5C0 2.23858 2.23858 0 5 0H15ZM18 5C18 3.34315 16.6569 2 15 2H5C3.34315 2 2 3.34315 2 5V15C2 16.6569 3.34315 18 5 18H15C16.6569 18 18 16.6569 18 15V5Z" fill="${e}"/>
|
|
2632
2630
|
<path d="M12.1893 9.25L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L13.8232 8.76256C14.5066 9.44598 14.5066 10.554 13.8232 11.2374L11.5303 13.5303C11.2374 13.8232 10.7626 13.8232 10.4697 13.5303C10.1768 13.2374 10.1768 12.7626 10.4697 12.4697L12.1893 10.75L6 10.75C5.58579 10.75 5.25 10.4142 5.25 10C5.25 9.58579 5.58579 9.25 6 9.25L12.1893 9.25Z" fill="${e}"/>
|
|
2633
2631
|
</svg>
|
|
2634
|
-
`,
|
|
2632
|
+
`,eu=new WeakMap,tu=e=>!!e.hasAttribute("inert")||!0===e.inert,nu=(e,t)=>{const n=e;if(t)return e.setAttribute("inert",""),void(n.inert=!0);e.removeAttribute("inert"),n.inert=!1},iu=e=>{e.setAttribute("aria-hidden","true"),nu(e,!0)},ru=e=>{null===e.ariaHidden?e.element.removeAttribute("aria-hidden"):e.element.setAttribute("aria-hidden",e.ariaHidden),nu(e.element,e.hadInert)},ou=e=>{const t={element:e,ariaHidden:e.getAttribute("aria-hidden"),hadInert:tu(e)};return iu(e),t};var au,su=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 lu=au=class extends ue{constructor(){super(...arguments),this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.onMount=()=>({}),this.isHealthChat=!1,this.centralConvo=!1,this.widgetType=Sp.Default,this.primaryColor=Zn,this.backgroundColor=Jn,this.onClickExit=()=>{localStorage.setItem("isChatOpen","false")},this.requiresConsent=!1,this._isMobile=Ir(),this.shouldAutoScroll=!0,this.messages=[],this.isLoadingMessages=!1,this.hasReceivedConsent=!1,this._replyAnnouncement="",this.announcedReplyKeys=new Set,this.hasReplySnapshot=!1,this.holdMessageFieldFocus=!1,this.sendInFlight=!1,this.releaseFocusHoldQueued=!1,this.hostPageLock=null,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.websitePreviewMapping={},this.sendMessage=async e=>{var t,n;if(0!==e.length)if(this.sendInFlight||(null===(t=this.myPubnub)||void 0===t?void 0:t.isCurrentlyStreamingMessage))this.holdMessageFieldFocus&&this.focusMessageField();else{this.sendInFlight=!0;try{this.shouldAutoScroll=!0,this.holdMessageFieldFocus=!0,this.focusMessageField(),this.messageInput.value="",this.autoResizeMessageInput(),0===this.messages.length&&(this.messages=[{timestamp:0,message:e,isLeadMessage:!0,chunks:[{text:e,order:0,isDone:!0}],type:Os.text}]),await(null===(n=this.myPubnub)||void 0===n?void 0:n.sendMessage(e))}finally{this.sendInFlight=!1,this.focusMessageField(),await this.updateComplete,this.restoreMessageFieldFocus()}}},this.scrollToChatBottom=()=>{this.shouldAutoScroll&&this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"auto"})},this.handleConversationScroll=e=>{const t=e.currentTarget,n=t.scrollHeight-t.clientHeight-t.scrollTop;this.shouldAutoScroll=n<=au.AUTO_SCROLL_THRESHOLD_PX},this.autoResizeMessageInput=()=>{this.messageInput.style.height="auto",this.messageInput.style.height=this.messageInput.scrollHeight+"px"},this.needsConsent=()=>this.requiresConsent&&!this.hasReceivedConsent}get consentKey(){return`${this.orgSlug}Consent`}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Nr(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),this.releaseHostPage(),super.disconnectedCallback()}firstUpdated(){var e,t;this.messages=(null===(e=this.myPubnub)||void 0===e?void 0:e.simpleChatMessages)||[],null===(t=this.myPubnub)||void 0===t||t.addChatListener(e=>{this.messages=e.messages,this.isLoadingMessages=e.isLoading}),this.onMount();const n=localStorage.getItem(this.consentKey);if(!n)return void(this.hasReceivedConsent=!1);const i=JSON.parse(n),{timestamp:r,consentId:o}=i;Yl(new Date,new Date(r))<7&&o===Zo?this.hasReceivedConsent=!0:(this.hasReceivedConsent=!1,localStorage.removeItem(this.consentKey))}willUpdate(){this.syncReplyAnnouncement()}syncReplyAnnouncement(){var e;const t=(null===(e=this.building)||void 0===e?void 0:e.userFirstName)||"Elise",n=this.messages.flatMap(e=>{const n=mu(e,t);return n?[{key:gu(e),announcement:n}]:[]});if(!this.hasReplySnapshot){if(0===this.messages.length)return;return n.forEach(({key:e})=>this.announcedReplyKeys.add(e)),void(this.hasReplySnapshot=!0)}const i=n.filter(({key:e})=>!this.announcedReplyKeys.has(e));if(0===i.length)return;i.forEach(({key:e})=>this.announcedReplyKeys.add(e));const r=i.map(({announcement:e})=>e).join(" "),o=this._replyAnnouncement.replace(/\u200b/g,"");this._replyAnnouncement=r!==o||this._replyAnnouncement.endsWith("")?r:`${r}`}renderReplyAnnouncer(){return H`<div
|
|
2635
2633
|
id="reply-announcer"
|
|
2636
2634
|
class="sr-only"
|
|
2637
2635
|
role="status"
|
|
@@ -2639,12 +2637,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2639
2637
|
aria-atomic="true"
|
|
2640
2638
|
>
|
|
2641
2639
|
${this._replyAnnouncement}
|
|
2642
|
-
</div>`}async updated(){this.scrollToChatBottom(),this.syncHostPage(),this.restoreMessageFieldFocus(),this.scheduleFocusHoldRelease()}syncHostPage(){if(!this._isMobile)return void this.releaseHostPage();const e=(e=>{let t=e,n=t.getRootNode();for(;n instanceof ShadowRoot;)t=n.host,n=t.getRootNode();return t instanceof Element?t:null})(this);(null==e?void 0:e.parentElement)&&(this.hostPageLock=e,(e=>{var t;const n=e.parentElement;if(!n)return;const i=new Map((null!==(t=
|
|
2640
|
+
</div>`}async updated(){this.scrollToChatBottom(),this.syncHostPage(),this.restoreMessageFieldFocus(),this.scheduleFocusHoldRelease()}syncHostPage(){if(!this._isMobile)return void this.releaseHostPage();const e=(e=>{let t=e,n=t.getRootNode();for(;n instanceof ShadowRoot;)t=n.host,n=t.getRootNode();return t instanceof Element?t:null})(this);(null==e?void 0:e.parentElement)&&(this.hostPageLock=e,(e=>{var t;const n=e.parentElement;if(!n)return;const i=new Map((null!==(t=eu.get(e))&&void 0!==t?t:[]).map(e=>[e.element,e])),r=[];for(const t of Array.from(n.children)){if(t===e)continue;const n=i.get(t);n?(r.push(n),i.delete(t),iu(t)):r.push(ou(t))}i.forEach(e=>ru(e)),eu.set(e,r)})(e))}releaseHostPage(){this.hostPageLock&&((e=>{const t=eu.get(e);t&&(t.forEach(e=>ru(e)),eu.delete(e))})(this.hostPageLock),this.hostPageLock=null)}restoreMessageFieldFocus(){if(!this.holdMessageFieldFocus)return;const e=function(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t}();if(e instanceof HTMLElement&&"message-input"===e.id)return;const t=!e||e===document.body||e===document.documentElement,n=e instanceof HTMLElement&&"send-message-bttn"===e.id;(t||n)&&this.focusMessageField()}scheduleFocusHoldRelease(){var e;this.holdMessageFieldFocus&&!this.releaseFocusHoldQueued&&(this.sendInFlight||this.isLoadingMessages||(null===(e=this.myPubnub)||void 0===e?void 0:e.isCurrentlyStreamingMessage)||(this.releaseFocusHoldQueued=!0,requestAnimationFrame(()=>{var e;this.releaseFocusHoldQueued=!1,this.sendInFlight||this.isLoadingMessages||(null===(e=this.myPubnub)||void 0===e?void 0:e.isCurrentlyStreamingMessage)||(this.restoreMessageFieldFocus(),this.holdMessageFieldFocus=!1)})))}renderMessageFieldLabel(e){return H`<label
|
|
2643
2641
|
class="message-input-label"
|
|
2644
2642
|
for="message-input"
|
|
2645
2643
|
style=${Xn({color:e})}
|
|
2646
2644
|
>${"Message"}</label
|
|
2647
|
-
>`}focusMessageField(){const e=this.shadowRoot,t=null==e?void 0:e.getElementById("message-input");return!!(t instanceof HTMLTextAreaElement&&e)&&(0!==t.getClientRects().length&&(e.activeElement!==t&&t.focus({preventScroll:!0}),e.activeElement===t))}trapTabInMobileDialog(e){var t;if(!this._isMobile)return;const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat-container");n&&
|
|
2645
|
+
>`}focusMessageField(){const e=this.shadowRoot,t=null==e?void 0:e.getElementById("message-input");return!!(t instanceof HTMLTextAreaElement&&e)&&(0!==t.getClientRects().length&&(e.activeElement!==t&&t.focus({preventScroll:!0}),e.activeElement===t))}trapTabInMobileDialog(e){var t;if(!this._isMobile)return;const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat-container");n&&cu(e,n)}render(){var e,t,n,i,r,o,a,s,l,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$;if(!this.buildingSlug&&!this.centralConvo)return H``;const S=(null===(e=this.building)||void 0===e?void 0:e.userFirstName)||"Elise",k=null===(t=this.building)||void 0===t?void 0:t.id;let A={};if(A=this._isMobile?{top:void 0,bottom:0,left:void 0,right:0}:{top:void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:void 0===this.bottom||isNaN(this.bottom)?"130px":`${this.bottom}px`,left:void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:void 0===this.right||isNaN(this.right)?"18px":`${this.right}px`},22320===k&&(A={...A,fontFamily:'"Helvetica Neue", Arial'}),this.widgetType===Sp.Utilities)return H`
|
|
2648
2646
|
<div
|
|
2649
2647
|
id="utilities-container"
|
|
2650
2648
|
class=${Ce({"pubnub-container__mobile":this._isMobile,"utilities-container__desktop":!this._isMobile})}
|
|
@@ -2659,13 +2657,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2659
2657
|
@click=${this.onClickExit}
|
|
2660
2658
|
aria-label="Close chat"
|
|
2661
2659
|
>
|
|
2662
|
-
${
|
|
2660
|
+
${Xl("black")}
|
|
2663
2661
|
</button>
|
|
2664
2662
|
</div>
|
|
2665
2663
|
<div
|
|
2666
2664
|
class=${Ce({hidden:!this.needsConsent(),"legal-confirmation-container":!0})}
|
|
2667
2665
|
>
|
|
2668
|
-
${
|
|
2666
|
+
${Jo(null!==(n=this.orgSlug)&&void 0!==n?n:null,this.privacyPolicyUrl,this.consentKey,e=>{this.hasReceivedConsent=e},null!==(r=null===(i=this.building)||void 0===i?void 0:i.country)&&void 0!==r?r:null)}
|
|
2669
2667
|
</div>
|
|
2670
2668
|
<div
|
|
2671
2669
|
id="conversation-body"
|
|
@@ -2677,7 +2675,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2677
2675
|
class=${Ce({hidden:this.needsConsent()})}
|
|
2678
2676
|
>
|
|
2679
2677
|
<li class="utilities-disclaimer-message">
|
|
2680
|
-
${
|
|
2678
|
+
${ea({orgSlug:null!==(o=this.orgSlug)&&void 0!==o?o:"",type:"utilities",buildingState:null!==(s=null===(a=this.building)||void 0===a?void 0:a.state)&&void 0!==s?s:null})}
|
|
2681
2679
|
</li>
|
|
2682
2680
|
<li
|
|
2683
2681
|
class="message-container ai-message"
|
|
@@ -2695,19 +2693,19 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2695
2693
|
class=${e.isLeadMessage?"message-container lead-message":"message-container ai-message"}
|
|
2696
2694
|
key=${e.timestamp}
|
|
2697
2695
|
role="article"
|
|
2698
|
-
aria-label="${e.isLeadMessage?"You":S}: ${
|
|
2696
|
+
aria-label="${e.isLeadMessage?"You":S}: ${fu(e)}"
|
|
2699
2697
|
>
|
|
2700
|
-
${
|
|
2698
|
+
${_s(e)?H`<pubnub-navigation
|
|
2701
2699
|
.message=${e}
|
|
2702
2700
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
2703
2701
|
></pubnub-navigation>`:""}
|
|
2704
|
-
${
|
|
2702
|
+
${Es(e)?H` <pubnub-media
|
|
2705
2703
|
.message=${e}
|
|
2706
2704
|
.myPubnub=${this.myPubnub}
|
|
2707
2705
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
2708
2706
|
>
|
|
2709
2707
|
</pubnub-media>`:""}
|
|
2710
|
-
${
|
|
2708
|
+
${Ts(e)?H` <pubnub-message
|
|
2711
2709
|
.message=${e}
|
|
2712
2710
|
.myPubnub=${this.myPubnub}
|
|
2713
2711
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
@@ -2752,12 +2750,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2752
2750
|
class=${Ce({"health-bttn-allow-access":this._isMobile})}
|
|
2753
2751
|
@click=${()=>this.sendMessage(this.messageInput.value)}
|
|
2754
2752
|
>
|
|
2755
|
-
${
|
|
2753
|
+
${Zl("black")}
|
|
2756
2754
|
</button>
|
|
2757
2755
|
</div>
|
|
2758
2756
|
</div>
|
|
2759
2757
|
</div>
|
|
2760
|
-
`;if(this.widgetType
|
|
2758
|
+
`;if(this.widgetType===Sp.Healthcare)return H`
|
|
2761
2759
|
<div
|
|
2762
2760
|
id="healthchat-container"
|
|
2763
2761
|
class=${Ce({"pubnub-container__mobile":this._isMobile,"healthchat-container__desktop":!this._isMobile})}
|
|
@@ -2776,13 +2774,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2776
2774
|
@click=${this.onClickExit}
|
|
2777
2775
|
aria-label="Close chat"
|
|
2778
2776
|
>
|
|
2779
|
-
${
|
|
2777
|
+
${Xl("black")}
|
|
2780
2778
|
</button>
|
|
2781
2779
|
</div>
|
|
2782
2780
|
<div
|
|
2783
2781
|
class=${Ce({hidden:!this.needsConsent(),"legal-confirmation-container":!0})}
|
|
2784
2782
|
>
|
|
2785
|
-
${
|
|
2783
|
+
${Jo(null!==(l=this.orgSlug)&&void 0!==l?l:null,this.privacyPolicyUrl,this.consentKey,e=>{this.hasReceivedConsent=e},null!==(d=null===(u=this.building)||void 0===u?void 0:u.country)&&void 0!==d?d:null)}
|
|
2786
2784
|
</div>
|
|
2787
2785
|
<div
|
|
2788
2786
|
id="conversation-body"
|
|
@@ -2794,7 +2792,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2794
2792
|
class=${Ce({hidden:this.needsConsent()})}
|
|
2795
2793
|
>
|
|
2796
2794
|
<li class="healthcare-disclaimer-message">
|
|
2797
|
-
${
|
|
2795
|
+
${ea({orgSlug:null!==(c=this.orgSlug)&&void 0!==c?c:"",type:"healthcare",buildingState:null!==(p=null===(h=this.building)||void 0===h?void 0:h.state)&&void 0!==p?p:null})}
|
|
2798
2796
|
</li>
|
|
2799
2797
|
<li
|
|
2800
2798
|
class="message-container ai-message"
|
|
@@ -2813,19 +2811,19 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2813
2811
|
class=${e.isLeadMessage?"message-container lead-message":"message-container ai-message"}
|
|
2814
2812
|
key=${e.timestamp}
|
|
2815
2813
|
role="article"
|
|
2816
|
-
aria-label="${e.isLeadMessage?"You":S}: ${
|
|
2814
|
+
aria-label="${e.isLeadMessage?"You":S}: ${fu(e)}"
|
|
2817
2815
|
>
|
|
2818
|
-
${
|
|
2816
|
+
${_s(e)?H`<pubnub-navigation
|
|
2819
2817
|
.message=${e}
|
|
2820
2818
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
2821
2819
|
></pubnub-navigation>`:""}
|
|
2822
|
-
${
|
|
2820
|
+
${Es(e)?H` <pubnub-media
|
|
2823
2821
|
.message=${e}
|
|
2824
2822
|
.myPubnub=${this.myPubnub}
|
|
2825
2823
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
2826
2824
|
>
|
|
2827
2825
|
</pubnub-media>`:""}
|
|
2828
|
-
${
|
|
2826
|
+
${Ts(e)?H` <pubnub-message
|
|
2829
2827
|
.message=${e}
|
|
2830
2828
|
.myPubnub=${this.myPubnub}
|
|
2831
2829
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
@@ -2870,7 +2868,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2870
2868
|
class=${Ce({"health-bttn-allow-access":this._isMobile})}
|
|
2871
2869
|
@click=${()=>this.sendMessage(this.messageInput.value)}
|
|
2872
2870
|
>
|
|
2873
|
-
${this._isMobile?
|
|
2871
|
+
${this._isMobile?Zl("black"):Jl("black")}
|
|
2874
2872
|
</button>
|
|
2875
2873
|
</div>
|
|
2876
2874
|
</div>
|
|
@@ -2897,13 +2895,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2897
2895
|
@click=${this.onClickExit}
|
|
2898
2896
|
aria-label="Close chat"
|
|
2899
2897
|
>
|
|
2900
|
-
${
|
|
2898
|
+
${Xl("black")}
|
|
2901
2899
|
</button>
|
|
2902
2900
|
</div>
|
|
2903
2901
|
<div
|
|
2904
2902
|
class=${Ce({hidden:!this.needsConsent(),"legal-confirmation-container":!0})}
|
|
2905
2903
|
>
|
|
2906
|
-
${
|
|
2904
|
+
${Jo(null!==(f=this.orgSlug)&&void 0!==f?f:null,this.privacyPolicyUrl,this.consentKey,e=>{this.hasReceivedConsent=e},null!==(m=null===(g=this.building)||void 0===g?void 0:g.country)&&void 0!==m?m:null)}
|
|
2907
2905
|
</div>
|
|
2908
2906
|
<div
|
|
2909
2907
|
id="conversation-body"
|
|
@@ -2915,7 +2913,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2915
2913
|
id="message-thread-list"
|
|
2916
2914
|
class=${Ce({hidden:this.needsConsent()})}
|
|
2917
2915
|
>
|
|
2918
|
-
${
|
|
2916
|
+
${ea({orgSlug:null!==(b=this.orgSlug)&&void 0!==b?b:"",buildingState:null!==(v=null===(y=this.building)||void 0===y?void 0:y.state)&&void 0!==v?v:null,buildingCountry:null!==(C=null===(w=this.building)||void 0===w?void 0:w.country)&&void 0!==C?C:null,type:"leasing",customAdditionalDisclaimer:null===(x=this.building)||void 0===x?void 0:x.customAdditionalDisclaimer})}
|
|
2919
2917
|
${this.building.welcomeMessage?H` <li
|
|
2920
2918
|
class=${Ce({"message-container":!0,"ai-message":!0,"with-box-shadow":444===T})}
|
|
2921
2919
|
role="article"
|
|
@@ -2932,19 +2930,19 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2932
2930
|
class=${go()("message-container",{"lead-message":e.isLeadMessage,"ai-message":!e.isLeadMessage,"with-box-shadow":444===T})}
|
|
2933
2931
|
key=${e.timestamp}
|
|
2934
2932
|
role="article"
|
|
2935
|
-
aria-label="${e.isLeadMessage?"You":S}: ${
|
|
2933
|
+
aria-label="${e.isLeadMessage?"You":S}: ${fu(e)}"
|
|
2936
2934
|
>
|
|
2937
|
-
${
|
|
2935
|
+
${_s(e)?H`<pubnub-navigation
|
|
2938
2936
|
.message=${e}
|
|
2939
2937
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
2940
2938
|
></pubnub-navigation>`:""}
|
|
2941
|
-
${
|
|
2939
|
+
${Es(e)?H` <pubnub-media
|
|
2942
2940
|
.message=${e}
|
|
2943
2941
|
.myPubnub=${this.myPubnub}
|
|
2944
2942
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
2945
2943
|
>
|
|
2946
2944
|
</pubnub-media>`:""}
|
|
2947
|
-
${
|
|
2945
|
+
${Ts(e)?H` <pubnub-message
|
|
2948
2946
|
.message=${e}
|
|
2949
2947
|
.myPubnub=${this.myPubnub}
|
|
2950
2948
|
.onMount=${()=>this.scrollToChatBottom()}
|
|
@@ -2988,11 +2986,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
2988
2986
|
aria-disabled=${this.sendInFlight||(null===($=this.myPubnub)||void 0===$?void 0:$.isCurrentlyStreamingMessage)?"true":"false"}
|
|
2989
2987
|
aria-label="Send message"
|
|
2990
2988
|
>
|
|
2991
|
-
${ii(this.building.orgId,this.building.id)&&this.primaryColor!==Zn?
|
|
2989
|
+
${ii(this.building.orgId,this.building.id)&&this.primaryColor!==Zn?Jl("black"):Jl("white")}
|
|
2992
2990
|
</button>
|
|
2993
2991
|
</div>
|
|
2994
2992
|
</div>
|
|
2995
|
-
`}};function lu(e){const t=hu(e)[0];return!!t&&(t.focus(),!0)}function uu(e,t){const n=cu(e);return!(!n||n===e)||(!(!t||!lu(t))||lu(e))}function du(e,t){if("Tab"!==e.key)return;const n=cu(t);if(!n)return;const i=hu(t);if(0===i.length)return void e.preventDefault();const r=i.indexOf(n),o=0===r,a=r===i.length-1;if(e.shiftKey&&(n===t||o))return e.preventDefault(),void i[i.length-1].focus();e.shiftKey||n!==t&&!a||(e.preventDefault(),i[0].focus())}function cu(e){var t;let n=document.activeElement;for(;null===(t=null==n?void 0:n.shadowRoot)||void 0===t?void 0:t.activeElement;)n=n.shadowRoot.activeElement;if(!(n instanceof HTMLElement))return null;let i=n;for(;i;){if(i===e)return n;i=i instanceof ShadowRoot?i.host:i.parentNode}return null}function hu(e){const t=[],n=e=>{e instanceof Element&&e.shadowRoot&&n(e.shadowRoot),e.querySelectorAll("*").forEach(e=>{(function(e){if("-1"===e.getAttribute("tabindex"))return!1;if("disabled"in e&&e.disabled)return!1;const t="BUTTON"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||"A"===e.tagName&&e.hasAttribute("href")||e.hasAttribute("tabindex");return t&&e.getClientRects().length>0})(e)&&t.push(e),e.shadowRoot&&n(e.shadowRoot)})};return n(e),t}su.AUTO_SCROLL_THRESHOLD_PX=32,su.styles=[Me,Ns,Is,Ps,Yl],au([pe({type:Number})],su.prototype,"right",void 0),au([pe({type:Number})],su.prototype,"bottom",void 0),au([pe({type:Number})],su.prototype,"top",void 0),au([pe({type:Number})],su.prototype,"left",void 0),au([pe({attribute:!0})],su.prototype,"onMount",void 0),au([pe({attribute:!0})],su.prototype,"channel",void 0),au([pe({attribute:!0})],su.prototype,"isHealthChat",void 0),au([pe({attribute:!0})],su.prototype,"myPubnub",void 0),au([pe({attribute:!0})],su.prototype,"orgSlug",void 0),au([pe({attribute:!0})],su.prototype,"buildingSlug",void 0),au([pe({attribute:!0})],su.prototype,"centralConvo",void 0),au([pe({attribute:!0})],su.prototype,"widgetType",void 0),au([pe({attribute:!0})],su.prototype,"building",void 0),au([pe({attribute:!0})],su.prototype,"primaryColor",void 0),au([pe({attribute:!0})],su.prototype,"backgroundColor",void 0),au([pe({attribute:!0})],su.prototype,"onClickExit",void 0),au([pe({attribute:!0})],su.prototype,"requiresConsent",void 0),au([ge("#message-input",!0)],su.prototype,"messageInput",void 0),au([ge("#conversation-body",!0)],su.prototype,"messageBody",void 0),au([fe()],su.prototype,"_isMobile",void 0),au([fe()],su.prototype,"messages",void 0),au([fe()],su.prototype,"isLoadingMessages",void 0),au([fe()],su.prototype,"hasReceivedConsent",void 0),au([fe()],su.prototype,"_replyAnnouncement",void 0),au([fe()],su.prototype,"sendInFlight",void 0),au([fe()],su.prototype,"privacyPolicyUrl",void 0),au([fe()],su.prototype,"websitePreviewMapping",void 0),su=ou=au([ce("pubnub-chat")],su);const pu=e=>As(e)?e.message:Es(e)?`Take me to ${e.navigation.label}`:"Media message",fu=e=>`${e.type}:${e.timestamp}`,gu=(e,t)=>e.isLeadMessage||As(e)&&(e=>{const t=e.chunks.find(e=>e.isDone);return!t||e.chunks.length===t.order})(e)?null:`${t}: ${pu(e)}`;var mu=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 bu=class extends ue{constructor(){super(...arguments),this.tourTypeOptions=[],this.layoutOptions=[],this.chatId="",this.buildingId=0,this.orgId=0,this.leadSourceParams=null,this.buildingSlug="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.selfGuidedTourEnabled=!1,this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.orgSlug="",this.hasDynamicSchedulingEnabled=!1,this.bedroomPreferenceRequired=!1,this.brokerIntakeEnabled=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingName="",this.trapOverlayTab=e=>{du(e,this)},this.movedFocusInside=!1,this.tourType=null,this.shouldShowTourType={[yu.Guided]:!0,[yu.Self]:!0,[yu.Virtual]:!0},this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneCountry=null,this.phoneNumberIsValid=!1,this.phoneNumberHasBlurred=!1,this.availabilitiesGroupedByDay={},this.calendarTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.shouldAllowScheduling=!1,this.shouldAllowScheduleLoading=!0,this.promptForReschedule=!1,this.canceledReschedule=!1,this.isBrokerReferral=!1,this.brokerFirstName="",this.brokerLastName="",this.brokerEmail="",this.brokerFirmName="",this.brokerPhone="",this.brokerPhoneE164=null,this.brokerPhoneCountry=null,this.brokerPhoneIsValid=!1,this.brokerPhoneHasBlurred=!1,this.leadSources=[],this.orgLegalName="",this.country=null,this.buildingState=null,this.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.firstNameInputValue="",this.lastNameInputValue="",this.leadSourceInputValue="",this.selectedLayoutValue="",this.selectedUnitValue="",this.units=[],this.allowOccupiedUnitTours=!1,this.errorGettingAvailabilities=!1,this.centralConvoBuildings=[],this.isGeneralBuilding=!1,this.statusMessage="",this.useCoastalCustomTourTypes=!1,this.tourTypeOrder=xu,this._setAvailabilities=async()=>{try{const[e,t]=await Promise.all([da(this.buildingId,this.hasDynamicSchedulingEnabled),lo()]);this.shouldAllowScheduling=e,this.shouldAllowScheduleLoading=!1,this.calendarTimeZone=await(async e=>{var t;return null!==(t=(await ao(e)).calendarTimeZone)&&void 0!==t?t:Intl.DateTimeFormat().resolvedOptions().timeZone})(this.buildingId),ra({logTitle:"AVAILABILITIES_EXIST_FOR_TOUR_TYPE",logData:t,logType:ia.info,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});const n=Object.values(t).every(e=>!1===e),i=!this.sgtUrl&&!this.escortedToursLink&&!this.virtualToursLink;if(n&&i)return this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,void ra({logTitle:"NO_AVAILABILITIES_EXIST",logData:null,logType:ia.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});this.shouldShowTourType={[yu.Guided]:this.tourTypeOptions.map(e=>e.value).includes("WITH_AGENT")&&(t[yu.Guided]||!!this.escortedToursLink),[yu.Self]:this.tourTypeOptions.map(e=>e.value).includes("SELF_GUIDED")&&(t[yu.Self]||!!this.sgtUrl),[yu.Virtual]:this.tourTypeOptions.map(e=>e.value).includes("VIRTUAL_SHOWING")&&(t[yu.Virtual]||!!this.virtualToursLink)};const r=1===Object.values(this.shouldShowTourType).reduce((e,t)=>!0===t?e+1:e,0);if(this._setDefaultSelectedDateAndTimes(),r&&(this.tourType=Object.keys(this.shouldShowTourType).find(e=>this.shouldShowTourType[e])),null===this.tourType)return void(this.waitingForAvailabilities=!1);this.availabilitiesGroupedByDay=await uo(vu[this.tourType]),this.waitingForAvailabilities=!1}catch(e){this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,ra({logTitle:"ERROR_LOADING_AVAILABILITIES",logData:{error:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this._setDefaultSelectedDateAndTimes=async(e,t)=>{var n,i,r;const o=await ao(this.buildingId),a=null!=e?e:this._getHighestRankedTourType(o),s=a?null===(r=null===(i=null===(n=o.availability)||void 0===n?void 0:n[a])||void 0===i?void 0:i.availableTourStartTimes)||void 0===r?void 0:r.filter(e=>{if(!t)return!0;return ur("string"==typeof e?Yr(e):e,t)}):[],l=null==s?void 0:s[0];a&&l&&a!==Gr.Unknown&&a!==Gr.MediaTour&&(this.selectedDate=lr("string"==typeof l?Yr(l):l),this.tourType=wu[a],this.selectedTime="string"==typeof l?co(l):(e=>({datetime:ir(e,"yyyy-MM-dd'T'HH:mm:ss"),offset:ir(e,"xxx")}))(l))},this._getHighestRankedTourType=e=>{var t;const n=(null!==(t=e.rankOrderedSupportedTourTypes)&&void 0!==t?t:[]).map(t=>{var n,i;return{tourType:t,availabilities:null===(i=null===(n=e.availability)||void 0===n?void 0:n[t])||void 0===i?void 0:i.availableTourStartTimes}}).filter(e=>{if(e.tourType===Gr.Unknown||e.tourType===Gr.MediaTour)return!1;const t=wu[e.tourType],n=this._getTourTypeOffered(t);return!!n&&(!ba(0,n)&&e.availabilities&&e.availabilities.length>0)}),i=n[0];return i?i.tourType:null},this._getTourTypeOffered=e=>e===yu.Guided?this.escortedToursTypeOffered:e===yu.Self?this.selfGuidedToursTypeOffered:e===yu.Virtual?this.virtualToursTypeOffered:null,this._getUnitOptions=()=>{const e=this.selectedLayoutValue?this.units.filter(e=>ku(10*e.numberOfBedrooms)===this.selectedLayoutValue):this.units,t=e.map(e=>({label:e.unitNumber,value:e.unitNumber}));return t},this._fetchUnits=async()=>{if(this.buildingSlug)try{this.units=await rs({buildingSlug:this.buildingSlug})}catch(e){this.units=[],ra({logTitle:"ERROR_LOADING_UNITS_FOR_TOUR_SCHEDULER",logData:{error:e},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.firstUpdated=async()=>{if(await this._fetchCentralConvoBuildings(),this.isGeneralBuilding)return this.waitingForAvailabilities=!1,this.shouldAllowScheduleLoading=!1,void(this.statusMessage="Please select a building to see tour availabilities.");await this._loadForCurrentBuilding()},this._loadForCurrentBuilding=async()=>{const e=async function(e){if(!e)return!1;try{return!0===(await r().get(vo(e),{params:{rollout_name:"coastal_custom_tour_types",default_value:!1},timeout:3e3})).data}catch(e){return!1}}(this.buildingSlug);this.tourTypeOrder=function(e){const t=e.flatMap(e=>xu.filter(t=>vu[t]===e));let n=0;return xu.map(e=>t.includes(e)?t[n++]:e)}(await ao(this.buildingId).then(e=>{var t;return null!==(t=e.rankOrderedSupportedTourTypes)&&void 0!==t?t:[]},()=>[])),this.useCoastalCustomTourTypes=await e,await Promise.all([this._setAvailabilities().then(async()=>{try{const e=await ao(this.buildingId);this.allowOccupiedUnitTours=!!e.allowOccupiedUnitTours}catch(e){this.allowOccupiedUnitTours=!1}}),this._fetchUnits()])},this._fetchCentralConvoBuildings=async()=>{if(this.orgSlug&&this.buildingSlug)try{const e=await async function(e,t){var n,i;const o=(await r().get("https://app.meetelise.com/platformApi/webchat/central-convo-buildings-v2",{headers:{"building-slug":t,"org-slug":e}})).data;return{is_general_building:null!==(n=null==o?void 0:o.is_general_building)&&void 0!==n&&n,buildings:null!==(i=null==o?void 0:o.buildings)&&void 0!==i?i:[]}}(this.orgSlug,this.buildingSlug);this.centralConvoBuildings=e.buildings,this.isGeneralBuilding=e.is_general_building}catch(e){this.centralConvoBuildings=[],this.isGeneralBuilding=!1}},this._onBuildingChange=async()=>{var e;const t=null===(e=this.selectedBuildingEl)||void 0===e?void 0:e.value;if(!t||t===this.buildingSlug)return;const n=this.centralConvoBuildings.find(e=>e.slug===t);if(n){this.isGeneralBuilding=!1,this.waitingForAvailabilities=!0,this.errorGettingAvailabilities=!1,this.tourType=null,this.selectedDate=void 0,this.selectedTime=void 0,this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.units=[],this.selectedLayoutValue="",this.selectedUnitValue="",this.buildingId=n.building_id,this.buildingSlug=n.slug,this.buildingName=n.name,this.statusMessage=`Loading tours for ${n.name}…`,_o("tourBuildingSelected",{buildingId:n.building_id});try{const e=await ya(this.orgSlug,n.slug);this.sgtUrl=e.sgtUrl,this.selfGuidedToursTypeOffered=e.selfGuidedToursTypeOffered,this.selfGuidedTourEnabled=e.isSelfGuidedTourEnabled,this.escortedToursLink=e.escortedToursLink,this.escortedToursTypeOffered=e.escortedToursTypeOffered,this.virtualToursLink=e.virtualToursLink,this.virtualToursTypeOffered=e.virtualToursTypeOffered,this.tourTypeOptions=e.tourTypeOptions.map(e=>({label:e.label,value:e.value})),this.hasDynamicSchedulingEnabled=e.usesDynamicScheduling}catch(e){}if(await this._loadForCurrentBuilding(),!this.shouldAllowScheduling||this.errorGettingAvailabilities)this.statusMessage=`No tour availabilities for ${n.name}.`;else{const e=Object.values(this.shouldShowTourType).filter(Boolean).length;this.statusMessage=`Showing tours for ${n.name}. ${e} tour type${1===e?"":"s"} available.`}}},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await uo(vu[this.tourType]))},this.onChangePhoneNumber=e=>{this.phoneNumber=e.detail.formattedValue,this.phoneNumberE164=e.detail.e164,this.phoneCountry=e.detail.country,this.phoneNumberIsValid=e.detail.isValid},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.onChangeBrokerPhone=e=>{this.brokerPhone=e.detail.formattedValue,this.brokerPhoneE164=e.detail.e164,this.brokerPhoneCountry=e.detail.country,this.brokerPhoneIsValid=e.detail.isValid},this.onToggleBrokerReferral=e=>{const t=e.target.checked,n=!(this.brokerFirstName||this.brokerLastName||this.brokerEmail||this.brokerPhone),i=!(this.firstNameInputValue||this.lastNameInputValue||this.email||this.phoneNumber);t&&n?(this.brokerFirstName=this.firstNameInputValue,this.brokerLastName=this.lastNameInputValue,this.brokerEmail=this.email,this.brokerPhone=this.phoneNumber,this.brokerPhoneE164=this.phoneNumberE164,this.brokerPhoneCountry=this.phoneCountry,this.brokerPhoneIsValid=this.phoneNumberIsValid,this.brokerPhoneHasBlurred=this.phoneNumberHasBlurred,this.firstNameInputValue="",this.lastNameInputValue="",this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneNumberIsValid=!1,this.phoneNumberHasBlurred=!1):!t&&i&&(this.firstNameInputValue=this.brokerFirstName,this.lastNameInputValue=this.brokerLastName,this.email=this.brokerEmail,this.phoneNumber=this.brokerPhone,this.phoneNumberE164=this.brokerPhoneE164,this.phoneCountry=this.brokerPhoneCountry,this.phoneNumberIsValid=this.brokerPhoneIsValid,this.phoneNumberHasBlurred=this.brokerPhoneHasBlurred,this.brokerFirstName="",this.brokerLastName="",this.brokerEmail="",this.brokerPhone="",this.brokerPhoneE164=null,this.brokerPhoneIsValid=!1,this.brokerPhoneHasBlurred=!1),this.isBrokerReferral=t},this.brokerReferral=()=>{var e;return this.brokerIntakeEnabled&&this.isBrokerReferral?Xo(this.brokerFirstName,this.brokerLastName,this.brokerEmail,this.brokerFirmName,null!==(e=this.brokerPhoneE164)&&void 0!==e?e:""):null},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n,i;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&Lr(null!==(i=null===(n=this.emailInput)||void 0===n?void 0:n.value)&&void 0!==i?i:"")&&!!this.phoneNumber&&!!this.phoneNumberE164},layout:()=>!this.bedroomPreferenceRequired||!!this.selectedLayoutValue,broker:()=>{const e=this.brokerReferral();return!e||!Zo(e)&&!Jo(e,this.email)&&(!this.brokerPhone||this.brokerPhoneIsValid)}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo()&&this.validators.layout()&&this.validators.broker(),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,t,n,i,o,a,s,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$,S;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const k=this.phoneNumberE164;if(!k)return void(this.phoneNumberIsValid=!1);if(!this.validators.broker())return;const A=this.brokerReferral(),T=new URLSearchParams(window.location.search);let E=null;E=this.selectedLeadSource&&this.selectedLeadSource.value&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:this.leadSourceInputValue&&this.leadSourceInputValue.length>0?this.leadSourceInputValue:this.currentLeadSource;const _=[...new Set(E?[E,"property-website"]:["property-website"])];this.firstNameInput&&(this.firstNameInputValue=this.firstNameInput.value),this.lastNameInput&&(this.lastNameInputValue=this.lastNameInput.value),this.leadSourceInputValue=E;const O=(null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||this.selectedLayoutValue||null,P=(null===(t=this.selectedUnitEl)||void 0===t?void 0:t.value)||this.selectedUnitValue||null;_o("scheduleTourSubmitted",{email:this.email,phone:k,firstName:null!==(i=null===(n=this.firstNameInput)||void 0===n?void 0:n.value)&&void 0!==i?i:this.firstNameInputValue,lastName:null!==(a=null===(o=this.lastNameInput)||void 0===o?void 0:o.value)&&void 0!==a?a:this.lastNameInputValue,tourType:Su[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,originatingSource:_.find(e=>"property-website"!==e)||null,layout:O,unit:P,conversationTrackingId:null!==(u=null===(s=this.leadSourceClient)||void 0===s?void 0:s.chatId)&&void 0!==u?u:null,...A?{isBrokerReferral:!0}:{}});const I=ns(),N={referrer:document.referrer,email_address:this.email,phone_number:k,building_id:this.buildingId,tracking_params:l(this.orgSlug),first_name:null!==(c=null===(d=this.firstNameInput)||void 0===d?void 0:d.value)&&void 0!==c?c:this.firstNameInputValue,last_name:null!==(p=null===(h=this.lastNameInput)||void 0===h?void 0:h.value)&&void 0!==p?p:this.lastNameInputValue,tour_type:Su[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,cancel_existing_tours:this.promptForReschedule,lead_sources:[...new Set(E?[E,la(this.orgSlug)]:[la(this.orgSlug)])],query_params:Object.fromEntries(T.entries()),conversation_tracking_id:null===(f=this.leadSourceClient)||void 0===f?void 0:f.chatId,layouts:O?[O]:void 0,unit_numbers:P?[P]:void 0,lead_sources_with_timestamps:(null!==(b=null===(g=this.leadSourceMultitouchClient)||void 0===g?void 0:g.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(m=this.selectedLeadSource)||void 0===m?void 0:m.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}))&&void 0!==b?b:[]).map(e=>_r({...e})),google_rwg_token:null==I?void 0:I.rwgToken,google_referral_building_id:null==I?void 0:I.buildingId,google_environment:null==I?void 0:I.environment,...ea(A)};this.isSubmitting=!0;try{await r().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",N,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE","org-slug":this.orgSlug}}),null===(y=this.leadSourceClient)||void 0===y||y.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(v=this.leadSourceClient)||void 0===v||v.resetLeadSource(),null===(w=this.leadSourceMultitouchClient)||void 0===w||w.resetLeadSourceTouchpoints(),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e,n=(null===(x=null===(C=t.response)||void 0===C?void 0:C.data)||void 0===x?void 0:x.detail)||"Failed to book tour";if(t.response&&t.response.headers&&t.response.headers["funnel-prospect-conflicting-appointment-error"]){if(this.selectedDate&&this.selectedTime){const e=this.availabilitiesGroupedByDay[ir(this.selectedDate,"yyyy-MM-dd")];e&&(this.availabilitiesGroupedByDay[ir(this.selectedDate,"yyyy-MM-dd")]=e.filter(e=>e!==this.selectedTime))}}else{if(409===(null===($=t.response)||void 0===$?void 0:$.status)&&!this.promptForReschedule&&"User already has a tour scheduled for this building"===n)return this.promptForReschedule=!0,this.isSubmitting=!1,void(this.tourIsBooked=!1);if(409===(null===(S=t.response)||void 0===S?void 0:S.status)&&!this.promptForReschedule)return this.isSubmitting=!1,this.tourIsBooked=!1,oo(),this.availabilitiesGroupedByDay=await uo(vu[this.tourType],this.buildingId),void alert("This timeslot is no longer available. Please select a different time.")}alert(n),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>H`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>H`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo()&&this.validators.broker(),nextButtonText:null,renderNextButton:()=>H` <action-confirm-button
|
|
2993
|
+
`}};function uu(e){const t=pu(e)[0];return!!t&&(t.focus(),!0)}function du(e,t){const n=hu(e);return!(!n||n===e)||(!(!t||!uu(t))||uu(e))}function cu(e,t){if("Tab"!==e.key)return;const n=hu(t);if(!n)return;const i=pu(t);if(0===i.length)return void e.preventDefault();const r=i.indexOf(n),o=0===r,a=r===i.length-1;if(e.shiftKey&&(n===t||o))return e.preventDefault(),void i[i.length-1].focus();e.shiftKey||n!==t&&!a||(e.preventDefault(),i[0].focus())}function hu(e){var t;let n=document.activeElement;for(;null===(t=null==n?void 0:n.shadowRoot)||void 0===t?void 0:t.activeElement;)n=n.shadowRoot.activeElement;if(!(n instanceof HTMLElement))return null;let i=n;for(;i;){if(i===e)return n;i=i instanceof ShadowRoot?i.host:i.parentNode}return null}function pu(e){const t=[],n=e=>{e instanceof Element&&e.shadowRoot&&n(e.shadowRoot),e.querySelectorAll("*").forEach(e=>{(function(e){if("-1"===e.getAttribute("tabindex"))return!1;if("disabled"in e&&e.disabled)return!1;const t="BUTTON"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"SELECT"===e.tagName||"A"===e.tagName&&e.hasAttribute("href")||e.hasAttribute("tabindex");return t&&e.getClientRects().length>0})(e)&&t.push(e),e.shadowRoot&&n(e.shadowRoot)})};return n(e),t}lu.AUTO_SCROLL_THRESHOLD_PX=32,lu.styles=[Me,Ms,Ns,Is,Kl],su([pe({type:Number})],lu.prototype,"right",void 0),su([pe({type:Number})],lu.prototype,"bottom",void 0),su([pe({type:Number})],lu.prototype,"top",void 0),su([pe({type:Number})],lu.prototype,"left",void 0),su([pe({attribute:!0})],lu.prototype,"onMount",void 0),su([pe({attribute:!0})],lu.prototype,"channel",void 0),su([pe({attribute:!0})],lu.prototype,"isHealthChat",void 0),su([pe({attribute:!0})],lu.prototype,"myPubnub",void 0),su([pe({attribute:!0})],lu.prototype,"orgSlug",void 0),su([pe({attribute:!0})],lu.prototype,"buildingSlug",void 0),su([pe({attribute:!0})],lu.prototype,"centralConvo",void 0),su([pe({attribute:!0})],lu.prototype,"widgetType",void 0),su([pe({attribute:!0})],lu.prototype,"building",void 0),su([pe({attribute:!0})],lu.prototype,"primaryColor",void 0),su([pe({attribute:!0})],lu.prototype,"backgroundColor",void 0),su([pe({attribute:!0})],lu.prototype,"onClickExit",void 0),su([pe({attribute:!0})],lu.prototype,"requiresConsent",void 0),su([ge("#message-input",!0)],lu.prototype,"messageInput",void 0),su([ge("#conversation-body",!0)],lu.prototype,"messageBody",void 0),su([fe()],lu.prototype,"_isMobile",void 0),su([fe()],lu.prototype,"messages",void 0),su([fe()],lu.prototype,"isLoadingMessages",void 0),su([fe()],lu.prototype,"hasReceivedConsent",void 0),su([fe()],lu.prototype,"_replyAnnouncement",void 0),su([fe()],lu.prototype,"sendInFlight",void 0),su([fe()],lu.prototype,"privacyPolicyUrl",void 0),su([fe()],lu.prototype,"websitePreviewMapping",void 0),lu=au=su([ce("pubnub-chat")],lu);const fu=e=>Ts(e)?e.message:_s(e)?`Take me to ${e.navigation.label}`:"Media message",gu=e=>`${e.type}:${e.timestamp}`,mu=(e,t)=>e.isLeadMessage||Ts(e)&&(e=>{const t=e.chunks.find(e=>e.isDone);return!t||e.chunks.length===t.order})(e)?null:`${t}: ${fu(e)}`;var bu=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 yu=class extends ue{constructor(){super(...arguments),this.tourTypeOptions=[],this.layoutOptions=[],this.chatId="",this.buildingId=0,this.orgId=0,this.leadSourceParams=null,this.buildingSlug="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.selfGuidedTourEnabled=!1,this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.orgSlug="",this.hasDynamicSchedulingEnabled=!1,this.bedroomPreferenceRequired=!1,this.brokerIntakeEnabled=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.buildingName="",this.trapOverlayTab=e=>{cu(e,this)},this.movedFocusInside=!1,this.tourType=null,this.shouldShowTourType={[vu.Guided]:!0,[vu.Self]:!0,[vu.Virtual]:!0},this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneCountry=null,this.phoneNumberIsValid=!1,this.phoneNumberHasBlurred=!1,this.availabilitiesGroupedByDay={},this.calendarTimeZone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.waitingForAvailabilities=!0,this.mobilePageIndex=0,this.isSubmitting=!1,this.tourIsBooked=!1,this.shouldAllowScheduling=!1,this.shouldAllowScheduleLoading=!0,this.promptForReschedule=!1,this.canceledReschedule=!1,this.isBrokerReferral=!1,this.brokerFirstName="",this.brokerLastName="",this.brokerEmail="",this.brokerFirmName="",this.brokerPhone="",this.brokerPhoneE164=null,this.brokerPhoneCountry=null,this.brokerPhoneIsValid=!1,this.brokerPhoneHasBlurred=!1,this.leadSources=[],this.orgLegalName="",this.country=null,this.buildingState=null,this.currentLeadSource="",this.featureFlagShowDropdown="",this.compactDesign=!1,this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.firstNameInputValue="",this.lastNameInputValue="",this.leadSourceInputValue="",this.selectedLayoutValue="",this.floorplanOptions=[],this.selectedFloorplanName="",this.selectedUnitValue="",this.units=[],this.allowOccupiedUnitTours=!1,this.errorGettingAvailabilities=!1,this.centralConvoBuildings=[],this.isGeneralBuilding=!1,this.statusMessage="",this.useCoastalCustomTourTypes=!1,this.tourTypeOrder=$u,this._setAvailabilities=async()=>{try{const[e,t]=await Promise.all([ha(this.buildingId,this.hasDynamicSchedulingEnabled),lo()]);this.shouldAllowScheduling=e,this.shouldAllowScheduleLoading=!1,this.calendarTimeZone=await(async e=>{var t;return null!==(t=(await ao(e)).calendarTimeZone)&&void 0!==t?t:Intl.DateTimeFormat().resolvedOptions().timeZone})(this.buildingId),Ao({logTitle:"AVAILABILITIES_EXIST_FOR_TOUR_TYPE",logData:t,logType:ko.info,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});const n=Object.values(t).every(e=>!1===e),i=!this.sgtUrl&&!this.escortedToursLink&&!this.virtualToursLink;if(n&&i)return this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,void Ao({logTitle:"NO_AVAILABILITIES_EXIST",logData:null,logType:ko.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug});this.shouldShowTourType={[vu.Guided]:this.tourTypeOptions.map(e=>e.value).includes("WITH_AGENT")&&(t[vu.Guided]||!!this.escortedToursLink),[vu.Self]:this.tourTypeOptions.map(e=>e.value).includes("SELF_GUIDED")&&(t[vu.Self]||!!this.sgtUrl),[vu.Virtual]:this.tourTypeOptions.map(e=>e.value).includes("VIRTUAL_SHOWING")&&(t[vu.Virtual]||!!this.virtualToursLink)};const r=1===Object.values(this.shouldShowTourType).reduce((e,t)=>!0===t?e+1:e,0);if(this._setDefaultSelectedDateAndTimes(),r&&(this.tourType=Object.keys(this.shouldShowTourType).find(e=>this.shouldShowTourType[e])),null===this.tourType)return void(this.waitingForAvailabilities=!1);this.availabilitiesGroupedByDay=await uo(wu[this.tourType]),this.waitingForAvailabilities=!1}catch(e){this.errorGettingAvailabilities=!0,this.waitingForAvailabilities=!1,Ao({logTitle:"ERROR_LOADING_AVAILABILITIES",logData:{error:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this._setDefaultSelectedDateAndTimes=async(e,t)=>{var n,i,r;const o=await ao(this.buildingId),a=null!=e?e:this._getHighestRankedTourType(o),s=a?null===(r=null===(i=null===(n=o.availability)||void 0===n?void 0:n[a])||void 0===i?void 0:i.availableTourStartTimes)||void 0===r?void 0:r.filter(e=>{if(!t)return!0;return ur("string"==typeof e?Yr(e):e,t)}):[],l=null==s?void 0:s[0];a&&l&&a!==Gr.Unknown&&a!==Gr.MediaTour&&(this.selectedDate=lr("string"==typeof l?Yr(l):l),this.tourType=Cu[a],this.selectedTime="string"==typeof l?co(l):(e=>({datetime:ir(e,"yyyy-MM-dd'T'HH:mm:ss"),offset:ir(e,"xxx")}))(l))},this._getHighestRankedTourType=e=>{var t;const n=(null!==(t=e.rankOrderedSupportedTourTypes)&&void 0!==t?t:[]).map(t=>{var n,i;return{tourType:t,availabilities:null===(i=null===(n=e.availability)||void 0===n?void 0:n[t])||void 0===i?void 0:i.availableTourStartTimes}}).filter(e=>{if(e.tourType===Gr.Unknown||e.tourType===Gr.MediaTour)return!1;const t=Cu[e.tourType],n=this._getTourTypeOffered(t);return!!n&&(!va(0,n)&&e.availabilities&&e.availabilities.length>0)}),i=n[0];return i?i.tourType:null},this._getTourTypeOffered=e=>e===vu.Guided?this.escortedToursTypeOffered:e===vu.Self?this.selfGuidedToursTypeOffered:e===vu.Virtual?this.virtualToursTypeOffered:null,this._getUnitOptions=()=>{const e=this.selectedLayoutValue?this.units.filter(e=>Au(10*e.numberOfBedrooms)===this.selectedLayoutValue):this.units,t=e.map(e=>({label:e.unitNumber,value:e.unitNumber}));return t},this._fetchUnits=async()=>{if(this.buildingSlug)try{this.units=await os({buildingSlug:this.buildingSlug})}catch(e){this.units=[],Ao({logTitle:"ERROR_LOADING_UNITS_FOR_TOUR_SCHEDULER",logData:{error:e},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:e})}},this.firstUpdated=async()=>{if(await this._fetchCentralConvoBuildings(),this.isGeneralBuilding)return this.waitingForAvailabilities=!1,this.shouldAllowScheduleLoading=!1,void(this.statusMessage="Please select a building to see tour availabilities.");await this._loadForCurrentBuilding()},this._loadForCurrentBuilding=async()=>{const e=async function(e){if(!e)return!1;try{return!0===(await r().get(vo(e),{params:{rollout_name:"coastal_custom_tour_types",default_value:!1},timeout:3e3})).data}catch(e){return!1}}(this.buildingSlug),t=_o(this.buildingSlug);this.tourTypeOrder=function(e){const t=e.flatMap(e=>$u.filter(t=>wu[t]===e));let n=0;return $u.map(e=>t.includes(e)?t[n++]:e)}(await ao(this.buildingId).then(e=>{var t;return null!==(t=e.rankOrderedSupportedTourTypes)&&void 0!==t?t:[]},()=>[])),this.useCoastalCustomTourTypes=await e,this.floorplanOptions=await t,await Promise.all([this._setAvailabilities().then(async()=>{try{const e=await ao(this.buildingId);this.allowOccupiedUnitTours=!!e.allowOccupiedUnitTours}catch(e){this.allowOccupiedUnitTours=!1}}),this._fetchUnits()])},this._fetchCentralConvoBuildings=async()=>{if(this.orgSlug&&this.buildingSlug)try{const e=await async function(e,t){var n,i;const o=(await r().get("https://app.meetelise.com/platformApi/webchat/central-convo-buildings-v2",{headers:{"building-slug":t,"org-slug":e}})).data;return{is_general_building:null!==(n=null==o?void 0:o.is_general_building)&&void 0!==n&&n,buildings:null!==(i=null==o?void 0:o.buildings)&&void 0!==i?i:[]}}(this.orgSlug,this.buildingSlug);this.centralConvoBuildings=e.buildings,this.isGeneralBuilding=e.is_general_building}catch(e){this.centralConvoBuildings=[],this.isGeneralBuilding=!1}},this._onBuildingChange=async()=>{var e;const t=null===(e=this.selectedBuildingEl)||void 0===e?void 0:e.value;if(!t||t===this.buildingSlug)return;const n=this.centralConvoBuildings.find(e=>e.slug===t);if(n){this.isGeneralBuilding=!1,this.waitingForAvailabilities=!0,this.errorGettingAvailabilities=!1,this.tourType=null,this.selectedDate=void 0,this.selectedTime=void 0,this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.units=[],this.selectedLayoutValue="",this.floorplanOptions=[],this.selectedFloorplanName="",this.selectedUnitValue="",this.buildingId=n.building_id,this.buildingSlug=n.slug,this.buildingName=n.name,this.statusMessage=`Loading tours for ${n.name}…`,Lo("tourBuildingSelected",{buildingId:n.building_id});try{const e=await wa(this.orgSlug,n.slug);this.sgtUrl=e.sgtUrl,this.selfGuidedToursTypeOffered=e.selfGuidedToursTypeOffered,this.selfGuidedTourEnabled=e.isSelfGuidedTourEnabled,this.escortedToursLink=e.escortedToursLink,this.escortedToursTypeOffered=e.escortedToursTypeOffered,this.virtualToursLink=e.virtualToursLink,this.virtualToursTypeOffered=e.virtualToursTypeOffered,this.tourTypeOptions=e.tourTypeOptions.map(e=>({label:e.label,value:e.value})),this.hasDynamicSchedulingEnabled=e.usesDynamicScheduling}catch(e){}if(await this._loadForCurrentBuilding(),!this.shouldAllowScheduling||this.errorGettingAvailabilities)this.statusMessage=`No tour availabilities for ${n.name}.`;else{const e=Object.values(this.shouldShowTourType).filter(Boolean).length;this.statusMessage=`Showing tours for ${n.name}. ${e} tour type${1===e?"":"s"} available.`}}},this.willUpdate=async e=>{e.has("tourType")&&this.tourType&&(this.availabilitiesGroupedByDay=await uo(wu[this.tourType]))},this.onChangePhoneNumber=e=>{this.phoneNumber=e.detail.formattedValue,this.phoneNumberE164=e.detail.e164,this.phoneCountry=e.detail.country,this.phoneNumberIsValid=e.detail.isValid},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.onChangeBrokerPhone=e=>{this.brokerPhone=e.detail.formattedValue,this.brokerPhoneE164=e.detail.e164,this.brokerPhoneCountry=e.detail.country,this.brokerPhoneIsValid=e.detail.isValid},this.onToggleBrokerReferral=e=>{const t=e.target.checked,n=!(this.brokerFirstName||this.brokerLastName||this.brokerEmail||this.brokerPhone),i=!(this.firstNameInputValue||this.lastNameInputValue||this.email||this.phoneNumber);t&&n?(this.brokerFirstName=this.firstNameInputValue,this.brokerLastName=this.lastNameInputValue,this.brokerEmail=this.email,this.brokerPhone=this.phoneNumber,this.brokerPhoneE164=this.phoneNumberE164,this.brokerPhoneCountry=this.phoneCountry,this.brokerPhoneIsValid=this.phoneNumberIsValid,this.brokerPhoneHasBlurred=this.phoneNumberHasBlurred,this.firstNameInputValue="",this.lastNameInputValue="",this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneNumberIsValid=!1,this.phoneNumberHasBlurred=!1):!t&&i&&(this.firstNameInputValue=this.brokerFirstName,this.lastNameInputValue=this.brokerLastName,this.email=this.brokerEmail,this.phoneNumber=this.brokerPhone,this.phoneNumberE164=this.brokerPhoneE164,this.phoneCountry=this.brokerPhoneCountry,this.phoneNumberIsValid=this.brokerPhoneIsValid,this.phoneNumberHasBlurred=this.brokerPhoneHasBlurred,this.brokerFirstName="",this.brokerLastName="",this.brokerEmail="",this.brokerPhone="",this.brokerPhoneE164=null,this.brokerPhoneIsValid=!1,this.brokerPhoneHasBlurred=!1),this.isBrokerReferral=t},this.brokerReferral=()=>{var e;return this.brokerIntakeEnabled&&this.isBrokerReferral?ra(this.brokerFirstName,this.brokerLastName,this.brokerEmail,this.brokerFirmName,null!==(e=this.brokerPhoneE164)&&void 0!==e?e:""):null},this.validators={tourType:()=>null!==this.tourType,dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t,n,i;return(!!(null===(e=this.firstNameInput)||void 0===e?void 0:e.value)||!!(null===(t=this.lastNameInput)||void 0===t?void 0:t.value))&&Lr(null!==(i=null===(n=this.emailInput)||void 0===n?void 0:n.value)&&void 0!==i?i:"")&&!!this.phoneNumber&&!!this.phoneNumberE164},layout:()=>!this.bedroomPreferenceRequired||!!this.selectedLayoutValue||!!this.selectedFloorplanName,broker:()=>{const e=this.brokerReferral();return!e||!oa(e)&&!aa(e,this.email)&&(!this.brokerPhone||this.brokerPhoneIsValid)}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo()&&this.validators.layout()&&this.validators.broker(),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,t,n,i,o,a,s,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$,S;if(!this.selectedDate||!this.selectedTime||null===this.tourType)return;const k=this.phoneNumberE164;if(!k)return void(this.phoneNumberIsValid=!1);if(!this.validators.broker())return;const A=this.brokerReferral(),T=new URLSearchParams(window.location.search);let E=null;E=this.selectedLeadSource&&this.selectedLeadSource.value&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:this.leadSourceInputValue&&this.leadSourceInputValue.length>0?this.leadSourceInputValue:this.currentLeadSource;const _=[...new Set(E?[E,"property-website"]:["property-website"])];this.firstNameInput&&(this.firstNameInputValue=this.firstNameInput.value),this.lastNameInput&&(this.lastNameInputValue=this.lastNameInput.value),this.leadSourceInputValue=E;const O=(null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||this.selectedLayoutValue||null,P=(null===(t=this.selectedUnitEl)||void 0===t?void 0:t.value)||this.selectedUnitValue||null;Lo("scheduleTourSubmitted",{email:this.email,phone:k,firstName:null!==(i=null===(n=this.firstNameInput)||void 0===n?void 0:n.value)&&void 0!==i?i:this.firstNameInputValue,lastName:null!==(a=null===(o=this.lastNameInput)||void 0===o?void 0:o.value)&&void 0!==a?a:this.lastNameInputValue,tourType:ku[this.tourType],tourTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,originatingSource:_.find(e=>"property-website"!==e)||null,layout:O,unit:P,conversationTrackingId:null!==(u=null===(s=this.leadSourceClient)||void 0===s?void 0:s.chatId)&&void 0!==u?u:null,...A?{isBrokerReferral:!0}:{}});const I=rs(),N={referrer:document.referrer,email_address:this.email,phone_number:k,building_id:this.buildingId,tracking_params:l(this.orgSlug),first_name:null!==(c=null===(d=this.firstNameInput)||void 0===d?void 0:d.value)&&void 0!==c?c:this.firstNameInputValue,last_name:null!==(p=null===(h=this.lastNameInput)||void 0===h?void 0:h.value)&&void 0!==p?p:this.lastNameInputValue,tour_type:ku[this.tourType],tour_time:`${this.selectedTime.datetime}${this.selectedTime.offset}`,cancel_existing_tours:this.promptForReschedule,lead_sources:[...new Set(E?[E,da(this.orgSlug)]:[da(this.orgSlug)])],query_params:Object.fromEntries(T.entries()),conversation_tracking_id:null===(f=this.leadSourceClient)||void 0===f?void 0:f.chatId,layouts:O?[O]:void 0,floorplans:this.selectedFloorplanName?[this.selectedFloorplanName]:void 0,unit_numbers:P?[P]:void 0,lead_sources_with_timestamps:(null!==(b=null===(g=this.leadSourceMultitouchClient)||void 0===g?void 0:g.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(m=this.selectedLeadSource)||void 0===m?void 0:m.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}))&&void 0!==b?b:[]).map(e=>_r({...e})),google_rwg_token:null==I?void 0:I.rwgToken,google_referral_building_id:null==I?void 0:I.buildingId,google_environment:null==I?void 0:I.environment,...sa(A)};this.isSubmitting=!0;try{await r().post("https://app.meetelise.com/platformApi/state/create/v2/scheduleMe",N,{headers:{"building-slug":this.buildingSlug,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE","org-slug":this.orgSlug}}),null===(y=this.leadSourceClient)||void 0===y||y.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(v=this.leadSourceClient)||void 0===v||v.resetLeadSource(),null===(w=this.leadSourceMultitouchClient)||void 0===w||w.resetLeadSourceTouchpoints(),this.isSubmitting=!1,this.tourIsBooked=!0}catch(e){const t=e,n=(null===(x=null===(C=t.response)||void 0===C?void 0:C.data)||void 0===x?void 0:x.detail)||"Failed to book tour";if(t.response&&t.response.headers&&t.response.headers["funnel-prospect-conflicting-appointment-error"]){if(this.selectedDate&&this.selectedTime){const e=this.availabilitiesGroupedByDay[ir(this.selectedDate,"yyyy-MM-dd")];e&&(this.availabilitiesGroupedByDay[ir(this.selectedDate,"yyyy-MM-dd")]=e.filter(e=>e!==this.selectedTime))}}else{if(409===(null===($=t.response)||void 0===$?void 0:$.status)&&!this.promptForReschedule&&"User already has a tour scheduled for this building"===n)return this.promptForReschedule=!0,this.isSubmitting=!1,void(this.tourIsBooked=!1);if(409===(null===(S=t.response)||void 0===S?void 0:S.status)&&!this.promptForReschedule)return this.isSubmitting=!1,this.tourIsBooked=!1,oo(),this.availabilitiesGroupedByDay=await uo(wu[this.tourType],this.buildingId),void alert("This timeslot is no longer available. Please select a different time.")}alert(n),this.isSubmitting=!1,this.tourIsBooked=!1}},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>H`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>H`${this.dateAndTimeMenu()}`},{validate:()=>this.validators.leadInfo()&&this.validators.broker(),nextButtonText:null,renderNextButton:()=>H` <action-confirm-button
|
|
2996
2994
|
id="schedule-bttn"
|
|
2997
2995
|
.onClick=${this.submit}
|
|
2998
2996
|
.isLoading=${this.isSubmitting}
|
|
@@ -3012,7 +3010,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3012
3010
|
@change=${this.onToggleBrokerReferral}
|
|
3013
3011
|
/>
|
|
3014
3012
|
</label>
|
|
3015
|
-
|
|
3013
|
+
`,this.selectLayout=e=>{if(this.selectedLayoutValue=e,e&&this.selectedUnitValue){const t=this.units.find(e=>e.unitNumber===this.selectedUnitValue);t&&Au(10*t.numberOfBedrooms)!==e&&(this.selectedUnitValue="",this.selectedUnitEl&&(this.selectedUnitEl.value=void 0))}e&&Lo("tourLayoutSelected",{layout:e,buildingId:this.buildingId})}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.trapOverlayTab),this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("aria-modal")||this.setAttribute("aria-modal","true"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Schedule a Tour")}openSelfGuidedTour(){const e=52===this.orgId?Po(this.sgtUrl,Oo()):this.sgtUrl;window.open(e,"_blank")}disconnectedCallback(){this.removeEventListener("keydown",this.trapOverlayTab),super.disconnectedCallback()}updated(){this.movedFocusInside||(du(this)?this.movedFocusInside=!0:(this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.matches(":focus")||this.focus({preventScroll:!0})))}coastalTourLabel(e){return this.useCoastalCustomTourTypes?xu[e]:void 0}confirmationTourName(e){var t;return null!==(t=this.coastalTourLabel(e))&&void 0!==t?t:Su[e]}buildingSelectMenu(){return H`<me-select
|
|
3016
3014
|
id="building"
|
|
3017
3015
|
placeholder="Select a property"
|
|
3018
3016
|
.value=${this.isGeneralBuilding?"":this.buildingSlug}
|
|
@@ -3020,36 +3018,36 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3020
3018
|
@change=${this._onBuildingChange}
|
|
3021
3019
|
>
|
|
3022
3020
|
</me-select>`}buildingSelector(){if(this.isGeneralBuilding){if(0===this.centralConvoBuildings.length)return""}else if(this.centralConvoBuildings.length<=1)return"";return H`<h2 class="journey-header">Building</h2>
|
|
3023
|
-
${this.buildingSelectMenu()}`}tourTypeMenu(){var e,t;const n={[
|
|
3024
|
-
heading=${null!==(e=this.coastalTourLabel(
|
|
3025
|
-
subtitle=${this.coastalTourLabel(
|
|
3021
|
+
${this.buildingSelectMenu()}`}tourTypeMenu(){var e,t;const n={[vu.Self]:this.shouldShowTourType[vu.Self]?H` <tour-type-option
|
|
3022
|
+
heading=${null!==(e=this.coastalTourLabel(vu.Self))&&void 0!==e?e:"Take a tour"}
|
|
3023
|
+
subtitle=${this.coastalTourLabel(vu.Self)?"":"on your own"}
|
|
3026
3024
|
.primaryColor=${this.primaryColor}
|
|
3027
3025
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
3028
|
-
@click="${async()=>{this.tourType=
|
|
3029
|
-
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=
|
|
3030
|
-
?selected="${this.tourType===
|
|
3026
|
+
@click="${async()=>{this.tourType=vu.Self,Lo("tourTypeSelected",{tourType:vu.Self,buildingId:this.buildingId}),this.sgtUrl&&va(vu.Self,this.selfGuidedToursTypeOffered)&&this.openSelfGuidedTour(),this.availabilitiesGroupedByDay=await uo(wu[vu.Self]),this._setDefaultSelectedDateAndTimes(wu[vu.Self])}}"
|
|
3027
|
+
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=vu.Self)}}"
|
|
3028
|
+
?selected="${this.tourType===vu.Self}"
|
|
3031
3029
|
>
|
|
3032
|
-
${
|
|
3033
|
-
</tour-type-option>`:"",[
|
|
3034
|
-
heading=${null!==(t=this.coastalTourLabel(
|
|
3035
|
-
subtitle=${this.coastalTourLabel(
|
|
3030
|
+
${fa(this.tourType===vu.Self?this.foregroundColorOnPrimaryBackgroundColor:oi)}
|
|
3031
|
+
</tour-type-option>`:"",[vu.Guided]:this.shouldShowTourType[vu.Guided]?H` <tour-type-option
|
|
3032
|
+
heading=${null!==(t=this.coastalTourLabel(vu.Guided))&&void 0!==t?t:"Guided tour"}
|
|
3033
|
+
subtitle=${this.coastalTourLabel(vu.Guided)?"":"with an agent"}
|
|
3036
3034
|
.primaryColor=${this.primaryColor}
|
|
3037
3035
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
3038
|
-
@click="${async()=>{this.tourType=
|
|
3039
|
-
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=
|
|
3040
|
-
?selected="${this.tourType===
|
|
3036
|
+
@click="${async()=>{this.tourType=vu.Guided,Lo("tourTypeSelected",{tourType:vu.Guided,buildingId:this.buildingId}),this.escortedToursLink&&va(vu.Guided,this.escortedToursTypeOffered)&&window.open(this.escortedToursLink,"_blank"),this.availabilitiesGroupedByDay=await uo(wu[vu.Guided]),this._setDefaultSelectedDateAndTimes(wu[vu.Guided])}}"
|
|
3037
|
+
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=vu.Guided)}}"
|
|
3038
|
+
?selected="${this.tourType===vu.Guided}"
|
|
3041
3039
|
>
|
|
3042
|
-
${
|
|
3043
|
-
</tour-type-option>`:"",[
|
|
3040
|
+
${ga(this.tourType===vu.Guided?this.foregroundColorOnPrimaryBackgroundColor:oi)}
|
|
3041
|
+
</tour-type-option>`:"",[vu.Virtual]:this.shouldShowTourType[vu.Virtual]?H` <tour-type-option
|
|
3044
3042
|
heading="Virtual tour"
|
|
3045
3043
|
subtitle="over video"
|
|
3046
3044
|
.primaryColor=${this.primaryColor}
|
|
3047
3045
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
3048
|
-
@click="${async()=>{this.tourType=
|
|
3049
|
-
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=
|
|
3050
|
-
?selected="${this.tourType===
|
|
3046
|
+
@click="${async()=>{this.tourType=vu.Virtual,Lo("tourTypeSelected",{tourType:vu.Virtual,buildingId:this.buildingId}),this.virtualToursLink&&va(vu.Virtual,this.virtualToursTypeOffered)&&window.open(this.virtualToursLink,"_blank"),this.availabilitiesGroupedByDay=await uo(wu[vu.Virtual]),this._setDefaultSelectedDateAndTimes(wu[vu.Virtual])}}"
|
|
3047
|
+
@keydown="${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),this.tourType=vu.Virtual)}}"
|
|
3048
|
+
?selected="${this.tourType===vu.Virtual}"
|
|
3051
3049
|
>
|
|
3052
|
-
${
|
|
3050
|
+
${pa(this.tourType===vu.Virtual?this.foregroundColorOnPrimaryBackgroundColor:oi)}
|
|
3053
3051
|
</tour-type-option>`:""};return H`${this.buildingSelector()}
|
|
3054
3052
|
<h2 id="tour-type-heading" class="journey-header">Tour Type</h2>
|
|
3055
3053
|
<div
|
|
@@ -3058,7 +3056,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3058
3056
|
aria-labelledby="tour-type-heading"
|
|
3059
3057
|
>
|
|
3060
3058
|
${this.tourTypeOrder.map(e=>n[e])}
|
|
3061
|
-
</div>`}dateAndTimeMenu(){var e;return this.tourType===
|
|
3059
|
+
</div>`}dateAndTimeMenu(){var e;return this.tourType===vu.Self&&this.sgtUrl&&va(this.tourType,this.selfGuidedToursTypeOffered)?H`<h2 class="journey-header">Date and Time</h2>
|
|
3062
3060
|
<div id="dateAndTimeMenu">
|
|
3063
3061
|
<button
|
|
3064
3062
|
id="self-guided-redirect-bttn"
|
|
@@ -3072,15 +3070,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3072
3070
|
<date-picker
|
|
3073
3071
|
.availabilities=${po()(this.availabilitiesGroupedByDay,e=>e.map(e=>new Date(e.offset)))}
|
|
3074
3072
|
.defaultDate=${this.selectedDate}
|
|
3075
|
-
@change=${async e=>{if(this.tourType===
|
|
3073
|
+
@change=${async e=>{if(this.tourType===vu.Self&&this.sgtUrl&&va(this.tourType,this.selfGuidedToursTypeOffered))this.openSelfGuidedTour();else if(this.tourType===vu.Guided&&this.escortedToursLink&&va(this.tourType,this.escortedToursTypeOffered))window.open(this.escortedToursLink,"_blank");else if(this.tourType===vu.Virtual&&this.virtualToursLink&&va(this.tourType,this.virtualToursTypeOffered))window.open(this.virtualToursLink,"_blank");else if(e.target instanceof cr){const t=this.selectedDate;if(this.selectedDate=e.target.selectedDate,!this.tourType)return;if(t&&e.target.selectedDate&&ur(t,e.target.selectedDate))return;e.target.selectedDate&&Lo("tourDateSelected",{selectedDate:ir(e.target.selectedDate,"yyyy-MM-dd"),tourType:this.tourType,buildingId:this.buildingId}),this._setDefaultSelectedDateAndTimes(wu[this.tourType],e.target.selectedDate)}}}
|
|
3076
3074
|
></date-picker>
|
|
3077
3075
|
<div>
|
|
3078
3076
|
<time-picker
|
|
3079
3077
|
?selecteddateexists=${!!this.selectedDate}
|
|
3080
3078
|
.timezone=${this.calendarTimeZone}
|
|
3081
|
-
.defaultSelectedTime=${this.selectedTime?{dateWithTimeZoneOffset:this.selectedTime,displayTime:ir(Yr(`${this.selectedTime.datetime}${this.selectedTime.offset}`),"h:mmaaa"),displayTimeZoned:
|
|
3082
|
-
.options=${this.selectedDate?null===(e=this.availabilitiesGroupedByDay[ir(this.selectedDate,"y-MM-dd")])||void 0===e?void 0:e.sort((e,t)=>function(e,t){si(2,arguments);var n=li(e),i=li(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}(Yr(e.datetime),Yr(t.datetime))).map(e=>({dateWithTimeZoneOffset:e,displayTime:ir(Yr(`${e.datetime}${e.offset}`),"h:mmaaa"),displayTimeZoned:
|
|
3083
|
-
@change=${e=>{if(e.target instanceof mr){if(!this.selectedDate)return;const t=this.availabilitiesGroupedByDay[ir(new Date(this.selectedDate),"y-MM-dd")],n=e.target.selectedTime?t.indexOf(e.target.selectedTime.dateWithTimeZoneOffset):null;this.selectedTime=null!==n?t[n]:null,this.selectedTime&&
|
|
3079
|
+
.defaultSelectedTime=${this.selectedTime?{dateWithTimeZoneOffset:this.selectedTime,displayTime:ir(Yr(`${this.selectedTime.datetime}${this.selectedTime.offset}`),"h:mmaaa"),displayTimeZoned:ns(Yr(`${this.selectedTime.datetime}${this.selectedTime.offset}`),this.calendarTimeZone,"h:mmaaa")}:null}
|
|
3080
|
+
.options=${this.selectedDate?null===(e=this.availabilitiesGroupedByDay[ir(this.selectedDate,"y-MM-dd")])||void 0===e?void 0:e.sort((e,t)=>function(e,t){si(2,arguments);var n=li(e),i=li(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}(Yr(e.datetime),Yr(t.datetime))).map(e=>({dateWithTimeZoneOffset:e,displayTime:ir(Yr(`${e.datetime}${e.offset}`),"h:mmaaa"),displayTimeZoned:ns(Yr(`${e.datetime}${e.offset}`),this.calendarTimeZone,"h:mmaaa")})):[]}
|
|
3081
|
+
@change=${e=>{if(e.target instanceof mr){if(!this.selectedDate)return;const t=this.availabilitiesGroupedByDay[ir(new Date(this.selectedDate),"y-MM-dd")],n=e.target.selectedTime?t.indexOf(e.target.selectedTime.dateWithTimeZoneOffset):null;this.selectedTime=null!==n?t[n]:null,this.selectedTime&&Lo("tourTimeSelected",{selectedTime:`${this.selectedTime.datetime}${this.selectedTime.offset}`,tourType:this.tourType,buildingId:this.buildingId})}}}
|
|
3084
3082
|
></time-picker>
|
|
3085
3083
|
</div>
|
|
3086
3084
|
</div>
|
|
@@ -3112,7 +3110,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3112
3110
|
stroke-width="2"
|
|
3113
3111
|
/>
|
|
3114
3112
|
</svg>
|
|
3115
|
-
</button>`}renderBrokerSection(){var e;const t=e=>Ce({"webchat-input":!0,...e?{[e]:!0}:{},"webchat-font__desktop":!Ir(),"webchat-font__mobile":Ir()}),n=this.brokerReferral(),i=n&&this.brokerEmail?
|
|
3113
|
+
</button>`}renderBrokerSection(){var e;const t=e=>Ce({"webchat-input":!0,...e?{[e]:!0}:{},"webchat-font__desktop":!Ir(),"webchat-font__mobile":Ir()}),n=this.brokerReferral(),i=n&&this.brokerEmail?aa(n,this.email):null;return H`
|
|
3116
3114
|
<div class="section-label">Your details</div>
|
|
3117
3115
|
<div id="brokerNamesWrapper" class="namesWrapper">
|
|
3118
3116
|
<div class="nameContainer">
|
|
@@ -3227,11 +3225,18 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3227
3225
|
${this.phoneNumberHasBlurred&&!this.phoneNumberIsValid?H`<p class="error-message">Invalid phone number</p>`:""}
|
|
3228
3226
|
</div>
|
|
3229
3227
|
${this.brokerIntakeEnabled&&!t?this.renderBrokerToggle():""}
|
|
3230
|
-
${this.
|
|
3228
|
+
${this.floorplanOptions.length>0?H` <me-select
|
|
3229
|
+
id="floorplan"
|
|
3230
|
+
placeholder=${this.bedroomPreferenceRequired?"Floor plan preference":"Floor plan preference (optional)"}
|
|
3231
|
+
.value=${this.selectedFloorplanName}
|
|
3232
|
+
.options="${this.floorplanOptions.map(e=>({label:e.name,value:e.name}))}"
|
|
3233
|
+
@change=${()=>{var e,t;const n=(null===(e=this.selectedFloorplanEl)||void 0===e?void 0:e.value)||"",i=null===(t=this.floorplanOptions.find(e=>e.name===n))||void 0===t?void 0:t.bedrooms;this.selectedFloorplanName=n,this.selectLayout(null==i?"":Au(10*i))}}
|
|
3234
|
+
>
|
|
3235
|
+
</me-select>`:this.layoutOptions.length>0?H` <me-select
|
|
3231
3236
|
id="layout"
|
|
3232
3237
|
placeholder=${this.bedroomPreferenceRequired?"Bedroom preference":"Bedroom preference (optional)"}
|
|
3233
|
-
.options="${this.layoutOptions.map(e=>({label:e.label,value:
|
|
3234
|
-
@change=${()=>{var e;
|
|
3238
|
+
.options="${this.layoutOptions.map(e=>({label:e.label,value:Au(e.value)}))}"
|
|
3239
|
+
@change=${()=>{var e;return this.selectLayout((null===(e=this.selectedLayoutEl)||void 0===e?void 0:e.value)||"")}}
|
|
3235
3240
|
>
|
|
3236
3241
|
</me-select>`:""}
|
|
3237
3242
|
${this.allowOccupiedUnitTours&&this._getUnitOptions().length>0?H` <me-select
|
|
@@ -3239,7 +3244,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3239
3244
|
placeholder="Unit preference (optional)"
|
|
3240
3245
|
.value=${this.selectedUnitValue}
|
|
3241
3246
|
.options="${this._getUnitOptions()}"
|
|
3242
|
-
@change=${()=>{var e;const t=(null===(e=this.selectedUnitEl)||void 0===e?void 0:e.value)||"";this.selectedUnitValue=t,t&&
|
|
3247
|
+
@change=${()=>{var e;const t=(null===(e=this.selectedUnitEl)||void 0===e?void 0:e.value)||"";this.selectedUnitValue=t,t&&Lo("tourUnitSelected",{unit:t,buildingId:this.buildingId})}}
|
|
3243
3248
|
>
|
|
3244
3249
|
</me-select>`:""}
|
|
3245
3250
|
${this.showLeadSourceSelect()?H` <me-select
|
|
@@ -3247,10 +3252,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3247
3252
|
value="${this.currentLeadSource}"
|
|
3248
3253
|
placeholder="How did you hear about us?"
|
|
3249
3254
|
.options="${this.leadSources.map(e=>({label:e,value:e}))}"
|
|
3250
|
-
@change=${()=>{var e;(null===(e=this.selectedLeadSource)||void 0===e?void 0:e.value)&&
|
|
3255
|
+
@change=${()=>{var e;(null===(e=this.selectedLeadSource)||void 0===e?void 0:e.value)&&Lo("tourLeadSourceSelected",{leadSource:this.selectedLeadSource.value,buildingId:this.buildingId}),this.requestUpdate()}}
|
|
3251
3256
|
>
|
|
3252
3257
|
</me-select>`:""}
|
|
3253
|
-
</div> `}confirmationMessage(){if(!this.selectedDate||!this.selectedTime||null===this.tourType)return H``;const e=
|
|
3258
|
+
</div> `}confirmationMessage(){if(!this.selectedDate||!this.selectedTime||null===this.tourType)return H``;const e=ns(Yr(`${this.selectedTime.datetime}${this.selectedTime.offset}`),this.calendarTimeZone,"MMM d 'at' h:mmaaa");return this.canceledReschedule?H`
|
|
3254
3259
|
<div id="confirmationMessage">
|
|
3255
3260
|
<svg
|
|
3256
3261
|
aria-hidden="true"
|
|
@@ -3466,7 +3471,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3466
3471
|
${e.nextButtonText}
|
|
3467
3472
|
</button>`}`}
|
|
3468
3473
|
${this.mobilePageIndex+1===this.mobilePages.length?H`
|
|
3469
|
-
${
|
|
3474
|
+
${na({buildingName:this.buildingName,phoneNumberInput:this.phoneNumber,emailInput:null===(n=this.emailInput)||void 0===n?void 0:n.value,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,buildingState:this.buildingState,clickingButtonText:"schedule tour"})}
|
|
3470
3475
|
`:H``}
|
|
3471
3476
|
</div>
|
|
3472
3477
|
</div>
|
|
@@ -3499,7 +3504,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3499
3504
|
We'll send a confirmation and any follow-ups to your email
|
|
3500
3505
|
address, please reply to the email to make any appointment
|
|
3501
3506
|
changes.
|
|
3502
|
-
${
|
|
3507
|
+
${na({buildingName:this.buildingName,phoneNumberInput:this.phoneNumber,emailInput:null===(e=this.emailInput)||void 0===e?void 0:e.value,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,buildingState:this.buildingState,clickingButtonText:"schedule tour"})}
|
|
3503
3508
|
</div>
|
|
3504
3509
|
|
|
3505
3510
|
<div class="reschedule-buttons-wrapper">
|
|
@@ -3547,7 +3552,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3547
3552
|
your client's email address.`:H`We'll send a confirmation and any follow-ups to
|
|
3548
3553
|
your email address, please reply to the email to make
|
|
3549
3554
|
any appointment changes.`}
|
|
3550
|
-
${
|
|
3555
|
+
${na({buildingName:this.buildingName,phoneNumberInput:this.phoneNumber,emailInput:null===(t=this.emailInput)||void 0===t?void 0:t.value,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,buildingState:this.buildingState,clickingButtonText:"schedule tour"})}
|
|
3551
3556
|
</div>
|
|
3552
3557
|
|
|
3553
3558
|
<action-confirm-button
|
|
@@ -3562,7 +3567,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3562
3567
|
</div>
|
|
3563
3568
|
`}
|
|
3564
3569
|
</div>
|
|
3565
|
-
`}};var yu
|
|
3570
|
+
`}};var vu;yu.styles=[ia,Me],bu([pe({attribute:!1})],yu.prototype,"tourTypeOptions",void 0),bu([pe({attribute:!1})],yu.prototype,"layoutOptions",void 0),bu([pe({attribute:!0})],yu.prototype,"chatId",void 0),bu([pe({type:Number})],yu.prototype,"buildingId",void 0),bu([pe({type:Number})],yu.prototype,"orgId",void 0),bu([pe({attribute:!1})],yu.prototype,"leadSourceParams",void 0),bu([pe({attribute:!0})],yu.prototype,"buildingSlug",void 0),bu([pe({attribute:!0})],yu.prototype,"sgtUrl",void 0),bu([pe({attribute:!0})],yu.prototype,"selfGuidedToursTypeOffered",void 0),bu([pe({attribute:!0})],yu.prototype,"selfGuidedTourEnabled",void 0),bu([pe({attribute:!0})],yu.prototype,"escortedToursLink",void 0),bu([pe({attribute:!0})],yu.prototype,"escortedToursTypeOffered",void 0),bu([pe({attribute:!0})],yu.prototype,"virtualToursLink",void 0),bu([pe({attribute:!0})],yu.prototype,"virtualToursTypeOffered",void 0),bu([pe({attribute:!0})],yu.prototype,"orgSlug",void 0),bu([pe({attribute:!0})],yu.prototype,"hasDynamicSchedulingEnabled",void 0),bu([pe({attribute:!0})],yu.prototype,"bedroomPreferenceRequired",void 0),bu([pe({attribute:!1})],yu.prototype,"brokerIntakeEnabled",void 0),bu([pe({attribute:!0})],yu.prototype,"leadSourceClient",void 0),bu([pe({attribute:!0})],yu.prototype,"leadSourceMultitouchClient",void 0),bu([pe({attribute:!0})],yu.prototype,"buildingName",void 0),bu([fe()],yu.prototype,"tourType",void 0),bu([fe()],yu.prototype,"shouldShowTourType",void 0),bu([fe()],yu.prototype,"email",void 0),bu([fe()],yu.prototype,"phoneNumber",void 0),bu([fe()],yu.prototype,"phoneNumberE164",void 0),bu([fe()],yu.prototype,"phoneCountry",void 0),bu([fe()],yu.prototype,"phoneNumberIsValid",void 0),bu([fe()],yu.prototype,"phoneNumberHasBlurred",void 0),bu([fe()],yu.prototype,"availabilitiesGroupedByDay",void 0),bu([fe()],yu.prototype,"calendarTimeZone",void 0),bu([fe()],yu.prototype,"waitingForAvailabilities",void 0),bu([fe()],yu.prototype,"selectedDate",void 0),bu([fe()],yu.prototype,"selectedTime",void 0),bu([fe()],yu.prototype,"mobilePageIndex",void 0),bu([fe()],yu.prototype,"isSubmitting",void 0),bu([fe()],yu.prototype,"tourIsBooked",void 0),bu([fe()],yu.prototype,"shouldAllowScheduling",void 0),bu([fe()],yu.prototype,"shouldAllowScheduleLoading",void 0),bu([fe()],yu.prototype,"promptForReschedule",void 0),bu([fe()],yu.prototype,"canceledReschedule",void 0),bu([fe()],yu.prototype,"isBrokerReferral",void 0),bu([fe()],yu.prototype,"brokerFirstName",void 0),bu([fe()],yu.prototype,"brokerLastName",void 0),bu([fe()],yu.prototype,"brokerEmail",void 0),bu([fe()],yu.prototype,"brokerFirmName",void 0),bu([fe()],yu.prototype,"brokerPhone",void 0),bu([fe()],yu.prototype,"brokerPhoneE164",void 0),bu([fe()],yu.prototype,"brokerPhoneCountry",void 0),bu([fe()],yu.prototype,"brokerPhoneIsValid",void 0),bu([fe()],yu.prototype,"brokerPhoneHasBlurred",void 0),bu([pe({attribute:!1})],yu.prototype,"leadSources",void 0),bu([pe({attribute:!0})],yu.prototype,"orgLegalName",void 0),bu([pe({attribute:!1})],yu.prototype,"country",void 0),bu([pe({attribute:!1})],yu.prototype,"buildingState",void 0),bu([pe({attribute:!0})],yu.prototype,"currentLeadSource",void 0),bu([pe({attribute:!0})],yu.prototype,"featureFlagShowDropdown",void 0),bu([pe({attribute:!0})],yu.prototype,"compactDesign",void 0),bu([pe({attribute:!0})],yu.prototype,"primaryColor",void 0),bu([pe({attribute:!0})],yu.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),bu([ge(".nameContainer#firstName input")],yu.prototype,"firstNameInput",void 0),bu([ge(".nameContainer#lastName input")],yu.prototype,"lastNameInput",void 0),bu([ge(".inputContainer#email input")],yu.prototype,"emailInput",void 0),bu([ge("me-select#leadSource")],yu.prototype,"selectedLeadSource",void 0),bu([ge("me-select#layout")],yu.prototype,"selectedLayoutEl",void 0),bu([ge("me-select#floorplan")],yu.prototype,"selectedFloorplanEl",void 0),bu([ge("me-select#unit")],yu.prototype,"selectedUnitEl",void 0),bu([fe()],yu.prototype,"firstNameInputValue",void 0),bu([fe()],yu.prototype,"lastNameInputValue",void 0),bu([fe()],yu.prototype,"leadSourceInputValue",void 0),bu([fe()],yu.prototype,"selectedLayoutValue",void 0),bu([fe()],yu.prototype,"floorplanOptions",void 0),bu([fe()],yu.prototype,"selectedFloorplanName",void 0),bu([fe()],yu.prototype,"selectedUnitValue",void 0),bu([fe()],yu.prototype,"units",void 0),bu([fe()],yu.prototype,"allowOccupiedUnitTours",void 0),bu([fe()],yu.prototype,"errorGettingAvailabilities",void 0),bu([fe()],yu.prototype,"centralConvoBuildings",void 0),bu([fe()],yu.prototype,"isGeneralBuilding",void 0),bu([ge("me-select#building")],yu.prototype,"selectedBuildingEl",void 0),bu([fe()],yu.prototype,"statusMessage",void 0),bu([fe()],yu.prototype,"useCoastalCustomTourTypes",void 0),bu([fe()],yu.prototype,"tourTypeOrder",void 0),yu=bu([ce("tour-scheduler")],yu),function(e){e.Guided="guided",e.Self="self",e.Virtual="virtual"}(vu||(vu={}));const wu={[vu.Guided]:Gr.WithAgent,[vu.Self]:Gr.SelfGuided,[vu.Virtual]:Gr.VirtualShowing},Cu={[Gr.WithAgent]:vu.Guided,[Gr.SelfGuided]:vu.Self,[Gr.VirtualShowing]:vu.Virtual},xu={[vu.Guided]:"In-Person Tour",[vu.Self]:"VIP Hard Hat Tour"},$u=[vu.Guided,vu.Self,vu.Virtual];const Su={[vu.Guided]:"guided tour",[vu.Self]:"self-guided tour",[vu.Virtual]:"virtual tour"},ku={[vu.Guided]:"escorted-tour",[vu.Self]:"self-guided-tour",[vu.Virtual]:"live-virtual-tour"};function Au(e){const t=Math.round(e/10);return 0===t?"studio":`${t}br`}const Tu=(e,t,n=!0,i=!1,r,o=.01)=>To({params:{org_slug:e,building_slug:t,is_pixel_on_site:n,is_any_webchat_showing:i,extra_data:{webchat_no_show_reason:r}},sampleRate:o}),Eu=async(e,t,n)=>{const i=.01;if(!e)return Tu(n,t,!0,!1,"building_does_not_exist",i),!1;if(!e.launchedDateTime)return Tu(n,t,!0,!1,"building_not_launched",i),!1;if(!e.active)return Tu(n,t,!0,!1,"building_not_active",i),!1;if(!e.webchatScopeConfigured)return Tu(n,t,!0,!1,"building_not_webchat_scope_configured",i),!1;const o=await async function(e){if(!e)return!1;try{return(await r().get(mo(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-leasing-in-maintenance-mode",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(t);return!o||(Tu(n,t,!0,!1,"building_in_maintenance_mode",i),!1)},_u=p`
|
|
3566
3571
|
* {
|
|
3567
3572
|
font-family: "Helvetica Neue", Arial;
|
|
3568
3573
|
font-size: 14px;
|
|
@@ -4059,7 +4064,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4059
4064
|
width: 164px;
|
|
4060
4065
|
}
|
|
4061
4066
|
}
|
|
4062
|
-
`,
|
|
4067
|
+
`,Ou=p`
|
|
4063
4068
|
.type-hey__list {
|
|
4064
4069
|
width: 280px;
|
|
4065
4070
|
height: 300px;
|
|
@@ -4217,7 +4222,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4217
4222
|
.title-bold {
|
|
4218
4223
|
font-weight: 700;
|
|
4219
4224
|
}
|
|
4220
|
-
`,
|
|
4225
|
+
`,Pu=p`
|
|
4221
4226
|
.vertical-pill-list {
|
|
4222
4227
|
position: relative;
|
|
4223
4228
|
display: flex;
|
|
@@ -4290,7 +4295,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4290
4295
|
justify-content: center;
|
|
4291
4296
|
align-items: center;
|
|
4292
4297
|
}
|
|
4293
|
-
`;var
|
|
4298
|
+
`;var Iu=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 Nu=class extends ue{constructor(){super(...arguments),this.text="Submit",this.isLoading=!1,this.disabled=!1,this.height="initial",this.width="initial",this.focus=()=>{var e,t;null===(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("button"))||void 0===t||t.focus()},this.render=()=>H`<button
|
|
4294
4299
|
class=${go()("action-confirm-button",{loading:this.isLoading})}
|
|
4295
4300
|
@click=${this.isLoading?null:this.onClick}
|
|
4296
4301
|
?disabled=${this.disabled}
|
|
@@ -4302,7 +4307,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4302
4307
|
<div></div>
|
|
4303
4308
|
<div></div>
|
|
4304
4309
|
</div>`:this.text}
|
|
4305
|
-
</button>`}};
|
|
4310
|
+
</button>`}};Nu.shadowRootOptions={...ue.shadowRootOptions,delegatesFocus:!0},Nu.styles=[p`
|
|
4306
4311
|
.action-confirm-button {
|
|
4307
4312
|
display: flex;
|
|
4308
4313
|
justify-content: center;
|
|
@@ -4377,7 +4382,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4377
4382
|
transform: rotate(360deg);
|
|
4378
4383
|
}
|
|
4379
4384
|
}
|
|
4380
|
-
`],
|
|
4385
|
+
`],Iu([pe()],Nu.prototype,"onClick",void 0),Iu([pe()],Nu.prototype,"text",void 0),Iu([pe({attribute:!1})],Nu.prototype,"isLoading",void 0),Iu([pe({type:Boolean})],Nu.prototype,"disabled",void 0),Iu([pe({type:String})],Nu.prototype,"height",void 0),Iu([pe({type:String})],Nu.prototype,"width",void 0),Nu=Iu([ce("action-confirm-button")],Nu);var Mu=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 Du=class extends ue{constructor(){super(...arguments),this.height="425px",this.width="326px",this.useRoundedBorders=!0,this.headerText="",this.isMobileSized=Ir(),this.useGradientDesign=!1,this._onWindowResize=()=>this.fitAboveBottom()}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Nr(e=>{this.isMobileSized=e}),window.addEventListener("resize",this._onWindowResize)}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),window.removeEventListener("resize",this._onWindowResize),super.disconnectedCallback()}updated(){this.fitAboveBottom()}fitAboveBottom(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("details-window-inner");if(!t)return;const n=t.getBoundingClientRect().bottom,i=getComputedStyle(t),r=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),o=Math.min(window.innerHeight-40,n-16)-r;t.style.maxHeight=n>0?`${Math.max(200,o)}px`:""}render(){return H`
|
|
4381
4386
|
<div
|
|
4382
4387
|
id="details-window-inner"
|
|
4383
4388
|
class="details-window-wrapper"
|
|
@@ -4417,7 +4422,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4417
4422
|
</div>
|
|
4418
4423
|
<slot class="details-window__slot-content"></slot>
|
|
4419
4424
|
</div>
|
|
4420
|
-
`}};
|
|
4425
|
+
`}};Du.styles=p`
|
|
4421
4426
|
.details-window-wrapper {
|
|
4422
4427
|
background: rgba(255, 255, 255, 0.9);
|
|
4423
4428
|
box-shadow: 0px 0px 14px 5px rgba(0, 0, 0, 0.25);
|
|
@@ -4485,7 +4490,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4485
4490
|
border-radius: 0px 0px 0px 0px;
|
|
4486
4491
|
}
|
|
4487
4492
|
}
|
|
4488
|
-
`,
|
|
4493
|
+
`,Mu([pe({type:String})],Du.prototype,"height",void 0),Mu([pe({type:String})],Du.prototype,"width",void 0),Mu([pe({type:Boolean})],Du.prototype,"useRoundedBorders",void 0),Mu([pe({type:String})],Du.prototype,"headerText",void 0),Mu([pe({attribute:!1})],Du.prototype,"onCloseClick",void 0),Mu([fe()],Du.prototype,"isMobileSized",void 0),Mu([pe({attribute:!0})],Du.prototype,"useGradientDesign",void 0),Du=Mu([ce("details-window")],Du);var Lu=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 Ru=class extends ue{constructor(){super(...arguments),this.trapOverlayTab=e=>{cu(e,this)},this.leadSources=[],this.chatId="",this.buildingId=0,this.buildingSlug="",this.orgSlug="",this.buildingName="",this.orgLegalName="",this.country=null,this.buildingState=null,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.featureFlagShowDropdown="",this.brokerIntakeEnabled=!1,this.privatePolicyUrl="https://www.meetelise.com/privacy",this.termsOfServiceUrl="_blank",this.firstName="",this.lastName="",this.email="",this.phoneNumber="",this.phoneNumberE164=null,this.phoneCountry=null,this.message="",this.isBrokerReferral=!1,this.brokerFirstName="",this.brokerLastName="",this.brokerEmail="",this.brokerFirmName="",this.brokerPhone="",this.brokerPhoneE164=null,this.brokerPhoneCountry=null,this.brokerPhoneIsValid=!1,this.hasBrokerPhoneError=!1,this.currentLeadSource="",this.hasNameError=!1,this.hasEmailError=!1,this.hasPhoneNumberError=!1,this.hasMessageError=!1,this.hasBrokerNameError=!1,this.brokerEmailError=null,this.hasSubmittedForm=!1,this.isKnownBroker=!1,this.windowHeight=525,this.hasSubmissionError=!1,this.isSubmitting=!1,this.onChangeFirstName=e=>{e.target&&(this.firstName=e.target.value)},this.onChangeLastName=e=>{e.target&&(this.lastName=e.target.value)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.onChangePhoneNumber=e=>{this.phoneNumber=e.detail.formattedValue,this.phoneNumberE164=e.detail.e164,this.phoneCountry=e.detail.country},this.onChangeBrokerPhone=e=>{this.brokerPhone=e.detail.formattedValue,this.brokerPhoneE164=e.detail.e164,this.brokerPhoneCountry=e.detail.country,this.brokerPhoneIsValid=e.detail.isValid},this.onChangeMessage=e=>{e.target&&(this.message=e.target.value)},this.onToggleBrokerReferral=e=>{const t=e.target.checked,n=!(this.brokerFirstName||this.brokerLastName||this.brokerEmail||this.brokerPhone);t&&n?(this.brokerFirstName=this.firstName,this.brokerLastName=this.lastName,this.brokerEmail=this.email,this.brokerPhone=this.phoneNumber,this.brokerPhoneE164=this.phoneNumberE164,this.brokerPhoneCountry=this.phoneCountry,this.brokerPhoneIsValid=!!this.phoneNumberE164,this.firstName="",this.lastName="",this.email="",this.phoneNumber="",this.phoneNumberE164=null):t||this.firstName||this.lastName||this.email||this.phoneNumber||(this.firstName=this.brokerFirstName,this.lastName=this.brokerLastName,this.email=this.brokerEmail,this.phoneNumber=this.brokerPhone,this.phoneNumberE164=this.brokerPhoneE164,this.phoneCountry=this.brokerPhoneCountry,this.brokerFirstName="",this.brokerLastName="",this.brokerEmail="",this.brokerPhone="",this.brokerPhoneE164=null,this.brokerPhoneIsValid=!1),this.isBrokerReferral=t,this.hasNameError=!1,this.hasEmailError=!1,this.hasPhoneNumberError=!1,this.hasBrokerNameError=!1,this.brokerEmailError=null,this.hasBrokerPhoneError=!1,this.windowHeight=this.baseHeight()+30*this.getNumErrors()},this.onChangeBrokerField=e=>t=>{t.target&&(this[e]=t.target.value)},this.baseHeight=()=>525+(this.brokerIntakeEnabled&&this.isBrokerReferral?143:0),this.brokerReferral=()=>{var e;return this.brokerIntakeEnabled&&this.isBrokerReferral?ra(this.brokerFirstName,this.brokerLastName,this.brokerEmail,this.brokerFirmName,null!==(e=this.brokerPhoneE164)&&void 0!==e?e:""):null},this.validateFormFields=()=>{this.hasNameError=!1,this.hasEmailError=!1,this.hasPhoneNumberError=!1,this.hasMessageError=!1,this.hasSubmissionError=!1,this.hasBrokerNameError=!1,this.brokerEmailError=null,this.hasBrokerPhoneError=!1;const e=this.brokerReferral();e&&(this.hasBrokerNameError=oa(e),this.brokerEmailError=aa(e,this.email),this.hasBrokerPhoneError=!!this.brokerPhone&&!this.brokerPhoneIsValid),this.firstName&&this.lastName||(this.hasNameError=!0),this.email&&Lr(this.email)||(this.hasEmailError=!0),this.phoneNumberE164||(this.hasPhoneNumberError=!0),this.windowHeight=this.baseHeight()+30*this.getNumErrors()},this.onClick=async()=>{var e,t,n,i,r,o;if(this.isSubmitting)return;if(this.validateFormFields(),this.hasNameError||this.hasEmailError||this.hasPhoneNumberError||this.hasMessageError||this.hasBrokerNameError||this.brokerEmailError||this.hasBrokerPhoneError)return;const a=this.phoneNumberE164;if(a)try{this.isSubmitting=!0,this.windowHeight=this.baseHeight()+60;const s=this.selectedLeadSource&&this.selectedLeadSource.value?this.selectedLeadSource.value:this.currentLeadSource,{knownBroker:l}=await Bu(this.firstName,this.lastName,this.email,a,this.message,this.buildingId,this.orgSlug,this.buildingSlug,[...new Set(s?[s,da(this.orgSlug)]:[da(this.orgSlug)])],null===(e=this.leadSourceClient)||void 0===e?void 0:e.chatId,null===(t=this.leadSourceMultitouchClient)||void 0===t?void 0:t.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:(null===(n=this.selectedLeadSource)||void 0===n?void 0:n.value)&&this.selectedLeadSource.value.length>0?this.selectedLeadSource.value:null}),this.brokerReferral());null===(i=this.leadSourceClient)||void 0===i||i.checkAndHandleForLogLeadSource({webchatAction:"email-us",stateId:null}),null===(r=this.leadSourceClient)||void 0===r||r.resetLeadSource(),null===(o=this.leadSourceMultitouchClient)||void 0===o||o.resetLeadSourceTouchpoints(),this.isKnownBroker=l,this.hasSubmittedForm=!0,this.isSubmitting=!1,this.windowHeight=this.baseHeight()}catch(e){this.hasSubmissionError=!0,this.isSubmitting=!1,this.windowHeight=this.baseHeight()}else this.hasPhoneNumberError=!0},this.getNumErrors=()=>[this.hasNameError,this.hasEmailError,this.hasPhoneNumberError,this.hasMessageError,this.hasSubmissionError,this.hasBrokerNameError,!!this.brokerEmailError,this.hasBrokerPhoneError].filter(e=>e).length,this.renderBrokerToggle=()=>H`
|
|
4489
4494
|
<label class="email-us__broker-toggle">
|
|
4490
4495
|
<span>Are you a broker or locator?</span>
|
|
4491
4496
|
<input
|
|
@@ -4558,7 +4563,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4558
4563
|
<div class="email-us__vertical-spacer"></div>
|
|
4559
4564
|
<div class="email-us__section-label">Your client</div>
|
|
4560
4565
|
`:""}
|
|
4561
|
-
`},this.render=()=>{var e;return window.customElements.get("details-window")||window.customElements.define("details-window",
|
|
4566
|
+
`},this.render=()=>{var e;return window.customElements.get("details-window")||window.customElements.define("details-window",Du),window.customElements.get("action-confirm-button")||window.customElements.define("action-confirm-button",Nu),this.hasSubmittedForm?H`
|
|
4562
4567
|
<details-window
|
|
4563
4568
|
id="details-window"
|
|
4564
4569
|
headerText=""
|
|
@@ -4681,9 +4686,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4681
4686
|
`:""}
|
|
4682
4687
|
</div>
|
|
4683
4688
|
|
|
4684
|
-
${
|
|
4689
|
+
${na({buildingName:this.buildingName,phoneNumberInput:this.phoneNumber,emailInput:this.email,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,buildingState:this.buildingState,clickingButtonText:"send"})}
|
|
4685
4690
|
</details-window>
|
|
4686
|
-
`}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.trapOverlayTab)}disconnectedCallback(){this.removeEventListener("keydown",this.trapOverlayTab),super.disconnectedCallback()}async firstUpdated(){var e;await(null===(e=this.renderRoot.querySelector("details-window"))||void 0===e?void 0:e.updateComplete),this.isConnected&&
|
|
4691
|
+
`}}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.trapOverlayTab)}disconnectedCallback(){this.removeEventListener("keydown",this.trapOverlayTab),super.disconnectedCallback()}async firstUpdated(){var e;await(null===(e=this.renderRoot.querySelector("details-window"))||void 0===e?void 0:e.updateComplete),this.isConnected&&du(this,this.renderRoot.querySelector("#email-us-form"))}showLeadSourceSelect(){return!(this.brokerIntakeEnabled&&this.isBrokerReferral)&&this.leadSources.length>0&&(this.featureFlagShowDropdown===bo.always||this.featureFlagShowDropdown===bo.onAttributionFailure&&0===this.currentLeadSource.length)}};Ru.styles=[p`
|
|
4687
4692
|
.email-us__name-input,
|
|
4688
4693
|
.email-us__contact_input,
|
|
4689
4694
|
.email-us_message-input {
|
|
@@ -4824,11 +4829,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4824
4829
|
width: 50%;
|
|
4825
4830
|
}
|
|
4826
4831
|
}
|
|
4827
|
-
`,Me],
|
|
4832
|
+
`,Me],Lu([pe({attribute:!1})],Ru.prototype,"leadSources",void 0),Lu([pe({attribute:!1})],Ru.prototype,"onCloseClicked",void 0),Lu([pe({attribute:!0})],Ru.prototype,"chatId",void 0),Lu([pe({attribute:!1})],Ru.prototype,"buildingId",void 0),Lu([pe({attribute:!0})],Ru.prototype,"buildingSlug",void 0),Lu([pe({attribute:!0})],Ru.prototype,"orgSlug",void 0),Lu([pe({attribute:!0})],Ru.prototype,"buildingName",void 0),Lu([pe({attribute:!0})],Ru.prototype,"orgLegalName",void 0),Lu([pe({attribute:!1})],Ru.prototype,"country",void 0),Lu([pe({attribute:!1})],Ru.prototype,"buildingState",void 0),Lu([pe({attribute:!0})],Ru.prototype,"leadSourceClient",void 0),Lu([pe({attribute:!0})],Ru.prototype,"leadSourceMultitouchClient",void 0),Lu([pe({attribute:!0})],Ru.prototype,"featureFlagShowDropdown",void 0),Lu([pe({attribute:!1})],Ru.prototype,"brokerIntakeEnabled",void 0),Lu([pe()],Ru.prototype,"privatePolicyUrl",void 0),Lu([pe()],Ru.prototype,"termsOfServiceUrl",void 0),Lu([fe()],Ru.prototype,"firstName",void 0),Lu([fe()],Ru.prototype,"lastName",void 0),Lu([fe()],Ru.prototype,"email",void 0),Lu([fe()],Ru.prototype,"phoneNumber",void 0),Lu([fe()],Ru.prototype,"phoneNumberE164",void 0),Lu([fe()],Ru.prototype,"phoneCountry",void 0),Lu([fe()],Ru.prototype,"message",void 0),Lu([fe()],Ru.prototype,"isBrokerReferral",void 0),Lu([fe()],Ru.prototype,"brokerFirstName",void 0),Lu([fe()],Ru.prototype,"brokerLastName",void 0),Lu([fe()],Ru.prototype,"brokerEmail",void 0),Lu([fe()],Ru.prototype,"brokerFirmName",void 0),Lu([fe()],Ru.prototype,"brokerPhone",void 0),Lu([fe()],Ru.prototype,"brokerPhoneE164",void 0),Lu([fe()],Ru.prototype,"brokerPhoneCountry",void 0),Lu([fe()],Ru.prototype,"brokerPhoneIsValid",void 0),Lu([fe()],Ru.prototype,"hasBrokerPhoneError",void 0),Lu([ge("me-select#leadSource")],Ru.prototype,"selectedLeadSource",void 0),Lu([pe({attribute:!0})],Ru.prototype,"currentLeadSource",void 0),Lu([fe()],Ru.prototype,"hasNameError",void 0),Lu([fe()],Ru.prototype,"hasEmailError",void 0),Lu([fe()],Ru.prototype,"hasPhoneNumberError",void 0),Lu([fe()],Ru.prototype,"hasMessageError",void 0),Lu([fe()],Ru.prototype,"hasBrokerNameError",void 0),Lu([fe()],Ru.prototype,"brokerEmailError",void 0),Lu([fe()],Ru.prototype,"hasSubmittedForm",void 0),Lu([fe()],Ru.prototype,"isKnownBroker",void 0),Lu([fe()],Ru.prototype,"windowHeight",void 0),Lu([fe()],Ru.prototype,"hasSubmissionError",void 0),Lu([fe()],Ru.prototype,"isSubmitting",void 0),Ru=Lu([ce("email-us-window")],Ru);const Bu=async(e,t,n,i,o,a,s,u,d,c,h,p)=>{var f;const g=new URLSearchParams(window.location.search),m={email_address:n,building_id:a,lead_sources:d,first_message:o,first_name:e,last_name:t,phone_number:i,referrer:document.referrer,query_params:Object.fromEntries(g.entries()),conversation_tracking_id:c,tracking_params:l(s),lead_sources_with_timestamps:(null!=h?h:[]).map(e=>_r({...e})),...sa(p)};Lo("emailUsSubmitted",{firstName:e,lastName:t,email:n,phone:i,message:o,originatingSource:d.find(e=>"property-website"!==e)||null,conversationTrackingId:null!=c?c:null,...p?{isBrokerReferral:!0}:{}});return{knownBroker:!0===(null===(f=(await r().post("https://app.meetelise.com/platformApi/state/create/emailMe",m,{headers:{"building-slug":u,"org-slug":s,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE"}})).data)||void 0===f?void 0:f.known_broker)}},Uu=(e="white")=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="14" height="17" viewBox="0 0 14 17" fill="none">
|
|
4828
4833
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.95487 2.54301e-07H7.04513C8.51534 -1.22821e-05 9.67985 -2.22686e-05 10.5912 0.121084C11.5292 0.24572 12.2883 0.508324 12.887 1.10005C13.4857 1.69178 13.7514 2.44211 13.8775 3.36914C14 4.26992 14 5.42089 14 6.874V10.126C14 11.5791 14 12.7301 13.8775 13.6309C13.7514 14.5579 13.4857 15.3082 12.887 15.8999C12.2883 16.4917 11.5292 16.7543 10.5912 16.8789C9.67985 17 8.51534 17 7.04513 17H6.95487C5.48466 17 4.32015 17 3.40878 16.8789C2.47084 16.7543 1.71169 16.4917 1.11299 15.8999C0.514304 15.3082 0.248611 14.5579 0.122508 13.6309C-2.25306e-05 12.7301 -1.24266e-05 11.5791 2.57292e-07 10.126V6.87399C-1.24266e-05 5.42088 -2.25306e-05 4.26992 0.122508 3.36914C0.248611 2.44211 0.514304 1.69178 1.11299 1.10005C1.71169 0.508324 2.47084 0.24572 3.40878 0.121084C4.32015 -2.22686e-05 5.48466 -1.22821e-05 6.95487 2.54301e-07ZM2.85118 1.44157C2.45996 1.55714 2.18378 1.71904 1.96152 1.93871C1.62295 2.27335 1.42002 2.73167 1.31181 3.52718C1.20127 4.33975 1.2 5.41089 1.2 6.9186V10.0814C1.2 11.5891 1.20127 12.6602 1.31181 13.4728C1.42002 14.2683 1.62295 14.7267 1.96152 15.0613C2.30009 15.3959 2.76381 15.5965 3.56868 15.7034C4.39081 15.8127 5.47454 15.814 7 15.814C8.52546 15.814 9.60919 15.8127 10.4313 15.7034C11.2362 15.5965 11.6999 15.3959 12.0385 15.0613C12.377 14.7267 12.58 14.2683 12.6882 13.4728C12.7987 12.6602 12.8 11.5891 12.8 10.0814V6.9186C12.8 5.41089 12.7987 4.33975 12.6882 3.52718C12.58 2.73167 12.377 2.27335 12.0385 1.93871C11.8162 1.71905 11.54 1.55714 11.1488 1.44157C10.6194 2.22728 10.2493 2.77349 9.69896 3.1115C9.58916 3.17894 9.47507 3.23928 9.3574 3.29217C8.76366 3.55903 8.09363 3.55868 7.12834 3.55818C7.08613 3.55816 7.04336 3.55814 7 3.55814C6.95664 3.55814 6.91387 3.55816 6.87166 3.55818C5.90637 3.55868 5.23634 3.55903 4.6426 3.29217C4.52493 3.23928 4.41084 3.17894 4.30104 3.1115C3.75069 2.77349 3.38057 2.22729 2.85118 1.44157ZM4.16103 1.2383C4.51629 1.74715 4.70232 1.96157 4.9344 2.10411C5.00028 2.14457 5.06873 2.18078 5.13933 2.21251C5.46646 2.35954 5.85406 2.37209 7 2.37209C8.14594 2.37209 8.53354 2.35954 8.86066 2.21251C8.93127 2.18078 8.99972 2.14457 9.0656 2.10411C9.29768 1.96157 9.48371 1.74715 9.83897 1.2383C9.10278 1.18681 8.18457 1.18605 7 1.18605C5.81543 1.18605 4.89722 1.18681 4.16103 1.2383ZM4 14.0349C4 13.7074 4.26863 13.4419 4.6 13.4419H9.4C9.73137 13.4419 10 13.7074 10 14.0349C10 14.3624 9.73137 14.6279 9.4 14.6279H4.6C4.26863 14.6279 4 14.3624 4 14.0349Z" fill="${e}"/>
|
|
4829
|
-
</svg>`,
|
|
4834
|
+
</svg>`,ju={},Fu=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],Hu=async e=>{const t=await(async e=>{if(ju[e])return ju[e];const t=`https://app.meetelise.com/platformApi/connectors/talk_js/leasing_office_hours/${e}`,n=await r().get(t);return ju[e]=n.data,n.data})(e);return Fu.map(e=>{const n=t[e];return n?{dayOfWeek:e,startTime:n.start,endTime:n.end}:e})};var zu=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 Gu=class extends ue{constructor(){super(...arguments),this.trapOverlayTab=e=>{cu(e,this)},this.buildingSlug="",this.orgSlug="",this.phoneNumberToCall="",this.phoneNumberToText="",this.buildingId=0,this.buildingName="",this.chatCallUsHeader="",this.hasCallUsEnabled="",this.hasTextUsEnabled="",this.currentLeadSource="",this.orgLegalName="",this.country=null,this.buildingState=null,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.phoneNumberInputRef=Oe(),this.hasSubmittedForm=!1,this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.submittingTextUsOption=!1,this.officeHoursTextInfo=[],this.firstUpdated=async()=>{var e;await(null===(e=this.renderRoot.querySelector("details-window"))||void 0===e?void 0:e.updateComplete),this.isConnected&&du(this,this.renderRoot.querySelector("#call-us-window__content-wrapper")),this.buildingId&&this.hasCallUsEnabled&&(this.officeHoursTextInfo=await Hu(this.buildingId))},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 H`<a href="tel:${i}"
|
|
4830
4835
|
>${e}</a
|
|
4831
|
-
>`},this.enforcePhoneFormat=e=>{(e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105})(e)||qn(e)||e.preventDefault()},this.onSubmitTextUs=async()=>{var e,t,n,i,r;if(this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumberToText&&14===this.phoneNumberToText.length||(this.hasPhoneNumberError=!0),!this.hasPhoneNumberError)try{this.submittingTextUsOption=!0,await
|
|
4836
|
+
>`},this.enforcePhoneFormat=e=>{(e=>{const t=e.keyCode;return t>=48&&t<=57||t>=96&&t<=105})(e)||qn(e)||e.preventDefault()},this.onSubmitTextUs=async()=>{var e,t,n,i,r;if(this.hasPhoneNumberError=!1,this.hasSubmissionError=!1,this.phoneNumberToText&&14===this.phoneNumberToText.length||(this.hasPhoneNumberError=!0),!this.hasPhoneNumberError)try{this.submittingTextUsOption=!0,await Vu(this.phoneNumberToText,this.buildingId,this.orgSlug,this.buildingSlug,[...new Set(this.currentLeadSource?[this.currentLeadSource,da(this.orgSlug)]:[da(this.orgSlug)])],null===(e=this.leadSourceClient)||void 0===e?void 0:e.chatId,null===(t=this.leadSourceMultitouchClient)||void 0===t?void 0:t.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:null})),null===(n=this.leadSourceClient)||void 0===n||n.checkAndHandleForLogLeadSource({webchatAction:"text-us",stateId:null}),null===(i=this.leadSourceClient)||void 0===i||i.resetLeadSource(),null===(r=this.leadSourceMultitouchClient)||void 0===r||r.resetLeadSourceTouchpoints(),this.hasSubmittedForm=!0,this.submittingTextUsOption=!1}catch(e){this.submittingTextUsOption=!1,this.hasSubmissionError=!0}},this.onChangePhoneNumber=e=>{if(!e.target||!this.phoneNumberInputRef.value)return;if(qn(e))return;const t=e.target;this.phoneNumberToText=Wn(t.value),this.phoneNumberInputRef.value.value=this.phoneNumberToText},this.renderFormTextUsOption=()=>H` <div class="text-us-wrapper">
|
|
4832
4837
|
<h1 class="text-us-window__header">Send Us a Text</h1>
|
|
4833
4838
|
<div class="text-us-window__input-container">
|
|
4834
4839
|
<input
|
|
@@ -4857,7 +4862,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4857
4862
|
</div>
|
|
4858
4863
|
|
|
4859
4864
|
<div class="text-us-window__description">
|
|
4860
|
-
${
|
|
4865
|
+
${Yo(this.buildingState)?Xo("textUs",this.orgLegalName):Wo(this.country)?H`By providing your number and clicking send, you consent to
|
|
4861
4866
|
receive recurring commercial electronic messages from or on behalf
|
|
4862
4867
|
of ${this.orgLegalName} at this number. Messages may be AI or
|
|
4863
4868
|
human generated. Msg freq varies. Msg & Data rates may apply. You
|
|
@@ -4865,7 +4870,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4865
4870
|
<a
|
|
4866
4871
|
target="_blank"
|
|
4867
4872
|
rel="noopener noreferrer"
|
|
4868
|
-
href=${
|
|
4873
|
+
href=${Vo}
|
|
4869
4874
|
>privacy policy</a
|
|
4870
4875
|
>, including having your number and communications recorded and
|
|
4871
4876
|
used by our service provider to generate responses and improve
|
|
@@ -4955,7 +4960,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4955
4960
|
Contact Our Leasing Team
|
|
4956
4961
|
</h1>
|
|
4957
4962
|
<div class="call-us-window__phone-redirect">
|
|
4958
|
-
${
|
|
4963
|
+
${Uu("black")}
|
|
4959
4964
|
${this.getCallLink(this.phoneNumberToCall)}
|
|
4960
4965
|
</div>
|
|
4961
4966
|
<div class="call-us-window__office-hours-wrapper">
|
|
@@ -4981,7 +4986,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
4981
4986
|
</div>`:""}
|
|
4982
4987
|
${this.hasTextUsEnabled?this.hasSubmittedForm?this.renderSubmittedTextUsOption():this.renderFormTextUsOption():""}
|
|
4983
4988
|
</details-window>
|
|
4984
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.trapOverlayTab)}disconnectedCallback(){this.removeEventListener("keydown",this.trapOverlayTab),super.disconnectedCallback()}};
|
|
4989
|
+
`}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.trapOverlayTab)}disconnectedCallback(){this.removeEventListener("keydown",this.trapOverlayTab),super.disconnectedCallback()}};Gu.styles=[Me,p`
|
|
4985
4990
|
#call-us-window__content-wrapper {
|
|
4986
4991
|
font-family: "Helvetica Neue", Arial;
|
|
4987
4992
|
font-style: normal;
|
|
@@ -5086,49 +5091,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5086
5091
|
.text-us-window__error {
|
|
5087
5092
|
color: rgb(255, 49, 3);
|
|
5088
5093
|
}
|
|
5089
|
-
`],
|
|
5090
|
-
<div
|
|
5091
|
-
class="tooltip-container ${this.disabled?"":"show-tooltip"}"
|
|
5092
|
-
data-tooltip="${this.tooltip}"
|
|
5093
|
-
>
|
|
5094
|
-
<slot></slot>
|
|
5095
|
-
</div>
|
|
5096
|
-
`}};Wu.styles=p`
|
|
5097
|
-
:host {
|
|
5098
|
-
display: block;
|
|
5099
|
-
position: relative;
|
|
5100
|
-
width: 100%;
|
|
5101
|
-
}
|
|
5102
|
-
|
|
5103
|
-
.tooltip-container {
|
|
5104
|
-
position: relative;
|
|
5105
|
-
width: 100%;
|
|
5106
|
-
}
|
|
5107
|
-
|
|
5108
|
-
.tooltip-container.show-tooltip::after {
|
|
5109
|
-
content: attr(data-tooltip);
|
|
5110
|
-
position: absolute;
|
|
5111
|
-
top: -30px;
|
|
5112
|
-
left: 50%;
|
|
5113
|
-
transform: translateX(-50%);
|
|
5114
|
-
background-color: #333;
|
|
5115
|
-
color: white;
|
|
5116
|
-
padding: 5px 10px;
|
|
5117
|
-
border-radius: 4px;
|
|
5118
|
-
font-size: 12px;
|
|
5119
|
-
white-space: nowrap;
|
|
5120
|
-
opacity: 0;
|
|
5121
|
-
visibility: hidden;
|
|
5122
|
-
transition: opacity 0.3s, visibility 0.3s;
|
|
5123
|
-
z-index: 1000;
|
|
5124
|
-
}
|
|
5125
|
-
|
|
5126
|
-
.tooltip-container.show-tooltip:hover::after {
|
|
5127
|
-
opacity: 1;
|
|
5128
|
-
visibility: visible;
|
|
5129
|
-
}
|
|
5130
|
-
`,Vu([pe({type:String})],Wu.prototype,"tooltip",void 0),Vu([pe({type:Boolean,reflect:!0})],Wu.prototype,"disabled",void 0),Wu=Vu([ce("simple-tooltip")],Wu);var Qu=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 qu=class extends ue{constructor(){super(...arguments),this.open=!1,this.inline=!1,this.onDocumentClick=e=>{!this.open||this.inline||e.composedPath().includes(this)||this.requestClose()},this.onKeydown=e=>{var t;this.open&&"Escape"===e.key&&!e.isComposing&&(e.preventDefault(),e.stopPropagation(),this.requestClose(),null===(t=this.querySelector('[slot="trigger"]'))||void 0===t||t.focus())}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onDocumentClick),this.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){document.removeEventListener("click",this.onDocumentClick),this.removeEventListener("keydown",this.onKeydown),super.disconnectedCallback()}requestClose(){this.dispatchEvent(new CustomEvent("popover-close"))}render(){return H`<slot name="trigger"></slot>
|
|
5131
|
-
<div class="panel" ?hidden=${!this.open}><slot></slot></div>`}};qu.styles=p`
|
|
5094
|
+
`],zu([pe({attribute:!0})],Gu.prototype,"buildingSlug",void 0),zu([pe({attribute:!0})],Gu.prototype,"orgSlug",void 0),zu([pe({attribute:!1})],Gu.prototype,"onCloseClicked",void 0),zu([pe()],Gu.prototype,"phoneNumberToCall",void 0),zu([pe()],Gu.prototype,"phoneNumberToText",void 0),zu([pe({attribute:!1})],Gu.prototype,"buildingId",void 0),zu([pe({attribute:!1})],Gu.prototype,"buildingName",void 0),zu([pe({attribute:!0})],Gu.prototype,"chatCallUsHeader",void 0),zu([pe({attribute:!0})],Gu.prototype,"hasCallUsEnabled",void 0),zu([pe({attribute:!0})],Gu.prototype,"hasTextUsEnabled",void 0),zu([pe({attribute:!0})],Gu.prototype,"currentLeadSource",void 0),zu([pe({attribute:!0})],Gu.prototype,"orgLegalName",void 0),zu([pe({attribute:!1})],Gu.prototype,"country",void 0),zu([pe({attribute:!1})],Gu.prototype,"buildingState",void 0),zu([pe({attribute:!0})],Gu.prototype,"leadSourceClient",void 0),zu([pe({attribute:!0})],Gu.prototype,"leadSourceMultitouchClient",void 0),zu([fe()],Gu.prototype,"hasSubmittedForm",void 0),zu([fe()],Gu.prototype,"hasPhoneNumberError",void 0),zu([fe()],Gu.prototype,"hasSubmissionError",void 0),zu([fe()],Gu.prototype,"submittingTextUsOption",void 0),zu([pe({attribute:!1})],Gu.prototype,"officeHoursTextInfo",void 0),Gu=zu([ce("call-us-window")],Gu);const Vu=async(e,t,n,i,o,a,s)=>{const u="+1"+e.replace("(","").replace(")","").replace(" ","").replace("-",""),d=new URLSearchParams(window.location.search),c={building_id:t,lead_sources:o,phone_number:u,referrer:document.referrer,query_params:Object.fromEntries(d.entries()),conversation_tracking_id:a,tracking_params:l(n),lead_sources_with_timestamps:(null!=s?s:[]).map(e=>_r({...e}))};Lo("textUsSubmitted",{phone:u,originatingSource:o.find(e=>"property-website"!==e)||null,conversationTrackingId:null!=a?a:null}),await r().post("https://app.meetelise.com/platformApi/state/create/textMe",c,{headers:{"building-slug":i,"org-slug":n,"X-SecurityKey":"webchatkey-wkjcWAKZjqhLStvP8L6SN8y4FbYmPhdE"}})};var Wu=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 Qu=class extends ue{constructor(){super(...arguments),this.open=!1,this.inline=!1,this.onDocumentClick=e=>{!this.open||this.inline||e.composedPath().includes(this)||this.requestClose()},this.onKeydown=e=>{var t;this.open&&"Escape"===e.key&&!e.isComposing&&(e.preventDefault(),e.stopPropagation(),this.requestClose(),null===(t=this.querySelector('[slot="trigger"]'))||void 0===t||t.focus())}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onDocumentClick),this.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){document.removeEventListener("click",this.onDocumentClick),this.removeEventListener("keydown",this.onKeydown),super.disconnectedCallback()}requestClose(){this.dispatchEvent(new CustomEvent("popover-close"))}render(){return H`<slot name="trigger"></slot>
|
|
5095
|
+
<div class="panel" ?hidden=${!this.open}><slot></slot></div>`}};Qu.styles=p`
|
|
5132
5096
|
/* New element, from me-select's list surface and the picker's card border. */
|
|
5133
5097
|
:host {
|
|
5134
5098
|
display: inline-block;
|
|
@@ -5169,7 +5133,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5169
5133
|
[hidden] {
|
|
5170
5134
|
display: none;
|
|
5171
5135
|
}
|
|
5172
|
-
`,
|
|
5136
|
+
`,Wu([pe({type:Boolean,reflect:!0})],Qu.prototype,"open",void 0),Wu([pe({type:Boolean,reflect:!0})],Qu.prototype,"inline",void 0),Qu=Wu([ce("scheduler-popover")],Qu);const qu=p`
|
|
5173
5137
|
:host {
|
|
5174
5138
|
display: block;
|
|
5175
5139
|
}
|
|
@@ -5282,7 +5246,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5282
5246
|
margin-right: 8px;
|
|
5283
5247
|
}
|
|
5284
5248
|
}
|
|
5285
|
-
`,
|
|
5249
|
+
`,Yu=p`
|
|
5286
5250
|
:host {
|
|
5287
5251
|
display: block;
|
|
5288
5252
|
}
|
|
@@ -5459,12 +5423,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5459
5423
|
overflow-x: auto;
|
|
5460
5424
|
}
|
|
5461
5425
|
}
|
|
5462
|
-
`,
|
|
5426
|
+
`,Ku=e=>({building_id:e.building_id,name:e.name,address:e.address,timezone:e.timezone,bedrooms:e.bedrooms}),Xu=e=>e?[e.line1,e.city,e.state].filter(Boolean).join(", "):"";class Zu extends Error{constructor(e,t,n){super(n),this.status=e,this.code=t,this.name="TourApiError"}}const Ju=({orgSlug:e,buildingSlug:t,getSessionToken:n,host:i="https://app.meetelise.com"})=>{const o=`${i}/platformApi/webchat`,a=()=>{var i;return{"X-Session-Token":null!==(i=n())&&void 0!==i?i:"","org-slug":e,"building-slug":t}},s=async e=>{try{return(await e()).data}catch(e){throw(e=>{var t,n,i,r,o;const a=e,s=null===(n=null===(t=a.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.error;return new Zu(null!==(r=null===(i=a.response)||void 0===i?void 0:i.status)&&void 0!==r?r:0,null!==(o=null==s?void 0:s.code)&&void 0!==o?o:null,(null==s?void 0:s.message)||"Something went wrong. Please try again.")})(e)}};return{getCommunities:e=>s(()=>r().get(`${o}/tour-communities?${(e=>{const t=new URLSearchParams;return e.bedrooms.forEach(e=>t.append("bedrooms",String(e))),e.moveIn&&t.set("move_in",e.moveIn),null!==e.maxBudget&&t.set("max_budget",String(e.maxBudget)),e.extend&&(t.set("available_after",e.extend.availableAfter),t.set("tour_type",e.extend.tourType),t.set("near_building_id",String(e.extend.nearBuildingId)),e.extend.excludeBuildingIds.forEach(e=>t.append("exclude_building_ids",String(e)))),t})(e)}`,{headers:a()})),plan:e=>s(()=>r().post(`${o}/tour-itineraries/plan`,e,{headers:a()})),book:(e,t)=>s(()=>r().post(`${o}/tour-itineraries`,e,{headers:{...a(),"Idempotency-Key":t}}))}},ed=e=>e.slice(0,10),td=e=>e.slice(11,16),nd=e=>{const[t,n]=e.split(":");return{hour:parseInt(t,10),minute:n}},id=e=>e<12?"am":"pm",rd=(e,t)=>`${e%12==0?12:e%12}:${t}`,od=e=>{const{hour:t,minute:n}=nd(e);return`${rd(t,n)}${id(t)}`},ad=e=>od(td(e)),sd=(e,t)=>{const n=nd(td(e)),i=nd(td(t));return`${id(n.hour)===id(i.hour)?rd(n.hour,n.minute):od(td(e))}–${od(td(t))}`},ld=e=>{const[t,n,i]=e.split("-").map(e=>parseInt(e,10));return new Date(t,n-1,i)},ud=e=>ir(ld(e),"EEE, MMM d"),dd=e=>ir(ld(e),"MMM d"),cd=e=>ir(e,"yyyy-MM-dd"),hd={"escorted-tour":{heading:"Escorted Tour",subtitle:"With an agent",icon:ga},"live-virtual-tour":{heading:"Virtual Tour",subtitle:"Over video",icon:pa},"self-guided-tour":{heading:"Self-Guided Tour",subtitle:"On your own",icon:fa}},pd=["escorted-tour","live-virtual-tour","self-guided-tour"];var fd=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};const gd={bedrooms:[],moveIn:null,maxBudget:null},md=[{value:0,label:"Studio"},{value:1,label:"1 bd"},{value:2,label:"2 bd"},{value:3,label:"3+ bd"}],bd=["bedrooms","moveIn","budget"];let yd=class extends ue{constructor(){super(...arguments),this.variant="select",this.load=null,this.initial=null,this.selected=[],this.filters=gd,this.openFilter=null,this.communities=[],this.loading=!1,this.error=null,this.mobile=Ir(),this.requestId=0}connectedCallback(){super.connectedCallback(),this.cleanupMobileListener=Nr(e=>this.mobile=e)}disconnectedCallback(){var e;null===(e=this.cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}get initialPage(){return bd.some(e=>this.isFilterActive(e))?null:this.initial}willUpdate(){const e=this.initialPage;!this.hasUpdated&&e&&(this.communities=e.communities)}firstUpdated(){this.initialPage||this.reload()}async reload(){if(!this.load)return;const e=++this.requestId;this.loading=!0,this.error=null;try{const t=await this.load(this.filters);if(e!==this.requestId)return;this.communities=t.communities}catch(t){if(e!==this.requestId)return;this.error=t.message}finally{e===this.requestId&&(this.loading=!1)}}setFilters(e){this.filters={...this.filters,...e},this.dispatchEvent(new CustomEvent("filters-change",{detail:{filters:this.filters},bubbles:!0,composed:!0})),this.reload()}isSelected(e){return this.selected.some(t=>t.building_id===e)}toggle(e){e.tourable&&this.emitSelection([Ku(e)])}emitSelection(e){this.dispatchEvent(new CustomEvent("selection-change",{detail:{communities:e},bubbles:!0,composed:!0}))}heading(){return"extend"===this.variant?"Add Nearby Communities to Your Tour":"Select a Community to Tour"}isFilterActive(e){const t=this.filters;return"bedrooms"===e?t.bedrooms.length>0:"moveIn"===e?!!t.moveIn:null!==t.maxBudget}filterLabel(e){const t=this.filters;return"bedrooms"===e?t.bedrooms.length?t.bedrooms.map(e=>{var t,n;return null!==(n=null===(t=md.find(t=>t.value===e))||void 0===t?void 0:t.label)&&void 0!==n?n:`${e} bd`}).join(", "):"Bedrooms":"moveIn"===e?t.moveIn?`Move-in ${ud(t.moveIn)}`:"Move-In Date":null!==t.maxBudget?`Up to ${Br(t.maxBudget)}`:"Budget"}renderFilterPanel(e){var t;const n=this.filters;return"bedrooms"===e?H`<div
|
|
5463
5427
|
class="floor-plan-selector-badges"
|
|
5464
5428
|
role="group"
|
|
5465
5429
|
aria-label="Bedrooms"
|
|
5466
5430
|
>
|
|
5467
|
-
${
|
|
5431
|
+
${md.map(e=>H`<button
|
|
5468
5432
|
class=${Ce({"floor-plan-badge":!0,selected:n.bedrooms.includes(e.value)})}
|
|
5469
5433
|
aria-pressed=${String(n.bedrooms.includes(e.value))}
|
|
5470
5434
|
@click=${()=>this.setFilters({bedrooms:n.bedrooms.includes(e.value)?n.bedrooms.filter(t=>t!==e.value):[...n.bedrooms,e.value].sort()})}
|
|
@@ -5491,7 +5455,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5491
5455
|
@change=${e=>{const t=parseInt(e.target.value,10);this.openFilter=null,this.setFilters({maxBudget:Number.isFinite(t)&&t>0?t:null})}}
|
|
5492
5456
|
/>
|
|
5493
5457
|
</div>`}renderFilters(){const e=this.openFilter;return H`<div class="picker-toolbar" role="group" aria-label="Filters">
|
|
5494
|
-
${
|
|
5458
|
+
${bd.map(t=>H`<scheduler-popover
|
|
5495
5459
|
?open=${e===t}
|
|
5496
5460
|
?inline=${this.mobile}
|
|
5497
5461
|
@popover-close=${()=>{this.openFilter===t&&(this.openFilter=null)}}
|
|
@@ -5509,44 +5473,41 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5509
5473
|
${e===t?this.renderFilterPanel(t):""}
|
|
5510
5474
|
</div>
|
|
5511
5475
|
</scheduler-popover>`)}
|
|
5512
|
-
${
|
|
5476
|
+
${bd.some(e=>this.isFilterActive(e))?H`<button
|
|
5513
5477
|
class="clear-filters"
|
|
5514
|
-
@click=${()=>{this.openFilter=null,this.setFilters(
|
|
5478
|
+
@click=${()=>{this.openFilter=null,this.setFilters(gd)}}
|
|
5515
5479
|
>
|
|
5516
5480
|
Clear all
|
|
5517
5481
|
</button>`:""}
|
|
5518
|
-
</div>`}renderCard(e){var t;const n=this.isSelected(e.building_id),i=
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
tooltip=${`You can choose up to ${this.maxSelectable}`}
|
|
5548
|
-
>${s}</simple-tooltip
|
|
5549
|
-
>`:s}
|
|
5482
|
+
</div>`}renderCard(e){var t;const n=this.isSelected(e.building_id),i=e.next_available,r=!!i&&"extend"===this.variant,o=e.price_from?`${0===e.price_from.bedrooms?"Studio":`${e.price_from.bedrooms} BR`} from ${Br(e.price_from.amount)}`:"";return H`<li>
|
|
5483
|
+
<button
|
|
5484
|
+
class=${Ce({"floorplan-image-card":!0,selected:n,disabled:!e.tourable})}
|
|
5485
|
+
aria-pressed=${String(n)}
|
|
5486
|
+
aria-disabled=${String(!e.tourable)}
|
|
5487
|
+
@click=${()=>this.toggle(e)}
|
|
5488
|
+
>
|
|
5489
|
+
${e.image_url?H`<span class="section-left"
|
|
5490
|
+
><img src=${e.image_url} alt=""
|
|
5491
|
+
/></span>`:""}
|
|
5492
|
+
<span class="section-right">
|
|
5493
|
+
${e.best_match||o||null!==e.distance_mi?H`<span class="card-tags">
|
|
5494
|
+
${e.best_match?H`<span class="floor-plan-badge">Best match</span>`:""}
|
|
5495
|
+
${o?H`<span class="floor-plan-badge">${o}</span>`:""}
|
|
5496
|
+
${null!==e.distance_mi?H`<span class="distance"
|
|
5497
|
+
>${e.distance_mi.toFixed(1)} mi</span
|
|
5498
|
+
>`:""}
|
|
5499
|
+
</span>`:""}
|
|
5500
|
+
<span class="image-card-title">${e.name}</span>
|
|
5501
|
+
<span class="image-card-subtitle">${Xu(e.address)}</span>
|
|
5502
|
+
${e.tourable?i?H`<span class="next-available"
|
|
5503
|
+
>Next available:
|
|
5504
|
+
${ud(i.date)}${"extend"===this.variant?` · ${od(i.time)}`:""}</span
|
|
5505
|
+
>`:"":H`<span class="image-card-subtitle"
|
|
5506
|
+
>${null!==(t=e.unavailable_reason)&&void 0!==t?t:""}</span
|
|
5507
|
+
>`}
|
|
5508
|
+
${r?H`<span class="same-day">Same day</span>`:""}
|
|
5509
|
+
</span>
|
|
5510
|
+
</button>
|
|
5550
5511
|
</li>`}renderList(){return this.loading&&0===this.communities.length?H`<div class="community-grid" role="status">
|
|
5551
5512
|
<span class="sr-only">Loading communities</span>
|
|
5552
5513
|
${[0,1,2,3].map(()=>H`<div class="unit-card-skeleton shimmer"></div>`)}
|
|
@@ -5588,7 +5549,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5588
5549
|
${this.loading?"Loading communities":`${this.communities.length} communities`}
|
|
5589
5550
|
</span>
|
|
5590
5551
|
${this.renderList()}
|
|
5591
|
-
</div>`}};
|
|
5552
|
+
</div>`}};yd.styles=[ia,Me,Yu,qu,p`
|
|
5592
5553
|
/* New layout only: the filter chips and the card grid. */
|
|
5593
5554
|
:host {
|
|
5594
5555
|
display: block;
|
|
@@ -5774,45 +5735,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5774
5735
|
border-top: 1px solid #e7e7e7;
|
|
5775
5736
|
padding-top: 24px;
|
|
5776
5737
|
}
|
|
5777
|
-
`],
|
|
5778
|
-
.tray {
|
|
5779
|
-
gap: 12px;
|
|
5780
|
-
}
|
|
5781
|
-
|
|
5782
|
-
.tray .floor-plan-selector-badges {
|
|
5783
|
-
display: flex;
|
|
5784
|
-
flex-wrap: wrap;
|
|
5785
|
-
gap: 8px;
|
|
5786
|
-
list-style: none;
|
|
5787
|
-
margin: 0;
|
|
5788
|
-
padding: 0;
|
|
5789
|
-
}
|
|
5790
|
-
|
|
5791
|
-
.tray .floor-plan-badge {
|
|
5792
|
-
align-items: center;
|
|
5793
|
-
background: #f3f3f3;
|
|
5794
|
-
border: 1px solid #e7e7e7;
|
|
5795
|
-
border-radius: 16px;
|
|
5796
|
-
display: inline-flex;
|
|
5797
|
-
font-size: 13px;
|
|
5798
|
-
gap: 6px;
|
|
5799
|
-
padding: 6px 12px;
|
|
5800
|
-
white-space: nowrap;
|
|
5801
|
-
}
|
|
5802
|
-
|
|
5803
|
-
.remove {
|
|
5804
|
-
background: none;
|
|
5805
|
-
border: none;
|
|
5806
|
-
cursor: pointer;
|
|
5807
|
-
display: inline-flex;
|
|
5808
|
-
padding: 0;
|
|
5809
|
-
}
|
|
5810
|
-
|
|
5811
|
-
.remove svg {
|
|
5812
|
-
height: 9px;
|
|
5813
|
-
width: 9px;
|
|
5814
|
-
}
|
|
5815
|
-
`,Cd=p`
|
|
5738
|
+
`],fd([pe({type:String})],yd.prototype,"variant",void 0),fd([pe({attribute:!1})],yd.prototype,"load",void 0),fd([pe({attribute:!1})],yd.prototype,"initial",void 0),fd([pe({attribute:!1})],yd.prototype,"selected",void 0),fd([pe({attribute:!1})],yd.prototype,"filters",void 0),fd([fe()],yd.prototype,"openFilter",void 0),fd([fe()],yd.prototype,"communities",void 0),fd([fe()],yd.prototype,"loading",void 0),fd([fe()],yd.prototype,"error",void 0),fd([fe()],yd.prototype,"mobile",void 0),yd=fd([ce("community-picker")],yd);const vd=p`
|
|
5816
5739
|
.stops {
|
|
5817
5740
|
list-style: none;
|
|
5818
5741
|
margin: 0 0 12px;
|
|
@@ -5849,19 +5772,36 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5849
5772
|
font-size: 0.9rem;
|
|
5850
5773
|
margin: 4px 0;
|
|
5851
5774
|
}
|
|
5852
|
-
|
|
5775
|
+
`,wd=(e="currentColor")=>z`<svg
|
|
5776
|
+
aria-hidden="true"
|
|
5777
|
+
focusable="false"
|
|
5778
|
+
width="16"
|
|
5779
|
+
height="16"
|
|
5780
|
+
viewBox="0 0 24 24"
|
|
5781
|
+
fill="none"
|
|
5782
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5783
|
+
>
|
|
5784
|
+
<path
|
|
5785
|
+
d="M4 20h4L19 9l-4-4L4 16v4z M13.5 6.5l4 4"
|
|
5786
|
+
stroke="${e}"
|
|
5787
|
+
stroke-width="1.75"
|
|
5788
|
+
stroke-linecap="round"
|
|
5789
|
+
stroke-linejoin="round"
|
|
5790
|
+
/>
|
|
5791
|
+
</svg>`;var Cd=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};const xd=e=>({displayTime:ad(e),displayTimeZoned:ad(e),dateWithTimeZoneOffset:{datetime:e.slice(0,19),offset:e.slice(19)}}),$d=(e,t,n)=>{e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))};let Sd=class extends ue{constructor(){super(...arguments),this.stops=[],this.communities=new Map,this.problems=[],this.tourTypes=[],this.tourType=null,this.bookableDates=[],this.date=null,this.single=!1,this.canEditCommunities=!1,this.stopsOnly=!1,this.canAddStop=!1,this.loading=!1,this.planned=!1,this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.editingTimeFor=null,this.dragIndex=null,this.dropIndex=null,this.refocusGripOf=null}get offersKnown(){return this.planned&&!this.loading}get selectedTypeOpensLink(){var e;return!!(null===(e=this.tourTypes.find(e=>e.id===this.tourType))||void 0===e?void 0:e.opensLink)}newStopIds(){return this.stops.filter(e=>!e.fixed).map(e=>e.building_id)}name(e){var t,n;return null!==(n=null===(t=this.communities.get(e))||void 0===t?void 0:t.name)&&void 0!==n?n:""}move(e,t){const n=this.newStopIds();if(t<0||t>=n.length||e===t)return;const[i]=n.splice(e,1);n.splice(t,0,i),$d(this,"stops-reorder",{buildingIds:n})}newIndexAt(e){var t;const n=[...this.renderRoot.querySelectorAll(".stop-item[data-index]")],i=null!==(t=n.find(t=>e<t.getBoundingClientRect().bottom))&&void 0!==t?t:n[n.length-1];return i?Number(i.dataset.index):null}updated(e){var t;e.has("stops")&&null!==this.refocusGripOf&&(null===(t=this.renderRoot.querySelector(`.grip[data-building-id="${this.refocusGripOf}"]`))||void 0===t||t.focus(),this.refocusGripOf=null)}endDrag(e){e&&null!==this.dragIndex&&null!==this.dropIndex&&this.move(this.dragIndex,this.dropIndex),this.dragIndex=null,this.dropIndex=null}renderCommunity(){var e,t,n;if(!this.single)return"";const i=null===(e=this.stops.find(e=>!e.fixed))||void 0===e?void 0:e.building_id,r=void 0===i?void 0:this.communities.get(i);return H`<h2 class="journey-header">Community</h2>
|
|
5853
5792
|
<div class="floorplan-image-card community">
|
|
5854
5793
|
<div class="section-right">
|
|
5855
5794
|
<p class="image-card-title">${null!==(t=null==r?void 0:r.name)&&void 0!==t?t:""}</p>
|
|
5856
5795
|
<p class="image-card-subtitle">
|
|
5857
|
-
${
|
|
5796
|
+
${Xu(null!==(n=null==r?void 0:r.address)&&void 0!==n?n:null)}
|
|
5858
5797
|
</p>
|
|
5859
5798
|
</div>
|
|
5860
5799
|
${this.canEditCommunities?H`<button
|
|
5861
|
-
class="
|
|
5862
|
-
|
|
5800
|
+
class="icon-button change-community"
|
|
5801
|
+
aria-label="Change community"
|
|
5802
|
+
@click=${()=>$d(this,"edit-communities",{})}
|
|
5863
5803
|
>
|
|
5864
|
-
|
|
5804
|
+
${wd()}
|
|
5865
5805
|
</button>`:""}
|
|
5866
5806
|
</div> `}renderTourTypes(){return H`<h2 id="tour-type-heading" class="journey-header">Tour Type</h2>
|
|
5867
5807
|
<div
|
|
@@ -5869,17 +5809,17 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5869
5809
|
role="radiogroup"
|
|
5870
5810
|
aria-labelledby="tour-type-heading"
|
|
5871
5811
|
>
|
|
5872
|
-
${this.tourTypes.map(({id:e})=>{const t=e===this.tourType,n=()
|
|
5812
|
+
${this.tourTypes.map(({id:e})=>{const t=e===this.tourType,n=()=>$d(this,"tour-type-change",{tourType:e});return H`<tour-type-option
|
|
5873
5813
|
outlined
|
|
5874
|
-
heading=${
|
|
5875
|
-
subtitle=${
|
|
5814
|
+
heading=${hd[e].heading}
|
|
5815
|
+
subtitle=${hd[e].subtitle}
|
|
5876
5816
|
.primaryColor=${this.primaryColor}
|
|
5877
5817
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
5878
5818
|
?selected=${t}
|
|
5879
5819
|
@click=${n}
|
|
5880
5820
|
@keydown=${e=>{[" ","Enter"].includes(e.key)&&(e.preventDefault(),n())}}
|
|
5881
5821
|
>
|
|
5882
|
-
${
|
|
5822
|
+
${hd[e].icon(t?this.primaryColor:oi)}
|
|
5883
5823
|
</tour-type-option>`})}
|
|
5884
5824
|
</div>
|
|
5885
5825
|
${0===this.tourTypes.length&&this.offersKnown?H`<p class="explanation">
|
|
@@ -5887,20 +5827,20 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5887
5827
|
</p>`:""}`}renderDatePicker(){var e;const t=null!==(e=this.date)&&void 0!==e?e:this.bookableDates[0];return H`<date-picker
|
|
5888
5828
|
outlined
|
|
5889
5829
|
.shownMonth=${null==t?void 0:t.slice(0,7)}
|
|
5890
|
-
.availabilities=${Object.fromEntries(this.bookableDates.map(e=>[e,[
|
|
5891
|
-
.defaultDate=${this.date?
|
|
5892
|
-
@change=${e=>{const t=e.target.selectedDate;t&&
|
|
5830
|
+
.availabilities=${Object.fromEntries(this.bookableDates.map(e=>[e,[ld(e)]]))}
|
|
5831
|
+
.defaultDate=${this.date?ld(this.date):void 0}
|
|
5832
|
+
@change=${e=>{const t=e.target.selectedDate;t&&cd(t)!==this.date&&$d(this,"date-change",{date:cd(t)})}}
|
|
5893
5833
|
></date-picker>`}renderTimePicker(e){const t=[...new Set([e.start,...e.alternatives])].sort();return H`<time-picker
|
|
5894
5834
|
selecteddateexists
|
|
5895
5835
|
.timezone=${e.timezone}
|
|
5896
|
-
.options=${t.map(
|
|
5897
|
-
.defaultSelectedTime=${
|
|
5898
|
-
@change=${t=>{const n=t.target.selectedTime;if(!n)return void(t.target.defaultSelectedTime
|
|
5836
|
+
.options=${t.map(xd)}
|
|
5837
|
+
.defaultSelectedTime=${xd(e.start)}
|
|
5838
|
+
@change=${t=>{const n=t.target.selectedTime;if(!n)return void(t.target.defaultSelectedTime=xd(e.start));const i=`${n.dateWithTimeZoneOffset.datetime}${n.dateWithTimeZoneOffset.offset}`;this.editingTimeFor=null,i!==e.start&&$d(this,"stop-time-change",{buildingId:e.building_id,start:i})}}
|
|
5899
5839
|
></time-picker>`}renderLinkPrompt(){return H`<h2 class="journey-header">Date and Time</h2>
|
|
5900
5840
|
<div id="dateAndTimeMenu">
|
|
5901
5841
|
<button
|
|
5902
5842
|
id="self-guided-redirect-bttn"
|
|
5903
|
-
@click=${()
|
|
5843
|
+
@click=${()=>$d(this,"open-tour-link",{})}
|
|
5904
5844
|
>
|
|
5905
5845
|
View Tour Times
|
|
5906
5846
|
</button>
|
|
@@ -5914,7 +5854,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5914
5854
|
${0===this.bookableDates.length&&this.offersKnown?"No tour times in the next 30 days.":""}
|
|
5915
5855
|
</p>`}
|
|
5916
5856
|
</div>
|
|
5917
|
-
</div>`}renderStop(e,t){var n,i,r,o,a;const s=this.communities.get(e.building_id),l=this.newStopIds(),u=l.indexOf(e.building_id),d=this.editingTimeFor===e.building_id,c=!e.fixed&&l.length>1,h=!e.fixed&&e.alternatives.some(t=>t!==e.start),p=`${
|
|
5857
|
+
</div>`}renderStop(e,t){var n,i,r,o,a;const s=this.communities.get(e.building_id),l=this.newStopIds(),u=l.indexOf(e.building_id),d=this.editingTimeFor===e.building_id,c=!e.fixed&&l.length>1,h=!e.fixed&&e.alternatives.some(t=>t!==e.start),p=`${dd(ed(e.start))} · ${sd(e.start,e.end)}`,f=null!==this.dragIndex;return H`<li
|
|
5918
5858
|
class=${Ce({"stop-item":!0,dragging:f&&this.dragIndex===u,"drop-target":f&&this.dropIndex===u&&this.dragIndex!==u})}
|
|
5919
5859
|
data-index=${e.fixed?V:u}
|
|
5920
5860
|
>
|
|
@@ -5960,7 +5900,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5960
5900
|
${null!==(i=null==s?void 0:s.name)&&void 0!==i?i:""}
|
|
5961
5901
|
</p>
|
|
5962
5902
|
<p class="image-card-subtitle">
|
|
5963
|
-
${
|
|
5903
|
+
${Xu(null!==(r=null==s?void 0:s.address)&&void 0!==r?r:null)}
|
|
5964
5904
|
</p>
|
|
5965
5905
|
${h?H`<button
|
|
5966
5906
|
class="stop-time edit-time"
|
|
@@ -5968,35 +5908,19 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
5968
5908
|
aria-label=${`Change the time at ${null!==(o=null==s?void 0:s.name)&&void 0!==o?o:""}`}
|
|
5969
5909
|
@click=${()=>this.editingTimeFor=d?null:e.building_id}
|
|
5970
5910
|
>
|
|
5971
|
-
${p} ${(
|
|
5972
|
-
aria-hidden="true"
|
|
5973
|
-
focusable="false"
|
|
5974
|
-
width="16"
|
|
5975
|
-
height="16"
|
|
5976
|
-
viewBox="0 0 24 24"
|
|
5977
|
-
fill="none"
|
|
5978
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5979
|
-
>
|
|
5980
|
-
<path
|
|
5981
|
-
d="M4 20h4L19 9l-4-4L4 16v4z M13.5 6.5l4 4"
|
|
5982
|
-
stroke="${e}"
|
|
5983
|
-
stroke-width="1.75"
|
|
5984
|
-
stroke-linecap="round"
|
|
5985
|
-
stroke-linejoin="round"
|
|
5986
|
-
/>
|
|
5987
|
-
</svg>`)()}
|
|
5911
|
+
${p} ${wd()}
|
|
5988
5912
|
</button>`:H`<p class="stop-time">
|
|
5989
5913
|
${p}
|
|
5990
5914
|
${e.fixed?H`<span class="floor-plan-badge selected">Booked</span>`:""}
|
|
5991
5915
|
</p>`}
|
|
5992
5916
|
${d?this.renderTimePicker(e):""}
|
|
5993
5917
|
</div>
|
|
5994
|
-
${!e.fixed&&(l.length>1||this.problems.length>0)?this.renderRemove(e.building_id,null!==(a=null==s?void 0:s.name)&&void 0!==a?a:""):""}
|
|
5918
|
+
${!e.fixed&&(l.length>1||this.problems.length>0||this.stopsOnly)?this.renderRemove(e.building_id,null!==(a=null==s?void 0:s.name)&&void 0!==a?a:""):""}
|
|
5995
5919
|
</div>
|
|
5996
5920
|
</li>`}renderRemove(e,t){return H`<button
|
|
5997
5921
|
class="icon-button remove"
|
|
5998
5922
|
aria-label=${`Remove ${t}`}
|
|
5999
|
-
@click=${()
|
|
5923
|
+
@click=${()=>$d(this,"stop-remove",{buildingId:e})}
|
|
6000
5924
|
>
|
|
6001
5925
|
${((e="currentColor")=>z`<svg
|
|
6002
5926
|
aria-hidden="true"
|
|
@@ -6028,19 +5952,25 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6028
5952
|
${0===this.bookableDates.length&&this.offersKnown?H`<p class="explanation">
|
|
6029
5953
|
These communities have no back-to-back tour times in the next 30
|
|
6030
5954
|
days. Try removing one.
|
|
6031
|
-
</p>`:""}`}
|
|
5955
|
+
</p>`:""}`}renderStops(){return H`<ol class="stops" aria-busy=${String(this.loading)}>
|
|
5956
|
+
${this.stops.map((e,t)=>this.renderStop(e,t))}
|
|
5957
|
+
${this.problems.map(e=>this.renderProblem(e))}
|
|
5958
|
+
</ol>`}renderItinerary(){return H`<h2 class="journey-header">
|
|
6032
5959
|
Your Itinerary ${this.loading?H`<mini-loader></mini-loader>`:""}
|
|
6033
5960
|
</h2>
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
5961
|
+
${this.renderStops()}`}render(){if(this.stopsOnly)return H`${this.renderStops()}
|
|
5962
|
+
${this.canAddStop?H`<button
|
|
5963
|
+
class="floor-plan-badge add-stop"
|
|
5964
|
+
@click=${()=>$d(this,"add-stop",{})}
|
|
5965
|
+
>
|
|
5966
|
+
+ Add another stop
|
|
5967
|
+
</button>`:""}`;const e=!this.selectedTypeOpensLink&&!this.single;return H`<div id="tour-type-menu-outer-container">
|
|
6038
5968
|
${this.renderCommunity()} ${this.renderTourTypes()}
|
|
6039
5969
|
${e?this.renderItineraryDate():""}
|
|
6040
5970
|
</div>
|
|
6041
5971
|
<div id="date-and-time-menu-outer-container">
|
|
6042
5972
|
${this.selectedTypeOpensLink?this.renderLinkPrompt():this.single?this.renderSingleDateAndTime():this.renderItinerary()}
|
|
6043
|
-
</div>`}};
|
|
5973
|
+
</div>`}};Sd.styles=[ia,Me,Yu,qu,vd,p`
|
|
6044
5974
|
/* New layout only: the stop list and the community card's actions. */
|
|
6045
5975
|
:host {
|
|
6046
5976
|
display: contents;
|
|
@@ -6070,6 +6000,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6070
6000
|
margin-top: 20px;
|
|
6071
6001
|
}
|
|
6072
6002
|
|
|
6003
|
+
/* The pencil sits centred on the community card's right. */
|
|
6004
|
+
.icon-button.change-community {
|
|
6005
|
+
align-self: center;
|
|
6006
|
+
}
|
|
6007
|
+
|
|
6008
|
+
.add-stop {
|
|
6009
|
+
width: 100%;
|
|
6010
|
+
}
|
|
6011
|
+
|
|
6073
6012
|
.community {
|
|
6074
6013
|
background: #ffffff;
|
|
6075
6014
|
border: 1px solid #e7e7e7;
|
|
@@ -6139,7 +6078,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6139
6078
|
font-size: 0.7rem;
|
|
6140
6079
|
padding: 2px 8px;
|
|
6141
6080
|
}
|
|
6142
|
-
`],
|
|
6081
|
+
`],Cd([pe({attribute:!1})],Sd.prototype,"stops",void 0),Cd([pe({attribute:!1})],Sd.prototype,"communities",void 0),Cd([pe({attribute:!1})],Sd.prototype,"problems",void 0),Cd([pe({attribute:!1})],Sd.prototype,"tourTypes",void 0),Cd([pe({attribute:!1})],Sd.prototype,"tourType",void 0),Cd([pe({attribute:!1})],Sd.prototype,"bookableDates",void 0),Cd([pe({attribute:!1})],Sd.prototype,"date",void 0),Cd([pe({type:Boolean})],Sd.prototype,"single",void 0),Cd([pe({type:Boolean})],Sd.prototype,"canEditCommunities",void 0),Cd([pe({type:Boolean})],Sd.prototype,"stopsOnly",void 0),Cd([pe({type:Boolean})],Sd.prototype,"canAddStop",void 0),Cd([pe({type:Boolean})],Sd.prototype,"loading",void 0),Cd([pe({type:Boolean})],Sd.prototype,"planned",void 0),Cd([pe({attribute:!1})],Sd.prototype,"primaryColor",void 0),Cd([pe({attribute:!1})],Sd.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Cd([fe()],Sd.prototype,"editingTimeFor",void 0),Cd([fe()],Sd.prototype,"dragIndex",void 0),Cd([fe()],Sd.prototype,"dropIndex",void 0),Sd=Cd([ce("itinerary-editor")],Sd);var kd=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};const Ad={firstName:"",lastName:"",email:"",phone:"",phoneE164:null,phoneCountry:null,layout:null,moveIn:"",notes:"",leadSource:null};let Td=class extends ue{constructor(){super(...arguments),this.values=Ad,this.layoutOptions=[],this.bedroomsRequired=!1,this.leadSources=[],this.showLeadSourceDropdown=!1,this.currentLeadSource="",this.country=null,this.mobile=!1,this.phoneHasBlurred=!1}setValues(e){this.values={...this.values,...e},this.dispatchEvent(new CustomEvent("contact-change",{detail:{values:this.values},bubbles:!0,composed:!0}))}inputClasses(e={}){return Ce({"webchat-input":!0,"webchat-font__desktop":!this.mobile,"webchat-font__mobile":this.mobile,...e})}render(){var e,t;const n=this.values,i=!!n.email&&!Lr(n.email.trim()),r=this.phoneHasBlurred&&!n.phoneE164;return H`<div id="user-info-and-layout-menu-outer-container">
|
|
6143
6082
|
<h2 class="journey-header">Your Information</h2>
|
|
6144
6083
|
<div id="yourInformationMenu">
|
|
6145
6084
|
<div class="namesWrapper">
|
|
@@ -6226,7 +6165,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6226
6165
|
@change=${e=>{var t;const n=null!==(t=e.target.value)&&void 0!==t?t:"";this.setValues({leadSource:n||null}),n&&this.dispatchEvent(new CustomEvent("lead-source-selected",{detail:{leadSource:n},bubbles:!0,composed:!0}))}}
|
|
6227
6166
|
></me-select>`:""}
|
|
6228
6167
|
</div>
|
|
6229
|
-
</div>`}};
|
|
6168
|
+
</div>`}};Td.styles=[ia,Me,p`
|
|
6230
6169
|
:host {
|
|
6231
6170
|
display: contents;
|
|
6232
6171
|
}
|
|
@@ -6241,7 +6180,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6241
6180
|
resize: vertical;
|
|
6242
6181
|
width: 100%;
|
|
6243
6182
|
}
|
|
6244
|
-
`],
|
|
6183
|
+
`],kd([pe({attribute:!1})],Td.prototype,"values",void 0),kd([pe({attribute:!1})],Td.prototype,"layoutOptions",void 0),kd([pe({type:Boolean})],Td.prototype,"bedroomsRequired",void 0),kd([pe({attribute:!1})],Td.prototype,"leadSources",void 0),kd([pe({type:Boolean})],Td.prototype,"showLeadSourceDropdown",void 0),kd([pe({type:String})],Td.prototype,"currentLeadSource",void 0),kd([pe({attribute:!1})],Td.prototype,"country",void 0),kd([pe({type:Boolean})],Td.prototype,"mobile",void 0),kd([fe()],Td.prototype,"phoneHasBlurred",void 0),Td=kd([ce("contact-form")],Td);var Ed=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 _d=class extends ue{constructor(){super(...arguments),this.stops=[],this.tourType=null,this.rescheduled=!1}heading(){const e=this.stops.filter(e=>"failed"!==e.status).length,t=this.rescheduled?"Rescheduled":"Booked";return 1===e?`Your Tour Is ${t}`:`Your Tours Are ${t}`}summary(){const e=this.stops.filter(e=>"failed"!==e.status),t=e[0];if(!t)return"";const n=[1===e.length?t.community.name:"",this.tourType?hd[this.tourType].heading:""];if(t.start){const i=t.community.timezone?` ${pr(t.community.timezone)}`:"";n.push(1===e.length?`${dd(ed(t.start))} at ${ad(t.start)}${i}`:dd(ed(t.start)))}return n.filter(Boolean).join(" · ")}renderStops(){return this.stops.length<2?"":H`<ol class="stops">
|
|
6245
6184
|
${this.stops.map((e,t)=>{var n;return H`<li>
|
|
6246
6185
|
${t>0?H`<p class="image-card-subtitle leg">
|
|
6247
6186
|
${null!==e.distanceFromPrevMi?H`${e.distanceFromPrevMi.toFixed(1)} mi<span
|
|
@@ -6258,14 +6197,14 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6258
6197
|
${e.community.name}
|
|
6259
6198
|
</p>
|
|
6260
6199
|
<p class="image-card-subtitle">
|
|
6261
|
-
${
|
|
6200
|
+
${Xu(e.community.address)}
|
|
6262
6201
|
</p>
|
|
6263
6202
|
${"failed"===e.status?H`<p class="error-message">
|
|
6264
6203
|
<span class="sr-only">Not booked:</span>
|
|
6265
6204
|
${null!==(n=e.error)&&void 0!==n?n:"This tour couldn't be booked."}
|
|
6266
6205
|
</p>`:e.start&&e.end?H`<p class="stop-time">
|
|
6267
|
-
${
|
|
6268
|
-
${
|
|
6206
|
+
${dd(ed(e.start))} ·
|
|
6207
|
+
${sd(e.start,e.end)}
|
|
6269
6208
|
</p>`:""}
|
|
6270
6209
|
</div>
|
|
6271
6210
|
</div>
|
|
@@ -6301,7 +6240,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6301
6240
|
</p>
|
|
6302
6241
|
${this.renderStops()}
|
|
6303
6242
|
</div>
|
|
6304
|
-
<slot></slot>`}};
|
|
6243
|
+
<slot></slot>`}};_d.styles=[ia,Me,qu,vd,p`
|
|
6305
6244
|
/* New layout only: the header and the list of stops. */
|
|
6306
6245
|
:host {
|
|
6307
6246
|
display: block;
|
|
@@ -6348,7 +6287,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6348
6287
|
align-items: center;
|
|
6349
6288
|
min-width: 0;
|
|
6350
6289
|
}
|
|
6351
|
-
`],
|
|
6290
|
+
`],Ed([pe({attribute:!1})],_d.prototype,"stops",void 0),Ed([pe({attribute:!1})],_d.prototype,"tourType",void 0),Ed([pe({type:Boolean})],_d.prototype,"rescheduled",void 0),_d=Ed([ce("booking-confirmation")],_d);var Od=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 Pd=class extends ue{constructor(){super(...arguments),this.size=64,this.spinSpeed=.8}updated(){this.style.setProperty("--mega-loader-size",`${this.size}px`),this.style.setProperty("--mega-loader-spin-speed",`${this.spinSpeed}s`)}render(){return H`<div class="spinner"></div>`}};Pd.styles=p`
|
|
6352
6291
|
.spinner {
|
|
6353
6292
|
border: 4px solid rgba(0, 0, 0, 0.2);
|
|
6354
6293
|
border-top: 4px solid var(--primary-color, #c057ff);
|
|
@@ -6366,9 +6305,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6366
6305
|
transform: rotate(360deg);
|
|
6367
6306
|
}
|
|
6368
6307
|
}
|
|
6369
|
-
`,
|
|
6308
|
+
`,Od([pe({type:Number})],Pd.prototype,"size",void 0),Od([pe({type:Number})],Pd.prototype,"spinSpeed",void 0),Pd=Od([ce("mega-loader")],Pd);const Id=(e="white")=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="5" height="8" viewBox="0 0 5 8" fill="none">
|
|
6370
6309
|
<path d="M3.68188 7L0.681885 4L3.68188 1" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6371
|
-
</svg>`,Md=e=>{const t=Object.fromEntries(e.buildingIds.slice(1).filter(t=>e.laterStarts[t]).map(t=>[String(t),e.laterStarts[t]])),n=e.existingEventIds[e.existingEventIds.length-1];return{building_ids:e.buildingIds,tour_type:e.tourType,date:e.date,start_time:e.firstStart,stop_starts:t,fixed_first:void 0===n?null:{calendar_event_id:n}}},Dd=({orgSlug:e,selectedLeadSource:t,currentLeadSource:n,touchpoints:i,search:r,referrer:o,googleReferral:a})=>{var s,l,u;const d=t||n||null,c=la(e);return{lead_sources:[...new Set(d?[d,c]:[c])],lead_sources_with_timestamps:i.map(e=>_r({...e})),query_params:Object.fromEntries(new URLSearchParams(r).entries()),referrer:o,google_rwg_token:null!==(s=null==a?void 0:a.rwgToken)&&void 0!==s?s:null,google_referral_building_id:null!==(l=null==a?void 0:a.buildingId)&&void 0!==l?l:null,google_environment:null!==(u=null==a?void 0:a.environment)&&void 0!==u?u:null}},Ld=e=>0===e?0:Math.floor(e/10),Rd=["Studio","One bedroom","Two bedroom","Three bedroom","Four bedroom","Five bedroom"],Bd=e=>{var t;return{value:10*e,label:null!==(t=Rd[e])&&void 0!==t?t:`${e} bedroom`}};var Ud=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};const jd={bedrooms:[],moveIn:null,maxBudget:null},Fd={"escorted-tour":"WITH_AGENT","self-guided-tour":"SELF_GUIDED","live-virtual-tour":"VIRTUAL_SHOWING"};let Hd=class extends ue{constructor(){super(...arguments),this.orgSlug="",this.buildingSlug="",this.buildingId=0,this.orgId=0,this.buildingName="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.tourTypeOptions=[],this.layoutOptions=[],this.currentLeadSource="",this.leadSources=[],this.featureFlagShowDropdown="",this.bedroomPreferenceRequired=!1,this.orgLegalName="",this.country=null,this.buildingState=null,this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.compactDesign=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.getSessionToken=()=>null,this.api=null,this.step="loading",this.loadError=null,this.mobile=Ir(),this.group=null,this.communities=new Map,this.selectedIds=[],this.picks=[],this.existingEventIds=[],this.tourType="escorted-tour",this.linkTourType=null,this.date=null,this.firstStart=null,this.laterStarts={},this.plan=null,this.planLoading=!1,this.planError=null,this.notice=null,this.contact=Td,this.preferences=jd,this.submitting=!1,this.bookingError=null,this.reschedulePrompt=null,this.confirmed=[],this.bookedTourType=null,this.bookedEventIds=[],this.extendInitial=null,this.extendFrom=null,this.extending=!1,this.rescheduled=!1,this.rescheduleCanceled=!1,this.planRequestId=0,this.idempotency=null,this.onKeydown=e=>{du(e,this),"Escape"!==e.key||e.defaultPrevented||e.isComposing||(e.stopPropagation(),this.close())},this.loadSelectCommunities=e=>this.client.getCommunities(e).then(this.rememberPage),this.loadExtendCommunities=e=>{const t=this.extendFrom;return t?this.client.getCommunities({...e,extend:t}).then(this.rememberPage):Promise.reject(new Error("No booking to extend"))},this.rememberPage=e=>(this.remember(e.communities),e),this.onFiltersChange=e=>{this.preferences=e.detail.filters},this.onPicksChange=e=>{this.picks=e.detail.communities}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("aria-modal")||this.setAttribute("aria-modal","true"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Schedule a Tour"),this.cleanupMobileListener=Nr(e=>this.mobile=e),this.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){var e;null===(e=this.cleanupMobileListener)||void 0===e||e.call(this),this.removeEventListener("keydown",this.onKeydown),super.disconnectedCallback()}close(){var e;null===(e=this.onCloseClicked)||void 0===e||e.call(this,new MouseEvent("click"))}get client(){return this.api||(this.api=ed({orgSlug:this.orgSlug,buildingSlug:this.buildingSlug,getSessionToken:()=>this.getSessionToken()})),this.api}willUpdate(e){if(e.has("primaryColor")||e.has("foregroundColorOnPrimaryBackgroundColor")){const e=this.primaryColor||Zn;this.style.setProperty("--primary-color",e),this.style.setProperty("--action-confirm-button-background",e),this.style.setProperty("--action-confirm-button-color",this.foregroundColorOnPrimaryBackgroundColor),this.style.setProperty("--on-primary-color",this.foregroundColorOnPrimaryBackgroundColor)}}firstUpdated(){this.start()}updated(e){var t;e.has("step")&&void 0===e.get("step")?lu(this):((e.has("step")||e.has("reschedulePrompt")||e.has("rescheduleCanceled"))&&(this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.focus({preventScroll:!0})),e.has("notice")&&this.notice&&(null===(t=this.renderRoot.querySelector(".notice"))||void 0===t||t.scrollIntoView({block:"nearest"})))}async start(){this.step="loading",this.loadError=null;try{const e=await this.client.getCommunities(jd);if(this.group=e,this.remember(e.communities),e.anchor.is_general_building)return void this.goTo("pick");this.rememberOne({building_id:e.anchor.building_id,name:e.anchor.name,address:null,timezone:null}),this.startSchedule([e.anchor.building_id])}catch(e){if(e instanceof Ju&&"NOT_IN_GROUP"===e.code)return this.group=null,this.rememberOne({building_id:this.buildingId,name:this.buildingName,address:null,timezone:null}),void this.startSchedule([this.buildingId]);this.loadError=e.message,this.step="error",this.log("TOUR_SCHEDULER_V2_LOAD_ERROR",e)}}goTo(e){this.step=e,"pick"===e?this.picks=this.selectedIds.map(e=>this.communities.get(e)).filter(e=>!!e):"booked"===e&&(this.picks=[]),_o("tourSchedulerStepViewed",{step:"schedule"===e&&this.extending?"extend-schedule":e,buildingId:this.buildingId})}remember(e){const t=new Map(this.communities);e.forEach(e=>t.set(e.building_id,Xu(e))),this.communities=t}rememberOne(e){const t=this.communities.get(e.building_id);(null==t?void 0:t.address)||(this.communities=new Map(this.communities).set(e.building_id,e))}startSchedule(e){this.selectedIds=e,this.plan=null,this.firstStart=null,this.laterStarts={},this.linkTourType=null,this.notice=null,this.bookingError=null,this.reschedulePrompt=null,this.goTo("schedule"),this.runPlan()}choice(){var e;return{buildingIds:this.selectedIds,tourType:this.tourType,date:null!==(e=this.date)&&void 0!==e?e:hd(new Date),firstStart:this.firstStart,laterStarts:this.laterStarts,existingEventIds:this.existingEventIds}}async runPlan(e=!1){if(0===this.selectedIds.length)return;const t=++this.planRequestId;this.planLoading=!0,this.planError=null,e||(this.notice=null);try{let e=this.choice(),n=await this.client.plan(Md(e));for(let i=0;i<2&&t===this.planRequestId;i++){if(n.tour_types.includes(e.tourType)){if(!(n.bookable_dates.length>0)||n.bookable_dates.includes(e.date))break;this.date=n.bookable_dates[0]}else{if(0===n.tour_types.length)break;this.tourType=n.tour_types[0]}this.firstStart=null,this.laterStarts={},e=this.choice(),n=await this.client.plan(Md(e))}if(t!==this.planRequestId)return;this.plan=n,n.bookable_dates.includes(e.date)&&(this.date=e.date),n.changed.length>0&&(this.notice=n.changed.map(e=>e.text).join(" "))}catch(e){if(t!==this.planRequestId)return;this.planError=e.message,this.log("TOUR_SCHEDULER_V2_PLAN_ERROR",e)}finally{t===this.planRequestId&&(this.planLoading=!1)}}tourLink(e){if(!this.tourTypeOptions.map(e=>e.value).includes(Fd[e]))return null;const[t,n]={"self-guided-tour":[this.sgtUrl,this.selfGuidedToursTypeOffered],"escorted-tour":[this.escortedToursLink,this.escortedToursTypeOffered],"live-virtual-tour":[this.virtualToursLink,this.virtualToursTypeOffered]}[e];return t&&ba(0,n)?t:null}get bookingOwnBuildingAlone(){return 0===this.existingEventIds.length&&1===this.selectedIds.length&&this.selectedIds[0]===this.buildingId}openTourLink(e){const t=this.tourLink(e);if(!t)return;const n="self-guided-tour"===e&&52===this.orgId?So(t,$o()):t;window.open(n,"_blank")}tourTypeChoices(){var e,t;const n=null!==(t=null===(e=this.plan)||void 0===e?void 0:e.tour_types)&&void 0!==t?t:[];return fd.filter(e=>n.includes(e)||this.bookingOwnBuildingAlone&&!!this.tourLink(e)).map(e=>({id:e,opensLink:this.bookingOwnBuildingAlone&&!!this.tourLink(e)}))}get shownTourType(){var e;return this.linkTourType?this.linkTourType:(null===(e=this.plan)||void 0===e?void 0:e.tour_types.includes(this.tourType))?this.tourType:null}get activeLinkType(){const e=this.shownTourType;return e&&this.bookingOwnBuildingAlone&&this.tourLink(e)?e:null}onTourType(e){if(_o("tourTypeSelected",{tourType:e,buildingId:this.buildingId}),this.bookingOwnBuildingAlone&&this.tourLink(e))return this.linkTourType=e,void this.openTourLink(e);this.linkTourType=null,e!==this.tourType&&(this.tourType=e,this.firstStart=null,this.laterStarts={},this.runPlan())}onDate(e){e!==this.date&&(_o("tourDateSelected",{tourType:this.tourType,buildingId:this.buildingId}),this.date=e,this.firstStart=null,this.laterStarts={},this.runPlan())}onStopTime(e,t){const n=this.selectedIds.indexOf(e);if(n<0)return;_o("tourTimeSelected",{tourType:this.tourType,buildingId:this.buildingId,stopNumber:n+1});const i=this.selectedIds.slice(1,n);0===n?(this.firstStart=nd(t),this.laterStarts={}):this.laterStarts={...Object.fromEntries(i.filter(e=>this.laterStarts[e]).map(e=>[e,this.laterStarts[e]])),[e]:t},this.runPlan()}onReorder(e){_o("tourStopsReordered",{buildingId:this.buildingId,stopCount:e.length});const t=this.selectedIds.filter(t=>!e.includes(t));this.selectedIds=[...e,...t],this.firstStart=null,this.laterStarts={},this.runPlan()}onRemove(e){const t=this.selectedIds.filter(t=>t!==e);if(_o("tourStopRemoved",{buildingId:this.buildingId,stopCount:t.length}),0===t.length)return this.selectedIds=[],this.plan=null,void this.goTo(this.extending?"booked":"pick");this.selectedIds[0]===e&&(this.firstStart=null),this.selectedIds=t,this.laterStarts={},this.runPlan()}onEditCommunities(){this.goTo("pick")}onCommunitiesSelected(e,t){var n;if(e.forEach(e=>this.rememberOne(e)),_o("tourCommunitiesSelected",{buildingId:this.buildingId,count:e.length,mode:t}),this.extending="extend"===t,this.extending){this.existingEventIds=this.bookedEventIds,this.tourType=null!==(n=this.bookedTourType)&&void 0!==n?n:this.tourType;const e=this.confirmed.filter(e=>e.start).slice(-1)[0];this.date=(null==e?void 0:e.start)?td(e.start):this.date}else this.existingEventIds=[];this.startSchedule(e.map(e=>e.building_id))}async submit(e=!1){var t,n,i,r,o,a;const s=this.plan;if(!s||this.submitting)return;const l=this.choice(),u=this.formValues,d=this.showLeadSourceDropdown()?u.leadSource:null,c=(({choice:e,plan:t,contact:n,attribution:i,conversationTrackingId:r,cancelExistingTours:o})=>({tour_type:e.tourType,stops:[...e.existingEventIds.map(e=>({existing_calendar_event_id:e})),...t.stops.filter(e=>!e.fixed).map(e=>({building_id:e.building_id,start:e.start}))],...n?{contact:n}:{},lead_sources:i,conversation_tracking_id:r,cancel_existing_tours:o}))({choice:l,plan:s,contact:this.extending?null:{first_name:u.firstName.trim(),last_name:u.lastName.trim(),email:u.email.trim(),phone_e164:null!==(t=u.phoneE164)&&void 0!==t?t:"",bedrooms:null===u.layout?[]:[Ld(u.layout)],move_in:u.moveIn||null,notes:u.notes.trim()},attribution:Dd({orgSlug:this.orgSlug,selectedLeadSource:d,currentLeadSource:this.currentLeadSource,touchpoints:null!==(i=null===(n=this.leadSourceMultitouchClient)||void 0===n?void 0:n.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:d||null}))&&void 0!==i?i:[],search:window.location.search,referrer:document.referrer,googleReferral:ns()}),conversationTrackingId:null!==(o=null===(r=this.leadSourceClient)||void 0===r?void 0:r.chatId)&&void 0!==o?o:null,cancelExistingTours:e}),h=JSON.stringify({tour_type:c.tour_type,stops:c.stops,contact:c.contact,cancel_existing_tours:c.cancel_existing_tours});(null===(a=this.idempotency)||void 0===a?void 0:a.booking)!==h&&(this.idempotency={booking:h,key:gs()}),_o("scheduleTourSubmitted",{tourType:l.tourType,stopCount:c.stops.length,buildingId:this.buildingId}),this.submitting=!0,this.bookingError=null;try{const t=await this.client.book(c,this.idempotency.key);this.idempotency=null,this.rescheduled=e,this.onBooked(t,l.tourType,s)}catch(e){this.onBookingError(e)}finally{this.submitting=!1}}onBooked(e,t,n){var i,r,o,a,s,l;if(this.reschedulePrompt=null,e.stops.every(e=>"failed"===e.status))return this.notice=null!==(o=null===(r=null===(i=e.stops.find(e=>e.error))||void 0===i?void 0:i.error)||void 0===r?void 0:r.message)&&void 0!==o?o:"We couldn't book your tour. Please pick another time.",this.log("TOUR_SCHEDULER_V2_BOOKING_ERROR",e.stops),void this.runPlan(!0);const u=new Map(n.stops.map(e=>[e.building_id,e]));this.confirmed=e.stops.map(e=>{var t,n,i,r,o,a,s,l;const d=null!==(t=this.communities.get(e.building_id))&&void 0!==t?t:{building_id:e.building_id,name:"",address:null,timezone:null},c=null!==(r=null!==(n=d.timezone)&&void 0!==n?n:null===(i=u.get(e.building_id))||void 0===i?void 0:i.timezone)&&void 0!==r?r:null;return{community:{...d,timezone:c},start:e.start,end:e.end,status:e.status,error:null!==(a=null===(o=e.error)||void 0===o?void 0:o.message)&&void 0!==a?a:null,distanceFromPrevMi:null!==(l=null===(s=u.get(e.building_id))||void 0===s?void 0:s.distance_from_prev_mi)&&void 0!==l?l:null}});const d=e.stops.filter(e=>"failed"!==e.status&&null!==e.calendar_event_id);this.bookedEventIds=d.map(e=>e.calendar_event_id),this.bookedTourType=t,this.extending=!1,this.extendInitial=null,_o("tourItineraryBooked",{buildingId:this.buildingId,stopCount:d.length,failedCount:e.stops.length-d.length}),d.length>0&&(null===(a=this.leadSourceClient)||void 0===a||a.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(s=this.leadSourceClient)||void 0===s||s.resetLeadSource(),null===(l=this.leadSourceMultitouchClient)||void 0===l||l.resetLeadSourceTouchpoints()),this.goTo("booked"),this.loadExtension()}extendQueryFromBooking(){const e=this.confirmed.filter(e=>"failed"!==e.status),t=e[e.length-1];return(null==t?void 0:t.end)&&this.bookedTourType?{availableAfter:t.end,tourType:this.bookedTourType,nearBuildingId:t.community.building_id,excludeBuildingIds:e.map(e=>e.community.building_id)}:null}stopsRemaining(){return 3-this.bookedEventIds.length}async loadExtension(){const e=this.extendQueryFromBooking();this.extendFrom=e;const t=this.stopsRemaining();if(this.group&&e&&!(t<=0))try{const n=await this.client.getCommunities({...jd,extend:e});this.remember(n.communities),n.communities.some(e=>e.tourable)&&(this.extendInitial=n,_o("tourExtensionOffered",{buildingId:this.buildingId,stopsRemaining:t}))}catch(e){this.log("TOUR_SCHEDULER_V2_EXTEND_LOAD_ERROR",e)}}onBookingError(e){const t=e instanceof Ju?e:new Ju(0,null,"Something went wrong. Please try again.");if("EXISTING_TOUR"!==t.code){if(this.reschedulePrompt=null,"SLOT_TAKEN"===t.code)return this.notice=t.message,void this.runPlan(!0);this.bookingError=t.message,this.log("TOUR_SCHEDULER_V2_BOOKING_ERROR",e)}else this.reschedulePrompt=t.message}showLeadSourceDropdown(){return this.featureFlagShowDropdown===bo.always||this.featureFlagShowDropdown===bo.onAttributionFailure&&0===this.currentLeadSource.length}log(e,t){ra({logTitle:e,logData:{error:t},logType:ia.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:t})}backStep(){return this.rescheduleCanceled?null:"schedule"===this.step?this.extending?"booked":this.group?"pick":null:"pick"===this.step&&this.group&&!this.group.anchor.is_general_building&&this.plan&&this.selectedIds.length>0?"schedule":null}problems(){var e,t;return null!==(t=null===(e=this.plan)||void 0===e?void 0:e.unchainable)&&void 0!==t?t:[]}isMultiStop(){return this.selectedIds.length>1||this.existingEventIds.length>0}canSubmit(){const e=this.plan;return!!e&&!this.planLoading&&!this.planError&&e.stops.some(e=>!e.fixed)&&0===e.unchainable.length&&null===this.activeLinkType&&(this.extending||(t=this.formValues,n=this.bedroomsRequired,(!!t.firstName.trim()||!!t.lastName.trim())&&Lr(t.email.trim())&&!!t.phoneE164&&(!n||null!==t.layout)));var t,n}get bedroomOptions(){const e=new Set(this.selectedIds.flatMap(e=>{var t,n;return null!==(n=null===(t=this.communities.get(e))||void 0===t?void 0:t.bedrooms)&&void 0!==n?n:[]}));return e.size>0?[...e].sort((e,t)=>e-t).map(Bd):this.layoutOptions}get preferredLayout(){const e=this.bedroomOptions.filter(e=>this.preferences.bedrooms.includes(Ld(e.value)));return 1===e.length?e[0].value:null}get formValues(){var e;return{...this.contact,layout:this.preferredLayout,moveIn:null!==(e=this.preferences.moveIn)&&void 0!==e?e:""}}onContactChange(e){this.contact=e;const t=this.formValues;e.layout!==t.layout&&(this.preferences={...this.preferences,bedrooms:null===e.layout?[]:[Ld(e.layout)]}),e.moveIn!==t.moveIn&&(this.preferences={...this.preferences,moveIn:e.moveIn||null})}get bedroomsRequired(){return this.bedroomPreferenceRequired&&this.bedroomOptions.length>0}disclaimer(){return Yo({buildingName:this.buildingName,phoneNumberInput:this.contact.phone,emailInput:this.contact.email,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,buildingState:this.buildingState,clickingButtonText:"schedule tour"})}container(e){return H`<div
|
|
6310
|
+
</svg>`,Nd=e=>{const t=Object.fromEntries(e.buildingIds.slice(1).filter(t=>e.laterStarts[t]).map(t=>[String(t),e.laterStarts[t]])),n=e.existingEventIds[e.existingEventIds.length-1];return{building_ids:e.buildingIds,tour_type:e.tourType,date:e.date,start_time:e.firstStart,stop_starts:t,fixed_first:void 0===n?null:{calendar_event_id:n}}},Md=({orgSlug:e,selectedLeadSource:t,currentLeadSource:n,touchpoints:i,search:r,referrer:o,googleReferral:a})=>{var s,l,u;const d=t||n||null,c=da(e);return{lead_sources:[...new Set(d?[d,c]:[c])],lead_sources_with_timestamps:i.map(e=>_r({...e})),query_params:Object.fromEntries(new URLSearchParams(r).entries()),referrer:o,google_rwg_token:null!==(s=null==a?void 0:a.rwgToken)&&void 0!==s?s:null,google_referral_building_id:null!==(l=null==a?void 0:a.buildingId)&&void 0!==l?l:null,google_environment:null!==(u=null==a?void 0:a.environment)&&void 0!==u?u:null}},Dd=e=>0===e?0:Math.floor(e/10),Ld=["Studio","One bedroom","Two bedroom","Three bedroom","Four bedroom","Five bedroom"],Rd=e=>{var t;return{value:10*e,label:null!==(t=Ld[e])&&void 0!==t?t:`${e} bedroom`}};var Bd=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};const Ud={bedrooms:[],moveIn:null,maxBudget:null},jd={"escorted-tour":"WITH_AGENT","self-guided-tour":"SELF_GUIDED","live-virtual-tour":"VIRTUAL_SHOWING"};let Fd=class extends ue{constructor(){super(...arguments),this.orgSlug="",this.buildingSlug="",this.buildingId=0,this.orgId=0,this.buildingName="",this.sgtUrl="",this.selfGuidedToursTypeOffered="",this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.tourTypeOptions=[],this.layoutOptions=[],this.currentLeadSource="",this.leadSources=[],this.featureFlagShowDropdown="",this.bedroomPreferenceRequired=!1,this.orgLegalName="",this.country=null,this.buildingState=null,this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.compactDesign=!1,this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this.getSessionToken=()=>null,this.api=null,this.step="loading",this.loadError=null,this.mobile=Ir(),this.group=null,this.communities=new Map,this.selectedIds=[],this.picks=[],this.addingStop=!1,this.existingEventIds=[],this.tourType="escorted-tour",this.linkTourType=null,this.date=null,this.firstStart=null,this.laterStarts={},this.plan=null,this.planLoading=!1,this.planError=null,this.notice=null,this.contact=Ad,this.preferences=Ud,this.submitting=!1,this.bookingError=null,this.reschedulePrompt=null,this.confirmed=[],this.bookedTourType=null,this.bookedEventIds=[],this.extendInitial=null,this.extendFrom=null,this.extending=!1,this.rescheduled=!1,this.rescheduleCanceled=!1,this.planRequestId=0,this.idempotency=null,this.onKeydown=e=>{cu(e,this),"Escape"!==e.key||e.defaultPrevented||e.isComposing||(e.stopPropagation(),this.close())},this.loadSelectCommunities=e=>this.client.getCommunities(e).then(this.rememberPage),this.loadExtendCommunities=e=>{const t=this.extendFrom;return t?this.client.getCommunities({...e,extend:t}).then(this.rememberPage):Promise.reject(new Error("No booking to extend"))},this.rememberPage=e=>(this.remember(e.communities),e),this.loadAddStopCommunities=e=>{const t=this.extendQueryFromPlan();return t?this.client.getCommunities({...e,extend:t}).then(this.rememberPage):Promise.reject(new Error("No stop to add after"))},this.onFiltersChange=e=>{this.preferences=e.detail.filters}}connectedCallback(){super.connectedCallback(),this.hasAttribute("role")||this.setAttribute("role","dialog"),this.hasAttribute("aria-modal")||this.setAttribute("aria-modal","true"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Schedule a Tour"),this.cleanupMobileListener=Nr(e=>this.mobile=e),this.addEventListener("keydown",this.onKeydown)}disconnectedCallback(){var e;null===(e=this.cleanupMobileListener)||void 0===e||e.call(this),this.removeEventListener("keydown",this.onKeydown),super.disconnectedCallback()}close(){var e;null===(e=this.onCloseClicked)||void 0===e||e.call(this,new MouseEvent("click"))}get client(){return this.api||(this.api=Ju({orgSlug:this.orgSlug,buildingSlug:this.buildingSlug,getSessionToken:()=>this.getSessionToken()})),this.api}willUpdate(e){if(e.has("primaryColor")||e.has("foregroundColorOnPrimaryBackgroundColor")){const e=this.primaryColor||Zn;this.style.setProperty("--primary-color",e),this.style.setProperty("--action-confirm-button-background",e),this.style.setProperty("--action-confirm-button-color",this.foregroundColorOnPrimaryBackgroundColor),this.style.setProperty("--on-primary-color",this.foregroundColorOnPrimaryBackgroundColor)}}firstUpdated(){this.start()}updated(e){var t;e.has("step")&&void 0===e.get("step")?uu(this):((e.has("step")||e.has("reschedulePrompt")||e.has("rescheduleCanceled"))&&(this.hasAttribute("tabindex")||this.setAttribute("tabindex","-1"),this.focus({preventScroll:!0})),e.has("notice")&&this.notice&&(null===(t=this.renderRoot.querySelector(".notice"))||void 0===t||t.scrollIntoView({block:"nearest"})))}async start(){this.step="loading",this.loadError=null;try{const e=await this.client.getCommunities(Ud);if(this.group=e,this.remember(e.communities),e.anchor.is_general_building)return void this.goTo("pick");this.rememberOne({building_id:e.anchor.building_id,name:e.anchor.name,address:null,timezone:null}),this.startSchedule([e.anchor.building_id])}catch(e){if(e instanceof Zu&&"NOT_IN_GROUP"===e.code)return this.group=null,this.rememberOne({building_id:this.buildingId,name:this.buildingName,address:null,timezone:null}),void this.startSchedule([this.buildingId]);this.loadError=e.message,this.step="error",this.log("TOUR_SCHEDULER_V2_LOAD_ERROR",e)}}goTo(e){this.step=e,"pick"===e?this.picks=this.selectedIds.map(e=>this.communities.get(e)).filter(e=>!!e):"booked"===e&&(this.picks=[]),Lo("tourSchedulerStepViewed",{step:"schedule"===e&&this.extending?"extend-schedule":e,buildingId:this.buildingId})}remember(e){const t=new Map(this.communities);e.forEach(e=>t.set(e.building_id,Ku(e))),this.communities=t}rememberOne(e){const t=this.communities.get(e.building_id);(null==t?void 0:t.address)||(this.communities=new Map(this.communities).set(e.building_id,e))}startSchedule(e){this.selectedIds=e,this.plan=null,this.firstStart=null,this.laterStarts={},this.linkTourType=null,this.notice=null,this.bookingError=null,this.reschedulePrompt=null,this.goTo("schedule"),this.runPlan()}choice(){var e;return{buildingIds:this.selectedIds,tourType:this.tourType,date:null!==(e=this.date)&&void 0!==e?e:cd(new Date),firstStart:this.firstStart,laterStarts:this.laterStarts,existingEventIds:this.existingEventIds}}async runPlan(e=!1){if(this.addingStop=!1,0===this.selectedIds.length)return;const t=++this.planRequestId;this.planLoading=!0,this.planError=null,e||(this.notice=null);try{let e=this.choice(),n=await this.client.plan(Nd(e));for(let i=0;i<2&&t===this.planRequestId;i++){if(n.tour_types.includes(e.tourType)){if(!(n.bookable_dates.length>0)||n.bookable_dates.includes(e.date))break;this.date=n.bookable_dates[0]}else{if(0===n.tour_types.length)break;this.tourType=n.tour_types[0]}this.firstStart=null,this.laterStarts={},e=this.choice(),n=await this.client.plan(Nd(e))}if(t!==this.planRequestId)return;this.plan=n,n.bookable_dates.includes(e.date)&&(this.date=e.date),n.changed.length>0&&(this.notice=n.changed.map(e=>e.text).join(" "))}catch(e){if(t!==this.planRequestId)return;this.planError=e.message,this.log("TOUR_SCHEDULER_V2_PLAN_ERROR",e)}finally{t===this.planRequestId&&(this.planLoading=!1)}}tourLink(e){if(!this.tourTypeOptions.map(e=>e.value).includes(jd[e]))return null;const[t,n]={"self-guided-tour":[this.sgtUrl,this.selfGuidedToursTypeOffered],"escorted-tour":[this.escortedToursLink,this.escortedToursTypeOffered],"live-virtual-tour":[this.virtualToursLink,this.virtualToursTypeOffered]}[e];return t&&va(0,n)?t:null}get bookingOwnBuildingAlone(){return 0===this.existingEventIds.length&&1===this.selectedIds.length&&this.selectedIds[0]===this.buildingId}openTourLink(e){const t=this.tourLink(e);if(!t)return;const n="self-guided-tour"===e&&52===this.orgId?Po(t,Oo()):t;window.open(n,"_blank")}tourTypeChoices(){var e,t;const n=null!==(t=null===(e=this.plan)||void 0===e?void 0:e.tour_types)&&void 0!==t?t:[];return pd.filter(e=>n.includes(e)||this.bookingOwnBuildingAlone&&!!this.tourLink(e)).map(e=>({id:e,opensLink:this.bookingOwnBuildingAlone&&!!this.tourLink(e)}))}get shownTourType(){var e;return this.linkTourType?this.linkTourType:(null===(e=this.plan)||void 0===e?void 0:e.tour_types.includes(this.tourType))?this.tourType:null}get activeLinkType(){const e=this.shownTourType;return e&&this.bookingOwnBuildingAlone&&this.tourLink(e)?e:null}onTourType(e){if(Lo("tourTypeSelected",{tourType:e,buildingId:this.buildingId}),this.bookingOwnBuildingAlone&&this.tourLink(e))return this.linkTourType=e,void this.openTourLink(e);this.linkTourType=null,e!==this.tourType&&(this.tourType=e,this.firstStart=null,this.laterStarts={},this.runPlan())}onDate(e){e!==this.date&&(Lo("tourDateSelected",{tourType:this.tourType,buildingId:this.buildingId}),this.date=e,this.firstStart=null,this.laterStarts={},this.runPlan())}onStopTime(e,t){const n=this.selectedIds.indexOf(e);if(n<0)return;Lo("tourTimeSelected",{tourType:this.tourType,buildingId:this.buildingId,stopNumber:n+1});const i=this.selectedIds.slice(1,n);0===n?(this.firstStart=td(t),this.laterStarts={}):this.laterStarts={...Object.fromEntries(i.filter(e=>this.laterStarts[e]).map(e=>[e,this.laterStarts[e]])),[e]:t},this.runPlan()}onReorder(e){Lo("tourStopsReordered",{buildingId:this.buildingId,stopCount:e.length});const t=this.selectedIds.filter(t=>!e.includes(t));this.selectedIds=[...e,...t],this.firstStart=null,this.laterStarts={},this.runPlan()}onRemove(e){const t=this.selectedIds.filter(t=>t!==e);if(Lo("tourStopRemoved",{buildingId:this.buildingId,stopCount:t.length}),0===t.length)return this.selectedIds=[],this.plan=null,void this.goTo(this.extending?"booked":"pick");this.selectedIds[0]===e&&(this.firstStart=null),this.selectedIds=t,this.laterStarts={},this.runPlan()}onEditCommunities(){this.goTo("pick")}onCommunitiesSelected(e,t){var n;if(e.forEach(e=>this.rememberOne(e)),Lo("tourCommunitiesSelected",{buildingId:this.buildingId,count:e.length,mode:t}),this.extending="extend"===t,this.extending){this.existingEventIds=this.bookedEventIds,this.tourType=null!==(n=this.bookedTourType)&&void 0!==n?n:this.tourType;const e=this.confirmed.filter(e=>e.start).slice(-1)[0];this.date=(null==e?void 0:e.start)?ed(e.start):this.date}else this.existingEventIds=[];this.startSchedule(e.map(e=>e.building_id))}async submit(e=!1){var t,n,i,r,o,a;const s=this.plan;if(!s||this.submitting)return;const l=this.choice(),u=this.formValues,d=this.showLeadSourceDropdown()?u.leadSource:null,c=(({choice:e,plan:t,contact:n,attribution:i,conversationTrackingId:r,cancelExistingTours:o})=>({tour_type:e.tourType,stops:[...e.existingEventIds.map(e=>({existing_calendar_event_id:e})),...t.stops.filter(e=>!e.fixed).map(e=>({building_id:e.building_id,start:e.start}))],...n?{contact:n}:{},lead_sources:i,conversation_tracking_id:r,cancel_existing_tours:o}))({choice:l,plan:s,contact:this.extending?null:{first_name:u.firstName.trim(),last_name:u.lastName.trim(),email:u.email.trim(),phone_e164:null!==(t=u.phoneE164)&&void 0!==t?t:"",bedrooms:null===u.layout?[]:[Dd(u.layout)],move_in:u.moveIn||null,notes:u.notes.trim()},attribution:Md({orgSlug:this.orgSlug,selectedLeadSource:d,currentLeadSource:this.currentLeadSource,touchpoints:null!==(i=null===(n=this.leadSourceMultitouchClient)||void 0===n?void 0:n.getSafeLeadSourceTouchpointsWithDefault({includedUserSelectedLeadSource:d||null}))&&void 0!==i?i:[],search:window.location.search,referrer:document.referrer,googleReferral:rs()}),conversationTrackingId:null!==(o=null===(r=this.leadSourceClient)||void 0===r?void 0:r.chatId)&&void 0!==o?o:null,cancelExistingTours:e}),h=JSON.stringify({tour_type:c.tour_type,stops:c.stops,contact:c.contact,cancel_existing_tours:c.cancel_existing_tours});(null===(a=this.idempotency)||void 0===a?void 0:a.booking)!==h&&(this.idempotency={booking:h,key:ms()}),Lo("scheduleTourSubmitted",{tourType:l.tourType,stopCount:c.stops.length,buildingId:this.buildingId}),this.submitting=!0,this.bookingError=null;try{const t=await this.client.book(c,this.idempotency.key);this.idempotency=null,this.rescheduled=e,this.onBooked(t,l.tourType,s)}catch(e){this.onBookingError(e)}finally{this.submitting=!1}}onBooked(e,t,n){var i,r,o,a,s,l;if(this.reschedulePrompt=null,e.stops.every(e=>"failed"===e.status))return this.notice=null!==(o=null===(r=null===(i=e.stops.find(e=>e.error))||void 0===i?void 0:i.error)||void 0===r?void 0:r.message)&&void 0!==o?o:"We couldn't book your tour. Please pick another time.",this.log("TOUR_SCHEDULER_V2_BOOKING_ERROR",e.stops),void this.runPlan(!0);const u=new Map(n.stops.map(e=>[e.building_id,e]));this.confirmed=e.stops.map(e=>{var t,n,i,r,o,a,s,l;const d=null!==(t=this.communities.get(e.building_id))&&void 0!==t?t:{building_id:e.building_id,name:"",address:null,timezone:null},c=null!==(r=null!==(n=d.timezone)&&void 0!==n?n:null===(i=u.get(e.building_id))||void 0===i?void 0:i.timezone)&&void 0!==r?r:null;return{community:{...d,timezone:c},start:e.start,end:e.end,status:e.status,error:null!==(a=null===(o=e.error)||void 0===o?void 0:o.message)&&void 0!==a?a:null,distanceFromPrevMi:null!==(l=null===(s=u.get(e.building_id))||void 0===s?void 0:s.distance_from_prev_mi)&&void 0!==l?l:null}});const d=e.stops.filter(e=>"failed"!==e.status&&null!==e.calendar_event_id);this.bookedEventIds=d.map(e=>e.calendar_event_id),this.bookedTourType=t,this.extending=!1,this.extendInitial=null,Lo("tourItineraryBooked",{buildingId:this.buildingId,stopCount:d.length,failedCount:e.stops.length-d.length}),d.length>0&&(null===(a=this.leadSourceClient)||void 0===a||a.checkAndHandleForLogLeadSource({webchatAction:"tour-scheduler",stateId:null}),null===(s=this.leadSourceClient)||void 0===s||s.resetLeadSource(),null===(l=this.leadSourceMultitouchClient)||void 0===l||l.resetLeadSourceTouchpoints()),this.goTo("booked"),this.loadExtension()}extendQueryFromBooking(){const e=this.confirmed.filter(e=>"failed"!==e.status),t=e[e.length-1];return(null==t?void 0:t.end)&&this.bookedTourType?{availableAfter:t.end,tourType:this.bookedTourType,nearBuildingId:t.community.building_id,excludeBuildingIds:e.map(e=>e.community.building_id)}:null}stopsRemaining(){return 3-this.bookedEventIds.length}get canAddStop(){var e,t;return!this.planLoading&&!this.planError&&this.stopsRemaining()>this.selectedIds.length&&(null!==(t=null===(e=this.plan)||void 0===e?void 0:e.stops.length)&&void 0!==t?t:0)>0}extendQueryFromPlan(){var e,t;const n=null!==(t=null===(e=this.plan)||void 0===e?void 0:e.stops)&&void 0!==t?t:[],i=n[n.length-1];return i&&this.extendFrom?{...this.extendFrom,availableAfter:i.end,nearBuildingId:i.building_id,excludeBuildingIds:[...this.extendFrom.excludeBuildingIds,...this.selectedIds]}:null}onStopAdded(e){const t=e[0];t&&(this.rememberOne(t),Lo("tourCommunitiesSelected",{buildingId:this.buildingId,count:1,mode:"extend"}),this.selectedIds=[...this.selectedIds,t.building_id],this.runPlan())}async loadExtension(){const e=this.extendQueryFromBooking();this.extendFrom=e;const t=this.stopsRemaining();if(this.group&&e&&!(t<=0))try{const n=await this.client.getCommunities({...Ud,extend:e});this.remember(n.communities),n.communities.some(e=>e.tourable)&&(this.extendInitial=n,Lo("tourExtensionOffered",{buildingId:this.buildingId,stopsRemaining:t}))}catch(e){this.log("TOUR_SCHEDULER_V2_EXTEND_LOAD_ERROR",e)}}onBookingError(e){const t=e instanceof Zu?e:new Zu(0,null,"Something went wrong. Please try again.");if("EXISTING_TOUR"!==t.code){if(this.reschedulePrompt=null,"SLOT_TAKEN"===t.code)return this.notice=t.message,void this.runPlan(!0);this.bookingError=t.message,this.log("TOUR_SCHEDULER_V2_BOOKING_ERROR",e)}else this.reschedulePrompt=t.message}showLeadSourceDropdown(){return this.featureFlagShowDropdown===bo.always||this.featureFlagShowDropdown===bo.onAttributionFailure&&0===this.currentLeadSource.length}log(e,t){Ao({logTitle:e,logData:{error:t},logType:ko.error,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,error:t})}backStep(){return this.rescheduleCanceled?null:"schedule"===this.step?this.extending?"booked":this.group?"pick":null:"pick"===this.step&&this.group&&!this.group.anchor.is_general_building&&this.plan&&this.selectedIds.length>0?"schedule":null}problems(){var e,t;return null!==(t=null===(e=this.plan)||void 0===e?void 0:e.unchainable)&&void 0!==t?t:[]}isMultiStop(){return this.selectedIds.length>1||this.existingEventIds.length>0}canSubmit(){const e=this.plan;return!!e&&!this.planLoading&&!this.planError&&e.stops.some(e=>!e.fixed)&&0===e.unchainable.length&&null===this.activeLinkType&&(this.extending||(t=this.formValues,n=this.bedroomsRequired,(!!t.firstName.trim()||!!t.lastName.trim())&&Lr(t.email.trim())&&!!t.phoneE164&&(!n||null!==t.layout)));var t,n}get bedroomOptions(){const e=new Set(this.selectedIds.flatMap(e=>{var t,n;return null!==(n=null===(t=this.communities.get(e))||void 0===t?void 0:t.bedrooms)&&void 0!==n?n:[]}));return e.size>0?[...e].sort((e,t)=>e-t).map(Rd):this.layoutOptions}get preferredLayout(){const e=this.bedroomOptions.filter(e=>this.preferences.bedrooms.includes(Dd(e.value)));return 1===e.length?e[0].value:null}get formValues(){var e;return{...this.contact,layout:this.preferredLayout,moveIn:null!==(e=this.preferences.moveIn)&&void 0!==e?e:""}}onContactChange(e){this.contact=e;const t=this.formValues;e.layout!==t.layout&&(this.preferences={...this.preferences,bedrooms:null===e.layout?[]:[Dd(e.layout)]}),e.moveIn!==t.moveIn&&(this.preferences={...this.preferences,moveIn:e.moveIn||null})}get bedroomsRequired(){return this.bedroomPreferenceRequired&&this.bedroomOptions.length>0}disclaimer(){return na({buildingName:this.buildingName,phoneNumberInput:this.contact.phone,emailInput:this.contact.email,orgLegalName:this.orgLegalName,orgSlug:this.orgSlug,country:this.country,buildingState:this.buildingState,clickingButtonText:"schedule tour"})}container(e){return H`<div
|
|
6372
6311
|
id=${this.mobile?"mobile-body-container":"scheduler-container"}
|
|
6373
6312
|
>
|
|
6374
6313
|
${e}
|
|
@@ -6377,45 +6316,43 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6377
6316
|
.load=${this.loadSelectCommunities}
|
|
6378
6317
|
.initial=${this.group}
|
|
6379
6318
|
.filters=${this.preferences}
|
|
6380
|
-
.maxSelectable=${1}
|
|
6381
6319
|
.selected=${this.picks}
|
|
6382
6320
|
@filters-change=${this.onFiltersChange}
|
|
6383
6321
|
@selection-change=${e=>this.onCommunitiesSelected(e.detail.communities,"select")}
|
|
6384
|
-
></community-picker>`)}
|
|
6385
|
-
|
|
6386
|
-
|
|
6322
|
+
></community-picker>`)}renderItineraryHeading(){return H`<div class="itinerary-heading">
|
|
6323
|
+
<h2>
|
|
6324
|
+
Create Your Tour Itinerary
|
|
6325
|
+
${this.planLoading?H`<mini-loader></mini-loader>`:""}
|
|
6326
|
+
</h2>
|
|
6327
|
+
<p class="explanation">Add up to ${3} communities</p>
|
|
6328
|
+
</div>`}renderAddStop(){return H`<div class="add-stop-picker">
|
|
6329
|
+
<button
|
|
6330
|
+
class="close-add-stop"
|
|
6331
|
+
aria-label="Close nearby communities"
|
|
6332
|
+
@click=${()=>this.addingStop=!1}
|
|
6387
6333
|
>
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
>
|
|
6399
|
-
${Kl("#737373")}
|
|
6400
|
-
</button>
|
|
6401
|
-
</li>`)}
|
|
6402
|
-
</ul>
|
|
6403
|
-
<action-confirm-button
|
|
6404
|
-
id="continue-bttn"
|
|
6405
|
-
text="Continue"
|
|
6406
|
-
height="50px"
|
|
6407
|
-
width=${t?"100%":"145px"}
|
|
6408
|
-
.onClick=${i}
|
|
6409
|
-
></action-confirm-button>
|
|
6410
|
-
</div>`)({selected:this.picks,mobile:this.mobile,onRemove:e=>this.picks=this.picks.filter(t=>t.building_id!==e),onContinue:()=>this.onCommunitiesSelected(this.picks,"extend")})}renderSchedule(){var e,t;if(null!==this.reschedulePrompt)return this.renderReschedulePrompt();const n=this.plan;return H`${this.container(H`
|
|
6334
|
+
${Xl("#737373")}
|
|
6335
|
+
</button>
|
|
6336
|
+
<community-picker
|
|
6337
|
+
variant="extend"
|
|
6338
|
+
.load=${this.loadAddStopCommunities}
|
|
6339
|
+
.filters=${this.preferences}
|
|
6340
|
+
@filters-change=${this.onFiltersChange}
|
|
6341
|
+
@selection-change=${e=>this.onStopAdded(e.detail.communities)}
|
|
6342
|
+
></community-picker>
|
|
6343
|
+
</div>`}renderSchedule(){var e,t;if(null!==this.reschedulePrompt)return this.renderReschedulePrompt();const n=this.plan;return H`${this.container(H`
|
|
6411
6344
|
${this.planError?H`<p class="error-message" role="alert">
|
|
6412
6345
|
${this.planError}
|
|
6413
6346
|
<button class="link-button" @click=${()=>this.runPlan()}>
|
|
6414
6347
|
Try again
|
|
6415
6348
|
</button>
|
|
6416
6349
|
</p>`:""}
|
|
6350
|
+
${this.extending?this.renderItineraryHeading():""}
|
|
6417
6351
|
${this.notice?H`<p class="explanation notice" role="status">${this.notice}</p>`:""}
|
|
6418
|
-
<div
|
|
6352
|
+
<div
|
|
6353
|
+
id="book-tour-journey-items"
|
|
6354
|
+
class=${Ce({itinerary:this.extending})}
|
|
6355
|
+
>
|
|
6419
6356
|
<itinerary-editor
|
|
6420
6357
|
.stops=${null!==(e=null==n?void 0:n.stops)&&void 0!==e?e:[]}
|
|
6421
6358
|
.communities=${this.communities}
|
|
@@ -6425,6 +6362,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6425
6362
|
.bookableDates=${null!==(t=null==n?void 0:n.bookable_dates)&&void 0!==t?t:[]}
|
|
6426
6363
|
.date=${this.date}
|
|
6427
6364
|
?single=${!this.isMultiStop()}
|
|
6365
|
+
?stopsOnly=${this.extending}
|
|
6366
|
+
?canAddStop=${this.extending&&!this.addingStop&&this.canAddStop}
|
|
6428
6367
|
?canEditCommunities=${null!==this.group&&!this.extending}
|
|
6429
6368
|
?loading=${this.planLoading}
|
|
6430
6369
|
?planned=${null!==n}
|
|
@@ -6436,6 +6375,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6436
6375
|
@stops-reorder=${e=>this.onReorder(e.detail.buildingIds)}
|
|
6437
6376
|
@stop-remove=${e=>this.onRemove(e.detail.buildingId)}
|
|
6438
6377
|
@edit-communities=${()=>this.onEditCommunities()}
|
|
6378
|
+
@add-stop=${()=>this.addingStop=!0}
|
|
6439
6379
|
@open-tour-link=${()=>this.activeLinkType&&this.openTourLink(this.activeLinkType)}
|
|
6440
6380
|
></itinerary-editor>
|
|
6441
6381
|
${this.extending?"":H`<contact-form
|
|
@@ -6448,9 +6388,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6448
6388
|
.country=${this.country}
|
|
6449
6389
|
?mobile=${this.mobile}
|
|
6450
6390
|
@contact-change=${e=>this.onContactChange(e.detail.values)}
|
|
6451
|
-
@lead-source-selected=${e=>
|
|
6391
|
+
@lead-source-selected=${e=>Lo("tourLeadSourceSelected",{leadSource:e.detail.leadSource,buildingId:this.buildingId})}
|
|
6452
6392
|
></contact-form>`}
|
|
6453
6393
|
</div>
|
|
6394
|
+
${this.extending&&this.addingStop?this.renderAddStop():""}
|
|
6454
6395
|
`)}
|
|
6455
6396
|
<div
|
|
6456
6397
|
id="tour-scheduler-footer"
|
|
@@ -6469,8 +6410,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6469
6410
|
.onClick=${()=>this.submit()}
|
|
6470
6411
|
.isLoading=${this.submitting}
|
|
6471
6412
|
height="50px"
|
|
6472
|
-
width=${this.mobile?"100%":"145px"}
|
|
6473
|
-
text=${this.isMultiStop()?"Schedule tours":"Schedule tour"}
|
|
6413
|
+
width=${this.mobile?"100%":this.extending?"200px":"145px"}
|
|
6414
|
+
text=${this.extending?"Confirm tour itinerary":this.isMultiStop()?"Schedule tours":"Schedule tour"}
|
|
6474
6415
|
?disabled=${!this.canSubmit()}
|
|
6475
6416
|
></action-confirm-button>
|
|
6476
6417
|
</div>`}renderReschedulePrompt(){return H`${this.container(H`<div>
|
|
@@ -6526,13 +6467,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6526
6467
|
.load=${this.loadExtendCommunities}
|
|
6527
6468
|
.initial=${this.extendInitial}
|
|
6528
6469
|
.filters=${this.preferences}
|
|
6529
|
-
.maxSelectable=${this.stopsRemaining()}
|
|
6530
|
-
.selected=${this.picks}
|
|
6531
6470
|
@filters-change=${this.onFiltersChange}
|
|
6532
|
-
@selection-change=${this.
|
|
6471
|
+
@selection-change=${e=>this.onCommunitiesSelected(e.detail.communities,"extend")}
|
|
6533
6472
|
></community-picker>`:""}
|
|
6534
|
-
</booking-confirmation>`)}
|
|
6535
|
-
${this.extendInitial?this.renderTray():""}`}renderBody(){if(this.rescheduleCanceled)return this.renderRescheduleCanceled();switch(this.step){case"loading":return H`<div class="center-tour-not-avail" role="status">
|
|
6473
|
+
</booking-confirmation>`)}`}renderBody(){if(this.rescheduleCanceled)return this.renderRescheduleCanceled();switch(this.step){case"loading":return H`<div class="center-tour-not-avail" role="status">
|
|
6536
6474
|
<h1>Searching for availabilities...</h1>
|
|
6537
6475
|
<div class="loading-entire-tour-icon">
|
|
6538
6476
|
<mega-loader size="48"></mega-loader>
|
|
@@ -6554,7 +6492,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6554
6492
|
aria-label="Back"
|
|
6555
6493
|
@click=${()=>this.goTo(e)}
|
|
6556
6494
|
>
|
|
6557
|
-
${
|
|
6495
|
+
${Id("#202020")}
|
|
6558
6496
|
</button>`:""}
|
|
6559
6497
|
<h1 id="tour-header-title">Schedule a Tour</h1>
|
|
6560
6498
|
</div>
|
|
@@ -6563,11 +6501,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6563
6501
|
aria-label="Close scheduler"
|
|
6564
6502
|
@click=${e=>{var t;return null===(t=this.onCloseClicked)||void 0===t?void 0:t.call(this,e)}}
|
|
6565
6503
|
>
|
|
6566
|
-
${
|
|
6504
|
+
${Xl("#202020")}
|
|
6567
6505
|
</button>
|
|
6568
6506
|
</div>
|
|
6569
6507
|
${this.renderBody()}
|
|
6570
|
-
</div>`}};
|
|
6508
|
+
</div>`}};Fd.styles=[ia,Me,p`
|
|
6571
6509
|
/* New layout only: the back button beside the title. */
|
|
6572
6510
|
.title {
|
|
6573
6511
|
align-items: center;
|
|
@@ -6596,6 +6534,45 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6596
6534
|
margin: 0 0 16px;
|
|
6597
6535
|
}
|
|
6598
6536
|
|
|
6537
|
+
/* Adding stops: the design's one centred column of stops. */
|
|
6538
|
+
#book-tour-journey-items.itinerary {
|
|
6539
|
+
display: block;
|
|
6540
|
+
margin: 0 auto;
|
|
6541
|
+
max-width: 30rem;
|
|
6542
|
+
}
|
|
6543
|
+
|
|
6544
|
+
.itinerary-heading {
|
|
6545
|
+
margin-bottom: 16px;
|
|
6546
|
+
text-align: center;
|
|
6547
|
+
}
|
|
6548
|
+
|
|
6549
|
+
/* The pickers' heading size. */
|
|
6550
|
+
.itinerary-heading h2 {
|
|
6551
|
+
align-items: center;
|
|
6552
|
+
display: flex;
|
|
6553
|
+
font-size: 20px;
|
|
6554
|
+
font-weight: 400;
|
|
6555
|
+
gap: 8px;
|
|
6556
|
+
justify-content: center;
|
|
6557
|
+
margin: 0;
|
|
6558
|
+
}
|
|
6559
|
+
|
|
6560
|
+
.add-stop-picker {
|
|
6561
|
+
margin-top: 24px;
|
|
6562
|
+
position: relative;
|
|
6563
|
+
}
|
|
6564
|
+
|
|
6565
|
+
/* The extend picker's top rule and padding put its heading 24px down. */
|
|
6566
|
+
.close-add-stop {
|
|
6567
|
+
background: none;
|
|
6568
|
+
border: none;
|
|
6569
|
+
cursor: pointer;
|
|
6570
|
+
padding: 4px;
|
|
6571
|
+
position: absolute;
|
|
6572
|
+
right: 0;
|
|
6573
|
+
top: 24px;
|
|
6574
|
+
}
|
|
6575
|
+
|
|
6599
6576
|
.link-button {
|
|
6600
6577
|
background: none;
|
|
6601
6578
|
border: none;
|
|
@@ -6604,7 +6581,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6604
6581
|
font: inherit;
|
|
6605
6582
|
text-decoration: underline;
|
|
6606
6583
|
}
|
|
6607
|
-
`],
|
|
6584
|
+
`],Bd([pe({attribute:!0})],Fd.prototype,"orgSlug",void 0),Bd([pe({attribute:!0})],Fd.prototype,"buildingSlug",void 0),Bd([pe({type:Number})],Fd.prototype,"buildingId",void 0),Bd([pe({type:Number})],Fd.prototype,"orgId",void 0),Bd([pe({attribute:!1})],Fd.prototype,"buildingName",void 0),Bd([pe({attribute:!0})],Fd.prototype,"sgtUrl",void 0),Bd([pe({attribute:!0})],Fd.prototype,"selfGuidedToursTypeOffered",void 0),Bd([pe({attribute:!0})],Fd.prototype,"escortedToursLink",void 0),Bd([pe({attribute:!1})],Fd.prototype,"escortedToursTypeOffered",void 0),Bd([pe({attribute:!0})],Fd.prototype,"virtualToursLink",void 0),Bd([pe({attribute:!0})],Fd.prototype,"virtualToursTypeOffered",void 0),Bd([pe({attribute:!1})],Fd.prototype,"tourTypeOptions",void 0),Bd([pe({attribute:!1})],Fd.prototype,"layoutOptions",void 0),Bd([pe({attribute:!0})],Fd.prototype,"currentLeadSource",void 0),Bd([pe({attribute:!1})],Fd.prototype,"leadSources",void 0),Bd([pe({attribute:!0})],Fd.prototype,"featureFlagShowDropdown",void 0),Bd([pe({attribute:!1})],Fd.prototype,"bedroomPreferenceRequired",void 0),Bd([pe({attribute:!1})],Fd.prototype,"orgLegalName",void 0),Bd([pe({attribute:!1})],Fd.prototype,"country",void 0),Bd([pe({attribute:!1})],Fd.prototype,"buildingState",void 0),Bd([pe({attribute:!1})],Fd.prototype,"primaryColor",void 0),Bd([pe({attribute:!1})],Fd.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Bd([pe({attribute:!1})],Fd.prototype,"compactDesign",void 0),Bd([pe({attribute:!1})],Fd.prototype,"leadSourceClient",void 0),Bd([pe({attribute:!1})],Fd.prototype,"leadSourceMultitouchClient",void 0),Bd([pe({attribute:!1})],Fd.prototype,"getSessionToken",void 0),Bd([fe()],Fd.prototype,"step",void 0),Bd([fe()],Fd.prototype,"loadError",void 0),Bd([fe()],Fd.prototype,"mobile",void 0),Bd([fe()],Fd.prototype,"group",void 0),Bd([fe()],Fd.prototype,"communities",void 0),Bd([fe()],Fd.prototype,"selectedIds",void 0),Bd([fe()],Fd.prototype,"picks",void 0),Bd([fe()],Fd.prototype,"addingStop",void 0),Bd([fe()],Fd.prototype,"existingEventIds",void 0),Bd([fe()],Fd.prototype,"tourType",void 0),Bd([fe()],Fd.prototype,"linkTourType",void 0),Bd([fe()],Fd.prototype,"date",void 0),Bd([fe()],Fd.prototype,"firstStart",void 0),Bd([fe()],Fd.prototype,"laterStarts",void 0),Bd([fe()],Fd.prototype,"plan",void 0),Bd([fe()],Fd.prototype,"planLoading",void 0),Bd([fe()],Fd.prototype,"planError",void 0),Bd([fe()],Fd.prototype,"notice",void 0),Bd([fe()],Fd.prototype,"contact",void 0),Bd([fe()],Fd.prototype,"preferences",void 0),Bd([fe()],Fd.prototype,"submitting",void 0),Bd([fe()],Fd.prototype,"bookingError",void 0),Bd([fe()],Fd.prototype,"reschedulePrompt",void 0),Bd([fe()],Fd.prototype,"confirmed",void 0),Bd([fe()],Fd.prototype,"bookedTourType",void 0),Bd([fe()],Fd.prototype,"bookedEventIds",void 0),Bd([fe()],Fd.prototype,"extendInitial",void 0),Bd([fe()],Fd.prototype,"extendFrom",void 0),Bd([fe()],Fd.prototype,"extending",void 0),Bd([fe()],Fd.prototype,"rescheduled",void 0),Bd([fe()],Fd.prototype,"rescheduleCanceled",void 0),Fd=Bd([ce("tour-scheduler-v2")],Fd);const Hd=p`
|
|
6608
6585
|
:host {
|
|
6609
6586
|
display: block;
|
|
6610
6587
|
position: relative;
|
|
@@ -6916,7 +6893,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6916
6893
|
margin: 2px 0;
|
|
6917
6894
|
}
|
|
6918
6895
|
}
|
|
6919
|
-
`;class
|
|
6896
|
+
`;class zd{constructor(e={}){var t,n,i,r,o,a;this.id=null!==(t=e.id)&&void 0!==t?t:"",this.description=null!==(n=e.description)&&void 0!==n?n:"",this.type=null!==(i=e.type)&&void 0!==i?i:"",this.rent=null!==(r=e.rent)&&void 0!==r?r:0,this.rentFrequency=null!==(o=e.rentFrequency)&&void 0!==o?o:"monthly",this.available=null!==(a=e.available)&&void 0!==a&&a,this.reservedUntil=e.reservedUntil?new Date(e.reservedUntil):void 0}}class Gd{constructor(e={}){var t,n,i,r,o;this.description=null!==(t=e.description)&&void 0!==t?t:"",this.type=null!==(n=e.type)&&void 0!==n?n:"",this.minAvailableItem=e.minAvailableItem?new zd(e.minAvailableItem):void 0,this.maxAvailableItem=e.maxAvailableItem?new zd(e.maxAvailableItem):void 0,this.allItems=(null!==(i=e.allItems)&&void 0!==i?i:[]).map(e=>new zd(e)),this.rent=null!==(r=e.rent)&&void 0!==r?r:0,this.priceDescription=null!==(o=e.priceDescription)&&void 0!==o?o:""}get displayName(){return this.description}get itemDescription(){return this.description}}var Vd,Wd;!function(e){e.NEVER="NEVER",e.AS_NEEDED="AS_NEEDED",e.ONE_TIME="ONE_TIME",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY",e.BI_WEEKLY="BI_WEEKLY",e.ANNUALLY="ANNUALLY",e.DAILY="DAILY"}(Vd||(Vd={})),function(e){e.Rent="Rent",e.Utility="Utility",e.ApplicationFee="ApplicationFee",e.Parking="Parking",e.Insurance="Insurance",e.Storage="Storage",e.PetFee="PetFee",e.PetRent="PetRent",e.PetDeposit="PetDeposit",e.SecurityDeposit="SecurityDeposit",e.MoveInFee="MoveInFee",e.Other="Other"}(Wd||(Wd={}));class Qd{constructor(e={}){var t,n,i,r,o,a,s,l,u,d;this.id=null!==(t=e.id)&&void 0!==t?t:"",this.building_id=e.building_id,this.fee_name=null!==(n=e.fee_name)&&void 0!==n?n:"",this.amount=e.amount,this.amount_display=null!==(i=e.amount_display)&&void 0!==i?i:"",this.limit=null!==(r=e.limit)&&void 0!==r?r:null,this.min_estimate=e.min_estimate,this.max_estimate=e.max_estimate,this.percent_rent=e.percent_rent,this.percent_rent_min=e.percent_rent_min,this.percent_rent_max=e.percent_rent_max,this.frequency=null!==(o=e.frequency)&&void 0!==o?o:Vd.ONE_TIME,this.category=null!==(a=e.category)&&void 0!==a?a:Wd.Other,this.description=e.description,this.additional_info=e.additional_info,this.refundable=null!==(s=e.refundable)&&void 0!==s&&s,this.hidden_reason=e.hidden_reason,this.unit_ids=e.unit_ids,this.layout_ids=e.layout_ids,this.public_facing=null===(l=e.public_facing)||void 0===l||l,this.per_applicant=null!==(u=e.per_applicant)&&void 0!==u&&u,this.required_for_quotes=null!==(d=e.required_for_quotes)&&void 0!==d&&d,this.charge_code=e.charge_code,this.bundle_key=e.bundle_key,this.external_key=e.external_key}get displayFrequency(){return this.frequency.replace(/_/g," ").toLowerCase().replace(/\b\w/g,e=>e.toUpperCase())}get isOptional(){return!this.required_for_quotes}}const qd=class{constructor(){this.params=new URLSearchParams}addSingle(e,t){return t?(this.params.append(e,t),this):this}addArray(e,t){return t?(t.forEach(t=>{t&&this.params.append(`${e}[]`,t)}),this):this}build(){return this.params.toString()?`?${this.params.toString()}`:""}},Yd=Eo,Kd=e=>new Qd(e),Xd=e=>new Gd(e),Zd=async(e,t)=>{try{const n=(new qd).addArray("layout_ids",null==t?void 0:t.map(e=>e.toString())),i=await r().get(`${Yd}/platformApi/webchat/${e}/marketable-fees?${n.build()}`);if(i.data){const e=Er(i.data);return{fees:e.fees.map(Kd),rentableItems:e.rentableItems.map(Xd),buildingIncentives:e.buildingIncentives}}}catch(t){Ao({logType:ko.error,buildingSlug:e,logTitle:"[ERROR_GETTING_FEES]",logData:{error:t},error:t})}return{fees:[],rentableItems:[],buildingIncentives:[]}},Jd=-1,ec=Eo,tc=async({buildingSlug:e,unitId:t,chargeInputs:n,rentableItems:i,leaseTerm:o,moveInDate:a},s)=>{try{const l=await r().post(`${ec}/platformApi/webchat/${e}/quote/calculate`,_r({unitId:t,chargeInputs:n,rentableItems:i,...Number.isFinite(o)?{leaseTerm:o}:{},moveInDate:a}),{signal:s});if(l.data){return Er(l.data)}}catch(t){const n=t;"ERR_CANCELED"!==n.code&&Ao({logType:ko.error,buildingSlug:e,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{error:t},error:t});const i=(e=>{var t,n,i;const r=null===(n=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.detail;if(422!==(null===(i=e.response)||void 0===i?void 0:i.status)||!Array.isArray(r))return null;const o=r.map(e=>Er(e));return o.length>0&&o.every(e=>"number"==typeof e.limit)?o:null})(n);return{quote:null,error:i?{type:"feeLimit",violations:i}:{type:"unknown"}}}return{quote:null,error:{type:"unknown"}}};function nc(e){return ir(e,"yyyy-MM-dd")}function ic(){return nc(Hr())}const rc=Eo,oc=async({buildingSlug:e,numBedrooms:t,moveInDateString:n,leaseTerm:i})=>{try{const a=(({numBedrooms:e,moveInDateString:t,leaseTerm:n})=>{const i=new qd;return i.addArray("num_bedrooms",null==e?void 0:e.map(e=>e.toString())).addSingle("move_in_date_earliest",t).addSingle("move_in_date_latest",t).addSingle("lease_term_min",Number.isFinite(n)?null==n?void 0:n.toString():void 0),i.build()})({numBedrooms:t,moveInDateString:n,leaseTerm:i}),s=await r().get(`${rc}/platformApi/webchat/${e}/units${a}`);if(s.data){const e=Er(s.data);return o=e.map(e=>({...e,id:parseInt(e.id.toString().substring(1))})),[...o].sort((e,t)=>e.startingPrice-t.startingPrice||e.id-t.id)}}catch(r){Ao({logType:ko.error,buildingSlug:e,logTitle:"[ERROR_GETTING_UNITS]",logData:{error:r,params:{numBedrooms:t,moveInDateString:n,leaseTerm:i}},error:r})}var o;return[]},ac=[Wd.PetFee,Wd.PetRent,Wd.PetDeposit];function sc(e){return`Up to ${e} ${1===e?"pet":"pets"} allowed`}const lc=({color:e="#347FF7",size:t=24}={})=>z`
|
|
6920
6897
|
<svg aria-hidden="true" focusable="false" width="${t}" height="${t}" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6921
6898
|
<g id="Frame" clip-path="url(#clip0_18718_332018)">
|
|
6922
6899
|
<path id="Vector" d="M3 12.5C3 13.6819 3.23279 14.8522 3.68508 15.9442C4.13738 17.0361 4.80031 18.0282 5.63604 18.864C6.47177 19.6997 7.46392 20.3626 8.55585 20.8149C9.64778 21.2672 10.8181 21.5 12 21.5C13.1819 21.5 14.3522 21.2672 15.4442 20.8149C16.5361 20.3626 17.5282 19.6997 18.364 18.864C19.1997 18.0282 19.8626 17.0361 20.3149 15.9442C20.7672 14.8522 21 13.6819 21 12.5C21 11.3181 20.7672 10.1478 20.3149 9.05585C19.8626 7.96392 19.1997 6.97177 18.364 6.13604C17.5282 5.30031 16.5361 4.63738 15.4442 4.18508C14.3522 3.73279 13.1819 3.5 12 3.5C10.8181 3.5 9.64778 3.73279 8.55585 4.18508C7.46392 4.63738 6.47177 5.30031 5.63604 6.13604C4.80031 6.97177 4.13738 7.96392 3.68508 9.05585C3.23279 10.1478 3 11.3181 3 12.5Z" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -6929,7 +6906,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6929
6906
|
</clipPath>
|
|
6930
6907
|
</defs>
|
|
6931
6908
|
</svg>
|
|
6932
|
-
`,
|
|
6909
|
+
`,uc=p`
|
|
6933
6910
|
:host {
|
|
6934
6911
|
display: block;
|
|
6935
6912
|
margin-bottom: 20px;
|
|
@@ -6963,9 +6940,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6963
6940
|
color: #868e96;
|
|
6964
6941
|
font-size: 0.8rem;
|
|
6965
6942
|
}
|
|
6966
|
-
`;var
|
|
6943
|
+
`;var dc=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 cc=class extends ue{constructor(){super(...arguments),this.promoAmount="0",this.promoDescription="",this.promoValidity=""}render(){return H`
|
|
6967
6944
|
<div class="promo-card">
|
|
6968
|
-
<div class="icon-container">${
|
|
6945
|
+
<div class="icon-container">${lc()}</div>
|
|
6969
6946
|
<div class="content-container">
|
|
6970
6947
|
<h2 class="promo-heading">
|
|
6971
6948
|
${this.promoAmount} ${this.promoDescription}
|
|
@@ -6973,7 +6950,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6973
6950
|
<div class="promo-subtitle">${this.promoValidity}</div>
|
|
6974
6951
|
</div>
|
|
6975
6952
|
</div>
|
|
6976
|
-
`}};
|
|
6953
|
+
`}};cc.styles=uc,dc([pe({type:String})],cc.prototype,"promoAmount",void 0),dc([pe({type:String})],cc.prototype,"promoDescription",void 0),dc([pe({type:String})],cc.prototype,"promoValidity",void 0),cc=dc([ce("promo-card")],cc);var hc=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 pc=class extends ue{constructor(){super(...arguments),this.unit={},this.onUnitSelect=null,this.selected=!1}get bedAndBathText(){return`${0===this.unit.numberOfBedrooms?"studio":`${this.unit.numberOfBedrooms}bd`} | ${this.unit.numberOfBathrooms}ba`}get priceRange(){return this.unit.startingPrice===this.unit.maxPrice?`$${this.unit.startingPrice}`:`$${this.unit.startingPrice} - $${this.unit.maxPrice}`}handleOnUnitSelect(){var e;this.selected||(this.selected=!this.selected,null===(e=this.onUnitSelect)||void 0===e||e.call(this,this.unit))}handleOnImgClick(e){const t=e.target;window.open(t.src,"_blank")}render(){return H`
|
|
6977
6954
|
<div class="floorplan-image-card ${this.selected?"selected":""}">
|
|
6978
6955
|
<div class="section-left">
|
|
6979
6956
|
${this.unit.floorplanUrl?H`
|
|
@@ -6998,7 +6975,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
6998
6975
|
</p>
|
|
6999
6976
|
</div>
|
|
7000
6977
|
</div>
|
|
7001
|
-
`}};
|
|
6978
|
+
`}};pc.styles=qu,hc([pe({type:Object})],pc.prototype,"unit",void 0),hc([pe()],pc.prototype,"onUnitSelect",void 0),hc([pe({type:Boolean})],pc.prototype,"selected",void 0),pc=hc([ce("floorplan-image-card")],pc);var fc=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 gc=class extends ue{constructor(){super(...arguments),this.buildingSlug="",this.layoutOptions=[],this.selectedLayoutIds=[Jd],this.units=[],this.isLoading=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.moveInDate=Hr(),this.leaseTerm=12,this.selectedUnit=null,this.handleUnitSelect=e=>{var t;this.selectedUnit=e,null===(t=this.onUnitSelect)||void 0===t||t.call(this,e)},this.handleLayoutChange=e=>{var t;let n;e===Jd?n=[Jd]:this.selectedLayoutIds.includes(Jd)?n=[e]:this.selectedLayoutIds.includes(e)?(n=this.selectedLayoutIds.filter(t=>t!==e),0===n.length&&(n=[Jd])):n=[...this.selectedLayoutIds,e],this.selectedLayoutIds=n,null===(t=this.onSelectLayout)||void 0===t||t.call(this,this.selectedLayoutIds)},this.handleMoveInDateChange=e=>{var t;const n=e.target.value,i=Hr();if(n){const[e,t,r]=n.split("-").map(Number),o=new Date(e,t-1,r);if(Tr(o,i))return;this.moveInDate=o}else this.moveInDate=i;null===(t=this.onMoveInDateChange)||void 0===t||t.call(this,n||nc(i))},this.handleLeaseTermChange=e=>{var t;const n=parseInt(e.target.value);!Number.isInteger(n)||n<=0||(this.leaseTerm=n,null===(t=this.onLeaseTermChange)||void 0===t||t.call(this,this.leaseTerm))},this.renderUnitSelection=()=>{var e,t;return this.isLoading?H`
|
|
7002
6979
|
<div class="unit-selection">
|
|
7003
6980
|
<div class="image-carousel">
|
|
7004
6981
|
${Array.from({length:3},()=>H`<div class="unit-card-skeleton shimmer"></div>`)}
|
|
@@ -7036,7 +7013,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7036
7013
|
</div>
|
|
7037
7014
|
`)}
|
|
7038
7015
|
</div>
|
|
7039
|
-
`}get displayOptions(){const e=e=>{let t=e;return Object.entries({zero:"0",one:"1",two:"2",three:"3",four:"4",five:"5",six:"6",seven:"7",eight:"8",nine:"9",ten:"10",eleven:"11",twelve:"12"}).forEach(([e,n])=>{const i=new RegExp(`\\b${e}\\b`,"gi");t=t.replace(i,n)}),t};return[{value:
|
|
7016
|
+
`}get displayOptions(){const e=e=>{let t=e;return Object.entries({zero:"0",one:"1",two:"2",three:"3",four:"4",five:"5",six:"6",seven:"7",eight:"8",nine:"9",ten:"10",eleven:"11",twelve:"12"}).forEach(([e,n])=>{const i=new RegExp(`\\b${e}\\b`,"gi");t=t.replace(i,n)}),t};return[{value:Jd,label:"All"},...this.layoutOptions].map(t=>({...t,label:e(t.label.replace(/bedroom/gi,"bd"))})).sort((e,t)=>e.value-t.value)}render(){return H`
|
|
7040
7017
|
<div class="floor-plan-selector">
|
|
7041
7018
|
<div class="floor-plan-selector-label">Select Floor Plan</div>
|
|
7042
7019
|
${this.renderBadges()}
|
|
@@ -7048,8 +7025,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7048
7025
|
<input
|
|
7049
7026
|
type="date"
|
|
7050
7027
|
placeholder="Select move in date"
|
|
7051
|
-
min=${
|
|
7052
|
-
.value=${this.moveInDate?
|
|
7028
|
+
min=${ic()}
|
|
7029
|
+
.value=${this.moveInDate?nc(this.moveInDate):""}
|
|
7053
7030
|
@input=${this.handleMoveInDateChange}
|
|
7054
7031
|
/>
|
|
7055
7032
|
</div>
|
|
@@ -7068,7 +7045,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7068
7045
|
${this.renderUnitSelection()}
|
|
7069
7046
|
</div>
|
|
7070
7047
|
</div>
|
|
7071
|
-
`}};
|
|
7048
|
+
`}};gc.styles=Yu,fc([pe({type:String})],gc.prototype,"buildingSlug",void 0),fc([pe({type:Array})],gc.prototype,"layoutOptions",void 0),fc([pe({type:Array})],gc.prototype,"selectedLayoutIds",void 0),fc([pe({type:Array})],gc.prototype,"units",void 0),fc([pe({type:Boolean})],gc.prototype,"isLoading",void 0),fc([pe({type:Boolean})],gc.prototype,"isLoadingLayouts",void 0),fc([pe()],gc.prototype,"onSelectLayout",void 0),fc([pe()],gc.prototype,"onUnitSelect",void 0),fc([pe()],gc.prototype,"onMoveInDateChange",void 0),fc([pe()],gc.prototype,"onLeaseTermChange",void 0),fc([fe()],gc.prototype,"moveInDate",void 0),fc([fe()],gc.prototype,"leaseTerm",void 0),fc([fe()],gc.prototype,"selectedUnit",void 0),gc=fc([ce("floor-plan-selector")],gc);const mc=p`
|
|
7072
7049
|
:host {
|
|
7073
7050
|
display: block;
|
|
7074
7051
|
width: 100%;
|
|
@@ -7114,7 +7091,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7114
7091
|
font-size: 1rem;
|
|
7115
7092
|
align-self: center;
|
|
7116
7093
|
}
|
|
7117
|
-
`;var
|
|
7094
|
+
`;var bc=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 yc=class extends ue{constructor(){super(...arguments),this.feeQuote=null}get name(){var e,t;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem)return Rr(this.feeQuote.sourceRentableItem.description||"");const n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee;return(null==n?void 0:n.feeName)?Rr(n.feeName):""}get description(){var e,t,n,i;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem){return`${this.feeQuote.sourceRentableItem.id}`}return null!==(i=null===(n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee)||void 0===n?void 0:n.description)&&void 0!==i?i:""}get additionalInfo(){var e,t,n;return null!==(n=null===(t=null===(e=this.feeQuote)||void 0===e?void 0:e.marketableFee)||void 0===t?void 0:t.additionalInfo)&&void 0!==n?n:""}get triggeredEvent(){var e,t;const n=null===(t=null===(e=this.feeQuote)||void 0===e?void 0:e.marketableFee)||void 0===t?void 0:t.triggeredByEvent;if(!n)return"";return{APPLICATION_SUBMISSION:"Due at Application Submission",APPLICATION_APPROVAL:"Due at Application Approval",LEASE_SIGNING:"Due at Lease Signing",MOVE_IN:"Due at Move-In"}[n]||n}get amount(){var e;if(!this.feeQuote)return null;const t=null!==(e=this.feeQuote.amountRange.fixedValue)&&void 0!==e?e:0;return 0===t?null:Br(t,2)}render(){return this.feeQuote&&this.amount?H`
|
|
7118
7095
|
<div class="fee-item">
|
|
7119
7096
|
<div class="fee-info">
|
|
7120
7097
|
<div class="fee-name">${this.name}</div>
|
|
@@ -7128,7 +7105,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7128
7105
|
</div>
|
|
7129
7106
|
<div class="fee-amount">${this.amount}</div>
|
|
7130
7107
|
</div>
|
|
7131
|
-
`:H``}};
|
|
7108
|
+
`:H``}};yc.styles=mc,bc([pe({type:Object})],yc.prototype,"feeQuote",void 0),yc=bc([ce("fee-item")],yc);var vc=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 wc=class extends ue{constructor(){super(...arguments),this.feeQuotes=[]}get itemType(){const e=this.feeQuotes[0];return(null==e?void 0:e.sourceRentableItem)?Rr(e.sourceRentableItem.description||""):""}get priceGroups(){const e=new Map;return this.feeQuotes.forEach(t=>{var n;const i=null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0;e.set(i,(e.get(i)||0)+1)}),Array.from(e.entries()).map(([e,t])=>({price:e,count:t})).sort((e,t)=>e.price-t.price)}get totalAmount(){const e=this.feeQuotes.reduce((e,t)=>{var n;return e+(null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0)},0);return Br(e,2)}get priceBreakdown(){const e=this.priceGroups;if(0===e.length)return"";const t=this.getUnitName();return e.map(e=>{return`${e.count} ${n=t,i=e.count,1===i?n:`${n}s`} @ ${Br(e.price,2)}/month`;var n,i}).join(" + ")}getUnitName(){var e;const t=this.feeQuotes[0];return function(e){const t=e.toLowerCase();return t.includes("garage")||t.includes("parking")?"space":t.includes("storage")?"unit":t.includes("locker")?"locker":t.includes("bike")?"spot":"unit"}((null===(e=null==t?void 0:t.sourceRentableItem)||void 0===e?void 0:e.description)||"")}render(){return this.feeQuotes.length&&this.totalAmount!==Br(0,2)?H`
|
|
7132
7109
|
<div class="fee-item">
|
|
7133
7110
|
<div class="fee-info">
|
|
7134
7111
|
<div class="fee-name">${this.itemType}</div>
|
|
@@ -7136,7 +7113,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7136
7113
|
</div>
|
|
7137
7114
|
<div class="fee-amount">${this.totalAmount}</div>
|
|
7138
7115
|
</div>
|
|
7139
|
-
`:H``}};
|
|
7116
|
+
`:H``}};wc.styles=mc,vc([pe({type:Array})],wc.prototype,"feeQuotes",void 0),wc=vc([ce("grouped-rentable-item")],wc);const Cc=p`
|
|
7140
7117
|
.fee-card-section-container {
|
|
7141
7118
|
margin: 0 12px;
|
|
7142
7119
|
border-radius: 4px;
|
|
@@ -7196,7 +7173,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7196
7173
|
margin: 12px;
|
|
7197
7174
|
justify-content: space-between;
|
|
7198
7175
|
}
|
|
7199
|
-
`;var
|
|
7176
|
+
`;var xc=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 $c=class extends ue{constructor(){super(...arguments),this.title="Fees",this.fees=[],this.buildingFeesToQuantity={},this.handleQuantityChange=(e,t)=>{this.buildingFeesToQuantity[e]=t,this.requestUpdate()}}get totalAmount(){const e=this.fees.reduce((e,t)=>{var n;return e+(null!==(n=t.amountRange.fixedValue)&&void 0!==n?n:0)},0);return Br(e,2)}get groupedRentableItems(){const e=this.fees.filter(e=>e.sourceRentableItem);e.sort((e,t)=>{var n,i;const r=(null===(n=e.sourceRentableItem)||void 0===n?void 0:n.description)||"",o=(null===(i=t.sourceRentableItem)||void 0===i?void 0:i.description)||"";return r.localeCompare(o,navigator.language,{numeric:!0})});const t={};return e.forEach(e=>{var n;const i=(null===(n=e.sourceRentableItem)||void 0===n?void 0:n.description)||"unknown";t[i]||(t[i]=[]),t[i].push(e)}),t}get nonRentableItems(){return this.fees.filter(e=>!e.sourceRentableItem)}render(){return H`
|
|
7200
7177
|
<div class="fee-card-section-container">
|
|
7201
7178
|
<div class="fee-card-section-header">
|
|
7202
7179
|
<h1 class="section-title">${this.title}</h1>
|
|
@@ -7220,7 +7197,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7220
7197
|
</div>
|
|
7221
7198
|
</div>
|
|
7222
7199
|
</div>
|
|
7223
|
-
`}}
|
|
7200
|
+
`}};$c.styles=Cc,xc([pe({type:String})],$c.prototype,"title",void 0),xc([pe({type:Array})],$c.prototype,"fees",void 0),xc([fe()],$c.prototype,"buildingFeesToQuantity",void 0),$c=xc([ce("fee-card")],$c);const Sc=p`
|
|
7224
7201
|
:host {
|
|
7225
7202
|
--transition-timing: 0.2s ease;
|
|
7226
7203
|
display: flex;
|
|
@@ -7429,7 +7406,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7429
7406
|
font-weight: bold;
|
|
7430
7407
|
color: #0066cc;
|
|
7431
7408
|
}
|
|
7432
|
-
`;var
|
|
7409
|
+
`;var kc;!function(e){e.NEVER="NEVER",e.ONE_TIME="ONE_TIME",e.MONTHLY="MONTHLY",e.WEEKLY="WEEKLY",e.BI_WEEKLY="BI_WEEKLY",e.ANNUALLY="ANNUALLY",e.DAILY="DAILY"}(kc||(kc={}));var Ac=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};const Tc=["num_cats","num_dogs","num_other_pets"];let Ec=class extends ue{constructor(){super(...arguments),this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1,num_cats:0,num_dogs:0,num_other_pets:0},this.onChargeInputsChange=null,this.disabled=!1,this.maxPets=null,this.rentableItems=[],this.selectedRentableItems=[],this.onRentableItemAdd=null,this.onRentableItemRemove=null,this.handleRentableItemToggle=e=>{var t,n;if(this.selectedRentableItems.some(t=>t.type===e.type)){const n=this.selectedRentableItems.find(t=>t.type===e.type);n&&(null===(t=this.onRentableItemRemove)||void 0===t||t.call(this,n))}else{const t=e.minAvailableItem||e.allItems[0];if(t){const i={id:t.id,type:e.type};null===(n=this.onRentableItemAdd)||void 0===n||n.call(this,i)}}}}get totalPets(){var e,t,n;return(null!==(e=this.chargeInputs.num_cats)&&void 0!==e?e:0)+(null!==(t=this.chargeInputs.num_dogs)&&void 0!==t?t:0)+(null!==(n=this.chargeInputs.num_other_pets)&&void 0!==n?n:0)}isAtPetLimit(e){return null!==this.maxPets&&Tc.includes(e)&&this.totalPets>=this.maxPets}handleIncrement(e){var t,n;if(this.isAtPetLimit(e))return;const i=(null!==(t=this.chargeInputs[e])&&void 0!==t?t:0)+1;Tc.includes(e)?this.updatePetCount({[e]:i}):null===(n=this.onChargeInputsChange)||void 0===n||n.call(this,{[e]:i})}handleDecrement(e){var t,n;const i=null!==(t=this.chargeInputs[e])&&void 0!==t?t:0,r="num_applicants"===e?1:0,o=Math.max(r,i-1);Tc.includes(e)?this.updatePetCount({[e]:o}):null===(n=this.onChargeInputsChange)||void 0===n||n.call(this,{[e]:o})}updatePetCount(e){var t,n,i,r;const o={...this.chargeInputs,...e},a=(null!==(t=o.num_cats)&&void 0!==t?t:0)+(null!==(n=o.num_dogs)&&void 0!==n?n:0)+(null!==(i=o.num_other_pets)&&void 0!==i?i:0);null===(r=this.onChargeInputsChange)||void 0===r||r.call(this,{...e,num_pets:a})}getFieldLabel(e){return{base_rent:"Base Rent ($)",num_pets:"Pets",num_vehicles:"Vehicles",num_applicants:"Applicants",num_cats:"Cats",num_dogs:"Dogs",num_other_pets:"All Other Pets"}[e]||e}renderRentableItemRow(e){const t=this.selectedRentableItems.some(t=>t.type===e.type);return H`
|
|
7433
7410
|
<div class="rentable-item-row">
|
|
7434
7411
|
<div class="rentable-item-info">
|
|
7435
7412
|
<div class="rentable-item-label">${e.description}</div>
|
|
@@ -7478,7 +7455,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7478
7455
|
${["num_applicants","num_cats","num_dogs","num_other_pets"].map(e=>this.renderChargeInputRow(e))}
|
|
7479
7456
|
${null!==this.maxPets?H`
|
|
7480
7457
|
<div class="charge-input-note">
|
|
7481
|
-
${
|
|
7458
|
+
${sc(this.maxPets)}
|
|
7482
7459
|
</div>
|
|
7483
7460
|
`:""}
|
|
7484
7461
|
</div>
|
|
@@ -7490,7 +7467,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7490
7467
|
</div>
|
|
7491
7468
|
`:""}
|
|
7492
7469
|
</div>
|
|
7493
|
-
`}};
|
|
7470
|
+
`}};Ec.styles=p`
|
|
7494
7471
|
.charge-inputs-container {
|
|
7495
7472
|
background: white;
|
|
7496
7473
|
border-radius: 8px;
|
|
@@ -7624,7 +7601,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7624
7601
|
opacity: 0.5;
|
|
7625
7602
|
cursor: not-allowed;
|
|
7626
7603
|
}
|
|
7627
|
-
`,
|
|
7604
|
+
`,Ac([pe({type:Object})],Ec.prototype,"chargeInputs",void 0),Ac([pe()],Ec.prototype,"onChargeInputsChange",void 0),Ac([pe({type:Boolean})],Ec.prototype,"disabled",void 0),Ac([pe({type:Number})],Ec.prototype,"maxPets",void 0),Ac([pe({type:Array})],Ec.prototype,"rentableItems",void 0),Ac([pe({type:Array})],Ec.prototype,"selectedRentableItems",void 0),Ac([pe()],Ec.prototype,"onRentableItemAdd",void 0),Ac([pe()],Ec.prototype,"onRentableItemRemove",void 0),Ec=Ac([ce("charge-inputs")],Ec);const _c=p`
|
|
7628
7605
|
:host {
|
|
7629
7606
|
--skeleton-bg-color: #eaeaea;
|
|
7630
7607
|
--skeleton-highlight-color: #f5f5f5;
|
|
@@ -7638,8 +7615,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7638
7615
|
background-position: 200px 0;
|
|
7639
7616
|
}
|
|
7640
7617
|
}
|
|
7641
|
-
`,
|
|
7642
|
-
${
|
|
7618
|
+
`,Oc=p`
|
|
7619
|
+
${_c}
|
|
7643
7620
|
|
|
7644
7621
|
:host {
|
|
7645
7622
|
display: block;
|
|
@@ -7704,8 +7681,8 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7704
7681
|
margin-bottom: 10px;
|
|
7705
7682
|
}
|
|
7706
7683
|
}
|
|
7707
|
-
`,
|
|
7708
|
-
${
|
|
7684
|
+
`,Pc=p`
|
|
7685
|
+
${_c}
|
|
7709
7686
|
|
|
7710
7687
|
:host {
|
|
7711
7688
|
display: block;
|
|
@@ -7727,23 +7704,23 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7727
7704
|
box-sizing: border-box;
|
|
7728
7705
|
}
|
|
7729
7706
|
}
|
|
7730
|
-
`;var
|
|
7707
|
+
`;var Ic=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 Nc=class extends ue{constructor(){super(...arguments),this.rows=2,this.header=!0}render(){return H`
|
|
7731
7708
|
<div class="skeleton-card">
|
|
7732
7709
|
${this.header?H`<div class="skeleton-header"></div>`:""}
|
|
7733
7710
|
${Array(this.rows).fill(0).map(()=>H`<div class="skeleton-row"></div>`)}
|
|
7734
7711
|
</div>
|
|
7735
|
-
`}};
|
|
7712
|
+
`}};Nc.styles=Oc,Ic([pe({type:Number})],Nc.prototype,"rows",void 0),Ic([pe({type:Boolean})],Nc.prototype,"header",void 0),Nc=Ic([ce("skeleton-card")],Nc);var Mc=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 Dc=class extends ue{constructor(){super(...arguments),this.cards=3,this.rowsPerCard=[3,2,1]}render(){return H`
|
|
7736
7713
|
<div class="skeleton-loader">
|
|
7737
7714
|
${Array.from({length:this.cards},(e,t)=>{const n=Array.isArray(this.rowsPerCard)?this.rowsPerCard[t]||2:this.rowsPerCard;return H`<skeleton-card .rows=${n}></skeleton-card>`})}
|
|
7738
7715
|
</div>
|
|
7739
|
-
`}};
|
|
7716
|
+
`}};Dc.styles=Pc,Mc([pe({type:Number})],Dc.prototype,"cards",void 0),Mc([pe({type:Array})],Dc.prototype,"rowsPerCard",void 0),Dc=Mc([ce("skeleton-loader")],Dc);var Lc=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 Rc=class extends ue{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.quoteError=null,this.layoutOptions=[],this.selectedLayoutIds=[Jd],this.groupedFees={[Vd.ONE_TIME]:[],[Vd.MONTHLY]:[],[Vd.WEEKLY]:[],[Vd.BI_WEEKLY]:[],[Vd.ANNUALLY]:[],[Vd.DAILY]:[],[Vd.AS_NEEDED]:[],[Vd.NEVER]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1},this.onChargeInputsChange=null,this.maxPets=null,this.selectedRentableItems=[],this.onRentableItemAdd=null,this.onRentableItemRemove=null}get rentAsFeeQuote(){var e,t;return(null===(e=this.quote)||void 0===e?void 0:e.rentCost)?{marketableFee:{id:"rent",buildingId:this.quote.buildingId||0,feeName:"Rent",amount:this.quote.rentCost,amountDisplay:Br(this.quote.rentCost,2),minEstimate:null,maxEstimate:null,percentRentMin:null,percentRentMax:null,percentRent:null,frequency:kc.MONTHLY,category:"Rent",hiddenReason:null,description:`Unit ${null===(t=this.selectedUnit)||void 0===t?void 0:t.unitNumber}`,additionalInfo:null,refundable:!1,unitIds:null,layoutIds:null,startDate:null,endDate:null,triggeredByEvent:null,externalKey:null,chargeCode:null,bundleKey:null,source:null,publicFacing:!0,perApplicant:!1,prorated:null,syncActive:!0},amountRange:{fixedValue:this.quote.rentCost,minValue:null,maxValue:null},chargeInputs:{baseRent:this.quote.rentCost,numPets:0,numDogs:0,numCats:0,numOtherPets:0,numVehicles:0,numApplicants:1,unitId:this.quote.unitId,layoutId:null},isAddon:!1}:null}renderRecurringFeeSection(e,t){return(null==t?void 0:t.length)?H` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t;const n=[],i=[{freq:kc.ANNUALLY,title:"Yearly Charges"},{freq:kc.MONTHLY,title:"Monthly Charges"},{freq:kc.BI_WEEKLY,title:"Bi-Weekly Charges"},{freq:kc.WEEKLY,title:"Weekly Charges"},{freq:kc.DAILY,title:"Daily Charges"},{freq:kc.ONE_TIME,title:"One-Time"},{freq:kc.NEVER,title:"No Charges"}],r=null===(e=this.quote)||void 0===e?void 0:e.feeQuotes;for(const{freq:e,title:o}of i){if(!(null==r?void 0:r.length)&&e!==kc.MONTHLY)continue;let i=null!==(t=null==r?void 0:r.filter(t=>{var n,i;if((null===(n=t.marketableFee)||void 0===n?void 0:n.frequency)===e){if(e===kc.ONE_TIME){return["APPLICATION_SUBMISSION","APPLICATION_APPROVAL","LEASE_SIGNING","MOVE_IN"].includes((null===(i=t.marketableFee)||void 0===i?void 0:i.triggeredByEvent)||"")}return!0}return!!t.sourceRentableItem&&("monthly"===t.sourceRentableItem.rentFrequency&&e===kc.MONTHLY||"annually"===t.sourceRentableItem.rentFrequency&&e===kc.ANNUALLY)}))&&void 0!==t?t:[];if(e===kc.MONTHLY){const e=this.rentAsFeeQuote;e&&(i=[e,...i])}const a=this.renderRecurringFeeSection(o,i);a&&n.push(a)}return n}renderTotalCost(){var e;if(!(null===(e=this.quote)||void 0===e?void 0:e.totalMonthlyCost))return null;const t=this.quote.totalMonthlyCost.fixedValue;return t?H`
|
|
7740
7717
|
<div class="total-cost-section">
|
|
7741
7718
|
<div class="total-cost-row">
|
|
7742
7719
|
<span class="total-cost-label">Total Monthly Cost:</span>
|
|
7743
7720
|
<span class="total-cost-amount">${Br(t,2)}</span>
|
|
7744
7721
|
</div>
|
|
7745
7722
|
</div>
|
|
7746
|
-
`:null}getQuoteErrorMessage(e){if("feeLimit"===e.type){return`${
|
|
7723
|
+
`:null}getQuoteErrorMessage(e){if("feeLimit"===e.type){return`${sc(Math.min(...e.violations.map(e=>e.limit)))}. Remove a pet to see your estimate.`}return"We couldn't calculate an estimate. Please adjust your selections or try again later."}renderFeesContent(){return this.selectedUnit?this.quoteError&&!this.showSkeletonLoader?H`
|
|
7747
7724
|
<div class="fees-container empty-state" role="alert">
|
|
7748
7725
|
<p class="quote-error-message">
|
|
7749
7726
|
${this.getQuoteErrorMessage(this.quoteError)}
|
|
@@ -7799,7 +7776,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7799
7776
|
|
|
7800
7777
|
${this.renderFeesContent()}
|
|
7801
7778
|
</div>
|
|
7802
|
-
`}};
|
|
7779
|
+
`}};Rc.styles=Sc,Lc([pe({type:String})],Rc.prototype,"buildingSlug",void 0),Lc([pe({type:Boolean})],Rc.prototype,"showSkeletonLoader",void 0),Lc([pe({type:Object})],Rc.prototype,"selectedUnit",void 0),Lc([pe({type:Object})],Rc.prototype,"quote",void 0),Lc([pe({type:Object})],Rc.prototype,"quoteError",void 0),Lc([pe({type:Array})],Rc.prototype,"layoutOptions",void 0),Lc([pe({type:Array})],Rc.prototype,"selectedLayoutIds",void 0),Lc([pe({type:Object})],Rc.prototype,"groupedFees",void 0),Lc([pe({type:Array})],Rc.prototype,"rentableItems",void 0),Lc([pe({type:Array})],Rc.prototype,"units",void 0),Lc([pe({type:Boolean})],Rc.prototype,"isLoadingUnits",void 0),Lc([pe({type:Boolean})],Rc.prototype,"isLoadingLayouts",void 0),Lc([pe()],Rc.prototype,"onSelectLayout",void 0),Lc([pe()],Rc.prototype,"onUnitSelect",void 0),Lc([pe()],Rc.prototype,"onMoveInDateChange",void 0),Lc([pe()],Rc.prototype,"onLeaseTermChange",void 0),Lc([pe({type:Object})],Rc.prototype,"chargeInputs",void 0),Lc([pe()],Rc.prototype,"onChargeInputsChange",void 0),Lc([pe({type:Number})],Rc.prototype,"maxPets",void 0),Lc([pe({type:Array})],Rc.prototype,"selectedRentableItems",void 0),Lc([pe()],Rc.prototype,"onRentableItemAdd",void 0),Lc([pe()],Rc.prototype,"onRentableItemRemove",void 0),Rc=Lc([ce("fee-calculator-layout")],Rc);var Bc,Uc,jc,Fc;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(Bc||(Bc={})),function(e){e.Debit="Debit",e.Credit="Credit"}(Uc||(Uc={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}(jc||(jc={})),function(e){e.AdminFee="AdminFee",e.ApplicationFee="ApplicationFee",e.Concession="Concession",e.Insurance="Insurance",e.LateFee="LateFee",e.Legal="Legal",e.NonSufficientFundFee="NSF",e.Other="Other",e.Parking="Parking",e.Penalty="Penalty",e.Pest="Pest",e.PetDeposit="PetDeposit",e.PetRent="PetRent",e.Refund="Refund",e.Relet="Relet",e.Rent="Rent",e.SecurityDeposit="SecurityDeposit",e.Storage="Storage",e.Trash="Trash",e.Utility="Utility",e.WaterSewer="WaterSewer"}(Fc||(Fc={}));const Hc=p`
|
|
7803
7780
|
:host {
|
|
7804
7781
|
display: block;
|
|
7805
7782
|
--table-header-bg: white;
|
|
@@ -7867,7 +7844,48 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7867
7844
|
color: #888;
|
|
7868
7845
|
font-style: italic;
|
|
7869
7846
|
}
|
|
7870
|
-
|
|
7847
|
+
`;var zc=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 Gc=class extends ue{constructor(){super(...arguments),this.tooltip="",this.disabled=!1}render(){return H`
|
|
7848
|
+
<div
|
|
7849
|
+
class="tooltip-container ${this.disabled?"":"show-tooltip"}"
|
|
7850
|
+
data-tooltip="${this.tooltip}"
|
|
7851
|
+
>
|
|
7852
|
+
<slot></slot>
|
|
7853
|
+
</div>
|
|
7854
|
+
`}};Gc.styles=p`
|
|
7855
|
+
:host {
|
|
7856
|
+
display: block;
|
|
7857
|
+
position: relative;
|
|
7858
|
+
width: 100%;
|
|
7859
|
+
}
|
|
7860
|
+
|
|
7861
|
+
.tooltip-container {
|
|
7862
|
+
position: relative;
|
|
7863
|
+
width: 100%;
|
|
7864
|
+
}
|
|
7865
|
+
|
|
7866
|
+
.tooltip-container.show-tooltip::after {
|
|
7867
|
+
content: attr(data-tooltip);
|
|
7868
|
+
position: absolute;
|
|
7869
|
+
top: -30px;
|
|
7870
|
+
left: 50%;
|
|
7871
|
+
transform: translateX(-50%);
|
|
7872
|
+
background-color: #333;
|
|
7873
|
+
color: white;
|
|
7874
|
+
padding: 5px 10px;
|
|
7875
|
+
border-radius: 4px;
|
|
7876
|
+
font-size: 12px;
|
|
7877
|
+
white-space: nowrap;
|
|
7878
|
+
opacity: 0;
|
|
7879
|
+
visibility: hidden;
|
|
7880
|
+
transition: opacity 0.3s, visibility 0.3s;
|
|
7881
|
+
z-index: 1000;
|
|
7882
|
+
}
|
|
7883
|
+
|
|
7884
|
+
.tooltip-container.show-tooltip:hover::after {
|
|
7885
|
+
opacity: 1;
|
|
7886
|
+
visibility: visible;
|
|
7887
|
+
}
|
|
7888
|
+
`,zc([pe({type:String})],Gc.prototype,"tooltip",void 0),zc([pe({type:Boolean,reflect:!0})],Gc.prototype,"disabled",void 0),Gc=zc([ce("simple-tooltip")],Gc);const Vc=p`
|
|
7871
7889
|
:host {
|
|
7872
7890
|
display: inline-flex;
|
|
7873
7891
|
}
|
|
@@ -7926,7 +7944,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7926
7944
|
font-style: italic;
|
|
7927
7945
|
cursor: not-allowed;
|
|
7928
7946
|
}
|
|
7929
|
-
`;var
|
|
7947
|
+
`;var Wc=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 Qc=class extends ue{constructor(){super(...arguments),this.feeItem=null,this._previousFeeItemId=null,this.onQuantityChange=null,this.disabled=!1,this.quantity=0}get maxQuantity(){var e,t;return null!==(t=null===(e=this.feeItem)||void 0===e?void 0:e.max_estimate)&&void 0!==t?t:10}updated(e){var t,n;if(!e.has("feeItem"))return;const i=null!==(n=null===(t=this.feeItem)||void 0===t?void 0:t.id)&&void 0!==n?n:null;i!==this._previousFeeItemId&&(this.quantity=0,this._previousFeeItemId=i)}handleIncrement(){this.disabled||this.quantity>=this.maxQuantity||(this.quantity+=1,this.notifyQuantityChange())}handleDecrement(){this.disabled||this.quantity<=0||(this.quantity=Math.max(0,this.quantity-1),this.notifyQuantityChange())}notifyQuantityChange(){this.onQuantityChange&&this.feeItem&&this.onQuantityChange({id:this.feeItem.id,quantities:[{itemType:this.feeItem.fee_name,quantity:this.quantity}]})}render(){return this.feeItem?H`
|
|
7930
7948
|
<div class="quantity-control ${this.disabled?"unavailable":""}">
|
|
7931
7949
|
<button
|
|
7932
7950
|
class="quantity-button"
|
|
@@ -7948,7 +7966,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7948
7966
|
<span class="operator-sign">+</span>
|
|
7949
7967
|
</button>
|
|
7950
7968
|
</div>
|
|
7951
|
-
`:H``}};
|
|
7969
|
+
`:H``}};Qc.styles=Vc,Wc([pe({type:Object})],Qc.prototype,"feeItem",void 0),Wc([pe()],Qc.prototype,"onQuantityChange",void 0),Wc([pe({type:Boolean,reflect:!0})],Qc.prototype,"disabled",void 0),Wc([pe({type:Number})],Qc.prototype,"quantity",void 0),Qc=Wc([ce("table-addon-qty-selector")],Qc);let qc=class extends ue{constructor(){super(...arguments),this.rentableItem=null,this._previousRentableItemType=null,this.onQuantityChange=null,this.disabled=!1,this.quantity=0,this.selectedItemIds=new Set}get totalAvailableItems(){var e,t,n;return null!==(n=null===(t=null===(e=this.rentableItem)||void 0===e?void 0:e.allItems)||void 0===t?void 0:t.filter(e=>e.available).length)&&void 0!==n?n:0}get maxSelectableItems(){return Math.min(this.totalAvailableItems,10)}get atMaxUnits(){return this.quantity>=this.maxSelectableItems}get atMinUnits(){return this.quantity<=0}updated(e){var t,n;if(e.has("rentableItem")){const e=null!==(n=null===(t=this.rentableItem)||void 0===t?void 0:t.type)&&void 0!==n?n:null;e!==this._previousRentableItemType&&(this.selectedItemIds=new Set,this._previousRentableItemType=e)}}handleIncrement(){this.disabled||this.atMaxUnits||this.emitChange(this.quantity+1)}handleDecrement(){this.disabled||this.atMinUnits||this.emitChange(Math.max(0,this.quantity-1))}emitChange(e){var t;this.rentableItem&&(null===(t=this.onQuantityChange)||void 0===t||t.call(this,{type:this.rentableItem.type,quantity:e}))}render(){if(!this.rentableItem)return H``;const e=this.totalAvailableItems>0,t=this.disabled||!e||this.atMaxUnits,n=this.disabled||this.quantity<=0;return H`
|
|
7952
7970
|
<div
|
|
7953
7971
|
class="quantity-control ${!e||this.disabled?"unavailable":""}"
|
|
7954
7972
|
>
|
|
@@ -7972,7 +7990,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
7972
7990
|
<span class="operator-sign">+</span>
|
|
7973
7991
|
</button>
|
|
7974
7992
|
</div>
|
|
7975
|
-
`}};
|
|
7993
|
+
`}};qc.styles=Vc,Wc([pe({type:Object})],qc.prototype,"rentableItem",void 0),Wc([pe()],qc.prototype,"onQuantityChange",void 0),Wc([pe({type:Boolean,reflect:!0})],qc.prototype,"disabled",void 0),Wc([pe({type:Number})],qc.prototype,"quantity",void 0),Wc([pe({type:Set})],qc.prototype,"selectedItemIds",void 0),qc=Wc([ce("table-rentable-item-qty-selector")],qc);var Yc=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 Kc=class extends ue{constructor(){super(...arguments),this._addons=[],this.disabled=!1,this.onAddonSelect=null,this.onRentableItemAdd=null,this.onRentableItemRemove=null,this.quantities=new Map,this.selectedRentableItemIds=new Map,this.handleAddonQuantityChange=e=>{var t;const n=e.id;1!==e.quantities.length||Array.isArray(this.quantities.get(n))?this.quantities.set(n,e.quantities):this.quantities.set(n,e.quantities[0].quantity),this.requestUpdate("quantities"),null===(t=this.onAddonSelect)||void 0===t||t.call(this,e)},this.handleRentableItemQuantityChange=e=>{var t,n,i,r,o,a;const s=null!==(t=this.quantities.get(e.type))&&void 0!==t?t:0;this.quantities.set(e.type,e.quantity),this.requestUpdate("quantities");const l=this.addons.find(t=>t instanceof Gd&&t.type===e.type);if(!l)return;const u=null!==(n=this.selectedRentableItemIds.get(e.type))&&void 0!==n?n:new Set,d=(c=null!==(r=null===(i=l.allItems)||void 0===i?void 0:i.filter(e=>e.available))&&void 0!==r?r:[],[...c].sort((e,t)=>e.rent!==t.rent?e.rent-t.rent:e.id.localeCompare(t.id)));var c;if(e.quantity>s){const t=e.quantity-s;let n=0;const i=Math.min(d.length,10);if(u.size+t>i)return;for(const i of d){if(n>=t)break;u.has(i.id)||(u.add(i.id),null===(o=this.onRentableItemAdd)||void 0===o||o.call(this,{id:i.id,type:e.type}),n++)}}else if(e.quantity<s){const t=s-e.quantity;let n=0;const i=function(e){return[...e].sort((e,t)=>e.rent!==t.rent?t.rent-e.rent:t.id.localeCompare(e.id))}(d.filter(e=>u.has(e.id)));for(const r of i){if(n>=t)break;u.delete(r.id),null===(a=this.onRentableItemRemove)||void 0===a||a.call(this,{id:r.id,type:e.type}),n++}}this.selectedRentableItemIds.set(e.type,u),this.requestUpdate("selectedRentableItemIds")}}set addons(e){const t=this._addons;this._addons=e,e!==t&&this.initializeQuantities(),this.requestUpdate("addons",t)}get addons(){return this._addons}preserveExistingQuantity(e,t){const n=this.quantities.get(e);return null!=n?n:t}initializeRentableItemQuantity(e,t){const n=this.preserveExistingQuantity(e.type,0);t.set(e.type,n),this.selectedRentableItemIds.has(e.type)||this.selectedRentableItemIds.set(e.type,new Set)}initializeBuildingFeeQuantity(e,t){const n=e.id,i=this.preserveExistingQuantity(n,0);t.set(n,i)}initializeQuantities(){const e=new Map;this.addons.forEach(t=>{t instanceof Gd?this.initializeRentableItemQuantity(t,e):this.initializeBuildingFeeQuantity(t,e)}),this.quantities=e}getName(e){return e instanceof Gd?e.displayName:e.fee_name}getSortedAddons(){return[...this.addons].sort((e,t)=>{const n=this.getName(e),i=this.getName(t);return n.localeCompare(i,navigator.language,{numeric:!0})})}isRentableItemAvailable(e){var t,n;return!(e instanceof Gd)||(null!==(n=null===(t=e.allItems)||void 0===t?void 0:t.filter(e=>e.available).length)&&void 0!==n?n:0)>0}renderQtySelector(e){var t;if(e instanceof Gd){const n=null!==(t=this.quantities.get(e.type))&&void 0!==t?t:0;return H`
|
|
7976
7994
|
<table-rentable-item-qty-selector
|
|
7977
7995
|
.rentableItem=${e}
|
|
7978
7996
|
.quantity=${n}
|
|
@@ -8013,7 +8031,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8013
8031
|
</tbody>
|
|
8014
8032
|
</table>
|
|
8015
8033
|
</div>
|
|
8016
|
-
`:H`<div class="empty-state">No add-ons available</div> `}};
|
|
8034
|
+
`:H`<div class="empty-state">No add-ons available</div> `}};Kc.styles=Hc,Yc([pe({type:Array})],Kc.prototype,"addons",null),Yc([pe({type:Boolean})],Kc.prototype,"disabled",void 0),Yc([pe()],Kc.prototype,"onAddonSelect",void 0),Yc([pe({attribute:!1})],Kc.prototype,"onRentableItemAdd",void 0),Yc([pe({attribute:!1})],Kc.prototype,"onRentableItemRemove",void 0),Yc([fe()],Kc.prototype,"quantities",void 0),Yc([fe()],Kc.prototype,"selectedRentableItemIds",void 0),Kc=Yc([ce("addon-table")],Kc);var Xc=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 Zc=class extends ue{constructor(){super(...arguments),this.id="",this.showChatAdditionalActions=!1,this.buildingWebchatView=null,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this.enabledChatWidgets={callDesktop:!1,chatDesktop:!1,emailDesktop:!1,textDesktop:!1,sstDesktop:!1},this.onClickMinimize=()=>{},this.onClickEmailOption=()=>{},this.onClickPhoneOption=()=>{},this.onClickSSTOption=()=>{},this.onClose=()=>{}}render(){var e,t,n;const i=this.primaryColor||Zn,r=this.backgroundColor||"#ffffff",o=this.buildingWebchatView&&ii(this.buildingWebchatView.orgId,this.buildingWebchatView.id)&&i!==Zn?ni(i,.6):"black";return H`
|
|
8017
8035
|
<style>
|
|
8018
8036
|
#${this.id}::after {
|
|
8019
8037
|
border-right-color: ${o} !important;
|
|
@@ -8045,7 +8063,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8045
8063
|
.onClick=${this.onClose}
|
|
8046
8064
|
></minimize-expand-button>
|
|
8047
8065
|
</div>
|
|
8048
|
-
`}};
|
|
8066
|
+
`}};Zc.styles=p`
|
|
8049
8067
|
.hideTab {
|
|
8050
8068
|
display: none;
|
|
8051
8069
|
}
|
|
@@ -8055,7 +8073,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8055
8073
|
justify-content: space-between;
|
|
8056
8074
|
gap: 32px;
|
|
8057
8075
|
}
|
|
8058
|
-
`,
|
|
8076
|
+
`,Xc([pe({type:String})],Zc.prototype,"id",void 0),Xc([pe({type:Boolean})],Zc.prototype,"showChatAdditionalActions",void 0),Xc([pe({type:Object})],Zc.prototype,"buildingWebchatView",void 0),Xc([pe({type:String})],Zc.prototype,"primaryColor",void 0),Xc([pe({type:String})],Zc.prototype,"backgroundColor",void 0),Xc([pe({type:String})],Zc.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Xc([pe({type:String})],Zc.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Xc([pe({type:Object})],Zc.prototype,"enabledChatWidgets",void 0),Xc([pe({attribute:!0})],Zc.prototype,"onClickMinimize",void 0),Xc([pe({attribute:!0})],Zc.prototype,"onClickEmailOption",void 0),Xc([pe({attribute:!0})],Zc.prototype,"onClickPhoneOption",void 0),Xc([pe({attribute:!0})],Zc.prototype,"onClickSSTOption",void 0),Xc([pe({attribute:!0})],Zc.prototype,"onClose",void 0),Zc=Xc([ce("chat-additional-actions")],Zc);const Jc=p`
|
|
8059
8077
|
:host {
|
|
8060
8078
|
display: block;
|
|
8061
8079
|
}
|
|
@@ -8092,9 +8110,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8092
8110
|
font-size: 0.9rem;
|
|
8093
8111
|
opacity: 0.9;
|
|
8094
8112
|
}
|
|
8095
|
-
`;var
|
|
8113
|
+
`;var eh=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 th=class extends ue{getFormattedEndDate(e){return new Date(e.endDate).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}render(){return this.incentive?H`
|
|
8096
8114
|
<div class="incentive-banner">
|
|
8097
|
-
<div class="incentive-icon">${
|
|
8115
|
+
<div class="incentive-icon">${lc({size:32})}</div>
|
|
8098
8116
|
<div class="incentive-content">
|
|
8099
8117
|
<h2 class="incentive-title">
|
|
8100
8118
|
${this.incentive.originalIncentiveString}
|
|
@@ -8105,7 +8123,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8105
8123
|
</p>
|
|
8106
8124
|
</div>
|
|
8107
8125
|
</div>
|
|
8108
|
-
`:H``}};
|
|
8126
|
+
`:H``}};th.styles=Jc,eh([pe({type:Object})],th.prototype,"incentive",void 0),th=eh([ce("incentive-banner")],th);var nh=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 ih=class extends ue{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.primaryColor=Zn,this.backgroundColor=Jn,this.onCloseClicked=null,this.onClickEmailOption=null,this.onClickPhoneOption=null,this.onClickSSTOption=null,this.onClickTextUsOption=null,this.isCalculatingQuote=!1,this.isLoadingLayouts=!0,this.isExporting=!1,this.selectedLayoutIds=[Jd],this.selectedUnit=null,this.chargeInputs={base_rent:0,num_pets:0,num_vehicles:0,num_applicants:1,num_cats:0,num_dogs:0,num_other_pets:0},this.desiredRentableItems=[],this.moveInDateString=ic(),this.leaseTerm=12,this.buildingWebchatView=null,this.incentives=[],this.quote=null,this.pdfUrl=null,this.quoteError=null,this.groupedFees={[Vd.ONE_TIME]:[],[Vd.MONTHLY]:[],[Vd.WEEKLY]:[],[Vd.BI_WEEKLY]:[],[Vd.ANNUALLY]:[],[Vd.DAILY]:[],[Vd.AS_NEEDED]:[],[Vd.NEVER]:[]},this.rentableItems=[],this.maxPets=null,this.units=[],this.isLoadingUnits=!0,this.quoteAbortController=null,this.quoteDebounceTimer=null,this.startQuoteApiCall=async()=>{var e;null===(e=this.quoteAbortController)||void 0===e||e.abort(),this.quoteAbortController=new AbortController,this.isCalculatingQuote=!0,await this.performQuoteCalculation(this.quoteAbortController.signal)},this.firstUpdated=async()=>{this.style.setProperty("--primary-color",this.primaryColor),this.style.setProperty("--background-color",this.backgroundColor),await Promise.allSettled([this.setupCalculator(),this.fetchUnits()])},this.setupCalculator=async()=>{if(!this.buildingSlug||!this.orgSlug)return void(this.isLoadingLayouts=!1);const e=wa(this.orgSlug,this.buildingSlug).then(e=>{e&&(this.buildingWebchatView=e)}).finally(()=>{this.isLoadingLayouts=!1}),t=Zd(this.buildingSlug).then(e=>{e&&(this.groupedFees=this.groupFees(e.fees),this.maxPets=function(e){const t=e.filter(e=>ac.includes(e.category)).map(e=>e.limit).filter(e=>"number"==typeof e);return t.length?Math.min(...t):null}(e.fees),this.rentableItems=e.rentableItems)});await Promise.allSettled([e,t])},this.requestQuoteCalculation=()=>{if(this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),!this.selectedUnit||!this.moveInDateString)return this.clearQuote(),void(this.isCalculatingQuote=!1);this.quoteDebounceTimer=window.setTimeout(()=>{this.startQuoteApiCall(),this.quoteDebounceTimer=null},1e3)},this.handleUnitSelect=e=>{const t=!this.selectedUnit;if(this.selectedUnit=e,t)return this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),this.isCalculatingQuote=!0,void this.startQuoteApiCall();this.requestQuoteCalculation()},this.handleMoveInDateChange=async e=>{this.moveInDateString=e,this.clearQuote(),await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleLeaseTermChange=async e=>{this.leaseTerm=e,this.clearQuote(),await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleChargeInputsChange=e=>{this.chargeInputs={...this.chargeInputs,...e},this.requestQuoteCalculation()},this.handleRentableItemAdd=e=>{this.desiredRentableItems.some(t=>t.id===e.id)||this.desiredRentableItems.push(e),this.requestQuoteCalculation()},this.handleRentableItemRemove=e=>{this.desiredRentableItems=this.desiredRentableItems.filter(t=>t.id!==e.id),this.requestQuoteCalculation()},this.groupFees=e=>e.reduce((e,t)=>{const n=t.frequency||Vd.ONE_TIME;return e[n]=[...e[n]||[],t],e},{}),this.handleClickEmailOption=e=>{this.handleClose(),this.onClickEmailOption&&this.onClickEmailOption(e)},this.handleClickPhoneOption=e=>{this.handleClose(),this.onClickPhoneOption&&this.onClickPhoneOption(e)},this.handleClickSSTOption=e=>{this.handleClose(),this.onClickSSTOption&&this.onClickSSTOption(e)},this.handleClickTextUsOption=e=>{this.handleClose(),this.onClickTextUsOption&&this.onClickTextUsOption(e)},this.handleClose=()=>{var e;null===(e=this.onCloseClicked)||void 0===e||e.call(this)},this.handleSelectLayout=async e=>{this.selectedLayoutIds=e,await this.fetchUnits()},this.handleShare=async()=>{var e,t;this.selectedUnit&&this.moveInDateString&&this.pdfUrl&&(Lo("feeCalculatorPdfDownloaded",{buildingSlug:this.buildingSlug,quoteId:null!==(t=null===(e=this.quote)||void 0===e?void 0:e.id)&&void 0!==t?t:null}),window.open(this.pdfUrl,"_blank"))},this.fetchUnits=async()=>{let e;this.isLoadingUnits=!0,this.selectedLayoutIds.includes(Jd)||(e=this.selectedLayoutIds.map(e=>Dd(e)));try{if(this.units=await oc({buildingSlug:this.buildingSlug,moveInDateString:this.moveInDateString,...e?{numBedrooms:e}:{},leaseTerm:this.leaseTerm}),this.selectedUnit){this.units.some(e=>{var t;return e.id===(null===(t=this.selectedUnit)||void 0===t?void 0:t.id)})||(this.selectedUnit=null,this.clearQuote())}}finally{this.isLoadingUnits=!1}}}clearQuote(){this.quote=null,this.pdfUrl=null,this.quoteError=null}async performQuoteCalculation(e){var t;if(!this.selectedUnit||!this.moveInDateString)return this.clearQuote(),void(this.isCalculatingQuote=!1);const n=this.moveInDateString,i=this.selectedUnit.id,r=this.leaseTerm;try{const o=await tc({buildingSlug:this.buildingSlug,unitId:i,chargeInputs:this.chargeInputs,rentableItems:this.desiredRentableItems,leaseTerm:r,moveInDate:n},e);if(e.aborted)return;this.quote=o.quote,this.pdfUrl=o.pdfUrl||null,this.quoteError=null!==(t=o.error)&&void 0!==t?t:null,this.quote&&Lo("feeCalculatorQuoteGenerated",{buildingSlug:this.buildingSlug,unitId:i,leaseTerm:r})}catch(e){"AbortError"!==(null==e?void 0:e.name)&&(this.quote=null,this.pdfUrl=null,this.quoteError={type:"unknown"},this.isCalculatingQuote=!1,Ao({logType:ko.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{error:e},error:e}))}finally{e.aborted||(this.isCalculatingQuote=!1)}}get layouts(){var e,t;return null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.layoutOptions)&&void 0!==t?t:[]}updated(e){(e.has("primaryColor")||e.has("backgroundColor"))&&(this.style.setProperty("--primary-color",this.primaryColor),this.style.setProperty("--background-color",this.backgroundColor))}disconnectedCallback(){var e;super.disconnectedCallback(),this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),null===(e=this.quoteAbortController)||void 0===e||e.abort(),this.quoteAbortController=null}render(){var e,t;const n=this.isExporting||this.isCalculatingQuote||!this.selectedUnit||!this.moveInDateString||!this.pdfUrl;return H`
|
|
8109
8127
|
<div
|
|
8110
8128
|
class="fee-calculator-container"
|
|
8111
8129
|
@keydown=${e=>e.stopPropagation()}
|
|
@@ -8137,7 +8155,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8137
8155
|
class="close-button"
|
|
8138
8156
|
@click=${this.handleClose}
|
|
8139
8157
|
>
|
|
8140
|
-
${
|
|
8158
|
+
${Xl("gray")}
|
|
8141
8159
|
</button>
|
|
8142
8160
|
</div>
|
|
8143
8161
|
</div>
|
|
@@ -8187,7 +8205,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8187
8205
|
</div>
|
|
8188
8206
|
`:""}
|
|
8189
8207
|
</div>
|
|
8190
|
-
`}};
|
|
8208
|
+
`}};ih.styles=Hd,nh([pe({attribute:!0})],ih.prototype,"buildingSlug",void 0),nh([pe({attribute:!0})],ih.prototype,"orgSlug",void 0),nh([pe({type:String})],ih.prototype,"primaryColor",void 0),nh([pe({type:String})],ih.prototype,"backgroundColor",void 0),nh([pe()],ih.prototype,"onCloseClicked",void 0),nh([pe()],ih.prototype,"onClickEmailOption",void 0),nh([pe()],ih.prototype,"onClickPhoneOption",void 0),nh([pe()],ih.prototype,"onClickSSTOption",void 0),nh([pe()],ih.prototype,"onClickTextUsOption",void 0),nh([fe()],ih.prototype,"isCalculatingQuote",void 0),nh([fe()],ih.prototype,"isLoadingLayouts",void 0),nh([fe()],ih.prototype,"isExporting",void 0),nh([fe()],ih.prototype,"selectedLayoutIds",void 0),nh([fe()],ih.prototype,"selectedUnit",void 0),nh([fe()],ih.prototype,"chargeInputs",void 0),nh([fe()],ih.prototype,"desiredRentableItems",void 0),nh([fe()],ih.prototype,"moveInDateString",void 0),nh([fe()],ih.prototype,"leaseTerm",void 0),nh([fe()],ih.prototype,"buildingWebchatView",void 0),nh([fe()],ih.prototype,"incentives",void 0),nh([fe()],ih.prototype,"quote",void 0),nh([fe()],ih.prototype,"pdfUrl",void 0),nh([fe()],ih.prototype,"quoteError",void 0),nh([fe()],ih.prototype,"groupedFees",void 0),nh([fe()],ih.prototype,"rentableItems",void 0),nh([fe()],ih.prototype,"maxPets",void 0),nh([fe()],ih.prototype,"units",void 0),nh([fe()],ih.prototype,"isLoadingUnits",void 0),ih=nh([ce("fee-calculator")],ih);const rh=p`
|
|
8191
8209
|
#minimize-mobile {
|
|
8192
8210
|
position: absolute;
|
|
8193
8211
|
top: -12px;
|
|
@@ -8236,9 +8254,9 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8236
8254
|
justify-content: center;
|
|
8237
8255
|
align-items: center;
|
|
8238
8256
|
}
|
|
8239
|
-
`,
|
|
8257
|
+
`,oh=(e="white")=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="14" viewBox="0 0 16 14" fill="none">
|
|
8240
8258
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.46964 0.488343H9.53036C10.898 0.488331 11.9813 0.488321 12.829 0.602304C13.7015 0.719609 14.4077 0.966767 14.9647 1.52369C15.5216 2.08061 15.7687 2.78681 15.886 3.65932C16 4.50711 16 5.59038 16 6.95802V7.04198C16 8.40962 16 9.49289 15.886 10.3407C15.7687 11.2132 15.5216 11.9194 14.9647 12.4763C14.4077 13.0332 13.7015 13.2804 12.829 13.3977C11.9813 13.5117 10.898 13.5117 9.53035 13.5117H6.46965C5.10201 13.5117 4.01875 13.5117 3.17096 13.3977C2.29846 13.2804 1.59227 13.0332 1.03534 12.4763C0.478423 11.9194 0.231266 11.2132 0.113961 10.3407C-2.09587e-05 9.49289 -1.15596e-05 8.40962 2.39342e-07 7.04198V6.95801C-1.15596e-05 5.59037 -2.09587e-05 4.50711 0.113961 3.65932C0.231266 2.78681 0.478423 2.08061 1.03534 1.52369C1.59227 0.966767 2.29846 0.719609 3.17096 0.602304C4.01875 0.488321 5.10201 0.488331 6.46964 0.488343ZM3.3197 1.70863C2.57098 1.8093 2.13962 1.99807 1.82467 2.31302C1.50973 2.62797 1.32095 3.05934 1.22029 3.80806C1.11746 4.57283 1.11628 5.58096 1.11628 7C1.11628 8.41903 1.11746 9.42716 1.22029 10.1919C1.32095 10.9407 1.50973 11.372 1.82467 11.687C2.13962 12.0019 2.57098 12.1907 3.3197 12.2914C4.08447 12.3942 5.0926 12.3954 6.51163 12.3954H9.48837C10.9074 12.3954 11.9155 12.3942 12.6803 12.2914C13.429 12.1907 13.8604 12.0019 14.1753 11.687C14.4903 11.372 14.6791 10.9407 14.7797 10.1919C14.8825 9.42716 14.8837 8.41903 14.8837 7C14.8837 5.58096 14.8825 4.57283 14.7797 3.80806C14.6791 3.05934 14.4903 2.62797 14.1753 2.31302C13.8604 1.99807 13.429 1.8093 12.6803 1.70863C11.9155 1.60581 10.9074 1.60463 9.48837 1.60463H6.51163C5.0926 1.60463 4.08448 1.60581 3.3197 1.70863ZM3.10611 3.66593C3.30345 3.42912 3.65539 3.39713 3.8922 3.59446L5.49882 4.93332C6.19311 5.5119 6.67515 5.9123 7.08211 6.17404C7.47605 6.42741 7.7432 6.51246 8 6.51246C8.2568 6.51246 8.52395 6.42741 8.91789 6.17404C9.32485 5.9123 9.80689 5.5119 10.5012 4.93332L12.1078 3.59446C12.3446 3.39713 12.6966 3.42912 12.8939 3.66593C13.0912 3.90273 13.0592 4.25468 12.8224 4.45202L11.1878 5.81419C10.5282 6.36389 9.99359 6.80943 9.52173 7.11291C9.0302 7.42904 8.5515 7.62875 8 7.62875C7.4485 7.62875 6.9698 7.42904 6.47827 7.11291C6.00641 6.80943 5.47179 6.36389 4.81218 5.81419L3.17757 4.45202C2.94077 4.25468 2.90877 3.90273 3.10611 3.66593Z" fill="${e}"/>
|
|
8241
|
-
</svg>`,
|
|
8259
|
+
</svg>`,ah=(e="black")=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="18" viewBox="0 0 16 18" fill="none">
|
|
8242
8260
|
<path d="M15.6825 6.11855H0.00653076C0.0588276 4.00052 1.79117 2.30087 3.92226 2.30087H4.41255V3.6083C4.41255 3.88285 4.63481 4.09858 4.90283 4.09858C5.17085 4.09858 5.39311 3.88285 5.39311 3.6083V2.30087H10.2959V3.6083C10.2959 3.88285 10.5182 4.09858 10.7862 4.09858C11.0542 4.09858 11.2765 3.88285 11.2765 3.6083V2.30087H11.7668C13.8979 2.30087 15.6302 4.00052 15.6825 6.11855Z" fill="${e}"/>
|
|
8243
8261
|
<path d="M15.0641 7.39731V14.0677C15.0641 15.8922 13.5861 17.365 11.7668 17.365H3.92227C2.10298 17.365 0.625 15.8922 0.625 14.0677V7.39731H15.0641Z" fill="transparent" stroke="${e}" stroke-width="1.25"/>
|
|
8244
8262
|
<path d="M4.90283 1V2.30742" stroke="${e}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -8246,14 +8264,14 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8246
8264
|
<path d="M0 6.11862H0.00653352C-3.5908e-06 6.15131 0 6.19053 0 6.22322V6.11862Z" fill="white"/>
|
|
8247
8265
|
<path d="M15.689 6.11862V6.22322C15.689 6.19053 15.689 6.15131 15.6825 6.11862H15.689Z" fill="white"/>
|
|
8248
8266
|
<path d="M4.74594 11.9562L6.56326 13.7735C6.8182 14.0285 7.23004 14.0285 7.48499 13.7735L10.9366 10.3219" stroke="${e}" stroke-miterlimit="10" stroke-linecap="round"/>
|
|
8249
|
-
</svg>`,
|
|
8267
|
+
</svg>`,sh=(e="white")=>z`
|
|
8250
8268
|
<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
8251
8269
|
<path
|
|
8252
8270
|
fill-rule="evenodd"
|
|
8253
8271
|
clip-rule="evenodd"
|
|
8254
8272
|
d="M6.64026 0.25H8.8598C10.0157 0.249995 10.9219 0.249992 11.6459 0.318826C12.3838 0.388987 12.988 0.534458 13.5206 0.860861C14.0784 1.20267 14.5474 1.67164 14.8892 2.22942C15.2156 2.76206 15.3611 3.36627 15.4312 4.10419C15.5001 4.82813 15.5001 5.73432 15.5001 6.89025V7.65964C15.5001 8.48243 15.5001 9.12755 15.4645 9.64868C15.4283 10.1789 15.3535 10.6202 15.1845 11.0283C14.7638 12.044 13.9568 12.851 12.9411 13.2717C12.3607 13.5121 11.6997 13.5654 10.7947 13.581C10.4782 13.5865 10.2777 13.5905 10.1248 13.6074C9.98202 13.6232 9.92665 13.6464 9.89426 13.6652C9.86008 13.6851 9.81351 13.7213 9.73267 13.8323C9.64518 13.9523 9.54632 14.1182 9.38955 14.3831L8.99874 15.0433C8.44104 15.9856 7.05899 15.9856 6.5013 15.0433L6.11048 14.3831C5.95371 14.1182 5.85485 13.9523 5.76736 13.8323C5.68652 13.7213 5.63995 13.6851 5.60577 13.6652C5.57338 13.6464 5.51801 13.6232 5.37519 13.6074C5.22235 13.5905 5.02184 13.5865 4.70528 13.581C3.80031 13.5654 3.13933 13.5121 2.559 13.2717C1.54327 12.851 0.736277 12.044 0.315547 11.0283C0.146515 10.6202 0.0717299 10.1789 0.0355529 9.64868C-4.05001e-06 9.12754 -2.20251e-06 8.48243 1.60891e-07 7.65963L7.4949e-08 6.89026C-4.52294e-06 5.73432 -8.08928e-06 4.82814 0.0688256 4.10419C0.138987 3.36627 0.284458 2.76206 0.610861 2.22942C0.95267 1.67164 1.42164 1.20267 1.97942 0.860861C2.51206 0.534458 3.11627 0.388987 3.85419 0.318826C4.57814 0.249992 5.48432 0.249995 6.64026 0.25ZM3.95654 1.39537C3.29779 1.458 2.87862 1.57812 2.54445 1.78291C2.13217 2.03555 1.78555 2.38217 1.53291 2.79445C1.32812 3.12862 1.208 3.54779 1.14537 4.20654C1.08197 4.87334 1.0814 5.7282 1.0814 6.91863V7.63956C1.0814 8.48674 1.08169 9.09505 1.11444 9.57507C1.14686 10.0502 1.20927 10.3601 1.31463 10.6144C1.6256 11.3652 2.22208 11.9617 2.97284 12.2726C3.34458 12.4266 3.81883 12.4842 4.72391 12.4998L4.74685 12.5002C5.03378 12.5051 5.28522 12.5094 5.49421 12.5326C5.71878 12.5574 5.9384 12.6077 6.14946 12.7304C6.35874 12.8522 6.50969 13.0148 6.64128 13.1953C6.76287 13.3622 6.88783 13.5733 7.02936 13.8124L7.4319 14.4925C7.57086 14.7273 7.92917 14.7273 8.06813 14.4925L8.47067 13.8124C8.6122 13.5733 8.73716 13.3622 8.85875 13.1953C8.99034 13.0148 9.14129 12.8522 9.35057 12.7304C9.56163 12.6077 9.78126 12.5574 10.0058 12.5326C10.2148 12.5094 10.4662 12.5051 10.7532 12.5002L10.7761 12.4998C11.6812 12.4842 12.1555 12.4266 12.5272 12.2726C13.278 11.9617 13.8745 11.3652 14.1854 10.6144C14.2908 10.3601 14.3532 10.0502 14.3856 9.57507C14.4184 9.09505 14.4187 8.48674 14.4187 7.63956V6.91863C14.4187 5.7282 14.4181 4.87334 14.3547 4.20654C14.2921 3.54779 14.1719 3.12862 13.9672 2.79445C13.7145 2.38217 13.3679 2.03555 12.9556 1.78291C12.6214 1.57812 12.2023 1.458 11.5435 1.39537C10.8767 1.33197 10.0219 1.3314 8.83143 1.3314H6.66863C5.4782 1.3314 4.62334 1.33197 3.95654 1.39537ZM7.75003 3.85467C8.04865 3.85467 8.29073 4.09674 8.29073 4.39536V10.1628C8.29073 10.4614 8.04865 10.7035 7.75003 10.7035C7.45141 10.7035 7.20933 10.4614 7.20933 10.1628V4.39536C7.20933 4.09674 7.45141 3.85467 7.75003 3.85467ZM4.8663 5.29653C5.16492 5.29653 5.407 5.53861 5.407 5.83723V8.72096C5.407 9.01958 5.16492 9.26166 4.8663 9.26166C4.56768 9.26166 4.3256 9.01958 4.3256 8.72096V5.83723C4.3256 5.53861 4.56768 5.29653 4.8663 5.29653ZM10.6338 5.29653C10.9324 5.29653 11.1745 5.53861 11.1745 5.83723V8.72096C11.1745 9.01958 10.9324 9.26166 10.6338 9.26166C10.3351 9.26166 10.0931 9.01958 10.0931 8.72096V5.83723C10.0931 5.53861 10.3351 5.29653 10.6338 5.29653Z"
|
|
8255
8273
|
fill="${e}"/>
|
|
8256
|
-
</svg>`,
|
|
8274
|
+
</svg>`,lh=(e="white")=>z`<svg aria-hidden="true" focusable="false" width="16" height="14" viewBox="0 0 16 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8257
8275
|
<g clip-path="url(#clip0_18382_27345)">
|
|
8258
8276
|
<g clip-path="url(#clip1_18382_27345)">
|
|
8259
8277
|
<path d="M9.91666 0.625V3.45833C9.91666 3.6462 9.99128 3.82636 10.1241 3.9592C10.257 4.09204 10.4371 4.16667 10.625 4.16667H13.4583" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
@@ -8270,7 +8288,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8270
8288
|
</clipPath>
|
|
8271
8289
|
</defs>
|
|
8272
8290
|
</svg>
|
|
8273
|
-
`,
|
|
8291
|
+
`,uh=(e="white",t=20,n=-2)=>z`
|
|
8274
8292
|
<svg
|
|
8275
8293
|
aria-hidden="true"
|
|
8276
8294
|
focusable="false"
|
|
@@ -8345,7 +8363,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8345
8363
|
</clipPath>
|
|
8346
8364
|
</defs>
|
|
8347
8365
|
</svg>
|
|
8348
|
-
`;var
|
|
8366
|
+
`;var dh=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 ch=class extends ue{constructor(){super(...arguments),this.onClickMinimize=()=>{},this.onClickEmailOption=()=>{},this.onClickPhoneOption=()=>{},this.onClickSSTOption=()=>{},this.onClickApplyNowOption=()=>{},this.onClickPriceCalculatorOption=()=>{},this.onChatTapped=()=>{},this.hideChat=!1,this.isMobileDesign=!1,this.primaryColor=Zn,this.backgroundColor=Jn,this.hasChatEnabled=!1,this.hasEmailEnabled=!1,this.hasCallUsEnabled=!1,this.hasTextUsEnabled=!1,this.hasSSTEnabled=!1,this.hasApplyNowEnabled=!1,this.hasPricingCalculatorEnabled=!1,this.applicationLink="",this.overrideRentgrata=!1,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.renderListElement=(e,t,n,i)=>e?H` <li>
|
|
8349
8367
|
<button
|
|
8350
8368
|
@click=${t}
|
|
8351
8369
|
class="typeMobile-bttn"
|
|
@@ -8361,12 +8379,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8361
8379
|
</button>
|
|
8362
8380
|
</li>`:""}render(){return H`<div class="typeMobile-list">
|
|
8363
8381
|
<ul>
|
|
8364
|
-
${this.renderListElement(!(!this.hasApplyNowEnabled||!this.applicationLink),this.onClickApplyNowOption,
|
|
8365
|
-
${this.renderListElement(this.hasPricingCalculatorEnabled,this.onClickPriceCalculatorOption,
|
|
8366
|
-
${this.renderListElement(this.hasEmailEnabled,this.onClickEmailOption,
|
|
8367
|
-
${this.renderListElement(this.hasCallUsEnabled||this.hasTextUsEnabled,this.onClickPhoneOption,
|
|
8368
|
-
${this.renderListElement(this.hasSSTEnabled,this.onClickSSTOption,
|
|
8369
|
-
${this.renderListElement(this.hasChatEnabled&&!this.hideChat,this.onChatTapped,
|
|
8382
|
+
${this.renderListElement(!(!this.hasApplyNowEnabled||!this.applicationLink),this.onClickApplyNowOption,lh(this.foregroundColorOnSecondaryBackgroundColor),"Apply now")}
|
|
8383
|
+
${this.renderListElement(this.hasPricingCalculatorEnabled,this.onClickPriceCalculatorOption,uh(this.foregroundColorOnSecondaryBackgroundColor),"Price calculator")}
|
|
8384
|
+
${this.renderListElement(this.hasEmailEnabled,this.onClickEmailOption,oh(this.foregroundColorOnSecondaryBackgroundColor),"Email us")}
|
|
8385
|
+
${this.renderListElement(this.hasCallUsEnabled||this.hasTextUsEnabled,this.onClickPhoneOption,Uu(this.foregroundColorOnSecondaryBackgroundColor),"Call or text us")}
|
|
8386
|
+
${this.renderListElement(this.hasSSTEnabled,this.onClickSSTOption,ah(this.foregroundColorOnSecondaryBackgroundColor),"Book a tour")}
|
|
8387
|
+
${this.renderListElement(this.hasChatEnabled&&!this.hideChat,this.onChatTapped,sh(this.foregroundColorOnSecondaryBackgroundColor),"Chat with us")}
|
|
8370
8388
|
${this.isMobileDesign||this.hideChat?"":H`
|
|
8371
8389
|
<li>
|
|
8372
8390
|
<minimize-expand-button
|
|
@@ -8378,18 +8396,18 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8378
8396
|
</li>
|
|
8379
8397
|
`}
|
|
8380
8398
|
</ul>
|
|
8381
|
-
</div>`}};
|
|
8399
|
+
</div>`}};ch.styles=[rh],dh([pe({attribute:!0})],ch.prototype,"onClickMinimize",void 0),dh([pe({attribute:!0})],ch.prototype,"onClickEmailOption",void 0),dh([pe({attribute:!0})],ch.prototype,"onClickPhoneOption",void 0),dh([pe({attribute:!0})],ch.prototype,"onClickSSTOption",void 0),dh([pe({attribute:!0})],ch.prototype,"onClickApplyNowOption",void 0),dh([pe({attribute:!0})],ch.prototype,"onClickPriceCalculatorOption",void 0),dh([pe({attribute:!0})],ch.prototype,"onChatTapped",void 0),dh([pe({attribute:!0})],ch.prototype,"hideChat",void 0),dh([pe({attribute:!0})],ch.prototype,"isMobileDesign",void 0),dh([pe({attribute:!0})],ch.prototype,"primaryColor",void 0),dh([pe({attribute:!0})],ch.prototype,"backgroundColor",void 0),dh([pe({attribute:!0})],ch.prototype,"hasChatEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"hasEmailEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"hasCallUsEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"hasTextUsEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"hasSSTEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"hasApplyNowEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"hasPricingCalculatorEnabled",void 0),dh([pe({attribute:!0})],ch.prototype,"applicationLink",void 0),dh([pe({attribute:!0})],ch.prototype,"overrideRentgrata",void 0),dh([pe({attribute:!0})],ch.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),dh([pe({attribute:!0})],ch.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),ch=dh([ce("mobile-launcher")],ch);const hh=(e="white")=>z`<svg aria-hidden="true" focusable="false" xmlns="http://www.w3.org/2000/svg" width="5" height="8" viewBox="0 0 5 8" fill="none">
|
|
8382
8400
|
<path d="M1.31812 7L4.31812 4L1.31811 1" stroke="${e}" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8383
|
-
</svg>`;var
|
|
8401
|
+
</svg>`;var ph=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 fh=class extends ue{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Zn,this.toExpand=!1}render(){return H`
|
|
8384
8402
|
<div class=${"button-container"} @click=${this.onClick}>
|
|
8385
8403
|
<div
|
|
8386
8404
|
class="inner-container"
|
|
8387
8405
|
style=${Xn({background:this.primaryColor})}
|
|
8388
8406
|
>
|
|
8389
|
-
${this.toExpand?
|
|
8407
|
+
${this.toExpand?hh("black"):Id("black")}
|
|
8390
8408
|
</div>
|
|
8391
8409
|
</div>
|
|
8392
|
-
`}};
|
|
8410
|
+
`}};fh.styles=[p`
|
|
8393
8411
|
.button-container {
|
|
8394
8412
|
width: 36px;
|
|
8395
8413
|
height: 36px;
|
|
@@ -8413,11 +8431,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8413
8431
|
.button-container:hover {
|
|
8414
8432
|
filter: brightness(90%);
|
|
8415
8433
|
}
|
|
8416
|
-
`],
|
|
8434
|
+
`],ph([pe({attribute:!0})],fh.prototype,"onClick",void 0),ph([pe({attribute:!0})],fh.prototype,"primaryColor",void 0),ph([pe({attribute:!0})],fh.prototype,"toExpand",void 0),fh=ph([ce("collapse-expand-button")],fh);const gh=()=>{const e=window.rentgrata;if(!e)return;const t=e.Widget;t&&t.openWidget&&t.openWidget()},mh=()=>{const e=window.rentgrata;if(!e)return;const t=e.Widget;t&&t.openWidget&&t.close()},bh=()=>!!window.rentgrata;var yh=n(3950),vh=n.n(yh);const wh=(e="black")=>z`<svg aria-hidden="true" focusable="false" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8417
8435
|
<path d="M6 6C7.65685 6 9 4.65685 9 3C9 1.34315 7.65685 0 6 0C4.34315 0 3 1.34315 3 3C3 4.65685 4.34315 6 6 6ZM8 3C8 4.10457 7.10457 5 6 5C4.89543 5 4 4.10457 4 3C4 1.89543 4.89543 1 6 1C7.10457 1 8 1.89543 8 3Z" fill="${e}"/>
|
|
8418
8436
|
<path d="M12 11C12 12 11 12 11 12H1C1 12 0 12 0 11C0 10 1 7 6 7C11 7 12 10 12 11ZM11 10.9965C10.9986 10.7497 10.8462 10.0104 10.1679 9.33211C9.51563 8.67985 8.2891 8 5.99999 8C3.71088 8 2.48435 8.67985 1.8321 9.33211C1.15375 10.0104 1.00142 10.7497 1 10.9965H11Z" fill="${e}"/>
|
|
8419
8437
|
</svg>
|
|
8420
|
-
`;var
|
|
8438
|
+
`;var Ch=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 xh=class extends ue{constructor(){super(...arguments),this.isMinimized=!1,this.mobileStyles={},this.isFirstMount=!1,this.openSSTWindowOnLoad=!1,this.autoOpenChatWidget=!1,this.phoneNumber="",this.buildingName="",this.chatId="",this.orgLegalName="",this.country=null,this.buildingState=null,this.chatCallUsHeader="",this.buildingId=0,this.orgId=0,this.leadSourceParams=null,this.buildingSlug="",this.orgSlug="",this.sgtUrl="",this.selfGuidedTourEnabled=!1,this.selfGuidedToursTypeOffered="",this.designConcept="",this.featureFlagShowDropdown="",this.leadSources=[],this.currentLeadSource="",this.escortedToursLink="",this.escortedToursTypeOffered="",this.virtualToursLink="",this.virtualToursTypeOffered="",this.hasChatEnabledDesktop=!1,this.hasChatEnabledMobile=!1,this.hasEmailEnabledDesktop=!1,this.hasEmailEnabledMobile=!1,this.hasApplyNowEnabledDesktop=!1,this.hasApplyNowEnabledMobile=!1,this.applicationLink="",this.hasCallUsEnabledDesktop=!1,this.hasCallUsEnabledMobile=!1,this.hasTextUsEnabledDesktop=!1,this.hasTextUsEnabledMobile=!1,this.hasSSTEnabledDesktop=!1,this.hasSSTEnabledMobile=!1,this.tourTypeOptions=[],this.layoutOptions=[],this.bedroomPreferenceRequired=!1,this.brokerIntakeEnabled=!1,this.tourSchedulerV2=!1,this.getSessionToken=()=>null,this.hasDynamicSchedulingEnabled=!1,this.hasPricingCalculatorEnabledDesktop=!1,this.hasPricingCalculatorEnabledMobile=!1,this.onExitChat=()=>{},this.hasHideMobileFeatures=!1,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.showTourNextToChat=!1,this.onChatTapped=()=>{},this.handleChatTapped=()=>{Lo("chatOpened",{buildingId:this.buildingId}),this.onChatTapped()},this.onClickMinimize=()=>{},this.onSstClose=vh(),this.overrideRentgrata=!1,this.launcherStyles={},this.primaryColor=Zn,this.backgroundColor=Jn,this.foregroundColorOnPrimaryBackgroundColor="white",this.foregroundColorOnSecondaryBackgroundColor="black",this.leadSourceClient=null,this.leadSourceMultitouchClient=null,this._isMobile=Ir(),this.isEmailWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isSSTWindowOpen=!1,this.isTextUsWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.isMobileFeaturesExpanded=!1,this.getNumCallToActions=()=>[this.hasEmailEnabledDesktop||this.hasEmailEnabledMobile,!!this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasCallUsEnabledMobile),this.hasSSTEnabledDesktop||this.hasSSTEnabledMobile,this.hasTextUsEnabledDesktop||this.hasTextUsEnabledMobile,this.hasApplyNowEnabledDesktop||this.hasApplyNowEnabledMobile,this.hasPricingCalculatorEnabledDesktop||this.hasPricingCalculatorEnabledMobile].filter(e=>e).length,this.emailUsWindowRef=Oe(),this.tourSchedulerRef=Oe(),this.tourSchedulerV2Ref=Oe(),this.sstWindowIsV2=!1,this.calculatorWindowRef=Oe(),this.updated=async()=>{this.attachOnClickToEmailUsWindow(),this.attachOnClickToSSTWindow(),this.attachOnClickToCalculatorWindow(),(this.isEmailWindowOpen||this.isCallUsWindowOpen)&&this.isSSTWindowOpen&&this.onCloseSSTWindow()},this.attachOnClickToEmailUsWindow=()=>{const e=this.emailUsWindowRef.value;e&&(e.onCloseClicked=this.onCloseEmailWindow)},this.attachOnClickToSSTWindow=()=>{const e=this.tourSchedulerV2Ref.value;e&&(e.onCloseClicked=this.onCloseSSTWindow);const t=this.tourSchedulerRef.value;t&&(t.onCloseClicked=this.onCloseSSTWindow)},this.attachOnClickToCalculatorWindow=()=>{const e=this.calculatorWindowRef.value;e&&(e.onCloseClicked=this.onCloseCalculatorWindow,e.onClickEmailOption=this.onClickEmailOption,e.onClickPhoneOption=this.onClickPhoneOption,e.onClickSSTOption=this.onClickSSTOption,e.onClickTextUsOption=this.onClickTextUsOption)},this.onClickEmailOption=e=>{e.preventDefault(),e.stopPropagation(),mh(),Lo("emailUsClicked",{buildingId:this.buildingId}),this.isEmailWindowOpen=!0},this.onCloseEmailWindow=()=>{this.isEmailWindowOpen=!1},this.onClickPhoneOption=e=>{e.preventDefault(),e.stopPropagation(),mh(),Lo("callTextUsClicked",{buildingId:this.buildingId}),this.isCallUsWindowOpen=!0},this.onClickApplyNowOption=e=>{e.preventDefault(),e.stopPropagation(),mh(),Lo("applyNowClicked",{buildingId:this.buildingId,applicationLink:this.applicationLink}),window.open(this.applicationLink,"_blank")},this.onClickPriceCalculatorOption=e=>{e.preventDefault(),e.stopPropagation(),mh(),Lo("feeCalculatorOpened",{buildingId:this.buildingId}),this.isCalculatorWindowOpen=!0},this.onClosePhoneWindow=()=>{this.isCallUsWindowOpen=!1},this.onClickSSTOption=e=>{e.preventDefault(),e.stopPropagation(),mh(),Lo("bookTourClicked",{buildingId:this.buildingId}),this.tourSchedulerV2||(oo(),ao(this.buildingId)),this.isSSTWindowOpen=!0},this.onCloseSSTWindow=()=>{this.onSstClose(),this.isSSTWindowOpen=!1,this.showTourNextToChat&&this.dispatchEvent(new CustomEvent("closeShowTourNextToChat",{bubbles:!0}))},this.onCloseCalculatorWindow=()=>{this.isCalculatorWindowOpen=!1},this.onClickTextUsOption=e=>{e.preventDefault(),e.stopPropagation(),this.isTextUsWindowOpen=!0},this.isCallToActionWindowOpen=()=>1===[this.isEmailWindowOpen,this.isCallUsWindowOpen,this.isSSTWindowOpen,this.isTextUsWindowOpen,this.isCalculatorWindowOpen].filter(e=>e).length,this.toggleMobileFeatures=()=>{this.isMobileFeaturesExpanded=!this.isMobileFeaturesExpanded},this.renderActionPills=()=>this._isMobile||this.isMinimized||this.designConcept===ma.MINIMIZED?H` ${this.hasHideMobileFeatures&&this._isMobile?H`<collapse-expand-button
|
|
8421
8439
|
.toExpand=${this.isMobileFeaturesExpanded}
|
|
8422
8440
|
.primaryColor=${this.primaryColor}
|
|
8423
8441
|
.onClick=${this.toggleMobileFeatures}
|
|
@@ -8431,7 +8449,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8431
8449
|
.onClickApplyNowOption=${this.onClickApplyNowOption}
|
|
8432
8450
|
.onClickPriceCalculatorOption=${this.onClickPriceCalculatorOption}
|
|
8433
8451
|
.overrideRentgrata=${this.overrideRentgrata}
|
|
8434
|
-
.isMobileDesign=${this._isMobile||this.designConcept===
|
|
8452
|
+
.isMobileDesign=${this._isMobile||this.designConcept===ma.MINIMIZED}
|
|
8435
8453
|
.primaryColor=${this.primaryColor}
|
|
8436
8454
|
.backgroundColor=${this.backgroundColor}
|
|
8437
8455
|
.hasChatEnabled=${this._isMobile?this.hasChatEnabledMobile:this.hasChatEnabledDesktop}
|
|
@@ -8444,7 +8462,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8444
8462
|
.hasPricingCalculatorEnabled=${this._isMobile?!(this.hasHideMobileFeatures&&!this.isMobileFeaturesExpanded)&&this.hasPricingCalculatorEnabledMobile:this.hasPricingCalculatorEnabledDesktop}
|
|
8445
8463
|
.foregroundColorOnPrimaryBackgroundColor=${this.foregroundColorOnPrimaryBackgroundColor}
|
|
8446
8464
|
.foregroundColorOnSecondaryBackgroundColor=${this.foregroundColorOnSecondaryBackgroundColor}
|
|
8447
|
-
></mobile-launcher>`:this.designConcept===
|
|
8465
|
+
></mobile-launcher>`:this.designConcept===ma.EMOJI?this.emojiPillList():this.verticalPillList(),this.emojiPillList=()=>{const e=[{pillKey:"Email",pill:this.hasEmailEnabledDesktop?H` <button
|
|
8448
8466
|
class="type-hey__pill"
|
|
8449
8467
|
@click=${this.onClickEmailOption}
|
|
8450
8468
|
style=${Xn({background:this.backgroundColor})}
|
|
@@ -8452,7 +8470,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8452
8470
|
>
|
|
8453
8471
|
<div class="type-hey__pill-left">
|
|
8454
8472
|
<div class="type-hey__icon">
|
|
8455
|
-
${
|
|
8473
|
+
${oh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8456
8474
|
</div>
|
|
8457
8475
|
<div
|
|
8458
8476
|
style=${Xn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -8461,7 +8479,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8461
8479
|
</div>
|
|
8462
8480
|
</div>
|
|
8463
8481
|
<div class="type-gradient__icon">
|
|
8464
|
-
${
|
|
8482
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8465
8483
|
</div>
|
|
8466
8484
|
</button>`:null},{pillKey:"SST",pill:this.hasSSTEnabledDesktop?H`
|
|
8467
8485
|
<button
|
|
@@ -8472,7 +8490,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8472
8490
|
>
|
|
8473
8491
|
<div class="type-hey__pill-left">
|
|
8474
8492
|
<div class="type-hey__icon">
|
|
8475
|
-
${
|
|
8493
|
+
${ah(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8476
8494
|
</div>
|
|
8477
8495
|
<div
|
|
8478
8496
|
style=${Xn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -8481,7 +8499,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8481
8499
|
</div>
|
|
8482
8500
|
</div>
|
|
8483
8501
|
<div class="type-gradient__icon">
|
|
8484
|
-
${
|
|
8502
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8485
8503
|
</div>
|
|
8486
8504
|
</button>
|
|
8487
8505
|
`:null},{pillKey:"Phone",pill:this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasTextUsEnabledDesktop)?H`
|
|
@@ -8493,7 +8511,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8493
8511
|
>
|
|
8494
8512
|
<div class="type-hey__pill-left">
|
|
8495
8513
|
<div class="type-hey__icon">
|
|
8496
|
-
${
|
|
8514
|
+
${Uu(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8497
8515
|
</div>
|
|
8498
8516
|
<div
|
|
8499
8517
|
style=${Xn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -8505,7 +8523,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8505
8523
|
</div>
|
|
8506
8524
|
</div>
|
|
8507
8525
|
<div class="type-gradient__icon">
|
|
8508
|
-
${
|
|
8526
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8509
8527
|
</div>
|
|
8510
8528
|
</button>
|
|
8511
8529
|
`:null},{pillKey:"Apply",pill:this.applicationLink&&this.hasApplyNowEnabledDesktop?H`
|
|
@@ -8517,7 +8535,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8517
8535
|
>
|
|
8518
8536
|
<div class="type-hey__pill-left">
|
|
8519
8537
|
<div class="type-hey__icon">
|
|
8520
|
-
${
|
|
8538
|
+
${lh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8521
8539
|
</div>
|
|
8522
8540
|
<div
|
|
8523
8541
|
class="vertical-pill-title"
|
|
@@ -8528,7 +8546,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8528
8546
|
</div>
|
|
8529
8547
|
</div>
|
|
8530
8548
|
<div class="type-gradient__icon">
|
|
8531
|
-
${
|
|
8549
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8532
8550
|
</div>
|
|
8533
8551
|
</button>
|
|
8534
8552
|
`:null},{pillKey:"Price Calculator",pill:this.hasPricingCalculatorEnabledDesktop?H`
|
|
@@ -8540,7 +8558,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8540
8558
|
>
|
|
8541
8559
|
<div class="type-hey__pill-left">
|
|
8542
8560
|
<div class="type-hey__icon">
|
|
8543
|
-
${
|
|
8561
|
+
${uh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8544
8562
|
</div>
|
|
8545
8563
|
<div
|
|
8546
8564
|
style=${Xn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -8549,7 +8567,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8549
8567
|
</div>
|
|
8550
8568
|
</div>
|
|
8551
8569
|
<div class="type-gradient__icon">
|
|
8552
|
-
${
|
|
8570
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8553
8571
|
</div>
|
|
8554
8572
|
</button>
|
|
8555
8573
|
`:null}].filter(e=>!!e.pill);return H`
|
|
@@ -8579,7 +8597,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8579
8597
|
>
|
|
8580
8598
|
Hey there!
|
|
8581
8599
|
</h1>
|
|
8582
|
-
<div>${
|
|
8600
|
+
<div>${jo()}</div>
|
|
8583
8601
|
</div>
|
|
8584
8602
|
${this.hasChatEnabledDesktop?H`
|
|
8585
8603
|
<button
|
|
@@ -8591,7 +8609,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8591
8609
|
>
|
|
8592
8610
|
<div class="type-hey__pill-left">
|
|
8593
8611
|
<div class="type-hey__icon">
|
|
8594
|
-
${
|
|
8612
|
+
${sh(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
8595
8613
|
</div>
|
|
8596
8614
|
<div
|
|
8597
8615
|
style=${Xn({color:this.foregroundColorOnPrimaryBackgroundColor})}
|
|
@@ -8600,7 +8618,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8600
8618
|
</div>
|
|
8601
8619
|
</div>
|
|
8602
8620
|
<div class="type-gradient__icon">
|
|
8603
|
-
${
|
|
8621
|
+
${hh(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
8604
8622
|
</div>
|
|
8605
8623
|
</button>
|
|
8606
8624
|
`:""}
|
|
@@ -8612,15 +8630,15 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8612
8630
|
>
|
|
8613
8631
|
<div class="type-hey__botton-section-pills">
|
|
8614
8632
|
${e.map(e=>e.pill)}
|
|
8615
|
-
${this.overrideRentgrata&&
|
|
8633
|
+
${this.overrideRentgrata&&bh()?H` <button
|
|
8616
8634
|
class="type-hey__pill"
|
|
8617
|
-
@click=${()=>{
|
|
8635
|
+
@click=${()=>{gh()}}
|
|
8618
8636
|
style=${Xn({background:this.backgroundColor})}
|
|
8619
8637
|
aria-label="Contact a resident"
|
|
8620
8638
|
>
|
|
8621
8639
|
<div class="type-hey__pill-left">
|
|
8622
8640
|
<div class="type-hey__icon">
|
|
8623
|
-
${
|
|
8641
|
+
${wh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8624
8642
|
</div>
|
|
8625
8643
|
<div
|
|
8626
8644
|
style=${Xn({color:this.foregroundColorOnSecondaryBackgroundColor})}
|
|
@@ -8629,7 +8647,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8629
8647
|
</div>
|
|
8630
8648
|
</div>
|
|
8631
8649
|
<div class="type-gradient__icon">
|
|
8632
|
-
${
|
|
8650
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8633
8651
|
</div>
|
|
8634
8652
|
</button>`:""}
|
|
8635
8653
|
</div>
|
|
@@ -8651,7 +8669,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8651
8669
|
>
|
|
8652
8670
|
<div class="vertical-pill-left">
|
|
8653
8671
|
<div class="vertical-pill-icon">
|
|
8654
|
-
${
|
|
8672
|
+
${sh(e?this.foregroundColorOnSecondaryBackgroundColor:this.foregroundColorOnPrimaryBackgroundColor)}
|
|
8655
8673
|
</div>
|
|
8656
8674
|
<div
|
|
8657
8675
|
class="vertical-pill-title"
|
|
@@ -8661,7 +8679,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8661
8679
|
</div>
|
|
8662
8680
|
</div>
|
|
8663
8681
|
<div class="chevron-right">
|
|
8664
|
-
${
|
|
8682
|
+
${hh(e?this.foregroundColorOnSecondaryBackgroundColor:this.foregroundColorOnPrimaryBackgroundColor)}
|
|
8665
8683
|
</div>
|
|
8666
8684
|
</button>
|
|
8667
8685
|
`:null},{pillKey:"Price Calculator",pill:this.hasPricingCalculatorEnabledDesktop?H`
|
|
@@ -8673,7 +8691,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8673
8691
|
>
|
|
8674
8692
|
<div class="vertical-pill-left">
|
|
8675
8693
|
<div class="vertical-pill-icon">
|
|
8676
|
-
${
|
|
8694
|
+
${uh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8677
8695
|
</div>
|
|
8678
8696
|
<div
|
|
8679
8697
|
class="vertical-pill-title"
|
|
@@ -8683,7 +8701,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8683
8701
|
</div>
|
|
8684
8702
|
</div>
|
|
8685
8703
|
<div class="chevron-right">
|
|
8686
|
-
${
|
|
8704
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8687
8705
|
</div>
|
|
8688
8706
|
</button>
|
|
8689
8707
|
`:null},{pillKey:"SST",pill:this.hasSSTEnabledDesktop?H`
|
|
@@ -8696,7 +8714,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8696
8714
|
>
|
|
8697
8715
|
<div class="vertical-pill-left">
|
|
8698
8716
|
<div class="vertical-pill-icon">
|
|
8699
|
-
${
|
|
8717
|
+
${ah(e?this.foregroundColorOnPrimaryBackgroundColor:this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8700
8718
|
</div>
|
|
8701
8719
|
<div
|
|
8702
8720
|
class="vertical-pill-title"
|
|
@@ -8707,7 +8725,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8707
8725
|
</div>
|
|
8708
8726
|
</div>
|
|
8709
8727
|
<div class="chevron-right">
|
|
8710
|
-
${
|
|
8728
|
+
${hh(e?this.foregroundColorOnPrimaryBackgroundColor:this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8711
8729
|
</div>
|
|
8712
8730
|
</button>
|
|
8713
8731
|
`:null},{pillKey:"Email",pill:this.hasEmailEnabledDesktop?H`
|
|
@@ -8719,7 +8737,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8719
8737
|
>
|
|
8720
8738
|
<div class="vertical-pill-left">
|
|
8721
8739
|
<div class="vertical-pill-icon">
|
|
8722
|
-
${
|
|
8740
|
+
${oh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8723
8741
|
</div>
|
|
8724
8742
|
<div
|
|
8725
8743
|
class="vertical-pill-title"
|
|
@@ -8730,7 +8748,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8730
8748
|
</div>
|
|
8731
8749
|
</div>
|
|
8732
8750
|
<div class="chevron-right">
|
|
8733
|
-
${
|
|
8751
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8734
8752
|
</div>
|
|
8735
8753
|
</button>
|
|
8736
8754
|
`:null},{pillKey:"Phone",pill:this.phoneNumber&&(this.hasCallUsEnabledDesktop||this.hasTextUsEnabledDesktop)?H`
|
|
@@ -8742,7 +8760,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8742
8760
|
>
|
|
8743
8761
|
<div class="vertical-pill-left">
|
|
8744
8762
|
<div class="vertical-pill-icon">
|
|
8745
|
-
${
|
|
8763
|
+
${Uu(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8746
8764
|
</div>
|
|
8747
8765
|
${this.hasCallUsEnabledDesktop&&this.hasTextUsEnabledDesktop?H`
|
|
8748
8766
|
<div
|
|
@@ -8771,7 +8789,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8771
8789
|
`:""}
|
|
8772
8790
|
</div>
|
|
8773
8791
|
<div class="chevron-right">
|
|
8774
|
-
${
|
|
8792
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8775
8793
|
</div>
|
|
8776
8794
|
</button>
|
|
8777
8795
|
`:null},{pillKey:"Apply",pill:this.applicationLink&&this.hasApplyNowEnabledDesktop?H`
|
|
@@ -8783,7 +8801,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8783
8801
|
>
|
|
8784
8802
|
<div class="vertical-pill-left">
|
|
8785
8803
|
<div class="vertical-pill-icon">
|
|
8786
|
-
${
|
|
8804
|
+
${lh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8787
8805
|
</div>
|
|
8788
8806
|
<div
|
|
8789
8807
|
class="vertical-pill-title"
|
|
@@ -8794,7 +8812,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8794
8812
|
</div>
|
|
8795
8813
|
</div>
|
|
8796
8814
|
<div class="chevron-right">
|
|
8797
|
-
${
|
|
8815
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8798
8816
|
</div>
|
|
8799
8817
|
</button>
|
|
8800
8818
|
`:null}].filter(e=>!!e.pill);if(e){const e=t.findIndex(e=>"SST"===e.pillKey);if(-1!==e){const[n]=t.splice(e,1);t.unshift(n)}}return H`
|
|
@@ -8802,16 +8820,16 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8802
8820
|
<nav aria-label="EliseAI options">
|
|
8803
8821
|
<ul class="vertical-pill-list__items" role="list">
|
|
8804
8822
|
${t.map(e=>H`<li>${e.pill}</li>`)}
|
|
8805
|
-
${this.overrideRentgrata&&
|
|
8823
|
+
${this.overrideRentgrata&&bh()?H`<li>
|
|
8806
8824
|
<button
|
|
8807
|
-
@click=${()=>{
|
|
8825
|
+
@click=${()=>{gh()}}
|
|
8808
8826
|
class="inner-pill-wrapper"
|
|
8809
8827
|
style=${Xn({background:this.backgroundColor})}
|
|
8810
8828
|
aria-label="Contact a resident"
|
|
8811
8829
|
>
|
|
8812
8830
|
<div class="vertical-pill-left">
|
|
8813
8831
|
<div class="vertical-pill-icon">
|
|
8814
|
-
${
|
|
8832
|
+
${wh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8815
8833
|
</div>
|
|
8816
8834
|
<div
|
|
8817
8835
|
class="vertical-pill-title"
|
|
@@ -8822,7 +8840,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8822
8840
|
</div>
|
|
8823
8841
|
</div>
|
|
8824
8842
|
<div class="chevron-right">
|
|
8825
|
-
${
|
|
8843
|
+
${hh(this.foregroundColorOnSecondaryBackgroundColor)}
|
|
8826
8844
|
</div>
|
|
8827
8845
|
</button>
|
|
8828
8846
|
</li>`:""}
|
|
@@ -8833,10 +8851,10 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8833
8851
|
class="minimize-button"
|
|
8834
8852
|
aria-label="Minimize EliseAI widget"
|
|
8835
8853
|
>
|
|
8836
|
-
<div class="chevron-down">${
|
|
8854
|
+
<div class="chevron-down">${hh("black")}</div>
|
|
8837
8855
|
</button>`:""}
|
|
8838
8856
|
</div>
|
|
8839
|
-
`}}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Nr(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}willUpdate(e){e.has("openSSTWindowOnLoad")&&this.openSSTWindowOnLoad&&(this.isSSTWindowOpen=!0),e.has("isSSTWindowOpen")&&this.isSSTWindowOpen&&(this.sstWindowIsV2=this.tourSchedulerV2)}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",
|
|
8857
|
+
`}}connectedCallback(){super.connectedCallback(),this._cleanupMobileListener=Nr(e=>{this._isMobile=e})}disconnectedCallback(){var e;null===(e=this._cleanupMobileListener)||void 0===e||e.call(this),super.disconnectedCallback()}willUpdate(e){e.has("openSSTWindowOnLoad")&&this.openSSTWindowOnLoad&&(this.isSSTWindowOpen=!0),e.has("isSSTWindowOpen")&&this.isSSTWindowOpen&&(this.sstWindowIsV2=this.tourSchedulerV2)}render(){window.customElements.get("email-us-window")||window.customElements.define("email-us-window",Ru),window.customElements.get("call-us-window")||window.customElements.define("call-us-window",Gu),window.eliseAi.onOpenSST=e=>{this.isSSTWindowOpen=!0,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.onExitChat(),e&&e()},(this.hasChatEnabledDesktop||this.hasChatEnabledMobile)&&(window.eliseAi.onOpenChat=e=>{this.handleChatTapped(),this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.isCalculatorWindowOpen=!1,e&&e()}),(this.hasCallUsEnabledDesktop||this.hasCallUsEnabledMobile)&&(window.eliseAi.onOpenCallUsWindow=e=>{this.isCallUsWindowOpen=!0,this.isSSTWindowOpen=!1,this.isEmailWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasEmailEnabledDesktop||this.hasEmailEnabledMobile)&&(window.eliseAi.onOpenEmailUsWindow=e=>{this.isEmailWindowOpen=!0,this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isCalculatorWindowOpen=!1,this.onExitChat(),e&&e()}),(this.hasPricingCalculatorEnabledDesktop||this.hasPricingCalculatorEnabledMobile)&&(window.eliseAi.onOpenPriceCalculatorWindow=e=>{this.isCalculatorWindowOpen=!0,this.isSSTWindowOpen=!1,this.isCallUsWindowOpen=!1,this.isEmailWindowOpen=!1,this.onExitChat(),e&&e()});const e={top:this._isMobile||void 0===this.top||isNaN(this.top)?void 0:`${this.top}px`,bottom:this._isMobile||void 0===this.bottom||isNaN(this.bottom)?void 0:`${this.bottom}px`,left:this._isMobile||void 0===this.left||isNaN(this.left)?void 0:`${this.left}px`,right:this._isMobile||void 0===this.right||isNaN(this.right)?void 0:`${this.right}px`};return H`
|
|
8840
8858
|
<div
|
|
8841
8859
|
class=${go()({"launcher__mobile-launcher-wrapper":this._isMobile||this.isMinimized,"launcher__mini-launcher-wrapper":!this._isMobile&&!this.isMinimized,"launcher__mini-elevated":"livcor"===this.orgSlug.toLowerCase()&&(this._isMobile||this.isMinimized)})}
|
|
8842
8860
|
style=${Xn({...this.launcherStyles,...this.mobileStyles,top:this._isMobile||void 0===this.top||isNaN(this.top)?void 0!==this.mobileStyles.top?`${this.mobileStyles.top}px`:void 0:this.top-700+"px",bottom:this._isMobile||void 0===this.bottom||isNaN(this.bottom)?void 0!==this.mobileStyles.bottom?`${this.mobileStyles.bottom}px`:"72px":`${this.bottom}px`,left:this._isMobile||void 0===this.left||isNaN(this.left)?void 0!==this.mobileStyles.left?`${this.mobileStyles.left}px`:void 0:`${this.left}px`,right:this._isMobile||void 0===this.right||isNaN(this.right)?void 0!==this.mobileStyles.right?`${this.mobileStyles.right}px`:"18px":`${this.right}px`})}
|
|
@@ -8985,11 +9003,11 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
8985
9003
|
`:""}
|
|
8986
9004
|
${this.isCallToActionWindowOpen()||this.showTourNextToChat?"":this.renderActionPills()}
|
|
8987
9005
|
</div>
|
|
8988
|
-
`}};
|
|
8989
|
-
${Eu}
|
|
9006
|
+
`}};xh.styles=p`
|
|
8990
9007
|
${_u}
|
|
8991
9008
|
${Ou}
|
|
8992
|
-
`,wh([pe({attribute:!0})],Ch.prototype,"isMinimized",void 0),wh([pe()],Ch.prototype,"mobileStyles",void 0),wh([pe({type:Boolean})],Ch.prototype,"isFirstMount",void 0),wh([pe({attribute:!1})],Ch.prototype,"openSSTWindowOnLoad",void 0),wh([pe({attribute:!1})],Ch.prototype,"autoOpenChatWidget",void 0),wh([pe()],Ch.prototype,"phoneNumber",void 0),wh([pe({attribute:!0})],Ch.prototype,"buildingName",void 0),wh([pe({attribute:!0})],Ch.prototype,"chatId",void 0),wh([pe({attribute:!0})],Ch.prototype,"orgLegalName",void 0),wh([pe({attribute:!1})],Ch.prototype,"country",void 0),wh([pe({attribute:!1})],Ch.prototype,"buildingState",void 0),wh([pe({attribute:!0})],Ch.prototype,"chatCallUsHeader",void 0),wh([pe({attribute:!1})],Ch.prototype,"buildingId",void 0),wh([pe({type:Number})],Ch.prototype,"orgId",void 0),wh([pe({attribute:!1})],Ch.prototype,"leadSourceParams",void 0),wh([pe({attribute:!0})],Ch.prototype,"buildingSlug",void 0),wh([pe({attribute:!0})],Ch.prototype,"orgSlug",void 0),wh([pe({attribute:!0})],Ch.prototype,"sgtUrl",void 0),wh([pe({attribute:!0})],Ch.prototype,"selfGuidedTourEnabled",void 0),wh([pe({attribute:!0})],Ch.prototype,"selfGuidedToursTypeOffered",void 0),wh([pe({attribute:!0})],Ch.prototype,"designConcept",void 0),wh([pe({attribute:!0})],Ch.prototype,"featureFlagShowDropdown",void 0),wh([pe({attribute:!1})],Ch.prototype,"leadSources",void 0),wh([pe({attribute:!0})],Ch.prototype,"currentLeadSource",void 0),wh([pe({attribute:!0})],Ch.prototype,"escortedToursLink",void 0),wh([pe({attribute:!0})],Ch.prototype,"escortedToursTypeOffered",void 0),wh([pe({attribute:!0})],Ch.prototype,"virtualToursLink",void 0),wh([pe({attribute:!0})],Ch.prototype,"virtualToursTypeOffered",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasChatEnabledDesktop",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasChatEnabledMobile",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasEmailEnabledDesktop",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasEmailEnabledMobile",void 0),wh([pe({attribute:!0})],Ch.prototype,"hasApplyNowEnabledDesktop",void 0),wh([pe({attribute:!0})],Ch.prototype,"hasApplyNowEnabledMobile",void 0),wh([pe({attribute:!0})],Ch.prototype,"applicationLink",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasCallUsEnabledDesktop",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasCallUsEnabledMobile",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasTextUsEnabledDesktop",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasTextUsEnabledMobile",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasSSTEnabledDesktop",void 0),wh([pe({type:Boolean})],Ch.prototype,"hasSSTEnabledMobile",void 0),wh([pe({attribute:!1})],Ch.prototype,"tourTypeOptions",void 0),wh([pe({attribute:!1})],Ch.prototype,"layoutOptions",void 0),wh([pe({attribute:!0})],Ch.prototype,"bedroomPreferenceRequired",void 0),wh([pe({attribute:!1})],Ch.prototype,"brokerIntakeEnabled",void 0),wh([pe({attribute:!1})],Ch.prototype,"tourSchedulerV2",void 0),wh([pe({attribute:!1})],Ch.prototype,"getSessionToken",void 0),wh([pe({attribute:!0})],Ch.prototype,"hasDynamicSchedulingEnabled",void 0),wh([pe({attribute:!0})],Ch.prototype,"hasPricingCalculatorEnabledDesktop",void 0),wh([pe({attribute:!0})],Ch.prototype,"hasPricingCalculatorEnabledMobile",void 0),wh([pe({attribute:!1})],Ch.prototype,"hasHideMobileFeatures",void 0),wh([pe({type:Number})],Ch.prototype,"right",void 0),wh([pe({type:Number})],Ch.prototype,"bottom",void 0),wh([pe({type:Number})],Ch.prototype,"top",void 0),wh([pe({type:Number})],Ch.prototype,"left",void 0),wh([pe({attribute:!0})],Ch.prototype,"showTourNextToChat",void 0),wh([pe({attribute:!1})],Ch.prototype,"onChatTapped",void 0),wh([pe({attribute:!0})],Ch.prototype,"onClickMinimize",void 0),wh([pe({attribute:!0})],Ch.prototype,"onSstClose",void 0),wh([pe({attribute:!0})],Ch.prototype,"overrideRentgrata",void 0),wh([pe({attribute:!1})],Ch.prototype,"launcherStyles",void 0),wh([pe({attribute:!0})],Ch.prototype,"primaryColor",void 0),wh([pe({attribute:!0})],Ch.prototype,"backgroundColor",void 0),wh([pe({attribute:!0})],Ch.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),wh([pe({attribute:!0})],Ch.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),wh([pe({attribute:!0})],Ch.prototype,"leadSourceClient",void 0),wh([fe()],Ch.prototype,"leadSourceMultitouchClient",void 0),wh([fe()],Ch.prototype,"_isMobile",void 0),wh([fe()],Ch.prototype,"isEmailWindowOpen",void 0),wh([fe()],Ch.prototype,"isCallUsWindowOpen",void 0),wh([fe()],Ch.prototype,"isSSTWindowOpen",void 0),wh([fe()],Ch.prototype,"isTextUsWindowOpen",void 0),wh([fe()],Ch.prototype,"isCalculatorWindowOpen",void 0),wh([fe()],Ch.prototype,"isMobileFeaturesExpanded",void 0),Ch=wh([ce("meetelise-launcher")],Ch);const xh=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",Ch)},$h=["app.meetelise.com","staging.eliseai.com","localhost"],Sh={calculator:{desktop:"calcDesktop",mobile:"calcMobile"},email:{desktop:"emailDesktop",mobile:"emailMobile"},call:{desktop:"callDesktop",mobile:"callMobile"},text:{desktop:"textDesktop",mobile:"textMobile"},sst:{desktop:"sstDesktop",mobile:"sstMobile"}},kh=e=>{const t=window.location.hostname;if(!$h.includes(t))return e;const n=(e=>{if(!e)return{};try{return e.split(",").reduce((e,t)=>{const[n,i]=t.split(":");return n&&i&&n in Sh&&(e[n]="true"===i.toLowerCase()),e},{})}catch(e){return{}}})(new URLSearchParams(window.location.search).get("widgets"));if(0===Object.keys(n).length)return e;const i={...e};return Object.entries(n).forEach(([e,t])=>{const n=Sh[e];n&&(i[n.desktop]=t,i[n.mobile]=t)}),i};var Ah=n(5072),Th=n.n(Ah),Eh=n(7825),_h=n.n(Eh),Oh=n(7659),Ph=n.n(Oh),Ih=n(5056),Nh=n.n(Ih),Mh=n(540),Dh=n.n(Mh),Lh=n(1113),Rh=n.n(Lh),Bh=n(5541),Uh={};Uh.styleTagTransform=Rh(),Uh.setAttributes=Nh(),Uh.insert=Ph().bind(null,"head"),Uh.domAPI=_h(),Uh.insertStyleElement=Dh();Th()(Bh.A,Uh);Bh.A&&Bh.A.locals&&Bh.A.locals;async function jh(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${t}/lead-sources`);if(n.data){if("7e352741-1120-4ccf-9929-5dc99193a908"===e){const e=["Zillow","Apartments.com","Google PPC","Google Maps","Apple Maps","Social Media","Print Marketing"];return n.data.filter(t=>e.includes(t))}return Fh(n.data,t)}return[]}catch(e){return[]}}const Fh=(e,t)=>{let n=[];switch(t){case"d41619ec-0f79-11ee-8439-93855926ad58":n=["Forthea - PPC","HotPads","Forthea","Locator","Website-apartmentguide.com","Forthea - organic search","Tdc employee","University newspaper","Nashville apartment locators","Forthea - paid social","Apartment list","Off campus partners","Waze ads","Athletic event","Website-apartment guide"];break;case"d4160560-0f79-11ee-8438-fba837bf3a46":n=["Forthea - PPC","Rentgrata","Website-ApartmentFinder.com","Word of Mouth","Texas A&M A-Frame on Campus","Rent.com","Website-craigslist","Apartment List","Website-apartments.com","Forthea - paid social","Forthea - organic search","Website-apartmentguide.com","Forthea","Uhomes","Phone book","Property - website"];break;default:n=[]}return e.sort(),e.filter(e=>{const t=e.toLowerCase();return!n.map(e=>e.toLowerCase()).includes(t)})};async function Hh(e){var t,n;if(!e)return!1;try{return null!==(n=null===(t=(await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/aip`)).data)||void 0===t?void 0:t.is_aip)&&void 0!==n&&n}catch(e){return!1}}const zh=new Set(["8009855990","8338526262","8002221222","8006624357","8002738255","8007997233","8007874889","8006564673","8004224453","8883737888","8006213362","8009506264","8558272736","8008435678","8007862929","8008523836","8007849433","8007729100","8006699777","8006858470","8004322209","8003473735","8008778339","8009552232","8002255342","8009272891","8003049320","8007937724","8002382333","8003353863","8776858878","8003329227","8776554371","8772944357","8772944356","6092925760","6092926735","8007928339","8008329173","8882853036","6092921210","8007929773","8003561561","8003826717","8005727233","8009291040","8888958179","8006879512","8004262537","8773475463","8774149251","8005103102","8889372835","8007010710","8007010720","8774288844","8007929745","8003283838","6092927060","6092928319","8008527899","8662401347","8009923678","8776522873","8776527624","8003313937","8008435437","8776536783","8778392339","8003676274","8006896411"]),Gh=e=>{const t=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1");return zh.has(t)},Vh=(e,t,n)=>{try{const i=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1"),r=`tel:${i}`,o=`sms:${i}`,a=`whatsapp://send?phone=${i}`,s=`facetime:${i}`,l=`facetime-audio:${i}`,u=/(?:\+1[\s.-]?)?(?:\([2-9]\d{2}\)[\s.-]?|[2-9]\d{2}[\s.-])[2-9]\d{2}[\s.-]?\d{4}/g,d=/(tel|sms):(?:\+1\s)?(?:(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}|\d{10,11})/g,c=/whatsapp:\/\/send\?phone=\d+/g,h=/(facetime|facetime-audio):\d+/g,p=/emergency|emergencia/i,f=300,g=e=>!(!e||e.length>f)&&p.test(e),m=e=>{var t,n,i,r;if(g(e.textContent))return!0;if(g(null===(t=e.previousElementSibling)||void 0===t?void 0:t.textContent)||g(null===(n=e.nextElementSibling)||void 0===n?void 0:n.textContent))return!0;const o=e.parentElement;return!(!o||!g(null===(i=o.previousElementSibling)||void 0===i?void 0:i.textContent)&&!g(null===(r=o.nextElementSibling)||void 0===r?void 0:r.textContent))},b=document.body.getElementsByTagName("*");let y=!1;const v=i.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let w=!1,C=!1,x=0;for(let e=0;e<b.length;e++)if(b[e].nodeType===Node.ELEMENT_NODE&&!m(b[e])){if(1===b[e].childNodes.length&&b[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=b[e].textContent;if(!t)continue;const n=t.replace(u,e=>{if(Gh(e))return e;return e.startsWith("+1 ")?`+1 ${v}`:v});t!==n&&(x++,b[e].textContent=n),y=!0,w||(w=!0)}if(b[e].hasAttribute("href")){const t=b[e].getAttribute("href");if(!t)continue;let n="",i=d;if(t.startsWith("sms:")?n=o:t.startsWith("whatsapp:")?(n=a,i=c):t.startsWith("facetime:")?(n=s,i=h):t.startsWith("facetime-audio:")?(n=l,i=h):n=r,Gh(t))continue;const u=t.replace(i,n);if(b[e].setAttribute("href",u),(t.startsWith("tel:")||t.startsWith("sms:"))&&u===t&&u!==n){t.replace(/\D/g,"").length>=7&&b[e].setAttribute("href",t.startsWith("tel:")?r:o)}C||(C=!0)}}return w&&ra({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:v,website:window.location.href},logType:ia.info,buildingSlug:n,orgSlug:t}),C&&ra({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:v,website:window.location.href},logType:ia.info,buildingSlug:n,orgSlug:t}),y||ra({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:ia.warn,buildingSlug:n,orgSlug:t}),x}catch(e){return ra({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"insertion-error",error:e instanceof Error?e.message:String(e),website:window.location.href},logType:ia.error,buildingSlug:n,orgSlug:t,error:e}),0}},Wh=(e,t,n,i)=>{document.querySelectorAll("a").forEach(function(r){const o=r.getAttribute("href");o&&o.startsWith("https://app.meetelise.com/")&&((e,t,n)=>{const[i,r,o,...a]=new URL(e).pathname.split("/").filter(Boolean).map(e=>e.toLowerCase());return 0===a.length&&"tour"===o&&i===t.toLowerCase()&&r===n.toLowerCase()})(o,t,n)&&r.addEventListener("click",t=>{i()&&(t.preventDefault(),e(t))})})};var Qh=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 qh=class extends ue{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.toExpand=!1}render(){return H`
|
|
9009
|
+
${Pu}
|
|
9010
|
+
`,Ch([pe({attribute:!0})],xh.prototype,"isMinimized",void 0),Ch([pe()],xh.prototype,"mobileStyles",void 0),Ch([pe({type:Boolean})],xh.prototype,"isFirstMount",void 0),Ch([pe({attribute:!1})],xh.prototype,"openSSTWindowOnLoad",void 0),Ch([pe({attribute:!1})],xh.prototype,"autoOpenChatWidget",void 0),Ch([pe()],xh.prototype,"phoneNumber",void 0),Ch([pe({attribute:!0})],xh.prototype,"buildingName",void 0),Ch([pe({attribute:!0})],xh.prototype,"chatId",void 0),Ch([pe({attribute:!0})],xh.prototype,"orgLegalName",void 0),Ch([pe({attribute:!1})],xh.prototype,"country",void 0),Ch([pe({attribute:!1})],xh.prototype,"buildingState",void 0),Ch([pe({attribute:!0})],xh.prototype,"chatCallUsHeader",void 0),Ch([pe({attribute:!1})],xh.prototype,"buildingId",void 0),Ch([pe({type:Number})],xh.prototype,"orgId",void 0),Ch([pe({attribute:!1})],xh.prototype,"leadSourceParams",void 0),Ch([pe({attribute:!0})],xh.prototype,"buildingSlug",void 0),Ch([pe({attribute:!0})],xh.prototype,"orgSlug",void 0),Ch([pe({attribute:!0})],xh.prototype,"sgtUrl",void 0),Ch([pe({attribute:!0})],xh.prototype,"selfGuidedTourEnabled",void 0),Ch([pe({attribute:!0})],xh.prototype,"selfGuidedToursTypeOffered",void 0),Ch([pe({attribute:!0})],xh.prototype,"designConcept",void 0),Ch([pe({attribute:!0})],xh.prototype,"featureFlagShowDropdown",void 0),Ch([pe({attribute:!1})],xh.prototype,"leadSources",void 0),Ch([pe({attribute:!0})],xh.prototype,"currentLeadSource",void 0),Ch([pe({attribute:!0})],xh.prototype,"escortedToursLink",void 0),Ch([pe({attribute:!0})],xh.prototype,"escortedToursTypeOffered",void 0),Ch([pe({attribute:!0})],xh.prototype,"virtualToursLink",void 0),Ch([pe({attribute:!0})],xh.prototype,"virtualToursTypeOffered",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasChatEnabledDesktop",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasChatEnabledMobile",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasEmailEnabledDesktop",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasEmailEnabledMobile",void 0),Ch([pe({attribute:!0})],xh.prototype,"hasApplyNowEnabledDesktop",void 0),Ch([pe({attribute:!0})],xh.prototype,"hasApplyNowEnabledMobile",void 0),Ch([pe({attribute:!0})],xh.prototype,"applicationLink",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasCallUsEnabledDesktop",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasCallUsEnabledMobile",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasTextUsEnabledDesktop",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasTextUsEnabledMobile",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasSSTEnabledDesktop",void 0),Ch([pe({type:Boolean})],xh.prototype,"hasSSTEnabledMobile",void 0),Ch([pe({attribute:!1})],xh.prototype,"tourTypeOptions",void 0),Ch([pe({attribute:!1})],xh.prototype,"layoutOptions",void 0),Ch([pe({attribute:!0})],xh.prototype,"bedroomPreferenceRequired",void 0),Ch([pe({attribute:!1})],xh.prototype,"brokerIntakeEnabled",void 0),Ch([pe({attribute:!1})],xh.prototype,"tourSchedulerV2",void 0),Ch([pe({attribute:!1})],xh.prototype,"getSessionToken",void 0),Ch([pe({attribute:!0})],xh.prototype,"hasDynamicSchedulingEnabled",void 0),Ch([pe({attribute:!0})],xh.prototype,"hasPricingCalculatorEnabledDesktop",void 0),Ch([pe({attribute:!0})],xh.prototype,"hasPricingCalculatorEnabledMobile",void 0),Ch([pe({attribute:!1})],xh.prototype,"hasHideMobileFeatures",void 0),Ch([pe({type:Number})],xh.prototype,"right",void 0),Ch([pe({type:Number})],xh.prototype,"bottom",void 0),Ch([pe({type:Number})],xh.prototype,"top",void 0),Ch([pe({type:Number})],xh.prototype,"left",void 0),Ch([pe({attribute:!0})],xh.prototype,"showTourNextToChat",void 0),Ch([pe({attribute:!1})],xh.prototype,"onChatTapped",void 0),Ch([pe({attribute:!0})],xh.prototype,"onClickMinimize",void 0),Ch([pe({attribute:!0})],xh.prototype,"onSstClose",void 0),Ch([pe({attribute:!0})],xh.prototype,"overrideRentgrata",void 0),Ch([pe({attribute:!1})],xh.prototype,"launcherStyles",void 0),Ch([pe({attribute:!0})],xh.prototype,"primaryColor",void 0),Ch([pe({attribute:!0})],xh.prototype,"backgroundColor",void 0),Ch([pe({attribute:!0})],xh.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Ch([pe({attribute:!0})],xh.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),Ch([pe({attribute:!0})],xh.prototype,"leadSourceClient",void 0),Ch([fe()],xh.prototype,"leadSourceMultitouchClient",void 0),Ch([fe()],xh.prototype,"_isMobile",void 0),Ch([fe()],xh.prototype,"isEmailWindowOpen",void 0),Ch([fe()],xh.prototype,"isCallUsWindowOpen",void 0),Ch([fe()],xh.prototype,"isSSTWindowOpen",void 0),Ch([fe()],xh.prototype,"isTextUsWindowOpen",void 0),Ch([fe()],xh.prototype,"isCalculatorWindowOpen",void 0),Ch([fe()],xh.prototype,"isMobileFeaturesExpanded",void 0),xh=Ch([ce("meetelise-launcher")],xh);const $h=()=>{window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",xh)},Sh=["app.meetelise.com","staging.eliseai.com","localhost"],kh={calculator:{desktop:"calcDesktop",mobile:"calcMobile"},email:{desktop:"emailDesktop",mobile:"emailMobile"},call:{desktop:"callDesktop",mobile:"callMobile"},text:{desktop:"textDesktop",mobile:"textMobile"},sst:{desktop:"sstDesktop",mobile:"sstMobile"}},Ah=e=>{const t=window.location.hostname;if(!Sh.includes(t))return e;const n=(e=>{if(!e)return{};try{return e.split(",").reduce((e,t)=>{const[n,i]=t.split(":");return n&&i&&n in kh&&(e[n]="true"===i.toLowerCase()),e},{})}catch(e){return{}}})(new URLSearchParams(window.location.search).get("widgets"));if(0===Object.keys(n).length)return e;const i={...e};return Object.entries(n).forEach(([e,t])=>{const n=kh[e];n&&(i[n.desktop]=t,i[n.mobile]=t)}),i};var Th=n(5072),Eh=n.n(Th),_h=n(7825),Oh=n.n(_h),Ph=n(7659),Ih=n.n(Ph),Nh=n(5056),Mh=n.n(Nh),Dh=n(540),Lh=n.n(Dh),Rh=n(1113),Bh=n.n(Rh),Uh=n(5541),jh={};jh.styleTagTransform=Bh(),jh.setAttributes=Mh(),jh.insert=Ih().bind(null,"head"),jh.domAPI=Oh(),jh.insertStyleElement=Lh();Eh()(Uh.A,jh);Uh.A&&Uh.A.locals&&Uh.A.locals;async function Fh(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${t}/lead-sources`);if(n.data){if("7e352741-1120-4ccf-9929-5dc99193a908"===e){const e=["Zillow","Apartments.com","Google PPC","Google Maps","Apple Maps","Social Media","Print Marketing"];return n.data.filter(t=>e.includes(t))}return Hh(n.data,t)}return[]}catch(e){return[]}}const Hh=(e,t)=>{let n=[];switch(t){case"d41619ec-0f79-11ee-8439-93855926ad58":n=["Forthea - PPC","HotPads","Forthea","Locator","Website-apartmentguide.com","Forthea - organic search","Tdc employee","University newspaper","Nashville apartment locators","Forthea - paid social","Apartment list","Off campus partners","Waze ads","Athletic event","Website-apartment guide"];break;case"d4160560-0f79-11ee-8438-fba837bf3a46":n=["Forthea - PPC","Rentgrata","Website-ApartmentFinder.com","Word of Mouth","Texas A&M A-Frame on Campus","Rent.com","Website-craigslist","Apartment List","Website-apartments.com","Forthea - paid social","Forthea - organic search","Website-apartmentguide.com","Forthea","Uhomes","Phone book","Property - website"];break;default:n=[]}return e.sort(),e.filter(e=>{const t=e.toLowerCase();return!n.map(e=>e.toLowerCase()).includes(t)})};async function zh(e){var t,n;if(!e)return!1;try{return null!==(n=null===(t=(await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/aip`)).data)||void 0===t?void 0:t.is_aip)&&void 0!==n&&n}catch(e){return!1}}const Gh=new Set(["8009855990","8338526262","8002221222","8006624357","8002738255","8007997233","8007874889","8006564673","8004224453","8883737888","8006213362","8009506264","8558272736","8008435678","8007862929","8008523836","8007849433","8007729100","8006699777","8006858470","8004322209","8003473735","8008778339","8009552232","8002255342","8009272891","8003049320","8007937724","8002382333","8003353863","8776858878","8003329227","8776554371","8772944357","8772944356","6092925760","6092926735","8007928339","8008329173","8882853036","6092921210","8007929773","8003561561","8003826717","8005727233","8009291040","8888958179","8006879512","8004262537","8773475463","8774149251","8005103102","8889372835","8007010710","8007010720","8774288844","8007929745","8003283838","6092927060","6092928319","8008527899","8662401347","8009923678","8776522873","8776527624","8003313937","8008435437","8776536783","8778392339","8003676274","8006896411"]),Vh=e=>{const t=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1");return Gh.has(t)},Wh=(e,t,n)=>{try{const i=e.replace(/\D/g,"").replace(/^1(\d{10})$/,"$1"),r=`tel:${i}`,o=`sms:${i}`,a=`whatsapp://send?phone=${i}`,s=`facetime:${i}`,l=`facetime-audio:${i}`,u=/(?:\+1[\s.-]?)?(?:\([2-9]\d{2}\)[\s.-]?|[2-9]\d{2}[\s.-])[2-9]\d{2}[\s.-]?\d{4}/g,d=/(tel|sms):(?:\+1\s)?(?:(?:\(\d{3}\)\s|\d{3}-)\d{3}-\d{4}|\d{10,11})/g,c=/whatsapp:\/\/send\?phone=\d+/g,h=/(facetime|facetime-audio):\d+/g,p=/emergency|emergencia/i,f=300,g=e=>!(!e||e.length>f)&&p.test(e),m=e=>{var t,n,i,r;if(g(e.textContent))return!0;if(g(null===(t=e.previousElementSibling)||void 0===t?void 0:t.textContent)||g(null===(n=e.nextElementSibling)||void 0===n?void 0:n.textContent))return!0;const o=e.parentElement;return!(!o||!g(null===(i=o.previousElementSibling)||void 0===i?void 0:i.textContent)&&!g(null===(r=o.nextElementSibling)||void 0===r?void 0:r.textContent))},b=document.body.getElementsByTagName("*");let y=!1;const v=i.replace(/(\d{3})(\d{3})(\d{4})/,"($1) $2-$3");let w=!1,C=!1,x=0;for(let e=0;e<b.length;e++)if(b[e].nodeType===Node.ELEMENT_NODE&&!m(b[e])){if(1===b[e].childNodes.length&&b[e].childNodes[0].nodeType==Node.TEXT_NODE){const t=b[e].textContent;if(!t)continue;const n=t.replace(u,e=>{if(Vh(e))return e;return e.startsWith("+1 ")?`+1 ${v}`:v});t!==n&&(x++,b[e].textContent=n),y=!0,w||(w=!0)}if(b[e].hasAttribute("href")){const t=b[e].getAttribute("href");if(!t)continue;let n="",i=d;if(t.startsWith("sms:")?n=o:t.startsWith("whatsapp:")?(n=a,i=c):t.startsWith("facetime:")?(n=s,i=h):t.startsWith("facetime-audio:")?(n=l,i=h):n=r,Vh(t))continue;const u=t.replace(i,n);if(b[e].setAttribute("href",u),(t.startsWith("tel:")||t.startsWith("sms:"))&&u===t&&u!==n){t.replace(/\D/g,"").length>=7&&b[e].setAttribute("href",t.startsWith("tel:")?r:o)}C||(C=!0)}}return w&&Ao({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"text-insertion",newPhoneNumber:v,website:window.location.href},logType:ko.info,buildingSlug:n,orgSlug:t}),C&&Ao({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"href-insertion",newPhoneNumber:v,website:window.location.href},logType:ko.info,buildingSlug:n,orgSlug:t}),y||Ao({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"no-phone-number-found",website:window.location.href},logType:ko.warn,buildingSlug:n,orgSlug:t}),x}catch(e){return Ao({logTitle:"DNI_WEBSITE_INSERTION",logData:{type:"insertion-error",error:e instanceof Error?e.message:String(e),website:window.location.href},logType:ko.error,buildingSlug:n,orgSlug:t,error:e}),0}},Qh=(e,t,n,i)=>{document.querySelectorAll("a").forEach(function(r){const o=r.getAttribute("href");o&&o.startsWith("https://app.meetelise.com/")&&((e,t,n)=>{const[i,r,o,...a]=new URL(e).pathname.split("/").filter(Boolean).map(e=>e.toLowerCase());return 0===a.length&&"tour"===o&&i===t.toLowerCase()&&r===n.toLowerCase()})(o,t,n)&&r.addEventListener("click",t=>{i()&&(t.preventDefault(),e(t))})})};var qh=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 Yh=class extends ue{constructor(){super(...arguments),this.onClick=()=>{},this.primaryColor=Zn,this.foregroundColorOnPrimaryBackgroundColor="white",this.toExpand=!1}render(){return H`
|
|
8993
9011
|
<button
|
|
8994
9012
|
class=${this.toExpand?"button-container mini":"button-container"}
|
|
8995
9013
|
@click=${this.onClick}
|
|
@@ -9000,13 +9018,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9000
9018
|
style=${Xn({background:this.primaryColor})}
|
|
9001
9019
|
>
|
|
9002
9020
|
${this.toExpand?H`<div class="chevron-up">
|
|
9003
|
-
${
|
|
9021
|
+
${hh(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
9004
9022
|
</div>`:H` <div class="x-icon">
|
|
9005
|
-
${
|
|
9023
|
+
${Xl(this.foregroundColorOnPrimaryBackgroundColor)}
|
|
9006
9024
|
</div>`}
|
|
9007
9025
|
</div>
|
|
9008
9026
|
</button>
|
|
9009
|
-
`}};
|
|
9027
|
+
`}};Yh.styles=[p`
|
|
9010
9028
|
.button-container {
|
|
9011
9029
|
width: 56px;
|
|
9012
9030
|
height: 56px;
|
|
@@ -9056,7 +9074,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9056
9074
|
cursor: pointer;
|
|
9057
9075
|
filter: brightness(90%);
|
|
9058
9076
|
}
|
|
9059
|
-
`],Qh([pe({attribute:!0})],qh.prototype,"onClick",void 0),Qh([pe({attribute:!0})],qh.prototype,"primaryColor",void 0),Qh([pe({attribute:!0})],qh.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),Qh([pe({attribute:!0})],qh.prototype,"toExpand",void 0),qh=Qh([ce("minimize-expand-button")],qh);const Yh="cdn.skypack.dev/@meetelise/chat",Kh="cdn.eliseai.com/@meetelise/chat",Xh=async(e,t)=>{try{if(Math.random()>=.15)return;const n=(()=>{try{const e=document.getElementsByTagName("script");for(const t of e){const e=t.src||"",n=t.textContent||"";if(e.includes(Yh)||n.includes(Yh))return"skypack";if(e.includes(Kh)||n.includes(Kh))return"eliseai"}return"unknown"}catch(e){return"unknown"}})();await r().post("https://app.meetelise.com/platformApi/webchat/cdn-version",{cdn_version:n},{params:{cdn_version:n},headers:{"Content-Type":"application/json","building-slug":t,"org-slug":e}})}catch(e){}},Zh=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?t.endsWith("/units")?t:`${t}/units`:t,Jh={"95ae958e-95db-11ed-9862-6f4db5533d3f":"8008db60-45b7-11f1-88ac-635f686365da","95ae96b0-95db-11ed-9863-a7aa664fd985":"72ed27c4-45b7-11f1-82d9-37b7db547687"},ep="https://applications.eliseai.com",tp=["Check Availability","Apply Now"],np=(e,t,n,i)=>{if(!(e=>{var t;if(!e.classList.contains("floorplan-button"))return!1;const n=e.getElementsByTagName("span");if(1!==n.length)return!1;const i=null===(t=n[0].textContent)||void 0===t?void 0:t.trim();return null!=i&&tp.includes(i)})(e))return!1;if(e.getAttribute("href")===t)return!1;const r=e.getAttribute("href");return e.setAttribute("href",t),e.setAttribute("target","_blank"),ra({logTitle:"CHECK_AVAIL_OVERWRITE",logData:{oldHref:r,newHref:t,website:window.location.href},logType:ia.info,buildingSlug:i,orgSlug:n}),!0},ip=(e,t,n,i)=>{for(let r=0;r<e.length;r++){const o=e[r];if(o.nodeType!==Node.ELEMENT_NODE)continue;const a=o;"A"===a.tagName&&np(a,t,n,i);const s=a.getElementsByTagName("a");for(let e=0;e<s.length;e++)np(s[e],t,n,i)}},rp=(e,t,n)=>{((e,t,n)=>{const i=document.body.getElementsByTagName("a");for(let r=0;r<i.length;r++)np(i[r],e,t,n)})(n,e,t);new MutationObserver(i=>{for(const r of i)ip(r.addedNodes,n,e,t)}).observe(document.body,{childList:!0,subtree:!0})};class op{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>Fr(zr(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=$o();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(na()).filter(e=>e)}},this.addSafeLeadSourceTouchpoint=e=>{const t=this.getLocalStorageMultitouchValue(),n=this._generateLeadSourceLocalStorageKey();if(!t||this.isExpiredTimestamp(t.timestampExpires)){const t={timestampExpires:this._generateNewExpirationTimestamp(),leadSources:[{parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"touchpoint"}]};localStorage.setItem(n,JSON.stringify(t))}else{if(t.leadSources.find(t=>t.leadSourceValue===e))return;if(t.leadSources.length<this.maxSourcesNonPropertyWebsiteCount)return t.leadSources.push({parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));ra({logType:ia.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,logTitle:"TOO_MANY_LEAD_SOURCES",logData:{buildingSlug:this.buildingSlug}})}},this.getSafeLeadSourceTouchpointsWithDefault=({includedUserSelectedLeadSource:e})=>{const t=this.getLocalStorageMultitouchValue(),n=la(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:Fr(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Yr(e.timestampInitiallyLogged).getTime()-Yr(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:Fr(new Date),r=[{timestampInitiallyLogged:i,leadSourceValue:n,type:"default"},...t.leadSources.map(e=>({timestampInitiallyLogged:e.timestampInitiallyLogged,leadSourceValue:e.leadSourceValue,type:e.type}))];return e&&r.push({leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"user-selected"}),r},this.getLocalStorageMultitouchValue=()=>{const e=this._generateLeadSourceLocalStorageKey(),t=localStorage.getItem(e);if(!t)return null;return JSON.parse(t)},this.isExpiredTimestamp=e=>Yr(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var ap=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 sp=class extends ue{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.centralConvo=!1,this.declaredBuildingSlug="",this.hostDeclaredBuildingId=void 0,this.orgLevel=!1,this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this._isMobile=Ir(),this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=bo.always,this.bedroomPreferenceRequired=!1,this.tourSchedulerV2=!1,this.brokerIntakeEnabled=!1,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.openTourSchedulerOnLoad=!1,this.displayPubnubChat=!1,this.launcherButton=null,this.focusChatOnMount=!1,this.myPubnub=null,this.getSessionToken=()=>{var e,t;return null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.getSessionToken())&&void 0!==t?t:null},this.LeadSourceClient=null,this.LeadSourceMultitouchClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=$p.Default,this.onWidgetLoaded=yh(),this.onSstClose=yh(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=Oe(),this.dniNumber=null,this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{var e,t;if(!this.orgSlug)return;if(!this.centralConvo&&!this.buildingSlug)return;this.centralConvo&&!this.buildingSlug&&(this.orgLevel=!0);const n=this.centralConvo?await async function(e){const t=`https://app.meetelise.com/api/pub/v1/organization/${e}/webchat/v2`,n=await r().get(t);return va(n.data)}(this.orgSlug):await ya(this.orgSlug,this.buildingSlug);if(!this.isOrgMode()){if(Math.random()<.2)try{(async(e,t)=>{const n=window.rentgrata;if(!n)return;const i=n.Widget;if(!i)return;const o=i.config;if(!o)return;const a=o.widgetKey;a&&await r().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=t?t:""}})})(this.buildingSlug,this.orgSlug)}catch(e){}try{Xh(this.orgSlug,this.buildingSlug)}catch(e){}}if(!await Tu(n,this.buildingSlug,this.orgSlug))return;oa({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==n?void 0:n.launchedDateTime)?.01:.05}),this.buildingWebchatView=n;const i=(()=>{try{const e="true"===sessionStorage.getItem(Cs);return sessionStorage.removeItem(Cs),e}catch{return!1}})();await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),(e=>{const t=new URLSearchParams(window.location.search),n=t.get("rwg_token"),i=t.get("elise_google_env");if(!n||!i||!e)return;const r={rwgToken:n,environment:i,buildingId:e,expiresAt:Date.now()+2592e6};localStorage.setItem(ts,JSON.stringify(r))})(null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.id)&&void 0!==t?t:0),i?(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0):"tour"===new URLSearchParams(window.location.search).get("elise_open")&&(this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile)?this.openTourSchedulerOnLoad=!0:this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)?(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.rememberChatAutoOpenDismissed()):"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0),this.isLoading=!1},this.setBuildingDerivedInfo=async()=>{var e,t,n,i,o,a,s,l,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$,S,k,A,T,E,_,O,P,I,N,M,D,L,R,B,U,j,F,H,z,G,V,W,Q,q,Y,K,X;const Z=this.buildingWebchatView;if(!Z)return;Z&&this.orgSlug&&!this.orgLevel&&up(this.orgSlug,null!==(t=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==t?t:null,this.sampleRateToUse,this.buildingSlug,null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null);const J=Z.featureFlagWebchatMarketingSourceDropdownConfiguration,ee=Z.featureFlagWebchatUseDniPhoneNumberBySource,te=Z.featureFlagInsertDniIntoWebsite,ne=Z.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite;var ie;ie=Ao.includes(Z.orgId),Eo=ie;const[re,oe,ae,se,le,ue]=await Promise.all([this.isOrgMode()?Promise.resolve([]):jh(this.orgSlug,this.buildingSlug),yo(this.buildingSlug),Hh(this.buildingSlug),wo(this.buildingSlug),xo(this.buildingSlug),Co(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Qn(Z.phoneNumber),this.buildingWebchatView.isAip=ae),this.leadSources=re,this.featureFlagShowDropdown=J,this.bedroomPreferenceRequired=se,this.brokerIntakeEnabled=le,this.tourSchedulerV2=ue;const de=this.orgLevel?null:Z.textWithUsPhoneNumber?Z.textWithUsPhoneNumber:await(async e=>{try{const t="https://app.meetelise.com",n=await r().get(`${t}/platformApi/webchat/${e}/phone-number`);if(n.data)return n.data}catch(t){return ra({logType:ia.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t},error:t}),null}return null})(this.buildingSlug),ce=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,he=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,pe={callDesktop:null!==(d=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==d&&d,callMobile:null!==(h=null===(c=this.buildingWebchatView)||void 0===c?void 0:c.shouldShowPhoneMobile)&&void 0!==h&&h,chatDesktop:null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.shouldShowChatDesktop)&&void 0!==f&&f,chatMobile:null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.shouldShowChatMobile)&&void 0!==m&&m,emailDesktop:null!==(y=null===(b=this.buildingWebchatView)||void 0===b?void 0:b.shouldShowEmailDesktop)&&void 0!==y&&y,emailMobile:null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailMobile)&&void 0!==w&&w,textDesktop:null!==(x=(null===(C=this.buildingWebchatView)||void 0===C?void 0:C.shouldShowTextDesktop)&&!!de)&&void 0!==x&&x,textMobile:null!==(S=(null===($=this.buildingWebchatView)||void 0===$?void 0:$.shouldShowTextMobile)&&!!de)&&void 0!==S&&S,sstDesktop:null!==(A=null===(k=this.buildingWebchatView)||void 0===k?void 0:k.shouldShowSstDesktop)&&void 0!==A&&A,sstMobile:null!==(E=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==E&&E,calcDesktop:ce,calcMobile:he};var fe,ge;this.enabledChatWidgets=this.withOrgLevelContactOptions(kh(pe),null!==(O=null===(_=this.buildingWebchatView)||void 0===_?void 0:_.phoneNumber)&&void 0!==O?O:""),this.orgLevel||(this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(Wh(this.handleTourClicked,this.orgSlug,this.buildingSlug,()=>this.isConnected),ne&&(ge=this.handleTourClicked,document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(e=>{e&&e.addEventListener("click",e=>{e.preventDefault(),ge(e)})})),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.textContent=t.textContent,i.style.cursor="pointer",i.addEventListener("click",t=>{t.preventDefault(),e(t)}),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)})})(this.handleTourClicked)):(null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&(fe=null!==(N=null===(I=this.LeadSourceClient)||void 0===I?void 0:I.leadSource)&&void 0!==N?N:null,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(fe)}`)}}))),this.buildingWebchatView&&(this.primaryColor=null!==(M=this.buildingWebchatView.primaryColor)&&void 0!==M?M:null,this.backgroundColor=null!==(D=this.buildingWebchatView.secondaryColor)&&void 0!==D?D:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(L=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==L?L:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(R=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==R?R:null,this.webchatConfigHasAutoOpenChat=null!==(B=this.buildingWebchatView.autoOpenChat)&&void 0!==B&&B,this.requiresConsent=null!==(U=this.buildingWebchatView.requiresConsentForChat)&&void 0!==U&&U,this.hideMobileFeatures=null!==(j=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==j&&j,this.privacyPolicyUrl=null!==(F=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==F?F:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===fa.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===fa.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===fa.EMOJI&&(this.designConcept=fa.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Zn),null===this.backgroundColor&&(this.backgroundColor=Jn);const me=null!==(z=null===(H=this.buildingWebchatView)||void 0===H?void 0:H.phoneNumber)&&void 0!==z?z:"";let be=null;if(ee&&!this.orgLevel&&(be=await async function(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source`,{params:{source:t}});return n.data?{number:Qn(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(V=null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&void 0!==V?V:null),be&&!be.isMatch&&(be.number=me)),te&&(null==be?void 0:be.number)){this.dniNumber=be.number;const e=Vh(be.number,this.orgSlug,this.buildingSlug);e>0&&oa({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const ye=localStorage.getItem("eliseai_phone_number_devtest");ye&&(this.dniNumber=ye,Vh(ye,this.orgSlug,this.buildingSlug)),this.phoneNumberForSource=be||{number:me,isMatch:!1,isPropertyWebsiteCatchall:!0};const ve=null!==(Q=null===(W=this.LeadSourceClient)||void 0===W?void 0:W.leadSource)&&void 0!==Q?Q:null;ve&&(this.leadSources.includes(ve)||this.leadSources.push(ve)),this.isOrgMode()||ao(Z.id);if((oe||(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isAip))&&(null===(Y=this.buildingWebchatView)||void 0===Y?void 0:Y.isLiveOnApplications)&&this.buildingSlug&&!this.orgLevel){const e=((e,t,n)=>{var i;const r=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/content\/apply/,/\/apply-now/,/\/apply/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/,/busboomgroup\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/],o=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<o.length;s++){const l=o[s];if(l.nodeType===Node.ELEMENT_NODE&&r.some(e=>e.test(l.href))){const r=l.getAttribute("href"),o=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=Zh(o,e);l.setAttribute("href",s),a++,ra({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:ia.info,buildingSlug:n,orgSlug:t})}}return 0===a&&ra({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:ia.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}/units`,this.orgSlug,this.buildingSlug);e>0&&oa({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}if(this.buildingSlug&&this.orgSlug&&!this.orgLevel)try{(e=>{const t=Jh[e];if(!t)return 0;const n=`${ep}/building/${t}/units`,i=`${ep}/building/${e}/units`,r=new RegExp(`https://applications\\.eliseai\\.com/building/${t}/units`,"g");let o=0;const a=document.body.getElementsByTagName("a");for(let e=0;e<a.length;e++){const t=a[e],s=t.getAttribute("href");if(!s||!s.includes(n))continue;const l=s.replace(r,i);l!==s&&(t.setAttribute("href",l),o++)}document.body.querySelectorAll("[onclick]").forEach(e=>{const t=e.getAttribute("onclick");if(!t||!t.includes(n))return;const a=t.replace(r,i);a!==t&&(e.setAttribute("onclick",a),o++)})})(this.buildingSlug)}catch{}this.buildingSlug&&!this.orgLevel&&(null===(K=this.buildingWebchatView)||void 0===K?void 0:K.isLiveOnApplications)&&(null===(X=this.buildingWebchatView)||void 0===X?void 0:X.applicationLink)&&"c954426c-12ab-4f8e-8384-8218e79eaf72"===this.orgSlug&&rp(this.orgSlug,this.buildingSlug,this.buildingWebchatView.applicationLink)},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a,s,l,u;if(!this.buildingWebchatView)return;const d=this.chatStorageSlug(),c=ys(d),h=vs(d,c),p=h?c:bs(d,!1);if(!p.leadId)throw new Error("Lead ID is null");if(this.LeadSourceClient=new ua,this.LeadSourceClient.orgId=null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.orgId)&&void 0!==t?t:0,this.LeadSourceMultitouchClient=new op(this.orgSlug,this.buildingSlug),this.myPubnub=new Os(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,p.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType),this.myPubnub.chatStorageSlug=d,this.centralConvo){const e=this.myPubnub;e.centralConvo=!0,void 0!==this.hostDeclaredBuildingId?e.declaredBuildingId=this.hostDeclaredBuildingId:this.fetchDeclaredBuildingId().then(t=>{void 0===this.hostDeclaredBuildingId&&(e.declaredBuildingId=t)})}else this.myPubnub.declaredBuildingId=this.buildingWebchatView.id;const f=await this.myPubnub.initSession(this.buildingSlug,this.orgSlug,h&&null!==(n=p.leadId)&&void 0!==n?n:void 0);f&&(bs(d,p.initiatedChat,f.lead_id),this.isOrgMode()&&f.building_slug&&await this.adoptBuilding(f.building_slug)),this.LeadSourceClient.chatId=this.myPubnub.channel;const g=await(null===(i=this.LeadSourceClient)||void 0===i?void 0:i.generateUserLeadSource({leadId:null!==(o=null===(r=this.myPubnub)||void 0===r?void 0:r.leadUserId)&&void 0!==o?o:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));g&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(g),"property-website"!==la(this.orgSlug)?this.myPubnub.leadSource=null!==(s=null===(a=this.LeadSourceClient)||void 0===a?void 0:a.leadSource)&&void 0!==s?s:la(this.orgSlug):this.myPubnub.leadSource=null!==(u=null===(l=this.LeadSourceClient)||void 0===l?void 0:l.leadSource)&&void 0!==u?u:null;const m=ys(d);m.initiatedChat&&await this.myPubnub.initializePubnub(m)},this.isOrgMode=()=>this.centralConvo&&!this.buildingSlug,this.chatStorageSlug=()=>this.orgLevel?"":this.buildingSlug,this.adoptBuilding=async e=>{var t;try{const n=await ya(this.orgSlug,e);if(!(null==n?void 0:n.id))return;this.buildingSlug=e,this.buildingWebchatView=n,null===(t=this.myPubnub)||void 0===t||t.adoptBuilding(e,n)}catch(e){}},this.withOrgLevelContactOptions=(e,t)=>this.orgLevel?{...e,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,callDesktop:e.callDesktop&&!!t,callMobile:e.callMobile&&!!t}:e,this.fetchDeclaredBuildingId=async()=>{if(!this.declaredBuildingSlug||!this.orgSlug)return null;try{const e=await ya(this.orgSlug,this.declaredBuildingSlug);return"number"==typeof(null==e?void 0:e.id)&&e.id>0?e.id:null}catch{return null}},this.chatAutoOpenDismissedStorageKey=()=>{const{orgSlug:e,buildingSlug:t}=this;return e&&t?`com.elise.webchat.autoOpenDismissed=${e}=${t}`:t?`com.elise.webchat.autoOpenDismissed=${t}`:e?`com.elise.webchat.autoOpenDismissed=${e}`:null},this.shouldAutoOpenChat=e=>{if(!e||Ir())return!1;const t=this.chatAutoOpenDismissedStorageKey();return!t||"true"!==localStorage.getItem(t)},this.rememberChatAutoOpenDismissed=()=>{const e=this.chatAutoOpenDismissedStorageKey();e&&localStorage.setItem(e,"true")},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!r)return;const o=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==o?void 0:o.getBoundingClientRect();a&&(r.style.left=`${a.left}px`,r.style.top=`${a.bottom}px`)},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.focusChatOnMount=!0,this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false"),this.rememberChatAutoOpenDismissed()},this.focusLauncherButton=()=>{var e,t;const n=(null===(e=this.launcherButton)||void 0===e?void 0:e.isConnected)?this.launcherButton:null;null===(t=null!=n?n:this.currentLauncherButton())||void 0===t||t.focus()},this.focusMessageFieldOnOpen=()=>{var e,t;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("pubnub-chat"),i=null==n?void 0:n.shadowRoot;n&&i&&(n.focusMessageField()||null===(t=i.getElementById("pubnub-chat-container"))||void 0===t||t.focus(),setTimeout(()=>{n.focusMessageField()},0))},this.closeChatAndRestoreFocus=()=>{this.onExitChat(),this.updateComplete.then(()=>{this.focusLauncherButton(),requestAnimationFrame(()=>this.focusLauncherButton())})}}reinsertDNIIntoWebsite(){this.dniNumber&&Vh(this.dniNumber,this.orgSlug,this.buildingSlug)}setDeclaredBuildingId(e){this.hostDeclaredBuildingId=e,this.myPubnub&&(this.myPubnub.declaredBuildingId=e)}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new ta(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),ms(this.chatStorageSlug()),this.orgLevel&&(this.buildingSlug=""),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),this._cleanupMobileListener=Nr(e=>{this._isMobile=e})}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e,t;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),null===(t=this._cleanupMobileListener)||void 0===t||t.call(this),super.disconnectedCallback()}currentLauncherButton(){var e,t,n,i;const r=null===(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("meetelise-launcher"))||void 0===t?void 0:t.shadowRoot,o=null==r?void 0:r.querySelector("#type-hey__ask-prompt, button[aria-label='Chat with us']"),a=null===(i=null===(n=null==r?void 0:r.querySelector("mobile-launcher"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.querySelector("button[aria-label='Chat with us']");return o instanceof HTMLElement?o:a instanceof HTMLElement?a:null}render(){var e,t,n,i,r,o,a,s,l,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$,S,k,A,T,E,_,O,P,I,N,M,D,L,R,B,U,j,F,z,G,V,W,Q;xh();const q=this.hideLauncher&&!this.isLoading&&!this._isMobile;return H`
|
|
9077
|
+
`],qh([pe({attribute:!0})],Yh.prototype,"onClick",void 0),qh([pe({attribute:!0})],Yh.prototype,"primaryColor",void 0),qh([pe({attribute:!0})],Yh.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),qh([pe({attribute:!0})],Yh.prototype,"toExpand",void 0),Yh=qh([ce("minimize-expand-button")],Yh);const Kh="cdn.skypack.dev/@meetelise/chat",Xh="cdn.eliseai.com/@meetelise/chat",Zh=async(e,t)=>{try{if(Math.random()>=.15)return;const n=(()=>{try{const e=document.getElementsByTagName("script");for(const t of e){const e=t.src||"",n=t.textContent||"";if(e.includes(Kh)||n.includes(Kh))return"skypack";if(e.includes(Xh)||n.includes(Xh))return"eliseai"}return"unknown"}catch(e){return"unknown"}})();await r().post("https://app.meetelise.com/platformApi/webchat/cdn-version",{cdn_version:n},{params:{cdn_version:n},headers:{"Content-Type":"application/json","building-slug":t,"org-slug":e}})}catch(e){}},Jh=(e,t)=>["floor plan","floorplan","floor plans","floorplans","apply here"].some(t=>e.toLowerCase().includes(t))?t.endsWith("/units")?t:`${t}/units`:t,ep={"95ae958e-95db-11ed-9862-6f4db5533d3f":"8008db60-45b7-11f1-88ac-635f686365da","95ae96b0-95db-11ed-9863-a7aa664fd985":"72ed27c4-45b7-11f1-82d9-37b7db547687"},tp="https://applications.eliseai.com",np=["Check Availability","Apply Now"],ip=(e,t,n,i)=>{if(!(e=>{var t;if(!e.classList.contains("floorplan-button"))return!1;const n=e.getElementsByTagName("span");if(1!==n.length)return!1;const i=null===(t=n[0].textContent)||void 0===t?void 0:t.trim();return null!=i&&np.includes(i)})(e))return!1;if(e.getAttribute("href")===t)return!1;const r=e.getAttribute("href");return e.setAttribute("href",t),e.setAttribute("target","_blank"),Ao({logTitle:"CHECK_AVAIL_OVERWRITE",logData:{oldHref:r,newHref:t,website:window.location.href},logType:ko.info,buildingSlug:i,orgSlug:n}),!0},rp=(e,t,n,i)=>{for(let r=0;r<e.length;r++){const o=e[r];if(o.nodeType!==Node.ELEMENT_NODE)continue;const a=o;"A"===a.tagName&&ip(a,t,n,i);const s=a.getElementsByTagName("a");for(let e=0;e<s.length;e++)ip(s[e],t,n,i)}},op=(e,t,n)=>{((e,t,n)=>{const i=document.body.getElementsByTagName("a");for(let r=0;r<i.length;r++)ip(i[r],e,t,n)})(n,e,t);new MutationObserver(i=>{for(const r of i)rp(r.addedNodes,n,e,t)}).observe(document.body,{childList:!0,subtree:!0})};class ap{constructor(e,t){this.persistLeadSourceTTLDays=30,this.maxSourcesNonPropertyWebsiteCount=3,this._generateLeadSourceLocalStorageKey=()=>`com.eliseai.webchat.leadsources.v2.buildingslug=${this.buildingSlug}`,this._generateNewExpirationTimestamp=()=>Fr(zr(new Date,this.persistLeadSourceTTLDays)),this._generateLeadSourceParameters=()=>{const e=Oo();return{websiteOrigin:window.location.origin,websiteSearch:window.location.search,queryParameters:e,referrer:document.referrer,parsedUtmSource:e?e.utm_source:null,campaignSources:Object.values(So()).filter(e=>e)}},this.addSafeLeadSourceTouchpoint=e=>{const t=this.getLocalStorageMultitouchValue(),n=this._generateLeadSourceLocalStorageKey();if(!t||this.isExpiredTimestamp(t.timestampExpires)){const t={timestampExpires:this._generateNewExpirationTimestamp(),leadSources:[{parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"touchpoint"}]};localStorage.setItem(n,JSON.stringify(t))}else{if(t.leadSources.find(t=>t.leadSourceValue===e))return;if(t.leadSources.length<this.maxSourcesNonPropertyWebsiteCount)return t.leadSources.push({parameters:this._generateLeadSourceParameters(),leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"touchpoint"}),t.timestampExpires=this._generateNewExpirationTimestamp(),void localStorage.setItem(n,JSON.stringify(t));Ao({logType:ko.warn,buildingSlug:this.buildingSlug,orgSlug:this.orgSlug,logTitle:"TOO_MANY_LEAD_SOURCES",logData:{buildingSlug:this.buildingSlug}})}},this.getSafeLeadSourceTouchpointsWithDefault=({includedUserSelectedLeadSource:e})=>{const t=this.getLocalStorageMultitouchValue(),n=da(this.orgSlug);if(!t){const t=[{leadSourceValue:n,timestampInitiallyLogged:Fr(new Date),type:"default"}];return e&&t.push({leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"user-selected"}),t}const i=t.leadSources.length>0?t.leadSources.sort((e,t)=>Yr(e.timestampInitiallyLogged).getTime()-Yr(t.timestampInitiallyLogged).getTime())[0].timestampInitiallyLogged:Fr(new Date),r=[{timestampInitiallyLogged:i,leadSourceValue:n,type:"default"},...t.leadSources.map(e=>({timestampInitiallyLogged:e.timestampInitiallyLogged,leadSourceValue:e.leadSourceValue,type:e.type}))];return e&&r.push({leadSourceValue:e,timestampInitiallyLogged:Fr(new Date),type:"user-selected"}),r},this.getLocalStorageMultitouchValue=()=>{const e=this._generateLeadSourceLocalStorageKey(),t=localStorage.getItem(e);if(!t)return null;return JSON.parse(t)},this.isExpiredTimestamp=e=>Yr(e)<new Date,this.resetLeadSourceTouchpoints=()=>{const e=this._generateLeadSourceLocalStorageKey();return localStorage.removeItem(e),!0},this.orgSlug=e,this.buildingSlug=t}}var sp=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 lp=class extends ue{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.centralConvo=!1,this.declaredBuildingSlug="",this.hostDeclaredBuildingId=void 0,this.orgLevel=!1,this.launcherStyles={},this.mobileStyles={},this.isMinimized=!1,this.primaryColor=null,this.backgroundColor=null,this.foregroundColorOnPrimaryBackgroundColor=null,this.foregroundColorOnSecondaryBackgroundColor=null,this._isMobile=Ir(),this.chatId="",this.analytics=null,this.launcher=null,this.buildingWebchatView=null,this.designConcept=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=bo.always,this.bedroomPreferenceRequired=!1,this.tourSchedulerV2=!1,this.brokerIntakeEnabled=!1,this.phoneNumberForSource=null,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.showTourNextToChat=!1,this.openTourSchedulerOnLoad=!1,this.displayPubnubChat=!1,this.launcherButton=null,this.focusChatOnMount=!1,this.myPubnub=null,this.getSessionToken=()=>{var e,t;return null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.getSessionToken())&&void 0!==t?t:null},this.LeadSourceClient=null,this.LeadSourceMultitouchClient=null,this.sampleRateToUse=.05,this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.overrideRentgrata=!1,this.widgetType=Sp.Default,this.onWidgetLoaded=vh(),this.onSstClose=vh(),this.enabledChatWidgets={callDesktop:!1,callMobile:!1,chatMobile:!1,chatDesktop:!1,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,sstDesktop:!1,sstMobile:!1,calcDesktop:!1,calcMobile:!1},this.webchatConfigHasAutoOpenChat=!1,this.requiresConsent=!1,this.hideMobileFeatures=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.launcherRef=Oe(),this.dniNumber=null,this.firstUpdated=async()=>this.setupWebchat(),this.setupWebchat=async()=>{var e,t;if(!this.orgSlug)return;if(!this.centralConvo&&!this.buildingSlug)return;this.centralConvo&&!this.buildingSlug&&(this.orgLevel=!0);const n=this.centralConvo?await async function(e){const t=`https://app.meetelise.com/api/pub/v1/organization/${e}/webchat/v2`,n=await r().get(t);return Ca(n.data)}(this.orgSlug):await wa(this.orgSlug,this.buildingSlug);if(!this.isOrgMode()){if(Math.random()<.2)try{(async(e,t)=>{const n=window.rentgrata;if(!n)return;const i=n.Widget;if(!i)return;const o=i.config;if(!o)return;const a=o.widgetKey;a&&await r().post(`https://app.meetelise.com/platformApi/webchat/rentgrata?token=${a}`,{},{headers:{"Content-Type":"application/json","building-slug":null!=e?e:"","org-slug":null!=t?t:""}})})(this.buildingSlug,this.orgSlug)}catch(e){}try{Zh(this.orgSlug,this.buildingSlug)}catch(e){}}if(!await Eu(n,this.buildingSlug,this.orgSlug))return;To({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_pixel_on_site:!0,is_any_webchat_showing:!0},sampleRate:(null==n?void 0:n.launchedDateTime)?.01:.05}),this.buildingWebchatView=n;const i=(()=>{try{const e="true"===sessionStorage.getItem(xs);return sessionStorage.removeItem(xs),e}catch{return!1}})();await this.initializeChatVariables(),await this.handleChatInitializeAnalytics(),await this.setBuildingDerivedInfo(),this.attachOnClickToLauncher(),(e=>{const t=new URLSearchParams(window.location.search),n=t.get("rwg_token"),i=t.get("elise_google_env");if(!n||!i||!e)return;const r={rwgToken:n,environment:i,buildingId:e,expiresAt:Date.now()+2592e6};localStorage.setItem(is,JSON.stringify(r))})(null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.id)&&void 0!==t?t:0),i?(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0):"tour"===new URLSearchParams(window.location.search).get("elise_open")&&(this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile)?this.openTourSchedulerOnLoad=!0:this.shouldAutoOpenChat(this.webchatConfigHasAutoOpenChat)?(this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,this.rememberChatAutoOpenDismissed()):"true"===localStorage.getItem("isChatOpen")&&(this.hideLauncher=!0,this.displayPubnubChat=!0),this.isLoading=!1},this.setBuildingDerivedInfo=async()=>{var e,t,n,i,o,a,s,l,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$,S,k,A,T,E,_,O,P,I,N,M,D,L,R,B,U,j,F,H,z,G,V,W,Q,q,Y,K,X;const Z=this.buildingWebchatView;if(!Z)return;Z&&this.orgSlug&&!this.orgLevel&&dp(this.orgSlug,null!==(t=null===(e=this.LeadSourceClient)||void 0===e?void 0:e.chatId)&&void 0!==t?t:null,this.sampleRateToUse,this.buildingSlug,null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null);const J=Z.featureFlagWebchatMarketingSourceDropdownConfiguration,ee=Z.featureFlagWebchatUseDniPhoneNumberBySource,te=Z.featureFlagInsertDniIntoWebsite,ne=Z.featureFlagWebchatReplaceAnyScheduleTourCtaWebsite;var ie;ie=No.includes(Z.orgId),Do=ie;const[re,oe,ae,se,le,ue]=await Promise.all([this.isOrgMode()?Promise.resolve([]):Fh(this.orgSlug,this.buildingSlug),yo(this.buildingSlug),zh(this.buildingSlug),wo(this.buildingSlug),xo(this.buildingSlug),Co(this.buildingSlug)]);this.buildingWebchatView&&(this.buildingWebchatView.phoneNumber=Qn(Z.phoneNumber),this.buildingWebchatView.isAip=ae),this.leadSources=re,this.featureFlagShowDropdown=J,this.bedroomPreferenceRequired=se,this.brokerIntakeEnabled=le,this.tourSchedulerV2=ue;const de=this.orgLevel?null:Z.textWithUsPhoneNumber?Z.textWithUsPhoneNumber:await(async e=>{try{const t="https://app.meetelise.com",n=await r().get(`${t}/platformApi/webchat/${e}/phone-number`);if(n.data)return n.data}catch(t){return Ao({logType:ko.error,buildingSlug:e,logTitle:"[ERROR_GETTING_PHONE_NUMBERS]",logData:{error:t},error:t}),null}return null})(this.buildingSlug),ce=null!==(a=null===(o=this.buildingWebchatView)||void 0===o?void 0:o.shouldShowPricingCalculatorDesktop)&&void 0!==a&&a,he=null!==(l=null===(s=this.buildingWebchatView)||void 0===s?void 0:s.shouldShowPricingCalculatorMobile)&&void 0!==l&&l,pe={callDesktop:null!==(d=null===(u=this.buildingWebchatView)||void 0===u?void 0:u.shouldShowPhoneDesktop)&&void 0!==d&&d,callMobile:null!==(h=null===(c=this.buildingWebchatView)||void 0===c?void 0:c.shouldShowPhoneMobile)&&void 0!==h&&h,chatDesktop:null!==(f=null===(p=this.buildingWebchatView)||void 0===p?void 0:p.shouldShowChatDesktop)&&void 0!==f&&f,chatMobile:null!==(m=null===(g=this.buildingWebchatView)||void 0===g?void 0:g.shouldShowChatMobile)&&void 0!==m&&m,emailDesktop:null!==(y=null===(b=this.buildingWebchatView)||void 0===b?void 0:b.shouldShowEmailDesktop)&&void 0!==y&&y,emailMobile:null!==(w=null===(v=this.buildingWebchatView)||void 0===v?void 0:v.shouldShowEmailMobile)&&void 0!==w&&w,textDesktop:null!==(x=(null===(C=this.buildingWebchatView)||void 0===C?void 0:C.shouldShowTextDesktop)&&!!de)&&void 0!==x&&x,textMobile:null!==(S=(null===($=this.buildingWebchatView)||void 0===$?void 0:$.shouldShowTextMobile)&&!!de)&&void 0!==S&&S,sstDesktop:null!==(A=null===(k=this.buildingWebchatView)||void 0===k?void 0:k.shouldShowSstDesktop)&&void 0!==A&&A,sstMobile:null!==(E=null===(T=this.buildingWebchatView)||void 0===T?void 0:T.shouldShowSstMobile)&&void 0!==E&&E,calcDesktop:ce,calcMobile:he};var fe,ge;this.enabledChatWidgets=this.withOrgLevelContactOptions(Ah(pe),null!==(O=null===(_=this.buildingWebchatView)||void 0===_?void 0:_.phoneNumber)&&void 0!==O?O:""),this.orgLevel||(this.enabledChatWidgets.sstDesktop||this.enabledChatWidgets.sstMobile||"radco"===this.orgSlug?(Qh(this.handleTourClicked,this.orgSlug,this.buildingSlug,()=>this.isConnected),ne&&(ge=this.handleTourClicked,document.querySelectorAll('a[href$="schedule-a-tour"]').forEach(e=>{e&&e.addEventListener("click",e=>{e.preventDefault(),ge(e)})})),"radco"===this.orgSlug&&(e=>{document.querySelectorAll('a[href^="#leaseleads-tour-open"]').forEach(t=>{var n;if(!t)return;const i=document.createElement("a");i.textContent=t.textContent,i.style.cursor="pointer",i.addEventListener("click",t=>{t.preventDefault(),e(t)}),null===(n=t.parentNode)||void 0===n||n.replaceChild(i,t)})})(this.handleTourClicked)):(null===(P=this.LeadSourceClient)||void 0===P?void 0:P.leadSource)&&(fe=null!==(N=null===(I=this.LeadSourceClient)||void 0===I?void 0:I.leadSource)&&void 0!==N?N:null,document.querySelectorAll("a").forEach(function(e){const t=e.getAttribute("href");if(t&&t.startsWith("https://app.meetelise.com/")){const n=t.includes("?")?"&":"?";e.setAttribute("href",t+n+`eliseParsedLeadSource=${encodeURIComponent(fe)}`)}}))),this.buildingWebchatView&&(this.primaryColor=null!==(M=this.buildingWebchatView.primaryColor)&&void 0!==M?M:null,this.backgroundColor=null!==(D=this.buildingWebchatView.secondaryColor)&&void 0!==D?D:null,this.foregroundColorOnPrimaryBackgroundColor=null!==(L=this.buildingWebchatView.foregroundColorOnPrimaryBackgroundColor)&&void 0!==L?L:null,this.foregroundColorOnSecondaryBackgroundColor=null!==(R=this.buildingWebchatView.foregroundColorOnSecondaryBackgroundColor)&&void 0!==R?R:null,this.webchatConfigHasAutoOpenChat=null!==(B=this.buildingWebchatView.autoOpenChat)&&void 0!==B&&B,this.requiresConsent=null!==(U=this.buildingWebchatView.requiresConsentForChat)&&void 0!==U&&U,this.hideMobileFeatures=null!==(j=this.buildingWebchatView.collapseMobileFeatures)&&void 0!==j&&j,this.privacyPolicyUrl=null!==(F=this.buildingWebchatView.privacyPolicyUrlForChat)&&void 0!==F?F:this.privacyPolicyUrl,this.buildingWebchatView.displayStyle===ma.MINIMIZED&&(this.isMinimized=!0),this.buildingWebchatView.displayStyle===ma.PILLS&&(this.designConcept=null),this.buildingWebchatView.displayStyle===ma.EMOJI&&(this.designConcept=ma.EMOJI),this.onWidgetLoaded()),null===this.primaryColor&&(this.primaryColor=Zn),null===this.backgroundColor&&(this.backgroundColor=Jn);const me=null!==(z=null===(H=this.buildingWebchatView)||void 0===H?void 0:H.phoneNumber)&&void 0!==z?z:"";let be=null;if(ee&&!this.orgLevel&&(be=await async function(e,t){try{const n=await r().get(`https://app.meetelise.com/platformApi/webchat/${e}/phone-number-by-source`,{params:{source:t}});return n.data?{number:Qn(n.data.number),isMatch:n.data.match,isPropertyWebsiteCatchall:n.data.isPropertyWebsiteCatchall}:null}catch(e){return null}}(this.buildingSlug,null!==(V=null===(G=this.LeadSourceClient)||void 0===G?void 0:G.leadSource)&&void 0!==V?V:null),be&&!be.isMatch&&(be.number=me)),te&&(null==be?void 0:be.number)){this.dniNumber=be.number;const e=Wh(be.number,this.orgSlug,this.buildingSlug);e>0&&To({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_dni_insert_override_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}const ye=localStorage.getItem("eliseai_phone_number_devtest");ye&&(this.dniNumber=ye,Wh(ye,this.orgSlug,this.buildingSlug)),this.phoneNumberForSource=be||{number:me,isMatch:!1,isPropertyWebsiteCatchall:!0};const ve=null!==(Q=null===(W=this.LeadSourceClient)||void 0===W?void 0:W.leadSource)&&void 0!==Q?Q:null;ve&&(this.leadSources.includes(ve)||this.leadSources.push(ve)),this.isOrgMode()||ao(Z.id);if((oe||(null===(q=this.buildingWebchatView)||void 0===q?void 0:q.isAip))&&(null===(Y=this.buildingWebchatView)||void 0===Y?void 0:Y.isLiveOnApplications)&&this.buildingSlug&&!this.orgLevel){const e=((e,t,n)=>{var i;const r=[/thehavenatgreenhill\.securecafe\.com\/onlineleasing\/the-haven-at-greenhill\/oleapplication\.aspx(\?.*)?$/,/securecafe\.com\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/onlineleasing.*\/oleapplication\.aspx(\?.*)?$/,/\/content\/apply/,/\/apply-now/,/\/apply/,/vsc\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/,/vsc\.myresman\.com\/Portal\/Applicants\/New\/.*(\?.*)?$/,/busboomgroup\.myresman\.com\/Portal\/Applicants\/Availability(\?.*)?$/],o=document.body.getElementsByTagName("a");let a=0;for(let s=0;s<o.length;s++){const l=o[s];if(l.nodeType===Node.ELEMENT_NODE&&r.some(e=>e.test(l.href))){const r=l.getAttribute("href"),o=(null===(i=l.textContent)||void 0===i?void 0:i.toLowerCase())||"",s=Jh(o,e);l.setAttribute("href",s),a++,Ao({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"link-replacement",oldHref:r,newHref:s,website:window.location.href},logType:ko.info,buildingSlug:n,orgSlug:t})}}return 0===a&&Ao({logTitle:"SELECT_BUTTON_LINK_REPLACEMENT",logData:{type:"no-select-buttons-found",website:window.location.href},logType:ko.warn,buildingSlug:n,orgSlug:t}),a})(`https://applications.eliseai.com/building/${this.buildingSlug}/units`,this.orgSlug,this.buildingSlug);e>0&&To({params:{org_slug:this.orgSlug,building_slug:this.buildingSlug,is_application_link_replacement_success:!0,extra_data:{total_replacements:e}},sampleRate:this.sampleRateToUse})}if(this.buildingSlug&&this.orgSlug&&!this.orgLevel)try{(e=>{const t=ep[e];if(!t)return 0;const n=`${tp}/building/${t}/units`,i=`${tp}/building/${e}/units`,r=new RegExp(`https://applications\\.eliseai\\.com/building/${t}/units`,"g");let o=0;const a=document.body.getElementsByTagName("a");for(let e=0;e<a.length;e++){const t=a[e],s=t.getAttribute("href");if(!s||!s.includes(n))continue;const l=s.replace(r,i);l!==s&&(t.setAttribute("href",l),o++)}document.body.querySelectorAll("[onclick]").forEach(e=>{const t=e.getAttribute("onclick");if(!t||!t.includes(n))return;const a=t.replace(r,i);a!==t&&(e.setAttribute("onclick",a),o++)})})(this.buildingSlug)}catch{}this.buildingSlug&&!this.orgLevel&&(null===(K=this.buildingWebchatView)||void 0===K?void 0:K.isLiveOnApplications)&&(null===(X=this.buildingWebchatView)||void 0===X?void 0:X.applicationLink)&&"c954426c-12ab-4f8e-8384-8218e79eaf72"===this.orgSlug&&op(this.orgSlug,this.buildingSlug,this.buildingWebchatView.applicationLink)},this.initializeChatVariables=async()=>{var e,t,n,i,r,o,a,s,l,u;if(!this.buildingWebchatView)return;const d=this.chatStorageSlug(),c=vs(d),h=ws(d,c),p=h?c:ys(d,!1);if(!p.leadId)throw new Error("Lead ID is null");if(this.LeadSourceClient=new ca,this.LeadSourceClient.orgId=null!==(t=null===(e=this.buildingWebchatView)||void 0===e?void 0:e.orgId)&&void 0!==t?t:0,this.LeadSourceMultitouchClient=new ap(this.orgSlug,this.buildingSlug),this.myPubnub=new Ps(this.buildingSlug,this.buildingWebchatView,this.orgSlug,null,p.leadId,this.LeadSourceMultitouchClient,this.LeadSourceClient,this.widgetType),this.myPubnub.chatStorageSlug=d,this.centralConvo){const e=this.myPubnub;e.centralConvo=!0,void 0!==this.hostDeclaredBuildingId?e.declaredBuildingId=this.hostDeclaredBuildingId:this.fetchDeclaredBuildingId().then(t=>{void 0===this.hostDeclaredBuildingId&&(e.declaredBuildingId=t)})}else this.myPubnub.declaredBuildingId=this.buildingWebchatView.id;const f=await this.myPubnub.initSession(this.buildingSlug,this.orgSlug,h&&null!==(n=p.leadId)&&void 0!==n?n:void 0);f&&(ys(d,p.initiatedChat,f.lead_id),this.isOrgMode()&&f.building_slug&&await this.adoptBuilding(f.building_slug)),this.LeadSourceClient.chatId=this.myPubnub.channel;const g=await(null===(i=this.LeadSourceClient)||void 0===i?void 0:i.generateUserLeadSource({leadId:null!==(o=null===(r=this.myPubnub)||void 0===r?void 0:r.leadUserId)&&void 0!==o?o:"",orgSlug:this.orgSlug,buildingSlug:this.buildingSlug}));g&&this.LeadSourceMultitouchClient.addSafeLeadSourceTouchpoint(g),"property-website"!==da(this.orgSlug)?this.myPubnub.leadSource=null!==(s=null===(a=this.LeadSourceClient)||void 0===a?void 0:a.leadSource)&&void 0!==s?s:da(this.orgSlug):this.myPubnub.leadSource=null!==(u=null===(l=this.LeadSourceClient)||void 0===l?void 0:l.leadSource)&&void 0!==u?u:null;const m=vs(d);m.initiatedChat&&await this.myPubnub.initializePubnub(m)},this.isOrgMode=()=>this.centralConvo&&!this.buildingSlug,this.chatStorageSlug=()=>this.orgLevel?"":this.buildingSlug,this.adoptBuilding=async e=>{var t;try{const n=await wa(this.orgSlug,e);if(!(null==n?void 0:n.id))return;this.buildingSlug=e,this.buildingWebchatView=n,null===(t=this.myPubnub)||void 0===t||t.adoptBuilding(e,n)}catch(e){}},this.withOrgLevelContactOptions=(e,t)=>this.orgLevel?{...e,emailDesktop:!1,emailMobile:!1,textDesktop:!1,textMobile:!1,callDesktop:e.callDesktop&&!!t,callMobile:e.callMobile&&!!t}:e,this.fetchDeclaredBuildingId=async()=>{if(!this.declaredBuildingSlug||!this.orgSlug)return null;try{const e=await wa(this.orgSlug,this.declaredBuildingSlug);return"number"==typeof(null==e?void 0:e.id)&&e.id>0?e.id:null}catch{return null}},this.chatAutoOpenDismissedStorageKey=()=>{const{orgSlug:e,buildingSlug:t}=this;return e&&t?`com.elise.webchat.autoOpenDismissed=${e}=${t}`:t?`com.elise.webchat.autoOpenDismissed=${t}`:e?`com.elise.webchat.autoOpenDismissed=${e}`:null},this.shouldAutoOpenChat=e=>{if(!e||Ir())return!1;const t=this.chatAutoOpenDismissedStorageKey();return!t||"true"!==localStorage.getItem(t)},this.rememberChatAutoOpenDismissed=()=>{const e=this.chatAutoOpenDismissedStorageKey();e&&localStorage.setItem(e,"true")},this.handleContactClicked=e=>{var t;this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;this.showTourNextToChat?null===(t=this.launcherRef.value)||void 0===t||t.onClickSSTOption(e):(this.hideLauncher?this.showTourNextToChat=!0:this.displayPubnubChat=!1,this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e))},this.handleContactTabClicked=e=>{var t;this.displayPubnubChat=!1,this.showTourNextToChat=!1,this.hideLauncher=!1,null===(t=this.launcherRef.value)||void 0===t||t.onClickPhoneOption(e)},this.adjustPositionChatAdditionalActions=()=>{var e,t,n,i;const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("chatAdditionalActionsPubnub");if(!r)return;const o=null===(i=null===(n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pubnub-chat"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.getElementById("pubnub-chat-container"),a=null==o?void 0:o.getBoundingClientRect();a&&(r.style.left=`${a.left}px`,r.style.top=`${a.bottom}px`)},this.onClickMinimize=e=>{e.preventDefault(),e.stopPropagation(),this.isMinimized=!this.isMinimized,this.showTourNextToChat=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.focusChatOnMount=!0,this.displayPubnubChat=!0,this.hideLauncher=!0,this.hasMounted=!0,localStorage.setItem("isChatOpen","true")},e.onExitChat=this.onExitChat)},this.onExitChat=()=>{this.displayPubnubChat=!1,this.hideLauncher=!1,this.showTourNextToChat=!1,localStorage.setItem("isChatOpen","false"),this.rememberChatAutoOpenDismissed()},this.focusLauncherButton=()=>{var e,t;const n=(null===(e=this.launcherButton)||void 0===e?void 0:e.isConnected)?this.launcherButton:null;null===(t=null!=n?n:this.currentLauncherButton())||void 0===t||t.focus()},this.focusMessageFieldOnOpen=()=>{var e,t;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("pubnub-chat"),i=null==n?void 0:n.shadowRoot;n&&i&&(n.focusMessageField()||null===(t=i.getElementById("pubnub-chat-container"))||void 0===t||t.focus(),setTimeout(()=>{n.focusMessageField()},0))},this.closeChatAndRestoreFocus=()=>{this.onExitChat(),this.updateComplete.then(()=>{this.focusLauncherButton(),requestAnimationFrame(()=>this.focusLauncherButton())})}}reinsertDNIIntoWebsite(){this.dniNumber&&Wh(this.dniNumber,this.orgSlug,this.buildingSlug)}setDeclaredBuildingId(e){this.hostDeclaredBuildingId=e,this.myPubnub&&(this.myPubnub.declaredBuildingId=e)}async handleChatInitializeAnalytics(){var e,t,n,i;this.analytics=new $o(this.orgSlug,this.buildingSlug,null!==(t=null===(e=this.myPubnub)||void 0===e?void 0:e.channel)&&void 0!==t?t:"",null!==(i=null===(n=this.LeadSourceClient)||void 0===n?void 0:n.leadSource)&&void 0!==i?i:null),Math.random()<.05&&this.analytics.ping("webchat_heartbeat")}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),bs(this.chatStorageSlug()),this.orgLevel&&(this.buildingSlug=""),this.myPubnub=null,this.displayPubnubChat=!1,await this.setupWebchat(),this.hideLauncher=!1}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustPositionChatAdditionalActions),this._cleanupMobileListener=Nr(e=>{this._isMobile=e})}updated(){this.adjustPositionChatAdditionalActions()}disconnectedCallback(){var e,t;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),window.removeEventListener("resize",this.adjustPositionChatAdditionalActions),null===(t=this._cleanupMobileListener)||void 0===t||t.call(this),super.disconnectedCallback()}currentLauncherButton(){var e,t,n,i;const r=null===(t=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("meetelise-launcher"))||void 0===t?void 0:t.shadowRoot,o=null==r?void 0:r.querySelector("#type-hey__ask-prompt, button[aria-label='Chat with us']"),a=null===(i=null===(n=null==r?void 0:r.querySelector("mobile-launcher"))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.querySelector("button[aria-label='Chat with us']");return o instanceof HTMLElement?o:a instanceof HTMLElement?a:null}render(){var e,t,n,i,r,o,a,s,l,u,d,c,h,p,f,g,m,b,y,v,w,C,x,$,S,k,A,T,E,_,O,P,I,N,M,D,L,R,B,U,j,F,z,G,V,W,Q;$h();const q=this.hideLauncher&&!this.isLoading&&!this._isMobile;return H`
|
|
9060
9078
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9061
9079
|
${this.displayPubnubChat?H`
|
|
9062
9080
|
<pubnub-chat
|
|
@@ -9066,7 +9084,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9066
9084
|
.orgSlug=${this.orgSlug}
|
|
9067
9085
|
.buildingSlug=${this.buildingSlug}
|
|
9068
9086
|
.centralConvo=${this.centralConvo}
|
|
9069
|
-
.widgetType=${
|
|
9087
|
+
.widgetType=${Sp.Default}
|
|
9070
9088
|
.building=${this.buildingWebchatView}
|
|
9071
9089
|
.primaryColor=${this.primaryColor}
|
|
9072
9090
|
.backgroundColor=${this.backgroundColor}
|
|
@@ -9176,7 +9194,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9176
9194
|
</meetelise-launcher>`:""}
|
|
9177
9195
|
</div>
|
|
9178
9196
|
</meta>
|
|
9179
|
-
`}};
|
|
9197
|
+
`}};lp.styles=p`
|
|
9180
9198
|
:host {
|
|
9181
9199
|
all: initial;
|
|
9182
9200
|
}
|
|
@@ -9225,7 +9243,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9225
9243
|
position: fixed;
|
|
9226
9244
|
bottom: 0;
|
|
9227
9245
|
}
|
|
9228
|
-
`,
|
|
9246
|
+
`,sp([pe({type:String})],lp.prototype,"buildingSlug",void 0),sp([pe({type:String})],lp.prototype,"orgSlug",void 0),sp([pe({type:Boolean})],lp.prototype,"centralConvo",void 0),sp([pe({type:String})],lp.prototype,"declaredBuildingSlug",void 0),sp([pe({type:Object})],lp.prototype,"launcherStyles",void 0),sp([pe()],lp.prototype,"mobileStyles",void 0),sp([pe({type:Boolean})],lp.prototype,"isMinimized",void 0),sp([pe({type:String})],lp.prototype,"primaryColor",void 0),sp([pe({type:String})],lp.prototype,"backgroundColor",void 0),sp([pe({type:String})],lp.prototype,"foregroundColorOnPrimaryBackgroundColor",void 0),sp([pe({type:String})],lp.prototype,"foregroundColorOnSecondaryBackgroundColor",void 0),sp([fe()],lp.prototype,"_isMobile",void 0),sp([fe()],lp.prototype,"chatId",void 0),sp([fe()],lp.prototype,"analytics",void 0),sp([fe()],lp.prototype,"launcher",void 0),sp([fe()],lp.prototype,"buildingWebchatView",void 0),sp([fe()],lp.prototype,"designConcept",void 0),sp([fe()],lp.prototype,"leadSources",void 0),sp([fe()],lp.prototype,"currentLeadSource",void 0),sp([fe()],lp.prototype,"featureFlagShowDropdown",void 0),sp([fe()],lp.prototype,"bedroomPreferenceRequired",void 0),sp([fe()],lp.prototype,"tourSchedulerV2",void 0),sp([fe()],lp.prototype,"brokerIntakeEnabled",void 0),sp([fe()],lp.prototype,"phoneNumberForSource",void 0),sp([fe()],lp.prototype,"hasMounted",void 0),sp([fe()],lp.prototype,"hideLauncher",void 0),sp([fe()],lp.prototype,"isLoading",void 0),sp([fe()],lp.prototype,"showTourNextToChat",void 0),sp([fe()],lp.prototype,"openTourSchedulerOnLoad",void 0),sp([fe()],lp.prototype,"displayPubnubChat",void 0),sp([fe()],lp.prototype,"myPubnub",void 0),sp([fe()],lp.prototype,"LeadSourceClient",void 0),sp([fe()],lp.prototype,"LeadSourceMultitouchClient",void 0),sp([fe()],lp.prototype,"sampleRateToUse",void 0),sp([pe({type:Number})],lp.prototype,"right",void 0),sp([pe({type:Number})],lp.prototype,"bottom",void 0),sp([pe({type:Number})],lp.prototype,"top",void 0),sp([pe({type:Number})],lp.prototype,"left",void 0),sp([pe({attribute:!0})],lp.prototype,"overrideRentgrata",void 0),sp([pe({attribute:!0})],lp.prototype,"widgetType",void 0),sp([pe()],lp.prototype,"onWidgetLoaded",void 0),sp([pe({attribute:!0})],lp.prototype,"onSstClose",void 0),sp([fe()],lp.prototype,"enabledChatWidgets",void 0),sp([fe()],lp.prototype,"webchatConfigHasAutoOpenChat",void 0),sp([fe()],lp.prototype,"requiresConsent",void 0),sp([fe()],lp.prototype,"hideMobileFeatures",void 0),sp([fe()],lp.prototype,"privacyPolicyUrl",void 0),lp=sp([ce("me-chat")],lp);const up=e=>{for(const t of e){const e=document.getElementById(t);if(e)return e}return null},dp=async(e,t,n,i,o)=>{var a;if(!i||!e)return;const s=await async function(e){if(!e)return!1;try{return(await r().get(mo(e),{params:{building_slug:e,flag_type:"bool",feature_flag:"webchat-use-override-contact-us-form",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(i);if(!s)return;const u=up(["myContactForm","contactus","fpa-myContactForm"]);let d;if(!(u&&u instanceof HTMLFormElement)){const t=document.querySelector("form");return void(window.location.pathname.toLowerCase().includes("contactus")&&cp(i,e,"Could not find form",t?{id:t.id}:void 0))}try{if(u.parentElement&&"scheduleTourForm"===u.parentElement.id)return cp(i,e,"Form is apart of schedule tour form!")}catch(e){}for(let e=0;e<u.elements.length;e++){const t=u.elements[e];if("button"===t.tagName.toLowerCase()&&"fakebutton"===t.getAttribute("data-selenium-id")){d=t;break}if("fpa-contact-submit"===t.getAttribute("id")){d=t;break}}if(!d)return cp(i,e,"Could not find submit button");const c=()=>({firstName:up(["firstname","txtName","fpa-firstname","Form_FirstName"]),lastName:up(["lastname","txtName2","fpa-lastname","Form_LastName"]),email:up(["email","txtEmail","fpa-email","Form_Email"]),phone:up(["phonenumber","txtPhone","fpa-phonenumber","Form_Phone"]),message:up(["message","txtComments","fpa-email","Form_Message"])});if(Object.values(c()).some(e=>null===e)){const t=Object.entries(c()).filter(([,e])=>null===e).map(([e])=>e);return cp(i,e,"Missing the following form elements: "+t.join(", "))}const h=d.textContent,p=d.cloneNode(!0);null===(a=d.parentNode)||void 0===a||a.replaceChild(p,d),p&&To({params:{chat_id:t,org_slug:e,building_slug:i,is_form_override_success:!0},sampleRate:n}),p.onclick=async function(t){if(Object.values(c()).forEach(e=>{"true"!==(null==e?void 0:e.getAttribute("aria-required"))||e.value||(e.className="form-control required is-invalid")}),!Object.values(c()).every(e=>null!==e&&!("true"===e.getAttribute("aria-required")&&!e.value)&&("email"!==e.id&&"phonenumber"!==e.id||"true"!==e.getAttribute("aria-invalid"))))return;t.preventDefault(),p.textContent="Processing request...",p.disabled=!0;const n={};Object.entries(c()).forEach(([e,t])=>n[e]=null==t?void 0:t.value);const r=await wa(e,i);if(!r)return cp(i,e,"Could not find building"),null;const a={email_address:n.email,first_name:n.firstName,last_name:n.lastName,phone_number:n.phone,first_message:n.message,building_id:r.id,is_external_form:!0,tracking_params:l(e),lead_sources:[...new Set(o?[o,da(e)]:[da(e)])]},s=JSON.stringify(a);fetch("https://app.meetelise.com/platformApi/state/create/contactMe",{method:"POST",headers:{"Content-Type":"application/json","building-slug":i,"org-slug":e},body:s}).then(e=>{if(!e.ok)throw new Error(`HTTP error ${e.status}`);return u&&u.reset(),Object.values(c()).forEach(e=>{e&&(e.disabled=!0)}),p.textContent="Submitted",p.disabled=!0,e.json()}).catch(()=>{p.textContent=h})}},cp=(e,t,n,i)=>{const r=JSON.stringify({orgSlug:t,buildingSlug:e,reason:n,url:window.location.href,formIdInfo:i});fetch("https://app.meetelise.com/platformApi/webchat/form-override-error",{method:"POST",headers:{"Content-Type":"application/json","building-slug":e,"org-slug":t},body:r})},hp=p`
|
|
9229
9247
|
.chat-launcher {
|
|
9230
9248
|
position: fixed;
|
|
9231
9249
|
}
|
|
@@ -9256,7 +9274,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9256
9274
|
filter: brightness(1.1);
|
|
9257
9275
|
}
|
|
9258
9276
|
}
|
|
9259
|
-
`;var
|
|
9277
|
+
`;var pp=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 fp=class extends ue{constructor(){super(...arguments),this.right=0,this.bottom=0,this.top=0,this.left=0,this.isChatOpen=!1,this.onClickCloseChat=()=>({}),this.onClickOpenChat=()=>({})}render(){return this.isChatOpen?H`
|
|
9260
9278
|
<div
|
|
9261
9279
|
class="chat-launcher"
|
|
9262
9280
|
style=${Xn({top:Ir()||isNaN(this.top)?void 0:`${this.top+432}px`,bottom:Ir()||isNaN(this.bottom)?"72px":this.bottom-60+"px",left:Ir()||isNaN(this.left)?void 0:`${this.left}px`,right:Ir()||isNaN(this.right)?"18px":`${this.right}px`})}
|
|
@@ -9310,12 +9328,12 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9310
9328
|
/>
|
|
9311
9329
|
</svg>
|
|
9312
9330
|
</button>
|
|
9313
|
-
</div>`}};
|
|
9331
|
+
</div>`}};fp.styles=[hp],pp([pe({type:Number})],fp.prototype,"right",void 0),pp([pe({type:Number})],fp.prototype,"bottom",void 0),pp([pe({type:Number})],fp.prototype,"top",void 0),pp([pe({type:Number})],fp.prototype,"left",void 0),pp([pe({attribute:!0})],fp.prototype,"isChatOpen",void 0),pp([pe({attribute:!0})],fp.prototype,"onClickCloseChat",void 0),pp([pe({attribute:!0})],fp.prototype,"onClickOpenChat",void 0),fp=pp([ce("simple-launcher")],fp);var gp=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 mp=class extends ue{constructor(){super(...arguments),this.healthcareId="",this.right=0,this.bottom=0,this.top=0,this.left=0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Oe(),this.firstUpdated=async()=>{await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=vs(this.healthcareId),t=ws(this.healthcareId,e)?e:ys(this.healthcareId,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Ps(this.healthcareId,null,"",this.currentLeadSource,t.leadId,null,null,Sp.Healthcare),t.initiatedChat&&await this.myPubnub.initializePubnub(e),Ir()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),bs(this.healthcareId),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return $h(),this.isLoading?H``:H`
|
|
9314
9332
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
9315
9333
|
${this.displayPubnubChat?H`
|
|
9316
9334
|
<pubnub-chat
|
|
9317
9335
|
id="pubnub-chat"
|
|
9318
|
-
.widgetType=${
|
|
9336
|
+
.widgetType=${Sp.Healthcare}
|
|
9319
9337
|
.channel=${null===(e=this.myPubnub)||void 0===e?void 0:e.channel}
|
|
9320
9338
|
.myPubnub=${this.myPubnub}
|
|
9321
9339
|
.buildingSlug=${this.healthcareId}
|
|
@@ -9341,7 +9359,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9341
9359
|
></simple-launcher>
|
|
9342
9360
|
|
|
9343
9361
|
</meta>
|
|
9344
|
-
`}};
|
|
9362
|
+
`}};mp.styles=p`
|
|
9345
9363
|
:host {
|
|
9346
9364
|
all: initial;
|
|
9347
9365
|
}
|
|
@@ -9394,13 +9412,13 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9394
9412
|
line-height: 150%;
|
|
9395
9413
|
font-size: 16px;
|
|
9396
9414
|
}
|
|
9397
|
-
`,
|
|
9415
|
+
`,gp([pe({type:String})],mp.prototype,"healthcareId",void 0),gp([pe({type:Number})],mp.prototype,"right",void 0),gp([pe({type:Number})],mp.prototype,"bottom",void 0),gp([pe({type:Number})],mp.prototype,"top",void 0),gp([pe({type:Number})],mp.prototype,"left",void 0),gp([fe()],mp.prototype,"launcher",void 0),gp([fe()],mp.prototype,"currentLeadSource",void 0),gp([fe()],mp.prototype,"displayPubnubChat",void 0),gp([fe()],mp.prototype,"myPubnub",void 0),gp([fe()],mp.prototype,"requiresConsent",void 0),gp([fe()],mp.prototype,"privacyPolicyUrl",void 0),gp([fe()],mp.prototype,"isLoading",void 0),mp=gp([ce("health-chat")],mp);var bp=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 yp=class extends ue{constructor(){super(...arguments),this.orgSlug="",this.right=void 0,this.bottom=void 0,this.top=void 0,this.left=void 0,this.launcher=null,this.currentLeadSource=null,this.displayPubnubChat=!1,this.myPubnub=null,this.requiresConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.isLoading=!0,this.launcherRef=Oe(),this.firstUpdated=async()=>{(await async function(e){if(!e)return!1;const t="e2e-test-yardi-building";try{return(await r().get(mo(t),{params:{building_slug:t,flag_type:"bool",feature_flag:"enable-show-utilities-webchat",default_str:null,default_bool:!1}})).data}catch(e){return!1}}(this.orgSlug)||location.href.includes("demo/utilities"))&&await this.initializeChatVariables()},this.initializeChatVariables=async()=>{this.isLoading=!0;const e=vs(this.orgSlug),t=ws(this.orgSlug,e)?e:ys(this.orgSlug,!1);if(!t.leadId)throw new Error("Lead ID is null");this.myPubnub=new Ps(this.orgSlug,null,this.orgSlug,this.currentLeadSource,t.leadId,null,null,Sp.Utilities),t.initiatedChat&&await this.myPubnub.initializePubnub(e),Ir()||(this.displayPubnubChat=!0),this.attachOnClickToLauncher(),this.isLoading=!1},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{this.displayPubnubChat=!0})}}async restartConversation(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),bs(this.orgSlug),this.myPubnub=null,this.displayPubnubChat=!1,await this.initializeChatVariables()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}disconnectedCallback(){var e;null===(e=this.myPubnub)||void 0===e||e.handleDisconnect(),super.disconnectedCallback()}render(){var e;return $h(),this.isLoading?H``:H`
|
|
9398
9416
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
|
9399
9417
|
${this.displayPubnubChat?H`
|
|
9400
9418
|
<pubnub-chat
|
|
9401
9419
|
id="pubnub-chat"
|
|
9402
9420
|
.channel=${null===(e=this.myPubnub)||void 0===e?void 0:e.channel}
|
|
9403
|
-
.widgetType=${
|
|
9421
|
+
.widgetType=${Sp.Utilities}
|
|
9404
9422
|
.myPubnub=${this.myPubnub}
|
|
9405
9423
|
.buildingSlug=${this.orgSlug}
|
|
9406
9424
|
.onClickExit=${()=>{this.displayPubnubChat=!1}}
|
|
@@ -9424,7 +9442,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9424
9442
|
|
|
9425
9443
|
></simple-launcher>
|
|
9426
9444
|
</meta>
|
|
9427
|
-
`}};
|
|
9445
|
+
`}};yp.styles=p`
|
|
9428
9446
|
:host {
|
|
9429
9447
|
all: initial;
|
|
9430
9448
|
}
|
|
@@ -9477,4 +9495,4 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
9477
9495
|
line-height: 150%;
|
|
9478
9496
|
font-size: 16px;
|
|
9479
9497
|
}
|
|
9480
|
-
`,mp([pe({type:String})],bp.prototype,"orgSlug",void 0),mp([pe({type:Number})],bp.prototype,"right",void 0),mp([pe({type:Number})],bp.prototype,"bottom",void 0),mp([pe({type:Number})],bp.prototype,"top",void 0),mp([pe({type:Number})],bp.prototype,"left",void 0),mp([fe()],bp.prototype,"launcher",void 0),mp([fe()],bp.prototype,"currentLeadSource",void 0),mp([fe()],bp.prototype,"displayPubnubChat",void 0),mp([fe()],bp.prototype,"myPubnub",void 0),mp([fe()],bp.prototype,"requiresConsent",void 0),mp([fe()],bp.prototype,"privacyPolicyUrl",void 0),mp([fe()],bp.prototype,"isLoading",void 0),bp=mp([ce("utilities-chat")],bp);const yp=async e=>{const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":e}});return Math.random()<.2&&ra({logType:i&&i.data?ia.info:ia.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:e,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),i.data},vp=async(e,t=5e3)=>new Promise((n,i)=>{const r=new MutationObserver((t,i)=>{const r=document.getElementById(e);r&&(i.disconnect(),n(r))});r.observe(document.body,{childList:!0,subtree:!0});const o=setTimeout(()=>{r.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))},t),a=document.querySelector(e);a&&(clearTimeout(o),r.disconnect(),n(a))});class wp{static healthcareStart(e,t=!0){var n,i,r,o;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),Sp();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","region"),a.setAttribute("aria-label","EliseAI Healthcare Widget"),a.setAttribute("healthcareId",e.id),a.setAttribute("right",(null===(n=e.right)||void 0===n?void 0:n.toString())||"unset"),a.setAttribute("bottom",(null===(i=e.bottom)||void 0===i?void 0:i.toString())||"unset"),a.setAttribute("top",(null===(r=e.top)||void 0===r?void 0:r.toString())||"unset"),a.setAttribute("left",(null===(o=e.left)||void 0===o?void 0:o.toString())||"unset"),document.body.appendChild(a),wp.healthChat=a}static start(e,t=!0){var n,i,r,o,a,s,l,u;if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;if(t&&(this.orgSlug="Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization||"",this.hasBuildingSlug=!!e.building,this.overridePlacement={right:null===(n=null==e?void 0:e.position)||void 0===n?void 0:n.right,bottom:null===(i=null==e?void 0:e.position)||void 0===i?void 0:i.bottom,top:null===(r=null==e?void 0:e.position)||void 0===r?void 0:r.top,left:null===(o=null==e?void 0:e.position)||void 0===o?void 0:o.left}),Sp(),e.studio&&!e.building)return void this.handleStudioContext(e);let d=null;switch(e.widgetType){case $p.Healthcare:throw new Error("Healthcare widget is not supported yet, please use the healthcareStart method instead.");case $p.Default:d=document.createElement("me-chat");break;case $p.Utilities:d=document.createElement("utilities-chat");break;default:d=document.createElement("me-chat")}if(!d)throw new Error("Invalid widget type");d.setAttribute("orgSlug","Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization||""),d.setAttribute("widgetType",e.widgetType||$p.Default),d.setAttribute("class","meetelise-chat"),d.setAttribute("role","region"),d.setAttribute("aria-label","EliseAI Widget"),e.brandColor&&(this.brandColor=e.brandColor,d.setAttribute("primaryColor",((e,t)=>{const n=ei(e),i=0,r=0,o=0,a={r:n.r+Math.round((i-n.r)*t),g:n.g+Math.round((r-n.g)*t),b:n.b+Math.round((o-n.b)*t)};return ti(a.r,a.g,a.b)})(e.brandColor,.3))),e.backgroundColor&&(this.backgroundColor=e.backgroundColor),d instanceof sp&&(e.centralConvo?(d.setAttribute("centralConvo","true"),e.building&&d.setAttribute("declaredBuildingSlug",e.building)):this.handleBuildingslug(d,e.organization,e.building,e),e.launcherStyles&&(d.launcherStyles=e.launcherStyles),e.mobileStyles&&(d.mobileStyles=e.mobileStyles),e.onWidgetLoaded&&(d.onWidgetLoaded=e.onWidgetLoaded),e.overrideRentgrata&&((async()=>{const e=await vp("rg-widget-compact");e&&e.setAttribute("style","display: none")})(),d.overrideRentgrata=!0),e.onSstClose&&(d.onSstClose=e.onSstClose)),e.position&&(d.setAttribute("right",(null===(a=e.position.right)||void 0===a?void 0:a.toString())||"unset"),d.setAttribute("bottom",(null===(s=e.position.bottom)||void 0===s?void 0:s.toString())||"unset"),d.setAttribute("top",(null===(l=e.position.top)||void 0===l?void 0:l.toString())||"unset"),d.setAttribute("left",(null===(u=e.position.left)||void 0===u?void 0:u.toString())||"unset")),window.eliseAi={},document.body.appendChild(d),d instanceof sp&&(wp.meChat=d),d instanceof bp&&(wp.utilitiesChat=d)}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.studioUpdateToken+=1,await this.removeWidget(),this.activeStudioOrgSlug="",this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey="",this.activeStudioOptions=null}static async removeWidget(){var e;if(!this.meChat)return;const t=this.meChat;await t.remove(),null===(e=t.parentNode)||void 0===e||e.removeChild(t),wp.meChat===t&&(wp.meChat=null)}static handleStudioContext(e){e.studio&&(this.activeStudioOptions=e)}static updateStudioContext(e){var t;const n=this.activeStudioOptions;if(!(null==n?void 0:n.studio))return;const i=++this.studioUpdateToken;if(e.siteId&&e.siteId!==n.studio.siteId)return void ra({logType:ia.warn,logTitle:"[STUDIO_WEBCHAT_CONTEXT_SITE_MISMATCH]",logData:{activeSiteId:n.studio.siteId,contextSiteId:e.siteId,url:window.location.href}});if("org"===(null===(t=e.sessionScope)||void 0===t?void 0:t.type))return void this.updateStudioOrgContext(e,n,i);const r=Cp(e.organization),o=Cp(e.building);if(!r||!o)return void this.clearStudioContext({source:"elise_studio",reason:"missing_context",preserveCache:!0});const a=function(e,t){if(!(null==e?void 0:e.key))return`building:${t}`;return e.key}(e.sessionScope,o),s=xp(r);this.activeStudioOrgSlug!==s||this.activeStudioBuildingSlug!==o||this.activeStudioSessionScopeKey!==a?this.removeWidget().then(()=>{i===this.studioUpdateToken&&(this.activeStudioOrgSlug=s,this.activeStudioBuildingSlug=o,this.activeStudioSessionScopeKey=a,this.orgSlug=s,this.start({...n,organization:r,building:o},!1))}):requestAnimationFrame(()=>{var e;return null===(e=this.meChat)||void 0===e?void 0:e.reinsertDNIIntoWebsite()})}static updateStudioOrgContext(e,t,n){var i;const r=Cp(e.organization);if(!r)return void this.clearStudioContext({source:"elise_studio",reason:"missing_context",preserveCache:!0});const o=xp(r),a=(null===(i=e.sessionScope)||void 0===i?void 0:i.key)||`org:${r}`,s=function(e){const t="string"==typeof e?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>0?t:null}(e.declaredBuildingId);!this.meChat||this.activeStudioOrgSlug!==o||this.activeStudioBuildingSlug||this.activeStudioSessionScopeKey!==a?this.removeWidget().then(()=>{var e;n===this.studioUpdateToken&&(this.activeStudioOrgSlug=o,this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey=a,this.orgSlug=o,this.start({...t,studio:void 0,organization:r,building:void 0,centralConvo:!0},!1),null===(e=this.meChat)||void 0===e||e.setDeclaredBuildingId(s))}):this.meChat.setDeclaredBuildingId(s)}static clearStudioContext(e){this.studioUpdateToken+=1,this.activeStudioOrgSlug="",this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey="",this.removeWidget()}static async handleBuildingslug(e,t,n,i){if(n)return void e.setAttribute("buildingSlug",n);if(this.mutationObserver)return;if(!t)return;const r=await yp(t);if(r){const e={...i,organization:t,building:r};this.start(e,!1)}this.previousUrl=window.location.href,document.body.addEventListener("click",()=>{requestAnimationFrame(()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,yp(t).then(e=>{if(!e)return;const n={...i,organization:t,building:e};this.start(n,!1)}))})},!0)}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,t=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,n=await r().get(t,{headers:{"org-slug":this.orgSlug}});if(Math.random()<.2&&ra({logType:n&&n.data?ia.info:ia.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${n?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:n.data,url:e,orgSlug:this.orgSlug,givenBuildingSlug:null,reason:n&&n.data?null:"No match found"}}),!n||!n.data)return;const i={organization:this.orgSlug,building:n.data,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(i,!1)}static async calculateBuildingSlugForLogging(e){const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":this.orgSlug}});Math.random()<.2&&ra({logType:i&&i.data===e?ia.info:ia.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i&&i.data===e?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:this.orgSlug,givenBuildingSlug:e,reason:i&&i.data===e?null:i&&!i.data?"No match found":i&&i.data!==e?"Mismatch":"No match found"}}),i&&i.data}}function Cp(e){return"string"!=typeof e?"":e.trim()}function xp(e){return"Pacific Urban Residential"===e?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e}var $p;wp.meChat=null,wp.healthChat=null,wp.utilitiesChat=null,wp.orgSlug="",wp.mutationObserver=null,wp.previousUrl="",wp.hasBuildingSlug=null,wp.brandColor="",wp.backgroundColor="",wp.healthcareId="",wp.activeStudioOrgSlug="",wp.activeStudioBuildingSlug="",wp.activeStudioSessionScopeKey="",wp.activeStudioOptions=null,wp.studioUpdateToken=0,wp.overridePlacement={},function(e){e.Default="default",e.Healthcare="healthcare",e.Utilities="utilities"}($p||($p={}));const Sp=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)};export{$p as WidgetType,wp as default};
|
|
9498
|
+
`,bp([pe({type:String})],yp.prototype,"orgSlug",void 0),bp([pe({type:Number})],yp.prototype,"right",void 0),bp([pe({type:Number})],yp.prototype,"bottom",void 0),bp([pe({type:Number})],yp.prototype,"top",void 0),bp([pe({type:Number})],yp.prototype,"left",void 0),bp([fe()],yp.prototype,"launcher",void 0),bp([fe()],yp.prototype,"currentLeadSource",void 0),bp([fe()],yp.prototype,"displayPubnubChat",void 0),bp([fe()],yp.prototype,"myPubnub",void 0),bp([fe()],yp.prototype,"requiresConsent",void 0),bp([fe()],yp.prototype,"privacyPolicyUrl",void 0),bp([fe()],yp.prototype,"isLoading",void 0),yp=bp([ce("utilities-chat")],yp);const vp=async e=>{const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":e}});return Math.random()<.2&&Ao({logType:i&&i.data?ko.info:ko.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:e,givenBuildingSlug:null,reason:i&&i.data?null:"No match found"}}),i.data},wp=async(e,t=5e3)=>new Promise((n,i)=>{const r=new MutationObserver((t,i)=>{const r=document.getElementById(e);r&&(i.disconnect(),n(r))});r.observe(document.body,{childList:!0,subtree:!0});const o=setTimeout(()=>{r.disconnect(),i(new Error(`Element ${e} did not appear within ${t}ms`))},t),a=document.querySelector(e);a&&(clearTimeout(o),r.disconnect(),n(a))});class Cp{static healthcareStart(e,t=!0){var n,i,r,o;t&&(this.healthcareId=e.id,this.overridePlacement={right:e.right,bottom:e.bottom,top:e.top,left:e.left}),kp();const a=document.createElement("health-chat");a.setAttribute("class","health-chat"),a.setAttribute("role","region"),a.setAttribute("aria-label","EliseAI Healthcare Widget"),a.setAttribute("healthcareId",e.id),a.setAttribute("right",(null===(n=e.right)||void 0===n?void 0:n.toString())||"unset"),a.setAttribute("bottom",(null===(i=e.bottom)||void 0===i?void 0:i.toString())||"unset"),a.setAttribute("top",(null===(r=e.top)||void 0===r?void 0:r.toString())||"unset"),a.setAttribute("left",(null===(o=e.left)||void 0===o?void 0:o.toString())||"unset"),document.body.appendChild(a),Cp.healthChat=a}static start(e,t=!0){var n,i,r,o,a,s,l,u;if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;if(t&&(this.orgSlug="Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization||"",this.hasBuildingSlug=!!e.building,this.overridePlacement={right:null===(n=null==e?void 0:e.position)||void 0===n?void 0:n.right,bottom:null===(i=null==e?void 0:e.position)||void 0===i?void 0:i.bottom,top:null===(r=null==e?void 0:e.position)||void 0===r?void 0:r.top,left:null===(o=null==e?void 0:e.position)||void 0===o?void 0:o.left}),kp(),e.studio&&!e.building)return void this.handleStudioContext(e);let d=null;switch(e.widgetType){case Sp.Healthcare:throw new Error("Healthcare widget is not supported yet, please use the healthcareStart method instead.");case Sp.Default:d=document.createElement("me-chat");break;case Sp.Utilities:d=document.createElement("utilities-chat");break;default:d=document.createElement("me-chat")}if(!d)throw new Error("Invalid widget type");d.setAttribute("orgSlug","Pacific Urban Residential"===e.organization?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e.organization||""),d.setAttribute("widgetType",e.widgetType||Sp.Default),d.setAttribute("class","meetelise-chat"),d.setAttribute("role","region"),d.setAttribute("aria-label","EliseAI Widget"),e.brandColor&&(this.brandColor=e.brandColor,d.setAttribute("primaryColor",((e,t)=>{const n=ei(e),i=0,r=0,o=0,a={r:n.r+Math.round((i-n.r)*t),g:n.g+Math.round((r-n.g)*t),b:n.b+Math.round((o-n.b)*t)};return ti(a.r,a.g,a.b)})(e.brandColor,.3))),e.backgroundColor&&(this.backgroundColor=e.backgroundColor),d instanceof lp&&(e.centralConvo?(d.setAttribute("centralConvo","true"),e.building&&d.setAttribute("declaredBuildingSlug",e.building)):this.handleBuildingslug(d,e.organization,e.building,e),e.launcherStyles&&(d.launcherStyles=e.launcherStyles),e.mobileStyles&&(d.mobileStyles=e.mobileStyles),e.onWidgetLoaded&&(d.onWidgetLoaded=e.onWidgetLoaded),e.overrideRentgrata&&((async()=>{const e=await wp("rg-widget-compact");e&&e.setAttribute("style","display: none")})(),d.overrideRentgrata=!0),e.onSstClose&&(d.onSstClose=e.onSstClose)),e.position&&(d.setAttribute("right",(null===(a=e.position.right)||void 0===a?void 0:a.toString())||"unset"),d.setAttribute("bottom",(null===(s=e.position.bottom)||void 0===s?void 0:s.toString())||"unset"),d.setAttribute("top",(null===(l=e.position.top)||void 0===l?void 0:l.toString())||"unset"),d.setAttribute("left",(null===(u=e.position.left)||void 0===u?void 0:u.toString())||"unset")),window.eliseAi={},document.body.appendChild(d),d instanceof lp&&(Cp.meChat=d),d instanceof yp&&(Cp.utilitiesChat=d)}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.studioUpdateToken+=1,await this.removeWidget(),this.activeStudioOrgSlug="",this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey="",this.activeStudioOptions=null}static async removeWidget(){var e;if(!this.meChat)return;const t=this.meChat;await t.remove(),null===(e=t.parentNode)||void 0===e||e.removeChild(t),Cp.meChat===t&&(Cp.meChat=null)}static handleStudioContext(e){e.studio&&(this.activeStudioOptions=e)}static updateStudioContext(e){var t;const n=this.activeStudioOptions;if(!(null==n?void 0:n.studio))return;const i=++this.studioUpdateToken;if(e.siteId&&e.siteId!==n.studio.siteId)return void Ao({logType:ko.warn,logTitle:"[STUDIO_WEBCHAT_CONTEXT_SITE_MISMATCH]",logData:{activeSiteId:n.studio.siteId,contextSiteId:e.siteId,url:window.location.href}});if("org"===(null===(t=e.sessionScope)||void 0===t?void 0:t.type))return void this.updateStudioOrgContext(e,n,i);const r=xp(e.organization),o=xp(e.building);if(!r||!o)return void this.clearStudioContext({source:"elise_studio",reason:"missing_context",preserveCache:!0});const a=function(e,t){if(!(null==e?void 0:e.key))return`building:${t}`;return e.key}(e.sessionScope,o),s=$p(r);this.activeStudioOrgSlug!==s||this.activeStudioBuildingSlug!==o||this.activeStudioSessionScopeKey!==a?this.removeWidget().then(()=>{i===this.studioUpdateToken&&(this.activeStudioOrgSlug=s,this.activeStudioBuildingSlug=o,this.activeStudioSessionScopeKey=a,this.orgSlug=s,this.start({...n,organization:r,building:o},!1))}):requestAnimationFrame(()=>{var e;return null===(e=this.meChat)||void 0===e?void 0:e.reinsertDNIIntoWebsite()})}static updateStudioOrgContext(e,t,n){var i;const r=xp(e.organization);if(!r)return void this.clearStudioContext({source:"elise_studio",reason:"missing_context",preserveCache:!0});const o=$p(r),a=(null===(i=e.sessionScope)||void 0===i?void 0:i.key)||`org:${r}`,s=function(e){const t="string"==typeof e?Number(e):e;return"number"==typeof t&&Number.isInteger(t)&&t>0?t:null}(e.declaredBuildingId);!this.meChat||this.activeStudioOrgSlug!==o||this.activeStudioBuildingSlug||this.activeStudioSessionScopeKey!==a?this.removeWidget().then(()=>{var e;n===this.studioUpdateToken&&(this.activeStudioOrgSlug=o,this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey=a,this.orgSlug=o,this.start({...t,studio:void 0,organization:r,building:void 0,centralConvo:!0},!1),null===(e=this.meChat)||void 0===e||e.setDeclaredBuildingId(s))}):this.meChat.setDeclaredBuildingId(s)}static clearStudioContext(e){this.studioUpdateToken+=1,this.activeStudioOrgSlug="",this.activeStudioBuildingSlug="",this.activeStudioSessionScopeKey="",this.removeWidget()}static async handleBuildingslug(e,t,n,i){if(n)return void e.setAttribute("buildingSlug",n);if(this.mutationObserver)return;if(!t)return;const r=await vp(t);if(r){const e={...i,organization:t,building:r};this.start(e,!1)}this.previousUrl=window.location.href,document.body.addEventListener("click",()=>{requestAnimationFrame(()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,vp(t).then(e=>{if(!e)return;const n={...i,organization:t,building:e};this.start(n,!1)}))})},!0)}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,t=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,n=await r().get(t,{headers:{"org-slug":this.orgSlug}});if(Math.random()<.2&&Ao({logType:n&&n.data?ko.info:ko.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${n?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:n.data,url:e,orgSlug:this.orgSlug,givenBuildingSlug:null,reason:n&&n.data?null:"No match found"}}),!n||!n.data)return;const i={organization:this.orgSlug,building:n.data,brandColor:this.brandColor,backgroundColor:this.backgroundColor};this.start(i,!1)}static async calculateBuildingSlugForLogging(e){const t=window.location.href,n=`https://app.meetelise.com/platformApi/webchat/microsite_slug?uri=${encodeURIComponent(t)}`,i=await r().get(n,{headers:{"org-slug":this.orgSlug}});Math.random()<.2&&Ao({logType:i&&i.data===e?ko.info:ko.warn,logTitle:`[BUILDING_SLUG_CALCULATED_${i&&i.data===e?"SUCCESS":"FAILURE"}]`,logData:{calculatedBuildingSlug:i.data,url:t,orgSlug:this.orgSlug,givenBuildingSlug:e,reason:i&&i.data===e?null:i&&!i.data?"No match found":i&&i.data!==e?"Mismatch":"No match found"}}),i&&i.data}}function xp(e){return"string"!=typeof e?"":e.trim()}function $p(e){return"Pacific Urban Residential"===e?"cbc11aba-21c4-4571-bc43-ff9d86a029e3":e}var Sp;Cp.meChat=null,Cp.healthChat=null,Cp.utilitiesChat=null,Cp.orgSlug="",Cp.mutationObserver=null,Cp.previousUrl="",Cp.hasBuildingSlug=null,Cp.brandColor="",Cp.backgroundColor="",Cp.healthcareId="",Cp.activeStudioOrgSlug="",Cp.activeStudioBuildingSlug="",Cp.activeStudioSessionScopeKey="",Cp.activeStudioOptions=null,Cp.studioUpdateToken=0,Cp.overridePlacement={},function(e){e.Default="default",e.Healthcare="healthcare",e.Utilities="utilities"}(Sp||(Sp={}));const kp=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)};export{Sp as WidgetType,Cp as default};
|