@getspot/spot-widget 4.5.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +419 -412
- package/dist/index.umd.js +4 -4
- package/dist/ui.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,x){typeof exports=="object"&&typeof module<"u"?x(exports):typeof define=="function"&&define.amd?define(["exports"],x):(E=typeof globalThis<"u"?globalThis:E||self,x(E.SpotWidget={}))})(this,function(E){"use strict";async function x(c,t,r,s){try{const a=s?{...r,state:s}:r,n=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(a)}),o=await n.json();if(!n.ok){const e=new Error((o==null?void 0:o.message)||"Failed to fetch quote");throw e.status=n.status,e.responseBody=o,e}return o}catch(a){throw a instanceof Error?a:new Error("Unknown error occurred while fetching quote")}}async function z(c,t,r){try{const s=c.replace("/quote","/quote/batch"),a=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(r)}),n=await a.json();if(!a.ok){const o=new Error((n==null?void 0:n.message)||"Failed to fetch batch quote");throw o.status=a.status,o.responseBody=n,o}return n}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching batch quote")}}async function S(c,t,r,s){var a;try{const n={...r,...s?{state:s}:{},isPartialPayment:r.isPartialPayment||!1,roundTo:r.roundTo||void 0,items:r.items.map((m,f)=>({...m,cartItemId:m.cartItemId||`item-${f+1}`}))},o=await z(c,t,n);if(o.status!=="QUOTES_AVAILABLE"&&o.status!=="QUOTE_AVAILABLE")return{status:"NO_MATCHING_QUOTE"};const e=o.quotes.map(m=>{const f=r.items.find((h,g)=>(h.cartItemId||`item-${g+1}`)===m.cartItemId);return f?f.participantDescription?`${f.productName} - ${f.participantDescription}`:f.productName:`Item ${m.id}`}),l=Math.round((o.totalSpotPrice||o.spotPrice||0)*100)/100;return{status:"QUOTE_AVAILABLE",data:{id:o.quotes?o.quotes.map(m=>m.id).join(","):((a=o.data)==null?void 0:a.id)||"",spotPrice:l,currencyCode:o.currencyCode||"",communication:{...o.communication,yesOptionText:o.communication.yesOptionText.replace(String(o.totalSpotPrice),String(l))},payoutSchedule:o.payoutSchedule.map(m=>({...m,amount:m.amount!==void 0?m.amount:0})),coveredItems:e,originalQuotes:o.quotes||(o.data?[o.data]:[])},spotPrice:l,coveredItems:e}}catch(n){throw n instanceof Error?n:new Error("Unknown error occurred while fetching multiple quotes")}}const q="non-us-resident",L="Unfortunately, we are currently unable to offer coverage or process claims for non-US residents.",N=[{value:"AL",label:"Alabama"},{value:"AK",label:"Alaska"},{value:"AS",label:"American Samoa"},{value:"AZ",label:"Arizona"},{value:"AR",label:"Arkansas"},{value:"CA",label:"California"},{value:"CO",label:"Colorado"},{value:"CT",label:"Connecticut"},{value:"DE",label:"Delaware"},{value:"DC",label:"District of Columbia"},{value:"FL",label:"Florida"},{value:"GA",label:"Georgia"},{value:"GU",label:"Guam"},{value:"HI",label:"Hawaii"},{value:"ID",label:"Idaho"},{value:"IL",label:"Illinois"},{value:"IN",label:"Indiana"},{value:"IA",label:"Iowa"},{value:"KS",label:"Kansas"},{value:"KY",label:"Kentucky"},{value:"LA",label:"Louisiana"},{value:"ME",label:"Maine"},{value:"MD",label:"Maryland"},{value:"MA",label:"Massachusetts"},{value:"MI",label:"Michigan"},{value:"MN",label:"Minnesota"},{value:"MS",label:"Mississippi"},{value:"MO",label:"Missouri"},{value:"MT",label:"Montana"},{value:"NE",label:"Nebraska"},{value:"NV",label:"Nevada"},{value:"NH",label:"New Hampshire"},{value:"NJ",label:"New Jersey"},{value:"NM",label:"New Mexico"},{value:"NY",label:"New York"},{value:"NC",label:"North Carolina"},{value:"ND",label:"North Dakota"},{value:"MP",label:"Northern Mariana Islands"},{value:"OH",label:"Ohio"},{value:"OK",label:"Oklahoma"},{value:"OR",label:"Oregon"},{value:"PA",label:"Pennsylvania"},{value:"PR",label:"Puerto Rico"},{value:"RI",label:"Rhode Island"},{value:"SC",label:"South Carolina"},{value:"SD",label:"South Dakota"},{value:"TN",label:"Tennessee"},{value:"TX",label:"Texas"},{value:"VI",label:"U.S. Virgin Islands"},{value:"UT",label:"Utah"},{value:"VT",label:"Vermont"},{value:"VA",label:"Virginia"},{value:"WA",label:"Washington"},{value:"WV",label:"West Virginia"},{value:"WI",label:"Wisconsin"},{value:"WY",label:"Wyoming"}],P=new Set(N.map(c=>c.value)),D=["USD","CAD","AUD","NZD","EUR","MXN","AED","GBP","MAD","SAR","BGN","BRL","CHF","DKK","INR","JPY","MYR","NOK","PLN","SEK","SGD","THB","ZAR"],$={sandbox:"https://api.sandbox.getspot.com/v1/quote",production:"https://api.getspot.com/v1/quote",local:"http://localhost:3999/api/v1/quote"};function T(c){const{apiConfig:t={},quoteRequestData:r,callbacks:s={},location:a,theme:n}=c,{environment:o="sandbox",partnerId:e,customEndpoint:l}=t;if(!e||typeof e!="string")throw new Error("Invalid or missing partnerId in apiConfig");if(!(l||$[o]))throw new Error(`Invalid environment in apiConfig: ${o}`);if(!r||typeof r!="object"&&!Array.isArray(r))throw new Error("quoteRequestData must be a non-null object or array");const f=["startDate","endDate","currencyCode","eventType","productType","productDuration","productPrice","productId","cartId","productName"];function h(p,u=null){const d=u!==null?`quoteRequestData[${u}]`:"quoteRequestData";f.forEach(v=>{if(!Object.prototype.hasOwnProperty.call(p,v)||p[v]===void 0||p[v]===null)throw new Error(`Missing required ${d} field: '${v}'`)});const b=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!b.test(p.startDate))throw new Error(`${d}.startDate must be a valid ISO8601 string`);if(!b.test(p.endDate))throw new Error(`${d}.endDate must be a valid ISO8601 string`);if(typeof p.currencyCode!="string")throw new Error(`${d}.currencyCode must be a string`);if(!D.includes(p.currencyCode))throw new Error(`Invalid ${d}.currencyCode: ${p.currencyCode}`);if(typeof p.eventType!="string")throw new Error(`${d}.eventType must be a string`);if(typeof p.productType!="string")throw new Error(`${d}.productType must be a string`);const _=["Pass","Trip","Registration"];if(!_.includes(p.productType))throw new Error(`${d}.productType must be one of ${_.join(", ")}`);if(typeof p.productDuration!="string")throw new Error(`${d}.productDuration must be a string`);const C=["Daily","Seasonal","Trip","Event"];if(!C.includes(p.productDuration))throw new Error(`${d}.productDuration must be one of ${C.join(", ")}`);if(typeof p.productPrice!="number"||isNaN(p.productPrice))throw new Error(`${d}.productPrice must be a valid number`);if(typeof p.productId!="string")throw new Error(`${d}.productId must be a string`);if(typeof p.cartId!="string")throw new Error(`${d}.cartId must be a string`);if(typeof p.productName!="string")throw new Error(`${d}.productName must be a string`)}if("items"in r){const p=r,{cartId:u,cartName:d,currencyCode:b,items:_}=p;if(!u||typeof u!="string")throw new Error("quoteRequestData.cartId must be a string");if(!d||typeof d!="string")throw new Error("quoteRequestData.cartName must be a string");if(!b||typeof b!="string")throw new Error("quoteRequestData.currencyCode must be a string");if(!D.includes(b))throw new Error(`Invalid quoteRequestData.currencyCode: ${b}`);if(!Array.isArray(_)||_.length===0)throw new Error("quoteRequestData.items must be a non-empty array");const C=["startDate","endDate","eventType","productType","productDuration","productPrice","productId","productName"];_.forEach((v,R)=>{if(!v||typeof v!="object")throw new Error(`quoteRequestData.items[${R}] must be a non-null object`);const y=`quoteRequestData.items[${R}]`;C.forEach(k=>{if(!Object.prototype.hasOwnProperty.call(v,k)||v[k]===void 0||v[k]===null)throw new Error(`Missing required ${y} field: '${k}'`)});const A=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!A.test(v.startDate))throw new Error(`${y}.startDate must be a valid ISO8601 string`);if(!A.test(v.endDate))throw new Error(`${y}.endDate must be a valid ISO8601 string`);if(typeof v.eventType!="string")throw new Error(`${y}.eventType must be a string`);if(typeof v.productType!="string")throw new Error(`${y}.productType must be a string`);const H=["Pass","Trip","Registration"];if(!H.includes(v.productType))throw new Error(`${y}.productType must be one of ${H.join(", ")}`);if(typeof v.productDuration!="string")throw new Error(`${y}.productDuration must be a string`);const O=["Daily","Seasonal","Trip","Event"];if(!O.includes(v.productDuration))throw new Error(`${y}.productDuration must be one of ${O.join(", ")}`);if(typeof v.productPrice!="number"||isNaN(v.productPrice))throw new Error(`${y}.productPrice must be a valid number`);if(typeof v.productId!="string")throw new Error(`${y}.productId must be a string`);if(typeof v.productName!="string")throw new Error(`${y}.productName must be a string`)})}else if(Array.isArray(r)){if(r.length===0)throw new Error("quoteRequestData array cannot be empty");r.forEach((p,u)=>{if(!p||typeof p!="object")throw new Error(`quoteRequestData[${u}] must be a non-null object`);h(p,u)})}else h(r);if(["onOptIn","onOptOut","onQuoteRetrieved","onError","noMatchingQuote"].forEach(p=>{const u=s[p];if(u&&typeof u!="function")throw new Error(`Callback '${p}' must be a function.`)}),typeof a=="string"&&!document.querySelector(a))throw new Error(`Invalid location selector: '${a}'`);if(n&&typeof n!="object")throw new Error("Theme must be an object with CSS variables, do not include the '--' prefix");if(c.state&&!P.has(c.state))throw new Error(`Invalid state: '${c.state}'. Must be a 2-character US state or territory code.`)}var w=(c=>(c.YES="yes",c.NO="no",c.UNSELECTED="unselected",c))(w||{});function i(c,{text:t,className:r,parent:s,innerHTML:a,href:n,target:o}={}){const e=document.createElement(c);return r&&(e.className=r),t!=null&&(e.textContent=t),a!=null&&(e.innerHTML=a),n&&"href"in e&&(e.href=n),o&&"target"in e&&(e.target=o),s&&s.appendChild(e),e}function V(c,{name:t,description:r}){i("div",{className:"spot-header__title",text:t,parent:c}),i("div",{className:"spot-header__description",text:r,parent:c})}function Q(c,t=[]){const r=i("ul",{className:"spot-benefits__list",parent:c});t.forEach(s=>{const a=i("li",{parent:r});a.innerHTML=`
|
|
2
2
|
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" class="spot-bullets__checkmark">
|
|
3
3
|
<path d="M11.6666 3.5L5.24998 9.91667L2.33331 7"
|
|
4
4
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</svg>`,
|
|
5
|
+
</svg>`,i("span",{text:s,parent:a})})}function U(c,t=[]){if(!t||t.length===0)return;const r=i("div",{className:"spot-qualifying-reasons__container",parent:c}),s=[...t].sort((e,l)=>e.rank-l.rank),a=i("div",{className:"spot-qualifying-reasons__grid",parent:r}),n={"Accident & Illness":"cross.svg","Family Emergencies":"users.svg",Layoffs:"building.svg","Jury Duty":"scale.svg","Work Travel Conflict":"briefcase.svg","Severe Weather":"umbrella.svg","Travel Interruption":"plane.svg","Military Duty":"medal.svg"};let o;try{const e=document.currentScript;if(e!=null&&e.src){const l=new URL(e.src);o=l.origin+l.pathname.replace(/\/[^/]*$/,"/")}else o=window.location.origin+window.location.pathname.replace(/\/[^/]*$/,"/");o+="assets/"}catch{o="./assets/"}s.forEach(e=>{var h,g,p;const l=i("div",{className:"spot-qualifying-reasons__item",parent:a}),m=i("div",{className:"spot-qualifying-reasons__icon-wrapper",parent:l}),f=n[((h=e.benefitType)==null?void 0:h.name)||""]||n[e.name||""];if(f){const u=i("img",{parent:m});u.src=o+f,u.alt=((g=e.benefitType)==null?void 0:g.name)||e.name||"",u.className="spot-qualifying-reasons__icon"}i("span",{className:"spot-qualifying-reasons__label",text:((p=e.benefitType)==null?void 0:p.name)||e.name||"",parent:l})})}function Z(c,t=[],r){if(t.length===0||!r||r<=1)return;const s=new Map;t.forEach(u=>{s.set(u,(s.get(u)||0)+1)});const n=Array.from(s.entries()).map(([u,d])=>({item:u,count:d,displayText:d>1?`${d} x ${u}`:u})).sort((u,d)=>{const b=u.item.charAt(0),_=d.item.charAt(0),C=/[a-zA-Z]/.test(b),v=/[a-zA-Z]/.test(_);return!C&&v?-1:C&&!v?1:u.item.localeCompare(d.item,void 0,{sensitivity:"base"})}),o=i("div",{className:"spot-covered-items__container",parent:c}),e=i("div",{className:"spot-covered-items__header",parent:o}),l=i("button",{className:"spot-covered-items__toggle",parent:e});l.type="button",i("span",{className:"spot-covered-items__title",text:`Items Covered in Your Cart (${t.length})`,parent:l});const m=i("div",{className:"spot-covered-items__right-section",parent:l});i("span",{className:"spot-covered-items__view-all",text:"View All",parent:m});const f=i("span",{className:"spot-covered-items__arrow",innerHTML:"▼",parent:m}),h=i("div",{className:"spot-covered-items__content",parent:o}),g=i("ul",{className:"spot-covered-items__list",parent:h});n.forEach(({displayText:u})=>{const d=i("li",{parent:g});i("span",{text:u,parent:d})});let p=!1;h.style.display="none",l.addEventListener("click",u=>{u.stopPropagation(),u.preventDefault(),p=!p,h.style.display=p?"block":"none",f.innerHTML=p?"▲":"▼",l.setAttribute("aria-expanded",p.toString())}),l.setAttribute("aria-expanded","false"),l.setAttribute("aria-controls","covered-items-list"),h.setAttribute("id","covered-items-list")}const B={USD:"$",CAD:"CAD $",AUD:"AUD $",NZD:"NZD $",MXN:"MXN $",EUR:"EUR €",GBP:"GBP £",AED:"AED ",MAD:"MAD ",SAR:"SAR ",BGN:"BGN лв",BRL:"BRL R$",CHF:"CHF ",DKK:"DKK kr",INR:"INR ₹",JPY:"JPY ¥",MYR:"MYR RM",NOK:"NOK kr",PLN:"PLN zł",SEK:"SEK kr",SGD:"SGD $",THB:"THB ฿",ZAR:"ZAR R"};let j=0;function F(c,t=[],r="USD"){const s=B[r]??`${r} `,a=`refund-schedule-content-${++j}`,n=i("div",{className:"spot-covered-items__container spot-refund-schedule",parent:c}),o=i("div",{className:"spot-covered-items__header",parent:n}),e=i("button",{className:"spot-covered-items__toggle",parent:o});i("span",{className:"spot-covered-items__title",text:"Refund Schedule",parent:e});const l=i("div",{className:"spot-covered-items__right-section",parent:e}),m=i("span",{className:"spot-covered-items__view-all",text:"View",parent:l}),f=i("span",{className:"spot-covered-items__arrow",innerHTML:"▼",parent:l}),h=i("div",{className:"spot-covered-items__content",parent:n}),g=i("ul",{className:"spot-covered-items__list",parent:h});t.forEach(({text:u,percent:d,amount:b})=>{const _=i("li",{parent:g});i("span",{text:u,parent:_});const C=d==="Not eligible for refund"?"Not eligible for a refund":`${d} (${s}${b.toFixed(2)})`;i("span",{text:C,parent:_})});let p=!1;h.style.display="none",e.addEventListener("click",u=>{u.stopPropagation(),p=!p,h.style.display=p?"block":"none",m.textContent=p?"Close":"View",f.innerHTML=p?"▲":"▼",e.setAttribute("aria-expanded",p.toString())}),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",a),h.setAttribute("id",a)}function W(c,t){const r=i("div",{className:"spot-state-dropdown__wrapper",parent:c});i("label",{className:"spot-state-dropdown__label",text:"State of Residence",parent:r});const s=i("select",{className:"spot-state-dropdown__select",parent:r});s.setAttribute("aria-label","State of Residence");const a=i("option",{text:"Select a state...",parent:s});a.value="",a.selected=!t,N.forEach(({value:o,label:e})=>{const l=i("option",{text:e,parent:s});l.value=o,o===t&&(l.selected=!0)});const n=i("option",{text:"Not a US Resident",parent:s});return n.value=q,t===q&&(n.selected=!0),i("div",{className:"spot-state-dropdown__error",text:L,parent:r}),s}function Y(c,t,r,s=!1){const a=i("div",{className:`spot-selection__options${s?" spot-selection__options--disabled":""}`,parent:c}),n=i("label",{className:`spot-selection__option ${t===w.YES?"selected":""}`,parent:a}),o=i("input",{parent:n});o.type="radio",o.name="selection",o.value=w.YES,t===w.YES&&(o.checked=!0),s&&(o.disabled=!0),i("strong",{text:r.yesOptionText,parent:n}),i("span",{className:"spot-selection__recommended-tag",text:"Recommended",parent:n});const e=i("label",{className:`spot-selection__option ${t===w.NO?"selected":""}`,parent:a}),l=i("input",{parent:e});return l.type="radio",l.name="selection",l.value=w.NO,t===w.NO&&(l.checked=!0),s&&(l.disabled=!0),i("span",{text:r.noOptionText,parent:e}),a}function I(c,t){var s;const r=(s=t.communication)==null?void 0:s.paymentTerms;if(r){const a=i("div",{className:"spot-payment-terms",parent:c});return i("div",{className:"spot-payment-terms__header",text:"PAYMENT TERMS",parent:a}),i("div",{className:"spot-payment-terms__body",text:r||"",parent:a}),a}}function G(c,t,r="top-right"){if(r==="top-right"){const e=i("div",{className:"spot-logo__top-right",parent:c});e.innerHTML=`
|
|
6
6
|
<svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7
7
|
<path d="M11.98 19V9.2H14.878C16.754 9.2 18.154 10.474 18.154 12.364C18.154 14.254 16.754 15.528 14.878 15.528H13.828V19H11.98ZM13.828 13.806H14.878C15.746 13.806 16.236 13.176 16.236 12.364C16.236 11.552 15.746 10.936 14.878 10.936H13.828V13.806ZM22.0258 19.196C20.0938 19.196 18.2178 17.894 18.2178 15.43C18.2178 12.952 20.0938 11.65 22.0258 11.65C23.9438 11.65 25.8198 12.952 25.8198 15.43C25.8198 17.894 23.9438 19.196 22.0258 19.196ZM20.0518 15.43C20.0518 16.774 20.8778 17.544 22.0258 17.544C23.1598 17.544 23.9858 16.774 23.9858 15.43C23.9858 14.072 23.1598 13.302 22.0258 13.302C20.8778 13.302 20.0518 14.072 20.0518 15.43ZM27.7226 19L25.2446 11.846H27.0926L28.7026 16.732L29.9486 11.846H31.7266L33.0146 16.746L34.5966 11.846H36.4026L33.9946 19H32.1186L30.8446 14.198L29.6266 19H27.7226ZM39.531 19.196C37.683 19.196 35.849 17.894 35.849 15.43C35.849 12.952 37.641 11.65 39.461 11.65C41.253 11.65 43.073 12.924 43.073 15.416V15.962H37.599C37.795 17.096 38.607 17.614 39.531 17.614C40.161 17.614 40.609 17.418 40.889 17.054H42.933C42.317 18.496 40.889 19.196 39.531 19.196ZM37.627 14.702H41.211C41.043 13.526 40.217 13.092 39.461 13.092C38.607 13.092 37.851 13.624 37.627 14.702ZM44.0159 19V11.846H45.7799V12.798C46.3539 12.028 47.2219 11.65 48.0759 11.65V13.47C46.5919 13.19 45.7799 13.834 45.7799 15.024V19H44.0159ZM51.967 19.196C50.119 19.196 48.285 17.894 48.285 15.43C48.285 12.952 50.077 11.65 51.897 11.65C53.689 11.65 55.509 12.924 55.509 15.416V15.962H50.035C50.231 17.096 51.043 17.614 51.967 17.614C52.597 17.614 53.045 17.418 53.325 17.054H55.369C54.753 18.496 53.325 19.196 51.967 19.196ZM50.063 14.702H53.647C53.479 13.526 52.653 13.092 51.897 13.092C51.043 13.092 50.287 13.624 50.063 14.702ZM59.4762 19.196C57.7542 19.196 56.1022 17.894 56.1022 15.43C56.1022 12.952 57.7542 11.65 59.4762 11.65C60.4842 11.65 61.3102 12.014 61.8562 12.714V9.2H63.6202V19H61.8562V18.146C61.3102 18.832 60.4842 19.196 59.4762 19.196ZM57.9362 15.43C57.9362 16.774 58.7622 17.544 59.8962 17.544C61.0442 17.544 61.8562 16.774 61.8562 15.43C61.8562 14.072 61.0442 13.302 59.8962 13.302C58.7622 13.302 57.9362 14.072 57.9362 15.43ZM72.526 19.196C71.518 19.196 70.692 18.832 70.146 18.146V19H68.382V9.2H70.146V12.714C70.692 12.014 71.518 11.65 72.526 11.65C74.248 11.65 75.9 12.952 75.9 15.43C75.9 17.894 74.248 19.196 72.526 19.196ZM70.146 15.43C70.146 16.774 70.958 17.544 72.106 17.544C73.254 17.544 74.066 16.774 74.066 15.43C74.066 14.072 73.254 13.302 72.106 13.302C70.958 13.302 70.146 14.072 70.146 15.43ZM76.9259 21.66L78.2699 18.342L75.4559 11.846H77.3879L79.2079 16.158L80.9299 11.846H82.7639L78.7599 21.66H76.9259Z" fill="#111820"/>
|
|
8
8
|
<g clip-path="url(#clip0_295_2094)">
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<rect width="45.405" height="14.8867" fill="white" transform="translate(87 8)"/>
|
|
14
14
|
</clipPath>
|
|
15
15
|
</defs>
|
|
16
|
-
</svg>`}const s=
|
|
16
|
+
</svg>`}const s=i("div",{className:"spot-footer__container",parent:c}),a=i("div",{className:"spot-footer__terms",parent:s}),n=`<a href="${t.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`,o=t.communication.legalDisclaimer.replace(/terms (and|&) conditions/gi,n);if(i("span",{innerHTML:o,parent:a}),r==="bottom-right"){const e=i("p",{className:"spot-footer__powered-by",parent:s});e.innerHTML=`
|
|
17
17
|
<svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
18
|
<rect width="145" height="28"/>
|
|
19
19
|
<rect x="-655" y="-270" width="819" height="325" rx="10"/>
|
|
@@ -28,4 +28,4 @@
|
|
|
28
28
|
<rect width="45.405" height="14.8867" fill="white" transform="translate(87 8)"/>
|
|
29
29
|
</clipPath>
|
|
30
30
|
</defs>
|
|
31
|
-
</svg>`}return s}const G=":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-logo-background-color: #f3fd00;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:5%;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:9999px;overflow:hidden;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-logo-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";function K(d){const t=document.createElement("style");t.textContent=d,document.head.appendChild(t)}K(G);const M={sandbox:"https://api.sandbox.getspot.com/api/v1/quote",production:"https://api.getspot.com/api/v1/quote",local:"http://localhost:3999/api/v1/quote"};class X{constructor(t={}){this._destroyed=!1,this.options={location:"body",showTable:!0,logoPosition:"top-right",apiConfig:{environment:"production",partnerId:""},quoteRequestData:{},callbacks:{},useMockData:!1,...t,selection:t.selection??b.UNSELECTED},this._onResize=this._updateLayout.bind(this),this.root=typeof this.options.location=="string"?document.querySelector(this.options.location):this.options.location,this.currentSelection=this.options.selection,this._init()}async _init(){var t,r,s,i,n;try{N(this.options),this.currentState=this.options.state;let e;if(this.options.useMockData&&this.options.mockData)e=this.options.mockData;else{const{environment:o,partnerId:p}=this.options.apiConfig,f=this.options.apiConfig.customEndpoint||M[o];e="items"in this.options.quoteRequestData?await D(f,p,this.options.quoteRequestData,this._validState()):await k(f,p,this.options.quoteRequestData,this._validState())}if(this._destroyed)return;if(e.status!=="QUOTE_AVAILABLE"){e.status==="NO_MATCHING_QUOTE"&&((t=this.options.callbacks)!=null&&t.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:this.options.quoteRequestData});return}if(this.quote=e.data,!this.quote)throw new Error("No quote data in response");if(this._renderWidget(),this.options.selection===b.YES&&((r=this.options.callbacks)!=null&&r.onOptIn)){const o={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;o.batchQuoteDetails=this.quote.originalQuotes.map(m=>{var v;const f=(v=p.items)==null?void 0:v.find(h=>(h.cartItemId||`item-${p.items.indexOf(h)+1}`)===m.cartItemId);return{quoteId:m.id,productPrice:(f==null?void 0:f.productPrice)||m.spotPrice,cartItemId:(f==null?void 0:f.cartItemId)||""}})}this.options.callbacks.onOptIn(o)}if((s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const o=this.options.callbacks.onQuoteRetrieved(this.quote);o&&this._applyQuoteUpdates(o)}}catch(e){if(this._destroyed)return;if((i=this.options.callbacks)!=null&&i.onError){const o=e;(n=this.options.callbacks)==null||n.onError({message:o.message,status:o.status,responseBody:o.responseBody})}}}_renderWidget(){if(!this.quote)return;this.container=document.createElement("div"),this.container.className="spot-refund-guarantee",this.root.appendChild(this.container),Object.entries(this.options.theme||{}).forEach(([e,o])=>{const p=`--${e}`;this.container.style.setProperty(p,o)}),V(this.container,this.quote.communication);const t=document.createElement("div");if(t.className="spot-content__wrapper",this.container.appendChild(t),this.quote.qualifyingReasons?Q(t,this.quote.qualifyingReasons):U(t,this.quote.communication.bulletPoints),this.quote.coveredItems){const e=this._getTotalItemsInRequest();Z(t,this.quote.coveredItems,e)}this.options.showTable&&!this.quote.qualifyingReasons&&j(t,this.quote.payoutSchedule,this.quote.currencyCode);const r=a("div",{className:"spot-selection__wrapper",parent:t});this._isPassOrTrip()&&!this.options.state&&(this._stateSelectEl=W(r,this.currentState),this._setNonUsResidentError(this.currentState===E));const i=!this._isQuotingAvailable(),n=F(r,this.currentSelection,this.quote.communication,i);this.paymentTermsEl=a("div",{className:"spot-payment-terms__wrapper",parent:t}),this.currentSelection===b.YES&&I(this.paymentTermsEl,this.quote),Y(this.container,this.quote,this.options.logoPosition),window.addEventListener("resize",this._onResize),this._setupResizeObserver(),this._updateLayout(),this._setupOptionListeners(n),this._setupStateDropdownListener()}_updateLayout(){if(!this.container||!this.quote)return;const t=this.container.querySelector(".spot-content__wrapper"),r=this.options.showTable&&!this.quote.qualifyingReasons;if(!t||!r){t==null||t.classList.remove("desktop-layout");return}const s=this._shouldUseDesktopLayout(t);t.classList.toggle("desktop-layout",s)}_shouldUseDesktopLayout(t){const r=this.container.offsetWidth-40,s=325,i=16;if(r>=900)return!0;if(r>=650){const n=t.classList.contains("desktop-layout");t.classList.remove("desktop-layout"),t.offsetHeight;const e=t.querySelector(".spot-benefits__list, .spot-qualifying-reasons__container");if(!e)return n&&t.classList.add("desktop-layout"),n;const p=Math.min(e.scrollWidth,400)+s+i;return n&&t.classList.add("desktop-layout"),r>=p}return!1}_setupResizeObserver(){!this.container||!window.ResizeObserver||(this._resizeObserver=new ResizeObserver(()=>{this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=window.setTimeout(()=>{this._updateLayout()},100)}),this._resizeObserver.observe(this.container))}_getTotalItemsInRequest(){return"items"in this.options.quoteRequestData?this.options.quoteRequestData.items.length:1}_applyQuoteUpdates(t){!this.quote||!this.container||(t.spotPriceWithFees!==void 0&&(this.quote.communication.yesOptionText=this.quote.communication.yesOptionText.replace(`$${this.quote.spotPrice.toFixed(2)}`,`$${t.spotPriceWithFees.toFixed(2)}`)),this._teardownDom(),this._renderWidget())}_isPassOrTrip(){const t=this.options.quoteRequestData;if(Array.isArray(t))return t.some(s=>s.productType==="Pass"||s.productType==="Trip");if("items"in t)return t.items.some(s=>s.productType==="Pass"||s.productType==="Trip");const r=t;return r.productType==="Pass"||r.productType==="Trip"}_validState(){if(this._isPassOrTrip()&&!(!this.currentState||this.currentState===E))return this.currentState}_isQuotingAvailable(){return!this._isPassOrTrip()||this.options.state?!0:!!this.currentState&&this.currentState!==E}_setRadiosDisabled(t){var i,n,e;const r=(i=this.container)==null?void 0:i.querySelectorAll('input[name="selection"]'),s=(n=this.container)==null?void 0:n.querySelector(".spot-selection__options");r==null||r.forEach(o=>{o.disabled=t}),s==null||s.classList.toggle("spot-selection__options--disabled",t),t&&(r==null||r.forEach(o=>{o.checked=!1}),(e=this.container)==null||e.querySelectorAll(".spot-selection__option").forEach(o=>{o.classList.remove("selected")}),this.currentSelection=b.UNSELECTED,this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""))}_setNonUsResidentError(t){var s;if(!this._stateSelectEl)return;this._stateSelectEl.classList.toggle("spot-state-dropdown__select--error",t);const r=(s=this._stateSelectEl.parentElement)==null?void 0:s.querySelector(".spot-state-dropdown__error");r==null||r.classList.toggle("spot-state-dropdown__error--visible",t)}_setupStateDropdownListener(){this._stateSelectEl&&this._stateSelectEl.addEventListener("change",()=>{this.currentState=this._stateSelectEl.value,this._setRadiosDisabled(!this._isQuotingAvailable()),this._setNonUsResidentError(this.currentState===E)})}_setupOptionListeners(t){const r=t.querySelectorAll('input[type="radio"]'),s=t.querySelectorAll(".spot-selection__option");r.forEach(i=>{i.addEventListener("change",n=>{var p,m,f,v;const e=n.target,o=e.value;if(this.hideSelectionError(),this.currentSelection=o,s.forEach(h=>h.classList.remove("selected")),(p=e.closest(".spot-selection__option"))==null||p.classList.add("selected"),this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""),o===b.YES&&((m=this.quote)!=null&&m.communication.paymentTerms&&I(this.paymentTermsEl,this.quote),(f=this.options.callbacks)!=null&&f.onOptIn)){const h={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var _;const c=(_=l.items)==null?void 0:_.find(w=>(w.cartItemId||`item-${l.items.indexOf(w)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(c==null?void 0:c.productPrice)||u.spotPrice,cartItemId:(c==null?void 0:c.cartItemId)||""}})}this.options.callbacks.onOptIn(h)}if(o===b.NO&&((v=this.options.callbacks)!=null&&v.onOptOut)){const h={status:"QUOTE_DECLINED",quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var _;const c=(_=l.items)==null?void 0:_.find(w=>(w.cartItemId||`item-${l.items.indexOf(w)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(c==null?void 0:c.productPrice)||u.spotPrice,cartItemId:(c==null?void 0:c.cartItemId)||""}})}this.options.callbacks.onOptOut(h)}})})}showSelectionError(){var t;if(!this.errorEl){this.errorEl=document.createElement("div"),this.errorEl.className="spot-selection__error",this.errorEl.textContent="Please make a selection";const r=(t=this.container)==null?void 0:t.querySelector(".spot-selection__options");r&&r.insertAdjacentElement("afterend",this.errorEl)}this.errorEl.style.display="block"}hideSelectionError(){this.errorEl&&(this.errorEl.style.display="none")}validateSelection(){if(!this.container)return!1;const t=!!this.container.querySelector('input[name="selection"]:checked');return t?this.hideSelectionError():this.showSelectionError(),t}async updateQuote(t){var r,s,i,n;if(this._destroyed)return!1;try{const e={...this.options,quoteRequestData:t};N(e);const{environment:o,partnerId:p,customEndpoint:m}=this.options.apiConfig,f=m||M[o],h="items"in e.quoteRequestData?await D(f,p,e.quoteRequestData,this._validState()):await k(f,p,e.quoteRequestData,this._validState());if(this._destroyed)return!1;if(h.status!=="QUOTE_AVAILABLE")return this._teardownDom(),h.status==="NO_MATCHING_QUOTE"&&((r=this.options.callbacks)!=null&&r.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:e.quoteRequestData}),!1;if(this.options.quoteRequestData=e.quoteRequestData,this.quote=h.data,this._teardownDom(),this._renderWidget(),(s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const l=this.options.callbacks.onQuoteRetrieved(this.quote);l&&this._applyQuoteUpdates(l)}return!0}catch(e){if(this._destroyed)return!1;const o=e;return(n=(i=this.options.callbacks)==null?void 0:i.onError)==null||n.call(i,{message:o.message,status:o.status,responseBody:o.responseBody}),!1}}getSelection(){var r,s,i;if(this.currentSelection==null||this.currentSelection==b.UNSELECTED)return null;const t={selection:this.currentSelection,quoteId:(r=this.quote)==null?void 0:r.id,spotPrice:(s=this.quote)==null?void 0:s.spotPrice,status:this.currentSelection===b.YES?"QUOTE_ACCEPTED":"QUOTE_DECLINED",state:this.currentState};if((i=this.quote)!=null&&i.originalQuotes&&this.quote.originalQuotes.length>0){const n=this.options.quoteRequestData;t.batchQuoteDetails=this.quote.originalQuotes.map(e=>{var p;const o=(p=n.items)==null?void 0:p.find(m=>(m.cartItemId||`item-${n.items.indexOf(m)+1}`)===e.cartItemId);return{quoteId:e.id,productPrice:(o==null?void 0:o.productPrice)||e.spotPrice,cartItemId:(o==null?void 0:o.cartItemId)||""}})}return t}destroy(){this._destroyed=!0,this._teardownDom()}_teardownDom(){window.removeEventListener("resize",this._onResize),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this._resizeTimeout&&window.clearTimeout(this._resizeTimeout),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}}C.NON_US_RESIDENT_VALUE=E,C.SelectionEnum=b,C.default=X,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
31
|
+
</svg>`}return s}const K=":root{--spot-font-family: Arial;--spot-padding: 1.25rem;--spot-background-color: #ffffff;--spot-font-color: #000000;--spot-border-radius: .5rem;--spot-border-line-width: .0625rem;--spot-border-color: #e0e0e0;--spot-logo-background-color: #f3fd00;--spot-max-width: 51rem;--spot-margin: 1rem;--spot-title-font-size: 1.25rem;--spot-title-font-weight: 700;--spot-title-padding: 0 0 1.25rem 0;--spot-description-font-size: .875rem;--spot-description-font-weight: 400;--spot-description-padding: 0 0 .5rem 0;--spot-bullets-font-size: .875rem;--spot-bullets-font-weight: 400;--spot-bullets-padding: .3125rem;--spot-bullets-checkmark-color: #2e2e2e;--spot-table-border-radius: .625rem;--spot-table-header-font-size: .875rem;--spot-table-header-font-weight: 700;--spot-table-header-padding: 0 .5rem .625rem;--spot-table-cell-font-size: .815rem;--spot-table-cell-font-weight: 400;--spot-table-cell-padding: 0 .625rem;--spot-radio-border: #000000;--spot-radio-border-radius: .625rem;--spot-radio-checked-background: #000000;--spot-radio-text-font-size: .875rem;--spot-radio-text-font-weight: 400;--spot-radio-text-padding: .625rem;--spot-radio-selection-background: #f4f4f4;--spot-radio-selection-border-radius: .625rem;--spot-radio-selection-padding: .625rem;--spot-recommended-tag-background: #000000;--spot-recommended-tag-font-color: #ffffff;--spot-recommended-tag-font-size: .875rem;--spot-recommended-tag-font-weight: 700;--spot-recommended-tag-padding: .25rem .5rem;--spot-recommended-tag-border-radius: .5rem;--spot-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-state-dropdown-error-color: var(--spot-selection-error-font-color);--spot-state-dropdown-error-font-size: .8125rem;--spot-state-dropdown-error-margin-top: .25rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-selection-options-gap: .5rem;--spot-refund-schedule-margin-top: 0rem;--spot-refund-schedule-margin-bottom: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-top:var(--spot-covered-items-margin-top, .85rem);margin-bottom:var(--spot-covered-items-margin-bottom, 1.5rem)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:var(--spot-covered-items-margin-top, .85rem);margin-bottom:var(--spot-covered-items-margin-bottom, .5rem);max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:var(--spot-covered-items-margin-top, 0rem);margin-bottom:var(--spot-covered-items-margin-bottom, 1rem)}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-refund-schedule{border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-border-radius);overflow:hidden;margin-top:var(--spot-refund-schedule-margin-top);margin-bottom:var(--spot-refund-schedule-margin-bottom)}.spot-refund-schedule .spot-covered-items__header{margin-bottom:0}.spot-refund-schedule .spot-covered-items__toggle{border-radius:0}.spot-refund-schedule .spot-covered-items__content{margin-top:0}.spot-refund-schedule .spot-covered-items__list{border:none;border-radius:0;background:transparent;padding:.5rem 1rem;list-style:none}.spot-refund-schedule .spot-covered-items__list li{display:flex;justify-content:space-between;padding:.375rem 0;margin:0;gap:.75rem}.spot-refund-schedule .spot-covered-items__list li>span:first-child{min-width:0}.spot-refund-schedule .spot-covered-items__list li>span:last-child{text-align:right;white-space:nowrap}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}.spot-state-dropdown__select--error{border-color:var(--spot-state-dropdown-error-color)}.spot-state-dropdown__select--error:focus{box-shadow:0 0 0 2px #ff000026}.spot-state-dropdown__error{display:none;color:var(--spot-state-dropdown-error-color);font-size:var(--spot-state-dropdown-error-font-size);font-family:var(--spot-font-family);margin-top:var(--spot-state-dropdown-error-margin-top)}.spot-state-dropdown__error--visible{display:block}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__wrapper{max-width:26rem}.spot-selection__options{display:flex;flex-direction:column;gap:var(--spot-selection-options-gap)}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem;max-width:26rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:var(--spot-payment-terms-header-margin-bottom);padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right:5%;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:9999px;overflow:hidden;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-logo-background-color)}@container (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}@media (min-width: 651px){.spot-footer__powered-by{margin-top:0;align-self:center}.spot-footer__terms{margin-right:var(--spot-footer-terms-margin-right)}}";function X(c){const t=document.createElement("style");t.textContent=c,document.head.appendChild(t)}X(K);const M={sandbox:"https://api.sandbox.getspot.com/api/v1/quote",production:"https://api.getspot.com/api/v1/quote",local:"http://localhost:3999/api/v1/quote"};class J{constructor(t={}){this._destroyed=!1,this.options={location:"body",showTable:!0,logoPosition:"top-right",apiConfig:{environment:"production",partnerId:""},quoteRequestData:{},callbacks:{},useMockData:!1,...t,selection:t.selection??w.UNSELECTED},this._onResize=this._updateLayout.bind(this),this.root=typeof this.options.location=="string"?document.querySelector(this.options.location):this.options.location,this.currentSelection=this.options.selection,this._init()}async _init(){var t,r,s,a,n;try{T(this.options),this.currentState=this.options.state;let o;if(this.options.useMockData&&this.options.mockData)o=this.options.mockData;else{const{environment:e,partnerId:l}=this.options.apiConfig,f=this.options.apiConfig.customEndpoint||M[e];o="items"in this.options.quoteRequestData?await S(f,l,this.options.quoteRequestData,this._validState()):await x(f,l,this.options.quoteRequestData,this._validState())}if(this._destroyed)return;if(o.status!=="QUOTE_AVAILABLE"){o.status==="NO_MATCHING_QUOTE"&&((t=this.options.callbacks)!=null&&t.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:this.options.quoteRequestData});return}if(this.quote=o.data,!this.quote)throw new Error("No quote data in response");if(this._renderWidget(),this.options.selection===w.YES&&((r=this.options.callbacks)!=null&&r.onOptIn)){const e={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const l=this.options.quoteRequestData;e.batchQuoteDetails=this.quote.originalQuotes.map(m=>{var h;const f=(h=l.items)==null?void 0:h.find(g=>(g.cartItemId||`item-${l.items.indexOf(g)+1}`)===m.cartItemId);return{quoteId:m.id,productPrice:(f==null?void 0:f.productPrice)||m.spotPrice,cartItemId:(f==null?void 0:f.cartItemId)||""}})}this.options.callbacks.onOptIn(e)}if((s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const e=this.options.callbacks.onQuoteRetrieved(this.quote);e&&this._applyQuoteUpdates(e)}}catch(o){if(this._destroyed)return;if((a=this.options.callbacks)!=null&&a.onError){const e=o;(n=this.options.callbacks)==null||n.onError({message:e.message,status:e.status,responseBody:e.responseBody})}}}_renderWidget(){if(!this.quote)return;this.container=document.createElement("div"),this.container.className="spot-refund-guarantee",this.root.appendChild(this.container),Object.entries(this.options.theme||{}).forEach(([o,e])=>{const l=`--${o}`;this.container.style.setProperty(l,e)}),V(this.container,this.quote.communication);const t=document.createElement("div");if(t.className="spot-content__wrapper",this.container.appendChild(t),this.quote.qualifyingReasons?U(t,this.quote.qualifyingReasons):Q(t,this.quote.communication.bulletPoints),this.quote.coveredItems){const o=this._getTotalItemsInRequest();Z(t,this.quote.coveredItems,o)}this.options.showTable&&!this.quote.qualifyingReasons&&F(t,this.quote.payoutSchedule,this.quote.currencyCode);const r=i("div",{className:"spot-selection__wrapper",parent:t});this._isPassOrTrip()&&!this.options.state&&(this._stateSelectEl=W(r,this.currentState),this._setNonUsResidentError(this.currentState===q));const a=!this._isQuotingAvailable(),n=Y(r,this.currentSelection,this.quote.communication,a);this.paymentTermsEl=i("div",{className:"spot-payment-terms__wrapper",parent:t}),this.currentSelection===w.YES&&I(this.paymentTermsEl,this.quote),G(this.container,this.quote,this.options.logoPosition),window.addEventListener("resize",this._onResize),this._setupResizeObserver(),this._updateLayout(),this._setupOptionListeners(n),this._setupStateDropdownListener()}_updateLayout(){if(!this.container||!this.quote)return;const t=this.container.querySelector(".spot-content__wrapper");t==null||t.classList.remove("desktop-layout")}_setupResizeObserver(){!this.container||!window.ResizeObserver||(this._resizeObserver=new ResizeObserver(()=>{this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=window.setTimeout(()=>{this._updateLayout()},100)}),this._resizeObserver.observe(this.container))}_getTotalItemsInRequest(){return"items"in this.options.quoteRequestData?this.options.quoteRequestData.items.length:1}_applyQuoteUpdates(t){!this.quote||!this.container||(t.spotPriceWithFees!==void 0&&(this.quote.communication.yesOptionText=this.quote.communication.yesOptionText.replace(`$${this.quote.spotPrice.toFixed(2)}`,`$${t.spotPriceWithFees.toFixed(2)}`)),this._teardownDom(),this._renderWidget())}_isPassOrTrip(){const t=this.options.quoteRequestData;if(Array.isArray(t))return t.some(s=>s.productType==="Pass"||s.productType==="Trip");if("items"in t)return t.items.some(s=>s.productType==="Pass"||s.productType==="Trip");const r=t;return r.productType==="Pass"||r.productType==="Trip"}_validState(){if(this._isPassOrTrip()&&!(!this.currentState||this.currentState===q))return this.currentState}_isQuotingAvailable(){return!this._isPassOrTrip()||this.options.state?!0:!!this.currentState&&this.currentState!==q}_setRadiosDisabled(t){var a,n,o;const r=(a=this.container)==null?void 0:a.querySelectorAll('input[name="selection"]'),s=(n=this.container)==null?void 0:n.querySelector(".spot-selection__options");r==null||r.forEach(e=>{e.disabled=t}),s==null||s.classList.toggle("spot-selection__options--disabled",t),t&&(r==null||r.forEach(e=>{e.checked=!1}),(o=this.container)==null||o.querySelectorAll(".spot-selection__option").forEach(e=>{e.classList.remove("selected")}),this.currentSelection=w.UNSELECTED,this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""))}_setNonUsResidentError(t){var s;if(!this._stateSelectEl)return;this._stateSelectEl.classList.toggle("spot-state-dropdown__select--error",t);const r=(s=this._stateSelectEl.parentElement)==null?void 0:s.querySelector(".spot-state-dropdown__error");r==null||r.classList.toggle("spot-state-dropdown__error--visible",t)}_setupStateDropdownListener(){this._stateSelectEl&&this._stateSelectEl.addEventListener("change",()=>{this.currentState=this._stateSelectEl.value,this._setRadiosDisabled(!this._isQuotingAvailable()),this._setNonUsResidentError(this.currentState===q)})}_setupOptionListeners(t){const r=t.querySelectorAll('input[type="radio"]'),s=t.querySelectorAll(".spot-selection__option");r.forEach(a=>{a.addEventListener("change",n=>{var l,m,f,h;const o=n.target,e=o.value;if(this.hideSelectionError(),this.currentSelection=e,s.forEach(g=>g.classList.remove("selected")),(l=o.closest(".spot-selection__option"))==null||l.classList.add("selected"),this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""),e===w.YES&&((m=this.quote)!=null&&m.communication.paymentTerms&&I(this.paymentTermsEl,this.quote),(f=this.options.callbacks)!=null&&f.onOptIn)){const g={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;g.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var b;const d=(b=p.items)==null?void 0:b.find(_=>(_.cartItemId||`item-${p.items.indexOf(_)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(d==null?void 0:d.productPrice)||u.spotPrice,cartItemId:(d==null?void 0:d.cartItemId)||""}})}this.options.callbacks.onOptIn(g)}if(e===w.NO&&((h=this.options.callbacks)!=null&&h.onOptOut)){const g={status:"QUOTE_DECLINED",quoteId:this.quote.id,state:this._validState()};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;g.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var b;const d=(b=p.items)==null?void 0:b.find(_=>(_.cartItemId||`item-${p.items.indexOf(_)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(d==null?void 0:d.productPrice)||u.spotPrice,cartItemId:(d==null?void 0:d.cartItemId)||""}})}this.options.callbacks.onOptOut(g)}})})}showSelectionError(){var t;if(!this.errorEl){this.errorEl=document.createElement("div"),this.errorEl.className="spot-selection__error",this.errorEl.textContent="Please make a selection";const r=(t=this.container)==null?void 0:t.querySelector(".spot-selection__options");r&&r.insertAdjacentElement("afterend",this.errorEl)}this.errorEl.style.display="block"}hideSelectionError(){this.errorEl&&(this.errorEl.style.display="none")}validateSelection(){if(!this.container)return!1;const t=!!this.container.querySelector('input[name="selection"]:checked');return t?this.hideSelectionError():this.showSelectionError(),t}async updateQuote(t){var r,s,a,n;if(this._destroyed)return!1;try{const o={...this.options,quoteRequestData:t};T(o);const{environment:e,partnerId:l,customEndpoint:m}=this.options.apiConfig,f=m||M[e],g="items"in o.quoteRequestData?await S(f,l,o.quoteRequestData,this._validState()):await x(f,l,o.quoteRequestData,this._validState());if(this._destroyed)return!1;if(g.status!=="QUOTE_AVAILABLE")return this._teardownDom(),g.status==="NO_MATCHING_QUOTE"&&((r=this.options.callbacks)!=null&&r.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:o.quoteRequestData}),!1;if(this.options.quoteRequestData=o.quoteRequestData,this.quote=g.data,this._teardownDom(),this._renderWidget(),(s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const p=this.options.callbacks.onQuoteRetrieved(this.quote);p&&this._applyQuoteUpdates(p)}return!0}catch(o){if(this._destroyed)return!1;const e=o;return(n=(a=this.options.callbacks)==null?void 0:a.onError)==null||n.call(a,{message:e.message,status:e.status,responseBody:e.responseBody}),!1}}getSelection(){var r,s,a;if(this.currentSelection==null||this.currentSelection==w.UNSELECTED)return null;const t={selection:this.currentSelection,quoteId:(r=this.quote)==null?void 0:r.id,spotPrice:(s=this.quote)==null?void 0:s.spotPrice,status:this.currentSelection===w.YES?"QUOTE_ACCEPTED":"QUOTE_DECLINED",state:this.currentState};if((a=this.quote)!=null&&a.originalQuotes&&this.quote.originalQuotes.length>0){const n=this.options.quoteRequestData;t.batchQuoteDetails=this.quote.originalQuotes.map(o=>{var l;const e=(l=n.items)==null?void 0:l.find(m=>(m.cartItemId||`item-${n.items.indexOf(m)+1}`)===o.cartItemId);return{quoteId:o.id,productPrice:(e==null?void 0:e.productPrice)||o.spotPrice,cartItemId:(e==null?void 0:e.cartItemId)||""}})}return t}destroy(){this._destroyed=!0,this._teardownDom()}_teardownDom(){window.removeEventListener("resize",this._onResize),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=void 0),this._resizeTimeout&&window.clearTimeout(this._resizeTimeout),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container)}}E.NON_US_RESIDENT_VALUE=q,E.SelectionEnum=w,E.default=J,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,CAAC;AAExE,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAC1D,GAAG,EAAE,CAAC,EACN,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAE,cAAmB,GACxE,qBAAqB,CAAC,CAAC,CAAC,CAS1B;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAAC,GACjE,IAAI,CAWN;AAGD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,MAAM,EAAO,GACrB,IAAI,CAcN;AAGD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,EACtB,iBAAiB,GAAE,gBAAgB,EAAO,GACzC,IAAI,CA0EN;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,YAAY,GAAE,MAAM,EAAO,EAC3B,mBAAmB,CAAC,EAAE,MAAM,GAC3B,IAAI,CAuHN;
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,SAAS,EAAE,CAAC;AAExE,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,qBAAqB,EAC1D,GAAG,EAAE,CAAC,EACN,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAE,cAAmB,GACxE,qBAAqB,CAAC,CAAC,CAAC,CAS1B;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAAC,GACjE,IAAI,CAWN;AAGD,wBAAgB,cAAc,CAC5B,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE,MAAM,EAAO,GACrB,IAAI,CAcN;AAGD,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,WAAW,EACtB,iBAAiB,GAAE,gBAAgB,EAAO,GACzC,IAAI,CA0EN;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,YAAY,GAAE,MAAM,EAAO,EAC3B,mBAAmB,CAAC,EAAE,MAAM,GAC3B,IAAI,CAuHN;AA+BD,wBAAgB,WAAW,CACzB,SAAS,EAAE,WAAW,EACtB,QAAQ,GAAE,kBAAkB,EAAO,EACnC,YAAY,GAAE,MAAc,GAC3B,IAAI,CA6EN;AAED,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,WAAW,EACtB,YAAY,CAAC,EAAE,MAAM,GACpB,iBAAiB,CA6CnB;AAGD,wBAAgB,aAAa,CAC3B,SAAS,EAAE,WAAW,EACtB,SAAS,EAAE,aAAa,EACxB,aAAa,EAAE,aAAa,EAC5B,QAAQ,UAAQ,GACf,WAAW,CA4Cb;AAGD,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,GACX,WAAW,GAAG,IAAI,CAuBpB;AAGD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,KAAK,EACZ,YAAY,GAAE,cAAc,GAAG,WAAyB,GACvD,WAAW,CAuEb"}
|