1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d2c0a57f-d6c9-42df-9154-618515c21b02",e._sentryDebugIdIdentifier="sentry-dbid-d2c0a57f-d6c9-42df-9154-618515c21b02")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6297],{978:(e,t,a)=>{"use strict";a.d(t,{_:()=>l});let l=e=>"".concat(e.year," ").concat(e.make," ").concat(e.model)},5256:e=>{e.exports={"support-widget__title":"SupportWidget_support-widget__title__GMnc_","support-widget__text":"SupportWidget_support-widget__text__xqJg3","support-widget__contact-us":"SupportWidget_support-widget__contact-us__WGXNA"}},5853:e=>{e.exports={"place-bid-modal-skeleton":"PlaceBidModalSkeleton_place-bid-modal-skeleton__q1p1u","place-bid-modal-skeleton__details":"PlaceBidModalSkeleton_place-bid-modal-skeleton__details__XqlTJ","place-bid-modal-skeleton__payment-method":"PlaceBidModalSkeleton_place-bid-modal-skeleton__payment-method__1_PLn","place-bid-modal-skeleton__submit":"PlaceBidModalSkeleton_place-bid-modal-skeleton__submit__rgmwp"}},6296:e=>{e.exports={header:"Header_header__vNA_C",header__row:"Header_header__row__bzyAK","header__title-wrapper":"Header_header__title-wrapper__uPPXa",header__title:"Header_header__title__vMEr9","header__title--mobile":"Header_header__title--mobile___FAn9","header__sub-title":"Header_header__sub-title__JVhyp",header__actions:"Header_header__actions__UnpWW",header__progress:"Header_header__progress__E5kjW"}},8044:e=>{e.exports={"auction-details-tile":"AuctionDetailsTile_auction-details-tile__ADtEu","auction-details-tile__image-container":"AuctionDetailsTile_auction-details-tile__image-container__paCX2","auction-details-tile__name":"AuctionDetailsTile_auction-details-tile__name__VGnnR","auction-details-tile__bid":"AuctionDetailsTile_auction-details-tile__bid__cc4Y1","auction-details-tile__bid-label":"AuctionDetailsTile_auction-details-tile__bid-label__C3_gO","auction-details-tile__bid-info-container":"AuctionDetailsTile_auction-details-tile__bid-info-container__yDxp1","auction-details-tile__current-bid":"AuctionDetailsTile_auction-details-tile__current-bid__1eD_0","auction-details-tile__time-left":"AuctionDetailsTile_auction-details-tile__time-left__HZZA6","auction-details-tile__time-left--danger":"AuctionDetailsTile_auction-details-tile__time-left--danger__z84J_","auction-details-tile__timer":"AuctionDetailsTile_auction-details-tile__timer__xkmkG"}},8778:e=>{e.exports={"faq-widget--placement-main-content":"FaqWidget_faq-widget--placement-main-content__Ipg9o","faq-widget__links":"FaqWidget_faq-widget__links__M8Mr_","faq-widget__link":"FaqWidget_faq-widget__link__m_add"}},13675:(e,t,a)=>{"use strict";a.d(t,{r:()=>g});var l=a(66284),i=a(59860),n=a(31420),o=a(49995),r=a(14232),d=a(11919),s=a(85869),c=a(93176),_=a(51150),m=a(8778),p=a.n(m),u=a(37876);let h=e=>{let{openedItem:t,onOpenItem:a,hideTitleDividerOnDesktop:l,title:i,className:n,style:m,items:h,placement:b}=e,{0:f,1:y}=(0,r.useState)(null),g=null!=t?t:f,v=(0,d.j)(),x=e=>{(0,_.F)(e)&&v("view",{_tag_name:"modal_view",modal_type:"faqs",faq:h[e].label})},w=e=>{a?a(e):y(e),x(e)};return(0,u.jsxs)(s.W,{className:(0,o.A)(p()["faq-widget--placement-".concat(b)],n),style:m,children:[(0,u.jsx)(s.W.Title,{hideDividerOnDesktop:l,id:"faq-title",children:"FAQ"}),(0,u.jsx)("div",{className:p()["faq-widget__links"],children:h.map((e,t)=>{let{label:a}=e;return(0,u.jsx)(r.Fragment,{children:(0,u.jsx)("a",{className:p()["faq-widget__link"],href:"#",id:"faq-".concat(t,"-link"),onClick:e=>{e.preventDefault(),w(t)},children:a})},a)})}),(0,u.jsx)(c.O,{items:h,title:i,initialIndex:null!=g?g:0,isOpened:null!==g,onClose:()=>w(null),onChangeIndex:x})]})};var b=a(26327);let f=["slug","displayLoading"];function y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}let g=e=>{let{slug:t,displayLoading:a=!0}=e,o=(0,i.A)(e,f),{isLoading:r,items:d}=(0,b.o)(t);return r&&a?(0,u.jsx)(n.$,{}):(0,u.jsx)(h,function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};
1t%2?y(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):y(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}({items:d},o))}},13745:(e,t,a)=>{"use strict";a.d(t,{Jf:()=>c,_6:()=>s});var l=a(66284);a(9636);var i=a(14232),n=a(30887);function o(){let e=(0,i.useContext)(n._);if(void 0===e)throw Error("useMarketplaceApolloContext must be used within a MarketplaceApolloContext");return e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}function d(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function s(e,t){let a=o();return e(d(d({},t),{},{client:a.client}))}function c(e,t){let a=o();return e(d(d({},t),{},{client:a.client}))}},18728:e=>{e.exports={"bid-failure-banners__alert":"BidFailureBanners_bid-failure-banners__alert__pwHlj"}},19714:e=>{e.exports={accordion:"Accordion_accordion__TtyNF",accordion__divider:"Accordion_accordion__divider__Ee_nx","accordion--faq":"Accordion_accordion--faq__5pa2H","accordion__divider--active":"Accordion_accordion__divider--active__yDP8L"}},21847:e=>{e.exports={"faq-widget-modal__top-bar":"FaqWidgetModal_faq-widget-modal__top-bar__9Opvk","faq-widget-modal__sub-title":"FaqWidgetModal_faq-widget-modal__sub-title___PGLF","faq-widget-modal__close-button":"FaqWidgetModal_faq-widget-modal__close-button__URMvf","faq-widget-modal__content":"FaqWidgetModal_faq-widget-modal__content__9Hln1","faq-widget-modal__scroll":"FaqWidgetModal_faq-widget-modal__scroll__APjWE","faq-widget-modal__title":"FaqWidgetModal_faq-widget-modal__title__MsDBe","faq-widget-modal__item-content":"FaqWidgetModal_faq-widget-modal__item-content__qqhlJ"}},26327:(e,t,a)=>{"use strict";a.d(t,{o:()=>o}),a(66378);var l=a(14232),i=a(18334),n=a(43387);let o=e=>{let{0:t,1:a}=(0,l.useState)(!1),{0:o,1:r}=(0,l.useState)([]);return(0,l.useEffect)(()=>{let t=async()=>{let t=await fetch("".concat("/marketplace","/api/faq/").concat(e));r((await t.json()).questions.map(e=>({key:e.key,label:e.title,content:(0,n.A)(e.answer)})))};a(!0),t().catch(e=>i.Cp(e)).finally(()=>a(!1))},[e]),{isLoading:t,items:o}}},31420:(e,t,a)=>{"use strict";a.d(t,{$:()=>i});var l=a(37876);let i=()=>(0,l.jsx)("div",{children:"Loading..."})},38152:e=>{e.exports={"place-bid-modal":"PlaceBidModal_place-bid-modal__Quimq","place-bid-modal__outdated-bid":"PlaceBidModal_place-bid-modal__outdated-bid__PclJf","place-bid-modal__title":"PlaceBidModal_place-bid-modal__title__nyRRs","place-bid-modal__content":"PlaceBidModal_place-bid-modal__content__defZu","place-bid-modal__payment-method-selector":"PlaceBidModal_place-bid-modal__payment-method-selector__AJhd8","place-bid-modal__terms-and-conditions":"PlaceBidModal_place-bid-modal__terms-and-conditions__ZE8ju","place-bid-modal__submit-button":"PlaceBidModal_place-bid-modal__submit-button__1Ll4X","place-bid-modal__sidebar":"PlaceBidModal_place-bid-modal__sidebar___6Vvj","place-bid-modal__input":"PlaceBidModal_place-bid-modal__input__aawzo","place-bid-modal__outdated-card":"PlaceBidModal_place-bid-modal__outdated-card__Tt9Hn","place-bid-modal__form-element":"PlaceBidModal_place-bid-modal__form-element__mjCik","place-bid-modal__input-label":"PlaceBidModal_place-bid-modal__input-label__KDvp_","place-bid-modal__bid-amount-label":"PlaceBidModal_place-bid-modal__bid-amount-label__xg5o7","place-bid-modal__currency-indicator":"PlaceBidModal_place-bid-modal__currency-indicator___WMBA","place-bid-modal-alert-modal__subtitle":"PlaceBidModal_place-bid-modal-alert-modal__subtitle__H49jx","place-bid-modal-alert-modal__disclaimer":"PlaceBidModal_place-bid-modal-alert-modal__disclaimer__PYAjZ","place-bid-modal-alert-modal__disclaimer-icon":"PlaceBidModal_place-bid-modal-alert-modal__disclaimer-icon__ZsPLU","place-bid-modal-alert-modal__disclaimer-title":"PlaceBidModal_place-bid-modal-alert-modal__disclaimer-title__yz7Hy","place-bid-modal-alert-modal__disclaimer-description":"PlaceBidModal_place-bid-modal-alert-modal__disclaimer-description__bIU0I","place-bid-modal-alert-modal__auctions-title":"PlaceBidModal_place-bid-modal-alert-modal__auctions-title__G5iOx","place-bid-modal-alert-modal__auction-description":"PlaceBidModal_place-bid-modal-alert-modal__auction-description__yMhsV","place-bid-modal-alert-modal__phone-number-field":"PlaceBidModal_place-bid-modal-alert-modal__phone-number-field__l8jtX","place-bid-modal-alert-modal__notifications-switch":"PlaceBidModal_place-bid-modal-alert-modal__notifications-switch__CABP8","place-bid-modal-alert-modal__separator":"PlaceBidModal_place-bid-modal-alert-modal__separator__59KzN","place-bid-modal-alert-modal__checkbox-label":"PlaceBidModal_place-bid-modal-alert-modal__checkbox-label__a7qtG"}},41618:(e,t,a)=>{"use strict";a.d(t,{M:()=>i});var l=a(37876);let i=e=>{let{className:t}=e;return(0,l.jsxs)("svg",{width:"24",height:"8",viewBox:"0 0 24 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,l.jsx)("title",{children:"Chevron up"}),(0,l.jsx)("path",{d:"M23 9L12 1L1 9",strokeWidth:"1.5",strokeMiterlimit:"10",stroke:"currentColor"})]})}},45565:(e,t,a)=>{"use strict";a.d(t,{E:()=>l});let l=function(e){return e.ABOUT="faq-about",e.SELLING_FLOW="selling-flow",e.OFFER_FLOW="offer-flow",e.SELLER_CONFIRMATION="seller-confirmation",e.BUYER_CONFIRMATION="buyer-confirmation",e.DEALER="dealer",e.PLACE_BI
1D="place-bid",e.ID_VERIFICATION="id-verification",e.PAYMENT_CREATION="payment-creation",e.PRIVACY_SETTINGS="privacy-settings",e.MANAGE_VEHICLE="manage-vehicle",e.CLASSIFIED_PRICE="classified-price",e.OWNER_INFORMATION="owner-information",e.HOW_IT_WORKS_BUY="how-it-works-buy",e.HOW_IT_WORKS_SELL="how-it-works-sell",e.FAQ_BUY="faq-buy",e.FAQ_SELL="faq-sell",e.FAQ_BID="faq-bid",e.FAQ_CONSIGN="faq-consign",e.FAQ_CERTIFIED_CHECKOUT="faq-certified-checkout",e.FAQ_MANAGE="faq-manage",e.FAQ_GENERAL="faq-general",e.FAQ_POST_SALE="faq-post-sale",e.UNIQUE_DISPLAY_NAME="unique-display-name",e.NEW_SELL_PAGE="new-sell-page",e.CHECKOUT_PAGE="faq-checkout-page",e}({})},46637:(e,t,a)=>{"use strict";a.d(t,{D:()=>i});var l=a(37876);let i=e=>{let{className:t}=e;return(0,l.jsxs)("svg",{width:"16",height:"7",viewBox:"0 0 16 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,l.jsx)("title",{children:"Chevron down"}),(0,l.jsx)("path",{d:"M15 1L8 6L1 0.999999",strokeWidth:"1.5",strokeMiterlimit:"10",stroke:"currentColor"})]})}},50160:(e,t,a)=>{"use strict";a.d(t,{S:()=>i});var l=a(37876);let i=e=>{let{className:t,width:a=16,height:i=16,viewBoxWidth:n=16,viewBoxHeight:o=16}=e;return(0,l.jsxs)("svg",{className:t,width:a,height:i,viewBox:"0 0 ".concat(o," ").concat(n),fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("title",{children:"Check"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.6213 5.06066L6.56066 13.1213L2 8.56066L3.06066 7.5L6.56066 11L13.5607 4L14.6213 5.06066Z",fill:"currentColor"})]})}},51150:(e,t,a)=>{"use strict";function l(e){return Number.isInteger(e)}a.d(t,{F:()=>l})},56197:(e,t,a)=>{"use strict";a.d(t,{b:()=>c});var l=a(66284),i=a(49995),n=a(45466),o=a(67370),r=a.n(o),d=a(37876);function s(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}let c=e=>(0,d.jsx)(n.a,function(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?s(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):s(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}({},e));c.SelectorsSection=e=>{let{title:t,children:a,titleClassName:l}=e;return(0,d.jsxs)("div",{className:r()["settings-modal__selectors-section"],children:[(0,d.jsx)("h2",{className:(0,i.A)(r()["settings-modal__selectors-section__title"],l),children:t}),a]})},c.SwitchesSection=e=>{let{title:t,children:a}=e;return(0,d.jsxs)("div",{className:r()["settings-modal__switches-section"],children:[(0,d.jsx)("h2",{children:t}),a]})},c.Separator=e=>{let{className:t}=e;return(0,d.jsx)("hr",{className:(0,i.A)(r()["settings-modal__separator"],t)})}},58476:e=>{e.exports={"select-item__icon":"Item_select-item__icon__jAdef","select-item__icon--visible":"Item_select-item__icon--visible__nLpfi"}},67170:e=>{e.exports={"payment-method-dropdown-selector__select-button":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__select-button__1Fmbo","payment-method-dropdown-selector__select-button--expanded":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__select-button--expanded__Vokqc","payment-method-dropdown-selector__trigger-icon":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__trigger-icon__CVaj8","payment-method-dropdown-selector__form-element":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__form-element__tLFqP","payment-method-dropdown-selector__listbox":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__listbox__BizqZ","payment-method-dropdown-selector__item":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__item__vsWLi","payment-method-dropdown-selector__check-icon":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__check-icon__6V255","payment-method-dropdown-selector__new-payment-method-item":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__new-payment-method-item__dETlH","payment-method-dropdown-selector__new-payment-method-card":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__new-payment-method-card__pZz9R","payment-method-dropdown-selector__plus-icon":"PaymentMethodDropdownSelector_payment-method-dropdown-selector__plus-icon__MLLPD"}},67370:e=>{e.exports={"settings-modal__selectors-section__title":"SettingsModal_settings-modal__selectors-section__title__Uxx5f","settings-modal__selectors-section":"SettingsModal_settings-modal__selectors-section__qxGV2","settings-modal__separator":"SettingsModal_settings-modal__separator__XK_7i","settings-modal__switches-section":"SettingsModal_settings-modal__switches-section__GJql_"}},68359:(e,t,a)=>{"use strict";a.d(t,{z:()=>s}),a(81232);var l=a(14232),i=a(18334),n=a(90346),o=a(13745),r=a(67327),d=a(82406);function s(){let{userDetails:e}=(0,r.A)(),[t]=(0,o.Jf)(n.fz);return(0,l.useCallback)((a,l,n)=>{let o=(0,d.wA)(a);t({variables:{input:o}}).then(e=>{var t;let a=null==(t=e.data)||null==(t=t.marketplace)?void 0:t.addPaymentMethod;null!=a&&a.token&&l&&l(a)}).catch(t=>{(0,i.Cp)(t,{data:{message:"Failure to save payment method",accountId:null==e?void 0:e.accountId,input:o}}),null==n||n()})},[t,e])}},70724:(e,t,a)=>{"use strict";a.d(t,{n:()=>b});var l=a(49995),i=a(14232),n=a(79157),o=a(19714),r=a.n(o),d=a(15097),s=a.n(d),c=a(29026),_=a(46637),m=a(98024),p=a(89661),u=a.n(p),h=a(37876);let b=Object.assign((0,i.forwardRef)(function(e,t){let{children:a,id:o,className:d,initialIndex:s,variant:c,onChange:_,index:m}=e,{0:p,1:u}=(0,i.useState)(s);return(0,i.useEffect)(()=>{void 0===s&&u(m)},[s,m]),(0,h.jsx)("div",{className:(0,l.A)(r().accordion,d,{[r()["accordion--faq"]]:"faq"===c}),id:o,ref:t,children:i.Children.map(a,e=>{let t=p===e.props.index,a=void 0!==p&&p+1===e.props.index,l=e.props.handleOnClick||(()=>{var a;u(a=t?void 0:e.props.index),null==_||_(a)});return(0,h.jsxs)(i.Fragment,{children:[(0,i.cloneElement)(e,{expanded:t,expandedItemSibling:a,handleOnClick:l}),(0,h.jsx)(n.c,{className:r().accordion__divider})]},e.props.label)})})}),{Item:e=>{let{className:t,id:a,variant:i,label:n,children:o,expanded:r,handleOnClick:d,secondaryButton:p,isLoading:b=!1,expandedItemSibling:f}=e,y=b&&!r&&f;return(0,h.jsxs)("div",{id:a,className:(0,l.A)("item",t,{[u()["item--faq"]]:"faq"===i}),children:[(0,h.jsxs)("div",{className:u().item__header,children:[(0,h.jsx)(c.$,{onClick:d,color:"secondary",size:"xs",variant:"text",className:(0,l.A)(u().item__label,r&&u()["item__label--active"]),children:n}),(0,h.jsxs)("div",{className:u().item__actions,children:[r&&p,(0,h.jsx)(m.K,{onClick:d,variant:y?"inverted":"text",size:"xxs",isLoading:y,className:(0,l.A)(u().item__icon,{[u()["item__icon--down"]]:!!r,[u()["item__icon--up"]]:!r}),children:(0,h.jsx)(_.D,{})})]})]}),(0,h.jsx)(s(),{className:u().item__content,isOpen:r,children:(0,h.jsx)("div",{children:o})})]})}})},85869:(e,t,a)=>{"use strict";a.d(t,{W:()=>m});var l=a(66284),i=a(59860),n=a(49995),o=a(86514),r=a.n(o),d=a(37876);let s=["className","children","hideDividerOnDesktop"];function c(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}function _(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};
1t%2?c(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}let m=e=>{let{children:t,className:a,style:l,variant:i="white",testId:o}=e;return(0,d.jsx)("div",{className:(0,n.A)(r()["details-section"],{[r()["details-section--grey"]]:"grey"===i},a),style:l,"data-testid":o,children:t})};m.Title=e=>{let{className:t,children:a,hideDividerOnDesktop:l}=e,o=(0,i.A)(e,s);return(0,d.jsx)("h2",_(_({className:(0,n.A)(r()["details-section__title"],t,{[r()["details-section__title--without-divider"]]:l})},o),{},{children:a}))}},86297:(e,t,a)=>{"use strict";a.r(t),a.d(t,{PlaceBidModalContainer:()=>eH});var l=a(66284);a(70418),a(27661),a(81232);var i=a(89099),n=a(14232),o=a(28382),r=a(18334),d=a(50034);async function s(e){let{lotId:t,amount:a,paymentMethodId:l,timingMetadata:i,usePublicApi:n}=e,o="".concat(n?"https://bid-api.hagerty.com":"https://auction-bidding-api.hagerty.com","/bid/").concat(t);try{let e=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat((0,d.R)().accessToken)},credentials:"https://customer-api-v2.hagerty.com/graphql".startsWith("http://localhost:5050")?"include":void 0,body:JSON.stringify({amount:a,paymentMethodId:l,timingMetadata:i})});if(!e.ok)throw Error("Error placing bid. Response status: ".concat(e.status));return e}catch(e){throw(0,r.Cp)(e),e}}var c=a(24216),_=a(978),m=a(88511),p=a(97433),u=a(67327),h=a(82770),b=a(40241),f=a(11919),y=a(94588),g=a(45466),v=a(46513),x=a(18583),w=a(77737),j=a(98024),k=a(53052),P=a(64377),O=a(55135),M=a(6296),N=a.n(M),A=a(37876);let C=e=>{let{vehicleName:t,endDate:a,onExit:l}=e,i=(0,O.O)(a);return(0,A.jsxs)("header",{className:N().header,children:[(0,A.jsx)(P.x.Container,{children:(0,A.jsxs)(P.x.Row,{className:N().header__row,children:[(0,A.jsxs)("span",{className:N()["header__title-wrapper"],children:[(0,A.jsxs)("span",{className:N().header__title,children:[(0,A.jsxs)("strong",{children:["Buy vehicle",":"]})," ",(0,A.jsx)("span",{className:N()["header__sub-title"],children:t})]}),(0,A.jsx)("span",{className:N()["header__title--mobile"],children:"Buy vehicle"})]}),(0,A.jsx)("div",{className:N().header__actions,children:(0,A.jsx)(j.K,{onClick:l,variant:"text",color:"dark",size:"xxs",children:(0,A.jsx)(k.U,{})})})]})}),void 0!==i&&(0,A.jsxs)("progress",{max:100,value:i,className:N().header__progress,children:[i,"%"]})]})};var D=a(69964),T=a.n(D),S=a(18847),B=a.n(S),I=a(38176),E=a(56557),q=a.n(E),F=a(13675),L=a(45565),U=a(59860),W=a(49995),H=a(97716),R=a(72454),V=a(41618),G=a(94855),$=a(67170),z=a.n($);let J=["onChange"];function Z(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}function Y(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Z(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}let K="NEW_PAYMENT_METHOD_VALUE",Q=e=>{let{paymentMethods:t,inputProps:{onChange:a},className:l,onCreateNewPaymentMethod:i,setActiveMethod:n}=e,o=(0,U.A)(e.inputProps,J);return(0,A.jsxs)(H.l,{name:o.name,placeholder:"Select a payment method",label:"Payment method",inputProps:Y(Y({},o),{},{onChange:e=>{e===K?i():(a(e),n&&n(e))}}),listboxClassName:z()["payment-method-dropdown-selector__listbox"],selectButtonClassName:(0,W.A)(z()["payment-method-dropdown-selector__select-button"],l),selectButtonExpandedClassName:z()["payment-method-dropdown-selector__select-button--expanded"],formElementClassName:z()["payment-method-dropdown-selector__form-element"],triggerIcon:(0,A.jsx)(V.M,{className:z()["payment-method-dropdown-selector__trigger-icon"]}),children:[t.map(e=>{let{token:t,last4:a,alias:l,cardInfo:i}=e;return(0,A.jsx)(H.l.Item,{value:t,className:z()["payment-method-dropdown-selector__item"],checkClassName:z()["payment-method-dropdown-selector__check-icon"],children:(0,A.jsx)(R.t,{last4:a,alias:l,brand:null==i?void 0:i.brand,expirationDate:null==i?void 0:i.expirationDate})},t)}),(0,A.jsx)(H.l.Item,{value:K,className:z()["payment-method-dropdown-selector__new-payment-method-item"],children:(0,A.jsxs)("div",{className:z()["payment-method-dropdown-selector__new-payment-method-card"],children:[(0,A.jsx)(G.l,{className:z()["payment-method-dropdown-selector__plus-icon"]}),"New payment method"]})})]})};var X=a(42259),ee=a(29026),et=a(56197),ea=a(95941),el=a(54654),ei=a(31934),en=a(55010),eo=a(77148),er=a(16291),ed=a(68359),es=a(97381),ec=a(79472),e_=a(41530),em=a(36786),ep=a(22389),eu=a(8044),eh=a.n(eu);let eb=e=>{let{vehicleName:t,auctionTitle:a,vehicleImage:l,currentBid:i,userBid:n,userBidClassName:o,endDateTime:r,className:d,isAuctionLastDay:s}=e;
1return(0,A.jsxs)("div",{className:(0,W.A)(eh()["auction-details-tile"],d),children:[(0,A.jsx)("div",{className:eh()["auction-details-tile__image-container"],children:(0,A.jsx)(ep.K,{src:l||ec,alt:t,hasBorderRadius:!0,xs:"300px",srcSetWidths:[300],hasLazyLoading:!0,width:"300",height:"200"})}),(0,A.jsx)("h2",{className:eh()["auction-details-tile__name"],children:a}),(0,A.jsxs)("div",{className:eh()["auction-details-tile__bid-info-container"],children:[(0,A.jsx)("div",{"data-testid":"auctionDetailsCurrentBid",className:eh()["auction-details-tile__current-bid"],children:"Current bid: ".concat((0,c.$)(i))}),(0,A.jsxs)("div",{className:(0,W.A)(eh()["auction-details-tile__time-left"],{[eh()["auction-details-tile__time-left--danger"]]:s}),children:[(0,A.jsx)(em.W,{}),(0,A.jsx)(e_.t,{endDateTime:r,className:eh()["auction-details-tile__timer"]})]})]}),n&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{className:(0,W.A)(eh()["auction-details-tile__bid-label"]),children:"Your bid"}),(0,A.jsx)("div",{"data-testid":"yourBidModal","aria-label":"current highest bid",className:(0,W.A)(eh()["auction-details-tile__bid"],o),children:(0,c.$)(n)})]})]})};var ef=a(18728),ey=a.n(ef);let eg=e=>{let{alert:t}=e;return null!=t&&t.alertTitle?(0,A.jsx)(er.F,{variant:"error",title:t.alertTitle,desc:t.alertMessage,className:ey()["bid-failure-banners__alert"]}):null};var ev=a(38152),ex=a.n(ev),ew=a(85869),ej=a(5256),ek=a.n(ej);let eP=()=>(0,A.jsxs)(ew.W,{children:[(0,A.jsx)(ew.W.Title,{className:ek()["support-widget__title"],children:"Need support?"}),(0,A.jsx)("p",{className:ek()["support-widget__text"],children:"Have questions or need assistance? We're here to help."}),(0,A.jsx)("p",{className:ek()["support-widget__contact-us"],children:"Contact us"}),(0,A.jsx)("p",{className:ek()["support-widget__text"],children:(0,A.jsx)("a",{href:"mailto:".concat("[email protected]"),children:"[email protected]"})})]});function eO(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}function eM(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?eO(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):eO(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}let eN=B()(()=>a.e(1446).then(a.bind(a,39065)).then(e=>e.ExitModal),{ssr:!1,loadableGenerated:{webpack:()=>[39065]}}),eA=B()(()=>Promise.all([a.e(1480),a.e(2847)]).then(a.bind(a,62847)).then(e=>e.TermsAndConditionsModal),{ssr:!1,loadableGenerated:{webpack:()=>[62847]}}),eC=B()(()=>Promise.all([a.e(6250),a.e(2593)]).then(a.bind(a,22593)).then(e=>e.CreatePaymentMethodModalContainer),{ssr:!1,loadableGenerated:{webpack:()=>[22593]}}),eD=B()(()=>Promise.all([a.e(7202),a.e(8437)]).then(a.bind(a,88437)).then(e=>e.OverbidModal),{ssr:!1,loadableGenerated:{webpack:()=>[88437]}}),eT=e=>{var t,a;let l,{isOpened:i,minimumBid:r,currentBid:d,userBid:s,auctionTitle:_,vehicleName:m,endDateTime:p,vehicleImage:u,paymentMethods:b,defaultPaymentMethodId:f,bidFailureAlert:y,tos:g,isPlacingBid:x,hasAcceptedMarketplaceTerms:w,disabled:j,onSubmit:k,onCancel:P,onTrackEvent:O,setBidFailureAlert:M}=e,N=(0,ed.z)(),{0:D,1:S}=(0,n.useState)(void 0),{0:B,1:E}=(0,n.useState)(void 0),U=()=>S(void 0),W=(null==y?void 0:y.failureType)===o.ZtA.FailureAmount,[H,R,V]=(0,es.L)(p),G=j||0>=+(H+R+V),$=0===q()(p).diff(q()(),"day"),z=(0,n.useRef)(),J=(0,n.useRef)(G);J.current=G;let Z=(0,n.useCallback)(e=>(0,el.s)({bid:e,minimumBid:r,isAuctionDisabled:J.current}),[r]);(0,n.useEffect)(()=>{G&&z.current&&(z.current.focus("offerPrice"),setTimeout(()=>{var e;null==(e=z.current)||e.blur("offerPrice")},1))},[G]);let{isFeatureEnabled:Y}=(0,h.h)(),K=Y("PLACE_BID_UX"),ec=Y("MANAGE_PAYMENT_METHODS"),e_=Y("MANUAL_BP_AT_HAMMER"),em=Y("GET_OUT_OF_TRANSACTION"),ep=()=>{null==O||O("link",{_tag_name:"page_interaction",action:"click",action_name:"add_new_payment_method"}),S("create-payment-method")},{0:eu,1:eh}
1=(0,n.useState)(()=>{let e=(null!=b?b:[]).filter(e=>null!==e).map(e=>({alias:e.alias,token:e.token,last4:e.last4,cardInfo:e.cardInfo})),t=e.findIndex(e=>e.token===(null!=f?f:""));if(t>-1){let[a]=e.splice(t,1);e.unshift(a)}return e}),{0:ef,1:ey}=(0,n.useState)(eu[0]||void 0);(0,n.useEffect)(()=>{null!=ef&&ef.token&&z.current&&z.current.change("paymentMethodId",ef.token)},[ef]);let{0:ev}=(0,n.useState)({bid:s,paymentMethodId:(null==(t=eu[0])?void 0:t.token)||"",offerPrice:W?r:void 0}),ew=new Date;ew.setDate(ew.getDate()+(0,eo.f)(p)),ew.setDate(ew.getMonth()+2);let ej=ew.getMonth(),ek=ew.getFullYear(),eO=eu.filter(e=>{var t;return!e.token.startsWith("pending_")&&(null==(t=e.cardInfo)?void 0:t.expirationDate)&&(e.cardInfo.expirationDate.year<ek||e.cardInfo.expirationDate.year===ek&&e.cardInfo.expirationDate.month<=ej)}).map(e=>e.token),eT=e=>{if("string"==typeof e){let a=eu.find(t=>t.token===e);if(a){var t;ey(a),null==(t=z.current)||t.change("paymentMethodId",a.token)}}},eS=ef&&eO.includes(ef.token)&&ec;return l=w?e_?em?["By continuing, you agree to pay the total price to the seller, as well as the Bidder Premium (7% of final sale price, with a minimum of $500) to Hagerty Marketplace. The credit card on file will be charged for the Bidder Premium when the auction ends, or if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:["By continuing, you agree to pay the total price to the seller, as well as the Buyer Premium (7% of final sale price, with a minimum of $500) to Hagerty Marketplace. The credit card on file will be charged for the Buyer Premium when the auction ends, or if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:em?["By continuing, you agree to pay the total price to the seller, as well as the Bidder's Premium ( 7% of final sale price, with a minimum of $500 ) to Hagerty Marketplace. The credit card on file will be charged if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:["By continuing, you agree to pay the total price to the seller, as well as the Buyer's Premium ( 7% of final sale price, with a minimum of $500 ) to Hagerty Marketplace. The credit card on file will be charged if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:e_?em?["The Marketplace Terms of Use have been recently updated. By placing a bid, you are agreeing to the new Marketplace Terms of Use. By continuing, you agree to pay the total price to the seller, as well as the Bidder Premium (7% of final sale price, with a minimum of $500) to Hagerty Marketplace. The credit card on file will be charged for the Bidder Premium when the auction ends, or if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:["The Marketplace Terms of Use have been recently updated. By placing a bid, you are agreeing to the new Marketplace Terms of Use. By continuing, you agree to pay the total price to the seller, as well as the Buyer Premium (7% of final sale price, with a minimum of $500) to Hagerty Marketplace. The credit card on file will be charged for the Buyer Premium when the auction ends, or if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:em?["The Marketplace Terms of Use have been recently updated. By placing a bid, you are agreeing to the new Marketplace Terms of Use. By continuing, you agree to pay the total price to the seller, as well as the Bidder's Premium ( 7% of final sale price, with a minimum of $500 ) to Hagerty Marketplace. The credit card on file will be charged if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""]:["The Marketplace Terms of Use have been recently updated. By placing a bid, you are agreeing to the new Marketplace Terms of Use. By continuing, you agree to pay the total price to the seller, as well as the Buyer's Premium ( 7% of final sale price, with a minimum of $500 ) to Hagerty Marketplace. The credit card on file will be charged if payment is not received by the payment deadline per the Supplemental Terms of Use for Marketplace Auctions. ",(0,A.jsx)(ee.$,{variant:"link",onClick:()=>S("tos"),children:"Marketplace Terms of Use"}),""],(0,A.jsxs)(et.b,{isOpened:i,fullscreenVariant:"default","aria-labelledby":"place-bid",onClose:()=>
1S("exit"),skipReturnFocusOnClose:!0,children:[(0,A.jsxs)(v.H,{contentAs:"div",header:(0,A.jsx)(C,{onExit:()=>S("exit"),vehicleName:_,endDate:p}),metaTitle:"".concat("Buy vehicle",": ").concat(m),title:"Place bid",sidebar:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(F.r,{title:"Place bid",slug:L.E.PLACE_BID,placement:"sidebar"}),(0,A.jsx)(eP,{})]}),containerClassName:ex()["place-bid-modal"],titleClassName:ex()["place-bid-modal__title"],contentClassName:ex()["place-bid-modal__content"],sidebarColumnClassName:ex()["place-bid-modal__sidebar"],children:[(0,A.jsx)(eb,{currentBid:d,userBid:s,userBidClassName:W?ex()["place-bid-modal__outdated-bid"]:void 0,vehicleName:m,auctionTitle:_,vehicleImage:u,endDateTime:p,isAuctionLastDay:$}),(0,A.jsx)("div",{className:ex()["place-bid-modal__outdated-card"],children:eS&&(0,A.jsx)(er.F,{variant:"error",title:(0,A.jsx)("strong",{children:"".concat((null==(a=ef.cardInfo)?void 0:a.brand)||"Card"," â¢â¢â¢â¢ ").concat(ef.last4," will expire before auction ends.")}),desc:"Please add or choose another payment method.",isCloseButtonHidden:!0})}),$&&(0,A.jsxs)("div",{className:ex()["place-bid-modal-alert-modal__disclaimer"],children:[(0,A.jsx)("div",{className:ex()["place-bid-modal-alert-modal__disclaimer-icon"],children:(0,A.jsx)(en.m,{})}),(0,A.jsxs)("p",{className:ex()["place-bid-modal-alert-modal__disclaimer-description"],children:[(0,A.jsxs)("span",{className:ex()["place-bid-modal-alert-modal__disclaimer-title"],children:["Sniping Protection: "," "]}),"Bids placed within the final 2 minutes will reset the clock to 2 minutes in order to give everyone a fair chance in the bidding process."]})]}),(0,A.jsx)(eg,{alert:y}),(0,A.jsx)(I.lV,{onSubmit:e=>{M(void 0);let t=e.offerPrice;t&&t>=10*r?(E(e),S("overbid")):k(e)},initialValues:ev,initialValuesEqual:T(),children:e=>{var t,a;let{handleSubmit:i,invalid:n,values:d,form:_}=e;return z.current=_,(0,A.jsxs)("form",{onSubmit:i,children:[(0,A.jsx)(I.D0,{name:"paymentMethodId",validate:ei.y,children:e=>{let{input:t}=e;return(0,A.jsxs)(A.Fragment,{children:[(W||void 0===s&&K)&&(0,A.jsx)(I.D0,{name:"offerPrice",validate:Z,children:()=>(0,A.jsx)(X.o,{isFocusDisabled:G,size:"l",name:"offerPrice",label:(0,A.jsx)("span",{className:ex()["place-bid-modal__bid-amount-label"],children:void 0===s&&K?"Bid amount":"New bid amount"}),placeholder:"Enter ".concat((0,c.$)(r)," or more"),formatPriceOptions:{disallowCents:!0},inputClassName:ex()["place-bid-modal__input"],formElementClassName:ex()["place-bid-modal__form-element"],currencyIndicatorClassName:ex()["place-bid-modal__currency-indicator"],hintMessage:"",disabled:j,"aria-label":"Bid amount"},G?"disabled":"enabled")}),(0,A.jsx)(Q,{inputProps:eM(eM({},t),{},{value:(null==ef?void 0:ef.token)||""}),paymentMethods:eu,onCreateNewPaymentMethod:ep,className:ex()["place-bid-modal__payment-method-selector"],setActiveMethod:eT,required:!0}),(0,A.jsx)(eC,{isOpened:"create-payment-method"===D,onClose:U,onCreatePaymentMethod:e=>{var t,a,l;(e=>{let t="pending_".concat(Date.now()),a={alias:e.alias,token:t,last4:e.last4,cardInfo:e.cardInfo};eh(e=>[a,...e]),ey(a),N(e,e=>{var t,l;let i={token:e.token,last4:e.data.last4||a.last4,alias:null!=(t=e.data.alias)?t:a.alias,cardInfo:a.cardInfo};eh(e=>{let[,...t]=e;return[i,...t]}),ey(i),null==(l=z.current)||l.change("paymentMethodId",e.token)})})({alias:null==e?void 0:e.alias,last4:(null==e?void 0:e.last4)||"",firstName:(null==e?void 0:e.firstName)||"",lastName:"",token:(null==e?void 0:e.token)||"",cardInfo:{expirationDate:{month:(null==e||null==(t=e.cardInfo)||null==(t=t.expirationDate)?void 0:t.month)||0,year:(null==e||null==(a=e.cardInfo)||null==(a=a.expirationDate)?void 0:a.year)||0},brand:(null==e||null==(l=e.cardInfo)?void 0:l.brand)||o.la8.Visa}})},onTrackEvent:O})]})}}),(0,A.jsx)("p",{className:ex()["place-bid-modal__terms-and-conditions"],children:l}),(0,A.jsx)(ee.$,{type:"submit",dataTestId:"placeBidModalBtn",rightIcon:(0,A.jsx)(ea.f,{}),className:ex()["place-bid-modal__submit-button"],isLoading:x,disabled:G||n||ec&&ef&&eO.includes(ef.token),children:"Place ".concat((0,c.$)(null!=(t=null!=(a=d.offerPrice)?a:s)?t:"")," bid")})]})}})]}),(0,A.jsx)(eA,{isOpened:"tos"===D,title:g.title,content:g.content,onCancel:U}),(0,A.jsx)(eD,{isOpened:"overbid"===D,userBid:(null==B?void 0:B.offerPrice)||(null==B?void 0:B.bid)||0,currentHighestBid:r,onCancel:()=>{E(void 0),U()},onConfirm:()=>{B&&k(B),E(void 0),U()}}),(0,A.jsx)(eN,{isOpened:"exit"===D,ariaLabelledBy:"Exit this bid",title:"Place Bid",description:"Are you sure you want to exit?",confirmAction:"Yes, Exit",cancelAction:"No, Continue placing bid",onCancel:U,onConfirm:()=>{P(),M(void 0),S(void 0)}})]})};var eS=a(53797),eB=a(5853),eI=a.n(eB);let eE=()=>(0,A.jsxs)("div",{className:eI()["place-bid-modal-skeleton"],children:[(0,A.jsx)(eS.E,{className:eI()["place-bid-modal-skeleton__details"]}
1),(0,A.jsx)(eS.E,{className:eI()["place-bid-modal-skeleton__payment-method"]}),(0,A.jsx)(eS.E,{className:eI()["place-bid-modal-skeleton__submit"]})]});function eq(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,l)}return a}function eF(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?eq(Object(a),!0).forEach(function(t){(0,l.A)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):eq(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}let{AUCTION_ANTI_SNIPE_SECONDS:eL}=w.AA,eU=[o.ZtA.FailureAmount,o.ZtA.FailurePayment],eW={[o.ZtA.FailureAmount]:{title:"Invalid bid.",message:"Minimum bid has changed. Please revise your bid and resubmit."},[o.ZtA.FailurePayment]:{title:"Invalid payment method.",message:"Please update payment method and resubmit bid."}},eH=e=>{var t,a;let l,{userBid:r,auction:d,setAuctionAlert:w}=e,{replace:j,query:k}=(0,i.useRouter)(),{isLoggedIn:P}=(0,u.A)(),{addToast:O}=(0,b.d)(),M="open"===k.placeBid,N=(0,f.j)(),{isFeatureEnabled:D}=(0,h.h)(),{0:T}=(0,n.useState)(new Date),S=d.auctionItems[0],B=null==S?void 0:S.year,I=null==S?void 0:S.make,E=null==S?void 0:S.model,{loading:q,data:F}=(0,o.kcI)({skip:!P,fetchPolicy:"cache-first"}),{loading:L,error:U,data:W,refetch:H}=(0,o.HM_)({skip:!P,fetchPolicy:"cache-first"}),[R,{loading:V}]=(0,o.d2M)(),{data:G}=(0,o.Uul)({skip:!M}),{0:$,1:z}=(0,n.useState)(!1),{0:J,1:Z}=(0,n.useState)(void 0),Y=(0,n.useCallback)(e=>{let{bid:t}=e;if(t.status&&eU.includes(t.status)){let e=eW[t.status];Z({failureType:t.status,alertTitle:e.title,alertMessage:e.message}),z(!1);return}let a=t.status===o.ZtA.Successful,l=Math.floor(new Date(d.endDateTime).getTime()/1e3-Date.now()/1e3)<=eL;w({alertVariant:a?"success":"warning",alertTitle:a?"Your bid of ".concat((0,c.$)(t.amount.amount)," is the current highest bid."):"You have been outbid",alertMessage:a&&l?"Because you bid in the final 2 minutes, the timer has reset to 2 minutes to give everyone a fair chance.":void 0,isTextShouldBeWrapped:l}),j(y.J.auction(d.id,B,I,E)),z(!1)},[w,d.id,j,d.endDateTime,B,I,E]);(e=>{let{lotId:t,callback:a,skip:l}=e,{userDetails:i}=(0,u.A)(),o=(0,n.useCallback)(e=>{e.bid.profileId===(null==i?void 0:i.accountId)&&a(e)},[null==i?void 0:i.accountId,a]);(0,p.g)(t,m.QV.BID,o,l)})({lotId:d.id,callback:Y,skip:!$});let K=d.currentHighestBid.amount,Q=d.auctionItems[0],X=(null==F?void 0:F.hdcNextMyProfile.hasAcknowledgedMarketplaceTerms)===!0,ee=(null==F||null==(t=F.hdcNextMyProfile.bidderVerification)?void 0:t.status)===o.KG5.Approved;(0,n.useEffect)(()=>{M&&P&&!q&&F&&(ee||j(y.J.bidderRegistration(d.id,"".concat(y.J.auction(d.id,B,I,E),"?placeBid=open"))))},[M,P,q,F,ee,j,d.id,B,I,E]);let et=(0,n.useMemo)(()=>({vehicle_year:Q.year,vehicle_make:Q.make,vehicle_model:Q.model,vehicle_submodel:Q.subModel||""}),[Q]),ea=(0,n.useCallback)((e,t)=>{N(e,eF(eF({},t),et))},[et,N]),el=async e=>{var t,a,l;z(!0);let i=new Date;ea("link",{_tag_name:"submit_bid"});let{paymentMethodId:n}=e;if(n.startsWith("pending_"))try{let{data:e}=await H(),l=null!=(t=null==e?void 0:e.hdcNextMyProfile.paymentMethods)?t:[],i=new Set((null!=(a=null==W?void 0:W.hdcNextMyProfile.paymentMethods)?a:[]).map(e=>null==e?void 0:e.token)),o=l.find(e=>(null==e?void 0:e.token)&&!i.has(e.token));if(null!=o&&o.token)n=o.token;else throw Error("Could not resolve payment method token")}catch(e){z(!1),O({variant:"error-tertiary",title:"Connection error. Please try again."});return}try{await s({lotId:d.id,amount:null!=(l=e.offerPrice)?l:e.bid,paymentMethodId:n,timingMetadata:{modalOpenedTimestamp:T.toISOString(),bidButtonClickedTimestamp:i.toISOString()},usePublicApi:D("PUBLIC_BIDDING_API")}),X||await R({variables:{input:{hasAcknowledgedMarketplaceTerms:!0}}})}catch(e){z(!1),O({variant:"error-tertiary",title:"Connection error. Please try again."})}},ei=()=>j(y.J.auction(d.id,B,I,E));try{l=JSON.parse(null==G?void 0:G.marketplaceTerms.content)}catch(e){l=null==G?void 0:G.marketplaceTerms.content}let en=(0,_._)(Q),eo=null!=(a=null==W?void 0:W.hdcNextMyProfile.paymentMethods)?a:[],er=null==W?void 0:W.hdcNextMyProfile.defaultPaymentMethodId;if(!P)return null;if(L)return(0,A.jsx)(g.a,{isOpened:M,fullscreenVariant:"default","aria-labelledby":"place-bid",onClose:ei,children:(0,A.jsx)(v.H,{contentAs:"div",metaTitle:"".concat("Buy vehicle",": ").concat(en),header:(0,A.jsx)(C,{onExit:ei,vehicleName:en,endDate:d.endDateTime}),children:(0,A.jsx)(eE,{})})});if(M&&U)return(0,A.jsx)(g.a,{isOpened:M,fullscreenVariant:"default","aria-labelledby":"place-bid",onClose:ei,children:(0,A.jsx)(v.H,{contentAs:"div",metaTitle:"".concat("Buy vehicle",": ").concat(en),header:(0,A.jsx)(C,{onExit:ei,vehicleName:en,endDate:d.endDateTime}),children:(0,A.jsx)(x.f,{})})});let ed=d.status!==o.DeH.Active;return M&&F&&!ee?null:(0,A.jsx)(eT,{isOpened:M,currentBid:K,userBid:r,minimumBid:d.nextBidMinimumValue.amount,vehicleName:en,auctionTitle:Q.auctionTitle,endDateTime:d.endDateTime,vehicleImage:Q.mainPhoto.url,paymentMethods:eo,defaultPaymentMethodId:er,bidFailureAlert:J,hasAcceptedMarketplaceTerms:X,tos:{title:null==G?void 0:G.marketplaceTerms.title,content:l},setBidFailureAlert:Z,isPlacingBid:$||V,disabled:ed,onSubmit:el,onCancel:ei,onTrackEvent:ea})}},86514:e=>{e.exports={"details-section":"DetailsSection_details-section___Ud9m","details-section--grey":"DetailsSection_details-section--grey__SzTtp","details-section__title":"DetailsSection_details-section__title__TgfER","details-section__title--without-divider":"DetailsSection_details-section__title--without-divider__7dyul"}},88450:(e,t,a)=>{"use strict";a.d(t,{k:()=>i});var l=a(37876);let i=e=>{let{className:t}=e;return(0,l.jsxs)("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("title",{children:"Triangle down"}),(0,l.jsx)("path",{d:"M4.06752 5C3.6436 5 3.41202 5.49443 3.68341 5.82009L7.61589 10.5391C7.81579 10.7789 8.18421 10.7789 8.38411 10.5391L12.3166 5.82009C12.588 5.49443 12.3564 5 11.9325 5H4.06752Z",fill:"currentColor"})]})}},89661:e=>{e.exports={item__header:"Item_item__header__r6Ao7",item__actions:"Item_item__actions__N4fqe",item__icon:"Item_item__icon__rCfxR",item__label:"Item_item__label__K_Vc4","
1item__label--active":"Item_item__label--active__5JrjR","item__icon--down":"Item_item__icon--down__B0F86","item__icon--up":"Item_item__icon--up__Z2voN",item__content:"Item_item__content__knkK0","item--faq":"Item_item--faq__g9n51"}},93176:(e,t,a)=>{"use strict";a.d(t,{O:()=>d}),a(14232);var l=a(70724),i=a(21847),n=a.n(i),o=a(45466),r=a(37876);let d=e=>{let{onClose:t,isOpened:a,initialIndex:i,title:d,items:s,onChangeIndex:c}=e;return(0,r.jsxs)(o.a,{fullscreenVariant:"mobile-only",size:"l",onClose:t,"aria-labelledby":"faq-title",isOpened:a,children:[(0,r.jsxs)("div",{className:n()["faq-widget-modal__top-bar"],children:[(0,r.jsx)("div",{className:n()["faq-widget-modal__sub-title"],children:d}),(0,r.jsx)(o.a.CloseButton,{dataTestId:"faq-widget-modal-close",className:n()["faq-widget-modal__close-button"],onClick:t})]}),(0,r.jsx)(o.a.Content,{className:n()["faq-widget-modal__content"],children:(0,r.jsx)("div",{className:n()["faq-widget-modal__scroll"],children:(0,r.jsx)(l.n,{variant:"faq",id:"faq-accordion",initialIndex:i,onChange:c,children:s.map((e,t)=>{let{label:a,content:i}=e;return(0,r.jsx)(l.n.Item,{variant:"faq",index:t,label:a,children:(0,r.jsx)("div",{className:n()["faq-widget-modal__item-content"],children:i})},a)})})})})]})}},94855:(e,t,a)=>{"use strict";a.d(t,{l:()=>i});var l=a(37876);let i=e=>{let{className:t}=e;return(0,l.jsxs)("svg",{className:t,width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("title",{children:"Small Plus Icon"}),(0,l.jsx)("line",{x1:"19.75",y1:"10",x2:"19.75",y2:"31",stroke:"currentColor",strokeWidth:"1.5"}),(0,l.jsx)("line",{x1:"30",y1:"20.75",x2:"9",y2:"20.75",stroke:"currentColor",strokeWidth:"1.5"})]})}},97297:e=>{e.exports={select:"Select_select__En6jk",select__value:"Select_select__value__QYeqn",select__placeholder:"Select_select__placeholder__SIQHd","select--disabled":"Select_select--disabled__CA_JM","select--not-outlined":"Select_select--not-outlined__ViF3p",select__field:"Select_select__field__FoDwo","select__field--error":"Select_select__field--error__sxFLd","select__field--big":"Select_select__field--big__TlePo","select__field--medium-large":"Select_select__field--medium-large__CDin6","select__field--small":"Select_select__field--small__Ja1bB","select__field--disabled":"Select_select__field--disabled__8iZYB","not-outlined":"Select_not-outlined__doMtd",select__listbox:"Select_select__listbox__iF57q"}},97716:(e,t,a)=>{"use strict";a.d(t,{l:()=>y});var l=a(49995),i=a(14232),n=a(88600),o=a(87709),r=a(53052),d=a(88450),s=a(98024);let c=(0,i.createContext)(void 0);var _=a(50160),m=a(5040),p=a(58476),u=a.n(p),h=a(37876),b=a(97297),f=a.n(b);let y=e=>{let t,{children:a,className:_,disabled:m,formElementClassName:p,hasError:u,hintMessage:b,id:y,inputProps:g,isNotOutlined:v,label:x,listboxClassName:w,name:j,onClear:k,placeholder:P,prefix:O,required:M,selectButtonClassName:N,selectButtonExpandedClassName:A,size:C,style:D,triggerIcon:T=(0,h.jsx)(d.k,{}),"aria-describedby":S="","data-testid":B}=e,I=(0,i.useRef)(null),E=i.Children.toArray(a),q=b?"".concat(j,"--desc"):"",F=(t=g.value,i.Children.toArray(a).filter(e=>e.props.value===t).map(e=>e.props.children)[0]);return(0,h.jsx)("div",{ref:I,className:(0,l.A)(f().select,{[f()["select--disabled"]]:m,[f()["select--not-outlined"]]:v},_),style:D,children:(0,h.jsx)(n.Z,{label:x,htmlFor:j,size:"l"===C||"ml"===C?"l":"m",required:M,hintMessageId:q,hintMessage:b,hasError:u,disabled:m,className:p,children:(0,h.jsx)(c.Provider,{value:{value:g.value,onChange:e=>{g.onChange(e)}},children:(0,h.jsx)(o.m,{id:y||j,"data-testid":B,"aria-describedby":"".concat(S," ").concat(q),"aria-label":x,listboxClassName:(0,l.A)(f().select__listbox,w),disabled:m,listboxStyle:{width:I.current?I.current.getBoundingClientRect().width:void 0},size:"l"===C?"l":"m",className:(0,l.A)("select__field",f().select__field,{[f()["select__field--disabled"]]:m,[f()["select__field--error"]]:u,[f()["select__field--big"]]:"l"===C,[f()["select__field--medium-large"]]:"ml"===C,[f()["select__field--small"]]:"s"===C,[f()["not-outlined"]]:v},N),expandedClassName:A,trigger:(0,h.jsxs)(h.Fragment,{children:[F?(0,h.jsxs)("span",{className:f().select__value,children:[O&&(0,h.jsx)("strong",{children:O}),F]}):(0,h.jsx)("span",{className:f().select__placeholder,children:P}),k&&(0,h.jsx)(s.K,{variant:"text",color:"secondary",size:"xxs",onClick:e=>{e.stopPropagation(),k()},"data-testid":"clear-select",children:(0,h.jsx)(r.U,{variant:"small"})}),T]}),onSelectFocusedItem:e=>{g.onChange(E[e].props.value)},children:E.map((e,t)=>(0,i.cloneElement)(e,{index:t}))})})})})};y.Item=e=>{let{children:t,value:a,index:n,icon:o,className:r,checkClassName:d,onClick:s}=e,p=(()=>{let e=(0,i.useContext)(c);if(void 0===e)throw Error("useSelectContext must be used within an SelectContext");return e})();return(0,h.jsxs)(m.q,{onClick:()=>{p.onChange(a),s&&s()},role:"option","aria-selected":a===p.value,icon:o,index:n,className:r,children:[t,(0,h.jsx)(_.S,{className:(0,l.A)(u()["select-item__icon"],{[u()["select-item__icon--visible"]]:a===p.value},d)})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.