@meetelise/chat 1.43.37 → 1.43.38

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.
@@ -24,6 +24,7 @@ export declare class FeeCalculatorLayout extends LitElement {
24
24
  rentableItems: RentableItemSummary[];
25
25
  units: Unit[];
26
26
  isLoadingUnits: boolean;
27
+ isLoadingLayouts: boolean;
27
28
  onSelectLayout: ((layoutIds: number[]) => void) | null;
28
29
  onUnitSelect: ((unit: Unit) => void) | null;
29
30
  onMoveInDateChange: ((dateString: string) => void) | null;
@@ -5,6 +5,7 @@ export declare class FeeItemComponent extends LitElement {
5
5
  feeQuote: FeeQuote | null;
6
6
  get name(): string;
7
7
  get description(): string;
8
+ get additionalInfo(): string;
8
9
  get triggeredEvent(): string;
9
10
  get amount(): string | null;
10
11
  render(): TemplateResult;
@@ -2,7 +2,6 @@ import { LitElement, TemplateResult } from "lit";
2
2
  import { LayoutOption } from "../../../../fetchBuildingWebchatView";
3
3
  import { Unit } from "../../../../services/fees/fetchBuildingUnits";
4
4
  import "../floorplan-image-card/floorplan-image-card";
5
- import "../../../loaders/mega-loader";
6
5
  export declare class FloorPlanSelector extends LitElement {
7
6
  static styles: import("lit").CSSResult;
8
7
  buildingSlug: string;
@@ -10,6 +9,7 @@ export declare class FloorPlanSelector extends LitElement {
10
9
  selectedLayoutIds: number[];
11
10
  units: Unit[];
12
11
  isLoading: boolean;
12
+ isLoadingLayouts: boolean;
13
13
  onSelectLayout: ((layoutIds: number[]) => void) | null;
14
14
  onUnitSelect: ((unit: Unit) => void) | null;
15
15
  onMoveInDateChange: ((inputDateString: string) => void) | null;
@@ -21,8 +21,8 @@ export declare class FeeCalculator extends LitElement {
21
21
  onClickPhoneOption: ((e: MouseEvent) => void) | null;
22
22
  onClickSSTOption: ((e: MouseEvent) => void) | null;
23
23
  onClickTextUsOption: ((e: MouseEvent) => void) | null;
24
- private isFirstCalculation;
25
24
  private isCalculatingQuote;
25
+ private isLoadingLayouts;
26
26
  private isExporting;
27
27
  private selectedLayoutIds;
28
28
  private selectedUnit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.43.37",
3
+ "version": "1.43.38",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",
@@ -3303,12 +3303,6 @@ xmlns="http://www.w3.org/2000/svg"
3303
3303
  background-color: var(--primary-color, #ffffff);
3304
3304
  }
3305
3305
 
3306
- .recalculating-loader {
3307
- display: flex;
3308
- align-items: center;
3309
- justify-content: center;
3310
- }
3311
-
3312
3306
  @media (max-width: 767px) {
3313
3307
  .fee-calculator-container {
3314
3308
  width: 100vw;
@@ -3462,6 +3456,40 @@ xmlns="http://www.w3.org/2000/svg"
3462
3456
  color: white;
3463
3457
  }
3464
3458
 
3459
+ .floor-plan-badge.skeleton {
3460
+ cursor: default;
3461
+ width: 56px;
3462
+ height: 18px;
3463
+ padding: 0;
3464
+ border: 1px solid #eaeaea;
3465
+ }
3466
+
3467
+ .unit-card-skeleton {
3468
+ display: flex;
3469
+ min-width: 18rem;
3470
+ width: 100%;
3471
+ height: 4.75rem;
3472
+ border-radius: 4px;
3473
+ border: 2px solid transparent;
3474
+ background-color: #f8f9fa;
3475
+ box-sizing: border-box;
3476
+ }
3477
+
3478
+ .shimmer {
3479
+ background: linear-gradient(90deg, #eaeaea 25%, #f5f5f5 50%, #eaeaea 75%);
3480
+ background-size: 400px 100%;
3481
+ animation: shimmer 1.4s ease-in-out infinite;
3482
+ }
3483
+
3484
+ @keyframes shimmer {
3485
+ 0% {
3486
+ background-position: -200px 0;
3487
+ }
3488
+ 100% {
3489
+ background-position: 200px 0;
3490
+ }
3491
+ }
3492
+
3465
3493
  .advanced-section {
3466
3494
  max-height: 0;
3467
3495
  overflow: hidden;
@@ -3685,38 +3713,20 @@ xmlns="http://www.w3.org/2000/svg"
3685
3713
  </p>
3686
3714
  </div>
3687
3715
  </div>
3688
- `}};fo.styles=ho,po([ue({type:Object})],fo.prototype,"unit",void 0),po([ue()],fo.prototype,"onUnitSelect",void 0),po([ue({type:Boolean})],fo.prototype,"selected",void 0),fo=po([se("floorplan-image-card")],fo);var go=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 mo=class extends oe{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 B`<div class="spinner"></div>`}};mo.styles=u`
3689
- .spinner {
3690
- border: 4px solid rgba(0, 0, 0, 0.2);
3691
- border-top: 4px solid var(--primary-color, #c057ff);
3692
- border-radius: 50%;
3693
- width: var(--mega-loader-size, 64px);
3694
- height: var(--mega-loader-size, 64px);
3695
- animation: spin var(--mega-loader-spin-speed, 0.8s) linear infinite;
3696
- }
3697
-
3698
- @keyframes spin {
3699
- 0% {
3700
- transform: rotate(0deg);
3701
- }
3702
- 100% {
3703
- transform: rotate(360deg);
3704
- }
3705
- }
3706
- `,go([ue({type:Number})],mo.prototype,"size",void 0),go([ue({type:Number})],mo.prototype,"spinSpeed",void 0),mo=go([se("mega-loader")],mo);var yo=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 bo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.layoutOptions=[],this.selectedLayoutIds=[eo],this.units=[],this.isLoading=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.moveInDate=pn,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===eo?n=[eo]:this.selectedLayoutIds.includes(eo)?n=[e]:this.selectedLayoutIds.includes(e)?(n=this.selectedLayoutIds.filter(t=>t!==e),0===n.length&&(n=[eo])):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;if(n){const[e,t,i]=n.split("-").map(Number);this.moveInDate=new Date(e,t-1,i)}else this.moveInDate=pn;null===(t=this.onMoveInDateChange)||void 0===t||t.call(this,n||pn.toISOString().split("T")[0])},this.handleLeaseTermChange=e=>{var t;this.leaseTerm=parseInt(e.target.value),null===(t=this.onLeaseTermChange)||void 0===t||t.call(this,this.leaseTerm)},this.renderUnitSelection=()=>{var e,t;return this.isLoading?B`
3716
+ `}};fo.styles=ho,po([ue({type:Object})],fo.prototype,"unit",void 0),po([ue()],fo.prototype,"onUnitSelect",void 0),po([ue({type:Boolean})],fo.prototype,"selected",void 0),fo=po([se("floorplan-image-card")],fo);var go=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 mo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.layoutOptions=[],this.selectedLayoutIds=[eo],this.units=[],this.isLoading=!1,this.isLoadingLayouts=!1,this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.moveInDate=pn,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===eo?n=[eo]:this.selectedLayoutIds.includes(eo)?n=[e]:this.selectedLayoutIds.includes(e)?(n=this.selectedLayoutIds.filter(t=>t!==e),0===n.length&&(n=[eo])):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;if(n){const[e,t,i]=n.split("-").map(Number);this.moveInDate=new Date(e,t-1,i)}else this.moveInDate=pn;null===(t=this.onMoveInDateChange)||void 0===t||t.call(this,n||pn.toISOString().split("T")[0])},this.handleLeaseTermChange=e=>{var t;this.leaseTerm=parseInt(e.target.value),null===(t=this.onLeaseTermChange)||void 0===t||t.call(this,this.leaseTerm)},this.renderUnitSelection=()=>{var e,t;return this.isLoading?B`
3707
3717
  <div class="unit-selection">
3708
- <div class="loading-container">
3709
- <mega-loader size="32"></mega-loader>
3718
+ <div class="image-carousel">
3719
+ ${Array.from({length:3},()=>B`<div class="unit-card-skeleton shimmer"></div>`)}
3710
3720
  </div>
3711
3721
  </div>
3712
3722
  `:B`
3713
3723
  <div class="unit-selection">
3714
3724
  <div class="image-carousel">
3715
- ${this.isLoading||0!==(null===(e=this.units)||void 0===e?void 0:e.length)?"":B`
3725
+ ${0===(null===(e=this.units)||void 0===e?void 0:e.length)?B`
3716
3726
  <div class="no-floorplans-container">
3717
3727
  <p>No floorplans found</p>
3718
3728
  </div>
3719
- `}
3729
+ `:""}
3720
3730
  ${null===(t=this.units)||void 0===t?void 0:t.map(e=>{var t;return B`
3721
3731
  <floorplan-image-card
3722
3732
  .unit=${e}
@@ -3726,7 +3736,11 @@ xmlns="http://www.w3.org/2000/svg"
3726
3736
  `})}
3727
3737
  </div>
3728
3738
  </div>
3729
- `},this.renderBadges=()=>B`
3739
+ `},this.renderBadges=()=>this.isLoadingLayouts?B`
3740
+ <div class="floor-plan-selector-badges">
3741
+ ${Array.from({length:4},()=>B`<div class="floor-plan-badge skeleton shimmer"></div>`)}
3742
+ </div>
3743
+ `:B`
3730
3744
  <div class="floor-plan-selector-badges">
3731
3745
  ${this.displayOptions.map(e=>B`
3732
3746
  <div
@@ -3768,7 +3782,7 @@ xmlns="http://www.w3.org/2000/svg"
3768
3782
  ${this.renderUnitSelection()}
3769
3783
  </div>
3770
3784
  </div>
3771
- `}};bo.styles=co,yo([ue({type:String})],bo.prototype,"buildingSlug",void 0),yo([ue({type:Array})],bo.prototype,"layoutOptions",void 0),yo([ue({type:Array})],bo.prototype,"selectedLayoutIds",void 0),yo([ue({type:Array})],bo.prototype,"units",void 0),yo([ue({type:Boolean})],bo.prototype,"isLoading",void 0),yo([ue()],bo.prototype,"onSelectLayout",void 0),yo([ue()],bo.prototype,"onUnitSelect",void 0),yo([ue()],bo.prototype,"onMoveInDateChange",void 0),yo([ue()],bo.prototype,"onLeaseTermChange",void 0),yo([ce()],bo.prototype,"moveInDate",void 0),yo([ce()],bo.prototype,"leaseTerm",void 0),yo([ce()],bo.prototype,"selectedUnit",void 0),bo=yo([se("floor-plan-selector")],bo);const vo=u`
3785
+ `}};mo.styles=co,go([ue({type:String})],mo.prototype,"buildingSlug",void 0),go([ue({type:Array})],mo.prototype,"layoutOptions",void 0),go([ue({type:Array})],mo.prototype,"selectedLayoutIds",void 0),go([ue({type:Array})],mo.prototype,"units",void 0),go([ue({type:Boolean})],mo.prototype,"isLoading",void 0),go([ue({type:Boolean})],mo.prototype,"isLoadingLayouts",void 0),go([ue()],mo.prototype,"onSelectLayout",void 0),go([ue()],mo.prototype,"onUnitSelect",void 0),go([ue()],mo.prototype,"onMoveInDateChange",void 0),go([ue()],mo.prototype,"onLeaseTermChange",void 0),go([ce()],mo.prototype,"moveInDate",void 0),go([ce()],mo.prototype,"leaseTerm",void 0),go([ce()],mo.prototype,"selectedUnit",void 0),mo=go([se("floor-plan-selector")],mo);const yo=u`
3772
3786
  :host {
3773
3787
  display: block;
3774
3788
  width: 100%;
@@ -3803,22 +3817,32 @@ xmlns="http://www.w3.org/2000/svg"
3803
3817
  margin-top: 4px;
3804
3818
  }
3805
3819
 
3820
+ .fee-additional-info {
3821
+ color: #868e96;
3822
+ font-size: 0.8rem;
3823
+ margin-top: 2px;
3824
+ font-style: italic;
3825
+ }
3826
+
3806
3827
  .fee-amount {
3807
3828
  font-size: 1rem;
3808
3829
  align-self: center;
3809
3830
  }
3810
- `;var wo=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 Co=class extends oe{constructor(){super(...arguments),this.feeQuote=null}get name(){var e,t;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem)return Sn(this.feeQuote.sourceRentableItem.description||"");const n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee;return(null==n?void 0:n.feeName)?Sn(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 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:En(t,2)}render(){return this.feeQuote&&this.amount?B`
3831
+ `;var bo=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 vo=class extends oe{constructor(){super(...arguments),this.feeQuote=null}get name(){var e,t;if(null===(e=this.feeQuote)||void 0===e?void 0:e.sourceRentableItem)return Sn(this.feeQuote.sourceRentableItem.description||"");const n=null===(t=this.feeQuote)||void 0===t?void 0:t.marketableFee;return(null==n?void 0:n.feeName)?Sn(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:En(t,2)}render(){return this.feeQuote&&this.amount?B`
3811
3832
  <div class="fee-item">
3812
3833
  <div class="fee-info">
3813
3834
  <div class="fee-name">${this.name}</div>
3814
- <div class="fee-description">${this.description}</div>
3835
+ ${this.description?B`<div class="fee-description">${this.description}</div>`:""}
3836
+ ${this.additionalInfo?B`<div class="fee-additional-info">
3837
+ ${this.additionalInfo}
3838
+ </div>`:""}
3815
3839
  ${this.triggeredEvent?B`<div class="fee-triggered-event">
3816
3840
  ${this.triggeredEvent}
3817
3841
  </div>`:""}
3818
3842
  </div>
3819
3843
  <div class="fee-amount">${this.amount}</div>
3820
3844
  </div>
3821
- `:B``}};Co.styles=vo,wo([ue({type:Object})],Co.prototype,"feeQuote",void 0),Co=wo([se("fee-item")],Co);var xo=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 Ao=class extends oe{constructor(){super(...arguments),this.feeQuotes=[]}get itemType(){const e=this.feeQuotes[0];return(null==e?void 0:e.sourceRentableItem)?Sn(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 En(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`} @ ${En(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!==En(0,2)?B`
3845
+ `:B``}};vo.styles=yo,bo([ue({type:Object})],vo.prototype,"feeQuote",void 0),vo=bo([se("fee-item")],vo);var wo=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 Co=class extends oe{constructor(){super(...arguments),this.feeQuotes=[]}get itemType(){const e=this.feeQuotes[0];return(null==e?void 0:e.sourceRentableItem)?Sn(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 En(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`} @ ${En(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!==En(0,2)?B`
3822
3846
  <div class="fee-item">
3823
3847
  <div class="fee-info">
3824
3848
  <div class="fee-name">${this.itemType}</div>
@@ -3826,7 +3850,7 @@ xmlns="http://www.w3.org/2000/svg"
3826
3850
  </div>
3827
3851
  <div class="fee-amount">${this.totalAmount}</div>
3828
3852
  </div>
3829
- `:B``}};Ao.styles=vo,xo([ue({type:Array})],Ao.prototype,"feeQuotes",void 0),Ao=xo([se("grouped-rentable-item")],Ao);const So=u`
3853
+ `:B``}};Co.styles=yo,wo([ue({type:Array})],Co.prototype,"feeQuotes",void 0),Co=wo([se("grouped-rentable-item")],Co);const xo=u`
3830
3854
  .fee-card-section-container {
3831
3855
  margin: 0 12px;
3832
3856
  border-radius: 4px;
@@ -3886,7 +3910,7 @@ xmlns="http://www.w3.org/2000/svg"
3886
3910
  margin: 12px;
3887
3911
  justify-content: space-between;
3888
3912
  }
3889
- `;var Eo=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 ko=class extends oe{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 En(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 B`
3913
+ `;var Ao=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 So=class extends oe{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 En(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 B`
3890
3914
  <div class="fee-card-section-container">
3891
3915
  <div class="fee-card-section-header">
3892
3916
  <h1 class="section-title">${this.title}</h1>
@@ -3910,7 +3934,7 @@ xmlns="http://www.w3.org/2000/svg"
3910
3934
  </div>
3911
3935
  </div>
3912
3936
  </div>
3913
- `}};ko.styles=So,Eo([ue({type:String})],ko.prototype,"title",void 0),Eo([ue({type:Array})],ko.prototype,"fees",void 0),Eo([ce()],ko.prototype,"buildingFeesToQuantity",void 0),ko=Eo([se("fee-card")],ko);const To=u`
3937
+ `}};So.styles=xo,Ao([ue({type:String})],So.prototype,"title",void 0),Ao([ue({type:Array})],So.prototype,"fees",void 0),Ao([ce()],So.prototype,"buildingFeesToQuantity",void 0),So=Ao([se("fee-card")],So);const Eo=u`
3914
3938
  :host {
3915
3939
  --transition-timing: 0.2s ease;
3916
3940
  display: flex;
@@ -4112,7 +4136,7 @@ xmlns="http://www.w3.org/2000/svg"
4112
4136
  font-weight: bold;
4113
4137
  color: #0066cc;
4114
4138
  }
4115
- `;var _o;!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"}(_o||(_o={}));var Oo=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 Po=class extends oe{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.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)}}}}handleIncrement(e){var t,n;const i=(null!==(t=this.chargeInputs[e])&&void 0!==t?t:0)+1;"num_cats"===e||"num_dogs"===e||"num_other_pets"===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);"num_cats"===e||"num_dogs"===e||"num_other_pets"===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 B`
4139
+ `;var ko;!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"}(ko||(ko={}));var To=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 _o=class extends oe{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.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)}}}}handleIncrement(e){var t,n;const i=(null!==(t=this.chargeInputs[e])&&void 0!==t?t:0)+1;"num_cats"===e||"num_dogs"===e||"num_other_pets"===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);"num_cats"===e||"num_dogs"===e||"num_other_pets"===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 B`
4116
4140
  <div class="rentable-item-row">
4117
4141
  <div class="rentable-item-info">
4118
4142
  <div class="rentable-item-label">${e.description}</div>
@@ -4168,7 +4192,7 @@ xmlns="http://www.w3.org/2000/svg"
4168
4192
  </div>
4169
4193
  `:""}
4170
4194
  </div>
4171
- `}};Po.styles=u`
4195
+ `}};_o.styles=u`
4172
4196
  .charge-inputs-container {
4173
4197
  background: white;
4174
4198
  border-radius: 8px;
@@ -4305,7 +4329,7 @@ xmlns="http://www.w3.org/2000/svg"
4305
4329
  opacity: 0.5;
4306
4330
  cursor: not-allowed;
4307
4331
  }
4308
- `,Oo([ue({type:Object})],Po.prototype,"chargeInputs",void 0),Oo([ue()],Po.prototype,"onChargeInputsChange",void 0),Oo([ue({type:Boolean})],Po.prototype,"disabled",void 0),Oo([ue({type:Array})],Po.prototype,"rentableItems",void 0),Oo([ue({type:Array})],Po.prototype,"selectedRentableItems",void 0),Oo([ue()],Po.prototype,"onRentableItemAdd",void 0),Oo([ue()],Po.prototype,"onRentableItemRemove",void 0),Po=Oo([se("charge-inputs")],Po);const Io=u`
4332
+ `,To([ue({type:Object})],_o.prototype,"chargeInputs",void 0),To([ue()],_o.prototype,"onChargeInputsChange",void 0),To([ue({type:Boolean})],_o.prototype,"disabled",void 0),To([ue({type:Array})],_o.prototype,"rentableItems",void 0),To([ue({type:Array})],_o.prototype,"selectedRentableItems",void 0),To([ue()],_o.prototype,"onRentableItemAdd",void 0),To([ue()],_o.prototype,"onRentableItemRemove",void 0),_o=To([se("charge-inputs")],_o);const Oo=u`
4309
4333
  :host {
4310
4334
  --skeleton-bg-color: #eaeaea;
4311
4335
  --skeleton-highlight-color: #f5f5f5;
@@ -4319,8 +4343,8 @@ xmlns="http://www.w3.org/2000/svg"
4319
4343
  background-position: 200px 0;
4320
4344
  }
4321
4345
  }
4322
- `,Mo=u`
4323
- ${Io}
4346
+ `,Po=u`
4347
+ ${Oo}
4324
4348
 
4325
4349
  :host {
4326
4350
  display: block;
@@ -4385,8 +4409,8 @@ xmlns="http://www.w3.org/2000/svg"
4385
4409
  margin-bottom: 10px;
4386
4410
  }
4387
4411
  }
4388
- `,No=u`
4389
- ${Io}
4412
+ `,Io=u`
4413
+ ${Oo}
4390
4414
 
4391
4415
  :host {
4392
4416
  display: block;
@@ -4408,16 +4432,34 @@ xmlns="http://www.w3.org/2000/svg"
4408
4432
  box-sizing: border-box;
4409
4433
  }
4410
4434
  }
4411
- `;var Do=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 Lo=class extends oe{constructor(){super(...arguments),this.rows=2,this.header=!0}render(){return B`
4435
+ `;var Mo=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 No=class extends oe{constructor(){super(...arguments),this.rows=2,this.header=!0}render(){return B`
4412
4436
  <div class="skeleton-card">
4413
4437
  ${this.header?B`<div class="skeleton-header"></div>`:""}
4414
4438
  ${Array(this.rows).fill(0).map(()=>B`<div class="skeleton-row"></div>`)}
4415
4439
  </div>
4416
- `}};Lo.styles=Mo,Do([ue({type:Number})],Lo.prototype,"rows",void 0),Do([ue({type:Boolean})],Lo.prototype,"header",void 0),Lo=Do([se("skeleton-card")],Lo);var Uo=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 Ro=class extends oe{constructor(){super(...arguments),this.cards=3,this.rowsPerCard=[3,2,1]}render(){return B`
4440
+ `}};No.styles=Po,Mo([ue({type:Number})],No.prototype,"rows",void 0),Mo([ue({type:Boolean})],No.prototype,"header",void 0),No=Mo([se("skeleton-card")],No);var Do=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 Lo=class extends oe{constructor(){super(...arguments),this.cards=3,this.rowsPerCard=[3,2,1]}render(){return B`
4417
4441
  <div class="skeleton-loader">
4418
4442
  ${Array.from({length:this.cards},(e,t)=>{const n=Array.isArray(this.rowsPerCard)?this.rowsPerCard[t]||2:this.rowsPerCard;return B`<skeleton-card .rows=${n}></skeleton-card>`})}
4419
4443
  </div>
4420
- `}};Ro.styles=No,Uo([ue({type:Number})],Ro.prototype,"cards",void 0),Uo([ue({type:Array})],Ro.prototype,"rowsPerCard",void 0),Ro=Uo([se("skeleton-loader")],Ro);var Bo=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 jo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[eo],this.groupedFees={[qr.ONE_TIME]:[],[qr.MONTHLY]:[],[qr.WEEKLY]:[],[qr.BI_WEEKLY]:[],[qr.ANNUALLY]:[],[qr.DAILY]:[],[qr.AS_NEEDED]:[],[qr.NEVER]:[]},this.rentableItems=[],this.units=[],this.isLoadingUnits=!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.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:En(this.quote.rentCost,2),minEstimate:null,maxEstimate:null,percentRentMin:null,percentRentMax:null,percentRent:null,frequency:_o.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)?B` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t;const n=[],i=[{freq:_o.ANNUALLY,title:"Yearly Charges"},{freq:_o.MONTHLY,title:"Monthly Charges"},{freq:_o.BI_WEEKLY,title:"Bi-Weekly Charges"},{freq:_o.WEEKLY,title:"Weekly Charges"},{freq:_o.DAILY,title:"Daily Charges"},{freq:_o.ONE_TIME,title:"One-Time"},{freq:_o.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!==_o.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===_o.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===_o.MONTHLY||"annually"===t.sourceRentableItem.rentFrequency&&e===_o.ANNUALLY)}))&&void 0!==t?t:[];if(e===_o.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?B`
4444
+ `}};Lo.styles=Io,Do([ue({type:Number})],Lo.prototype,"cards",void 0),Do([ue({type:Array})],Lo.prototype,"rowsPerCard",void 0),Lo=Do([se("skeleton-loader")],Lo);var Uo=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 Ro=class extends oe{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 B`<div class="spinner"></div>`}};Ro.styles=u`
4445
+ .spinner {
4446
+ border: 4px solid rgba(0, 0, 0, 0.2);
4447
+ border-top: 4px solid var(--primary-color, #c057ff);
4448
+ border-radius: 50%;
4449
+ width: var(--mega-loader-size, 64px);
4450
+ height: var(--mega-loader-size, 64px);
4451
+ animation: spin var(--mega-loader-spin-speed, 0.8s) linear infinite;
4452
+ }
4453
+
4454
+ @keyframes spin {
4455
+ 0% {
4456
+ transform: rotate(0deg);
4457
+ }
4458
+ 100% {
4459
+ transform: rotate(360deg);
4460
+ }
4461
+ }
4462
+ `,Uo([ue({type:Number})],Ro.prototype,"size",void 0),Uo([ue({type:Number})],Ro.prototype,"spinSpeed",void 0),Ro=Uo([se("mega-loader")],Ro);var Bo=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 jo=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.showSkeletonLoader=!1,this.selectedUnit=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[eo],this.groupedFees={[qr.ONE_TIME]:[],[qr.MONTHLY]:[],[qr.WEEKLY]:[],[qr.BI_WEEKLY]:[],[qr.ANNUALLY]:[],[qr.DAILY]:[],[qr.AS_NEEDED]:[],[qr.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.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:En(this.quote.rentCost,2),minEstimate:null,maxEstimate:null,percentRentMin:null,percentRentMax:null,percentRent:null,frequency:ko.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)?B` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t;const n=[],i=[{freq:ko.ANNUALLY,title:"Yearly Charges"},{freq:ko.MONTHLY,title:"Monthly Charges"},{freq:ko.BI_WEEKLY,title:"Bi-Weekly Charges"},{freq:ko.WEEKLY,title:"Weekly Charges"},{freq:ko.DAILY,title:"Daily Charges"},{freq:ko.ONE_TIME,title:"One-Time"},{freq:ko.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!==ko.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===ko.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===ko.MONTHLY||"annually"===t.sourceRentableItem.rentFrequency&&e===ko.ANNUALLY)}))&&void 0!==t?t:[];if(e===ko.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?B`
4421
4463
  <div class="total-cost-section">
4422
4464
  <div class="total-cost-row">
4423
4465
  <span class="total-cost-label">Total Monthly Cost:</span>
@@ -4449,6 +4491,7 @@ xmlns="http://www.w3.org/2000/svg"
4449
4491
  .selectedLayoutIds=${this.selectedLayoutIds}
4450
4492
  .units=${this.units}
4451
4493
  .isLoading=${this.isLoadingUnits}
4494
+ .isLoadingLayouts=${this.isLoadingLayouts}
4452
4495
  .onSelectLayout=${this.onSelectLayout}
4453
4496
  .onUnitSelect=${this.onUnitSelect}
4454
4497
  .onMoveInDateChange=${this.onMoveInDateChange}
@@ -4472,7 +4515,7 @@ xmlns="http://www.w3.org/2000/svg"
4472
4515
 
4473
4516
  ${this.renderFeesContent()}
4474
4517
  </div>
4475
- `}};jo.styles=To,Bo([ue({type:String})],jo.prototype,"buildingSlug",void 0),Bo([ue({type:Boolean})],jo.prototype,"showSkeletonLoader",void 0),Bo([ue({type:Object})],jo.prototype,"selectedUnit",void 0),Bo([ue({type:Object})],jo.prototype,"quote",void 0),Bo([ue({type:Array})],jo.prototype,"layoutOptions",void 0),Bo([ue({type:Array})],jo.prototype,"selectedLayoutIds",void 0),Bo([ue({type:Object})],jo.prototype,"groupedFees",void 0),Bo([ue({type:Array})],jo.prototype,"rentableItems",void 0),Bo([ue({type:Array})],jo.prototype,"units",void 0),Bo([ue({type:Boolean})],jo.prototype,"isLoadingUnits",void 0),Bo([ue()],jo.prototype,"onSelectLayout",void 0),Bo([ue()],jo.prototype,"onUnitSelect",void 0),Bo([ue()],jo.prototype,"onMoveInDateChange",void 0),Bo([ue()],jo.prototype,"onLeaseTermChange",void 0),Bo([ue({type:Object})],jo.prototype,"chargeInputs",void 0),Bo([ue()],jo.prototype,"onChargeInputsChange",void 0),Bo([ue({type:Array})],jo.prototype,"selectedRentableItems",void 0),Bo([ue()],jo.prototype,"onRentableItemAdd",void 0),Bo([ue()],jo.prototype,"onRentableItemRemove",void 0),jo=Bo([se("fee-calculator-layout")],jo);var Fo,Ho,$o,zo;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(Fo||(Fo={})),function(e){e.Debit="Debit",e.Credit="Credit"}(Ho||(Ho={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}($o||($o={})),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"}(zo||(zo={}));const Go=u`
4518
+ `}};jo.styles=Eo,Bo([ue({type:String})],jo.prototype,"buildingSlug",void 0),Bo([ue({type:Boolean})],jo.prototype,"showSkeletonLoader",void 0),Bo([ue({type:Object})],jo.prototype,"selectedUnit",void 0),Bo([ue({type:Object})],jo.prototype,"quote",void 0),Bo([ue({type:Array})],jo.prototype,"layoutOptions",void 0),Bo([ue({type:Array})],jo.prototype,"selectedLayoutIds",void 0),Bo([ue({type:Object})],jo.prototype,"groupedFees",void 0),Bo([ue({type:Array})],jo.prototype,"rentableItems",void 0),Bo([ue({type:Array})],jo.prototype,"units",void 0),Bo([ue({type:Boolean})],jo.prototype,"isLoadingUnits",void 0),Bo([ue({type:Boolean})],jo.prototype,"isLoadingLayouts",void 0),Bo([ue()],jo.prototype,"onSelectLayout",void 0),Bo([ue()],jo.prototype,"onUnitSelect",void 0),Bo([ue()],jo.prototype,"onMoveInDateChange",void 0),Bo([ue()],jo.prototype,"onLeaseTermChange",void 0),Bo([ue({type:Object})],jo.prototype,"chargeInputs",void 0),Bo([ue()],jo.prototype,"onChargeInputsChange",void 0),Bo([ue({type:Array})],jo.prototype,"selectedRentableItems",void 0),Bo([ue()],jo.prototype,"onRentableItemAdd",void 0),Bo([ue()],jo.prototype,"onRentableItemRemove",void 0),jo=Bo([se("fee-calculator-layout")],jo);var Fo,Ho,$o,zo;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(Fo||(Fo={})),function(e){e.Debit="Debit",e.Credit="Credit"}(Ho||(Ho={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}($o||($o={})),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"}(zo||(zo={}));const Go=u`
4476
4519
  :host {
4477
4520
  display: block;
4478
4521
  --table-header-bg: white;
@@ -4819,7 +4862,7 @@ xmlns="http://www.w3.org/2000/svg"
4819
4862
  </p>
4820
4863
  </div>
4821
4864
  </div>
4822
- `:B``}};ia.styles=ta,na([ue({type:Object})],ia.prototype,"incentive",void 0),ia=na([se("incentive-banner")],ia);var ra=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 oa=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.primaryColor=Ue,this.backgroundColor=Re,this.onCloseClicked=null,this.onClickEmailOption=null,this.onClickPhoneOption=null,this.onClickSSTOption=null,this.onClickTextUsOption=null,this.isFirstCalculation=!0,this.isCalculatingQuote=!1,this.isExporting=!1,this.selectedLayoutIds=[eo],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=pn.toISOString().split("T")[0],this.leaseTerm=12,this.buildingWebchatView=null,this.incentives=[],this.quote=null,this.pdfUrl=null,this.groupedFees={[qr.ONE_TIME]:[],[qr.MONTHLY]:[],[qr.WEEKLY]:[],[qr.BI_WEEKLY]:[],[qr.ANNUALLY]:[],[qr.DAILY]:[],[qr.AS_NEEDED]:[],[qr.NEVER]:[]},this.rentableItems=[],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 this.setupCalculator(),await this.fetchUnits()},this.setupCalculator=async()=>{if(!this.buildingSlug||!this.orgSlug)return;const[e,t]=await Promise.all([Ui(this.orgSlug,this.buildingSlug),Jr(this.buildingSlug)]);e&&t&&(this.buildingWebchatView=e,this.groupedFees=this.groupFees(t.fees),this.rentableItems=t.rentableItems)},this.requestQuoteCalculation=()=>{if(this.quoteDebounceTimer&&(clearTimeout(this.quoteDebounceTimer),this.quoteDebounceTimer=null),!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);this.quoteDebounceTimer=window.setTimeout(()=>{this.startQuoteApiCall(),this.quoteDebounceTimer=null},1e3)},this.handleUnitSelect=e=>{const t=!this.selectedUnit;if(this.isFirstCalculation=!0,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.quote=null,this.pdfUrl=null,await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleLeaseTermChange=async e=>{this.leaseTerm=e,this.quote=null,this.pdfUrl=null,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||qr.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&&(ai("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(eo)||(e=this.selectedLayoutIds.map(e=>{return 0===(t=e)?0:Math.floor(t/10);var t}));try{if(this.units=await oo({buildingSlug:this.buildingSlug,moveInDateEarliestString:this.moveInDateString,...e?{numBedrooms:e}:{},leaseTermMin: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.quote=null,this.pdfUrl=null)}}finally{this.isLoadingUnits=!1}}}async performQuoteCalculation(e){if(!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);const t=dn(Rn(this.moveInDateString),Rn(this.selectedUnit.earliestAvailable))?this.selectedUnit.earliestAvailable:this.moveInDateString,n=this.selectedUnit.id,i=this.leaseTerm;try{const r=await no({buildingSlug:this.buildingSlug,unitId:n,chargeInputs:this.chargeInputs,rentableItems:this.desiredRentableItems,leaseTerm:i,moveInDate:t},e);this.quote=r.quote,this.pdfUrl=r.pdfUrl||null,this.quote&&ai("feeCalculatorQuoteGenerated",{buildingSlug:this.buildingSlug,unitId:n,leaseTerm:i})}catch(e){"AbortError"!==(null==e?void 0:e.name)&&(this.quote=null,this.pdfUrl=null,this.isCalculatingQuote=!1,Ai({logType:xi.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{error:e}}))}finally{e.aborted||(this.isCalculatingQuote=!1,this.isFirstCalculation=!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.isCalculatingQuote&&!this.isExporting&&!this.isFirstCalculation,i=this.isExporting||this.isCalculatingQuote||!this.selectedUnit||!this.moveInDateString||!this.pdfUrl;return B`
4865
+ `:B``}};ia.styles=ta,na([ue({type:Object})],ia.prototype,"incentive",void 0),ia=na([se("incentive-banner")],ia);var ra=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 oa=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.primaryColor=Ue,this.backgroundColor=Re,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=[eo],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=pn.toISOString().split("T")[0],this.leaseTerm=12,this.buildingWebchatView=null,this.incentives=[],this.quote=null,this.pdfUrl=null,this.groupedFees={[qr.ONE_TIME]:[],[qr.MONTHLY]:[],[qr.WEEKLY]:[],[qr.BI_WEEKLY]:[],[qr.ANNUALLY]:[],[qr.DAILY]:[],[qr.AS_NEEDED]:[],[qr.NEVER]:[]},this.rentableItems=[],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=Ui(this.orgSlug,this.buildingSlug).then(e=>{e&&(this.buildingWebchatView=e)}).finally(()=>{this.isLoadingLayouts=!1}),t=Jr(this.buildingSlug).then(e=>{e&&(this.groupedFees=this.groupFees(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.quote=null,this.pdfUrl=null,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.quote=null,this.pdfUrl=null,await this.fetchUnits(),this.selectedUnit&&this.requestQuoteCalculation()},this.handleLeaseTermChange=async e=>{this.leaseTerm=e,this.quote=null,this.pdfUrl=null,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||qr.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&&(ai("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(eo)||(e=this.selectedLayoutIds.map(e=>{return 0===(t=e)?0:Math.floor(t/10);var t}));try{if(this.units=await oo({buildingSlug:this.buildingSlug,moveInDateEarliestString:this.moveInDateString,...e?{numBedrooms:e}:{},leaseTermMin: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.quote=null,this.pdfUrl=null)}}finally{this.isLoadingUnits=!1}}}async performQuoteCalculation(e){if(!this.selectedUnit||!this.moveInDateString)return this.quote=null,this.pdfUrl=null,void(this.isCalculatingQuote=!1);const t=dn(Rn(this.moveInDateString),Rn(this.selectedUnit.earliestAvailable))?this.selectedUnit.earliestAvailable:this.moveInDateString,n=this.selectedUnit.id,i=this.leaseTerm;try{const r=await no({buildingSlug:this.buildingSlug,unitId:n,chargeInputs:this.chargeInputs,rentableItems:this.desiredRentableItems,leaseTerm:i,moveInDate:t},e);this.quote=r.quote,this.pdfUrl=r.pdfUrl||null,this.quote&&ai("feeCalculatorQuoteGenerated",{buildingSlug:this.buildingSlug,unitId:n,leaseTerm:i})}catch(e){"AbortError"!==(null==e?void 0:e.name)&&(this.quote=null,this.pdfUrl=null,this.isCalculatingQuote=!1,Ai({logType:xi.error,buildingSlug:this.buildingSlug,logTitle:"[ERROR_CALCULATING_QUOTE]",logData:{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 B`
4823
4866
  <div
4824
4867
  class="fee-calculator-container"
4825
4868
  @keydown=${e=>e.stopPropagation()}
@@ -4829,14 +4872,10 @@ xmlns="http://www.w3.org/2000/svg"
4829
4872
  <h1>Estimated Cost Calculator</h1>
4830
4873
 
4831
4874
  <div class="calculator-header-right">
4832
- ${n?B`<div class="recalculating-loader">
4833
- <mega-loader .size=${16} .spinSpeed=${.54}></mega-loader>
4834
- </div>`:""}
4835
-
4836
4875
  <button
4837
4876
  class="share-button"
4838
4877
  @click=${this.handleShare}
4839
- ?disabled=${i}
4878
+ ?disabled=${n}
4840
4879
  >
4841
4880
  ${this.isExporting?B`<mega-loader
4842
4881
  .size=${24}
@@ -4846,7 +4885,7 @@ xmlns="http://www.w3.org/2000/svg"
4846
4885
  <button
4847
4886
  class="apply-button"
4848
4887
  @click=${()=>{var e,t;window.open(null!==(t=null===(e=this.quote)||void 0===e?void 0:e.applicationLink)&&void 0!==t?t:"","_blank","noopener,noreferrer")}}
4849
- ?disabled=${!(null===(e=this.quote)||void 0===e?void 0:e.applicationLink)}
4888
+ ?disabled=${this.isCalculatingQuote||!(null===(e=this.quote)||void 0===e?void 0:e.applicationLink)}
4850
4889
  >
4851
4890
  Apply
4852
4891
  </button>
@@ -4875,7 +4914,7 @@ xmlns="http://www.w3.org/2000/svg"
4875
4914
 
4876
4915
  <fee-calculator-layout
4877
4916
  .buildingSlug=${this.buildingSlug}
4878
- .showSkeletonLoader=${this.isFirstCalculation}
4917
+ .showSkeletonLoader=${this.isCalculatingQuote}
4879
4918
  .selectedUnit=${this.selectedUnit}
4880
4919
  .groupedFees=${this.groupedFees}
4881
4920
  .rentableItems=${this.rentableItems}
@@ -4884,6 +4923,7 @@ xmlns="http://www.w3.org/2000/svg"
4884
4923
  .selectedLayoutIds=${this.selectedLayoutIds}
4885
4924
  .units=${this.units}
4886
4925
  .isLoadingUnits=${this.isLoadingUnits}
4926
+ .isLoadingLayouts=${this.isLoadingLayouts}
4887
4927
  .onSelectLayout=${this.handleSelectLayout}
4888
4928
  .onUnitSelect=${this.handleUnitSelect}
4889
4929
  .onMoveInDateChange=${this.handleMoveInDateChange}
@@ -4902,7 +4942,7 @@ xmlns="http://www.w3.org/2000/svg"
4902
4942
  </div>
4903
4943
  `:""}
4904
4944
  </div>
4905
- `}};oa.styles=zr,ra([ue({attribute:!0})],oa.prototype,"buildingSlug",void 0),ra([ue({attribute:!0})],oa.prototype,"orgSlug",void 0),ra([ue({type:String})],oa.prototype,"primaryColor",void 0),ra([ue({type:String})],oa.prototype,"backgroundColor",void 0),ra([ue()],oa.prototype,"onCloseClicked",void 0),ra([ue()],oa.prototype,"onClickEmailOption",void 0),ra([ue()],oa.prototype,"onClickPhoneOption",void 0),ra([ue()],oa.prototype,"onClickSSTOption",void 0),ra([ue()],oa.prototype,"onClickTextUsOption",void 0),ra([ce()],oa.prototype,"isFirstCalculation",void 0),ra([ce()],oa.prototype,"isCalculatingQuote",void 0),ra([ce()],oa.prototype,"isExporting",void 0),ra([ce()],oa.prototype,"selectedLayoutIds",void 0),ra([ce()],oa.prototype,"selectedUnit",void 0),ra([ce()],oa.prototype,"chargeInputs",void 0),ra([ce()],oa.prototype,"desiredRentableItems",void 0),ra([ce()],oa.prototype,"moveInDateString",void 0),ra([ce()],oa.prototype,"leaseTerm",void 0),ra([ce()],oa.prototype,"buildingWebchatView",void 0),ra([ce()],oa.prototype,"incentives",void 0),ra([ce()],oa.prototype,"quote",void 0),ra([ce()],oa.prototype,"pdfUrl",void 0),ra([ce()],oa.prototype,"groupedFees",void 0),ra([ce()],oa.prototype,"rentableItems",void 0),ra([ce()],oa.prototype,"units",void 0),ra([ce()],oa.prototype,"isLoadingUnits",void 0),oa=ra([se("fee-calculator")],oa);const aa=u`
4945
+ `}};oa.styles=zr,ra([ue({attribute:!0})],oa.prototype,"buildingSlug",void 0),ra([ue({attribute:!0})],oa.prototype,"orgSlug",void 0),ra([ue({type:String})],oa.prototype,"primaryColor",void 0),ra([ue({type:String})],oa.prototype,"backgroundColor",void 0),ra([ue()],oa.prototype,"onCloseClicked",void 0),ra([ue()],oa.prototype,"onClickEmailOption",void 0),ra([ue()],oa.prototype,"onClickPhoneOption",void 0),ra([ue()],oa.prototype,"onClickSSTOption",void 0),ra([ue()],oa.prototype,"onClickTextUsOption",void 0),ra([ce()],oa.prototype,"isCalculatingQuote",void 0),ra([ce()],oa.prototype,"isLoadingLayouts",void 0),ra([ce()],oa.prototype,"isExporting",void 0),ra([ce()],oa.prototype,"selectedLayoutIds",void 0),ra([ce()],oa.prototype,"selectedUnit",void 0),ra([ce()],oa.prototype,"chargeInputs",void 0),ra([ce()],oa.prototype,"desiredRentableItems",void 0),ra([ce()],oa.prototype,"moveInDateString",void 0),ra([ce()],oa.prototype,"leaseTerm",void 0),ra([ce()],oa.prototype,"buildingWebchatView",void 0),ra([ce()],oa.prototype,"incentives",void 0),ra([ce()],oa.prototype,"quote",void 0),ra([ce()],oa.prototype,"pdfUrl",void 0),ra([ce()],oa.prototype,"groupedFees",void 0),ra([ce()],oa.prototype,"rentableItems",void 0),ra([ce()],oa.prototype,"units",void 0),ra([ce()],oa.prototype,"isLoadingUnits",void 0),oa=ra([se("fee-calculator")],oa);const aa=u`
4906
4946
  #minimize-mobile {
4907
4947
  position: absolute;
4908
4948
  top: -12px;
@@ -66,6 +66,9 @@ export class FeeCalculatorLayout extends LitElement {
66
66
  @property({ type: Boolean })
67
67
  isLoadingUnits = false;
68
68
 
69
+ @property({ type: Boolean })
70
+ isLoadingLayouts = false;
71
+
69
72
  @property()
70
73
  onSelectLayout: ((layoutIds: number[]) => void) | null = null;
71
74
 
@@ -277,6 +280,7 @@ export class FeeCalculatorLayout extends LitElement {
277
280
  .selectedLayoutIds=${this.selectedLayoutIds}
278
281
  .units=${this.units}
279
282
  .isLoading=${this.isLoadingUnits}
283
+ .isLoadingLayouts=${this.isLoadingLayouts}
280
284
  .onSelectLayout=${this.onSelectLayout}
281
285
  .onUnitSelect=${this.onUnitSelect}
282
286
  .onMoveInDateChange=${this.onMoveInDateChange}
@@ -35,6 +35,13 @@ const feeItemStyles = css`
35
35
  margin-top: 4px;
36
36
  }
37
37
 
38
+ .fee-additional-info {
39
+ color: #868e96;
40
+ font-size: 0.8rem;
41
+ margin-top: 2px;
42
+ font-style: italic;
43
+ }
44
+
38
45
  .fee-amount {
39
46
  font-size: 1rem;
40
47
  align-self: center;
@@ -32,6 +32,10 @@ export class FeeItemComponent extends LitElement {
32
32
  return this.feeQuote?.marketableFee?.description ?? "";
33
33
  }
34
34
 
35
+ get additionalInfo(): string {
36
+ return this.feeQuote?.marketableFee?.additionalInfo ?? "";
37
+ }
38
+
35
39
  get triggeredEvent(): string {
36
40
  const event = this.feeQuote?.marketableFee?.triggeredByEvent;
37
41
  if (!event) return "";
@@ -61,7 +65,14 @@ export class FeeItemComponent extends LitElement {
61
65
  <div class="fee-item">
62
66
  <div class="fee-info">
63
67
  <div class="fee-name">${this.name}</div>
64
- <div class="fee-description">${this.description}</div>
68
+ ${this.description
69
+ ? html`<div class="fee-description">${this.description}</div>`
70
+ : ""}
71
+ ${this.additionalInfo
72
+ ? html`<div class="fee-additional-info">
73
+ ${this.additionalInfo}
74
+ </div>`
75
+ : ""}
65
76
  ${this.triggeredEvent
66
77
  ? html`<div class="fee-triggered-event">
67
78
  ${this.triggeredEvent}
@@ -49,6 +49,40 @@ const floorPlanSelectorStyles = css`
49
49
  color: white;
50
50
  }
51
51
 
52
+ .floor-plan-badge.skeleton {
53
+ cursor: default;
54
+ width: 56px;
55
+ height: 18px;
56
+ padding: 0;
57
+ border: 1px solid #eaeaea;
58
+ }
59
+
60
+ .unit-card-skeleton {
61
+ display: flex;
62
+ min-width: 18rem;
63
+ width: 100%;
64
+ height: 4.75rem;
65
+ border-radius: 4px;
66
+ border: 2px solid transparent;
67
+ background-color: #f8f9fa;
68
+ box-sizing: border-box;
69
+ }
70
+
71
+ .shimmer {
72
+ background: linear-gradient(90deg, #eaeaea 25%, #f5f5f5 50%, #eaeaea 75%);
73
+ background-size: 400px 100%;
74
+ animation: shimmer 1.4s ease-in-out infinite;
75
+ }
76
+
77
+ @keyframes shimmer {
78
+ 0% {
79
+ background-position: -200px 0;
80
+ }
81
+ 100% {
82
+ background-position: 200px 0;
83
+ }
84
+ }
85
+
52
86
  .advanced-section {
53
87
  max-height: 0;
54
88
  overflow: hidden;
@@ -7,7 +7,9 @@ import floorPlanSelectorStyles from "./floor-plan-selector-styles";
7
7
  import { TODAY } from "../../../../globals";
8
8
 
9
9
  import "../floorplan-image-card/floorplan-image-card";
10
- import "../../../loaders/mega-loader";
10
+
11
+ const SKELETON_BADGE_COUNT = 4;
12
+ const SKELETON_UNIT_COUNT = 3;
11
13
 
12
14
  @customElement("floor-plan-selector")
13
15
  export class FloorPlanSelector extends LitElement {
@@ -28,6 +30,9 @@ export class FloorPlanSelector extends LitElement {
28
30
  @property({ type: Boolean })
29
31
  isLoading = false;
30
32
 
33
+ @property({ type: Boolean })
34
+ isLoadingLayouts = false;
35
+
31
36
  @property()
32
37
  onSelectLayout: ((layoutIds: number[]) => void) | null = null;
33
38
 
@@ -141,8 +146,11 @@ export class FloorPlanSelector extends LitElement {
141
146
  if (this.isLoading) {
142
147
  return html`
143
148
  <div class="unit-selection">
144
- <div class="loading-container">
145
- <mega-loader size="32"></mega-loader>
149
+ <div class="image-carousel">
150
+ ${Array.from(
151
+ { length: SKELETON_UNIT_COUNT },
152
+ () => html`<div class="unit-card-skeleton shimmer"></div>`
153
+ )}
146
154
  </div>
147
155
  </div>
148
156
  `;
@@ -151,7 +159,7 @@ export class FloorPlanSelector extends LitElement {
151
159
  return html`
152
160
  <div class="unit-selection">
153
161
  <div class="image-carousel">
154
- ${!this.isLoading && this.units?.length === 0
162
+ ${this.units?.length === 0
155
163
  ? html`
156
164
  <div class="no-floorplans-container">
157
165
  <p>No floorplans found</p>
@@ -173,6 +181,17 @@ export class FloorPlanSelector extends LitElement {
173
181
  };
174
182
 
175
183
  renderBadges = (): TemplateResult => {
184
+ if (this.isLoadingLayouts) {
185
+ return html`
186
+ <div class="floor-plan-selector-badges">
187
+ ${Array.from(
188
+ { length: SKELETON_BADGE_COUNT },
189
+ () => html`<div class="floor-plan-badge skeleton shimmer"></div>`
190
+ )}
191
+ </div>
192
+ `;
193
+ }
194
+
176
195
  return html`
177
196
  <div class="floor-plan-selector-badges">
178
197
  ${this.displayOptions.map(
@@ -268,12 +268,6 @@ export const feeCalculatorStyles = css`
268
268
  background-color: var(--primary-color, #ffffff);
269
269
  }
270
270
 
271
- .recalculating-loader {
272
- display: flex;
273
- align-items: center;
274
- justify-content: center;
275
- }
276
-
277
271
  @media (max-width: 767px) {
278
272
  .fee-calculator-container {
279
273
  width: 100vw;
@@ -68,10 +68,10 @@ export class FeeCalculator extends LitElement {
68
68
  onClickTextUsOption: ((e: MouseEvent) => void) | null = null;
69
69
 
70
70
  @state()
71
- private isFirstCalculation = true;
71
+ private isCalculatingQuote = false;
72
72
 
73
73
  @state()
74
- private isCalculatingQuote = false;
74
+ private isLoadingLayouts = true;
75
75
 
76
76
  @state()
77
77
  private isExporting = false;
@@ -212,7 +212,6 @@ export class FeeCalculator extends LitElement {
212
212
  } finally {
213
213
  if (!signal.aborted) {
214
214
  this.isCalculatingQuote = false;
215
- this.isFirstCalculation = false;
216
215
  }
217
216
  }
218
217
  }
@@ -226,26 +225,38 @@ export class FeeCalculator extends LitElement {
226
225
  this.style.setProperty("--primary-color", this.primaryColor);
227
226
  this.style.setProperty("--background-color", this.backgroundColor);
228
227
 
229
- await this.setupCalculator();
230
- await this.fetchUnits();
228
+ await Promise.allSettled([this.setupCalculator(), this.fetchUnits()]);
231
229
  };
232
230
 
233
231
  setupCalculator = async (): Promise<void> => {
234
- if (!this.buildingSlug || !this.orgSlug) return;
235
-
236
- const [buildingWebchatView, buildingFeeResponse] = await Promise.all([
237
- fetchBuildingWebchatView(this.orgSlug, this.buildingSlug),
238
- fetchBuildingFeesV2(this.buildingSlug),
239
- ]);
232
+ if (!this.buildingSlug || !this.orgSlug) {
233
+ this.isLoadingLayouts = false;
234
+ return;
235
+ }
240
236
 
241
- if (!buildingWebchatView || !buildingFeeResponse) return;
237
+ // Resolve independently /marketable-fees can be slow and shouldn't gate the layout selector.
238
+ const layoutsPromise = fetchBuildingWebchatView(
239
+ this.orgSlug,
240
+ this.buildingSlug
241
+ )
242
+ .then((view) => {
243
+ if (view) this.buildingWebchatView = view;
244
+ })
245
+ .finally(() => {
246
+ this.isLoadingLayouts = false;
247
+ });
242
248
 
243
- this.buildingWebchatView = buildingWebchatView;
244
- this.groupedFees = this.groupFees(buildingFeeResponse.fees);
245
- this.rentableItems = buildingFeeResponse.rentableItems;
249
+ const feesPromise = fetchBuildingFeesV2(this.buildingSlug).then(
250
+ (response) => {
251
+ if (!response) return;
252
+ this.groupedFees = this.groupFees(response.fees);
253
+ this.rentableItems = response.rentableItems;
254
+ // TODO(Leo): Re-enable
255
+ // this.incentives = response.buildingIncentives;
256
+ }
257
+ );
246
258
 
247
- // TODO(Leo): Re-enable
248
- // this.incentives = buildingFeeResponse.buildingIncentives;
259
+ await Promise.allSettled([layoutsPromise, feesPromise]);
249
260
  };
250
261
 
251
262
  updated(changedProperties: Map<string, unknown>): void {
@@ -294,7 +305,6 @@ export class FeeCalculator extends LitElement {
294
305
 
295
306
  handleUnitSelect = (unit: Unit): void => {
296
307
  const isInitialSelection = !this.selectedUnit;
297
- this.isFirstCalculation = true; // Reset flag to show skeleton loader
298
308
  this.selectedUnit = unit;
299
309
 
300
310
  if (isInitialSelection) {
@@ -451,9 +461,6 @@ export class FeeCalculator extends LitElement {
451
461
  };
452
462
 
453
463
  render(): TemplateResult {
454
- const showLoader =
455
- this.isCalculatingQuote && !this.isExporting && !this.isFirstCalculation;
456
-
457
464
  const exportDisabled =
458
465
  this.isExporting ||
459
466
  this.isCalculatingQuote ||
@@ -471,12 +478,6 @@ export class FeeCalculator extends LitElement {
471
478
  <h1>Estimated Cost Calculator</h1>
472
479
 
473
480
  <div class="calculator-header-right">
474
- ${showLoader
475
- ? html`<div class="recalculating-loader">
476
- <mega-loader .size=${16} .spinSpeed=${0.54}></mega-loader>
477
- </div>`
478
- : ""}
479
-
480
481
  <button
481
482
  class="share-button"
482
483
  @click=${this.handleShare}
@@ -498,7 +499,8 @@ export class FeeCalculator extends LitElement {
498
499
  "noopener,noreferrer"
499
500
  );
500
501
  }}
501
- ?disabled=${!this.quote?.applicationLink}
502
+ ?disabled=${this.isCalculatingQuote ||
503
+ !this.quote?.applicationLink}
502
504
  >
503
505
  Apply
504
506
  </button>
@@ -531,7 +533,7 @@ export class FeeCalculator extends LitElement {
531
533
 
532
534
  <fee-calculator-layout
533
535
  .buildingSlug=${this.buildingSlug}
534
- .showSkeletonLoader=${this.isFirstCalculation}
536
+ .showSkeletonLoader=${this.isCalculatingQuote}
535
537
  .selectedUnit=${this.selectedUnit}
536
538
  .groupedFees=${this.groupedFees}
537
539
  .rentableItems=${this.rentableItems}
@@ -540,6 +542,7 @@ export class FeeCalculator extends LitElement {
540
542
  .selectedLayoutIds=${this.selectedLayoutIds}
541
543
  .units=${this.units}
542
544
  .isLoadingUnits=${this.isLoadingUnits}
545
+ .isLoadingLayouts=${this.isLoadingLayouts}
543
546
  .onSelectLayout=${this.handleSelectLayout}
544
547
  .onUnitSelect=${this.handleUnitSelect}
545
548
  .onMoveInDateChange=${this.handleMoveInDateChange}