@getspot/spot-widget 4.0.4 → 4.1.1

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [4.1.1](https://gitlab.com/getspot/spot-widget/compare/@getspot/spot-widget@4.1.0...@getspot/spot-widget@4.1.1) (2026-03-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **core:** prevent payment terms from displaying if they are empty in api response ([918df9d](https://gitlab.com/getspot/spot-widget/commit/918df9d6685a6c83ac16e17bf9b063b817b1f128))
7
+
8
+ # [4.1.0](https://gitlab.com/getspot/spot-widget/compare/@getspot/spot-widget@4.0.4...@getspot/spot-widget@4.1.0) (2026-03-04)
9
+
10
+
11
+ ### Features
12
+
13
+ * **core:** add support for AED, GBP, MAD, and SAR currencies ([00203e3](https://gitlab.com/getspot/spot-widget/commit/00203e3c492b472a311161b58d02d2af56543dac))
14
+
1
15
  ## [4.0.4](https://gitlab.com/getspot/spot-widget/compare/@getspot/spot-widget@4.0.3...@getspot/spot-widget@4.0.4) (2026-02-12)
2
16
 
3
17
 
package/README.md CHANGED
@@ -97,7 +97,7 @@ const widget = new SpotWidget(options);
97
97
  {
98
98
  startDate: string; // ISO 8601 date
99
99
  endDate: string; // ISO 8601 date
100
- currencyCode: 'USD' | 'CAD' | 'AUD';
100
+ currencyCode: 'USD' | 'CAD' | 'AUD' | 'NZD' | 'EUR' | 'MXN' | 'AED' | 'GBP' | 'MAD' | 'SAR';
101
101
  eventType: string; // Event description
102
102
  productType: 'Pass' | 'Trip' | 'Registration';
103
103
  productDuration: 'Daily' | 'Seasonal' | 'Trip' | 'Event';
@@ -115,7 +115,7 @@ const widget = new SpotWidget(options);
115
115
  {
116
116
  cartId: string;
117
117
  cartName: string;
118
- currencyCode: 'USD' | 'CAD' | 'AUD';
118
+ currencyCode: 'USD' | 'CAD' | 'AUD' | 'NZD' | 'EUR' | 'MXN' | 'AED' | 'GBP' | 'MAD' | 'SAR';
119
119
  items: Array<{
120
120
  // All single product fields except cartId and currencyCode
121
121
  cartItemId?: string; // Optional item identifier
@@ -369,7 +369,7 @@ export interface QuoteItem {
369
369
  participantDescription?: string;
370
370
  eventType: string;
371
371
  eventId?: string;
372
- currencyCode: "USD" | "CAD" | "AUD";
372
+ currencyCode: "USD" | "CAD" | "AUD" | "NZD" | "EUR" | "MXN" | "AED" | "GBP" | "MAD" | "SAR";
373
373
  startDate: string;
374
374
  endDate: string;
375
375
  partnerRiskEnd?: Date;
@@ -389,7 +389,7 @@ export interface QuoteItem {
389
389
  export interface BatchQuoteRequest {
390
390
  cartId: string;
391
391
  cartName: string;
392
- currencyCode: "USD" | "CAD" | "AUD";
392
+ currencyCode: "USD" | "CAD" | "AUD" | "NZD" | "EUR" | "MXN" | "AED" | "GBP" | "MAD" | "SAR";
393
393
  metadata?: QuoteMetadata;
394
394
  isPartialPayment?: boolean;
395
395
  roundTo?: number;
package/dist/index.es.js CHANGED
@@ -17,7 +17,7 @@ async function I(m, t, o) {
17
17
  throw s instanceof Error ? s : new Error("Unknown error occurred while fetching quote");
18
18
  }
19
19
  }
20
- async function M(m, t, o) {
20
+ async function L(m, t, o) {
21
21
  try {
22
22
  const s = m.replace("/quote", "/quote/batch"), i = await fetch(s, {
23
23
  method: "POST",
@@ -47,12 +47,12 @@ async function H(m, t, o) {
47
47
  ...p,
48
48
  cartItemId: p.cartItemId || `item-${u + 1}`
49
49
  }))
50
- }, r = await M(m, t, i);
50
+ }, r = await L(m, t, i);
51
51
  if (r.status !== "QUOTES_AVAILABLE" && r.status !== "QUOTE_AVAILABLE")
52
52
  return { status: "NO_MATCHING_QUOTE" };
53
53
  const n = r.quotes.map((p) => {
54
54
  const u = o.items.find(
55
- (f, h) => (f.cartItemId || `item-${h + 1}`) === p.cartItemId
55
+ (f, g) => (f.cartItemId || `item-${g + 1}`) === p.cartItemId
56
56
  );
57
57
  return u ? u.participantDescription ? `${u.productName} - ${u.participantDescription}` : u.productName : `Item ${p.id}`;
58
58
  }), e = Math.round((r.totalSpotPrice || r.spotPrice || 0) * 100) / 100;
@@ -88,7 +88,7 @@ const O = {
88
88
  production: "https://api.getspot.com/v1/quote",
89
89
  local: "http://localhost:3999/api/v1/quote"
90
90
  };
91
- function z(m) {
91
+ function N(m) {
92
92
  const {
93
93
  apiConfig: t = {},
94
94
  quoteRequestData: o,
@@ -118,11 +118,11 @@ function z(m) {
118
118
  "cartId",
119
119
  "productName"
120
120
  ];
121
- function h(c, l = null) {
121
+ function g(c, l = null) {
122
122
  const d = l !== null ? `quoteRequestData[${l}]` : "quoteRequestData";
123
- f.forEach((g) => {
124
- if (!Object.prototype.hasOwnProperty.call(c, g) || c[g] === void 0 || c[g] === null)
125
- throw new Error(`Missing required ${d} field: '${g}'`);
123
+ f.forEach((v) => {
124
+ if (!Object.prototype.hasOwnProperty.call(c, v) || c[v] === void 0 || c[v] === null)
125
+ throw new Error(`Missing required ${d} field: '${v}'`);
126
126
  });
127
127
  const y = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
128
128
  if (!y.test(c.startDate))
@@ -131,7 +131,7 @@ function z(m) {
131
131
  throw new Error(`${d}.endDate must be a valid ISO8601 string`);
132
132
  if (typeof c.currencyCode != "string")
133
133
  throw new Error(`${d}.currencyCode must be a string`);
134
- if (!["USD", "CAD", "AUD"].includes(c.currencyCode))
134
+ if (!["USD", "CAD", "AUD", "NZD", "EUR", "MXN", "AED", "GBP", "MAD", "SAR"].includes(c.currencyCode))
135
135
  throw new Error(`Invalid ${d}.currencyCode: ${c.currencyCode}`);
136
136
  if (typeof c.eventType != "string")
137
137
  throw new Error(`${d}.eventType must be a string`);
@@ -166,7 +166,7 @@ function z(m) {
166
166
  throw new Error("quoteRequestData.cartName must be a string");
167
167
  if (!y || typeof y != "string")
168
168
  throw new Error("quoteRequestData.currencyCode must be a string");
169
- if (!["USD", "CAD", "AUD"].includes(y))
169
+ if (!["USD", "CAD", "AUD", "NZD", "EUR", "MXN", "AED", "GBP", "MAD", "SAR"].includes(y))
170
170
  throw new Error(`Invalid quoteRequestData.currencyCode: ${y}`);
171
171
  if (!Array.isArray(w) || w.length === 0)
172
172
  throw new Error("quoteRequestData.items must be a non-empty array");
@@ -180,36 +180,36 @@ function z(m) {
180
180
  "productId",
181
181
  "productName"
182
182
  ];
183
- w.forEach((g, k) => {
184
- if (!g || typeof g != "object")
183
+ w.forEach((v, k) => {
184
+ if (!v || typeof v != "object")
185
185
  throw new Error(`quoteRequestData.items[${k}] must be a non-null object`);
186
186
  const _ = `quoteRequestData.items[${k}]`;
187
187
  C.forEach((E) => {
188
- if (!Object.prototype.hasOwnProperty.call(g, E) || g[E] === void 0 || g[E] === null)
188
+ if (!Object.prototype.hasOwnProperty.call(v, E) || v[E] === void 0 || v[E] === null)
189
189
  throw new Error(`Missing required ${_} field: '${E}'`);
190
190
  });
191
191
  const x = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
192
- if (!x.test(g.startDate))
192
+ if (!x.test(v.startDate))
193
193
  throw new Error(`${_}.startDate must be a valid ISO8601 string`);
194
- if (!x.test(g.endDate))
194
+ if (!x.test(v.endDate))
195
195
  throw new Error(`${_}.endDate must be a valid ISO8601 string`);
196
- if (typeof g.eventType != "string")
196
+ if (typeof v.eventType != "string")
197
197
  throw new Error(`${_}.eventType must be a string`);
198
- if (typeof g.productType != "string")
198
+ if (typeof v.productType != "string")
199
199
  throw new Error(`${_}.productType must be a string`);
200
- const T = ["Pass", "Trip", "Registration"];
201
- if (!T.includes(g.productType))
202
- throw new Error(`${_}.productType must be one of ${T.join(", ")}`);
203
- if (typeof g.productDuration != "string")
200
+ const D = ["Pass", "Trip", "Registration"];
201
+ if (!D.includes(v.productType))
202
+ throw new Error(`${_}.productType must be one of ${D.join(", ")}`);
203
+ if (typeof v.productDuration != "string")
204
204
  throw new Error(`${_}.productDuration must be a string`);
205
- const D = ["Daily", "Seasonal", "Trip", "Event"];
206
- if (!D.includes(g.productDuration))
207
- throw new Error(`${_}.productDuration must be one of ${D.join(", ")}`);
208
- if (typeof g.productPrice != "number" || isNaN(g.productPrice))
205
+ const T = ["Daily", "Seasonal", "Trip", "Event"];
206
+ if (!T.includes(v.productDuration))
207
+ throw new Error(`${_}.productDuration must be one of ${T.join(", ")}`);
208
+ if (typeof v.productPrice != "number" || isNaN(v.productPrice))
209
209
  throw new Error(`${_}.productPrice must be a valid number`);
210
- if (typeof g.productId != "string")
210
+ if (typeof v.productId != "string")
211
211
  throw new Error(`${_}.productId must be a string`);
212
- if (typeof g.productName != "string")
212
+ if (typeof v.productName != "string")
213
213
  throw new Error(`${_}.productName must be a string`);
214
214
  });
215
215
  } else if (Array.isArray(o)) {
@@ -218,10 +218,10 @@ function z(m) {
218
218
  o.forEach((c, l) => {
219
219
  if (!c || typeof c != "object")
220
220
  throw new Error(`quoteRequestData[${l}] must be a non-null object`);
221
- h(c, l);
221
+ g(c, l);
222
222
  });
223
223
  } else
224
- h(o);
224
+ g(o);
225
225
  if ([
226
226
  "onOptIn",
227
227
  "onOptOut",
@@ -255,7 +255,7 @@ function $(m, { name: t, description: o }) {
255
255
  parent: m
256
256
  });
257
257
  }
258
- function P(m, t = []) {
258
+ function S(m, t = []) {
259
259
  const o = a("ul", {
260
260
  className: "spot-benefits__list",
261
261
  parent: m
@@ -269,7 +269,7 @@ function P(m, t = []) {
269
269
  </svg>`, a("span", { text: s, parent: i });
270
270
  });
271
271
  }
272
- function S(m, t = []) {
272
+ function P(m, t = []) {
273
273
  if (!t || t.length === 0) return;
274
274
  const o = a("div", {
275
275
  className: "spot-qualifying-reasons__container",
@@ -300,19 +300,19 @@ function S(m, t = []) {
300
300
  n = "./assets/";
301
301
  }
302
302
  s.forEach((e) => {
303
- var h, v, c;
303
+ var g, h, c;
304
304
  const p = a("div", {
305
305
  className: "spot-qualifying-reasons__item",
306
306
  parent: i
307
307
  }), u = a("div", {
308
308
  className: "spot-qualifying-reasons__icon-wrapper",
309
309
  parent: p
310
- }), f = r[((h = e.benefitType) == null ? void 0 : h.name) || ""] || r[e.name || ""];
310
+ }), f = r[((g = e.benefitType) == null ? void 0 : g.name) || ""] || r[e.name || ""];
311
311
  if (f) {
312
312
  const l = a("img", {
313
313
  parent: u
314
314
  });
315
- l.src = n + f, l.alt = ((v = e.benefitType) == null ? void 0 : v.name) || e.name || "", l.className = "spot-qualifying-reasons__icon";
315
+ l.src = n + f, l.alt = ((h = e.benefitType) == null ? void 0 : h.name) || e.name || "", l.className = "spot-qualifying-reasons__icon";
316
316
  }
317
317
  a("span", {
318
318
  className: "spot-qualifying-reasons__label",
@@ -321,7 +321,7 @@ function S(m, t = []) {
321
321
  });
322
322
  });
323
323
  }
324
- function V(m, t = [], o) {
324
+ function A(m, t = [], o) {
325
325
  if (t.length === 0 || !o || o <= 1)
326
326
  return;
327
327
  const s = /* @__PURE__ */ new Map();
@@ -365,40 +365,52 @@ function V(m, t = [], o) {
365
365
  className: "spot-covered-items__arrow",
366
366
  innerHTML: "▼",
367
367
  parent: u
368
- }), h = a("div", {
368
+ }), g = a("div", {
369
369
  className: "spot-covered-items__content",
370
370
  parent: n
371
- }), v = a("ul", {
371
+ }), h = a("ul", {
372
372
  className: "spot-covered-items__list",
373
- parent: h
373
+ parent: g
374
374
  });
375
375
  r.forEach(({ displayText: l }) => {
376
- const d = a("li", { parent: v });
376
+ const d = a("li", { parent: h });
377
377
  a("span", { text: l, parent: d });
378
378
  });
379
379
  let c = !1;
380
- h.style.display = "none", p.addEventListener("click", (l) => {
381
- l.stopPropagation(), c = !c, h.style.display = c ? "block" : "none", f.innerHTML = c ? "▲" : "▼", p.setAttribute("aria-expanded", c.toString());
382
- }), p.setAttribute("aria-expanded", "false"), p.setAttribute("aria-controls", "covered-items-list"), h.setAttribute("id", "covered-items-list");
380
+ g.style.display = "none", p.addEventListener("click", (l) => {
381
+ l.stopPropagation(), c = !c, g.style.display = c ? "block" : "none", f.innerHTML = c ? "▲" : "▼", p.setAttribute("aria-expanded", c.toString());
382
+ }), p.setAttribute("aria-expanded", "false"), p.setAttribute("aria-controls", "covered-items-list"), g.setAttribute("id", "covered-items-list");
383
383
  }
384
- function Q(m, t = []) {
385
- const o = a("div", {
384
+ const R = {
385
+ USD: "$",
386
+ CAD: "CAD $",
387
+ AUD: "AUD $",
388
+ NZD: "NZD $",
389
+ MXN: "MXN $",
390
+ EUR: "EUR €",
391
+ GBP: "GBP £",
392
+ AED: "AED ",
393
+ MAD: "MAD ",
394
+ SAR: "SAR "
395
+ };
396
+ function V(m, t = [], o = "USD") {
397
+ const s = R[o] ?? `${o} `, i = a("div", {
386
398
  className: "spot-table__container",
387
399
  parent: m
388
- }), s = a("table", {
400
+ }), r = a("table", {
389
401
  className: "spot-refund__table spot-table--dynamic",
390
- parent: o
391
- }), i = a("thead", { parent: s }), r = a("tr", { parent: i });
392
- a("th", { text: "When you cancel", parent: r }), a("th", { text: "You will receive", parent: r });
393
- const n = a("tbody", { parent: s });
394
- t.forEach(({ text: e, percent: p, amount: u }) => {
395
- const f = a("tr", { parent: n });
396
- a("td", { text: e, parent: f });
397
- const h = p === "Not eligible for refund" ? "Not eligible for a refund" : `$${u} refund`;
398
- a("td", { text: h, parent: f });
402
+ parent: i
403
+ }), n = a("thead", { parent: r }), e = a("tr", { parent: n });
404
+ a("th", { text: "When you cancel", parent: e }), a("th", { text: "You will receive", parent: e });
405
+ const p = a("tbody", { parent: r });
406
+ t.forEach(({ text: u, percent: f, amount: g }) => {
407
+ const h = a("tr", { parent: p });
408
+ a("td", { text: u, parent: h });
409
+ const c = f === "Not eligible for refund" ? "Not eligible for a refund" : `${s}${g} refund`;
410
+ a("td", { text: c, parent: h });
399
411
  });
400
412
  }
401
- function R(m, t, o) {
413
+ function Q(m, t, o) {
402
414
  const s = a("div", {
403
415
  className: "spot-selection__options",
404
416
  parent: m
@@ -420,23 +432,26 @@ function R(m, t, o) {
420
432
  }), e = a("input", { parent: n });
421
433
  return e.type = "radio", e.name = "selection", e.value = b.NO, t === b.NO && (e.checked = !0), a("span", { text: o.noOptionText, parent: n }), s;
422
434
  }
423
- function N(m, t) {
424
- var i;
425
- const o = (i = t.communication) == null ? void 0 : i.paymentTerms, s = a("div", {
426
- className: "spot-payment-terms",
427
- parent: m
428
- });
429
- return a("div", {
430
- className: "spot-payment-terms__header",
431
- text: "PAYMENT TERMS",
432
- parent: s
433
- }), a("div", {
434
- className: "spot-payment-terms__body",
435
- text: o || "",
436
- parent: s
437
- }), s;
435
+ function M(m, t) {
436
+ var s;
437
+ const o = (s = t.communication) == null ? void 0 : s.paymentTerms;
438
+ if (o) {
439
+ const i = a("div", {
440
+ className: "spot-payment-terms",
441
+ parent: m
442
+ });
443
+ return a("div", {
444
+ className: "spot-payment-terms__header",
445
+ text: "PAYMENT TERMS",
446
+ parent: i
447
+ }), a("div", {
448
+ className: "spot-payment-terms__body",
449
+ text: o || "",
450
+ parent: i
451
+ }), i;
452
+ }
438
453
  }
439
- function A(m, t, o = "bottom-right") {
454
+ function Z(m, t, o = "bottom-right") {
440
455
  if (o === "top-right") {
441
456
  const e = a("div", {
442
457
  className: "spot-logo__top-right",
@@ -496,13 +511,13 @@ function A(m, t, o = "bottom-right") {
496
511
  }
497
512
  return s;
498
513
  }
499
- const Z = ":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-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-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__options{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__options{grid-row:3;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;padding-left:.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)}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-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);margin-right:.5rem;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:40px;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:1.25rem;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-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)}}";
500
- function U(m) {
514
+ const U = ":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-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-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__options{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__options{grid-row:3;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;padding-left:.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)}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-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);margin-right:.5rem;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:40px;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:1.25rem;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-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)}}";
515
+ function B(m) {
501
516
  const t = document.createElement("style");
502
517
  t.textContent = m, document.head.appendChild(t);
503
518
  }
504
- U(Z);
505
- const L = {
519
+ B(U);
520
+ const z = {
506
521
  sandbox: "https://api.sandbox.getspot.com/api/v1/quote",
507
522
  production: "https://api.getspot.com/api/v1/quote",
508
523
  local: "http://localhost:3999/api/v1/quote"
@@ -524,12 +539,12 @@ class j {
524
539
  async _init() {
525
540
  var t, o, s, i, r;
526
541
  try {
527
- z(this.options);
542
+ N(this.options);
528
543
  let n;
529
544
  if (this.options.useMockData && this.options.mockData)
530
545
  n = this.options.mockData;
531
546
  else {
532
- const { environment: e, partnerId: p } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || L[e];
547
+ const { environment: e, partnerId: p } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || z[e];
533
548
  n = "items" in this.options.quoteRequestData ? await H(
534
549
  f,
535
550
  p,
@@ -558,9 +573,9 @@ class j {
558
573
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
559
574
  const p = this.options.quoteRequestData;
560
575
  e.batchQuoteDetails = this.quote.originalQuotes.map((u) => {
561
- var h;
562
- const f = (h = p.items) == null ? void 0 : h.find(
563
- (v) => (v.cartItemId || `item-${p.items.indexOf(v) + 1}`) === u.cartItemId
576
+ var g;
577
+ const f = (g = p.items) == null ? void 0 : g.find(
578
+ (h) => (h.cartItemId || `item-${p.items.indexOf(h) + 1}`) === u.cartItemId
564
579
  );
565
580
  return {
566
581
  quoteId: u.id,
@@ -593,12 +608,12 @@ class j {
593
608
  this.container.style.setProperty(r, i);
594
609
  }), $(this.container, this.quote.communication);
595
610
  const t = document.createElement("div");
596
- if (t.className = "spot-content__wrapper", this.container.appendChild(t), this.quote.qualifyingReasons ? S(t, this.quote.qualifyingReasons) : P(t, this.quote.communication.bulletPoints), this.quote.coveredItems) {
611
+ if (t.className = "spot-content__wrapper", this.container.appendChild(t), this.quote.qualifyingReasons ? P(t, this.quote.qualifyingReasons) : S(t, this.quote.communication.bulletPoints), this.quote.coveredItems) {
597
612
  const s = this._getTotalItemsInRequest();
598
- V(t, this.quote.coveredItems, s);
613
+ A(t, this.quote.coveredItems, s);
599
614
  }
600
- this.options.showTable && !this.quote.qualifyingReasons && Q(t, this.quote.payoutSchedule);
601
- const o = R(
615
+ this.options.showTable && !this.quote.qualifyingReasons && V(t, this.quote.payoutSchedule, this.quote.currencyCode);
616
+ const o = Q(
602
617
  t,
603
618
  this.options.selection,
604
619
  this.quote.communication
@@ -606,7 +621,7 @@ class j {
606
621
  t.appendChild(o), this.paymentTermsEl = a("div", {
607
622
  className: "spot-payment-terms__wrapper",
608
623
  parent: t
609
- }), this.currentSelection === b.YES && N(this.paymentTermsEl, this.quote), A(this.container, this.quote, this.options.logoPosition), window.addEventListener("resize", this._onResize), this._setupResizeObserver(), this._updateLayout(), this._setupOptionListeners(o);
624
+ }), this.currentSelection === b.YES && M(this.paymentTermsEl, this.quote), Z(this.container, this.quote, this.options.logoPosition), window.addEventListener("resize", this._onResize), this._setupResizeObserver(), this._updateLayout(), this._setupOptionListeners(o);
610
625
  }
611
626
  _updateLayout() {
612
627
  if (!this.container || !this.quote) return;
@@ -659,17 +674,17 @@ class j {
659
674
  ), s = t.querySelectorAll(".spot-selection__option");
660
675
  o.forEach((i) => {
661
676
  i.addEventListener("change", (r) => {
662
- var p, u, f, h;
677
+ var p, u, f, g;
663
678
  const n = r.target, e = n.value;
664
- if (this.hideSelectionError(), this.currentSelection = e, s.forEach((v) => v.classList.remove("selected")), (p = n.closest(".spot-selection__option")) == null || p.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), e === b.YES && ((u = this.quote) != null && u.communication.paymentTerms && N(this.paymentTermsEl, this.quote), (f = this.options.callbacks) != null && f.onOptIn)) {
665
- const v = {
679
+ if (this.hideSelectionError(), this.currentSelection = e, s.forEach((h) => h.classList.remove("selected")), (p = n.closest(".spot-selection__option")) == null || p.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), e === b.YES && ((u = this.quote) != null && u.communication.paymentTerms && M(this.paymentTermsEl, this.quote), (f = this.options.callbacks) != null && f.onOptIn)) {
680
+ const h = {
666
681
  status: "QUOTE_ACCEPTED",
667
682
  spotPrice: this.quote.spotPrice,
668
683
  quoteId: this.quote.id
669
684
  };
670
685
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
671
686
  const c = this.options.quoteRequestData;
672
- v.batchQuoteDetails = this.quote.originalQuotes.map(
687
+ h.batchQuoteDetails = this.quote.originalQuotes.map(
673
688
  (l) => {
674
689
  var y;
675
690
  const d = (y = c.items) == null ? void 0 : y.find(
@@ -683,16 +698,16 @@ class j {
683
698
  }
684
699
  );
685
700
  }
686
- this.options.callbacks.onOptIn(v);
701
+ this.options.callbacks.onOptIn(h);
687
702
  }
688
- if (e === b.NO && ((h = this.options.callbacks) != null && h.onOptOut)) {
689
- const v = {
703
+ if (e === b.NO && ((g = this.options.callbacks) != null && g.onOptOut)) {
704
+ const h = {
690
705
  status: "QUOTE_DECLINED",
691
706
  quoteId: this.quote.id
692
707
  };
693
708
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
694
709
  const c = this.options.quoteRequestData;
695
- v.batchQuoteDetails = this.quote.originalQuotes.map(
710
+ h.batchQuoteDetails = this.quote.originalQuotes.map(
696
711
  (l) => {
697
712
  var y;
698
713
  const d = (y = c.items) == null ? void 0 : y.find(
@@ -706,7 +721,7 @@ class j {
706
721
  }
707
722
  );
708
723
  }
709
- this.options.callbacks.onOptOut(v);
724
+ this.options.callbacks.onOptOut(h);
710
725
  }
711
726
  });
712
727
  });
@@ -739,8 +754,8 @@ class j {
739
754
  ...this.options,
740
755
  quoteRequestData: t
741
756
  };
742
- z(n);
743
- const { environment: e, partnerId: p, customEndpoint: u } = this.options.apiConfig, f = u || L[e], v = "items" in n.quoteRequestData ? await H(
757
+ N(n);
758
+ const { environment: e, partnerId: p, customEndpoint: u } = this.options.apiConfig, f = u || z[e], h = "items" in n.quoteRequestData ? await H(
744
759
  f,
745
760
  p,
746
761
  n.quoteRequestData
@@ -749,12 +764,12 @@ class j {
749
764
  p,
750
765
  n.quoteRequestData
751
766
  );
752
- if (v.status !== "QUOTE_AVAILABLE")
753
- return this.destroy(), v.status === "NO_MATCHING_QUOTE" && ((o = this.options.callbacks) != null && o.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
767
+ if (h.status !== "QUOTE_AVAILABLE")
768
+ return this.destroy(), h.status === "NO_MATCHING_QUOTE" && ((o = this.options.callbacks) != null && o.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
754
769
  status: "NO_MATCHING_QUOTE",
755
770
  data: n.quoteRequestData
756
771
  }), !1;
757
- if (this.options.quoteRequestData = n.quoteRequestData, this.quote = v.data, this.currentSelection = b.UNSELECTED, this.destroy(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
772
+ if (this.options.quoteRequestData = n.quoteRequestData, this.quote = h.data, this.currentSelection = b.UNSELECTED, this.destroy(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
758
773
  const c = this.options.callbacks.onQuoteRetrieved(this.quote);
759
774
  c && this._applyQuoteUpdates(c);
760
775
  }
package/dist/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
- (function(C,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(C=typeof globalThis<"u"?globalThis:C||self,E(C.SpotWidget={}))})(this,function(C){"use strict";async function E(m,t,o){try{const s=await fetch(m,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(o)}),i=await s.json();if(!s.ok){const r=new Error((i==null?void 0:i.message)||"Failed to fetch quote");throw r.status=s.status,r.responseBody=i,r}return i}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching quote")}}async function O(m,t,o){try{const s=m.replace("/quote","/quote/batch"),i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(o)}),r=await i.json();if(!i.ok){const n=new Error((r==null?void 0:r.message)||"Failed to fetch batch quote");throw n.status=i.status,n.responseBody=r,n}return r}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching batch quote")}}async function T(m,t,o){var s;try{const i={...o,isPartialPayment:o.isPartialPayment||!1,roundTo:o.roundTo||void 0,items:o.items.map((p,u)=>({...p,cartItemId:p.cartItemId||`item-${u+1}`}))},r=await O(m,t,i);if(r.status!=="QUOTES_AVAILABLE"&&r.status!=="QUOTE_AVAILABLE")return{status:"NO_MATCHING_QUOTE"};const n=r.quotes.map(p=>{const u=o.items.find((f,h)=>(f.cartItemId||`item-${h+1}`)===p.cartItemId);return u?u.participantDescription?`${u.productName} - ${u.participantDescription}`:u.productName:`Item ${p.id}`}),e=Math.round((r.totalSpotPrice||r.spotPrice||0)*100)/100;return{status:"QUOTE_AVAILABLE",data:{id:r.quotes?r.quotes.map(p=>p.id).join(","):((s=r.data)==null?void 0:s.id)||"",spotPrice:e,currencyCode:r.currencyCode||"",communication:{...r.communication,yesOptionText:r.communication.yesOptionText.replace(String(r.totalSpotPrice),String(e))},payoutSchedule:r.payoutSchedule.map(p=>({...p,amount:p.amount!==void 0?p.amount:0})),coveredItems:n,originalQuotes:r.quotes||(r.data?[r.data]:[])},spotPrice:e,coveredItems:n}}catch(i){throw i instanceof Error?i:new Error("Unknown error occurred while fetching multiple quotes")}}const S={sandbox:"https://api.sandbox.getspot.com/v1/quote",production:"https://api.getspot.com/v1/quote",local:"http://localhost:3999/api/v1/quote"};function D(m){const{apiConfig:t={},quoteRequestData:o,callbacks:s={},location:i,theme:r}=m,{environment:n="sandbox",partnerId:e,customEndpoint:p}=t;if(!e||typeof e!="string")throw new Error("Invalid or missing partnerId in apiConfig");if(!(p||S[n]))throw new Error(`Invalid environment in apiConfig: ${n}`);if(!o||typeof o!="object"&&!Array.isArray(o))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(c,l=null){const d=l!==null?`quoteRequestData[${l}]`:"quoteRequestData";f.forEach(g=>{if(!Object.prototype.hasOwnProperty.call(c,g)||c[g]===void 0||c[g]===null)throw new Error(`Missing required ${d} field: '${g}'`)});const b=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!b.test(c.startDate))throw new Error(`${d}.startDate must be a valid ISO8601 string`);if(!b.test(c.endDate))throw new Error(`${d}.endDate must be a valid ISO8601 string`);if(typeof c.currencyCode!="string")throw new Error(`${d}.currencyCode must be a string`);if(!["USD","CAD","AUD"].includes(c.currencyCode))throw new Error(`Invalid ${d}.currencyCode: ${c.currencyCode}`);if(typeof c.eventType!="string")throw new Error(`${d}.eventType must be a string`);if(typeof c.productType!="string")throw new Error(`${d}.productType must be a string`);const k=["Pass","Trip","Registration"];if(!k.includes(c.productType))throw new Error(`${d}.productType must be one of ${k.join(", ")}`);if(typeof c.productDuration!="string")throw new Error(`${d}.productDuration must be a string`);const q=["Daily","Seasonal","Trip","Event"];if(!q.includes(c.productDuration))throw new Error(`${d}.productDuration must be one of ${q.join(", ")}`);if(typeof c.productPrice!="number"||isNaN(c.productPrice))throw new Error(`${d}.productPrice must be a valid number`);if(typeof c.productId!="string")throw new Error(`${d}.productId must be a string`);if(typeof c.cartId!="string")throw new Error(`${d}.cartId must be a string`);if(typeof c.productName!="string")throw new Error(`${d}.productName must be a string`)}if("items"in o){const c=o,{cartId:l,cartName:d,currencyCode:b,items:w}=c;if(!l||typeof l!="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(!["USD","CAD","AUD"].includes(b))throw new Error(`Invalid quoteRequestData.currencyCode: ${b}`);if(!Array.isArray(w)||w.length===0)throw new Error("quoteRequestData.items must be a non-empty array");const q=["startDate","endDate","eventType","productType","productDuration","productPrice","productId","productName"];w.forEach((g,z)=>{if(!g||typeof g!="object")throw new Error(`quoteRequestData.items[${z}] must be a non-null object`);const _=`quoteRequestData.items[${z}]`;q.forEach(x=>{if(!Object.prototype.hasOwnProperty.call(g,x)||g[x]===void 0||g[x]===null)throw new Error(`Missing required ${_} field: '${x}'`)});const N=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!N.test(g.startDate))throw new Error(`${_}.startDate must be a valid ISO8601 string`);if(!N.test(g.endDate))throw new Error(`${_}.endDate must be a valid ISO8601 string`);if(typeof g.eventType!="string")throw new Error(`${_}.eventType must be a string`);if(typeof g.productType!="string")throw new Error(`${_}.productType must be a string`);const M=["Pass","Trip","Registration"];if(!M.includes(g.productType))throw new Error(`${_}.productType must be one of ${M.join(", ")}`);if(typeof g.productDuration!="string")throw new Error(`${_}.productDuration must be a string`);const L=["Daily","Seasonal","Trip","Event"];if(!L.includes(g.productDuration))throw new Error(`${_}.productDuration must be one of ${L.join(", ")}`);if(typeof g.productPrice!="number"||isNaN(g.productPrice))throw new Error(`${_}.productPrice must be a valid number`);if(typeof g.productId!="string")throw new Error(`${_}.productId must be a string`);if(typeof g.productName!="string")throw new Error(`${_}.productName must be a string`)})}else if(Array.isArray(o)){if(o.length===0)throw new Error("quoteRequestData array cannot be empty");o.forEach((c,l)=>{if(!c||typeof c!="object")throw new Error(`quoteRequestData[${l}] must be a non-null object`);h(c,l)})}else h(o);if(["onOptIn","onOptOut","onQuoteRetrieved","onError","noMatchingQuote"].forEach(c=>{const l=s[c];if(l&&typeof l!="function")throw new Error(`Callback '${c}' must be a function.`)}),typeof i=="string"&&!document.querySelector(i))throw new Error(`Invalid location selector: '${i}'`);if(r&&typeof r!="object")throw new Error("Theme must be an object with CSS variables, do not include the '--' prefix")}var y=(m=>(m.YES="yes",m.NO="no",m.UNSELECTED="unselected",m))(y||{});function a(m,{text:t,className:o,parent:s,innerHTML:i,href:r,target:n}={}){const e=document.createElement(m);return o&&(e.className=o),t!=null&&(e.textContent=t),i!=null&&(e.innerHTML=i),r&&"href"in e&&(e.href=r),n&&"target"in e&&(e.target=n),s&&s.appendChild(e),e}function P(m,{name:t,description:o}){a("div",{className:"spot-header__title",text:t,parent:m}),a("div",{className:"spot-header__description",text:o,parent:m})}function $(m,t=[]){const o=a("ul",{className:"spot-benefits__list",parent:m});t.forEach(s=>{const i=a("li",{parent:o});i.innerHTML=`
1
+ (function(C,E){typeof exports=="object"&&typeof module<"u"?E(exports):typeof define=="function"&&define.amd?define(["exports"],E):(C=typeof globalThis<"u"?globalThis:C||self,E(C.SpotWidget={}))})(this,function(C){"use strict";async function E(m,t,o){try{const s=await fetch(m,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(o)}),i=await s.json();if(!s.ok){const r=new Error((i==null?void 0:i.message)||"Failed to fetch quote");throw r.status=s.status,r.responseBody=i,r}return i}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching quote")}}async function O(m,t,o){try{const s=m.replace("/quote","/quote/batch"),i=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json","X-Spot-Partner-Id":t},body:JSON.stringify(o)}),r=await i.json();if(!i.ok){const n=new Error((r==null?void 0:r.message)||"Failed to fetch batch quote");throw n.status=i.status,n.responseBody=r,n}return r}catch(s){throw s instanceof Error?s:new Error("Unknown error occurred while fetching batch quote")}}async function D(m,t,o){var s;try{const i={...o,isPartialPayment:o.isPartialPayment||!1,roundTo:o.roundTo||void 0,items:o.items.map((p,u)=>({...p,cartItemId:p.cartItemId||`item-${u+1}`}))},r=await O(m,t,i);if(r.status!=="QUOTES_AVAILABLE"&&r.status!=="QUOTE_AVAILABLE")return{status:"NO_MATCHING_QUOTE"};const n=r.quotes.map(p=>{const u=o.items.find((f,g)=>(f.cartItemId||`item-${g+1}`)===p.cartItemId);return u?u.participantDescription?`${u.productName} - ${u.participantDescription}`:u.productName:`Item ${p.id}`}),e=Math.round((r.totalSpotPrice||r.spotPrice||0)*100)/100;return{status:"QUOTE_AVAILABLE",data:{id:r.quotes?r.quotes.map(p=>p.id).join(","):((s=r.data)==null?void 0:s.id)||"",spotPrice:e,currencyCode:r.currencyCode||"",communication:{...r.communication,yesOptionText:r.communication.yesOptionText.replace(String(r.totalSpotPrice),String(e))},payoutSchedule:r.payoutSchedule.map(p=>({...p,amount:p.amount!==void 0?p.amount:0})),coveredItems:n,originalQuotes:r.quotes||(r.data?[r.data]:[])},spotPrice:e,coveredItems:n}}catch(i){throw i instanceof Error?i:new Error("Unknown error occurred while fetching multiple quotes")}}const S={sandbox:"https://api.sandbox.getspot.com/v1/quote",production:"https://api.getspot.com/v1/quote",local:"http://localhost:3999/api/v1/quote"};function T(m){const{apiConfig:t={},quoteRequestData:o,callbacks:s={},location:i,theme:r}=m,{environment:n="sandbox",partnerId:e,customEndpoint:p}=t;if(!e||typeof e!="string")throw new Error("Invalid or missing partnerId in apiConfig");if(!(p||S[n]))throw new Error(`Invalid environment in apiConfig: ${n}`);if(!o||typeof o!="object"&&!Array.isArray(o))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 g(c,l=null){const d=l!==null?`quoteRequestData[${l}]`:"quoteRequestData";f.forEach(v=>{if(!Object.prototype.hasOwnProperty.call(c,v)||c[v]===void 0||c[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(c.startDate))throw new Error(`${d}.startDate must be a valid ISO8601 string`);if(!b.test(c.endDate))throw new Error(`${d}.endDate must be a valid ISO8601 string`);if(typeof c.currencyCode!="string")throw new Error(`${d}.currencyCode must be a string`);if(!["USD","CAD","AUD","NZD","EUR","MXN","AED","GBP","MAD","SAR"].includes(c.currencyCode))throw new Error(`Invalid ${d}.currencyCode: ${c.currencyCode}`);if(typeof c.eventType!="string")throw new Error(`${d}.eventType must be a string`);if(typeof c.productType!="string")throw new Error(`${d}.productType must be a string`);const k=["Pass","Trip","Registration"];if(!k.includes(c.productType))throw new Error(`${d}.productType must be one of ${k.join(", ")}`);if(typeof c.productDuration!="string")throw new Error(`${d}.productDuration must be a string`);const q=["Daily","Seasonal","Trip","Event"];if(!q.includes(c.productDuration))throw new Error(`${d}.productDuration must be one of ${q.join(", ")}`);if(typeof c.productPrice!="number"||isNaN(c.productPrice))throw new Error(`${d}.productPrice must be a valid number`);if(typeof c.productId!="string")throw new Error(`${d}.productId must be a string`);if(typeof c.cartId!="string")throw new Error(`${d}.cartId must be a string`);if(typeof c.productName!="string")throw new Error(`${d}.productName must be a string`)}if("items"in o){const c=o,{cartId:l,cartName:d,currencyCode:b,items:w}=c;if(!l||typeof l!="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(!["USD","CAD","AUD","NZD","EUR","MXN","AED","GBP","MAD","SAR"].includes(b))throw new Error(`Invalid quoteRequestData.currencyCode: ${b}`);if(!Array.isArray(w)||w.length===0)throw new Error("quoteRequestData.items must be a non-empty array");const q=["startDate","endDate","eventType","productType","productDuration","productPrice","productId","productName"];w.forEach((v,N)=>{if(!v||typeof v!="object")throw new Error(`quoteRequestData.items[${N}] must be a non-null object`);const _=`quoteRequestData.items[${N}]`;q.forEach(x=>{if(!Object.prototype.hasOwnProperty.call(v,x)||v[x]===void 0||v[x]===null)throw new Error(`Missing required ${_} field: '${x}'`)});const M=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;if(!M.test(v.startDate))throw new Error(`${_}.startDate must be a valid ISO8601 string`);if(!M.test(v.endDate))throw new Error(`${_}.endDate must be a valid ISO8601 string`);if(typeof v.eventType!="string")throw new Error(`${_}.eventType must be a string`);if(typeof v.productType!="string")throw new Error(`${_}.productType must be a string`);const z=["Pass","Trip","Registration"];if(!z.includes(v.productType))throw new Error(`${_}.productType must be one of ${z.join(", ")}`);if(typeof v.productDuration!="string")throw new Error(`${_}.productDuration must be a string`);const L=["Daily","Seasonal","Trip","Event"];if(!L.includes(v.productDuration))throw new Error(`${_}.productDuration must be one of ${L.join(", ")}`);if(typeof v.productPrice!="number"||isNaN(v.productPrice))throw new Error(`${_}.productPrice must be a valid number`);if(typeof v.productId!="string")throw new Error(`${_}.productId must be a string`);if(typeof v.productName!="string")throw new Error(`${_}.productName must be a string`)})}else if(Array.isArray(o)){if(o.length===0)throw new Error("quoteRequestData array cannot be empty");o.forEach((c,l)=>{if(!c||typeof c!="object")throw new Error(`quoteRequestData[${l}] must be a non-null object`);g(c,l)})}else g(o);if(["onOptIn","onOptOut","onQuoteRetrieved","onError","noMatchingQuote"].forEach(c=>{const l=s[c];if(l&&typeof l!="function")throw new Error(`Callback '${c}' must be a function.`)}),typeof i=="string"&&!document.querySelector(i))throw new Error(`Invalid location selector: '${i}'`);if(r&&typeof r!="object")throw new Error("Theme must be an object with CSS variables, do not include the '--' prefix")}var y=(m=>(m.YES="yes",m.NO="no",m.UNSELECTED="unselected",m))(y||{});function a(m,{text:t,className:o,parent:s,innerHTML:i,href:r,target:n}={}){const e=document.createElement(m);return o&&(e.className=o),t!=null&&(e.textContent=t),i!=null&&(e.innerHTML=i),r&&"href"in e&&(e.href=r),n&&"target"in e&&(e.target=n),s&&s.appendChild(e),e}function $(m,{name:t,description:o}){a("div",{className:"spot-header__title",text:t,parent:m}),a("div",{className:"spot-header__description",text:o,parent:m})}function P(m,t=[]){const o=a("ul",{className:"spot-benefits__list",parent:m});t.forEach(s=>{const i=a("li",{parent:o});i.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>`,a("span",{text:s,parent:i})})}function V(m,t=[]){if(!t||t.length===0)return;const o=a("div",{className:"spot-qualifying-reasons__container",parent:m}),s=[...t].sort((e,p)=>e.rank-p.rank),i=a("div",{className:"spot-qualifying-reasons__grid",parent:o}),r={"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 n;try{const e=document.currentScript;if(e!=null&&e.src){const p=new URL(e.src);n=p.origin+p.pathname.replace(/\/[^/]*$/,"/")}else n=window.location.origin+window.location.pathname.replace(/\/[^/]*$/,"/");n+="assets/"}catch{n="./assets/"}s.forEach(e=>{var h,v,c;const p=a("div",{className:"spot-qualifying-reasons__item",parent:i}),u=a("div",{className:"spot-qualifying-reasons__icon-wrapper",parent:p}),f=r[((h=e.benefitType)==null?void 0:h.name)||""]||r[e.name||""];if(f){const l=a("img",{parent:u});l.src=n+f,l.alt=((v=e.benefitType)==null?void 0:v.name)||e.name||"",l.className="spot-qualifying-reasons__icon"}a("span",{className:"spot-qualifying-reasons__label",text:((c=e.benefitType)==null?void 0:c.name)||e.name||"",parent:p})})}function Q(m,t=[],o){if(t.length===0||!o||o<=1)return;const s=new Map;t.forEach(l=>{s.set(l,(s.get(l)||0)+1)});const r=Array.from(s.entries()).map(([l,d])=>({item:l,count:d,displayText:d>1?`${d} x ${l}`:l})).sort((l,d)=>{const b=l.item.charAt(0),w=d.item.charAt(0),k=/[a-zA-Z]/.test(b),q=/[a-zA-Z]/.test(w);return!k&&q?-1:k&&!q?1:l.item.localeCompare(d.item,void 0,{sensitivity:"base"})}),n=a("div",{className:"spot-covered-items__container",parent:m}),e=a("div",{className:"spot-covered-items__header",parent:n}),p=a("button",{className:"spot-covered-items__toggle",parent:e});a("span",{className:"spot-covered-items__title",text:`Items Covered in Your Cart (${t.length})`,parent:p});const u=a("div",{className:"spot-covered-items__right-section",parent:p});a("span",{className:"spot-covered-items__view-all",text:"View All",parent:u});const f=a("span",{className:"spot-covered-items__arrow",innerHTML:"▼",parent:u}),h=a("div",{className:"spot-covered-items__content",parent:n}),v=a("ul",{className:"spot-covered-items__list",parent:h});r.forEach(({displayText:l})=>{const d=a("li",{parent:v});a("span",{text:l,parent:d})});let c=!1;h.style.display="none",p.addEventListener("click",l=>{l.stopPropagation(),c=!c,h.style.display=c?"block":"none",f.innerHTML=c?"▲":"▼",p.setAttribute("aria-expanded",c.toString())}),p.setAttribute("aria-expanded","false"),p.setAttribute("aria-controls","covered-items-list"),h.setAttribute("id","covered-items-list")}function R(m,t=[]){const o=a("div",{className:"spot-table__container",parent:m}),s=a("table",{className:"spot-refund__table spot-table--dynamic",parent:o}),i=a("thead",{parent:s}),r=a("tr",{parent:i});a("th",{text:"When you cancel",parent:r}),a("th",{text:"You will receive",parent:r});const n=a("tbody",{parent:s});t.forEach(({text:e,percent:p,amount:u})=>{const f=a("tr",{parent:n});a("td",{text:e,parent:f});const h=p==="Not eligible for refund"?"Not eligible for a refund":`$${u} refund`;a("td",{text:h,parent:f})})}function A(m,t,o){const s=a("div",{className:"spot-selection__options",parent:m}),i=a("label",{className:`spot-selection__option ${t===y.YES?"selected":""}`,parent:s}),r=a("input",{parent:i});r.type="radio",r.name="selection",r.value=y.YES,t===y.YES&&(r.checked=!0),a("strong",{text:o.yesOptionText,parent:i}),a("span",{className:"spot-selection__recommended-tag",text:"Recommended",parent:i});const n=a("label",{className:`spot-selection__option ${t===y.NO?"selected":""}`,parent:s}),e=a("input",{parent:n});return e.type="radio",e.name="selection",e.value=y.NO,t===y.NO&&(e.checked=!0),a("span",{text:o.noOptionText,parent:n}),s}function I(m,t){var i;const o=(i=t.communication)==null?void 0:i.paymentTerms,s=a("div",{className:"spot-payment-terms",parent:m});return a("div",{className:"spot-payment-terms__header",text:"PAYMENT TERMS",parent:s}),a("div",{className:"spot-payment-terms__body",text:o||"",parent:s}),s}function Z(m,t,o="bottom-right"){if(o==="top-right"){const e=a("div",{className:"spot-logo__top-right",parent:m});e.innerHTML=`
5
+ </svg>`,a("span",{text:s,parent:i})})}function A(m,t=[]){if(!t||t.length===0)return;const o=a("div",{className:"spot-qualifying-reasons__container",parent:m}),s=[...t].sort((e,p)=>e.rank-p.rank),i=a("div",{className:"spot-qualifying-reasons__grid",parent:o}),r={"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 n;try{const e=document.currentScript;if(e!=null&&e.src){const p=new URL(e.src);n=p.origin+p.pathname.replace(/\/[^/]*$/,"/")}else n=window.location.origin+window.location.pathname.replace(/\/[^/]*$/,"/");n+="assets/"}catch{n="./assets/"}s.forEach(e=>{var g,h,c;const p=a("div",{className:"spot-qualifying-reasons__item",parent:i}),u=a("div",{className:"spot-qualifying-reasons__icon-wrapper",parent:p}),f=r[((g=e.benefitType)==null?void 0:g.name)||""]||r[e.name||""];if(f){const l=a("img",{parent:u});l.src=n+f,l.alt=((h=e.benefitType)==null?void 0:h.name)||e.name||"",l.className="spot-qualifying-reasons__icon"}a("span",{className:"spot-qualifying-reasons__label",text:((c=e.benefitType)==null?void 0:c.name)||e.name||"",parent:p})})}function R(m,t=[],o){if(t.length===0||!o||o<=1)return;const s=new Map;t.forEach(l=>{s.set(l,(s.get(l)||0)+1)});const r=Array.from(s.entries()).map(([l,d])=>({item:l,count:d,displayText:d>1?`${d} x ${l}`:l})).sort((l,d)=>{const b=l.item.charAt(0),w=d.item.charAt(0),k=/[a-zA-Z]/.test(b),q=/[a-zA-Z]/.test(w);return!k&&q?-1:k&&!q?1:l.item.localeCompare(d.item,void 0,{sensitivity:"base"})}),n=a("div",{className:"spot-covered-items__container",parent:m}),e=a("div",{className:"spot-covered-items__header",parent:n}),p=a("button",{className:"spot-covered-items__toggle",parent:e});a("span",{className:"spot-covered-items__title",text:`Items Covered in Your Cart (${t.length})`,parent:p});const u=a("div",{className:"spot-covered-items__right-section",parent:p});a("span",{className:"spot-covered-items__view-all",text:"View All",parent:u});const f=a("span",{className:"spot-covered-items__arrow",innerHTML:"▼",parent:u}),g=a("div",{className:"spot-covered-items__content",parent:n}),h=a("ul",{className:"spot-covered-items__list",parent:g});r.forEach(({displayText:l})=>{const d=a("li",{parent:h});a("span",{text:l,parent:d})});let c=!1;g.style.display="none",p.addEventListener("click",l=>{l.stopPropagation(),c=!c,g.style.display=c?"block":"none",f.innerHTML=c?"▲":"▼",p.setAttribute("aria-expanded",c.toString())}),p.setAttribute("aria-expanded","false"),p.setAttribute("aria-controls","covered-items-list"),g.setAttribute("id","covered-items-list")}const V={USD:"$",CAD:"CAD $",AUD:"AUD $",NZD:"NZD $",MXN:"MXN $",EUR:"EUR €",GBP:"GBP £",AED:"AED ",MAD:"MAD ",SAR:"SAR "};function Q(m,t=[],o="USD"){const s=V[o]??`${o} `,i=a("div",{className:"spot-table__container",parent:m}),r=a("table",{className:"spot-refund__table spot-table--dynamic",parent:i}),n=a("thead",{parent:r}),e=a("tr",{parent:n});a("th",{text:"When you cancel",parent:e}),a("th",{text:"You will receive",parent:e});const p=a("tbody",{parent:r});t.forEach(({text:u,percent:f,amount:g})=>{const h=a("tr",{parent:p});a("td",{text:u,parent:h});const c=f==="Not eligible for refund"?"Not eligible for a refund":`${s}${g} refund`;a("td",{text:c,parent:h})})}function Z(m,t,o){const s=a("div",{className:"spot-selection__options",parent:m}),i=a("label",{className:`spot-selection__option ${t===y.YES?"selected":""}`,parent:s}),r=a("input",{parent:i});r.type="radio",r.name="selection",r.value=y.YES,t===y.YES&&(r.checked=!0),a("strong",{text:o.yesOptionText,parent:i}),a("span",{className:"spot-selection__recommended-tag",text:"Recommended",parent:i});const n=a("label",{className:`spot-selection__option ${t===y.NO?"selected":""}`,parent:s}),e=a("input",{parent:n});return e.type="radio",e.name="selection",e.value=y.NO,t===y.NO&&(e.checked=!0),a("span",{text:o.noOptionText,parent:n}),s}function I(m,t){var s;const o=(s=t.communication)==null?void 0:s.paymentTerms;if(o){const i=a("div",{className:"spot-payment-terms",parent:m});return a("div",{className:"spot-payment-terms__header",text:"PAYMENT TERMS",parent:i}),a("div",{className:"spot-payment-terms__body",text:o||"",parent:i}),i}}function U(m,t,o="bottom-right"){if(o==="top-right"){const e=a("div",{className:"spot-logo__top-right",parent:m});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
  <rect width="145" height="28"/>
8
8
  <rect x="-655" y="-270" width="819" height="325" rx="10"/>
@@ -32,4 +32,4 @@
32
32
  <rect width="45.405" height="14.8867" fill="white" transform="translate(87 8)"/>
33
33
  </clipPath>
34
34
  </defs>
35
- </svg>`}return s}const U=":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-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-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__options{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__options{grid-row:3;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;padding-left:.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)}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-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);margin-right:.5rem;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:40px;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:1.25rem;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-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 j(m){const t=document.createElement("style");t.textContent=m,document.head.appendChild(t)}j(U);const H={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 B{constructor(t={}){this.options={location:"body",showTable:!0,logoPosition:"bottom-right",apiConfig:{environment:"production",partnerId:""},quoteRequestData:{},callbacks:{},useMockData:!1,...t,selection:t.selection??y.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,o,s,i,r;try{D(this.options);let n;if(this.options.useMockData&&this.options.mockData)n=this.options.mockData;else{const{environment:e,partnerId:p}=this.options.apiConfig,f=this.options.apiConfig.customEndpoint||H[e];n="items"in this.options.quoteRequestData?await T(f,p,this.options.quoteRequestData):await E(f,p,this.options.quoteRequestData)}if(n.status!=="QUOTE_AVAILABLE"){n.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=n.data,!this.quote)throw new Error("No quote data in response");if(this._renderWidget(),this.options.selection===y.YES&&((o=this.options.callbacks)!=null&&o.onOptIn)){const e={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;e.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var h;const f=(h=p.items)==null?void 0:h.find(v=>(v.cartItemId||`item-${p.items.indexOf(v)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(f==null?void 0:f.productPrice)||u.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(n){if((i=this.options.callbacks)!=null&&i.onError){const e=n;(r=this.options.callbacks)==null||r.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(([s,i])=>{const r=`--${s}`;this.container.style.setProperty(r,i)}),P(this.container,this.quote.communication);const t=document.createElement("div");if(t.className="spot-content__wrapper",this.container.appendChild(t),this.quote.qualifyingReasons?V(t,this.quote.qualifyingReasons):$(t,this.quote.communication.bulletPoints),this.quote.coveredItems){const s=this._getTotalItemsInRequest();Q(t,this.quote.coveredItems,s)}this.options.showTable&&!this.quote.qualifyingReasons&&R(t,this.quote.payoutSchedule);const o=A(t,this.options.selection,this.quote.communication);t.appendChild(o),this.paymentTermsEl=a("div",{className:"spot-payment-terms__wrapper",parent:t}),this.currentSelection===y.YES&&I(this.paymentTermsEl,this.quote),Z(this.container,this.quote,this.options.logoPosition),window.addEventListener("resize",this._onResize),this._setupResizeObserver(),this._updateLayout(),this._setupOptionListeners(o)}_updateLayout(){if(!this.container||!this.quote)return;const t=this.container.querySelector(".spot-content__wrapper"),o=this.options.showTable&&!this.quote.qualifyingReasons;if(!t||!o){t==null||t.classList.remove("desktop-layout");return}const s=this._shouldUseDesktopLayout(t);t.classList.toggle("desktop-layout",s)}_shouldUseDesktopLayout(t){const o=this.container.offsetWidth-40,s=325,i=16;if(o>=900)return!0;if(o>=650){const r=t.classList.contains("desktop-layout");t.classList.remove("desktop-layout"),t.offsetHeight;const n=t.querySelector(".spot-benefits__list, .spot-qualifying-reasons__container");if(!n)return r&&t.classList.add("desktop-layout"),r;const p=Math.min(n.scrollWidth,400)+s+i;return r&&t.classList.add("desktop-layout"),o>=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.destroy(),this._renderWidget())}_setupOptionListeners(t){const o=t.querySelectorAll('input[type="radio"]'),s=t.querySelectorAll(".spot-selection__option");o.forEach(i=>{i.addEventListener("change",r=>{var p,u,f,h;const n=r.target,e=n.value;if(this.hideSelectionError(),this.currentSelection=e,s.forEach(v=>v.classList.remove("selected")),(p=n.closest(".spot-selection__option"))==null||p.classList.add("selected"),this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""),e===y.YES&&((u=this.quote)!=null&&u.communication.paymentTerms&&I(this.paymentTermsEl,this.quote),(f=this.options.callbacks)!=null&&f.onOptIn)){const v={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const c=this.options.quoteRequestData;v.batchQuoteDetails=this.quote.originalQuotes.map(l=>{var b;const d=(b=c.items)==null?void 0:b.find(w=>(w.cartItemId||`item-${c.items.indexOf(w)+1}`)===l.cartItemId);return{quoteId:l.id,productPrice:(d==null?void 0:d.productPrice)||l.spotPrice,cartItemId:(d==null?void 0:d.cartItemId)||""}})}this.options.callbacks.onOptIn(v)}if(e===y.NO&&((h=this.options.callbacks)!=null&&h.onOptOut)){const v={status:"QUOTE_DECLINED",quoteId:this.quote.id};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const c=this.options.quoteRequestData;v.batchQuoteDetails=this.quote.originalQuotes.map(l=>{var b;const d=(b=c.items)==null?void 0:b.find(w=>(w.cartItemId||`item-${c.items.indexOf(w)+1}`)===l.cartItemId);return{quoteId:l.id,productPrice:(d==null?void 0:d.productPrice)||l.spotPrice,cartItemId:(d==null?void 0:d.cartItemId)||""}})}this.options.callbacks.onOptOut(v)}})})}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 o=(t=this.container)==null?void 0:t.querySelector(".spot-selection__options");o&&o.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 o,s,i,r;try{const n={...this.options,quoteRequestData:t};D(n);const{environment:e,partnerId:p,customEndpoint:u}=this.options.apiConfig,f=u||H[e],v="items"in n.quoteRequestData?await T(f,p,n.quoteRequestData):await E(f,p,n.quoteRequestData);if(v.status!=="QUOTE_AVAILABLE")return this.destroy(),v.status==="NO_MATCHING_QUOTE"&&((o=this.options.callbacks)!=null&&o.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:n.quoteRequestData}),!1;if(this.options.quoteRequestData=n.quoteRequestData,this.quote=v.data,this.currentSelection=y.UNSELECTED,this.destroy(),this._renderWidget(),(s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const c=this.options.callbacks.onQuoteRetrieved(this.quote);c&&this._applyQuoteUpdates(c)}return!0}catch(n){const e=n;return(r=(i=this.options.callbacks)==null?void 0:i.onError)==null||r.call(i,{message:e.message,status:e.status,responseBody:e.responseBody}),!1}}getSelection(){var o,s,i;if(this.currentSelection==null||this.currentSelection==y.UNSELECTED)return null;const t={selection:this.currentSelection,quoteId:(o=this.quote)==null?void 0:o.id,spotPrice:(s=this.quote)==null?void 0:s.spotPrice,status:this.currentSelection===y.YES?"QUOTE_ACCEPTED":"QUOTE_DECLINED"};if((i=this.quote)!=null&&i.originalQuotes&&this.quote.originalQuotes.length>0){const r=this.options.quoteRequestData;t.batchQuoteDetails=this.quote.originalQuotes.map(n=>{var p;const e=(p=r.items)==null?void 0:p.find(u=>(u.cartItemId||`item-${r.items.indexOf(u)+1}`)===n.cartItemId);return{quoteId:n.id,productPrice:(e==null?void 0:e.productPrice)||n.spotPrice,cartItemId:(e==null?void 0:e.cartItemId)||""}})}return t}destroy(){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.SelectionEnum=y,C.default=B,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
35
+ </svg>`}return s}const B=":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-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-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__options{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__options{grid-row:3;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;padding-left:.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)}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-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);margin-right:.5rem;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:40px;z-index:10;background:linear-gradient(to bottom,transparent 50%,inherit 50%);padding:0 .25rem}.spot-logo__top-right svg{border-radius:1.25rem;border:var(--spot-border-line-width) solid var(--spot-border-color);display:block;background:var(--spot-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 j(m){const t=document.createElement("style");t.textContent=m,document.head.appendChild(t)}j(B);const H={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 F{constructor(t={}){this.options={location:"body",showTable:!0,logoPosition:"bottom-right",apiConfig:{environment:"production",partnerId:""},quoteRequestData:{},callbacks:{},useMockData:!1,...t,selection:t.selection??y.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,o,s,i,r;try{T(this.options);let n;if(this.options.useMockData&&this.options.mockData)n=this.options.mockData;else{const{environment:e,partnerId:p}=this.options.apiConfig,f=this.options.apiConfig.customEndpoint||H[e];n="items"in this.options.quoteRequestData?await D(f,p,this.options.quoteRequestData):await E(f,p,this.options.quoteRequestData)}if(n.status!=="QUOTE_AVAILABLE"){n.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=n.data,!this.quote)throw new Error("No quote data in response");if(this._renderWidget(),this.options.selection===y.YES&&((o=this.options.callbacks)!=null&&o.onOptIn)){const e={status:"QUOTE_ACCEPTED",spotPrice:this.quote.spotPrice,quoteId:this.quote.id};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const p=this.options.quoteRequestData;e.batchQuoteDetails=this.quote.originalQuotes.map(u=>{var g;const f=(g=p.items)==null?void 0:g.find(h=>(h.cartItemId||`item-${p.items.indexOf(h)+1}`)===u.cartItemId);return{quoteId:u.id,productPrice:(f==null?void 0:f.productPrice)||u.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(n){if((i=this.options.callbacks)!=null&&i.onError){const e=n;(r=this.options.callbacks)==null||r.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(([s,i])=>{const r=`--${s}`;this.container.style.setProperty(r,i)}),$(this.container,this.quote.communication);const t=document.createElement("div");if(t.className="spot-content__wrapper",this.container.appendChild(t),this.quote.qualifyingReasons?A(t,this.quote.qualifyingReasons):P(t,this.quote.communication.bulletPoints),this.quote.coveredItems){const s=this._getTotalItemsInRequest();R(t,this.quote.coveredItems,s)}this.options.showTable&&!this.quote.qualifyingReasons&&Q(t,this.quote.payoutSchedule,this.quote.currencyCode);const o=Z(t,this.options.selection,this.quote.communication);t.appendChild(o),this.paymentTermsEl=a("div",{className:"spot-payment-terms__wrapper",parent:t}),this.currentSelection===y.YES&&I(this.paymentTermsEl,this.quote),U(this.container,this.quote,this.options.logoPosition),window.addEventListener("resize",this._onResize),this._setupResizeObserver(),this._updateLayout(),this._setupOptionListeners(o)}_updateLayout(){if(!this.container||!this.quote)return;const t=this.container.querySelector(".spot-content__wrapper"),o=this.options.showTable&&!this.quote.qualifyingReasons;if(!t||!o){t==null||t.classList.remove("desktop-layout");return}const s=this._shouldUseDesktopLayout(t);t.classList.toggle("desktop-layout",s)}_shouldUseDesktopLayout(t){const o=this.container.offsetWidth-40,s=325,i=16;if(o>=900)return!0;if(o>=650){const r=t.classList.contains("desktop-layout");t.classList.remove("desktop-layout"),t.offsetHeight;const n=t.querySelector(".spot-benefits__list, .spot-qualifying-reasons__container");if(!n)return r&&t.classList.add("desktop-layout"),r;const p=Math.min(n.scrollWidth,400)+s+i;return r&&t.classList.add("desktop-layout"),o>=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.destroy(),this._renderWidget())}_setupOptionListeners(t){const o=t.querySelectorAll('input[type="radio"]'),s=t.querySelectorAll(".spot-selection__option");o.forEach(i=>{i.addEventListener("change",r=>{var p,u,f,g;const n=r.target,e=n.value;if(this.hideSelectionError(),this.currentSelection=e,s.forEach(h=>h.classList.remove("selected")),(p=n.closest(".spot-selection__option"))==null||p.classList.add("selected"),this.paymentTermsEl&&(this.paymentTermsEl.innerHTML=""),e===y.YES&&((u=this.quote)!=null&&u.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};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const c=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(l=>{var b;const d=(b=c.items)==null?void 0:b.find(w=>(w.cartItemId||`item-${c.items.indexOf(w)+1}`)===l.cartItemId);return{quoteId:l.id,productPrice:(d==null?void 0:d.productPrice)||l.spotPrice,cartItemId:(d==null?void 0:d.cartItemId)||""}})}this.options.callbacks.onOptIn(h)}if(e===y.NO&&((g=this.options.callbacks)!=null&&g.onOptOut)){const h={status:"QUOTE_DECLINED",quoteId:this.quote.id};if(this.quote.originalQuotes&&this.quote.originalQuotes.length>0){const c=this.options.quoteRequestData;h.batchQuoteDetails=this.quote.originalQuotes.map(l=>{var b;const d=(b=c.items)==null?void 0:b.find(w=>(w.cartItemId||`item-${c.items.indexOf(w)+1}`)===l.cartItemId);return{quoteId:l.id,productPrice:(d==null?void 0:d.productPrice)||l.spotPrice,cartItemId:(d==null?void 0:d.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 o=(t=this.container)==null?void 0:t.querySelector(".spot-selection__options");o&&o.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 o,s,i,r;try{const n={...this.options,quoteRequestData:t};T(n);const{environment:e,partnerId:p,customEndpoint:u}=this.options.apiConfig,f=u||H[e],h="items"in n.quoteRequestData?await D(f,p,n.quoteRequestData):await E(f,p,n.quoteRequestData);if(h.status!=="QUOTE_AVAILABLE")return this.destroy(),h.status==="NO_MATCHING_QUOTE"&&((o=this.options.callbacks)!=null&&o.noMatchingQuote)&&this.options.callbacks.noMatchingQuote({status:"NO_MATCHING_QUOTE",data:n.quoteRequestData}),!1;if(this.options.quoteRequestData=n.quoteRequestData,this.quote=h.data,this.currentSelection=y.UNSELECTED,this.destroy(),this._renderWidget(),(s=this.options.callbacks)!=null&&s.onQuoteRetrieved){const c=this.options.callbacks.onQuoteRetrieved(this.quote);c&&this._applyQuoteUpdates(c)}return!0}catch(n){const e=n;return(r=(i=this.options.callbacks)==null?void 0:i.onError)==null||r.call(i,{message:e.message,status:e.status,responseBody:e.responseBody}),!1}}getSelection(){var o,s,i;if(this.currentSelection==null||this.currentSelection==y.UNSELECTED)return null;const t={selection:this.currentSelection,quoteId:(o=this.quote)==null?void 0:o.id,spotPrice:(s=this.quote)==null?void 0:s.spotPrice,status:this.currentSelection===y.YES?"QUOTE_ACCEPTED":"QUOTE_DECLINED"};if((i=this.quote)!=null&&i.originalQuotes&&this.quote.originalQuotes.length>0){const r=this.options.quoteRequestData;t.batchQuoteDetails=this.quote.originalQuotes.map(n=>{var p;const e=(p=r.items)==null?void 0:p.find(u=>(u.cartItemId||`item-${r.items.indexOf(u)+1}`)===n.cartItemId);return{quoteId:n.id,productPrice:(e==null?void 0:e.productPrice)||n.spotPrice,cartItemId:(e==null?void 0:e.cartItemId)||""}})}return t}destroy(){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.SelectionEnum=y,C.default=F,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/types.d.ts CHANGED
@@ -21,7 +21,7 @@ export interface QuoteItem {
21
21
  participantDescription?: string;
22
22
  eventType: string;
23
23
  eventId?: string;
24
- currencyCode: "USD" | "CAD" | "AUD";
24
+ currencyCode: "USD" | "CAD" | "AUD" | "NZD" | "EUR" | "MXN" | "AED" | "GBP" | "MAD" | "SAR";
25
25
  startDate: string;
26
26
  endDate: string;
27
27
  partnerRiskEnd?: Date;
@@ -40,7 +40,7 @@ export interface BatchQuoteItem extends BatchItem {
40
40
  export interface BatchQuoteRequest {
41
41
  cartId: string;
42
42
  cartName: string;
43
- currencyCode: "USD" | "CAD" | "AUD";
43
+ currencyCode: "USD" | "CAD" | "AUD" | "NZD" | "EUR" | "MXN" | "AED" | "GBP" | "MAD" | "SAR";
44
44
  metadata?: QuoteMetadata;
45
45
  isPartialPayment?: boolean;
46
46
  roundTo?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,CAAC;IAC9C,eAAe,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,C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IAAI,EAAE,gBAAgB,CAAA;KAAE,KAAK,IAAI,CAAC;CAC9E;AAED,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,UAAU,eAAe;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC;IAC5C,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB;AAED,MAAM,WAAW,QAAS,SAAQ,KAAK;IACrC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
package/dist/ui.d.ts CHANGED
@@ -4,8 +4,8 @@ export declare function renderHeader(container: HTMLElement, { name, description
4
4
  export declare function renderBenefits(container: HTMLElement, bullets?: string[]): void;
5
5
  export declare function renderQualifyingReasons(container: HTMLElement, qualifyingReasons?: QualifyingReason[]): void;
6
6
  export declare function renderCoveredItems(container: HTMLElement, coveredItems?: string[], totalItemsInRequest?: number): void;
7
- export declare function renderTable(container: HTMLElement, schedule?: PayoutScheduleItem[]): void;
7
+ export declare function renderTable(container: HTMLElement, schedule?: PayoutScheduleItem[], currencyCode?: string): void;
8
8
  export declare function renderOptions(container: HTMLElement, selection: SelectionEnum, communication: Communication): HTMLElement;
9
- export declare function renderPaymentTerms(container: HTMLElement, quote: Quote): HTMLElement;
9
+ export declare function renderPaymentTerms(container: HTMLElement, quote: Quote): HTMLElement | void;
10
10
  export declare function renderFooter(container: HTMLElement, quote: Quote, logoPosition?: "bottom-right" | "top-right"): HTMLElement;
11
11
  //# sourceMappingURL=ui.d.ts.map
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;AAEpB,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,WA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