1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1ac9c1ee-3c89-5cfd-abc9-59723ab82f81")}catch(e){}}(); 3(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4872],{2042:e=>{e.exports=JSON.parse('[{"question":"Is this a secured location or a lead?","answer":"This is a secured location. In the off chance that you do not place your vending machine, simply click \'Cancel\' to get a full refund. That\'s the power of our 100% money-back guarantee!","audience":"buyer","category":["location"]},{"question":"Is buying a location a one-time fee?","answer":"Yes, the listing price is a one-time fee paid to the seller. Purchasing requires an active <a href=\'/account/pro\'>Pro membership</a>, which is billed separately. Any agreements between you (the operator) and the location\'s property manager will be separate.","audience":"buyer","category":["location","location-find","location-bid","location-machine","atm-location","home"]},{"question":"Why can\'t I see the location\'s business name and address?","answer":"The seller receives multiple requests from vendors for the location\'s business name and address. To ensure success for the vending operator, this information is shared only after you purchase the listing.","audience":"buyer","category":["location","location-machine","atm-location"]},{"question":"Is there a vendor currently at this location?","answer":"The description will specify whether this location needs replacing a vendor or if you would be its first vendor. Please note that even if you\'re replacing a vendor, the seller will likely not have the previous vendor\'s sales data.","audience":"buyer","category":["location","location-machine","atm-location"]},{"question":"How does the 100% money back guarantee work?","answer":"Once you make a purchase, the money is held in escrow via Stripe. Only once you (the buyer) confirm that you\'re ready to finalize the order, the money is released to the seller. Otherwise, as long as you cancel the order within 7 days of payment, the money is fully refunded to you. Learn more about our <a href=\'/guide-transaction-process\'>transaction process</a>.","audience":"buyer","category":["location","location-find","location-bid","location-machine","atm-location","home"]},{"question":"Who handles the placement agreement with the location?","answer":"You (the operator) are responsible for providing a placement agreement. When you meet the location\'s property manager, be sure to have your placement agreement ready to send them for signing (if you require it).","audience":"buyer","category":["location","location-find","location-bid","location-machine","atm-location"]},{"question":"How is the sale price determined?","answer":"The seller of this location sets the price based on factors such as foot traffic, hours of operation, proximity to competition and difficulty to secure.","audience":"buyer","category":["location","location-machine","atm-location","home"]},{"question":"What is included in the sale price of a location?","answer":"Included in the sale price is a warm introduction to the location\'s property manager. These locations want your machine!<br><br>Any agreements with the location in terms of signed placement agreements, commissions, or product selection are between you (the vending operator) and the location\'s property manager.","audience":"buyer","category":["location","location-find","location-bid"]},{"question":"What is included in the sale price of a location with machine?","answer":"Included in the sale price is the machine detailed in the listing, and the location itself. Any agreements with the location in terms of signed placement agreements, commissions, or product selection are between you (the vending operator) and the location\'s property manager.","audience":"buyer","category":["location-machine","atm-location"]},{"question":"How can I find out when new locations become available in my area?","answer":"You can fill out our <a href=\'https://vendingvillage.com/request-location\' target=\'_blank\'>location request form</a>. This will subscribe you to email updates in your region, and notify our verified sellers of your interest.","audience":"buyer","category":["home"]},{"question":"When can I place my machine?","answer":"Once you purchase a location that needs a machine, the seller will request your availability to meet the location\'s property manager to arrange a meeting. Once you meet the manager you can coordinate a date to place your machine.","audience":"buyer","category":[]},{"question":"How profitable will a location be?","answer":"Profitability of a location can vary due to several factors: daily foot traffic, hours/days of operation, and proximity to other options. Overall, it\'s up to you to determine the opportunity of each location based on all the information provided in the listing.","audience":"buyer","category":[]},{"question":"How do I list a vending location for sale?","answer":"Once logged in, click "post your listing" at the top of the page. Follow the prompts to add all the important details about your vending location, set your price, and publish your listing.","audience":"seller","category":[]},{"question":"What are the fees for selling on Vending Village?","answer":"You can list locations and services for free. A transaction fee is charged only when you make a sale. We charge a 20% platform fee ($100 minimum) plus 3% transaction fee (for credit card processing) on locations and location finding services. For example, if you list and sell a location for $1,000, you will receive $770 ($1,000, less $200 platform fee, less $30 transaction fee) upon a sale. Location Bids have a minimum $200 platform fee. Machines at locations (including ATMs) have a 10% platform fee.","audience":"seller","category":["payment"]},{"question":"How do I manage my listings on Vending Village?","answer":"You can manage your listings through your dashboard, where you can edit details, change prices, or remove listings if needed.","audience":"seller","category":[]},{"question":"What should I do if I receive a negative review from a buyer?","answer":"We recommend reaching out to the buyer to resolve any issues.","audience":"seller","category":[]},{"question":"How do payments work for sellers on Vending Village?","answer":"Payments from buyers are processed through our secure payment system and are held until the buyer finalizes the order (typically within 7 days). Once finalized, the buyer\'s card is actually charged and money is transferred to your bank account after a 14 days holding period. <a href=\'/guide-transaction-process\'>This article</a> breaks down exactly how it works.","audience":"seller","category":[]}
3,{"question":"What is Vending Village?","answer":"Vending Village is a peer-to-peer online marketplace specifically designed for the vending machine industry, where users can buy and sell vending locations either with or without machines","audience":"all","category":["general"]},{"question":"How do I register on Vending Village?","answer":"<a href=\'/signup\'>Sign up</a> to create your account and start exploring our marketplace.","audience":"all","category":["general"]},{"question":"Is there a membership fee to join Vending Village?","answer":"Creating an account is free. To purchase a listing, operators need an active <a href=\'/account/pro\'>Pro membership</a>. Sellers can list for free and pay a fee only when a sale is made.","audience":"all","category":["general","home"]},{"question":"Can I access Vending Village from any device?","answer":"Yes, Vending Village is accessible from any device with internet access. Our platform is designed to be user-friendly on both desktop and mobile devices.","audience":"all","category":["general"]},{"question":"Who can use Vending Village?","answer":"Anyone who is involved in or interested in the vending machine business, whether you are an experienced vendor or new to the industry, is welcome to join our community.","audience":"all","category":["general"]},{"question":"What payment methods can I use on Vending Village?","answer":"Currently all transactions are handled by Stripe using any major credit card such as Visa or Mastercard.","audience":"all","category":["payment","home"]},{"question":"When are payments released to sellers?","answer":"Payments are released to sellers immediately after the buyer gives final approval that they\'ve reached an agreement with the property manager of the purchased location.","audience":"all","category":["payment"]},{"question":"Is my financial information safe on Vending Village?","answer":"Yes, we partner with Stripe to ensure that all financial transactions and personal data are kept secure using the highest possible security methods available today.","audience":"all","category":["payment","safety"]},{"question":"How does Vending Village ensure the safety of transactions on the platform?","answer":"Vending Village employs advanced security measures to protect every transaction. This includes using secure socket layer (SSL) technology for data encryption, performing regular security audits, and utilizing reputable payment gateways to process all financial transactions. Additionally, all user activities are monitored to prevent fraudulent activities.","audience":"all","category":["safety"]},{"question":"What should I do if I encounter a suspicious listing or user?","answer":"If you come across any listings or users that seem suspicious or potentially fraudulent, please report them immediately by emailing <a href=\'mailto:[email protected]\'>Support</a>. Our dedicated security team will investigate the issue promptly. We encourage users to rely on our platform for all communications and transactions to ensure safety.","audience":"all","category":["safety"]},{"question":"Why is Stripe ID Verification required and how does it work?","answer":"Ensuring the safety and trustworthiness of our transactions is paramount to us. That\'s why we partner with <a href=\'https://stripe.com/identity\'>Stripe for ID verification</a>. This process helps us confirm the identity of our users, reducing the risk of fraud and ensuring compliance with legal standards. To complete ID verification, you\'ll be prompted to provide a valid government-issued ID through a secure portal managed by Stripe. The information is processed and verified by Stripe\'s advanced security systems without storing any sensitive data on our servers. This step is essential for activating full buying and selling capabilities on Vending Village. Buyers also need an active Pro membership to purchase listings.","audience":"all","category":["safety"]},{"question":"What measures are in place to protect personal and financial information on Vending Village?","answer":"Vending Village is committed to protecting your personal and financial information with multiple layers of security. This includes data encryption, firewalls, and secure data storage facilities. We comply with all applicable privacy laws and regulations to ensure your information is safeguarded against unauthorized access or breaches.","audience":"all","category":["safety"]},{"question":"How does Vending Village handle disputes between buyers and sellers?","answer":"We have a comprehensive dispute resolution process in place to handle conflicts between (buyers and sellers. If an issue arises, parties are encouraged to first attempt to resolve the dispute among themselves using our messaging system. If the dispute persists, they can escalate the issue to our support team, which will intervene to mediate and help reach a fair resolution. Our aim is always to ensure a just outcome in accordance with our platform policies.","audience":"all","category":["safety"]},{"question":"Is there a set schedule I have to work, or quota I have to meet?","answer":"No. You will set your own schedule and work as much or as little as you want. This role is designed for flexibility and we\'re here to help as you secure opportunities.","audience":"all","category":["recruiting"]},{"question":"What is the commission structure?","answer":"The average commission rate is 75% of a sale. Typical sales orders are $500, $1000, $1500 or above.","audience":"all","category":["recruiting"]},{"question":"Is this a 100% commission-based role?","answer":"Yes this is a 100% commission-based role. You will keep on average 75% of what you sell.","audience":"all","category":["recruiting"]},{"question":"Will you provide me with leads?","answer":"No. You will generate your own leads and in return keep most of the commission of the sale.","audience":"all","category":["recruiting"]},{"question":"How often do I receive payment?","answer":"Payment is processed as soon as a sale completes. You will receive payment typically within 2-5 business days after a sales completes.","audience":"all","category":["recruiting"]},{"question":"What exactly would I be doing in this role?","answer":"You will be calling Property Managers to secure appointments to place vending machines at their location. You will not have anything to do with vending machines themselves.","audience":"all","category":["recruiting"]},{"question":"Is it really free?","answer":"Yes. Operators cover all costs and earn from product sales.","audience":"all","category":["free-machine"]},{"question":"Do I have to sign a contract?","answer":"No long-term contract required.","audience":"all","category":["free-machine"]},{"question":"What if it doesn\u2019t work out?","answer":"We remove the machine at no cost.","audience":"all","category":["free-machine"]},{"question":"Can I choose products?","answer":"Yes - your operator stocks what your people buy.","audience":"all","category":["free-machine"]}
3,{"question":"What locations qualify?","answer":"Most offices, apartments, schools, gyms, and factories.","audience":"all","category":["free-machine"]},{"question":"Can the transaction process be extended beyond the 7 days?","answer":"No. The transaction process is fixed. It cannot be extended by neither the buyer nor the seller. If more time is needed the buyer and seller should coordinate to cancel and immediately re-purchase the listing.","audience":"all","category":["transaction"]},{"question":"The meeting/decision date by the PM is not within the 7 days, what should I do?","answer":"The buyer and seller should coordinate to cancel and immediately re-purchase the listing. This restarts the 7 day transaction process.","audience":"all","category":["transaction"]},{"question":"Can the meeting date be changed?","answer":"Once the initial meeting date is set it cannot be changed on the transaction page. If a meeting needs to move beyond the 7 day transaction window, the buyer and seller should coordinate to cancel and immediately re-purchase the listing so the new scheduled date can be set.","audience":"all","category":["transaction"]}]')},10216:(e,a,n)=>{n.d(a,{A:()=>l});n(49198);var s=n(86082),t=n(2042),i=n(69508),o=n(82168),r=n(85582);const l=e=>{let{audience:a,category:n,pageFaqs:l}=e;const d=(0,i.H)((0,i.u)(t,a,n),l);return(0,r.jsx)("div",{className:o.A.root,children:(0,r.jsx)(s.nD,{allowZeroExpanded:!0,className:o.A.accordion,children:d.map((e,a)=>(0,r.jsxs)(s.As,{className:o.A.accordionItem,children:[(0,r.jsx)("h3",{className:o.A.accordionHeading,children:(0,r.jsx)(s.SR,{className:o.A.accordionButton,children:e.question})}),(0,r.jsx)(s.IT,{className:o.A.accordionPanel,children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:e.answer}})})]},a))})})}},23579:(e,a,n)=>{n.r(a),n.d(a,{TransactionPageComponent:()=>ds,default:()=>us});var s=n(80045),t=n(27051),i=n(49198),o=n(47818),r=n(30209),l=n(97745),d=n(96580),c=n.n(d),u=n(44114),m=n(86971),g=n(14866),p=n(21959);const h="TransactionTabs_root__2ZhzL",v="TransactionTabs_tabNavigation__7O4LC",y="TransactionTabs_tab__FWwc5",f="TransactionTabs_tabActive__vzBfM",b="TransactionTabs_tabDetails__TNRy2",_="TransactionTabs_tabContent__EINjt";var x=n(85582);const T={DETAILS:"details",CHAT:"chat",ACTIVITY:"activity",LOCATION:"location"},P=e=>{const{rootClassName:a,className:n,activeTab:s,onTabChange:t,intl:i,children:o}=e,r=c()(a||h,n),l=[{id:T.DETAILS,label:(0,x.jsx)(g.sA,{id:"TransactionPage.tabDetails"}),translationId:"TransactionPage.tabDetails"},{id:T.CHAT,label:(0,x.jsx)(g.sA,{id:"TransactionPage.tabChat"}),translationId:"TransactionPage.tabChat"},{id:T.ACTIVITY,label:(0,x.jsx)(g.sA,{id:"TransactionPage.tabActivity"}),translationId:"TransactionPage.tabActivity"},{id:T.LOCATION,label:(0,x.jsx)(g.sA,{id:"TransactionPage.tabLocation"}),translationId:"TransactionPage.tabLocation"}];return(0,x.jsxs)("div",{className:r,children:[(0,x.jsx)("div",{className:v,children:l.map(e=>{const a=s===e.id,n=c()(y,{[f]:a,[b]:e.id===T.DETAILS});return(0,x.jsx)("button",{type:"button",className:n,onClick:()=>{return a=e.id,void(t&&t(a));var a},children:e.label},e.id)})}),(0,x.jsx)("div",{className:_,children:o})]})};P.defaultProps={rootClassName:null,className:null,activeTab:T.DETAILS,onTabChange:null,children:null};const N=(0,g.j4)(P);var j=n(37065),A=n(36373),M=n(86188),S=n(65502),w=n(93055),C=n(48602),I=n(10807),D=n(28694),E=n(88312),k=n(68328),F=n(85275),R=n(10504),B=n(32710),L=n(41430),W=n(83261);const q="DisputeModal_root__mwJaT marketplaceModalBaseStyles",O="DisputeModal_modalContent__3qUye",V="DisputeModal_modalIcon__j630c marketplaceModalIconStyles",H="DisputeModal_modalTitle__QWrSs marketplaceModalTitleStyles",U="DisputeModal_modalMessage__JnjeB marketplaceModalParagraphStyles",Y="DisputeModal_formRoot__g-mlt",z="DisputeModal_errorPlaceholder__u9o34",G="DisputeModal_disputeMessage__ZL7rt",Z="DisputeModal_submitButton__Rlxdl",K=e=>(0,x.jsx)(L.lV,(0,t.A)((0,t.A)({},e),{},{render:e=>{const{className:a,rootClassName:n,disabled:s,handleSubmit:t,intl:i,formId:o,invalid:r,disputeSubmitted:l,disputeError:d,disputeInProgress:u}=e,m=d?(0,x.jsx)(g.sA,{id:"DisputeModal.disputeSubmitFailed"}):null,p=c()(n||Y,a),h=r||s||u||l;return(0,x.jsxs)(k.lV,{className:p,onSubmit:t,children:[(0,x.jsx)(k.k7,{className:G,type:"textarea",id:o?"".concat(o,".disputeReason"):"disputeReason",
3name:"disputeReason",label:i.formatMessage({id:"DisputeModal.label"}),placeholder:i.formatMessage({id:"DisputeModal.disputePlaceholder"}),validate:(0,W.mw)(i.formatMessage({id:"DisputeModal.disputeReasonRequired"}))}),(0,x.jsx)("p",{className:z,children:m}),(0,x.jsx)(k.$n,{className:Z,type:"submit",inProgress:u,disabled:h,ready:l,children:i.formatMessage({id:"DisputeModal.submit"})})]})}})),$=e=>{const a=(0,u._r)().marketplaceName;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("p",{className:H,children:(0,x.jsx)(g.sA,{id:"DisputeModal.title"})}),(0,x.jsx)("p",{className:U,children:(0,x.jsx)(g.sA,{id:"DisputeModal.description",values:{marketplaceName:a}})}),(0,x.jsx)(K,{onSubmit:e.onDisputeOrder,disputeSubmitted:e.disputeSubmitted,disputeInProgress:e.disputeInProgress,disputeError:e.disputeError,intl:e.intl})]})},X=e=>(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("p",{className:H,children:(0,x.jsx)(g.sA,{id:"DisputeModal.sentTitle"})}),(0,x.jsx)("p",{className:U,children:(0,x.jsx)(g.sA,{id:"DisputeModal.sentMessage"})}),(0,x.jsx)("p",{className:U,children:(0,x.jsx)(g.sA,{id:"DisputeModal.sentNextStep"})})]}),Q=e=>{const{className:a,rootClassName:n,id:s,intl:t,isOpen:i,onCloseModal:o,onManageDisableScrolling:r,onDisputeOrder:l,disputeSubmitted:d,disputeInProgress:u,disputeError:m}=e,g=c()(n||q,a);return(0,x.jsxs)(k.aF,{id:s,containerClassName:g,contentClassName:O,isOpen:i,onClose:o,onManageDisableScrolling:r,usePortal:!0,closeButtonMessage:t.formatMessage({id:"DisputeModal.close"}),children:[(0,x.jsx)(k.WG,{className:V}),d?(0,x.jsx)(X,{}):(0,x.jsx)($,{onDisputeOrder:l,disputeSubmitted:d,disputeInProgress:u,disputeError:m,intl:t})]})};Q.defaultProps={className:null,rootClassName:null,isOpen:!1,disputeSubmitted:!1,disputeInProgress:!1,disputeError:null};const J=(0,g.j4)(Q),ee="SignaturePad_root__qgrrA",ae="SignaturePad_tabs__adc21",ne="SignaturePad_tab__paRG6",se="SignaturePad_tabActive__giCao",te="SignaturePad_typedPreview__7jQEb",ie="SignaturePad_typedText__U23XF",oe="SignaturePad_typedPlaceholder__G1NGP",re="SignaturePad_canvasWrapper__NSou7",le="SignaturePad_canvas__y4CfD",de="SignaturePad_footer__5Z5Re",ce="SignaturePad_clearButton__6S5W0",ue="SignaturePad_offscreenCanvas__JedAP",me="Homemade Apple",ge=120,pe="type",he="draw",ve=(0,i.forwardRef)(function(e,a){const{typedName:s="",onTypedNameChange:t,onSignatureReady:o,placeholderTranslationId:r="SignaturePad.typedPlaceholder",clearButtonTranslationId:l="SignaturePad.clearButton",typeTabTranslationId:d="SignaturePad.typeTab",drawTabTranslationId:c="SignaturePad.drawTab"}=e,u=(0,g.tz)(),[m,p]=(0,i.useState)(pe),[h,v]=(0,i.useState)(!1),y=(0,i.useRef)(null),f=(0,i.useRef)(null),[b,_]=(0,i.useState)(null);(0,i.useEffect)(()=>{"undefined"!==typeof window&&n.e(114).then(n.bind(n,114)).then(e=>{_(()=>e.default)})},[]);const T=!s.trim(),P=m===pe?T:!h;(0,i.useEffect)(()=>{null===o||void 0===o||o(!P)},[P,o]),(0,i.useImperativeHandle)(a,()=>({async getPngBlob(){if(m===pe){if(!s.trim())throw new Error("No signature");const e=y.current,a=e.getContext("2d");return e.width=600,e.height=ge,a.clearRect(0,0,600,ge),a.fillStyle="#ffffff",a.fillRect(0,0,600,ge),a.font="".concat(48,'px "').concat(me,'", cursive'),a.fillStyle="#111111",a.textBaseline="middle",a.fillText(s,20,60),new Promise((a,n)=>{e.toBlob(e=>e?a(e):n(new Error("Rasterize failed")),"image/png")})}if(!f.current||f.current.isEmpty())throw new Error("No signature drawn");return(e=>fetch(e).then(e=>e.blob()))(f.current.toDataURL("image/png"))},getSignatureType:()=>m===pe?"typed":"drawn",getTypedFont:()=>me,isEmpty:()=>m===pe?T:!h}));const N=e=>{p(e)},j=u.formatMessage({id:r}),A=u.formatMessage({id:l}),M=u.formatMessage({id:d,defaultMessage:"Type"}),S=u.formatMessage({id:c,defaultMessage:"Draw"});return(0,x.jsxs)("div",{className:ee,children:[(0,x.jsxs)("div",{className:ae,children:[(0,x.jsx)("button",{type:"button",className:"".concat(ne," ").concat(m===pe?se:""),onClick:()=>N(pe),children:M}),(0,x.jsx)("button",{type:"button",className:"".concat(ne," ").concat(m===he?se:""),onClick:()=>N(he),children:S})]}),m===pe&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:te,children:s.trim()?(0,x.jsx)("span",{className:ie,children:s}):(0,x.jsx)("span",{className:oe,children:j})}),(0,x.jsx)("input",{type:"text",value:s,onChange:e=>t(e.target.value),placeholder:j,autoComplete:"name"})]}),m===he&&(0,x.jsx)("div",{className:re,children:b?(0,x.jsx)(b,{ref:f,penColor:"black",canvasProps:{className:le},onEnd:()=>{var e;return v(!(null!==(e=f.current)&&void 0!==e&&e.isEmpty()))}}):null}),(0,x.jsx)("div",{className:de,children:(0,x.jsx)("button",{type:"button",className:ce,onClick:()=>{var e;m===pe?t(""):(null===(e=f.current)||void 0===e||e.clear(),v(!1))},disabled:m===pe?!s:!h,children:A})}),(0,x.jsx)("canvas",{ref:y,className:ue})]})});var ye=n(94046);const fe=async function(e,a){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"finalize";const s=await fetch("".concat((0,ye.apiBaseUrl)(),"/api/transactions/sell-7days/signature-upload-url?transactionId=").concat(encodeURIComponent(e),"&fileSize=").concat(a.size,"&purpose=").concat(encodeURIComponent(n)),{
3credentials:"include"});if(!s.ok){const e=await s.json().catch(()=>({}));throw new Error(e.message||"Failed to get signature upload URL (".concat(s.status,")"))}const{uploadUrl:t,r2Key:i}=await s.json(),o=await fetch(t,{method:"PUT",body:a,headers:{"Content-Type":"image/png"}});if(!o.ok)throw new Error("Failed to upload signature to storage (".concat(o.status,")"));return{r2Key:i}};var be=n(10989);const _e="PropertyInfoConsentModal_root__-RcCB marketplaceModalBaseStyles",xe="PropertyInfoConsentModal_modalContent__7CiWR",Te="PropertyInfoConsentModal_modalTitle__TJAr3 marketplaceModalTitleStyles",Pe="PropertyInfoConsentModal_consentList__BadXc marketplaceSmallFontStyles",Ne="PropertyInfoConsentModal_consentError__MjtyW",je="PropertyInfoConsentModal_signatureSection__0Vhwi",Ae="PropertyInfoConsentModal_signatureLabel__gNBbl marketplaceSmallFontStyles",Me="PropertyInfoConsentModal_consentStatement__np15h",Se="PropertyInfoConsentModal_agreeButton__d1GCw",we=e=>{const{className:a,rootClassName:n,id:s,intl:t,isOpen:o,txId:r,onCloseModal:l,onManageDisableScrolling:d,onAgree:u,agreeInProgress:m,agreeError:p}=e,h=c()(n||_e,a),v=(0,i.useRef)(null),[y,f]=(0,i.useState)(""),[b,_]=(0,i.useState)(!1),[T,P]=(0,i.useState)(!1),[N,j]=(0,i.useState)(null),A=T||m;return(0,x.jsxs)(k.aF,{id:s,containerClassName:h,contentClassName:xe,isOpen:o,onClose:l,onManageDisableScrolling:d,usePortal:!0,closeButtonMessage:t.formatMessage({id:"PropertyInfoConsentModal.close"}),children:[(0,x.jsx)("p",{className:Te,children:(0,x.jsx)(g.sA,{id:"TransactionPage.PropertyInfoConsent.intro"})}),(0,x.jsx)("ol",{className:Pe,children:be.INTRO_CONSENT.map(e=>(0,x.jsx)("li",{children:e.text},e.id))}),(0,x.jsxs)("div",{className:je,children:[(0,x.jsx)("p",{className:Ae,children:(0,x.jsx)(g.sA,{id:"TransactionPage.PropertyInfoConsent.signatureLabel"})}),(0,x.jsx)(ve,{ref:v,typedName:y,onTypedNameChange:f,onSignatureReady:_,placeholderTranslationId:"TransactionPage.PropertyInfoConsent.signaturePad.typedPlaceholder",clearButtonTranslationId:"TransactionPage.PropertyInfoConsent.signaturePad.clearButton",typeTabTranslationId:"TransactionPage.PropertyInfoConsent.signaturePad.typedTabLabel",drawTabTranslationId:"TransactionPage.PropertyInfoConsent.signaturePad.drawnTabLabel"}),(0,x.jsx)("p",{className:Me,children:(0,x.jsx)(g.sA,{id:"TransactionPage.PropertyInfoConsent.esignConsent"})})]}),(p||N)&&(0,x.jsx)("p",{className:Ne,children:N||(0,x.jsx)(g.sA,{id:"TransactionPage.PropertyInfoConsent.error"})}),(0,x.jsx)(k.jn,{type:"button",onClick:async()=>{if(r&&v.current){j(null),P(!0);try{const e=await v.current.getPngBlob(),a=v.current.getSignatureType(),n="typed"===a?v.current.getTypedFont():void 0,{r2Key:s}=await fe(r,e,"property-info");await u({r2Key:s,signatureType:a,typedName:"typed"===a?y:void 0,typedFont:n})}catch(e){j(e.message||"Failed to record your signature. Please try again.")}finally{P(!1)}}},inProgress:A,disabled:A||!b,className:Se,children:(0,x.jsx)(g.sA,{id:"TransactionPage.PropertyInfoConsent.agreeButton"})})]})};we.defaultProps={className:null,rootClassName:null,agreeInProgress:!1,agreeError:null};const Ce=(0,g.j4)(we);var Ie=n(22422),De=n.n(Ie),Ee=n(11269);const ke="ReviewModal_root__6ID56 marketplaceModalBaseStyles",Fe="ReviewModal_modalMessage__w4jx6 marketplaceModalParagraphStyles",Re="ReviewModal_modalContent__JE4RI",Be="ReviewModal_modalTitle__QzeHa marketplaceModalTitleStyles",Le="ReviewModal_reviewee__JDptB",We=e=>{const{className:a,rootClassName:n,id:s,marketplaceName:t,intl:i,isOpen:o,onCloseModal:r,onManageDisableScrolling:l,onSubmitReview:d,revieweeName:u,reviewSent:m,sendReviewInProgress:p,sendReviewError:h}=e,v=c()(n||ke,a),y=i.formatMessage({id:"ReviewModal.later"}),f=(0,x.jsx)("span",{className:Le,children:u});return(0,x.jsxs)(k.aF,{id:s,containerClassName:v,contentClassName:Re,isOpen:o,onClose:r,onManageDisableScrolling:l,usePortal:!0,closeButtonMessage:y,children:[(0,x.jsx)("p",{className:Be,children:(0,x.jsx)(g.sA,{id:"ReviewModal.title",values:{revieweeName:f}})}),(0,x.jsx)("p",{className:Fe,children:(0,x.jsx)(g.sA,{id:"ReviewModal.description",values:{marketplaceName:t}})}),(0,x.jsx)(Ee.A,{onSubmit:d,reviewSent:m,sendReviewInProgress:p,sendReviewError:h})]})},{bool:qe,string:Oe}=De();We.defaultProps={className:null,rootClassName:null,reviewSent:!1,sendReviewInProgress:!1,sendReviewError:null};const Ve=(0,g.j4)(We);var He=n(89719),Ue=n(57211),Ye=n(15352),ze=n(64381);var Ge=n(78364),Ze=n(93564),Ke=n(6535),$e=n(15999),Xe=n(95472),Qe=n(86177);const Je=e=>{const{className:a,rootClassName:n,orderBreakdown:s,processName:t,extraContent:i}=e,o=c()(n||Qe.A.breakdownMaybe,a);return s?(0,x.jsxs)("div",{className:o,children:[(0,x.jsx)(k.H6,{as:"h3",className:Qe.A.orderBreakdownTitle,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.".concat(t,".orderBreakdownTitle")})}),(0,x.jsx)("hr",{className:Qe.A.totalDivider}),i||null,s]}):null};var ea=n(70669);const aa=e=>{const{showDetailCardHeadings:a,listingTitle:n,subTitle:s,showPrice:t,price:i,intl:o}=e;return a?(0,x.jsxs)("div",{className:Qe.A.detailCardHeadings,children:[(0,x.jsxs)(k.H4,{as:"h2",className:Qe.A.detailCardTitle,children:[n,t&&i?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("br",{}),(0,x.jsx)("span",{className:Qe.A.inquiryPrice,children:(0,ea.up)(o,i)})]}):null]}),s?(0,x.jsx)("p",{className:Qe.A.detailCardSubtitle,children:s}):null]}):null},na=e=>{var a;const{className:n,rootClassName:s,avatarWrapperClassName:t,listingTitle:o,image:r,provider:l,isCustomer:d,listingImageConfig:u}=e,m=c()(s||Qe.A.detailCardImageWrapper,n),{aspectWidth:g=1,aspectHeight:p=1,variantPrefix:h="listing-card"}=u,v=r?Object.keys(null===r||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.variants).filter(e=>e.startsWith(h)):[];
3return(0,x.jsx)(i.Fragment,{children:(0,x.jsx)(k.Vh,{width:g,height:p,className:m,children:(0,x.jsx)(k.wF,{rootClassName:Qe.A.rootForImage,alt:o,image:r,variants:v})})})};var sa=n(70491);const ta=e=>{const{className:a,rootClassName:n,protectedData:s,showInquiryMessage:t,isCustomer:i}=e,o=c()(n||Qe.A.deliveryInfoContainer,a),r=i?Qe.A.ownInquiryMessage:Qe.A.inquiryMessage;if(t){const e=(0,sa.YD)(null===s||void 0===s?void 0:s.inquiryMessage,{linkify:!0,longWordMinLength:20,longWordClass:Qe.A.longWord});return(0,x.jsxs)("div",{className:o,children:[(0,x.jsx)(k.DZ,{as:"h3",rootClassName:Qe.A.sectionHeading,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.inquiryMessageHeading"})}),(0,x.jsx)("p",{className:r,children:e})]})}return null},ia=e=>{const{className:a,rootClassName:n,activityFeed:s,hasTransitions:t,fetchMessagesError:i,initialMessageFailed:o,hasMessages:r,isConversation:l}=e,d=r||t||o||i,u=c()(n||Qe.A.feedContainer,a);return d?(0,x.jsxs)("div",{className:u,children:[(0,x.jsx)(k.DZ,{as:"h3",rootClassName:Qe.A.sectionHeading,children:l?(0,x.jsx)(g.sA,{id:"TransactionPanel.conversationHeading"}):(0,x.jsx)(g.sA,{id:"TransactionPanel.activityHeading"})}),o?(0,x.jsx)("p",{className:Qe.A.messageError,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.initialMessageFailed"})}):null,i?(0,x.jsx)("p",{className:Qe.A.messageError,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.messageLoadingFailed"})}):null,(0,x.jsx)("div",{className:Qe.A.feedContent,children:s})]}):null};var oa=n(73432),ra=n(76266),la=n(42949),da=n.n(la),ca=n(14891),ua=n(22177),ma=n(33171);const ga="FieldDateTimeInput_tzHint__DDufZ",pa="FieldDateTimeInput_helperText__uCHNX",ha=e=>e.format("YYYY-MM-DDTHH:mm"),va=e=>{var a,n;let{name:s,id:i,label:o,validate:r=[],className:l,intl:d,tz:c,transaction:u,processName:m}=e;const g=c?(0,ma.$k)(c):"",p=null===u||void 0===u||null===(a=u.attributes)||void 0===a||null===(n=a.transitions)||void 0===n?void 0:n.find(e=>"transition/confirm-payment"===e.transition),h=(0,ua.Y)(m),v=c?da().tz(c):null,y=v?v.clone().seconds(0).milliseconds(0):null,f=c&&null!==h&&void 0!==h&&h.maxSchedulingWindow&&p?da().tz(p.createdAt,c).startOf("day").add(h.maxSchedulingWindow,"days").endOf("day"):null,b=[...r,e=>{if(!e||!c||!v)return;const a=da().tz(e,c);return a.isValid()&&a.isBefore(v)?d.formatMessage({id:"FieldDateTimeInput.mustBeFuture"}):void 0},e=>{if(!e||!f)return;const a=da().tz(e,c);return a.isValid()&&a.isAfter(f)?d.formatMessage({id:"FieldDateTimeInput.tooFarInFuture"}):void 0}];return(0,x.jsx)(L.D0,{name:s,validate:(0,W.k3)(...b),children:e=>{let{input:a,meta:n}=e;return(0,x.jsxs)("div",{className:l,children:[(0,x.jsxs)("label",{htmlFor:i,children:[o," ",c&&(0,x.jsx)("span",{className:ga,children:d.formatMessage({id:"FieldDateTimeInput.tzHint"},{tz:g})})]}),(0,x.jsx)("input",(0,t.A)({id:i,type:"datetime-local",min:y?ha(y):void 0,max:f?ha(f):void 0},a)),(0,x.jsx)(k.yI,{fieldMeta:n}),a.value&&c&&(0,x.jsxs)("div",{className:pa,children:[(0,x.jsx)(ca.A,{size:12})," ",da().tz(a.value,c).local().format("h:mm A")," your time"]})]})}})};var ya=n(27939),fa=n(42475),ba=n(12465),_a=n(70929),xa=n(21439);const Ta=e=>{const{className:a,rootClassName:n,linkRootClassName:s,location:t,geolocation:i,showAddress:o,prefixElement:r}=e,{address:l,building:d}=t||{},{lat:u,lng:m}=i||{},g=i?"https://maps.google.com/?q=".concat(u,",").concat(m):l?"https://maps.google.com/?q=".concat(encodeURIComponent(l)):null,p="string"===typeof d&&d.length>0?"".concat(d,", ").concat(l):l,h=c()(n||Qe.A.address,a);return o&&g?(0,x.jsxs)("p",{className:h,children:[r," ",(0,x.jsxs)(k.Gr,{className:s,href:g,children:[(0,x.jsx)(xa.A,{})," ",p]})]}):null};var Pa=n(83986);const Na="ManagerInformationMaybe_root__t6djp",ja="ManagerInformationMaybe_heading__Q1WQU",Aa="ManagerInformationMaybe_sectionContent__BsMQb marketplaceSmallFontStyles",Ma="ManagerInformationMaybe_sectionNotAvailable__TbmoU",Sa="ManagerInformationMaybe_pastAppointment__XRxTB",wa="ManagerInformationMaybe_sellerNote__qmRta",Ca="ManagerInformationMaybe_leadNotesSection__ZrHHw",Ia="ManagerInformationMaybe_leadNotesHeading__Pgso+",Da="ManagerInformationMaybe_progressNotesList__I+FNe",Ea="ManagerInformationMaybe_progressNoteEntry__oZEYB",ka="ManagerInformationMaybe_progressNoteDate__
3+YSzw marketplaceSmallFontStyles",Fa="ManagerInformationMaybe_progressNoteContent__owCZq marketplaceSmallFontStyles";const Ra=function(e){var a,n,s,t,o,r,l,d;let{protectedData:u={},stateData:m={},transaction:g,transactionRole:p,currentUser:h,onRefreshTransaction:v,onAgreedToTerms:y,needsPropertyInfoConsent:f,onOpenPropertyInfoConsentModal:b,className:_,headingClassName:T}=e;const P=(0,oa.A)(),[N,j]=(0,i.useState)([]),[A,M]=(0,i.useState)(!1),{processName:S,isCanceled:w}=m;let{managerAddress:C,managerAddressGeo:I,managerEmail:D,managerName:E,managerBusinessName:F,managerPhoneNumber:R,appointmentDateTime:B,appointmentDateTimeTimezone:L}=u;const W=(null===g||void 0===g||null===(a=g.listing)||void 0===a||null===(n=a.attributes)||void 0===n||null===(s=n.publicData)||void 0===s?void 0:s.location)||{},q=null===g||void 0===g||null===(t=g.listing)||void 0===t||null===(o=t.attributes)||void 0===o||null===(r=o.publicData)||void 0===r?void 0:r.lead_id,O=null===g||void 0===g||null===(l=g.provider)||void 0===l||null===(d=l.id)||void 0===d?void 0:d.uuid;(0,i.useEffect)(()=>{if(!q||"provider"!==p||!O)return void j([]);let e=!1;M(!0);return(async()=>{try{const a=await fetch("".concat((0,ye.apiBaseUrl)(),"/api/agent/leads/").concat(q),{credentials:"include"});if(!a.ok||e)return;const{lead:n}=await a.json();if(e)return;const s=(n.progress||[]).filter(e=>e.user_id===O&&e.notes).slice().reverse();j(s)}catch(a){e||j([])}finally{e||M(!1)}})(),()=>{e=!0}},[q,p,O]);const V=c()(Na,_),H=c()(ja,T),U=new Date,Y=B?new Date(B):null,z=Y&&U>Y,G=C||D||E||R||B,Z=S===Ge.SELL_PURCHASE_PROCESS_NAME||S===Ze.SELL_7DAYS_PROCESS_NAME,K=(!Z||!G||w)&&("customer"===p||!W.businessName),$=z||w;var X,Q;return"provider"===p&&!G&&W.businessName&&(F=W.businessName,C=null===W||void 0===W?void 0:W.address,I=null===g||void 0===g||null===(X=g.listing)||void 0===X||null===(Q=X.attributes)||void 0===Q?void 0:Q.geolocation,E=null===W||void 0===W?void 0:W.managerName,R=null===W||void 0===W?void 0:W.managerPhone,D=null===W||void 0===W?void 0:W.managerEmail),K?(0,x.jsxs)("div",{className:V,children:[(0,x.jsxs)(k.DZ,{as:"h3",rootClassName:H,children:[(0,x.jsx)(fa.A,{})," ",(0,x.jsx)(ya.A,{id:"TransactionPanel.managerInformationHeading"})]}),(0,x.jsx)("p",{className:Ma,children:(0,x.jsx)(ya.A,{id:"TransactionPanel.managerInfoNotAvailable"})})]}):f?(0,x.jsxs)("div",{className:V,children:[(0,x.jsxs)(k.DZ,{as:"h3",rootClassName:H,children:[(0,x.jsx)(fa.A,{})," ",(0,x.jsx)(ya.A,{id:"TransactionPanel.managerInformationHeading"})]}),(0,x.jsx)("p",{className:Aa,children:(0,x.jsx)(ya.A,{id:"TransactionPage.PropertyInfoConsent.placeholderMessage"})}),(0,x.jsx)(k.jn,{type:"button",onClick:b,children:(0,x.jsx)(ya.A,{id:"TransactionPage.PropertyInfoConsent.reopenButton"})})]}):(0,x.jsxs)(x.Fragment,{children:[Z&&(!G||w)&&"provider"===p&&(0,x.jsxs)("p",{className:wa,children:[(0,x.jsx)(ca.A,{className:"small"})," ",(0,x.jsx)(ya.A,{id:"TransactionPage.PropertyInfoConsent.sellerNoteNotYetDisplayed"})]}),!!B&&(0,x.jsxs)("div",{className:V,children:[(0,x.jsxs)(k.DZ,{as:"h3",rootClassName:H,children:[(0,x.jsx)(ba.A,{})," ",(0,x.jsx)(ya.A,{id:"TransactionPanel.appointmentDateTimeTitle"})]}),(0,x.jsx)("p",{className:c()(Aa,{[Sa]:$}),children:(0,ma.Ag)(B,u.appointmentDateTimeFormatted,L)})]}),(0,x.jsxs)("div",{className:V,children:[(0,x.jsxs)(k.DZ,{as:"h3",rootClassName:H,children:[(0,x.jsx)(fa.A,{})," ",(0,x.jsx)(ya.A,{id:"TransactionPanel.managerInformationHeading"})]}),!!F&&(0,x.jsx)("p",{className:Aa,children:(0,x.jsx)(ya.A,{id:"TransactionPanel.managerBusinessNameContent",values:{managerBusinessName:F}})}),!!E&&(0,x.jsx)("p",{className:Aa,children:(0,x.jsx)(ya.A,{id:"TransactionPanel.managerNameContent",values:{managerName:E}})}),!!R&&(0,x.jsxs)("p",{className:Aa,children:[(0,x.jsx)(ya.A,{id:"TransactionPanel.managerPhoneNumberContent"}),(0,x.jsx)("a",{href:"tel:".concat(R),children:R})]}),!!D&&(0,x.jsxs)("p",{className:Aa,children:[(0,x.jsx)(ya.A,{id:"TransactionPanel.managerEmailTitle"}),(0,x.jsx)("a",{href:"mailto:".concat(D),children:D})]}),!!C&&!!I&&(0,x.jsx)(Ta,{className:Aa,location:{address:C},geolocation:I,showAddress:!0,prefixElement:(0,x.jsx)(ya.A,{id:"TransactionPanel.managerAddressTitle"})})]}),q&&"provider"===p&&(0,x.jsxs)("div",{className:c()(Na,_,Ca),children:[(0,x.jsxs)(k.DZ,{as:"h3",rootClassName:c()(ja,T,Ia),children:[(0,x.jsx)(_a.A,{})," ",(0,x.jsx)(ya.A,{id:"TransactionPanel.leadNotesHeading"})]}),A?(0,x.jsx)("p",{className:Ma,children:(0,x.jsx)(ya.A,{id:"TransactionPanel.leadNotesLoading"})}):N.length>0?(0,x.jsx)("div",{className:Da,children:N.map(e=>(0,x.jsxs)("div",{className:Ea,children:[(0,x.jsx)("span",{className:ka,children:(0,Pa.$Q)(e.created_at,P)}),(0,x.jsx)("blockquote",{className:Fa,children:e.notes})]},e.id))}):(0,x.jsx)("p",{className:Ma,children:(0,x.jsx)(ya.A,{id:"TransactionPanel.leadNotesEmpty"})})]})]})},Ba="TransactionModalForm_fieldNote__DNXom",La="TransactionModalForm_submitError__JWIX5",Wa="TransactionModalForm_fieldInput__fbpKI",qa="TransactionModalForm_fieldSelect__bhyYa",Oa="TransactionModalForm_fieldLocationInput__HPOEU",Va="TransactionModalForm_locationAutocompleteInputIcon__wtXtJ",Ha="TransactionModalForm_fieldCheckbox__9OCER",Ua="TransactionModalForm_managerDisplayInModal__0KXgl";var Ya=n(9477);const za=["onSubmit","formConfigs","transaction","processName"];const Ga=function(e){let{onSubmit:a,formConfigs:n=[],transaction:o,processName:r}=e,l=(0,s.A)(e,za);const d=(0,oa.A)(),c=(0,i.useMemo)(()=>(e=>e.filter(e=>e.type===Ke._L).reduce((e,a)=>(0,Ya.merge)(e,a.data||{}),{}))(n),[n]);return(0,x.jsx)(L.lV,(0,t.A)((0,t.A)({onSubmit:e=>{const s=(0,ma.aT)((0,Ya.merge)({},c,e)),t=n.filter(e=>e.type===Ke.ny).reduce((a,n)=>{var s;const{name:t}=n,i=(0,Ya.get)(e,t);return(0,Ya.set)(a,t,null===i||void 0===i||null===(s=i.selectedPlace)||void 0===s?void 0:s.address),(0,Ya.set)(a,"".concat(t,"Geo"),null===i||void 0===i?void 0:i.selectedPlace.origin),a},{}),i=n.filter(e=>e.type===Ke.br);
3if(i.some(a=>{let{name:n}=a;const s=(0,Ya.get)(e,n);return"string"===typeof s&&s.length>0})&&!s)return console.error("[TransactionModalForm] Cannot save appointment \u2014 manager address missing so timezone is unknown."),{[ra.Ym]:"Cannot determine appointment timezone \u2014 manager address is missing."};const o=i.reduce((a,n)=>{const{name:t}=n,i=(0,Ya.get)(e,t);if("string"===typeof i&&i.length>0){const e=da().tz(i,s);e.isValid()&&((0,Ya.set)(a,t,e.toISOString()),(0,Ya.set)(a,"".concat(t,"Formatted"),e.format("dddd, MMMM D, YYYY [at] h:mm A z")),(0,Ya.set)(a,"".concat(t,"Timezone"),s))}return a},{}),r=(0,Ya.merge)({},c,e,t);i.forEach(e=>{let{name:a}=e;const n=(0,Ya.get)(o,a);n?((0,Ya.set)(r,a,n),(0,Ya.set)(r,"".concat(a,"Formatted"),(0,Ya.get)(o,"".concat(a,"Formatted"))),(0,Ya.set)(r,"".concat(a,"Timezone"),(0,Ya.get)(o,"".concat(a,"Timezone")))):((0,Ya.unset)(r,a),(0,Ya.unset)(r,"".concat(a,"Formatted")),(0,Ya.unset)(r,"".concat(a,"Timezone")))}),a(r)}},l),{},{render:e=>{const{children:a,handleSubmit:s,values:t,submitError:l}=e,u=(0,ma.aT)((0,Ya.merge)({},c,t)),m=Array.isArray(n)?n.map((e,a)=>(e=>{let{config:a,configIndex:n,intl:s,values:t,transaction:o,processName:r,tz:l}=e;const{type:d,labelTranslationId:c,placeholderTranslationId:u,name:m,initialValue:g,disabled:p,validators:h=[],options:v,labelTranslationValues:y}=a,f=Array.isArray(h)?h.map(e=>{let{validatorFn:a,messageTranslationId:n}=e;return a(s.formatMessage({id:n}))}):[];switch(d){case Ke.J$:return(0,x.jsx)(k.k7,{id:m,name:m,type:"text",initialValue:g,label:c&&s.formatMessage({id:c}),placeholder:u&&s.formatMessage({id:u}),validate:p?void 0:(0,W.k3)(...f),disabled:p,className:Wa},n);case Ke.y9:return(0,x.jsx)(k.k7,{id:m,name:m,type:"textarea",label:c&&s.formatMessage({id:c}),placeholder:u&&s.formatMessage({id:u}),validate:(0,W.k3)(...f),className:Wa},n);case Ke.Qj:{const{showWhen:e,noteWhen:o,noteTranslationId:r}=a;if(e){const{field:a,value:n}=e;if((0,Ya.get)(t,a)!==n)return null}const l=(0,Ya.get)(t,m),d=o&&r&&o.values&&o.values.includes(l),u=d?{days:parseInt(l,10),buyerName:(null===y||void 0===y?void 0:y.buyerName)||""}:{};return(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(k.HU,{id:m,name:m,label:c&&s.formatMessage({id:"".concat(c,".label")},y||{}),validate:(0,W.k3)(...f),className:qa,children:v.map(e=>(0,x.jsx)("option",{value:e,children:s.formatMessage({id:"".concat(c,".").concat(e)})},e))}),d&&(0,x.jsx)("p",{className:Ba,children:s.formatMessage({id:r},u)})]},n)}case Ke.ny:return(0,x.jsx)(k.Ib,{name:m,label:c&&s.formatMessage({id:c}),placeholder:u&&s.formatMessage({id:u}),initialValue:g,useDefaultPredictions:!1,format:e=>e,valueFromForm:t[m],validate:(0,W.k3)(...f),inputClassName:Oa,rootClassName:Wa,iconClassName:Va},n);case Ke.br:{const{noteTranslationId:e}=a;return(0,x.jsxs)(i.Fragment,{children:[(0,x.jsx)(va,{id:m,name:m,label:c&&s.formatMessage({id:c}),placeholder:u&&s.formatMessage({id:u}),validate:f,className:Wa,intl:s,tz:l,transaction:o,processName:r}),e&&(0,x.jsx)("p",{className:Ba,children:s.formatMessage({id:e})})]},n)}case Ke.nD:{const{showWhen:e}=a;if(e){const{field:a,value:n}=e;if((0,Ya.get)(t,a)!==n)return null}return(0,x.jsx)(k.Gt,{id:m,name:m,label:c&&s.formatMessage({id:c}),className:Ha},n)}case Ke._L:{const{data:e={}}=a;return(0,x.jsx)(Ra,{protectedData:e.protectedData||{},stateData:{processName:r,isCanceled:!1},className:Ua},n)}default:return null}})({config:e,configIndex:a,intl:d,values:t,transaction:o,processName:r,tz:u})):[];return(0,x.jsxs)(k.lV,{onSubmit:s,children:[m,l&&(0,x.jsx)("p",{className:La,children:l}),a]})}}))};var Za=n(15619),Ka=n(55420);const $a="TxActionButtonWithModal_modalContent__FZWYK",Xa="TxActionButtonWithModal_modalTitle__HStYP marketplaceModalTitleStyles",Qa="TxActionButtonWithModal_ctaButtonWrapper__NvsJc",Ja="TxActionButtonWithModal_confirmBox__2GXCI",en="TxActionButtonWithModal_checkboxLabel__1YyHG",an="TxActionButtonWithModal_checkboxInput__0bZRl",nn="TxActionButtonWithModal_checkboxText__BGxt6",sn="TxActionButtonWithModal_confirmStatement__yUrW8",tn="TxActionButtonWithModal_checkboxList__MmFGN",on="TxActionButtonWithModal_ctaButtonWrapperTwoCol__tq9cb",rn="TxActionButtonWithModal_backButton__3Q3Ya",ln="TxActionButtonWithModal_appointmentWarning__oLN4l",dn="TxActionButtonWithModal_consentStatement__EAEYp",cn="TxActionButtonWithModal_uploadError__R8b1R",un=e=>(0,t.A)((0,t.A)({},e),{},{p:e=>(0,x.jsx)("p",{children:e}),strong:e=>(0,x.jsx)("strong",{children:e}),ol:e=>(0,x.jsx)("ol",{children:e}),ul:e=>(0,x.jsx)("ul",{children:e}),li:e=>(0,x.jsx)("li",{children:e}),blockquote:e=>(0,x.jsx)("blockquote",{children:e}),br:(0,x.jsx)("br",{})}),mn=e=>{let{buttonProps:a,id:n,ButtonComponent:s,buttonDisabled:o,transactionRole:l,processName:d,processState:c,intl:u,transaction:m}=e;const[p,h]=(0,i.useState)(!1),[v,y]=(0,i.useState)(1),[f,b]=(0,i.useState)({}),[_,T]=(0,i.useState)(""),[P,N]=(0,i.useState)(!1),[j,A]=(0,i.useState)(!1),[M,S]=(0,i.useState)(null),[w,C]=(0,i.useState)(!1),D=(0,i.useRef)(null),E=(0,r.wA)(),F=(0,i.useRef)(!0);(0,i.useEffect)(()=>(F.current=!0,()=>{F.current=!1}),[]);const{inProgress:R,onAction:B,buttonText:W,isConfirmNeeded:q,showConfirmStatement:O,showReminderStatement:V,confirmStatementTranslationId:H,confirmStatementSuffixTranslationId:U,reminderStatementTranslationId:Y,confirmButtonTranslationId:z,confirmButtonTranslationIdWhenReservation:G,confirmModalTitleTranslationId:Z,toastTitleTranslationId:K,toastContentTranslationId:$,error:X,errorText:Q,formConfigs:J,transitionKey:ee,txInfo:ae={}
3,disabledTooltip:ne,informationalOnly:se,informationalMessageTranslationId:te,confirmationCheckboxes:ie,showSignaturePad:oe,consentStatementTranslationId:re,appointmentWasInFuture:le,appointmentWarningTranslationId:de}=a||{},ce=!0===oe,ue=Array.isArray(ie)&&ie.length>0,me=ue&&ie.every(e=>!0===f[e.id]),ge=(0,i.useCallback)(e=>{b(a=>(0,t.A)((0,t.A)({},a),{},{[e]:!a[e]}))},[]),pe=()=>{h(!1),C(!1),b({}),T(""),N(!1),S(null),y(1)},he=async e=>{if(ce){A(!0),S(null);try{var a;const n=await D.current.getPngBlob(),s=(null===m||void 0===m||null===(a=m.id)||void 0===a?void 0:a.uuid)||(null===m||void 0===m?void 0:m.id),{r2Key:i}=await fe(s,n),o=D.current.getSignatureType(),r="typed"===o?D.current.getTypedFont():void 0,l=re?u.formatMessage({id:re}):"",d=ue?ie.map(e=>({id:e.id,text:u.formatMessage({id:e.translationId},ae)})):[];await(null===B||void 0===B?void 0:B((0,t.A)((0,t.A)({},e),{},{signature:{r2Key:i,signatureType:o,typedName:"typed"===o?_:void 0,typedFont:r,confirmedBullets:d,consentStatement:l,appointmentWasInFuture:Boolean(le)}})))}catch(n){return void(F.current&&(S(n.message||"Upload failed. Please try again."),A(!1)))}if(!F.current)return;A(!1)}else await(null===B||void 0===B?void 0:B(e));F.current&&(h(!1),C(!1),b({}),T(""),N(!1),y(1),await new Promise(e=>setTimeout(e,500)),F.current&&(window.scrollTo({top:0,left:0,behavior:"smooth"}),(0,Za.tP)({titleId:K||"TransactionPage.".concat(d,".").concat(l,".transition-").concat(ee,".toastTitle"),contentId:$||"TransactionPage.".concat(d,".").concat(l,".transition-").concat(ee,".toastContent"),intl:u,translationValues:ae})))},ye=j||R,be=u.formatMessage({id:Z||"TransactionPage.".concat(n,"ConfirmActionModal.").concat(l,".modalTitle")}),_e=ce?u.formatMessage({id:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".step2Title"),defaultMessage:"Sign to finalize"}):null,xe=ce?u.formatMessage({id:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".nextButton"),defaultMessage:"Next"}):null,Te=ce?u.formatMessage({id:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".backButton"),defaultMessage:"Back"}):null,Pe=ce?u.formatMessage({id:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".submitButton"),defaultMessage:"Finalize and Sign"}):null;return(0,x.jsxs)(x.Fragment,{children:[!!a&&(0,x.jsx)(Ka.A,{content:o&&ne?ne:null,placement:"top",disabledOnTouch:!1,children:(0,x.jsx)("div",{children:(0,x.jsx)(s,{inProgress:R,disabled:o,onClick:()=>{q?(y(1),b({}),T(""),N(!1),S(null),h(!0)):null===B||void 0===B||B()},children:X?Q:W})})}),!!q&&(0,x.jsx)(k.aF,{id:"".concat(n,"ConfirmActionModal"),isOpen:p,onClose:pe,onManageDisableScrolling:(e,a)=>E((0,I.l)(e,a)),closeButtonMessage:"Close",contentClassName:$a,usePortal:!0,children:se?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("h2",{className:Xa,children:u.formatMessage({id:Z||"TransactionPage.".concat(n,"ConfirmActionModal.").concat(l,".modalTitle")})}),(0,x.jsx)("div",{className:sn,children:(0,x.jsx)(g.sA,{id:te,values:un(ae)})}),(0,x.jsx)("div",{className:Qa,children:(0,x.jsx)(k.tA,{type:"button",onClick:pe,children:u.formatMessage({id:"TransactionPage.ConfirmActionModal.closeButton",defaultMessage:"Close"})})})]}):ce?(0,x.jsx)(Ga,{formConfigs:[],onSubmit:e=>he(e),transaction:m||ae,processName:d,children:1===v?(0,x.jsxs)("div",{children:[(0,x.jsx)("h2",{className:Xa,children:be}),de&&(0,x.jsx)("div",{className:ln,children:(0,x.jsx)(g.sA,{id:de,values:un(ae)})}),ue&&(0,x.jsx)("div",{className:tn,children:ie.map(e=>(0,x.jsxs)("label",{className:en,children:[(0,x.jsx)("input",{type:"checkbox",checked:!0===f[e.id],onChange:()=>ge(e.id),className:an}),(0,x.jsx)("span",{className:nn,children:(0,x.jsx)(g.sA,{id:e.translationId,values:un(ae)})})]},e.id))}),(0,x.jsx)("div",{className:Qa,children:(0,x.jsx)(k.jn,{type:"button",disabled:ue&&!me,onClick:()=>{y(2),S(null)},children:xe})})]}):(0,x.jsxs)("div",{children:[(0,x.jsx)("h2",{className:Xa,children:_e}),(0,x.jsx)(ve,{ref:D,typedName:_,onTypedNameChange:T,onSignatureReady:N,placeholderTranslationId:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".signaturePad.typedPlaceholder"),clearButtonTranslationId:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".signaturePad.clearButton"),typeTabTranslationId:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".signaturePad.typedTabLabel"),drawTabTranslationId:"TransactionPage.PrimaryConfirmActionModal.".concat(d,".").concat(c,".").concat(l,".signaturePad.drawnTabLabel")}),re&&(0,x.jsx)("p",{className:dn,children:(0,x.jsx)(g.sA,{id:re})}),M&&(0,x.jsx)("p",{className:cn,children:M}),(0,x.jsxs)("div",{className:on,children:[(0,x.jsx)("button",{type:"button",className:rn,onClick:()=>{y(1),S(null)},disabled:ye,children:Te}),(0,x.jsx)(k.jn,{type:"submit",inProgress:ye,disabled:ye||!P,children:Pe})]})]})}):(0,x.jsxs)("div",{children:[(0,x.jsx)("h2",{className:Xa,children:be}),O&&(0,x.jsxs)("div",{className:sn,children:[(0,x.jsx)(g.sA,{id:H||"TransactionPage.".concat(n,"ConfirmActionModal.").concat(d,".").concat(c,".").concat(l,".confirmStatement"),values:u
3n(ae)}),!!U&&(0,x.jsx)(g.sA,{id:U,values:un(ae)})]}),(0,x.jsxs)(Ga,{formConfigs:J,onSubmit:e=>he(e),transaction:m||ae,processName:d,children:[ue&&(0,x.jsx)("div",{className:tn,children:ie.map(e=>(0,x.jsxs)("label",{className:en,children:[(0,x.jsx)("input",{type:"checkbox",checked:!0===f[e.id],onChange:()=>ge(e.id),className:an}),(0,x.jsx)("span",{className:nn,children:(0,x.jsx)(g.sA,{id:e.translationId,values:un(ae)})})]},e.id))}),V&&(0,x.jsx)("div",{className:Ja,children:(0,x.jsxs)("label",{className:en,children:[(0,x.jsx)("input",{type:"checkbox",id:"".concat(n,"ReminderCheckbox"),checked:w,onChange:e=>C(e.target.checked),className:an}),(0,x.jsx)("span",{className:nn,children:(0,x.jsx)(g.sA,{id:Y||"TransactionPage.".concat(n,"ConfirmActionModal.").concat(d,".").concat(c,".").concat(l,".reminderStatement"),values:un(ae)})})]})}),(0,x.jsx)("div",{className:Qa,children:G?(0,x.jsx)(L.Pc,{subscription:{values:!0,valid:!0},children:e=>{var a,s,t;let{values:i,valid:r}=e;const d="buyer_property_need_more_time"===(null===i||void 0===i||null===(a=i.protectedData)||void 0===a?void 0:a.providerCancelReasonSelect)&&(null===i||void 0===i||null===(s=i.protectedData)||void 0===s?void 0:s.reservationDays)&&Ye.ox.includes(String(i.protectedData.reservationDays))?G:z||"TransactionPage.".concat(n,"ConfirmActionModal.").concat(l,".confirmButton"),c=(null===i||void 0===i||null===(t=i.protectedData)||void 0===t?void 0:t.providerCancelReasonSelect)&&"_placeholder"!==i.protectedData.providerCancelReasonSelect;return(0,x.jsx)(k.jn,{type:"submit",inProgress:R,disabled:o||V&&!w||ue&&!me||!c||!1===r,children:u.formatMessage({id:d})})}}):(0,x.jsx)(L.Pc,{subscription:{valid:!0},children:e=>{let{valid:a}=e;return(0,x.jsx)(k.jn,{inProgress:R,disabled:o||V&&!w||ue&&!me||!1===a,children:u.formatMessage({id:z||"TransactionPage.".concat(n,"ConfirmActionModal.").concat(l,".confirmButton")})})}})})]})]})})]})},gn=e=>{const a=(0,oa.A)(),{className:n,rootClassName:s,showButtons:t,primaryButtonProps:i,secondaryButtonProps:o,isListingDeleted:r,isProvider:l,transactionRole:d,processName:u,processState:m,transaction:g}=e;if(r&&l)return null;const{inProgress:p}=i||{},{inProgress:h}=o||{},v=p||h,y=c()(s||Qe.A.actionButtons,n);return t?(0,x.jsx)("div",{className:y,children:(0,x.jsxs)("div",{className:Qe.A.actionButtonWrapper,children:[(0,x.jsx)(mn,{buttonProps:i,id:"Primary",ButtonComponent:k.jn,buttonDisabled:v||(null===i||void 0===i?void 0:i.disabled),intl:a,transactionRole:d,processName:u,processState:m,transaction:g}),(0,x.jsx)(mn,{buttonProps:o,id:"Secondary",ButtonComponent:k.tA,buttonDisabled:v,intl:a,transactionRole:d,processName:u,processState:m,transaction:g})]})}):null},pn=e=>{const{className:a,rootClassName:n,showDispute:s,onOpenDisputeModal:t}=e,i=t?(0,x.jsx)(k.bG,{className:Qe.A.diminishedActionButton,onClick:t,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.disputeOrder"})}):null,o=c()(n||Qe.A.diminishedActionButtonRoot,a);return s?(0,x.jsx)("div",{className:o,children:i}):null};var hn=n(31156),vn=n(1434),yn=n(41904),fn=n(48314),bn=n(69215),_n=n(72500),xn=n(94199),Tn=n(63602),Pn=n(57873);const Nn="LocationFindBriefMaybe_root__WmnRf",jn="LocationFindBriefMaybe_list__YNvkn",An="LocationFindBriefMaybe_item__YEinY",Mn="LocationFindBriefMaybe_icon__QEsdz",Sn="LocationFindBriefMaybe_value__bPZhx",wn=Tn.PLACE_CATEGORIES.reduce((e,a)=>(e[a.key]=a,e),{});const Cn=function(e){var a,n,s,t,i,o;let{listing:r,protectedData:l={},className:d}=e;const c=(0,u._r)();if(!("location-find"===(null===r||void 0===r||null===(a=r.attributes)||void 0===a||null===(n=a.publicData)||void 0===n?void 0:n.categoryLevel1)))return null;const{footTraffic:m,locationArea:g,buildingTypes:p,machineType:h}=l;if(!m&&!g&&(null===p||void 0===p||!p.length)&&!h)return null;const v=(null===(o=((null===c||void 0===c||null===(s=c.listing)||void 0===s||null===(t=s.listingFields)||void 0===t||null===(i=t.find(e=>"machine_types_new"===e.key))||void 0===i?void 0:i.enumOptions)||[]).find(e=>e.option===h))||void 0===o?void 0:o.label)||h,y=Array.isArray(p)?p.map(e=>{var a;return(null===(a=wn[e])||void 0===a?void 0:a.label)||e}):[];return(0,x.jsx)("div",{className:d,children:(0,x.jsx)("div",{className:Nn,children:(0,x.jsxs)("ul",{className:jn,children:[m&&(0,x.jsxs)("li",{className:An,children:[(0,x.jsx)(bn.A,{size:14,className:Mn}),(0,x.jsx)("span",{className:Sn,children:(0,Pn.Up)(m)})]}),g&&(0,x.jsxs)("li",{className:An,children:[(0,x.jsx)(xa.A,{size:14,className:Mn}),(0,x.jsx)("span",{className:Sn,children:g})]}),y.length>0&&(0,x.jsxs)("li",{className:An,children:[(0,x.jsx)(_n.A,{size:14,className:Mn}),(0,x.jsx)("span",{className:Sn,children:y.join(", ")})]}),h&&v&&(0,x.jsxs)("li",{className:An,children:[(0,x.jsx)(xn.A,{size:14,className:Mn}),(0,x.jsx)("span",{className:Sn,children:v})]})]})})})};var In=n(6630),Dn=n(10216),En=n(68636),kn=n(8548);class Fn extends i.Component{constructor(e){super(e),this.state={sendMessageFormFocused:!1},this.isMobSaf=!1,this.sendMessageFormName="TransactionPanel.SendMessageForm",this.chatScrollRef=(0,i.createRef)(),this.onSendMessageFormFocus=this.onSendMessageFormFocus.bind(this),this.onSendMessageFormBlur=this.onSendMessageFormBlur.bind(this),this.onMessageSubmit=this.onMessageSubmit.bind(this),this.scrollToMessage=this.scrollToMessage.bind(this),this.scrollChatToBottom=this.scrollChatToBottom.bind(this)}componentDidMount(){var e,a;this.isMobSaf=(()=>
3{if(!window)return!1;const e=window.navigator.userAgent,a=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);return a&&n})();const n=null===(e=this.props.transaction)||void 0===e||null===(a=e.id)||void 0===a?void 0:a.uuid;n&&((0,$e.connectSocket)(),this.props.onSubscribeToMessages(n)),requestAnimationFrame(()=>this.scrollChatToBottom())}componentDidUpdate(e){var a,n,s,t,i,o,r,l;const d=null===(a=e.transaction)||void 0===a||null===(n=a.id)||void 0===n?void 0:n.uuid,c=null===(s=this.props.transaction)||void 0===s||null===(t=s.id)||void 0===t?void 0:t.uuid;c&&c!==d&&(d&&this.props.onUnsubscribeFromMessages(d),(0,$e.connectSocket)(),this.props.onSubscribeToMessages(c));const u=null!==(i=null===(o=e.messages)||void 0===o?void 0:o.length)&&void 0!==i?i:0;(null!==(r=null===(l=this.props.messages)||void 0===l?void 0:l.length)&&void 0!==r?r:0)>u&&this.scrollChatToBottom()}componentWillUnmount(){var e,a;const n=null===(e=this.props.transaction)||void 0===e||null===(a=e.id)||void 0===a?void 0:a.uuid;n&&this.props.onUnsubscribeFromMessages(n)}scrollChatToBottom(){const e=this.chatScrollRef.current;e&&(e.scrollTop=e.scrollHeight)}onSendMessageFormFocus(){this.setState({sendMessageFormFocused:!0}),this.isMobSaf&&setTimeout(()=>this.scrollChatToBottom(),300)}onSendMessageFormBlur(){this.setState({sendMessageFormFocused:!1})}onMessageSubmit(e,a){var n,s;const{onSendMessage:t,config:i}=this.props,o=e.message?e.message.trim():null,r=null===(n=this.props.transaction)||void 0===n||null===(s=n.id)||void 0===s?void 0:s.uuid;return o&&r?t(r,o,i).then(e=>(a&&a.reset(),this.scrollToMessage(e),e)).catch(()=>{}):Promise.resolve()}scrollToMessage(e){this.scrollChatToBottom()}renderTabContent(){return null}render(){var e,a,n,s,i,o,r,l,d,u,m,p,h,v,y,f,b,_,P,A,S,w,C,I,D,E,F,R,B,L,W,q,O,V,H,U,Y,z,G,Z,K,$,X,Q,J,ee,ae,ne,se,te;const{rootClassName:ie,className:oe,currentUser:re,transactionRole:le,transaction:de,listing:ce,customer:ue,provider:me,hasTransitions:ge,protectedData:pe,messages:he,initialMessageFailed:ve,savePaymentMethodFailed:ye,fetchMessagesError:fe,sendMessageInProgress:be,sendMessageError:_e,lastMessageFiltered:xe,onUploadAttachment:Te,onOpenDisputeModal:Pe,intl:Ne,stateData:je,showBookingLocation:Ae,activityFeed:Me,chatFeed:Se,isInquiryProcess:we,orderBreakdown:Ce,orderPanel:Ie,config:De,hasViewingRights:Ee,activeTab:ke,onTabChange:Fe,isRetiredInquiry:Re,onReportBlockSuccess:Be,onRefreshTransaction:Le,onReservationCleared:We,onAgreedToTerms:qe,needsPropertyInfoConsent:Oe,onOpenPropertyInfoConsentModal:Ve,onBuyAgain:$e}=this.props,ea="customer"===le,sa="provider"===le,oa=!(null===ce||void 0===ce||null===(e=ce.attributes)||void 0===e||!e.deleted),ra=!(null===ue||void 0===ue||null===(a=ue.attributes)||void 0===a||!a.banned),la=!(null===ue||void 0===ue||null===(n=ue.attributes)||void 0===n||!n.deleted),da=!(null===me||void 0===me||null===(s=me.attributes)||void 0===s||!s.banned),ca=!(null===me||void 0===me||null===(i=me.attributes)||void 0===i||!i.deleted),{authorDisplayName:ua,customerDisplayName:ma,otherUserDisplayNameString:ga}=((e,a,n,s)=>{var t,i;const o=(0,x.jsx)(k.fs,{user:a,intl:s}),r=(0,x.jsx)(k.fs,{user:n,intl:s});let l="",d="";const c=e.id&&(null===n||void 0===n?void 0:n.id)&&e.id.uuid===(null===n||void 0===n||null===(t=n.id)||void 0===t?void 0:t.uuid),u=e.id&&(null===a||void 0===a?void 0:a.id)&&e.id.uuid===(null===a||void 0===a||null===(i=a.id)||void 0===i?void 0:i.uuid);return c?(l=o,d=(0,Ue._l)(a,"")):u&&(l=r,d=(0,Ue._l)(n,"")),{authorDisplayName:o,customerDisplayName:r,otherUserDisplayName:l,otherUserDisplayNameString:d}})(re,me,ue,Ne),pa=Ne.formatMessage({id:"TransactionPanel.deletedListingTitle"}),ha=oa?pa:null===ce||void 0===ce||null===(o=ce.attributes)||void 0===o?void 0:o.title,va=(null===ce||void 0===ce||null===(r=ce.images)||void 0===r?void 0:r.length)>0?null===ce||void 0===ce?void 0:ce.images[0]:null,ya=(0,x.jsx)(gn,{showButtons:je.showActionButtons,primaryButtonProps:null===je||void 0===je?void 0:je.primaryButtonProps,secondaryButtonProps:null===je||void 0===je?void 0:je.secondaryButtonProps,isListingDeleted:oa,isProvider:sa,transactionRole:le,processName:null===je||void 0===je?void 0:je.processName,processState:null===je||void 0===je?void 0:je.processState,transaction:de}),fa=null===ce||void 0===ce||null===(l=ce.attributes)||void 0===l||null===(d=l.publicData)||void 0===d?void 0:d.listingType,ba=De.listing.listingTypes.find(e=>e.listingType===fa),_a=we&&(0,He.OX)(ba),xa=sa?null===ue||void 0===ue||null===(u=ue.id)||void 0===u?void 0:u.uuid:null===me||void 0===me||null===(m=me.id)||void 0===m?void 0:m.uuid,Ta=sa?ue:me,Pa=!(0,En.of)(re,xa),Na=(0,En.B7)(Ta),ja=!ra&&!la&&!da&&!ca&&!Pa&&!Na,Aa=je.showOrderPanel&&Ee,Ma=je.showDetailCardHeadings||
3!Ee,Sa=1===(null===de||void 0===de||null===(p=de.attributes)||void 0===p||null===(h=p.transitions)||void 0===h?void 0:h.length)&&"transition/inquire"===(null===de||void 0===de||null===(v=de.attributes)||void 0===v||null===(y=v.transitions[0])||void 0===y?void 0:y.transition),wa=ge,{deliveryMethod:Ca="none",managerAddress:Ia}=pe,Da=c()(ie||Qe.A.root,oe);return(0,x.jsxs)("div",{className:Da,children:[((null===je||void 0===je?void 0:je.processName)===Ge.SELL_PURCHASE_PROCESS_NAME||(null===je||void 0===je?void 0:je.processName)===Ze.SELL_7DAYS_PROCESS_NAME)&&!Re&&(0,x.jsx)("div",{className:c()(Qe.A.progressBarWrapper,Qe.A[ke]),children:(0,x.jsx)(fn.A,{steps:ea?Ke.cL:Ke.b0,stateData:je,categoryLevel1:null===ce||void 0===ce||null===(f=ce.attributes)||void 0===f||null===(b=f.publicData)||void 0===b?void 0:b.categoryLevel1})}),(0,x.jsxs)("div",{className:Qe.A.container,children:[(0,x.jsxs)("div",{className:c()(Qe.A.txInfo,Qe.A[ke]),children:[(0,x.jsxs)("div",{className:Qe.A.desktopHeadingElements,children:[(0,x.jsx)(na,{rootClassName:Qe.A.imageWrapperMobile,avatarWrapperClassName:Qe.A.avatarWrapperMobile,listingTitle:ha,image:va,provider:me,isCustomer:ea,listingImageConfig:De.layout.listingImage}),sa?(0,x.jsx)("div",{className:Qe.A.avatarWrapperProviderDesktop,children:(0,x.jsx)(k.Bz,{user:ue,className:Qe.A.avatarDesktop})}):null,(0,x.jsx)(ta,{protectedData:pe,showInquiryMessage:we,isCustomer:ea})]}),(0,x.jsx)(hn.A,{processName:je.processName,processState:je.processState,showExtraInfo:je.showExtraInfo,showPriceOnMobile:_a,price:null===ce||void 0===ce||null===(_=ce.attributes)||void 0===_?void 0:_.price,intl:Ne,deliveryMethod:Ca,isPendingPayment:!!je.isPendingPayment,transactionRole:le,providerName:ua,customerName:ma,customer:ue,provider:me,transactionId:null===de||void 0===de||null===(P=de.id)||void 0===P?void 0:P.uuid,currentUser:re,isCustomerBanned:ra,listingId:null===ce||void 0===ce||null===(A=ce.id)||void 0===A?void 0:A.uuid,listingTitle:ha,listingDeleted:oa,listing:ce,nextStepTranslationId:je.nextStepTranslationId,showPayoutOnHold:!!je.showPayoutOnHold,lastCustomTransition:je.lastCustomTransition,transaction:de,onReportBlockSuccess:Be}),(0,x.jsx)(N,{activeTab:ke,onTabChange:Fe,children:this.renderTabContent()}),(0,x.jsxs)("div",{className:c()(Qe.A.tabContentDetails,{[Qe.A.tabContentVisible]:ke===T.DETAILS}),children:[(0,x.jsxs)("div",{className:Qe.A.mobileHeadingElements,children:[(0,x.jsx)(na,{rootClassName:Qe.A.imageWrapperMobile,avatarWrapperClassName:Qe.A.avatarWrapperMobile,listingTitle:ha,image:va,provider:me,isCustomer:ea,listingImageConfig:De.layout.listingImage}),sa?(0,x.jsx)("div",{className:Qe.A.avatarWrapperProviderDesktop,children:(0,x.jsx)(k.Bz,{user:ue,className:Qe.A.avatarDesktop})}):null]}),!we&&(0,x.jsxs)("div",{className:Qe.A.orderDetails,children:[(0,x.jsxs)("div",{className:Qe.A.orderDetailsMobileSection,children:[(null===je||void 0===je?void 0:je.isCanceled)&&"sell"===(null===ce||void 0===ce||null===(S=ce.attributes)||void 0===S||null===(w=S.publicData)||void 0===w?void 0:w.listingType)&&(0,Ye.Bw)(ce)&&(null!==(C=null===ce||void 0===ce||null===(I=ce.currentStock)||void 0===I||null===(D=I.attributes)||void 0===D?void 0:D.quantity)&&void 0!==C?C:0)>0&&(0,x.jsx)("div",{className:Qe.A.reservationBannerMobile,children:(0,x.jsx)(ze.A,{listing:ce,currentUser:re,customer:ue,intl:Ne,onReservationCleared:We})}),(null===je||void 0===je?void 0:je.isCanceled)&&ea&&"sell"===(null===ce||void 0===ce||null===(E=ce.attributes)||void 0===E||null===(F=E.publicData)||void 0===F?void 0:F.listingType)&&!oa&&(null===ce||void 0===ce||null===(R=ce.attributes)||void 0===R?void 0:R.state)!==j.iz&&(null!==(B=null===ce||void 0===ce||null===(L=ce.currentStock)||void 0===L||null===(W=L.attributes)||void 0===W?void 0:W.quantity)&&void 0!==B?B:0)>0&&(0,Ye.n_)(ce,null===re||void 0===re||null===(q=re.id)||void 0===q?void 0:q.uuid)&&$e&&(0,x.jsx)(k.jn,{className:Qe.A.buyAgainButtonMobile,onClick:$e,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.buyAgain"})}),(0,x.jsx)(Je,{orderBreakdown:Ce,processName:je.processName,extraContent:(0,x.jsx)(Cn,{listing:ce,protectedData:pe})}),sa&&(0,x.jsx)("div",{className:Qe.A.noteContainer,children:(0,x.jsx)(vn.A,{componentId:"TransactionDetail
3sPage"})}),(0,x.jsx)(pn,{showDispute:je.showDispute,onOpenDisputeModal:Pe})]}),ye?(0,x.jsx)("p",{className:Qe.A.genericError,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.savePaymentMethodFailed",values:{paymentMethodsPageLink:(0,x.jsx)(k.GF,{name:"PaymentMethodsPage",children:(0,x.jsx)(g.sA,{id:"TransactionPanel.paymentMethodsPageLink"})})}})}):null]})]}),(null===je||void 0===je?void 0:je.processName)===Ge.SELL_PURCHASE_PROCESS_NAME&&(null===je||void 0===je?void 0:je.showRefundAvailabileNotice)&&ke===T.DETAILS&&(0,x.jsxs)("p",{className:Qe.A.refundAvailableNotice,children:[(0,x.jsx)("span",{className:Qe.A.refundAvailableNoticeTitle,children:(0,x.jsx)(g.sA,{id:"NoticeRefundAvailable.title"})}),(0,x.jsx)(g.sA,{id:"NoticeRefundAvailable.content"})]}),je.showActionButtons&&ke!==T.CHAT?(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{className:Qe.A.mobileActionButtons,children:ya})}):null,(0,x.jsxs)("div",{className:c()(Qe.A.tabContentChat,{[Qe.A.tabContentVisible]:ke===T.CHAT}),children:[(0,x.jsx)("div",{ref:this.chatScrollRef,className:Qe.A.chatScrollArea,children:Se}),ja?(0,x.jsxs)("div",{className:Qe.A.chatFormWrapper,children:[xe&&(0,x.jsxs)("div",{className:Qe.A.filteredWarning,children:[(0,x.jsx)(kn.A,{className:"small"}),(0,x.jsx)(g.sA,{id:"TransactionPanel.contactInfoRemoved"})]}),(0,x.jsx)(Xe.A,{formId:this.sendMessageFormName,rootClassName:Qe.A.sendMessageForm,messagePlaceholder:Ne.formatMessage({id:"TransactionPanel.sendMessagePlaceholder"},{name:ga}),replyTemplateContext:(0,yn.UI)({otherUserName:ga,listingTitle:ha,protectedData:pe,listing:ce}),showReplyTemplates:sa,inProgress:be,sendMessageError:_e,onFocus:this.onSendMessageFormFocus,onBlur:this.onSendMessageFormBlur,onSubmit:this.onMessageSubmit,transactionId:null===de||void 0===de||null===(O=de.id)||void 0===O?void 0:O.uuid,onUploadAttachment:Te?e=>Te((0,t.A)((0,t.A)({},e),{},{config:De})):null})]}):(0,x.jsx)("div",{className:Qe.A.sendingMessageNotAllowed,children:(0,x.jsx)(g.sA,{id:Pa||Na?"TransactionPanel.sendingMessageBlocked":"TransactionPanel.sendingMessageNotAllowed"})})]}),(0,x.jsx)("div",{className:c()(Qe.A.tabContentActivity,{[Qe.A.tabContentVisible]:ke===T.ACTIVITY}),children:wa&&!Sa?(0,x.jsx)(ia,{rootClassName:Qe.A.feedContainer,hasMessages:he.length>0,hasTransitions:ge,fetchMessagesError:fe,initialMessageFailed:ve,activityFeed:Me,isConversation:we}):(0,x.jsx)("div",{className:Qe.A.feedContainer,children:(0,x.jsx)("div",{className:Qe.A.noActivityMessage,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.noActivityYet"})})})}),(0,x.jsx)("div",{className:c()(Qe.A.tabContentLocation,{[Qe.A.tabContentVisible]:ke===T.LOCATION}),children:(0,x.jsx)(Ra,{protectedData:pe,stateData:je,transaction:de,transactionRole:le,currentUser:re,onRefreshTransaction:Le,onAgreedToTerms:qe,needsPropertyInfoConsent:Oe,onOpenPropertyInfoConsentModal:Ve,className:Qe.A.managerInfoSection,headingClassName:Qe.A.sectionHeading})}),!sa&&ke!==T.CHAT&&(0,x.jsx)(In.A,{user:ue,varient:"transaction",address:Ia||(null===ce||void 0===ce||null===(V=ce.attributes)||void 0===V||null===(H=V.publicData)||void 0===H||null===(U=H.location)||void 0===U?void 0:U.address)}),ke!==T.CHAT&&(0,x.jsxs)("div",{className:Qe.A.faqsContainer,children:[(0,x.jsx)(k.H4,{as:"h2",className:Qe.A.faqsTitle,children:(0,x.jsx)(g.sA,{id:"TransactionPage.faqsTitle"})}),(0,x.jsx)(Dn.A,{audience:"all",category:"transaction"})]})]}),(0,x.jsx)("div",{className:Qe.A.asideDesktop,children:(0,x.jsxs)("div",{className:Qe.A.stickySection,children:[(0,x.jsxs)("div",{className:Qe.A.detailCard,children:[(0,x.jsx)(na,{avatarWrapperClassName:Qe.A.avatarWrapperDesktop,listingTitle:ha,image:va,provider:me,isCustomer:ea,listingImageConfig:De.layout.listingImage}),(0,x.jsx)(aa,{showDetailCardHeadings:Ma,listingTitle:oa?ha:(0,x.jsx)(k.GF,{name:"ListingPage",params:{id:null===(Y=ce.id)||void 0===Y?void 0:Y.uuid,slug:(0,M.e9)(ha)},children:ha}),showPrice:_a,price:null===ce||void 0===ce||null===(z=ce.attributes)||void 0===z?void 0:z.price,intl:Ne}),(0,x.jsxs)("div",{className:Qe.A.reservationAndBuyAgainDesktop,children:[(null===je||void 0===je?void 0:je.isCanceled)&&"sell"===(null===ce||void 0===ce||null===(G=ce.attributes)||void 0===G||null===(Z=G.publicData)||void 0===Z?void 0:Z.listingType)&&(0,Ye.Bw)(ce)&&(null!==(K=null===ce||void 0===ce||null===($=ce.currentStock)||void 0===$||null===(X=$.attributes)||void 0===X?void 0:X.quantity)&&void 0!==K?K:0)>0&&(0,x.jsx)("div",{className:Qe.A.reservationBannerWrapper,children:(0,x.jsx)(ze.A,{listing:ce,currentUser:re,customer:ue,intl:Ne,onReservationCleared:We})}),(null===je||void 0===je?void 0:je.isCanceled)&&ea&&"sell"===(null===ce||void 0===ce||null===(Q=ce.attributes)||void 0===Q||null===(J=Q.publicData)||void 0===J?void 0:J.listingType)&&!oa&&(null===ce||void 0===ce||null===(ee=ce.attributes)||void 0===ee?void 0:ee.state)!==j.iz&&(null!==(ae=null===ce||void 0===ce||null===(ne=ce.currentStock)||void 0===ne||null===(se=ne.attributes)||void 0===se?void 0:se.quantity)&&void 0!==ae?ae:0)>0&&(0,Ye.n_)(ce,null===re||void 0===re||null===(te=re.id)||void 0===te?void 0:te.uuid)&&$e&&(0,x.jsx)(k.jn,{className:Qe.A.buyAgainButton,onClick:$e,children:(0,x.jsx)(g.sA,{id:"TransactionPanel.buyAgain"})})]}),Aa?(0,x.jsx)("div",{className:c()(Qe.A.orderPanelWrapper,Qe.A[ke]),children:Ie}):null,(0,x.jsx)(Je,{className:Qe.A.breakdownContainer,orderBreakdown:Ce,processName:je.processName,extraContent:(0,x.jsx)(Cn,{listing:ce,protectedData:pe})}),je.showActionButtons?(0,x.jsx)("div",{className:Qe.A.desktopActionButtons,children:ya}):null]}),sa&&(0,x.jsx)("div",{className:c()(Qe.A.noteContainer,Qe.A.hideOnMobile),children:(0,x.jsx)(vn.A,{componentId:"TransactionDetail
3sPage"})}),(0,x.jsx)(pn,{showDispute:je.showDispute,onOpenDisputeModal:Pe})]})})]})]})}}Fn.defaultProps={rootClassName:null,className:null,currentUser:null,listing:null,customer:null,provider:null,hasTransitions:!1,fetchMessagesError:null,initialMessageFailed:!1,savePaymentMethodFailed:!1,sendMessageError:null,sendReviewError:null,stateData:{},activityFeed:null,chatFeed:null,showBookingLocation:!1,orderBreakdown:null,orderPanel:null,activeTab:T.DETAILS,onTabChange:null,onReportBlockSuccess:null,needsPropertyInfoConsent:!1,onOpenPropertyInfoConsentModal:null,onBuyAgain:null};const Rn=(0,g.j4)(Fn);var Bn=n(48243);const Ln="PartialRefundSummary_root__wguOM",Wn="PartialRefundSummary_message__tpTC3",{Money:qn}=Bn.gK,On=e=>{var a,n;const{transaction:s,userRole:i,intl:o}=e,{payinTotal:r,payoutTotal:l,metadata:d={}}=(null===s||void 0===s?void 0:s.attributes)||{},c=null!==(a=d.refundAmount)&&void 0!==a?a:null===l||void 0===l?void 0:l.amount,u=(null===r||void 0===r?void 0:r.currency)||(null===l||void 0===l?void 0:l.currency)||"USD";if(!c||c<=0)return null;const m=new qn(c,u),p=(0,ea.up)(o,m),h={ul:e=>(0,x.jsx)("ul",{className:Wn,children:e}),li:e=>(0,x.jsx)("li",{children:e})};if("provider"===i)return(0,x.jsx)("div",{className:Ln,children:(0,x.jsx)(g.sA,{id:"PartialRefundSummary.providerMessage",values:(0,t.A)({refundAmount:p},h)})});const v=null!==(n=null===r||void 0===r?void 0:r.amount)&&void 0!==n?n:0,y=Math.max(0,v-c),f=new qn(y,u),b=(0,ea.up)(o,f);return(0,x.jsx)("div",{className:Ln,children:(0,x.jsx)(g.sA,{id:"PartialRefundSummary.customerMessage",values:(0,t.A)({refundAmount:p,finalCharge:b},h)})})},Vn="DisputeLostSummary_root__XycYG",Hn="DisputeLostSummary_message__ID2iC",Un=e=>{const{userRole:a}=e,n={ul:e=>(0,x.jsx)("ul",{className:Hn,children:e}),li:e=>(0,x.jsx)("li",{children:e})},s="provider"===a?"DisputeLostSummary.providerMessage":"DisputeLostSummary.customerMessage";return(0,x.jsx)("div",{className:Vn,children:(0,x.jsx)(g.sA,{id:s,values:n})})};var Yn=n(53696),zn=n(56761),Gn=n(19239),Zn=n(88743);const Kn="TransactionPage_root__1v+zz",$n="TransactionPage_loading__-y40I",Xn="TransactionPage_error__VLeh1 TransactionPage_loading__-y40I",Qn="TransactionPage_tabContent__SGH+n",Jn="TransactionPage_tabContentVisible__NUgLp",es="TransactionPage_breakdown__ny9NF",as="TransactionPage_orderPanel__S0d49",ns="TransactionPage_orderTitle__Fr1Iz",ss="TransactionPage_orderPanelTitle__mW7Ch",ts="TransactionPage_legacyProcessBanner__APG9B",is="TransactionPage_legacyProcessText__p5eM+",os="TransactionPage_visitListingLink__zX0CR buttonPrimaryInline",rs=["bookingDates","bookingStartTime","bookingEndTime","quantity","deliveryMethod"],ls=(e,a,n,s,t,i)=>async t=>{const{disputeReason:o}=t,r=o?{protectedData:{disputeReason:o}}:{};try{await n(e,a,r),s(!0),(0,Za.tP)({titleId:"TransactionPage.sell-purchase.dispute.toastTitle",contentId:"TransactionPage.sell-purchase.dispute.toastContent",intl:i})}catch(l){console.error(l)}},ds=e=>{var a,n,o,r,l,d,h,v,y,f,b,_,P,N,C,I,D,E,L,W,q,O,V,H,U,Y,z,G,Z,K,$,X,Q;const[ee,ae]=(0,i.useState)(!1),[ne,se]=(0,i.useState)(!1),[te,ie]=(0,i.useState)(!1),[oe,re]=(0,i.useState)(!1),[le,de]=(0,i.useState)(null),[ce,ue]=(0,i.useState)(!1),[me,ge]=(0,i.useState)(!1),[pe,he]=(0,i.useState)(null),ve=(0,u._r)(),fe=(0,m.Z6)(),{currentUser:be,initialMessageFailedToTransaction:_e,savePaymentMethodFailed:xe,fetchMessagesError:Te,fetchMessagesInProgress:Pe,totalMessagePages:Ne,oldestMessagePageFetched:je,fetchTransactionError:Ae,history:Me,intl:Se,messages:we,onManageDisableScrolling:Ie,onSendMessage:De,onSendReview:Ee,onShowMoreMessages:ke,params:Fe,scrollingDisabled:Re,sendMessageError:Be,sendMessageInProgress:Le,lastMessageFiltered:We,sendReviewError:qe,sendReviewInProgress:Oe,transaction:He,transactionRole:Ue,transitionInProgress:Ye,transitionError:ze,transitionErrorName:Ge,onTransition:Ke,onFinalizeWithSignature:$e,onUpdateProgressSellPurchase:Xe,onInitiateDisputeSellPurchase:Qe,onSubscribeToMessages:Je,onUnsubscribeFromMessages:ea,onUploadAttachment:aa,onReportBlockSuccess:na,onRefreshTransaction:sa,onAgreedToTerms:ta,monthlyTimeSlots:ia,onFetchTimeSlots:oa,nextTransitions:ra,callSetInitialValues:la,onInitializeCardPaymentData:da,onFetchTransactionLineItems:ca,lineItems:ua,fetchLineItemsInProgress:ma,fetchLineItemsError:ga,convertListingPrice:pa,uiCurrency:ha}=e,va=()=>window.innerWidth>=1024?T.CHAT:T.DETAILS,ya=le||(Fe.tab&&Object.values(T).includes(Fe.tab)?Fe.tab:va()),fa=2===(null===He||void 0===He||null===(a=He.attributes)||void 0===a||null===(n=a.transitions)||void 0===n?void 0:n.length)&&"transition/inquire"===(null===He||void 0===He||null===(o=He.attributes)||void 0===o||null===(r=o.transitions[0])||void 0===r?void 0:r.transition)&&"transition/expire-payment"===(null===He||void 0===He||null===(l=He.attributes)||void 0===l||null===(d=l.transitions[1])||void 0===d?void 0:d.transition);(0,i.useEffect)(()=>
3{if(!le&&Fe.tab&&Object.values(T).includes(Fe.tab)){const e=Fe.tab===T.DETAILS&&window.innerWidth>=1024?T.CHAT:Fe.tab;de(e)}else if(!le&&!Fe.tab){const e=va();de(e);const a=Fe.id,n="customer"===Ue?"OrderDetailsPageWithTab":"SaleDetailsPageWithTab";Me.replace((0,p.__)(n,fe,{id:a,tab:e}))}},[le,Fe.tab,Fe.id,Ue,fe,Me]),(0,i.useEffect)(()=>{const e=setTimeout(()=>{ya===T.CHAT&&"undefined"!==typeof OpenWidget&&OpenWidget.call("hide")},1e3);return()=>clearTimeout(e)},[]),(0,i.useEffect)(()=>{if((0,S.JK)()&&ya===T.CHAT)return document.documentElement.classList.add("native-app-chat-open"),()=>document.documentElement.classList.remove("native-app-chat-open")},[ya]);const{listing:ba,provider:_a,customer:xa,booking:Ta}=He||{},Pa=(null===He||void 0===He||null===(h=He.attributes)||void 0===h?void 0:h.transitions)||[],Na=Ue===w.NQ,ja=Ue===w.CG,Aa=(0,w.GN)(null===He||void 0===He||null===(v=He.attributes)||void 0===v?void 0:v.processName);let Ma=null;try{Ma=Aa?(0,w.wz)(Aa):null}catch(nn){}const Sa=(e,a)=>{const{setInitialValues:n}=(0,p.yY)("CheckoutPage",fe);la(n,e),da(),Me.push((0,p.__)("CheckoutPage",fe,{id:a.id.uuid,slug:(0,M.e9)(a.attributes.title)},{}))};if(null!==He&&void 0!==He&&He.id&&(wa=He,Ma&&Ma.getState(wa)===Ma.states.PENDING_PAYMENT)&&ja&&He.attributes.lineItems){Sa({listing:ba,transaction:He,orderData:{}},ba)}var wa;const Ca=()=>{ie(!0)},Ia=Se.formatMessage({id:"TransactionPage.deletedListing"}),Da=null===ba||void 0===ba||null===(y=ba.attributes)||void 0===y?void 0:y.deleted,Ea=Da?Ia:null===ba||void 0===ba||null===(f=ba.attributes)||void 0===f?void 0:f.title,ka=Ma&&be&&(null===He||void 0===He?void 0:He.id)&&(null===He||void 0===He||null===(b=He.id)||void 0===b?void 0:b.uuid)===Fe.id&&(null===He||void 0===He||null===(_=He.attributes)||void 0===_?void 0:_.lineItems)&&He.customer&&He.provider&&!Ae,Fa=ka&&Na&&be.id.uuid===(null===_a||void 0===_a||null===(P=_a.id)||void 0===P?void 0:P.uuid),Ra=ka&&ja&&be.id.uuid===(null===xa||void 0===xa||null===(N=xa.id)||void 0===N?void 0:N.uuid);if(ka&&Na&&!Fa)return console.error("Tried to access a sale that was not owned by the current user"),(0,x.jsx)(k.M0,{name:"InboxPage",params:{tab:"sales"}});if(ka&&ja&&!Ra)return console.error("Tried to access an order that was not owned by the current user"),(0,x.jsx)(k.M0,{name:"InboxPage",params:{tab:"orders"}});const Ba=c()(Qn,Jn),La=ja?"TransactionPage.fetchOrderFailed":"TransactionPage.fetchSaleFailed",Wa=ja?"TransactionPage.loadingOrderData":"TransactionPage.loadingSaleData",qa=Ae?(0,x.jsx)("p",{className:Xn,children:(0,x.jsx)(g.sA,{id:"".concat(La)})}):He&&!Ma?(0,x.jsx)("div",{className:Xn,children:(0,x.jsx)(g.sA,{id:"TransactionPage.unknownTransactionProcess"})}):(0,x.jsxs)("div",{className:$n,children:[(0,x.jsx)(g.sA,{id:"".concat(Wa)}),(0,x.jsx)(k.X1,{})]}),Oa=!(!_e||_e.uuid!==(null===He||void 0===He||null===(C=He.id)||void 0===C?void 0:C.uuid)),Va=Ra?(0,x.jsx)(k.fs,{user:_a,intl:Se}):(0,x.jsx)(k.fs,{user:xa,intl:Se}),Ha=ka?(0,R.W)({transaction:He,transactionRole:Ue,nextTransitions:ra,transitionInProgress:Ye,transitionError:ze,transitionErrorName:Ge,sendReviewInProgress:Oe,sendReviewError:qe,onTransition:Ke,onFinalizeWithSignature:$e,onUpdateProgressSellPurchase:Xe,onInitiateDisputeSellPurchase:Qe,onOpenReviewModal:Ca,intl:Se,config:ve},Ma):{},Ua=Aa===Ze.SELL_7DAYS_PROCESS_NAME&&"customer"===Ue&&(0,Yn.C)(null===He||void 0===He||null===(I=He.attributes)||void 0===I?void 0:I.protectedData)&&!(null!==Ha&&void 0!==Ha&&Ha.isCanceled)&&!(null!==He&&void 0!==He&&null!==(D=He.attributes)&&void 0!==D&&null!==(E=D.metadata)&&void 0!==E&&E.buyerAgreedToPropertyInfoTerms);(0,i.useEffect)(()=>{Ua&&ue(!0)},[Ua]);const Ya=(null===He||void 0===He||null===(L=He.attributes)||void 0===L||null===(W=L.lineItems)||void 0===W?void 0:W.length)>0,za=Ya?null===(q=He.attributes)||void 0===q||null===(O=q.lineItems)||void 0===O?void 0:O.find(e=>j.gB.includes(e.code)&&!e.reversal):null,Ga=za?za.code:ka?((e,a)=>{var n,s,t,i;const o=null===e||void 0===e||null===(n=e.attributes)||void 0===n||null===(s=n.protectedData)||void 0===s?void 0:s.unitType,r=null===a||void 0===a||null===(t=a.attributes)||void 0===t||null===(i=t.publicData)||void 0===i?void 0:i.unitType;return"line-item/".concat(o||r)})(He,ba):null,Za=null===ba||void 0===ba||null===(V=ba.attributes)||void 0===V||null===(H=V.availabilityPlan)||void 0===H?void 0:H.timezone,Ka=Ga===j.er?j.ko:j.bC,$a=be&&(0,Zn.wJ)(be),Xa=null!==Ta&&void 0!==Ta&&Ta.id?{booking:Ta,dateType:Ka,timeZone:Za}:{},Qa=Ya?{orderBreakdown:(0,Ze.isPartialRefund)(He)?(0,x.jsx)(On,{transaction:He,userRole:Ue,intl:Se}):(0,Ze.isDisputeLost)(He)?(0,x.jsx)(Un,{transaction:He,userRole:Ue,intl:Se}):(0,x.jsx)(k.Qs,(0,t.A)((0,t.A)({className:es,userRole:Ue,transaction:He},Xa),{},{currency:ve.currency,marketplaceName:ve.marketplaceName}))}:{},Ja=(0,w.zn)(Ha.processName)&&(null===(U=Ma)||void 0===U?void 0:U.hasPassedState(null===(Y=Ma)||void 0===Y||null===(z=Y.states)||void 0===z?void 0:z.ACCEPTED,He)),en=ka?(0,x.jsx)(Rn,(0,t.A)((0,t.A)({className:Ba,currentUser:be,transactionId:null===He||void 0===He?void 0:He.id,listing:ba,customer:xa,provider:_a,hasTransitions:Pa.length>0,protectedData:null===He||void 0===He||null===(G=He.attributes)||void 0===G?void 0:G.protectedData,messages:we,initialMessageFailed:Oa,savePaymentMethodFailed:xe,fetch
3MessagesError:Te,sendMessageInProgress:Le,sendMessageError:Be,lastMessageFiltered:We,onSendMessage:De,onSubscribeToMessages:Je,onUnsubscribeFromMessages:ea,onUploadAttachment:aa,onOpenDisputeModal:()=>{ae(!0)},stateData:Ha,transactionRole:Ue,transaction:He,showBookingLocation:Ja,hasViewingRights:$a,onReportBlockSuccess:na,activeTab:ya,onTabChange:e=>{de(e),"chat"===e?(window.scrollTo({top:0,behavior:"smooth"}),"undefined"!==typeof OpenWidget&&OpenWidget.call("hide")):"undefined"!==typeof OpenWidget&&OpenWidget.call("minimize");const a=Fe.id,n="customer"===Ue?"OrderDetailsPageWithTab":"SaleDetailsPageWithTab",s=(0,p.__)(n,fe,{id:a,tab:e});window.history.replaceState(null,"",s)},isRetiredInquiry:fa,onRefreshTransaction:He&&ve?()=>sa(He.id,Ue,ve):void 0,onReservationCleared:He&&ve?()=>sa(He.id,Ue,ve):void 0,onAgreedToTerms:ta,needsPropertyInfoConsent:Ua,onOpenPropertyInfoConsentModal:()=>ue(!0),onBuyAgain:()=>{var e,a,n,s;const i=null===He||void 0===He||null===(e=He.attributes)||void 0===e||null===(a=e.lineItems)||void 0===a?void 0:a.find(e=>e.code===j.jI&&!e.reversal),o=null===i||void 0===i?void 0:i.quantity,r="number"===typeof o?o:"function"===typeof(null===o||void 0===o?void 0:o.toNumber)?o.toNumber():void 0,l=(0,t.A)({quantity:Number.isInteger(r)&&r>=1?r:1},(null===He||void 0===He||null===(n=He.attributes)||void 0===n||null===(s=n.protectedData)||void 0===s?void 0:s.deliveryMethod)&&{deliveryMethod:He.attributes.protectedData.deliveryMethod});Sa({listing:ba,orderData:l},ba)},activityFeed:(0,x.jsx)(B.A,{messages:we,transaction:He,stateData:Ha,intl:Se,currentUser:be,hasOlderMessages:Ne>je&&!Pe,onOpenReviewModal:Ca,onShowOlderMessages:()=>ke(He.id,ve),fetchMessagesInProgress:Pe,showTransitionsOnly:!0}),chatFeed:(0,x.jsx)(B.A,{messages:we,transaction:He,stateData:Ha,intl:Se,currentUser:be,hasOlderMessages:Ne>je&&!Pe,onOpenReviewModal:Ca,onShowOlderMessages:()=>ke(He.id,ve),fetchMessagesInProgress:Pe}),isInquiryProcess:Aa===w.Gd,config:ve},Qa),{},{orderPanel:(0,x.jsx)(k.r6,{className:as,titleClassName:ns,listing:pa(ba),isOwnListing:Fa,customer:xa,lineItemUnitType:Ga,title:Ea,titleDesktop:(0,x.jsx)(k.H4,{as:"h2",className:ss,children:Da?Ea:(0,x.jsx)(k.GF,{name:"ListingPage",params:{id:null===(Z=ba.id)||void 0===Z?void 0:Z.uuid,slug:(0,M.e9)(Ea)},children:Ea})}),author:_a,currentUser:be,hasUserPastTransactions:ja,onSubmit:e=>{const{bookingDates:a,bookingStartTime:n,bookingEndTime:i,quantity:o,deliveryMethod:r}=e,l=(0,s.A)(e,rs),d=a?{bookingDates:{bookingStart:a.startDate,bookingEnd:a.endDate}}:n&&i?{bookingDates:{bookingStart:(0,A.kU)(n),bookingEnd:(0,A.kU)(i)}}:{},c=Number.parseInt(o,10),u=Number.isInteger(c)?{quantity:c}:{},m=r?{deliveryMethod:r}:{},g={listing:ba,transaction:He,orderData:(0,t.A)((0,t.A)((0,t.A)((0,t.A)({},d),u),m),l),confirmPaymentError:null};Sa(g,ba)},onManageDisableScrolling:Ie,onFetchTimeSlots:oa,monthlyTimeSlots:ia,onFetchTransactionLineItems:ca,lineItems:ua,fetchLineItemsInProgress:ma,fetchLineItemsError:ga,validListingTypes:ve.listing.listingTypes,marketplaceCurrency:ha,dayCountAvailableForBooking:ve.stripe.dayCountAvailableForBooking,marketplaceName:ve.marketplaceName,showCurrencyNotify:!1,listingCategoryConfigs:ve.categoryConfiguration,isRetiredInquiry:fa,onReservationCleared:He&&ve?()=>sa(He.id,Ue,ve):void 0})})):qa,an="sell-purchase"===Aa&&(null===Ha||void 0===Ha?void 0:Ha.showActionButtons);return(0,x.jsx)(k.YW,{title:Se.formatMessage({id:"TransactionPage.schemaTitle"},{title:Ea}),scrollingDisabled:Re,children:(0,x.jsxs)(k.JI,{topbar:(0,x.jsx)(F.A,{}),children:[(fa||an)&&(0,x.jsx)("div",{className:ts,children:(0,x.jsx)("div",{className:is,children:fa?(0,x.jsxs)("div",{children:[(0,x.jsx)("h3",{children:"Your inquiry timed out."}),(0,x.jsx)("p",{children:"You can continue messaging the seller."}),(0,x.jsx)("p",{children:'When you\'re ready to purchase, please visit the listing page and click "buy now". An active Pro membership is required to purchase.'}),(0,x.jsx)(k.GF,{className:os,name:"ListingPage",params:{id:null===(K=ba.id)||void 0===K?void 0:K.uuid,slug:(0,M.e9)(Ea)},children:"Visit listing"})]}):(0,x.jsx)(g.sA,{id:"TransactionPage.legacyProcessBanner",values:{processLink:(0,x.jsx)("a",{href:"/p/legacy-transaction-process",children:"Legacy Process"}),termsLink:(0,x.jsx)(k.GF,{name:"TermsOfServicePage",children:Se.formatMessage({id:"TransactionPage.legacyProcessBannerTermsLink"})})}})})}),(0,x.jsx)("div",{className:Kn,children:en}),(0,x.jsx)(Ve,{id:"ReviewOrderModal",isOpen:te,onCloseModal:()=>ie(!1),onManageDisableScrolling:Ie,onSubmitReview:async e=>{const{reviewRating:a,reviewContent:n}=e,s=Number.parseInt(a,10),{states:t,transitions:i}=Ma,o=Ue===w.CG?{reviewAsFirst:i.REVIEW_1_BY_CUSTOMER,reviewAsSecond:i.REVIEW_2_BY_CUSTOMER,hasOtherPartyReviewedFirst:Ma.getTransitionsToStates([t.REVIEWED_BY_PROVIDER]).includes(He.attributes.lastTransition)}:{reviewAsFirst:i.REVIEW_1_BY_PROVIDER,reviewAsSecond:i.REVIEW_2_BY_PROVIDER,hasOtherPartyReviewedFirst:Ma.getTransitionsToStates([t.REVIEWED_BY_CUSTOMER]).includes(He.attributes.lastTransition)},r={reviewRating:s,reviewContent:n};try{await Ee(He,o,r,ve),ie(!1),re(!0),await new Promise(e=>setTimeout(e,500)),window.scrollTo({top:0,left:0,behavior:"smooth"})}catch(l){}},revieweeName:Va,reviewSent:oe,sendReviewInProgress:Oe,sendReviewError:qe,marketplaceName:ve.marketplaceName}),null!==($=Ma)&&void 0!==$&&null!==(X=$.transitions)&&void 0!==X&&X.DISPUTE?(0,x.jsx)(J,{id:"DisputeOrderModal",isOpen:ee,onCloseModal:()=>ae(!1),onManageDisableScrolling:Ie,onDisputeOrder:ls(null===He||void 0===He?void 0:He.id,Ma.transitions.DISPUTE,Ke,se,0,Se),disputeSubmitted:ne,disputeInProgress:Ye===Ma.transitions.DISPUTE,disputeError:ze}):null,Ua?(0,x.jsx)(Ce,{id:"PropertyInfoConsentModal",isOpen:ce,txId:null===He||void 0===He||null===(Q=He.id)||void 0===Q?void 0:Q.uuid,onCloseModal:()=>ue(!1),onManageDisableScrolling:Ie,onAgree:async e=>{var a;const n=null===He||void 0===He||null===(a=He.id)||void 0===a?void 0:a.uuid;if(n){ge(!0),he(null);try{const a=await((e,a)=>(0,ye.postMethod)("/api/transactions/sell-7days/agree-property-info",{txId:e,signature:a}))(n,e);ta(a)}catch(s){he(!0)}finally{ge(!1)}}},agreeInProgress:me,agreeError:pe}):null]})})};ds.defaultProps={currentUser:null,fetchTransactionError:null,transitionInProgress:null,transitionError:null,transaction:null,fetchMessagesError:null,initialMessageFailedToTransaction:null,savePaymentMethodFailed:!1,sendMessageError:null,monthlyTimeSlots:null,fetchTimeSlotsError:null,lineItems:null,fetchLineItemsError:null};const cs=(0,o.Zz)(l.y,(0,r.Ng)(e=>{const{fetchTransactionError:a,transitionInProgress:n,transitionError:s,transitionErrorName:t,transactionRef:i,fetchMessagesInProgress:o,fetchMessagesError:r,totalMessagePages:l,olde
3stMessagePageFetched:d,messages:c,initialMessageFailedToTransaction:u,savePaymentMethodFailed:m,sendMessageInProgress:g,sendMessageError:p,lastMessageFiltered:h,sendReviewInProgress:v,sendReviewError:y,monthlyTimeSlots:f,processTransitions:b,lineItems:_,fetchLineItemsInProgress:x,fetchLineItemsError:T}=e.TransactionPage,{currentUser:P}=e.user,{uiCurrency:N}=e.ui,{exchangeRate:j}=e.ExchangeRate,A=(0,C.F4)(e,i?[i]:[]),M=A.length>0?A[0]:null;return{currentUser:P,fetchTransactionError:a,transitionInProgress:n,transitionError:s,transitionErrorName:t,scrollingDisabled:(0,I.kl)(e),transaction:M,fetchMessagesInProgress:o,fetchMessagesError:r,totalMessagePages:l,oldestMessagePageFetched:d,messages:c,initialMessageFailedToTransaction:u,savePaymentMethodFailed:m,sendMessageInProgress:g,sendMessageError:p,lastMessageFiltered:h,sendReviewInProgress:v,sendReviewError:y,monthlyTimeSlots:f,nextTransitions:b,lineItems:_,fetchLineItemsInProgress:x,fetchLineItemsError:T,convertListingPrice:e=>{if(!e)return null;const a=(0,Gn.U)([e],N,j);return a?a[0]:null},uiCurrency:N}},e=>({onTransition:(a,n,s,t)=>e((0,zn.g$)(a,n,s,t)),onFinalizeWithSignature:(a,n,s)=>e((0,zn.$6)(a,n,s)),onShowMoreMessages:(a,n)=>e((0,zn.mh)(a,n)),onSendMessage:(a,n,s)=>e((0,zn._z)(a,n,s)),onManageDisableScrolling:(a,n)=>e((0,I.l)(a,n)),onSendReview:(a,n,s,t)=>e((0,zn.rU)(a,n,s,t)),callSetInitialValues:(a,n)=>e(a(n)),onInitializeCardPaymentData:()=>e((0,D.vb)()),onFetchTransactionLineItems:(a,n,s)=>e((0,zn.Zu)(a,n,s)),onFetchTimeSlots:(a,n,s,t)=>e((0,zn.r_)(a,n,s,t)),onUpdateProgressSellPurchase:(a,n)=>e((0,zn.kl)(a,n)),onInitiateDisputeSellPurchase:(a,n,s)=>e((0,zn.K$)(a,n,s)),onSubscribeToMessages:a=>e((0,zn.SR)(a)),onUnsubscribeFromMessages:a=>e((0,zn.ST)(a)),onUploadAttachment:a=>{let{txId:n,file:s,text:t,onProgress:i,config:o}=a;return e((0,zn.vX)({txId:n,file:s,text:t,onProgress:i,config:o}))},onReportBlockSuccess:()=>e((0,E.rQ)({enforce:!0})),onRefreshTransaction:(a,n,s)=>e((0,zn.R_)(a,n,s)),onAgreedToTerms:a=>e((0,C.Id)(a))})),g.j4)(ds),us=cs},48314:(e,a,n)=>{n.d(a,{A:()=>F});n(49198);var s=n(96580),t=n.n(s),i=n(73432),o=n(55191),r=n(66703),l=n(6535);const d="ProgressStep_root__IerWO",c="ProgressStep_container__5H3xA",u="ProgressStep_iconLineContainer__DDqOl",m="ProgressStep_iconContainer__9EwmR",g="ProgressStep_iconContainerDone__w7ofU ProgressStep_iconContainer__9EwmR ProgressStep_containerDone__yCC3Z",p="ProgressStep_iconContainerInProgress__SNnPi ProgressStep_iconContainer__9EwmR",h="ProgressStep_iconContainerPending__Zsmqo ProgressStep_iconContainer__9EwmR ProgressStep_containerPending__bm+rq",v="ProgressStep_iconContainerCanceled__QfUGP ProgressStep_iconContainer__9EwmR ProgressStep_containerCanceled__B6d9W",y="ProgressStep_innerCirclePending__BigYq ProgressStep_innerCircle__oYGfK ProgressStep_containerPending__bm+rq",f="ProgressStep_innerCircleInProgress__1gPpM ProgressStep_innerCircle__oYGfK ProgressStep_containerInProgress__ONubB",b="ProgressStep_progressLineContainer__Zv9b9 ProgressStep_containerPending__bm+rq",_="ProgressStep_hideProgressLine__8m2Bd",x="ProgressStep_progressLineDone__1Kr+A ProgressStep_containerDone__yCC3Z",T="ProgressStep_progressLineInProgress__nnPy6 ProgressStep_containerInProgress__ONubB",P="ProgressStep_stepCount__APIvK",N="ProgressStep_stepTitle__xkmoY",j="ProgressStep_stepStateDone__WDUr- ProgressStep_stepState__0WaYX",A="ProgressStep_stepStateInProgress__ajKsy ProgressStep_stepState__0WaYX",M="ProgressStep_stepStatePending__QZhsn ProgressStep_stepState__0WaYX",S="ProgressStep_stepStateCanceled__AYD7h ProgressStep_stepState__0WaYX";var w=n(85582);const C=e=>{switch(e){case l.B3:return(0,w.jsx)(o.A,{});case l.$1:return(0,w.jsx)(r.A,{});case l.b3:return(0,w.jsx)("div",{className:f});default:return(0,w.jsx)("div",{className:y})}};const I=function(e){let{step:a,stepCount:n,processName:s,isFinal:o,state:r,rootClassName:y,className:f,categoryLevel1:I}=e;const D=(0,i.A)(),E=r===l.B3,k=r===l.b3,F=r===l.$1,R=r===l.py,B=t()(d||y,c,f),L=t()(m,{[g]:E,[p]:k,[v]:F,[h]:R});return(0,w.jsxs)("div",{className:B,children:[(0,w.jsxs)("div",{className:u,children:[(0,w.jsx)("div",{className:L,children:C(r)}),(0,w.jsx)("div",{className:t()(b,{[_]:o||F}),children:(0,w.jsx)("div",{className:t()({[T]:k,[x]:E})})})]}),(0,w.jsx)("span",{className:P,children:D.formatMessage({id:"ProgressStep.stepCount"},{stepCount:n})}),(0,w.jsx)("span",{className:N,children:D.formatMessage({id:"ProgressStep.stepTitle.".concat(s,".").concat(a)},{categoryLevel1:(null===I||void 0===I?void 0:I.replaceAll("-","_"))||"empty"})}),(0,w.jsx)("span",{className:t()({[j]:E,[A]:k,[S]:F,[M]:R}),children:D.formatMessage({id:"ProgressStep.stepState.".concat(r)})})]})},D="ProgressBar_root__2HPh+",E="ProgressBar_container__kcGQ+",k="ProgressBar_hiddenStep__A-a3h";const F=function(e){let{steps:a,stateData:n,rootClassName:s,className:i,stepInProgress:o,categoryLevel1:r}=e;if(!Array.isArray(a)||0===a.length||!n)return null;const{isCanceled:d,isCompleted:c,processName:u,progressStep:m}=n||{},g=a.findIndex(e=>e===m),p=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;if(e<a||c)return l.B3;const n=e===a;return n&&d?l.$1:n?l.b3:l.py},h=t()(s||D),v=t()(E,i);return-1===g?(0,w.jsx)("div",{className:h,children:(0,w.jsx)("div",{className:v,children:a.map((e,n)=>{const s=n===a.length-1;return(0,w.jsx)(I,{step:e,stepCount:n+1,processName:u,isFinal:s,categoryLevel1:r,state:p(n,o)},n)})})}):(0,w.jsx)("div",{className:h,children:(0,w.jsx)("div",{className:v,children:a.map((e,n)=>{const s=n===a.length-1,i=d&&n>g;return(0,w.jsx)(I,{step:e,stepCount:n+1,processName:u,isFinal:s,categoryLevel1:r,state:p(n),className:t()({[k]:i})},n)})})})}},69508:(e,a,n)=>{n.d(a,{H:()=>t,u:()=>s});const s=(e,a,n)=>e.filter(e=>("all"===a||e.audience===a)&&("all"===n||e.category.includes(n))),t=(e,a)=>{if(null===a||void 0===a||!a.length)return e;const n=new Map(a.map(e=>[e.question,e])),s=new Set(e.map(e=>e.question));return[...e.map(e=>n.get(e.question)||e),...a.filter(e=>!s.has(e.question))]}},82168:(e,a,n)=>{n.d(a,{A:()=>s});const s={root:"Faqs_root__buK5z",accordionFadein:"Faqs_accordionFadein__J4RQD",accordion:"Faqs_accordion__HAD-K",accordionItem:"Faqs_accordionItem__J7qCu",accordionHeading:"Faqs_accordionHeading__wSWLB",accordionButton:"Faqs_accordionButton__kb8no",accordionPanel:"Faqs_accordionPanel__V2M9j"}}}]); 4//# sourceMappingURL=TransactionPage.c19ce732.chunk.js.map 5//# debugId=1ac9c1ee-3c89-5cfd-abc9-59723ab82f81
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.