@getcredify/credify-insurance-widget 1.33.1 → 1.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/credify-insurance-widget.css +1 -1
- package/dist/iframe/assets/iframe-DzYGUDu8.js +146 -0
- package/dist/iframe/assets/{iframe-BKMTD9pQ.js.map → iframe-DzYGUDu8.js.map} +1 -1
- package/dist/iframe/assets/iframe-T05IrtDy.css +1 -0
- package/dist/iframe/iframe.html +2 -2
- package/dist/index.es.js +4505 -4173
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +34 -34
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/iframe/assets/iframe-BKMTD9pQ.js +0 -146
- package/dist/iframe/assets/iframe-BTTIsILU.css +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;700&display=swap";/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties,theme,base,components,utilities;@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-600:oklch(59.6% .145 163.225);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-widest:.1em;--leading-snug:1.375;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-\\[90vh\\]{max-height:90vh}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.\\!w-auto{width:auto!important}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-60{width:calc(var(--spacing)*60)}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[7rem\\]{max-width:7rem}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8\\.5rem\\]{min-width:8.5rem}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-amber-300{border-color:var(--color-amber-300)}.border-blue-600{border-color:var(--color-blue-600)}.border-cyan-500{border-color:var(--color-cyan-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-t-slate-600{border-top-color:var(--color-slate-600)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\\/40{background-color:color-mix(in oklab,var(--color-amber-50)40%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--text-primary\\)\\]{color:var(--text-primary)}.text-amber-800{color:var(--color-amber-800)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.focus-within\\:border-\\[var\\(--primary-color\\)\\]:focus-within{border-color:var(--primary-color)}@media (hover:hover){.hover\\:bg-blue-600\\/90:hover{background-color:#155dfce6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/90:hover{background-color:color-mix(in oklab,var(--color-blue-600)90%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-amber-900:hover{color:var(--color-amber-900)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:#155dfc66}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-600)40%,transparent)}}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-slate-300:disabled{background-color:var(--color-slate-300)}.disabled\\:text-slate-500:disabled{color:var(--color-slate-500)}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (min-width:40rem){.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:80rem){.xl\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}}:root{--primary-color:#006aff;--secondary-color:#f0f4ff;--background-color:#fff;--text-primary:#1a202c;--text-secondary:#718096;--accent-color:#e2e8f0;--radius-sm:.25rem;--radius-md:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-2xl:1.25rem;--radius-3xl:1.75rem;--radius-full:9999px;--radio-dot-svg:url("data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27%23006aff%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3ccircle cx=%278%27 cy=%278%27 r=%274%27/%3e%3c/svg%3e");--select-button-svg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24px' height='24px' fill='%23718096' viewBox='0 0 256 256'%3e%3cpath d='m215.39 92.94-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 1 1 11.32-11.32L128 154.06l74.07-72.44a8 8 0 0 1 11.32 11.32Z'/%3e%3c/svg%3e")}#insurance-widget-root,#root{color:var(--text-primary);font-family:Spline Sans,ui-sans-serif,system-ui,sans-serif}#insurance-widget-root .backdrop,#root .backdrop{background:#00000080;position:fixed;inset:0}#insurance-widget-root .modal-panel,#root .modal-panel{border-radius:var(--radius-2xl);padding:1.5rem;box-shadow:0 24px 64px -20px #00000059;background:#fff!important}@media (min-width:640px){#insurance-widget-root .modal-panel,#root .modal-panel{padding:2rem}}@media (min-width:768px){#insurance-widget-root .modal-panel,#root .modal-panel{padding:2.5rem}}@media (max-width:767px){#insurance-widget-root .modal-panel,#root .modal-panel{width:100%;max-width:none;height:100%;max-height:none;box-shadow:none;border-radius:0;position:fixed;inset:0}}#insurance-widget-root .h1-title,#root .h1-title{letter-spacing:-.01em;color:var(--text-primary);font-size:1.875rem;font-weight:700;line-height:2.25rem}@media (min-width:640px){#insurance-widget-root .h1-title,#root .h1-title{font-size:2.25rem;line-height:2.5rem}}#insurance-widget-root .p-subtitle,#root .p-subtitle{color:var(--text-secondary);margin-top:.5rem}#insurance-widget-root .form-label,#root .form-label{color:var(--text-secondary);margin-bottom:.5rem;font-size:.875rem;font-weight:500;display:block}#insurance-widget-root .form-input,#root .form-input{border-radius:var(--radius-lg);border:1px solid var(--accent-color);width:100%;color:var(--text-primary);background:#fff;outline:none;padding:.75rem 1rem;font-size:1rem;transition:box-shadow .15s,border-color .15s}#insurance-widget-root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number],#root input[type=number]{-moz-appearance:textfield}#insurance-widget-root .form-input::placeholder,#root .form-input::placeholder{color:#94a3b8}#insurance-widget-root .form-input:focus,#root .form-input:focus{border-color:var(--primary-color);box-shadow:0 0 0 1px var(--primary-color)}#insurance-widget-root .select-caret,#root .select-caret{background-image:var(--select-button-svg);appearance:none;background-position:right .75rem center;background-repeat:no-repeat;background-size:1.25rem 1.25rem;padding-right:2.5rem}#insurance-widget-root .radio-card,#root .radio-card{border-radius:var(--radius-md);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:center;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .radio-card:hover,#root .radio-card:hover{border-color:#cfd8e3}#insurance-widget-root .radio-input,#root .radio-input{border:2px solid var(--accent-color);appearance:none;background:0 0;border-radius:9999px;outline:none;width:1.25rem;height:1.25rem}#insurance-widget-root .radio-input:checked,#root .radio-input:checked{border-color:var(--primary-color);background-image:var(--radio-dot-svg);background-position:50%;background-repeat:no-repeat}#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .radio-label,#root .radio-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .btn-primary,#root .btn-primary{border-radius:var(--radius-full);background:var(--primary-color);color:#fff;letter-spacing:.02em;justify-content:center;align-items:center;width:100%;height:3rem;font-weight:700;transition:opacity .15s;display:flex}#insurance-widget-root .btn-primary:hover,#root .btn-primary:hover{opacity:.9}#insurance-widget-root .btn-outline,#root .btn-outline{border-radius:var(--radius-full);width:100%;height:3rem;color:var(--text-primary);border:1px solid var(--accent-color);letter-spacing:.02em;background:#fff;justify-content:center;align-items:center;font-weight:700;transition:background .15s,color .15s,border-color .15s,opacity .15s;display:flex}#insurance-widget-root .btn-outline:hover,#root .btn-outline:hover{border-color:#cfd8e3}#insurance-widget-root .btn-primary,#root .btn-primary,#insurance-widget-root .btn-outline,#root .btn-outline{cursor:pointer}#insurance-widget-root .btn-primary:disabled,#root .btn-primary:disabled,#insurance-widget-root .btn-outline:disabled,#root .btn-outline:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(20%)}#insurance-widget-root .btn-primary:not(:disabled):hover,#root .btn-primary:not(:disabled):hover{opacity:.95}#insurance-widget-root .btn-outline:not(:disabled):hover,#root .btn-outline:not(:disabled):hover{border-color:#cfd8e3}#insurance-widget-root .quote-btn,#root .quote-btn{background-color:var(--color-blue-600);padding-inline:calc(var(--spacing)*6);padding-block:calc(var(--spacing)*3);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-radius:3.40282e38px}@media (hover:hover){:is(#insurance-widget-root .quote-btn,#root .quote-btn):hover{background-color:var(--color-blue-700)}}#insurance-widget-root .input-error,#root .input-error{border-color:#dc2626!important;box-shadow:0 0 0 1px #dc2626!important}#insurance-widget-root .checkbox-card,#root .checkbox-card{border-radius:var(--radius-md);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:flex-start;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .checkbox-card:hover,#root .checkbox-card:hover{border-color:#cfd8e3}#insurance-widget-root .checkbox-input,#root .checkbox-input{border:2px solid var(--accent-color);appearance:none;background:#fff;border-radius:.375rem;outline:none;flex-shrink:0;place-items:center;width:1.25rem;height:1.25rem;margin-top:.125rem;display:grid}#insurance-widget-root .checkbox-input:checked,#root .checkbox-input:checked{border-color:var(--primary-color);background-color:var(--primary-color);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 24 24'%3e%3cpath d='M20.285 6.709a1 1 0 0 1 0 1.414l-9.192 9.193a1 1 0 0 1-1.414 0L3.715 11.55a1 1 0 1 1 1.414-1.414l5.05 5.05 8.485-8.478a1 1 0 0 1 1.621.001z'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat}#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .checkbox-label,#root .checkbox-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{border-width:2px;border-color:var(--primary-color);background:var(--primary-color);align-items:flex-start;gap:.875rem;padding:1rem 1.125rem}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{background:color-mix(in oklab,var(--primary-color)7%,#fff)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{border-color:var(--primary-color);background:var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{background:color-mix(in oklab,var(--primary-color)11%,#fff)}}#insurance-widget-root .communications-consent-checkbox .checkbox-input,#root .communications-consent-checkbox .checkbox-input{border-width:3px;border-color:var(--primary-color);flex-shrink:0;width:1.625rem;height:1.625rem;margin-top:.0625rem}#insurance-widget-root .communications-consent-checkbox .checkbox-input:checked,#root .communications-consent-checkbox .checkbox-input:checked{background-size:1.125rem 1.125rem}#insurance-widget-root .communications-consent-checkbox .checkbox-label,#root .communications-consent-checkbox .checkbox-label{font-size:.875rem;font-weight:400;line-height:1.4}#insurance-widget-root .modal-scroll,#root .modal-scroll{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-height:min(90dvh,800px);overflow-y:auto}#insurance-widget-root .modal-scroll .h1-title,#root .modal-scroll .h1-title{z-index:1;background:#fff;padding-top:.25rem;padding-bottom:.75rem;position:sticky;top:0}#insurance-widget-root .panel-body,#root .panel-body{padding:4px;scroll-padding:4px}#insurance-widget-root .tel-input-wrapper:focus-within:not(.error),#root .tel-input-wrapper:focus-within:not(.error){outline:1px solid var(--primary-color);outline-offset:0px;z-index:1}#insurance-widget-root .tel-input-wrapper.error,#root .tel-input-wrapper.error{outline-offset:0px;z-index:1;outline:1px solid #ef4444}#insurance-widget-root .tel-input-wrapper:focus-within:after,#root .tel-input-wrapper:focus-within:after{content:"";border:1px solid var(--primary-color);pointer-events:none;z-index:10;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .tel-input-wrapper.error:after,#root .tel-input-wrapper.error:after{content:"";pointer-events:none;z-index:10;border:1px solid #ef4444;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .form-label:has(+input[aria-required=true]):after,#root .form-label:has(+input[aria-required=true]):after,#insurance-widget-root .form-label:has(+select[aria-required=true]):after,#root .form-label:has(+select[aria-required=true]):after,#insurance-widget-root .form-label:has(+textarea[aria-required=true]):after,#root .form-label:has(+textarea[aria-required=true]):after,#insurance-widget-root .legend-required:after,#root .legend-required:after{content:" *";color:#dc2626;margin-left:.25rem}#insurance-widget-root .scrollbar-hide,#root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#insurance-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#root .scrollbar-hide::-webkit-scrollbar{display:none}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;color:#fff!important;background-color:#2563eb!important;min-height:3rem!important;display:flex!important;position:relative!important;overflow:visible!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{opacity:.5!important;background-color:#d1d5db!important}#insurance-widget-root .credify-link-underline,#root .credify-link-underline{color:var(--primary-color);text-decoration:underline}#insurance-widget-root .credify-link-underline:hover,#root .credify-link-underline:hover{color:#0052cc}#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{appearance:none;background:0 0;border:none;padding:0;visibility:visible!important;opacity:1!important;cursor:pointer!important;clip-path:none!important;pointer-events:auto!important;display:inline-flex!important;overflow:visible!important}@media (max-width:767px){#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{visibility:hidden!important;pointer-events:none!important;display:none!important}}#insurance-widget-root button.credify-btn-back[type=button],#root button.credify-btn-back[type=button],#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{transition:border-color .15s,background-color .15s;visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;border-radius:var(--radius-full)!important;color:#1a202c!important;text-align:center!important;cursor:pointer!important;background-color:#fff!important;border:1px solid #e2e8f0!important;place-content:center!important;place-items:center!important;height:3rem!important;min-height:3rem!important;margin:0!important;padding:0!important;font-size:1rem!important;font-weight:600!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button]:not(:disabled):hover,#root button.credify-btn-back[type=button]:not(:disabled):hover{background-color:#f9fafb!important;border-color:#cbd5e1!important}#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{opacity:.5!important;cursor:not-allowed!important;background-color:#f3f4f6!important}#insurance-widget-root button.credify-btn-back[type=button][data-testid=communications-consent-decline],#root button.credify-btn-back[type=button][data-testid=communications-consent-decline]{font-weight:400!important}#insurance-widget-root button.credify-btn-back-rates[type=button],#root button.credify-btn-back-rates[type=button]{margin-top:2rem!important}#insurance-widget-root button.credify-retry-btn[type=button],#root button.credify-retry-btn[type=button]{cursor:pointer;font:inherit;border:none;visibility:visible!important;color:var(--text-primary)!important;clip-path:none!important;pointer-events:auto!important;background:0 0!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button],#root button.rates-bind-btn[type=button],#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;text-align:center!important;color:#fff!important;background-color:#2563eb!important;place-content:center!important;place-items:center!important;min-height:2.5rem!important;padding:0 1rem!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{opacity:.5!important;background-color:#cbd5e1!important}#insurance-widget-root button.rates-bind-btn.rates-bind-btn-requested,#root button.rates-bind-btn.rates-bind-btn-requested{color:#fff!important;background-color:#10b981!important}#insurance-widget-root button.quote-btn[type=button],#root button.quote-btn[type=button]{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;color:#fff!important;background-color:#2563eb!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root a.credify-link-underline[href],#root a.credify-link-underline[href]{color:var(--primary-color);visibility:visible!important;clip-path:none!important;pointer-events:auto!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root input.form-input,#root input.form-input,#insurance-widget-root select.form-input,#root select.form-input,#insurance-widget-root textarea.form-input,#root textarea.form-input{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;display:block!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit],#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button],#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;min-height:3rem!important;display:flex!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit]{color:#fff!important;background-color:#2563eb!important}#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button]{color:var(--text-primary)!important;border:1px solid var(--accent-color)!important;background-color:#fff!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{opacity:.5!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled{color:#fff!important;background-color:#d1d5db!important}#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{color:var(--text-primary)!important;background-color:#f1f5f9!important}#insurance-widget-root .form-wizard-steps-header,#root .form-wizard-steps-header{visibility:visible!important;display:flex!important}#insurance-widget-root .form-wizard-steps,#root .form-wizard-steps{flex:1;align-items:center;gap:.5rem;min-width:0;margin:0;padding:0;font-size:.75rem;line-height:1rem;list-style:none;overflow-x:auto;display:flex!important}#insurance-widget-root .form-wizard-step-pill,#root .form-wizard-step-pill{white-space:nowrap;border:1px solid;border-radius:9999px;flex-shrink:0;padding:.25rem .625rem;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-arrow,#root .form-wizard-step-arrow{color:#94a3b8;flex-shrink:0;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-counter,#root .form-wizard-step-counter{color:#64748b;flex-shrink:0;font-size:.875rem;line-height:1.25rem;visibility:visible!important;display:block!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
(function(){if(typeof Ke>"u")var Ke={env:{}}})();(function(Ke,
|
|
3
|
-
`);for(let a=n;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const l=
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;700&display=swap";/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties,theme,base,components,utilities;@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-emerald-600:oklch(59.6% .145 163.225);--color-cyan-500:oklch(71.5% .143 215.221);--color-blue-50:oklch(97% .014 254.604);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-900:oklch(21% .034 264.665);--color-white:#fff;--spacing:.25rem;--container-lg:32rem;--container-2xl:42rem;--container-4xl:56rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-widest:.1em;--leading-snug:1.375;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\\[9999\\]{z-index:9999}.z-\\[10000\\]{z-index:10000}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.-mt-4{margin-top:calc(var(--spacing)*-4)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-1{margin-left:calc(var(--spacing)*1)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.\\!w-auto{width:auto!important}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-60{width:calc(var(--spacing)*60)}.w-auto{width:auto}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[7rem\\]{max-width:7rem}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8\\.5rem\\]{min-width:8.5rem}.flex-1{flex:1}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-end{align-self:flex-end}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-\\[var\\(--accent-color\\)\\]{border-color:var(--accent-color)}.border-amber-300{border-color:var(--color-amber-300)}.border-blue-600{border-color:var(--color-blue-600)}.border-cyan-500{border-color:var(--color-cyan-500)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-200{border-color:var(--color-red-200)}.border-red-500{border-color:var(--color-red-500)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-t-slate-600{border-top-color:var(--color-slate-600)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-50\\/40{background-color:#fffbeb66}@supports (color:color-mix(in lab,red,red)){.bg-amber-50\\/40{background-color:color-mix(in oklab,var(--color-amber-50)40%,transparent)}}.bg-amber-100{background-color:var(--color-amber-100)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-red-50{background-color:var(--color-red-50)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.object-contain{object-fit:contain}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-5{padding-left:calc(var(--spacing)*5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--text-primary\\)\\]{color:var(--text-primary)}.text-amber-800{color:var(--color-amber-800)}.text-blue-600{color:var(--color-blue-600)}.text-emerald-600{color:var(--color-emerald-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-all{-webkit-user-select:all;user-select:all}.group-focus-within\\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.focus-within\\:border-\\[var\\(--primary-color\\)\\]:focus-within{border-color:var(--primary-color)}@media (hover:hover){.hover\\:bg-blue-600\\/90:hover{background-color:#155dfce6}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/90:hover{background-color:color-mix(in oklab,var(--color-blue-600)90%,transparent)}}.hover\\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\\:text-amber-900:hover{color:var(--color-amber-900)}.hover\\:text-blue-700:hover{color:var(--color-blue-700)}.hover\\:text-slate-600:hover{color:var(--color-slate-600)}.hover\\:text-slate-800:hover{color:var(--color-slate-800)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:#155dfc66}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-600\\/40:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-600)40%,transparent)}}.focus-visible\\:ring-slate-400:focus-visible{--tw-ring-color:var(--color-slate-400)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-slate-300:disabled{background-color:var(--color-slate-300)}.disabled\\:text-slate-500:disabled{color:var(--color-slate-500)}.disabled\\:opacity-50:disabled{opacity:.5}.disabled\\:opacity-60:disabled{opacity:.6}@media (min-width:40rem){.sm\\:w-\\[calc\\(50\\%-0\\.5rem\\)\\]{width:calc(50% - .5rem)}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width:64rem){.lg\\:w-\\[calc\\(33\\.333\\%-0\\.667rem\\)\\]{width:calc(33.333% - .667rem)}}@media (min-width:80rem){.xl\\:w-\\[calc\\(25\\%-0\\.75rem\\)\\]{width:calc(25% - .75rem)}}}:root{--primary-color:#006aff;--secondary-color:#f0f4ff;--background-color:#fff;--text-primary:#1a202c;--text-secondary:#718096;--accent-color:#e2e8f0;--radius-sm:.25rem;--radius-md:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-2xl:1.25rem;--radius-3xl:1.75rem;--radius-full:9999px;--radio-dot-svg:url("data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27%23006aff%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3ccircle cx=%278%27 cy=%278%27 r=%274%27/%3e%3c/svg%3e");--select-button-svg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='24px' height='24px' fill='%23718096' viewBox='0 0 256 256'%3e%3cpath d='m215.39 92.94-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 1 1 11.32-11.32L128 154.06l74.07-72.44a8 8 0 0 1 11.32 11.32Z'/%3e%3c/svg%3e")}#insurance-widget-root,#root{color:var(--text-primary);font-family:Spline Sans,ui-sans-serif,system-ui,sans-serif}#insurance-widget-root .backdrop,#root .backdrop{background:#00000080;position:fixed;inset:0}#insurance-widget-root .modal-panel,#root .modal-panel{border-radius:var(--radius-2xl);padding:1.5rem;box-shadow:0 24px 64px -20px #00000059;background:#fff!important}@media (min-width:640px){#insurance-widget-root .modal-panel,#root .modal-panel{padding:2rem}}@media (min-width:768px){#insurance-widget-root .modal-panel,#root .modal-panel{padding:2.5rem}}@media (max-width:767px){#insurance-widget-root .modal-panel,#root .modal-panel{width:100%;max-width:none;height:100%;max-height:none;box-shadow:none;border-radius:0;position:fixed;inset:0}}#insurance-widget-root .h1-title,#root .h1-title{letter-spacing:-.01em;color:var(--text-primary);font-size:1.875rem;font-weight:700;line-height:2.25rem}@media (min-width:640px){#insurance-widget-root .h1-title,#root .h1-title{font-size:2.25rem;line-height:2.5rem}}#insurance-widget-root .p-subtitle,#root .p-subtitle{color:var(--text-secondary);margin-top:.5rem}#insurance-widget-root .form-label,#root .form-label{color:var(--text-secondary);margin-bottom:.5rem;font-size:.875rem;font-weight:500;display:block}#insurance-widget-root .form-input,#root .form-input{border-radius:var(--radius-lg);border:1px solid var(--accent-color);width:100%;color:var(--text-primary);background:#fff;outline:none;padding:.75rem 1rem;font-size:1rem;transition:box-shadow .15s,border-color .15s}#insurance-widget-root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}#root input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}#insurance-widget-root input[type=number],#root input[type=number]{-moz-appearance:textfield}#insurance-widget-root .form-input::placeholder,#root .form-input::placeholder{color:#94a3b8}#insurance-widget-root .form-input:focus,#root .form-input:focus{border-color:var(--primary-color);box-shadow:0 0 0 1px var(--primary-color)}#insurance-widget-root .select-caret,#root .select-caret{background-image:var(--select-button-svg);appearance:none;background-position:right .75rem center;background-repeat:no-repeat;background-size:1.25rem 1.25rem;padding-right:2.5rem}#insurance-widget-root .radio-card,#root .radio-card{border-radius:var(--radius-md);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:center;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .radio-card:hover,#root .radio-card:hover{border-color:#cfd8e3}#insurance-widget-root .radio-input,#root .radio-input{border:2px solid var(--accent-color);appearance:none;background:0 0;border-radius:9999px;outline:none;width:1.25rem;height:1.25rem}#insurance-widget-root .radio-input:checked,#root .radio-input:checked{border-color:var(--primary-color);background-image:var(--radio-dot-svg);background-position:50%;background-repeat:no-repeat}#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .radio-card:has(.radio-input:checked),#root .radio-card:has(.radio-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .radio-label,#root .radio-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .btn-primary,#root .btn-primary{border-radius:var(--radius-full);background:var(--primary-color);color:#fff;letter-spacing:.02em;justify-content:center;align-items:center;width:100%;height:3rem;font-weight:700;transition:opacity .15s;display:flex}#insurance-widget-root .btn-primary:hover,#root .btn-primary:hover{opacity:.9}#insurance-widget-root .btn-outline,#root .btn-outline{border-radius:var(--radius-full);width:100%;height:3rem;color:var(--text-primary);border:1px solid var(--accent-color);letter-spacing:.02em;background:#fff;justify-content:center;align-items:center;font-weight:700;transition:background .15s,color .15s,border-color .15s,opacity .15s;display:flex}#insurance-widget-root .btn-outline:hover,#root .btn-outline:hover{border-color:#cfd8e3}#insurance-widget-root .btn-primary,#root .btn-primary,#insurance-widget-root .btn-outline,#root .btn-outline{cursor:pointer}#insurance-widget-root .btn-primary:disabled,#root .btn-primary:disabled,#insurance-widget-root .btn-outline:disabled,#root .btn-outline:disabled{opacity:.5;cursor:not-allowed;filter:grayscale(20%)}#insurance-widget-root .btn-primary:not(:disabled):hover,#root .btn-primary:not(:disabled):hover{opacity:.95}#insurance-widget-root .btn-outline:not(:disabled):hover,#root .btn-outline:not(:disabled):hover{border-color:#cfd8e3}#insurance-widget-root .quote-btn,#root .quote-btn{background-color:var(--color-blue-600);padding-inline:calc(var(--spacing)*6);padding-block:calc(var(--spacing)*3);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-radius:3.40282e38px}@media (hover:hover){:is(#insurance-widget-root .quote-btn,#root .quote-btn):hover{background-color:var(--color-blue-700)}}#insurance-widget-root .input-error,#root .input-error{border-color:#dc2626!important;box-shadow:0 0 0 1px #dc2626!important}#insurance-widget-root .checkbox-card,#root .checkbox-card{border-radius:var(--radius-md);border:2px solid var(--accent-color);cursor:pointer;background:#fff;align-items:flex-start;gap:.75rem;padding:1rem;transition:all .15s;display:flex}#insurance-widget-root .checkbox-card:hover,#root .checkbox-card:hover{border-color:#cfd8e3}#insurance-widget-root .checkbox-input,#root .checkbox-input{border:2px solid var(--accent-color);appearance:none;background:#fff;border-radius:.375rem;outline:none;flex-shrink:0;place-items:center;width:1.25rem;height:1.25rem;margin-top:.125rem;display:grid}#insurance-widget-root .checkbox-input:checked,#root .checkbox-input:checked{border-color:var(--primary-color);background-color:var(--primary-color);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 24 24'%3e%3cpath d='M20.285 6.709a1 1 0 0 1 0 1.414l-9.192 9.193a1 1 0 0 1-1.414 0L3.715 11.55a1 1 0 1 1 1.414-1.414l5.05 5.05 8.485-8.478a1 1 0 0 1 1.621.001z'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat}#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .checkbox-card:has(.checkbox-input:checked),#root .checkbox-card:has(.checkbox-input:checked){box-shadow:0 0 0 2px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .checkbox-label,#root .checkbox-label{color:var(--text-primary);font-size:1rem;font-weight:600}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{border-width:2px;border-color:var(--primary-color);background:var(--primary-color);align-items:flex-start;gap:.875rem;padding:1rem 1.125rem}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{background:color-mix(in oklab,var(--primary-color)7%,#fff)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card,#root .communications-consent-checkbox.checkbox-card{box-shadow:0 0 0 1px color-mix(in oklab,var(--primary-color)20%,transparent)}}#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{border-color:var(--primary-color);background:var(--primary-color)}@supports (color:color-mix(in lab,red,red)){#insurance-widget-root .communications-consent-checkbox.checkbox-card:hover,#root .communications-consent-checkbox.checkbox-card:hover{background:color-mix(in oklab,var(--primary-color)11%,#fff)}}#insurance-widget-root .communications-consent-checkbox .checkbox-input,#root .communications-consent-checkbox .checkbox-input{border-width:3px;border-color:var(--primary-color);flex-shrink:0;width:1.625rem;height:1.625rem;margin-top:.0625rem}#insurance-widget-root .communications-consent-checkbox .checkbox-input:checked,#root .communications-consent-checkbox .checkbox-input:checked{background-size:1.125rem 1.125rem}#insurance-widget-root .communications-consent-checkbox .checkbox-label,#root .communications-consent-checkbox .checkbox-label{font-size:.875rem;font-weight:400;line-height:1.4}#insurance-widget-root .modal-scroll,#root .modal-scroll{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-height:min(90dvh,800px);overflow-y:auto}#insurance-widget-root .modal-scroll .h1-title,#root .modal-scroll .h1-title{z-index:1;background:#fff;padding-top:.25rem;padding-bottom:.75rem;position:sticky;top:0}#insurance-widget-root .panel-body,#root .panel-body{padding:4px;scroll-padding:4px}#insurance-widget-root .tel-input-wrapper:focus-within:not(.error),#root .tel-input-wrapper:focus-within:not(.error){outline:1px solid var(--primary-color);outline-offset:0px;z-index:1}#insurance-widget-root .tel-input-wrapper.error,#root .tel-input-wrapper.error{outline-offset:0px;z-index:1;outline:1px solid #ef4444}#insurance-widget-root .tel-input-wrapper:focus-within:after,#root .tel-input-wrapper:focus-within:after{content:"";border:1px solid var(--primary-color);pointer-events:none;z-index:10;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .tel-input-wrapper.error:after,#root .tel-input-wrapper.error:after{content:"";pointer-events:none;z-index:10;border:1px solid #ef4444;border-radius:.75rem;position:absolute;inset:-1px}#insurance-widget-root .form-label:has(+input[aria-required=true]):after,#root .form-label:has(+input[aria-required=true]):after,#insurance-widget-root .form-label:has(+select[aria-required=true]):after,#root .form-label:has(+select[aria-required=true]):after,#insurance-widget-root .form-label:has(+textarea[aria-required=true]):after,#root .form-label:has(+textarea[aria-required=true]):after,#insurance-widget-root .legend-required:after,#root .legend-required:after{content:" *";color:#dc2626;margin-left:.25rem}#insurance-widget-root .scrollbar-hide,#root .scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}#insurance-widget-root .scrollbar-hide::-webkit-scrollbar{display:none}#root .scrollbar-hide::-webkit-scrollbar{display:none}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button],#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;color:#fff!important;background-color:#2563eb!important;min-height:3rem!important;display:flex!important;position:relative!important;overflow:visible!important}#insurance-widget-root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled,#root button.form-wizard-next-btn[data-widget-ctrl=next][type=button]:disabled{opacity:.5!important;background-color:#d1d5db!important}#insurance-widget-root .credify-link-underline,#root .credify-link-underline{color:var(--primary-color);text-decoration:underline}#insurance-widget-root .credify-link-underline:hover,#root .credify-link-underline:hover{color:#0052cc}#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{appearance:none;background:0 0;border:none;padding:0;visibility:visible!important;opacity:1!important;cursor:pointer!important;clip-path:none!important;pointer-events:auto!important;display:inline-flex!important;overflow:visible!important}@media (max-width:767px){#insurance-widget-root button.modal-close-btn[type=button],#root button.modal-close-btn[type=button]{visibility:hidden!important;pointer-events:none!important;display:none!important}}#insurance-widget-root button.credify-btn-back[type=button],#root button.credify-btn-back[type=button],#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{transition:border-color .15s,background-color .15s;visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;border-radius:var(--radius-full)!important;color:#1a202c!important;text-align:center!important;cursor:pointer!important;background-color:#fff!important;border:1px solid #e2e8f0!important;place-content:center!important;place-items:center!important;height:3rem!important;min-height:3rem!important;margin:0!important;padding:0!important;font-size:1rem!important;font-weight:600!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.credify-btn-back[type=button]:not(:disabled):hover,#root button.credify-btn-back[type=button]:not(:disabled):hover{background-color:#f9fafb!important;border-color:#cbd5e1!important}#insurance-widget-root button.credify-btn-back[type=button]:disabled,#root button.credify-btn-back[type=button]:disabled{opacity:.5!important;cursor:not-allowed!important;background-color:#f3f4f6!important}#insurance-widget-root button.credify-btn-back[type=button][data-testid=communications-consent-decline],#root button.credify-btn-back[type=button][data-testid=communications-consent-decline]{font-weight:400!important}#insurance-widget-root button.credify-btn-back-rates[type=button],#root button.credify-btn-back-rates[type=button]{margin-top:2rem!important}#insurance-widget-root button.credify-retry-btn[type=button],#root button.credify-retry-btn[type=button]{cursor:pointer;font:inherit;border:none;visibility:visible!important;color:var(--text-primary)!important;clip-path:none!important;pointer-events:auto!important;background:0 0!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button],#root button.rates-bind-btn[type=button],#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;box-sizing:border-box!important;text-align:center!important;color:#fff!important;background-color:#2563eb!important;place-content:center!important;place-items:center!important;min-height:2.5rem!important;padding:0 1rem!important;line-height:1!important;display:grid!important;overflow:visible!important}#insurance-widget-root button.rates-bind-btn[type=button]:disabled,#root button.rates-bind-btn[type=button]:disabled{opacity:.5!important;background-color:#cbd5e1!important}#insurance-widget-root button.rates-bind-btn.rates-bind-btn-requested,#root button.rates-bind-btn.rates-bind-btn-requested{color:#fff!important;background-color:#10b981!important}#insurance-widget-root button.quote-btn[type=button],#root button.quote-btn[type=button]{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;color:#fff!important;background-color:#2563eb!important;display:inline-flex!important;overflow:visible!important}#insurance-widget-root a.credify-link-underline[href],#root a.credify-link-underline[href]{color:var(--primary-color);visibility:visible!important;clip-path:none!important;pointer-events:auto!important;text-decoration:underline!important;display:inline!important;overflow:visible!important}#insurance-widget-root input.form-input,#root input.form-input,#insurance-widget-root select.form-input,#root select.form-input,#insurance-widget-root textarea.form-input,#root textarea.form-input{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;display:block!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit],#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button],#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{visibility:visible!important;opacity:1!important;clip-path:none!important;pointer-events:auto!important;min-height:3rem!important;display:flex!important;overflow:visible!important}#insurance-widget-root button.btn-primary[type=button],#root button.btn-primary[type=button],#insurance-widget-root button.btn-primary[type=submit],#root button.btn-primary[type=submit]{color:#fff!important;background-color:#2563eb!important}#insurance-widget-root button.btn-outline[type=button],#root button.btn-outline[type=button]{color:var(--text-primary)!important;border:1px solid var(--accent-color)!important;background-color:#fff!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled,#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{opacity:.5!important}#insurance-widget-root button.btn-primary[type=button]:disabled,#root button.btn-primary[type=button]:disabled{color:#fff!important;background-color:#d1d5db!important}#insurance-widget-root button.btn-outline[type=button]:disabled,#root button.btn-outline[type=button]:disabled{color:var(--text-primary)!important;background-color:#f1f5f9!important}#insurance-widget-root .form-wizard-steps-header,#root .form-wizard-steps-header{visibility:visible!important;display:flex!important}#insurance-widget-root .form-wizard-steps,#root .form-wizard-steps{flex:1;align-items:center;gap:.5rem;min-width:0;margin:0;padding:0;font-size:.75rem;line-height:1rem;list-style:none;overflow-x:auto;display:flex!important}#insurance-widget-root .form-wizard-step-pill,#root .form-wizard-step-pill{white-space:nowrap;border:1px solid;border-radius:9999px;flex-shrink:0;padding:.25rem .625rem;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-arrow,#root .form-wizard-step-arrow{color:#94a3b8;flex-shrink:0;visibility:visible!important;display:inline-flex!important}#insurance-widget-root .form-wizard-step-counter,#root .form-wizard-step-counter{color:#64748b;flex-shrink:0;font-size:.875rem;line-height:1.25rem;visibility:visible!important;display:block!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
(function(){if(typeof Ke>"u")var Ke={env:{}}})();(function(Ke,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime"],m):(Ke=typeof globalThis<"u"?globalThis:Ke||self,m(Ke.CredifyInsuranceWidget={},Ke.React,Ke.ReactDOM,Ke.React))})(this,(function(Ke,m,Fl,u){"use strict";function Bl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Bn=Bl(m),fe=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,mt="8.55.2",ce=globalThis;function Pr(e,t,r){const n=r||ce,o=n.__SENTRY__=n.__SENTRY__||{},i=o[mt]=o[mt]||{};return i[e]||(i[e]=t())}const It=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ul="Sentry Logger ",Un=["debug","info","warn","error","log","assert","trace"],xr={};function Ot(e){if(!("console"in ce))return e();const t=ce.console,r={},n=Object.keys(xr);n.forEach(o=>{const i=xr[o];r[o]=t[o],t[o]=i});try{return e()}finally{n.forEach(o=>{t[o]=r[o]})}}function Hl(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return It?Un.forEach(r=>{t[r]=(...n)=>{e&&Ot(()=>{ce.console[r](`${Ul}[${r}]:`,...n)})}}):Un.forEach(r=>{t[r]=()=>{}}),t}const W=Pr("logger",Hl),Si=50,Mt="?",Ei=/\(error: (.*)\)/,wi=/captureMessage|captureException/;function Ci(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0,o=0)=>{const i=[],s=r.split(`
|
|
3
|
+
`);for(let a=n;a<s.length;a++){const c=s[a];if(c.length>1024)continue;const l=Ei.test(c)?c.replace(Ei,"$1"):c;if(!l.match(/\S*Error: /)){for(const d of t){const f=d(l);if(f){i.push(f);break}}if(i.length>=Si+o)break}}return Rl(i.slice(o))}}function zl(e){return Array.isArray(e)?Ci(...e):e}function Rl(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Lr(t).function||"")&&t.pop(),t.reverse(),wi.test(Lr(t).function||"")&&(t.pop(),wi.test(Lr(t).function||"")&&t.pop()),t.slice(0,Si).map(r=>({...r,filename:r.filename||Lr(t).filename,function:r.function||Mt}))}function Lr(e){return e[e.length-1]||{}}const Hn="<anonymous>";function _t(e){try{return!e||typeof e!="function"?Hn:e.name||Hn}catch{return Hn}}function Ai(e){const t=e.exception;if(t){const r=[];try{return t.values.forEach(n=>{n.stacktrace.frames&&r.push(...n.stacktrace.frames)}),r}catch{return}}}const $r={},Ti={};function Dt(e,t){$r[e]=$r[e]||[],$r[e].push(t)}function Pt(e,t){if(!Ti[e]){Ti[e]=!0;try{t()}catch(r){It&&W.error(`Error while instrumenting ${e}`,r)}}}function nt(e,t){const r=e&&$r[e];if(r)for(const n of r)try{n(t)}catch(o){It&&W.error(`Error while triggering instrumentation handler.
|
|
4
4
|
Type: ${e}
|
|
5
5
|
Name: ${_t(n)}
|
|
6
|
-
Error:`,o)}}let Hn=null;function xl(e){const t="error";Dt(t,e),Pt(t,$l)}function $l(){Hn=ae.onerror,ae.onerror=function(e,t,r,n,o){return nt("error",{column:n,error:o,line:r,msg:e,url:t}),Hn?Hn.apply(this,arguments):!1},ae.onerror.__SENTRY_INSTRUMENTED__=!0}let Rn=null;function Fl(e){const t="unhandledrejection";Dt(t,e),Pt(t,Bl)}function Bl(){Rn=ae.onunhandledrejection,ae.onunhandledrejection=function(e){return nt("unhandledrejection",e),Rn?Rn.apply(this,arguments):!0},ae.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function $r(){return zn(ae),ae}function zn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||mt,t[mt]=t[mt]||{}}const Ci=Object.prototype.toString;function Fr(e){switch(Ci.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Lt(e,Error)}}function Vt(e,t){return Ci.call(e)===`[object ${t}]`}function Ai(e){return Vt(e,"ErrorEvent")}function Ti(e){return Vt(e,"DOMError")}function Ul(e){return Vt(e,"DOMException")}function lt(e){return Vt(e,"String")}function jn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Wn(e){return e===null||jn(e)||typeof e!="object"&&typeof e!="function"}function Yt(e){return Vt(e,"Object")}function Br(e){return typeof Event<"u"&&Lt(e,Event)}function Hl(e){return typeof Element<"u"&&Lt(e,Element)}function Rl(e){return Vt(e,"RegExp")}function Ur(e){return!!(e&&e.then&&typeof e.then=="function")}function zl(e){return Yt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Lt(e,t){try{return e instanceof t}catch{return!1}}function ki(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const qn=ae,jl=80;function Ii(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||jl;for(;r&&i++<n&&(l=Wl(r,d),!(l==="html"||i>1&&s+o.length*c+l.length>=f));)o.push(l),s+=l.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Wl(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(qn.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const o=t&&t.length?t.filter(s=>r.getAttribute(s)).map(s=>[s,r.getAttribute(s)]):null;if(o&&o.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const s=r.className;if(s&<(s)){const a=s.split(/\s+/);for(const c of a)n.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const s of i){const a=r.getAttribute(s);a&&n.push(`[${s}="${a}"]`)}return n.join("")}function ql(){try{return qn.document.location.href}catch{return""}}function Gl(e){if(!qn.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Kt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ni(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const o=e[n];try{ki(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function Zl(e,t,r=!1){return lt(e)?Rl(t)?t.test(e):lt(t)?r?e===t:e.includes(t):!1:!1}function Hr(e,t=[],r=!1){return t.some(n=>Zl(e,n,r))}function We(e,t,r){if(!(t in e))return;const n=e[t],o=r(n);typeof o=="function"&&Oi(o,n);try{e[t]=o}catch{Nt&&q.log(`Failed to replace method "${t}" in object`,e)}}function xt(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{Nt&&q.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Oi(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,xt(e,"__sentry_original__",t)}catch{}}function Gn(e){return e.__sentry_original__}function Mi(e){if(Fr(e))return{message:e.message,name:e.name,stack:e.stack,...Pi(e)};if(Br(e)){const t={type:e.type,target:Di(e.target),currentTarget:Di(e.currentTarget),...Pi(e)};return typeof CustomEvent<"u"&&Lt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Di(e){try{return Hl(e)?Ii(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Pi(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function Vl(e,t=40){const r=Object.keys(Mi(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return Kt(n,t);for(let o=r.length;o>0;o--){const i=r.slice(0,o).join(", ");if(!(i.length>t))return o===r.length?i:Kt(i,t)}return""}function Je(e){return Zn(e,new Map)}function Zn(e,t){if(Yl(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const o of Object.getOwnPropertyNames(e))typeof e[o]<"u"&&(n[o]=Zn(e[o],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(o=>{n.push(Zn(o,t))}),n}return e}function Yl(e){if(!Yt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Li=1e3;function pr(){return Date.now()/Li}function Kl(){const{performance:e}=ae;if(!e||!e.now)return pr;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/Li}const ut=Kl();(()=>{const{performance:e}=ae;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+r-n):t,l=c<t;return i||l?o<=c?e.timeOrigin:s:n})();function Qe(){const e=ae,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function xi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ht(e){const{message:t,event_id:r}=e;if(t)return t;const n=xi(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Vn(e,t,r){const n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Jt(e,t){const r=xi(e);if(!r)return;const n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){const i={...o&&o.data,...t.data};r.mechanism.data=i}}function $i(e){if(Jl(e))return!0;try{xt(e,"__sentry_captured__",!0)}catch{}return!1}function Jl(e){try{return e.__sentry_captured__}catch{}}var dt;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(dt||(dt={}));function $t(e){return new Xe(t=>{t(e)})}function Rr(e){return new Xe((t,r)=>{r(e)})}class Xe{constructor(t){Xe.prototype.__init.call(this),Xe.prototype.__init2.call(this),Xe.prototype.__init3.call(this),Xe.prototype.__init4.call(this),this._state=dt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Xe((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new Xe((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}__init(){this._resolve=t=>{this._setResult(dt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(dt.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===dt.PENDING){if(Ur(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===dt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===dt.RESOLVED&&r[1](this._value),this._state===dt.REJECTED&&r[2](this._value),r[0]=!0)})}}}function Ql(e){const t=ut(),r={sid:Qe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>eu(r)};return e&&Qt(r,e),r}function Qt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ut(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Qe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Xl(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Qt(e,r)}function eu(e){return Je({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function Fi(){return Qe()}function Yn(){return Qe().substring(16)}function zr(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const n={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=zr(n[o],t[o],r-1));return n}const Kn="_sentrySpan";function Bi(e,t){t?xt(e,Kn,t):delete e[Kn]}function Ui(e){return e[Kn]}const tu=100;class Jn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Fi(),spanId:Yn()}}clone(){const t=new Jn;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Bi(t,Ui(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Qt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,[n,o]=r instanceof gt?[r.getScopeData(),r.getRequestSession()]:Yt(r)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Bi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Fi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:tu;if(n<=0)return this;const o={timestamp:pr(),...t};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ui(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=zr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Yn(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:Qe();if(!this._client)return q.warn("No client configured on scope - will not capture exception!"),n;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){const o=n&&n.event_id?n.event_id:Qe();if(!this._client)return q.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){const n=r&&r.event_id?r.event_id:Qe();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(q.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const gt=Jn;function ru(){return Dr("defaultCurrentScope",()=>new gt)}function nu(){return Dr("defaultIsolationScope",()=>new gt)}class ou{constructor(t,r){let n;t?n=t:n=new gt;let o;r?o=r:o=new gt,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(o){throw this._popScope(),o}return Ur(n)?n.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Xt(){const e=$r(),t=zn(e);return t.stack=t.stack||new ou(ru(),nu())}function iu(e){return Xt().withScope(e)}function su(e,t){const r=Xt();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function Hi(e){return Xt().withScope(()=>e(Xt().getIsolationScope()))}function au(){return{withIsolationScope:Hi,withScope:iu,withSetScope:su,withSetIsolationScope:(e,t)=>Hi(t),getCurrentScope:()=>Xt().getScope(),getIsolationScope:()=>Xt().getIsolationScope()}}function Qn(e){const t=zn(e);return t.acs?t.acs:au()}function st(){const e=$r();return Qn(e).getCurrentScope()}function Ft(){const e=$r();return Qn(e).getIsolationScope()}function cu(){return Dr("globalScope",()=>new gt)}function Xn(...e){const t=$r(),r=Qn(t);if(e.length===2){const[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function Ie(){return st().getClient()}function lu(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:o}=t;return Je({trace_id:r,span_id:n,parent_span_id:o})}const uu="_sentryMetrics";function du(e){const t=e[uu];if(!t)return;const r={};for(const[,[n,o]]of t)(r[n]||(r[n]=[])).push(Je(o));return r}const fu="sentry.source",pu="sentry.sample_rate",mu="sentry.op",_u="sentry.origin",hu=0,gu=1,yu="sentry-",bu=/^sentry-/;function vu(e){const t=Su(e);if(!t)return;const r=Object.entries(t).reduce((n,[o,i])=>{if(o.match(bu)){const s=o.slice(yu.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function Su(e){if(!(!e||!lt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=Ri(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):Ri(e)}function Ri(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const Eu=1;let zi=!1;function wu(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:eo(e).parent_span_id,i=n?Yn():t;return Je({parent_span_id:o,span_id:i,trace_id:r})}function ji(e){return typeof e=="number"?Wi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Wi(e.getTime()):ut()}function Wi(e){return e>9999999999?e/1e3:e}function eo(e){if(Au(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(Cu(e)){const{attributes:n,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return Je({span_id:t,trace_id:r,data:n,description:i,parent_span_id:a,start_timestamp:ji(o),timestamp:ji(s)||void 0,status:ku(c),op:n[mu],origin:n[_u],_metrics_summary:du(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function Cu(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Au(e){return typeof e.getSpanJSON=="function"}function Tu(e){const{traceFlags:t}=e.spanContext();return t===Eu}function ku(e){if(!(!e||e.code===hu))return e.code===gu?"ok":e.message||"unknown_error"}const Iu="_sentryRootSpan";function qi(e){return e[Iu]||e}function Nu(){zi||(Ot(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),zi=!0)}function Ou(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ie(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const to="production",Mu="_frozenDsc";function Gi(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o=Je({environment:r.environment||to,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",o),o}function Du(e,t){const r=t.getPropagationContext();return r.dsc||Gi(r.traceId,e)}function Pu(e){const t=Ie();if(!t)return{};const r=qi(e),n=r[Mu];if(n)return n;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),s=i&&vu(i);if(s)return s;const a=Gi(e.spanContext().traceId,t),c=eo(r),l=c.data||{},d=l[pu];d!=null&&(a.sample_rate=`${d}`);const f=l[fu],h=c.description;return f!=="url"&&h&&(a.transaction=h),Ou()&&(a.sampled=String(Tu(r))),t.emit("createDsc",a,r),a}function Lu(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){pe&&q.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}const xu=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function $u(e){return e==="http"||e==="https"}function mr(e,t=!1){const{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function Fu(e){const t=xu.exec(e);if(!t){Ot(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,o="",i="",s="",a=""]=t.slice(1);let c="",l=a;const d=l.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),l=d.pop()),l){const f=l.match(/^\d+/);f&&(l=f[0])}return Zi({host:i,pass:o,path:c,projectId:l,port:s,protocol:r,publicKey:n})}function Zi(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Bu(e){if(!Nt)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(q.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?$u(n)?t&&isNaN(parseInt(t,10))?(q.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(q.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(q.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Vi(e){const t=typeof e=="string"?Fu(e):Zi(e);if(!(!t||!Bu(t)))return t}function Uu(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function n(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[r,n]}function ft(e,t=100,r=1/0){try{return ro("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Yi(e,t=3,r=100*1024){const n=ft(e,t);return ju(n)>r?Yi(e,t-1,r):n}function ro(e,t,r=1/0,n=1/0,o=Uu()){const[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Hu(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const m=l.toJSON();return ro("",m,c-1,n,o)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const h=Mi(t);for(const m in h){if(!Object.prototype.hasOwnProperty.call(h,m))continue;if(f>=n){d[m]="[MaxProperties ~]";break}const g=h[m];d[m]=ro(m,g,c-1,n,o),f++}return s(t),d}function Hu(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(ki(t))return"[VueViewModel]";if(zl(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${_t(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Ru(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Ru(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function zu(e){return~-encodeURI(e).split(/%..|./).length}function ju(e){return zu(JSON.stringify(e))}function _r(e,t=[]){return[e,t]}function Wu(e,t){const[r,n]=e;return[r,[...n,t]]}function Ki(e,t){const r=e[1];for(const n of r){const o=n[0].type;if(t(n,o))return!0}return!1}function no(e){return ae.__SENTRY__&&ae.__SENTRY__.encodePolyfill?ae.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function qu(e){const[t,r]=e;let n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[no(n),i]:n.push(typeof i=="string"?no(i):i)}for(const i of r){const[s,a]=i;if(o(`
|
|
6
|
+
Error:`,o)}}let zn=null;function jl(e){const t="error";Dt(t,e),Pt(t,Wl)}function Wl(){zn=ce.onerror,ce.onerror=function(e,t,r,n,o){return nt("error",{column:n,error:o,line:r,msg:e,url:t}),zn?zn.apply(this,arguments):!1},ce.onerror.__SENTRY_INSTRUMENTED__=!0}let Rn=null;function ql(e){const t="unhandledrejection";Dt(t,e),Pt(t,Gl)}function Gl(){Rn=ce.onunhandledrejection,ce.onunhandledrejection=function(e){return nt("unhandledrejection",e),Rn?Rn.apply(this,arguments):!0},ce.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Fr(){return jn(ce),ce}function jn(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||mt,t[mt]=t[mt]||{}}const ki=Object.prototype.toString;function Br(e){switch(ki.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return xt(e,Error)}}function Yt(e,t){return ki.call(e)===`[object ${t}]`}function Ni(e){return Yt(e,"ErrorEvent")}function Ii(e){return Yt(e,"DOMError")}function Vl(e){return Yt(e,"DOMException")}function lt(e){return Yt(e,"String")}function Wn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function qn(e){return e===null||Wn(e)||typeof e!="object"&&typeof e!="function"}function Kt(e){return Yt(e,"Object")}function Ur(e){return typeof Event<"u"&&xt(e,Event)}function Zl(e){return typeof Element<"u"&&xt(e,Element)}function Yl(e){return Yt(e,"RegExp")}function Hr(e){return!!(e&&e.then&&typeof e.then=="function")}function Kl(e){return Kt(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function xt(e,t){try{return e instanceof t}catch{return!1}}function Oi(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const Gn=ce,Jl=80;function Mi(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,o=[];let i=0,s=0;const a=" > ",c=a.length;let l;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||Jl;for(;r&&i++<n&&(l=Ql(r,d),!(l==="html"||i>1&&s+o.length*c+l.length>=f));)o.push(l),s+=l.length,r=r.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Ql(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(Gn.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const o=t&&t.length?t.filter(s=>r.getAttribute(s)).map(s=>[s,r.getAttribute(s)]):null;if(o&&o.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{r.id&&n.push(`#${r.id}`);const s=r.className;if(s&<(s)){const a=s.split(/\s+/);for(const c of a)n.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const s of i){const a=r.getAttribute(s);a&&n.push(`[${s}="${a}"]`)}return n.join("")}function Xl(){try{return Gn.document.location.href}catch{return""}}function eu(e){if(!Gn.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function Jt(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Di(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const o=e[n];try{Oi(o)?r.push("[VueViewModel]"):r.push(String(o))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function tu(e,t,r=!1){return lt(e)?Yl(t)?t.test(e):lt(t)?r?e===t:e.includes(t):!1:!1}function zr(e,t=[],r=!1){return t.some(n=>tu(e,n,r))}function qe(e,t,r){if(!(t in e))return;const n=e[t],o=r(n);typeof o=="function"&&Pi(o,n);try{e[t]=o}catch{It&&W.log(`Failed to replace method "${t}" in object`,e)}}function Lt(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{It&&W.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Pi(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,Lt(e,"__sentry_original__",t)}catch{}}function Vn(e){return e.__sentry_original__}function xi(e){if(Br(e))return{message:e.message,name:e.name,stack:e.stack,...$i(e)};if(Ur(e)){const t={type:e.type,target:Li(e.target),currentTarget:Li(e.currentTarget),...$i(e)};return typeof CustomEvent<"u"&&xt(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Li(e){try{return Zl(e)?Mi(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function $i(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function ru(e,t=40){const r=Object.keys(xi(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return Jt(n,t);for(let o=r.length;o>0;o--){const i=r.slice(0,o).join(", ");if(!(i.length>t))return o===r.length?i:Jt(i,t)}return""}function Je(e){return Zn(e,new Map)}function Zn(e,t){if(nu(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const o of Object.getOwnPropertyNames(e))typeof e[o]<"u"&&(n[o]=Zn(e[o],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(o=>{n.push(Zn(o,t))}),n}return e}function nu(e){if(!Kt(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Fi=1e3;function mr(){return Date.now()/Fi}function ou(){const{performance:e}=ce;if(!e||!e.now)return mr;const t=Date.now()-e.now(),r=e.timeOrigin==null?t:e.timeOrigin;return()=>(r+e.now())/Fi}const ut=ou();(()=>{const{performance:e}=ce;if(!e||!e.now)return;const t=3600*1e3,r=e.now(),n=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+r-n):t,l=c<t;return i||l?o<=c?e.timeOrigin:s:n})();function Qe(){const e=ce,t=e.crypto||e.msCrypto;let r=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(r()&15)>>n/4).toString(16))}function Bi(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ht(e){const{message:t,event_id:r}=e;if(t)return t;const n=Bi(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function Yn(e,t,r){const n=e.exception=e.exception||{},o=n.values=n.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Qt(e,t){const r=Bi(e);if(!r)return;const n={type:"generic",handled:!0},o=r.mechanism;if(r.mechanism={...n,...o,...t},t&&"data"in t){const i={...o&&o.data,...t.data};r.mechanism.data=i}}function Ui(e){if(iu(e))return!0;try{Lt(e,"__sentry_captured__",!0)}catch{}return!1}function iu(e){try{return e.__sentry_captured__}catch{}}var dt;(function(e){e[e.PENDING=0]="PENDING";const r=1;e[e.RESOLVED=r]="RESOLVED";const n=2;e[e.REJECTED=n]="REJECTED"})(dt||(dt={}));function $t(e){return new Xe(t=>{t(e)})}function Rr(e){return new Xe((t,r)=>{r(e)})}class Xe{constructor(t){Xe.prototype.__init.call(this),Xe.prototype.__init2.call(this),Xe.prototype.__init3.call(this),Xe.prototype.__init4.call(this),this._state=dt.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}then(t,r){return new Xe((n,o)=>{this._handlers.push([!1,i=>{if(!t)n(i);else try{n(t(i))}catch(s){o(s)}},i=>{if(!r)o(i);else try{n(r(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(r=>r,t)}finally(t){return new Xe((r,n)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){n(o);return}r(o)})})}__init(){this._resolve=t=>{this._setResult(dt.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(dt.REJECTED,t)}}__init3(){this._setResult=(t,r)=>{if(this._state===dt.PENDING){if(Hr(r)){r.then(this._resolve,this._reject);return}this._state=t,this._value=r,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===dt.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(r=>{r[0]||(this._state===dt.RESOLVED&&r[1](this._value),this._state===dt.REJECTED&&r[2](this._value),r[0]=!0)})}}}function su(e){const t=ut(),r={sid:Qe(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>cu(r)};return e&&Xt(r,e),r}function Xt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ut(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Qe()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const r=e.timestamp-e.started;e.duration=r>=0?r:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function au(e,t){let r={};e.status==="ok"&&(r={status:"exited"}),Xt(e,r)}function cu(e){return Je({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function Hi(){return Qe()}function Kn(){return Qe().substring(16)}function jr(e,t,r=2){if(!t||typeof t!="object"||r<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const n={...e};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=jr(n[o],t[o],r-1));return n}const Jn="_sentrySpan";function zi(e,t){t?Lt(e,Jn,t):delete e[Jn]}function Ri(e){return e[Jn]}const lu=100;class Qn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Hi(),spanId:Kn()}}clone(){const t=new Qn;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,zi(t,Ri(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Xt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,r){return this._tags={...this._tags,[t]:r},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,r){return this._extra={...this._extra,[t]:r},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,r){return r===null?delete this._contexts[t]:this._contexts[t]=r,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const r=typeof t=="function"?t(this):t,[n,o]=r instanceof gt?[r.getScopeData(),r.getRequestSession()]:Kt(r)?[t,t.requestSession]:[],{tags:i,extra:s,user:a,contexts:c,level:l,fingerprint:d=[],propagationContext:f}=n||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),l&&(this._level=l),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,zi(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Hi()}),this._notifyScopeListeners(),this}addBreadcrumb(t,r){const n=typeof r=="number"?r:lu;if(n<=0)return this;const o={timestamp:mr(),...t};return this._breadcrumbs.push(o),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Ri(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=jr(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Kn(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,r){const n=r&&r.event_id?r.event_id:Qe();if(!this._client)return W.warn("No client configured on scope - will not capture exception!"),n;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...r,event_id:n},this),n}captureMessage(t,r,n){const o=n&&n.event_id?n.event_id:Qe();if(!this._client)return W.warn("No client configured on scope - will not capture message!"),o;const i=new Error(t);return this._client.captureMessage(t,r,{originalException:t,syntheticException:i,...n,event_id:o},this),o}captureEvent(t,r){const n=r&&r.event_id?r.event_id:Qe();return this._client?(this._client.captureEvent(t,{...r,event_id:n},this),n):(W.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const gt=Qn;function uu(){return Pr("defaultCurrentScope",()=>new gt)}function du(){return Pr("defaultIsolationScope",()=>new gt)}class fu{constructor(t,r){let n;t?n=t:n=new gt;let o;r?o=r:o=new gt,this._stack=[{scope:n}],this._isolationScope=o}withScope(t){const r=this._pushScope();let n;try{n=t(r)}catch(o){throw this._popScope(),o}return Hr(n)?n.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function er(){const e=Fr(),t=jn(e);return t.stack=t.stack||new fu(uu(),du())}function pu(e){return er().withScope(e)}function mu(e,t){const r=er();return r.withScope(()=>(r.getStackTop().scope=e,t(e)))}function ji(e){return er().withScope(()=>e(er().getIsolationScope()))}function _u(){return{withIsolationScope:ji,withScope:pu,withSetScope:mu,withSetIsolationScope:(e,t)=>ji(t),getCurrentScope:()=>er().getScope(),getIsolationScope:()=>er().getIsolationScope()}}function Xn(e){const t=jn(e);return t.acs?t.acs:_u()}function st(){const e=Fr();return Xn(e).getCurrentScope()}function Ft(){const e=Fr();return Xn(e).getIsolationScope()}function hu(){return Pr("globalScope",()=>new gt)}function eo(...e){const t=Fr(),r=Xn(t);if(e.length===2){const[n,o]=e;return n?r.withSetScope(n,o):r.withScope(o)}return r.withScope(e[0])}function Ie(){return st().getClient()}function gu(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:o}=t;return Je({trace_id:r,span_id:n,parent_span_id:o})}const yu="_sentryMetrics";function bu(e){const t=e[yu];if(!t)return;const r={};for(const[,[n,o]]of t)(r[n]||(r[n]=[])).push(Je(o));return r}const vu="sentry.source",Su="sentry.sample_rate",Eu="sentry.op",wu="sentry.origin",Cu=0,Au=1,Tu="sentry-",ku=/^sentry-/;function Nu(e){const t=Iu(e);if(!t)return;const r=Object.entries(t).reduce((n,[o,i])=>{if(o.match(ku)){const s=o.slice(Tu.length);n[s]=i}return n},{});if(Object.keys(r).length>0)return r}function Iu(e){if(!(!e||!lt(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,r)=>{const n=Wi(r);return Object.entries(n).forEach(([o,i])=>{t[o]=i}),t},{}):Wi(e)}function Wi(e){return e.split(",").map(t=>t.split("=").map(r=>decodeURIComponent(r.trim()))).reduce((t,[r,n])=>(r&&n&&(t[r]=n),t),{})}const Ou=1;let qi=!1;function Mu(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext(),o=n?t:to(e).parent_span_id,i=n?Kn():t;return Je({parent_span_id:o,span_id:i,trace_id:r})}function Gi(e){return typeof e=="number"?Vi(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Vi(e.getTime()):ut()}function Vi(e){return e>9999999999?e/1e3:e}function to(e){if(Pu(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(Du(e)){const{attributes:n,startTime:o,name:i,endTime:s,parentSpanId:a,status:c}=e;return Je({span_id:t,trace_id:r,data:n,description:i,parent_span_id:a,start_timestamp:Gi(o),timestamp:Gi(s)||void 0,status:Lu(c),op:n[Eu],origin:n[wu],_metrics_summary:bu(e)})}return{span_id:t,trace_id:r}}catch{return{}}}function Du(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Pu(e){return typeof e.getSpanJSON=="function"}function xu(e){const{traceFlags:t}=e.spanContext();return t===Ou}function Lu(e){if(!(!e||e.code===Cu))return e.code===Au?"ok":e.message||"unknown_error"}const $u="_sentryRootSpan";function Zi(e){return e[$u]||e}function Fu(){qi||(Ot(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),qi=!0)}function Bu(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ie(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const ro="production",Uu="_frozenDsc";function Yi(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},o=Je({environment:r.environment||ro,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",o),o}function Hu(e,t){const r=t.getPropagationContext();return r.dsc||Yi(r.traceId,e)}function zu(e){const t=Ie();if(!t)return{};const r=Zi(e),n=r[Uu];if(n)return n;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),s=i&&Nu(i);if(s)return s;const a=Yi(e.spanContext().traceId,t),c=to(r),l=c.data||{},d=l[Su];d!=null&&(a.sample_rate=`${d}`);const f=l[vu],g=c.description;return f!=="url"&&g&&(a.transaction=g),Bu()&&(a.sampled=String(xu(r))),t.emit("createDsc",a,r),a}function Ru(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){fe&&W.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}const ju=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Wu(e){return e==="http"||e==="https"}function _r(e,t=!1){const{host:r,path:n,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${r}${i?`:${i}`:""}/${n&&`${n}/`}${s}`}function qu(e){const t=ju.exec(e);if(!t){Ot(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,o="",i="",s="",a=""]=t.slice(1);let c="",l=a;const d=l.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),l=d.pop()),l){const f=l.match(/^\d+/);f&&(l=f[0])}return Ki({host:i,pass:o,path:c,projectId:l,port:s,protocol:r,publicKey:n})}function Ki(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Gu(e){if(!It)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(W.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?Wu(n)?t&&isNaN(parseInt(t,10))?(W.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(W.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(W.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Ji(e){const t=typeof e=="string"?qu(e):Ki(e);if(!(!t||!Gu(t)))return t}function Vu(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function r(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function n(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[r,n]}function ft(e,t=100,r=1/0){try{return no("",e,t,r)}catch(n){return{ERROR:`**non-serializable** (${n})`}}}function Qi(e,t=3,r=100*1024){const n=ft(e,t);return Ju(n)>r?Qi(e,t-1,r):n}function no(e,t,r=1/0,n=1/0,o=Vu()){const[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=Zu(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:r;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const l=t;if(l&&typeof l.toJSON=="function")try{const h=l.toJSON();return no("",h,c-1,n,o)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const g=xi(t);for(const h in g){if(!Object.prototype.hasOwnProperty.call(g,h))continue;if(f>=n){d[h]="[MaxProperties ~]";break}const b=g[h];d[h]=no(h,b,c-1,n,o),f++}return s(t),d}function Zu(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Oi(t))return"[VueViewModel]";if(Kl(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${_t(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const r=Yu(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}}function Yu(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Ku(e){return~-encodeURI(e).split(/%..|./).length}function Ju(e){return Ku(JSON.stringify(e))}function hr(e,t=[]){return[e,t]}function Qu(e,t){const[r,n]=e;return[r,[...n,t]]}function Xi(e,t){const r=e[1];for(const n of r){const o=n[0].type;if(t(n,o))return!0}return!1}function oo(e){return ce.__SENTRY__&&ce.__SENTRY__.encodePolyfill?ce.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Xu(e){const[t,r]=e;let n=JSON.stringify(t);function o(i){typeof n=="string"?n=typeof i=="string"?n+i:[oo(n),i]:n.push(typeof i=="string"?oo(i):i)}for(const i of r){const[s,a]=i;if(o(`
|
|
7
7
|
${JSON.stringify(s)}
|
|
8
|
-
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ft(a))}o(c)}}return typeof n=="string"?n:Gu(n)}function Gu(e){const t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function Zu(e){const t=typeof e.data=="string"?no(e.data):e.data;return[Je({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const Vu={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function Ji(e){return Vu[e]}function Qi(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function Yu(e,t,r,n){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:mr(n)},...o&&{trace:Je({...o})}}}function Ku(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Ju(e,t,r,n){const o=Qi(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:mr(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return _r(i,[s])}function Qu(e,t,r,n){const o=Qi(r),i=e.type&&e.type!=="replay_event"?e.type:"event";Ku(e,r&&r.sdk);const s=Yu(e,o,n,t);return delete e.sdkProcessingMetadata,_r(s,[[{type:i},e]])}function oo(e,t,r,n=0){return new Xe((o,i)=>{const s=e[n];if(t===null||typeof s!="function")o(t);else{const a=s({...t},r);pe&&s.id&&a===null&&q.log(`Event processor "${s.id}" dropped event`),Ur(a)?a.then(c=>oo(e,c,r,n+1).then(o)).then(null,i):oo(e,a,r,n+1).then(o).then(null,i)}})}let jr,Xi,Wr;function Xu(e){const t=ae._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return Wr&&r.length===Xi||(Xi=r.length,Wr=r.reduce((n,o)=>{jr||(jr={});const i=jr[o];if(i)n[i[0]]=i[1];else{const s=e(o);for(let a=s.length-1;a>=0;a--){const c=s[a],l=c&&c.filename,d=t[o];if(l&&d){n[l]=d,jr[o]=[l,d];break}}}return n},{})),Wr}function ed(e,t){const{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;td(e,t),n&&od(e,n),id(e,r),rd(e,o),nd(e,i)}function es(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:h,transactionName:m,span:g}=t;qr(e,"extra",r),qr(e,"tags",n),qr(e,"user",o),qr(e,"contexts",i),e.sdkProcessingMetadata=zr(e.sdkProcessingMetadata,a,2),s&&(e.level=s),m&&(e.transactionName=m),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}}function qr(e,t,r){e[t]=zr(e[t],r,1)}function td(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t,c=Je(r);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Je(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=Je(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=Je(i);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function rd(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function nd(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function od(e,t){e.contexts={trace:wu(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Pu(t),...e.sdkProcessingMetadata};const r=qi(t),n=eo(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function id(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function sd(e,t,r,n,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||r.event_id||Qe(),timestamp:t.timestamp||pr()},l=r.integrations||e.integrations.map(H=>H.name);ad(c,e),ud(c,l),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&cd(c,e.stackParser);const d=fd(n,r.captureContext);r.mechanism&&Jt(c,r.mechanism);const f=o?o.getEventProcessors():[],h=cu().getScopeData();if(i){const H=i.getScopeData();es(h,H)}if(d){const H=d.getScopeData();es(h,H)}const m=[...r.attachments||[],...h.attachments];m.length&&(r.attachments=m),ed(c,h);const g=[...f,...h.eventProcessors];return oo(g,c,r).then(H=>(H&&ld(H),typeof s=="number"&&s>0?dd(H,s,a):H))}function ad(e,t){const{environment:r,release:n,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||r||to,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o),e.message&&(e.message=Kt(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Kt(s.value,i));const a=e.request;a&&a.url&&(a.url=Kt(a.url,i))}function cd(e,t){const r=Xu(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{r&&o.filename&&(o.debug_id=r[o.filename])})})}catch{}}function ld(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function ud(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function dd(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ft(o.data,t,r)}}))},...e.user&&{user:ft(e.user,t,r)},...e.contexts&&{contexts:ft(e.contexts,t,r)},...e.extra&&{extra:ft(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=ft(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ft(o.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=ft(e.contexts.flags,3,r)),n}function fd(e,t){if(!t)return e;const r=e?e.clone():new gt;return r.update(t),r}function pd(e){if(e)return md(e)?{captureContext:e}:hd(e)?{captureContext:e}:e}function md(e){return e instanceof gt||typeof e=="function"}const _d=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function hd(e){return Object.keys(e).some(t=>_d.includes(t))}function Gr(e,t){return st().captureException(e,pd(t))}function ts(e,t){return st().captureEvent(e,t)}function gd(e,t){Ft().setContext(e,t)}function yd(){return Ft().lastEventId()}function rs(e){const t=Ie(),r=Ft(),n=st(),{release:o,environment:i=to}=t&&t.getOptions()||{},{userAgent:s}=ae.navigator||{},a=Ql({release:o,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&c.status==="ok"&&Qt(c,{status:"exited"}),ns(),r.setSession(a),n.setSession(a),a}function ns(){const e=Ft(),t=st(),r=t.getSession()||e.getSession();r&&Xl(r),os(),e.setSession(),t.setSession()}function os(){const e=Ft(),t=st(),r=Ie(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function is(e=!1){if(e){ns();return}os()}const bd="7";function ss(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function vd(e){return`${ss(e)}${e.projectId}/envelope/`}function Sd(e,t){const r={sentry_version:bd};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function Ed(e,t,r){return t||`${vd(e)}?${Sd(e,r)}`}function wd(e,t){const r=Vi(e);if(!r)return"";const n=`${ss(r)}embed/error-page/`;let o=`dsn=${mr(r)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}const as=[];function Cd(e){const t={};return e.forEach(r=>{const{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function Ad(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){const s=r(t);n=Array.isArray(s)?s:[s]}else n=t;const o=Cd(n),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function Td(e,t){const r={};return t.forEach(n=>{n&&ls(e,n,r)}),r}function cs(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function ls(e,t,r){if(r[t.name]){pe&&q.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,as.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),as.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){const n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}pe&&q.log(`Integration installed: ${t.name}`)}function kd(e){const t=Ie();if(!t){pe&&q.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function eE(e){return e}function Id(e,t,r){const n=[{type:"client_report"},{timestamp:pr(),discarded_events:e}];return _r(t?{dsn:t}:{},[n])}class ot extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const us="Not capturing exception because it's already been captured.";class Nd{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Vi(t.dsn):pe&&q.warn("No DSN provided, client will not send events."),this._dsn){const o=Ed(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find(o=>o in t&&t[o]==null);n&&Ot(()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,r,n){const o=Qe();if($i(t))return pe&&q.log(us),o;const i={event_id:o,...r};return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n))),i.event_id}captureMessage(t,r,n,o){const i={event_id:Qe(),...n},s=jn(t)?t:String(t),a=Wn(t)?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,r,n){const o=Qe();if(r&&r.originalException&&$i(r.originalException))return pe&&q.log(us),o;const i={event_id:o,...r},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||n)),i.event_id}captureSession(t){typeof t.release!="string"?pe&&q.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Qt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(o=>n&&o))):$t(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];ls(this,t,this._integrations),r||cs(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=Qu(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of r.attachments||[])n=Wu(n,Zu(i));const o=this.sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const r=Ju(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const o=typeof n=="number"?n:1,i=`${t}:${r}`;pe&&q.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(t,r){const n=this._hooks[t]=this._hooks[t]||[];return n.push(r),()=>{const o=n.indexOf(r);o>-1&&n.splice(o,1)}}emit(t,...r){const n=this._hooks[t];n&&n.forEach(o=>o(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(pe&&q.error("Error while sending envelope:",r),r)):(pe&&q.error("Transport disabled"),$t({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Td(this,t),cs(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1;const i=r.exception&&r.exception.values;if(i){o=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Qt(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Xe(r=>{let n=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=o,t&&n>=t&&(clearInterval(i),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n=st(),o=Ft()){const i=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),sd(i,t,r,n,this,o).then(a=>{if(a===null)return a;a.contexts={trace:lu(n),...a.contexts};const c=Du(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(o=>o.event_id,o=>{pe&&(o instanceof ot&&o.logLevel==="log"?q.log(o.message):q.warn(o))})}_processEvent(t,r,n){const o=this.getOptions(),{sampleRate:i}=o,s=fs(t),a=ds(t),c=t.type||"error",l=`before send for type \`${c}\``,d=typeof i>"u"?void 0:Lu(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Rr(new ot(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=c==="replay_event"?"replay":c,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,m).then(g=>{if(g===null)throw this.recordDroppedEvent("event_processor",f,t),new ot("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return g;const H=Md(this,o,g,r);return Od(H,l)}).then(g=>{if(g===null){if(this.recordDroppedEvent("before_send",f,t),s){const E=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",E)}throw new ot(`${l} returned \`null\`, will not send event.`,"log")}const I=n&&n.getSession();if(!s&&I&&this._updateSessionFromEvent(I,g),s){const M=g.sdkProcessingMetadata&&g.sdkProcessingMetadata.spanCountBeforeProcessing||0,E=g.spans?g.spans.length:0,D=M-E;D>0&&this.recordDroppedEvent("before_send","span",D)}const H=g.transaction_info;if(s&&H&&g.transaction!==t.transaction){const M="custom";g.transaction_info={...H,source:M}}return this.sendEvent(g,r),g}).then(null,g=>{throw g instanceof ot?g:(this.captureException(g,{data:{__sentry__:!0},originalException:g}),new ot(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
9
|
-
Reason: ${
|
|
10
|
-
Event: ${ht(e)}`),!0):
|
|
11
|
-
Event: ${ht(e)}`),!0):
|
|
12
|
-
Event: ${ht(e)}`),!0):
|
|
13
|
-
Event: ${ht(e)}`),!0):
|
|
8
|
+
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ft(a))}o(c)}}return typeof n=="string"?n:ed(n)}function ed(e){const t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t);let n=0;for(const o of e)r.set(o,n),n+=o.length;return r}function td(e){const t=typeof e.data=="string"?oo(e.data):e.data;return[Je({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const rd={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function es(e){return rd[e]}function ts(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function nd(e,t,r,n){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:_r(n)},...o&&{trace:Je({...o})}}}function od(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function id(e,t,r,n){const o=ts(r),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&t&&{dsn:_r(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return hr(i,[s])}function sd(e,t,r,n){const o=ts(r),i=e.type&&e.type!=="replay_event"?e.type:"event";od(e,r&&r.sdk);const s=nd(e,o,n,t);return delete e.sdkProcessingMetadata,hr(s,[[{type:i},e]])}function io(e,t,r,n=0){return new Xe((o,i)=>{const s=e[n];if(t===null||typeof s!="function")o(t);else{const a=s({...t},r);fe&&s.id&&a===null&&W.log(`Event processor "${s.id}" dropped event`),Hr(a)?a.then(c=>io(e,c,r,n+1).then(o)).then(null,i):io(e,a,r,n+1).then(o).then(null,i)}})}let Wr,rs,qr;function ad(e){const t=ce._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return qr&&r.length===rs||(rs=r.length,qr=r.reduce((n,o)=>{Wr||(Wr={});const i=Wr[o];if(i)n[i[0]]=i[1];else{const s=e(o);for(let a=s.length-1;a>=0;a--){const c=s[a],l=c&&c.filename,d=t[o];if(l&&d){n[l]=d,Wr[o]=[l,d];break}}}return n},{})),qr}function cd(e,t){const{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:i}=t;ld(e,t),n&&fd(e,n),pd(e,r),ud(e,o),dd(e,i)}function ns(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:l,eventProcessors:d,attachments:f,propagationContext:g,transactionName:h,span:b}=t;Gr(e,"extra",r),Gr(e,"tags",n),Gr(e,"user",o),Gr(e,"contexts",i),e.sdkProcessingMetadata=jr(e.sdkProcessingMetadata,a,2),s&&(e.level=s),h&&(e.transactionName=h),b&&(e.span=b),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...g}}function Gr(e,t,r){e[t]=jr(e[t],r,1)}function ld(e,t){const{extra:r,tags:n,user:o,contexts:i,level:s,transactionName:a}=t,c=Je(r);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Je(n);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const d=Je(o);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=Je(i);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function ud(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function dd(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fd(e,t){e.contexts={trace:Mu(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:zu(t),...e.sdkProcessingMetadata};const r=Zi(t),n=to(r).description;n&&!e.transaction&&e.type==="transaction"&&(e.transaction=n)}function pd(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function md(e,t,r,n,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||r.event_id||Qe(),timestamp:t.timestamp||mr()},l=r.integrations||e.integrations.map($=>$.name);_d(c,e),yd(c,l),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&hd(c,e.stackParser);const d=vd(n,r.captureContext);r.mechanism&&Qt(c,r.mechanism);const f=o?o.getEventProcessors():[],g=hu().getScopeData();if(i){const $=i.getScopeData();ns(g,$)}if(d){const $=d.getScopeData();ns(g,$)}const h=[...r.attachments||[],...g.attachments];h.length&&(r.attachments=h),cd(c,g);const b=[...f,...g.eventProcessors];return io(b,c,r).then($=>($&&gd($),typeof s=="number"&&s>0?bd($,s,a):$))}function _d(e,t){const{environment:r,release:n,dist:o,maxValueLength:i=250}=t;e.environment=e.environment||r||ro,!e.release&&n&&(e.release=n),!e.dist&&o&&(e.dist=o),e.message&&(e.message=Jt(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Jt(s.value,i));const a=e.request;a&&a.url&&(a.url=Jt(a.url,i))}function hd(e,t){const r=ad(t);try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{r&&o.filename&&(o.debug_id=r[o.filename])})})}catch{}}function gd(e){const t={};try{e.exception.values.forEach(n=>{n.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function yd(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function bd(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:ft(o.data,t,r)}}))},...e.user&&{user:ft(e.user,t,r)},...e.contexts&&{contexts:ft(e.contexts,t,r)},...e.extra&&{extra:ft(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=ft(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map(o=>({...o,...o.data&&{data:ft(o.data,t,r)}}))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=ft(e.contexts.flags,3,r)),n}function vd(e,t){if(!t)return e;const r=e?e.clone():new gt;return r.update(t),r}function Sd(e){if(e)return Ed(e)?{captureContext:e}:Cd(e)?{captureContext:e}:e}function Ed(e){return e instanceof gt||typeof e=="function"}const wd=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Cd(e){return Object.keys(e).some(t=>wd.includes(t))}function Vr(e,t){return st().captureException(e,Sd(t))}function os(e,t){return st().captureEvent(e,t)}function Ad(e,t){Ft().setContext(e,t)}function Td(){return Ft().lastEventId()}function is(e){const t=Ie(),r=Ft(),n=st(),{release:o,environment:i=ro}=t&&t.getOptions()||{},{userAgent:s}=ce.navigator||{},a=su({release:o,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),c=r.getSession();return c&&c.status==="ok"&&Xt(c,{status:"exited"}),ss(),r.setSession(a),n.setSession(a),a}function ss(){const e=Ft(),t=st(),r=t.getSession()||e.getSession();r&&au(r),as(),e.setSession(),t.setSession()}function as(){const e=Ft(),t=st(),r=Ie(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function cs(e=!1){if(e){ss();return}as()}const kd="7";function ls(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function Nd(e){return`${ls(e)}${e.projectId}/envelope/`}function Id(e,t){const r={sentry_version:kd};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function Od(e,t,r){return t||`${Nd(e)}?${Id(e,r)}`}function Md(e,t){const r=Ji(e);if(!r)return"";const n=`${ls(r)}embed/error-page/`;let o=`dsn=${_r(r)}`;for(const i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){const s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${n}?${o}`}const us=[];function Dd(e){const t={};return e.forEach(r=>{const{name:n}=r,o=t[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(t[n]=r)}),Object.values(t)}function Pd(e){const t=e.defaultIntegrations||[],r=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...t,...r];else if(typeof r=="function"){const s=r(t);n=Array.isArray(s)?s:[s]}else n=t;const o=Dd(n),i=o.findIndex(s=>s.name==="Debug");if(i>-1){const[s]=o.splice(i,1);o.push(s)}return o}function xd(e,t){const r={};return t.forEach(n=>{n&&fs(e,n,r)}),r}function ds(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function fs(e,t,r){if(r[t.name]){fe&&W.log(`Integration skipped because it was already installed: ${t.name}`);return}if(r[t.name]=t,us.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),us.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>n(o,i,e))}if(typeof t.processEvent=="function"){const n=t.processEvent.bind(t),o=Object.assign((i,s)=>n(i,s,e),{id:t.name});e.addEventProcessor(o)}fe&&W.log(`Integration installed: ${t.name}`)}function Ld(e){const t=Ie();if(!t){fe&&W.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function AE(e){return e}function $d(e,t,r){const n=[{type:"client_report"},{timestamp:mr(),discarded_events:e}];return hr(t?{dsn:t}:{},[n])}class ot extends Error{constructor(t,r="warn"){super(t),this.message=t,this.logLevel=r}}const ps="Not capturing exception because it's already been captured.";class Fd{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ji(t.dsn):fe&&W.warn("No DSN provided, client will not send events."),this._dsn){const o=Od(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:o})}const n=["enableTracing","tracesSampleRate","tracesSampler"].find(o=>o in t&&t[o]==null);n&&Ot(()=>{console.warn(`[Sentry] Deprecation warning: \`${n}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,r,n){const o=Qe();if(Ui(t))return fe&&W.log(ps),o;const i={event_id:o,...r};return this._process(this.eventFromException(t,i).then(s=>this._captureEvent(s,i,n))),i.event_id}captureMessage(t,r,n,o){const i={event_id:Qe(),...n},s=Wn(t)?t:String(t),a=qn(t)?this.eventFromMessage(s,r,i):this.eventFromException(t,i);return this._process(a.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(t,r,n){const o=Qe();if(r&&r.originalException&&Ui(r.originalException))return fe&&W.log(ps),o;const i={event_id:o,...r},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,a||n)),i.event_id}captureSession(t){typeof t.release!="string"?fe&&W.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Xt(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>r.flush(t).then(o=>n&&o))):$t(!0)}close(t){return this.flush(t).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const r=this._integrations[t.name];fs(this,t,this._integrations),r||ds(this,[t])}sendEvent(t,r={}){this.emit("beforeSendEvent",t,r);let n=sd(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of r.attachments||[])n=Qu(n,td(i));const o=this.sendEnvelope(n);o&&o.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const r=id(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,r,n){if(this._options.sendClientReports){const o=typeof n=="number"?n:1,i=`${t}:${r}`;fe&&W.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(t,r){const n=this._hooks[t]=this._hooks[t]||[];return n.push(r),()=>{const o=n.indexOf(r);o>-1&&n.splice(o,1)}}emit(t,...r){const n=this._hooks[t];n&&n.forEach(o=>o(...r))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,r=>(fe&&W.error("Error while sending envelope:",r),r)):(fe&&W.error("Transport disabled"),$t({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=xd(this,t),ds(this,t)}_updateSessionFromEvent(t,r){let n=r.level==="fatal",o=!1;const i=r.exception&&r.exception.values;if(i){o=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){n=!0;break}}}const s=t.status==="ok";(s&&t.errors===0||s&&n)&&(Xt(t,{...n&&{status:"crashed"},errors:t.errors||Number(o||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Xe(r=>{let n=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),r(!0)):(n+=o,t&&n>=t&&(clearInterval(i),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,r,n=st(),o=Ft()){const i=this.getOptions(),s=Object.keys(this._integrations);return!r.integrations&&s.length>0&&(r.integrations=s),this.emit("preprocessEvent",t,r),t.type||o.setLastEventId(t.event_id||r.event_id),md(i,t,r,n,this,o).then(a=>{if(a===null)return a;a.contexts={trace:gu(n),...a.contexts};const c=Hu(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,r={},n){return this._processEvent(t,r,n).then(o=>o.event_id,o=>{fe&&(o instanceof ot&&o.logLevel==="log"?W.log(o.message):W.warn(o))})}_processEvent(t,r,n){const o=this.getOptions(),{sampleRate:i}=o,s=_s(t),a=ms(t),c=t.type||"error",l=`before send for type \`${c}\``,d=typeof i>"u"?void 0:Ru(i);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Rr(new ot(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=c==="replay_event"?"replay":c,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,r,n,h).then(b=>{if(b===null)throw this.recordDroppedEvent("event_processor",f,t),new ot("An event processor returned `null`, will not send event.","log");if(r.data&&r.data.__sentry__===!0)return b;const $=Ud(this,o,b,r);return Bd($,l)}).then(b=>{if(b===null){if(this.recordDroppedEvent("before_send",f,t),s){const C=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",C)}throw new ot(`${l} returned \`null\`, will not send event.`,"log")}const T=n&&n.getSession();if(!s&&T&&this._updateSessionFromEvent(T,b),s){const O=b.sdkProcessingMetadata&&b.sdkProcessingMetadata.spanCountBeforeProcessing||0,C=b.spans?b.spans.length:0,D=O-C;D>0&&this.recordDroppedEvent("before_send","span",D)}const $=b.transaction_info;if(s&&$&&b.transaction!==t.transaction){const O="custom";b.transaction_info={...$,source:O}}return this.sendEvent(b,r),b}).then(null,b=>{throw b instanceof ot?b:(this.captureException(b,{data:{__sentry__:!0},originalException:b}),new ot(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
9
|
+
Reason: ${b}`))})}_process(t){this._numProcessing++,t.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([r,n])=>{const[o,i]=r.split(":");return{reason:o,category:i,quantity:n}})}_flushOutcomes(){fe&&W.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){fe&&W.log("No outcomes to send");return}if(!this._dsn){fe&&W.log("No dsn provided, will not send outcomes");return}fe&&W.log("Sending outcomes:",t);const r=$d(t,this._options.tunnel&&_r(this._dsn));this.sendEnvelope(r)}}function Bd(e,t){const r=`${t} must return \`null\` or a valid event.`;if(Hr(e))return e.then(n=>{if(!Kt(n)&&n!==null)throw new ot(r);return n},n=>{throw new ot(`${t} rejected with ${n}`)});if(!Kt(e)&&e!==null)throw new ot(r);return e}function Ud(e,t,r,n){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=t;if(ms(r)&&o)return o(r,n);if(_s(r)){if(r.spans&&s){const a=[];for(const c of r.spans){const l=s(c);l?a.push(l):(Fu(),e.recordDroppedEvent("before_send","span"))}r.spans=a}if(i){if(r.spans){const a=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return i(r,n)}}return r}function ms(e){return e.type===void 0}function _s(e){return e.type==="transaction"}function Hd(e,t){t.debug===!0&&(fe?W.enable():Ot(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),st().update(t.initialScope);const n=new e(t);return zd(n),n.init(),n}function zd(e){st().setClient(e)}function Rd(e){const t=[];function r(){return e===void 0||t.length<e}function n(s){return t.splice(t.indexOf(s),1)[0]||Promise.resolve(void 0)}function o(s){if(!r())return Rr(new ot("Not adding Promise because buffer limit was reached."));const a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a}function i(s){return new Xe((a,c)=>{let l=t.length;if(!l)return a(!0);const d=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(f=>{$t(f).then(()=>{--l||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:o,drain:i}}const jd=60*1e3;function Wd(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return r*1e3;const n=Date.parse(`${e}`);return isNaN(n)?jd:n-t}function qd(e,t){return e[t]||e.all||0}function Gd(e,t,r=Date.now()){return qd(e,t)>r}function Vd(e,{statusCode:t,headers:r},n=Date.now()){const o={...e},i=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,l,,,d]=a.split(":",5),f=parseInt(c,10),g=(isNaN(f)?60:f)*1e3;if(!l)o.all=n+g;else for(const h of l.split(";"))h==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[h]=n+g):o[h]=n+g}else s?o.all=n+Wd(s,n):t===429&&(o.all=n+60*1e3);return o}const Zd=64;function Yd(e,t,r=Rd(e.bufferSize||Zd)){let n={};const o=s=>r.drain(s);function i(s){const a=[];if(Xi(s,(f,g)=>{const h=es(g);if(Gd(n,h)){const b=hs(f,g);e.recordDroppedEvent("ratelimit_backoff",h,b)}else a.push(f)}),a.length===0)return $t({});const c=hr(s[0],a),l=f=>{Xi(c,(g,h)=>{const b=hs(g,h);e.recordDroppedEvent(f,es(h),b)})},d=()=>t({body:Xu(c)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&fe&&W.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),n=Vd(n,f),f),f=>{throw l("network_error"),f});return r.add(d).then(f=>f,f=>{if(f instanceof ot)return fe&&W.error("Skipped sending event because buffer is full."),l("queue_overflow"),$t({});throw f})}return{send:i,flush:o}}function hs(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function gs(e,t,r=[t],n="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:r.map(i=>({name:`${n}:@sentry/${i}`,version:mt})),version:mt}),e._metadata=o}const Kd=100;function Bt(e,t){const r=Ie(),n=Ft();if(!r)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Kd}=r.getOptions();if(i<=0)return;const a={timestamp:mr(),...e},c=o?Ot(()=>o(a,t)):a;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,t),n.addBreadcrumb(c,i))}let ys;const Jd="FunctionToString",bs=new WeakMap,Qd=(()=>({name:Jd,setupOnce(){ys=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Vn(this),r=bs.has(Ie())&&t!==void 0?t:this;return ys.apply(r,e)}}catch{}},setup(e){bs.set(e,!0)}})),Xd=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],ef="InboundFilters",tf=((e={})=>({name:ef,processEvent(t,r,n){const o=n.getOptions(),i=rf(e,o);return nf(t,i)?null:t}}));function rf(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Xd],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function nf(e,t){return t.ignoreInternal&&uf(e)?(fe&&W.warn(`Event dropped due to being internal Sentry Error.
|
|
10
|
+
Event: ${ht(e)}`),!0):of(e,t.ignoreErrors)?(fe&&W.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
11
|
+
Event: ${ht(e)}`),!0):ff(e)?(fe&&W.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
12
|
+
Event: ${ht(e)}`),!0):sf(e,t.ignoreTransactions)?(fe&&W.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
13
|
+
Event: ${ht(e)}`),!0):af(e,t.denyUrls)?(fe&&W.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
14
14
|
Event: ${ht(e)}.
|
|
15
|
-
Url: ${Zr(e)}`),!0):
|
|
15
|
+
Url: ${Zr(e)}`),!0):cf(e,t.allowUrls)?!1:(fe&&W.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
16
16
|
Event: ${ht(e)}.
|
|
17
|
-
Url: ${Zr(e)}`),!0)}function Kd(e,t){return e.type||!t||!t.length?!1:ef(e).some(r=>Hr(r,t))}function Jd(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?Hr(r,t):!1}function Qd(e,t){if(!t||!t.length)return!1;const r=Zr(e);return r?Hr(r,t):!1}function Xd(e,t){if(!t||!t.length)return!0;const r=Zr(e);return r?Hr(r,t):!0}function ef(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function tf(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function rf(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Zr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?rf(t):null}catch{return pe&&q.error(`Cannot extract url for event ${ht(e)}`),null}}function nf(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function of(e,t,r=250,n,o,i,s){if(!i.exception||!i.exception.values||!s||!Lt(s.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=sf(io(e,t,o,s.originalException,n,i.exception.values,a,0),r))}function io(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let c=[...i];if(Lt(n[o],Error)){gs(s,a);const l=e(t,n[o]),d=c.length;ys(l,o,d,a),c=io(e,t,r,n[o],o,[l,...c],l,d)}return Array.isArray(n.errors)&&n.errors.forEach((l,d)=>{if(Lt(l,Error)){gs(s,a);const f=e(t,l),h=c.length;ys(f,`errors[${d}]`,h,a),c=io(e,t,r,l,o,[f,...c],f,h)}}),c}function gs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function ys(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function sf(e,t){return e.map(r=>(r.value&&(r.value=Kt(r.value,t)),r))}function so(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function af(e){const t="console";Dt(t,e),Pt(t,cf)}function cf(){"console"in ae&&Bn.forEach(function(e){e in ae.console&&We(ae.console,e,function(t){return Pr[e]=t,function(...r){nt("console",{args:r,level:e});const o=Pr[e];o&&o.apply(ae.console,r)}})})}function lf(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const uf="Dedupe",df=(()=>{let e;return{name:uf,processEvent(t){if(t.type)return t;try{if(ff(t,e))return pe&&q.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function ff(e,t){return t?!!(pf(e,t)||mf(e,t)):!1}function pf(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!vs(e,t)||!bs(e,t))}function mf(e,t){const r=Ss(t),n=Ss(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!vs(e,t)||!bs(e,t))}function bs(e,t){let r=Ei(e),n=Ei(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){const i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function vs(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Ss(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Es(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const ao=ae;function ws(){if(!("fetch"in ao))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function co(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function _f(){if(typeof EdgeRuntime=="string")return!0;if(!ws())return!1;if(co(ao.fetch))return!0;let e=!1;const t=ao.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=co(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){Nt&&q.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function hf(e,t){const r="fetch";Dt(r,e),Pt(r,()=>gf(void 0,t))}function gf(e,t=!1){t&&!_f()||We(ae,"fetch",function(r){return function(...n){const o=new Error,{method:i,url:s}=yf(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ut()*1e3,virtualError:o};return nt("fetch",{...a}),r.apply(ae,n).then(async c=>(nt("fetch",{...a,endTimestamp:ut()*1e3,response:c}),c),c=>{throw nt("fetch",{...a,endTimestamp:ut()*1e3,error:c}),Fr(c)&&c.stack===void 0&&(c.stack=o.stack,xt(c,"framesToPop",1)),c})}})}function lo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Cs(e){return typeof e=="string"?e:e?lo(e,"url")?e.url:e.toString?e.toString():"":""}function yf(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:Cs(r),method:lo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Cs(t),method:lo(t,"method")?String(t.method).toUpperCase():"GET"}}function bf(){return"npm"}const Vr=ae;function vf(){const e=Vr.chrome,t=e&&e.app&&e.app.runtime,r="history"in Vr&&!!Vr.history.pushState&&!!Vr.history.replaceState;return!t&&r}const te=ae;let uo=0;function As(){return uo>0}function Sf(){uo++,setTimeout(()=>{uo--})}function er(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Gn(e))return e}catch{return e}const n=function(...o){try{const i=o.map(s=>er(s,t));return e.apply(this,i)}catch(i){throw Sf(),Xn(s=>{s.addEventProcessor(a=>(t.mechanism&&(Vn(a,void 0),Jt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Gr(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}Oi(n,e),xt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const yt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function fo(e,t){const r=mo(e,t),n={type:Tf(t),value:kf(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Ef(e,t,r,n){const o=Ie(),i=o&&o.getOptions().normalizeDepth,s=Df(t),a={__serialized__:Yi(t,i)};if(s)return{exception:{values:[fo(e,s)]},extra:a};const c={exception:{values:[{type:Br(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Of(t,{isUnhandledRejection:n})}]},extra:a};if(r){const l=mo(e,r);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function po(e,t){return{exception:{values:[fo(e,t)]}}}function mo(e,t){const r=t.stacktrace||t.stack||"",n=Cf(t),o=Af(t);try{return e(r,n,o)}catch{}return[]}const wf=/Minified React error #\d+;/i;function Cf(e){return e&&wf.test(e.message)?1:0}function Af(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ts(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Tf(e){const t=e&&e.name;return!t&&Ts(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function kf(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Ts(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function If(e,t,r,n){const o=r&&r.syntheticException||void 0,i=_o(e,t,o,n);return Jt(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),$t(i)}function Nf(e,t,r="info",n,o){const i=n&&n.syntheticException||void 0,s=ho(e,t,i,o);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),$t(s)}function _o(e,t,r,n,o){let i;if(Ai(t)&&t.error)return po(e,t.error);if(Ti(t)||Ul(t)){const s=t;if("stack"in t)i=po(e,t);else{const a=s.name||(Ti(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=ho(e,c,r,n),Vn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Fr(t)?po(e,t):Yt(t)||Br(t)?(i=Ef(e,t,r,o),Jt(i,{synthetic:!0}),i):(i=ho(e,t,r,n),Vn(i,`${t}`),Jt(i,{synthetic:!0}),i)}function ho(e,t,r,n){const o={};if(n&&r){const i=mo(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Jt(o,{synthetic:!0})}if(jn(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Of(e,{isUnhandledRejection:t}){const r=Vl(e),n=t?"promise rejection":"exception";return Ai(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Br(e)?`Event \`${Mf(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Mf(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Df(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function Pf(e,{metadata:t,tunnel:r,dsn:n}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:mr(n)}},i=Lf(e);return _r(o,[i])}function Lf(e){return[{type:"user_report"},e]}class xf extends Nd{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=te.SENTRY_SDK_SOURCE||bf();ms(r,"browser",["browser"],n),super(r),r.sendClientReports&&te.document&&te.document.addEventListener("visibilitychange",()=>{te.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return If(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return Nf(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){yt&&q.warn("SDK not enabled, will not capture user feedback.");return}const r=Pf(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}}const $f=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ue=ae,Ff=1e3;let ks,go,yo;function Bf(e){Dt("dom",e),Pt("dom",Uf)}function Uf(){if(!Ue.document)return;const e=nt.bind(null,"dom"),t=Is(e,!0);Ue.document.addEventListener("click",t,!1),Ue.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const o=Ue[r],i=o&&o.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(We(i,"addEventListener",function(s){return function(a,c,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[a]=d[a]||{refCount:0};if(!f.handler){const h=Is(e);f.handler=h,s.call(this,a,h,l)}f.refCount++}catch{}return s.call(this,a,c,l)}}),We(i,"removeEventListener",function(s){return function(a,c,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[a];f&&(f.refCount--,f.refCount<=0&&(s.call(this,a,f.handler,l),f.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,a,c,l)}}))})}function Hf(e){if(e.type!==go)return!1;try{if(!e.target||e.target._sentryId!==yo)return!1}catch{}return!0}function Rf(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Is(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=zf(r);if(Rf(r.type,n))return;xt(r,"_sentryCaptured",!0),n&&!n._sentryId&&xt(n,"_sentryId",Qe());const o=r.type==="keypress"?"input":r.type;Hf(r)||(e({event:r,name:o,global:t}),go=r.type,yo=n?n._sentryId:void 0),clearTimeout(ks),ks=Ue.setTimeout(()=>{yo=void 0,go=void 0},Ff)}}function zf(e){try{return e.target}catch{return null}}let Yr;function Ns(e){const t="history";Dt(t,e),Pt(t,jf)}function jf(){if(!vf())return;const e=Ue.onpopstate;Ue.onpopstate=function(...r){const n=Ue.location.href,o=Yr;if(Yr=n,nt("history",{from:o,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const o=n.length>2?n[2]:void 0;if(o){const i=Yr,s=String(o);Yr=s,nt("history",{from:i,to:s})}return r.apply(this,n)}}We(Ue.history,"pushState",t),We(Ue.history,"replaceState",t)}const Kr={};function Wf(e){const t=Kr[e];if(t)return t;let r=Ue[e];if(co(r))return Kr[e]=r.bind(Ue);const n=Ue.document;if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){$f&&q.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Kr[e]=r.bind(Ue))}function Os(e){Kr[e]=void 0}const hr="__sentry_xhr_v3__";function qf(e){Dt("xhr",e),Pt("xhr",Gf)}function Gf(){if(!Ue.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const o=new Error,i=ut()*1e3,s=lt(n[0])?n[0].toUpperCase():void 0,a=Zf(n[1]);if(!s||!a)return t.apply(r,n);r[hr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const c=()=>{const l=r[hr];if(l&&r.readyState===4){try{l.status_code=r.status}catch{}const d={endTimestamp:ut()*1e3,startTimestamp:i,xhr:r,virtualError:o};nt("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(l,d,f){return c(),l.apply(d,f)}}):r.addEventListener("readystatechange",c),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(l,d,f){const[h,m]=f,g=d[hr];return g&<(h)&<(m)&&(g.request_headers[h.toLowerCase()]=m),l.apply(d,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const o=r[hr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);const i={startTimestamp:ut()*1e3,xhr:r};return nt("xhr",i),t.apply(r,n)}})}function Zf(e){if(lt(e))return e;try{return e.toString()}catch{}}function Vf(e,t=Wf("fetch")){let r=0,n=0;function o(i){const s=i.body.length;r+=s,n++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return Os("fetch"),Rr("No fetch implementation available");try{return t(e.url,a).then(c=>(r-=s,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Os("fetch"),r-=s,n--,Rr(c)}}return Rd(e,o)}const Yf=30,Kf=50;function bo(e,t,r,n){const o={filename:e,function:t==="<anonymous>"?Mt:t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}const Jf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Qf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Xf=/\((\S*)(?::(\d+))(?::(\d+))\)/,ep=[Yf,e=>{const t=Jf.exec(e);if(t){const[,n,o,i]=t;return bo(n,Mt,+o,+i)}const r=Qf.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=Xf.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[o,i]=Ms(r[1]||Mt,r[2]);return bo(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],tp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,rp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,np=Si(...[ep,[Kf,e=>{const t=tp.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=rp.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||Mt;return[o,n]=Ms(o,n),bo(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Ms=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:Mt,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Jr=1024,op="Breadcrumbs",ip=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:op,setup(r){t.console&&af(cp(r)),t.dom&&Bf(ap(r,t.dom)),t.xhr&&qf(lp(r)),t.fetch&&hf(up(r)),t.history&&Ns(dp(r)),t.sentry&&r.on("beforeSendEvent",sp(r))}}});function sp(e){return function(r){Ie()===e&&Bt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:ht(r)},{event:r})}}function ap(e,t){return function(n){if(Ie()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Jr&&(yt&&q.warn(`\`dom.maxStringLength\` cannot exceed ${Jr}, but a value of ${a} was configured. Sentry will use ${Jr} instead.`),a=Jr),typeof s=="string"&&(s=[s]);try{const l=n.event,d=fp(l)?l.target:l;o=Ii(d,{keyAttrs:s,maxStringLength:a}),i=Gl(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${n.name}`,message:o};i&&(c.data={"ui.component_name":i}),Bt(c,{event:n.event,name:n.name,global:n.global})}}function cp(e){return function(r){if(Ie()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:lf(r.level),message:Ni(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Ni(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Bt(n,{input:r.args,level:r.level})}}function lp(e){return function(r){if(Ie()!==e)return;const{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[hr];if(!n||!o||!i)return;const{method:s,url:a,status_code:c,body:l}=i,d={method:s,url:a,status_code:c},f={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:o},h=Es(c);Bt({category:"xhr",data:d,type:"http",level:h},f)}}function up(e){return function(r){if(Ie()!==e)return;const{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const i=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o};Bt({category:"fetch",data:i,level:"error",type:"http"},s)}else{const i=r.response,s={...r.fetchData,status_code:i&&i.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},c=Es(s.status_code);Bt({category:"fetch",data:s,type:"http",level:c},a)}}}function dp(e){return function(r){if(Ie()!==e)return;let n=r.from,o=r.to;const i=so(te.location.href);let s=n?so(n):void 0;const a=so(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Bt({category:"navigation",data:{from:n,to:o}})}}function fp(e){return!!e&&!!e.target}const pp=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],mp="BrowserApiErrors",_p=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:mp,setupOnce(){t.setTimeout&&We(te,"setTimeout",Ds),t.setInterval&&We(te,"setInterval",Ds),t.requestAnimationFrame&&We(te,"requestAnimationFrame",hp),t.XMLHttpRequest&&"XMLHttpRequest"in te&&We(XMLHttpRequest.prototype,"send",gp);const r=t.eventTarget;r&&(Array.isArray(r)?r:pp).forEach(yp)}}});function Ds(e){return function(...t){const r=t[0];return t[0]=er(r,{mechanism:{data:{function:_t(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function hp(e){return function(t){return e.apply(this,[er(t,{mechanism:{data:{function:"requestAnimationFrame",handler:_t(e)},handled:!1,type:"instrument"}})])}}function gp(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&We(r,o,function(i){const s={mechanism:{data:{function:o,handler:_t(i)},handled:!1,type:"instrument"}},a=Gn(i);return a&&(s.mechanism.data.handler=_t(a)),er(i,s)})}),e.apply(this,t)}}function yp(e){const r=te[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(We(n,"addEventListener",function(o){return function(i,s,a){try{bp(s)&&(s.handleEvent=er(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:_t(s),target:e},handled:!1,type:"instrument"}}))}catch{}return o.apply(this,[i,er(s,{mechanism:{data:{function:"addEventListener",handler:_t(s),target:e},handled:!1,type:"instrument"}}),a])}}),We(n,"removeEventListener",function(o){return function(i,s,a){try{const c=s.__sentry_wrapped__;c&&o.call(this,i,c,a)}catch{}return o.call(this,i,s,a)}}))}function bp(e){return typeof e.handleEvent=="function"}const vp=()=>({name:"BrowserSession",setupOnce(){if(typeof te.document>"u"){yt&&q.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}rs({ignoreDuration:!0}),is(),Ns(({from:e,to:t})=>{e!==void 0&&e!==t&&(rs({ignoreDuration:!0}),is())})}}),Sp="GlobalHandlers",Ep=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Sp,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(wp(r),Ps("onerror")),t.onunhandledrejection&&(Cp(r),Ps("onunhandledrejection"))}}});function wp(e){xl(t=>{const{stackParser:r,attachStacktrace:n}=Ls();if(Ie()!==e||As())return;const{msg:o,url:i,line:s,column:a,error:c}=t,l=kp(_o(r,c||o,void 0,n,!1),i,s,a);l.level="error",ts(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Cp(e){Fl(t=>{const{stackParser:r,attachStacktrace:n}=Ls();if(Ie()!==e||As())return;const o=Ap(t),i=Wn(o)?Tp(o):_o(r,o,void 0,n,!0);i.level="error",ts(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Ap(e){if(Wn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Tp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function kp(e,t,r,n){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=n,d=r,f=lt(t)&&t.length>0?t:ql();return c.length===0&&c.push({colno:l,filename:f,function:Mt,in_app:!0,lineno:d}),e}function Ps(e){yt&&q.log(`Global Handler attached: ${e}`)}function Ls(){const e=Ie();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ip=()=>({name:"HttpContext",preprocessEvent(e){if(!te.navigator&&!te.location&&!te.document)return;const t=e.request&&e.request.url||te.location&&te.location.href,{referrer:r}=te.document||{},{userAgent:n}=te.navigator||{},o={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),Np="cause",Op=5,Mp="LinkedErrors",Dp=((e={})=>{const t=e.limit||Op,r=e.key||Np;return{name:Mp,preprocessEvent(n,o,i){const s=i.getOptions();of(fo,s.stackParser,s.maxValueLength,r,t,n,o)}}});function Pp(e){const t=[Zd(),Wd(),_p(),ip(),Ep(),Dp(),df(),Ip()];return e.autoSessionTracking!==!1&&t.push(vp()),t}function Lp(e={}){const t={defaultIntegrations:Pp(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:te.SENTRY_RELEASE&&te.SENTRY_RELEASE.id?te.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function xp(){const e=typeof te.window<"u"&&te;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,o=te.location&&te.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!n&&te===te.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!n&&!s&&!a}function $p(e={}){const t=Lp(e);if(!t.skipBrowserExtensionCheck&&xp()){Ot(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}yt&&(ws()||q.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:Pl(t.stackParser||np),integrations:Ad(t),transport:t.transport||Vf};return Dd(xf,r)}function xs(e={}){if(!te.document){yt&&q.error("Global document not defined in showReportDialog call");return}const t=st(),r=t.getClient(),n=r&&r.getDsn();if(!n){yt&&q.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const a=yd();a&&(e.eventId=a)}const o=te.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=wd(n,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:i}=e;if(i){const a=c=>{if(c.data==="__sentry_reportdialog_closed__")try{i()}finally{te.removeEventListener("message",a)}};te.addEventListener("message",a)}const s=te.document.head||te.document.body;s?s.appendChild(o):yt&&q.error("Not injecting report dialog. No injection point found in HTML")}const Fp={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},$s=te;async function Bp(e,t){const r=Fp[e],n=$s.Sentry=$s.Sentry||{},o=n[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=Up(r),s=te.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin";const a=new Promise((f,h)=>{s.addEventListener("load",()=>f()),s.addEventListener("error",h)}),c=te.document.currentScript,l=te.document.body||te.document.head||c&&c.parentElement;if(l)l.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=n[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function Up(e){const t=Ie(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${mt}/${e}.min.js`,n).toString()}function Hp(e){const t={...e};return ms(t,"react"),gd("react",{version:_.version}),$p(t)}function Rp(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function zp(e,t){const r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function jp(e,{componentStack:t},r){if(Rp(_.version)&&Fr(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,zp(e,n)}return Gr(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var vo={exports:{}},ue={};/** @license React v16.13.1
|
|
17
|
+
Url: ${Zr(e)}`),!0)}function of(e,t){return e.type||!t||!t.length?!1:lf(e).some(r=>zr(r,t))}function sf(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const r=e.transaction;return r?zr(r,t):!1}function af(e,t){if(!t||!t.length)return!1;const r=Zr(e);return r?zr(r,t):!1}function cf(e,t){if(!t||!t.length)return!0;const r=Zr(e);return r?zr(r,t):!0}function lf(e){const t=[];e.message&&t.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch{}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function uf(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function df(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Zr(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?df(t):null}catch{return fe&&W.error(`Cannot extract url for event ${ht(e)}`),null}}function ff(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function pf(e,t,r=250,n,o,i,s){if(!i.exception||!i.exception.values||!s||!xt(s.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=mf(so(e,t,o,s.originalException,n,i.exception.values,a,0),r))}function so(e,t,r,n,o,i,s,a){if(i.length>=r+1)return i;let c=[...i];if(xt(n[o],Error)){vs(s,a);const l=e(t,n[o]),d=c.length;Ss(l,o,d,a),c=so(e,t,r,n[o],o,[l,...c],l,d)}return Array.isArray(n.errors)&&n.errors.forEach((l,d)=>{if(xt(l,Error)){vs(s,a);const f=e(t,l),g=c.length;Ss(f,`errors[${d}]`,g,a),c=so(e,t,r,l,o,[f,...c],f,g)}}),c}function vs(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Ss(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function mf(e,t){return e.map(r=>(r.value&&(r.value=Jt(r.value,t)),r))}function ao(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function _f(e){const t="console";Dt(t,e),Pt(t,hf)}function hf(){"console"in ce&&Un.forEach(function(e){e in ce.console&&qe(ce.console,e,function(t){return xr[e]=t,function(...r){nt("console",{args:r,level:e});const o=xr[e];o&&o.apply(ce.console,r)}})})}function gf(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const yf="Dedupe",bf=(()=>{let e;return{name:yf,processEvent(t){if(t.type)return t;try{if(vf(t,e))return fe&&W.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}});function vf(e,t){return t?!!(Sf(e,t)||Ef(e,t)):!1}function Sf(e,t){const r=e.message,n=t.message;return!(!r&&!n||r&&!n||!r&&n||r!==n||!ws(e,t)||!Es(e,t))}function Ef(e,t){const r=Cs(t),n=Cs(e);return!(!r||!n||r.type!==n.type||r.value!==n.value||!ws(e,t)||!Es(e,t))}function Es(e,t){let r=Ai(e),n=Ai(t);if(!r&&!n)return!0;if(r&&!n||!r&&n||(r=r,n=n,n.length!==r.length))return!1;for(let o=0;o<n.length;o++){const i=n[o],s=r[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function ws(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;r=r,n=n;try{return r.join("")===n.join("")}catch{return!1}}function Cs(e){return e.exception&&e.exception.values&&e.exception.values[0]}function As(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const co=ce;function Ts(){if(!("fetch"in co))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function lo(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function wf(){if(typeof EdgeRuntime=="string")return!0;if(!Ts())return!1;if(lo(co.fetch))return!0;let e=!1;const t=co.document;if(t&&typeof t.createElement=="function")try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=lo(r.contentWindow.fetch)),t.head.removeChild(r)}catch(r){It&&W.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function Cf(e,t){const r="fetch";Dt(r,e),Pt(r,()=>Af(void 0,t))}function Af(e,t=!1){t&&!wf()||qe(ce,"fetch",function(r){return function(...n){const o=new Error,{method:i,url:s}=Tf(n),a={args:n,fetchData:{method:i,url:s},startTimestamp:ut()*1e3,virtualError:o};return nt("fetch",{...a}),r.apply(ce,n).then(async c=>(nt("fetch",{...a,endTimestamp:ut()*1e3,response:c}),c),c=>{throw nt("fetch",{...a,endTimestamp:ut()*1e3,error:c}),Br(c)&&c.stack===void 0&&(c.stack=o.stack,Lt(c,"framesToPop",1)),c})}})}function uo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function ks(e){return typeof e=="string"?e:e?uo(e,"url")?e.url:e.toString?e.toString():"":""}function Tf(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[r,n]=e;return{url:ks(r),method:uo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:ks(t),method:uo(t,"method")?String(t.method).toUpperCase():"GET"}}function kf(){return"npm"}const Yr=ce;function Nf(){const e=Yr.chrome,t=e&&e.app&&e.app.runtime,r="history"in Yr&&!!Yr.history.pushState&&!!Yr.history.replaceState;return!t&&r}const te=ce;let fo=0;function Ns(){return fo>0}function If(){fo++,setTimeout(()=>{fo--})}function tr(e,t={}){function r(o){return typeof o=="function"}if(!r(e))return e;try{const o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Vn(e))return e}catch{return e}const n=function(...o){try{const i=o.map(s=>tr(s,t));return e.apply(this,i)}catch(i){throw If(),eo(s=>{s.addEventProcessor(a=>(t.mechanism&&(Yn(a,void 0),Qt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Vr(i)}),i}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o])}catch{}Pi(n,e),Lt(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get(){return e.name}})}catch{}return n}const yt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function po(e,t){const r=_o(e,t),n={type:xf(t),value:Lf(t)};return r.length&&(n.stacktrace={frames:r}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function Of(e,t,r,n){const o=Ie(),i=o&&o.getOptions().normalizeDepth,s=Hf(t),a={__serialized__:Qi(t,i)};if(s)return{exception:{values:[po(e,s)]},extra:a};const c={exception:{values:[{type:Ur(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:Bf(t,{isUnhandledRejection:n})}]},extra:a};if(r){const l=_o(e,r);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function mo(e,t){return{exception:{values:[po(e,t)]}}}function _o(e,t){const r=t.stacktrace||t.stack||"",n=Df(t),o=Pf(t);try{return e(r,n,o)}catch{}return[]}const Mf=/Minified React error #\d+;/i;function Df(e){return e&&Mf.test(e.message)?1:0}function Pf(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Is(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function xf(e){const t=e&&e.name;return!t&&Is(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Lf(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:Is(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function $f(e,t,r,n){const o=r&&r.syntheticException||void 0,i=ho(e,t,o,n);return Qt(i),i.level="error",r&&r.event_id&&(i.event_id=r.event_id),$t(i)}function Ff(e,t,r="info",n,o){const i=n&&n.syntheticException||void 0,s=go(e,t,i,o);return s.level=r,n&&n.event_id&&(s.event_id=n.event_id),$t(s)}function ho(e,t,r,n,o){let i;if(Ni(t)&&t.error)return mo(e,t.error);if(Ii(t)||Vl(t)){const s=t;if("stack"in t)i=mo(e,t);else{const a=s.name||(Ii(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=go(e,c,r,n),Yn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return Br(t)?mo(e,t):Kt(t)||Ur(t)?(i=Of(e,t,r,o),Qt(i,{synthetic:!0}),i):(i=go(e,t,r,n),Yn(i,`${t}`),Qt(i,{synthetic:!0}),i)}function go(e,t,r,n){const o={};if(n&&r){const i=_o(e,r);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),Qt(o,{synthetic:!0})}if(Wn(t)){const{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function Bf(e,{isUnhandledRejection:t}){const r=ru(e),n=t?"promise rejection":"exception";return Ni(e)?`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``:Ur(e)?`Event \`${Uf(e)}\` (type=${e.type}) captured as ${n}`:`Object captured as ${n} with keys: ${r}`}function Uf(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Hf(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function zf(e,{metadata:t,tunnel:r,dsn:n}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:_r(n)}},i=Rf(e);return hr(o,[i])}function Rf(e){return[{type:"user_report"},e]}class jf extends Fd{constructor(t){const r={parentSpanIsAlwaysRootSpan:!0,...t},n=te.SENTRY_SDK_SOURCE||kf();gs(r,"browser",["browser"],n),super(r),r.sendClientReports&&te.document&&te.document.addEventListener("visibilitychange",()=>{te.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,r){return $f(this._options.stackParser,t,r,this._options.attachStacktrace)}eventFromMessage(t,r="info",n){return Ff(this._options.stackParser,t,r,n,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){yt&&W.warn("SDK not enabled, will not capture user feedback.");return}const r=zf(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(r)}_prepareEvent(t,r,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,r,n)}}const Wf=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,He=ce,qf=1e3;let Os,yo,bo;function Gf(e){Dt("dom",e),Pt("dom",Vf)}function Vf(){if(!He.document)return;const e=nt.bind(null,"dom"),t=Ms(e,!0);He.document.addEventListener("click",t,!1),He.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(r=>{const o=He[r],i=o&&o.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(qe(i,"addEventListener",function(s){return function(a,c,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[a]=d[a]||{refCount:0};if(!f.handler){const g=Ms(e);f.handler=g,s.call(this,a,g,l)}f.refCount++}catch{}return s.call(this,a,c,l)}}),qe(i,"removeEventListener",function(s){return function(a,c,l){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[a];f&&(f.refCount--,f.refCount<=0&&(s.call(this,a,f.handler,l),f.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,a,c,l)}}))})}function Zf(e){if(e.type!==yo)return!1;try{if(!e.target||e.target._sentryId!==bo)return!1}catch{}return!0}function Yf(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Ms(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=Kf(r);if(Yf(r.type,n))return;Lt(r,"_sentryCaptured",!0),n&&!n._sentryId&&Lt(n,"_sentryId",Qe());const o=r.type==="keypress"?"input":r.type;Zf(r)||(e({event:r,name:o,global:t}),yo=r.type,bo=n?n._sentryId:void 0),clearTimeout(Os),Os=He.setTimeout(()=>{bo=void 0,yo=void 0},qf)}}function Kf(e){try{return e.target}catch{return null}}let Kr;function Ds(e){const t="history";Dt(t,e),Pt(t,Jf)}function Jf(){if(!Nf())return;const e=He.onpopstate;He.onpopstate=function(...r){const n=He.location.href,o=Kr;if(Kr=n,nt("history",{from:o,to:n}),e)try{return e.apply(this,r)}catch{}};function t(r){return function(...n){const o=n.length>2?n[2]:void 0;if(o){const i=Kr,s=String(o);Kr=s,nt("history",{from:i,to:s})}return r.apply(this,n)}}qe(He.history,"pushState",t),qe(He.history,"replaceState",t)}const Jr={};function Qf(e){const t=Jr[e];if(t)return t;let r=He[e];if(lo(r))return Jr[e]=r.bind(He);const n=He.document;if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const i=o.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(o)}catch(o){Wf&&W.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return r&&(Jr[e]=r.bind(He))}function Ps(e){Jr[e]=void 0}const gr="__sentry_xhr_v3__";function Xf(e){Dt("xhr",e),Pt("xhr",ep)}function ep(){if(!He.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,r,n){const o=new Error,i=ut()*1e3,s=lt(n[0])?n[0].toUpperCase():void 0,a=tp(n[1]);if(!s||!a)return t.apply(r,n);r[gr]={method:s,url:a,request_headers:{}},s==="POST"&&a.match(/sentry_key/)&&(r.__sentry_own_request__=!0);const c=()=>{const l=r[gr];if(l&&r.readyState===4){try{l.status_code=r.status}catch{}const d={endTimestamp:ut()*1e3,startTimestamp:i,xhr:r,virtualError:o};nt("xhr",d)}};return"onreadystatechange"in r&&typeof r.onreadystatechange=="function"?r.onreadystatechange=new Proxy(r.onreadystatechange,{apply(l,d,f){return c(),l.apply(d,f)}}):r.addEventListener("readystatechange",c),r.setRequestHeader=new Proxy(r.setRequestHeader,{apply(l,d,f){const[g,h]=f,b=d[gr];return b&<(g)&<(h)&&(b.request_headers[g.toLowerCase()]=h),l.apply(d,f)}}),t.apply(r,n)}}),e.send=new Proxy(e.send,{apply(t,r,n){const o=r[gr];if(!o)return t.apply(r,n);n[0]!==void 0&&(o.body=n[0]);const i={startTimestamp:ut()*1e3,xhr:r};return nt("xhr",i),t.apply(r,n)}})}function tp(e){if(lt(e))return e;try{return e.toString()}catch{}}function rp(e,t=Qf("fetch")){let r=0,n=0;function o(i){const s=i.body.length;r+=s,n++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return Ps("fetch"),Rr("No fetch implementation available");try{return t(e.url,a).then(c=>(r-=s,n--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Ps("fetch"),r-=s,n--,Rr(c)}}return Yd(e,o)}const np=30,op=50;function vo(e,t,r,n){const o={filename:e,function:t==="<anonymous>"?Mt:t,in_app:!0};return r!==void 0&&(o.lineno=r),n!==void 0&&(o.colno=n),o}const ip=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,sp=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ap=/\((\S*)(?::(\d+))(?::(\d+))\)/,cp=[np,e=>{const t=ip.exec(e);if(t){const[,n,o,i]=t;return vo(n,Mt,+o,+i)}const r=sp.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const s=ap.exec(r[2]);s&&(r[2]=s[1],r[3]=s[2],r[4]=s[3])}const[o,i]=xs(r[1]||Mt,r[2]);return vo(i,o,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],lp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,up=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,dp=Ci(...[cp,[op,e=>{const t=lp.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=up.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],o=t[1]||Mt;return[o,n]=xs(o,n),vo(n,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),xs=(e,t)=>{const r=e.indexOf("safari-extension")!==-1,n=e.indexOf("safari-web-extension")!==-1;return r||n?[e.indexOf("@")!==-1?e.split("@")[0]:Mt,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Qr=1024,fp="Breadcrumbs",pp=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:fp,setup(r){t.console&&_f(hp(r)),t.dom&&Gf(_p(r,t.dom)),t.xhr&&Xf(gp(r)),t.fetch&&Cf(yp(r)),t.history&&Ds(bp(r)),t.sentry&&r.on("beforeSendEvent",mp(r))}}});function mp(e){return function(r){Ie()===e&&Bt({category:`sentry.${r.type==="transaction"?"transaction":"event"}`,event_id:r.event_id,level:r.level,message:ht(r)},{event:r})}}function _p(e,t){return function(n){if(Ie()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Qr&&(yt&&W.warn(`\`dom.maxStringLength\` cannot exceed ${Qr}, but a value of ${a} was configured. Sentry will use ${Qr} instead.`),a=Qr),typeof s=="string"&&(s=[s]);try{const l=n.event,d=vp(l)?l.target:l;o=Mi(d,{keyAttrs:s,maxStringLength:a}),i=eu(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${n.name}`,message:o};i&&(c.data={"ui.component_name":i}),Bt(c,{event:n.event,name:n.name,global:n.global})}}function hp(e){return function(r){if(Ie()!==e)return;const n={category:"console",data:{arguments:r.args,logger:"console"},level:gf(r.level),message:Di(r.args," ")};if(r.level==="assert")if(r.args[0]===!1)n.message=`Assertion failed: ${Di(r.args.slice(1)," ")||"console.assert"}`,n.data.arguments=r.args.slice(1);else return;Bt(n,{input:r.args,level:r.level})}}function gp(e){return function(r){if(Ie()!==e)return;const{startTimestamp:n,endTimestamp:o}=r,i=r.xhr[gr];if(!n||!o||!i)return;const{method:s,url:a,status_code:c,body:l}=i,d={method:s,url:a,status_code:c},f={xhr:r.xhr,input:l,startTimestamp:n,endTimestamp:o},g=As(c);Bt({category:"xhr",data:d,type:"http",level:g},f)}}function yp(e){return function(r){if(Ie()!==e)return;const{startTimestamp:n,endTimestamp:o}=r;if(o&&!(r.fetchData.url.match(/sentry_key/)&&r.fetchData.method==="POST"))if(r.error){const i=r.fetchData,s={data:r.error,input:r.args,startTimestamp:n,endTimestamp:o};Bt({category:"fetch",data:i,level:"error",type:"http"},s)}else{const i=r.response,s={...r.fetchData,status_code:i&&i.status},a={input:r.args,response:i,startTimestamp:n,endTimestamp:o},c=As(s.status_code);Bt({category:"fetch",data:s,type:"http",level:c},a)}}}function bp(e){return function(r){if(Ie()!==e)return;let n=r.from,o=r.to;const i=ao(te.location.href);let s=n?ao(n):void 0;const a=ao(o);(!s||!s.path)&&(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Bt({category:"navigation",data:{from:n,to:o}})}}function vp(e){return!!e&&!!e.target}const Sp=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Ep="BrowserApiErrors",wp=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Ep,setupOnce(){t.setTimeout&&qe(te,"setTimeout",Ls),t.setInterval&&qe(te,"setInterval",Ls),t.requestAnimationFrame&&qe(te,"requestAnimationFrame",Cp),t.XMLHttpRequest&&"XMLHttpRequest"in te&&qe(XMLHttpRequest.prototype,"send",Ap);const r=t.eventTarget;r&&(Array.isArray(r)?r:Sp).forEach(Tp)}}});function Ls(e){return function(...t){const r=t[0];return t[0]=tr(r,{mechanism:{data:{function:_t(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Cp(e){return function(t){return e.apply(this,[tr(t,{mechanism:{data:{function:"requestAnimationFrame",handler:_t(e)},handled:!1,type:"instrument"}})])}}function Ap(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in r&&typeof r[o]=="function"&&qe(r,o,function(i){const s={mechanism:{data:{function:o,handler:_t(i)},handled:!1,type:"instrument"}},a=Vn(i);return a&&(s.mechanism.data.handler=_t(a)),tr(i,s)})}),e.apply(this,t)}}function Tp(e){const r=te[e],n=r&&r.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(qe(n,"addEventListener",function(o){return function(i,s,a){try{kp(s)&&(s.handleEvent=tr(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:_t(s),target:e},handled:!1,type:"instrument"}}))}catch{}return o.apply(this,[i,tr(s,{mechanism:{data:{function:"addEventListener",handler:_t(s),target:e},handled:!1,type:"instrument"}}),a])}}),qe(n,"removeEventListener",function(o){return function(i,s,a){try{const c=s.__sentry_wrapped__;c&&o.call(this,i,c,a)}catch{}return o.call(this,i,s,a)}}))}function kp(e){return typeof e.handleEvent=="function"}const Np=()=>({name:"BrowserSession",setupOnce(){if(typeof te.document>"u"){yt&&W.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}is({ignoreDuration:!0}),cs(),Ds(({from:e,to:t})=>{e!==void 0&&e!==t&&(is({ignoreDuration:!0}),cs())})}}),Ip="GlobalHandlers",Op=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ip,setupOnce(){Error.stackTraceLimit=50},setup(r){t.onerror&&(Mp(r),$s("onerror")),t.onunhandledrejection&&(Dp(r),$s("onunhandledrejection"))}}});function Mp(e){jl(t=>{const{stackParser:r,attachStacktrace:n}=Fs();if(Ie()!==e||Ns())return;const{msg:o,url:i,line:s,column:a,error:c}=t,l=Lp(ho(r,c||o,void 0,n,!1),i,s,a);l.level="error",os(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Dp(e){ql(t=>{const{stackParser:r,attachStacktrace:n}=Fs();if(Ie()!==e||Ns())return;const o=Pp(t),i=qn(o)?xp(o):ho(r,o,void 0,n,!0);i.level="error",os(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Pp(e){if(qn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function xp(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Lp(e,t,r,n){const o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],l=n,d=r,f=lt(t)&&t.length>0?t:Xl();return c.length===0&&c.push({colno:l,filename:f,function:Mt,in_app:!0,lineno:d}),e}function $s(e){yt&&W.log(`Global Handler attached: ${e}`)}function Fs(){const e=Ie();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const $p=()=>({name:"HttpContext",preprocessEvent(e){if(!te.navigator&&!te.location&&!te.document)return;const t=e.request&&e.request.url||te.location&&te.location.href,{referrer:r}=te.document||{},{userAgent:n}=te.navigator||{},o={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},i={...e.request,...t&&{url:t},headers:o};e.request=i}}),Fp="cause",Bp=5,Up="LinkedErrors",Hp=((e={})=>{const t=e.limit||Bp,r=e.key||Fp;return{name:Up,preprocessEvent(n,o,i){const s=i.getOptions();pf(po,s.stackParser,s.maxValueLength,r,t,n,o)}}});function zp(e){const t=[tf(),Qd(),wp(),pp(),Op(),Hp(),bf(),$p()];return e.autoSessionTracking!==!1&&t.push(Np()),t}function Rp(e={}){const t={defaultIntegrations:zp(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:te.SENTRY_RELEASE&&te.SENTRY_RELEASE.id?te.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function jp(){const e=typeof te.window<"u"&&te;if(!e)return!1;const t=e.chrome?"chrome":"browser",r=e[t],n=r&&r.runtime&&r.runtime.id,o=te.location&&te.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],s=!!n&&te===te.top&&i.some(c=>o.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!n&&!s&&!a}function Wp(e={}){const t=Rp(e);if(!t.skipBrowserExtensionCheck&&jp()){Ot(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}yt&&(Ts()||W.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:zl(t.stackParser||dp),integrations:Pd(t),transport:t.transport||rp};return Hd(jf,r)}function Bs(e={}){if(!te.document){yt&&W.error("Global document not defined in showReportDialog call");return}const t=st(),r=t.getClient(),n=r&&r.getDsn();if(!n){yt&&W.error("DSN not configured for showReportDialog call");return}if(t&&(e.user={...t.getUser(),...e.user}),!e.eventId){const a=Td();a&&(e.eventId=a)}const o=te.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=Md(n,e),e.onLoad&&(o.onload=e.onLoad);const{onClose:i}=e;if(i){const a=c=>{if(c.data==="__sentry_reportdialog_closed__")try{i()}finally{te.removeEventListener("message",a)}};te.addEventListener("message",a)}const s=te.document.head||te.document.body;s?s.appendChild(o):yt&&W.error("Not injecting report dialog. No injection point found in HTML")}const qp={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},Us=te;async function Gp(e,t){const r=qp[e],n=Us.Sentry=Us.Sentry||{},o=n[e];if(typeof o=="function"&&!("_isShim"in o))return o;const i=Vp(r),s=te.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin";const a=new Promise((f,g)=>{s.addEventListener("load",()=>f()),s.addEventListener("error",g)}),c=te.document.currentScript,l=te.document.body||te.document.head||c&&c.parentElement;if(l)l.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=n[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function Vp(e){const t=Ie(),r=t&&t.getOptions(),n=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${mt}/${e}.min.js`,n).toString()}function Zp(e){const t={...e};return gs(t,"react"),Ad("react",{version:m.version}),Wp(t)}function Yp(e){const t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function Kp(e,t){const r=new WeakSet;function n(o,i){if(!r.has(o)){if(o.cause)return r.add(o),n(o.cause,i);o.cause=i}}n(e,t)}function Jp(e,{componentStack:t},r){if(Yp(m.version)&&Br(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,Kp(e,n)}return Vr(e,{...r,captureContext:{contexts:{react:{componentStack:t}}}})}var So={exports:{}},ue={};/** @license React v16.13.1
|
|
18
18
|
* react-is.production.min.js
|
|
19
19
|
*
|
|
20
20
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the MIT license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/var Fs;function Wp(){if(Fs)return ue;Fs=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,I=e?Symbol.for("react.block"):60121,H=e?Symbol.for("react.fundamental"):60117,M=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function D(C){if(typeof C=="object"&&C!==null){var P=C.$$typeof;switch(P){case t:switch(C=C.type,C){case c:case l:case n:case i:case o:case f:return C;default:switch(C=C&&C.$$typeof,C){case a:case d:case g:case m:case s:return C;default:return P}}case r:return P}}}function R(C){return D(C)===l}return ue.AsyncMode=c,ue.ConcurrentMode=l,ue.ContextConsumer=a,ue.ContextProvider=s,ue.Element=t,ue.ForwardRef=d,ue.Fragment=n,ue.Lazy=g,ue.Memo=m,ue.Portal=r,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=f,ue.isAsyncMode=function(C){return R(C)||D(C)===c},ue.isConcurrentMode=R,ue.isContextConsumer=function(C){return D(C)===a},ue.isContextProvider=function(C){return D(C)===s},ue.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},ue.isForwardRef=function(C){return D(C)===d},ue.isFragment=function(C){return D(C)===n},ue.isLazy=function(C){return D(C)===g},ue.isMemo=function(C){return D(C)===m},ue.isPortal=function(C){return D(C)===r},ue.isProfiler=function(C){return D(C)===i},ue.isStrictMode=function(C){return D(C)===o},ue.isSuspense=function(C){return D(C)===f},ue.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===n||C===l||C===i||C===o||C===f||C===h||typeof C=="object"&&C!==null&&(C.$$typeof===g||C.$$typeof===m||C.$$typeof===s||C.$$typeof===a||C.$$typeof===d||C.$$typeof===H||C.$$typeof===M||C.$$typeof===E||C.$$typeof===I)},ue.typeOf=D,ue}var Bs;function qp(){return Bs||(Bs=1,vo.exports=Wp()),vo.exports}var So,Us;function Gp(){if(Us)return So;Us=1;var e=qp(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=n,i[e.Memo]=o;function s(g){return e.isMemo(g)?o:i[g.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;function m(g,I,H){if(typeof I!="string"){if(h){var M=f(I);M&&M!==h&&m(g,M,H)}var E=c(I);l&&(E=E.concat(l(I)));for(var D=s(g),R=s(I),C=0;C<E.length;++C){var P=E[C];if(!r[P]&&!(H&&H[P])&&!(R&&R[P])&&!(D&&D[P])){var z=d(I,P);try{a(g,P,z)}catch{}}}}return g}return So=m,So}Gp();const Zp=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Hs={componentStack:null,error:null,eventId:null};class Eo extends Fn.Component{constructor(t){super(t),Eo.prototype.__init.call(this),this.state=Hs,this._openFallbackReportDialog=!0;const r=Ie();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&xs({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,o=n??void 0,{beforeCapture:i,onError:s,showDialog:a,dialogOptions:c}=this.props;Xn(l=>{i&&i(l,t,o);const d=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=jp(t,r,{mechanism:{handled:d}});s&&s(t,o,f),a&&(this._lastEventId=f,this._openFallbackReportDialog&&xs({...c,eventId:f})),this.setState({error:t,componentStack:n,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&o(t,r,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(Hs)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let o;return typeof t=="function"?o=Fn.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):o=t,Fn.isValidElement(o)?o:(t&&Zp&&q.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}function qe({id:e,label:t,hint:r,error:n,required:o,className:i,children:s}){return u.jsxs("div",{className:i,children:[u.jsxs("label",{htmlFor:e,className:"form-label",children:[t," ",o&&u.jsx("span",{className:"text-red-600",children:"*"})]}),s,r&&!n&&u.jsx("p",{id:`${e}-hint`,className:"mt-1 text-sm text-slate-500",children:r}),n&&u.jsx("p",{id:`${e}-error`,className:"mt-1 text-sm text-red-600",children:n})]})}function wo({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s,type:"text"})})}function Rs(e,t){if(!e)return"";const r=parseInt(e,10);if(isNaN(r))return"";const n=r.toLocaleString("en-US");return t?`$${n}`:n}function Vp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s,onChange:a,onKeyDown:c,isCurrency:l=!1,maxDigits:d,...f}){const[h,m]=_.useState(""),g=_.useRef(null);_.useEffect(()=>{if(s==null||s===""){m("");return}const M=String(s).replace(/\D/g,"");m(Rs(M,l))},[s,l]);const I=M=>{let E=M.target.value.replace(/\D/g,"");d!==void 0&&(E=E.slice(0,d)),m(Rs(E,l));const D={...M,currentTarget:{...M.currentTarget,value:E},target:{...M.target,value:E}};a?.(D)},H=M=>{if(["-","+",".","e","E"].includes(M.key)){M.preventDefault();return}if(d!==void 0&&/^\d$/.test(M.key)&&M.currentTarget.value.replace(/\D/g,"").length>=d){M.preventDefault();return}c?.(M)};return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{ref:g,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,value:h,onChange:I,onKeyDown:H,...f})})}function zs(e){return e.length<=3?e:e.length<=5?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,5)}-${e.slice(5,9)}`}function Yp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[l,d]=_.useState(""),f=_.useRef(null);_.useEffect(()=>{const m=s.replace(/\D/g,"").slice(0,9);d(zs(m))},[s]);const h=m=>{const g=m.target.value,I=m.target.selectionStart??0,H=g.replace(/\D/g,"").slice(0,9),M=zs(H);d(M);const E={...m,currentTarget:{...m.currentTarget,value:M},target:{...m.target,value:M}};a?.(E),setTimeout(()=>{if(f.current){const D=g.slice(0,I).replace(/\D/g,"").length;let R=D;D>5?R+=2:D>3&&(R+=1),f.current.setSelectionRange(R,R)}},0)};return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{ref:f,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:l,onChange:h,...c})})}function Co({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"number",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function Kp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"email",className:`form-input ${n?"input-error":""}`,inputMode:"email",autoComplete:"email",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function Ao(e){const t=e.replace(/\D/g,"");if(t.length===10)return`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`;if(t.length>10){const r=t.slice(0,10);return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`}return t.length>=6?`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`:t.length>=3?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length>0?`(${t}`:t}function To(e){return e.replace(/\D/g,"")}function Jp({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[l,d]=_.useState(""),f=_.useRef(null),h=_.useRef(0);_.useEffect(()=>{if(!s){d("");return}let g=To(s);g.length===11&&g.startsWith("1")&&(g=g.slice(1));const I=g.slice(0,10);d(Ao(I))},[s]);const m=g=>{const I=g.target,H=I.value;h.current=I.selectionStart||0;const E=To(H).slice(0,10),D=Ao(E);d(D);const R=E.length===10?`+1${E}`:E,C={...g,currentTarget:{...g.currentTarget,value:R},target:{...g.target,value:R}};a?.(C),setTimeout(()=>{if(f.current){const P=H.slice(0,h.current),z=To(P),B=Ao(z),ee=Math.min(B.length,D.length);f.current.setSelectionRange(ee,ee)}},0)};return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${n?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[u.jsx("label",{htmlFor:e,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),u.jsx("input",{ref:f,id:e,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${n?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,value:l,onChange:m,...c})]})})}function Qp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"url",className:`form-input ${n?"input-error":""}`,inputMode:"url",autoComplete:"url",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function Xp({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"password",className:`form-input ${n?"input-error":""}`,autoComplete:"current-password",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function em({id:e,label:t,hint:r,error:n,required:o,className:i,rows:s=4,...a}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("textarea",{id:e,rows:s,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...a})})}function tm({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"date",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function gr({id:e,label:t,className:r,...n}){return u.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[u.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),u.jsx("span",{className:"checkbox-label",children:t})]})}function rm({onChoose:e,isSubmitting:t=!1}){const[r,n]=_.useState(!1),o=!r||t;return u.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[u.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),u.jsx(gr,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:r,onChange:i=>n(i.target.checked),disabled:t,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),u.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[u.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),u.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),u.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[u.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>e(!0),disabled:o,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",o?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[t&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"I Consent"]}),u.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>e(!1),disabled:t,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function nm({name:e,value:t,checked:r,onChange:n,children:o}){return u.jsxs("label",{className:"radio-card",children:[u.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),u.jsx("span",{className:"radio-label",children:o})]})}function om({legend:e,children:t,className:r,legendClassName:n}){return u.jsxs("fieldset",{className:r,children:[u.jsx("legend",{className:`form-label mb-4 ${n||""}`,children:e}),u.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function yr({id:e,label:t,hint:r,error:n,required:o,className:i,placeholder:s,options:a,children:c,...l}){const d=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!c;return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":d,required:o,...l,children:[s&&u.jsx("option",{value:"",disabled:!0,selected:!("value"in l),children:s}),f?c:a?.map(h=>u.jsx("option",{value:h.value,disabled:h.disabled,children:h.label},h.value))]})})}var js={apiKey:""};function im(){try{typeof js<"u"&&js?.apiKey}catch{}return""}function sm(){return new Promise((e,t)=>{if(window.google?.maps?.places){e();return}const r=document.querySelector('script[src*="maps.googleapis.com"]');if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(new Error("Failed to load Google Maps script")));return}const n=im();if(!n){t(new Error("Google Maps API key not configured"));return}const o=document.createElement("script");o.src=`https://maps.googleapis.com/maps/api/js?key=${n}&libraries=places`,o.async=!0,o.defer=!0,o.onload=()=>e(),o.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(o)})}function am(e){const t={fullAddress:e.formatted_address};return e.address_components&&e.address_components.forEach(r=>{const n=r.types;n.includes("street_number")&&(t.streetNumber=r.long_name),n.includes("route")&&(t.streetName=r.long_name),n.includes("locality")&&(t.city=r.long_name),n.includes("administrative_area_level_1")&&(t.state=r.short_name),n.includes("postal_code")&&(t.zipCode=r.long_name),n.includes("country")&&(t.country=r.short_name)}),t}function cm({id:e,label:t,hint:r,error:n,required:o,className:i,onChange:s,onPlaceSelect:a,value:c,...l}){const d=_.useRef(null),f=_.useRef(null),h=_.useRef(null),m=_.useRef(null),[g,I]=_.useState(!0),[H,M]=_.useState(c||""),[E,D]=_.useState([]),[R,C]=_.useState(!1),[P,z]=_.useState(-1),B=_.useRef([]),ee=_.useRef(!1),Q=_.useRef(-1);_.useEffect(()=>{B.current=E},[E]),_.useEffect(()=>{ee.current=R},[R]),_.useEffect(()=>{Q.current=P},[P]),_.useEffect(()=>{c!==void 0&&M(String(c))},[c]);const ne=_.useRef(null);_.useEffect(()=>{if(!d.current)return;let oe=!0;return sm().then(()=>{!oe||!d.current||(f.current=new google.maps.places.AutocompleteService,h.current=new google.maps.places.PlacesService(document.createElement("div")),I(!1))}).catch(K=>{console.error("Error loading Google Maps:",K),I(!1)}),()=>{oe=!1,ne.current&&clearTimeout(ne.current)}},[]);const _e=oe=>{const K=oe.target.value;if(M(K),s?.(K),ne.current&&clearTimeout(ne.current),K.length<3){D([]),C(!1);return}ne.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:K,types:["address"]},(U,Y)=>{Y===google.maps.places.PlacesServiceStatus.OK&&U?(D(U),C(!0),z(-1)):(D([]),C(!1))})},300)},$e=oe=>{if(!ee.current||B.current.length===0){oe.key==="Escape"&&(C(!1),ee.current=!1);return}switch(oe.key){case"ArrowDown":oe.preventDefault(),z(K=>{const U=K<B.current.length-1?K+1:K;return Q.current=U,U});break;case"ArrowUp":oe.preventDefault(),z(K=>{const U=K>0?K-1:-1;return Q.current=U,U});break;case"Enter":oe.preventDefault(),Q.current>=0&&Q.current<B.current.length&&Ee(B.current[Q.current]);break;case"Escape":oe.preventDefault(),C(!1),ee.current=!1;break}};_.useEffect(()=>{const oe=K=>{m.current&&!m.current.contains(K.target)&&d.current&&!d.current.contains(K.target)&&(C(!1),ee.current=!1)};if(R)return document.addEventListener("mousedown",oe),()=>{document.removeEventListener("mousedown",oe)}},[R]);const Ee=oe=>{h.current&&h.current.getDetails({placeId:oe.place_id,fields:["address_components","formatted_address","geometry"]},(K,U)=>{if(U===google.maps.places.PlacesServiceStatus.OK&&K){const Y=K.formatted_address||"";M(Y),C(!1),D([]),ee.current=!1;const de=am(K);s?.(Y,de),a?.(K)}})};return u.jsx(qe,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("div",{className:"relative",children:[u.jsx("input",{ref:d,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:H,onChange:_e,onKeyDown:$e,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,autoComplete:"street-address",placeholder:l.placeholder||"Enter an address",disabled:g||l.disabled,...l}),g&&u.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),R&&E.length>0&&u.jsx("div",{ref:m,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:E.map((oe,K)=>u.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${K===P?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${K<E.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":K===P,onClick:()=>Ee(oe),onMouseEnter:()=>z(K),children:[u.jsx("div",{className:"font-medium text-slate-900",children:oe.structured_formatting.main_text}),oe.structured_formatting.secondary_text&&u.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:oe.structured_formatting.secondary_text})]},oe.place_id))})]})})}function ko(e){const t=(r,n)=>r.map((o,i)=>{const s=n.length?n.join("__"):"root",a=o.key??`${s}__q${i}_${String(o.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,l=(o.conditionals??[]).map((d,f)=>{const h=d.conditionalQuestions?t(d.conditionalQuestions,[...n,`${a}__c${f}`]):void 0;return{...d,conditionalQuestions:h}});return{...o,key:a,conditionals:l}});return t(e,[])}function w(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){const h=d[f];h in a||(a[h]=l[h].bind(a))}}const o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;const l=r?.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class tr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ws extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const qs={};function Ut(e){return qs}function Gs(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Io(e,t){return typeof t=="bigint"?t.toString():t}function No(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Oo(e){return e==null}function Mo(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function lm(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const i=r>o?r:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const Zs=Symbol("evaluating");function fe(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Zs)return n===void 0&&(n=Zs,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ht(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function bt(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Vs(e){return JSON.stringify(e)}function um(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ys="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const dm=No(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function br(e){if(Qr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Qr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ks(e){return br(e)?{...e}:Array.isArray(e)?[...e]:e}const fm=new Set(["string","number","symbol"]);function rr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vt(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function j(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function pm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const mm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function _m(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=bt(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return Ht(this,"shape",s),s},checks:[]});return vt(e,i)}function hm(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=bt(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return Ht(this,"shape",s),s},checks:[]});return vt(e,i)}function gm(e,t){if(!br(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=bt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Ht(this,"shape",i),i}});return vt(e,o)}function ym(e,t){if(!br(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=bt(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ht(this,"shape",n),n}});return vt(e,r)}function bm(e,t){const r=bt(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ht(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return vt(e,r)}function vm(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=bt(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return Ht(this,"shape",c),c},checks:[]});return vt(t,s)}function Sm(e,t,r){const n=bt(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return Ht(this,"shape",i),i}});return vt(t,n)}function nr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Js(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Xr(e){return typeof e=="string"?e:e?.message}function Rt(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=Xr(e.inst?._zod.def?.error?.(e))??Xr(t?.error?.(e))??Xr(r.customError?.(e))??Xr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Do(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const Qs=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Io,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xs=w("$ZodError",Qs),ea=w("$ZodError",Qs,{Parent:Error});function Em(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function wm(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>n({issues:s}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let s=r,a=0;for(;a<i.path.length;){const c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return n(e),r}const Po=e=>(t,r,n,o)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new tr;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>Rt(c,i,Ut())));throw Ys(a,o?.callee),a}return s.value},Lo=e=>async(t,r,n,o)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>Rt(c,i,Ut())));throw Ys(a,o?.callee),a}return s.value},en=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new tr;return i.issues.length?{success:!1,error:new(e??Xs)(i.issues.map(s=>Rt(s,o,Ut())))}:{success:!0,data:i.value}},Cm=en(ea),tn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Rt(s,o,Ut())))}:{success:!0,data:i.value}},Am=tn(ea),Tm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Po(e)(t,r,o)},km=e=>(t,r,n)=>Po(e)(t,r,n),Im=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Lo(e)(t,r,o)},Nm=e=>async(t,r,n)=>Lo(e)(t,r,n),Om=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return en(e)(t,r,o)},Mm=e=>(t,r,n)=>en(e)(t,r,n),Dm=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return tn(e)(t,r,o)},Pm=e=>async(t,r,n)=>tn(e)(t,r,n),Lm=/^[cC][^\s-]{8,}$/,xm=/^[0-9a-z]+$/,$m=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fm=/^[0-9a-vA-V]{20}$/,Bm=/^[A-Za-z0-9]{27}$/,Um=/^[a-zA-Z0-9_-]{21}$/,Hm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Rm=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ta=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,zm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Wm(){return new RegExp(jm,"u")}const qm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Gm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Zm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ym=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ra=/^[A-Za-z0-9_-]*$/,Km=/^\+[1-9]\d{6,14}$/,na="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Jm=new RegExp(`^${na}$`);function oa(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Qm(e){return new RegExp(`^${oa(e)}$`)}function Xm(e){const t=oa({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${na}T(?:${n})$`)}const e_=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},t_=/^-?\d+$/,r_=/^-?\d+(?:\.\d+)?$/,n_=/^(?:true|false)$/i,o_=/^[^A-Z]*$/,i_=/^[^a-z]*$/,Re=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ia={number:"number",bigint:"bigint",object:"date"},sa=w("$ZodCheckLessThan",(e,t)=>{Re.init(e,t);const r=ia[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),aa=w("$ZodCheckGreaterThan",(e,t)=>{Re.init(e,t);const r=ia[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),s_=w("$ZodCheckMultipleOf",(e,t)=>{Re.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):lm(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),a_=w("$ZodCheckNumberFormat",(e,t)=>{Re.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=mm[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=t_)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),c_=w("$ZodCheckMaxLength",(e,t)=>{var r;Re.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oo(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const s=Do(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),l_=w("$ZodCheckMinLength",(e,t)=>{var r;Re.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oo(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const s=Do(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),u_=w("$ZodCheckLengthEquals",(e,t)=>{var r;Re.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Oo(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length;if(i===t.length)return;const s=Do(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),rn=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Re.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),d_=w("$ZodCheckRegex",(e,t)=>{rn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),f_=w("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=o_),rn.init(e,t)}),p_=w("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=i_),rn.init(e,t)}),m_=w("$ZodCheckIncludes",(e,t)=>{Re.init(e,t);const r=rr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),__=w("$ZodCheckStartsWith",(e,t)=>{Re.init(e,t);const r=new RegExp(`^${rr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),h_=w("$ZodCheckEndsWith",(e,t)=>{Re.init(e,t);const r=new RegExp(`.*${rr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),g_=w("$ZodCheckOverwrite",(e,t)=>{Re.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class y_{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
24
|
+
*/var Hs;function Qp(){if(Hs)return ue;Hs=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,T=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,O=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function D(E){if(typeof E=="object"&&E!==null){var x=E.$$typeof;switch(x){case t:switch(E=E.type,E){case c:case l:case n:case i:case o:case f:return E;default:switch(E=E&&E.$$typeof,E){case a:case d:case b:case h:case s:return E;default:return x}}case r:return x}}}function U(E){return D(E)===l}return ue.AsyncMode=c,ue.ConcurrentMode=l,ue.ContextConsumer=a,ue.ContextProvider=s,ue.Element=t,ue.ForwardRef=d,ue.Fragment=n,ue.Lazy=b,ue.Memo=h,ue.Portal=r,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=f,ue.isAsyncMode=function(E){return U(E)||D(E)===c},ue.isConcurrentMode=U,ue.isContextConsumer=function(E){return D(E)===a},ue.isContextProvider=function(E){return D(E)===s},ue.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ue.isForwardRef=function(E){return D(E)===d},ue.isFragment=function(E){return D(E)===n},ue.isLazy=function(E){return D(E)===b},ue.isMemo=function(E){return D(E)===h},ue.isPortal=function(E){return D(E)===r},ue.isProfiler=function(E){return D(E)===i},ue.isStrictMode=function(E){return D(E)===o},ue.isSuspense=function(E){return D(E)===f},ue.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===l||E===i||E===o||E===f||E===g||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===h||E.$$typeof===s||E.$$typeof===a||E.$$typeof===d||E.$$typeof===$||E.$$typeof===O||E.$$typeof===C||E.$$typeof===T)},ue.typeOf=D,ue}var zs;function Xp(){return zs||(zs=1,So.exports=Qp()),So.exports}var Eo,Rs;function em(){if(Rs)return Eo;Rs=1;var e=Xp(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=n,i[e.Memo]=o;function s(b){return e.isMemo(b)?o:i[b.$$typeof]||t}var a=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,g=Object.prototype;function h(b,T,$){if(typeof T!="string"){if(g){var O=f(T);O&&O!==g&&h(b,O,$)}var C=c(T);l&&(C=C.concat(l(T)));for(var D=s(b),U=s(T),E=0;E<C.length;++E){var x=C[E];if(!r[x]&&!($&&$[x])&&!(U&&U[x])&&!(D&&D[x])){var R=d(T,x);try{a(b,x,R)}catch{}}}}return b}return Eo=h,Eo}em();const tm=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,js={componentStack:null,error:null,eventId:null};class wo extends Bn.Component{constructor(t){super(t),wo.prototype.__init.call(this),this.state=js,this._openFallbackReportDialog=!0;const r=Ie();r&&t.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=r.on("afterSendEvent",n=>{!n.type&&this._lastEventId&&n.event_id===this._lastEventId&&Bs({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,r){const{componentStack:n}=r,o=n??void 0,{beforeCapture:i,onError:s,showDialog:a,dialogOptions:c}=this.props;eo(l=>{i&&i(l,t,o);const d=this.props.handled!=null?this.props.handled:!!this.props.fallback,f=Jp(t,r,{mechanism:{handled:d}});s&&s(t,o,f),a&&(this._lastEventId=f,this._openFallbackReportDialog&&Bs({...c,eventId:f})),this.setState({error:t,componentStack:n,eventId:f})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:r,eventId:n}=this.state,{onUnmount:o}=this.props;o&&o(t,r,n),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}__init(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:r,componentStack:n,eventId:o}=this.state;t&&t(r,n,o),this.setState(js)}}render(){const{fallback:t,children:r}=this.props,n=this.state;if(n.error){let o;return typeof t=="function"?o=Bn.createElement(t,{error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):o=t,Bn.isValidElement(o)?o:(t&&tm&&W.warn("fallback did not produce a valid ReactElement"),null)}return typeof r=="function"?r():r}}function Ge({id:e,label:t,hint:r,error:n,required:o,className:i,children:s}){return u.jsxs("div",{className:i,children:[u.jsxs("label",{htmlFor:e,className:"form-label",children:[t," ",o&&u.jsx("span",{className:"text-red-600",children:"*"})]}),s,r&&!n&&u.jsx("p",{id:`${e}-hint`,className:"mt-1 text-sm text-slate-500",children:r}),n&&u.jsx("p",{id:`${e}-error`,className:"mt-1 text-sm text-red-600",children:n})]})}function Co({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s,type:"text"})})}function Ws(e,t){if(!e)return"";const r=parseInt(e,10);if(isNaN(r))return"";const n=r.toLocaleString("en-US");return t?`$${n}`:n}function rm({id:e,label:t,hint:r,error:n,required:o,className:i,value:s,onChange:a,onKeyDown:c,isCurrency:l=!1,maxDigits:d,...f}){const[g,h]=m.useState(""),b=m.useRef(null);m.useEffect(()=>{if(s==null||s===""){h("");return}const O=String(s).replace(/\D/g,"");h(Ws(O,l))},[s,l]);const T=O=>{let C=O.target.value.replace(/\D/g,"");d!==void 0&&(C=C.slice(0,d)),h(Ws(C,l));const D={...O,currentTarget:{...O.currentTarget,value:C},target:{...O.target,value:C}};a?.(D)},$=O=>{if(["-","+",".","e","E"].includes(O.key)){O.preventDefault();return}if(d!==void 0&&/^\d$/.test(O.key)&&O.currentTarget.value.replace(/\D/g,"").length>=d){O.preventDefault();return}c?.(O)};return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{ref:b,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,value:g,onChange:T,onKeyDown:$,...f})})}function qs(e){return e.length<=3?e:e.length<=5?`${e.slice(0,3)}-${e.slice(3)}`:`${e.slice(0,3)}-${e.slice(3,5)}-${e.slice(5,9)}`}function nm({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[l,d]=m.useState(""),f=m.useRef(null);m.useEffect(()=>{const h=s.replace(/\D/g,"").slice(0,9);d(qs(h))},[s]);const g=h=>{const b=h.target.value,T=h.target.selectionStart??0,$=b.replace(/\D/g,"").slice(0,9),O=qs($);d(O);const C={...h,currentTarget:{...h.currentTarget,value:O},target:{...h.target,value:O}};a?.(C),setTimeout(()=>{if(f.current){const D=b.slice(0,T).replace(/\D/g,"").length;let U=D;D>5?U+=2:D>3&&(U+=1),f.current.setSelectionRange(U,U)}},0)};return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{ref:f,id:e,type:"text",inputMode:"numeric",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:l,onChange:g,...c})})}function Ao({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"number",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function om({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"email",className:`form-input ${n?"input-error":""}`,inputMode:"email",autoComplete:"email",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function To(e){const t=e.replace(/\D/g,"");if(t.length===10)return`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`;if(t.length>10){const r=t.slice(0,10);return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`}return t.length>=6?`(${t.slice(0,3)}) ${t.slice(3,6)} - ${t.slice(6)}`:t.length>=3?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length>0?`(${t}`:t}function ko(e){return e.replace(/\D/g,"")}function im({id:e,label:t,hint:r,error:n,required:o,className:i,value:s="",onChange:a,...c}){const[l,d]=m.useState(""),f=m.useRef(null),g=m.useRef(0);m.useEffect(()=>{if(!s){d("");return}let b=ko(s);b.length===11&&b.startsWith("1")&&(b=b.slice(1));const T=b.slice(0,10);d(To(T))},[s]);const h=b=>{const T=b.target,$=T.value;g.current=T.selectionStart||0;const C=ko($).slice(0,10),D=To(C);d(D);const U=C.length===10?`+1${C}`:C,E={...b,currentTarget:{...b.currentTarget,value:U},target:{...b.target,value:U}};a?.(E),setTimeout(()=>{if(f.current){const x=$.slice(0,g.current),R=ko(x),F=To(R),K=Math.min(F.length,D.length);f.current.setSelectionRange(K,K)}},0)};return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${n?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[u.jsx("label",{htmlFor:e,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),u.jsx("input",{ref:f,id:e,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${n?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,value:l,onChange:h,...c})]})})}function sm({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"url",className:`form-input ${n?"input-error":""}`,inputMode:"url",autoComplete:"url",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function am({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"password",className:`form-input ${n?"input-error":""}`,autoComplete:"current-password",required:o,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,...s})})}function cm({id:e,label:t,hint:r,error:n,required:o,className:i,rows:s=4,...a}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("textarea",{id:e,rows:s,className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...a})})}function lm({id:e,label:t,hint:r,error:n,required:o,className:i,...s}){return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsx("input",{id:e,type:"date",className:`form-input ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,...s})})}function Ut({id:e,label:t,className:r,...n}){return u.jsxs("label",{className:`checkbox-card ${r||""}`,htmlFor:e,children:[u.jsx("input",{id:e,type:"checkbox",className:"checkbox-input",...n}),u.jsx("span",{className:"checkbox-label",children:t})]})}function um({onChoose:e,isSubmitting:t=!1}){const[r,n]=m.useState(!1),o=!r||t;return u.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[u.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),u.jsx(Ut,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:r,onChange:i=>n(i.target.checked),disabled:t,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),u.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[u.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),u.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),u.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[u.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>e(!0),disabled:o,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",o?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[t&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"I Consent"]}),u.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>e(!1),disabled:t,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function dm({name:e,value:t,checked:r,onChange:n,children:o}){return u.jsxs("label",{className:"radio-card",children:[u.jsx("input",{className:"radio-input",type:"radio",name:e,value:t,checked:r,onChange:n}),u.jsx("span",{className:"radio-label",children:o})]})}function fm({legend:e,children:t,className:r,legendClassName:n}){return u.jsxs("fieldset",{className:r,children:[u.jsx("legend",{className:`form-label mb-4 ${n||""}`,children:e}),u.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:t})]})}function yr({id:e,label:t,hint:r,error:n,required:o,className:i,placeholder:s,options:a,children:c,...l}){const d=[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,f=!!c;return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("select",{id:e,className:`form-input select-caret ${n?"input-error":""}`,"aria-invalid":!!n,"aria-describedby":d,required:o,...l,children:[s&&u.jsx("option",{value:"",disabled:!0,selected:!("value"in l),children:s}),f?c:a?.map(g=>u.jsx("option",{value:g.value,disabled:g.disabled,children:g.label},g.value))]})})}var Gs={apiKey:""};function pm(){try{typeof Gs<"u"&&Gs?.apiKey}catch{}return""}function mm(){return new Promise((e,t)=>{if(window.google?.maps?.places){e();return}const r=document.querySelector('script[src*="maps.googleapis.com"]');if(r){r.addEventListener("load",()=>e()),r.addEventListener("error",()=>t(new Error("Failed to load Google Maps script")));return}const n=pm();if(!n){t(new Error("Google Maps API key not configured"));return}const o=document.createElement("script");o.src=`https://maps.googleapis.com/maps/api/js?key=${n}&libraries=places`,o.async=!0,o.defer=!0,o.onload=()=>e(),o.onerror=()=>t(new Error("Failed to load Google Maps script")),document.head.appendChild(o)})}function _m(e){const t={fullAddress:e.formatted_address};return e.address_components&&e.address_components.forEach(r=>{const n=r.types;n.includes("street_number")&&(t.streetNumber=r.long_name),n.includes("route")&&(t.streetName=r.long_name),n.includes("locality")&&(t.city=r.long_name),n.includes("administrative_area_level_1")&&(t.state=r.short_name),n.includes("postal_code")&&(t.zipCode=r.long_name),n.includes("country")&&(t.country=r.short_name)}),t}function hm({id:e,label:t,hint:r,error:n,required:o,className:i,onChange:s,onPlaceSelect:a,value:c,...l}){const d=m.useRef(null),f=m.useRef(null),g=m.useRef(null),h=m.useRef(null),[b,T]=m.useState(!0),[$,O]=m.useState(c||""),[C,D]=m.useState([]),[U,E]=m.useState(!1),[x,R]=m.useState(-1),F=m.useRef([]),K=m.useRef(!1),re=m.useRef(-1);m.useEffect(()=>{F.current=C},[C]),m.useEffect(()=>{K.current=U},[U]),m.useEffect(()=>{re.current=x},[x]),m.useEffect(()=>{c!==void 0&&O(String(c))},[c]);const ne=m.useRef(null);m.useEffect(()=>{if(!d.current)return;let Q=!0;return mm().then(()=>{!Q||!d.current||(f.current=new google.maps.places.AutocompleteService,g.current=new google.maps.places.PlacesService(document.createElement("div")),T(!1))}).catch(V=>{console.error("Error loading Google Maps:",V),T(!1)}),()=>{Q=!1,ne.current&&clearTimeout(ne.current)}},[]);const Ce=Q=>{const V=Q.target.value;if(O(V),s?.(V),ne.current&&clearTimeout(ne.current),V.length<3){D([]),E(!1);return}ne.current=setTimeout(()=>{f.current&&f.current.getPlacePredictions({input:V,types:["address"]},(me,ge)=>{ge===google.maps.places.PlacesServiceStatus.OK&&me?(D(me),E(!0),R(-1)):(D([]),E(!1))})},300)},De=Q=>{if(!K.current||F.current.length===0){Q.key==="Escape"&&(E(!1),K.current=!1);return}switch(Q.key){case"ArrowDown":Q.preventDefault(),R(V=>{const me=V<F.current.length-1?V+1:V;return re.current=me,me});break;case"ArrowUp":Q.preventDefault(),R(V=>{const me=V>0?V-1:-1;return re.current=me,me});break;case"Enter":Q.preventDefault(),re.current>=0&&re.current<F.current.length&&X(F.current[re.current]);break;case"Escape":Q.preventDefault(),E(!1),K.current=!1;break}};m.useEffect(()=>{const Q=V=>{h.current&&!h.current.contains(V.target)&&d.current&&!d.current.contains(V.target)&&(E(!1),K.current=!1)};if(U)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[U]);const X=Q=>{g.current&&g.current.getDetails({placeId:Q.place_id,fields:["address_components","formatted_address","geometry"]},(V,me)=>{if(me===google.maps.places.PlacesServiceStatus.OK&&V){const ge=V.formatted_address||"";O(ge),E(!1),D([]),K.current=!1;const ke=_m(V);s?.(ge,ke),a?.(V)}})};return u.jsx(Ge,{id:e,label:t,hint:r,error:n,required:o,className:i,children:u.jsxs("div",{className:"relative",children:[u.jsx("input",{ref:d,id:e,type:"text",className:`form-input ${n?"input-error":""}`,value:$,onChange:Ce,onKeyDown:De,"aria-invalid":!!n,"aria-describedby":[r?`${e}-hint`:null,n?`${e}-error`:null].filter(Boolean).join(" ")||void 0,required:o,autoComplete:"street-address",placeholder:l.placeholder||"Enter an address",disabled:b||l.disabled,...l}),b&&u.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),U&&C.length>0&&u.jsx("div",{ref:h,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:C.map((Q,V)=>u.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${V===x?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${V<C.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":V===x,onClick:()=>X(Q),onMouseEnter:()=>R(V),children:[u.jsx("div",{className:"font-medium text-slate-900",children:Q.structured_formatting.main_text}),Q.structured_formatting.secondary_text&&u.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:Q.structured_formatting.secondary_text})]},Q.place_id))})]})})}function No(e){const t=(r,n)=>r.map((o,i)=>{const s=n.length?n.join("__"):"root",a=o.key??`${s}__q${i}_${String(o.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,l=(o.conditionals??[]).map((d,f)=>{const g=d.conditionalQuestions?t(d.conditionalQuestions,[...n,`${a}__c${f}`]):void 0;return{...d,conditionalQuestions:g}});return{...o,key:a,conditionals:l}});return t(e,[])}function A(e,t,r){function n(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);const l=s.prototype,d=Object.keys(l);for(let f=0;f<d.length;f++){const g=d[f];g in a||(a[g]=l[g].bind(a))}}const o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;const l=r?.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}class rr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Vs extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Zs={};function Ht(e){return Zs}function Ys(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Io(e,t){return typeof t=="bigint"?t.toString():t}function Oo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Mo(e){return e==null}function Do(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function gm(e,t){const r=(e.toString().split(".")[1]||"").length,n=t.toString();let o=(n.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(n)){const c=n.match(/\d?e-(\d?)/);c?.[1]&&(o=Number.parseInt(c[1]))}const i=r>o?r:o,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}const Ks=Symbol("evaluating");function de(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Ks)return n===void 0&&(n=Ks,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function zt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function bt(...e){const t={};for(const r of e){const n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function Js(e){return JSON.stringify(e)}function ym(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Qs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const bm=Oo(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function br(e){if(Xr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Xr(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xs(e){return br(e)?{...e}:Array.isArray(e)?[...e]:e}const vm=new Set(["string","number","symbol"]);function nr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vt(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Sm(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Em={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function wm(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=bt(e._zod.def,{get shape(){const s={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return zt(this,"shape",s),s},checks:[]});return vt(e,i)}function Cm(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=bt(e._zod.def,{get shape(){const s={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return zt(this,"shape",s),s},checks:[]});return vt(e,i)}function Am(e,t){if(!br(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const i=e._zod.def.shape;for(const s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=bt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return zt(this,"shape",i),i}});return vt(e,o)}function Tm(e,t){if(!br(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=bt(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return zt(this,"shape",n),n}});return vt(e,r)}function km(e,t){const r=bt(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return zt(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return vt(e,r)}function Nm(e,t,r){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=bt(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(r)for(const l in r){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return zt(this,"shape",c),c},checks:[]});return vt(t,s)}function Im(e,t,r){const n=bt(t._zod.def,{get shape(){const o=t._zod.def.shape,i={...o};if(r)for(const s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(const s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return zt(this,"shape",i),i}});return vt(t,n)}function or(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ea(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function en(e){return typeof e=="string"?e:e?.message}function Rt(e,t,r){const n={...e,path:e.path??[]};if(!e.message){const o=en(e.inst?._zod.def?.error?.(e))??en(t?.error?.(e))??en(r.customError?.(e))??en(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function Po(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function vr(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}const ta=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Io,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ra=A("$ZodError",ta),na=A("$ZodError",ta,{Parent:Error});function Om(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function Mm(e,t=r=>r.message){const r={_errors:[]},n=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>n({issues:s}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let s=r,a=0;for(;a<i.path.length;){const c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++}}};return n(e),r}const xo=e=>(t,r,n,o)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new rr;if(s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>Rt(c,i,Ht())));throw Qs(a,o?.callee),a}return s.value},Lo=e=>async(t,r,n,o)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){const a=new(o?.Err??e)(s.issues.map(c=>Rt(c,i,Ht())));throw Qs(a,o?.callee),a}return s.value},tn=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new rr;return i.issues.length?{success:!1,error:new(e??ra)(i.issues.map(s=>Rt(s,o,Ht())))}:{success:!0,data:i.value}},Dm=tn(na),rn=e=>async(t,r,n)=>{const o=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Rt(s,o,Ht())))}:{success:!0,data:i.value}},Pm=rn(na),xm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return xo(e)(t,r,o)},Lm=e=>(t,r,n)=>xo(e)(t,r,n),$m=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Lo(e)(t,r,o)},Fm=e=>async(t,r,n)=>Lo(e)(t,r,n),Bm=e=>(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return tn(e)(t,r,o)},Um=e=>(t,r,n)=>tn(e)(t,r,n),Hm=e=>async(t,r,n)=>{const o=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return rn(e)(t,r,o)},zm=e=>async(t,r,n)=>rn(e)(t,r,n),Rm=/^[cC][^\s-]{8,}$/,jm=/^[0-9a-z]+$/,Wm=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qm=/^[0-9a-vA-V]{20}$/,Gm=/^[A-Za-z0-9]{27}$/,Vm=/^[a-zA-Z0-9_-]{21}$/,Zm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ym=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,oa=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Km=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Jm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Qm(){return new RegExp(Jm,"u")}const Xm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,e_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,t_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,r_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,n_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ia=/^[A-Za-z0-9_-]*$/,o_=/^\+[1-9]\d{6,14}$/,sa="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",i_=new RegExp(`^${sa}$`);function aa(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function s_(e){return new RegExp(`^${aa(e)}$`)}function a_(e){const t=aa({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${r.join("|")})`;return new RegExp(`^${sa}T(?:${n})$`)}const c_=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},l_=/^-?\d+$/,u_=/^-?\d+(?:\.\d+)?$/,d_=/^(?:true|false)$/i,f_=/^[^A-Z]*$/,p_=/^[^a-z]*$/,Re=A("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ca={number:"number",bigint:"bigint",object:"date"},la=A("$ZodCheckLessThan",(e,t)=>{Re.init(e,t);const r=ca[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ua=A("$ZodCheckGreaterThan",(e,t)=>{Re.init(e,t);const r=ca[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),m_=A("$ZodCheckMultipleOf",(e,t)=>{Re.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):gm(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),__=A("$ZodCheckNumberFormat",(e,t)=>{Re.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Em[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=l_)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),h_=A("$ZodCheckMaxLength",(e,t)=>{var r;Re.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Mo(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const s=Po(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),g_=A("$ZodCheckMinLength",(e,t)=>{var r;Re.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Mo(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const s=Po(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),y_=A("$ZodCheckLengthEquals",(e,t)=>{var r;Re.init(e,t),(r=e._zod.def).when??(r.when=n=>{const o=n.value;return!Mo(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length;if(i===t.length)return;const s=Po(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),nn=A("$ZodCheckStringFormat",(e,t)=>{var r,n;Re.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),b_=A("$ZodCheckRegex",(e,t)=>{nn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),v_=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=f_),nn.init(e,t)}),S_=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=p_),nn.init(e,t)}),E_=A("$ZodCheckIncludes",(e,t)=>{Re.init(e,t);const r=nr(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),w_=A("$ZodCheckStartsWith",(e,t)=>{Re.init(e,t);const r=new RegExp(`^${nr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),C_=A("$ZodCheckEndsWith",(e,t)=>{Re.init(e,t);const r=new RegExp(`.*${nr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),A_=A("$ZodCheckOverwrite",(e,t)=>{Re.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class T_{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
|
|
25
25
|
`).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(const s of i)this.content.push(s)}compile(){const t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
|
|
26
|
-
`))}}const
|
|
27
|
-
if (${
|
|
28
|
-
if (${
|
|
29
|
-
payload.issues = payload.issues.concat(${
|
|
26
|
+
`))}}const k_={major:4,minor:3,patch:6},Se=A("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=k_;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const o of n)for(const i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(s,a,c)=>{let l=or(s),d;for(const f of a){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(l)continue;const g=s.issues.length,h=f._zod.check(s);if(h instanceof Promise&&c?.async===!1)throw new rr;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=or(s,g)))});else{if(s.issues.length===g)continue;l||(l=or(s,g))}}return d?d.then(()=>s):s},i=(s,a,c)=>{if(or(s))return s.aborted=!0,s;const l=o(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new rr;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){const l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,a)):i(l,s,a)}const c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new rr;return c.then(l=>o(l,n,a))}return o(c,n,a)}}de(e,"~standard",()=>({validate:o=>{try{const i=Dm(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Pm(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),$o=A("$ZodString",(e,t)=>{Se.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??c_(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ye=A("$ZodStringFormat",(e,t)=>{nn.init(e,t),$o.init(e,t)}),N_=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ym),ye.init(e,t)}),I_=A("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=oa(n))}else t.pattern??(t.pattern=oa());ye.init(e,t)}),O_=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Km),ye.init(e,t)}),M_=A("$ZodURL",(e,t)=>{ye.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),D_=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Qm()),ye.init(e,t)}),P_=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Vm),ye.init(e,t)}),x_=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rm),ye.init(e,t)}),L_=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=jm),ye.init(e,t)}),$_=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Wm),ye.init(e,t)}),F_=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qm),ye.init(e,t)}),B_=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Gm),ye.init(e,t)}),U_=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=a_(t)),ye.init(e,t)}),H_=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=i_),ye.init(e,t)}),z_=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=s_(t)),ye.init(e,t)}),R_=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Zm),ye.init(e,t)}),j_=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Xm),ye.init(e,t),e._zod.bag.format="ipv4"}),W_=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=e_),ye.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),q_=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=t_),ye.init(e,t)}),G_=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=r_),ye.init(e,t),e._zod.check=r=>{const n=r.value.split("/");try{if(n.length!==2)throw new Error;const[o,i]=n;if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function da(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const V_=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=n_),ye.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{da(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Z_(e){if(!ia.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return da(r)}const Y_=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ia),ye.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Z_(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),K_=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=o_),ye.init(e,t)});function J_(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Q_=A("$ZodJWT",(e,t)=>{ye.init(e,t),e._zod.check=r=>{J_(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),fa=A("$ZodNumber",(e,t)=>{Se.init(e,t),e._zod.pattern=e._zod.bag.pattern??u_,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),X_=A("$ZodNumberFormat",(e,t)=>{__.init(e,t),fa.init(e,t)}),eh=A("$ZodBoolean",(e,t)=>{Se.init(e,t),e._zod.pattern=d_,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),th=A("$ZodUnknown",(e,t)=>{Se.init(e,t),e._zod.parse=r=>r}),rh=A("$ZodNever",(e,t)=>{Se.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function pa(e,t,r){e.issues.length&&t.issues.push(...ea(r,e.issues)),t.value[r]=e.value}const nh=A("$ZodArray",(e,t)=>{Se.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);const i=[];for(let s=0;s<o.length;s++){const a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(l=>pa(l,r,s))):pa(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function on(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...ea(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function ma(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const r=Sm(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function _a(e,t,r,n,o,i){const s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,d=c.optout==="optional";for(const f in t){if(a.has(f))continue;if(l==="never"){s.push(f);continue}const g=c.run({value:t[f],issues:[]},n);g instanceof Promise?e.push(g.then(h=>on(h,r,f,t,d))):on(g,r,f,t,d)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const oh=A("$ZodObject",(e,t)=>{if(Se.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const n=Oo(()=>ma(t));de(e._zod,"propValues",()=>{const a=t.shape,c={};for(const l in a){const d=a[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(const f of d.values)c[l].add(f)}}return c});const o=Xr,i=t.catchall;let s;e._zod.parse=(a,c)=>{s??(s=n.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};const d=[],f=s.shape;for(const g of s.keys){const h=f[g],b=h._zod.optout==="optional",T=h._zod.run({value:l[g],issues:[]},c);T instanceof Promise?d.push(T.then($=>on($,a,g,l,b))):on(T,a,g,l,b)}return i?_a(d,l,a,c,n.value,e):d.length?Promise.all(d).then(()=>a):a}}),ih=A("$ZodObjectJIT",(e,t)=>{oh.init(e,t);const r=e._zod.parse,n=Oo(()=>ma(t)),o=g=>{const h=new T_(["shape","payload","ctx"]),b=n.value,T=D=>{const U=Js(D);return`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`};h.write("const input = payload.value;");const $=Object.create(null);let O=0;for(const D of b.keys)$[D]=`key_${O++}`;h.write("const newResult = {};");for(const D of b.keys){const U=$[D],E=Js(D),R=g[D]?._zod?.optout==="optional";h.write(`const ${U} = ${T(D)};`),R?h.write(`
|
|
27
|
+
if (${U}.issues.length) {
|
|
28
|
+
if (${E} in input) {
|
|
29
|
+
payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
|
|
30
30
|
...iss,
|
|
31
|
-
path: iss.path ? [${
|
|
31
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
if (${
|
|
37
|
-
if (${
|
|
38
|
-
newResult[${
|
|
36
|
+
if (${U}.value === undefined) {
|
|
37
|
+
if (${E} in input) {
|
|
38
|
+
newResult[${E}] = undefined;
|
|
39
39
|
}
|
|
40
40
|
} else {
|
|
41
|
-
newResult[${
|
|
41
|
+
newResult[${E}] = ${U}.value;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
`):
|
|
45
|
-
if (${
|
|
46
|
-
payload.issues = payload.issues.concat(${
|
|
44
|
+
`):h.write(`
|
|
45
|
+
if (${U}.issues.length) {
|
|
46
|
+
payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
|
|
47
47
|
...iss,
|
|
48
|
-
path: iss.path ? [${
|
|
48
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
49
49
|
})));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
if (${
|
|
53
|
-
if (${
|
|
54
|
-
newResult[${
|
|
52
|
+
if (${U}.value === undefined) {
|
|
53
|
+
if (${E} in input) {
|
|
54
|
+
newResult[${E}] = undefined;
|
|
55
55
|
}
|
|
56
56
|
} else {
|
|
57
|
-
newResult[${
|
|
57
|
+
newResult[${E}] = ${U}.value;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
`)}m.write("payload.value = newResult;"),m.write("return payload;");const E=m.compile();return(D,R)=>E(h,D,R)};let i;const s=Qr,a=!qs.jitless,l=a&&dm.value,d=t.catchall;let f;e._zod.parse=(h,m)=>{f??(f=n.value);const g=h.value;return s(g)?a&&l&&m?.async===!1&&m.jitless!==!0?(i||(i=o(t.shape)),h=i(h,m),d?fa([],g,h,m,f,e):h):r(h,m):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function pa(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!nr(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Rt(s,n,Ut())))}),t)}const Q_=w("$ZodUnion",(e,t)=>{we.init(e,t),fe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),fe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),fe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),fe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Mo(i.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>pa(c,o,e,i)):pa(a,o,e,i)}}),X_=w("$ZodIntersection",(e,t)=>{we.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>ma(r,c,l)):ma(r,i,s)}});function $o(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(br(e)&&br(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(const i of n){const s=$o(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=$o(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ma(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);const i=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),nr(e))return e;const s=$o(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const eh=w("$ZodEnum",(e,t)=>{we.init(e,t);const r=Gs(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>fm.has(typeof o)).map(o=>typeof o=="string"?rr(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),th=w("$ZodLiteral",(e,t)=>{if(we.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?rr(n):n?rr(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),rh=w("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ws(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new tr;return r.value=o,r}});function _a(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ha=w("$ZodOptional",(e,t)=>{we.init(e,t),e._zod.optin="optional",e._zod.optout="optional",fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),fe(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Mo(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>_a(i,r.value)):_a(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),nh=w("$ZodExactOptional",(e,t)=>{ha.init(e,t),fe(e._zod,"values",()=>t.innerType._zod.values),fe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),oh=w("$ZodNullable",(e,t)=>{we.init(e,t),fe(e._zod,"optin",()=>t.innerType._zod.optin),fe(e._zod,"optout",()=>t.innerType._zod.optout),fe(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Mo(r.source)}|null)$`):void 0}),fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ih=w("$ZodDefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ga(i,t)):ga(o,t)}});function ga(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const sh=w("$ZodPrefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ah=w("$ZodNonOptional",(e,t)=>{we.init(e,t),fe(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ya(i,e)):ya(o,e)}});function ya(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const ch=w("$ZodCatch",(e,t)=>{we.init(e,t),fe(e._zod,"optin",()=>t.innerType._zod.optin),fe(e._zod,"optout",()=>t.innerType._zod.optout),fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Rt(s,n,Ut()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Rt(i,n,Ut()))},input:r.value}),r.issues=[]),r)}}),lh=w("$ZodPipe",(e,t)=>{we.init(e,t),fe(e._zod,"values",()=>t.in._zod.values),fe(e._zod,"optin",()=>t.in._zod.optin),fe(e._zod,"optout",()=>t.out._zod.optout),fe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>on(s,t.in,n)):on(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>on(i,t.out,n)):on(o,t.out,n)}});function on(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const uh=w("$ZodReadonly",(e,t)=>{we.init(e,t),fe(e._zod,"propValues",()=>t.innerType._zod.propValues),fe(e._zod,"values",()=>t.innerType._zod.values),fe(e._zod,"optin",()=>t.innerType?._zod?.optin),fe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(ba):ba(o)}});function ba(e){return e.value=Object.freeze(e.value),e}const dh=w("$ZodCustom",(e,t)=>{Re.init(e,t),we.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>va(i,r,n,e));va(o,r,n,e)}});function va(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(vr(o))}}var Sa;class fh{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function ph(){return new fh}(Sa=globalThis).__zod_globalRegistry??(Sa.__zod_globalRegistry=ph());const Sr=globalThis.__zod_globalRegistry;function mh(e,t){return new e({type:"string",...j(t)})}function _h(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...j(t)})}function Ea(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...j(t)})}function hh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...j(t)})}function gh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...j(t)})}function yh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...j(t)})}function bh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...j(t)})}function vh(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...j(t)})}function Sh(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...j(t)})}function Eh(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...j(t)})}function wh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...j(t)})}function Ch(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...j(t)})}function Ah(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...j(t)})}function Th(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...j(t)})}function kh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...j(t)})}function Ih(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...j(t)})}function Nh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...j(t)})}function Oh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...j(t)})}function Mh(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...j(t)})}function Dh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...j(t)})}function Ph(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...j(t)})}function Lh(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...j(t)})}function xh(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...j(t)})}function $h(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...j(t)})}function Fh(e,t){return new e({type:"string",format:"date",check:"string_format",...j(t)})}function Bh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...j(t)})}function Uh(e,t){return new e({type:"string",format:"duration",check:"string_format",...j(t)})}function Hh(e,t){return new e({type:"number",coerce:!0,checks:[],...j(t)})}function Rh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...j(t)})}function zh(e,t){return new e({type:"boolean",...j(t)})}function jh(e){return new e({type:"unknown"})}function Wh(e,t){return new e({type:"never",...j(t)})}function wa(e,t){return new sa({check:"less_than",...j(t),value:e,inclusive:!1})}function Fo(e,t){return new sa({check:"less_than",...j(t),value:e,inclusive:!0})}function Ca(e,t){return new aa({check:"greater_than",...j(t),value:e,inclusive:!1})}function Bo(e,t){return new aa({check:"greater_than",...j(t),value:e,inclusive:!0})}function Aa(e,t){return new s_({check:"multiple_of",...j(t),value:e})}function Ta(e,t){return new c_({check:"max_length",...j(t),maximum:e})}function sn(e,t){return new l_({check:"min_length",...j(t),minimum:e})}function ka(e,t){return new u_({check:"length_equals",...j(t),length:e})}function qh(e,t){return new d_({check:"string_format",format:"regex",...j(t),pattern:e})}function Gh(e){return new f_({check:"string_format",format:"lowercase",...j(e)})}function Zh(e){return new p_({check:"string_format",format:"uppercase",...j(e)})}function Vh(e,t){return new m_({check:"string_format",format:"includes",...j(t),includes:e})}function Yh(e,t){return new __({check:"string_format",format:"starts_with",...j(t),prefix:e})}function Kh(e,t){return new h_({check:"string_format",format:"ends_with",...j(t),suffix:e})}function or(e){return new g_({check:"overwrite",tx:e})}function Jh(e){return or(t=>t.normalize(e))}function Qh(){return or(e=>e.trim())}function Xh(){return or(e=>e.toLowerCase())}function eg(){return or(e=>e.toUpperCase())}function tg(){return or(e=>um(e))}function rg(e,t,r){return new e({type:"array",element:t,...j(r)})}function ng(e,t,r){return new e({type:"custom",check:"custom",fn:t,...j(r)})}function og(e){const t=ig(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(vr(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(vr(o))}},e(r.value,r)));return t}function ig(e,t){const r=new Re({check:"custom",...j(t)});return r._zod.check=e,r}function Ia(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Sr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Pe(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{const h=s.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,h,d)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),Pe(f,t,d),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&He(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Na(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,h=e.external.uri??(g=>g);if(f)return{ref:h(f)};const m=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=m,{defId:m,ref:`${h("__shared")}#/${a}/${m}`}}if(s[1]===r)return{ref:"#"};const l=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const d=a.schema;for(const f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
60
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const C=h.compile();return(D,U)=>C(g,D,U)};let i;const s=Xr,a=!Zs.jitless,l=a&&bm.value,d=t.catchall;let f;e._zod.parse=(g,h)=>{f??(f=n.value);const b=g.value;return s(b)?a&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=o(t.shape)),g=i(g,h),d?_a([],b,g,h,f,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),g)}});function ha(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!or(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>Rt(s,n,Ht())))}),t)}const sh=A("$ZodUnion",(e,t)=>{Se.init(e,t),de(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),de(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),de(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),de(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Do(i.source)).join("|")})$`)}});const r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(r)return n(o,i);let s=!1;const a=[];for(const c of t.options){const l=c._zod.run({value:o.value,issues:[]},i);if(l instanceof Promise)a.push(l),s=!0;else{if(l.issues.length===0)return l;a.push(l)}}return s?Promise.all(a).then(c=>ha(c,o,e,i)):ha(a,o,e,i)}}),ah=A("$ZodIntersection",(e,t)=>{Se.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>ga(r,c,l)):ga(r,i,s)}});function Fo(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(br(e)&&br(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(const i of n){const s=Fo(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=Fo(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ga(e,t,r){const n=new Map;let o;for(const a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).l=!0}else e.issues.push(a);for(const a of r.issues)if(a.code==="unrecognized_keys")for(const c of a.keys)n.has(c)||n.set(c,{}),n.get(c).r=!0;else e.issues.push(a);const i=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o&&e.issues.push({...o,keys:i}),or(e))return e;const s=Fo(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}const ch=A("$ZodEnum",(e,t)=>{Se.init(e,t);const r=Ys(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>vm.has(typeof o)).map(o=>typeof o=="string"?nr(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),lh=A("$ZodLiteral",(e,t)=>{if(Se.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?nr(n):n?nr(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),uh=A("$ZodTransform",(e,t)=>{Se.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Vs(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new rr;return r.value=o,r}});function ya(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ba=A("$ZodOptional",(e,t)=>{Se.init(e,t),e._zod.optin="optional",e._zod.optout="optional",de(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),de(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Do(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ya(i,r.value)):ya(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}}),dh=A("$ZodExactOptional",(e,t)=>{ba.init(e,t),de(e._zod,"values",()=>t.innerType._zod.values),de(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),fh=A("$ZodNullable",(e,t)=>{Se.init(e,t),de(e._zod,"optin",()=>t.innerType._zod.optin),de(e._zod,"optout",()=>t.innerType._zod.optout),de(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Do(r.source)}|null)$`):void 0}),de(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),ph=A("$ZodDefault",(e,t)=>{Se.init(e,t),e._zod.optin="optional",de(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>va(i,t)):va(o,t)}});function va(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const mh=A("$ZodPrefault",(e,t)=>{Se.init(e,t),e._zod.optin="optional",de(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),_h=A("$ZodNonOptional",(e,t)=>{Se.init(e,t),de(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>Sa(i,e)):Sa(o,e)}});function Sa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const hh=A("$ZodCatch",(e,t)=>{Se.init(e,t),de(e._zod,"optin",()=>t.innerType._zod.optin),de(e._zod,"optout",()=>t.innerType._zod.optout),de(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Rt(s,n,Ht()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Rt(i,n,Ht()))},input:r.value}),r.issues=[]),r)}}),gh=A("$ZodPipe",(e,t)=>{Se.init(e,t),de(e._zod,"values",()=>t.in._zod.values),de(e._zod,"optin",()=>t.in._zod.optin),de(e._zod,"optout",()=>t.out._zod.optout),de(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>sn(s,t.in,n)):sn(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>sn(i,t.out,n)):sn(o,t.out,n)}});function sn(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const yh=A("$ZodReadonly",(e,t)=>{Se.init(e,t),de(e._zod,"propValues",()=>t.innerType._zod.propValues),de(e._zod,"values",()=>t.innerType._zod.values),de(e._zod,"optin",()=>t.innerType?._zod?.optin),de(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Ea):Ea(o)}});function Ea(e){return e.value=Object.freeze(e.value),e}const bh=A("$ZodCustom",(e,t)=>{Re.init(e,t),Se.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>wa(i,r,n,e));wa(o,r,n,e)}});function wa(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(vr(o))}}var Ca;class vh{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const n={...this.get(r)??{}};delete n.id;const o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Sh(){return new vh}(Ca=globalThis).__zod_globalRegistry??(Ca.__zod_globalRegistry=Sh());const Sr=globalThis.__zod_globalRegistry;function Eh(e,t){return new e({type:"string",...z(t)})}function wh(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Aa(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function Ch(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function Ah(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function Th(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function kh(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function Nh(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function Ih(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function Oh(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function Mh(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function Dh(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function Ph(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function xh(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function Lh(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function $h(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function Fh(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function Bh(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function Uh(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function Hh(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function zh(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function Rh(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function jh(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}function Wh(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function qh(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Gh(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Vh(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Zh(e,t){return new e({type:"number",coerce:!0,checks:[],...z(t)})}function Yh(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function Kh(e,t){return new e({type:"boolean",...z(t)})}function Jh(e){return new e({type:"unknown"})}function Qh(e,t){return new e({type:"never",...z(t)})}function Ta(e,t){return new la({check:"less_than",...z(t),value:e,inclusive:!1})}function Bo(e,t){return new la({check:"less_than",...z(t),value:e,inclusive:!0})}function ka(e,t){return new ua({check:"greater_than",...z(t),value:e,inclusive:!1})}function Uo(e,t){return new ua({check:"greater_than",...z(t),value:e,inclusive:!0})}function Na(e,t){return new m_({check:"multiple_of",...z(t),value:e})}function Ia(e,t){return new h_({check:"max_length",...z(t),maximum:e})}function an(e,t){return new g_({check:"min_length",...z(t),minimum:e})}function Oa(e,t){return new y_({check:"length_equals",...z(t),length:e})}function Xh(e,t){return new b_({check:"string_format",format:"regex",...z(t),pattern:e})}function eg(e){return new v_({check:"string_format",format:"lowercase",...z(e)})}function tg(e){return new S_({check:"string_format",format:"uppercase",...z(e)})}function rg(e,t){return new E_({check:"string_format",format:"includes",...z(t),includes:e})}function ng(e,t){return new w_({check:"string_format",format:"starts_with",...z(t),prefix:e})}function og(e,t){return new C_({check:"string_format",format:"ends_with",...z(t),suffix:e})}function ir(e){return new A_({check:"overwrite",tx:e})}function ig(e){return ir(t=>t.normalize(e))}function sg(){return ir(e=>e.trim())}function ag(){return ir(e=>e.toLowerCase())}function cg(){return ir(e=>e.toUpperCase())}function lg(){return ir(e=>ym(e))}function ug(e,t,r){return new e({type:"array",element:t,...z(r)})}function dg(e,t,r){return new e({type:"custom",check:"custom",fn:t,...z(r)})}function fg(e){const t=pg(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(vr(n,r.value,t._zod.def));else{const o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(vr(o))}},e(r.value,r)));return t}function pg(e,t){const r=new Re({check:"custom",...z(t)});return r._zod.check=e,r}function Ma(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Sr,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function $e(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{const g=s.schema,h=t.processors[o.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);h(e,t,g,d)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),$e(f,t,d),t.seen.get(f).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&ze(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Da(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}const o=s=>{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const f=e.external.registry.get(s[0])?.id,g=e.external.uri??(b=>b);if(f)return{ref:g(f)};const h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${a}/${h}`}}if(s[1]===r)return{ref:"#"};const l=`#/${a}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:c,defId:l}=o(s);a.def={...a.schema},l&&(a.defId=l);const d=a.schema;for(const f in d)delete d[f];d.$ref=c};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
61
61
|
|
|
62
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Oa(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},d=a.ref;if(a.ref=null,d){n(d);const h=e.seen.get(d),m=h.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,l),s._zod.parent===d)for(const I in c)I==="$ref"||I==="allOf"||I in l||delete c[I];if(m.$ref&&h.def)for(const I in c)I==="$ref"||I==="allOf"||I in h.def&&JSON.stringify(c[I])===JSON.stringify(h.def[I])&&delete c[I]}const f=s._zod.parent;if(f&&f!==d){n(f);const h=e.seen.get(f);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const m in c)m==="$ref"||m==="allOf"||m in h.def&&JSON.stringify(c[m])===JSON.stringify(h.def[m])&&delete c[m]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())n(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,r.def??r.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:an(t,"input",e.processors),output:an(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function He(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return He(n.element,r);if(n.type==="set")return He(n.valueType,r);if(n.type==="lazy")return He(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return He(n.innerType,r);if(n.type==="intersection")return He(n.left,r)||He(n.right,r);if(n.type==="record"||n.type==="map")return He(n.keyType,r)||He(n.valueType,r);if(n.type==="pipe")return He(n.in,r)||He(n.out,r);if(n.type==="object"){for(const o in n.shape)if(He(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(He(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(He(o,r))return!0;return!!(n.rest&&He(n.rest,r))}return!1}const sg=(e,t={})=>r=>{const n=Ia({...r,processors:t});return Pe(e,n),Na(n,e),Oa(n,e)},an=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=Ia({...o??{},target:i,io:t,processors:r});return Pe(e,s),Na(s,e),Oa(s,e)},ag={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},cg=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=ag[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},lg=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l),typeof s=="number"&&(o.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},ug=(e,t,r,n)=>{r.type="boolean"},dg=(e,t,r,n)=>{r.not={}},fg=(e,t,r,n)=>{},pg=(e,t,r,n)=>{const o=e._zod.def,i=Gs(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},mg=(e,t,r,n)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},_g=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},hg=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},gg=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=Pe(i.element,t,{...n,path:[...n.path,"items"]})},yg=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=Pe(s[l],t,{...n,path:[...n.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Pe(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},bg=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>Pe(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},vg=(e,t,r,n)=>{const o=e._zod.def,i=Pe(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=Pe(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},Sg=(e,t,r,n)=>{const o=e._zod.def,i=Pe(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Eg=(e,t,r,n)=>{const o=e._zod.def;Pe(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},wg=(e,t,r,n)=>{const o=e._zod.def;Pe(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},Cg=(e,t,r,n)=>{const o=e._zod.def;Pe(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Ag=(e,t,r,n)=>{const o=e._zod.def;Pe(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Tg=(e,t,r,n)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Pe(i,t,n);const s=t.seen.get(e);s.ref=i},kg=(e,t,r,n)=>{const o=e._zod.def;Pe(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},Ma=(e,t,r,n)=>{const o=e._zod.def;Pe(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Ig=w("ZodISODateTime",(e,t)=>{M_.init(e,t),Se.init(e,t)});function Ng(e){return $h(Ig,e)}const Og=w("ZodISODate",(e,t)=>{D_.init(e,t),Se.init(e,t)});function Mg(e){return Fh(Og,e)}const Dg=w("ZodISOTime",(e,t)=>{P_.init(e,t),Se.init(e,t)});function Pg(e){return Bh(Dg,e)}const Lg=w("ZodISODuration",(e,t)=>{L_.init(e,t),Se.init(e,t)});function xg(e){return Uh(Lg,e)}const et=w("ZodError",(e,t)=>{Xs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>wm(e,r)},flatten:{value:r=>Em(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Io,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Io,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),$g=Po(et),Fg=Lo(et),Bg=en(et),Ug=tn(et),Hg=Tm(et),Rg=km(et),zg=Im(et),jg=Nm(et),Wg=Om(et),qg=Mm(et),Gg=Dm(et),Zg=Pm(et),Ce=w("ZodType",(e,t)=>(we.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:an(e,"input"),output:an(e,"output")}}),e.toJSONSchema=sg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(bt(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>vt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>$g(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Bg(e,r,n),e.parseAsync=async(r,n)=>Fg(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Ug(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Hg(e,r,n),e.decode=(r,n)=>Rg(e,r,n),e.encodeAsync=async(r,n)=>zg(e,r,n),e.decodeAsync=async(r,n)=>jg(e,r,n),e.safeEncode=(r,n)=>Wg(e,r,n),e.safeDecode=(r,n)=>qg(e,r,n),e.safeEncodeAsync=async(r,n)=>Gg(e,r,n),e.safeDecodeAsync=async(r,n)=>Zg(e,r,n),e.refine=(r,n)=>e.check(jy(r,n)),e.superRefine=r=>e.check(Wy(r)),e.overwrite=r=>e.check(or(r)),e.optional=()=>Ua(e),e.exactOptional=()=>Oy(e),e.nullable=()=>Ha(e),e.nullish=()=>Ua(Ha(e)),e.nonoptional=r=>$y(e,r),e.array=()=>by(e),e.or=r=>Fa([e,r]),e.and=r=>Cy(e,r),e.transform=r=>za(e,Iy(r)),e.default=r=>Py(e,r),e.prefault=r=>xy(e,r),e.catch=r=>By(e,r),e.pipe=r=>za(e,r),e.readonly=()=>Ry(e),e.describe=r=>{const n=e.clone();return Sr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Sr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Sr.get(e);const n=e.clone();return Sr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Da=w("_ZodString",(e,t)=>{xo.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(n,o,i)=>cg(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(qh(...n)),e.includes=(...n)=>e.check(Vh(...n)),e.startsWith=(...n)=>e.check(Yh(...n)),e.endsWith=(...n)=>e.check(Kh(...n)),e.min=(...n)=>e.check(sn(...n)),e.max=(...n)=>e.check(Ta(...n)),e.length=(...n)=>e.check(ka(...n)),e.nonempty=(...n)=>e.check(sn(1,...n)),e.lowercase=n=>e.check(Gh(n)),e.uppercase=n=>e.check(Zh(n)),e.trim=()=>e.check(Qh()),e.normalize=(...n)=>e.check(Jh(...n)),e.toLowerCase=()=>e.check(Xh()),e.toUpperCase=()=>e.check(eg()),e.slugify=()=>e.check(tg())}),Vg=w("ZodString",(e,t)=>{xo.init(e,t),Da.init(e,t),e.email=r=>e.check(_h(Yg,r)),e.url=r=>e.check(vh(Kg,r)),e.jwt=r=>e.check(xh(dy,r)),e.emoji=r=>e.check(Sh(Jg,r)),e.guid=r=>e.check(Ea(Pa,r)),e.uuid=r=>e.check(hh(cn,r)),e.uuidv4=r=>e.check(gh(cn,r)),e.uuidv6=r=>e.check(yh(cn,r)),e.uuidv7=r=>e.check(bh(cn,r)),e.nanoid=r=>e.check(Eh(Qg,r)),e.guid=r=>e.check(Ea(Pa,r)),e.cuid=r=>e.check(wh(Xg,r)),e.cuid2=r=>e.check(Ch(ey,r)),e.ulid=r=>e.check(Ah(ty,r)),e.base64=r=>e.check(Dh(cy,r)),e.base64url=r=>e.check(Ph(ly,r)),e.xid=r=>e.check(Th(ry,r)),e.ksuid=r=>e.check(kh(ny,r)),e.ipv4=r=>e.check(Ih(oy,r)),e.ipv6=r=>e.check(Nh(iy,r)),e.cidrv4=r=>e.check(Oh(sy,r)),e.cidrv6=r=>e.check(Mh(ay,r)),e.e164=r=>e.check(Lh(uy,r)),e.datetime=r=>e.check(Ng(r)),e.date=r=>e.check(Mg(r)),e.time=r=>e.check(Pg(r)),e.duration=r=>e.check(xg(r))});function St(e){return mh(Vg,e)}const Se=w("ZodStringFormat",(e,t)=>{ye.init(e,t),Da.init(e,t)}),Yg=w("ZodEmail",(e,t)=>{E_.init(e,t),Se.init(e,t)}),Pa=w("ZodGUID",(e,t)=>{v_.init(e,t),Se.init(e,t)}),cn=w("ZodUUID",(e,t)=>{S_.init(e,t),Se.init(e,t)}),Kg=w("ZodURL",(e,t)=>{w_.init(e,t),Se.init(e,t)}),Jg=w("ZodEmoji",(e,t)=>{C_.init(e,t),Se.init(e,t)}),Qg=w("ZodNanoID",(e,t)=>{A_.init(e,t),Se.init(e,t)}),Xg=w("ZodCUID",(e,t)=>{T_.init(e,t),Se.init(e,t)}),ey=w("ZodCUID2",(e,t)=>{k_.init(e,t),Se.init(e,t)}),ty=w("ZodULID",(e,t)=>{I_.init(e,t),Se.init(e,t)}),ry=w("ZodXID",(e,t)=>{N_.init(e,t),Se.init(e,t)}),ny=w("ZodKSUID",(e,t)=>{O_.init(e,t),Se.init(e,t)}),oy=w("ZodIPv4",(e,t)=>{x_.init(e,t),Se.init(e,t)}),iy=w("ZodIPv6",(e,t)=>{$_.init(e,t),Se.init(e,t)}),sy=w("ZodCIDRv4",(e,t)=>{F_.init(e,t),Se.init(e,t)}),ay=w("ZodCIDRv6",(e,t)=>{B_.init(e,t),Se.init(e,t)}),cy=w("ZodBase64",(e,t)=>{U_.init(e,t),Se.init(e,t)}),ly=w("ZodBase64URL",(e,t)=>{R_.init(e,t),Se.init(e,t)}),uy=w("ZodE164",(e,t)=>{z_.init(e,t),Se.init(e,t)}),dy=w("ZodJWT",(e,t)=>{W_.init(e,t),Se.init(e,t)}),La=w("ZodNumber",(e,t)=>{la.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(n,o,i)=>lg(e,n,o),e.gt=(n,o)=>e.check(Ca(n,o)),e.gte=(n,o)=>e.check(Bo(n,o)),e.min=(n,o)=>e.check(Bo(n,o)),e.lt=(n,o)=>e.check(wa(n,o)),e.lte=(n,o)=>e.check(Fo(n,o)),e.max=(n,o)=>e.check(Fo(n,o)),e.int=n=>e.check(xa(n)),e.safe=n=>e.check(xa(n)),e.positive=n=>e.check(Ca(0,n)),e.nonnegative=n=>e.check(Bo(0,n)),e.negative=n=>e.check(wa(0,n)),e.nonpositive=n=>e.check(Fo(0,n)),e.multipleOf=(n,o)=>e.check(Aa(n,o)),e.step=(n,o)=>e.check(Aa(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),fy=w("ZodNumberFormat",(e,t)=>{q_.init(e,t),La.init(e,t)});function xa(e){return Rh(fy,e)}const py=w("ZodBoolean",(e,t)=>{G_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ug(e,r,n)});function my(e){return zh(py,e)}const _y=w("ZodUnknown",(e,t)=>{Z_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fg()});function $a(){return jh(_y)}const hy=w("ZodNever",(e,t)=>{V_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dg(e,r,n)});function gy(e){return Wh(hy,e)}const yy=w("ZodArray",(e,t)=>{Y_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gg(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(sn(r,n)),e.nonempty=r=>e.check(sn(1,r)),e.max=(r,n)=>e.check(Ta(r,n)),e.length=(r,n)=>e.check(ka(r,n)),e.unwrap=()=>e.element});function by(e,t){return rg(yy,e,t)}const vy=w("ZodObject",(e,t)=>{J_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yg(e,r,n,o),fe(e,"shape",()=>t.shape),e.keyof=()=>ir(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:$a()}),e.loose=()=>e.clone({...e._zod.def,catchall:$a()}),e.strict=()=>e.clone({...e._zod.def,catchall:gy()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>gm(e,r),e.safeExtend=r=>ym(e,r),e.merge=r=>bm(e,r),e.pick=r=>_m(e,r),e.omit=r=>hm(e,r),e.partial=(...r)=>vm(Ba,e,r[0]),e.required=(...r)=>Sm(Ra,e,r[0])});function Sy(e,t){const r={type:"object",shape:e??{},...j(t)};return new vy(r)}const Ey=w("ZodUnion",(e,t)=>{Q_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bg(e,r,n,o),e.options=t.options});function Fa(e,t){return new Ey({type:"union",options:e,...j(t)})}const wy=w("ZodIntersection",(e,t)=>{X_.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vg(e,r,n,o)});function Cy(e,t){return new wy({type:"intersection",left:e,right:t})}const Uo=w("ZodEnum",(e,t)=>{eh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(n,o,i)=>pg(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Uo({...t,checks:[],...j(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Uo({...t,checks:[],...j(o),entries:i})}});function ir(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Uo({type:"enum",entries:r,...j(t)})}const Ay=w("ZodLiteral",(e,t)=>{th.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mg(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ty(e,t){return new Ay({type:"literal",values:Array.isArray(e)?e:[e],...j(t)})}const ky=w("ZodTransform",(e,t)=>{rh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hg(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ws(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(vr(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(vr(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Iy(e){return new ky({type:"transform",transform:e})}const Ba=w("ZodOptional",(e,t)=>{ha.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ma(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ua(e){return new Ba({type:"optional",innerType:e})}const Ny=w("ZodExactOptional",(e,t)=>{nh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ma(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Oy(e){return new Ny({type:"optional",innerType:e})}const My=w("ZodNullable",(e,t)=>{oh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ha(e){return new My({type:"nullable",innerType:e})}const Dy=w("ZodDefault",(e,t)=>{ih.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Py(e,t){return new Dy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ks(t)}})}const Ly=w("ZodPrefault",(e,t)=>{sh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function xy(e,t){return new Ly({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ks(t)}})}const Ra=w("ZodNonOptional",(e,t)=>{ah.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Eg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function $y(e,t){return new Ra({type:"nonoptional",innerType:e,...j(t)})}const Fy=w("ZodCatch",(e,t)=>{ch.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ag(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function By(e,t){return new Fy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Uy=w("ZodPipe",(e,t)=>{lh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tg(e,r,n,o),e.in=t.in,e.out=t.out});function za(e,t){return new Uy({type:"pipe",in:e,out:t})}const Hy=w("ZodReadonly",(e,t)=>{uh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ry(e){return new Hy({type:"readonly",innerType:e})}const zy=w("ZodCustom",(e,t)=>{dh.init(e,t),Ce.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_g(e,r)});function jy(e,t={}){return ng(zy,e,t)}function Wy(e){return og(e)}const Ho={custom:"custom"};function Ne(e){return Hh(La,e)}const qy=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],Gy=new Set([...qy,"is_corporation"]);Sy({additional_pip:ir(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:ir(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:ir(["Primary","Secondary"]),extended_medical:ir(["cov1000","cov10000"]),policy_pip_deductible:ir(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:my().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:Ho.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const Zy=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),Vy=new Set(["HomePolicy","BundlePolicy"]),Yy=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function ln(e){if(typeof e!="string"||!e.trim())return!1;const t=e.trim().toLowerCase();return t==="nj"||t==="n.j."||t==="n.j"||t==="new jersey"}function ja(e){return e?ln(e.state??e.State):!1}function un(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!ja(r):Gy.has(e)?!ja(r):e==="household_size"?!(t&&Zy.has(t)):e==="number_of_mortgagees"?!(t&&Vy.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&Yy.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:Ky.has(e)}const Ky=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),Wa=new Date().getUTCFullYear(),dn=St().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),qa=Fa([Ty(""),St().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),Jy=(e,t,r)=>Ne({error:`${e} must be a number.`}).min(t,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).max(r,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).int(`${e} must be a whole number.`),sr=(e,t)=>Ne({error:`${e} must be a number.`}).min(0,`${e} must be between 0 and ${t.toLocaleString()}.`).max(t,`${e} must be between 0 and ${t.toLocaleString()}.`).int(`${e} must be a whole number.`),fn=(e,t=1600)=>Ne({error:`${e} must be a valid 4-digit year.`}).int(`${e} must be a whole number.`).min(t,`${e} should be between ${t} and the current year.`).max(Wa,`${e} cannot be in the future.`),pn=e=>Ne({error:`${e} must be a number.`}).int(`${e} must be a whole number.`).min(0,`${e} must be between 0 and 99.`).max(99,`${e} must be between 0 and 99.`),Er=(e,t,r=0)=>{const n=Math.pow(10,t)-1,o=n.toLocaleString("en-US"),i=r.toLocaleString("en-US");return Ne({error:`${e} must be a number.`}).min(r,`${e}: Value must be between ${i} and ${o}.`).max(n,`${e}: Value must be between ${i} and ${o}.`).int(`${e} must be a whole number.`)},Qy={email:St().trim().min(1,"Required").email("Please enter a valid email address."),phone:St().trim().min(1,"Required").refine(e=>{let t=e.replace(/\D/g,"");return t.length===11&&t.startsWith("1")&&(t=t.slice(1)),t.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:St().trim().refine(e=>e===""||/^\d{3}-\d{2}-\d{4}$/.test(e),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:St().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:dn,last_name:dn,middle_name:qa,co_applicant_first_name:dn,co_applicant_last_name:dn,co_applicant_middle_name:qa,year_built:fn("Year built",1800),year_roof_updated:Ne({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:fn("Heating update year"),plumbing_update_year:fn("Plumbing update year"),electrical_update_year:fn("Electrical update year"),total_area_sq_ft:Jy("Square footage",1,999999),sale_price_cents:Ne({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:pn("Number of years with your prior carrier"),home_continuous_coverage_years:pn("How long you have had continuous home coverage"),household_size:Ne({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:Ne({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),dwelling_replacement_cost:Er("Replacement cost",9,1),other_structures_coverage:Er("Other structures",9),personal_property_coverage:Er("Personal property",7),loss_of_use_coverage:Er("Loss of use coverage",8),years_at_address:Ne({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:Ne({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:Ne({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:Ne({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:Ne({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(e=>e>=1&&e<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:Ne({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:Ne({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:Er("Amount paid",7),license_number:St().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:St().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:Ho.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:Ho.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:Ne({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:Ne({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:sr("Modifications value",9999999),cost_new_value_cents:sr("Cost new value",9999999),stated_value_amount_cents:sr("Stated Value Amount",9999999),property_damage_amount_paid_cents:sr("Property damage amount paid",9999999),personal_injury_amount_paid_cents:sr("Personal injury amount paid",9999999),auto_current_annual_premium_cents:sr("Current annual premium",9999999),auto_prior_years:pn("Years with prior auto carrier"),auto_prior_months:Ne({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:pn("Years with continuous auto coverage")};function Ae(e){return new Date(`${e}T00:00:00Z`)}function Le(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function Et(e,t){let r=t.getUTCFullYear()-e.getUTCFullYear();const n=t.getUTCMonth()-e.getUTCMonth();return(n<0||n===0&&t.getUTCDate()<e.getUTCDate())&&r--,r}const Ga=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!ln(e.state))return;const t=e.social_security_number;return(typeof t=="string"?t.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:e=>{const t=e.date_of_birth;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":Et(r,Le())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:e=>{const t=e.co_applicant_date_of_birth;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":Et(r,Le())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:e=>{const t=Number(e.year_roof_updated),r=Number(e.year_built);if(isNaN(t))return;const n=isNaN(r)?1e3:r;if(t<n||t>Wa)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:e=>{const t=e.move_in_date,r=e.year_built;if(!t||r==null)return;const n=Ae(String(t));if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:e=>{const t=e.date_first_licensed;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Le()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:e=>{const t=e.date_first_licensed,r=e.date_of_birth;if(!t||typeof t!="string"||!r||typeof r!="string")return;const n=Ae(r),o=Ae(t);if(isNaN(n.getTime())||isNaN(o.getTime()))return;if(o<n)return"Date licensed cannot be before driver date of birth.";const i=new Date(Date.UTC(n.getUTCFullYear()+16,n.getUTCMonth(),n.getUTCDate()));return o<i?"Driver must be at least 16 years old at the date first licensed.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:e=>{const t=e.occurred_at;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Le()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:e=>{const t=e.accident_prevention_course_date;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Le()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:e=>{const t=e.effective_date;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Le(),o=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+3,n.getUTCDate()));if(r<n)return"Insurance start date cannot be in the past.";if(r>o)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:e=>{const t=e.years_at_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Le());return n>i?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:e=>{const t=e.years_at_prior_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Le());return n>i?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:e=>{const t=e.home_prior_years,r=e.home_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:e=>{const t=e.home_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Le());return n>i?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.home_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Le());return n>i?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:e=>{const t=e.move_in_date;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Le()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:e=>{const t=e.date_of_incident;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Le();return r>n?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:e=>{const t=e.home_prior_expiration_date;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Le(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:e=>{const t=e.purchase_date;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Le()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:e=>{const t=e.purchase_date,r=e.year;if(!t||typeof t!="string"||r==null)return;const n=Ae(t);if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:e=>{const t=e.auto_prior_expiration_date;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Le(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:e=>{const t=e.auto_prior_years,r=e.auto_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:e=>{const t=e.auto_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Le());return n>i?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.auto_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Le());return n>i?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:e=>{const t=e.vehicle_coll_deductible,r=e.vehicle_comp_deductible;if(!(!t||typeof t!="string"||!r||typeof r!="string")&&r==="NoCoverage"&&t!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:e=>{const t=e.policy_um,r=e.policy_bi;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="Reject"||r==="Dontknow")return;const n=l=>l.endsWith("CSL"),o=n(t),i=n(r);if(o&&!i)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const s={cov30to60:30,cov50to100:50,cov100to100:100,cov100to300:100,cov250to500:250,cov300to300:300,cov500to500:500,cov100CSL:100,cov300CSL:300,cov500CSL:500},a=s[t],c=s[r];if(a!=null&&c!=null&&a>c)return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:e=>{const t=e.policy_umpd,r=e.policy_pd;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="NoCoverage"||r==="Dontknow")return;const n=s=>{if(!s.startsWith("cov"))return null;const a=parseInt(s.replace("cov",""),10);return isNaN(a)?null:a},o=n(t),i=n(r);if(o!=null&&i!=null&&o>i)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:e=>{const t=e.custom_equipment_value_cents,r=e.stated_value_amount_cents;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o))&&o>0&&n>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function Ro(e,t){const r=Qy[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function Za(e){if(/\s/.test(e))return!1;const t=e.trim();return t.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(t)}function Xy(e,t){const r={};for(const n of Ga){if(t?.has(n.targetKey))continue;const o=n.validate(e);o&&(r[n.targetKey]=o)}return r}function zo(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function wt(e,t){return e.key??`${zo(e.question)}-${t}`}function at(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function wr(e,t){const r={};e.forEach((s,a)=>{const c=wt(s,a),l=t[c];if(s.required&&at(l,s.inputType)){r[c]="Required";return}if(!at(l,s.inputType)){const d=Ro(c,l);if(d){r[c]=d;return}}});const n={...t};e.forEach((s,a)=>{const c=wt(s,a);c in n||(n[c]="")});const o=new Set(Object.keys(r).filter(s=>r[s])),i=Xy(n,o);for(const[s,a]of Object.entries(i))r[s]=a;return r}function e0(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const t0={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},r0={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},n0={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},o0={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},i0={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},s0={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},a0={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},c0={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},l0={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},u0={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},d0={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},f0={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},p0={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},jo={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},m0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],_0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],Wo={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},h0=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],Va={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},g0=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],y0=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],Ya={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},b0={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},v0={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},S0={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},E0={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},w0={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},C0={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},A0={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},T0={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},k0={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},I0={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},N0={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},O0={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},M0={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},D0={AboveGround:"Above Ground",BelowGround:"Below Ground"},P0={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},L0={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},x0={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},$0={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},F0={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},B0={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},U0={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},H0={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},Ka={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Ja={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},Qa={Female:"Female",Male:"Male"},Xa={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},R0={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},z0={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},j0={Primary:"Primary",Secondary:"Secondary"},W0={cov1000:"$1,000",cov10000:"$10,000"},q0={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},G0={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},Z0={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},V0={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},ec=Z0,tc=V0;function qo(e,t){if(typeof e!="string")return e;const r=e.trim();if(!r)return e;if(t[r])return r;const n=r.toLowerCase();return Object.keys(t).find(i=>i.toLowerCase()===n||t[i]?.toLowerCase()===n)??e}function mn(e){return qo(e,Xa)}function rc(e){return qo(e,Ya)}function nc(e){return qo(e,tc)}function Y0(e){return e.trim().toLowerCase()}function oc(e){if(typeof e!="string")return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const r=Number(t[1]),n=Number(t[2]),o=Number(t[3]);if(!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(o)||n<1||n>12||o<1||o>31)return null;const i=new Date(Date.UTC(r,n-1,o));return i.getUTCFullYear()!==r||i.getUTCMonth()!==n-1||i.getUTCDate()!==o?null:i.getTime()}function ar(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=oc(e[t.expirationDateKey]),n=oc(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const K0=new Set(["HomePolicy","BundlePolicy"]);function _n(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!K0.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function Go(e){let t=null,r=null,n=null;const o=new Set,i=new Set,s=c=>{const l=String(c.key??""),d=Y0(String(c.question??""));!t&&(l==="auto_prior_carrier_name"||l==="home_prior_carrier_name"||d.includes("current auto insurance company"))&&(t=l),!r&&(l==="effective_date"||d.includes("when do you need your insurance to begin"))&&(r=l),!n&&(l==="auto_prior_expiration_date"||l==="home_prior_expiration_date"||d.includes("when does the current policy expire"))&&(n=l),(l==="auto_reason_for_no_insurance"||d.includes("reason you are not currently insured")||d.includes("reason for lapse in coverage"))&&o.add(l),(l==="auto_prior_years"||l==="auto_prior_months"||l==="auto_continuous_coverage_years"||l==="auto_prior_expiration_date"||l==="auto_current_annual_premium_cents"||l==="auto_prior_liability_limit")&&i.add(l)};e.forEach(s);const a=c=>{c.forEach(l=>{(l.conditionals??[]).forEach(d=>{const f=d.conditionalQuestions??[];f.forEach(s),a(f)})})};return a(e),{currentCarrierKey:t,effectiveDateKey:r,expirationDateKey:n,noInsuranceReasonKeys:o,hideWhenNoPriorInsuranceKeys:i}}function Cr(e,t){return t.currentCarrierKey==="home_prior_carrier_name"&&e.home_prior_carrier_name==="NoPriorInsurance"&&e.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(t.currentCarrierKey?e[t.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!t.effectiveDateKey||!t.expirationDateKey||t.expirationDateKey==="home_prior_expiration_date"&&ar(e,t)?!1:ar(e,t)}function hn(e,t,r){const n=String(e.key??"");if(r.noInsuranceReasonKeys.has(n)&&r.currentCarrierKey==="home_prior_carrier_name"&&t.home_prior_carrier_name==="NoPriorInsurance"&&t.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const i=(r.currentCarrierKey?t[r.currentCarrierKey]:void 0)==="NoPriorInsurance";return i&&r.hideWhenNoPriorInsuranceKeys.has(n)?!1:!r.noInsuranceReasonKeys.has(n)||i?!0:Cr(t,r)}function gn(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const J0=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],Zo="credify_quote_id",Vo="credify_auth_token";function ic(e){try{localStorage.setItem(Zo,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function yn(){try{return localStorage.getItem(Zo)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function sc(){try{localStorage.removeItem(Zo)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function Q0(e){try{localStorage.setItem(Vo,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function X0(){try{return localStorage.getItem(Vo)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function ac(){try{localStorage.removeItem(Vo)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function eb(){sc(),ac()}const tb="credify-insurance-widget",rb="1.0",cc=25,lc=64*1024,nb=`
|
|
63
|
-
…[truncated]`;let uc=!1,dc=null,fc="",pc=cc,Yo=lc,Ar=[];function ob(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function ib(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function mc(e){if(!e)return[];const t=[];if(Array.isArray(e))for(const[r,n]of e)t.push({name:r,value:String(n)});else if(typeof e.forEach=="function")e.forEach((r,n)=>t.push({name:n,value:r}));else for(const[r,n]of Object.entries(e))t.push({name:r,value:String(n)});return t}function sb(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function ab(e,t){const r=t?.body;return typeof r!="string"||r.length===0?void 0:{mimeType:e.find(o=>o.name.toLowerCase()==="content-type")?.value??"application/json",text:r}}function cb(e){const t=e.length;return t<=Yo?{text:e,size:t}:{text:e.slice(0,Yo)+nb,size:t}}function lb(e){Ar.push(e),Ar.length>pc&&Ar.shift()}function ub(e){if(uc)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;fc=e.baseUrl,pc=e.maxEntries??cc,Yo=e.maxBodyBytes??lc,dc=window.fetch.bind(window);const t=dc;return window.fetch=async(r,n)=>{let o;try{o=ob(r)}catch{return t(r,n)}if(!o.startsWith(fc))return t(r,n);const i=mc(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),s={startedDateTime:new Date().toISOString(),time:-1,request:{method:ib(r,n),url:o,httpVersion:"HTTP/1.1",headers:i,queryString:sb(o),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:ab(i,n)},response:db(),cache:{},timings:{send:0,wait:-1,receive:0}};lb(s);const a=typeof performance<"u"?performance.now():0;let c;try{c=await t(r,n)}catch(d){const f=(typeof performance<"u"?performance.now():0)-a;throw s.time=Math.round(f),s.timings.wait=Math.round(f),s.response._error=d instanceof Error?d.message:String(d),d}const l=(typeof performance<"u"?performance.now():0)-a;s.time=Math.round(l),s.timings.wait=Math.round(l),s.response.status=c.status,s.response.statusText=c.statusText,s.response.headers=mc(c.headers),s.response.content.mimeType=typeof c.headers?.get=="function"&&c.headers.get("content-type")||"";try{c.clone().text().then(f=>{const{text:h,size:m}=cb(f);s.response.content.text=h,s.response.content.size=m,s.response.bodySize=m}).catch(()=>{})}catch{}return c},uc=!0,!0}function db(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function fb(){return{log:{version:"1.2",creator:{name:tb,version:rb},entries:Ar.map(e=>({...e}))}}}function pb(){return Ar.length}const mb=[/ssn/i,/social.?security/i,/(driver.?licen[cs]e|^dln$|^dl$)/i,/(date.?of.?birth|^dob$)/i,/^vin$/i,/(sms.?code|^otp$|^code$|verification.?code)/i,/phone/i,/^email$/i,/(first.?name|last.?name|full.?name)/i,/(^address$|street|^zip$|postal)/i,/(jwt|^token$|authorization|^auth$|api.?key|secret|password|credential)/i,/cookie/i],_b=[/\b\d{3}-?\d{2}-?\d{4}\b/g,/\b[A-HJ-NPR-Z0-9]{17}\b/g,/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,/\bsk_[A-Za-z0-9]{16,}\b/g,/\bBearer\s+[A-Za-z0-9._-]+/gi],Ct="[REDACTED]",hb=8;function bn(e){for(const t of mb)if(t.test(e))return!0;return!1}function At(e){let t=e;for(const r of _b)t=t.replace(r,Ct);return t}function Tt(e,t=0,r=new WeakSet){if(t>hb)return Ct;if(e==null)return e;if(typeof e=="string")return At(e);if(typeof e!="object")return e;if(r.has(e))return Ct;if(r.add(e),Array.isArray(e))return e.map(i=>Tt(i,t+1,r));const n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)return e;const o={};for(const[i,s]of Object.entries(e)){if(bn(i)){o[i]=Ct;continue}o[i]=Tt(s,t+1,r)}return o}function _c(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=Tt(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=Ct),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))bn(r)&&(t[r]=Ct)}if(e.extra&&(e.extra=Tt(e.extra)),e.contexts&&(e.contexts=Tt(e.contexts)),e.tags&&(e.tags=Tt(e.tags)),e.user){const{id:t,email:r,username:n}=e.user;e.user={...typeof t=="string"?{id:t}:{},...typeof r=="string"?{email:r}:{},...typeof n=="string"?{username:n}:{}}}if(Array.isArray(e.breadcrumbs))for(const t of e.breadcrumbs)t.data!==void 0&&(t.data=Tt(t.data)),typeof t.message=="string"&&(t.message=At(t.message));return typeof e.message=="string"&&(e.message=At(e.message)),e}function hc(e){for(const t of e)t.value=bn(t.name)?Ct:At(t.value)}function gc(e){try{return JSON.stringify(Tt(JSON.parse(e)))}catch{return At(e)}}function gb(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){hc(r.request.headers),hc(r.response.headers);for(const n of r.request.queryString)n.value=bn(n.name)?Ct:At(n.value);r.request.postData?.text&&(r.request.postData.text=gc(r.request.postData.text)),r.response.content.text&&(r.response.content.text=gc(r.response.content.text)),r.request.url=At(r.request.url),r.response._error&&(r.response._error=At(r.response._error))}return t}function cr(e,t={}){try{Xn(r=>{r.setTag("failure_type","quote"),t.stage&&r.setTag("stage",t.stage),t.quoteId&&r.setTag("quote_id",t.quoteId),t.phase&&r.setTag("phase",t.phase),t.endpoint&&r.setTag("endpoint",t.endpoint),typeof t.statusCode=="number"&&r.setTag("status_code",String(t.statusCode));try{pb()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(gb(fb())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");Gr(n)})}catch{}}const Fe="https://api.getcredify.com";let lr=null;const yb=6e4,yc=new Map;function bb(e){try{return new URL(e).pathname}catch{return e}}function bc(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const i=bb(t),s=`${i}:${r}`,a=Date.now(),c=yc.get(s);c&&a-c<yb||(yc.set(s,a),cr(e,{phase:"api_request",endpoint:i,statusCode:r}))}function Ko(e){lr=e,Q0(e)}function zt(){return lr}function Jo(){const e=X0();e&&(lr=e)}function vc(){lr=null,ac()}async function Ge(e,t){const r={"Content-Type":"application/json"};lr&&(r.Authorization=`Bearer ${lr}`);let n;try{n=await fetch(e,{method:"POST",headers:r,body:JSON.stringify(t)})}catch(o){const i=o instanceof Error?o:new Error(String(o));throw bc(i,e,0),o}if(!n.ok){let o=`Request failed with status ${n.status}`;try{o=(await n.json()).error||o}catch{o=n.statusText||o}const i=new Error(o);throw i.statusCode=n.status,bc(i,e,n.status),i}return n}async function vb(e){try{return await e.json()}catch{return{}}}async function Sb(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await Ge(`${Fe}/get-questions-by-stage`,r)).json()}async function vn(e){const t=e?{quoteId:e}:{};return await(await Ge(`${Fe}/get-stages-for-quote`,t)).json()}async function Eb(e,t=!1){const r=t?{postal_code:e,is_test:!0}:{postal_code:e},o=await(await Ge(`${Fe}/create-quote`,r)).json();if(!o||typeof o!="object"||!o.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(o)}`);return o}async function wb(e,t){return await(await Ge(`${Fe}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function jt(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const o=await Ge(`${Fe}/update-quote`,n),i=await vb(o);return!i||typeof i!="object"||!("status"in i)||i.status==null?{status:"success"}:i}async function Sc(e,t){return await(await Ge(`${Fe}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function Cb(e){return await(await Ge(`${Fe}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function Ec(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await Ge(`${Fe}/is-supported-state`,r)).json()}async function Qo(){return await(await Ge(`${Fe}/get-rates`,{})).json()}async function wc(e){const t=e?{quoteId:e}:{};return await(await Ge(`${Fe}/get-quote`,t)).json()}async function Cc(e){return(await Ge(`${Fe}/get-vehicle-options`,e)).json()}async function Ab(e){return(await Ge(`${Fe}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function Tb(e,t){const n=await(await Ge(`${Fe}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const Xo=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),kb={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},Ac={auto_prior_carrier_name:t0,auto_prior_liability_limit:i0,auto_reason_for_no_insurance:s0,residence_type:r0,home_prior_carrier_name:n0,policy_bi:a0,policy_um:c0,policy_pd:l0,policy_mp:u0,policy_umpd:d0,policy_pip:f0,policy_auto_death_indemnity:p0,vehicle_comp_deductible:jo,vehicle_coll_deductible:jo,vehicle_towing_and_labor:Wo,vehicle_transportation_expense:Va,education_level:Ya,industry:Xa,occupation:tc,usage:o0,architectural_style:b0,dwelling_type:v0,occupancy_type:S0,construction_quality:E0,construction_type:w0,foundation_type:C0,located_over_water:A0,number_of_stories:T0,exterior_wall_type:k0,roof_material_type:I0,roof_shape:N0,roof_updated_type:O0,heating_type:M0,oil_tank_location:D0,basement_type:P0,plumbing_type:L0,personal_liability:x0,dwelling_medical_payments:$0,all_perils_deductible:F0,windstorm_deductible:B0,distance_from_fire_hydrant_ft:U0,distance_from_fire_station_miles:H0,employment_industry:Ka,marital_status:Ja,gender:Qa,co_applicant_employment_industry:Ka,co_applicant_marital_status:Ja,co_applicant_gender:Qa,description:R0,tort_threshold:z0,pip_coverage_type:j0,extended_medical:W0,additional_pip:q0,policy_pip_deductible:G0},Ib=["OTHER / NOT LISTED"],Nb=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],Ob=["Other"];function Ze(e){const t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}function Tc(e){const t=e.replace(/\D+/g,"");if(t!=="")return e0(t)}function Mb(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const Db={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:7,amount_paid_cents:7,loss_of_use_coverage:8,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},kc=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),Pb=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),Sn={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},Lb={license_number:20};function xb(e){const t=new Date,r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));if(e==="effective_date"){const n=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+3,r.getUTCDate()));return{min:Ze(r),max:Ze(n)}}if(e==="home_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:Ze(n),max:Ze(o)}}if(e==="date_of_incident")return{max:Ze(r)};if(e==="move_in_date")return{max:Ze(r)};if(e==="purchase_date")return{max:Ze(r)};if(e==="date_of_birth")return{max:Ze(r)};if(e==="date_first_licensed")return{max:Ze(r)};if(e==="occurred_at")return{max:Ze(r)};if(e==="accident_prevention_course_date")return{max:Ze(r)};if(e==="auto_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:Ze(n),max:Ze(o)}}return{}}const $b=new Set(["Disabled","Retired","Unemployed","Other"]);function ei(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const o=xe(t,r,"industry"),i=xe(t,r,"employment_industry"),s=String(o??i??"").trim();return!$b.has(s)}function ti(e,t,r,n){return un(e,n,r)}function En(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function Ic(e,t){return En(e)?"Yes":t}function Nc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Oc(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function Mc(e,t){const r=Nc(e),n=Nc(t);if(r!=null&&n!=null)return r-n;const o=Oc(e),i=Oc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Fb(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function Tr(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Mc(e,r);return n!=null&&n<0}case"greaterThan":{const n=Mc(e,r);return n!=null&&n>0}case"contains":return Fb(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}function kr(e,t){return t.reduce((r,n)=>r?.[n],e)}function tt(e,t,r){if(t.length===0)return e;const[n,...o]=t;if(o.length===0){if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=r,l}return{...e,[n]:r}}const i=e?.[n],s=typeof o[0]=="number"?Array.isArray(i)?i:[]:i&&typeof i=="object"?i:{},a=tt(s,o,r);if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=a,l}return{...e,[n]:a}}function xe(e,t,r){return kr(e,[...t??[],r])}function Be(e,t,r,n){return tt(e,[...t??[],r],n)}function Bb(e,t){return e?.length?`${e.join("-")}-${t}`:t}const Ub="__items",wn=e=>`${e}${Ub}`;function ze(e){return e==null?"":typeof e=="string"?e:String(e)}function Dc(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function Hb(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function Pc({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:o,quoteId:i,widgetStageKey:s,invalidValueKeys:a,fetchVehicleOptions:c}){const l=_.useMemo(()=>c??(v=>Cc({quoteId:i,...v})),[c,i]),d=_.useMemo(()=>ko(e),[e]),f=_.useMemo(()=>Go(d),[d]),h=_.useMemo(()=>s==="BundlePolicy"?!0:d.some(v=>String(v.key)==="home_prior_carrier_name")&&d.some(v=>String(v.key)==="driver_vehicle_assignments"),[s,d]),m=_.useMemo(()=>{const v={};return t&&Object.assign(v,t),v},[t]),[g,I]=_.useState(m);_.useEffect(()=>{I(m)},[m]);const[H,M]=_.useState({}),E=_.useMemo(()=>({...H,...r??g}),[H,r,g]);_.useEffect(()=>{r&&M(v=>({...v,...r}))},[r]);const[D,R]=_.useState({}),C=_.useRef(new Map),P=_.useRef(new Set),[,z]=_.useState({}),[B,ee]=_.useState({}),Q=_.useRef(!1);_.useEffect(()=>{!i||Q.current||!d.some(y=>y.key==="year"||y.key==="make"||y.key==="model"||y.key==="body_style")||(Q.current=!0,l({}).catch(()=>{}))},[i,d,l]);const[ne,_e]=_.useState({}),[$e,Ee]=_.useState({}),oe=_.useCallback(async(v,y)=>{if(!i||!Za(y))return;const p=v?v.join("-"):"_root";_e(S=>({...S,[p]:!0})),Ee(S=>({...S,[p]:null}));try{const S=await Ab({quoteId:i,vin:y});if(S.error){Ee(A=>({...A,[p]:S.error}));return}let b=E;S.year&&(b=Be(b,v,"year",String(S.year))),S.make&&(b=Be(b,v,"make",S.make)),S.model&&(b=Be(b,v,"model",S.model)),S.bodyStyle&&(b=Be(b,v,"body_style",S.bodyStyle)),r&&n?n(b):I(b),M(b),C.current.clear(),P.current.clear(),z({})}catch{Ee(S=>({...S,[p]:"VIN lookup failed — please enter vehicle details manually"}))}finally{_e(S=>({...S,[p]:!1}))}},[i,E,r,n]),K=_.useCallback(v=>{const y=`${v.year}|${v.make??""}|${v.model??""}`,p=v.model?"bodyStyles":v.make?"models":"makes",S=C.current.get(y);return S?S[p]??[]:void 0},[]),U=_.useCallback((v,y)=>{if(!i)return;const p=`${y.year}|${y.make??""}|${y.model??""}`,S=y.model?"bodyStyles":y.make?"models":"makes",b=`${v}:${S}`;C.current.has(p)||P.current.has(p)||(P.current.add(p),ee(A=>({...A,[b]:!0})),l(y).then(A=>{C.current.set(p,A),z($=>({...$,[b]:A[S]??[]}))}).catch(()=>{C.current.set(p,{}),z(A=>({...A,[b]:[]}))}).finally(()=>{P.current.delete(p),ee(A=>({...A,[b]:!1}))}))},[i,l]);function Y(v,y,p){const S=E,b=v?kr(E,v)??{}:S;return v?{state:S.state,...b,[y]:p}:{...b,[y]:p}}function de(v,y){const p=Ga.filter(b=>b.targetKey===v||b.dependsOn.includes(v)),S={[v]:void 0};for(const b of p){const A=b.validate(y);b.targetKey in S?A!==void 0&&(S[b.targetKey]=A):S[b.targetKey]=A}R(b=>({...b,...S}))}const N=(v,y,p)=>{const S=xe(E,p,v);if(at(S,y)){D[v]&&R(A=>({...A,[v]:void 0}));return}const b=Ro(v,S);if(b){R(A=>({...A,[v]:b}));return}de(v,Y(p,v,S))};_.useEffect(()=>{let v=E,y=!1;d.forEach(p=>{if(!En(p))return;const S=String(p.key);xe(v,void 0,S)!=="Yes"&&(v=Be(v,void 0,S,"Yes"),y=!0)}),y&&(r&&n?n(v):I(v),M(v))},[d,E,r,n]);function J(v,y){const p=v.key;if((p==="relationship_to_insured"||p==="is_registered_owner")&&y){const T=y[y.length-1];if(typeof T=="number"&&T===0)return null}if((p==="purchase_date"||p==="cost_new_value_cents")&&y)return null;if(p==="custom_equipment_value_cents"&&y){const T=xe(E,y,"vehicle_has_modifications");if(T!=="Yes"&&T!==!0)return null}const S=p==="auto_reason_for_no_insurance"&&f.currentCarrierKey?E[f.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":v.question,b=v.hint,A=xe(E,y,p),$=gn(v,f)?Cr(E,f):p==="social_security_number"&&ln(E.state??E.State)?!0:v.required,V=D[p],F=T=>{let k=Be(E,y,p,T);if(v.inputType==="radio"&&v.conditionals){const O=v.conditionals??[];for(const Z of O){const re=xe(E,y,p),ce=Tr(re,Z.conditionalType,Z.conditionalValue),be=Tr(T,Z.conditionalType,Z.conditionalValue);if(ce&&!be&&Z.conditionalQuestionsAllowMultiple){const se=Z.conditionalQuestions??[];if(se.length>0){const ie=wn(p);k=tt(k,[...y??[],ie],[]);const W=(me,he)=>{me.forEach(Oe=>{(Oe.conditionals??[]).forEach(Te=>{if(Te.conditionalQuestionsAllowMultiple){const ve=wn(Oe.key);k=tt(k,[...he,ve],[])}const Ve=Te.conditionalQuestions??[];Ve.length>0&&W(Ve,he)})})};W(se,[...y??[],ie])}}}}r&&n?n(k):I(k),M(k)};if(p==="vehicle_policy_selections"){const T=E.vehicles__items??[],k=E.drivers__items??[];if(T.length===0)return u.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},p);const O=E.driver_vehicle_assignments??{},Z=k.length>1,re=ve=>Object.entries(ve).map(([le,Me])=>({value:le,label:Me})),ce=ln(E.state??E.State),be=(ve,le)=>Object.fromEntries(ve.filter(Me=>Me in le).map(Me=>[Me,le[Me]])),ie=re(be(ce?m0:_0,jo)),W=ce?be(h0,Wo):Wo,me=re(W),Oe=re(be(ce?g0:y0,Va)),ke=(ve,le,Me)=>{const De=tt(E,["vehicles__items",ve,le],Me);r&&n?n(De):I(De),M(De)},Te=(ve,le,Me)=>{const De={...O},Ye=`v${ve}`;De[Ye]={...De[Ye]??{}},De[Ye][`d${le}`]=Me;const ge=tt(E,["driver_vehicle_assignments"],De);r&&n?n(ge):I(ge),M(ge)},Ve=ve=>{if(!Z)return null;const le=O[`v${ve}`];if(!le)return null;const Me=k.map((ge,ct)=>le[`d${ct}`]??0),De=Me.filter(ge=>ge>0);if(De.length>=2&&De.every(ge=>ge===De[0])&&De[0]===50)return`Assignments for Vehicle ${ve+1} cannot be 50 percent for both Drivers.`;const Ye=Me.reduce((ge,ct)=>ge+ct,0);return Ye>0&&Ye!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Ye}%).`:null};return u.jsx("div",{children:T.map((ve,le)=>{const Me=[ve.year,ve.make,ve.model].filter(Boolean).join(" ")||`Vehicle ${le+1}`,De=Ve(le),Ye=ge=>typeof ve[ge]=="string"?ve[ge]:"";return u.jsxs("fieldset",{style:{border:`1px solid ${De?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[u.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:Me}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[u.jsx(yr,{id:`veh-${le}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:ie,value:Ye("vehicle_comp_deductible"),onChange:ge=>ke(le,"vehicle_comp_deductible",ge.currentTarget.value)}),u.jsx(yr,{id:`veh-${le}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:ie,value:Ye("vehicle_coll_deductible"),onChange:ge=>ke(le,"vehicle_coll_deductible",ge.currentTarget.value)}),u.jsx(yr,{id:`veh-${le}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:me,value:Ye("vehicle_towing_and_labor"),onChange:ge=>ke(le,"vehicle_towing_and_labor",ge.currentTarget.value)}),u.jsx(yr,{id:`veh-${le}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:Oe,value:Ye("vehicle_transportation_expense"),onChange:ge=>ke(le,"vehicle_transportation_expense",ge.currentTarget.value)})]}),Z&&u.jsxs("div",{style:{marginTop:"16px"},children:[u.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:k.map((ge,ct)=>{const _i=[ge.first_name,ge.last_name].filter(Boolean).join(" ")||`Driver ${ct+1}`,it=O[`v${le}`]?.[`d${ct}`];return u.jsx("div",{style:{flex:"0 0 140px"},children:u.jsx(Co,{id:`assignment-v${le}-d${ct}`,label:`${_i} %`,value:it??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Mr=>{const It=Mr.currentTarget.value.replace(/\D+/g,"");Te(le,ct,It===""?0:Math.min(100,parseInt(It,10)))}})},`${le}-${ct}`)})}),De&&u.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:De})]})]},le)})},p)}if(p==="driver_vehicle_assignments"){const T=E.vehicles__items??[],k=E.drivers__items??[];if(h&&k.length<=1)return null;if(T.length===0||k.length===0)return u.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},p);const O=E.driver_vehicle_assignments??{},Z=(ce,be,se)=>{const ie={...O},W=`v${ce}`;ie[W]={...ie[W]??{}},ie[W][`d${be}`]=se,F(ie)},re=ce=>{if(k.length<2)return null;const be=O[`v${ce}`];if(!be)return null;const se=k.map((me,he)=>be[`d${he}`]??0),ie=se.filter(me=>me>0);if(ie.length>=2&&ie.every(me=>me===ie[0])&&ie[0]===50)return`Assignments for Vehicle ${ce+1} cannot be 50 percent for both Drivers.`;const W=se.reduce((me,he)=>me+he,0);return W>0&&W!==100?`Driver percentages for this vehicle must add up to 100% (currently ${W}%).`:null};return u.jsxs("div",{children:[u.jsx("h4",{style:{marginBottom:"12px"},children:S}),T.map((ce,be)=>{const se=[ce.year,ce.make,ce.model].filter(Boolean).join(" ")||`Vehicle ${be+1}`,ie=re(be);return u.jsxs("fieldset",{style:{border:`1px solid ${ie?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[u.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:se}),u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:k.map((W,me)=>{const he=[W.first_name,W.last_name].filter(Boolean).join(" ")||`Driver ${me+1}`,Oe=O[`v${be}`]?.[`d${me}`];return u.jsx("div",{style:{flex:"0 0 140px"},children:u.jsx(Co,{id:`assignment-v${be}-d${me}`,label:`${he} %`,value:Oe??"",min:0,max:100,step:1,inputMode:"numeric",onChange:ke=>{const Te=ke.currentTarget.value.replace(/\D+/g,"");Z(be,me,Te===""?0:Math.min(100,parseInt(Te,10)))}})},`${be}-${me}`)})}),ie&&u.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:ie})]},be)})]},p)}switch(v.inputType){case"text":{if(p==="vin"&&i){const T=y?y.join("-"):"_root",k=ne[T]??!1,O=$e[T]??null,Z=[b?`${p}-hint`:null,V?`${p}-error`:null,O?`${p}-vin-error`:null].filter(Boolean).join(" ");return u.jsxs("div",{children:[u.jsx(qe,{id:p,label:S,hint:b,error:V,required:$,children:u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsx("div",{className:"flex-1 min-w-0",children:u.jsx("input",{id:p,className:`form-input ${V?"input-error":""}`,"aria-invalid":!!V,"aria-describedby":Z||void 0,"aria-required":$||void 0,required:$,value:ze(A),maxLength:17,onChange:re=>F(re.currentTarget.value),onBlur:()=>N(p,"text",y),autoComplete:Sn[p],type:"text"})}),u.jsx("button",{type:"button",disabled:k||!Za(ze(A)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>oe(y,ze(A)),children:k?"Looking up...":"Verify VIN"})]})}),O&&u.jsx("p",{id:`${p}-vin-error`,className:"text-sm text-red-600 mt-1",children:O})]},p)}if(p==="sms_code"){const T=ze(A);return u.jsx(wo,{id:p,label:S,hint:b,value:T,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:k=>{const O=k.currentTarget.value.replace(/\D+/g,"").slice(0,6);F(O)},onBlur:()=>N(p,"text",y),"aria-required":$||void 0,error:V,autoComplete:Sn[p]},p)}if(p==="license_number")return u.jsx(wo,{id:p,label:S,hint:b,value:ze(A),onChange:T=>F(T.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>N(p,"text",y),"aria-required":$||void 0,error:V,autoComplete:"off",maxLength:20},p);if(p==="social_security_number"){const T=xe(E,y,"ssn_display"),k=typeof T=="string"?T:"",O=k?`${k}. Re-enter to update.${b?` ${b}`:""}`:b;return u.jsx(Yp,{id:p,label:S,hint:O,value:ze(A),onChange:Z=>F(Z.currentTarget.value),onBlur:()=>N(p,"text",y),"aria-required":$||void 0,error:V},p)}return u.jsx(wo,{id:p,label:S,hint:b,value:ze(A),onChange:T=>F(T.currentTarget.value),onBlur:()=>N(p,"text",y),"aria-required":$||void 0,error:V,autoComplete:Sn[p],maxLength:Lb[p]},p)}case"email":return u.jsx(Kp,{id:p,label:S,value:ze(A),onChange:T=>F(T.currentTarget.value),onBlur:()=>N(p,"email",y),"aria-required":$||void 0,error:V},p);case"password":return u.jsx(Xp,{id:p,label:S,value:ze(A),onChange:T=>F(T.currentTarget.value),onBlur:()=>N(p,"password",y),"aria-required":$||void 0,error:V},p);case"tel":return u.jsxs(u.Fragment,{children:[u.jsx(Jp,{id:p,label:S,value:ze(A),onChange:T=>F(T.currentTarget.value),onBlur:()=>N(p,"tel",y),"aria-required":$||void 0,error:V},p),p==="phone"&&u.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[u.jsx("p",{children:"We verify your number before showing your quotes — you'll get a 6-digit code next. This is just to confirm your number, not a sales call."}),u.jsx("p",{children:"Message & data rates may apply. One message per request."}),u.jsxs("p",{children:["See our"," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return u.jsx(Qp,{id:p,label:S,value:ze(A),onChange:T=>F(T.currentTarget.value),onBlur:()=>N(p,"url",y),"aria-required":$||void 0,error:V},p);case"number":{const T=Db[p];return kc.has(p)||Pb.has(p)?u.jsx(Vp,{id:p,label:S,hint:b,value:Dc(A),isCurrency:kc.has(p),maxDigits:T,onChange:k=>F(Tc(k.currentTarget.value)),onBlur:()=>N(p,"number",y),"aria-required":$||void 0,error:V},p):u.jsx(Co,{id:p,label:S,hint:b,value:Dc(A),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:k=>{if(Mb(k.key)){k.preventDefault();return}T!==void 0&&/^\d$/.test(k.key)&&String(k.currentTarget.value).replace(/\D/g,"").length>=T&&k.preventDefault()},onChange:k=>{let O=k.currentTarget.value;T!==void 0&&(O=O.slice(0,T)),F(Tc(O))},onBlur:()=>N(p,"number",y),"aria-required":$||void 0,error:V},p)}case"textarea":return u.jsx(em,{id:p,label:S,value:ze(A),onChange:T=>F(T.currentTarget.value),onBlur:()=>N(p,"textarea",y),"aria-required":$||void 0,error:V,rows:4},p);case"date":{const{min:T,max:k}=xb(p);return u.jsx(tm,{id:p,label:S,hint:b,value:ze(A),min:T,max:k,onChange:O=>{const Z=O.currentTarget.value;F(Z),!at(Z,"date")&&!Ro(p,Z)&&de(p,Y(y,p,Z))},onBlur:()=>N(p,"date",y),"aria-required":$||void 0,error:V,autoComplete:Sn[p]},p)}case"checkbox":{if(v.options){const T=Array.isArray(A)?A:[];return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"form-label",children:[S,$&&u.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:v.options.map(k=>{const O=`${p}-${zo(k)}`,Z=T.includes(k);return u.jsx(gr,{id:O,label:k,checked:Z,onChange:re=>{const ce=new Set(T);re.currentTarget.checked?ce.add(k):ce.delete(k),F(Array.from(ce))},"aria-required":$||void 0},O)})}),V&&u.jsx("p",{className:"mt-1 text-sm text-red-600",children:V})]},p)}return u.jsx(gr,{id:p,label:$?`${S} *`:S,checked:!!A,onChange:T=>F(T.currentTarget.checked),"aria-required":$||void 0},p)}case"radio":{if(En(v))return null;const T=v.options??[],k=y&&y.length>0?`${p}__${y.join("__")}`:p;return u.jsx(om,{legend:S,legendClassName:$?"legend-required":void 0,children:T.map(O=>u.jsx(nm,{name:k,value:O,checked:A===O,onChange:()=>{F(O),de(p,Y(y,p,O))},children:Ac[p]?.[O]??O},`${p}-${zo(O)}`))},p)}case"select":{let T=v.options??[];p==="quote_vehicle_id"&&(T=r?.vehicles__items?.map(se=>se.vin)??[]);let k=!1,O,Z,re;if(p==="year"||p==="make"||p==="model"||p==="body_style"){const se=y?y.join("-"):"_root";ne[se]&&(k=!0,O="Looking up VIN...")}if(!k&&(p==="make"||p==="model"||p==="body_style")){const se=y?y.join("-"):"_root";re=se;const ie=xe(E,y,"year"),W=typeof ie=="number"?ie:Number(ie);if(p==="make"){const me=`${se}:makes`;if(!W||!Number.isFinite(W))k=!0,O="Select a year first";else{Z={year:W};const he=K(Z);he&&he.length>0?T=he:B[me]?(k=!0,O="Loading makes..."):T=[...J0]}typeof A=="string"&&A&&!T.includes(A)&&(T=[A,...T])}else if(p==="model"){const me=`${se}:models`,he=String(xe(E,y,"make")??"");if(!he)k=!0,O="Select a make first";else if(W&&Number.isFinite(W)){Z={year:W,make:he};const Oe=K(Z);Oe&&Oe.length>0?T=Oe:B[me]?(k=!0,O="Loading models..."):T=[...Ib]}typeof A=="string"&&A&&!T.includes(A)&&(T=[A,...T])}else{const me=`${se}:bodyStyles`,he=String(xe(E,y,"make")??""),Oe=String(xe(E,y,"model")??"");if(!Oe)k=!0,O="Select a model first";else if(W&&Number.isFinite(W)&&he){Z={year:W,make:he,model:Oe};const ke=K(Z);ke&&ke.length>0?T=ke:B[me]?(k=!0,O="Loading body styles..."):T=[...Nb]}typeof A=="string"&&A&&!T.includes(A)&&(T=[A,...T])}}if(p==="occupation"||p==="co_applicant_occupation"){const se=p==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,ie=se?void 0:xe(E,y,"industry"),W=xe(E,y,se??"employment_industry"),he=String(mn(ie??W)??"").trim();T=[...ec[he]??Ob],typeof A=="string"&&A&&!T.includes(A)&&(T=[A,...T])}const ce=Bb(y,p),be=a?.has([...y??[],p].join("."))??!1;return u.jsx(yr,{id:ce,label:O?`${S} — ${O}`:S,"aria-required":$||void 0,error:V,disabled:k,value:be?"":Hb(A),onChange:se=>{const ie=se.currentTarget.value;if(p!=="year"&&p!=="make"&&p!=="model"&&p!=="industry"&&p!=="employment_industry"&&p!=="co_applicant_employment_industry"){F(ie),de(p,Y(y,p,ie));return}let W=Be(E,y,p,ie);if(p==="year")W=Be(W,y,"make",""),W=Be(W,y,"model",""),W=Be(W,y,"body_style","");else if(p==="make")W=Be(W,y,"model",""),W=Be(W,y,"body_style","");else if(p==="model")W=Be(W,y,"body_style","");else if(p==="industry"||p==="employment_industry")W=Be(W,y,"occupation","");else if(p==="co_applicant_employment_industry"){const he=String(mn(ie)??"").trim(),Oe=ec[he]??[],ke=Oe.find(Te=>Te===he)??Oe[0]??"";W=Be(W,y,"co_applicant_occupation",ke??"")}r&&n?n(W):I(W),M(W);const me=y?kr(W,y)??{}:W;de(p,{...me,[p]:ie})},placeholder:O??"Select an option",onFocus:Z&&re?()=>U(re,Z):void 0,options:T.map(se=>({value:se,label:Ac[p]?.[se]??kb[se]??se}))},ce)}case"address":return u.jsx(cm,{id:p,label:S,value:ze(A),onChange:(T,k)=>{let O=Be(E,y,p,T);const Z=k?.state??(typeof T=="string"?T.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(Z){const re=y?[...y,"state"]:["state"];O=tt(O,re,Z)}if(!y){const re=k?.zipCode??(typeof T=="string"?T.match(/,\s*[A-Z]{2}\s+(\d{5})(?:-\d{4})?\b/)?.[1]:void 0);re&&(O=tt(O,["postal_code"],re))}r&&n?n(O):I(O),M(O)},onBlur:()=>N(p,"address",y),required:$,"aria-required":$||void 0,error:V},p);default:return null}}function L(v,y){const p=v.some(b=>String(b.key)==="years_at_address"),S=v.find(b=>String(b.key)==="months_at_address");return v.map((b,A)=>{const $=String(b.key);if($==="months_at_address"&&p||!hn(b,E,f)||!ei(b,E,y)||!_n(b,E,s))return null;if(ti($,b,E,s)){const re=f.currentCarrierKey?E[f.currentCarrierKey]:void 0;if(!(re&&re!=="NoPriorInsurance"&&ar(E,f)&&Xo.has($)))return null}const V=J(b,y),F=$==="years_at_address"&&S?J(S,y):null,T=b.conditionals??[];if(!T.length)return s==="BundlePolicy"&&$==="policy_bi"?u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),V]},`wrap-${$}-${A}`):u.jsxs("div",{children:[V,F]},`wrap-${$}-${A}`);const k=Ic(b,xe(E,y,$)),O=T.filter(re=>Tr(k,re.conditionalType,re.conditionalValue)),Z=O.length>1&&!O.some(re=>re.conditionalQuestionsAllowMultiple)?O.slice(0,1):O;return u.jsxs("div",{children:[V,F,Z.map((re,ce)=>{const be=re.conditionalQuestions??[];if(!be.length)return null;if(!re.conditionalQuestionsAllowMultiple)return u.jsx("div",{className:"mt-3",children:L(be,y)},`branch-${$}-${ce}`);const se=wn($),ie=kr(E,[...y??[],se])??[],W=Math.max(1,ie.length||1),me=()=>{const ke=tt(E,[...y??[],se,ie.length],{});r&&n?n(ke):I(ke),M(ke)},he=()=>{const ke=ie.slice(0,Math.max(0,ie.length-1)),Te=tt(E,[...y??[],se],ke);r&&n?n(Te):I(Te),M(Te)},Oe=`${$}__c${ce}`;return u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),u.jsxs("div",{className:"space-x-2",children:[u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:me,children:"Add another"}),W>1&&u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:he,children:"Remove last"})]})]}),Array.from({length:W}).map((ke,Te)=>{const Ve=[...y??[],se,Te],ve=`${Oe}__i${Te}`,le=ie[Te]??{},Me=$==="drivers",ge=Me?`Driver #${Te+1}`:$==="vehicles"?`Vehicle #${Te+1}`:$==="home_losses"||$==="losses"?`Loss #${Te+1}`:`Entry #${Te+1}`,_i=Me&&typeof le.ssn_display=="string"&&le.ssn_display?` — ${le.ssn_display}`:"";return u.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[u.jsxs("div",{className:"text-sm font-semibold mb-2",children:[ge,_i]}),be.map(it=>{const Mr=String(it.key);if(!hn(it,E,f)||!ei(it,E,Ve)||!_n(it,E,s))return null;if(ti(Mr,it,E,s)){const It=f.currentCarrierKey?E[f.currentCarrierKey]:void 0;if(!(It&&It!=="NoPriorInsurance"&&ar(E,f)&&Xo.has(Mr)))return null}return u.jsxs("div",{className:"mt-3",children:[J(it,Ve),(()=>{const It=it.conditionals??[];if(!It.length)return null;const kl=xe(E,Ve,it.key),Ln=It.filter(Gt=>Tr(kl,Gt.conditionalType,Gt.conditionalValue));return(Ln.length>1&&!Ln.some(Gt=>Gt.conditionalQuestionsAllowMultiple)?Ln.slice(0,1):Ln).map((Gt,hi)=>{const gi=Gt.conditionalQuestions??[];if(!gi.length)return null;if(!Gt.conditionalQuestionsAllowMultiple)return u.jsx("div",{className:"mt-3",children:L(gi,Ve)},`nested-${ve}-${hi}`);const xn=wn(it.key),$n=kr(E,[...Ve,xn])??[],Il=Math.max(1,$n.length||1),JS=()=>{const fr=tt(E,[...Ve,xn,$n.length],{});r&&n?n(fr):I(fr),M(fr)},QS=()=>{const fr=$n.slice(0,Math.max(0,$n.length-1)),Zt=tt(E,[...Ve,xn],fr);r&&n?n(Zt):I(Zt),M(Zt)};return u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),u.jsxs("div",{className:"space-x-2",children:[u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:JS,children:"Add another"}),Il>1&&u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:QS,children:"Remove last"})]})]}),Array.from({length:Il}).map((fr,Zt)=>{const XS=[...Ve,xn,Zt];return u.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[u.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",Zt+1]}),L(gi,XS)]},`nested-item-${ve}-${hi}-${Zt}`)})]},`nested-repeat-${ve}-${hi}`)})})()]},`${ve}-${Mr}`)})]},`group-${ve}`)})]},`branch-${$}-${ce}`)})]},`wrap-${$}-${A}`)})}const x=_.useMemo(()=>{const v=[],y=(p,S)=>{p.forEach(b=>{if(!hn(b,E,f)||!ei(b,E,S)||!_n(b,E,s))return;const A=String(b.key);if(ti(A,b,E,s)){const k=f.currentCarrierKey?E[f.currentCarrierKey]:void 0;if(!(k&&k!=="NoPriorInsurance"&&ar(E,f)&&Xo.has(A)))return}En(b)||v.push(b);const $=b.conditionals??[];if(!$.length)return;const V=Ic(b,xe(E,S,A)),F=$.filter(k=>Tr(V,k.conditionalType,k.conditionalValue));(F.length>1&&!F.some(k=>k.conditionalQuestionsAllowMultiple)?F.slice(0,1):F).forEach(k=>{const O=k.conditionalQuestions??[];O.length&&(k.conditionalQuestionsAllowMultiple||y(O,S))})})};return y(d),v},[d,E,f,s]);function X(v){v.preventDefault();const y=Cr(E,f),p=x.map(b=>gn(b,f)?{...b,required:y}:b),S=wr(p,E);if(R(S),Object.keys(S).length>0){const b=x.findIndex(A=>S[A.key]);b>=0&&document.getElementById(x[b].key)?.focus();return}o(E)}return u.jsx("form",{className:"space-y-6 px-1",onSubmit:X,noValidate:!0,children:L(d)})}const Rb="https://getcredify.com/privacy-policy";function zb(){return u.jsx("a",{href:Rb,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function Lc(){return u.jsxs(u.Fragment,{children:["See our ",u.jsx(zb,{})," for how we use your information."]})}const jb=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),Wb=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function qb({stageKey:e}){return e?e==="Zip"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):e==="Email"?u.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[u.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),u.jsx("p",{children:u.jsx(Lc,{})})]}):Wb.has(e)?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):e==="Ssn"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):e==="SMSVerification"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):jb.has(e)?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:u.jsx(Lc,{})}):null:null}const ur={};function Gb(e){let t=ur[e];return t||(t=new Set,ur[e]=t),t}function xc(e,t){Gb(e).add(t)}function $c(e,t){ur[e]?.delete(t)}function kt(e,...t){const r=ur[e];if(!r||r.size===0)return;const n=t[0],o={quoteId:yn(),timestamp:Date.now()};for(const i of[...r])try{i(n,o)}catch(s){Gr(s,{tags:{source:"widget-event-listener",event:e}})}}function Zb(){for(const e of Object.keys(ur))delete ur[e]}function Vb(){kt("widgetOpened")}function Fc(){kt("widgetClosed")}function Yb(e){kt("stageViewed",e)}function Bc(e){kt("stageCompleted",e)}function Kb(){kt("flowCompleted")}function Jb(e){kt("ratesViewed",e)}function Qb(){kt("ratesBack")}function Ir(e){kt("submissionFailed",e)}const Uc=new Set(["Disabled","Retired","Unemployed","Other"]);function Xb(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!Uc.has(i)}function ev(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!Uc.has(i)}function Hc(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function ri(e,t){return Hc(e)?"Yes":t}function Rc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function zc(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function jc(e,t){const r=Rc(e),n=Rc(t);if(r!=null&&n!=null)return r-n;const o=zc(e),i=zc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function tv(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function ni(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=jc(e,r);return n!=null&&n<0}case"greaterThan":{const n=jc(e,r);return n!=null&&n>0}case"contains":return tv(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}const rv=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Nr(e,t,r){const n=ko([...e]),o=Go(n),i=[],s=a=>{a.forEach(c=>{if(!hn(c,t,o)||!Xb(c,t)||!_n(c,t,r))return;const l=String(c.key);if(un(l,r,t)){const g=o.currentCarrierKey?t[o.currentCarrierKey]:void 0;if(!(g&&g!=="NoPriorInsurance"&&ar(t,o)&&rv.has(l)))return}Hc(c)||i.push(c);const d=ri(c,t[l]),f=c.conditionals??[];if(!f.length)return;const h=f.filter(g=>ni(d,g.conditionalType,g.conditionalValue));(h.length>1&&!h.some(g=>g.conditionalQuestionsAllowMultiple)?h.slice(0,1):h).forEach(g=>{const I=g.conditionalQuestions??[];I.length&&(g.conditionalQuestionsAllowMultiple||s(I))})})};return s(n),i}const Wc="__items",Cn=e=>`${e}${Wc}`;function nv(e,t){if(e.key==="relationship_to_insured"||e.key==="is_registered_owner"){const r=t[t.length-1];return typeof r=="number"&&r===0}return!1}function An(e,t,r,n=[],o=void 0,i=t){for(const s of e){const a=String(s.key),c=ri(s,t[a]),l=s.conditionals??[];if(!l.length)continue;const d=l.filter(h=>ni(c,h.conditionalType,h.conditionalValue)),f=d.length>1&&!d.some(h=>h.conditionalQuestionsAllowMultiple)?d.slice(0,1):d;for(const h of f){const m=h.conditionalQuestions??[];if(!m.length)continue;if(!h.conditionalQuestionsAllowMultiple){An(m,t,r,n,o,i);continue}if(un(a,o,i))continue;const g=t[Cn(a)]??[];if(g.length===0){r.push({groupKey:a,index:-1,fieldKey:"",fieldLabel:"",message:"At least one entry is required"});continue}for(const[I,H]of g.entries()){const M=[...n,Cn(a),I],E=Nr(m,H,o).filter(P=>!(nv(P,M)||!ev(P,H))),D={state:i.state,...H},R=wr(E,D),C=new Map(E.map((P,z)=>[wt(P,z),P.question??""]));for(const[P,z]of Object.entries(R))z&&r.push({groupKey:a,index:I,fieldKey:P,fieldLabel:C.get(P)??P,message:z});An(m,H,r,M,o,i)}}}}function ov(e,t,r){const n=[];return An(e,t,n,[],r,t),n}function qc(e,t,r){const n=[];return An(e,t,n,[],r,t),n.length>0}function oi(e,t,r,n){for(const o of e){const i=String(o.key),s=ri(o,t[i]),a=o.conditionals??[];if(!a.length)continue;const c=a.filter(d=>ni(s,d.conditionalType,d.conditionalValue)),l=c.length>1&&!c.some(d=>d.conditionalQuestionsAllowMultiple)?c.slice(0,1):c;for(const d of l){const f=d.conditionalQuestions??[];if(!f.length)continue;if(!d.conditionalQuestionsAllowMultiple){oi(f,t,r,n);continue}if(un(i,r,t))continue;const h=t[Cn(i)]??[];for(const[m,g]of h.entries())typeof g!="object"||g===null||(n(Nr(f,g,r),g,{groupKey:i,index:m}),oi(f,g,r,n))}}}function ii(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(at(r.vehicle_comp_deductible,"select")||at(r.vehicle_coll_deductible,"select")||at(r.vehicle_towing_and_labor,"select")||at(r.vehicle_transportation_expense,"select"))return!0;return!1}function iv({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:o,quoteId:i,nonTerminalStageKeys:s}){const[a,c]=_.useState(o??0),[l,d]=_.useState(n??{}),[f,h]=_.useState({}),[m,g]=_.useState(!1),[I,H]=_.useState(!1),[M,E]=_.useState(null),D=_.useRef([]),R=_.useRef(e),C=Array.isArray(e)&&e.length>0,P=C?Math.min(a,e.length-1):0,z=C?e[P]:null,B=z?.key??null;_.useEffect(()=>{o!==void 0&&c(o)},[o]),R.current=e;const ee=_.useMemo(()=>{const U=P>=e.length-1;return U&&B&&s?.has(B)?!1:!!(U||e.slice(P+1).every(de=>de.key==="AutoPolicy")&&(l.drivers__items??[]).length<=1)},[P,e,l,B,s]);_.useEffect(()=>{C&&a>=e.length&&c(e.length-1)},[a,e.length,C]),_.useEffect(()=>{const U=D.current[P];U&&U.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[P]),_.useEffect(()=>{n!==void 0&&d(n)},[n]),_.useEffect(()=>{if(!z||!B){g(!1),E(null);return}if(f[B]){g(!1),E(null);return}let U=!1;return g(!0),E(null),Promise.resolve(z.loadQuestions()).then(Y=>{if(!U){if(!Array.isArray(Y))throw new Error(`loadQuestions("${B}") did not return an array`);h(de=>({...de,[B]:Y}))}}).catch(Y=>{U||E(`Failed to load stage "${z?.title??""}": ${Y?.message??"Unknown error"}`)}).finally(()=>{U||g(!1)}),()=>{U=!0}},[z,B,f]);const Q=B?f[B]:void 0,ne=_.useMemo(()=>Go(ko(Q??[])),[Q]);_.useEffect(()=>{z&&B&&Q&&Yb({stageKey:B,stageTitle:z.title??B,stepIndex:a+1,totalSteps:e.length})},[B,a,e.length,z,Q]);const _e=_.useMemo(()=>{if(!Q)return{};const U={};(N=>{const J=[],L=x=>{x.forEach((X,v)=>{const y=wt(X,v);J.push(y);const p=Cn(y);J.push(p),(X.conditionals??[]).forEach(b=>{const A=b.conditionalQuestions??[];A.length>0&&L(A)})})};return L(N),J})(Q).forEach(N=>{N in l&&(U[N]=l[N])});for(const N of["state","State","address","product"])N in l&&(U[N]=l[N]);for(const[N,J]of Object.entries(l))N.endsWith(Wc)&&!(N in U)&&(U[N]=J);return U},[Q,l]),$e=U=>{d(Y=>({...Y,...U}))},Ee=()=>{c(U=>U>0?U-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},oe=async()=>{if(!Q||!z||m||M||I)return;const U=Nr(Q,_e,B??void 0),Y=Cr(l,ne),de=U.map(b=>gn(b,ne)?{...b,required:Y}:b),N=wr(de,_e),J=new Set(de.map((b,A)=>wt(b,A))),L=Object.entries(N).some(([b,A])=>A&&J.has(b)),x=qc(Q,l,B??void 0),v=U.some(b=>String(b.key??"")==="vehicle_policy_selections")?ii(l):!1,y=l.driver_vehicle_assignments,p=l.drivers__items??[];let S=!1;if(y&&p.length>=2){const b=l.vehicles__items??[];for(let A=0;A<b.length;A++){const $=y[`v${A}`];if(!$)continue;const V=p.map((k,O)=>$[`d${O}`]??0),F=V.filter(k=>k>0);if(F.length>=2&&F.every(k=>k===50)){S=!0;break}const T=V.reduce((k,O)=>k+O,0);if(T>0&&T!==100){S=!0;break}}}if(!(L||x||v||S)){H(!0);try{const b=ee,A=b?await r(l,B??""):await t(_e,B??""),{success:$,error:V}=A;if(!$){E(V??"An error occurred");return}if(!b){const F=A.latestStages??R.current,T=F.findIndex(O=>O.key===B),k=T>=0?Math.min(T+1,F.length-1):Math.min(a+1,F.length-1);c(k)}}finally{H(!1)}}},K=_.useMemo(()=>{if(!Q||m||M||I)return!0;const U=Nr(Q,_e,B??void 0),Y=Cr(l,ne),de=U.map(b=>gn(b,ne)?{...b,required:Y}:b),N=wr(de,_e),J=new Set(de.map((b,A)=>wt(b,A))),L=Object.entries(N).some(([b,A])=>A&&J.has(b)),x=qc(Q,l,B??void 0),v=U.some(b=>String(b.key??"")==="vehicle_policy_selections")?ii(l):!1,y=l.driver_vehicle_assignments,p=l.drivers__items??[];let S=!1;if(y&&p.length>=2){const b=l.vehicles__items??[];for(let A=0;A<b.length;A++){const $=y[`v${A}`];if(!$)continue;const V=p.map((k,O)=>$[`d${O}`]??0),F=V.filter(k=>k>0);if(F.length>=2&&F.every(k=>k===50)){S=!0;break}const T=V.reduce((k,O)=>k+O,0);if(T>0&&T!==100){S=!0;break}}}return L||x||v||S},[Q,_e,l,m,M,I,ne,B]);return C?u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[u.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.flatMap((U,Y)=>[u.jsx("li",{ref:de=>{D.current[Y]=de},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${Y<P?"bg-blue-600 text-white border-blue-600":Y===P?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:U.title},U.key??`stage-${Y}`),...Y<e.length-1?[u.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${U.key??Y}`)]:[]])}),u.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[P+1," / ",e.length]})]}),u.jsxs("div",{children:[m&&u.jsx("div",{className:"text-slate-500",children:"Loading…"}),z&&u.jsx(Pc,{questions:Q??[],controlledValues:_e,onChangeValues:$e,onSubmit:()=>oe(),quoteId:i,widgetStageKey:B??void 0},z.key)]}),!m&&M&&u.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[u.jsx("div",{children:M}),z&&u.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{h(U=>{if(!B)return U;const Y={...U};return delete Y[B],Y})},children:"Retry"})]}),u.jsx(qb,{stageKey:B}),u.jsxs("div",{className:P>0?"grid grid-cols-2 gap-3":"",children:[P>0&&u.jsx("button",{type:"button",onClick:Ee,disabled:m,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),u.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:oe,disabled:K,className:["form-wizard-next-btn",P>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",K?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[I&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),ee?"Finish":"Next"]})]})]}):u.jsx("div",{className:"text-slate-600",children:"Loading..."})}const Gc={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},Zc=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function sv(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function Vc(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function Wt(e){if(!e)return e;const t=Gc[e];return t?t.name:Vc(e)}function av(e){const t=new Set,r=[];return e.forEach((n,o)=>{const s=Gc[n]??{name:Vc(n),abbr:sv(n),color:Zc[o%Zc.length]};t.has(s.name)||(t.add(s.name),r.push(s))}),r}function cv(e,t){if(!e)return[];const r=[];return(t==="Auto"||t==="Bundle")&&Array.isArray(e.PersonalAuto)&&r.push(...e.PersonalAuto),(t==="Home"||t==="Bundle")&&Array.isArray(e.PersonalHome)&&r.push(...e.PersonalHome),av(r)}const lv="https://getcredify.com/privacy-policy";function uv({acknowledged:e,onChange:t,disabled:r=!1}){return u.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:u.jsx(gr,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:u.jsxs(u.Fragment,{children:["I acknowledge I have received Credify’s"," ",u.jsx("a",{href:lv,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function dv({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:o,onCancel:i,onProceed:s,isProcessing:a,hasError:c}){const l=!n||a;return u.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),u.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&u.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),u.jsx("p",{className:"font-semibold text-slate-900",children:e}),u.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,u.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),u.jsx("div",{className:"mt-4",children:u.jsx(uv,{acknowledged:n,onChange:o,disabled:a})}),c&&u.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),u.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[u.jsx("button",{type:"button","data-testid":"bind-confirmation-cancel",onClick:i,disabled:a,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),u.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:s,disabled:l,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",l?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[a&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a?"Processing…":"Proceed"]})]})]})}const Yc=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function Kc(e){const t=Number.isFinite(e.term_months)&&e.term_months>0?e.term_months:1;return e.monthly_premium_cents!=null?e.monthly_premium_cents:Math.round((e.premium_cents||0)/t)}const Tn={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},kn=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function fv(e){if(e.length===0)return[];const t=(n,o)=>Wt(n.carrier_name).localeCompare(Wt(o.carrier_name));if(!e.some(n=>n.lob))return[{lob:null,title:"Not Quoted",rates:[...e].sort(t)}];const r=new Map;for(const n of e){const o=n.lob||"_other",i=r.get(o);i?i.push(n):r.set(o,[n])}return[...r.entries()].sort(([n],[o])=>{const i=kn.indexOf(n),s=kn.indexOf(o);return(i===-1?999:i)-(s===-1?999:s)}).map(([n,o])=>({lob:n,title:Tn[n]??n,rates:[...o].sort(t)}))}function Jc({onBack:e}){const t=()=>{Qb(),e?.()};return u.jsx("button",{type:"button",onClick:t,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function pv({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:o=!0,className:i}){const s=Kc(e)/100,a=Yc.format(s),c=t==="loading",l=t==="success",d=!!n||c||l,f=!!(e.effective_date&&e.policy_end_date),h=e.lob?Tn[e.lob]||e.lob:null,m=(e.coverages??[]).filter(g=>!!g&&typeof g.label=="string"&&g.label.trim()!==""&&typeof g.value=="string"&&g.value.trim()!=="");return u.jsxs("div",{className:`flex w-full flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md${i?` ${i}`:""}`,children:[o&&h&&u.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:h}),u.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?u.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:Wt(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):u.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:Wt(e.carrier_name).charAt(0).toUpperCase()}),u.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:Wt(e.carrier_name)})]}),u.jsx("div",{className:"mb-2",children:u.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[a,u.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&u.jsx("div",{className:"mb-2",children:u.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&u.jsx("div",{className:"mb-4",children:u.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),m.length>0&&u.jsx("div",{className:"mb-2 border-t border-slate-200 pt-3",children:u.jsx("dl",{children:m.map((g,I)=>u.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-1",children:[u.jsx("dt",{className:"text-xs text-slate-600",children:g.label}),u.jsx("dd",{className:"text-right text-xs font-semibold text-slate-900",children:g.value})]},`${g.label}-${I}`))})}),u.jsxs("div",{className:"mt-auto pt-4",children:[u.jsx("button",{type:"button",onClick:r,disabled:d,className:`rates-bind-btn w-full rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 disabled:cursor-not-allowed ${l?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:c?"Requesting…":l?"Requested":"Request Bind"}),t==="error"&&u.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),t==="success"&&u.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function mv({item:e}){const t=Wt(e.carrier_name),r=(e.decline_reasons??[]).filter(Boolean);return u.jsxs("div",{className:"flex w-full gap-4 rounded-xl border border-slate-200 bg-white p-4 shadow-sm",children:[u.jsx("div",{className:"shrink-0",children:e.carrier_logo_base64?u.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:t,className:"h-10 w-auto max-w-[7rem] object-contain"}):u.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:t.charAt(0).toUpperCase()})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"flex flex-wrap items-center gap-2",children:u.jsx("h4",{className:"break-words font-semibold text-slate-900",children:t})}),r.length>0?u.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-slate-600",children:r.map((n,o)=>u.jsx("li",{children:n},o))}):u.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"This carrier did not return a quote."})]})]})}function _v({rates:e,onBack:t,isBundleFlow:r=!1}){const n=Array.isArray(e)?e:[],o=n.length>0,[i,s]=_.useState({}),[a,c]=_.useState("admitted"),[l,d]=_.useState(!1),[f,h]=_.useState(null),[m,g]=_.useState(!1),I=_.useMemo(()=>n.some(N=>N.lob==="PersonalAuto"),[n]),H=_.useMemo(()=>n.some(N=>N.lob==="PersonalHome"),[n]),M=_.useMemo(()=>{if(!r)return[];const N=[];return I&&N.push("PersonalAuto"),H&&N.push("PersonalHome"),N},[r,I,H]),E=_.useMemo(()=>{const N=new Set;for(const J of n){const L=J.lob??null;L&&i[J.quote_rate_id]==="success"&&N.add(L)}return N},[n,i]),D=_.useMemo(()=>Object.values(i).some(N=>N==="success"),[i]),R=_.useMemo(()=>l?!0:!r||M.length===0?D:M.every(N=>E.has(N)),[l,r,D,M,E]),C=_.useMemo(()=>o?n.filter(N=>(N.admitted_status??"admitted")==="admitted"):[],[n,o]),P=_.useMemo(()=>o?n.filter(N=>N.admitted_status==="non_admitted"):[],[n,o]),z=_.useMemo(()=>o?n.filter(N=>N.admitted_status==="not_quoted"):[],[n,o]),B=C.length,ee=P.length,Q=z.length,ne=B+ee>0,_e=ne||Q>0,$e=_.useMemo(()=>fv(z),[z]);_.useEffect(()=>{_e&&a==="admitted"&&B===0&&(ee>0?c("non_admitted"):Q>0&&c("not_quoted"))},[a,B,ee,Q,_e]);const Ee=_.useMemo(()=>ne?a==="admitted"?C:a==="non_admitted"?P:[]:[],[ne,a,C,P]);_.useEffect(()=>{Jo()},[]),_.useEffect(()=>{!R||l||(eb(),vc(),d(!0))},[R,l]);const oe=_.useMemo(()=>{if(Ee.length===0)return[];if(!Ee.some(x=>x.lob))return[{lob:null,title:"Rates",rates:[...Ee].sort((X,v)=>{const y=Number.isFinite(X.term_months)&&X.term_months>0?X.term_months:1,p=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,S=X.monthly_premium_cents??Math.round((X.premium_cents||0)/y),b=v.monthly_premium_cents??Math.round((v.premium_cents||0)/p);return S-b})}];const J=new Map;for(const x of Ee){const X=x.lob||"_other",v=J.get(X);v?v.push(x):J.set(X,[x])}return[...J.entries()].sort(([x],[X])=>{const v=kn.indexOf(x),y=kn.indexOf(X);return(v===-1?999:v)-(y===-1?999:y)}).map(([x,X])=>({lob:x,title:Tn[x]??x,rates:[...X].sort((v,y)=>{const p=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,S=Number.isFinite(y.term_months)&&y.term_months>0?y.term_months:1,b=v.monthly_premium_cents??Math.round((v.premium_cents||0)/p),A=y.monthly_premium_cents??Math.round((y.premium_cents||0)/S);return b-A})}))},[Ee]),K=_.useMemo(()=>{if(!r)return[];const N=n.some(x=>x.lob==="PersonalAuto"),J=n.some(x=>x.lob==="PersonalHome"),L=[];return N||L.push("Sorry, no rates found for Personal Auto."),J||L.push("Sorry, no rates found for Homeowners."),L},[r,n]);if(!_e)return u.jsxs("section",{className:"mt-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),u.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&u.jsx(Jc,{onBack:t})]});const U=N=>{s(J=>({...J,[N.quote_rate_id]:"idle"})),g(!1),h({cardKey:N.quote_rate_id,rate:N})},Y=()=>{h(null),g(!1)},de=async()=>{if(!f||!m)return;const N=f.cardKey;s(J=>({...J,[N]:"loading"}));try{if(Jo(),!zt())throw new Error("Authentication required. Please verify your phone number first.");if(!((await Tb(N,!0))?.success!==!1))throw new Error("Request failed");s(X=>({...X,[N]:"success"})),h(null),g(!1)}catch{s(J=>({...J,[N]:"error"}))}};if(f){const N=f.rate.lob?Tn[f.rate.lob]||f.rate.lob:null;return u.jsx("section",{className:"mt-8",children:u.jsx(dv,{carrierName:Wt(f.rate.carrier_name),formattedPremium:Yc.format(Kc(f.rate)/100),lobLabel:N,acknowledged:m,onAcknowledgeChange:g,onCancel:Y,onProceed:de,isProcessing:i[f.cardKey]==="loading",hasError:i[f.cardKey]==="error"})})}return u.jsxs("section",{className:"mt-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),K.length>0&&u.jsx("div",{className:"mt-3 space-y-1",children:K.map(N=>u.jsx("p",{className:"text-sm text-slate-600",children:N},N))}),u.jsx("div",{className:"mt-4 border-b border-slate-200",children:u.jsxs("div",{className:"flex items-center gap-6",children:[u.jsxs("button",{type:"button",onClick:()=>c("admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",B,")"]}),u.jsxs("button",{type:"button",onClick:()=>c("non_admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",ee,")"]}),Q>0&&u.jsxs("button",{type:"button",onClick:()=>c("not_quoted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="not_quoted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Not Quoted (",Q,")"]})]})}),a==="not_quoted"?$e.map(N=>u.jsxs("div",{className:"mt-6",children:[N.lob!=null&&u.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:N.title}),u.jsx("div",{className:"space-y-3",children:N.rates.map(J=>u.jsx(mv,{item:J},J.quote_rate_id))})]},N.lob??"all")):u.jsxs(u.Fragment,{children:[Ee.length===0&&u.jsx("p",{className:"mt-4 text-sm text-slate-500",children:a==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),Ee.length>0&&oe.map(N=>u.jsxs("div",{className:"mt-6",children:[u.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:N.title}),u.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:N.rates.map(J=>u.jsx("div",{className:"w-full min-w-0",children:u.jsx(pv,{rate:J,showLobLabel:N.lob==null,status:i[J.quote_rate_id]??"idle",disabled:R||(r?!!(J.lob&&M.includes(J.lob)&&E.has(J.lob)):D),onRequestBind:()=>U(J)})},J.quote_rate_id))})]},N.lob??"all"))]}),t&&u.jsx(Jc,{onBack:t})]})}function hv({stageKey:e,title:t,questions:r,values:n,onChangeValues:o,review:i,quoteId:s,fetchVehicleOptions:a}){const c=_.useMemo(()=>new Set(Object.keys(i.errorsByKey)),[i.errorsByKey]);return u.jsxs("section",{id:`review-section-${e}`,"data-testid":`review-section-${e}`,className:`review-section rounded-lg border p-4 ${i.hasIssues?"border-amber-300 bg-amber-50/40":"border-slate-200"}`,children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[u.jsx("h3",{className:"text-base font-semibold text-text-primary",children:t}),i.hasIssues?u.jsxs("span",{"data-testid":`review-section-${e}-badge`,className:"shrink-0 rounded-full bg-amber-100 border border-amber-300 text-amber-800 text-xs font-semibold px-2.5 py-1",children:[i.issues.length," ",i.issues.length===1?"field needs":"fields need"," attention"]}):u.jsx("svg",{"data-testid":`review-section-${e}-ok`,className:"h-5 w-5 shrink-0 text-emerald-600",viewBox:"0 0 20 20",fill:"currentColor",role:"img","aria-label":"Section complete",children:u.jsx("path",{fillRule:"evenodd",d:"M16.704 5.29a1 1 0 010 1.415l-7.5 7.5a1 1 0 01-1.415 0l-3.5-3.5a1 1 0 011.415-1.415l2.792 2.793 6.793-6.793a1 1 0 011.415 0z",clipRule:"evenodd"})})]}),i.hasIssues&&u.jsx("ul",{className:"mb-3 list-disc list-inside space-y-0.5 text-sm text-amber-800","data-testid":`review-section-${e}-issues`,children:i.issues.map(l=>u.jsxs("li",{children:[l.label,": ",l.message]},l.key))}),u.jsx(Pc,{questions:r,controlledValues:n,onChangeValues:o,onSubmit:()=>{},quoteId:s,widgetStageKey:e,invalidValueKeys:c,fetchVehicleOptions:a})]})}const Qc=new Set(["make","model","body_style","occupation","co_applicant_occupation","quote_vehicle_id"]),Xc={vehicles:"Vehicle",drivers:"Driver",driver_accidents:"Accident",driver_violations:"Violation",losses:"Loss",home_losses:"Loss"};function el(e){const t=e.options;return Array.isArray(t)?t.map(r=>r&&typeof r=="object"&&"value"in r?String(r.value):String(r)):[]}const gv=new Set(["SMSVerification","CanopyConnect","Phone"]);function yv({stageKey:e,questions:t,values:r}){const n=Nr(t,r,e),o=wr(n,r),i=new Map(n.map((l,d)=>[wt(l,d),l])),s={},a=[];for(const[l,d]of Object.entries(o))!d||!i.has(l)||(s[l]=d,a.push({key:l,label:i.get(l)?.question??l,message:d}));n.forEach((l,d)=>{const f=wt(l,d);if(s[f]||l.inputType!=="select"&&l.inputType!=="radio"||Qc.has(String(l.key??"")))return;const h=el(l);if(h.length===0)return;const m=r[f];at(m,l.inputType)||h.includes(String(m))||(s[f]="Not a valid option",a.push({key:f,label:l.question??f,message:"Choose a valid option from the list"}))}),oi(t,r,e,(l,d,f)=>{l.forEach(h=>{if(h.inputType!=="select"&&h.inputType!=="radio")return;const m=String(h.key??"");if(!m||Qc.has(m))return;const g=el(h);if(g.length===0)return;const I=d[m];if(!at(I,h.inputType)&&!g.includes(String(I))){const H=Xc[f.groupKey]??f.groupKey,M=`${f.groupKey}__items.${f.index}.${m}`;s[M]="Not a valid option",a.push({key:M,label:`${H} ${f.index+1} — ${h.question??m}`,message:"Choose a valid option from the list"})}})});for(const l of ov(t,r,e)){const d=Xc[l.groupKey]??l.groupKey;if(l.index<0){a.push({key:`${l.groupKey}__missing`,label:d,message:"Add at least one entry"});continue}const f=`${l.groupKey}__items.${l.index}.${l.fieldKey}`;if(s[f])continue;s[f]=l.message;const h=l.fieldLabel?`${d} ${l.index+1} — ${l.fieldLabel}`:`${d} ${l.index+1}`;a.push({key:f,label:h,message:l.message})}if(n.some(l=>String(l.key??"")==="vehicle_policy_selections")&&ii(r)&&a.push({key:"__vehicle_policy",label:"Vehicle coverage selections",message:"Coverage selections are incomplete"}),wv(r,n)&&a.push({key:"__dva",label:"Driver usage",message:"Driver usage percentages must total 100% (50/50 is not allowed)"}),n.some(l=>l.inputType==="address"&&String(l.key??"")==="address")){const l=Ev(r);l&&a.push(l)}return{stageKey:e,errorsByKey:s,issues:a,hasIssues:a.length>0}}async function bv(e,t){const r=e.vehicles__items??[];if(!Array.isArray(r)||r.length===0)return[];const n=[];for(const[o,i]of r.entries()){if(typeof i!="object"||i===null)continue;const s=Number(i.year),a=typeof i.make=="string"?i.make.trim():"",c=typeof i.model=="string"?i.model.trim():"",l=typeof i.body_style=="string"?i.body_style.trim():"";if(!(!Number.isFinite(s)||!s||!a))try{const{makes:d}=await t({year:s});if(Array.isArray(d)&&d.length>0&&!d.includes(a)){n.push({key:`vehicles__items.${o}.make`,label:`Vehicle ${o+1} — Make`,message:`"${a}" isn't available for ${s} — choose the make from the list`});continue}if(!c)continue;const{models:f}=await t({year:s,make:a});if(Array.isArray(f)&&f.length>0&&!f.includes(c)){n.push({key:`vehicles__items.${o}.model`,label:`Vehicle ${o+1} — Model`,message:`"${c}" isn't a listed model for the ${s} ${a} — choose the model from the list`});continue}if(!l)continue;const{bodyStyles:h}=await t({year:s,make:a,model:c});Array.isArray(h)&&h.length>0&&!h.includes(l)&&n.push({key:`vehicles__items.${o}.body_style`,label:`Vehicle ${o+1} — Body style`,message:"Choose the body style from the list"})}catch{}}return n}const vv=/^[A-Z]{2}$/,Sv=/^\d{5}(-\d{4})?$/;function Ev(e){if(!(typeof e.address=="string"?e.address.trim():""))return null;const r=typeof e.state=="string"?e.state.trim().toUpperCase():"",n=e.postal_code==null?"":String(e.postal_code).trim();return vv.test(r)&&Sv.test(n)?null:{key:"__address",label:"Property address",message:"Select your address from the dropdown suggestions so we can verify the state and ZIP code"}}function wv(e,t){if(!t.some(i=>String(i.key??"")==="driver_vehicle_assignments"||String(i.key??"")==="vehicle_policy_selections"))return!1;const r=e.driver_vehicle_assignments,n=e.drivers__items??[];if(!r||n.length<2)return!1;const o=e.vehicles__items??[];for(let i=0;i<o.length;i++){const s=r[`v${i}`];if(!s)continue;const a=n.map((d,f)=>s[`d${f}`]??0),c=a.filter(d=>d>0);if(c.length>=2&&c.every(d=>d===50))return!0;const l=a.reduce((d,f)=>d+f,0);if(l>0&&l!==100)return!0}return!1}function dr(e){const t={},r=l=>{if(typeof l=="string"){if(l==="Yes")return!0;if(l==="No")return!1}return l},n=Object.keys(e).filter(l=>!l.includes("__items")),o=new Set,i=new Set;for(const[l,d]of Object.entries(e))if(l.endsWith("__items")&&Array.isArray(d)){const f=l.replace("__items","");i.add(f),n.includes(f)&&d.forEach(h=>{typeof h=="object"&&h!==null&&Object.keys(h).forEach(m=>{o.add(m)})})}for(const[l,d]of Object.entries(e))if(l.endsWith("__items")){const f=l.replace("__items","");if(n.includes(f)){const m=Array.isArray(d)?d.map(g=>dr(g)):d;t[f]=m}}else if(!l.includes("__items")){if(i.has(l))continue;o.has(l)||(t[l]=r(d))}const s=t.auto_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const l=s==="NoPriorInsurance";t.auto_has_prior_insurance=!l,l&&(delete t.auto_prior_years,delete t.auto_prior_months,delete t.auto_prior_expiration_date,delete t.auto_prior_liability_limit,delete t.auto_continuous_coverage_years,delete t.auto_cancelled_declined_refused_to_renew,delete t.auto_current_annual_premium_cents)}const a=t.home_prior_carrier_name;if(typeof a=="string"&&a.trim()!==""){const l=a==="NoPriorInsurance";t.home_has_prior_insurance=!l,l&&(delete t.home_prior_years,delete t.home_continuous_coverage_years,delete t.home_prior_expiration_date,delete t.property_insurance_cancelled)}Array.isArray(t.drivers)&&(t.drivers=t.drivers.map(l=>{if(!l||typeof l!="object")return l;const d={...l};return d.industry=mn(d.industry),d.education_level=rc(d.education_level),d.occupation=nc(d.occupation),d}));const c=21474836;if("sale_price_cents"in t){const l=t.sale_price_cents;if(typeof l=="number"&&Number.isFinite(l)){const d=Math.trunc(l);if(d>=1){const f=Math.min(d,c);t.sale_price_cents=f*100}}}return Array.isArray(t.home_losses)&&(t.home_losses=t.home_losses.map(l=>{if(!l||typeof l!="object")return l;const d=l,f=d.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return d;const h=Math.trunc(f),m=Math.min(Math.max(h,0),c);return{...d,amount_paid_cents:m*100}})),t}const Cv={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",PR:"Puerto Rico"};function tl(e){const t=e?.trim().toUpperCase();if(!t)return"your state";const r=Cv[t];return r?`${r} (${t})`:"your state"}const Av=1500,Tv=800;function kv(e){const t=e.vehicles__items??[];return Array.isArray(t)?t.map(r=>[r?.year,r?.make,r?.model,r?.body_style].map(n=>String(n??"")).join("|")).join(";"):""}function Iv({stages:e,initialValues:t,quoteId:r,isSubmitting:n,onConfirmed:o}){const i=_.useMemo(()=>e.filter(L=>!gv.has(String(L.key))),[e]),[s,a]=_.useState(t),[c,l]=_.useState({}),[d,f]=_.useState(null),[h,m]=_.useState(!0),[g,I]=_.useState(0),[H,M]=_.useState(!1),[E,D]=_.useState(null);_.useEffect(()=>{let L=!1;return m(!0),f(null),Promise.all(i.map(async x=>{const X=await x.loadQuestions();return[String(x.key),[...X]]})).then(x=>{L||l(Object.fromEntries(x))}).catch(x=>{L||f(x instanceof Error?x.message:"Failed to load your review")}).finally(()=>{L||m(!1)}),()=>{L=!0}},[i,g]);const R=_.useRef(null),C=_.useRef(!0);_.useEffect(()=>{if(C.current){C.current=!1;return}return R.current&&window.clearTimeout(R.current),R.current=window.setTimeout(()=>{jt(dr(s),!1).catch(L=>{console.warn("Review autosave failed (will retry on next edit / submit)",L)})},Av),()=>{R.current&&window.clearTimeout(R.current)}},[s]);const P=_.useCallback(L=>{a(x=>({...x,...L}))},[]),z=_.useMemo(()=>{for(const[L,x]of Object.entries(c))if(x.some(X=>String(X.key??"")==="vehicles"))return L;return null},[c]),[B,ee]=_.useState([]),[Q,ne]=_.useState(!1),_e=_.useRef(0),$e=kv(s),Ee=_.useRef(new Map),oe=_.useRef(Promise.resolve()),K=_.useCallback(L=>{const x=`${L.year??""}|${L.make??""}|${L.model??""}`,X=Ee.current,v=X.get(x);if(v)return v;const y=oe.current.catch(()=>{}).then(()=>Cc({quoteId:r,...L}));oe.current=y.catch(()=>{});const p=y.catch(S=>{throw X.delete(x),S});return X.set(x,p),p},[r]);_.useEffect(()=>{if(!z||!$e){ee([]),ne(!1);return}const L=++_e.current;ne(!0);const x=window.setTimeout(()=>{bv(s,K).then(X=>{_e.current===L&&ee(X)}).finally(()=>{_e.current===L&&ne(!1)})},Tv);return()=>window.clearTimeout(x)},[z,$e,r,K]);const U=_.useMemo(()=>{const L={};for(const x of i){const X=String(x.key),v=c[X];v&&(L[X]=yv({stageKey:X,questions:v,values:s}))}if(z&&L[z]&&B.length>0){const x=L[z];L[z]={...x,errorsByKey:{...x.errorsByKey,...Object.fromEntries(B.map(X=>[X.key,X.message]))},issues:[...x.issues,...B],hasIssues:!0}}return L},[i,c,s,z,B]),Y=_.useMemo(()=>Object.values(U).reduce((L,x)=>L+x.issues.length,0),[U]),de=!h&&!d&&Y===0&&H&&!n&&!Q,N=_.useCallback(()=>{const L=i.find(x=>U[String(x.key)]?.hasIssues);L&&document.getElementById(`review-section-${String(L.key)}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[i,U]),J=_.useCallback(async()=>{if(de){D(null);try{const L=typeof s.state=="string"?s.state:"";if(L){const{isSupported:x}=await Ec(L);if(!x){D(`Sorry, Credify Corporation doesn't currently offer insurance in ${tl(L)}. We're expanding our coverage and hope to serve your state soon.`);return}}await o(s)}catch{D("Oops, something went wrong. Please try again later.")}}},[de,s,o]);return h?u.jsx("div",{className:"flex items-center justify-center py-12","data-testid":"review-loading",children:u.jsx("div",{className:"text-slate-600",children:"Loading your details..."})}):d?u.jsxs("div",{className:"text-red-600 text-sm","data-testid":"review-load-error",children:[u.jsx("div",{children:d}),u.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>I(L=>L+1),children:"Retry"})]}):u.jsxs("div",{className:"space-y-6","data-testid":"review-screen",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:"Review your information"}),u.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Here's what we collected during your conversation. Please review each section, fix anything we got wrong, and fill in anything missing — then confirm below to see your quotes."})]}),Y>0&&u.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm text-amber-800",role:"status","data-testid":"review-issue-summary",children:[u.jsxs("span",{children:[Y," ",Y===1?"field needs":"fields need"," your attention before you can continue."]}),u.jsx("button",{type:"button",onClick:N,className:"shrink-0 font-bold underline text-amber-800 hover:text-amber-900",children:"Show me"})]}),i.map(L=>{const x=String(L.key),X=c[x],v=U[x];return!X||!v?null:u.jsx(hv,{stageKey:x,title:L.title,questions:X,values:s,onChangeValues:P,review:v,quoteId:r,fetchVehicleOptions:K},x)}),u.jsxs("div",{className:"rounded-lg border border-slate-200 p-4 space-y-4","data-testid":"review-consent-block",children:[u.jsx(gr,{id:"review-terms-checkbox","data-testid":"review-terms-checkbox",checked:H,onChange:L=>M(L.target.checked),disabled:n,label:"I have reviewed my information and confirm it is accurate, and I agree to the Terms of Service and Privacy Policy."}),u.jsxs("p",{className:"text-sm text-slate-600",children:["Credify Corporation – Texas #3309669."," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),E&&u.jsx("div",{className:"text-red-600 text-sm",role:"alert","data-testid":"review-submit-error",children:E}),u.jsxs("button",{type:"button","data-testid":"review-submit","data-widget-ctrl":"review-submit",onClick:J,disabled:!de,className:["form-wizard-next-btn w-full","h-12 rounded-full text-white font-bold transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",de?"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40":"bg-gray-300"].join(" "),children:[n&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Confirm & See My Quotes"]})]})}const si=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],rl={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},nl={Auto:6e4,Home:9e4,Bundle:12e4};function Nv({progress:e,color:t,size:r=80}){const n=(r-10)/2,o=2*Math.PI*n,i=o-e/100*o;return u.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[u.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),u.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:t,strokeWidth:6,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:i,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function Ov({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:o}){const i=rl[r]??rl.Auto,s=nl[r]??nl.Auto,a=e.length>0?Math.floor(s/e.length):t,[c,l]=_.useState(0),[d,f]=_.useState(0),[h,m]=_.useState(0),[g,I]=_.useState(0),[H,M]=_.useState(!0),E=_.useRef(n),D=_.useRef(o),R=_.useRef(c),C=_.useRef(e.length),P=_.useRef(!1),z=_.useRef(!1);_.useEffect(()=>{E.current=n,n&&e.length===0&&!P.current&&(P.current=!0,D.current?.())},[n,e.length]),_.useEffect(()=>{D.current=o},[o]),_.useEffect(()=>{R.current=c},[c]),_.useEffect(()=>{C.current=e.length,e.length>0&&(z.current=!1,l(0),f(0),m(0),I(0),M(!0))},[e.length]),_.useEffect(()=>{if(e.length===0){E.current&&!P.current&&(P.current=!0,D.current?.());return}z.current=!1;const ne=100,_e=100/(a/ne),$e=setInterval(()=>{m(Ee=>{if(z.current||P.current)return Ee;const oe=Ee+_e;return oe<100?oe:(z.current=!0,setTimeout(()=>{if(E.current){if(P.current)return;P.current=!0,D.current?.();return}const U=R.current===C.current-1;M(!1),setTimeout(()=>{U?(l(0),f(Y=>Y+1)):l(Y=>Y+1),m(0),I(0),M(!0)},300)},400),100)})},ne);return()=>clearInterval($e)},[c,a,e.length]),_.useEffect(()=>{if(e.length===0)return;const ne=Math.floor(a/si.length),_e=setInterval(()=>I($e=>Math.min($e+1,si.length-1)),ne);return()=>clearInterval(_e)},[c,a,e.length]);const B=e.length===0,ee=B?null:e[Math.min(c,e.length-1)],Q=d>0;return u.jsxs(u.Fragment,{children:[u.jsx("style",{children:`
|
|
62
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Pa(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=s=>{const a=e.seen.get(s);if(a.ref===null)return;const c=a.def??a.schema,l={...c},d=a.ref;if(a.ref=null,d){n(d);const g=e.seen.get(d),h=g.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,l),s._zod.parent===d)for(const T in c)T==="$ref"||T==="allOf"||T in l||delete c[T];if(h.$ref&&g.def)for(const T in c)T==="$ref"||T==="allOf"||T in g.def&&JSON.stringify(c[T])===JSON.stringify(g.def[T])&&delete c[T]}const f=s._zod.parent;if(f&&f!==d){n(f);const g=e.seen.get(f);if(g?.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(const h in c)h==="$ref"||h==="allOf"||h in g.def&&JSON.stringify(c[h])===JSON.stringify(g.def[h])&&delete c[h]}e.override({zodSchema:s,jsonSchema:c,path:a.path??[]})};for(const s of[...e.seen.entries()].reverse())n(s[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Object.assign(o,r.def??r.schema);const i=e.external?.defs??{};for(const s of e.seen.entries()){const a=s[1];a.def&&a.defId&&(i[a.defId]=a.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:cn(t,"input",e.processors),output:cn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ze(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ze(n.element,r);if(n.type==="set")return ze(n.valueType,r);if(n.type==="lazy")return ze(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ze(n.innerType,r);if(n.type==="intersection")return ze(n.left,r)||ze(n.right,r);if(n.type==="record"||n.type==="map")return ze(n.keyType,r)||ze(n.valueType,r);if(n.type==="pipe")return ze(n.in,r)||ze(n.out,r);if(n.type==="object"){for(const o in n.shape)if(ze(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(ze(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(ze(o,r))return!0;return!!(n.rest&&ze(n.rest,r))}return!1}const mg=(e,t={})=>r=>{const n=Ma({...r,processors:t});return $e(e,n),Da(n,e),Pa(n,e)},cn=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=Ma({...o??{},target:i,io:t,processors:r});return $e(e,s),Da(s,e),Pa(s,e)},_g={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hg=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=_g[a]??a,o.format===""&&delete o.format,a==="time"&&delete o.format),l&&(o.contentEncoding=l),c&&c.size>0){const d=[...c];d.length===1?o.pattern=d[0].source:d.length>1&&(o.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},gg=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=d,o.exclusiveMinimum=!0):o.exclusiveMinimum=d),typeof i=="number"&&(o.minimum=i,typeof d=="number"&&t.target!=="draft-04"&&(d>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l),typeof s=="number"&&(o.maximum=s,typeof l=="number"&&t.target!=="draft-04"&&(l<=s?delete o.maximum:delete o.exclusiveMaximum)),typeof c=="number"&&(o.multipleOf=c)},yg=(e,t,r,n)=>{r.type="boolean"},bg=(e,t,r,n)=>{r.not={}},vg=(e,t,r,n)=>{},Sg=(e,t,r,n)=>{const o=e._zod.def,i=Ys(o.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Eg=(e,t,r,n)=>{const o=e._zod.def,i=[];for(const s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},wg=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Cg=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ag=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=$e(i.element,t,{...n,path:[...n.path,"items"]})},Tg=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object",o.properties={};const s=i.shape;for(const l in s)o.properties[l]=$e(s[l],t,{...n,path:[...n.path,"properties",l]});const a=new Set(Object.keys(s)),c=new Set([...a].filter(l=>{const d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(o.required=Array.from(c)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=$e(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},kg=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>$e(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s},Ng=(e,t,r,n)=>{const o=e._zod.def,i=$e(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=$e(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=l=>"allOf"in l&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c},Ig=(e,t,r,n)=>{const o=e._zod.def,i=$e(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Og=(e,t,r,n)=>{const o=e._zod.def;$e(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Mg=(e,t,r,n)=>{const o=e._zod.def;$e(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},Dg=(e,t,r,n)=>{const o=e._zod.def;$e(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Pg=(e,t,r,n)=>{const o=e._zod.def;$e(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},xg=(e,t,r,n)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;$e(i,t,n);const s=t.seen.get(e);s.ref=i},Lg=(e,t,r,n)=>{const o=e._zod.def;$e(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},xa=(e,t,r,n)=>{const o=e._zod.def;$e(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},$g=A("ZodISODateTime",(e,t)=>{U_.init(e,t),ve.init(e,t)});function Fg(e){return Wh($g,e)}const Bg=A("ZodISODate",(e,t)=>{H_.init(e,t),ve.init(e,t)});function Ug(e){return qh(Bg,e)}const Hg=A("ZodISOTime",(e,t)=>{z_.init(e,t),ve.init(e,t)});function zg(e){return Gh(Hg,e)}const Rg=A("ZodISODuration",(e,t)=>{R_.init(e,t),ve.init(e,t)});function jg(e){return Vh(Rg,e)}const et=A("ZodError",(e,t)=>{ra.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Mm(e,r)},flatten:{value:r=>Om(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Io,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Io,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Wg=xo(et),qg=Lo(et),Gg=tn(et),Vg=rn(et),Zg=xm(et),Yg=Lm(et),Kg=$m(et),Jg=Fm(et),Qg=Bm(et),Xg=Um(et),ey=Hm(et),ty=zm(et),Ee=A("ZodType",(e,t)=>(Se.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:cn(e,"input"),output:cn(e,"output")}}),e.toJSONSchema=mg(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(bt(t,{checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),e.with=e.check,e.clone=(r,n)=>vt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Wg(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Gg(e,r,n),e.parseAsync=async(r,n)=>qg(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Vg(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Zg(e,r,n),e.decode=(r,n)=>Yg(e,r,n),e.encodeAsync=async(r,n)=>Kg(e,r,n),e.decodeAsync=async(r,n)=>Jg(e,r,n),e.safeEncode=(r,n)=>Qg(e,r,n),e.safeDecode=(r,n)=>Xg(e,r,n),e.safeEncodeAsync=async(r,n)=>ey(e,r,n),e.safeDecodeAsync=async(r,n)=>ty(e,r,n),e.refine=(r,n)=>e.check(Jy(r,n)),e.superRefine=r=>e.check(Qy(r)),e.overwrite=r=>e.check(ir(r)),e.optional=()=>Ra(e),e.exactOptional=()=>By(e),e.nullable=()=>ja(e),e.nullish=()=>Ra(ja(e)),e.nonoptional=r=>Wy(e,r),e.array=()=>ky(e),e.or=r=>Ha([e,r]),e.and=r=>Dy(e,r),e.transform=r=>qa(e,$y(r)),e.default=r=>zy(e,r),e.prefault=r=>jy(e,r),e.catch=r=>Gy(e,r),e.pipe=r=>qa(e,r),e.readonly=()=>Yy(e),e.describe=r=>{const n=e.clone();return Sr.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Sr.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Sr.get(e);const n=e.clone();return Sr.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),La=A("_ZodString",(e,t)=>{$o.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(n,o,i)=>hg(e,n,o);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(Xh(...n)),e.includes=(...n)=>e.check(rg(...n)),e.startsWith=(...n)=>e.check(ng(...n)),e.endsWith=(...n)=>e.check(og(...n)),e.min=(...n)=>e.check(an(...n)),e.max=(...n)=>e.check(Ia(...n)),e.length=(...n)=>e.check(Oa(...n)),e.nonempty=(...n)=>e.check(an(1,...n)),e.lowercase=n=>e.check(eg(n)),e.uppercase=n=>e.check(tg(n)),e.trim=()=>e.check(sg()),e.normalize=(...n)=>e.check(ig(...n)),e.toLowerCase=()=>e.check(ag()),e.toUpperCase=()=>e.check(cg()),e.slugify=()=>e.check(lg())}),ry=A("ZodString",(e,t)=>{$o.init(e,t),La.init(e,t),e.email=r=>e.check(wh(ny,r)),e.url=r=>e.check(Nh(oy,r)),e.jwt=r=>e.check(jh(by,r)),e.emoji=r=>e.check(Ih(iy,r)),e.guid=r=>e.check(Aa($a,r)),e.uuid=r=>e.check(Ch(ln,r)),e.uuidv4=r=>e.check(Ah(ln,r)),e.uuidv6=r=>e.check(Th(ln,r)),e.uuidv7=r=>e.check(kh(ln,r)),e.nanoid=r=>e.check(Oh(sy,r)),e.guid=r=>e.check(Aa($a,r)),e.cuid=r=>e.check(Mh(ay,r)),e.cuid2=r=>e.check(Dh(cy,r)),e.ulid=r=>e.check(Ph(ly,r)),e.base64=r=>e.check(Hh(hy,r)),e.base64url=r=>e.check(zh(gy,r)),e.xid=r=>e.check(xh(uy,r)),e.ksuid=r=>e.check(Lh(dy,r)),e.ipv4=r=>e.check($h(fy,r)),e.ipv6=r=>e.check(Fh(py,r)),e.cidrv4=r=>e.check(Bh(my,r)),e.cidrv6=r=>e.check(Uh(_y,r)),e.e164=r=>e.check(Rh(yy,r)),e.datetime=r=>e.check(Fg(r)),e.date=r=>e.check(Ug(r)),e.time=r=>e.check(zg(r)),e.duration=r=>e.check(jg(r))});function St(e){return Eh(ry,e)}const ve=A("ZodStringFormat",(e,t)=>{ye.init(e,t),La.init(e,t)}),ny=A("ZodEmail",(e,t)=>{O_.init(e,t),ve.init(e,t)}),$a=A("ZodGUID",(e,t)=>{N_.init(e,t),ve.init(e,t)}),ln=A("ZodUUID",(e,t)=>{I_.init(e,t),ve.init(e,t)}),oy=A("ZodURL",(e,t)=>{M_.init(e,t),ve.init(e,t)}),iy=A("ZodEmoji",(e,t)=>{D_.init(e,t),ve.init(e,t)}),sy=A("ZodNanoID",(e,t)=>{P_.init(e,t),ve.init(e,t)}),ay=A("ZodCUID",(e,t)=>{x_.init(e,t),ve.init(e,t)}),cy=A("ZodCUID2",(e,t)=>{L_.init(e,t),ve.init(e,t)}),ly=A("ZodULID",(e,t)=>{$_.init(e,t),ve.init(e,t)}),uy=A("ZodXID",(e,t)=>{F_.init(e,t),ve.init(e,t)}),dy=A("ZodKSUID",(e,t)=>{B_.init(e,t),ve.init(e,t)}),fy=A("ZodIPv4",(e,t)=>{j_.init(e,t),ve.init(e,t)}),py=A("ZodIPv6",(e,t)=>{W_.init(e,t),ve.init(e,t)}),my=A("ZodCIDRv4",(e,t)=>{q_.init(e,t),ve.init(e,t)}),_y=A("ZodCIDRv6",(e,t)=>{G_.init(e,t),ve.init(e,t)}),hy=A("ZodBase64",(e,t)=>{V_.init(e,t),ve.init(e,t)}),gy=A("ZodBase64URL",(e,t)=>{Y_.init(e,t),ve.init(e,t)}),yy=A("ZodE164",(e,t)=>{K_.init(e,t),ve.init(e,t)}),by=A("ZodJWT",(e,t)=>{Q_.init(e,t),ve.init(e,t)}),Fa=A("ZodNumber",(e,t)=>{fa.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(n,o,i)=>gg(e,n,o),e.gt=(n,o)=>e.check(ka(n,o)),e.gte=(n,o)=>e.check(Uo(n,o)),e.min=(n,o)=>e.check(Uo(n,o)),e.lt=(n,o)=>e.check(Ta(n,o)),e.lte=(n,o)=>e.check(Bo(n,o)),e.max=(n,o)=>e.check(Bo(n,o)),e.int=n=>e.check(Ba(n)),e.safe=n=>e.check(Ba(n)),e.positive=n=>e.check(ka(0,n)),e.nonnegative=n=>e.check(Uo(0,n)),e.negative=n=>e.check(Ta(0,n)),e.nonpositive=n=>e.check(Bo(0,n)),e.multipleOf=(n,o)=>e.check(Na(n,o)),e.step=(n,o)=>e.check(Na(n,o)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null}),vy=A("ZodNumberFormat",(e,t)=>{X_.init(e,t),Fa.init(e,t)});function Ba(e){return Yh(vy,e)}const Sy=A("ZodBoolean",(e,t)=>{eh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yg(e,r,n)});function Ey(e){return Kh(Sy,e)}const wy=A("ZodUnknown",(e,t)=>{th.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vg()});function Ua(){return Jh(wy)}const Cy=A("ZodNever",(e,t)=>{rh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bg(e,r,n)});function Ay(e){return Qh(Cy,e)}const Ty=A("ZodArray",(e,t)=>{nh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ag(e,r,n,o),e.element=t.element,e.min=(r,n)=>e.check(an(r,n)),e.nonempty=r=>e.check(an(1,r)),e.max=(r,n)=>e.check(Ia(r,n)),e.length=(r,n)=>e.check(Oa(r,n)),e.unwrap=()=>e.element});function ky(e,t){return ug(Ty,e,t)}const Ny=A("ZodObject",(e,t)=>{ih.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tg(e,r,n,o),de(e,"shape",()=>t.shape),e.keyof=()=>sr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ua()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ua()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ay()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>Am(e,r),e.safeExtend=r=>Tm(e,r),e.merge=r=>km(e,r),e.pick=r=>wm(e,r),e.omit=r=>Cm(e,r),e.partial=(...r)=>Nm(za,e,r[0]),e.required=(...r)=>Im(Wa,e,r[0])});function Iy(e,t){const r={type:"object",shape:e??{},...z(t)};return new Ny(r)}const Oy=A("ZodUnion",(e,t)=>{sh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kg(e,r,n,o),e.options=t.options});function Ha(e,t){return new Oy({type:"union",options:e,...z(t)})}const My=A("ZodIntersection",(e,t)=>{ah.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ng(e,r,n,o)});function Dy(e,t){return new My({type:"intersection",left:e,right:t})}const Ho=A("ZodEnum",(e,t)=>{ch.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Sg(e,n,o),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ho({...t,checks:[],...z(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ho({...t,checks:[],...z(o),entries:i})}});function sr(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Ho({type:"enum",entries:r,...z(t)})}const Py=A("ZodLiteral",(e,t)=>{lh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Eg(e,r,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xy(e,t){return new Py({type:"literal",values:Array.isArray(e)?e:[e],...z(t)})}const Ly=A("ZodTransform",(e,t)=>{uh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cg(e,r),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Vs(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(vr(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(vr(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function $y(e){return new Ly({type:"transform",transform:e})}const za=A("ZodOptional",(e,t)=>{ba.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ra(e){return new za({type:"optional",innerType:e})}const Fy=A("ZodExactOptional",(e,t)=>{dh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function By(e){return new Fy({type:"optional",innerType:e})}const Uy=A("ZodNullable",(e,t)=>{fh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ig(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ja(e){return new Uy({type:"nullable",innerType:e})}const Hy=A("ZodDefault",(e,t)=>{ph.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zy(e,t){return new Hy({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Xs(t)}})}const Ry=A("ZodPrefault",(e,t)=>{mh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function jy(e,t){return new Ry({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Xs(t)}})}const Wa=A("ZodNonOptional",(e,t)=>{_h.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Og(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Wy(e,t){return new Wa({type:"nonoptional",innerType:e,...z(t)})}const qy=A("ZodCatch",(e,t)=>{hh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Gy(e,t){return new qy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const Vy=A("ZodPipe",(e,t)=>{gh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xg(e,r,n,o),e.in=t.in,e.out=t.out});function qa(e,t){return new Vy({type:"pipe",in:e,out:t})}const Zy=A("ZodReadonly",(e,t)=>{yh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Lg(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Yy(e){return new Zy({type:"readonly",innerType:e})}const Ky=A("ZodCustom",(e,t)=>{bh.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wg(e,r)});function Jy(e,t={}){return dg(Ky,e,t)}function Qy(e){return fg(e)}const zo={custom:"custom"};function Oe(e){return Zh(Fa,e)}const Xy=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],e0=new Set([...Xy,"is_corporation"]);Iy({additional_pip:sr(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:sr(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:sr(["Primary","Secondary"]),extended_medical:sr(["cov1000","cov10000"]),policy_pip_deductible:sr(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:Ey().nullable().optional()}).superRefine((e,t)=>{e.pip_coverage_type==="Secondary"&&e.has_health_insurance_auto_accident!==!0&&t.addIssue({code:zo.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const t0=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),r0=new Set(["HomePolicy","BundlePolicy"]),n0=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function un(e){if(typeof e!="string"||!e.trim())return!1;const t=e.trim().toLowerCase();return t==="nj"||t==="n.j."||t==="n.j"||t==="new jersey"}function Ga(e){return e?un(e.state??e.State):!1}function dn(e,t,r){return e==="has_health_insurance_auto_accident"?t==="BundleCustomer"||t==="Demographics"?!1:!Ga(r):e0.has(e)?!Ga(r):e==="household_size"?!(t&&t0.has(t)):e==="number_of_mortgagees"?!(t&&r0.has(t)):(e==="has_co_applicant"||e==="co_applicant_middle_name"||e==="co_applicant_relationship")&&t&&n0.has(t)?!1:e==="multi_policy_discount"&&t==="HomePolicy"?!0:o0.has(e)}const o0=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),Va=new Date().getUTCFullYear(),fn=St().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),Za=Ha([xy(""),St().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),i0=(e,t,r)=>Oe({error:`${e} must be a number.`}).min(t,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).max(r,`${e} must be between ${t.toLocaleString()} and ${r.toLocaleString()}.`).int(`${e} must be a whole number.`),ar=(e,t)=>Oe({error:`${e} must be a number.`}).min(0,`${e} must be between 0 and ${t.toLocaleString()}.`).max(t,`${e} must be between 0 and ${t.toLocaleString()}.`).int(`${e} must be a whole number.`),pn=(e,t=1600)=>Oe({error:`${e} must be a valid 4-digit year.`}).int(`${e} must be a whole number.`).min(t,`${e} should be between ${t} and the current year.`).max(Va,`${e} cannot be in the future.`),mn=e=>Oe({error:`${e} must be a number.`}).int(`${e} must be a whole number.`).min(0,`${e} must be between 0 and 99.`).max(99,`${e} must be between 0 and 99.`),Er=(e,t,r=0)=>{const n=Math.pow(10,t)-1,o=n.toLocaleString("en-US"),i=r.toLocaleString("en-US");return Oe({error:`${e} must be a number.`}).min(r,`${e}: Value must be between ${i} and ${o}.`).max(n,`${e}: Value must be between ${i} and ${o}.`).int(`${e} must be a whole number.`)},s0={email:St().trim().min(1,"Required").email("Please enter a valid email address."),phone:St().trim().min(1,"Required").refine(e=>{let t=e.replace(/\D/g,"");return t.length===11&&t.startsWith("1")&&(t=t.slice(1)),t.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:St().trim().refine(e=>e===""||/^\d{3}-\d{2}-\d{4}$/.test(e),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:St().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:fn,last_name:fn,middle_name:Za,co_applicant_first_name:fn,co_applicant_last_name:fn,co_applicant_middle_name:Za,year_built:pn("Year built",1800),year_roof_updated:Oe({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:pn("Heating update year"),plumbing_update_year:pn("Plumbing update year"),electrical_update_year:pn("Electrical update year"),total_area_sq_ft:i0("Square footage",1,999999),sale_price_cents:Oe({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:mn("Number of years with your prior carrier"),home_continuous_coverage_years:mn("How long you have had continuous home coverage"),household_size:Oe({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:Oe({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),dwelling_replacement_cost:Er("Replacement cost",9,1),other_structures_coverage:Er("Other structures",9),personal_property_coverage:Er("Personal property",7),loss_of_use_coverage:Er("Loss of use coverage",8),years_at_address:Oe({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:Oe({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:Oe({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:Oe({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:Oe({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(e=>e>=1&&e<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:Oe({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:Oe({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:Er("Amount paid",7),license_number:St().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:St().superRefine((e,t)=>{if(typeof e!="string"||e.trim()==="")return;if(/\s/.test(e)){t.addIssue({code:zo.custom,message:"VIN cannot contain spaces."});return}const r=e.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)||t.addIssue({code:zo.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:Oe({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:Oe({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:ar("Modifications value",9999999),cost_new_value_cents:ar("Cost new value",9999999),stated_value_amount_cents:ar("Stated Value Amount",9999999),property_damage_amount_paid_cents:ar("Property damage amount paid",9999999),personal_injury_amount_paid_cents:ar("Personal injury amount paid",9999999),auto_current_annual_premium_cents:ar("Current annual premium",9999999),auto_prior_years:mn("Years with prior auto carrier"),auto_prior_months:Oe({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:mn("Years with continuous auto coverage")};function Ae(e){return new Date(`${e}T00:00:00Z`)}function Fe(){const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))}function Et(e,t){let r=t.getUTCFullYear()-e.getUTCFullYear();const n=t.getUTCMonth()-e.getUTCMonth();return(n<0||n===0&&t.getUTCDate()<e.getUTCDate())&&r--,r}const Ya=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:e=>{if(!("social_security_number"in e)||!un(e.state))return;const t=e.social_security_number;return(typeof t=="string"?t.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:e=>{const t=e.date_of_birth;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":Et(r,Fe())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:e=>{const t=e.co_applicant_date_of_birth;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":Et(r,Fe())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:e=>{const t=Number(e.year_roof_updated),r=Number(e.year_built);if(isNaN(t))return;const n=isNaN(r)?1e3:r;if(t<n||t>Va)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:e=>{const t=e.move_in_date,r=e.year_built;if(!t||r==null)return;const n=Ae(String(t));if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:e=>{const t=e.date_first_licensed;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Fe()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:e=>{const t=e.date_first_licensed,r=e.date_of_birth;if(!t||typeof t!="string"||!r||typeof r!="string")return;const n=Ae(r),o=Ae(t);if(isNaN(n.getTime())||isNaN(o.getTime()))return;if(o<n)return"Date licensed cannot be before driver date of birth.";const i=new Date(Date.UTC(n.getUTCFullYear()+16,n.getUTCMonth(),n.getUTCDate()));return o<i?"Driver must be at least 16 years old at the date first licensed.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:e=>{const t=e.occurred_at;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Fe()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:e=>{const t=e.accident_prevention_course_date;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Fe()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:e=>{const t=e.effective_date;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Fe(),o=new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth()+3,n.getUTCDate()));if(r<n)return"Insurance start date cannot be in the past.";if(r>o)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:e=>{const t=e.years_at_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Fe());return n>i?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:e=>{const t=e.years_at_prior_address,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Fe());return n>i?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:e=>{const t=e.home_prior_years,r=e.home_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:e=>{const t=e.home_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Fe());return n>i?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.home_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Fe());return n>i?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:e=>{const t=e.move_in_date;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Fe()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:e=>{const t=e.date_of_incident;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Fe();return r>n?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:e=>{const t=e.home_prior_expiration_date;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Fe(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:e=>{const t=e.purchase_date;if(!t||typeof t!="string")return;const r=Ae(t);return isNaN(r.getTime())?"Invalid date.":r>Fe()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:e=>{const t=e.purchase_date,r=e.year;if(!t||typeof t!="string"||r==null)return;const n=Ae(t);if(isNaN(n.getTime()))return;const o=Number(r);if(!isNaN(o))return n.getUTCFullYear()<o?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:e=>{const t=e.auto_prior_expiration_date;if(!t||typeof t!="string")return;const r=Ae(t);if(isNaN(r.getTime()))return"Invalid date.";const n=Fe(),o=new Date(Date.UTC(n.getUTCFullYear()-1,n.getUTCMonth(),n.getUTCDate())),i=new Date(Date.UTC(n.getUTCFullYear()+1,n.getUTCMonth(),n.getUTCDate()));if(r<o||r>i)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:e=>{const t=e.auto_prior_years,r=e.auto_continuous_coverage_years;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o)))return n>o?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:e=>{const t=e.auto_prior_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Fe());return n>i?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:e=>{const t=e.auto_continuous_coverage_years,r=e.date_of_birth;if(t==null||r==null||typeof r!="string")return;const n=Number(t);if(isNaN(n))return;const o=Ae(r);if(isNaN(o.getTime()))return;const i=Et(o,Fe());return n>i?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:e=>{const t=e.vehicle_coll_deductible,r=e.vehicle_comp_deductible;if(!(!t||typeof t!="string"||!r||typeof r!="string")&&r==="NoCoverage"&&t!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:e=>{const t=e.policy_um,r=e.policy_bi;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="Reject"||r==="Dontknow")return;const n=l=>l.endsWith("CSL"),o=n(t),i=n(r);if(o&&!i)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const s={cov30to60:30,cov50to100:50,cov100to100:100,cov100to300:100,cov250to500:250,cov300to300:300,cov500to500:500,cov100CSL:100,cov300CSL:300,cov500CSL:500},a=s[t],c=s[r];if(a!=null&&c!=null&&a>c)return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:e=>{const t=e.policy_umpd,r=e.policy_pd;if(!t||typeof t!="string"||!r||typeof r!="string"||t==="NoCoverage"||r==="Dontknow")return;const n=s=>{if(!s.startsWith("cov"))return null;const a=parseInt(s.replace("cov",""),10);return isNaN(a)?null:a},o=n(t),i=n(r);if(o!=null&&i!=null&&o>i)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:e=>{const t=e.custom_equipment_value_cents,r=e.stated_value_amount_cents;if(t==null||r==null)return;const n=Number(t),o=Number(r);if(!(isNaN(n)||isNaN(o))&&o>0&&n>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function Ro(e,t){const r=s0[e];if(!r)return;const n=r.safeParse(t);return n.success?void 0:n.error.issues[0].message}function Ka(e){if(/\s/.test(e))return!1;const t=e.trim();return t.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(t)}function a0(e,t){const r={};for(const n of Ya){if(t?.has(n.targetKey))continue;const o=n.validate(e);o&&(r[n.targetKey]=o)}return r}function jo(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function wt(e,t){return e.key??`${jo(e.question)}-${t}`}function at(e,t){return t==="number"?e==null||typeof e=="string"&&e.trim()==="":t==="checkbox"?e!==!0:e==null||typeof e=="string"&&e.trim()===""}function wr(e,t){const r={};e.forEach((s,a)=>{const c=wt(s,a),l=t[c];if(s.required&&at(l,s.inputType)){r[c]="Required";return}if(!at(l,s.inputType)){const d=Ro(c,l);if(d){r[c]=d;return}}});const n={...t};e.forEach((s,a)=>{const c=wt(s,a);c in n||(n[c]="")});const o=new Set(Object.keys(r).filter(s=>r[s])),i=a0(n,o);for(const[s,a]of Object.entries(i))r[s]=a;return r}function c0(e){if(e===""||e===null||e===void 0)return;const t=Number(e);return Number.isNaN(t)?void 0:t}const l0={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},u0={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},d0={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},f0={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},p0={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},m0={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},_0={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},h0={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},g0={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},y0={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},b0={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},v0={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},S0={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},Wo={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},E0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],w0=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],qo={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},C0=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],Ja={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},A0=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],T0=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],Qa={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},k0={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},N0={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},I0={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},O0={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},M0={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},D0={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},P0={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},x0={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},L0={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},$0={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},F0={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},B0={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},U0={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},H0={AboveGround:"Above Ground",BelowGround:"Below Ground"},z0={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},R0={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},j0={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},W0={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},q0={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},G0={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},V0={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},Z0={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},Xa={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},ec={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},tc={Female:"Female",Male:"Male"},rc={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Y0={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},K0={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},J0={Primary:"Primary",Secondary:"Secondary"},Q0={cov1000:"$1,000",cov10000:"$10,000"},X0={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},eb={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},tb={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},rb={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},nc=tb,oc=rb;function Go(e,t){if(typeof e!="string")return e;const r=e.trim();if(!r)return e;if(t[r])return r;const n=r.toLowerCase();return Object.keys(t).find(i=>i.toLowerCase()===n||t[i]?.toLowerCase()===n)??e}function _n(e){return Go(e,rc)}function ic(e){return Go(e,Qa)}function sc(e){return Go(e,oc)}function nb(e){return e.trim().toLowerCase()}function ac(e){if(typeof e!="string")return null;const t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;const r=Number(t[1]),n=Number(t[2]),o=Number(t[3]);if(!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(o)||n<1||n>12||o<1||o>31)return null;const i=new Date(Date.UTC(r,n-1,o));return i.getUTCFullYear()!==r||i.getUTCMonth()!==n-1||i.getUTCDate()!==o?null:i.getTime()}function cr(e,t){if(!t.effectiveDateKey||!t.expirationDateKey)return!1;const r=ac(e[t.expirationDateKey]),n=ac(e[t.effectiveDateKey]);return r==null||n==null?!1:r<n}const ob=new Set(["HomePolicy","BundlePolicy"]);function hn(e,t,r){return String(e.key??"")!=="lapse_in_coverage"||!r||!ob.has(r)?!0:t.home_prior_carrier_name!=="NoPriorInsurance"}function Vo(e){let t=null,r=null,n=null;const o=new Set,i=new Set,s=c=>{const l=String(c.key??""),d=nb(String(c.question??""));!t&&(l==="auto_prior_carrier_name"||l==="home_prior_carrier_name"||d.includes("current auto insurance company"))&&(t=l),!r&&(l==="effective_date"||d.includes("when do you need your insurance to begin"))&&(r=l),!n&&(l==="auto_prior_expiration_date"||l==="home_prior_expiration_date"||d.includes("when does the current policy expire"))&&(n=l),(l==="auto_reason_for_no_insurance"||d.includes("reason you are not currently insured")||d.includes("reason for lapse in coverage"))&&o.add(l),(l==="auto_prior_years"||l==="auto_prior_months"||l==="auto_continuous_coverage_years"||l==="auto_prior_expiration_date"||l==="auto_current_annual_premium_cents"||l==="auto_prior_liability_limit")&&i.add(l)};e.forEach(s);const a=c=>{c.forEach(l=>{(l.conditionals??[]).forEach(d=>{const f=d.conditionalQuestions??[];f.forEach(s),a(f)})})};return a(e),{currentCarrierKey:t,effectiveDateKey:r,expirationDateKey:n,noInsuranceReasonKeys:o,hideWhenNoPriorInsuranceKeys:i}}function Cr(e,t){return t.currentCarrierKey==="home_prior_carrier_name"&&e.home_prior_carrier_name==="NoPriorInsurance"&&e.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(t.currentCarrierKey?e[t.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!t.effectiveDateKey||!t.expirationDateKey||t.expirationDateKey==="home_prior_expiration_date"&&cr(e,t)?!1:cr(e,t)}function gn(e,t,r){const n=String(e.key??"");if(r.noInsuranceReasonKeys.has(n)&&r.currentCarrierKey==="home_prior_carrier_name"&&t.home_prior_carrier_name==="NoPriorInsurance"&&t.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const i=(r.currentCarrierKey?t[r.currentCarrierKey]:void 0)==="NoPriorInsurance";return i&&r.hideWhenNoPriorInsuranceKeys.has(n)?!1:!r.noInsuranceReasonKeys.has(n)||i?!0:Cr(t,r)}function yn(e,t){const r=String(e.key??"");return t.noInsuranceReasonKeys.has(r)}const ib=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],Zo="credify_quote_id",Yo="credify_auth_token";function cc(e){try{localStorage.setItem(Zo,e)}catch(t){console.error("Failed to save quoteId to localStorage:",t)}}function bn(){try{return localStorage.getItem(Zo)}catch(e){return console.error("Failed to load quoteId from localStorage:",e),null}}function lc(){try{localStorage.removeItem(Zo)}catch(e){console.error("Failed to clear quoteId from localStorage:",e)}}function sb(e){try{localStorage.setItem(Yo,e)}catch(t){console.error("Failed to save authToken to localStorage:",t)}}function ab(){try{return localStorage.getItem(Yo)}catch(e){return console.error("Failed to load authToken from localStorage:",e),null}}function uc(){try{localStorage.removeItem(Yo)}catch(e){console.error("Failed to clear authToken from localStorage:",e)}}function cb(){lc(),uc()}const lb="credify-insurance-widget",ub="1.0",dc=25,fc=64*1024,db=`
|
|
63
|
+
…[truncated]`;let pc=!1,mc=null,_c="",hc=dc,Ko=fc,Ar=[];function fb(e){return typeof e=="string"?e:e instanceof URL?e.href:e.url}function pb(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function gc(e){if(!e)return[];const t=[];if(Array.isArray(e))for(const[r,n]of e)t.push({name:r,value:String(n)});else if(typeof e.forEach=="function")e.forEach((r,n)=>t.push({name:n,value:r}));else for(const[r,n]of Object.entries(e))t.push({name:r,value:String(n)});return t}function mb(e){try{const t=[];return new URL(e).searchParams.forEach((r,n)=>t.push({name:n,value:r})),t}catch{return[]}}function _b(e,t){const r=t?.body;return typeof r!="string"||r.length===0?void 0:{mimeType:e.find(o=>o.name.toLowerCase()==="content-type")?.value??"application/json",text:r}}function hb(e){const t=e.length;return t<=Ko?{text:e,size:t}:{text:e.slice(0,Ko)+db,size:t}}function gb(e){Ar.push(e),Ar.length>hc&&Ar.shift()}function yb(e){if(pc)return!0;if(typeof window>"u"||typeof window.fetch!="function")return!1;_c=e.baseUrl,hc=e.maxEntries??dc,Ko=e.maxBodyBytes??fc,mc=window.fetch.bind(window);const t=mc;return window.fetch=async(r,n)=>{let o;try{o=fb(r)}catch{return t(r,n)}if(!o.startsWith(_c))return t(r,n);const i=gc(n?.headers??(typeof r!="string"&&!(r instanceof URL)?r.headers:void 0)),s={startedDateTime:new Date().toISOString(),time:-1,request:{method:pb(r,n),url:o,httpVersion:"HTTP/1.1",headers:i,queryString:mb(o),cookies:[],headersSize:-1,bodySize:typeof n?.body=="string"?n.body.length:-1,postData:_b(i,n)},response:bb(),cache:{},timings:{send:0,wait:-1,receive:0}};gb(s);const a=typeof performance<"u"?performance.now():0;let c;try{c=await t(r,n)}catch(d){const f=(typeof performance<"u"?performance.now():0)-a;throw s.time=Math.round(f),s.timings.wait=Math.round(f),s.response._error=d instanceof Error?d.message:String(d),d}const l=(typeof performance<"u"?performance.now():0)-a;s.time=Math.round(l),s.timings.wait=Math.round(l),s.response.status=c.status,s.response.statusText=c.statusText,s.response.headers=gc(c.headers),s.response.content.mimeType=typeof c.headers?.get=="function"&&c.headers.get("content-type")||"";try{c.clone().text().then(f=>{const{text:g,size:h}=hb(f);s.response.content.text=g,s.response.content.size=h,s.response.bodySize=h}).catch(()=>{})}catch{}return c},pc=!0,!0}function bb(){return{status:0,statusText:"",httpVersion:"HTTP/1.1",headers:[],cookies:[],content:{size:0,mimeType:""},redirectURL:"",headersSize:-1,bodySize:-1}}function vb(){return{log:{version:"1.2",creator:{name:lb,version:ub},entries:Ar.map(e=>({...e}))}}}function Sb(){return Ar.length}const Eb=[/ssn/i,/social.?security/i,/(driver.?licen[cs]e|^dln$|^dl$)/i,/(date.?of.?birth|^dob$)/i,/^vin$/i,/(sms.?code|^otp$|^code$|verification.?code)/i,/phone/i,/^email$/i,/(first.?name|last.?name|full.?name)/i,/(^address$|street|^zip$|postal)/i,/(jwt|^token$|authorization|^auth$|api.?key|secret|password|credential)/i,/cookie/i],wb=[/\b\d{3}-?\d{2}-?\d{4}\b/g,/\b[A-HJ-NPR-Z0-9]{17}\b/g,/eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,/\bsk_[A-Za-z0-9]{16,}\b/g,/\bBearer\s+[A-Za-z0-9._-]+/gi],Ct="[REDACTED]",Cb=8;function vn(e){for(const t of Eb)if(t.test(e))return!0;return!1}function At(e){let t=e;for(const r of wb)t=t.replace(r,Ct);return t}function Tt(e,t=0,r=new WeakSet){if(t>Cb)return Ct;if(e==null)return e;if(typeof e=="string")return At(e);if(typeof e!="object")return e;if(r.has(e))return Ct;if(r.add(e),Array.isArray(e))return e.map(i=>Tt(i,t+1,r));const n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)return e;const o={};for(const[i,s]of Object.entries(e)){if(vn(i)){o[i]=Ct;continue}o[i]=Tt(s,t+1,r)}return o}function yc(e){if(e.request&&(e.request.data!==void 0&&(e.request.data=Tt(e.request.data)),e.request.cookies!==void 0&&(e.request.cookies=Ct),e.request.headers)){const t=e.request.headers;for(const r of Object.keys(t))vn(r)&&(t[r]=Ct)}if(e.extra&&(e.extra=Tt(e.extra)),e.contexts&&(e.contexts=Tt(e.contexts)),e.tags&&(e.tags=Tt(e.tags)),e.user){const{id:t,email:r,username:n}=e.user;e.user={...typeof t=="string"?{id:t}:{},...typeof r=="string"?{email:r}:{},...typeof n=="string"?{username:n}:{}}}if(Array.isArray(e.breadcrumbs))for(const t of e.breadcrumbs)t.data!==void 0&&(t.data=Tt(t.data)),typeof t.message=="string"&&(t.message=At(t.message));return typeof e.message=="string"&&(e.message=At(e.message)),e}function bc(e){for(const t of e)t.value=vn(t.name)?Ct:At(t.value)}function vc(e){try{return JSON.stringify(Tt(JSON.parse(e)))}catch{return At(e)}}function Ab(e){const t=JSON.parse(JSON.stringify(e));for(const r of t.log.entries){bc(r.request.headers),bc(r.response.headers);for(const n of r.request.queryString)n.value=vn(n.name)?Ct:At(n.value);r.request.postData?.text&&(r.request.postData.text=vc(r.request.postData.text)),r.response.content.text&&(r.response.content.text=vc(r.response.content.text)),r.request.url=At(r.request.url),r.response._error&&(r.response._error=At(r.response._error))}return t}function lr(e,t={}){try{eo(r=>{r.setTag("failure_type","quote"),t.stage&&r.setTag("stage",t.stage),t.quoteId&&r.setTag("quote_id",t.quoteId),t.phase&&r.setTag("phase",t.phase),t.endpoint&&r.setTag("endpoint",t.endpoint),typeof t.statusCode=="number"&&r.setTag("status_code",String(t.statusCode));try{Sb()>0&&r.addAttachment({filename:"quote-failure.har",data:JSON.stringify(Ab(vb())),contentType:"application/json"})}catch{}const n=e instanceof Error?e:new Error(t.message??"Quote failed");Vr(n)})}catch{}}const we="https://api.getcredify.com";let ur=null;const Tb=6e4,Sc=new Map;function kb(e){try{return new URL(e).pathname}catch{return e}}function Ec(e,t,r){if(!(r>=500&&r<600)&&!(r===0))return;e.__sentryReported=!0;const i=kb(t),s=`${i}:${r}`,a=Date.now(),c=Sc.get(s);c&&a-c<Tb||(Sc.set(s,a),lr(e,{phase:"api_request",endpoint:i,statusCode:r}))}function Jo(e){ur=e,sb(e)}function jt(){return ur}function Qo(){const e=ab();e&&(ur=e)}function wc(){ur=null,uc()}async function Me(e,t){const r={"Content-Type":"application/json"};ur&&(r.Authorization=`Bearer ${ur}`);let n;try{n=await fetch(e,{method:"POST",headers:r,body:JSON.stringify(t)})}catch(o){const i=o instanceof Error?o:new Error(String(o));throw Ec(i,e,0),o}if(!n.ok){let o=`Request failed with status ${n.status}`;try{o=(await n.json()).error||o}catch{o=n.statusText||o}const i=new Error(o);throw i.statusCode=n.status,Ec(i,e,n.status),i}return n}async function Tr(e){try{return await e.json()}catch{return{}}}async function Nb(e,t){const r=t?{stage:e,quoteId:t}:{stage:e};return await(await Me(`${we}/get-questions-by-stage`,r)).json()}async function Sn(e){const t=e?{quoteId:e}:{};return await(await Me(`${we}/get-stages-for-quote`,t)).json()}async function Ib(e,t=!1){const r=t?{postal_code:e,is_test:!0}:{postal_code:e},o=await(await Me(`${we}/create-quote`,r)).json();if(!o||typeof o!="object"||!o.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(o)}`);return o}async function Ob(e,t){return await(await Me(`${we}/verify-quote`,{action:"send",quoteId:e,phone:t})).json()}async function Wt(e,t,r){const n={payload:e,getRates:t};r&&typeof r=="string"&&r.trim()!==""&&(n.quoteId=r);const o=await Me(`${we}/update-quote`,n),i=await Tr(o);return!i||typeof i!="object"||!("status"in i)||i.status==null?{status:"success"}:i}async function Cc(e,t){return await(await Me(`${we}/verify-quote`,{quoteId:e,smsCode:t})).json()}async function Mb(e){return await(await Me(`${we}/verify-quote`,{action:"resume",resumeToken:e})).json()}async function Ac(e,t){const r={state:e};return t&&typeof t=="string"&&t.trim()!==""&&(r.quoteId=t),await(await Me(`${we}/is-supported-state`,r)).json()}async function Xo(){return await(await Me(`${we}/get-rates`,{})).json()}async function Tc(e){const t=e?{quoteId:e}:{};return await(await Me(`${we}/get-quote`,t)).json()}async function kc(e){return(await Me(`${we}/get-vehicle-options`,e)).json()}async function Db(e){return(await Me(`${we}/get-vehicle-options`,{...e,action:"vinDecode"})).json()}async function Pb(e){const t=await Me(`${we}/get-vehicle-options`,{quoteId:e,action:"vehiclePrefillSuggestions"}),r=await Tr(t);return{suggestions:Array.isArray(r.suggestions)?r.suggestions:[]}}async function xb(e,t){const r=await Me(`${we}/get-vehicle-options`,{quoteId:e,action:"applyVehiclePrefill",selectedIds:t}),n=await Tr(r);return{items:Array.isArray(n.items)?n.items:[]}}async function Lb(e){await Me(`${we}/get-vehicle-options`,{quoteId:e,action:"dismissVehiclePrefill"})}async function $b(e){const t=await Me(`${we}/get-vehicle-options`,{quoteId:e,action:"driverPrefillSuggestions"}),r=await Tr(t);return{suggestions:Array.isArray(r.suggestions)?r.suggestions:[]}}async function Fb(e,t){const r=await Me(`${we}/get-vehicle-options`,{quoteId:e,action:"applyDriverPrefill",selectedIds:t}),n=await Tr(r);return{items:Array.isArray(n.items)?n.items:[]}}async function Bb(e){await Me(`${we}/get-vehicle-options`,{quoteId:e,action:"dismissDriverPrefill"})}async function Ub(e,t){const n=await(await Me(`${we}/request-bind`,{quoteRateId:e,privacyNoticeAcknowledged:t})).json();return n&&typeof n=="object"&&"success"in n?n:{success:!0}}const ei=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),Hb={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},Nc={auto_prior_carrier_name:l0,auto_prior_liability_limit:p0,auto_reason_for_no_insurance:m0,residence_type:u0,home_prior_carrier_name:d0,policy_bi:_0,policy_um:h0,policy_pd:g0,policy_mp:y0,policy_umpd:b0,policy_pip:v0,policy_auto_death_indemnity:S0,vehicle_comp_deductible:Wo,vehicle_coll_deductible:Wo,vehicle_towing_and_labor:qo,vehicle_transportation_expense:Ja,education_level:Qa,industry:rc,occupation:oc,usage:f0,architectural_style:k0,dwelling_type:N0,occupancy_type:I0,construction_quality:O0,construction_type:M0,foundation_type:D0,located_over_water:P0,number_of_stories:x0,exterior_wall_type:L0,roof_material_type:$0,roof_shape:F0,roof_updated_type:B0,heating_type:U0,oil_tank_location:H0,basement_type:z0,plumbing_type:R0,personal_liability:j0,dwelling_medical_payments:W0,all_perils_deductible:q0,windstorm_deductible:G0,distance_from_fire_hydrant_ft:V0,distance_from_fire_station_miles:Z0,employment_industry:Xa,marital_status:ec,gender:tc,co_applicant_employment_industry:Xa,co_applicant_marital_status:ec,co_applicant_gender:tc,description:Y0,tort_threshold:K0,pip_coverage_type:J0,extended_medical:Q0,additional_pip:X0,policy_pip_deductible:eb},zb=["OTHER / NOT LISTED"],Rb=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],jb=["Other"];function Ve(e){const t=e.getUTCFullYear(),r=String(e.getUTCMonth()+1).padStart(2,"0"),n=String(e.getUTCDate()).padStart(2,"0");return`${t}-${r}-${n}`}function Ic(e){const t=e.replace(/\D+/g,"");if(t!=="")return c0(t)}function Wb(e){return e==="-"||e==="+"||e==="."||e==="e"||e==="E"}const qb={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:7,amount_paid_cents:7,loss_of_use_coverage:8,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},Oc=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),Gb=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),En={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},Vb={license_number:20};function Zb(e){const t=new Date,r=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));if(e==="effective_date"){const n=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth()+3,r.getUTCDate()));return{min:Ve(r),max:Ve(n)}}if(e==="home_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:Ve(n),max:Ve(o)}}if(e==="date_of_incident")return{max:Ve(r)};if(e==="move_in_date")return{max:Ve(r)};if(e==="purchase_date")return{max:Ve(r)};if(e==="date_of_birth")return{max:Ve(r)};if(e==="date_first_licensed")return{max:Ve(r)};if(e==="occurred_at")return{max:Ve(r)};if(e==="accident_prevention_course_date")return{max:Ve(r)};if(e==="auto_prior_expiration_date"){const n=new Date(Date.UTC(r.getUTCFullYear()-1,r.getUTCMonth(),r.getUTCDate())),o=new Date(Date.UTC(r.getUTCFullYear()+1,r.getUTCMonth(),r.getUTCDate()));return{min:Ve(n),max:Ve(o)}}return{}}const Yb=new Set(["Disabled","Retired","Unemployed","Other"]);function ti(e,t,r){const n=String(e.key??"");if(n!=="occupation"&&n!=="co_applicant_occupation"||n==="co_applicant_occupation")return!0;const o=Be(t,r,"industry"),i=Be(t,r,"employment_industry"),s=String(o??i??"").trim();return!Yb.has(s)}function ri(e,t,r,n){return dn(e,n,r)}function wn(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function Mc(e,t){return wn(e)?"Yes":t}function Dc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Pc(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function xc(e,t){const r=Dc(e),n=Dc(t);if(r!=null&&n!=null)return r-n;const o=Pc(e),i=Pc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Kb(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function kr(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=xc(e,r);return n!=null&&n<0}case"greaterThan":{const n=xc(e,r);return n!=null&&n>0}case"contains":return Kb(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}function Nr(e,t){return t.reduce((r,n)=>r?.[n],e)}function tt(e,t,r){if(t.length===0)return e;const[n,...o]=t;if(o.length===0){if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=r,l}return{...e,[n]:r}}const i=e?.[n],s=typeof o[0]=="number"?Array.isArray(i)?i:[]:i&&typeof i=="object"?i:{},a=tt(s,o,r);if(typeof n=="number"){const l=(Array.isArray(e)?e:[]).slice();return l[n]=a,l}return{...e,[n]:a}}function Be(e,t,r){return Nr(e,[...t??[],r])}function Ue(e,t,r,n){return tt(e,[...t??[],r],n)}function Jb(e,t){return e?.length?`${e.join("-")}-${t}`:t}const Qb="__items",Cn=e=>`${e}${Qb}`;function je(e){return e==null?"":typeof e=="string"?e:String(e)}function Lc(e){return e==null?"":typeof e=="number"&&Number.isFinite(e)||typeof e=="string"?e:""}function Xb(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:String(e)}function $c({questions:e,initialValues:t,controlledValues:r,onChangeValues:n,onSubmit:o,quoteId:i,widgetStageKey:s,invalidValueKeys:a,fetchVehicleOptions:c}){const l=m.useMemo(()=>c??(y=>kc({quoteId:i,...y})),[c,i]),d=m.useMemo(()=>No(e),[e]),f=m.useMemo(()=>Vo(d),[d]),g=m.useMemo(()=>s==="BundlePolicy"?!0:d.some(y=>String(y.key)==="home_prior_carrier_name")&&d.some(y=>String(y.key)==="driver_vehicle_assignments"),[s,d]),h=m.useMemo(()=>{const y={};return t&&Object.assign(y,t),y},[t]),[b,T]=m.useState(h);m.useEffect(()=>{T(h)},[h]);const[$,O]=m.useState({}),C=m.useMemo(()=>({...$,...r??b}),[$,r,b]);m.useEffect(()=>{r&&O(y=>({...y,...r}))},[r]);const[D,U]=m.useState({}),E=m.useRef(new Map),x=m.useRef(new Set),[,R]=m.useState({}),[F,K]=m.useState({}),re=m.useRef(!1);m.useEffect(()=>{!i||re.current||!d.some(_=>_.key==="year"||_.key==="make"||_.key==="model"||_.key==="body_style")||(re.current=!0,l({}).catch(()=>{}))},[i,d,l]);const[ne,Ce]=m.useState({}),[De,X]=m.useState({}),Q=m.useCallback(async(y,_)=>{if(!i||!Ka(_))return;const p=y?y.join("-"):"_root";Ce(v=>({...v,[p]:!0})),X(v=>({...v,[p]:null}));try{const v=await Db({quoteId:i,vin:_});if(v.error){X(k=>({...k,[p]:v.error}));return}let S=C;v.year&&(S=Ue(S,y,"year",String(v.year))),v.make&&(S=Ue(S,y,"make",v.make)),v.model&&(S=Ue(S,y,"model",v.model)),v.bodyStyle&&(S=Ue(S,y,"body_style",v.bodyStyle)),r&&n?n(S):T(S),O(S),E.current.clear(),x.current.clear(),R({})}catch{X(v=>({...v,[p]:"VIN lookup failed — please enter vehicle details manually"}))}finally{Ce(v=>({...v,[p]:!1}))}},[i,C,r,n]),V=m.useCallback(y=>{const _=`${y.year}|${y.make??""}|${y.model??""}`,p=y.model?"bodyStyles":y.make?"models":"makes",v=E.current.get(_);return v?v[p]??[]:void 0},[]),me=m.useCallback((y,_)=>{if(!i)return;const p=`${_.year}|${_.make??""}|${_.model??""}`,v=_.model?"bodyStyles":_.make?"models":"makes",S=`${y}:${v}`;E.current.has(p)||x.current.has(p)||(x.current.add(p),K(k=>({...k,[S]:!0})),l(_).then(k=>{E.current.set(p,k),R(B=>({...B,[S]:k[v]??[]}))}).catch(()=>{E.current.set(p,{}),R(k=>({...k,[S]:[]}))}).finally(()=>{x.current.delete(p),K(k=>({...k,[S]:!1}))}))},[i,l]);function ge(y,_,p){const v=C,S=y?Nr(C,y)??{}:v;return y?{state:v.state,...S,[_]:p}:{...S,[_]:p}}function ke(y,_){const p=Ya.filter(S=>S.targetKey===y||S.dependsOn.includes(y)),v={[y]:void 0};for(const S of p){const k=S.validate(_);S.targetKey in v?k!==void 0&&(v[S.targetKey]=k):v[S.targetKey]=k}U(S=>({...S,...v}))}const P=(y,_,p)=>{const v=Be(C,p,y);if(at(v,_)){D[y]&&U(k=>({...k,[y]:void 0}));return}const S=Ro(y,v);if(S){U(k=>({...k,[y]:S}));return}ke(y,ge(p,y,v))};m.useEffect(()=>{let y=C,_=!1;d.forEach(p=>{if(!wn(p))return;const v=String(p.key);Be(y,void 0,v)!=="Yes"&&(y=Ue(y,void 0,v,"Yes"),_=!0)}),_&&(r&&n?n(y):T(y),O(y))},[d,C,r,n]);function L(y,_){const p=y.key;if((p==="relationship_to_insured"||p==="is_registered_owner")&&_){const w=_[_.length-1];if(typeof w=="number"&&w===0)return null}if((p==="purchase_date"||p==="cost_new_value_cents")&&_)return null;if(p==="custom_equipment_value_cents"&&_){const w=Be(C,_,"vehicle_has_modifications");if(w!=="Yes"&&w!==!0)return null}const v=p==="auto_reason_for_no_insurance"&&f.currentCarrierKey?C[f.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":y.question,S=y.hint,k=Be(C,_,p),B=yn(y,f)?Cr(C,f):p==="social_security_number"&&un(C.state??C.State)?!0:y.required,G=D[p],I=w=>{let N=Ue(C,_,p,w);if(y.inputType==="radio"&&y.conditionals){const M=y.conditionals??[];for(const H of M){const Z=Be(C,_,p),Y=kr(Z,H.conditionalType,H.conditionalValue),se=kr(w,H.conditionalType,H.conditionalValue);if(Y&&!se&&H.conditionalQuestionsAllowMultiple){const ae=H.conditionalQuestions??[];if(ae.length>0){const ie=Cn(p);N=tt(N,[..._??[],ie],[]);const j=(pe,_e)=>{pe.forEach(Pe=>{(Pe.conditionals??[]).forEach(Te=>{if(Te.conditionalQuestionsAllowMultiple){const be=Cn(Pe.key);N=tt(N,[..._e,be],[])}const Ze=Te.conditionalQuestions??[];Ze.length>0&&j(Ze,_e)})})};j(ae,[..._??[],ie])}}}}r&&n?n(N):T(N),O(N)};if(p==="vehicle_policy_selections"){const w=C.vehicles__items??[],N=C.drivers__items??[];if(w.length===0)return u.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},p);const M=C.driver_vehicle_assignments??{},H=N.length>1,Z=be=>Object.entries(be).map(([le,xe])=>({value:le,label:xe})),Y=un(C.state??C.State),se=(be,le)=>Object.fromEntries(be.filter(xe=>xe in le).map(xe=>[xe,le[xe]])),ie=Z(se(Y?E0:w0,Wo)),j=Y?se(C0,qo):qo,pe=Z(j),Pe=Z(se(Y?A0:T0,Ja)),Ne=(be,le,xe)=>{const Le=tt(C,["vehicles__items",be,le],xe);r&&n?n(Le):T(Le),O(Le)},Te=(be,le,xe)=>{const Le={...M},Ye=`v${be}`;Le[Ye]={...Le[Ye]??{}},Le[Ye][`d${le}`]=xe;const he=tt(C,["driver_vehicle_assignments"],Le);r&&n?n(he):T(he),O(he)},Ze=be=>{if(!H)return null;const le=M[`v${be}`];if(!le)return null;const xe=N.map((he,ct)=>le[`d${ct}`]??0),Le=xe.filter(he=>he>0);if(Le.length>=2&&Le.every(he=>he===Le[0])&&Le[0]===50)return`Assignments for Vehicle ${be+1} cannot be 50 percent for both Drivers.`;const Ye=xe.reduce((he,ct)=>he+ct,0);return Ye>0&&Ye!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Ye}%).`:null};return u.jsx("div",{children:w.map((be,le)=>{const xe=[be.year,be.make,be.model].filter(Boolean).join(" ")||`Vehicle ${le+1}`,Le=Ze(le),Ye=he=>typeof be[he]=="string"?be[he]:"";return u.jsxs("fieldset",{style:{border:`1px solid ${Le?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[u.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:xe}),u.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[u.jsx(yr,{id:`veh-${le}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:ie,value:Ye("vehicle_comp_deductible"),onChange:he=>Ne(le,"vehicle_comp_deductible",he.currentTarget.value)}),u.jsx(yr,{id:`veh-${le}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:ie,value:Ye("vehicle_coll_deductible"),onChange:he=>Ne(le,"vehicle_coll_deductible",he.currentTarget.value)}),u.jsx(yr,{id:`veh-${le}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:pe,value:Ye("vehicle_towing_and_labor"),onChange:he=>Ne(le,"vehicle_towing_and_labor",he.currentTarget.value)}),u.jsx(yr,{id:`veh-${le}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:Pe,value:Ye("vehicle_transportation_expense"),onChange:he=>Ne(le,"vehicle_transportation_expense",he.currentTarget.value)})]}),H&&u.jsxs("div",{style:{marginTop:"16px"},children:[u.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:N.map((he,ct)=>{const yi=[he.first_name,he.last_name].filter(Boolean).join(" ")||`Driver ${ct+1}`,it=M[`v${le}`]?.[`d${ct}`];return u.jsx("div",{style:{flex:"0 0 140px"},children:u.jsx(Ao,{id:`assignment-v${le}-d${ct}`,label:`${yi} %`,value:it??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Dr=>{const Nt=Dr.currentTarget.value.replace(/\D+/g,"");Te(le,ct,Nt===""?0:Math.min(100,parseInt(Nt,10)))}})},`${le}-${ct}`)})}),Le&&u.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:Le})]})]},le)})},p)}if(p==="driver_vehicle_assignments"){const w=C.vehicles__items??[],N=C.drivers__items??[];if(g&&N.length<=1)return null;if(w.length===0||N.length===0)return u.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},p);const M=C.driver_vehicle_assignments??{},H=(Y,se,ae)=>{const ie={...M},j=`v${Y}`;ie[j]={...ie[j]??{}},ie[j][`d${se}`]=ae,I(ie)},Z=Y=>{if(N.length<2)return null;const se=M[`v${Y}`];if(!se)return null;const ae=N.map((pe,_e)=>se[`d${_e}`]??0),ie=ae.filter(pe=>pe>0);if(ie.length>=2&&ie.every(pe=>pe===ie[0])&&ie[0]===50)return`Assignments for Vehicle ${Y+1} cannot be 50 percent for both Drivers.`;const j=ae.reduce((pe,_e)=>pe+_e,0);return j>0&&j!==100?`Driver percentages for this vehicle must add up to 100% (currently ${j}%).`:null};return u.jsxs("div",{children:[u.jsx("h4",{style:{marginBottom:"12px"},children:v}),w.map((Y,se)=>{const ae=[Y.year,Y.make,Y.model].filter(Boolean).join(" ")||`Vehicle ${se+1}`,ie=Z(se);return u.jsxs("fieldset",{style:{border:`1px solid ${ie?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[u.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:ae}),u.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:N.map((j,pe)=>{const _e=[j.first_name,j.last_name].filter(Boolean).join(" ")||`Driver ${pe+1}`,Pe=M[`v${se}`]?.[`d${pe}`];return u.jsx("div",{style:{flex:"0 0 140px"},children:u.jsx(Ao,{id:`assignment-v${se}-d${pe}`,label:`${_e} %`,value:Pe??"",min:0,max:100,step:1,inputMode:"numeric",onChange:Ne=>{const Te=Ne.currentTarget.value.replace(/\D+/g,"");H(se,pe,Te===""?0:Math.min(100,parseInt(Te,10)))}})},`${se}-${pe}`)})}),ie&&u.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:ie})]},se)})]},p)}switch(y.inputType){case"text":{if(p==="vin"&&i){const w=_?_.join("-"):"_root",N=ne[w]??!1,M=De[w]??null,H=[S?`${p}-hint`:null,G?`${p}-error`:null,M?`${p}-vin-error`:null].filter(Boolean).join(" ");return u.jsxs("div",{children:[u.jsx(Ge,{id:p,label:v,hint:S,error:G,required:B,children:u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsx("div",{className:"flex-1 min-w-0",children:u.jsx("input",{id:p,className:`form-input ${G?"input-error":""}`,"aria-invalid":!!G,"aria-describedby":H||void 0,"aria-required":B||void 0,required:B,value:je(k),maxLength:17,onChange:Z=>I(Z.currentTarget.value),onBlur:()=>P(p,"text",_),autoComplete:En[p],type:"text"})}),u.jsx("button",{type:"button",disabled:N||!Ka(je(k)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>Q(_,je(k)),children:N?"Looking up...":"Verify VIN"})]})}),M&&u.jsx("p",{id:`${p}-vin-error`,className:"text-sm text-red-600 mt-1",children:M})]},p)}if(p==="sms_code"){const w=je(k);return u.jsx(Co,{id:p,label:v,hint:S,value:w,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:N=>{const M=N.currentTarget.value.replace(/\D+/g,"").slice(0,6);I(M)},onBlur:()=>P(p,"text",_),"aria-required":B||void 0,error:G,autoComplete:En[p]},p)}if(p==="license_number")return u.jsx(Co,{id:p,label:v,hint:S,value:je(k),onChange:w=>I(w.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>P(p,"text",_),"aria-required":B||void 0,error:G,autoComplete:"off",maxLength:20},p);if(p==="social_security_number"){const w=Be(C,_,"ssn_display"),N=typeof w=="string"?w:"",M=N?`${N}. Re-enter to update.${S?` ${S}`:""}`:S;return u.jsx(nm,{id:p,label:v,hint:M,value:je(k),onChange:H=>I(H.currentTarget.value),onBlur:()=>P(p,"text",_),"aria-required":B||void 0,error:G},p)}return u.jsx(Co,{id:p,label:v,hint:S,value:je(k),onChange:w=>I(w.currentTarget.value),onBlur:()=>P(p,"text",_),"aria-required":B||void 0,error:G,autoComplete:En[p],maxLength:Vb[p]},p)}case"email":return u.jsx(om,{id:p,label:v,value:je(k),onChange:w=>I(w.currentTarget.value),onBlur:()=>P(p,"email",_),"aria-required":B||void 0,error:G},p);case"password":return u.jsx(am,{id:p,label:v,value:je(k),onChange:w=>I(w.currentTarget.value),onBlur:()=>P(p,"password",_),"aria-required":B||void 0,error:G},p);case"tel":return u.jsxs(u.Fragment,{children:[u.jsx(im,{id:p,label:v,value:je(k),onChange:w=>I(w.currentTarget.value),onBlur:()=>P(p,"tel",_),"aria-required":B||void 0,error:G},p),p==="phone"&&u.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[u.jsx("p",{children:"We verify your number before showing your quotes — you'll get a 6-digit code next. This is just to confirm your number, not a sales call."}),u.jsx("p",{children:"Message & data rates may apply. One message per request."}),u.jsxs("p",{children:["See our"," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return u.jsx(sm,{id:p,label:v,value:je(k),onChange:w=>I(w.currentTarget.value),onBlur:()=>P(p,"url",_),"aria-required":B||void 0,error:G},p);case"number":{const w=qb[p];return Oc.has(p)||Gb.has(p)?u.jsx(rm,{id:p,label:v,hint:S,value:Lc(k),isCurrency:Oc.has(p),maxDigits:w,onChange:N=>I(Ic(N.currentTarget.value)),onBlur:()=>P(p,"number",_),"aria-required":B||void 0,error:G},p):u.jsx(Ao,{id:p,label:v,hint:S,value:Lc(k),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:N=>{if(Wb(N.key)){N.preventDefault();return}w!==void 0&&/^\d$/.test(N.key)&&String(N.currentTarget.value).replace(/\D/g,"").length>=w&&N.preventDefault()},onChange:N=>{let M=N.currentTarget.value;w!==void 0&&(M=M.slice(0,w)),I(Ic(M))},onBlur:()=>P(p,"number",_),"aria-required":B||void 0,error:G},p)}case"textarea":return u.jsx(cm,{id:p,label:v,value:je(k),onChange:w=>I(w.currentTarget.value),onBlur:()=>P(p,"textarea",_),"aria-required":B||void 0,error:G,rows:4},p);case"date":{const{min:w,max:N}=Zb(p);return u.jsx(lm,{id:p,label:v,hint:S,value:je(k),min:w,max:N,onChange:M=>{const H=M.currentTarget.value;I(H),!at(H,"date")&&!Ro(p,H)&&ke(p,ge(_,p,H))},onBlur:()=>P(p,"date",_),"aria-required":B||void 0,error:G,autoComplete:En[p]},p)}case"checkbox":{if(y.options){const w=Array.isArray(k)?k:[];return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"form-label",children:[v,B&&u.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:y.options.map(N=>{const M=`${p}-${jo(N)}`,H=w.includes(N);return u.jsx(Ut,{id:M,label:N,checked:H,onChange:Z=>{const Y=new Set(w);Z.currentTarget.checked?Y.add(N):Y.delete(N),I(Array.from(Y))},"aria-required":B||void 0},M)})}),G&&u.jsx("p",{className:"mt-1 text-sm text-red-600",children:G})]},p)}return u.jsx(Ut,{id:p,label:B?`${v} *`:v,checked:!!k,onChange:w=>I(w.currentTarget.checked),"aria-required":B||void 0},p)}case"radio":{if(wn(y))return null;const w=y.options??[],N=_&&_.length>0?`${p}__${_.join("__")}`:p;return u.jsx(fm,{legend:v,legendClassName:B?"legend-required":void 0,children:w.map(M=>u.jsx(dm,{name:N,value:M,checked:k===M,onChange:()=>{I(M),ke(p,ge(_,p,M))},children:Nc[p]?.[M]??M},`${p}-${jo(M)}`))},p)}case"select":{let w=y.options??[];p==="quote_vehicle_id"&&(w=r?.vehicles__items?.map(ae=>ae.vin)??[]);let N=!1,M,H,Z;if(p==="year"||p==="make"||p==="model"||p==="body_style"){const ae=_?_.join("-"):"_root";ne[ae]&&(N=!0,M="Looking up VIN...")}if(!N&&(p==="make"||p==="model"||p==="body_style")){const ae=_?_.join("-"):"_root";Z=ae;const ie=Be(C,_,"year"),j=typeof ie=="number"?ie:Number(ie);if(p==="make"){const pe=`${ae}:makes`;if(!j||!Number.isFinite(j))N=!0,M="Select a year first";else{H={year:j};const _e=V(H);_e&&_e.length>0?w=_e:F[pe]?(N=!0,M="Loading makes..."):w=[...ib]}typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}else if(p==="model"){const pe=`${ae}:models`,_e=String(Be(C,_,"make")??"");if(!_e)N=!0,M="Select a make first";else if(j&&Number.isFinite(j)){H={year:j,make:_e};const Pe=V(H);Pe&&Pe.length>0?w=Pe:F[pe]?(N=!0,M="Loading models..."):w=[...zb]}typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}else{const pe=`${ae}:bodyStyles`,_e=String(Be(C,_,"make")??""),Pe=String(Be(C,_,"model")??"");if(!Pe)N=!0,M="Select a model first";else if(j&&Number.isFinite(j)&&_e){H={year:j,make:_e,model:Pe};const Ne=V(H);Ne&&Ne.length>0?w=Ne:F[pe]?(N=!0,M="Loading body styles..."):w=[...Rb]}typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}}if(p==="occupation"||p==="co_applicant_occupation"){const ae=p==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,ie=ae?void 0:Be(C,_,"industry"),j=Be(C,_,ae??"employment_industry"),_e=String(_n(ie??j)??"").trim();w=[...nc[_e]??jb],typeof k=="string"&&k&&!w.includes(k)&&(w=[k,...w])}const Y=Jb(_,p),se=a?.has([..._??[],p].join("."))??!1;return u.jsx(yr,{id:Y,label:M?`${v} — ${M}`:v,"aria-required":B||void 0,error:G,disabled:N,value:se?"":Xb(k),onChange:ae=>{const ie=ae.currentTarget.value;if(p!=="year"&&p!=="make"&&p!=="model"&&p!=="industry"&&p!=="employment_industry"&&p!=="co_applicant_employment_industry"){I(ie),ke(p,ge(_,p,ie));return}let j=Ue(C,_,p,ie);if(p==="year")j=Ue(j,_,"make",""),j=Ue(j,_,"model",""),j=Ue(j,_,"body_style","");else if(p==="make")j=Ue(j,_,"model",""),j=Ue(j,_,"body_style","");else if(p==="model")j=Ue(j,_,"body_style","");else if(p==="industry"||p==="employment_industry")j=Ue(j,_,"occupation","");else if(p==="co_applicant_employment_industry"){const _e=String(_n(ie)??"").trim(),Pe=nc[_e]??[],Ne=Pe.find(Te=>Te===_e)??Pe[0]??"";j=Ue(j,_,"co_applicant_occupation",Ne??"")}r&&n?n(j):T(j),O(j);const pe=_?Nr(j,_)??{}:j;ke(p,{...pe,[p]:ie})},placeholder:M??"Select an option",onFocus:H&&Z?()=>me(Z,H):void 0,options:w.map(ae=>({value:ae,label:Nc[p]?.[ae]??Hb[ae]??ae}))},Y)}case"address":return u.jsx(hm,{id:p,label:v,value:je(k),onChange:(w,N)=>{let M=Ue(C,_,p,w);const H=N?.state??(typeof w=="string"?w.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(H){const Z=_?[..._,"state"]:["state"];M=tt(M,Z,H)}if(!_){const Z=N?.zipCode??(typeof w=="string"?w.match(/,\s*[A-Z]{2}\s+(\d{5})(?:-\d{4})?\b/)?.[1]:void 0);Z&&(M=tt(M,["postal_code"],Z))}r&&n?n(M):T(M),O(M)},onBlur:()=>P(p,"address",_),required:B,"aria-required":B||void 0,error:G},p);default:return null}}function J(y,_){const p=y.some(S=>String(S.key)==="years_at_address"),v=y.find(S=>String(S.key)==="months_at_address");return y.map((S,k)=>{const B=String(S.key);if(B==="months_at_address"&&p||!gn(S,C,f)||!ti(S,C,_)||!hn(S,C,s))return null;if(ri(B,S,C,s)){const Z=f.currentCarrierKey?C[f.currentCarrierKey]:void 0;if(!(Z&&Z!=="NoPriorInsurance"&&cr(C,f)&&ei.has(B)))return null}const G=L(S,_),I=B==="years_at_address"&&v?L(v,_):null,w=S.conditionals??[];if(!w.length)return s==="BundlePolicy"&&B==="policy_bi"?u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),G]},`wrap-${B}-${k}`):u.jsxs("div",{children:[G,I]},`wrap-${B}-${k}`);const N=Mc(S,Be(C,_,B)),M=w.filter(Z=>kr(N,Z.conditionalType,Z.conditionalValue)),H=M.length>1&&!M.some(Z=>Z.conditionalQuestionsAllowMultiple)?M.slice(0,1):M;return u.jsxs("div",{children:[G,I,H.map((Z,Y)=>{const se=Z.conditionalQuestions??[];if(!se.length)return null;if(!Z.conditionalQuestionsAllowMultiple)return u.jsx("div",{className:"mt-3",children:J(se,_)},`branch-${B}-${Y}`);const ae=Cn(B),ie=Nr(C,[..._??[],ae])??[],j=Math.max(1,ie.length||1),pe=()=>{const Ne=tt(C,[..._??[],ae,ie.length],{});r&&n?n(Ne):T(Ne),O(Ne)},_e=()=>{const Ne=ie.slice(0,Math.max(0,ie.length-1)),Te=tt(C,[..._??[],ae],Ne);r&&n?n(Te):T(Te),O(Te)},Pe=`${B}__c${Y}`;return u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),u.jsxs("div",{className:"space-x-2",children:[u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:pe,children:"Add another"}),j>1&&u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:_e,children:"Remove last"})]})]}),Array.from({length:j}).map((Ne,Te)=>{const Ze=[..._??[],ae,Te],be=`${Pe}__i${Te}`,le=ie[Te]??{},xe=B==="drivers",he=xe?`Driver #${Te+1}`:B==="vehicles"?`Vehicle #${Te+1}`:B==="home_losses"||B==="losses"?`Loss #${Te+1}`:`Entry #${Te+1}`,yi=xe&&typeof le.ssn_display=="string"&&le.ssn_display?` — ${le.ssn_display}`:"";return u.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[u.jsxs("div",{className:"text-sm font-semibold mb-2",children:[he,yi]}),se.map(it=>{const Dr=String(it.key);if(!gn(it,C,f)||!ti(it,C,Ze)||!hn(it,C,s))return null;if(ri(Dr,it,C,s)){const Nt=f.currentCarrierKey?C[f.currentCarrierKey]:void 0;if(!(Nt&&Nt!=="NoPriorInsurance"&&cr(C,f)&&ei.has(Dr)))return null}return u.jsxs("div",{className:"mt-3",children:[L(it,Ze),(()=>{const Nt=it.conditionals??[];if(!Nt.length)return null;const Ll=Be(C,Ze,it.key),Ln=Nt.filter(Vt=>kr(Ll,Vt.conditionalType,Vt.conditionalValue));return(Ln.length>1&&!Ln.some(Vt=>Vt.conditionalQuestionsAllowMultiple)?Ln.slice(0,1):Ln).map((Vt,bi)=>{const vi=Vt.conditionalQuestions??[];if(!vi.length)return null;if(!Vt.conditionalQuestionsAllowMultiple)return u.jsx("div",{className:"mt-3",children:J(vi,Ze)},`nested-${be}-${bi}`);const $n=Cn(it.key),Fn=Nr(C,[...Ze,$n])??[],$l=Math.max(1,Fn.length||1),EE=()=>{const pr=tt(C,[...Ze,$n,Fn.length],{});r&&n?n(pr):T(pr),O(pr)},wE=()=>{const pr=Fn.slice(0,Math.max(0,Fn.length-1)),Zt=tt(C,[...Ze,$n],pr);r&&n?n(Zt):T(Zt),O(Zt)};return u.jsxs("div",{className:"mt-3",children:[u.jsxs("div",{className:"flex items-center justify-between mb-2",children:[u.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),u.jsxs("div",{className:"space-x-2",children:[u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:EE,children:"Add another"}),$l>1&&u.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:wE,children:"Remove last"})]})]}),Array.from({length:$l}).map((pr,Zt)=>{const CE=[...Ze,$n,Zt];return u.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[u.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",Zt+1]}),J(vi,CE)]},`nested-item-${be}-${bi}-${Zt}`)})]},`nested-repeat-${be}-${bi}`)})})()]},`${be}-${Dr}`)})]},`group-${be}`)})]},`branch-${B}-${Y}`)})]},`wrap-${B}-${k}`)})}const ee=m.useMemo(()=>{const y=[],_=(p,v)=>{p.forEach(S=>{if(!gn(S,C,f)||!ti(S,C,v)||!hn(S,C,s))return;const k=String(S.key);if(ri(k,S,C,s)){const N=f.currentCarrierKey?C[f.currentCarrierKey]:void 0;if(!(N&&N!=="NoPriorInsurance"&&cr(C,f)&&ei.has(k)))return}wn(S)||y.push(S);const B=S.conditionals??[];if(!B.length)return;const G=Mc(S,Be(C,v,k)),I=B.filter(N=>kr(G,N.conditionalType,N.conditionalValue));(I.length>1&&!I.some(N=>N.conditionalQuestionsAllowMultiple)?I.slice(0,1):I).forEach(N=>{const M=N.conditionalQuestions??[];M.length&&(N.conditionalQuestionsAllowMultiple||_(M,v))})})};return _(d),y},[d,C,f,s]);function oe(y){y.preventDefault();const _=Cr(C,f),p=ee.map(S=>yn(S,f)?{...S,required:_}:S),v=wr(p,C);if(U(v),Object.keys(v).length>0){const S=ee.findIndex(k=>v[k.key]);S>=0&&document.getElementById(ee[S].key)?.focus();return}o(C)}return u.jsx("form",{className:"space-y-6 px-1",onSubmit:oe,noValidate:!0,children:J(d)})}function Fc({title:e,description:t,applyLabel:r,dismissLabel:n,alreadyOnApplicationNote:o,suggestions:i,isApplying:s,onApply:a,onDismiss:c}){const[l,d]=m.useState(new Set),f=i.length>0&&i.every(T=>l.has(T.id)),g=m.useMemo(()=>i.some(T=>T.alreadyOnApplication),[i]),h=T=>{d($=>{const O=new Set($);return O.has(T)?O.delete(T):O.add(T),O})},b=()=>{d(f?new Set:new Set(i.map(T=>T.id)))};return u.jsxs("div",{className:"prefill-suggestions-modal fixed inset-0 z-[10000] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"prefill-suggestions-title",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsxs("div",{className:"modal-panel bg-white relative w-full max-w-lg max-h-[85vh] overflow-y-auto",role:"document",children:[u.jsxs("div",{className:"text-center mb-6",children:[u.jsx("h2",{id:"prefill-suggestions-title",className:"h1-title",children:e}),u.jsx("p",{className:"text-sm text-slate-600 mt-3",children:t})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-left mb-4",children:[i.map(T=>u.jsx(Ut,{id:`prefill-suggestion-${T.id}`,label:T.alreadyOnApplication?`${T.label} *`:T.label,checked:l.has(T.id),disabled:s,onChange:()=>h(T.id)},T.id)),i.length>1&&u.jsx(Ut,{id:"prefill-suggestion-select-all",label:"Select All",checked:f,disabled:s,onChange:b})]}),g&&u.jsx("p",{className:"text-xs text-slate-500 mb-4 text-left",children:o??"* This entry is already on the application; selecting it will fill in available data that does not exist on the application."}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mt-6",children:[u.jsx("button",{type:"button","data-widget-ctrl":"prefill-dismiss",onClick:c,disabled:s,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:n}),u.jsxs("button",{type:"button","data-widget-ctrl":"prefill-apply",onClick:()=>a(Array.from(l)),disabled:l.size===0||s,className:["form-wizard-next-btn","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",l.size===0||s?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[s&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]})]})]})]})}const ev="https://getcredify.com/privacy-policy";function tv(){return u.jsx("a",{href:ev,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function Bc(){return u.jsxs(u.Fragment,{children:["See our ",u.jsx(tv,{})," for how we use your information."]})}const rv=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),nv=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function ov({stageKey:e}){return e?e==="Zip"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):e==="Email"?u.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[u.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),u.jsx("p",{children:u.jsx(Bc,{})})]}):nv.has(e)?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):e==="Ssn"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):e==="SMSVerification"?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):rv.has(e)?u.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:u.jsx(Bc,{})}):null:null}function Uc(e){const t=new Map,r=new Map,n=o=>{let i=t.get(o);return i||(i=e(o).then(s=>(r.set(o,s.suggestions),s.suggestions)).catch(s=>{throw t.delete(o),s}),t.set(o,i)),i};return{fetch:n,peek:o=>r.get(o),prefetch:o=>{n(o).catch(()=>{})},reset:()=>{t.clear(),r.clear()}}}const ni=Uc(Pb),oi=Uc($b),iv=ni.fetch,sv=ni.peek,av=ni.prefetch,cv=oi.fetch,lv=oi.peek,uv=oi.prefetch,dv=["vin","year","make","model"];function fv(e){if(!e||typeof e!="object")return!0;const t=e;return dv.every(r=>{const n=t[r];return n==null||String(n).trim()===""})}function pv(e,t){if(t.length===0)return e;const r=e.vehicles__items??[],n=r.filter(s=>!fv(s)),o=new Set(n.map(s=>String(s.vin??"").trim().toUpperCase()).filter(s=>s!=="")),i=t.filter(s=>{const a=String(s.vin??"").trim().toUpperCase();return a===""||!o.has(a)});return i.length===0&&n.length===r.length?e:{...e,vehicles:"Yes",vehicles__items:[...n,...i]}}const mv=["first_name","last_name","date_of_birth"];function Hc(e){if(!e||typeof e!="object")return!0;const t=e;return mv.every(r=>{const n=t[r];return n==null||String(n).trim()===""})}function zc(e){return`${String(e.first_name??"").trim()} ${String(e.last_name??"").trim()}`.trim().toUpperCase()}function _v(e,t){if(t.length===0)return e;const r=e.drivers__items??[],n=r.filter(s=>!Hc(s)),o=new Set(n.map(zc).filter(s=>s!=="")),i=t.filter(s=>{const a=zc(s);return a===""||!o.has(a)});return i.length===0&&n.length===r.length?e:{...e,drivers:"Yes",drivers__items:[...n,...i]}}function hv(e){return(e.drivers__items??[]).some(r=>!Hc(r))}const dr={};function gv(e){let t=dr[e];return t||(t=new Set,dr[e]=t),t}function Rc(e,t){gv(e).add(t)}function jc(e,t){dr[e]?.delete(t)}function kt(e,...t){const r=dr[e];if(!r||r.size===0)return;const n=t[0],o={quoteId:bn(),timestamp:Date.now()};for(const i of[...r])try{i(n,o)}catch(s){Vr(s,{tags:{source:"widget-event-listener",event:e}})}}function yv(){for(const e of Object.keys(dr))delete dr[e]}function bv(){kt("widgetOpened")}function Wc(){kt("widgetClosed")}function vv(e){kt("stageViewed",e)}function qc(e){kt("stageCompleted",e)}function Sv(){kt("flowCompleted")}function Ev(e){kt("ratesViewed",e)}function wv(){kt("ratesBack")}function Ir(e){kt("submissionFailed",e)}const Gc=new Set(["Disabled","Retired","Unemployed","Other"]);function Cv(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!Gc.has(i)}function Av(e,t){const r=String(e.key??"");if(r==="co_applicant_occupation"||r!=="occupation")return!0;const n=t.industry,o=t.employment_industry,i=String(n??o??"").trim();return!Gc.has(i)}function Vc(e){return e.inputType!=="radio"||!e.options||e.options.length!==1||e.options[0]!=="Yes"?!1:(e.conditionals??[]).some(r=>r.conditionalQuestionsAllowMultiple&&r.conditionalType==="equals"&&r.conditionalValue==="Yes")}function ii(e,t){return Vc(e)?"Yes":t}function Zc(e){return typeof e=="number"&&Number.isFinite(e)?e:typeof e=="string"&&e.trim()!==""&&!Number.isNaN(Number(e))?Number(e):null}function Yc(e){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e.getTime();if(typeof e=="string"){const t=Date.parse(e);return Number.isNaN(t)?null:t}return null}function Kc(e,t){const r=Zc(e),n=Zc(t);if(r!=null&&n!=null)return r-n;const o=Yc(e),i=Yc(t);return o!=null&&i!=null?o-i:e==null||t==null?null:String(e).localeCompare(String(t))}function Tv(e,t){return Array.isArray(e)?e.some(r=>r===t):typeof e=="string"?t!=null&&e.includes(String(t)):!1}function si(e,t,r){switch(t){case"equals":return e===r;case"notEquals":return e!==r&&e!==""&&e!=null;case"lessThan":{const n=Kc(e,r);return n!=null&&n<0}case"greaterThan":{const n=Kc(e,r);return n!=null&&n>0}case"contains":return Tv(e,r);case"startsWith":return e!=null&&r!=null&&String(e).startsWith(String(r));case"endsWith":return e!=null&&r!=null&&String(e).endsWith(String(r));default:return!1}}const kv=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function Or(e,t,r){const n=No([...e]),o=Vo(n),i=[],s=a=>{a.forEach(c=>{if(!gn(c,t,o)||!Cv(c,t)||!hn(c,t,r))return;const l=String(c.key);if(dn(l,r,t)){const b=o.currentCarrierKey?t[o.currentCarrierKey]:void 0;if(!(b&&b!=="NoPriorInsurance"&&cr(t,o)&&kv.has(l)))return}Vc(c)||i.push(c);const d=ii(c,t[l]),f=c.conditionals??[];if(!f.length)return;const g=f.filter(b=>si(d,b.conditionalType,b.conditionalValue));(g.length>1&&!g.some(b=>b.conditionalQuestionsAllowMultiple)?g.slice(0,1):g).forEach(b=>{const T=b.conditionalQuestions??[];T.length&&(b.conditionalQuestionsAllowMultiple||s(T))})})};return s(n),i}const Jc="__items",An=e=>`${e}${Jc}`;function Nv(e,t){if(e.key==="relationship_to_insured"||e.key==="is_registered_owner"){const r=t[t.length-1];return typeof r=="number"&&r===0}return!1}function Tn(e,t,r,n=[],o=void 0,i=t){for(const s of e){const a=String(s.key),c=ii(s,t[a]),l=s.conditionals??[];if(!l.length)continue;const d=l.filter(g=>si(c,g.conditionalType,g.conditionalValue)),f=d.length>1&&!d.some(g=>g.conditionalQuestionsAllowMultiple)?d.slice(0,1):d;for(const g of f){const h=g.conditionalQuestions??[];if(!h.length)continue;if(!g.conditionalQuestionsAllowMultiple){Tn(h,t,r,n,o,i);continue}if(dn(a,o,i))continue;const b=t[An(a)]??[];if(b.length===0){r.push({groupKey:a,index:-1,fieldKey:"",fieldLabel:"",message:"At least one entry is required"});continue}for(const[T,$]of b.entries()){const O=[...n,An(a),T],C=Or(h,$,o).filter(x=>!(Nv(x,O)||!Av(x,$))),D={state:i.state,...$},U=wr(C,D),E=new Map(C.map((x,R)=>[wt(x,R),x.question??""]));for(const[x,R]of Object.entries(U))R&&r.push({groupKey:a,index:T,fieldKey:x,fieldLabel:E.get(x)??x,message:R});Tn(h,$,r,O,o,i)}}}}function Iv(e,t,r){const n=[];return Tn(e,t,n,[],r,t),n}function Qc(e,t,r){const n=[];return Tn(e,t,n,[],r,t),n.length>0}function ai(e,t,r,n){for(const o of e){const i=String(o.key),s=ii(o,t[i]),a=o.conditionals??[];if(!a.length)continue;const c=a.filter(d=>si(s,d.conditionalType,d.conditionalValue)),l=c.length>1&&!c.some(d=>d.conditionalQuestionsAllowMultiple)?c.slice(0,1):c;for(const d of l){const f=d.conditionalQuestions??[];if(!f.length)continue;if(!d.conditionalQuestionsAllowMultiple){ai(f,t,r,n);continue}if(dn(i,r,t))continue;const g=t[An(i)]??[];for(const[h,b]of g.entries())typeof b!="object"||b===null||(n(Or(f,b,r),b,{groupKey:i,index:h}),ai(f,b,r,n))}}}function ci(e){const t=e.vehicles__items??[];if(!Array.isArray(t)||t.length===0)return!1;for(const r of t)if(at(r.vehicle_comp_deductible,"select")||at(r.vehicle_coll_deductible,"select")||at(r.vehicle_towing_and_labor,"select")||at(r.vehicle_transportation_expense,"select"))return!0;return!1}function Xc({targetStage:e,stageKey:t,quoteId:r,fetchSuggestions:n,peekSuggestions:o,applySelection:i,dismissSelection:s,mergeItems:a,setAllValues:c,shouldSkip:l}){const[d,f]=m.useState(null),[g,h]=m.useState(!1),[b,T]=m.useState(!1),$=m.useRef(new Set);return m.useEffect(()=>{if(t!==e||!r||$.current.has(r))return;if(l?.()){$.current.add(r);return}const D=o(r);if(D!==void 0){D.length>0?f(D):$.current.add(r);return}let U=!1;return T(!0),n(r).then(E=>{E.length===0&&$.current.add(r),!U&&E.length>0&&f(E)}).catch(()=>{$.current.add(r)}).finally(()=>{U||T(!1)}),()=>{U=!0,T(!1)}},[t,r,e]),{suggestions:d,isApplying:g,isPending:b,handleApply:async D=>{if(r){h(!0);try{const{items:U}=await i(r,D);U.length>0&&c(E=>a(E,U))}catch{}finally{$.current.add(r),h(!1),f(null)}}},handleDismiss:()=>{r&&($.current.add(r),s(r).catch(()=>{})),f(null)}}}function Ov({stages:e,onStageComplete:t,onComplete:r,initialValues:n,initialActive:o,quoteId:i,nonTerminalStageKeys:s}){const[a,c]=m.useState(o??0),[l,d]=m.useState(n??{}),[f,g]=m.useState({}),[h,b]=m.useState(!1),[T,$]=m.useState(!1),[O,C]=m.useState(null),D=m.useRef([]),U=m.useRef(e),E=Array.isArray(e)&&e.length>0,x=E?Math.min(a,e.length-1):0,R=E?e[x]:null,F=R?.key??null,K=m.useRef(l);K.current=l;const re=Xc({targetStage:"Vehicle",stageKey:F,quoteId:i,fetchSuggestions:iv,peekSuggestions:sv,applySelection:xb,dismissSelection:Lb,mergeItems:pv,setAllValues:d}),ne=Xc({targetStage:"Driver",stageKey:F,quoteId:i,fetchSuggestions:cv,peekSuggestions:lv,applySelection:Fb,dismissSelection:Bb,mergeItems:_v,setAllValues:d,shouldSkip:()=>hv(K.current)}),Ce=F==="Vehicle"&&re.isPending||F==="Driver"&&ne.isPending;m.useEffect(()=>{o!==void 0&&c(o)},[o]),U.current=e;const De=m.useMemo(()=>{const L=x>=e.length-1;return L&&F&&s?.has(F)?!1:!!(L||e.slice(x+1).every(ee=>ee.key==="AutoPolicy")&&(l.drivers__items??[]).length<=1)},[x,e,l,F,s]);m.useEffect(()=>{E&&a>=e.length&&c(e.length-1)},[a,e.length,E]),m.useEffect(()=>{const L=D.current[x];L&&L.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[x]),m.useEffect(()=>{n!==void 0&&d(n)},[n]),m.useEffect(()=>{if(!R||!F){b(!1),C(null);return}if(f[F]){b(!1),C(null);return}let L=!1;return b(!0),C(null),Promise.resolve(R.loadQuestions()).then(J=>{if(!L){if(!Array.isArray(J))throw new Error(`loadQuestions("${F}") did not return an array`);g(ee=>({...ee,[F]:J}))}}).catch(J=>{L||C(`Failed to load stage "${R?.title??""}": ${J?.message??"Unknown error"}`)}).finally(()=>{L||b(!1)}),()=>{L=!0}},[R,F,f]);const X=F?f[F]:void 0,Q=m.useMemo(()=>Vo(No(X??[])),[X]);m.useEffect(()=>{R&&F&&X&&vv({stageKey:F,stageTitle:R.title??F,stepIndex:a+1,totalSteps:e.length})},[F,a,e.length,R,X]);const V=m.useMemo(()=>{if(!X)return{};const L={};(oe=>{const y=[],_=p=>{p.forEach((v,S)=>{const k=wt(v,S);y.push(k);const B=An(k);y.push(B),(v.conditionals??[]).forEach(I=>{const w=I.conditionalQuestions??[];w.length>0&&_(w)})})};return _(oe),y})(X).forEach(oe=>{oe in l&&(L[oe]=l[oe])});for(const oe of["state","State","address","product"])oe in l&&(L[oe]=l[oe]);for(const[oe,y]of Object.entries(l))oe.endsWith(Jc)&&!(oe in L)&&(L[oe]=y);return L},[X,l]),me=L=>{d(J=>({...J,...L}))},ge=()=>{c(L=>L>0?L-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},ke=async()=>{if(!X||!R||h||O||T||Ce)return;const L=Or(X,V,F??void 0),J=Cr(l,Q),ee=L.map(I=>yn(I,Q)?{...I,required:J}:I),oe=wr(ee,V),y=new Set(ee.map((I,w)=>wt(I,w))),_=Object.entries(oe).some(([I,w])=>w&&y.has(I)),p=Qc(X,l,F??void 0),S=L.some(I=>String(I.key??"")==="vehicle_policy_selections")?ci(l):!1,k=l.driver_vehicle_assignments,B=l.drivers__items??[];let G=!1;if(k&&B.length>=2){const I=l.vehicles__items??[];for(let w=0;w<I.length;w++){const N=k[`v${w}`];if(!N)continue;const M=B.map((Y,se)=>N[`d${se}`]??0),H=M.filter(Y=>Y>0);if(H.length>=2&&H.every(Y=>Y===50)){G=!0;break}const Z=M.reduce((Y,se)=>Y+se,0);if(Z>0&&Z!==100){G=!0;break}}}if(!(_||p||S||G)){$(!0);try{const I=De,w=I?await r(l,F??""):await t(V,F??""),{success:N,error:M}=w;if(!N){C(M??"An error occurred");return}if(!I){const H=w.latestStages??U.current,Z=H.findIndex(se=>se.key===F),Y=Z>=0?Math.min(Z+1,H.length-1):Math.min(a+1,H.length-1);c(Y)}}finally{$(!1)}}},P=m.useMemo(()=>{if(!X||h||O||T||Ce)return!0;const L=Or(X,V,F??void 0),J=Cr(l,Q),ee=L.map(I=>yn(I,Q)?{...I,required:J}:I),oe=wr(ee,V),y=new Set(ee.map((I,w)=>wt(I,w))),_=Object.entries(oe).some(([I,w])=>w&&y.has(I)),p=Qc(X,l,F??void 0),S=L.some(I=>String(I.key??"")==="vehicle_policy_selections")?ci(l):!1,k=l.driver_vehicle_assignments,B=l.drivers__items??[];let G=!1;if(k&&B.length>=2){const I=l.vehicles__items??[];for(let w=0;w<I.length;w++){const N=k[`v${w}`];if(!N)continue;const M=B.map((Y,se)=>N[`d${se}`]??0),H=M.filter(Y=>Y>0);if(H.length>=2&&H.every(Y=>Y===50)){G=!0;break}const Z=M.reduce((Y,se)=>Y+se,0);if(Z>0&&Z!==100){G=!0;break}}}return _||p||S||G},[X,V,l,h,O,T,Q,F,Ce]);return E?u.jsxs("div",{className:"space-y-6",children:[F==="Vehicle"&&re.suggestions&&re.suggestions.length>0&&u.jsx(Fc,{title:"Select your vehicles",description:"We found the vehicles below at your address. Select the ones you'd like to add to your quote, or add them manually.",applyLabel:"Add selected vehicles",dismissLabel:"Add manually",alreadyOnApplicationNote:"* This vehicle is already on the application; selecting it will fill in available data that does not exist on the application.",suggestions:re.suggestions,isApplying:re.isApplying,onApply:re.handleApply,onDismiss:re.handleDismiss}),F==="Driver"&&ne.suggestions&&ne.suggestions.length>0&&u.jsx(Fc,{title:"Additional drivers",description:"We found the drivers below at your address. Select the ones you'd like to add to your quote, or add them manually.",applyLabel:"Add selected drivers",dismissLabel:"Add manually",alreadyOnApplicationNote:"* This driver is already on the application; selecting them will fill in available data that does not exist on the application.",suggestions:ne.suggestions,isApplying:ne.isApplying,onApply:ne.handleApply,onDismiss:ne.handleDismiss}),u.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[u.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:e.flatMap((L,J)=>[u.jsx("li",{ref:ee=>{D.current[J]=ee},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${J<x?"bg-blue-600 text-white border-blue-600":J===x?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:L.title},L.key??`stage-${J}`),...J<e.length-1?[u.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${L.key??J}`)]:[]])}),u.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[x+1," / ",e.length]})]}),u.jsxs("div",{children:[h&&u.jsx("div",{className:"text-slate-500",children:"Loading…"}),Ce&&u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",role:"status","aria-live":"polite",children:[u.jsxs("svg",{className:"animate-spin h-8 w-8 text-blue-600 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("div",{className:"text-text-primary font-semibold",children:F==="Driver"?"Looking up additional drivers at your address…":"Looking up vehicles at your address…"}),u.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"This can take a few moments."})]}),R&&!Ce&&u.jsx($c,{questions:X??[],controlledValues:V,onChangeValues:me,onSubmit:()=>ke(),quoteId:i,widgetStageKey:F??void 0},R.key)]}),!h&&O&&u.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[u.jsx("div",{children:O}),R&&u.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{g(L=>{if(!F)return L;const J={...L};return delete J[F],J})},children:"Retry"})]}),u.jsx(ov,{stageKey:F}),u.jsxs("div",{className:x>0?"grid grid-cols-2 gap-3":"",children:[x>0&&u.jsx("button",{type:"button",onClick:ge,disabled:h,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),u.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:ke,disabled:P,className:["form-wizard-next-btn",x>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",P?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[T&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),De?"Finish":"Next"]})]})]}):u.jsx("div",{className:"text-slate-600",children:"Loading..."})}const el={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},tl=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function Mv(e){return e.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function rl(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function qt(e){if(!e)return e;const t=el[e];return t?t.name:rl(e)}function Dv(e){const t=new Set,r=[];return e.forEach((n,o)=>{const s=el[n]??{name:rl(n),abbr:Mv(n),color:tl[o%tl.length]};t.has(s.name)||(t.add(s.name),r.push(s))}),r}function Pv(e,t){if(!e)return[];const r=[];return(t==="Auto"||t==="Bundle")&&Array.isArray(e.PersonalAuto)&&r.push(...e.PersonalAuto),(t==="Home"||t==="Bundle")&&Array.isArray(e.PersonalHome)&&r.push(...e.PersonalHome),Dv(r)}const xv="https://getcredify.com/privacy-policy";function Lv({acknowledged:e,onChange:t,disabled:r=!1}){return u.jsx("div",{className:"privacy-notice-ack rounded-xl border border-slate-200 bg-slate-50 p-4","data-testid":"privacy-notice-acknowledgment",children:u.jsx(Ut,{id:"privacy-notice-ack-checkbox",className:"privacy-notice-ack-checkbox",checked:e,onChange:n=>t(n.target.checked),disabled:r,label:u.jsxs(u.Fragment,{children:["I acknowledge I have received Credify’s"," ",u.jsx("a",{href:xv,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Notice"}),"."]})})})}function $v({carrierName:e,formattedPremium:t,lobLabel:r,acknowledged:n,onAcknowledgeChange:o,onCancel:i,onProceed:s,isProcessing:a,hasError:c}){const l=!n||a;return u.jsxs("div",{className:"bind-confirmation","data-testid":"bind-confirmation",role:"group","aria-label":"Confirm your bind request",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Confirm your bind request"}),u.jsxs("div",{className:"mt-4 rounded-xl border border-slate-200 bg-white p-4",children:[r&&u.jsx("div",{className:"mb-1 text-xs font-semibold uppercase tracking-wide text-slate-500",children:r}),u.jsx("p",{className:"font-semibold text-slate-900",children:e}),u.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t,u.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})]}),u.jsx("div",{className:"mt-4",children:u.jsx(Lv,{acknowledged:n,onChange:o,disabled:a})}),c&&u.jsx("p",{className:"mt-3 text-sm text-red-600",role:"alert",children:"Something went wrong while processing your bind request. Please try again."}),u.jsxs("div",{className:"mt-6 grid grid-cols-2 gap-3",children:[u.jsx("button",{type:"button","data-testid":"bind-confirmation-cancel",onClick:i,disabled:a,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),u.jsxs("button",{type:"button","data-testid":"bind-confirmation-proceed",onClick:s,disabled:l,className:["h-12 rounded-full text-white font-bold transition","flex items-center justify-center gap-2","disabled:cursor-not-allowed",l?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[a&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a?"Processing…":"Proceed"]})]})]})}const nl=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function ol(e){const t=Number.isFinite(e.term_months)&&e.term_months>0?e.term_months:1;return e.monthly_premium_cents!=null?e.monthly_premium_cents:Math.round((e.premium_cents||0)/t)}const kn={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},Nn=["PersonalHome","PersonalAuto","Flood","ExcessFlood"];function Fv(e){if(e.length===0)return[];const t=(n,o)=>qt(n.carrier_name).localeCompare(qt(o.carrier_name));if(!e.some(n=>n.lob))return[{lob:null,title:"Not Quoted",rates:[...e].sort(t)}];const r=new Map;for(const n of e){const o=n.lob||"_other",i=r.get(o);i?i.push(n):r.set(o,[n])}return[...r.entries()].sort(([n],[o])=>{const i=Nn.indexOf(n),s=Nn.indexOf(o);return(i===-1?999:i)-(s===-1?999:s)}).map(([n,o])=>({lob:n,title:kn[n]??n,rates:[...o].sort(t)}))}function il({onBack:e}){const t=()=>{wv(),e?.()};return u.jsx("button",{type:"button",onClick:t,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function Bv({rate:e,status:t,onRequestBind:r,disabled:n,showLobLabel:o=!0,className:i}){const s=ol(e)/100,a=nl.format(s),c=t==="loading",l=t==="success",d=!!n||c||l,f=!!(e.effective_date&&e.policy_end_date),g=e.lob?kn[e.lob]||e.lob:null,h=(e.coverages??[]).filter(b=>!!b&&typeof b.label=="string"&&b.label.trim()!==""&&typeof b.value=="string"&&b.value.trim()!=="");return u.jsxs("div",{className:`flex h-full w-full flex-col rounded-xl border border-slate-200 bg-white p-6 shadow-sm transition hover:shadow-md${i?` ${i}`:""}`,children:[o&&g&&u.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:g}),u.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[e.carrier_logo_base64?u.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:qt(e.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):u.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:qt(e.carrier_name).charAt(0).toUpperCase()}),u.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:qt(e.carrier_name)})]}),u.jsx("div",{className:"mb-2",children:u.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[a,u.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),f&&u.jsx("div",{className:"mb-2",children:u.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",e.effective_date," - ",e.policy_end_date]})}),e.carrier_quote_id&&u.jsx("div",{className:"mb-4",children:u.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",e.carrier_quote_id]})}),h.length>0&&u.jsx("div",{className:"mb-2 border-t border-slate-200 pt-3",children:u.jsx("dl",{children:h.map((b,T)=>u.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-1",children:[u.jsx("dt",{className:"text-xs text-slate-600",children:b.label}),u.jsx("dd",{className:"text-right text-xs font-semibold text-slate-900",children:b.value})]},`${b.label}-${T}`))})}),u.jsxs("div",{className:"mt-auto pt-4",children:[u.jsx("button",{type:"button",onClick:r,disabled:d,className:`rates-bind-btn w-full cursor-pointer rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 disabled:cursor-not-allowed ${l?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:c?"Requesting…":l?"Requested":"Request Bind"}),t==="error"&&u.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),t==="success"&&u.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function Uv({item:e}){const t=qt(e.carrier_name),r=(e.decline_reasons??[]).filter(Boolean);return u.jsxs("div",{className:"flex w-full gap-4 rounded-xl border border-slate-200 bg-white p-4 shadow-sm",children:[u.jsx("div",{className:"shrink-0",children:e.carrier_logo_base64?u.jsx("img",{src:`data:image/png;base64,${e.carrier_logo_base64}`,alt:t,className:"h-10 w-auto max-w-[7rem] object-contain"}):u.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:t.charAt(0).toUpperCase()})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("div",{className:"flex flex-wrap items-center gap-2",children:u.jsx("h4",{className:"break-words font-semibold text-slate-900",children:t})}),r.length>0?u.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-slate-600",children:r.map((n,o)=>u.jsx("li",{children:n},o))}):u.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"This carrier did not return a quote."})]})]})}function Hv({rates:e,onBack:t,isBundleFlow:r=!1}){const n=Array.isArray(e)?e:[],o=n.length>0,[i,s]=m.useState({}),[a,c]=m.useState("admitted"),[l,d]=m.useState(!1),[f,g]=m.useState(null),[h,b]=m.useState(!1),T=m.useMemo(()=>n.some(P=>P.lob==="PersonalAuto"),[n]),$=m.useMemo(()=>n.some(P=>P.lob==="PersonalHome"),[n]),O=m.useMemo(()=>{if(!r)return[];const P=[];return T&&P.push("PersonalAuto"),$&&P.push("PersonalHome"),P},[r,T,$]),C=m.useMemo(()=>{const P=new Set;for(const L of n){const J=L.lob??null;J&&i[L.quote_rate_id]==="success"&&P.add(J)}return P},[n,i]),D=m.useMemo(()=>Object.values(i).some(P=>P==="success"),[i]),U=m.useMemo(()=>l?!0:!r||O.length===0?D:O.every(P=>C.has(P)),[l,r,D,O,C]),E=m.useMemo(()=>o?n.filter(P=>(P.admitted_status??"admitted")==="admitted"):[],[n,o]),x=m.useMemo(()=>o?n.filter(P=>P.admitted_status==="non_admitted"):[],[n,o]),R=m.useMemo(()=>o?n.filter(P=>P.admitted_status==="not_quoted"):[],[n,o]),F=E.length,K=x.length,re=R.length,ne=F+K>0,Ce=ne||re>0,De=m.useMemo(()=>Fv(R),[R]);m.useEffect(()=>{Ce&&a==="admitted"&&F===0&&(K>0?c("non_admitted"):re>0&&c("not_quoted"))},[a,F,K,re,Ce]);const X=m.useMemo(()=>ne?a==="admitted"?E:a==="non_admitted"?x:[]:[],[ne,a,E,x]);m.useEffect(()=>{Qo()},[]),m.useEffect(()=>{!U||l||(cb(),wc(),d(!0))},[U,l]);const Q=m.useMemo(()=>{if(X.length===0)return[];if(!X.some(ee=>ee.lob))return[{lob:null,title:"Rates",rates:[...X].sort((oe,y)=>{const _=Number.isFinite(oe.term_months)&&oe.term_months>0?oe.term_months:1,p=Number.isFinite(y.term_months)&&y.term_months>0?y.term_months:1,v=oe.monthly_premium_cents??Math.round((oe.premium_cents||0)/_),S=y.monthly_premium_cents??Math.round((y.premium_cents||0)/p);return v-S})}];const L=new Map;for(const ee of X){const oe=ee.lob||"_other",y=L.get(oe);y?y.push(ee):L.set(oe,[ee])}return[...L.entries()].sort(([ee],[oe])=>{const y=Nn.indexOf(ee),_=Nn.indexOf(oe);return(y===-1?999:y)-(_===-1?999:_)}).map(([ee,oe])=>({lob:ee,title:kn[ee]??ee,rates:[...oe].sort((y,_)=>{const p=Number.isFinite(y.term_months)&&y.term_months>0?y.term_months:1,v=Number.isFinite(_.term_months)&&_.term_months>0?_.term_months:1,S=y.monthly_premium_cents??Math.round((y.premium_cents||0)/p),k=_.monthly_premium_cents??Math.round((_.premium_cents||0)/v);return S-k})}))},[X]),V=m.useMemo(()=>{if(!r)return[];const P=n.some(ee=>ee.lob==="PersonalAuto"),L=n.some(ee=>ee.lob==="PersonalHome"),J=[];return P||J.push("Sorry, no rates found for Personal Auto."),L||J.push("Sorry, no rates found for Homeowners."),J},[r,n]);if(!Ce)return u.jsxs("section",{className:"mt-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),u.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),t&&u.jsx(il,{onBack:t})]});const me=P=>{s(L=>({...L,[P.quote_rate_id]:"idle"})),b(!1),g({cardKey:P.quote_rate_id,rate:P})},ge=()=>{g(null),b(!1)},ke=async()=>{if(!f||!h)return;const P=f.cardKey;s(L=>({...L,[P]:"loading"}));try{if(Qo(),!jt())throw new Error("Authentication required. Please verify your phone number first.");if(!((await Ub(P,!0))?.success!==!1))throw new Error("Request failed");s(oe=>({...oe,[P]:"success"})),g(null),b(!1)}catch{s(L=>({...L,[P]:"error"}))}};if(f){const P=f.rate.lob?kn[f.rate.lob]||f.rate.lob:null;return u.jsx("section",{className:"mt-8",children:u.jsx($v,{carrierName:qt(f.rate.carrier_name),formattedPremium:nl.format(ol(f.rate)/100),lobLabel:P,acknowledged:h,onAcknowledgeChange:b,onCancel:ge,onProceed:ke,isProcessing:i[f.cardKey]==="loading",hasError:i[f.cardKey]==="error"})})}return u.jsxs("section",{className:"mt-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),V.length>0&&u.jsx("div",{className:"mt-3 space-y-1",children:V.map(P=>u.jsx("p",{className:"text-sm text-slate-600",children:P},P))}),u.jsx("div",{className:"mt-4 border-b border-slate-200",children:u.jsxs("div",{className:"flex items-center gap-6",children:[u.jsxs("button",{type:"button",onClick:()=>c("admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",F,")"]}),u.jsxs("button",{type:"button",onClick:()=>c("non_admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",K,")"]}),re>0&&u.jsxs("button",{type:"button",onClick:()=>c("not_quoted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${a==="not_quoted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Not Quoted (",re,")"]})]})}),a==="not_quoted"?De.map(P=>u.jsxs("div",{className:"mt-6",children:[P.lob!=null&&u.jsx("h4",{className:"mb-3 text-center text-base font-semibold text-slate-800",children:P.title}),u.jsx("div",{className:"space-y-3",children:P.rates.map(L=>u.jsx(Uv,{item:L},L.quote_rate_id))})]},P.lob??"all")):u.jsxs(u.Fragment,{children:[X.length===0&&u.jsx("p",{className:"mt-4 text-sm text-slate-500",children:a==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),X.length>0&&Q.map(P=>u.jsxs("div",{className:"mt-6",children:[u.jsx("h4",{className:"mb-3 text-center text-base font-semibold text-slate-800",children:P.title}),u.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:P.rates.map(L=>u.jsx("div",{className:"w-full min-w-0 sm:w-[calc(50%-0.5rem)] lg:w-[calc(33.333%-0.667rem)] xl:w-[calc(25%-0.75rem)]",children:u.jsx(Bv,{rate:L,showLobLabel:P.lob==null,status:i[L.quote_rate_id]??"idle",disabled:U||(r?!!(L.lob&&O.includes(L.lob)&&C.has(L.lob)):D),onRequestBind:()=>me(L)})},L.quote_rate_id))})]},P.lob??"all"))]}),t&&u.jsx(il,{onBack:t})]})}function zv({stageKey:e,title:t,questions:r,values:n,onChangeValues:o,review:i,quoteId:s,fetchVehicleOptions:a}){const c=m.useMemo(()=>new Set(Object.keys(i.errorsByKey)),[i.errorsByKey]);return u.jsxs("section",{id:`review-section-${e}`,"data-testid":`review-section-${e}`,className:`review-section rounded-lg border p-4 ${i.hasIssues?"border-amber-300 bg-amber-50/40":"border-slate-200"}`,children:[u.jsxs("div",{className:"flex items-center justify-between gap-3 mb-3",children:[u.jsx("h3",{className:"text-base font-semibold text-text-primary",children:t}),i.hasIssues?u.jsxs("span",{"data-testid":`review-section-${e}-badge`,className:"shrink-0 rounded-full bg-amber-100 border border-amber-300 text-amber-800 text-xs font-semibold px-2.5 py-1",children:[i.issues.length," ",i.issues.length===1?"field needs":"fields need"," attention"]}):u.jsx("svg",{"data-testid":`review-section-${e}-ok`,className:"h-5 w-5 shrink-0 text-emerald-600",viewBox:"0 0 20 20",fill:"currentColor",role:"img","aria-label":"Section complete",children:u.jsx("path",{fillRule:"evenodd",d:"M16.704 5.29a1 1 0 010 1.415l-7.5 7.5a1 1 0 01-1.415 0l-3.5-3.5a1 1 0 011.415-1.415l2.792 2.793 6.793-6.793a1 1 0 011.415 0z",clipRule:"evenodd"})})]}),i.hasIssues&&u.jsx("ul",{className:"mb-3 list-disc list-inside space-y-0.5 text-sm text-amber-800","data-testid":`review-section-${e}-issues`,children:i.issues.map(l=>u.jsxs("li",{children:[l.label,": ",l.message]},l.key))}),u.jsx($c,{questions:r,controlledValues:n,onChangeValues:o,onSubmit:()=>{},quoteId:s,widgetStageKey:e,invalidValueKeys:c,fetchVehicleOptions:a})]})}const sl=new Set(["make","model","body_style","occupation","co_applicant_occupation","quote_vehicle_id"]),al={vehicles:"Vehicle",drivers:"Driver",driver_accidents:"Accident",driver_violations:"Violation",losses:"Loss",home_losses:"Loss"};function cl(e){const t=e.options;return Array.isArray(t)?t.map(r=>r&&typeof r=="object"&&"value"in r?String(r.value):String(r)):[]}const Rv=new Set(["SMSVerification","CanopyConnect","Phone"]);function jv({stageKey:e,questions:t,values:r}){const n=Or(t,r,e),o=wr(n,r),i=new Map(n.map((l,d)=>[wt(l,d),l])),s={},a=[];for(const[l,d]of Object.entries(o))!d||!i.has(l)||(s[l]=d,a.push({key:l,label:i.get(l)?.question??l,message:d}));n.forEach((l,d)=>{const f=wt(l,d);if(s[f]||l.inputType!=="select"&&l.inputType!=="radio"||sl.has(String(l.key??"")))return;const g=cl(l);if(g.length===0)return;const h=r[f];at(h,l.inputType)||g.includes(String(h))||(s[f]="Not a valid option",a.push({key:f,label:l.question??f,message:"Choose a valid option from the list"}))}),ai(t,r,e,(l,d,f)=>{l.forEach(g=>{if(g.inputType!=="select"&&g.inputType!=="radio")return;const h=String(g.key??"");if(!h||sl.has(h))return;const b=cl(g);if(b.length===0)return;const T=d[h];if(!at(T,g.inputType)&&!b.includes(String(T))){const $=al[f.groupKey]??f.groupKey,O=`${f.groupKey}__items.${f.index}.${h}`;s[O]="Not a valid option",a.push({key:O,label:`${$} ${f.index+1} — ${g.question??h}`,message:"Choose a valid option from the list"})}})});for(const l of Iv(t,r,e)){const d=al[l.groupKey]??l.groupKey;if(l.index<0){a.push({key:`${l.groupKey}__missing`,label:d,message:"Add at least one entry"});continue}const f=`${l.groupKey}__items.${l.index}.${l.fieldKey}`;if(s[f])continue;s[f]=l.message;const g=l.fieldLabel?`${d} ${l.index+1} — ${l.fieldLabel}`:`${d} ${l.index+1}`;a.push({key:f,label:g,message:l.message})}if(n.some(l=>String(l.key??"")==="vehicle_policy_selections")&&ci(r)&&a.push({key:"__vehicle_policy",label:"Vehicle coverage selections",message:"Coverage selections are incomplete"}),Zv(r,n)&&a.push({key:"__dva",label:"Driver usage",message:"Driver usage percentages must total 100% (50/50 is not allowed)"}),n.some(l=>l.inputType==="address"&&String(l.key??"")==="address")){const l=Vv(r);l&&a.push(l)}return{stageKey:e,errorsByKey:s,issues:a,hasIssues:a.length>0}}async function Wv(e,t){const r=e.vehicles__items??[];if(!Array.isArray(r)||r.length===0)return[];const n=[];for(const[o,i]of r.entries()){if(typeof i!="object"||i===null)continue;const s=Number(i.year),a=typeof i.make=="string"?i.make.trim():"",c=typeof i.model=="string"?i.model.trim():"",l=typeof i.body_style=="string"?i.body_style.trim():"";if(!(!Number.isFinite(s)||!s||!a))try{const{makes:d}=await t({year:s});if(Array.isArray(d)&&d.length>0&&!d.includes(a)){n.push({key:`vehicles__items.${o}.make`,label:`Vehicle ${o+1} — Make`,message:`"${a}" isn't available for ${s} — choose the make from the list`});continue}if(!c)continue;const{models:f}=await t({year:s,make:a});if(Array.isArray(f)&&f.length>0&&!f.includes(c)){n.push({key:`vehicles__items.${o}.model`,label:`Vehicle ${o+1} — Model`,message:`"${c}" isn't a listed model for the ${s} ${a} — choose the model from the list`});continue}if(!l)continue;const{bodyStyles:g}=await t({year:s,make:a,model:c});Array.isArray(g)&&g.length>0&&!g.includes(l)&&n.push({key:`vehicles__items.${o}.body_style`,label:`Vehicle ${o+1} — Body style`,message:"Choose the body style from the list"})}catch{}}return n}const qv=/^[A-Z]{2}$/,Gv=/^\d{5}(-\d{4})?$/;function Vv(e){if(!(typeof e.address=="string"?e.address.trim():""))return null;const r=typeof e.state=="string"?e.state.trim().toUpperCase():"",n=e.postal_code==null?"":String(e.postal_code).trim();return qv.test(r)&&Gv.test(n)?null:{key:"__address",label:"Property address",message:"Select your address from the dropdown suggestions so we can verify the state and ZIP code"}}function Zv(e,t){if(!t.some(i=>String(i.key??"")==="driver_vehicle_assignments"||String(i.key??"")==="vehicle_policy_selections"))return!1;const r=e.driver_vehicle_assignments,n=e.drivers__items??[];if(!r||n.length<2)return!1;const o=e.vehicles__items??[];for(let i=0;i<o.length;i++){const s=r[`v${i}`];if(!s)continue;const a=n.map((d,f)=>s[`d${f}`]??0),c=a.filter(d=>d>0);if(c.length>=2&&c.every(d=>d===50))return!0;const l=a.reduce((d,f)=>d+f,0);if(l>0&&l!==100)return!0}return!1}function fr(e){const t={},r=l=>{if(typeof l=="string"){if(l==="Yes")return!0;if(l==="No")return!1}return l},n=Object.keys(e).filter(l=>!l.includes("__items")),o=new Set,i=new Set;for(const[l,d]of Object.entries(e))if(l.endsWith("__items")&&Array.isArray(d)){const f=l.replace("__items","");i.add(f),n.includes(f)&&d.forEach(g=>{typeof g=="object"&&g!==null&&Object.keys(g).forEach(h=>{o.add(h)})})}for(const[l,d]of Object.entries(e))if(l.endsWith("__items")){const f=l.replace("__items","");if(n.includes(f)){const h=Array.isArray(d)?d.map(b=>fr(b)):d;t[f]=h}}else if(!l.includes("__items")){if(i.has(l))continue;o.has(l)||(t[l]=r(d))}const s=t.auto_prior_carrier_name;if(typeof s=="string"&&s.trim()!==""){const l=s==="NoPriorInsurance";t.auto_has_prior_insurance=!l,l&&(delete t.auto_prior_years,delete t.auto_prior_months,delete t.auto_prior_expiration_date,delete t.auto_prior_liability_limit,delete t.auto_continuous_coverage_years,delete t.auto_cancelled_declined_refused_to_renew,delete t.auto_current_annual_premium_cents)}const a=t.home_prior_carrier_name;if(typeof a=="string"&&a.trim()!==""){const l=a==="NoPriorInsurance";t.home_has_prior_insurance=!l,l&&(delete t.home_prior_years,delete t.home_continuous_coverage_years,delete t.home_prior_expiration_date,delete t.property_insurance_cancelled)}Array.isArray(t.drivers)&&(t.drivers=t.drivers.map(l=>{if(!l||typeof l!="object")return l;const d={...l};return d.industry=_n(d.industry),d.education_level=ic(d.education_level),d.occupation=sc(d.occupation),d}));const c=21474836;if("sale_price_cents"in t){const l=t.sale_price_cents;if(typeof l=="number"&&Number.isFinite(l)){const d=Math.trunc(l);if(d>=1){const f=Math.min(d,c);t.sale_price_cents=f*100}}}return Array.isArray(t.home_losses)&&(t.home_losses=t.home_losses.map(l=>{if(!l||typeof l!="object")return l;const d=l,f=d.amount_paid_cents;if(typeof f!="number"||!Number.isFinite(f))return d;const g=Math.trunc(f),h=Math.min(Math.max(g,0),c);return{...d,amount_paid_cents:h*100}})),t}const Yv={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",PR:"Puerto Rico"};function ll(e){const t=e?.trim().toUpperCase();if(!t)return"your state";const r=Yv[t];return r?`${r} (${t})`:"your state"}const Kv=1500,Jv=800;function Qv(e){const t=e.vehicles__items??[];return Array.isArray(t)?t.map(r=>[r?.year,r?.make,r?.model,r?.body_style].map(n=>String(n??"")).join("|")).join(";"):""}function Xv({stages:e,initialValues:t,quoteId:r,isSubmitting:n,onConfirmed:o}){const i=m.useMemo(()=>e.filter(y=>!Rv.has(String(y.key))),[e]),[s,a]=m.useState(t),[c,l]=m.useState({}),[d,f]=m.useState(null),[g,h]=m.useState(!0),[b,T]=m.useState(0),[$,O]=m.useState(!1),[C,D]=m.useState(null),[U,E]=m.useState(!1);m.useEffect(()=>{let y=!1;return h(!0),f(null),Promise.all(i.map(async _=>{const p=await _.loadQuestions();return[String(_.key),[...p]]})).then(_=>{y||l(Object.fromEntries(_))}).catch(_=>{y||f(_ instanceof Error?_.message:"Failed to load your review")}).finally(()=>{y||h(!1)}),()=>{y=!0}},[i,b]);const x=m.useRef(null),R=m.useRef(!0);m.useEffect(()=>{if(R.current){R.current=!1;return}return x.current&&window.clearTimeout(x.current),x.current=window.setTimeout(()=>{Wt(fr(s),!1).catch(y=>{console.warn("Review autosave failed (will retry on next edit / submit)",y)})},Kv),()=>{x.current&&window.clearTimeout(x.current)}},[s]);const F=m.useCallback(y=>{a(_=>({..._,...y}))},[]),K=m.useMemo(()=>{for(const[y,_]of Object.entries(c))if(_.some(p=>String(p.key??"")==="vehicles"))return y;return null},[c]),[re,ne]=m.useState([]),[Ce,De]=m.useState(!1),X=m.useRef(0),Q=Qv(s),V=m.useRef(new Map),me=m.useRef(Promise.resolve()),ge=m.useCallback(y=>{const _=`${y.year??""}|${y.make??""}|${y.model??""}`,p=V.current,v=p.get(_);if(v)return v;const S=me.current.catch(()=>{}).then(()=>kc({quoteId:r,...y}));me.current=S.catch(()=>{});const k=S.catch(B=>{throw p.delete(_),B});return p.set(_,k),k},[r]);m.useEffect(()=>{if(!K||!Q){ne([]),De(!1);return}const y=++X.current;De(!0);const _=window.setTimeout(()=>{Wv(s,ge).then(p=>{X.current===y&&ne(p)}).finally(()=>{X.current===y&&De(!1)})},Jv);return()=>window.clearTimeout(_)},[K,Q,r,ge]);const ke=m.useMemo(()=>{const y={};for(const _ of i){const p=String(_.key),v=c[p];v&&(y[p]=jv({stageKey:p,questions:v,values:s}))}if(K&&y[K]&&re.length>0){const _=y[K];y[K]={..._,errorsByKey:{..._.errorsByKey,...Object.fromEntries(re.map(p=>[p.key,p.message]))},issues:[..._.issues,...re],hasIssues:!0}}return y},[i,c,s,K,re]),P=m.useMemo(()=>Object.values(ke).reduce((y,_)=>y+_.issues.length,0),[ke]),L=n||U,J=!g&&!d&&P===0&&$&&!L&&!Ce,ee=m.useCallback(()=>{const y=i.find(_=>ke[String(_.key)]?.hasIssues);y&&document.getElementById(`review-section-${String(y.key)}`)?.scrollIntoView({behavior:"smooth",block:"start"})},[i,ke]),oe=m.useCallback(async()=>{if(J){D(null),E(!0);try{const y=typeof s.state=="string"?s.state:"";if(y){const{isSupported:_}=await Ac(y);if(!_){D(`Sorry, Credify Corporation doesn't currently offer insurance in ${ll(y)}. We're expanding our coverage and hope to serve your state soon.`);return}}await o(s)}catch{D("Oops, something went wrong. Please try again later.")}finally{E(!1)}}},[J,s,o]);return g?u.jsx("div",{className:"flex items-center justify-center py-12","data-testid":"review-loading",children:u.jsx("div",{className:"text-slate-600",children:"Loading your details..."})}):d?u.jsxs("div",{className:"text-red-600 text-sm","data-testid":"review-load-error",children:[u.jsx("div",{children:d}),u.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>T(y=>y+1),children:"Retry"})]}):u.jsxs("div",{className:"space-y-6","data-testid":"review-screen",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("h3",{className:"text-lg font-semibold text-text-primary",children:"Review your information"}),u.jsx("p",{className:"text-sm text-slate-600 mt-1",children:"Here's what we collected during your conversation. Please review each section, fix anything we got wrong, and fill in anything missing — then confirm below to see your quotes."})]}),P>0&&u.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm text-amber-800",role:"status","data-testid":"review-issue-summary",children:[u.jsxs("span",{children:[P," ",P===1?"field needs":"fields need"," your attention before you can continue."]}),u.jsx("button",{type:"button",onClick:ee,className:"shrink-0 font-bold underline text-amber-800 hover:text-amber-900",children:"Show me"})]}),i.map(y=>{const _=String(y.key),p=c[_],v=ke[_];return!p||!v?null:u.jsx(zv,{stageKey:_,title:y.title,questions:p,values:s,onChangeValues:F,review:v,quoteId:r,fetchVehicleOptions:ge},_)}),u.jsxs("div",{className:"rounded-lg border border-slate-200 p-4 space-y-4","data-testid":"review-consent-block",children:[u.jsx(Ut,{id:"review-terms-checkbox","data-testid":"review-terms-checkbox",checked:$,onChange:y=>O(y.target.checked),disabled:n,label:"I have reviewed my information and confirm it is accurate, and I agree to the Terms of Service and Privacy Policy."}),u.jsxs("p",{className:"text-sm text-slate-600",children:["Credify Corporation – Texas #3309669."," ",u.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",u.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),C&&u.jsx("div",{className:"text-red-600 text-sm",role:"alert","data-testid":"review-submit-error",children:C}),u.jsxs("button",{type:"button","data-testid":"review-submit","data-widget-ctrl":"review-submit",onClick:oe,disabled:!J,className:["form-wizard-next-btn w-full","h-12 rounded-full text-white font-bold transition","cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",J?"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40":"bg-gray-300"].join(" "),children:[L&&u.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Confirm & See My Quotes"]})]})}const li=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],ul={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},dl={Auto:6e4,Home:9e4,Bundle:12e4};function eS({progress:e,color:t,size:r=80}){const n=(r-10)/2,o=2*Math.PI*n,i=o-e/100*o;return u.jsxs("svg",{width:r,height:r,style:{transform:"rotate(-90deg)"},children:[u.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),u.jsx("circle",{cx:r/2,cy:r/2,r:n,fill:"none",stroke:t,strokeWidth:6,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:i,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function tS({providers:e=[],totalTime:t=6e4,flow:r="Auto",isComplete:n=!1,onComplete:o}){const i=ul[r]??ul.Auto,s=dl[r]??dl.Auto,a=e.length>0?Math.floor(s/e.length):t,[c,l]=m.useState(0),[d,f]=m.useState(0),[g,h]=m.useState(0),[b,T]=m.useState(0),[$,O]=m.useState(!0),C=m.useRef(n),D=m.useRef(o),U=m.useRef(c),E=m.useRef(e.length),x=m.useRef(!1),R=m.useRef(!1);m.useEffect(()=>{C.current=n,n&&e.length===0&&!x.current&&(x.current=!0,D.current?.())},[n,e.length]),m.useEffect(()=>{D.current=o},[o]),m.useEffect(()=>{U.current=c},[c]),m.useEffect(()=>{E.current=e.length,e.length>0&&(R.current=!1,l(0),f(0),h(0),T(0),O(!0))},[e.length]),m.useEffect(()=>{if(e.length===0){C.current&&!x.current&&(x.current=!0,D.current?.());return}R.current=!1;const ne=100,Ce=100/(a/ne),De=setInterval(()=>{h(X=>{if(R.current||x.current)return X;const Q=X+Ce;return Q<100?Q:(R.current=!0,setTimeout(()=>{if(C.current){if(x.current)return;x.current=!0,D.current?.();return}const me=U.current===E.current-1;O(!1),setTimeout(()=>{me?(l(0),f(ge=>ge+1)):l(ge=>ge+1),h(0),T(0),O(!0)},300)},400),100)})},ne);return()=>clearInterval(De)},[c,a,e.length]),m.useEffect(()=>{if(e.length===0)return;const ne=Math.floor(a/li.length),Ce=setInterval(()=>T(De=>Math.min(De+1,li.length-1)),ne);return()=>clearInterval(Ce)},[c,a,e.length]);const F=e.length===0,K=F?null:e[Math.min(c,e.length-1)],re=d>0;return u.jsxs(u.Fragment,{children:[u.jsx("style",{children:`
|
|
64
64
|
@keyframes providerPulse {
|
|
65
65
|
0%, 100% { transform: scale(1); }
|
|
66
66
|
50% { transform: scale(1.05); }
|
|
@@ -95,5 +95,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
95
95
|
.iq-status-text {
|
|
96
96
|
animation: statusFadeIn 0.25s ease forwards;
|
|
97
97
|
}
|
|
98
|
-
`}),u.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:u.jsxs("div",{style:{width:"100%",maxWidth:560},children:[u.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[u.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:i.accent+"12",border:`1px solid ${i.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[u.jsx("span",{style:{fontSize:14},children:i.icon}),u.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:i.label})]}),u.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:B?"Connecting to top carriers":"Fetching your best rates"}),u.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:B?"Identifying the carriers eligible for your quote...":Q?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),u.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:B?u.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(ne=>u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[u.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ne*.12}s`}}),u.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ne*.12}s`}})]},`skeleton-${ne}`))}):ee?u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[u.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:ee.color+"18",border:`2px solid ${ee.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:ee.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[ee.abbr,u.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${ee.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),u.jsx("span",{style:{fontSize:13,fontWeight:600,color:ee.color,letterSpacing:"0.04em"},children:ee.name})]}):null}),u.jsxs("div",{className:`iq-card-fade ${H?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[u.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:B||!ee?u.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),u.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),u.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",flexShrink:0},children:[u.jsx(Nv,{progress:h,color:ee.color,size:80}),u.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:u.jsxs("span",{style:{fontSize:14,fontWeight:700,color:ee.color},children:[Math.round(h),"%"]})})]}),u.jsxs("div",{style:{flex:1},children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:Q?"Still checking":"Now checking"}),u.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:ee.name}),u.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:si[g]},`${c}-${g}`)]})]})}),u.jsxs("div",{children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:B?"Initializing":"Gathering quotes"}),u.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:u.jsx("div",{style:{height:"100%",width:"35%",background:i.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function ol({onGoBack:e}){return u.jsxs("section",{className:"mt-4",children:[u.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[u.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),u.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),u.jsx("div",{className:"mt-5",children:u.jsx("button",{type:"button",onClick:e,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}var ai={intercomAppId:"",cobrowseLicense:""};function Mv(){try{return typeof ai<"u"&&ai?ai:{}}catch{return{}}}function Dv(e){const t=Mv(),r=e?.intercomAppId??t.intercomAppId,n=e?.cobrowseLicense??t.cobrowseLicense;return{enabled:(e?.enabled??!0)&&!!(r||n),intercomAppId:r||void 0,cobrowseLicense:n||void 0,proactiveOnError:e?.proactiveOnError??!0}}const ci=new Map;function il(e){if(typeof document>"u")return Promise.reject(new Error("loadScript called without a document"));const t=ci.get(e);if(t)return t;const r=new Promise((n,o)=>{const i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>n(),i.onerror=()=>{ci.delete(e),o(new Error(`Failed to load script: ${e}`))},document.head.appendChild(i)});return ci.set(e,r),r}let li=!1;function Pv(){if(typeof window.Intercom=="function")return window.Intercom;const e=function(...t){e.c?.(t)};return e.q=[],e.c=t=>{e.q.push(t)},window.Intercom=e,e}function Lv(e){const t={app_id:e,hide_default_launcher:!0},r=yn();return r&&(t.quote_id=r),t}function sl(e){if(typeof window>"u")return;Pv();const t=Lv(e);if(window.intercomSettings=t,li){window.Intercom("update",t);return}window.Intercom("boot",t),li=!0,il(`https://widget.intercom.io/widget/${e}`).catch(()=>{})}function xv(){typeof window?.Intercom=="function"&&window.Intercom("show")}function $v(e){typeof window?.Intercom=="function"&&window.Intercom("showNewMessage",e)}function Fv(e){typeof window?.Intercom=="function"&&window.Intercom("update",e)}function Bv(){if(typeof window?.Intercom=="function")try{window.Intercom("shutdown")}catch{}li=!1}const Uv="https://js.cobrowse.io/CobrowseIO.js";let ui=!1;async function Hv(e){await il(Uv);const t=window.CobrowseIO;if(!t)return null;if(!ui){t.license=e,t.redactedViews=["input","select","textarea","[data-credify-redact]"],t.customData={quote_id:yn()??void 0,device_name:"Credify Insurance Widget"},t.confirmSession=()=>Promise.resolve(typeof window<"u"?window.confirm("Allow a Credify support agent to view your screen?"):!1);try{await t.client?.()}catch{}t.start?.(),ui=!0}return t}async function Rv(e){if(typeof window>"u")return null;try{const t=await Hv(e);return t?.createSessionCode?await t.createSessionCode():null}catch{return null}}function zv(){try{window.CobrowseIO?.stop?.()}catch{}ui=!1}const jv="Hi! It looks like something went wrong submitting your quote. We're here to help — tell us what you were trying to do and we'll jump in.";let rt=null,In=null,di=!1;function Wv(e){ll();const t=Dv(e);if(rt=t,!!t.enabled&&t.proactiveOnError&&t.intercomAppId){const r=n=>{di||(di=!0,sl(t.intercomAppId),Fv({last_quote_error:n?.reason??"unknown"}),$v(jv))};xc("submissionFailed",r),In=r}}function al(){!rt?.enabled||!rt.intercomAppId||(sl(rt.intercomAppId),xv())}function cl(){return!rt?.enabled||!rt.cobrowseLicense?Promise.resolve(null):Rv(rt.cobrowseLicense)}function qv(){return!!(rt?.enabled&&rt.intercomAppId)}function Gv(){return!!(rt?.enabled&&rt.cobrowseLicense)}function ll(){In&&($c("submissionFailed",In),In=null),Bv(),zv(),di=!1,rt=null}const Zv="Chat with our support team in real time — we'll help you finish your quote.",Vv="Share your screen with a support agent so they can see what you see and guide you in real time. We'll generate a secure code — share it with your agent to begin. Your personal information stays hidden.",ul="inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 disabled:opacity-60",dl="pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 w-60 -translate-x-1/2 rounded-lg bg-slate-800 px-3 py-2 text-center text-xs leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100";function Yv(){const e=qv(),t=Gv(),[r,n]=_.useState(null),[o,i]=_.useState(!1),[s,a]=_.useState(!1),c=_.useCallback(async()=>{i(!0),a(!1);try{const l=await cl();l?n(l):a(!0)}finally{i(!1)}},[]);return!e&&!t?null:u.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-sm text-slate-500",children:[u.jsx("span",{className:"font-medium",children:"Need help?"}),u.jsxs("div",{className:"inline-flex items-center gap-1",children:[e&&u.jsxs("span",{className:"group relative inline-flex",children:[u.jsx("button",{type:"button",onClick:al,"aria-label":"Chat with support","aria-describedby":"credify-chat-tooltip",className:ul,children:u.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:u.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 9 9 0 0 1-3.8-.8L3 21l1.3-4.2A8.38 8.38 0 0 1 3.5 11.5 8.5 8.5 0 0 1 12 3a8.38 8.38 0 0 1 9 8.5Z",strokeLinejoin:"round"})})}),u.jsx("span",{id:"credify-chat-tooltip",role:"tooltip",className:dl,children:Zv})]}),e&&t&&u.jsx("span",{className:"mx-1 h-6 w-px bg-slate-200","aria-hidden":"true"}),t&&u.jsxs("span",{className:"group relative inline-flex",children:[u.jsx("button",{type:"button",onClick:c,disabled:o,"aria-label":"Share your screen with an agent","aria-describedby":"credify-cobrowse-tooltip",className:ul,children:o?u.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600","aria-hidden":"true"}):u.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[u.jsx("rect",{x:"2.5",y:"4",width:"19",height:"13",rx:"2"}),u.jsx("path",{d:"M8 21h8M12 17v4",strokeLinecap:"round"}),u.jsx("path",{d:"M12 13V8m0 0-2 2m2-2 2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),u.jsx("span",{id:"credify-cobrowse-tooltip",role:"tooltip",className:dl,children:Vv})]})]}),r&&u.jsxs("span",{children:["Read this code to your agent: ",u.jsx("strong",{className:"tracking-widest text-text-primary",children:r})]}),s&&u.jsx("span",{className:"text-red-600",children:"Couldn't start screen sharing. Please try chat instead."})]})}const fl="credify_rt";let Nn=null;function Kv(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(fl);if(!t)return;Nn=t,e.searchParams.delete(fl),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function Jv(){return Nn!==null}function Qv(){const e=Nn;return Nn=null,e}const pl="credify_test",ml="credify_test_mode";let On=!1;function Xv(e){return e===""||/^(1|true|yes)$/i.test(e.trim())}function eS(){try{if(typeof window>"u")return;window.sessionStorage?.getItem(ml)==="1"&&(On=!0);const e=new URL(window.location.href),t=e.searchParams.get(pl);if(t!==null){On=Xv(t);try{window.sessionStorage?.setItem(ml,On?"1":"0")}catch{}e.searchParams.delete(pl),window.history.replaceState(window.history.state,"",e.toString())}}catch(e){console.error("Failed to capture test mode from URL:",e)}}function tS(){return On}function G(e){if(e===!0)return"Yes";if(e===!1)return"No"}function je(e){if(e)try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?void 0:t.toISOString().split("T")[0]}catch{return}}function rS(e){const t=e,r={};t.phone&&(r.phone=t.phone),t.first_name&&(r.first_name=t.first_name),t.last_name&&(r.last_name=t.last_name),t.email&&(r.email=t.email),t.date_of_birth&&(r.date_of_birth=je(t.date_of_birth)),t.product&&(r.product=t.product),t.state&&(r.state=t.state),t.postal_code&&(r.postal_code=t.postal_code);const n=[];t.line_1&&n.push(t.line_1),t.line_2&&n.push(t.line_2),t.city&&n.push(t.city),t.state&&n.push(t.state),t.postal_code&&n.push(t.postal_code),n.length>0&&(r.address=n.join(", ")),typeof t.ssn_display=="string"&&(r.ssn_display=t.ssn_display),t.years_at_address!==null&&t.years_at_address!==void 0&&(r.years_at_address=t.years_at_address),t.months_at_address!==null&&t.months_at_address!==void 0&&(r.months_at_address=t.months_at_address),t.move_in_date&&(r.move_in_date=je(t.move_in_date));const o=[];t.prior_line_1&&o.push(t.prior_line_1),t.prior_line_2&&o.push(t.prior_line_2),t.prior_city&&o.push(t.prior_city),t.prior_state&&o.push(t.prior_state),t.prior_postal_code&&o.push(t.prior_postal_code),o.length>0&&(r.prior_address=o.join(", ")),t.years_at_prior_address!==null&&t.years_at_prior_address!==void 0&&(r.years_at_prior_address=t.years_at_prior_address),t.is_mailing_address_different!==null&&t.is_mailing_address_different!==void 0&&(r.is_mailing_address_different=G(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=je(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=G(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=je(t.auto_prior_expiration_date)),t.auto_prior_carrier_name&&(r.auto_prior_carrier_name=t.auto_prior_carrier_name),t.auto_prior_liability_limit&&(r.auto_prior_liability_limit=t.auto_prior_liability_limit),t.auto_reason_for_no_insurance&&(r.auto_reason_for_no_insurance=t.auto_reason_for_no_insurance),t.auto_prior_years!==null&&t.auto_prior_years!==void 0&&(r.auto_prior_years=t.auto_prior_years),t.auto_prior_months!==null&&t.auto_prior_months!==void 0&&(r.auto_prior_months=t.auto_prior_months),t.auto_continuous_coverage_years!==null&&t.auto_continuous_coverage_years!==void 0&&(r.auto_continuous_coverage_years=t.auto_continuous_coverage_years),t.auto_cancelled_declined_refused_to_renew!==null&&t.auto_cancelled_declined_refused_to_renew!==void 0&&(r.auto_cancelled_declined_refused_to_renew=G(t.auto_cancelled_declined_refused_to_renew)),t.auto_current_annual_premium_cents!==null&&t.auto_current_annual_premium_cents!==void 0&&(r.auto_current_annual_premium_cents=t.auto_current_annual_premium_cents),t.policy_bi&&(r.policy_bi=t.policy_bi),t.policy_um&&(r.policy_um=t.policy_um),t.policy_pd&&(r.policy_pd=t.policy_pd),t.policy_mp&&(r.policy_mp=t.policy_mp),t.policy_umpd&&(r.policy_umpd=t.policy_umpd),t.policy_pip&&(r.policy_pip=t.policy_pip),t.policy_auto_death_indemnity&&(r.policy_auto_death_indemnity=t.policy_auto_death_indemnity),t.driver_vehicle_assignments&&(r.driver_vehicle_assignments=t.driver_vehicle_assignments),t.home_has_prior_insurance!==null&&t.home_has_prior_insurance!==void 0&&(r.home_has_prior_insurance=G(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=je(t.home_prior_expiration_date)),t.home_prior_carrier_name&&(r.home_prior_carrier_name=t.home_prior_carrier_name),t.home_prior_years!==null&&t.home_prior_years!==void 0&&(r.home_prior_years=t.home_prior_years),t.home_continuous_coverage_years!==null&&t.home_continuous_coverage_years!==void 0&&(r.home_continuous_coverage_years=t.home_continuous_coverage_years),t.property_insurance_cancelled!==null&&t.property_insurance_cancelled!==void 0&&(r.property_insurance_cancelled=G(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=G(t.lapse_in_coverage)),t.year_built!==null&&t.year_built!==void 0&&(r.year_built=t.year_built),t.number_of_units!==null&&t.number_of_units!==void 0&&(r.number_of_units=t.number_of_units),t.number_of_stories!==null&&t.number_of_stories!==void 0&&(r.number_of_stories=t.number_of_stories),t.number_of_beds!==null&&t.number_of_beds!==void 0&&(r.number_of_beds=t.number_of_beds),t.number_of_full_baths!==null&&t.number_of_full_baths!==void 0&&(r.number_of_full_baths=t.number_of_full_baths),t.number_of_partial_baths!==null&&t.number_of_partial_baths!==void 0&&(r.number_of_partial_baths=t.number_of_partial_baths),t.under_construction!==null&&t.under_construction!==void 0&&(r.under_construction=G(t.under_construction)),t.distance_from_fire_hydrant_ft&&(r.distance_from_fire_hydrant_ft=t.distance_from_fire_hydrant_ft),t.distance_from_fire_station_miles&&(r.distance_from_fire_station_miles=t.distance_from_fire_station_miles),t.architectural_style&&(r.architectural_style=t.architectural_style),t.dwelling_type&&(r.dwelling_type=t.dwelling_type),t.construction_quality&&(r.construction_quality=t.construction_quality),t.located_over_water!==null&&t.located_over_water!==void 0&&(r.located_over_water=t.located_over_water),t.construction_type&&(r.construction_type=t.construction_type),t.exterior_wall_type&&(r.exterior_wall_type=t.exterior_wall_type),t.foundation_type&&(r.foundation_type=t.foundation_type),t.roof_material_type&&(r.roof_material_type=t.roof_material_type),t.roof_shape&&(r.roof_shape=t.roof_shape),t.roof_updated_type&&(r.roof_updated_type=t.roof_updated_type),t.year_roof_updated!==null&&t.year_roof_updated!==void 0&&(r.year_roof_updated=t.year_roof_updated),t.mit_credit_form!==null&&t.mit_credit_form!==void 0&&(r.mit_credit_form=G(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=G(t.storm_shutters)),t.heating_type&&(r.heating_type=t.heating_type),t.oil_tank_location&&(r.oil_tank_location=t.oil_tank_location),t.heating_fuel_type&&(r.heating_fuel_type=t.heating_fuel_type),t.number_of_fireplaces!==null&&t.number_of_fireplaces!==void 0&&(r.number_of_fireplaces=t.number_of_fireplaces),t.basement_type&&(r.basement_type=t.basement_type),t.parking_type&&(r.parking_type=t.parking_type),t.number_of_parking_spaces!==null&&t.number_of_parking_spaces!==void 0&&(r.number_of_parking_spaces=t.number_of_parking_spaces),t.plumbing_type&&(r.plumbing_type=t.plumbing_type),t.pool_type&&(r.pool_type=t.pool_type),t.total_area_sq_ft!==null&&t.total_area_sq_ft!==void 0&&(r.total_area_sq_ft=t.total_area_sq_ft),t.parcel_area_sq_ft!==null&&t.parcel_area_sq_ft!==void 0&&(r.parcel_area_sq_ft=t.parcel_area_sq_ft),t.residence_type&&(r.residence_type=t.residence_type),t.usage_type&&(r.usage_type=t.usage_type),t.household_size!==null&&t.household_size!==void 0&&(r.household_size=t.household_size),t.number_of_mortgagees!==null&&t.number_of_mortgagees!==void 0&&(r.number_of_mortgagees=t.number_of_mortgagees),t.has_dog!==null&&t.has_dog!==void 0&&(r.has_dog=G(t.has_dog)),t.dog_breed_type&&(r.dog_breed_type=t.dog_breed_type),t.number_of_dogs!==null&&t.number_of_dogs!==void 0&&(r.number_of_dogs=t.number_of_dogs),t.has_vicious_animals!==null&&t.has_vicious_animals!==void 0&&(r.has_vicious_animals=G(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=G(t.has_business_on_premises)),t.business_class&&(r.business_class=t.business_class),t.occupancy_type&&(r.occupancy_type=t.occupancy_type),t.short_term_rental!==null&&t.short_term_rental!==void 0&&(r.short_term_rental=G(t.short_term_rental)),t.sale_price_cents!==null&&t.sale_price_cents!==void 0&&(r.sale_price_cents=Math.round(Number(t.sale_price_cents)/100)),t.number_of_families!==null&&t.number_of_families!==void 0&&(r.number_of_families=t.number_of_families),t.number_of_units_in_firewall!==null&&t.number_of_units_in_firewall!==void 0&&(r.number_of_units_in_firewall=t.number_of_units_in_firewall),t.heating_update_yn!==null&&t.heating_update_yn!==void 0&&(r.heating_update_yn=G(t.heating_update_yn)),t.heating_update_type&&(r.heating_update_type=t.heating_update_type),t.heating_update_year!==null&&t.heating_update_year!==void 0&&(r.heating_update_year=t.heating_update_year),t.plumbing_update_yn!==null&&t.plumbing_update_yn!==void 0&&(r.plumbing_update_yn=G(t.plumbing_update_yn)),t.plumbing_update_type&&(r.plumbing_update_type=t.plumbing_update_type),t.plumbing_update_year!==null&&t.plumbing_update_year!==void 0&&(r.plumbing_update_year=t.plumbing_update_year),t.electrical_update_yn!==null&&t.electrical_update_yn!==void 0&&(r.electrical_update_yn=G(t.electrical_update_yn)),t.electrical_update_type&&(r.electrical_update_type=t.electrical_update_type),t.electrical_update_year!==null&&t.electrical_update_year!==void 0&&(r.electrical_update_year=t.electrical_update_year),t.electric_circuit_breaker!==null&&t.electric_circuit_breaker!==void 0&&(r.electric_circuit_breaker=G(t.electric_circuit_breaker)),t.dwelling_replacement_cost!==null&&t.dwelling_replacement_cost!==void 0&&(r.dwelling_replacement_cost=t.dwelling_replacement_cost),t.other_structures_coverage!==null&&t.other_structures_coverage!==void 0&&(r.other_structures_coverage=t.other_structures_coverage),t.personal_property_coverage!==null&&t.personal_property_coverage!==void 0&&(r.personal_property_coverage=t.personal_property_coverage),t.loss_of_use_coverage!==null&&t.loss_of_use_coverage!==void 0&&(r.loss_of_use_coverage=t.loss_of_use_coverage),t.personal_liability&&(r.personal_liability=t.personal_liability),t.dwelling_medical_payments&&(r.dwelling_medical_payments=t.dwelling_medical_payments),t.all_perils_deductible&&(r.all_perils_deductible=t.all_perils_deductible),t.windstorm_deductible&&(r.windstorm_deductible=t.windstorm_deductible),t.has_garage!==null&&t.has_garage!==void 0&&(r.has_garage=G(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=G(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=G(t.has_trampoline)),t.gender&&(r.gender=t.gender),t.marital_status&&(r.marital_status=t.marital_status),t.employment_industry&&(r.employment_industry=t.employment_industry),t.occupation&&(r.occupation=t.occupation),t.has_co_applicant!==null&&t.has_co_applicant!==void 0&&(r.has_co_applicant=G(t.has_co_applicant)),t.co_applicant_first_name&&(r.co_applicant_first_name=t.co_applicant_first_name),t.co_applicant_middle_name&&(r.co_applicant_middle_name=t.co_applicant_middle_name),t.co_applicant_last_name&&(r.co_applicant_last_name=t.co_applicant_last_name),t.co_applicant_gender&&(r.co_applicant_gender=t.co_applicant_gender),t.co_applicant_marital_status&&(r.co_applicant_marital_status=t.co_applicant_marital_status),t.co_applicant_relationship&&(r.co_applicant_relationship=t.co_applicant_relationship),t.co_applicant_date_of_birth&&(r.co_applicant_date_of_birth=je(t.co_applicant_date_of_birth)),t.co_applicant_employment_industry&&(r.co_applicant_employment_industry=t.co_applicant_employment_industry),t.co_applicant_occupation&&(r.co_applicant_occupation=t.co_applicant_occupation),t.retiree_discount!==null&&t.retiree_discount!==void 0&&(r.retiree_discount=G(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=G(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=G(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=G(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=G(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=G(t.fire_detection_system)),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=G(t.burglar_alarm_system)),t.burglar_alarm_system_type&&(r.burglar_alarm_system_type=t.burglar_alarm_system_type),t.smoke_detectors!==null&&t.smoke_detectors!==void 0&&(r.smoke_detectors=G(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=G(t.sprinkler_system)),t.sprinkler_system_type&&(r.sprinkler_system_type=t.sprinkler_system_type),t.gas_leakage_detector!==null&&t.gas_leakage_detector!==void 0&&(r.gas_leakage_detector=G(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=G(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=G(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=G(t.order_credit_authorized)),t.has_health_insurance_auto_accident!==null&&t.has_health_insurance_auto_accident!==void 0&&(r.has_health_insurance_auto_accident=G(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=G(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=G(t.named_insured_foreclosure_repo_bankruptcy)),t.named_insured_convicted_insurance_fraud!==null&&t.named_insured_convicted_insurance_fraud!==void 0&&(r.named_insured_convicted_insurance_fraud=G(t.named_insured_convicted_insurance_fraud));const i={};if(t.vehicles)for(const s of t.vehicles)s.quote_vehicle_id&&s.vin&&(i[s.quote_vehicle_id]=s.vin);return t.drivers&&t.drivers.length>0?(r.drivers="Yes",r.drivers__items=t.drivers.map(s=>{const a=s,c={};a.first_name&&(c.first_name=a.first_name),a.middle_name&&(c.middle_name=a.middle_name),a.last_name&&(c.last_name=a.last_name),a.date_of_birth&&(c.date_of_birth=je(a.date_of_birth)),a.gender&&(c.gender=a.gender),a.marital_status&&(c.marital_status=a.marital_status),a.relationship_to_insured&&(c.relationship_to_insured=a.relationship_to_insured),a.is_registered_owner!==null&&a.is_registered_owner!==void 0&&(c.is_registered_owner=a.is_registered_owner?"Yes":"No"),a.license_state&&(c.license_state=a.license_state),a.license_status&&(c.license_status=a.license_status),a.license_number&&(c.license_number=a.license_number),a.date_first_licensed&&(c.date_first_licensed=je(a.date_first_licensed)),a.education_level&&(c.education_level=rc(a.education_level)),a.occupation&&(c.occupation=nc(a.occupation)),a.industry&&(c.industry=mn(a.industry)),a.employment_status&&(c.employment_status=a.employment_status),a.last_5_years_license_suspended_or_revoked!==null&&a.last_5_years_license_suspended_or_revoked!==void 0&&(c.last_5_years_license_suspended_or_revoked=G(a.last_5_years_license_suspended_or_revoked)),a.accident_prevention_course!==null&&a.accident_prevention_course!==void 0&&(c.accident_prevention_course=G(a.accident_prevention_course)),a.accident_prevention_course_date&&(c.accident_prevention_course_date=je(a.accident_prevention_course_date)),a.sr22!==null&&a.sr22!==void 0&&(c.sr22=G(a.sr22));const l=a.ssn_display;typeof l=="string"&&(c.ssn_display=l);const d=a.driver_violations;d&&d.length>0&&(c.driver_violations="Yes",c.driver_violations__items=d.map(m=>{const g={};return m.code&&(g.code=m.code),m.occurred_at&&(g.occurred_at=je(m.occurred_at)),g}));const f=a.driver_accidents;f&&f.length>0&&(c.driver_accidents="Yes",c.driver_accidents__items=f.map(m=>{const g={};return m.occurred_at&&(g.occurred_at=je(m.occurred_at)),m.description&&(g.description=m.description),m.quote_vehicle_id&&(g.quote_vehicle_id=i[m.quote_vehicle_id]??m.quote_vehicle_id),m.property_damage_amount_paid_cents!==null&&m.property_damage_amount_paid_cents!==void 0&&(g.property_damage_amount_paid_cents=m.property_damage_amount_paid_cents),m.personal_injury_amount_paid_cents!==null&&m.personal_injury_amount_paid_cents!==void 0&&(g.personal_injury_amount_paid_cents=m.personal_injury_amount_paid_cents),g}));const h=a.losses;return h&&h.length>0&&(c.losses="Yes",c.losses__items=h.map(m=>{const g={};return m.description&&(g.description=m.description),m.date_of_incident&&(g.date_of_incident=je(m.date_of_incident)),m.amount_paid_cents!==null&&m.amount_paid_cents!==void 0&&(g.amount_paid_cents=m.amount_paid_cents),m.quote_vehicle_id&&(g.quote_vehicle_id=i[m.quote_vehicle_id]??m.quote_vehicle_id),g})),c})):r.drivers="No",t.vehicles&&t.vehicles.length>0?(r.vehicles="Yes",r.vehicles__items=t.vehicles.map(s=>{const a=s,c={};a.vin&&(c.vin=a.vin),a.year!==null&&a.year!==void 0&&(c.year=String(a.year)),a.make&&(c.make=a.make),a.model&&(c.model=a.model),a.body_style&&(c.body_style=a.body_style),a.ownership_type&&(c.ownership_type=a.ownership_type),a.usage&&(c.usage=a.usage),a.annual_mileage!==null&&a.annual_mileage!==void 0&&(c.annual_mileage=a.annual_mileage),a.miles_to_work!==null&&a.miles_to_work!==void 0&&(c.miles_to_work=a.miles_to_work),a.percent_to_work!==null&&a.percent_to_work!==void 0&&(c.percent_to_work=a.percent_to_work);const l=[];return a.garaging_address_line_1&&l.push(a.garaging_address_line_1),a.garaging_address_line_2&&l.push(a.garaging_address_line_2),a.garaging_address_city&&l.push(a.garaging_address_city),a.garaging_address_state&&l.push(a.garaging_address_state),a.garaging_address_postal_code&&l.push(a.garaging_address_postal_code),l.length>0&&(c.garaging_address=l.join(", ")),a.new_when_purchased!==null&&a.new_when_purchased!==void 0&&(c.new_when_purchased=G(a.new_when_purchased)),a.purchase_date&&(c.purchase_date=je(a.purchase_date)),a.anti_theft_type&&(c.anti_theft_type=a.anti_theft_type),a.passive_restraint_type&&(c.passive_restraint_type=a.passive_restraint_type),a.anti_lock_brakes!==null&&a.anti_lock_brakes!==void 0&&(c.anti_lock_brakes=G(a.anti_lock_brakes)),a.daytime_running_lights!==null&&a.daytime_running_lights!==void 0&&(c.daytime_running_lights=G(a.daytime_running_lights)),a.custom_equipment_value_cents!==null&&a.custom_equipment_value_cents!==void 0&&(c.custom_equipment_value_cents=a.custom_equipment_value_cents),a.cost_new_value_cents!==null&&a.cost_new_value_cents!==void 0&&(c.cost_new_value_cents=a.cost_new_value_cents),a.stated_value_amount_cents!==null&&a.stated_value_amount_cents!==void 0&&(c.stated_value_amount_cents=a.stated_value_amount_cents),a.vehicle_has_modifications!==null&&a.vehicle_has_modifications!==void 0&&(c.vehicle_has_modifications=G(a.vehicle_has_modifications)),a.vehicle_garaged_at_residence!==null&&a.vehicle_garaged_at_residence!==void 0&&(c.vehicle_garaged_at_residence=G(a.vehicle_garaged_at_residence)),a.vehicle_comp_deductible&&(c.vehicle_comp_deductible=a.vehicle_comp_deductible),a.vehicle_coll_deductible&&(c.vehicle_coll_deductible=a.vehicle_coll_deductible),a.vehicle_towing_and_labor&&(c.vehicle_towing_and_labor=a.vehicle_towing_and_labor),a.vehicle_transportation_expense&&(c.vehicle_transportation_expense=a.vehicle_transportation_expense),a.vehicle_full_glass!==null&&a.vehicle_full_glass!==void 0&&(c.vehicle_full_glass=G(a.vehicle_full_glass)),a.vehicle_loan_lease!==null&&a.vehicle_loan_lease!==void 0&&(c.vehicle_loan_lease=G(a.vehicle_loan_lease)),a.coverages&&a.coverages.length>0&&(c.coverages__items=a.coverages.map(d=>{const f={};return d.type&&(f.type=d.type),d.per_person_limit_cents!==null&&d.per_person_limit_cents!==void 0&&(f.per_person_limit_cents=d.per_person_limit_cents),d.per_incident_limit_cents!==null&&d.per_incident_limit_cents!==void 0&&(f.per_incident_limit_cents=d.per_incident_limit_cents),d.per_incident_limit_percent!==null&&d.per_incident_limit_percent!==void 0&&(f.per_incident_limit_percent=d.per_incident_limit_percent),d.per_day_limit_cents!==null&&d.per_day_limit_cents!==void 0&&(f.per_day_limit_cents=d.per_day_limit_cents),d.deductible_cents!==null&&d.deductible_cents!==void 0&&(f.deductible_cents=d.deductible_cents),d.is_declined!==null&&d.is_declined!==void 0&&(f.is_declined=G(d.is_declined)),f})),a.vehicle_lienholders&&a.vehicle_lienholders.length>0&&(c.vehicle_lienholders__items=a.vehicle_lienholders.map(d=>{const f={};return d.name&&(f.name=d.name),d.type&&(f.type=d.type),d.line_1&&(f.line_1=d.line_1),d.line_2&&(f.line_2=d.line_2),d.city&&(f.city=d.city),d.state&&(f.state=d.state),d.postal_code&&(f.postal_code=d.postal_code),d.phone&&(f.phone=d.phone),d.fax&&(f.fax=d.fax),f})),c})):r.vehicles="No",t.losses&&t.losses.length>0?(r.home_losses="Yes",r.home_losses__items=t.losses.map(s=>{const a={};return s.description&&(a.description=s.description),s.date_of_incident&&(a.date_of_incident=je(s.date_of_incident)),s.amount_paid_cents!==null&&s.amount_paid_cents!==void 0&&(a.amount_paid_cents=Math.round(Number(s.amount_paid_cents)/100)),a})):r.home_losses="No",r}const nS={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};function oS(e){return nS[e]||e}const _l=new Set(["Zip","Product","Driver","Vehicle"]);function iS(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function hl(e,t){const r=iS(t),n=e.filter(i=>i.key!=="AutoPolicy"),o=n.length>0?n:e;return o}function sS(e,t){const r=e.findIndex(o=>o.key===t);return r<0?t:e[r+1]?.key??t}function gl(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function yl(e){return gl(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const aS={Auto:45e3,Home:5e4,Bundle:1e5};function cS(e,t){if(e!=="AutoCurrentCarrier")return t;const r=t.some(i=>String(i.key)==="auto_cancelled_declined_refused_to_renew"),n=t.some(i=>String(i.key)==="vehicle_policy_selections"),o=[...t];return r||o.push({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}),n||o.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),o}function lS(e,t){if(e!=="Vehicle")return t;const r=n=>n.map(o=>{const i=o.conditionals?.map(s=>{const a=s.conditionalQuestions??[];return a.length?{...s,conditionalQuestions:r(a)}:s});return String(o.key)!=="vin"?i?{...o,conditionals:i}:o:{...o,required:!1,...i?{conditionals:i}:{}}});return r(t)}function uS({isOpen:e,onClose:t}){const[r,n]=_.useState([]),[o,i]=_.useState(null),s=_.useRef(null);_.useEffect(()=>{s.current=o},[o]);const[a,c]=_.useState(null),[l,d]=_.useState(!1),[f,h]=_.useState(!1),[m,g]=_.useState([]),I=_.useRef(null),[H,M]=_.useState(null),[E,D]=_.useState(void 0),[R,C]=_.useState(!1),[P,z]=_.useState(null),[B,ee]=_.useState(null),[Q,ne]=_.useState(!1),[_e,$e]=_.useState(!1),[Ee,oe]=_.useState(!1),K=_.useRef(!1);_.useEffect(()=>{if(!l||f)return;const v=yl(r);let y=!1;const p=[];let S=0,b=0;const A=66,$=3,V=5e3;let F=!1;const T=async()=>{if(y)return;S++;try{const{quote:O}=await wc();if(y)return;if(b=0,!F){const re=O?.appetites??null,ce=cv(re,v);ce.length>0&&(g(ce),F=!0)}const Z=O?.rates_status??null;if(Z==="completed"){const{rates:re}=await Qo();if(y)return;I.current=re,h(!0);return}if(Z==="no_rates"){I.current=[],h(!0);return}if(Z==="failed"){cr(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:s.current??void 0,phase:"rates_status_failed"}),Ir({reason:"submission"}),z({message:"submission_failed"}),d(!1);return}}catch(O){if(b++,console.warn("Provider polling: getQuote failed",{attempt:S,consecutiveFailures:b,error:O}),b>=$){O?.__sentryReported||cr(O,{quoteId:s.current??void 0,phase:"rates_polling",message:`Quote failed: ${$} consecutive get-quote poll failures`}),Ir({reason:"network"}),z({message:"submission_failed"}),d(!1);return}}if(y)return;if(S>=A){cr(new Error(`Quote failed: rate-generation timed out after ${A} polls`),{quoteId:s.current??void 0,phase:"rates_polling_timeout"}),Ir({reason:"timeout"}),z({message:"submission_failed"}),d(!1);return}const k=window.setTimeout(T,V);p.push(k)};return T(),()=>{y=!0,p.forEach(k=>window.clearTimeout(k))}},[l,f,r]);function U(v){return v.map(p=>({key:p,title:oS(p),loadQuestions:async()=>{const S=await Sb(p,s.current??void 0);let b=cS(p,S.questions);return b=lS(p,b),b}}))}_.useEffect(()=>{const v=async()=>{try{const y=Qv();if(y)try{const{token:S,quoteId:b}=await Cb(y);S&&b&&(Ko(S),ic(b))}catch(S){S.statusCode===401&&$e(!0)}const p=yn();if(Jo(),p){C(!0),i(p);try{const S=zt(),b=await wc(S?void 0:p);if(!b||!b.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:A}=b,{stages:$}=await vn(p),V=U($);n(V);let F;try{F=rS(A),M(F)}catch(Z){throw new Error(`Failed to transform quote data: ${Z instanceof Error?Z.message:"Unknown error"}`)}const T=hl(V,F);if(n(T),(A?.review_status??null)==="pending_review"&&zt()){oe(!0);return}const O=A?.rates_status??null;if(zt()){if(O==="completed")try{const{rates:Z}=await Qo();c(Z);return}catch(Z){console.warn("Failed to fetch completed rates on resume",Z)}else if(O==="no_rates"){c([]);return}else if(O==="processing"){g([]),h(!1),I.current=null,d(!0);return}}if(A.current_stage){const Z=A.current_stage==="State"?"Product":A.current_stage,re=T.findIndex(ce=>ce.key===Z);re>=0?D(re):D(T.length-1)}else D(T.length-1)}catch(S){const b=S;if(b.statusCode===404)sc(),i(null);else if(b.statusCode===401){vc();try{const{stages:A}=await vn(p),$=U(A);n($);const V=$.findIndex(F=>F.key==="SMSVerification");V>=0&&D(V)}catch{}}}finally{C(!1)}}else{const{stages:S}=await vn();n(U(S))}}catch{C(!1)}};e&&!K.current&&(K.current=!0,v())},[e]),_.useEffect(()=>{if(!e)return;const{overflow:v}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=v}},[e]);const Y=_.useCallback(v=>{v.key==="Escape"&&(Fc(),t())},[t]);_.useEffect(()=>{if(e)return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[e,Y]),_.useEffect(()=>{e||(M(null),D(void 0),C(!1),d(!1),ee(null),ne(!1))},[e]),_.useEffect(()=>{e&&Vb()},[e]),_.useEffect(()=>{a&&Array.isArray(a)&&Jb({rateCount:a.length})},[a]);const de=_.useCallback(()=>{z(null),D(Math.max(0,r.length-1))},[r.length]),N=_.useCallback(async(v,y)=>{try{g([]),h(!1),I.current=null,d(!0);let p;try{p=await jt(v,!0)}catch(A){throw d(!1),A}if(p.status==="submission_failed"){cr(new Error(`Quote failed at submission: ${p.message}`),{quoteId:o??void 0,phase:y}),d(!1),h(!1),I.current=null,Ir({reason:"submission"}),z({message:p.message});return}if(p.status==="success")try{const{rates:A}=await Qo();I.current=A,h(!0)}catch(A){throw d(!1),A}const S=r.length,b=r[S-1];Bc({stageKey:b?.key??"unknown",stageTitle:b?.title??"unknown",stepIndex:S,totalSteps:S}),Kb()}catch(p){p?.__sentryReported||cr(p,{quoteId:o??void 0,phase:y}),d(!1),Ir({reason:"submission"}),z({message:"Oops, something went wrong. Please try again later."})}},[o,r]),J=_.useCallback(async v=>{if(!(!B||!o||Q)){ne(!0);try{const p={...dr(B.allValues),communications_consent:v};ee(null),await N(p,"consent_submit")}finally{ne(!1)}}},[B,o,Q,N]),L=_.useCallback(async v=>{if(!(!o||Q)){ne(!0);try{M(v);const y={...dr(v),customer_review_confirmed:!0};await N(y,"review_submit")}finally{ne(!1)}}},[o,Q,N]);if(!e)return null;const x=()=>{Fc(),t()},X=!!(!P&&a&&o);return u.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsxs("div",{className:`modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${X?"max-w-6xl":"max-w-2xl"}`,role:"document",children:[u.jsx("button",{onClick:x,className:"modal-close-btn absolute top-4 right-4 text-slate-400 hover:text-slate-600 text-xl","aria-label":"Close",type:"button",children:"×"}),!l&&!P&&u.jsx("div",{className:"text-center mb-6",children:u.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),u.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[_e&&u.jsxs("div",{className:"mb-4 flex items-start justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-800",role:"alert",children:[u.jsx("span",{children:"This resume link has expired or is no longer valid. For your security, emailed links only work for a limited time — you can continue your quote below."}),u.jsx("button",{type:"button",onClick:()=>$e(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),P&&u.jsx(ol,{onGoBack:de}),!P&&l&&(()=>{const v=yl(r);return u.jsx(Ov,{providers:m,totalTime:aS[v],flow:v,isComplete:f,onComplete:()=>{d(!1),h(!1),g([]),I.current&&(c(I.current),I.current=null)}})})(),!P&&!l&&B&&u.jsx(rm,{onChoose:J,isSubmitting:Q}),!P&&!a&&!l&&!B&&u.jsx(u.Fragment,{children:R||r.length===0?u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx("div",{className:"text-slate-600",children:"Loading..."})}):Ee&&o?u.jsx(Iv,{stages:r,initialValues:H??{},quoteId:o,isSubmitting:Q,onConfirmed:L}):u.jsx(iv,{stages:r,initialValues:H??void 0,initialActive:E,quoteId:o??void 0,nonTerminalStageKeys:_l,onStageComplete:async(v,y)=>{try{const p=dr(v);let S=o,b=r;const A=b.findIndex(F=>F.key===y),$=b[A],V=sS(b,y);if(S)if(y==="Phone"){const F=p.phone;if(!F)throw new Error("Phone number is required.");const T=zt();await jt({...p,current_stage:V},!1,T?void 0:S),await wb(S,F)}else if(y==="SMSVerification"){const{isVerified:F,token:T}=await Sc(S,p.sms_code);if(!F)throw new Error("Invalid SMS code");T&&Ko(T),await jt({current_stage:V},!1)}else if(y==="Product"){const F=zt(),{isSupported:T}=await Ec(p.state,F?void 0:S??void 0);if(await jt({...p,current_stage:T?V:y},!1,F?void 0:S),!T){const k=tl(p.state);throw new Error(`Sorry, Credify Corporation doesn't currently offer insurance in ${k}. We're expanding our coverage and hope to serve your state soon.`)}}else{const F=zt();await jt({...p,current_stage:V},!1,F?void 0:S||void 0)}else{const F=p.postal_code??"";if(!F)throw new Error("ZIP code is required to start a quote.");const k=(await Eb(F,tS()))?.quoteId;if(!k||typeof k!="string"||k.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${k}`);S=k,i(k),ic(k),await jt({...p,current_stage:V},!1,k)}if(_l.has(y))try{const{stages:F}=await vn(S||void 0);b=U(F),b=hl(b,v),n(b)}catch(F){console.warn("Unable to refresh stages after flow-shaping step",F)}return Bc({stageKey:y,stageTitle:$?.title??y,stepIndex:A+1,totalSteps:b.length}),{success:!0,latestStages:b}}catch(p){return{success:!1,error:p instanceof Error?p.message:"An error occurred"}}},onComplete:async(v,y)=>{if(!o)return{success:!1,error:"Oops, something went wrong. Please try again later."};M(v);try{if(y==="SMSVerification"){const p=dr(v),{isVerified:S,token:b}=await Sc(o,p.sms_code);return S?(b&&Ko(b),ee({allValues:v}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return ee({allValues:v}),{success:!0}}catch{const S="Oops, something went wrong. Please try again later.";return z({message:S}),{success:!1,error:S}}}})})," ",!P&&a&&o&&u.jsx(_v,{rates:a,onBack:()=>c(null),isBundleFlow:gl(r)})]}),u.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-2",children:[u.jsx(Yv,{}),u.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})]})]})]})}function dS({onClose:e}){return u.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:u.jsx(ol,{onGoBack:e})})]})}function fS({isOpen:e}){const t=()=>Dn.close();return u.jsx(Eo,{fallback:u.jsx(dS,{onClose:t}),children:u.jsx(uS,{isOpen:e,onClose:t})})}var fi={dsn:"",environment:"production",release:"d199f05e981fcaa085fc3a3a4b0b16969f572dca"};function pS(){try{return typeof fi<"u"&&fi?fi:{}}catch{return{}}}let bl=!1;function mS(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function _S(e={}){if(bl)return!0;if(typeof window>"u")return!1;const t=pS(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(ub({baseUrl:Fe}),Hp({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??mS(t.tracesSampleRate,.1),tracePropagationTargets:[Fe],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>_c(n),beforeBreadcrumb:n=>n&&(_c({breadcrumbs:[n]}),n)}),bl=!0,Bp("replayIntegration").then(n=>{try{kd(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[Fe],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}var pi={key:""};const hS="mock";function gS(){try{return typeof pi<"u"&&pi&&pi.key||void 0}catch{return}}function yS(){const e=gS();if(!e||typeof window>"u"||!window.location)return!1;try{return new URLSearchParams(window.location.search).get(hS)===e}catch{return!1}}const bS=new Set(["/create-quote","/get-stages-for-quote","/get-questions-by-stage","/update-quote","/verify-quote","/is-supported-state","/get-rates","/get-quote","/get-vehicle-options","/request-bind"]);let vl=!1;function vS(e){try{if(typeof e=="string")return new URL(e,window.location.href).pathname;if(e instanceof URL)return e.pathname;if(e instanceof Request)return new URL(e.url,window.location.href).pathname}catch{return null}return null}async function SS(e,t){try{if(t?.body&&typeof t.body=="string")return JSON.parse(t.body);if(e instanceof Request){const r=await e.clone().text();return r?JSON.parse(r):{}}}catch{return{}}return{}}function Sl(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}function ES(){try{if(typeof document>"u"||document.getElementById("credify-mock-badge"))return;const e=()=>{const t=document.createElement("div");t.id="credify-mock-badge",t.textContent="MOCK MODE",t.setAttribute("aria-hidden","true"),t.style.cssText=["position:fixed","bottom:12px","left:12px","z-index:2147483647","background:#b91c1c","color:#fff","font:600 11px/1 system-ui,sans-serif","letter-spacing:0.08em","padding:6px 10px","border-radius:9999px","box-shadow:0 1px 4px rgba(0,0,0,0.3)","pointer-events:none","user-select:none"].join(";"),document.body.appendChild(t)};document.body?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}catch{}}function wS(){if(vl||typeof window>"u"||typeof window.fetch!="function"||!yS())return;vl=!0;const e=window.fetch.bind(window),t=Promise.resolve().then(()=>KS);window.fetch=async(r,n)=>{const o=vS(r);if(!o||!bS.has(o))return e(r,n);const i=await SS(r,n),{handleMockRequest:s}=await t;await new Promise(a=>window.setTimeout(a,120));try{return Sl(s(o,i))}catch(a){return Sl({error:a instanceof Error?a.message:"Mock handler error"},404)}},ES(),typeof console<"u"&&console.info("[Credify] Mock mode active — all API calls are served from in-memory fixtures.")}wS();let pt=null,qt=null,Mn=!1;function CS(){pt||(pt=document.createElement("div"),pt.id="insurance-widget-root",document.documentElement.appendChild(pt)),!qt&&pt&&(qt=Nl.createRoot(pt))}function mi(){CS(),qt&&qt.render(_.createElement(fS,{isOpen:Mn}))}function AS(){qt&&pt&&(qt.unmount(),pt.remove()),qt=null,pt=null,ll(),Zb()}const Dn={init:e=>{_S(e?.sentry),Wv(e?.support),Kv(),eS(),Mn=!!e?.autoOpen||Jv(),mi()},open:()=>{Mn=!0,mi()},close:()=>{Mn=!1,mi()},destroy:AS,on:xc,off:$c,support:{openChat:al,startScreenShare:cl}};typeof window<"u"&&(window.CredifyInsuranceWidget=Dn);const TS=["Zip","Email","Product"],kS={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone","SMSVerification"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone","SMSVerification"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone","SMSVerification"]};function IS(e){return e==="Auto"||e==="Home"||e==="Bundle"?kS[e]:TS}const El=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],wl=["25/50","50/100","100/300","250/500"],NS=Array.from({length:35},(e,t)=>String(2024-t)),OS=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],MS=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],DS=[{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}],PS=[{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}],LS=[{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:NS,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}]}]}],xS=[{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}]}]}],Cl=[{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:El,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:wl,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:wl,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],$S=[{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}],Al=[{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:El,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}],FS=[...Al,...Cl],BS={Zip:OS,Email:MS,Product:DS,Name:PS,Vehicle:LS,Driver:xS,AutoCurrentCarrier:Cl,Home:$S,HomePolicy:Al,BundlePolicy:FS,Demographics:[{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}],Ssn:[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],Phone:[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],SMSVerification:[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}]};function US(e){return BS[e]??[]}const HS=[{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."]}],RS=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],zS={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"]},jS=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function WS(e){return e.make&&e.model?{ready:!0,bodyStyles:jS}:e.make?{ready:!0,models:zS[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:RS}}function qS(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const Pn="mock-quote-0001",Tl="mock-jwt-token";let Or={quote_id:Pn};function GS(e={}){Or={quote_id:Pn,...e}}function ZS(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:Tl,quoteId:Pn}:{isVerified:!0,token:Tl}}function VS(e){return e.action==="vinDecode"?qS():WS({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 YS(e,t){switch(e){case"/create-quote":return GS({postal_code:t.postal_code}),{quoteId:Pn};case"/get-stages-for-quote":return{stages:IS(Or.product)};case"/get-questions-by-stage":return{questions:US(t.stage)};case"/update-quote":{const r={...t.payload??{}};return delete r.current_stage,Or={...Or,...r},{status:"success"}}case"/verify-quote":return ZS(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:HS};case"/get-quote":return{quote:Or};case"/get-vehicle-options":return VS(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}const KS=Object.freeze(Object.defineProperty({__proto__:null,handleMockRequest:YS},Symbol.toStringTag,{value:"Module"}));Ke.CredifyInsuranceWidget=Dn,Ke.default=Dn,Object.defineProperties(Ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
98
|
+
`}),u.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:u.jsxs("div",{style:{width:"100%",maxWidth:560},children:[u.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[u.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:i.accent+"12",border:`1px solid ${i.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[u.jsx("span",{style:{fontSize:14},children:i.icon}),u.jsx("span",{style:{fontSize:12,fontWeight:700,color:i.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:i.label})]}),u.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:F?"Connecting to top carriers":"Fetching your best rates"}),u.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:F?"Identifying the carriers eligible for your quote...":re?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),u.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:F?u.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(ne=>u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[u.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ne*.12}s`}}),u.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${ne*.12}s`}})]},`skeleton-${ne}`))}):K?u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[u.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:K.color+"18",border:`2px solid ${K.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:K.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[K.abbr,u.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${K.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),u.jsx("span",{style:{fontSize:13,fontWeight:600,color:K.color,letterSpacing:"0.04em"},children:K.name})]}):null}),u.jsxs("div",{className:`iq-card-fade ${$?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[u.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:F||!K?u.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),u.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),u.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",flexShrink:0},children:[u.jsx(eS,{progress:g,color:K.color,size:80}),u.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:u.jsxs("span",{style:{fontSize:14,fontWeight:700,color:K.color},children:[Math.round(g),"%"]})})]}),u.jsxs("div",{style:{flex:1},children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:re?"Still checking":"Now checking"}),u.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:K.name}),u.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:li[b]},`${c}-${b}`)]})]})}),u.jsxs("div",{children:[u.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:F?"Initializing":"Gathering quotes"}),u.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:u.jsx("div",{style:{height:"100%",width:"35%",background:i.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function fl({onGoBack:e}){return u.jsxs("section",{className:"mt-4",children:[u.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[u.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),u.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),u.jsx("div",{className:"mt-5",children:u.jsx("button",{type:"button",onClick:e,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}var ui={intercomAppId:"",cobrowseLicense:""};function rS(){try{return typeof ui<"u"&&ui?ui:{}}catch{return{}}}function nS(e){const t=rS(),r=e?.intercomAppId??t.intercomAppId,n=e?.cobrowseLicense??t.cobrowseLicense;return{enabled:(e?.enabled??!0)&&!!(r||n),intercomAppId:r||void 0,cobrowseLicense:n||void 0,proactiveOnError:e?.proactiveOnError??!0}}const di=new Map;function pl(e){if(typeof document>"u")return Promise.reject(new Error("loadScript called without a document"));const t=di.get(e);if(t)return t;const r=new Promise((n,o)=>{const i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>n(),i.onerror=()=>{di.delete(e),o(new Error(`Failed to load script: ${e}`))},document.head.appendChild(i)});return di.set(e,r),r}let fi=!1;function oS(){if(typeof window.Intercom=="function")return window.Intercom;const e=function(...t){e.c?.(t)};return e.q=[],e.c=t=>{e.q.push(t)},window.Intercom=e,e}function iS(e){const t={app_id:e,hide_default_launcher:!0},r=bn();return r&&(t.quote_id=r),t}function ml(e){if(typeof window>"u")return;oS();const t=iS(e);if(window.intercomSettings=t,fi){window.Intercom("update",t);return}window.Intercom("boot",t),fi=!0,pl(`https://widget.intercom.io/widget/${e}`).catch(()=>{})}function sS(){typeof window?.Intercom=="function"&&window.Intercom("show")}function aS(e){typeof window?.Intercom=="function"&&window.Intercom("showNewMessage",e)}function cS(e){typeof window?.Intercom=="function"&&window.Intercom("update",e)}function lS(){if(typeof window?.Intercom=="function")try{window.Intercom("shutdown")}catch{}fi=!1}const uS="https://js.cobrowse.io/CobrowseIO.js";let pi=!1;async function dS(e){await pl(uS);const t=window.CobrowseIO;if(!t)return null;if(!pi){t.license=e,t.redactedViews=["input","select","textarea","[data-credify-redact]"],t.customData={quote_id:bn()??void 0,device_name:"Credify Insurance Widget"},t.confirmSession=()=>Promise.resolve(typeof window<"u"?window.confirm("Allow a Credify support agent to view your screen?"):!1);try{await t.client?.()}catch{}t.start?.(),pi=!0}return t}async function fS(e){if(typeof window>"u")return null;try{const t=await dS(e);return t?.createSessionCode?await t.createSessionCode():null}catch{return null}}function pS(){try{window.CobrowseIO?.stop?.()}catch{}pi=!1}const mS="Hi! It looks like something went wrong submitting your quote. We're here to help — tell us what you were trying to do and we'll jump in.";let rt=null,In=null,mi=!1;function _S(e){gl();const t=nS(e);if(rt=t,!!t.enabled&&t.proactiveOnError&&t.intercomAppId){const r=n=>{mi||(mi=!0,ml(t.intercomAppId),cS({last_quote_error:n?.reason??"unknown"}),aS(mS))};Rc("submissionFailed",r),In=r}}function _l(){!rt?.enabled||!rt.intercomAppId||(ml(rt.intercomAppId),sS())}function hl(){return!rt?.enabled||!rt.cobrowseLicense?Promise.resolve(null):fS(rt.cobrowseLicense)}function hS(){return!!(rt?.enabled&&rt.intercomAppId)}function gS(){return!!(rt?.enabled&&rt.cobrowseLicense)}function gl(){In&&(jc("submissionFailed",In),In=null),lS(),pS(),mi=!1,rt=null}const yS="Chat with our support team in real time — we'll help you finish your quote.",bS="Share your screen with a support agent so they can see what you see and guide you in real time. We'll generate a secure code — share it with your agent to begin. Your personal information stays hidden.",yl="inline-flex h-9 w-9 items-center justify-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 disabled:opacity-60",bl="pointer-events-none absolute bottom-full left-1/2 z-10 mb-2 w-60 -translate-x-1/2 rounded-lg bg-slate-800 px-3 py-2 text-center text-xs leading-snug text-white opacity-0 shadow-lg transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100";function vS(){const e=hS(),t=gS(),[r,n]=m.useState(null),[o,i]=m.useState(!1),[s,a]=m.useState(!1),c=m.useCallback(async()=>{i(!0),a(!1);try{const l=await hl();l?n(l):a(!0)}finally{i(!1)}},[]);return!e&&!t?null:u.jsxs("div",{className:"flex flex-col items-center gap-1.5 text-sm text-slate-500",children:[u.jsx("span",{className:"font-medium",children:"Need help?"}),u.jsxs("div",{className:"inline-flex items-center gap-1",children:[e&&u.jsxs("span",{className:"group relative inline-flex",children:[u.jsx("button",{type:"button",onClick:_l,"aria-label":"Chat with support","aria-describedby":"credify-chat-tooltip",className:yl,children:u.jsx("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:u.jsx("path",{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 9 9 0 0 1-3.8-.8L3 21l1.3-4.2A8.38 8.38 0 0 1 3.5 11.5 8.5 8.5 0 0 1 12 3a8.38 8.38 0 0 1 9 8.5Z",strokeLinejoin:"round"})})}),u.jsx("span",{id:"credify-chat-tooltip",role:"tooltip",className:bl,children:yS})]}),e&&t&&u.jsx("span",{className:"mx-1 h-6 w-px bg-slate-200","aria-hidden":"true"}),t&&u.jsxs("span",{className:"group relative inline-flex",children:[u.jsx("button",{type:"button",onClick:c,disabled:o,"aria-label":"Share your screen with an agent","aria-describedby":"credify-cobrowse-tooltip",className:yl,children:o?u.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-slate-300 border-t-slate-600","aria-hidden":"true"}):u.jsxs("svg",{className:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[u.jsx("rect",{x:"2.5",y:"4",width:"19",height:"13",rx:"2"}),u.jsx("path",{d:"M8 21h8M12 17v4",strokeLinecap:"round"}),u.jsx("path",{d:"M12 13V8m0 0-2 2m2-2 2 2",strokeLinecap:"round",strokeLinejoin:"round"})]})}),u.jsx("span",{id:"credify-cobrowse-tooltip",role:"tooltip",className:bl,children:bS})]})]}),r&&u.jsxs("span",{children:["Read this code to your agent: ",u.jsx("strong",{className:"tracking-widest text-text-primary",children:r})]}),s&&u.jsx("span",{className:"text-red-600",children:"Couldn't start screen sharing. Please try chat instead."})]})}const vl="credify_rt";let On=null;function SS(){try{if(typeof window>"u")return;const e=new URL(window.location.href),t=e.searchParams.get(vl);if(!t)return;On=t,e.searchParams.delete(vl),window.history.replaceState(window.history.state,"",e.toString())}catch(e){console.error("Failed to capture resume token from URL:",e)}}function ES(){return On!==null}function wS(){const e=On;return On=null,e}const Sl="credify_test",El="credify_test_mode";let Mn=!1;function CS(e){return e===""||/^(1|true|yes)$/i.test(e.trim())}function AS(){try{if(typeof window>"u")return;window.sessionStorage?.getItem(El)==="1"&&(Mn=!0);const e=new URL(window.location.href),t=e.searchParams.get(Sl);if(t!==null){Mn=CS(t);try{window.sessionStorage?.setItem(El,Mn?"1":"0")}catch{}e.searchParams.delete(Sl),window.history.replaceState(window.history.state,"",e.toString())}}catch(e){console.error("Failed to capture test mode from URL:",e)}}function TS(){return Mn}function q(e){if(e===!0)return"Yes";if(e===!1)return"No"}function We(e){if(e)try{const t=typeof e=="string"?new Date(e):e;return isNaN(t.getTime())?void 0:t.toISOString().split("T")[0]}catch{return}}function kS(e){const t=e,r={};t.phone&&(r.phone=t.phone),t.first_name&&(r.first_name=t.first_name),t.last_name&&(r.last_name=t.last_name),t.email&&(r.email=t.email),t.date_of_birth&&(r.date_of_birth=We(t.date_of_birth)),t.product&&(r.product=t.product),t.state&&(r.state=t.state),t.postal_code&&(r.postal_code=t.postal_code);const n=[];t.line_1&&n.push(t.line_1),t.line_2&&n.push(t.line_2),t.city&&n.push(t.city),t.state&&n.push(t.state),t.postal_code&&n.push(t.postal_code),n.length>0&&(r.address=n.join(", ")),typeof t.ssn_display=="string"&&(r.ssn_display=t.ssn_display),t.years_at_address!==null&&t.years_at_address!==void 0&&(r.years_at_address=t.years_at_address),t.months_at_address!==null&&t.months_at_address!==void 0&&(r.months_at_address=t.months_at_address),t.move_in_date&&(r.move_in_date=We(t.move_in_date));const o=[];t.prior_line_1&&o.push(t.prior_line_1),t.prior_line_2&&o.push(t.prior_line_2),t.prior_city&&o.push(t.prior_city),t.prior_state&&o.push(t.prior_state),t.prior_postal_code&&o.push(t.prior_postal_code),o.length>0&&(r.prior_address=o.join(", ")),t.years_at_prior_address!==null&&t.years_at_prior_address!==void 0&&(r.years_at_prior_address=t.years_at_prior_address),t.is_mailing_address_different!==null&&t.is_mailing_address_different!==void 0&&(r.is_mailing_address_different=q(t.is_mailing_address_different)),t.mailing_address&&(r.mailing_address=t.mailing_address),t.effective_date&&(r.effective_date=We(t.effective_date)),t.auto_has_prior_insurance!==null&&t.auto_has_prior_insurance!==void 0&&(r.auto_has_prior_insurance=q(t.auto_has_prior_insurance)),t.auto_prior_expiration_date&&(r.auto_prior_expiration_date=We(t.auto_prior_expiration_date)),t.auto_prior_carrier_name&&(r.auto_prior_carrier_name=t.auto_prior_carrier_name),t.auto_prior_liability_limit&&(r.auto_prior_liability_limit=t.auto_prior_liability_limit),t.auto_reason_for_no_insurance&&(r.auto_reason_for_no_insurance=t.auto_reason_for_no_insurance),t.auto_prior_years!==null&&t.auto_prior_years!==void 0&&(r.auto_prior_years=t.auto_prior_years),t.auto_prior_months!==null&&t.auto_prior_months!==void 0&&(r.auto_prior_months=t.auto_prior_months),t.auto_continuous_coverage_years!==null&&t.auto_continuous_coverage_years!==void 0&&(r.auto_continuous_coverage_years=t.auto_continuous_coverage_years),t.auto_cancelled_declined_refused_to_renew!==null&&t.auto_cancelled_declined_refused_to_renew!==void 0&&(r.auto_cancelled_declined_refused_to_renew=q(t.auto_cancelled_declined_refused_to_renew)),t.auto_current_annual_premium_cents!==null&&t.auto_current_annual_premium_cents!==void 0&&(r.auto_current_annual_premium_cents=t.auto_current_annual_premium_cents),t.policy_bi&&(r.policy_bi=t.policy_bi),t.policy_um&&(r.policy_um=t.policy_um),t.policy_pd&&(r.policy_pd=t.policy_pd),t.policy_mp&&(r.policy_mp=t.policy_mp),t.policy_umpd&&(r.policy_umpd=t.policy_umpd),t.policy_pip&&(r.policy_pip=t.policy_pip),t.policy_auto_death_indemnity&&(r.policy_auto_death_indemnity=t.policy_auto_death_indemnity),t.driver_vehicle_assignments&&(r.driver_vehicle_assignments=t.driver_vehicle_assignments),t.home_has_prior_insurance!==null&&t.home_has_prior_insurance!==void 0&&(r.home_has_prior_insurance=q(t.home_has_prior_insurance)),t.home_prior_expiration_date&&(r.home_prior_expiration_date=We(t.home_prior_expiration_date)),t.home_prior_carrier_name&&(r.home_prior_carrier_name=t.home_prior_carrier_name),t.home_prior_years!==null&&t.home_prior_years!==void 0&&(r.home_prior_years=t.home_prior_years),t.home_continuous_coverage_years!==null&&t.home_continuous_coverage_years!==void 0&&(r.home_continuous_coverage_years=t.home_continuous_coverage_years),t.property_insurance_cancelled!==null&&t.property_insurance_cancelled!==void 0&&(r.property_insurance_cancelled=q(t.property_insurance_cancelled)),t.lapse_in_coverage!==null&&t.lapse_in_coverage!==void 0&&(r.lapse_in_coverage=q(t.lapse_in_coverage)),t.year_built!==null&&t.year_built!==void 0&&(r.year_built=t.year_built),t.number_of_units!==null&&t.number_of_units!==void 0&&(r.number_of_units=t.number_of_units),t.number_of_stories!==null&&t.number_of_stories!==void 0&&(r.number_of_stories=t.number_of_stories),t.number_of_beds!==null&&t.number_of_beds!==void 0&&(r.number_of_beds=t.number_of_beds),t.number_of_full_baths!==null&&t.number_of_full_baths!==void 0&&(r.number_of_full_baths=t.number_of_full_baths),t.number_of_partial_baths!==null&&t.number_of_partial_baths!==void 0&&(r.number_of_partial_baths=t.number_of_partial_baths),t.under_construction!==null&&t.under_construction!==void 0&&(r.under_construction=q(t.under_construction)),t.distance_from_fire_hydrant_ft&&(r.distance_from_fire_hydrant_ft=t.distance_from_fire_hydrant_ft),t.distance_from_fire_station_miles&&(r.distance_from_fire_station_miles=t.distance_from_fire_station_miles),t.architectural_style&&(r.architectural_style=t.architectural_style),t.dwelling_type&&(r.dwelling_type=t.dwelling_type),t.construction_quality&&(r.construction_quality=t.construction_quality),t.located_over_water!==null&&t.located_over_water!==void 0&&(r.located_over_water=t.located_over_water),t.construction_type&&(r.construction_type=t.construction_type),t.exterior_wall_type&&(r.exterior_wall_type=t.exterior_wall_type),t.foundation_type&&(r.foundation_type=t.foundation_type),t.roof_material_type&&(r.roof_material_type=t.roof_material_type),t.roof_shape&&(r.roof_shape=t.roof_shape),t.roof_updated_type&&(r.roof_updated_type=t.roof_updated_type),t.year_roof_updated!==null&&t.year_roof_updated!==void 0&&(r.year_roof_updated=t.year_roof_updated),t.mit_credit_form!==null&&t.mit_credit_form!==void 0&&(r.mit_credit_form=q(t.mit_credit_form)),t.storm_shutters!==null&&t.storm_shutters!==void 0&&(r.storm_shutters=q(t.storm_shutters)),t.heating_type&&(r.heating_type=t.heating_type),t.oil_tank_location&&(r.oil_tank_location=t.oil_tank_location),t.heating_fuel_type&&(r.heating_fuel_type=t.heating_fuel_type),t.number_of_fireplaces!==null&&t.number_of_fireplaces!==void 0&&(r.number_of_fireplaces=t.number_of_fireplaces),t.basement_type&&(r.basement_type=t.basement_type),t.parking_type&&(r.parking_type=t.parking_type),t.number_of_parking_spaces!==null&&t.number_of_parking_spaces!==void 0&&(r.number_of_parking_spaces=t.number_of_parking_spaces),t.plumbing_type&&(r.plumbing_type=t.plumbing_type),t.pool_type&&(r.pool_type=t.pool_type),t.total_area_sq_ft!==null&&t.total_area_sq_ft!==void 0&&(r.total_area_sq_ft=t.total_area_sq_ft),t.parcel_area_sq_ft!==null&&t.parcel_area_sq_ft!==void 0&&(r.parcel_area_sq_ft=t.parcel_area_sq_ft),t.residence_type&&(r.residence_type=t.residence_type),t.usage_type&&(r.usage_type=t.usage_type),t.household_size!==null&&t.household_size!==void 0&&(r.household_size=t.household_size),t.number_of_mortgagees!==null&&t.number_of_mortgagees!==void 0&&(r.number_of_mortgagees=t.number_of_mortgagees),t.has_dog!==null&&t.has_dog!==void 0&&(r.has_dog=q(t.has_dog)),t.dog_breed_type&&(r.dog_breed_type=t.dog_breed_type),t.number_of_dogs!==null&&t.number_of_dogs!==void 0&&(r.number_of_dogs=t.number_of_dogs),t.has_vicious_animals!==null&&t.has_vicious_animals!==void 0&&(r.has_vicious_animals=q(t.has_vicious_animals)),t.has_business_on_premises!==null&&t.has_business_on_premises!==void 0&&(r.has_business_on_premises=q(t.has_business_on_premises)),t.business_class&&(r.business_class=t.business_class),t.occupancy_type&&(r.occupancy_type=t.occupancy_type),t.short_term_rental!==null&&t.short_term_rental!==void 0&&(r.short_term_rental=q(t.short_term_rental)),t.sale_price_cents!==null&&t.sale_price_cents!==void 0&&(r.sale_price_cents=Math.round(Number(t.sale_price_cents)/100)),t.number_of_families!==null&&t.number_of_families!==void 0&&(r.number_of_families=t.number_of_families),t.number_of_units_in_firewall!==null&&t.number_of_units_in_firewall!==void 0&&(r.number_of_units_in_firewall=t.number_of_units_in_firewall),t.heating_update_yn!==null&&t.heating_update_yn!==void 0&&(r.heating_update_yn=q(t.heating_update_yn)),t.heating_update_type&&(r.heating_update_type=t.heating_update_type),t.heating_update_year!==null&&t.heating_update_year!==void 0&&(r.heating_update_year=t.heating_update_year),t.plumbing_update_yn!==null&&t.plumbing_update_yn!==void 0&&(r.plumbing_update_yn=q(t.plumbing_update_yn)),t.plumbing_update_type&&(r.plumbing_update_type=t.plumbing_update_type),t.plumbing_update_year!==null&&t.plumbing_update_year!==void 0&&(r.plumbing_update_year=t.plumbing_update_year),t.electrical_update_yn!==null&&t.electrical_update_yn!==void 0&&(r.electrical_update_yn=q(t.electrical_update_yn)),t.electrical_update_type&&(r.electrical_update_type=t.electrical_update_type),t.electrical_update_year!==null&&t.electrical_update_year!==void 0&&(r.electrical_update_year=t.electrical_update_year),t.electric_circuit_breaker!==null&&t.electric_circuit_breaker!==void 0&&(r.electric_circuit_breaker=q(t.electric_circuit_breaker)),t.dwelling_replacement_cost!==null&&t.dwelling_replacement_cost!==void 0&&(r.dwelling_replacement_cost=t.dwelling_replacement_cost),t.other_structures_coverage!==null&&t.other_structures_coverage!==void 0&&(r.other_structures_coverage=t.other_structures_coverage),t.personal_property_coverage!==null&&t.personal_property_coverage!==void 0&&(r.personal_property_coverage=t.personal_property_coverage),t.loss_of_use_coverage!==null&&t.loss_of_use_coverage!==void 0&&(r.loss_of_use_coverage=t.loss_of_use_coverage),t.personal_liability&&(r.personal_liability=t.personal_liability),t.dwelling_medical_payments&&(r.dwelling_medical_payments=t.dwelling_medical_payments),t.all_perils_deductible&&(r.all_perils_deductible=t.all_perils_deductible),t.windstorm_deductible&&(r.windstorm_deductible=t.windstorm_deductible),t.has_garage!==null&&t.has_garage!==void 0&&(r.has_garage=q(t.has_garage)),t.has_pool!==null&&t.has_pool!==void 0&&(r.has_pool=q(t.has_pool)),t.has_trampoline!==null&&t.has_trampoline!==void 0&&(r.has_trampoline=q(t.has_trampoline)),t.gender&&(r.gender=t.gender),t.marital_status&&(r.marital_status=t.marital_status),t.employment_industry&&(r.employment_industry=t.employment_industry),t.occupation&&(r.occupation=t.occupation),t.has_co_applicant!==null&&t.has_co_applicant!==void 0&&(r.has_co_applicant=q(t.has_co_applicant)),t.co_applicant_first_name&&(r.co_applicant_first_name=t.co_applicant_first_name),t.co_applicant_middle_name&&(r.co_applicant_middle_name=t.co_applicant_middle_name),t.co_applicant_last_name&&(r.co_applicant_last_name=t.co_applicant_last_name),t.co_applicant_gender&&(r.co_applicant_gender=t.co_applicant_gender),t.co_applicant_marital_status&&(r.co_applicant_marital_status=t.co_applicant_marital_status),t.co_applicant_relationship&&(r.co_applicant_relationship=t.co_applicant_relationship),t.co_applicant_date_of_birth&&(r.co_applicant_date_of_birth=We(t.co_applicant_date_of_birth)),t.co_applicant_employment_industry&&(r.co_applicant_employment_industry=t.co_applicant_employment_industry),t.co_applicant_occupation&&(r.co_applicant_occupation=t.co_applicant_occupation),t.retiree_discount!==null&&t.retiree_discount!==void 0&&(r.retiree_discount=q(t.retiree_discount)),t.gated_community_discount!==null&&t.gated_community_discount!==void 0&&(r.gated_community_discount=q(t.gated_community_discount)),t.multi_policy_discount!==null&&t.multi_policy_discount!==void 0&&(r.multi_policy_discount=q(t.multi_policy_discount)),t.non_smoker_discount!==null&&t.non_smoker_discount!==void 0&&(r.non_smoker_discount=q(t.non_smoker_discount)),t.first_time_buyer_discount!==null&&t.first_time_buyer_discount!==void 0&&(r.first_time_buyer_discount=q(t.first_time_buyer_discount)),t.fire_detection_system!==null&&t.fire_detection_system!==void 0&&(r.fire_detection_system=q(t.fire_detection_system)),t.burglar_alarm_system!==null&&t.burglar_alarm_system!==void 0&&(r.burglar_alarm_system=q(t.burglar_alarm_system)),t.burglar_alarm_system_type&&(r.burglar_alarm_system_type=t.burglar_alarm_system_type),t.smoke_detectors!==null&&t.smoke_detectors!==void 0&&(r.smoke_detectors=q(t.smoke_detectors)),t.sprinkler_system!==null&&t.sprinkler_system!==void 0&&(r.sprinkler_system=q(t.sprinkler_system)),t.sprinkler_system_type&&(r.sprinkler_system_type=t.sprinkler_system_type),t.gas_leakage_detector!==null&&t.gas_leakage_detector!==void 0&&(r.gas_leakage_detector=q(t.gas_leakage_detector)),t.deadbolt_locks!==null&&t.deadbolt_locks!==void 0&&(r.deadbolt_locks=q(t.deadbolt_locks)),t.fire_extinguisher!==null&&t.fire_extinguisher!==void 0&&(r.fire_extinguisher=q(t.fire_extinguisher)),t.order_credit_authorized!==null&&t.order_credit_authorized!==void 0&&(r.order_credit_authorized=q(t.order_credit_authorized)),t.has_health_insurance_auto_accident!==null&&t.has_health_insurance_auto_accident!==void 0&&(r.has_health_insurance_auto_accident=q(t.has_health_insurance_auto_accident)),t.is_corporation!==null&&t.is_corporation!==void 0&&(r.is_corporation=q(t.is_corporation)),t.named_insured_foreclosure_repo_bankruptcy!==null&&t.named_insured_foreclosure_repo_bankruptcy!==void 0&&(r.named_insured_foreclosure_repo_bankruptcy=q(t.named_insured_foreclosure_repo_bankruptcy)),t.named_insured_convicted_insurance_fraud!==null&&t.named_insured_convicted_insurance_fraud!==void 0&&(r.named_insured_convicted_insurance_fraud=q(t.named_insured_convicted_insurance_fraud));const i={};if(t.vehicles)for(const s of t.vehicles)s.quote_vehicle_id&&s.vin&&(i[s.quote_vehicle_id]=s.vin);return t.drivers&&t.drivers.length>0?(r.drivers="Yes",r.drivers__items=t.drivers.map(s=>{const a=s,c={};a.first_name&&(c.first_name=a.first_name),a.middle_name&&(c.middle_name=a.middle_name),a.last_name&&(c.last_name=a.last_name),a.date_of_birth&&(c.date_of_birth=We(a.date_of_birth)),a.gender&&(c.gender=a.gender),a.marital_status&&(c.marital_status=a.marital_status),a.relationship_to_insured&&(c.relationship_to_insured=a.relationship_to_insured),a.is_registered_owner!==null&&a.is_registered_owner!==void 0&&(c.is_registered_owner=a.is_registered_owner?"Yes":"No"),a.license_state&&(c.license_state=a.license_state),a.license_status&&(c.license_status=a.license_status),a.license_number&&(c.license_number=a.license_number),a.date_first_licensed&&(c.date_first_licensed=We(a.date_first_licensed)),a.education_level&&(c.education_level=ic(a.education_level)),a.occupation&&(c.occupation=sc(a.occupation)),a.industry&&(c.industry=_n(a.industry)),a.employment_status&&(c.employment_status=a.employment_status),a.last_5_years_license_suspended_or_revoked!==null&&a.last_5_years_license_suspended_or_revoked!==void 0&&(c.last_5_years_license_suspended_or_revoked=q(a.last_5_years_license_suspended_or_revoked)),a.accident_prevention_course!==null&&a.accident_prevention_course!==void 0&&(c.accident_prevention_course=q(a.accident_prevention_course)),a.accident_prevention_course_date&&(c.accident_prevention_course_date=We(a.accident_prevention_course_date)),a.sr22!==null&&a.sr22!==void 0&&(c.sr22=q(a.sr22));const l=a.ssn_display;typeof l=="string"&&(c.ssn_display=l);const d=a.driver_violations;d&&d.length>0&&(c.driver_violations="Yes",c.driver_violations__items=d.map(h=>{const b={};return h.code&&(b.code=h.code),h.occurred_at&&(b.occurred_at=We(h.occurred_at)),b}));const f=a.driver_accidents;f&&f.length>0&&(c.driver_accidents="Yes",c.driver_accidents__items=f.map(h=>{const b={};return h.occurred_at&&(b.occurred_at=We(h.occurred_at)),h.description&&(b.description=h.description),h.quote_vehicle_id&&(b.quote_vehicle_id=i[h.quote_vehicle_id]??h.quote_vehicle_id),h.property_damage_amount_paid_cents!==null&&h.property_damage_amount_paid_cents!==void 0&&(b.property_damage_amount_paid_cents=h.property_damage_amount_paid_cents),h.personal_injury_amount_paid_cents!==null&&h.personal_injury_amount_paid_cents!==void 0&&(b.personal_injury_amount_paid_cents=h.personal_injury_amount_paid_cents),b}));const g=a.losses;return g&&g.length>0&&(c.losses="Yes",c.losses__items=g.map(h=>{const b={};return h.description&&(b.description=h.description),h.date_of_incident&&(b.date_of_incident=We(h.date_of_incident)),h.amount_paid_cents!==null&&h.amount_paid_cents!==void 0&&(b.amount_paid_cents=h.amount_paid_cents),h.quote_vehicle_id&&(b.quote_vehicle_id=i[h.quote_vehicle_id]??h.quote_vehicle_id),b})),c})):r.drivers="No",t.vehicles&&t.vehicles.length>0?(r.vehicles="Yes",r.vehicles__items=t.vehicles.map(s=>{const a=s,c={};a.vin&&(c.vin=a.vin),a.year!==null&&a.year!==void 0&&(c.year=String(a.year)),a.make&&(c.make=a.make),a.model&&(c.model=a.model),a.body_style&&(c.body_style=a.body_style),a.ownership_type&&(c.ownership_type=a.ownership_type),a.usage&&(c.usage=a.usage),a.annual_mileage!==null&&a.annual_mileage!==void 0&&(c.annual_mileage=a.annual_mileage),a.miles_to_work!==null&&a.miles_to_work!==void 0&&(c.miles_to_work=a.miles_to_work),a.percent_to_work!==null&&a.percent_to_work!==void 0&&(c.percent_to_work=a.percent_to_work);const l=[];return a.garaging_address_line_1&&l.push(a.garaging_address_line_1),a.garaging_address_line_2&&l.push(a.garaging_address_line_2),a.garaging_address_city&&l.push(a.garaging_address_city),a.garaging_address_state&&l.push(a.garaging_address_state),a.garaging_address_postal_code&&l.push(a.garaging_address_postal_code),l.length>0&&(c.garaging_address=l.join(", ")),a.new_when_purchased!==null&&a.new_when_purchased!==void 0&&(c.new_when_purchased=q(a.new_when_purchased)),a.purchase_date&&(c.purchase_date=We(a.purchase_date)),a.anti_theft_type&&(c.anti_theft_type=a.anti_theft_type),a.passive_restraint_type&&(c.passive_restraint_type=a.passive_restraint_type),a.anti_lock_brakes!==null&&a.anti_lock_brakes!==void 0&&(c.anti_lock_brakes=q(a.anti_lock_brakes)),a.daytime_running_lights!==null&&a.daytime_running_lights!==void 0&&(c.daytime_running_lights=q(a.daytime_running_lights)),a.custom_equipment_value_cents!==null&&a.custom_equipment_value_cents!==void 0&&(c.custom_equipment_value_cents=a.custom_equipment_value_cents),a.cost_new_value_cents!==null&&a.cost_new_value_cents!==void 0&&(c.cost_new_value_cents=a.cost_new_value_cents),a.stated_value_amount_cents!==null&&a.stated_value_amount_cents!==void 0&&(c.stated_value_amount_cents=a.stated_value_amount_cents),a.vehicle_has_modifications!==null&&a.vehicle_has_modifications!==void 0&&(c.vehicle_has_modifications=q(a.vehicle_has_modifications)),a.vehicle_garaged_at_residence!==null&&a.vehicle_garaged_at_residence!==void 0&&(c.vehicle_garaged_at_residence=q(a.vehicle_garaged_at_residence)),a.vehicle_comp_deductible&&(c.vehicle_comp_deductible=a.vehicle_comp_deductible),a.vehicle_coll_deductible&&(c.vehicle_coll_deductible=a.vehicle_coll_deductible),a.vehicle_towing_and_labor&&(c.vehicle_towing_and_labor=a.vehicle_towing_and_labor),a.vehicle_transportation_expense&&(c.vehicle_transportation_expense=a.vehicle_transportation_expense),a.vehicle_full_glass!==null&&a.vehicle_full_glass!==void 0&&(c.vehicle_full_glass=q(a.vehicle_full_glass)),a.vehicle_loan_lease!==null&&a.vehicle_loan_lease!==void 0&&(c.vehicle_loan_lease=q(a.vehicle_loan_lease)),a.coverages&&a.coverages.length>0&&(c.coverages__items=a.coverages.map(d=>{const f={};return d.type&&(f.type=d.type),d.per_person_limit_cents!==null&&d.per_person_limit_cents!==void 0&&(f.per_person_limit_cents=d.per_person_limit_cents),d.per_incident_limit_cents!==null&&d.per_incident_limit_cents!==void 0&&(f.per_incident_limit_cents=d.per_incident_limit_cents),d.per_incident_limit_percent!==null&&d.per_incident_limit_percent!==void 0&&(f.per_incident_limit_percent=d.per_incident_limit_percent),d.per_day_limit_cents!==null&&d.per_day_limit_cents!==void 0&&(f.per_day_limit_cents=d.per_day_limit_cents),d.deductible_cents!==null&&d.deductible_cents!==void 0&&(f.deductible_cents=d.deductible_cents),d.is_declined!==null&&d.is_declined!==void 0&&(f.is_declined=q(d.is_declined)),f})),a.vehicle_lienholders&&a.vehicle_lienholders.length>0&&(c.vehicle_lienholders__items=a.vehicle_lienholders.map(d=>{const f={};return d.name&&(f.name=d.name),d.type&&(f.type=d.type),d.line_1&&(f.line_1=d.line_1),d.line_2&&(f.line_2=d.line_2),d.city&&(f.city=d.city),d.state&&(f.state=d.state),d.postal_code&&(f.postal_code=d.postal_code),d.phone&&(f.phone=d.phone),d.fax&&(f.fax=d.fax),f})),c})):r.vehicles="No",t.losses&&t.losses.length>0?(r.home_losses="Yes",r.home_losses__items=t.losses.map(s=>{const a={};return s.description&&(a.description=s.description),s.date_of_incident&&(a.date_of_incident=We(s.date_of_incident)),s.amount_paid_cents!==null&&s.amount_paid_cents!==void 0&&(a.amount_paid_cents=Math.round(Number(s.amount_paid_cents)/100)),a})):r.home_losses="No",r}const NS={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};function IS(e){return NS[e]||e}const wl=new Set(["Zip","Product","Driver","Vehicle"]);function OS(e){return e?Array.isArray(e.drivers__items)?e.drivers__items.length:Array.isArray(e.drivers)?e.drivers.length:null:null}function Cl(e,t){const r=OS(t),n=e.filter(i=>i.key!=="AutoPolicy"),o=n.length>0?n:e;return o}function MS(e,t){const r=e.findIndex(o=>o.key===t);return r<0?t:e[r+1]?.key??t}function Al(e){return e.some(t=>String(t.key)==="BundlePolicy"||String(t.key)==="BundleCustomer")}function Tl(e){return Al(e)?"Bundle":e.some(t=>String(t.key)==="Vehicle"||String(t.key)==="Driver")?"Auto":"Home"}const DS={Auto:45e3,Home:5e4,Bundle:1e5};function PS(e,t){if(e!=="AutoCurrentCarrier")return t;const r=t.some(i=>String(i.key)==="auto_cancelled_declined_refused_to_renew"),n=t.some(i=>String(i.key)==="vehicle_policy_selections"),o=[...t];return r||o.push({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}),n||o.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),o}function xS(e,t){if(e!=="Vehicle")return t;const r=n=>n.map(o=>{const i=o.conditionals?.map(s=>{const a=s.conditionalQuestions??[];return a.length?{...s,conditionalQuestions:r(a)}:s});return String(o.key)!=="vin"?i?{...o,conditionals:i}:o:{...o,required:!1,...i?{conditionals:i}:{}}});return r(t)}function LS({isOpen:e,onClose:t}){const[r,n]=m.useState([]),[o,i]=m.useState(null),s=m.useRef(null);m.useEffect(()=>{s.current=o},[o]);const[a,c]=m.useState(null),[l,d]=m.useState(!1),[f,g]=m.useState(!1),[h,b]=m.useState([]),T=m.useRef(null),[$,O]=m.useState(null),[C,D]=m.useState(void 0),[U,E]=m.useState(!1),[x,R]=m.useState(null),[F,K]=m.useState(null),[re,ne]=m.useState(!1),[Ce,De]=m.useState(!1),[X,Q]=m.useState(!1),V=m.useRef(!1);m.useEffect(()=>{if(!l||f)return;const y=Tl(r);let _=!1;const p=[];let v=0,S=0;const k=66,B=3,G=5e3;let I=!1;const w=async()=>{if(_)return;v++;try{const{quote:M}=await Tc();if(_)return;if(S=0,!I){const Z=M?.appetites??null,Y=Pv(Z,y);Y.length>0&&(b(Y),I=!0)}const H=M?.rates_status??null;if(H==="completed"){const{rates:Z}=await Xo();if(_)return;T.current=Z,g(!0);return}if(H==="no_rates"){T.current=[],g(!0);return}if(H==="failed"){lr(new Error("Quote failed: rate-generation worker reported rates_status=failed"),{quoteId:s.current??void 0,phase:"rates_status_failed"}),Ir({reason:"submission"}),R({message:"submission_failed"}),d(!1);return}}catch(M){if(S++,console.warn("Provider polling: getQuote failed",{attempt:v,consecutiveFailures:S,error:M}),S>=B){M?.__sentryReported||lr(M,{quoteId:s.current??void 0,phase:"rates_polling",message:`Quote failed: ${B} consecutive get-quote poll failures`}),Ir({reason:"network"}),R({message:"submission_failed"}),d(!1);return}}if(_)return;if(v>=k){lr(new Error(`Quote failed: rate-generation timed out after ${k} polls`),{quoteId:s.current??void 0,phase:"rates_polling_timeout"}),Ir({reason:"timeout"}),R({message:"submission_failed"}),d(!1);return}const N=window.setTimeout(w,G);p.push(N)};return w(),()=>{_=!0,p.forEach(N=>window.clearTimeout(N))}},[l,f,r]);function me(y){return y.map(p=>({key:p,title:IS(p),loadQuestions:async()=>{const v=await Nb(p,s.current??void 0);let S=PS(p,v.questions);return S=xS(p,S),S}}))}m.useEffect(()=>{const y=async()=>{try{const _=wS();if(_)try{const{token:v,quoteId:S}=await Mb(_);v&&S&&(Jo(v),cc(S))}catch(v){v.statusCode===401&&De(!0)}const p=bn();if(Qo(),p){E(!0),i(p);try{const v=jt(),S=await Tc(v?void 0:p);if(!S||!S.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:k}=S,{stages:B}=await Sn(p),G=me(B);n(G);let I;try{I=kS(k),O(I)}catch(H){throw new Error(`Failed to transform quote data: ${H instanceof Error?H.message:"Unknown error"}`)}const w=Cl(G,I);if(n(w),(k?.review_status??null)==="pending_review"&&jt()){Q(!0);return}const M=k?.rates_status??null;if(jt()){if(M==="completed")try{const{rates:H}=await Xo();c(H);return}catch(H){console.warn("Failed to fetch completed rates on resume",H)}else if(M==="no_rates"){c([]);return}else if(M==="processing"){b([]),g(!1),T.current=null,d(!0);return}}if(k.current_stage){const H=k.current_stage==="State"?"Product":k.current_stage,Z=w.findIndex(Y=>Y.key===H);Z>=0?D(Z):D(w.length-1)}else D(w.length-1)}catch(v){const S=v;if(S.statusCode===404)lc(),i(null);else if(S.statusCode===401){wc();try{const{stages:k}=await Sn(p),B=me(k);n(B);const G=B.findIndex(I=>I.key==="SMSVerification");G>=0&&D(G)}catch{}}}finally{E(!1)}}else{const{stages:v}=await Sn();n(me(v))}}catch{E(!1)}};e&&!V.current&&(V.current=!0,y())},[e]),m.useEffect(()=>{if(!e)return;const{overflow:y}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=y}},[e]);const ge=m.useCallback(y=>{y.key==="Escape"&&(Wc(),t())},[t]);m.useEffect(()=>{if(e)return window.addEventListener("keydown",ge),()=>window.removeEventListener("keydown",ge)},[e,ge]),m.useEffect(()=>{e||(O(null),D(void 0),E(!1),d(!1),K(null),ne(!1))},[e]),m.useEffect(()=>{e&&bv()},[e]),m.useEffect(()=>{a&&Array.isArray(a)&&Ev({rateCount:a.length})},[a]);const ke=m.useCallback(()=>{R(null),D(Math.max(0,r.length-1))},[r.length]),P=m.useCallback(async(y,_)=>{try{b([]),g(!1),T.current=null,d(!0);let p;try{p=await Wt(y,!0)}catch(k){throw d(!1),k}if(p.status==="submission_failed"){lr(new Error(`Quote failed at submission: ${p.message}`),{quoteId:o??void 0,phase:_}),d(!1),g(!1),T.current=null,Ir({reason:"submission"}),R({message:p.message});return}if(p.status==="success")try{const{rates:k}=await Xo();T.current=k,g(!0)}catch(k){throw d(!1),k}const v=r.length,S=r[v-1];qc({stageKey:S?.key??"unknown",stageTitle:S?.title??"unknown",stepIndex:v,totalSteps:v}),Sv()}catch(p){p?.__sentryReported||lr(p,{quoteId:o??void 0,phase:_}),d(!1),Ir({reason:"submission"}),R({message:"Oops, something went wrong. Please try again later."})}},[o,r]),L=m.useCallback(async y=>{if(!(!F||!o||re)){ne(!0);try{const p={...fr(F.allValues),communications_consent:y};K(null),await P(p,"consent_submit")}finally{ne(!1)}}},[F,o,re,P]),J=m.useCallback(async y=>{if(!(!o||re)){ne(!0);try{O(y);const _={...fr(y),customer_review_confirmed:!0};await P(_,"review_submit")}finally{ne(!1)}}},[o,re,P]);if(!e)return null;const ee=()=>{Wc(),t()},oe=!!(!x&&a&&o);return u.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsxs("div",{className:`modal-panel bg-white relative w-full flex flex-col max-h-[90vh] overflow-hidden ${oe?"max-w-6xl":"max-w-2xl"}`,role:"document",children:[u.jsx("button",{onClick:ee,className:"modal-close-btn absolute top-4 right-4 text-slate-400 hover:text-slate-600 text-xl","aria-label":"Close",type:"button",children:"×"}),!l&&!x&&u.jsx("div",{className:"text-center mb-6",children:u.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),u.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[Ce&&u.jsxs("div",{className:"mb-4 flex items-start justify-between gap-3 rounded-md border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-800",role:"alert",children:[u.jsx("span",{children:"This resume link has expired or is no longer valid. For your security, emailed links only work for a limited time — you can continue your quote below."}),u.jsx("button",{type:"button",onClick:()=>De(!1),className:"shrink-0 font-bold text-amber-800 hover:text-amber-900","aria-label":"Dismiss",children:"×"})]}),x&&u.jsx(fl,{onGoBack:ke}),!x&&l&&(()=>{const y=Tl(r);return u.jsx(tS,{providers:h,totalTime:DS[y],flow:y,isComplete:f,onComplete:()=>{d(!1),g(!1),b([]),T.current&&(c(T.current),T.current=null)}})})(),!x&&!l&&F&&u.jsx(um,{onChoose:L,isSubmitting:re}),!x&&!a&&!l&&!F&&u.jsx(u.Fragment,{children:U||r.length===0?u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx("div",{className:"text-slate-600",children:"Loading..."})}):X&&o?u.jsx(Xv,{stages:r,initialValues:$??{},quoteId:o,isSubmitting:re,onConfirmed:J}):u.jsx(Ov,{stages:r,initialValues:$??void 0,initialActive:C,quoteId:o??void 0,nonTerminalStageKeys:wl,onStageComplete:async(y,_)=>{try{const p=fr(y);let v=o,S=r;const k=S.findIndex(I=>I.key===_),B=S[k],G=MS(S,_);if(v)if(_==="Phone"){const I=p.phone;if(!I)throw new Error("Phone number is required.");const w=jt();await Wt({...p,current_stage:G},!1,w?void 0:v),await Ob(v,I)}else if(_==="SMSVerification"){const{isVerified:I,token:w}=await Cc(v,p.sms_code);if(!I)throw new Error("Invalid SMS code");w&&Jo(w),await Wt({current_stage:G},!1)}else if(_==="Product"){const I=jt(),{isSupported:w}=await Ac(p.state,I?void 0:v??void 0);if(await Wt({...p,current_stage:w?G:_},!1,I?void 0:v),!w){const N=ll(p.state);throw new Error(`Sorry, Credify Corporation doesn't currently offer insurance in ${N}. We're expanding our coverage and hope to serve your state soon.`)}}else{const I=jt();await Wt({...p,current_stage:G},!1,I?void 0:v||void 0)}else{const I=p.postal_code??"";if(!I)throw new Error("ZIP code is required to start a quote.");const N=(await Ib(I,TS()))?.quoteId;if(!N||typeof N!="string"||N.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${N}`);v=N,i(N),cc(N),await Wt({...p,current_stage:G},!1,N)}if(_==="Name"&&v){const I=String(y.product??"");(I==="Auto"||I==="Both")&&av(v)}if(_==="Vehicle"&&v&&uv(v),wl.has(_))try{const{stages:I}=await Sn(v||void 0);S=me(I),S=Cl(S,y),n(S)}catch(I){console.warn("Unable to refresh stages after flow-shaping step",I)}return qc({stageKey:_,stageTitle:B?.title??_,stepIndex:k+1,totalSteps:S.length}),{success:!0,latestStages:S}}catch(p){return{success:!1,error:p instanceof Error?p.message:"An error occurred"}}},onComplete:async(y,_)=>{if(!o)return{success:!1,error:"Oops, something went wrong. Please try again later."};O(y);try{if(_==="SMSVerification"){const p=fr(y),{isVerified:v,token:S}=await Cc(o,p.sms_code);return v?(S&&Jo(S),K({allValues:y}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return K({allValues:y}),{success:!0}}catch{const v="Oops, something went wrong. Please try again later.";return R({message:v}),{success:!1,error:v}}}})})," ",!x&&a&&o&&u.jsx(Hv,{rates:a,onBack:()=>c(null),isBundleFlow:Al(r)})]}),u.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-2",children:[u.jsx(vS,{}),u.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})]})]})]})}function $S({onClose:e}){return u.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true",children:[u.jsx("div",{className:"backdrop","aria-hidden":"true"}),u.jsx("div",{className:"modal-panel bg-white relative w-full max-w-2xl p-6",children:u.jsx(fl,{onGoBack:e})})]})}function FS({isOpen:e}){const t=()=>Pn.close();return u.jsx(wo,{fallback:u.jsx($S,{onClose:t}),children:u.jsx(LS,{isOpen:e,onClose:t})})}var _i={dsn:"",environment:"production",release:"c57a739d58980404125c230bfaf7020761088cd3"};function BS(){try{return typeof _i<"u"&&_i?_i:{}}catch{return{}}}let kl=!1;function US(e,t){if(!e)return t;const r=Number(e);return Number.isFinite(r)&&r>=0&&r<=1?r:t}function HS(e={}){if(kl)return!0;if(typeof window>"u")return!1;const t=BS(),r=e.dsn??t.dsn;return!r||e.enabled===!1?!1:(yb({baseUrl:we}),Zp({dsn:r,environment:e.environment??t.environment??"production",release:e.release??t.release,sendDefaultPii:!1,maxBreadcrumbs:50,tracesSampleRate:e.tracesSampleRate??US(t.tracesSampleRate,.1),tracePropagationTargets:[we],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSend:n=>yc(n),beforeBreadcrumb:n=>n&&(yc({breadcrumbs:[n]}),n)}),kl=!0,Gp("replayIntegration").then(n=>{try{Ld(n({maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,networkDetailAllowUrls:[we],networkCaptureBodies:!1}))}catch{}}).catch(()=>{}),!0)}var hi={key:""};const zS="mock";function RS(){try{return typeof hi<"u"&&hi&&hi.key||void 0}catch{return}}function jS(){const e=RS();if(!e||typeof window>"u"||!window.location)return!1;try{return new URLSearchParams(window.location.search).get(zS)===e}catch{return!1}}const WS=new Set(["/create-quote","/get-stages-for-quote","/get-questions-by-stage","/update-quote","/verify-quote","/is-supported-state","/get-rates","/get-quote","/get-vehicle-options","/request-bind"]);let Nl=!1;function qS(e){try{if(typeof e=="string")return new URL(e,window.location.href).pathname;if(e instanceof URL)return e.pathname;if(e instanceof Request)return new URL(e.url,window.location.href).pathname}catch{return null}return null}async function GS(e,t){try{if(t?.body&&typeof t.body=="string")return JSON.parse(t.body);if(e instanceof Request){const r=await e.clone().text();return r?JSON.parse(r):{}}}catch{return{}}return{}}function Il(e,t=200){return new Response(JSON.stringify(e),{status:t,headers:{"Content-Type":"application/json"}})}function VS(){try{if(typeof document>"u"||document.getElementById("credify-mock-badge"))return;const e=()=>{const t=document.createElement("div");t.id="credify-mock-badge",t.textContent="MOCK MODE",t.setAttribute("aria-hidden","true"),t.style.cssText=["position:fixed","bottom:12px","left:12px","z-index:2147483647","background:#b91c1c","color:#fff","font:600 11px/1 system-ui,sans-serif","letter-spacing:0.08em","padding:6px 10px","border-radius:9999px","box-shadow:0 1px 4px rgba(0,0,0,0.3)","pointer-events:none","user-select:none"].join(";"),document.body.appendChild(t)};document.body?e():document.addEventListener("DOMContentLoaded",e,{once:!0})}catch{}}function ZS(){if(Nl||typeof window>"u"||typeof window.fetch!="function"||!jS())return;Nl=!0;const e=window.fetch.bind(window),t=Promise.resolve().then(()=>SE);window.fetch=async(r,n)=>{const o=qS(r);if(!o||!WS.has(o))return e(r,n);const i=await GS(r,n),{handleMockRequest:s}=await t;await new Promise(a=>window.setTimeout(a,120));try{return Il(s(o,i))}catch(a){return Il({error:a instanceof Error?a.message:"Mock handler error"},404)}},VS(),typeof console<"u"&&console.info("[Credify] Mock mode active — all API calls are served from in-memory fixtures.")}ZS();let pt=null,Gt=null,Dn=!1;function YS(){pt||(pt=document.createElement("div"),pt.id="insurance-widget-root",document.documentElement.appendChild(pt)),!Gt&&pt&&(Gt=Fl.createRoot(pt))}function gi(){YS(),Gt&&Gt.render(m.createElement(FS,{isOpen:Dn}))}function KS(){Gt&&pt&&(Gt.unmount(),pt.remove()),Gt=null,pt=null,gl(),yv()}const Pn={init:e=>{HS(e?.sentry),_S(e?.support),SS(),AS(),Dn=!!e?.autoOpen||ES(),gi()},open:()=>{Dn=!0,gi()},close:()=>{Dn=!1,gi()},destroy:KS,on:Rc,off:jc,support:{openChat:_l,startScreenShare:hl}};typeof window<"u"&&(window.CredifyInsuranceWidget=Pn);const JS=["Zip","Email","Product"],QS={Auto:["Zip","Email","Product","Name","Vehicle","Driver","AutoCurrentCarrier","Demographics","Ssn","Phone","SMSVerification"],Home:["Zip","Email","Product","Name","Home","HomePolicy","Demographics","Ssn","Phone","SMSVerification"],Bundle:["Zip","Email","Product","Name","Home","Vehicle","Driver","BundlePolicy","Demographics","Ssn","Phone","SMSVerification"]};function XS(e){return e==="Auto"||e==="Home"||e==="Bundle"?QS[e]:JS}const Ol=["Allstate","State Farm","GEICO","Progressive","Liberty Mutual","Nationwide","Farmers","NoPriorInsurance"],Ml=["25/50","50/100","100/300","250/500"],eE=Array.from({length:35},(e,t)=>String(2024-t)),tE=[{question:"What's your ZIP code?",inputType:"text",key:"postal_code",required:!0}],rE=[{question:"What is your email address?",inputType:"email",key:"email",required:!0}],nE=[{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}],oE=[{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}],iE=[{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:eE,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}]}]}],sE=[{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}]}]}],Dl=[{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:Ol,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:Ml,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:Ml,key:"policy_bi",required:!0},{question:"Property Damage Liability",inputType:"select",options:["25000","50000","100000"],key:"policy_pd",required:!0}],aE=[{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}],Pl=[{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:Ol,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}],cE=[...Pl,...Dl],lE={Zip:tE,Email:rE,Product:nE,Name:oE,Vehicle:iE,Driver:sE,AutoCurrentCarrier:Dl,Home:aE,HomePolicy:Pl,BundlePolicy:cE,Demographics:[{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}],Ssn:[{question:"Social Security Number",inputType:"text",key:"social_security_number",required:!1}],Phone:[{question:"What is your phone number?",inputType:"tel",key:"phone",required:!0}],SMSVerification:[{question:"Please enter the code we sent to your phone number.",inputType:"text",key:"sms_code",required:!0}]};function uE(e){return lE[e]??[]}const dE=[{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."]}],fE=["Toyota","Honda","Ford","Chevrolet","Tesla","Subaru"],pE={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"]},mE=["Sedan","SUV","Truck","Coupe","Hatchback","Minivan"];function _E(e){return e.make&&e.model?{ready:!0,bodyStyles:mE}:e.make?{ready:!0,models:pE[e.make]??["Base","Sport","Limited"]}:{ready:!0,makes:fE}}function hE(){return{year:2022,make:"Toyota",model:"Camry",bodyStyle:"Sedan"}}const xn="mock-quote-0001",xl="mock-jwt-token";let Mr={quote_id:xn};function gE(e={}){Mr={quote_id:xn,...e}}function yE(e){return e.action==="send"?{success:!0}:e.action==="resume"?{isVerified:!0,token:xl,quoteId:xn}:{isVerified:!0,token:xl}}function bE(e){return e.action==="vinDecode"?hE():_E({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 vE(e,t){switch(e){case"/create-quote":return gE({postal_code:t.postal_code}),{quoteId:xn};case"/get-stages-for-quote":return{stages:XS(Mr.product)};case"/get-questions-by-stage":return{questions:uE(t.stage)};case"/update-quote":{const r={...t.payload??{}};return delete r.current_stage,Mr={...Mr,...r},{status:"success"}}case"/verify-quote":return yE(t);case"/is-supported-state":return{isSupported:!0};case"/get-rates":return{rates:dE};case"/get-quote":return{quote:Mr};case"/get-vehicle-options":return bE(t);case"/request-bind":return{success:!0};default:throw new Error(`No mock handler for ${e}`)}}const SE=Object.freeze(Object.defineProperty({__proto__:null,handleMockRequest:vE},Symbol.toStringTag,{value:"Module"}));Ke.CredifyInsuranceWidget=Pn,Ke.default=Pn,Object.defineProperties(Ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
99
99
|
//# sourceMappingURL=index.umd.js.map
|