1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="6551cffb-aa96-4c85-a3d9-d516236a6fcd",e._sentryDebugIdIdentifier="sentry-dbid-6551cffb-aa96-4c85-a3d9-d516236a6fcd")}catch(e){}}();import"./_sentry-release-injection-file-SYOkQ1Km.js";import{a as e}from"./rolldown-runtime-BBzOAo5_.js";import{t as s}from"./react-DuV36FPs.js";import{E as t,G as a,K as r,N as o,O as i,P as n,at as l,ct as m,h as c,i as d,j as u,l as f,r as j}from"./index-CRc22cjs.js";import{t as x}from"./FormLayoutContext-CsyD3FrV.js";import{a as h,c as b,o as p}from"./FinalControlGroup-Cmc21xKd.js";import{t as w}from"./FormField-DM_MQnEG.js";import{t as g}from"./Submit-CHUFd811.js";import{t as y}from"./FormError-DCBM5X0M.js";import{t as v}from"./FinalCheckbox-B4d-pr_9.js";import{n as C,r as _,t as T}from"./ExclusionString-YEY5gGMW.js";import{n as D,t as S}from"./PriceRange-DD08lJYX.js";import{t as F}from"./SimpleSearchFields-DenGjBfc.js";s();var I=l(),N=r(),k=(0,I.withTranslators)((({dealersCountries:e,t:s})=>{const t="USD"!==a().currency.code;return(0,N.jsxs)(x.Provider,{value:{groups:{compact:!0}},children:[(0,N.jsx)(F,{autofocus:!0}),(0,N.jsx)(w,{name:"publisher",label:(0,N.jsx)(I.T,{message:"Publisher:"}),autocomplete:!1}),(0,N.jsx)(_,{}),(0,N.jsx)(D,{}),(0,N.jsx)(S,{hintKey:"price_want",notes:t&&(0,N.jsx)(I.T,{message:"Price range is in USD."})}),(0,N.jsx)(T,{}),(0,N.jsx)(C,{options:e.countries,alternativeCountries:e.alternativeCountries}),(0,N.jsx)(w,{name:"note",label:(0,N.jsx)(I.T,{message:"Notes:"}),type:"textarea",rows:2}),(0,N.jsx)(p,{children:(0,N.jsx)(v,{name:"notifications",label:s("Disable email alerts for this want"),invertBooleanLogic:!0})})]})})),E=d(((e,s)=>({want:e.wants.length?e.wants[0]:{query:s.query||{},note:"",notifications:!0}})),((e,s)=>({deleteWant:()=>e(f(s.id)).then((()=>{window.location.assign("/wants")}))})))((0,I.withTranslators)((({id:e,want:s,deleteWant:a,dealersCountries:r,t:l})=>{const d=j(),f=n("/wants"),x={search_id:o("search_id")||void 0,"return-to":f||void 0,note:s.note,notifications:s.notifications,...t(s.query)};return(0,N.jsxs)("div",{className:"box",children:[!e&&(0,N.jsx)("div",{className:"margin-bottom--3-2",children:(0,N.jsx)(I.T,{message:'By filling in this form you are agreeing to receive email alerts when new matching items become available. If you do not wish to receive email updates for this want please check "Disable email alerts for this want" below.'})}),(0,N.jsx)(b,{onSubmit:c(e?`/wants/${e}`:"/wants/create",d,i),initialValues:x,validate:e=>h(e,!0),render:s=>{const t=m(s.values,((e,s)=>void 0!==e&&""!==e&&"apply_exclusion_string_to_fields"!==s&&e!==x[s])),o=(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("a",{className:"button button--notice",href:f||"/wants",children:(0,N.jsx)(I.T,{message:"Cancel"})}),!e&&t?(0,N.jsx)("a",{className:"colour--grey",onClick:()=>s.form.reset(x),children:(0,N.jsx)(I.T,{message:"Reset form"})}):null,e&&(0,N.jsx)("a",{onClick:u(l("Are you sure you want to delete this want?"),(()=>{s.form.submit(),a()})),children:(0,N.jsx)(I.T,{message:"Delete want"})})]});return(0,N.jsxs)("form",{onSubmit:s.handleSubmit,children:[(0,N.jsx)(y,{formIsEmpty:!t}),(0,N.jsx)(k,{dealersCountries:r}),(0,N.jsx)(g,{label:l(e?"Save":"Add"),afterButton:o})]})}})]})})));export{E as default}; 2//# sourceMappingURL=WantEditor-ChWnz3Rf.js.map
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.