PageSourceSearch

https://crosslyst.com/assets/Settings-CDv6SKVw.js

js crosslyst.com collected 2026-09-24 14:41:10 UTC 21,661 bytes, 11 lines download raw bytes

1import{j as e}from"./markdown-BniUNT3b.js";import{r as l}from"./stripe-DNH-pMf_.js";import{A as ce}from"./app-header-BySn3yLe.js";import{f as ne,C as Y,b as U,c as H,d as z,e as W,B as E,R as re,ae as de,t as u,o as B,I as T,u as ie,y as V,w as R,a as me,Z as ue,$ as pe,x as he,af as xe,ag as ye,s as fe,ah as ge,ai as I}from"./index-DuzGmC-_.js";import{B as je}from"./back-link-tqqM6dK9.js";import{F as A}from"./field-help-DciGPfzv.js";import{a as ve,f as be,b as Ne,d as Ce,e as _e,g as we,h as v,P as ke,i as J}from"./help-content-DxR6sNWS.js";import{K as Se}from"./key-round-C0r4TJQ_.js";import{C as Ae}from"./copy-DXh50658.js";import{D as Ee,f as Pe,s as Le}from"./notification-preferences-Cfg8yXCn.js";import{S as Q,a as X,b as ee,c as se,d as O}from"./select-4m1srpQN.js";import{F as K,a as Oe}from"./posting-lifecycle-B_rU7Nf8.js";import"./recharts-BxZy5o_C.js";import"./supabase-H0uDwzZe.js";import"./arrow-left-WV0W9UZy.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Te=ne("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const De=ne("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]),ae="https://fuzqhwvkfhytwplyvisb.supabase.co/functions/v1/mcp",Ie=()=>{const{toast:n}=de(),i=async(p,o="Copied")=>{await navigator.clipboard.writeText(p),n({title:o})};
11return e.jsxs(Y,{children:[e.jsxs(U,{children:[e.jsxs(H,{className:"flex items-center gap-2",children:[e.jsx(Se,{className:"h-4 w-4"})," Agent integrations (MCP)"]}),e.jsx(z,{className:"mt-1",children:"Connect Claude, ChatGPT, Cursor, n8n, or your own agent to Crosslyst. You approve the connection with a sign-in — no API keys to copy or rotate. Agents act as you and can only see your data."})]}),e.jsxs(W,{className:"space-y-3",children:[e.jsxs("div",{className:"rounded-md border bg-muted/30 p-3 text-xs space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"MCP server URL"}),e.jsxs(E,{variant:"ghost",size:"sm",className:"h-8 px-2",onClick:()=>i(ae,"URL copied"),children:[e.jsx(Ae,{className:"h-3 w-3 mr-1"})," Copy"]})]}),e.jsx("code",{className:"block break-all text-[11px] font-mono",children:ae})]}),e.jsxs("a",{href:"/app/mcp",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline",children:["Setup instructions ",e.jsx(re,{className:"h-3 w-3"})]})]})]})},Be=["America/New_York","America/Chicago","America/Denver","America/Phoenix","America/Los_Angeles","America/Anchorage","Pacific/Honolulu","Europe/London","Europe/Berlin","Asia/Tokyo","Australia/Sydney"],Fe=({userId:n})=>{const[i,p]=l.useState(Ee),[o,N]=l.useState(!0),[y,r]=l.useState(!1);l.useEffect(()=>{let t=!1;return(async()=>{try{const h=await Pe(n);t||p(h)}catch(h){t||u({title:"Couldn't load preferences",description:h instanceof Error?h.message:"Please retry.",variant:"destructive"})}finally{t||N(!1)}})(),()=>{t=!0}},[n]);const m=(t,h)=>p(k=>({...k,[t]:h})),w=async()=>{r(!0);try{await Le(n,i),u({title:"Notification preferences saved"})}catch(t){u({title:"Couldn't save",description:t instanceof Error?t.message:"Please retry.",variant:"destructive"})}finally{r(!1)}},f=Array.from(new Set([i.timezone,...Be]));return e.jsxs(Y,{id:"notifications",className:"mt-6 scroll-mt-24",children:[e.jsxs(U,{children:[e.jsx(H,{children:"Notifications"}),e.jsx(z,{children:"Control the daily task digest, engagement reminders, and browser push. Quiet hours pause scheduled emails; you'll still get the next digest when they end."})]}),e.jsxs(W,{className:"space-y-6",children:[e.jsx(q,{label:"Daily task digest email",description:"One email each morning with the day's posting tasks. Sent only if you have tasks due.",checked:i.daily_digest_enabled,onCheckedChange:t=>m("daily_digest_enabled",t),disabled:o}),e.jsx(q,{label:"Engagement reminders",description:"Include the 7-day engagement check-in prompts in your digest and browser notifications.",checked:i.engagement_reminders_enabled,onCheckedChange:t=>m("engagement_reminders_enabled",t),disabled:o}),e.jsx(q,{label:"Browser push",description:"Send desktop notifications from this browser when tasks are due. Requires OS permission.",checked:i.browser_push_enabled,onCheckedChange:t=>m("browser_push_enabled",t),disabled:o}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsx(q,{label:"Quiet hours",description:"Skip emails and push during this window. Uses your timezone below.",checked:i.quiet_hours_enabled,onCheckedChange:t=>m("quiet_hours_enabled",t),disabled:o}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"quiet-start",children:"Start"}),e.jsx(T,{id:"quiet-start",type:"time",value:i.quiet_hours_start,onChange:t=>m("quiet_hours_start",t.target.value),disabled:o||!i.quiet_hours_enabled})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"quiet-end",children:"End"}),e.jsx(T,{id:"quiet-end",type:"time",value:i.quiet_hours_end,onChange:t=>m("quiet_hours_end",t.target.value),disabled:o||!i.quiet_hours_enabled})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"quiet-tz",children:"Timezone"}),e.jsx("select",{id:"quiet-tz",value:i.timezone,onChange:t=>m("timezone",t.target.value),disabled:o,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
11ing-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:f.map(t=>e.jsx("option",{value:t,children:t},t))})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx(E,{onClick:w,disabled:o||y,children:y?"Saving…":"Save preferences"})})]})]})},q=({label:n,description:i,checked:p,onCheckedChange:o,disabled:N})=>e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-sm font-medium",children:n}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:i})]}),e.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:p,onChange:y=>o(y.target.checked),disabled:N,"aria-label":n}),e.jsx("span",{className:"text-xs",children:p?"On":"Off"})]})]}),te={fulfillment:[],payment:[],return:[],locations:[]},G={fulfillment_policy_id:null,payment_policy_id:null,return_policy_id:null,merchant_location_key:null,listing_duration:"GTC",default_category_id:null},Me=({userId:n})=>{const[i,p]=ie(),[o,N]=l.useState(null),[y,r]=l.useState(!0),[m,w]=l.useState(!1),[f,t]=l.useState(te),[h,k]=l.useState(!1),[g,P]=l.useState(G),L=l.useCallback(async()=>{var c,d,_,b;k(!0);const a=await ve();if(k(!1),!a.ok){u({title:"Could not load your eBay policies",description:a.message,variant:"destructive"});return}t({fulfillment:((c=a.data)==null?void 0:c.fulfillment)??[],payment:((d=a.data)==null?void 0:d.payment)??[],return:((_=a.data)==null?void 0:_.return)??[],locations:((b=a.data)==null?void 0:b.locations)??[]})},[]),D=l.useCallback(async()=>{const a=await be();if(N(a),a&&n){const c=await Ne(n);P(c??G)}r(!1),a&&L()},[n,L]);l.useEffect(()=>{D()},[D]),l.useEffect(()=>{const a=i.get("ebay");if(!a)return;const c=i.get("ebay_message");a==="connected"?u({title:"eBay connected"}
11):u({title:"eBay connection failed",description:c??void 0,variant:"destructive"});const d=new URLSearchParams(i);d.delete("ebay"),d.delete("ebay_message"),p(d,{replace:!0})},[i,p]);const F=async()=>{var c;w(!0);const a=await Ce();if(w(!1),!a.ok||!((c=a.data)!=null&&c.url)){u({title:"Could not start the eBay connection",description:a.message,variant:"destructive"});return}window.location.href=a.data.url},M=async()=>{await _e(),u({title:"eBay disconnected",description:"Items already live on eBay can no longer be updated from Crosslyst."}),N(null),P(G),t(te)},j=async a=>{if(P(d=>({...d,...a})),!n)return;const c=await we(n,a);c&&u({title:"Could not save eBay defaults",description:c,variant:"destructive"})},S=(a,c,d,_)=>e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{children:a}),e.jsxs(Q,{value:c??"",onValueChange:_,children:[e.jsx(X,{children:e.jsx(ee,{placeholder:d.length?`Select ${a.toLowerCase()}`:"None found on eBay yet"})}),e.jsx(se,{children:d.map(b=>e.jsx(O,{value:b.id,children:b.name},b.id))})]})]}),C=f.fulfillment.find(a=>a.id===g.fulfillment_policy_id);return e.jsxs(Y,{children:[e.jsxs(U,{children:[e.jsx(H,{children:"eBay"}),e.jsx(z,{children:"Connect your eBay account so Crosslyst can post items straight to eBay with your shipping, payment, and return policies."})]}),e.jsx(W,{className:"grid gap-4",children:y?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(V,{className:"h-4 w-4 animate-spin"})," Checking your eBay connection…"]}):o?e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[e.jsx(R,{variant:"secondary",children:"Connected"}),o.ebay_user_id&&e.jsx("span",{className:"font-medium",children:o.ebay_user_id})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(E,{variant:"outline",size:"sm",onClick:()=>void L(),disabled:h,children:[h?e.jsx(V,{className:"h-4 w-4 animate-spin"}):null," Refresh policies"]}),e.jsxs(E,{variant:"outline",size:"sm",onClick:()=>void M(),children:[e.jsx(De,{className:"h-4 w-4"})," Disconnect"]})]})]}),S("Shipping policy",g.fulfillment_policy_id,f.fulfillment,a=>void j({fulfillment_policy_id:a})),g.fulfillment_policy_id&&e.jsx("div",{className:"-mt-1 flex flex-wrap items-center gap-2 text-sm",children:C?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:"Selected:"}),e.jsx("span",{className:"font-medium",children:C.name}),C.hasEbayInternationalShipping?e.jsx(R,{variant:"secondary",children:"eBay International Shipping"}):C.hasInternationalShipping?e.jsx(R,{variant:"secondary",children:"International shipping included"}):e.jsx(R,{variant:"outline",children:"US only"})]}):e.jsx("span",{className:"text-muted-foreground",children:"Loading shipping details…"})}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["International shipping is controlled by"," ",e.jsx("a",{href:"https://www.ebay.com/help/selling/shipping-items/shipping-policies?id=4136",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-foreground",children:"the eBay shipping policy"})," ","you choose above."]}),S("Payment policy",g.payment_policy_id,f.payment,a=>void j({payment_policy_id:a})),S("Return policy",g.return_policy_id,f.return,a=>void j({return_policy_id:a})),S("Item location",g.merchant_location_key,f.locations,a=>void j({merchant_location_key:a})),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{children:"Listing length"}),e.jsxs(Q,{value:g.listing_duration,onValueChange:a=>void j({listing_duration:a}),children:[e.jsx(X,{children:e.jsx(ee,{})}),e.jsxs(se,{children:[e.jsx(O,{value:"GTC",children:"Until it sells"}),e.jsx(O,{value:"DAYS_30",children:"30 days"}),e.jsx(O,{value:"DAYS_21",children:"21 days"}),e.jsx(O,{value:"DAYS_10",children:"10 days"}),e.jsx(O,{value:"DAYS_7",children:"7 days"})]})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"No policies listed? Create them once on eBay under Account settings, then press Refresh policies."})]}):e.jsxs(E,{onClick:()=>void F(),disabled:m,children:[m?e.jsx(V,{className:"h-4 w-4 animate-spin"}):e.jsx(Te,{className:"h-4 w-4"}),"Connect eBay account"]})})]})},Re=[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"}],qe=ge({displayName:I().trim().min(1,"Display name is required").max(80),sellerEmail:I().trim().email("Enter a valid email").max(255),city:I().trim().min(1,"City is required").max(80),state:I().trim().regex(/^[A-Z]{2}$/,"Pick a state"),postalCode:I().trim().regex(/^\d{5}(-\d{4})?$/,"Enter a 5-digit ZIP")}),as=()=>{var Z;const{user:n}=me(),{profile:i,refresh:p}=ue(),{isAdmin:o}=pe(),[N]=ie(),y=he(),r=N.get("first")==="1",[m,w]=l.useState(""),[f,t]=l.useState(""),[h,k]=l.useState(""),[g,P]=l.useState(""),[L,D]=l.useState(""),[F,M]=l.useState(K),[j,S]=l.useState([]),[C,a]=l.useState(!1),[c,d]=l.useState(!1),[_,b]=l.useState(!1);l.useEffect(()=>{d(xe())},[]),l.useEffect(()=>{i?(w(i.display_name??""),t(i.seller_email??(n==null?void 0:n.email)??""),k(i.city??""),P(i.state??""),D(i.postal_code??""),M(i.fb_relist_cooldown_days??K),S(i.payment_types??[]),a(i.auto_remove_background??!1)):n&&t(n.email??"")},[i,n]);const le=async()=>
11{if(!n)return;const s=qe.safeParse({displayName:m,sellerEmail:f,city:h,state:g,postalCode:L});if(!s.success){u({title:"Please fix the form",description:s.error.issues[0].message,variant:"destructive"});return}b(!0);const{error:x}=await fe.from("profiles").upsert({user_id:n.id,display_name:s.data.displayName,seller_email:s.data.sellerEmail,city:s.data.city,state:s.data.state,postal_code:s.data.postalCode,fb_relist_cooldown_days:F,payment_types:j,auto_remove_background:C,onboarded_at:new Date().toISOString()},{onConflict:"user_id"});if(b(!1),x){u({title:"Couldn't save",description:x.message,variant:"destructive"});return}await p(),u({title:"Saved",description:"Your seller profile is up to date."}),r&&y("/app/welcome?first=1",{replace:!0})};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(ce,{active:"account"}),e.jsxs("div",{className:"container max-w-2xl mx-auto px-4 py-10",children:[!r&&e.jsx("div",{className:"mb-6",children:e.jsx(je,{fallback:"/app/inventory"})}),e.jsxs(Y,{children:[e.jsxs(U,{children:[e.jsx(H,{children:r?"Welcome — finish setting up":"Seller profile"}),e.jsx(z,{children:r?"We need a few details so Crosslyst can auto-fill your Craigslist posts and tag listings with your location.":"Update the seller details Crosslyst uses when posting on your behalf."})]}),e.jsxs(W,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{label:"Display name",htmlFor:"displayName",hint:v.displayName.hint,tooltip:v.displayName.tooltip}),e.jsx(T,{id:"displayName",value:m,onChange:s=>w(s.target.value),placeholder:"Jane Seller",maxLength:80})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{label:"Seller email (used for Craigslist)",htmlFor:"sellerEmail",hint:v.sellerEmail.hint,tooltip:v.sellerEmail.tooltip}),e.jsx(T,{id:"sellerEmail",type:"email",value:f,onChange:s=>t(s.target.value),placeholder:"[email protected]",maxLength:255})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2 sm:col-span-1",children:[e.jsx(A,{label:"City",htmlFor:"city",hint:v.city.hint,tooltip:v.city.tooltip}),e.jsx(T,{id:"city",value:h,onChange:s=>k(s.target.value),placeholder:"Denver",maxLength:80})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{label:"State",htmlFor:"state",hint:v.state.hint,tooltip:v.state.tooltip}),e.jsxs("select",{id:"state",value:g,onChange:s=>P(s.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
11ing-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx("option",{value:"",children:"Select…"}),Re.map(s=>e.jsxs("option",{value:s.code,children:[s.code," — ",s.name]},s.code))]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{label:"ZIP",htmlFor:"postalCode",hint:v.postalCode.hint,tooltip:v.postalCode.tooltip}),e.jsx(T,{id:"postalCode",value:L,onChange:s=>D(s.target.value),placeholder:"80202",maxLength:10})]})]}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(A,{label:"Payment types you accept",hint:"Added as one line at the end of every paid listing. Leave all unchecked to add nothing.",tooltip:"Crosslyst writes a single line such as “Cash, Venmo, or PayPal only” at the end of the description. Free items never get a payment line."}),e.jsx("div",{className:"flex flex-wrap gap-4",children:ke.map(s=>e.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer select-none text-sm",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:j.includes(s.value),onChange:x=>S($=>x.target.checked?[...$,s.value]:$.filter(oe=>oe!==s.value))}),s.label]},s.value))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:J(j)?`Descriptions will end with: “${J(j)}”`:"No payment line will be added."})]}),e.jsx("div",{className:"space-y-2 border-t pt-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Remove photo backgrounds automatically"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Every photo you upload gets a clean white background. The original photo is always kept."})]}),e.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:C,onChange:s=>a(s.target.checked)}),e.jsx("span",{className:"text-xs",children:C?"On":"Off"})]})]})}),e.jsxs("div",{className:"space-y-2 border-t pt-4",children:[e.jsx(A,{label:"Facebook re-list cooling-off period",htmlFor:"relistCooldown",hint:"How long Crosslyst waits after you delete a Facebook post before scheduling a fresh one.",tooltip:"Facebook flags accounts that delete and immediately re-post the same item, and buyers reading your profile notice the churn. A longer wait makes the new post read as genuinely new. 30 days is the safe default; choose 60 if your account has been restricted before."}),e.jsx("select",{id:"relistCooldown",value:F,onChange:s=>M(Number(s.target.value)),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
11ing-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 sm:max-w-xs",children:Oe.map(s=>e.jsxs("option",{value:s,children:[s," days",s===K?" (recommended)":""]},s))})]}),!r&&e.jsx("div",{className:"border-t pt-4 mt-2",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Anonymous usage analytics"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Helps us spot bugs and friction. No personal info is collected. Opt out any time."})]}),e.jsxs("label",{className:"inline-flex items-center gap-2 cursor-pointer select-none",children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:!c,onChange:s=>{const x=!s.target.checked;d(x),ye(x),u({title:x?"Analytics disabled":"Analytics enabled"})}}),e.jsx("span",{className:"text-xs",children:c?"Off":"On"})]})]})}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[!r&&e.jsx(E,{variant:"outline",onClick:()=>{var x;(((x=window.history.state)==null?void 0:x.idx)??0)>0?y(-1):y("/app/inventory",{replace:!0})},disabled:_,children:"Cancel"}),e.jsx(E,{onClick:le,disabled:_,children:_?"Saving…":r?"Save and continue":"Save changes"})]})]})]}),!r&&n&&e.jsx(Fe,{userId:n.id}),!r&&o&&e.jsx("div",{className:"mt-6",children:e.jsx(Me,{userId:(n==null?void 0:n.id)??null})}),!r&&((Z=n==null?void 0:n.email)==null?void 0:Z.toLowerCase())==="[email protected]"&&e.jsx("div",{className:"mt-6",children:e.jsx(Ie,{})})]})]})};export{as as Settings};

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.