@meetelise/chat 1.12.5 → 1.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/public/dist/index.js
CHANGED
|
@@ -430,7 +430,7 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
|
|
|
430
430
|
.option.active {
|
|
431
431
|
background-color: var(--active-option-color);
|
|
432
432
|
}
|
|
433
|
-
`,Gt([oe({attribute:!1})],$t.prototype,"options",void 0),Gt([oe({type:String})],$t.prototype,"placeholder",void 0),Gt([oe({type:String})],$t.prototype,"value",void 0),Gt([ae()],$t.prototype,"activeOption",void 0),Gt([ae()],$t.prototype,"isOpen",void 0),Gt([se("#select",!0)],$t.prototype,"meSelect",void 0),$t=Gt([ne("me-select")],$t),Math.pow(10,8);var Vt=36e5,Xt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Qt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Kt(e){var t,i={},n=e.split(Xt.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],Xt.timeZoneDelimiter.test(i.date)&&(i.date=e.split(Xt.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){var r=Xt.timezone.exec(t);r?(i.time=t.replace(r[1],""),i.timezone=r[1]):i.time=t}return i}function ei(e,t){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((n[1]||n[2]).length)}}function ti(e,t){if(null===t)return new Date(NaN);var i=e.match(Qt);if(!i)return new Date(NaN);var n=!!i[4],r=ii(i[1]),o=ii(i[2])-1,a=ii(i[3]),s=ii(i[4]),u=ii(i[5])-1;if(n)return function(e,t,i){return t>=1&&t<=53&&i>=0&&i<=6}(0,s,u)?function(e,t,i){var n=new Date(0);n.setUTCFullYear(e,0,4);var r=7*(t-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+r),n}(t,s,u):new Date(NaN);var l=new Date(0);return function(e,t,i){return t>=0&&t<=11&&i>=1&&i<=(ai[t]||(si(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(si(e)?366:365)}(t,r)?(l.setUTCFullYear(t,o,Math.max(r,a)),l):new Date(NaN)}function ii(e){return e?parseInt(e):1}function ni(e){var t=e.match(Zt);if(!t)return NaN;var i=ri(t[1]),n=ri(t[2]),r=ri(t[3]);return function(e,t,i){return 24===e?0===t&&0===i:i>=0&&i<60&&t>=0&&t<60&&e>=0&&e<25}(i,n,r)?i*Vt+6e4*n+1e3*r:NaN}function ri(e){return e&&parseFloat(e.replace(",","."))||0}function oi(e){if("Z"===e)return 0;var t=e.match(Yt);if(!t)return 0;var i="+"===t[1]?-1:1,n=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?i*(n*Vt+6e4*r):NaN}var ai=[31,null,31,30,31,30,31,31,30,31,30,31];function si(e){return e%400==0||e%4==0&&e%100!=0}var ui=i(9669),li=i.n(ui),di=i(7739),ci=i.n(di);const pi={},fi=async e=>{if(pi[e])return pi[e];const t=function(e){_e(1,arguments);var t=Fe(e);return t.setHours(0,0,0,0),t}(Date.now()),i=zt(function(e){_e(1,arguments);var t=Fe(e);return t.setHours(23,59,59,999),t}(function(e,t){_e(2,arguments);var i=Fe(e),n=Ve(t);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}(t,30))),n=`https://app.meetelise.com/api/pub/v1/buildings/${e}/tour/availabilities?startTime=${zt(t)}&endTime=${i}`,r=await li().get(n);return pi[e]=r.data,r.data},mi=async e=>(async(e,t)=>{var i;const n=await(async(e,t)=>{var i,n,r;const o=await fi(e),a=(null===(i=o.availability)||void 0===i?void 0:i[t])?null===(r=null===(n=o.availability)||void 0===n?void 0:n[t].availableTourStartTimes)||void 0===r?void 0:r.map((e=>function(e,t){_e(1,arguments);var i=t||{},n=null==i.additionalDigits?2:Ve(i.additionalDigits);if(2!==n&&1!==n&&0!==n)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=Kt(e);if(o.date){var a=ei(o.date,n);r=ti(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,u=r.getTime(),l=0;if(o.time&&(l=ni(o.time),isNaN(l)))return new Date(NaN);if(!o.timezone){var d=new Date(u+l),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=oi(o.timezone),isNaN(s)?new Date(NaN):new Date(u+l+s)}(e))):[];return o.availability?{...o.availability[t],availableTourStartTimes:a}:null})(e,t);return n?ci()(null!==(i=n.availableTourStartTimes)&&void 0!==i?i:[],(e=>Pt(e,"yyyy-MM-dd"))):{}})(Object.keys(pi).map(Number)[0],e);var hi=i(9991);i(7294);const vi=()=>window.matchMedia("(max-width: 767px)").matches;var gi=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let yi=class extends te{constructor(){super(...arguments),this.layoutOptions=[],this.tourTypeOptions=[],this.buildingId=0,this.tourType=wi.Guided,this.email="",this.phoneNumber="",this.
|
|
433
|
+
`,Gt([oe({attribute:!1})],$t.prototype,"options",void 0),Gt([oe({type:String})],$t.prototype,"placeholder",void 0),Gt([oe({type:String})],$t.prototype,"value",void 0),Gt([ae()],$t.prototype,"activeOption",void 0),Gt([ae()],$t.prototype,"isOpen",void 0),Gt([se("#select",!0)],$t.prototype,"meSelect",void 0),$t=Gt([ne("me-select")],$t),Math.pow(10,8);var Vt=36e5,Xt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Qt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Zt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Kt(e){var t,i={},n=e.split(Xt.dateTimeDelimiter);if(n.length>2)return i;if(/:/.test(n[0])?t=n[0]:(i.date=n[0],t=n[1],Xt.timeZoneDelimiter.test(i.date)&&(i.date=e.split(Xt.timeZoneDelimiter)[0],t=e.substr(i.date.length,e.length))),t){var r=Xt.timezone.exec(t);r?(i.time=t.replace(r[1],""),i.timezone=r[1]):i.time=t}return i}function ei(e,t){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(i);if(!n)return{year:NaN,restDateString:""};var r=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:null===o?r:100*o,restDateString:e.slice((n[1]||n[2]).length)}}function ti(e,t){if(null===t)return new Date(NaN);var i=e.match(Qt);if(!i)return new Date(NaN);var n=!!i[4],r=ii(i[1]),o=ii(i[2])-1,a=ii(i[3]),s=ii(i[4]),u=ii(i[5])-1;if(n)return function(e,t,i){return t>=1&&t<=53&&i>=0&&i<=6}(0,s,u)?function(e,t,i){var n=new Date(0);n.setUTCFullYear(e,0,4);var r=7*(t-1)+i+1-(n.getUTCDay()||7);return n.setUTCDate(n.getUTCDate()+r),n}(t,s,u):new Date(NaN);var l=new Date(0);return function(e,t,i){return t>=0&&t<=11&&i>=1&&i<=(ai[t]||(si(e)?29:28))}(t,o,a)&&function(e,t){return t>=1&&t<=(si(e)?366:365)}(t,r)?(l.setUTCFullYear(t,o,Math.max(r,a)),l):new Date(NaN)}function ii(e){return e?parseInt(e):1}function ni(e){var t=e.match(Zt);if(!t)return NaN;var i=ri(t[1]),n=ri(t[2]),r=ri(t[3]);return function(e,t,i){return 24===e?0===t&&0===i:i>=0&&i<60&&t>=0&&t<60&&e>=0&&e<25}(i,n,r)?i*Vt+6e4*n+1e3*r:NaN}function ri(e){return e&&parseFloat(e.replace(",","."))||0}function oi(e){if("Z"===e)return 0;var t=e.match(Yt);if(!t)return 0;var i="+"===t[1]?-1:1,n=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,r)?i*(n*Vt+6e4*r):NaN}var ai=[31,null,31,30,31,30,31,31,30,31,30,31];function si(e){return e%400==0||e%4==0&&e%100!=0}var ui=i(9669),li=i.n(ui),di=i(7739),ci=i.n(di);const pi={},fi=async e=>{if(pi[e])return pi[e];const t=function(e){_e(1,arguments);var t=Fe(e);return t.setHours(0,0,0,0),t}(Date.now()),i=zt(function(e){_e(1,arguments);var t=Fe(e);return t.setHours(23,59,59,999),t}(function(e,t){_e(2,arguments);var i=Fe(e),n=Ve(t);return isNaN(n)?new Date(NaN):n?(i.setDate(i.getDate()+n),i):i}(t,30))),n=`https://app.meetelise.com/api/pub/v1/buildings/${e}/tour/availabilities?startTime=${zt(t)}&endTime=${i}`,r=await li().get(n);return pi[e]=r.data,r.data},mi=async e=>(async(e,t)=>{var i;const n=await(async(e,t)=>{var i,n,r;const o=await fi(e),a=(null===(i=o.availability)||void 0===i?void 0:i[t])?null===(r=null===(n=o.availability)||void 0===n?void 0:n[t].availableTourStartTimes)||void 0===r?void 0:r.map((e=>function(e,t){_e(1,arguments);var i=t||{},n=null==i.additionalDigits?2:Ve(i.additionalDigits);if(2!==n&&1!==n&&0!==n)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=Kt(e);if(o.date){var a=ei(o.date,n);r=ti(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,u=r.getTime(),l=0;if(o.time&&(l=ni(o.time),isNaN(l)))return new Date(NaN);if(!o.timezone){var d=new Date(u+l),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=oi(o.timezone),isNaN(s)?new Date(NaN):new Date(u+l+s)}(e))):[];return o.availability?{...o.availability[t],availableTourStartTimes:a}:null})(e,t);return n?ci()(null!==(i=n.availableTourStartTimes)&&void 0!==i?i:[],(e=>Pt(e,"yyyy-MM-dd"))):{}})(Object.keys(pi).map(Number)[0],e);var hi=i(9991);i(7294);const vi=()=>window.matchMedia("(max-width: 767px)").matches;var gi=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let yi=class extends te{constructor(){super(...arguments),this.layoutOptions=[],this.tourTypeOptions=[],this.buildingId=0,this.tourType=wi.Guided,this.email="",this.phoneNumber="",this.availabilitiesGroupedByDay={},this.mobilePageIndex=0,this.tourIsBooked=!1,this.firstUpdated=async()=>{this.availabilitiesGroupedByDay=await mi(Si[this.tourType])},this.willUpdate=async e=>{e.has("tourType")&&(this.availabilitiesGroupedByDay=await mi(Si[this.tourType]))},this.handlePhoneKeydown=e=>{var t;if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&null!==e.target.selectionStart))return;const i=e.target.selectionStart;if(1!==e.key.length||Ne(e)){if("Backspace"===e.key){if(Ne(e))return;if(this.phoneInput.selectionEnd&&this.phoneInput.selectionStart&&this.phoneInput.selectionEnd-this.phoneInput.selectionStart>0)return;const t=this.phoneNumber.length,n=this.phoneNumber.slice(0,i).replace(/\D/g,""),r=this.phoneNumber.slice(i).replace(/\D/g,""),o=`${n.slice(0,-1)}${r}`;this.phoneNumber=Ie(o),this.phoneInput.value=this.phoneNumber;const a=i-(t-this.phoneNumber.length);return this.phoneInput.setSelectionRange(a,a),e.preventDefault(),void e.stopPropagation()}if(!["ArrowLeft","ArrowRight"].includes(e.key)||Ne(e)||e.shiftKey)return;if("ArrowLeft"===e.key){const e=((null===(t=this.phoneNumber.slice(0,i).split(/\d+/).at(-1))||void 0===t?void 0:t.length)||0)+1,n=i-e>-1?i-e:0;this.phoneInput.setSelectionRange(n,n)}if("ArrowRight"===e.key){const e=(this.phoneNumber.slice(i).split(/\d+/)[0].length||0)+1,t=i+e<this.phoneNumber.length?i+e:this.phoneNumber.length;this.phoneInput.setSelectionRange(t,t)}e.preventDefault(),e.stopPropagation()}else{e.preventDefault(),e.stopPropagation();const t=this.phoneNumber.slice(0,i)+e.key+this.phoneNumber.slice(i);this.phoneNumber=Ie(t.replace(/\D/g,"")),this.phoneInput.value=this.phoneNumber}},this.handlePhoneKeyup=e=>{var t;if(e.key.includes("Arrow")||["Meta","Shift","Control","Alt"].includes(e.key))return;const i=this.phoneInput.selectionStart,n=i?this.phoneInput.value.slice(i).replace(/\D/g,""):"";this.phoneNumber=Ie(this.phoneInput.value);let r=0,o=n.length;for(;o;)(null===(t=this.phoneNumber.at(r))||void 0===t?void 0:t.match(/\d/))&&o--,r++;const a=this.phoneInput.value.length-r+1;this.phoneInput.setSelectionRange(a,a)},this.onChangeEmail=e=>{e.target&&(this.email=e.target.value)},this.validators={tourType:()=>!isNaN(this.tourType),dateAndTime:()=>!!this.selectedDate&&!!this.selectedTime,leadInfo:()=>{var e,t;return!!(null===(e=this.nameInput)||void 0===e?void 0:e.value)&&(null===(t=this.emailInput)||void 0===t?void 0:t.value.includes("@"))&&!!this.phoneNumber&&14===this.phoneNumber.length}},this.formIsValidForSubmission=()=>this.validators.tourType()&&this.validators.dateAndTime()&&this.validators.leadInfo(),this.timeStringToHoursAndMinutes=e=>{const[t,i]=e.split(/\D/g);return[parseInt(t)+(e.toLowerCase().includes("pm")?12:0),parseInt(i)]},this.submit=async()=>{var e;if(!this.selectedDate||!this.selectedTime)return;const[t,i]=this.timeStringToHoursAndMinutes(this.selectedTime),n=new Date(this.selectedDate.getTime());n.setHours(t,i);const r=n.toISOString(),o={email_address:this.email,phone_number:`+1${null===(e=this.phoneNumber.match(/\d/g))||void 0===e?void 0:e.join("")}`,building_id:this.buildingId,first_name:this.nameInput.value.split(" ")[0],last_name:this.nameInput.value.split(" ").slice(1).join(" "),tour_type:bi[this.tourType],tour_time:r};200===(await li().post("https://app.meetelise.com/platformApi/state/create/scheduleMe",o)).status&&(this.tourIsBooked=!0)},this.mobilePages=[{validate:this.validators.tourType,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.tourTypeMenu()}`},{validate:this.validators.dateAndTime,nextButtonText:"Next",nextButtonAction:()=>{this.mobilePageIndex++},render:()=>D`${this.dateAndTimeMenu(!0)}`},{validate:()=>this.validators.leadInfo(),nextButtonText:"Schedule tour",nextButtonAction:this.submit,render:()=>D`${this.userInfoAndLayoutMenu()}`}]}tourTypeMenu(){return D`<h2 id="tourType">Tour Type</h2>
|
|
434
434
|
<div id="tourTypeMenu">
|
|
435
435
|
${this.tourTypeOptions.map((e=>e.value)).includes("WITH_AGENT")?D` <tour-type-option
|
|
436
436
|
tourtype="guided"
|
|
@@ -942,7 +942,7 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
|
|
|
942
942
|
margin-top: 37px;
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
`,gi([oe({attribute:!1})],yi.prototype,"layoutOptions",void 0),gi([oe({attribute:!1})],yi.prototype,"tourTypeOptions",void 0),gi([oe({type:Number})],yi.prototype,"buildingId",void 0),gi([oe({attribute:!1})],yi.prototype,"onCloseClicked",void 0),gi([ae()],yi.prototype,"tourType",void 0),gi([ae()],yi.prototype,"email",void 0),gi([ae()],yi.prototype,"phoneNumber",void 0),gi([ae()],yi.prototype,"
|
|
945
|
+
`,gi([oe({attribute:!1})],yi.prototype,"layoutOptions",void 0),gi([oe({attribute:!1})],yi.prototype,"tourTypeOptions",void 0),gi([oe({type:Number})],yi.prototype,"buildingId",void 0),gi([oe({attribute:!1})],yi.prototype,"onCloseClicked",void 0),gi([ae()],yi.prototype,"tourType",void 0),gi([ae()],yi.prototype,"email",void 0),gi([ae()],yi.prototype,"phoneNumber",void 0),gi([ae()],yi.prototype,"availabilitiesGroupedByDay",void 0),gi([ae()],yi.prototype,"selectedDate",void 0),gi([ae()],yi.prototype,"selectedTime",void 0),gi([ae()],yi.prototype,"mobilePageIndex",void 0),gi([ae()],yi.prototype,"tourIsBooked",void 0),gi([se("input#name")],yi.prototype,"nameInput",void 0),gi([se("input#email")],yi.prototype,"emailInput",void 0),gi([se("input#phone")],yi.prototype,"phoneInput",void 0),gi([se("me-select#unitType")],yi.prototype,"unitTypeSelect",void 0),yi=gi([ne("tour-scheduler")],yi),function(e){e[e.Guided=0]="Guided",e[e.Self=1]="Self",e[e.Virtual=2]="Virtual"}(wi||(wi={}));const Si={[wi.Guided]:hi.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.WithAgent,[wi.Self]:hi.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.SelfGuided,[wi.Virtual]:hi.TourAvailabilityResponseRankOrderedSupportedTourTypesEnum.VirtualShowing},bi={[wi.Guided]:"escorted-tour",[wi.Self]:"self-guided-tour",[wi.Virtual]:"live-virtual-tour"};var Ti,xi=new Uint8Array(16);function Oi(){if(!Ti&&!(Ti="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 Ti(xi)}const Ii=/^(?:[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,Ri=function(e){return"string"==typeof e&&Ii.test(e)};for(var Ni=[],Ci=0;Ci<256;++Ci)Ni.push((Ci+256).toString(16).substr(1));const Ai=function(e,t,i){var n=(e=e||{}).random||(e.rng||Oi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){i=i||0;for(var r=0;r<16;++r)t[i+r]=n[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(Ni[e[t+0]]+Ni[e[t+1]]+Ni[e[t+2]]+Ni[e[t+3]]+"-"+Ni[e[t+4]]+Ni[e[t+5]]+"-"+Ni[e[t+6]]+Ni[e[t+7]]+"-"+Ni[e[t+8]]+Ni[e[t+9]]+"-"+Ni[e[t+10]]+Ni[e[t+11]]+Ni[e[t+12]]+Ni[e[t+13]]+Ni[e[t+14]]+Ni[e[t+15]]).toLowerCase();if(!Ri(i))throw TypeError("Stringified UUID is invalid");return i}(n)};function Ei(e,t){const i=Fi(e,t),n=(new Date).toISOString();return localStorage.setItem(i,n),n}function _i(e,t){return`com.meetelise.chatID-${e}-${t}`}function Fi(e,t){return`com.meetelise.chatIDIssueTime-${e}-${t}`}const Mi="#FFFFFF",Pi="#202020",Di={user:{textColor:Mi,backgroundColor:"#1990FF"},agent:{textColor:Mi,backgroundColor:"#1E1E1E"}},qi={user:{textColor:Mi,backgroundColor:"#83818E"},agent:{textColor:Mi,backgroundColor:Pi}},Ji={Light:{chatHeader:{backgroundColor:Mi,textColor:Pi},chatPaneBackgroundColor:"rgba(255, 255, 255, 0.9)",message:Di},Dark:{chatHeader:{backgroundColor:Pi,textColor:Mi},chatPaneBackgroundColor:"rgba(32, 32, 32, 0.9)",message:Di},Purple:{chatHeader:{backgroundColor:"#550098",textColor:Mi},chatPaneBackgroundColor:"rgba(85, 0, 152, 0.6)",message:Di},Blue:{chatHeader:{backgroundColor:"#0814E5",textColor:Mi},chatPaneBackgroundColor:"rgba(4, 17, 245, 0.6)",message:Di},Teal:{chatHeader:{backgroundColor:"#6EE7ED",textColor:Pi},chatPaneBackgroundColor:"rgba(115, 247, 253, 0.8)",message:qi},Green:{chatHeader:{backgroundColor:"#147B0E",textColor:Mi},chatPaneBackgroundColor:"rgba(13, 141, 5, 0.6)",message:Di},Yellow:{chatHeader:{backgroundColor:"#F1E54F",textColor:Pi},chatPaneBackgroundColor:"rgba(251, 239, 80, 0.9)",message:qi},Orange:{chatHeader:{backgroundColor:"#C06C31",textColor:Mi},chatPaneBackgroundColor:"rgba(238, 126, 49, 0.7)",message:Di},Pink:{chatHeader:{backgroundColor:"#A24599",textColor:Mi},chatPaneBackgroundColor:"rgba(167, 70, 157, 0.8)",message:Di}},Ui=e=>Ji[e&&Object.keys(Ji).includes(e)?e:"Light"];var ki=i(4184),Li=i.n(ki);const Bi=a`
|
|
946
946
|
:host {
|
|
947
947
|
--glowBarHeight: 11.2px;
|
|
948
948
|
--enterAnimationDuration: 0.5s;
|
|
@@ -1080,6 +1080,12 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
|
|
|
1080
1080
|
background: #350da6;
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
+
.in-house-launcher__primary-action svg {
|
|
1084
|
+
height: 28px;
|
|
1085
|
+
width: 28px;
|
|
1086
|
+
transform: translateX(2px);
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1083
1089
|
.in-house-launcher__ask-underline {
|
|
1084
1090
|
width: 47px;
|
|
1085
1091
|
height: 3px;
|
|
@@ -1804,14 +1810,15 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
|
|
|
1804
1810
|
</div>
|
|
1805
1811
|
`:""}
|
|
1806
1812
|
${this.isCallToActionWindowOpen()?"":this.renderMiniOption(D`<svg
|
|
1807
|
-
width="
|
|
1808
|
-
height="
|
|
1809
|
-
viewBox="0 0
|
|
1813
|
+
width="29"
|
|
1814
|
+
height="28"
|
|
1815
|
+
viewBox="0 0 29 28"
|
|
1810
1816
|
fill="none"
|
|
1811
1817
|
xmlns="http://www.w3.org/2000/svg"
|
|
1818
|
+
style="transform: translate(2px, -1px);"
|
|
1812
1819
|
>
|
|
1813
1820
|
<path
|
|
1814
|
-
d="
|
|
1821
|
+
d="M21.0385 9.79957H7.03915C6.66786 9.79957 6.31178 9.94706 6.04924 10.2096C5.7867 10.4721 5.63921 10.8282 5.63921 11.1995C5.63921 11.5708 5.7867 11.9269 6.04924 12.1894C6.31178 12.4519 6.66786 12.5994 7.03915 12.5994H21.0385C21.4098 12.5994 21.7659 12.4519 22.0284 12.1894C22.291 11.9269 22.4385 11.5708 22.4385 11.1995C22.4385 10.8282 22.291 10.4721 22.0284 10.2096C21.7659 9.94706 21.4098 9.79957 21.0385 9.79957ZM15.4388 15.3993H7.03915C6.66786 15.3993 6.31178 15.5468 6.04924 15.8094C5.7867 16.0719 5.63921 16.428 5.63921 16.7993C5.63921 17.1705 5.7867 17.5266 6.04924 17.7892C6.31178 18.0517 6.66786 18.1992 7.03915 18.1992H15.4388C15.8101 18.1992 16.1661 18.0517 16.4287 17.7892C16.6912 17.5266 16.8387 17.1705 16.8387 16.7993C16.8387 16.428 16.6912 16.0719 16.4287 15.8094C16.1661 15.5468 15.8101 15.3993 15.4388 15.3993ZM14.0388 0C12.2004 0 10.38 0.362105 8.68151 1.06564C6.98302 1.76917 5.43975 2.80036 4.13978 4.10032C1.51439 6.72572 0.0394592 10.2865 0.0394592 13.9994C0.0272207 17.232 1.14652 20.3671 3.20332 22.861L0.403443 25.6609C0.209191 25.8577 0.077602 26.1077 0.0252806 26.3793C-0.0270409 26.6509 0.00224956 26.9319 0.109456 27.1868C0.225732 27.4387 0.414228 27.6503 0.651018 27.7949C0.887807 27.9395 1.16221 28.0104 1.4394 27.9988H14.0388C17.7517 27.9988 21.3125 26.5238 23.9379 23.8984C26.5633 21.273 28.0382 17.7122 28.0382 13.9994C28.0382 10.2865 26.5633 6.72572 23.9379 4.10032C21.3125 1.47493 17.7517 0 14.0388 0V0ZM14.0388 25.1989H4.81325L6.11519 23.8969C6.37593 23.6346 6.52228 23.2798 6.52228 22.91C6.52228 22.5401 6.37593 22.1853 6.11519 21.923C4.28209 20.092 3.14057 17.682 2.8851 15.1036C2.62964 12.5253 3.27604 9.93817 4.71417 7.78299C6.1523 5.6278 8.2932 4.03792 10.7721 3.28422C13.251 2.53051 15.9146 2.65961 18.309 3.64952C20.7033 4.63943 22.6805 6.4289 23.9034 8.71306C25.1264 10.9972 25.5195 13.6348 25.0159 16.1763C24.5123 18.7178 23.1431 21.0061 21.1415 22.6513C19.1399 24.2965 16.6298 25.1968 14.0388 25.1989V25.1989Z"
|
|
1815
1822
|
fill="#1E1E1E"
|
|
1816
1823
|
/>
|
|
1817
1824
|
</svg>`,this.onChatTapped)}
|
|
@@ -1864,6 +1871,7 @@ var e={8005:function(e,t,i){var n,r=this&&this.__extends||(n=function(e,t){retur
|
|
|
1864
1871
|
viewBox="0 0 19 18"
|
|
1865
1872
|
fill="none"
|
|
1866
1873
|
xmlns="http://www.w3.org/2000/svg"
|
|
1874
|
+
style="transform: translateX(2px);"
|
|
1867
1875
|
>
|
|
1868
1876
|
<path
|
|
1869
1877
|
d="M5.42513 8.09964C5.24713 8.09964 5.07313 8.15242 4.92514 8.25131C4.77714 8.3502 4.66179 8.49076 4.59367 8.6552C4.52556 8.81965 4.50773 9.0006 4.54246 9.17517C4.57719 9.34975 4.6629 9.51011 4.78876 9.63597C4.91462 9.76183 5.07498 9.84754 5.24955 9.88227C5.42413 9.91699 5.60508 9.89917 5.76953 9.83106C5.93397 9.76294 6.07453 9.64759 6.17342 9.49959C6.27231 9.35159 6.32509 9.1776 6.32509 8.9996C6.32509 8.76092 6.23027 8.53201 6.0615 8.36323C5.89272 8.19446 5.66381 8.09964 5.42513 8.09964ZM9.02497 8.09964C8.84697 8.09964 8.67297 8.15242 8.52498 8.25131C8.37698 8.3502 8.26163 8.49076 8.19351 8.6552C8.1254 8.81965 8.10758 9.0006 8.1423 9.17517C8.17703 9.34975 8.26274 9.51011 8.3886 9.63597C8.51446 9.76183 8.67482 9.84754 8.84939 9.88227C9.02397 9.91699 9.20492 9.89917 9.36937 9.83106C9.53382 9.76294 9.67437 9.64759 9.77326 9.49959C9.87215 9.35159 9.92493 9.1776 9.92493 8.9996C9.92493 8.76092 9.83011 8.53201 9.66134 8.36323C9.49256 8.19446 9.26365 8.09964 9.02497 8.09964ZM12.6248 8.09964C12.4468 8.09964 12.2728 8.15242 12.1248 8.25131C11.9768 8.3502 11.8615 8.49076 11.7934 8.6552C11.7252 8.81965 11.7074 9.0006 11.7421 9.17517C11.7769 9.34975 11.8626 9.51011 11.9884 9.63597C12.1143 9.76183 12.2747 9.84754 12.4492 9.88227C12.6238 9.91699 12.8048 9.89917 12.9692 9.83106C13.1337 9.76294 13.2742 9.64759 13.3731 9.49959C13.472 9.35159 13.5248 9.1776 13.5248 8.9996C13.5248 8.76092 13.43 8.53201 13.2612 8.36323C13.0924 8.19446 12.8635 8.09964 12.6248 8.09964ZM9.02497 0C7.84312 0 6.67285 0.232782 5.58097 0.685054C4.48909 1.13733 3.49698 1.80023 2.66129 2.63592C0.973536 4.32368 0.0253666 6.61276 0.0253666 8.9996C0.017499 11.0777 0.737048 13.0931 2.05928 14.6963L0.259356 16.4963C0.13448 16.6228 0.049887 16.7835 0.0162518 16.9581C-0.0173834 17.1327 0.00144614 17.3133 0.0703646 17.4772C0.145113 17.6392 0.26629 17.7752 0.418511 17.8682C0.570733 17.9611 0.747135 18.0067 0.925327 17.9992H9.02497C11.4118 17.9992 13.7009 17.051 15.3886 15.3633C17.0764 13.6755 18.0246 11.3864 18.0246 8.9996C18.0246 6.61276 17.0764 4.32368 15.3886 2.63592C13.7009 0.94817 11.4118 0 9.02497 0ZM9.02497 16.1993H3.09423L3.93119 15.3623C4.01623 15.279 4.08388 15.1796 4.13022 15.0699C4.17657 14.9602 4.20069 14.8424 4.20118 14.7233C4.1978 14.486 4.10076 14.2595 3.93119 14.0934C2.75277 12.9163 2.01894 11.367 1.85471 9.70948C1.69048 8.05199 2.10602 6.38882 3.03054 5.00335C3.95505 3.61787 5.33134 2.59581 6.92492 2.11128C8.51851 1.62676 10.2308 1.70975 11.77 2.34612C13.3093 2.98249 14.5803 4.13286 15.3665 5.60125C16.1527 7.06964 16.4054 8.7652 16.0817 10.399C15.7579 12.0329 14.8777 13.5039 13.591 14.5616C12.3042 15.6192 10.6906 16.198 9.02497 16.1993Z"
|
|
@@ -282,14 +282,15 @@ export class InHouseLauncher extends LitElement {
|
|
|
282
282
|
${!this.isCallToActionWindowOpen()
|
|
283
283
|
? this.renderMiniOption(
|
|
284
284
|
html`<svg
|
|
285
|
-
width="
|
|
286
|
-
height="
|
|
287
|
-
viewBox="0 0
|
|
285
|
+
width="29"
|
|
286
|
+
height="28"
|
|
287
|
+
viewBox="0 0 29 28"
|
|
288
288
|
fill="none"
|
|
289
289
|
xmlns="http://www.w3.org/2000/svg"
|
|
290
|
+
style="transform: translate(2px, -1px);"
|
|
290
291
|
>
|
|
291
292
|
<path
|
|
292
|
-
d="
|
|
293
|
+
d="M21.0385 9.79957H7.03915C6.66786 9.79957 6.31178 9.94706 6.04924 10.2096C5.7867 10.4721 5.63921 10.8282 5.63921 11.1995C5.63921 11.5708 5.7867 11.9269 6.04924 12.1894C6.31178 12.4519 6.66786 12.5994 7.03915 12.5994H21.0385C21.4098 12.5994 21.7659 12.4519 22.0284 12.1894C22.291 11.9269 22.4385 11.5708 22.4385 11.1995C22.4385 10.8282 22.291 10.4721 22.0284 10.2096C21.7659 9.94706 21.4098 9.79957 21.0385 9.79957ZM15.4388 15.3993H7.03915C6.66786 15.3993 6.31178 15.5468 6.04924 15.8094C5.7867 16.0719 5.63921 16.428 5.63921 16.7993C5.63921 17.1705 5.7867 17.5266 6.04924 17.7892C6.31178 18.0517 6.66786 18.1992 7.03915 18.1992H15.4388C15.8101 18.1992 16.1661 18.0517 16.4287 17.7892C16.6912 17.5266 16.8387 17.1705 16.8387 16.7993C16.8387 16.428 16.6912 16.0719 16.4287 15.8094C16.1661 15.5468 15.8101 15.3993 15.4388 15.3993ZM14.0388 0C12.2004 0 10.38 0.362105 8.68151 1.06564C6.98302 1.76917 5.43975 2.80036 4.13978 4.10032C1.51439 6.72572 0.0394592 10.2865 0.0394592 13.9994C0.0272207 17.232 1.14652 20.3671 3.20332 22.861L0.403443 25.6609C0.209191 25.8577 0.077602 26.1077 0.0252806 26.3793C-0.0270409 26.6509 0.00224956 26.9319 0.109456 27.1868C0.225732 27.4387 0.414228 27.6503 0.651018 27.7949C0.887807 27.9395 1.16221 28.0104 1.4394 27.9988H14.0388C17.7517 27.9988 21.3125 26.5238 23.9379 23.8984C26.5633 21.273 28.0382 17.7122 28.0382 13.9994C28.0382 10.2865 26.5633 6.72572 23.9379 4.10032C21.3125 1.47493 17.7517 0 14.0388 0V0ZM14.0388 25.1989H4.81325L6.11519 23.8969C6.37593 23.6346 6.52228 23.2798 6.52228 22.91C6.52228 22.5401 6.37593 22.1853 6.11519 21.923C4.28209 20.092 3.14057 17.682 2.8851 15.1036C2.62964 12.5253 3.27604 9.93817 4.71417 7.78299C6.1523 5.6278 8.2932 4.03792 10.7721 3.28422C13.251 2.53051 15.9146 2.65961 18.309 3.64952C20.7033 4.63943 22.6805 6.4289 23.9034 8.71306C25.1264 10.9972 25.5195 13.6348 25.0159 16.1763C24.5123 18.7178 23.1431 21.0061 21.1415 22.6513C19.1399 24.2965 16.6298 25.1968 14.0388 25.1989V25.1989Z"
|
|
293
294
|
fill="#1E1E1E"
|
|
294
295
|
/>
|
|
295
296
|
</svg>`,
|
|
@@ -365,6 +366,7 @@ export class InHouseLauncher extends LitElement {
|
|
|
365
366
|
viewBox="0 0 19 18"
|
|
366
367
|
fill="none"
|
|
367
368
|
xmlns="http://www.w3.org/2000/svg"
|
|
369
|
+
style="transform: translateX(2px);"
|
|
368
370
|
>
|
|
369
371
|
<path
|
|
370
372
|
d="M5.42513 8.09964C5.24713 8.09964 5.07313 8.15242 4.92514 8.25131C4.77714 8.3502 4.66179 8.49076 4.59367 8.6552C4.52556 8.81965 4.50773 9.0006 4.54246 9.17517C4.57719 9.34975 4.6629 9.51011 4.78876 9.63597C4.91462 9.76183 5.07498 9.84754 5.24955 9.88227C5.42413 9.91699 5.60508 9.89917 5.76953 9.83106C5.93397 9.76294 6.07453 9.64759 6.17342 9.49959C6.27231 9.35159 6.32509 9.1776 6.32509 8.9996C6.32509 8.76092 6.23027 8.53201 6.0615 8.36323C5.89272 8.19446 5.66381 8.09964 5.42513 8.09964ZM9.02497 8.09964C8.84697 8.09964 8.67297 8.15242 8.52498 8.25131C8.37698 8.3502 8.26163 8.49076 8.19351 8.6552C8.1254 8.81965 8.10758 9.0006 8.1423 9.17517C8.17703 9.34975 8.26274 9.51011 8.3886 9.63597C8.51446 9.76183 8.67482 9.84754 8.84939 9.88227C9.02397 9.91699 9.20492 9.89917 9.36937 9.83106C9.53382 9.76294 9.67437 9.64759 9.77326 9.49959C9.87215 9.35159 9.92493 9.1776 9.92493 8.9996C9.92493 8.76092 9.83011 8.53201 9.66134 8.36323C9.49256 8.19446 9.26365 8.09964 9.02497 8.09964ZM12.6248 8.09964C12.4468 8.09964 12.2728 8.15242 12.1248 8.25131C11.9768 8.3502 11.8615 8.49076 11.7934 8.6552C11.7252 8.81965 11.7074 9.0006 11.7421 9.17517C11.7769 9.34975 11.8626 9.51011 11.9884 9.63597C12.1143 9.76183 12.2747 9.84754 12.4492 9.88227C12.6238 9.91699 12.8048 9.89917 12.9692 9.83106C13.1337 9.76294 13.2742 9.64759 13.3731 9.49959C13.472 9.35159 13.5248 9.1776 13.5248 8.9996C13.5248 8.76092 13.43 8.53201 13.2612 8.36323C13.0924 8.19446 12.8635 8.09964 12.6248 8.09964ZM9.02497 0C7.84312 0 6.67285 0.232782 5.58097 0.685054C4.48909 1.13733 3.49698 1.80023 2.66129 2.63592C0.973536 4.32368 0.0253666 6.61276 0.0253666 8.9996C0.017499 11.0777 0.737048 13.0931 2.05928 14.6963L0.259356 16.4963C0.13448 16.6228 0.049887 16.7835 0.0162518 16.9581C-0.0173834 17.1327 0.00144614 17.3133 0.0703646 17.4772C0.145113 17.6392 0.26629 17.7752 0.418511 17.8682C0.570733 17.9611 0.747135 18.0067 0.925327 17.9992H9.02497C11.4118 17.9992 13.7009 17.051 15.3886 15.3633C17.0764 13.6755 18.0246 11.3864 18.0246 8.9996C18.0246 6.61276 17.0764 4.32368 15.3886 2.63592C13.7009 0.94817 11.4118 0 9.02497 0ZM9.02497 16.1993H3.09423L3.93119 15.3623C4.01623 15.279 4.08388 15.1796 4.13022 15.0699C4.17657 14.9602 4.20069 14.8424 4.20118 14.7233C4.1978 14.486 4.10076 14.2595 3.93119 14.0934C2.75277 12.9163 2.01894 11.367 1.85471 9.70948C1.69048 8.05199 2.10602 6.38882 3.03054 5.00335C3.95505 3.61787 5.33134 2.59581 6.92492 2.11128C8.51851 1.62676 10.2308 1.70975 11.77 2.34612C13.3093 2.98249 14.5803 4.13286 15.3665 5.60125C16.1527 7.06964 16.4054 8.7652 16.0817 10.399C15.7579 12.0329 14.8777 13.5039 13.591 14.5616C12.3042 15.6192 10.6906 16.198 9.02497 16.1993Z"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement, TemplateResult } from "lit";
|
|
1
|
+
import { css, html, LitElement, PropertyValueMap, TemplateResult } from "lit";
|
|
2
2
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
3
3
|
import {
|
|
4
4
|
shortcutKeyIsPressed,
|
|
@@ -37,8 +37,6 @@ export class TourScheduler extends LitElement {
|
|
|
37
37
|
@state()
|
|
38
38
|
private phoneNumber = "";
|
|
39
39
|
@state()
|
|
40
|
-
private hasPhoneNumberError = false;
|
|
41
|
-
@state()
|
|
42
40
|
private availabilitiesGroupedByDay: { [day: string]: Date[] } = {};
|
|
43
41
|
@state()
|
|
44
42
|
private selectedDate?: Date;
|
|
@@ -64,6 +62,17 @@ export class TourScheduler extends LitElement {
|
|
|
64
62
|
);
|
|
65
63
|
};
|
|
66
64
|
|
|
65
|
+
protected willUpdate = async (
|
|
66
|
+
_changedProperties:
|
|
67
|
+
| PropertyValueMap<{ tourType: TourType }>
|
|
68
|
+
| Map<PropertyKey, unknown>
|
|
69
|
+
): Promise<void> => {
|
|
70
|
+
if (_changedProperties.has("tourType")) {
|
|
71
|
+
this.availabilitiesGroupedByDay =
|
|
72
|
+
await getAvailabilitiesGroupedByDayCached(tourTypeMap[this.tourType]);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
67
76
|
handlePhoneKeydown = (e: Event): void => {
|
|
68
77
|
// these should always be true, this is just here to mollify TypeScript
|
|
69
78
|
if (
|
|
@@ -138,6 +138,12 @@ export const inHouseLauncherStyles = css`
|
|
|
138
138
|
background: #350da6;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
.in-house-launcher__primary-action svg {
|
|
142
|
+
height: 28px;
|
|
143
|
+
width: 28px;
|
|
144
|
+
transform: translateX(2px);
|
|
145
|
+
}
|
|
146
|
+
|
|
141
147
|
.in-house-launcher__ask-underline {
|
|
142
148
|
width: 47px;
|
|
143
149
|
height: 3px;
|