@getspot/spot-widget 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,110 +1,168 @@
1
- async function I(m, t, o) {
1
+ async function N(c, t, r, s) {
2
2
  try {
3
- const s = await fetch(m, {
3
+ const i = s ? { ...r, state: s } : r, a = await fetch(c, {
4
4
  method: "POST",
5
5
  headers: {
6
6
  "Content-Type": "application/json",
7
7
  "X-Spot-Partner-Id": t
8
8
  },
9
- body: JSON.stringify(o)
10
- }), i = await s.json();
11
- if (!s.ok) {
12
- const r = new Error((i == null ? void 0 : i.message) || "Failed to fetch quote");
13
- throw r.status = s.status, r.responseBody = i, r;
9
+ body: JSON.stringify(i)
10
+ }), e = await a.json();
11
+ if (!a.ok) {
12
+ const o = new Error((e == null ? void 0 : e.message) || "Failed to fetch quote");
13
+ throw o.status = a.status, o.responseBody = e, o;
14
14
  }
15
- return i;
16
- } catch (s) {
17
- throw s instanceof Error ? s : new Error("Unknown error occurred while fetching quote");
15
+ return e;
16
+ } catch (i) {
17
+ throw i instanceof Error ? i : new Error("Unknown error occurred while fetching quote");
18
18
  }
19
19
  }
20
- async function L(m, t, o) {
20
+ async function L(c, t, r) {
21
21
  try {
22
- const s = m.replace("/quote", "/quote/batch"), i = await fetch(s, {
22
+ const s = c.replace("/quote", "/quote/batch"), i = await fetch(s, {
23
23
  method: "POST",
24
24
  headers: {
25
25
  "Content-Type": "application/json",
26
26
  "X-Spot-Partner-Id": t
27
27
  },
28
- body: JSON.stringify(o)
29
- }), r = await i.json();
28
+ body: JSON.stringify(r)
29
+ }), a = await i.json();
30
30
  if (!i.ok) {
31
- const n = new Error((r == null ? void 0 : r.message) || "Failed to fetch batch quote");
32
- throw n.status = i.status, n.responseBody = r, n;
31
+ const e = new Error((a == null ? void 0 : a.message) || "Failed to fetch batch quote");
32
+ throw e.status = i.status, e.responseBody = a, e;
33
33
  }
34
- return r;
34
+ return a;
35
35
  } catch (s) {
36
36
  throw s instanceof Error ? s : new Error("Unknown error occurred while fetching batch quote");
37
37
  }
38
38
  }
39
- async function H(m, t, o) {
40
- var s;
39
+ async function I(c, t, r, s) {
40
+ var i;
41
41
  try {
42
- const i = {
43
- ...o,
44
- isPartialPayment: o.isPartialPayment || !1,
45
- roundTo: o.roundTo || void 0,
46
- items: o.items.map((p, u) => ({
47
- ...p,
48
- cartItemId: p.cartItemId || `item-${u + 1}`
42
+ const a = {
43
+ ...r,
44
+ ...s ? { state: s } : {},
45
+ isPartialPayment: r.isPartialPayment || !1,
46
+ roundTo: r.roundTo || void 0,
47
+ items: r.items.map((m, f) => ({
48
+ ...m,
49
+ cartItemId: m.cartItemId || `item-${f + 1}`
49
50
  }))
50
- }, r = await L(m, t, i);
51
- if (r.status !== "QUOTES_AVAILABLE" && r.status !== "QUOTE_AVAILABLE")
51
+ }, e = await L(c, t, a);
52
+ if (e.status !== "QUOTES_AVAILABLE" && e.status !== "QUOTE_AVAILABLE")
52
53
  return { status: "NO_MATCHING_QUOTE" };
53
- const n = r.quotes.map((p) => {
54
- const u = o.items.find(
55
- (f, g) => (f.cartItemId || `item-${g + 1}`) === p.cartItemId
54
+ const o = e.quotes.map((m) => {
55
+ const f = r.items.find(
56
+ (g, h) => (g.cartItemId || `item-${h + 1}`) === m.cartItemId
56
57
  );
57
- return u ? u.participantDescription ? `${u.productName} - ${u.participantDescription}` : u.productName : `Item ${p.id}`;
58
- }), e = Math.round((r.totalSpotPrice || r.spotPrice || 0) * 100) / 100;
58
+ return f ? f.participantDescription ? `${f.productName} - ${f.participantDescription}` : f.productName : `Item ${m.id}`;
59
+ }), l = Math.round((e.totalSpotPrice || e.spotPrice || 0) * 100) / 100;
59
60
  return {
60
61
  status: "QUOTE_AVAILABLE",
61
62
  data: {
62
- id: r.quotes ? r.quotes.map((p) => p.id).join(",") : ((s = r.data) == null ? void 0 : s.id) || "",
63
- spotPrice: e,
64
- currencyCode: r.currencyCode || "",
63
+ id: e.quotes ? e.quotes.map((m) => m.id).join(",") : ((i = e.data) == null ? void 0 : i.id) || "",
64
+ spotPrice: l,
65
+ currencyCode: e.currencyCode || "",
65
66
  communication: {
66
- ...r.communication,
67
- yesOptionText: r.communication.yesOptionText.replace(
68
- String(r.totalSpotPrice),
69
- String(e)
67
+ ...e.communication,
68
+ yesOptionText: e.communication.yesOptionText.replace(
69
+ String(e.totalSpotPrice),
70
+ String(l)
70
71
  )
71
72
  },
72
- payoutSchedule: r.payoutSchedule.map((p) => ({
73
- ...p,
74
- amount: p.amount !== void 0 ? p.amount : 0
73
+ payoutSchedule: e.payoutSchedule.map((m) => ({
74
+ ...m,
75
+ amount: m.amount !== void 0 ? m.amount : 0
75
76
  })),
76
- coveredItems: n,
77
- originalQuotes: r.quotes || (r.data ? [r.data] : [])
77
+ coveredItems: o,
78
+ originalQuotes: e.quotes || (e.data ? [e.data] : [])
78
79
  },
79
- spotPrice: e,
80
- coveredItems: n
80
+ spotPrice: l,
81
+ coveredItems: o
81
82
  };
82
- } catch (i) {
83
- throw i instanceof Error ? i : new Error("Unknown error occurred while fetching multiple quotes");
83
+ } catch (a) {
84
+ throw a instanceof Error ? a : new Error("Unknown error occurred while fetching multiple quotes");
84
85
  }
85
86
  }
86
- const O = {
87
+ const k = "non-us-resident", z = [
88
+ { value: "AL", label: "Alabama" },
89
+ { value: "AK", label: "Alaska" },
90
+ { value: "AS", label: "American Samoa" },
91
+ { value: "AZ", label: "Arizona" },
92
+ { value: "AR", label: "Arkansas" },
93
+ { value: "CA", label: "California" },
94
+ { value: "CO", label: "Colorado" },
95
+ { value: "CT", label: "Connecticut" },
96
+ { value: "DE", label: "Delaware" },
97
+ { value: "DC", label: "District of Columbia" },
98
+ { value: "FL", label: "Florida" },
99
+ { value: "GA", label: "Georgia" },
100
+ { value: "GU", label: "Guam" },
101
+ { value: "HI", label: "Hawaii" },
102
+ { value: "ID", label: "Idaho" },
103
+ { value: "IL", label: "Illinois" },
104
+ { value: "IN", label: "Indiana" },
105
+ { value: "IA", label: "Iowa" },
106
+ { value: "KS", label: "Kansas" },
107
+ { value: "KY", label: "Kentucky" },
108
+ { value: "LA", label: "Louisiana" },
109
+ { value: "ME", label: "Maine" },
110
+ { value: "MD", label: "Maryland" },
111
+ { value: "MA", label: "Massachusetts" },
112
+ { value: "MI", label: "Michigan" },
113
+ { value: "MN", label: "Minnesota" },
114
+ { value: "MS", label: "Mississippi" },
115
+ { value: "MO", label: "Missouri" },
116
+ { value: "MT", label: "Montana" },
117
+ { value: "NE", label: "Nebraska" },
118
+ { value: "NV", label: "Nevada" },
119
+ { value: "NH", label: "New Hampshire" },
120
+ { value: "NJ", label: "New Jersey" },
121
+ { value: "NM", label: "New Mexico" },
122
+ { value: "NY", label: "New York" },
123
+ { value: "NC", label: "North Carolina" },
124
+ { value: "ND", label: "North Dakota" },
125
+ { value: "MP", label: "Northern Mariana Islands" },
126
+ { value: "OH", label: "Ohio" },
127
+ { value: "OK", label: "Oklahoma" },
128
+ { value: "OR", label: "Oregon" },
129
+ { value: "PA", label: "Pennsylvania" },
130
+ { value: "PR", label: "Puerto Rico" },
131
+ { value: "RI", label: "Rhode Island" },
132
+ { value: "SC", label: "South Carolina" },
133
+ { value: "SD", label: "South Dakota" },
134
+ { value: "TN", label: "Tennessee" },
135
+ { value: "TX", label: "Texas" },
136
+ { value: "VI", label: "U.S. Virgin Islands" },
137
+ { value: "UT", label: "Utah" },
138
+ { value: "VT", label: "Vermont" },
139
+ { value: "VA", label: "Virginia" },
140
+ { value: "WA", label: "Washington" },
141
+ { value: "WV", label: "West Virginia" },
142
+ { value: "WI", label: "Wisconsin" },
143
+ { value: "WY", label: "Wyoming" }
144
+ ], O = new Set(z.map((c) => c.value)), P = {
87
145
  sandbox: "https://api.sandbox.getspot.com/v1/quote",
88
146
  production: "https://api.getspot.com/v1/quote",
89
147
  local: "http://localhost:3999/api/v1/quote"
90
148
  };
91
- function N(m) {
149
+ function M(c) {
92
150
  const {
93
151
  apiConfig: t = {},
94
- quoteRequestData: o,
152
+ quoteRequestData: r,
95
153
  callbacks: s = {},
96
154
  location: i,
97
- theme: r
98
- } = m, {
99
- environment: n = "sandbox",
100
- partnerId: e,
101
- customEndpoint: p
155
+ theme: a
156
+ } = c, {
157
+ environment: e = "sandbox",
158
+ partnerId: o,
159
+ customEndpoint: l
102
160
  } = t;
103
- if (!e || typeof e != "string")
161
+ if (!o || typeof o != "string")
104
162
  throw new Error("Invalid or missing partnerId in apiConfig");
105
- if (!(p || O[n]))
106
- throw new Error(`Invalid environment in apiConfig: ${n}`);
107
- if (!o || typeof o != "object" && !Array.isArray(o))
163
+ if (!(l || P[e]))
164
+ throw new Error(`Invalid environment in apiConfig: ${e}`);
165
+ if (!r || typeof r != "object" && !Array.isArray(r))
108
166
  throw new Error("quoteRequestData must be a non-null object or array");
109
167
  const f = [
110
168
  "startDate",
@@ -118,49 +176,49 @@ function N(m) {
118
176
  "cartId",
119
177
  "productName"
120
178
  ];
121
- function g(c, l = null) {
122
- const d = l !== null ? `quoteRequestData[${l}]` : "quoteRequestData";
179
+ function g(p, u = null) {
180
+ const d = u !== null ? `quoteRequestData[${u}]` : "quoteRequestData";
123
181
  f.forEach((v) => {
124
- if (!Object.prototype.hasOwnProperty.call(c, v) || c[v] === void 0 || c[v] === null)
182
+ if (!Object.prototype.hasOwnProperty.call(p, v) || p[v] === void 0 || p[v] === null)
125
183
  throw new Error(`Missing required ${d} field: '${v}'`);
126
184
  });
127
185
  const y = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
128
- if (!y.test(c.startDate))
186
+ if (!y.test(p.startDate))
129
187
  throw new Error(`${d}.startDate must be a valid ISO8601 string`);
130
- if (!y.test(c.endDate))
188
+ if (!y.test(p.endDate))
131
189
  throw new Error(`${d}.endDate must be a valid ISO8601 string`);
132
- if (typeof c.currencyCode != "string")
190
+ if (typeof p.currencyCode != "string")
133
191
  throw new Error(`${d}.currencyCode must be a string`);
134
- if (!["USD", "CAD", "AUD", "NZD", "EUR", "MXN", "AED", "GBP", "MAD", "SAR"].includes(c.currencyCode))
135
- throw new Error(`Invalid ${d}.currencyCode: ${c.currencyCode}`);
136
- if (typeof c.eventType != "string")
192
+ if (!["USD", "CAD", "AUD", "NZD", "EUR", "MXN", "AED", "GBP", "MAD", "SAR"].includes(p.currencyCode))
193
+ throw new Error(`Invalid ${d}.currencyCode: ${p.currencyCode}`);
194
+ if (typeof p.eventType != "string")
137
195
  throw new Error(`${d}.eventType must be a string`);
138
- if (typeof c.productType != "string")
196
+ if (typeof p.productType != "string")
139
197
  throw new Error(`${d}.productType must be a string`);
140
198
  const q = ["Pass", "Trip", "Registration"];
141
- if (!q.includes(c.productType))
199
+ if (!q.includes(p.productType))
142
200
  throw new Error(
143
201
  `${d}.productType must be one of ${q.join(", ")}`
144
202
  );
145
- if (typeof c.productDuration != "string")
203
+ if (typeof p.productDuration != "string")
146
204
  throw new Error(`${d}.productDuration must be a string`);
147
205
  const C = ["Daily", "Seasonal", "Trip", "Event"];
148
- if (!C.includes(c.productDuration))
206
+ if (!C.includes(p.productDuration))
149
207
  throw new Error(
150
208
  `${d}.productDuration must be one of ${C.join(", ")}`
151
209
  );
152
- if (typeof c.productPrice != "number" || isNaN(c.productPrice))
210
+ if (typeof p.productPrice != "number" || isNaN(p.productPrice))
153
211
  throw new Error(`${d}.productPrice must be a valid number`);
154
- if (typeof c.productId != "string")
212
+ if (typeof p.productId != "string")
155
213
  throw new Error(`${d}.productId must be a string`);
156
- if (typeof c.cartId != "string")
214
+ if (typeof p.cartId != "string")
157
215
  throw new Error(`${d}.cartId must be a string`);
158
- if (typeof c.productName != "string")
216
+ if (typeof p.productName != "string")
159
217
  throw new Error(`${d}.productName must be a string`);
160
218
  }
161
- if ("items" in o) {
162
- const c = o, { cartId: l, cartName: d, currencyCode: y, items: w } = c;
163
- if (!l || typeof l != "string")
219
+ if ("items" in r) {
220
+ const p = r, { cartId: u, cartName: d, currencyCode: y, items: w } = p;
221
+ if (!u || typeof u != "string")
164
222
  throw new Error("quoteRequestData.cartId must be a string");
165
223
  if (!d || typeof d != "string")
166
224
  throw new Error("quoteRequestData.cartName must be a string");
@@ -180,31 +238,31 @@ function N(m) {
180
238
  "productId",
181
239
  "productName"
182
240
  ];
183
- w.forEach((v, k) => {
241
+ w.forEach((v, x) => {
184
242
  if (!v || typeof v != "object")
185
- throw new Error(`quoteRequestData.items[${k}] must be a non-null object`);
186
- const _ = `quoteRequestData.items[${k}]`;
243
+ throw new Error(`quoteRequestData.items[${x}] must be a non-null object`);
244
+ const _ = `quoteRequestData.items[${x}]`;
187
245
  C.forEach((E) => {
188
246
  if (!Object.prototype.hasOwnProperty.call(v, E) || v[E] === void 0 || v[E] === null)
189
247
  throw new Error(`Missing required ${_} field: '${E}'`);
190
248
  });
191
- const x = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
192
- if (!x.test(v.startDate))
249
+ const D = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;
250
+ if (!D.test(v.startDate))
193
251
  throw new Error(`${_}.startDate must be a valid ISO8601 string`);
194
- if (!x.test(v.endDate))
252
+ if (!D.test(v.endDate))
195
253
  throw new Error(`${_}.endDate must be a valid ISO8601 string`);
196
254
  if (typeof v.eventType != "string")
197
255
  throw new Error(`${_}.eventType must be a string`);
198
256
  if (typeof v.productType != "string")
199
257
  throw new Error(`${_}.productType must be a string`);
200
- const D = ["Pass", "Trip", "Registration"];
201
- if (!D.includes(v.productType))
202
- throw new Error(`${_}.productType must be one of ${D.join(", ")}`);
258
+ const T = ["Pass", "Trip", "Registration"];
259
+ if (!T.includes(v.productType))
260
+ throw new Error(`${_}.productType must be one of ${T.join(", ")}`);
203
261
  if (typeof v.productDuration != "string")
204
262
  throw new Error(`${_}.productDuration must be a string`);
205
- const T = ["Daily", "Seasonal", "Trip", "Event"];
206
- if (!T.includes(v.productDuration))
207
- throw new Error(`${_}.productDuration must be one of ${T.join(", ")}`);
263
+ const S = ["Daily", "Seasonal", "Trip", "Event"];
264
+ if (!S.includes(v.productDuration))
265
+ throw new Error(`${_}.productDuration must be one of ${S.join(", ")}`);
208
266
  if (typeof v.productPrice != "number" || isNaN(v.productPrice))
209
267
  throw new Error(`${_}.productPrice must be a valid number`);
210
268
  if (typeof v.productId != "string")
@@ -212,72 +270,74 @@ function N(m) {
212
270
  if (typeof v.productName != "string")
213
271
  throw new Error(`${_}.productName must be a string`);
214
272
  });
215
- } else if (Array.isArray(o)) {
216
- if (o.length === 0)
273
+ } else if (Array.isArray(r)) {
274
+ if (r.length === 0)
217
275
  throw new Error("quoteRequestData array cannot be empty");
218
- o.forEach((c, l) => {
219
- if (!c || typeof c != "object")
220
- throw new Error(`quoteRequestData[${l}] must be a non-null object`);
221
- g(c, l);
276
+ r.forEach((p, u) => {
277
+ if (!p || typeof p != "object")
278
+ throw new Error(`quoteRequestData[${u}] must be a non-null object`);
279
+ g(p, u);
222
280
  });
223
281
  } else
224
- g(o);
282
+ g(r);
225
283
  if ([
226
284
  "onOptIn",
227
285
  "onOptOut",
228
286
  "onQuoteRetrieved",
229
287
  "onError",
230
288
  "noMatchingQuote"
231
- ].forEach((c) => {
232
- const l = s[c];
233
- if (l && typeof l != "function")
234
- throw new Error(`Callback '${c}' must be a function.`);
289
+ ].forEach((p) => {
290
+ const u = s[p];
291
+ if (u && typeof u != "function")
292
+ throw new Error(`Callback '${p}' must be a function.`);
235
293
  }), typeof i == "string" && !document.querySelector(i))
236
294
  throw new Error(`Invalid location selector: '${i}'`);
237
- if (r && typeof r != "object")
295
+ if (a && typeof a != "object")
238
296
  throw new Error(
239
297
  "Theme must be an object with CSS variables, do not include the '--' prefix"
240
298
  );
299
+ if (c.state && !O.has(c.state))
300
+ throw new Error(`Invalid state: '${c.state}'. Must be a 2-character US state or territory code.`);
241
301
  }
242
- var b = /* @__PURE__ */ ((m) => (m.YES = "yes", m.NO = "no", m.UNSELECTED = "unselected", m))(b || {});
243
- function a(m, { text: t, className: o, parent: s, innerHTML: i, href: r, target: n } = {}) {
244
- const e = document.createElement(m);
245
- 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;
302
+ var b = /* @__PURE__ */ ((c) => (c.YES = "yes", c.NO = "no", c.UNSELECTED = "unselected", c))(b || {});
303
+ function n(c, { text: t, className: r, parent: s, innerHTML: i, href: a, target: e } = {}) {
304
+ const o = document.createElement(c);
305
+ return r && (o.className = r), t != null && (o.textContent = t), i != null && (o.innerHTML = i), a && "href" in o && (o.href = a), e && "target" in o && (o.target = e), s && s.appendChild(o), o;
246
306
  }
247
- function $(m, { name: t, description: o }) {
248
- a("div", {
307
+ function R(c, { name: t, description: r }) {
308
+ n("div", {
249
309
  className: "spot-header__title",
250
310
  text: t,
251
- parent: m
252
- }), a("div", {
311
+ parent: c
312
+ }), n("div", {
253
313
  className: "spot-header__description",
254
- text: o,
255
- parent: m
314
+ text: r,
315
+ parent: c
256
316
  });
257
317
  }
258
- function S(m, t = []) {
259
- const o = a("ul", {
318
+ function $(c, t = []) {
319
+ const r = n("ul", {
260
320
  className: "spot-benefits__list",
261
- parent: m
321
+ parent: c
262
322
  });
263
323
  t.forEach((s) => {
264
- const i = a("li", { parent: o });
324
+ const i = n("li", { parent: r });
265
325
  i.innerHTML = `
266
326
  <svg width="14" height="14" viewBox="0 0 14 14" fill="none" class="spot-bullets__checkmark">
267
327
  <path d="M11.6666 3.5L5.24998 9.91667L2.33331 7"
268
328
  stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
269
- </svg>`, a("span", { text: s, parent: i });
329
+ </svg>`, n("span", { text: s, parent: i });
270
330
  });
271
331
  }
272
- function P(m, t = []) {
332
+ function V(c, t = []) {
273
333
  if (!t || t.length === 0) return;
274
- const o = a("div", {
334
+ const r = n("div", {
275
335
  className: "spot-qualifying-reasons__container",
276
- parent: m
277
- }), s = [...t].sort((e, p) => e.rank - p.rank), i = a("div", {
336
+ parent: c
337
+ }), s = [...t].sort((o, l) => o.rank - l.rank), i = n("div", {
278
338
  className: "spot-qualifying-reasons__grid",
279
- parent: o
280
- }), r = {
339
+ parent: r
340
+ }), a = {
281
341
  "Accident & Illness": "cross.svg",
282
342
  "Family Emergencies": "users.svg",
283
343
  Layoffs: "building.svg",
@@ -287,101 +347,101 @@ function P(m, t = []) {
287
347
  "Travel Interruption": "plane.svg",
288
348
  "Military Duty": "medal.svg"
289
349
  };
290
- let n;
350
+ let e;
291
351
  try {
292
- const e = document.currentScript;
293
- if (e != null && e.src) {
294
- const p = new URL(e.src);
295
- n = p.origin + p.pathname.replace(/\/[^/]*$/, "/");
352
+ const o = document.currentScript;
353
+ if (o != null && o.src) {
354
+ const l = new URL(o.src);
355
+ e = l.origin + l.pathname.replace(/\/[^/]*$/, "/");
296
356
  } else
297
- n = window.location.origin + window.location.pathname.replace(/\/[^/]*$/, "/");
298
- n += "assets/";
357
+ e = window.location.origin + window.location.pathname.replace(/\/[^/]*$/, "/");
358
+ e += "assets/";
299
359
  } catch {
300
- n = "./assets/";
360
+ e = "./assets/";
301
361
  }
302
- s.forEach((e) => {
303
- var g, h, c;
304
- const p = a("div", {
362
+ s.forEach((o) => {
363
+ var g, h, p;
364
+ const l = n("div", {
305
365
  className: "spot-qualifying-reasons__item",
306
366
  parent: i
307
- }), u = a("div", {
367
+ }), m = n("div", {
308
368
  className: "spot-qualifying-reasons__icon-wrapper",
309
- parent: p
310
- }), f = r[((g = e.benefitType) == null ? void 0 : g.name) || ""] || r[e.name || ""];
369
+ parent: l
370
+ }), f = a[((g = o.benefitType) == null ? void 0 : g.name) || ""] || a[o.name || ""];
311
371
  if (f) {
312
- const l = a("img", {
313
- parent: u
372
+ const u = n("img", {
373
+ parent: m
314
374
  });
315
- l.src = n + f, l.alt = ((h = e.benefitType) == null ? void 0 : h.name) || e.name || "", l.className = "spot-qualifying-reasons__icon";
375
+ u.src = e + f, u.alt = ((h = o.benefitType) == null ? void 0 : h.name) || o.name || "", u.className = "spot-qualifying-reasons__icon";
316
376
  }
317
- a("span", {
377
+ n("span", {
318
378
  className: "spot-qualifying-reasons__label",
319
- text: ((c = e.benefitType) == null ? void 0 : c.name) || e.name || "",
320
- parent: p
379
+ text: ((p = o.benefitType) == null ? void 0 : p.name) || o.name || "",
380
+ parent: l
321
381
  });
322
382
  });
323
383
  }
324
- function A(m, t = [], o) {
325
- if (t.length === 0 || !o || o <= 1)
384
+ function Q(c, t = [], r) {
385
+ if (t.length === 0 || !r || r <= 1)
326
386
  return;
327
387
  const s = /* @__PURE__ */ new Map();
328
- t.forEach((l) => {
329
- s.set(l, (s.get(l) || 0) + 1);
388
+ t.forEach((u) => {
389
+ s.set(u, (s.get(u) || 0) + 1);
330
390
  });
331
- const r = Array.from(s.entries()).map(
332
- ([l, d]) => ({
333
- item: l,
391
+ const a = Array.from(s.entries()).map(
392
+ ([u, d]) => ({
393
+ item: u,
334
394
  count: d,
335
- displayText: d > 1 ? `${d} x ${l}` : l
395
+ displayText: d > 1 ? `${d} x ${u}` : u
336
396
  })
337
- ).sort((l, d) => {
338
- const y = l.item.charAt(0), w = d.item.charAt(0), q = /[a-zA-Z]/.test(y), C = /[a-zA-Z]/.test(w);
339
- return !q && C ? -1 : q && !C ? 1 : l.item.localeCompare(d.item, void 0, { sensitivity: "base" });
340
- }), n = a("div", {
397
+ ).sort((u, d) => {
398
+ const y = u.item.charAt(0), w = d.item.charAt(0), q = /[a-zA-Z]/.test(y), C = /[a-zA-Z]/.test(w);
399
+ return !q && C ? -1 : q && !C ? 1 : u.item.localeCompare(d.item, void 0, { sensitivity: "base" });
400
+ }), e = n("div", {
341
401
  className: "spot-covered-items__container",
342
- parent: m
343
- }), e = a("div", {
402
+ parent: c
403
+ }), o = n("div", {
344
404
  className: "spot-covered-items__header",
345
- parent: n
346
- }), p = a("button", {
347
- className: "spot-covered-items__toggle",
348
405
  parent: e
406
+ }), l = n("button", {
407
+ className: "spot-covered-items__toggle",
408
+ parent: o
349
409
  });
350
- a("span", {
410
+ n("span", {
351
411
  className: "spot-covered-items__title",
352
412
  text: `Items Covered in Your Cart (${t.length})`,
353
- parent: p
413
+ parent: l
354
414
  });
355
- const u = a("div", {
415
+ const m = n("div", {
356
416
  className: "spot-covered-items__right-section",
357
- parent: p
417
+ parent: l
358
418
  });
359
- a("span", {
419
+ n("span", {
360
420
  className: "spot-covered-items__view-all",
361
421
  text: "View All",
362
- parent: u
422
+ parent: m
363
423
  });
364
- const f = a("span", {
424
+ const f = n("span", {
365
425
  className: "spot-covered-items__arrow",
366
426
  innerHTML: "▼",
367
- parent: u
368
- }), g = a("div", {
427
+ parent: m
428
+ }), g = n("div", {
369
429
  className: "spot-covered-items__content",
370
- parent: n
371
- }), h = a("ul", {
430
+ parent: e
431
+ }), h = n("ul", {
372
432
  className: "spot-covered-items__list",
373
433
  parent: g
374
434
  });
375
- r.forEach(({ displayText: l }) => {
376
- const d = a("li", { parent: h });
377
- a("span", { text: l, parent: d });
435
+ a.forEach(({ displayText: u }) => {
436
+ const d = n("li", { parent: h });
437
+ n("span", { text: u, parent: d });
378
438
  });
379
- let c = !1;
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");
439
+ let p = !1;
440
+ g.style.display = "none", l.addEventListener("click", (u) => {
441
+ u.stopPropagation(), p = !p, g.style.display = p ? "block" : "none", f.innerHTML = p ? "▲" : "▼", l.setAttribute("aria-expanded", p.toString());
442
+ }), l.setAttribute("aria-expanded", "false"), l.setAttribute("aria-controls", "covered-items-list"), g.setAttribute("id", "covered-items-list");
383
443
  }
384
- const R = {
444
+ const U = {
385
445
  USD: "$",
386
446
  CAD: "CAD $",
387
447
  AUD: "AUD $",
@@ -393,68 +453,100 @@ const R = {
393
453
  MAD: "MAD ",
394
454
  SAR: "SAR "
395
455
  };
396
- function V(m, t = [], o = "USD") {
397
- const s = R[o] ?? `${o} `, i = a("div", {
456
+ function Z(c, t = [], r = "USD") {
457
+ const s = U[r] ?? `${r} `, i = n("div", {
398
458
  className: "spot-table__container",
399
- parent: m
400
- }), r = a("table", {
459
+ parent: c
460
+ }), a = n("table", {
401
461
  className: "spot-refund__table spot-table--dynamic",
402
462
  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 });
463
+ }), e = n("thead", { parent: a }), o = n("tr", { parent: e });
464
+ n("th", { text: "When you cancel", parent: o }), n("th", { text: "You will receive", parent: o });
465
+ const l = n("tbody", { parent: a });
466
+ t.forEach(({ text: m, percent: f, amount: g }) => {
467
+ const h = n("tr", { parent: l });
468
+ n("td", { text: m, parent: h });
469
+ const p = f === "Not eligible for refund" ? "Not eligible for a refund" : `${s}${g} refund`;
470
+ n("td", { text: p, parent: h });
411
471
  });
412
472
  }
413
- function Q(m, t, o) {
414
- const s = a("div", {
415
- className: "spot-selection__options",
416
- parent: m
417
- }), i = a("label", {
418
- className: `spot-selection__option ${t === b.YES ? "selected" : ""}`,
473
+ function B(c, t) {
474
+ const r = n("div", {
475
+ className: "spot-state-dropdown__wrapper",
476
+ parent: c
477
+ });
478
+ n("label", {
479
+ className: "spot-state-dropdown__label",
480
+ text: "State of Residence",
481
+ parent: r
482
+ });
483
+ const s = n("select", {
484
+ className: "spot-state-dropdown__select",
485
+ parent: r
486
+ });
487
+ s.setAttribute("aria-label", "State of Residence");
488
+ const i = n("option", {
489
+ text: "Select a state...",
490
+ parent: s
491
+ });
492
+ i.value = "", i.selected = !t, z.forEach(({ value: e, label: o }) => {
493
+ const l = n("option", { text: o, parent: s });
494
+ l.value = e, e === t && (l.selected = !0);
495
+ });
496
+ const a = n("option", {
497
+ text: "Not a US Resident",
419
498
  parent: s
420
- }), r = a("input", { parent: i });
421
- r.type = "radio", r.name = "selection", r.value = b.YES, t === b.YES && (r.checked = !0), a("strong", {
422
- text: o.yesOptionText,
499
+ });
500
+ return a.value = k, t === k && (a.selected = !0), s;
501
+ }
502
+ function j(c, t, r, s = !1) {
503
+ const i = n("div", {
504
+ className: `spot-selection__options${s ? " spot-selection__options--disabled" : ""}`,
505
+ parent: c
506
+ }), a = n("label", {
507
+ className: `spot-selection__option ${t === b.YES ? "selected" : ""}`,
423
508
  parent: i
424
- }), a("span", {
509
+ }), e = n("input", { parent: a });
510
+ e.type = "radio", e.name = "selection", e.value = b.YES, t === b.YES && (e.checked = !0), s && (e.disabled = !0), n("strong", {
511
+ text: r.yesOptionText,
512
+ parent: a
513
+ }), n("span", {
425
514
  className: "spot-selection__recommended-tag",
426
515
  text: "Recommended",
427
- parent: i
516
+ parent: a
428
517
  });
429
- const n = a("label", {
518
+ const o = n("label", {
430
519
  className: `spot-selection__option ${t === b.NO ? "selected" : ""}`,
431
- parent: s
432
- }), e = a("input", { parent: n });
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;
520
+ parent: i
521
+ }), l = n("input", { parent: o });
522
+ return l.type = "radio", l.name = "selection", l.value = b.NO, t === b.NO && (l.checked = !0), s && (l.disabled = !0), n("span", { text: r.noOptionText, parent: o }), i;
434
523
  }
435
- function M(m, t) {
436
- var i;
437
- const o = (i = t.communication) == null ? void 0 : i.paymentTerms, s = a("div", {
438
- className: "spot-payment-terms",
439
- parent: m
440
- });
441
- return a("div", {
442
- className: "spot-payment-terms__header",
443
- text: "PAYMENT TERMS",
444
- parent: s
445
- }), a("div", {
446
- className: "spot-payment-terms__body",
447
- text: o || "",
448
- parent: s
449
- }), s;
524
+ function H(c, t) {
525
+ var s;
526
+ const r = (s = t.communication) == null ? void 0 : s.paymentTerms;
527
+ if (r) {
528
+ const i = n("div", {
529
+ className: "spot-payment-terms",
530
+ parent: c
531
+ });
532
+ return n("div", {
533
+ className: "spot-payment-terms__header",
534
+ text: "PAYMENT TERMS",
535
+ parent: i
536
+ }), n("div", {
537
+ className: "spot-payment-terms__body",
538
+ text: r || "",
539
+ parent: i
540
+ }), i;
541
+ }
450
542
  }
451
- function Z(m, t, o = "bottom-right") {
452
- if (o === "top-right") {
453
- const e = a("div", {
543
+ function F(c, t, r = "bottom-right") {
544
+ if (r === "top-right") {
545
+ const o = n("div", {
454
546
  className: "spot-logo__top-right",
455
- parent: m
547
+ parent: c
456
548
  });
457
- e.innerHTML = `
549
+ o.innerHTML = `
458
550
  <svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
459
551
  <rect width="145" height="28"/>
460
552
  <rect x="-655" y="-270" width="819" height="325" rx="10"/>
@@ -471,25 +563,25 @@ function Z(m, t, o = "bottom-right") {
471
563
  </defs>
472
564
  </svg>`;
473
565
  }
474
- const s = a("div", {
566
+ const s = n("div", {
475
567
  className: "spot-footer__container",
476
- parent: m
477
- }), i = a("div", {
568
+ parent: c
569
+ }), i = n("div", {
478
570
  className: "spot-footer__terms",
479
571
  parent: s
480
- }), r = `<a href="${t.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`, n = t.communication.legalDisclaimer.replace(
572
+ }), a = `<a href="${t.communication.termsAndConditionsUrl}" target="_blank" class="spot-footer__terms-link">Terms & Conditions</a>`, e = t.communication.legalDisclaimer.replace(
481
573
  /terms (and|&) conditions/gi,
482
- r
574
+ a
483
575
  );
484
- if (a("span", {
485
- innerHTML: n,
576
+ if (n("span", {
577
+ innerHTML: e,
486
578
  parent: i
487
- }), o === "bottom-right") {
488
- const e = a("p", {
579
+ }), r === "bottom-right") {
580
+ const o = n("p", {
489
581
  className: "spot-footer__powered-by",
490
582
  parent: s
491
583
  });
492
- e.innerHTML = `
584
+ o.innerHTML = `
493
585
  <svg width="145" height="28" viewBox="0 0 145 28" fill="none" xmlns="http://www.w3.org/2000/svg">
494
586
  <rect width="145" height="28"/>
495
587
  <rect x="-655" y="-270" width="819" height="325" rx="10"/>
@@ -508,18 +600,18 @@ function Z(m, t, o = "bottom-right") {
508
600
  }
509
601
  return s;
510
602
  }
511
- 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)}}";
512
- function B(m) {
603
+ const W = ":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-state-dropdown-label-font-size: .875rem;--spot-state-dropdown-label-font-weight: 600;--spot-state-dropdown-label-margin-bottom: .25rem;--spot-state-dropdown-select-border: .0625rem solid #e0e0e0;--spot-state-dropdown-select-border-radius: .375rem;--spot-state-dropdown-select-padding: .5rem .75rem;--spot-state-dropdown-select-font-size: .875rem;--spot-state-dropdown-select-background: #ffffff;--spot-state-dropdown-wrapper-margin-bottom: .75rem;--spot-selection-error-font-color: #ff0000;--spot-selection-error-font-size: .875rem;--spot-qualifying-reasons-margin: .75rem 0;--spot-qualifying-reasons-padding: 0 .3125rem;--spot-qualifying-reasons-column-gap: 3rem;--spot-qualifying-reasons-row-gap: .25rem;--spot-qualifying-reasons-grid-padding-left: 1rem;--spot-qualifying-reasons-icon-wrapper-size: 1.125rem;--spot-qualifying-reasons-icon-size: .75rem;--spot-qualifying-reasons-icon-border-color: #2e2e2e;--spot-qualifying-reasons-icon-border-width: 1px;--spot-qualifying-reasons-icon-background: #ffffff;--spot-qualifying-reasons-item-gap: .625rem;--spot-qualifying-reasons-label-font-size: .8rem;--spot-qualifying-reasons-label-font-weight: 400;--spot-qualifying-reasons-label-font-color: #000000;--spot-qualifying-reasons-label-font-family: Arial;--spot-selection-error-padding: .5rem;--spot-payment-terms-background: #f4f4f4;--spot-payment-terms-border-radius: .625rem;--spot-payment-terms-padding: 1rem;--spot-payment-terms-font-color: #636569;--spot-payment-terms-font-size: .75rem;--spot-payment-terms-header-font-weight: 700;--spot-payment-terms-header-font-size: .875rem;--spot-payment-terms-header-margin-bottom: .5rem;--spot-payment-terms-header-border-color: #c2c2c2;--spot-payment-terms-header-padding: 0 0 .5rem 0;--spot-terms-font-size: .75rem;--spot-terms-font-weight: 400;--spot-terms-font-color: #636569;--spot-terms-padding: 0;--spot-terms-link-text-decoration: underline;--spot-terms-link-font-size: .75rem;--spot-terms-link-font-weight: 400;--spot-terms-link-font-color: #636569;--spot-terms-link-padding: 0;--spot-covered-items-background: #f1f3f5;--spot-covered-items-hover-background: #e9ecef;--spot-covered-items-border-radius: .5rem;--spot-covered-items-padding: .75rem 1rem;--spot-covered-items-font-size: .875rem;--spot-covered-items-font-weight: 400;--spot-covered-items-font-color: #000000;--spot-covered-items-font-family: Arial;--spot-covered-items-arrow-font-size: .6rem;--spot-covered-items-arrow-color: #636569;--spot-covered-items-view-all-color: #636569;--spot-covered-items-view-all-font-size: .875rem;--spot-covered-items-view-all-font-weight: 400;--spot-covered-items-content-background: #f8f9fa;--spot-covered-items-content-border: 1px solid #e0e0e0;--spot-covered-items-content-border-radius: .5rem;--spot-covered-items-content-padding: .75rem 1rem;--spot-desktop-radio-margin-top: -1.5rem;--spot-benefits-margin-bottom: 0rem;--spot-covered-items-margin-bottom: 1.5rem;--spot-footer-gap: 1rem;--spot-footer-terms-margin-right: 7rem;--spot-payment-terms-margin-top: .5rem;--spot-logo-top-right-margin: 1rem}.spot-refund-guarantee{font-family:var(--spot-font-family);padding:var(--spot-padding);background-color:var(--spot-background-color);color:var(--spot-font-color);border:var(--spot-border-line-width) solid var(--spot-border-color);border-radius:var(--spot-border-radius);max-width:var(--spot-max-width);margin:var(--spot-margin);container-type:inline-size;position:relative;word-wrap:normal;overflow-wrap:normal;-webkit-hyphens:none;hyphens:none}.spot-refund-guarantee *{color:inherit}.spot-header__title{font-size:var(--spot-title-font-size);font-weight:var(--spot-title-font-weight);padding:var(--spot-title-padding);color:var(--spot-title-font-color);font-family:var(--spot-title-font-family);line-height:120%;letter-spacing:-.03125rem}.spot-header__description{font-size:var(--spot-description-font-size);font-weight:var(--spot-description-font-weight);color:var(--spot-description-font-color);font-family:var(--spot-description-font-family);padding:var(--spot-description-padding);line-height:125%;letter-spacing:-.025rem}.spot-content__wrapper{display:flex;flex-direction:column}.spot-content__wrapper.desktop-layout{display:grid;grid-template-columns:1fr auto;align-items:start;gap:1rem}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container,.desktop-layout .spot-covered-items__container,.desktop-layout .spot-selection__wrapper{min-width:0;word-wrap:normal}.desktop-layout .spot-benefits__list,.desktop-layout .spot-qualifying-reasons__container{grid-row:1;margin-bottom:var(--spot-benefits-margin-bottom)}.desktop-layout .spot-covered-items__container{grid-row:2;grid-column:1;margin-bottom:var(--spot-covered-items-margin-bottom)}.desktop-layout .spot-selection__wrapper{grid-row:3;grid-column:1;margin-top:var(--spot-desktop-radio-margin-top)}.desktop-layout .spot-payment-terms__wrapper{grid-row:4;grid-column:1;margin-top:var(--spot-payment-terms-margin-top)}.desktop-layout .spot-table__container{grid-row:1 / span 4;grid-column:2;width:auto;min-width:20.3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-table__container{display:flex;justify-content:flex-start;margin-top:1rem;margin-bottom:1rem;box-sizing:border-box;padding:0 .3125rem}.spot-content__wrapper:not(.desktop-layout) .spot-refund__table{width:100%;max-width:22rem;table-layout:auto}@media (max-width: 850px){.spot-selection__recommended-tag{display:inline-block;margin-left:0}}@media (max-width: 500px){.spot-selection__recommended-tag{margin-top:.5rem}}@media (max-width: 600px){.spot-refund__table th{padding:0rem}}.spot-benefits__list{list-style-type:none;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-benefits__list li{margin-bottom:.375rem;display:flex;align-items:flex-start;gap:.5rem}.spot-benefits__list li svg{flex-shrink:0;position:relative;top:.125rem}.spot-bullets__checkmark path{stroke:var(--spot-bullets-checkmark-color)}.spot-qualifying-reasons__container{margin:var(--spot-qualifying-reasons-margin);padding:var(--spot-qualifying-reasons-padding)}.spot-qualifying-reasons__grid{display:grid;grid-template-columns:repeat(2,minmax(0,max-content));column-gap:var(--spot-qualifying-reasons-column-gap);row-gap:var(--spot-qualifying-reasons-row-gap);max-width:100%;padding-left:var(--spot-qualifying-reasons-grid-padding-left)}.spot-qualifying-reasons__item{display:flex;align-items:center;gap:var(--spot-qualifying-reasons-item-gap)}.spot-qualifying-reasons__icon-wrapper{width:var(--spot-qualifying-reasons-icon-wrapper-size);height:var(--spot-qualifying-reasons-icon-wrapper-size);border-radius:50%;border:var(--spot-qualifying-reasons-icon-border-width) solid var(--spot-qualifying-reasons-icon-border-color);background-color:var(--spot-qualifying-reasons-icon-background);display:flex;align-items:center;justify-content:center;flex-shrink:0}.spot-qualifying-reasons__icon{width:var(--spot-qualifying-reasons-icon-size);height:var(--spot-qualifying-reasons-icon-size)}.spot-qualifying-reasons__label{font-size:var(--spot-qualifying-reasons-label-font-size);font-weight:var(--spot-qualifying-reasons-label-font-weight);color:var(--spot-qualifying-reasons-label-font-color);font-family:var(--spot-qualifying-reasons-label-font-family);line-height:1.2}@media (max-width: 480px){.spot-qualifying-reasons__grid{grid-template-columns:1fr}}.spot-covered-items__container{margin-top:.85rem;margin-bottom:.5rem;max-width:26rem}.spot-content__wrapper.desktop-layout:has(.spot-table__container) .spot-covered-items__container{margin-top:0rem;margin-bottom:1rem}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);padding:0 .3125rem .25rem;line-height:125%;margin:0}.spot-covered-items__list{list-style-type:disc;list-style-position:inside;line-height:125%;gap:.5625rem;font-size:var(--spot-bullets-font-size);font-weight:var(--spot-bullets-font-weight);color:var(--spot-bullets-font-color);font-family:var(--spot-bullets-font-family);padding:var(--spot-bullets-padding);margin-block-start:0rem;margin-block-end:0rem}.spot-covered-items__list li{margin-bottom:.3rem;text-align:left}.spot-covered-items__list li:last-child{margin-bottom:0}.spot-covered-items__header{margin-bottom:.5rem}.spot-covered-items__toggle{background:var(--spot-covered-items-background);border:none;border-radius:var(--spot-covered-items-border-radius);padding:var(--spot-covered-items-padding);cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;transition:all .2s ease}.spot-covered-items__toggle:hover{background-color:var(--spot-covered-items-hover-background)}.spot-covered-items__toggle:focus{outline:none;box-shadow:0 0 0 2px #0000001a}.spot-covered-items__title{font-size:var(--spot-covered-items-font-size);font-weight:var(--spot-covered-items-font-weight);color:var(--spot-covered-items-font-color);font-family:var(--spot-covered-items-font-family);line-height:125%;margin:0;padding:0}.spot-covered-items__right-section{display:flex;align-items:center;gap:.5rem;margin-left:auto}.spot-covered-items__view-all{font-size:var(--spot-covered-items-view-all-font-size);font-weight:var(--spot-covered-items-view-all-font-weight);color:var(--spot-covered-items-view-all-color);font-family:var(--spot-covered-items-font-family);line-height:125%}.spot-covered-items__arrow{font-size:var(--spot-covered-items-arrow-font-size);transition:transform .2s ease;color:var(--spot-covered-items-arrow-color);flex-shrink:0;transform:scaleX(1.5)}.spot-covered-items__content{margin-top:.5rem;transition:all .2s ease;overflow:hidden}.spot-covered-items__list{background-color:var(--spot-covered-items-content-background);border:var(--spot-covered-items-content-border);border-radius:var(--spot-covered-items-content-border-radius);margin:0;padding:var(--spot-covered-items-content-padding)}.spot-table__container{width:100%}.spot-refund__table{max-width:22rem;border-radius:var(--spot-table-border-radius);overflow:hidden;border:.09375rem solid #636569;table-layout:fixed;margin-bottom:.5rem;margin-top:.25rem;padding:.625rem}.spot-refund__table--dynamic{height:auto!important;min-height:7.5rem}.spot-refund__table td,.spot-refund__table th{padding:.375rem .625rem;text-align:left}.spot-refund__table th{text-align:left;font-size:var(--spot-table-header-font-size);font-weight:var(--spot-table-header-font-weight);color:var(--spot-table-header-font-color);font-family:var(--spot-table-header-font-family);padding:var(--spot-table-header-padding)}.spot-refund__table td{text-align:left;font-size:var(--spot-table-cell-font-size);font-weight:var(--spot-table-cell-font-weight);color:var(--spot-table-cell-font-color);font-family:var(--spot-table-cell-font-family);padding:var(--spot-table-cell-padding)}.spot-state-dropdown__wrapper{display:flex;flex-direction:column;margin-bottom:var(--spot-state-dropdown-wrapper-margin-bottom)}.spot-state-dropdown__label{font-size:var(--spot-state-dropdown-label-font-size);font-weight:var(--spot-state-dropdown-label-font-weight);font-family:var(--spot-font-family);color:var(--spot-font-color);margin-bottom:var(--spot-state-dropdown-label-margin-bottom)}.spot-state-dropdown__select{width:100%;box-sizing:border-box;border:var(--spot-state-dropdown-select-border);border-radius:var(--spot-state-dropdown-select-border-radius);padding:var(--spot-state-dropdown-select-padding);font-size:var(--spot-state-dropdown-select-font-size);font-family:var(--spot-font-family);color:var(--spot-font-color);background-color:var(--spot-state-dropdown-select-background);cursor:pointer;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.spot-state-dropdown__select:focus{outline:none;box-shadow:0 0 0 2px #00000026}input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:.75rem;height:.75rem;min-width:.75rem;border:.0625rem solid var(--spot-radio-border);border-radius:var(--spot-radio-border-radius);margin-right:.5rem;position:relative;vertical-align:middle;top:-.0625rem;cursor:pointer;flex-shrink:0}input[type=radio]:checked{background:var(--spot-radio-checked-background);box-shadow:inset 0 0 0 .0625rem #fff}.spot-selection__options{display:flex;flex-direction:column;gap:.5rem}.spot-selection__option{display:flex;align-items:center;flex-wrap:nowrap;position:relative;transition:background .2s;cursor:pointer;font-size:var(--spot-radio-text-font-size);font-weight:var(--spot-radio-text-font-weight);color:var(--spot-radio-text-font-color);font-family:var(--spot-radio-text-font-family);padding:var(--spot-radio-text-padding);margin-right:.5rem}.spot-selection__option.selected{background:var(--spot-radio-selection-background);border-radius:var(--spot-radio-selection-border-radius);padding:var(--spot-radio-selection-padding)}.spot-selection__recommended-tag{background:var(--spot-recommended-tag-background);color:var(--spot-recommended-tag-font-color);font-size:var(--spot-recommended-tag-font-size);font-weight:var(--spot-recommended-tag-font-weight);padding:var(--spot-recommended-tag-padding);border-radius:var(--spot-recommended-tag-border-radius);margin-left:.75rem;white-space:nowrap;flex-shrink:0}@media (max-width: 850px){.spot-selection__recommended-tag{margin-left:.5rem}}@media (max-width: 600px){.spot-selection__recommended-tag{margin-left:.5rem;font-size:.75rem;padding:.1875rem .4375rem}}.spot-selection__error{color:var(--spot-selection-error-font-color);font-size:var(--spot-selection-error-font-size);padding:var(--spot-selection-error-padding);display:none}.spot-selection__options--disabled .spot-selection__option{opacity:.4;cursor:not-allowed;pointer-events:none}.spot-selection__options--disabled input[type=radio]{cursor:not-allowed}.spot-payment-terms__wrapper{margin-top:1rem}.spot-payment-terms__header{font-weight:var(--spot-payment-terms-header-font-weight);margin-bottom:.5rem;padding:var(--spot-payment-terms-header-padding);font-size:var(--spot-payment-terms-header-font-size);border-bottom:1px solid var(--spot-payment-terms-header-border-color)}.spot-payment-terms{background-color:var(--spot-payment-terms-background);border-radius:var(--spot-payment-terms-border-radius);padding:var(--spot-payment-terms-padding);color:var(--spot-payment-terms-font-color);font-size:var(--spot-payment-terms-font-size)}.spot-footer__terms{margin-top:.625rem;margin-right:.25rem;font-size:var(--spot-terms-font-size);font-weight:var(--spot-terms-font-weight);color:var(--spot-terms-font-color);font-family:var(--spot-terms-font-family);padding:var(--spot-terms-padding);line-height:1.4;word-wrap:normal;-webkit-hyphens:none;hyphens:none;flex:1;min-width:0;overflow-wrap:normal}.spot-footer__terms-link{text-decoration:var(--spot-terms-link-text-decoration);font-size:var(--spot-terms-link-font-size);font-weight:var(--spot-terms-link-font-weight);color:var(--spot-terms-link-font-color);font-family:var(--spot-terms-link-font-family);padding:var(--spot-terms-link-padding)}.spot-footer__container{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;flex-wrap:nowrap;gap:var(--spot-footer-gap)}@container (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}@media (max-width: 650px){.spot-footer__container{flex-direction:column!important;align-items:flex-start!important;flex-wrap:wrap!important}.spot-footer__terms{margin-right:0!important;margin-bottom:.5rem!important;flex:none!important;width:100%!important;max-width:none!important}}.spot-footer__powered-by{margin-top:0;flex-shrink:0}.spot-logo__top-right{position:absolute;top:-14px;right: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)}}";
604
+ function Y(c) {
513
605
  const t = document.createElement("style");
514
- t.textContent = m, document.head.appendChild(t);
606
+ t.textContent = c, document.head.appendChild(t);
515
607
  }
516
- B(U);
517
- const z = {
608
+ Y(W);
609
+ const A = {
518
610
  sandbox: "https://api.sandbox.getspot.com/api/v1/quote",
519
611
  production: "https://api.getspot.com/api/v1/quote",
520
612
  local: "http://localhost:3999/api/v1/quote"
521
613
  };
522
- class j {
614
+ class G {
523
615
  constructor(t = {}) {
524
616
  this.options = {
525
617
  location: "body",
@@ -534,98 +626,107 @@ class j {
534
626
  }, 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();
535
627
  }
536
628
  async _init() {
537
- var t, o, s, i, r;
629
+ var t, r, s, i, a;
538
630
  try {
539
- N(this.options);
540
- let n;
631
+ M(this.options), this.currentState = this.options.state;
632
+ let e;
541
633
  if (this.options.useMockData && this.options.mockData)
542
- n = this.options.mockData;
634
+ e = this.options.mockData;
543
635
  else {
544
- const { environment: e, partnerId: p } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || z[e];
545
- n = "items" in this.options.quoteRequestData ? await H(
636
+ const { environment: o, partnerId: l } = this.options.apiConfig, f = this.options.apiConfig.customEndpoint || A[o];
637
+ e = "items" in this.options.quoteRequestData ? await I(
546
638
  f,
547
- p,
548
- this.options.quoteRequestData
549
- ) : await I(
639
+ l,
640
+ this.options.quoteRequestData,
641
+ this._validState()
642
+ ) : await N(
550
643
  f,
551
- p,
552
- this.options.quoteRequestData
644
+ l,
645
+ this.options.quoteRequestData,
646
+ this._validState()
553
647
  );
554
648
  }
555
- if (n.status !== "QUOTE_AVAILABLE") {
556
- n.status === "NO_MATCHING_QUOTE" && ((t = this.options.callbacks) != null && t.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
649
+ if (e.status !== "QUOTE_AVAILABLE") {
650
+ e.status === "NO_MATCHING_QUOTE" && ((t = this.options.callbacks) != null && t.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
557
651
  status: "NO_MATCHING_QUOTE",
558
652
  data: this.options.quoteRequestData
559
653
  });
560
654
  return;
561
655
  }
562
- if (this.quote = n.data, !this.quote)
656
+ if (this.quote = e.data, !this.quote)
563
657
  throw new Error("No quote data in response");
564
- if (this._renderWidget(), this.options.selection === b.YES && ((o = this.options.callbacks) != null && o.onOptIn)) {
565
- const e = {
658
+ if (this._renderWidget(), this.options.selection === b.YES && ((r = this.options.callbacks) != null && r.onOptIn)) {
659
+ const o = {
566
660
  status: "QUOTE_ACCEPTED",
567
661
  spotPrice: this.quote.spotPrice,
568
- quoteId: this.quote.id
662
+ quoteId: this.quote.id,
663
+ state: this._validState()
569
664
  };
570
665
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
571
- const p = this.options.quoteRequestData;
572
- e.batchQuoteDetails = this.quote.originalQuotes.map((u) => {
666
+ const l = this.options.quoteRequestData;
667
+ o.batchQuoteDetails = this.quote.originalQuotes.map((m) => {
573
668
  var g;
574
- const f = (g = p.items) == null ? void 0 : g.find(
575
- (h) => (h.cartItemId || `item-${p.items.indexOf(h) + 1}`) === u.cartItemId
669
+ const f = (g = l.items) == null ? void 0 : g.find(
670
+ (h) => (h.cartItemId || `item-${l.items.indexOf(h) + 1}`) === m.cartItemId
576
671
  );
577
672
  return {
578
- quoteId: u.id,
579
- productPrice: (f == null ? void 0 : f.productPrice) || u.spotPrice,
673
+ quoteId: m.id,
674
+ productPrice: (f == null ? void 0 : f.productPrice) || m.spotPrice,
580
675
  cartItemId: (f == null ? void 0 : f.cartItemId) || ""
581
676
  };
582
677
  });
583
678
  }
584
- this.options.callbacks.onOptIn(e);
679
+ this.options.callbacks.onOptIn(o);
585
680
  }
586
681
  if ((s = this.options.callbacks) != null && s.onQuoteRetrieved) {
587
- const e = this.options.callbacks.onQuoteRetrieved(this.quote);
588
- e && this._applyQuoteUpdates(e);
682
+ const o = this.options.callbacks.onQuoteRetrieved(this.quote);
683
+ o && this._applyQuoteUpdates(o);
589
684
  }
590
- } catch (n) {
685
+ } catch (e) {
591
686
  if ((i = this.options.callbacks) != null && i.onError) {
592
- const e = n;
593
- (r = this.options.callbacks) == null || r.onError({
594
- message: e.message,
595
- status: e.status,
596
- responseBody: e.responseBody
687
+ const o = e;
688
+ (a = this.options.callbacks) == null || a.onError({
689
+ message: o.message,
690
+ status: o.status,
691
+ responseBody: o.responseBody
597
692
  });
598
693
  }
599
694
  }
600
695
  }
601
696
  _renderWidget() {
602
697
  if (!this.quote) return;
603
- this.container = document.createElement("div"), this.container.className = "spot-refund-guarantee", this.root.appendChild(this.container), Object.entries(this.options.theme || {}).forEach(([s, i]) => {
604
- const r = `--${s}`;
605
- this.container.style.setProperty(r, i);
606
- }), $(this.container, this.quote.communication);
698
+ this.container = document.createElement("div"), this.container.className = "spot-refund-guarantee", this.root.appendChild(this.container), Object.entries(this.options.theme || {}).forEach(([e, o]) => {
699
+ const l = `--${e}`;
700
+ this.container.style.setProperty(l, o);
701
+ }), R(this.container, this.quote.communication);
607
702
  const t = document.createElement("div");
608
- 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) {
609
- const s = this._getTotalItemsInRequest();
610
- A(t, this.quote.coveredItems, s);
703
+ 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) {
704
+ const e = this._getTotalItemsInRequest();
705
+ Q(t, this.quote.coveredItems, e);
611
706
  }
612
- this.options.showTable && !this.quote.qualifyingReasons && V(t, this.quote.payoutSchedule, this.quote.currencyCode);
613
- const o = Q(
614
- t,
707
+ this.options.showTable && !this.quote.qualifyingReasons && Z(t, this.quote.payoutSchedule, this.quote.currencyCode);
708
+ const r = n("div", {
709
+ className: "spot-selection__wrapper",
710
+ parent: t
711
+ });
712
+ this._isPassOrTrip() && !this.options.state && (this._stateSelectEl = B(r, this.currentState));
713
+ const i = !this._isQuotingAvailable(), a = j(
714
+ r,
615
715
  this.options.selection,
616
- this.quote.communication
716
+ this.quote.communication,
717
+ i
617
718
  );
618
- t.appendChild(o), this.paymentTermsEl = a("div", {
719
+ this.paymentTermsEl = n("div", {
619
720
  className: "spot-payment-terms__wrapper",
620
721
  parent: t
621
- }), 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);
722
+ }), this.currentSelection === b.YES && H(this.paymentTermsEl, this.quote), F(this.container, this.quote, this.options.logoPosition), window.addEventListener("resize", this._onResize), this._setupResizeObserver(), this._updateLayout(), this._setupOptionListeners(a), this._setupStateDropdownListener();
622
723
  }
623
724
  _updateLayout() {
624
725
  if (!this.container || !this.quote) return;
625
726
  const t = this.container.querySelector(
626
727
  ".spot-content__wrapper"
627
- ), o = this.options.showTable && !this.quote.qualifyingReasons;
628
- if (!t || !o) {
728
+ ), r = this.options.showTable && !this.quote.qualifyingReasons;
729
+ if (!t || !r) {
629
730
  t == null || t.classList.remove("desktop-layout");
630
731
  return;
631
732
  }
@@ -633,19 +734,19 @@ class j {
633
734
  t.classList.toggle("desktop-layout", s);
634
735
  }
635
736
  _shouldUseDesktopLayout(t) {
636
- const o = this.container.offsetWidth - 40, s = 325, i = 16;
637
- if (o >= 900)
737
+ const r = this.container.offsetWidth - 40, s = 325, i = 16;
738
+ if (r >= 900)
638
739
  return !0;
639
- if (o >= 650) {
640
- const r = t.classList.contains("desktop-layout");
740
+ if (r >= 650) {
741
+ const a = t.classList.contains("desktop-layout");
641
742
  t.classList.remove("desktop-layout"), t.offsetHeight;
642
- const n = t.querySelector(
743
+ const e = t.querySelector(
643
744
  ".spot-benefits__list, .spot-qualifying-reasons__container"
644
745
  );
645
- if (!n)
646
- return r && t.classList.add("desktop-layout"), r;
647
- const p = Math.min(n.scrollWidth, 400) + s + i;
648
- return r && t.classList.add("desktop-layout"), o >= p;
746
+ if (!e)
747
+ return a && t.classList.add("desktop-layout"), a;
748
+ const l = Math.min(e.scrollWidth, 400) + s + i;
749
+ return a && t.classList.add("desktop-layout"), r >= l;
649
750
  }
650
751
  return !1;
651
752
  }
@@ -665,31 +766,66 @@ class j {
665
766
  `$${t.spotPriceWithFees.toFixed(2)}`
666
767
  )), this.destroy(), this._renderWidget());
667
768
  }
769
+ _isPassOrTrip() {
770
+ const t = this.options.quoteRequestData;
771
+ if (Array.isArray(t))
772
+ return t.some((s) => s.productType === "Pass" || s.productType === "Trip");
773
+ if ("items" in t)
774
+ return t.items.some(
775
+ (s) => s.productType === "Pass" || s.productType === "Trip"
776
+ );
777
+ const r = t;
778
+ return r.productType === "Pass" || r.productType === "Trip";
779
+ }
780
+ _validState() {
781
+ if (this._isPassOrTrip() && !(!this.currentState || this.currentState === k))
782
+ return this.currentState;
783
+ }
784
+ _isQuotingAvailable() {
785
+ return !this._isPassOrTrip() || this.options.state ? !0 : !!this.currentState && this.currentState !== k;
786
+ }
787
+ _setRadiosDisabled(t) {
788
+ var i, a, e;
789
+ const r = (i = this.container) == null ? void 0 : i.querySelectorAll('input[name="selection"]'), s = (a = this.container) == null ? void 0 : a.querySelector(".spot-selection__options");
790
+ r == null || r.forEach((o) => {
791
+ o.disabled = t;
792
+ }), s == null || s.classList.toggle("spot-selection__options--disabled", t), t && (r == null || r.forEach((o) => {
793
+ o.checked = !1;
794
+ }), (e = this.container) == null || e.querySelectorAll(".spot-selection__option").forEach((o) => {
795
+ o.classList.remove("selected");
796
+ }), this.currentSelection = b.UNSELECTED, this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""));
797
+ }
798
+ _setupStateDropdownListener() {
799
+ this._stateSelectEl && this._stateSelectEl.addEventListener("change", () => {
800
+ this.currentState = this._stateSelectEl.value, this._setRadiosDisabled(!this._isQuotingAvailable());
801
+ });
802
+ }
668
803
  _setupOptionListeners(t) {
669
- const o = t.querySelectorAll(
804
+ const r = t.querySelectorAll(
670
805
  'input[type="radio"]'
671
806
  ), s = t.querySelectorAll(".spot-selection__option");
672
- o.forEach((i) => {
673
- i.addEventListener("change", (r) => {
674
- var p, u, f, g;
675
- const n = r.target, e = n.value;
676
- 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)) {
807
+ r.forEach((i) => {
808
+ i.addEventListener("change", (a) => {
809
+ var l, m, f, g;
810
+ const e = a.target, o = e.value;
811
+ if (this.hideSelectionError(), this.currentSelection = o, s.forEach((h) => h.classList.remove("selected")), (l = e.closest(".spot-selection__option")) == null || l.classList.add("selected"), this.paymentTermsEl && (this.paymentTermsEl.innerHTML = ""), o === b.YES && ((m = this.quote) != null && m.communication.paymentTerms && H(this.paymentTermsEl, this.quote), (f = this.options.callbacks) != null && f.onOptIn)) {
677
812
  const h = {
678
813
  status: "QUOTE_ACCEPTED",
679
814
  spotPrice: this.quote.spotPrice,
680
- quoteId: this.quote.id
815
+ quoteId: this.quote.id,
816
+ state: this._validState()
681
817
  };
682
818
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
683
- const c = this.options.quoteRequestData;
819
+ const p = this.options.quoteRequestData;
684
820
  h.batchQuoteDetails = this.quote.originalQuotes.map(
685
- (l) => {
821
+ (u) => {
686
822
  var y;
687
- const d = (y = c.items) == null ? void 0 : y.find(
688
- (w) => (w.cartItemId || `item-${c.items.indexOf(w) + 1}`) === l.cartItemId
823
+ const d = (y = p.items) == null ? void 0 : y.find(
824
+ (w) => (w.cartItemId || `item-${p.items.indexOf(w) + 1}`) === u.cartItemId
689
825
  );
690
826
  return {
691
- quoteId: l.id,
692
- productPrice: (d == null ? void 0 : d.productPrice) || l.spotPrice,
827
+ quoteId: u.id,
828
+ productPrice: (d == null ? void 0 : d.productPrice) || u.spotPrice,
693
829
  cartItemId: (d == null ? void 0 : d.cartItemId) || ""
694
830
  };
695
831
  }
@@ -697,22 +833,23 @@ class j {
697
833
  }
698
834
  this.options.callbacks.onOptIn(h);
699
835
  }
700
- if (e === b.NO && ((g = this.options.callbacks) != null && g.onOptOut)) {
836
+ if (o === b.NO && ((g = this.options.callbacks) != null && g.onOptOut)) {
701
837
  const h = {
702
838
  status: "QUOTE_DECLINED",
703
- quoteId: this.quote.id
839
+ quoteId: this.quote.id,
840
+ state: this._validState()
704
841
  };
705
842
  if (this.quote.originalQuotes && this.quote.originalQuotes.length > 0) {
706
- const c = this.options.quoteRequestData;
843
+ const p = this.options.quoteRequestData;
707
844
  h.batchQuoteDetails = this.quote.originalQuotes.map(
708
- (l) => {
845
+ (u) => {
709
846
  var y;
710
- const d = (y = c.items) == null ? void 0 : y.find(
711
- (w) => (w.cartItemId || `item-${c.items.indexOf(w) + 1}`) === l.cartItemId
847
+ const d = (y = p.items) == null ? void 0 : y.find(
848
+ (w) => (w.cartItemId || `item-${p.items.indexOf(w) + 1}`) === u.cartItemId
712
849
  );
713
850
  return {
714
- quoteId: l.id,
715
- productPrice: (d == null ? void 0 : d.productPrice) || l.spotPrice,
851
+ quoteId: u.id,
852
+ productPrice: (d == null ? void 0 : d.productPrice) || u.spotPrice,
716
853
  cartItemId: (d == null ? void 0 : d.cartItemId) || ""
717
854
  };
718
855
  }
@@ -727,10 +864,10 @@ class j {
727
864
  var t;
728
865
  if (!this.errorEl) {
729
866
  this.errorEl = document.createElement("div"), this.errorEl.className = "spot-selection__error", this.errorEl.textContent = "Please make a selection";
730
- const o = (t = this.container) == null ? void 0 : t.querySelector(
867
+ const r = (t = this.container) == null ? void 0 : t.querySelector(
731
868
  ".spot-selection__options"
732
869
  );
733
- o && o.insertAdjacentElement("afterend", this.errorEl);
870
+ r && r.insertAdjacentElement("afterend", this.errorEl);
734
871
  }
735
872
  this.errorEl.style.display = "block";
736
873
  }
@@ -745,61 +882,64 @@ class j {
745
882
  return t ? this.hideSelectionError() : this.showSelectionError(), t;
746
883
  }
747
884
  async updateQuote(t) {
748
- var o, s, i, r;
885
+ var r, s, i, a;
749
886
  try {
750
- const n = {
887
+ const e = {
751
888
  ...this.options,
752
889
  quoteRequestData: t
753
890
  };
754
- N(n);
755
- const { environment: e, partnerId: p, customEndpoint: u } = this.options.apiConfig, f = u || z[e], h = "items" in n.quoteRequestData ? await H(
891
+ M(e);
892
+ const { environment: o, partnerId: l, customEndpoint: m } = this.options.apiConfig, f = m || A[o], h = "items" in e.quoteRequestData ? await I(
756
893
  f,
757
- p,
758
- n.quoteRequestData
759
- ) : await I(
894
+ l,
895
+ e.quoteRequestData,
896
+ this._validState()
897
+ ) : await N(
760
898
  f,
761
- p,
762
- n.quoteRequestData
899
+ l,
900
+ e.quoteRequestData,
901
+ this._validState()
763
902
  );
764
903
  if (h.status !== "QUOTE_AVAILABLE")
765
- return this.destroy(), h.status === "NO_MATCHING_QUOTE" && ((o = this.options.callbacks) != null && o.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
904
+ return this.destroy(), h.status === "NO_MATCHING_QUOTE" && ((r = this.options.callbacks) != null && r.noMatchingQuote) && this.options.callbacks.noMatchingQuote({
766
905
  status: "NO_MATCHING_QUOTE",
767
- data: n.quoteRequestData
906
+ data: e.quoteRequestData
768
907
  }), !1;
769
- 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) {
770
- const c = this.options.callbacks.onQuoteRetrieved(this.quote);
771
- c && this._applyQuoteUpdates(c);
908
+ if (this.options.quoteRequestData = e.quoteRequestData, this.quote = h.data, this.currentSelection = b.UNSELECTED, this.destroy(), this._renderWidget(), (s = this.options.callbacks) != null && s.onQuoteRetrieved) {
909
+ const p = this.options.callbacks.onQuoteRetrieved(this.quote);
910
+ p && this._applyQuoteUpdates(p);
772
911
  }
773
912
  return !0;
774
- } catch (n) {
775
- const e = n;
776
- return (r = (i = this.options.callbacks) == null ? void 0 : i.onError) == null || r.call(i, {
777
- message: e.message,
778
- status: e.status,
779
- responseBody: e.responseBody
913
+ } catch (e) {
914
+ const o = e;
915
+ return (a = (i = this.options.callbacks) == null ? void 0 : i.onError) == null || a.call(i, {
916
+ message: o.message,
917
+ status: o.status,
918
+ responseBody: o.responseBody
780
919
  }), !1;
781
920
  }
782
921
  }
783
922
  getSelection() {
784
- var o, s, i;
923
+ var r, s, i;
785
924
  if (this.currentSelection == null || this.currentSelection == b.UNSELECTED) return null;
786
925
  const t = {
787
926
  selection: this.currentSelection,
788
- quoteId: (o = this.quote) == null ? void 0 : o.id,
927
+ quoteId: (r = this.quote) == null ? void 0 : r.id,
789
928
  spotPrice: (s = this.quote) == null ? void 0 : s.spotPrice,
790
- status: this.currentSelection === b.YES ? "QUOTE_ACCEPTED" : "QUOTE_DECLINED"
929
+ status: this.currentSelection === b.YES ? "QUOTE_ACCEPTED" : "QUOTE_DECLINED",
930
+ state: this.currentState
791
931
  };
792
932
  if ((i = this.quote) != null && i.originalQuotes && this.quote.originalQuotes.length > 0) {
793
- const r = this.options.quoteRequestData;
794
- t.batchQuoteDetails = this.quote.originalQuotes.map((n) => {
795
- var p;
796
- const e = (p = r.items) == null ? void 0 : p.find(
797
- (u) => (u.cartItemId || `item-${r.items.indexOf(u) + 1}`) === n.cartItemId
933
+ const a = this.options.quoteRequestData;
934
+ t.batchQuoteDetails = this.quote.originalQuotes.map((e) => {
935
+ var l;
936
+ const o = (l = a.items) == null ? void 0 : l.find(
937
+ (m) => (m.cartItemId || `item-${a.items.indexOf(m) + 1}`) === e.cartItemId
798
938
  );
799
939
  return {
800
- quoteId: n.id,
801
- productPrice: (e == null ? void 0 : e.productPrice) || n.spotPrice,
802
- cartItemId: (e == null ? void 0 : e.cartItemId) || ""
940
+ quoteId: e.id,
941
+ productPrice: (o == null ? void 0 : o.productPrice) || e.spotPrice,
942
+ cartItemId: (o == null ? void 0 : o.cartItemId) || ""
803
943
  };
804
944
  });
805
945
  }
@@ -810,6 +950,7 @@ class j {
810
950
  }
811
951
  }
812
952
  export {
953
+ k as NON_US_RESIDENT_VALUE,
813
954
  b as SelectionEnum,
814
- j as default
955
+ G as default
815
956
  };