@getcredify/credify-insurance-widget 1.34.1 → 1.35.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.
@@ -3,9 +3,9 @@
3
3
  var e = { env: {} };
4
4
  })();
5
5
  const d = ["Zip", "Email", "Product"], c = {
6
- Auto: ["Zip", "Email", "Product", "Name", "Vehicle", "Driver", "AutoCurrentCarrier", "Demographics", "Ssn", "Phone", "SMSVerification"],
7
- Home: ["Zip", "Email", "Product", "Name", "Home", "HomePolicy", "Demographics", "Ssn", "Phone", "SMSVerification"],
8
- Bundle: ["Zip", "Email", "Product", "Name", "Home", "Vehicle", "Driver", "BundlePolicy", "Demographics", "Ssn", "Phone", "SMSVerification"]
6
+ Auto: ["Zip", "Email", "Product", "Name", "Vehicle", "Driver", "AutoCurrentCarrier", "Demographics", "Ssn", "Phone"],
7
+ Home: ["Zip", "Email", "Product", "Name", "Home", "HomePolicy", "Demographics", "Ssn", "Phone"],
8
+ Bundle: ["Zip", "Email", "Product", "Name", "Home", "Vehicle", "Driver", "BundlePolicy", "Demographics", "Ssn", "Phone"]
9
9
  };
10
10
  function p(e) {
11
11
  return e === "Auto" || e === "Home" || e === "Bundle" ? c[e] : d;
@@ -190,7 +190,7 @@ const s = ["Allstate", "State Farm", "GEICO", "Progressive", "Liberty Mutual", "
190
190
  key: "home_all_perils_deductible",
191
191
  required: !0
192
192
  }
193
- ], S = [...l, ...a], g = [
193
+ ], g = [...l, ...a], S = [
194
194
  { question: "Gender", inputType: "radio", options: ["Male", "Female"], key: "gender", required: !0 },
195
195
  {
196
196
  question: "Marital status",
@@ -226,8 +226,8 @@ const s = ["Allstate", "State Farm", "GEICO", "Progressive", "Liberty Mutual", "
226
226
  AutoCurrentCarrier: a,
227
227
  Home: f,
228
228
  HomePolicy: l,
229
- BundlePolicy: S,
230
- Demographics: g,
229
+ BundlePolicy: g,
230
+ Demographics: S,
231
231
  Ssn: M,
232
232
  Phone: b,
233
233
  SMSVerification: v
@@ -335,19 +335,19 @@ const P = [
335
335
  function w(e) {
336
336
  return e.make && e.model ? { ready: !0, bodyStyles: D } : e.make ? { ready: !0, models: I[e.make] ?? ["Base", "Sport", "Limited"] } : { ready: !0, makes: A };
337
337
  }
338
- function V() {
338
+ function N() {
339
339
  return { year: 2022, make: "Toyota", model: "Camry", bodyStyle: "Sedan" };
340
340
  }
341
341
  const i = "mock-quote-0001", u = "mock-jwt-token";
342
342
  let r = { quote_id: i };
343
- function N(e = {}) {
343
+ function O(e = {}) {
344
344
  r = { quote_id: i, ...e };
345
345
  }
346
- function O(e) {
346
+ function V(e) {
347
347
  return e.action === "send" ? { success: !0 } : e.action === "resume" ? { isVerified: !0, token: u, quoteId: i } : { isVerified: !0, token: u };
348
348
  }
349
349
  function H(e) {
350
- return e.action === "vinDecode" ? V() : w({
350
+ return e.action === "vinDecode" ? N() : w({
351
351
  year: typeof e.year == "number" ? e.year : void 0,
352
352
  make: typeof e.make == "string" ? e.make : void 0,
353
353
  model: typeof e.model == "string" ? e.model : void 0
@@ -356,7 +356,7 @@ function H(e) {
356
356
  function R(e, t) {
357
357
  switch (e) {
358
358
  case "/create-quote":
359
- return N({ postal_code: t.postal_code }), { quoteId: i };
359
+ return O({ postal_code: t.postal_code }), { quoteId: i };
360
360
  case "/get-stages-for-quote":
361
361
  return { stages: p(r.product) };
362
362
  case "/get-questions-by-stage":
@@ -366,7 +366,7 @@ function R(e, t) {
366
366
  return delete o.current_stage, r = { ...r, ...o }, { status: "success" };
367
367
  }
368
368
  case "/verify-quote":
369
- return O(t);
369
+ return V(t);
370
370
  case "/is-supported-state":
371
371
  return { isSupported: !0 };
372
372
  case "/get-rates":
@@ -384,4 +384,4 @@ function R(e, t) {
384
384
  export {
385
385
  R as handleMockRequest
386
386
  };
387
- //# sourceMappingURL=backend-BzU_aHv3.js.map
387
+ //# sourceMappingURL=backend-xPum4ql0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend-xPum4ql0.js","sources":["../src/mock/fixtures/stages.ts","../src/mock/fixtures/questions.ts","../src/mock/fixtures/rates.ts","../src/mock/fixtures/vehicleOptions.ts","../src/mock/backend.ts"],"sourcesContent":["/**\n * Stage lists per product, copied verbatim from the real backend resolver\n * (packages/rating/packages/getStagesForQuote/src/index.ts). Keeping these in\n * lockstep is what makes the mocked flow reshape exactly like production: after\n * the Product stage is answered, `getStagesForQuote` returns the matching list\n * and the wizard rebuilds its step order.\n *\n * CanopyConnect is intentionally omitted because IS_CANOPY_CONNECT_ENABLED is\n * currently false in the backend; add it here if/when that flips.\n *\n * SMSVerification is likewise omitted because IS_SMS_VERIFY_AFTER_RATES_ENABLED\n * is true in the backend: verification moved out of the wizard to the rates page\n * (\"pursue\"). `Phone` stays as the terminal, validate-only stage. If that flag is\n * flipped back to false, re-append 'SMSVerification' after 'Phone' below.\n */\nimport type { Stage } from '@getcredify/credify-insurance-types';\n\n/** Pre-product-selection stages (also returned when there is no quote yet). */\nexport const DEFAULT_STAGES: Stage[] = ['Zip', 'Email', 'Product'];\n\nexport const STAGES_BY_PRODUCT: Record<'Auto' | 'Home' | 'Bundle', Stage[]> = {\n Auto: ['Zip', 'Email', 'Product', 'Name', 'Vehicle', 'Driver', 'AutoCurrentCarrier', 'Demographics', 'Ssn', 'Phone'],\n Home: ['Zip', 'Email', 'Product', 'Name', 'Home', 'HomePolicy', 'Demographics', 'Ssn', 'Phone'],\n Bundle: ['Zip', 'Email', 'Product', 'Name', 'Home', 'Vehicle', 'Driver', 'BundlePolicy', 'Demographics', 'Ssn', 'Phone']\n};\n\n/** Resolve the stage list for a stored product value, falling back to defaults. */\nexport function resolveStages(product: unknown): Stage[] {\n if (product === 'Auto' || product === 'Home' || product === 'Bundle') {\n return STAGES_BY_PRODUCT[product];\n }\n return DEFAULT_STAGES;\n}\n","/**\n * Mock question definitions per stage.\n *\n * Keys, input types, options and conditional structure mirror the real backend\n * definitions (packages/rating/packages/getQuestionsByStage/src/const.ts) so the\n * mocked screens render and persist exactly like production. Option lists are\n * representative subsets (the real lists hold 100+ carriers/makes) — enough to\n * exercise every input type and the repeatable vehicle/driver sections for\n * design and flow verification. Vehicle make/model/body_style options are left\n * empty on purpose: the FormRenderer populates them via the (mocked) vehicle\n * options endpoint, just like production.\n *\n * Typed as `Question[]` so the discriminated `inputType`/`options` union is\n * enforced by the compiler and can never drift from the shared type's shape.\n */\nimport type { Question, Stage } from '@getcredify/credify-insurance-types';\n\nconst CARRIERS = ['Allstate', 'State Farm', 'GEICO', 'Progressive', 'Liberty Mutual', 'Nationwide', 'Farmers', 'NoPriorInsurance'];\nconst LIABILITY_LIMITS = ['25/50', '50/100', '100/300', '250/500'];\nconst VEHICLE_YEARS = Array.from({ length: 2024 - 1990 + 1 }, (_, i) => String(2024 - i));\n\nconst ZIP: Question[] = [{ question: \"What's your ZIP code?\", inputType: 'text', key: 'postal_code', required: true }];\n\nconst EMAIL: Question[] = [{ question: 'What is your email address?', inputType: 'email', key: 'email', required: true }];\n\nconst PRODUCT: Question[] = [\n { question: 'Do you want to quote auto, home, or both?', inputType: 'select', options: ['Auto', 'Home', 'Bundle'], key: 'product', required: true },\n { question: 'What is your property address?', inputType: 'address', key: 'address', required: true }\n];\n\nconst NAME: Question[] = [\n { question: 'What is your first name?', inputType: 'text', key: 'first_name', required: true },\n { question: 'What is your last name?', inputType: 'text', key: 'last_name', required: true },\n { question: 'What is your date of birth?', inputType: 'date', key: 'date_of_birth', required: true }\n];\n\nconst VEHICLE: Question[] = [\n {\n question: 'Add Vehicles',\n inputType: 'radio',\n options: ['Yes'],\n key: 'vehicles',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'Vehicle Identification Number (VIN)', inputType: 'text', key: 'vin', required: false },\n { question: 'Year', inputType: 'select', options: VEHICLE_YEARS, key: 'year', required: true },\n { question: 'Make', inputType: 'select', options: [], key: 'make', required: true },\n { question: 'Model', inputType: 'select', options: [], key: 'model', required: true },\n { question: 'Body style', inputType: 'select', options: [], key: 'body_style', required: true },\n { question: 'Vehicle ownership type', inputType: 'select', options: ['Owned', 'Leased', 'Lien'], key: 'ownership_type', required: true },\n {\n question: 'What is the primary use of this vehicle?',\n inputType: 'select',\n options: ['Pleasure', 'To_FromWork', 'To_FromSchool', 'Business', 'Farming'],\n key: 'usage',\n required: true\n },\n { question: 'Annual mileage driven', inputType: 'number', key: 'annual_mileage', required: true }\n ]\n }\n ]\n }\n];\n\nconst DRIVER: Question[] = [\n {\n question: 'Add Drivers',\n inputType: 'radio',\n options: ['Yes'],\n key: 'drivers',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'First Name', inputType: 'text', key: 'first_name', required: true },\n { question: 'Middle Name Initial', inputType: 'text', key: 'middle_name', required: false },\n { question: 'Last Name', inputType: 'text', key: 'last_name', required: true },\n { question: 'Date of Birth', inputType: 'date', key: 'date_of_birth', required: true },\n { question: 'Gender', inputType: 'select', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'What is the relationship to Driver #1?',\n inputType: 'select',\n options: ['Spouse', 'Parent', 'Child', 'Domestic Partner', 'Relative', 'Employee', 'Other'],\n key: 'relationship_to_insured',\n required: true\n },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed'],\n key: 'marital_status',\n required: true\n }\n ]\n }\n ]\n }\n];\n\nconst AUTO_CURRENT_CARRIER: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Type of residence',\n inputType: 'select',\n options: ['Single Family Dwelling', 'Condo', 'Apartment', 'Townhouse', 'Mobile Home'],\n key: 'residence_type',\n required: true\n },\n {\n question: 'Please select your current auto insurance company',\n inputType: 'select',\n options: CARRIERS,\n key: 'auto_prior_carrier_name',\n required: true,\n conditionals: [\n {\n conditionalType: 'notEquals',\n conditionalValue: 'NoPriorInsurance',\n conditionalQuestions: [\n { question: 'Years with prior personal auto carrier', inputType: 'number', key: 'auto_prior_years', required: true },\n { question: 'Months with prior personal auto carrier', inputType: 'number', key: 'auto_prior_months', required: true },\n { question: 'When does the current policy expire?', inputType: 'date', key: 'auto_prior_expiration_date', required: true },\n {\n question: 'What is your current or most recent Bodily Injury Limit?',\n inputType: 'select',\n options: LIABILITY_LIMITS,\n key: 'auto_prior_liability_limit',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'auto_cancelled_declined_refused_to_renew',\n required: true\n },\n { question: 'Bodily Injury liability', inputType: 'select', options: LIABILITY_LIMITS, key: 'policy_bi', required: true },\n { question: 'Property Damage Liability', inputType: 'select', options: ['25000', '50000', '100000'], key: 'policy_pd', required: true }\n];\n\nconst HOME: Question[] = [\n { question: 'Year built', inputType: 'number', key: 'year_built', required: true },\n { question: 'Total living area (sq ft)', inputType: 'number', key: 'total_area_sq_ft', required: true },\n {\n question: 'Dwelling type',\n inputType: 'select',\n options: ['Single Family', 'Condo', 'Townhouse', 'Multi-Family'],\n key: 'dwelling_type',\n required: true\n },\n {\n question: 'Construction type',\n inputType: 'select',\n options: ['Frame', 'Masonry', 'Masonry Veneer', 'Fire Resistive'],\n key: 'construction_type',\n required: true\n },\n {\n question: 'Roof material',\n inputType: 'select',\n options: ['Asphalt Shingle', 'Metal', 'Tile', 'Wood Shake', 'Slate'],\n key: 'roof_material_type',\n required: true\n },\n { question: 'Number of stories', inputType: 'select', options: ['1', '1.5', '2', '2.5', '3'], key: 'number_of_stories', required: true }\n];\n\nconst HOME_POLICY: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Do you currently have a Homeowners policy?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'home_has_prior_insurance',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestions: [\n {\n question: 'Which carrier currently insures the home?',\n inputType: 'select',\n options: CARRIERS,\n key: 'home_prior_carrier_name',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Personal liability limit',\n inputType: 'select',\n options: ['100000', '300000', '500000', '1000000'],\n key: 'home_personal_liability',\n required: true\n },\n {\n question: 'All-perils deductible',\n inputType: 'select',\n options: ['500', '1000', '2500', '5000'],\n key: 'home_all_perils_deductible',\n required: true\n }\n];\n\n// Bundle reuses the home policy questions plus the auto policy questions.\nconst BUNDLE_POLICY: Question[] = [...HOME_POLICY, ...AUTO_CURRENT_CARRIER];\n\nconst DEMOGRAPHICS: Question[] = [\n { question: 'Gender', inputType: 'radio', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed', 'Domestic Partner'],\n key: 'marital_status',\n required: true\n },\n {\n question: 'Employment industry',\n inputType: 'select',\n options: ['Technology', 'Healthcare', 'Education', 'Finance', 'Retail', 'Construction', 'Other'],\n key: 'employment_industry',\n required: true\n },\n { question: 'How many occupants live in the household?', inputType: 'number', key: 'household_size', required: true },\n {\n question: 'Do you authorize us to check your credit?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'order_credit_authorized',\n required: true\n }\n];\n\nconst SSN: Question[] = [{ question: 'Social Security Number', inputType: 'text', key: 'social_security_number', required: false }];\n\nconst PHONE: Question[] = [{ question: 'What is your phone number?', inputType: 'tel', key: 'phone', required: true }];\n\nconst SMS_VERIFICATION: Question[] = [\n { question: 'Please enter the code we sent to your phone number.', inputType: 'text', key: 'sms_code', required: true }\n];\n\nexport const QUESTIONS_BY_STAGE: Partial<Record<Stage, Question[]>> = {\n Zip: ZIP,\n Email: EMAIL,\n Product: PRODUCT,\n Name: NAME,\n Vehicle: VEHICLE,\n Driver: DRIVER,\n AutoCurrentCarrier: AUTO_CURRENT_CARRIER,\n Home: HOME,\n HomePolicy: HOME_POLICY,\n BundlePolicy: BUNDLE_POLICY,\n Demographics: DEMOGRAPHICS,\n Ssn: SSN,\n Phone: PHONE,\n SMSVerification: SMS_VERIFICATION\n};\n\nexport function resolveQuestions(stage: Stage): Question[] {\n return QUESTIONS_BY_STAGE[stage] ?? [];\n}\n","/**\n * Mock rate results, shaped exactly as the real `GetRatesResponse` (an array of\n * carrier quotes). Logos are null so the Rates UI falls back to its text/initial\n * treatment — no embedded base64 needed for design review.\n */\nimport type { GetRatesResponse } from '@getcredify/credify-insurance-types';\n\nexport const MOCK_RATES: GetRatesResponse = [\n {\n quote_rate_id: 'mock-rate-1',\n carrier_name: 'Progressive',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-PRG-001',\n premium_cents: 142800,\n monthly_premium_cents: 11900,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-2',\n carrier_name: 'Nationwide',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-NW-002',\n premium_cents: 156000,\n monthly_premium_cents: 13000,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-3',\n carrier_name: 'Liberty Mutual',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-LM-003',\n premium_cents: 173400,\n monthly_premium_cents: 14450,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'non_admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n // \"Not Quoted\" carriers (Bolt declines) — shaped like real rows: no premium,\n // with decline reasons + category. Drives the Not Quoted tab in mock mode.\n {\n quote_rate_id: 'mock-nq-1',\n carrier_name: 'Travelers',\n carrier_logo_base64: null,\n carrier_quote_id: null,\n premium_cents: 0,\n monthly_premium_cents: null,\n term_months: 0,\n lob: 'auto',\n admitted_status: 'not_quoted',\n effective_date: null,\n policy_end_date: null,\n decline_category: 'Upfront Underwriting',\n decline_reasons: ['Consumer didn’t grant permission to review credit score.']\n },\n {\n quote_rate_id: 'mock-nq-2',\n carrier_name: 'NationalGeneral',\n carrier_logo_base64: null,\n carrier_quote_id: null,\n premium_cents: 0,\n monthly_premium_cents: null,\n term_months: 0,\n lob: 'auto',\n admitted_status: 'not_quoted',\n effective_date: null,\n policy_end_date: null,\n decline_category: 'Declinations',\n decline_reasons: ['Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.', 'Monoline quoting is not allowed.']\n },\n {\n quote_rate_id: 'mock-nq-3',\n carrier_name: 'Allstate',\n carrier_logo_base64: null,\n carrier_quote_id: null,\n premium_cents: 0,\n monthly_premium_cents: null,\n term_months: 0,\n lob: 'auto',\n admitted_status: 'not_quoted',\n effective_date: null,\n policy_end_date: null,\n decline_category: 'Declinations',\n decline_reasons: ['This carrier will not quote if the credit disclosure is not accepted by the insured.']\n }\n];\n","/**\n * Mock vehicle-options data. The real `getVehicleOptions` endpoint progressively\n * resolves makes → models → body styles as the user drills in, and `decodeVin`\n * returns a full vehicle from a VIN. The mock reproduces that cascade with a\n * small representative dataset so the dependent dropdowns behave like production.\n */\n\nexport const VEHICLE_MAKES = ['Toyota', 'Honda', 'Ford', 'Chevrolet', 'Tesla', 'Subaru'];\n\nconst MODELS_BY_MAKE: Record<string, string[]> = {\n Toyota: ['Camry', 'Corolla', 'RAV4', 'Highlander', 'Tacoma'],\n Honda: ['Civic', 'Accord', 'CR-V', 'Pilot', 'Odyssey'],\n Ford: ['F-150', 'Escape', 'Explorer', 'Mustang', 'Bronco'],\n Chevrolet: ['Silverado', 'Equinox', 'Malibu', 'Tahoe', 'Camaro'], // cspell:disable-line\n Tesla: ['Model 3', 'Model Y', 'Model S', 'Model X'],\n Subaru: ['Outback', 'Forester', 'Crosstrek', 'Impreza'] // cspell:disable-line\n};\n\nconst BODY_STYLES = ['Sedan', 'SUV', 'Truck', 'Coupe', 'Hatchback', 'Minivan'];\n\n/** Resolve the cascading option set, mirroring the real endpoint's response shape. */\nexport function resolveVehicleOptions(params: { year?: number; make?: string; model?: string }): {\n ready: boolean;\n makes?: string[];\n models?: string[];\n bodyStyles?: string[];\n} {\n if (params.make && params.model) {\n return { ready: true, bodyStyles: BODY_STYLES };\n }\n if (params.make) {\n return { ready: true, models: MODELS_BY_MAKE[params.make] ?? ['Base', 'Sport', 'Limited'] };\n }\n return { ready: true, makes: VEHICLE_MAKES };\n}\n\n/** Mock VIN decode — returns a deterministic vehicle regardless of the VIN supplied. */\nexport function decodeVinMock(): { year: number; make: string; model: string; bodyStyle: string } {\n return { year: 2022, make: 'Toyota', model: 'Camry', bodyStyle: 'Sedan' };\n}\n","/**\n * In-memory mock backend for the widget.\n *\n * This is the chunk lazily loaded by installMockFetch when mock mode is active.\n * It holds a single quote's state in memory and answers each API endpoint from\n * fixtures, reproducing the parts of backend behaviour the wizard depends on —\n * most importantly the product-driven flow reshaping (`update-quote` records the\n * chosen product; `get-stages-for-quote` then returns that product's stage list).\n *\n * No network requests are made and there are no side effects beyond this module's\n * own state, which resets whenever a new quote is created.\n */\nimport { resolveStages } from './fixtures/stages';\nimport { resolveQuestions } from './fixtures/questions';\nimport { MOCK_RATES } from './fixtures/rates';\nimport { resolveVehicleOptions, decodeVinMock } from './fixtures/vehicleOptions';\n\nconst MOCK_QUOTE_ID = 'mock-quote-0001';\nconst MOCK_TOKEN = 'mock-jwt-token';\n\ntype Json = Record<string, unknown>;\n\n/** Mutable in-memory quote, accumulated across `update-quote` calls. */\nlet quote: Json = { quote_id: MOCK_QUOTE_ID };\n\nfunction resetQuote(seed: Json = {}): void {\n quote = { quote_id: MOCK_QUOTE_ID, ...seed };\n}\n\nfunction handleVerifyQuote(body: Json): Json {\n if (body.action === 'send') return { success: true };\n if (body.action === 'resume') return { isVerified: true, token: MOCK_TOKEN, quoteId: MOCK_QUOTE_ID };\n // Default: SMS code verification — any code passes in mock mode.\n return { isVerified: true, token: MOCK_TOKEN };\n}\n\nfunction handleVehicleOptions(body: Json): Json {\n if (body.action === 'vinDecode') return decodeVinMock();\n return resolveVehicleOptions({\n year: typeof body.year === 'number' ? body.year : undefined,\n make: typeof body.make === 'string' ? body.make : undefined,\n model: typeof body.model === 'string' ? body.model : undefined\n });\n}\n\n/**\n * Route a mocked request to its canned response. `pathname` is the API path\n * (e.g. `/create-quote`); `body` is the parsed JSON request body. Returns the\n * response payload object (serialized by the caller). Throws for unknown paths\n * so the interceptor can fall through to a 404-style response.\n */\nexport function handleMockRequest(pathname: string, body: Json): Json {\n switch (pathname) {\n case '/create-quote':\n resetQuote({ postal_code: body.postal_code });\n return { quoteId: MOCK_QUOTE_ID };\n\n case '/get-stages-for-quote':\n return { stages: resolveStages(quote.product) };\n\n case '/get-questions-by-stage':\n return { questions: resolveQuestions(body.stage as never) };\n\n case '/update-quote': {\n const rest = { ...((body.payload as Json) ?? {}) };\n // current_stage is navigation metadata, not a persisted quote field.\n delete rest.current_stage;\n quote = { ...quote, ...rest };\n return { status: 'success' };\n }\n\n case '/verify-quote':\n return handleVerifyQuote(body);\n\n case '/is-supported-state':\n return { isSupported: true };\n\n case '/get-rates':\n return { rates: MOCK_RATES };\n\n case '/get-quote':\n return { quote };\n\n case '/get-vehicle-options':\n return handleVehicleOptions(body);\n\n case '/request-bind':\n return { success: true };\n\n default:\n throw new Error(`No mock handler for ${pathname}`);\n }\n}\n"],"names":["DEFAULT_STAGES","STAGES_BY_PRODUCT","resolveStages","product","CARRIERS","LIABILITY_LIMITS","VEHICLE_YEARS","_","i","ZIP","EMAIL","PRODUCT","NAME","VEHICLE","DRIVER","AUTO_CURRENT_CARRIER","HOME","HOME_POLICY","BUNDLE_POLICY","DEMOGRAPHICS","SSN","PHONE","SMS_VERIFICATION","QUESTIONS_BY_STAGE","resolveQuestions","stage","MOCK_RATES","VEHICLE_MAKES","MODELS_BY_MAKE","BODY_STYLES","resolveVehicleOptions","params","decodeVinMock","MOCK_Q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,0 +1,2 @@
1
+ const d=["Zip","Email","Product"],c={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone"]};function p(e){return e==="Auto"||e==="Home"||e==="Bundle"?c[e]:d}const s=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],n=["25/50","50/100","100/300","250/500"],y=Array.from({length:35},(e,t)=>String(2024-t)),_=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],m=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],q=[{question:"Do you want to quote auto, home, or both?",inputType:"select",options:["Auto","Home","Bundle"],key:"product",required:!0},{question:"What is your property address?",inputType:"address",key:"address",required:!0}],h=[{question:"What is your first name?",inputType:"text",key:"first_name",required:!0},{question:"What is your last name?",inputType:"text",key:"last_name",required:!0},{question:"What is your date of birth?",inputType:"date",key:"date_of_birth",required:!0}],T=[{question:"Add Vehicles",inputType:"radio",options:["Yes"],key:"vehicles",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"Vehicle Identification Number (VIN)",inputType:"text",key:"vin",required:!1},{question:"Year",inputType:"select",options:y,key:"year",required:!0},{question:"Make",inputType:"select",options:[],key:"make",required:!0},{question:"Model",inputType:"select",options:[],key:"model",required:!0},{question:"Body style",inputType:"select",options:[],key:"body_style",required:!0},{question:"Vehicle ownership type",inputType:"select",options:["Owned","Leased","Lien"],key:"ownership_type",required:!0},{question:"What is the primary use of this vehicle?",inputType:"select",options:["Pleasure","To_FromWork","To_FromSchool","Business","Farming"],key:"usage",required:!0},{question:"Annual mileage driven",inputType:"number",key:"annual_mileage",required:!0}]}]}],k=[{question:"Add Drivers",inputType:"radio",options:["Yes"],key:"drivers",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestionsAllowMultiple:!0,conditionalQuestions:[{question:"First Name",inputType:"text",key:"first_name",required:!0},{question:"Middle Name Initial",inputType:"text",key:"middle_name",required:!1},{question:"Last Name",inputType:"text",key:"last_name",required:!0},{question:"Date of Birth",inputType:"date",key:"date_of_birth",required:!0},{question:"Gender",inputType:"select",options:["Male","Female"],key:"gender",required:!0},{question:"What is the relationship to Driver #1?",inputType:"select",options:["Spouse","Parent","Child","Domestic Partner","Relative","Employee","Other"],key:"relationship_to_insured",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed"],key:"marital_status",required:!0}]}]}],a=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Type of residence",inputType:"select",options:["Single Family Dwelling","Condo","Apartment","Townhouse","Mobile Home"],key:"residence_type",required:!0},{question:"Please select your current auto insurance company",inputType:"select",options:s,key:"auto_prior_carrier_name",required:!0,conditionals:[{conditionalType:"notEquals",conditionalValue:"NoPriorInsurance",conditionalQuestions:[{question:"Years with prior personal auto carrier",inputType:"number",key:"auto_prior_years",required:!0},{question:"Months with prior personal auto carrier",inputType:"number",key:"auto_prior_months",required:!0},{question:"When does the current policy expire?",inputType:"date",key:"auto_prior_expiration_date",required:!0},{question:"What is your current or most recent Bodily Injury Limit?",inputType:"select",options:n,key:"auto_prior_liability_limit",required:!0}]}]},{question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0},{question:"Bodily Injury liability",inputType:"select",options:n,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],f=[{question:"Year built",inputType:"number",key:"year_built",required:!0},{question:"Total living area (sq ft)",inputType:"number",key:"total_area_sq_ft",required:!0},{question:"Dwelling type",inputType:"select",options:["Single Family","Condo","Townhouse","Multi-Family"],key:"dwelling_type",required:!0},{question:"Construction type",inputType:"select",options:["Frame","Masonry","Masonry Veneer","Fire Resistive"],key:"construction_type",required:!0},{question:"Roof material",inputType:"select",options:["Asphalt Shingle","Metal","Tile","Wood Shake","Slate"],key:"roof_material_type",required:!0},{question:"Number of stories",inputType:"select",options:["1","1.5","2","2.5","3"],key:"number_of_stories",required:!0}],l=[{question:"When do you need your insurance to begin?",inputType:"date",key:"effective_date",required:!0},{question:"Do you currently have a Homeowners policy?",inputType:"radio",options:["Yes","No"],key:"home_has_prior_insurance",required:!0,conditionals:[{conditionalType:"equals",conditionalValue:"Yes",conditionalQuestions:[{question:"Which carrier currently insures the home?",inputType:"select",options:s,key:"home_prior_carrier_name",required:!0}]}]},{question:"Personal liability limit",inputType:"select",options:["100000","300000","500000","1000000"],key:"home_personal_liability",required:!0},{question:"All-perils deductible",inputType:"select",options:["500","1000","2500","5000"],key:"home_all_perils_deductible",required:!0}],g=[...l,...a],S=[{question:"Gender",inputType:"radio",options:["Male","Female"],key:"gender",required:!0},{question:"Marital status",inputType:"select",options:["Single","Married","Divorced","Widowed","Domestic Partner"],key:"marital_status",required:!0},{question:"Employment industry",inputType:"select",options:["Technology","Healthcare","Education","Finance","Retail","Construction","Other"],key:"employment_industry",required:!0},{question:"How many occupants live in the household?",inputType:"number",key:"household_size",required:!0},{question:"Do you authorize us to check your credit?",inputType:"radio",options:["Yes","No"],key:"order_credit_authorized",required:!0}],M=[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],b=[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],E=[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}],v={Zip:_,Email:m,Product:q,Name:h,Vehicle:T,Driver:k,AutoCurrentCarrier:a,Home:f,HomePolicy:l,BundlePolicy:g,Demographics:S,Ssn:M,Phone:b,SMSVerification:E};function C(e){return v[e]??[]}const P=[{quote_rate_id:"mock-rate-1",carrier_name:"Progressive",carrier_logo_base64:null,carrier_quote_id:"MOCK-PRG-001",premium_cents:142800,monthly_premium_cents:11900,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-2",carrier_name:"Nationwide",carrier_logo_base64:null,carrier_quote_id:"MOCK-NW-002",premium_cents:156e3,monthly_premium_cents:13e3,term_months:12,lob:"auto",admitted_status:"admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-rate-3",carrier_name:"Liberty Mutual",carrier_logo_base64:null,carrier_quote_id:"MOCK-LM-003",premium_cents:173400,monthly_premium_cents:14450,term_months:12,lob:"auto",admitted_status:"non_admitted",effective_date:"2026-07-01",policy_end_date:"2027-07-01"},{quote_rate_id:"mock-nq-1",carrier_name:"Travelers",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Upfront Underwriting",decline_reasons:["Consumer didn’t grant permission to review credit score."]},{quote_rate_id:"mock-nq-2",carrier_name:"NationalGeneral",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.","Monoline quoting is not allowed."]},{quote_rate_id:"mock-nq-3",carrier_name:"Allstate",carrier_logo_base64:null,carrier_quote_id:null,premium_cents:0,monthly_premium_cents:null,term_months:0,lob:"auto",admitted_status:"not_quoted",effective_date:null,policy_end_date:null,decline_category:"Declinations",decline_reasons:["This carrier will not quote if the credit disclosure is not accepted by the insured."]}],A=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],I={Toyota:["Camry","Corolla","RAV4","Highlander","Tacoma"],Honda:["Civic","Accord","CR-V","Pilot","Odyssey"],Ford:["F-150","Escape","Explorer","Mustang","Bronco"],Chevrolet:["Silverado","Equinox","Malibu","Tahoe","Camaro"],Tesla:["Model 3","Model Y","Model S","Model X"],Subaru:["Outback","Forester","Crosstrek","Impreza"]},D=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function w(e){return e.make&&e.model?{ready:!0,bodyStyles:D}:e.make?{ready:!0,models:I[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:A}}function N(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const i="mock-quote-0001",u="mock-jwt-token";let r={quote_id:i};function O(e={}){r={quote_id:i,...e}}function V(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:u,quoteId:i}:{isVerified:!0,token:u}}function H(e){return e.action==="vinDecode"?N():w({year:typeof e.year=="number"?e.year:void 0,make:typeof e.make=="string"?e.make:void 0,model:typeof e.model=="string"?e.model:void 0})}function R(e,t){switch(e){case"/create-quote":return O({postal_code:t.postal_code}),{quoteId:i};case"/get-stages-for-quote":return{stages:p(r.product)};case"/get-questions-by-stage":return{questions:C(t.stage)};case"/update-quote":{const o={...t.payload??{}};return delete o.current_stage,r={...r,...o},{status:"success"}}case"/verify-quote":return V(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:P};case"/get-quote":return{quote:r};case"/get-vehicle-options":return H(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}export{R as handleMockRequest};
2
+ //# sourceMappingURL=backend-CY4n4nTm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend-CY4n4nTm.js","sources":["../../../src/mock/fixtures/stages.ts","../../../src/mock/fixtures/questions.ts","../../../src/mock/fixtures/rates.ts","../../../src/mock/fixtures/vehicleOptions.ts","../../../src/mock/backend.ts"],"sourcesContent":["/**\n * Stage lists per product, copied verbatim from the real backend resolver\n * (packages/rating/packages/getStagesForQuote/src/index.ts). Keeping these in\n * lockstep is what makes the mocked flow reshape exactly like production: after\n * the Product stage is answered, `getStagesForQuote` returns the matching list\n * and the wizard rebuilds its step order.\n *\n * CanopyConnect is intentionally omitted because IS_CANOPY_CONNECT_ENABLED is\n * currently false in the backend; add it here if/when that flips.\n *\n * SMSVerification is likewise omitted because IS_SMS_VERIFY_AFTER_RATES_ENABLED\n * is true in the backend: verification moved out of the wizard to the rates page\n * (\"pursue\"). `Phone` stays as the terminal, validate-only stage. If that flag is\n * flipped back to false, re-append 'SMSVerification' after 'Phone' below.\n */\nimport type { Stage } from '@getcredify/credify-insurance-types';\n\n/** Pre-product-selection stages (also returned when there is no quote yet). */\nexport const DEFAULT_STAGES: Stage[] = ['Zip', 'Email', 'Product'];\n\nexport const STAGES_BY_PRODUCT: Record<'Auto' | 'Home' | 'Bundle', Stage[]> = {\n Auto: ['Zip', 'Email', 'Product', 'Name', 'Vehicle', 'Driver', 'AutoCurrentCarrier', 'Demographics', 'Ssn', 'Phone'],\n Home: ['Zip', 'Email', 'Product', 'Name', 'Home', 'HomePolicy', 'Demographics', 'Ssn', 'Phone'],\n Bundle: ['Zip', 'Email', 'Product', 'Name', 'Home', 'Vehicle', 'Driver', 'BundlePolicy', 'Demographics', 'Ssn', 'Phone']\n};\n\n/** Resolve the stage list for a stored product value, falling back to defaults. */\nexport function resolveStages(product: unknown): Stage[] {\n if (product === 'Auto' || product === 'Home' || product === 'Bundle') {\n return STAGES_BY_PRODUCT[product];\n }\n return DEFAULT_STAGES;\n}\n","/**\n * Mock question definitions per stage.\n *\n * Keys, input types, options and conditional structure mirror the real backend\n * definitions (packages/rating/packages/getQuestionsByStage/src/const.ts) so the\n * mocked screens render and persist exactly like production. Option lists are\n * representative subsets (the real lists hold 100+ carriers/makes) — enough to\n * exercise every input type and the repeatable vehicle/driver sections for\n * design and flow verification. Vehicle make/model/body_style options are left\n * empty on purpose: the FormRenderer populates them via the (mocked) vehicle\n * options endpoint, just like production.\n *\n * Typed as `Question[]` so the discriminated `inputType`/`options` union is\n * enforced by the compiler and can never drift from the shared type's shape.\n */\nimport type { Question, Stage } from '@getcredify/credify-insurance-types';\n\nconst CARRIERS = ['Allstate', 'State Farm', 'GEICO', 'Progressive', 'Liberty Mutual', 'Nationwide', 'Farmers', 'NoPriorInsurance'];\nconst LIABILITY_LIMITS = ['25/50', '50/100', '100/300', '250/500'];\nconst VEHICLE_YEARS = Array.from({ length: 2024 - 1990 + 1 }, (_, i) => String(2024 - i));\n\nconst ZIP: Question[] = [{ question: \"What's your ZIP code?\", inputType: 'text', key: 'postal_code', required: true }];\n\nconst EMAIL: Question[] = [{ question: 'What is your email address?', inputType: 'email', key: 'email', required: true }];\n\nconst PRODUCT: Question[] = [\n { question: 'Do you want to quote auto, home, or both?', inputType: 'select', options: ['Auto', 'Home', 'Bundle'], key: 'product', required: true },\n { question: 'What is your property address?', inputType: 'address', key: 'address', required: true }\n];\n\nconst NAME: Question[] = [\n { question: 'What is your first name?', inputType: 'text', key: 'first_name', required: true },\n { question: 'What is your last name?', inputType: 'text', key: 'last_name', required: true },\n { question: 'What is your date of birth?', inputType: 'date', key: 'date_of_birth', required: true }\n];\n\nconst VEHICLE: Question[] = [\n {\n question: 'Add Vehicles',\n inputType: 'radio',\n options: ['Yes'],\n key: 'vehicles',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'Vehicle Identification Number (VIN)', inputType: 'text', key: 'vin', required: false },\n { question: 'Year', inputType: 'select', options: VEHICLE_YEARS, key: 'year', required: true },\n { question: 'Make', inputType: 'select', options: [], key: 'make', required: true },\n { question: 'Model', inputType: 'select', options: [], key: 'model', required: true },\n { question: 'Body style', inputType: 'select', options: [], key: 'body_style', required: true },\n { question: 'Vehicle ownership type', inputType: 'select', options: ['Owned', 'Leased', 'Lien'], key: 'ownership_type', required: true },\n {\n question: 'What is the primary use of this vehicle?',\n inputType: 'select',\n options: ['Pleasure', 'To_FromWork', 'To_FromSchool', 'Business', 'Farming'],\n key: 'usage',\n required: true\n },\n { question: 'Annual mileage driven', inputType: 'number', key: 'annual_mileage', required: true }\n ]\n }\n ]\n }\n];\n\nconst DRIVER: Question[] = [\n {\n question: 'Add Drivers',\n inputType: 'radio',\n options: ['Yes'],\n key: 'drivers',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestionsAllowMultiple: true,\n conditionalQuestions: [\n { question: 'First Name', inputType: 'text', key: 'first_name', required: true },\n { question: 'Middle Name Initial', inputType: 'text', key: 'middle_name', required: false },\n { question: 'Last Name', inputType: 'text', key: 'last_name', required: true },\n { question: 'Date of Birth', inputType: 'date', key: 'date_of_birth', required: true },\n { question: 'Gender', inputType: 'select', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'What is the relationship to Driver #1?',\n inputType: 'select',\n options: ['Spouse', 'Parent', 'Child', 'Domestic Partner', 'Relative', 'Employee', 'Other'],\n key: 'relationship_to_insured',\n required: true\n },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed'],\n key: 'marital_status',\n required: true\n }\n ]\n }\n ]\n }\n];\n\nconst AUTO_CURRENT_CARRIER: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Type of residence',\n inputType: 'select',\n options: ['Single Family Dwelling', 'Condo', 'Apartment', 'Townhouse', 'Mobile Home'],\n key: 'residence_type',\n required: true\n },\n {\n question: 'Please select your current auto insurance company',\n inputType: 'select',\n options: CARRIERS,\n key: 'auto_prior_carrier_name',\n required: true,\n conditionals: [\n {\n conditionalType: 'notEquals',\n conditionalValue: 'NoPriorInsurance',\n conditionalQuestions: [\n { question: 'Years with prior personal auto carrier', inputType: 'number', key: 'auto_prior_years', required: true },\n { question: 'Months with prior personal auto carrier', inputType: 'number', key: 'auto_prior_months', required: true },\n { question: 'When does the current policy expire?', inputType: 'date', key: 'auto_prior_expiration_date', required: true },\n {\n question: 'What is your current or most recent Bodily Injury Limit?',\n inputType: 'select',\n options: LIABILITY_LIMITS,\n key: 'auto_prior_liability_limit',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'auto_cancelled_declined_refused_to_renew',\n required: true\n },\n { question: 'Bodily Injury liability', inputType: 'select', options: LIABILITY_LIMITS, key: 'policy_bi', required: true },\n { question: 'Property Damage Liability', inputType: 'select', options: ['25000', '50000', '100000'], key: 'policy_pd', required: true }\n];\n\nconst HOME: Question[] = [\n { question: 'Year built', inputType: 'number', key: 'year_built', required: true },\n { question: 'Total living area (sq ft)', inputType: 'number', key: 'total_area_sq_ft', required: true },\n {\n question: 'Dwelling type',\n inputType: 'select',\n options: ['Single Family', 'Condo', 'Townhouse', 'Multi-Family'],\n key: 'dwelling_type',\n required: true\n },\n {\n question: 'Construction type',\n inputType: 'select',\n options: ['Frame', 'Masonry', 'Masonry Veneer', 'Fire Resistive'],\n key: 'construction_type',\n required: true\n },\n {\n question: 'Roof material',\n inputType: 'select',\n options: ['Asphalt Shingle', 'Metal', 'Tile', 'Wood Shake', 'Slate'],\n key: 'roof_material_type',\n required: true\n },\n { question: 'Number of stories', inputType: 'select', options: ['1', '1.5', '2', '2.5', '3'], key: 'number_of_stories', required: true }\n];\n\nconst HOME_POLICY: Question[] = [\n { question: 'When do you need your insurance to begin?', inputType: 'date', key: 'effective_date', required: true },\n {\n question: 'Do you currently have a Homeowners policy?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'home_has_prior_insurance',\n required: true,\n conditionals: [\n {\n conditionalType: 'equals',\n conditionalValue: 'Yes',\n conditionalQuestions: [\n {\n question: 'Which carrier currently insures the home?',\n inputType: 'select',\n options: CARRIERS,\n key: 'home_prior_carrier_name',\n required: true\n }\n ]\n }\n ]\n },\n {\n question: 'Personal liability limit',\n inputType: 'select',\n options: ['100000', '300000', '500000', '1000000'],\n key: 'home_personal_liability',\n required: true\n },\n {\n question: 'All-perils deductible',\n inputType: 'select',\n options: ['500', '1000', '2500', '5000'],\n key: 'home_all_perils_deductible',\n required: true\n }\n];\n\n// Bundle reuses the home policy questions plus the auto policy questions.\nconst BUNDLE_POLICY: Question[] = [...HOME_POLICY, ...AUTO_CURRENT_CARRIER];\n\nconst DEMOGRAPHICS: Question[] = [\n { question: 'Gender', inputType: 'radio', options: ['Male', 'Female'], key: 'gender', required: true },\n {\n question: 'Marital status',\n inputType: 'select',\n options: ['Single', 'Married', 'Divorced', 'Widowed', 'Domestic Partner'],\n key: 'marital_status',\n required: true\n },\n {\n question: 'Employment industry',\n inputType: 'select',\n options: ['Technology', 'Healthcare', 'Education', 'Finance', 'Retail', 'Construction', 'Other'],\n key: 'employment_industry',\n required: true\n },\n { question: 'How many occupants live in the household?', inputType: 'number', key: 'household_size', required: true },\n {\n question: 'Do you authorize us to check your credit?',\n inputType: 'radio',\n options: ['Yes', 'No'],\n key: 'order_credit_authorized',\n required: true\n }\n];\n\nconst SSN: Question[] = [{ question: 'Social Security Number', inputType: 'text', key: 'social_security_number', required: false }];\n\nconst PHONE: Question[] = [{ question: 'What is your phone number?', inputType: 'tel', key: 'phone', required: true }];\n\nconst SMS_VERIFICATION: Question[] = [\n { question: 'Please enter the code we sent to your phone number.', inputType: 'text', key: 'sms_code', required: true }\n];\n\nexport const QUESTIONS_BY_STAGE: Partial<Record<Stage, Question[]>> = {\n Zip: ZIP,\n Email: EMAIL,\n Product: PRODUCT,\n Name: NAME,\n Vehicle: VEHICLE,\n Driver: DRIVER,\n AutoCurrentCarrier: AUTO_CURRENT_CARRIER,\n Home: HOME,\n HomePolicy: HOME_POLICY,\n BundlePolicy: BUNDLE_POLICY,\n Demographics: DEMOGRAPHICS,\n Ssn: SSN,\n Phone: PHONE,\n SMSVerification: SMS_VERIFICATION\n};\n\nexport function resolveQuestions(stage: Stage): Question[] {\n return QUESTIONS_BY_STAGE[stage] ?? [];\n}\n","/**\n * Mock rate results, shaped exactly as the real `GetRatesResponse` (an array of\n * carrier quotes). Logos are null so the Rates UI falls back to its text/initial\n * treatment — no embedded base64 needed for design review.\n */\nimport type { GetRatesResponse } from '@getcredify/credify-insurance-types';\n\nexport const MOCK_RATES: GetRatesResponse = [\n {\n quote_rate_id: 'mock-rate-1',\n carrier_name: 'Progressive',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-PRG-001',\n premium_cents: 142800,\n monthly_premium_cents: 11900,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-2',\n carrier_name: 'Nationwide',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-NW-002',\n premium_cents: 156000,\n monthly_premium_cents: 13000,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n {\n quote_rate_id: 'mock-rate-3',\n carrier_name: 'Liberty Mutual',\n carrier_logo_base64: null,\n carrier_quote_id: 'MOCK-LM-003',\n premium_cents: 173400,\n monthly_premium_cents: 14450,\n term_months: 12,\n lob: 'auto',\n admitted_status: 'non_admitted',\n effective_date: '2026-07-01',\n policy_end_date: '2027-07-01'\n },\n // \"Not Quoted\" carriers (Bolt declines) — shaped like real rows: no premium,\n // with decline reasons + category. Drives the Not Quoted tab in mock mode.\n {\n quote_rate_id: 'mock-nq-1',\n carrier_name: 'Travelers',\n carrier_logo_base64: null,\n carrier_quote_id: null,\n premium_cents: 0,\n monthly_premium_cents: null,\n term_months: 0,\n lob: 'auto',\n admitted_status: 'not_quoted',\n effective_date: null,\n policy_end_date: null,\n decline_category: 'Upfront Underwriting',\n decline_reasons: ['Consumer didn’t grant permission to review credit score.']\n },\n {\n quote_rate_id: 'mock-nq-2',\n carrier_name: 'NationalGeneral',\n carrier_logo_base64: null,\n carrier_quote_id: null,\n premium_cents: 0,\n monthly_premium_cents: null,\n term_months: 0,\n lob: 'auto',\n admitted_status: 'not_quoted',\n effective_date: null,\n policy_end_date: null,\n decline_category: 'Declinations',\n decline_reasons: ['Carrier requires credit report ordering. Please select Yes for Credit Check Authorized.', 'Monoline quoting is not allowed.']\n },\n {\n quote_rate_id: 'mock-nq-3',\n carrier_name: 'Allstate',\n carrier_logo_base64: null,\n carrier_quote_id: null,\n premium_cents: 0,\n monthly_premium_cents: null,\n term_months: 0,\n lob: 'auto',\n admitted_status: 'not_quoted',\n effective_date: null,\n policy_end_date: null,\n decline_category: 'Declinations',\n decline_reasons: ['This carrier will not quote if the credit disclosure is not accepted by the insured.']\n }\n];\n","/**\n * Mock vehicle-options data. The real `getVehicleOptions` endpoint progressively\n * resolves makes → models → body styles as the user drills in, and `decodeVin`\n * returns a full vehicle from a VIN. The mock reproduces that cascade with a\n * small representative dataset so the dependent dropdowns behave like production.\n */\n\nexport const VEHICLE_MAKES = ['Toyota', 'Honda', 'Ford', 'Chevrolet', 'Tesla', 'Subaru'];\n\nconst MODELS_BY_MAKE: Record<string, string[]> = {\n Toyota: ['Camry', 'Corolla', 'RAV4', 'Highlander', 'Tacoma'],\n Honda: ['Civic', 'Accord', 'CR-V', 'Pilot', 'Odyssey'],\n Ford: ['F-150', 'Escape', 'Explorer', 'Mustang', 'Bronco'],\n Chevrolet: ['Silverado', 'Equinox', 'Malibu', 'Tahoe', 'Camaro'], // cspell:disable-line\n Tesla: ['Model 3', 'Model Y', 'Model S', 'Model X'],\n Subaru: ['Outback', 'Forester', 'Crosstrek', 'Impreza'] // cspell:disable-line\n};\n\nconst BODY_STYLES = ['Sedan', 'SUV', 'Truck', 'Coupe', 'Hatchback', 'Minivan'];\n\n/** Resolve the cascading option set, mirroring the real endpoint's response shape. */\nexport function resolveVehicleOptions(params: { year?: number; make?: string; model?: string }): {\n ready: boolean;\n makes?: string[];\n models?: string[];\n bodyStyles?: string[];\n} {\n if (params.make && params.model) {\n return { ready: true, bodyStyles: BODY_STYLES };\n }\n if (params.make) {\n return { ready: true, models: MODELS_BY_MAKE[params.make] ?? ['Base', 'Sport', 'Limited'] };\n }\n return { ready: true, makes: VEHICLE_MAKES };\n}\n\n/** Mock VIN decode — returns a deterministic vehicle regardless of the VIN supplied. */\nexport function decodeVinMock(): { year: number; make: string; model: string; bodyStyle: string } {\n return { year: 2022, make: 'Toyota', model: 'Camry', bodyStyle: 'Sedan' };\n}\n","/**\n * In-memory mock backend for the widget.\n *\n * This is the chunk lazily loaded by installMockFetch when mock mode is active.\n * It holds a single quote's state in memory and answers each API endpoint from\n * fixtures, reproducing the parts of backend behaviour the wizard depends on —\n * most importantly the product-driven flow reshaping (`update-quote` records the\n * chosen product; `get-stages-for-quote` then returns that product's stage list).\n *\n * No network requests are made and there are no side effects beyond this module's\n * own state, which resets whenever a new quote is created.\n */\nimport { resolveStages } from './fixtures/stages';\nimport { resolveQuestions } from './fixtures/questions';\nimport { MOCK_RATES } from './fixtures/rates';\nimport { resolveVehicleOptions, decodeVinMock } from './fixtures/vehicleOptions';\n\nconst MOCK_QUOTE_ID = 'mock-quote-0001';\nconst MOCK_TOKEN = 'mock-jwt-token';\n\ntype Json = Record<string, unknown>;\n\n/** Mutable in-memory quote, accumulated across `update-quote` calls. */\nlet quote: Json = { quote_id: MOCK_QUOTE_ID };\n\nfunction resetQuote(seed: Json = {}): void {\n quote = { quote_id: MOCK_QUOTE_ID, ...seed };\n}\n\nfunction handleVerifyQuote(body: Json): Json {\n if (body.action === 'send') return { success: true };\n if (body.action === 'resume') return { isVerified: true, token: MOCK_TOKEN, quoteId: MOCK_QUOTE_ID };\n // Default: SMS code verification — any code passes in mock mode.\n return { isVerified: true, token: MOCK_TOKEN };\n}\n\nfunction handleVehicleOptions(body: Json): Json {\n if (body.action === 'vinDecode') return decodeVinMock();\n return resolveVehicleOptions({\n year: typeof body.year === 'number' ? body.year : undefined,\n make: typeof body.make === 'string' ? body.make : undefined,\n model: typeof body.model === 'string' ? body.model : undefined\n });\n}\n\n/**\n * Route a mocked request to its canned response. `pathname` is the API path\n * (e.g. `/create-quote`); `body` is the parsed JSON request body. Returns the\n * response payload object (serialized by the caller). Throws for unknown paths\n * so the interceptor can fall through to a 404-style response.\n */\nexport function handleMockRequest(pathname: string, body: Json): Json {\n switch (pathname) {\n case '/create-quote':\n resetQuote({ postal_code: body.postal_code });\n return { quoteId: MOCK_QUOTE_ID };\n\n case '/get-stages-for-quote':\n return { stages: resolveStages(quote.product) };\n\n case '/get-questions-by-stage':\n return { questions: resolveQuestions(body.stage as never) };\n\n case '/update-quote': {\n const rest = { ...((body.payload as Json) ?? {}) };\n // current_stage is navigation metadata, not a persisted quote field.\n delete rest.current_stage;\n quote = { ...quote, ...rest };\n return { status: 'success' };\n }\n\n case '/verify-quote':\n return handleVerifyQuote(body);\n\n case '/is-supported-state':\n return { isSupported: true };\n\n case '/get-rates':\n return { rates: MOCK_RATES };\n\n case '/get-quote':\n return { quote };\n\n case '/get-vehicle-options':\n return handleVehicleOptions(body);\n\n case '/request-bind':\n return { success: true };\n\n default:\n throw new Error(`No mock handler for ${pathname}`);\n }\n}\n"],"names":["DEFAULT_STAGES","STAGES_BY_PRODUCT","resolveStages","product","CARRIERS","LIABILITY_LIMITS","VEHICLE_YEARS","_","i","ZIP","EMAIL","PRODUCT","NAME","VEHICLE","DRIVER","AUTO_CURRENT_CARRIER","HOME","HOME_POLICY","BUNDLE_POLICY","DEMOGRAPHICS","SSN","PHONE","SMS_VERIFICATION","QUESTIONS_BY_STAGE","resolveQuestions","stage","MOCK_RATES","VEHICLE_MAKES","MODELS_BY_MAKE","BODY_STYLES","resolveVehicleOptions","params","decodeVinMock","MOCK_QUOTE_ID","MOCK_TOKEN","quote","resetQuote","seed","handleVerifyQuote","body","handleVehicleOptions","handleMockRequest","pathname","rest"],"mappings":"AAkBO,MAAMA,EAA0B,CAAC,MAAO,QAAS,SAAS,EAEpDC,EAAiE,CAC5E,KAAM,CAAC,MAAO,QAAS,UAAW,OAAQ,UAAW,SAAU,qBAAsB,eAAgB,MAAO,OAAO,EACnH,KAAM,CAAC,MAAO,QAAS,UAAW,OAAQ,OAAQ,aAAc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