PageSourceSearch

https://app.listingview.io/_next/static/chunks/2236-0ebc767c46736038.js

js listingview.io collected 2026-09-24 14:23:57 UTC 27,823 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2236],{52790:function(e,t,n){n.d(t,{Z:function(){return R}});var l=n(57437),r=n(2265),i=n(27648),s=n(82023),a=n(61281),o=n(32526),c=n(45886),d=n(82222),u=n(98728),x=n(40875),p=n(42208),h=n(45554),v=n(51817),m=n(20265),g=n(69076),b=n(18930),f=n(30401),j=n(93134),k=n(23508),y=n(1988),N=n(13213),C=n(43792),M=n(21603),w=n(95136),L=n(88159),Z=n(98624),S=n(37990),z=n(66280);function A(e){let{statusLine:t,stageLabel:n,trailingAction:r=null,testId:i="grounding-status-line"}=e,s=!!n,a=s?n:t||"",o=s?n:t||"";return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{role:"status","aria-live":"polite","data-testid":i,"data-announcing":s?"stage":"status",className:"sr-only",children:a}),o||r?(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[o?(0,l.jsx)(C.Z,{title:o,placement:"top",children:(0,l.jsxs)("p",{"aria-hidden":"true","data-testid":"grounding-status-text",className:"m-0 flex min-w-0 items-center gap-1.5 text-xs leading-4 text-lv-text-secondary",children:[s&&(0,l.jsx)(v.Z,{size:12,className:"shrink-0 animate-spin text-lv-text-tertiary"}),(0,l.jsx)("span",{className:"min-w-0 truncate",children:o})]})}):null,r?(0,l.jsx)("span",{"data-testid":"grounding-status-action",className:"shrink-0",children:r}):null]}):null]})}var I=n(36362),H=n(47569);let O=[{key:"optimize",label:"Optimize",Icon:s.Z},{key:"makeLonger",label:"Make Longer",Icon:a.Z},{key:"makeShorter",label:"Make Shorter",Icon:o.Z},{key:"changeTone",label:"Change Tone",Icon:c.Z}],V=[{key:"title",label:"Title"},{key:"tags",label:"Tags"},{key:"description",label:"Description"},{key:"price",label:"Price"}];function E(e){let{sent:t,dropped:n}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6;return{emptyNote:0===t.length,overLimitNote:n.length>0,tileRow:Math.min(t.length,l)>0||n.length>0}}function R(e){var t,n,a,o,c,g,b,f,j,R;let{selectedCount:P=1,tokenBalance:F=500,loading:G=!1,hasImages:K=!0,images:q,canGeneratePrice:Q=!1,priceMode:Y=S.M5.SINGLE,priceUnavailableReason:J=Z.kJ,priceVariantRowCount:U=0,pendingFields:X=[],statusNote:$,onGenerate:ee,onAcceptAll:et,onRegenerateAll:en,onDiscardAll:el,bottom:er=24,grounding:ei,surface:es}=e,[ea,eo]=(0,r.useState)(""),[ec,ed]=(0,r.useState)(""),[eu,ex]=(0,r.useState)({optimize:!0,makeLonger:!1,makeShorter:!1,changeTone:!1}),[ep,eh]=(0,r.useState)(K);(0,r.useEffect)(()=>{!K&&ep&&eh(!1)},[K,ep]);let[ev,em]=(0,r.useState)({title:!0,tags:!0,description:!0,price:!1});(0,r.useEffect)(()=>{Q||em(e=>e.price?{...e,price:!1}:e)},[Q]);let[eg,eb]=(0,r.useState)(()=>{var e;return null!==(e=(0,M.Sw)())&&void 0!==e?e:M.KP}),ef=(0,r.useRef)(!1),[ej,ek]=(0,r.useState)(""),[ey,eN]=(0,r.useState)(null),[eC,eM]=(0,r.useState)(null),[ew,eL]=(0,r.useState)(null),eZ=(0,r.useRef)(null),[eS,ez]=(0,r.useState)(!1),[eA,eI]=(0,r.useState)(!1),eH=()=>{var e;return null===(e=eZ.current)||void 0===e?void 0:e.close()},[eO,eV]=(0,r.useState)(!1),[eE,eR]=(0,r.useState)(!1),eB=eE||!!ey||!!eC||!!ew||eS||eA,{balanceData:eD,loadingBalance:eP,setBalanceData:eF}=(0,M.ji)(),{preferences:eW}=(0,M.Dp)();(0,r.useEffect)(()=>{if(ef.current||(0,M._0)())return;let e=null==eW?void 0:eW.defaultDescriptionMode;(0,M.iT)(e)&&(eb(e),(0,M.dx)(e))},[eW]);let eT=null!==(a=null==eD?void 0:eD.models)&&void 0!==a?a:[],e_=null!==(c=null!==(o=(0,M.Nl)(eD))&&void 0!==o?o:null===(t=eT[0])||void 0===t?void 0:t.id)&&void 0!==c?c:(0,M.d$)(),eG=ec||e_,eK=eT.find(e=>e.id===eG),eq=null==eD?void 0:eD.pricing,eQ=null!==(g=null==eq?void 0:eq.imageMultiplier)&&void 0!==g?g:2,eY=null!==(b=null==eK?void 0:eK.multiplier)&&void 0!==b?b:1,eJ=null!==(f=null==eD?void 0:null===(n=eD.balance)||void 0===n?void 0:n.totalAvailable)&&void 0!==f?f:F,eU=ea.trim().length>0,eX=Object.values(eu).filter(Boolean).length,e$=(0,r.useMemo)(()=>(0,H.lt)(q),[q]),e0=ep&&Array.isArray(q),e1=e0?function(e){let{emptyNote:t,overLimitNote:n,tileRow:l}=E(e),r=(t?1:0)+(n?1:0);return 17+16*r+(l?(r>0?6:0)+44:0)}(e$):0,e2=(0,r.useMemo)(()=>V.filter(e=>{let{key:t}=e;return"price"!==t||Q}),[Q]),e5=(0,r.useMemo)(()=>e2.filter(e=>{let{key:t}=e;return ev[t]}).map(e=>{let{key:t}=e;return t}),[e2,ev]),e4=(0,r.useMemo)(()=>(0,M.MH)({pricing:eq,fields:e5.length>0?e5:["title"],selectedOptions:eu,viewAiSelected:ep,listingCount:Math.max(1,P),hasCustomPrompt:eU,modelMultiplier:eY}),[eq,e5,eu,ep,P,eU,eY]),e8=e4.total*Math.max(1,P),e3=null!=eJ&&e8>eJ,e6=!G&&P>0&&e8>0&&!e3&&e5.length>0&&(eU||eX>0),e7=null==ei?void 0:ei.status,e9=null!==(j=null==ei?void 0:ei.reason)&&void 0!==j?j:null,te=!(!ei||(0,z.j6)(e7,e9).hidden)&&e7!==z.jz.SKIPPED&&e7!==z.jz.ERROR,tt=(0,r.useMemo)(()=>
1{if(!ei)return 0;let e=ei.referencesUsedIds;if(Array.isArray(e)&&e.length>0)return e.length;let t=new Set(ei.excludedIds||[]);return[...ei.references||[],...ei.pinnedReferences||[]].filter(e=>{var n;return!t.has(String(null!==(n=null==e?void 0:e.listingId)&&void 0!==n?n:""))}).length},[ei]),tn=function(e){let[t,n]=(0,r.useState)(0);return(0,r.useEffect)(()=>{if(n(0),!e)return;let t=0,l=setInterval(()=>{n(t+=1),t>=z.j0.length-1&&clearInterval(l)},1800);return()=>clearInterval(l)},[e]),e?(0,z.d_)(t):null}(G&&te),tl=ei?(0,z.IF)(e7,e9,{referenceCount:tt,candidateCount:ei.candidateCount},{tagStrategy:ei.tagStrategy}):null,tr=!!tl&&!tn&&e7===z.jz.GROUNDED&&!!(0,z.MG)(null==ei?void 0:ei.tagStrategy),ti=X.length>0&&!G&&(0,L.p7)(null==ei?void 0:ei.scoreBefore,null==ei?void 0:ei.scoreAfter),ts=!!tl||!!tn||ti,ta=(0,r.useMemo)(()=>{var e,t;return 0===eX?"No edits":eX>=2?"Multiple":null!==(t=null===(e=O.find(e=>eu[e.key]))||void 0===e?void 0:e.label)&&void 0!==t?t:"1 edit"},[eX,eu]),to=(0,r.useMemo)(()=>{let e=e5.length;return 0===e?"None":e===e2.length?"All":e<=2?e5.map(e=>{var t;return null===(t=V.find(t=>t.key===e))||void 0===t?void 0:t.label}).filter(Boolean).join(", "):"".concat(e," fields")},[e5,e2]),tc=e=>ex(t=>{let n={...t,[e]:!t[e]};return"makeLonger"===e&&n.makeLonger&&(n.makeShorter=!1),"makeShorter"===e&&n.makeShorter&&(n.makeLonger=!1),n}),td=0===eT.length?[{key:"models-status",label:eP?"Loading models…":"Models unavailable",disabled:!0}]:eT.map(e=>({key:e.id,icon:(0,l.jsx)(d.Z,{size:12}),label:"".concat(e.name).concat(e.id===e_?" (Default)":""),description:e.description,badge:e.multiplier?"".concat(e.multiplier,"x"):void 0,active:e.id===eG,onClick:()=>ed(e.id)})),tu=[{header:"Quick edits"},...O.map(e=>{let{key:t,label:n,Icon:r}=e;return{key:t,keepOpen:!0,render:()=>{var e;return(0,l.jsx)(_,{icon:(0,l.jsx)(r,{size:14,className:"text-lv-text-secondary"}),label:n,cost:(0,M.Bq)(null===(e=e4.perOption)||void 0===e?void 0:e[t],e4.pricingVersion),checked:!!eu[t],onClick:()=>tc(t)})}}}),{divider:!0},{key:"advanced",icon:(0,l.jsx)(u.Z,{size:12}),label:"Advanced settings",onClick:()=>{window.open("/dashboard/settings?tab=ai","_blank","noopener")}}],tx=[...V.map(e=>{let{key:t,label:n}=e,r="price"===t&&!Q;return{key:t,keepOpen:!0,render:()=>(0,l.jsx)(_,{label:n,checked:!r&&!!ev[t],disabled:r,reason:r?J||Z.kJ:void 0,onClick:()=>em(e=>({...e,[t]:!e[t]}))})}}),...ev.price&&Q?[{key:"pricing-divider",divider:!0},{key:"pricing-label",render:()=>(0,l.jsx)("div",{className:"px-2.5 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wide text-lv-text-tertiary",children:"Pricing"})},...Y===S.M5.VARIANT&&U>0?[{key:"pricing-scope",render:()=>(0,l.jsx)("p",{className:"px-2.5 pb-1 text-lv-caption text-lv-text-tertiary whitespace-normal",children:1===U?"Prices 1 variation":"Prices all ".concat(U," variations")})}]:[],{key:"pricing-instructions",keepOpen:!0,render:()=>(0,l.jsx)(T,{value:ej,onChange:ek})}]:[],...ev.description?[{key:"descmode-divider",divider:!0},{key:"descmode-label",render:()=>(0,l.jsx)("div",{className:"px-2.5 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wide text-lv-text-tertiary",children:"Description"})},...M.Y8.map(e=>{let{key:t,label:n}=e;return{key:"descmode-".concat(t),keepOpen:!0,render:()=>(0,l.jsx)(_,{label:n,checked:eg===t,onClick:()=>{ef.current=!0,eb(t),(0,M.FC)(t)}})}})]:[]],tp=(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 whitespace-nowrap p-2 text-xs",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,l.jsxs)(W,{onClick:e=>eN(ey?null:e.currentTarget),children:[(0,l.jsx)(d.Z,{size:14,className:"text-lv-text-secondary"}),(0,l.jsx)("span",{className:"font-medium",children:null!==(R=null==eK?void 0:eK.name)&&void 0!==R?R:"Model"}),(0,l.jsx)(x.Z,{size:12,className:"text-lv-text-tertiary"})]}),(0,l.jsx)(N.Z,{anchorEl:ey,open:!!ey,onClose:()=>eN(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},minWidth:220,items:td}),(0,l.jsxs)(W,{onClick:e=>eM(eC?null:e.currentTarget),children:[(0,l.jsx)(s.Z,{size:14,className:"text-lv-text-secondary"}),(0,l.jsx)("span",{className:"font-medium",children:ta}),(0,l.jsx)(x.Z,{size:12,className:"text-lv-text-tertiary"})]}),(0,l.jsx)(N.Z,{anchorEl:eC,open:!!eC,onClose:()=>eM(null),anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},minWidth:240,items:tu}),(0,l.jsx)(C.Z,{title:K?"":"Add at least one image to enable image-aware generation",placement:"top",children:(0,l.jsx)("span",{children:(0,l.jsxs)("button",{type:"button",onClick:()=>K&&eh(e=>!e),disabled:!K,className:["flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-colors text-xs",K?ep?"bg-lv-text-primary text-lv-text-inverse":"border border-lv-border bg-lv-card text-lv-text-secondary hover:bg-lv-hover":"border border-lv-border bg-lv-card text-lv-text-tertiary cursor-not-allowed opacity-60"].join(" "),"aria-pressed":ep,children:[(0,l.jsx)(p.Z,{size:14}),(0,l.jsx)("span",{className:"font-medium",children:"View A.I"}),(0,l.jsxs)("span",{className:ep?"opacity-70":"text-lv-text-tertiary",children:[eQ,"x"]})]})})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,l.jsxs)(W,{onClick:e=>eL(ew?null:e.currentTarget),children:[(0,l.jsx)(h.Z,{size:14,className:"text-lv-text-secondary"}),(0,l.jsx)("span",{className:"font-medium",children:to}),(0,l.jsx)(x.Z,{size:12,className:"text-lv-text-tertiary"})]}),(0,l.jsx)(N.Z,{anchorEl:ew,open:!!ew,onClose:()=>eL(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},minWidth:260,items:tx}),(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2.5 py-1.5 rounded-lg border border-lv-border bg-lv-card",children:[(0,l.jsx)(y.Z,{ref:eZ,balanceData:eD,loading:eP,fallbackBalance:F,suppressCard:eA,onActivate:()=>eI(!0),onHoverOpenChange:ez}),(0,l.jsx)("div",{className:"w-px h-3 bg-lv-border"}),(0,l.jsx)(C.Z,{title:"Estimated cost for ".concat(Math.max(1,P)," listing").
1concat(1===P?"":"s",": ").concat(e8),placement:"top",children:(0,l.jsx)("span",{className:["font-semibold tabular-nums",e3?"text-lv-error":"text-lv-text-primary"].join(" "),children:e8})})]}),G?(0,l.jsx)("button",{type:"button",disabled:!0,"aria-label":"Generating",className:"p-2 rounded-lg flex items-center justify-center bg-lv-text-primary text-lv-text-inverse cursor-wait",children:(0,l.jsx)(v.Z,{size:16,className:"animate-spin"})}):X.length>0?(0,l.jsx)(B,{onAccept:et,onRegenerate:en,onDiscard:el}):(0,l.jsx)("button",{type:"button",onClick:()=>{if(!e6)return;let e=e5.includes("price")?(0,S.RB)(ej):"";null==ee||ee({prompt:ea.trim(),model:eG,options:eu,additionalFields:{viewAi:ep},tasks:e5,descriptionMode:eg,...e?{pricingInstructions:e}:{},totalCost:e8})},disabled:!e6,"aria-label":"Generate",className:["p-2 rounded-lg flex items-center justify-center transition-colors",e6?"bg-lv-text-primary text-lv-text-inverse hover:opacity-90":"bg-lv-elevated text-lv-text-tertiary cursor-not-allowed"].join(" "),children:(0,l.jsx)(m.Z,{size:16})})]})]}),th=void 0!==$,tv=!!$,tm=th?(0,l.jsx)("div",{className:tv?"flex items-center gap-2 px-3 pb-2":"px-3",children:(0,l.jsx)("span",{"aria-live":"polite",className:"min-w-0 flex-1 truncate text-lv-caption text-lv-text-secondary",children:$})}):null,tg=ei&&I.sZ?(0,l.jsxs)("div",{className:ts?"flex items-center gap-2 px-3 pb-2":"px-3",children:[(0,l.jsx)("div",{className:"min-w-0 flex-1",children:(0,l.jsx)(A,{statusLine:tl,stageLabel:tn,trailingAction:tr?(0,l.jsx)(i.default,{href:"/dashboard/settings/ai#tag-strategy",target:"_blank",rel:"noopener noreferrer","aria-label":z.QZ.tagStrategyChangeAriaLabel,className:"inline-flex min-h-[24px] items-center rounded-lv-xs px-1 text-xs leading-4 text-lv-selected-strong underline underline-offset-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-lv-focus",children:z.QZ.tagStrategyChangeLabel}):null})}),ti&&(0,l.jsx)(L.ZP,{before:null==ei?void 0:ei.scoreBefore,after:null==ei?void 0:ei.scoreAfter,breakdown:null==ei?void 0:ei.scoreBreakdown,size:"sm",impressionKey:null==ei?void 0:ei.generationSeq,surface:es})]}):null;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(k.ZP,{bottom:er,open:eO||eB,onOpenChange:function(e){let{reason:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};eV(e),e||"escape"!==t||(eR(!1),eN(null),eM(null),eL(null),eH())},expandOnHover:!0,showFooterWhenCollapsed:!0,title:"Listing AI assistant",triggerLabel:"Open listing AI assistant",closeLabel:"Close listing AI assistant",occupiedHeight:180+(ts?24:0)+(tv?24:0)+e1,width:680,desktopMaxHeight:160+e1,footer:tm||tg?(0,l.jsxs)(l.Fragment,{children:[tp,tm,tg]}):tp,children:(0,l.jsx)("div",{className:"px-3 pt-3",children:(0,l.jsxs)("div",{className:"rounded-xl border border-lv-border bg-lv-card px-3 py-2",children:[(0,l.jsx)("textarea",{value:ea,onChange:e=>eo(e.target.value),onFocus:()=>eR(!0),onBlur:()=>eR(!1),rows:3,placeholder:"Write a custom prompt",className:"w-full resize-none bg-transparent text-xs leading-5 text-lv-text-primary outline-none placeholder:text-lv-text-tertiary"}),e0&&(0,l.jsx)(D,{images:q})]})})}),(0,l.jsx)(w.default,{open:eA,onClose:()=>eI(!1),onPurchaseSuccess:e=>{eF(t=>({...t,balance:{...null==t?void 0:t.balance,totalAvailable:e}}))}})]})}function B(e){let{onAccept:t,onRegenerate:n,onDiscard:i}=e,[s,a]=(0,r.useState)(!1);return(0,l.jsxs)("div",{className:"relative",onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),children:[s&&(0,l.jsxs)("div",{className:"absolute right-0 bottom-full flex flex-col gap-1 pb-1",children:[(0,l.jsx)(C.Z,{title:"Regenerate",placement:"left",children:(0,l.jsx)("button",{type:"button",onClick:n,"aria-label":"Regenerate",className:"p-2 rounded-lg flex items-center justify-center border border-lv-border bg-lv-card text-lv-text-primary hover:bg-lv-hover transition-colors shadow-sm",children:(0,l.jsx)(g.Z,{size:16})})}),(0,l.jsx)(C.Z,{title:"Discard",placement:"left",children:(0,l.jsx)("button",{type:"button",onClick:i,"aria-label":"Discard AI changes",className:"p-2 rounded-lg flex items-center justify-center border border-lv-border bg-lv-card text-lv-error hover:bg-lv-error-bg transition-colors shadow-sm",children:(0,l.jsx)(b.Z,{size:16})})})]}),(0,l.jsx)(C.Z,{title:"Accept all changes",placement:"left",children:(0,l.jsx)("button",{type:"button",onClick:t,"aria-label":"Accept all AI changes",className:"p-2 rounded-lg flex items-center justify-center bg-lv-selected text-white hover:opacity-90 transition-colors",children:(0,l.jsx)(f.Z,{size:16})})})]})}function D(e){let{images:t,cap:n=H.KV,maxThumbnails:i=6}=e,s=(0,r.useMemo)(()=>(0,H.lt)(t,n),[t,n]),{sent:a,dropped:o}=s,{emptyNote:c,overLimitNote:d,tileRow:u}=E(s,i),x=a.slice(0,i),p=a.length-x.length;return(0,l.jsxs)("div",{"data-testid":"view-ai-image-strip",className:"mt-2 border-t border-lv-border-divider-subtle pt-2",children:[c&&(0,l.jsx)("p",{"data-testid":"view-ai-image-strip-empty-note",className:"text-lv-caption text-lv-text-tertiary",children:"No listing photos will be sent with this request"}),d&&(0,l.jsx)("p",{"data-testid":"view-ai-image-strip-over-limit-note",className:"text-lv-caption text-lv-text-tertiary",children:"".concat(o.length," over the limit won't be sent")}),u&&(0,l.jsxs)("ul",{tabIndex:0,"aria-label":"Images that will be sent to the AI",className:["flex items-center gap-1.5 overflow-x-auto rounded-lv-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-lv-focus",c||d?"mt-1.5":""].filter(
1Boolean).join(" "),children:[x.map(e=>{let{src:t,listingIndex:n}=e;return(0,l.jsx)(P,{src:t,alt:"Image ".concat(n+1," of the listing — will be sent to the AI")},"sent-".concat(n))}),p>0&&(0,l.jsx)(F,{label:"+".concat(p),description:"".concat(p," more image").concat(1===p?"":"s"," will also be sent to the AI")}),o.length>0&&(0,l.jsx)(F,{muted:!0,label:"+".concat(o.length),description:"".concat(o.length," image").concat(1===o.length?"":"s"," over the limit — not sent to the AI")})]})]})}function P(e){let{src:t,alt:n}=e,[i,s]=(0,r.useState)(!1);return(0,l.jsx)("li",{className:"flex h-11 w-11 shrink-0 items-center justify-center overflow-hidden rounded-lv-sm border border-lv-border-media bg-lv-chip",children:i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(j.Z,{size:14,className:"text-lv-text-tertiary","aria-hidden":"true"}),(0,l.jsxs)("span",{className:"sr-only",children:[n," (preview unavailable)"]})]}):(0,l.jsx)("img",{src:t,alt:n,onError:()=>s(!0),className:"h-full w-full object-cover"})})}function F(e){let{label:t,description:n,muted:r=!1}=e;return(0,l.jsxs)("li",{className:["flex h-11 w-11 shrink-0 items-center justify-center rounded-lv-sm border border-lv-border-media bg-lv-chip text-lv-caption tabular-nums",r?"text-lv-text-tertiary opacity-60":"text-lv-text-secondary"].join(" "),children:[(0,l.jsx)("span",{"aria-hidden":"true",children:t}),(0,l.jsx)("span",{className:"sr-only",children:n})]})}function W(e){let{onClick:t,children:n}=e;return(0,l.jsx)("button",{type:"button",onClick:t,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border border-lv-border bg-lv-card text-lv-text-primary hover:bg-lv-hover transition-colors text-xs",children:n})}function T(e){let{value:t,onChange:n}=e,i=(0,r.useId)(),s=(0,r.useId)(),a=t.length>=1800;return(0,l.jsxs)("div",{className:"px-2.5 pb-1.5",children:[(0,l.jsx)("label",{htmlFor:i,className:"sr-only",children:"Pricing instructions"}),(0,l.jsx)("textarea",{id:i,rows:3,value:t,maxLength:S.de,onChange:e=>n(e.target.value),onKeyDown:e=>{"Escape"!==e.key&&"Tab"!==e.key&&e.stopPropagation()},onClick:e=>e.stopPropagation(),"aria-describedby":a?s:void 0,placeholder:'e.g. "make one variation 20% cheaper than the rest, and price 2XL and 3XL higher"',className:"w-full resize-none rounded-lv-md border border-lv-border bg-lv-field px-2 py-1.5 text-lv-caption text-lv-text-primary placeholder:text-lv-text-tertiary outline-none focus-visible:ring-2 focus-visible:ring-lv-focus"}),a&&(0,l.jsxs)("p",{id:s,className:"mt-0.5 text-right text-lv-caption text-lv-text-tertiary tabular-nums",children:[t.length," / ",S.de]})]})}function _(e){let{icon:t,label:n,cost:i,checked:s,onClick:a,disabled:o=!1,reason:c}=e,d=(0,r.useId)(),u=o&&!!c;return(0,l.jsxs)("div",{className:o?"opacity-60":void 0,children:[(0,l.jsxs)("button",{type:"button",role:"menuitemcheckbox","aria-checked":s,"aria-describedby":u?d:void 0,disabled:o,onClick:o?void 0:a,className:["flex w-full items-center gap-2 px-2.5 py-[6px] rounded-md text-xs font-medium text-lv-text-primary transition-colors text-left",o?"cursor-not-allowed":"hover:bg-lv-hover"].join(" "),children:[t&&(0,l.jsx)("span",{className:"flex-shrink-0",children:t}),(0,l.jsx)("span",{className:"flex-1",children:n}),null!=i&&(0,l.jsx)("span",{className:"text-[11px] text-lv-text-tertiary tabular-nums",children:i}),(0,l.jsx)("span",{"aria-hidden":"true",className:["w-4 h-4 rounded-lv-xs flex items-center justify-center flex-shrink-0",s?"bg-lv-text-primary":"border border-lv-border"].join(" "),children:s&&(0,l.jsx)(f.Z,{size:12,className:"text-lv-text-inverse"})})]}),u&&(0,l.jsx)("p",{id:d,className:"px-2.5 pb-1 text-lv-caption text-lv-text-tertiary whitespace-normal",children:c})]})}},88159:function(e,t,n){n.d(t,{ZP:function(){return k},p7:function(){return j}});var l=n(57437),r=n(2265),i=n(70525),s=n(3085),a=n(43792),o=n(66280),c=n(11217),d=n(74315),u=n(59497),x=n(60577),p=n(15127);let h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,v=Object.freeze(Object.keys(c.HE.factors));function m(e){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&""===e.trim())return null;let t=Number(e);return Number.isFinite(t)?t:null}let g=Object.freeze({IMPROVED:"improved",WORSENED:"worsened"}),b=Object.freeze({sm:{pill:"gap-1 px-1.5 py-0.5 text-[11px] leading-4",icon:11},md:{pill:"gap-1 px-2 py-0.5 text-[12px] leading-5",icon:12}});function f(e){return"number"==typeof e&&Number.isFinite(e)?Math.round(e):null}function j(e,t){let n=f(e),l=f(t);return null!==n&&null!==l&&n!==l}function k(e){var t,n;let{before:j,after:k,breakdown:y,size:N="md",surface:C,impressionKey:M}=e,w=f(j),L=f(k),Z=(0,x.d)(),{inline:S,tooltip:z}=(0,r.useMemo)(()=>(0,c.RR)(y),[y]),A=(0,r.useMemo)(()=>(function(e){if(!e||"object"!=typeof e)return[];let t=[];return v.forEach(n=>{let l=h(e,n);if(!l||"object"!=typeof l)return;let r=m(l.delta);if(null===r){let e=m(l.before),t=m(l.after);r=null===e||null===t?null:t-e}null!==r&&0!==r&&t.push({factor:n,delta:r})}),t.sort((e,t)=>
1Math.abs(t.delta)-Math.abs(e.delta))})(y),[y]),I=null!==w&&null!==L&&w!==L,H=(0,r.useRef)(null);if((0,r.useEffect)(()=>{if(!I)return;let e="".concat(w,"→").concat(L,"@").concat(null!=C?C:"","#").concat(null!=M?M:"");H.current!==e&&(H.current=e,(0,p.L)("seo_score_delta_shown",{before:w,after:L,...C?{surface:C}:{},...A.length>0?{factors:A}:{}}))},[I,w,L,C,M,A]),!I)return null;let O=L>w,V=O?g.IMPROVED:g.WORSENED,E=O?i.Z:s.Z,R=null!==(t=h(b,N))&&void 0!==t?t:b.md,B=z?"".concat((0,o.Yn)(w,L)," ").concat("\xb7"," ").concat(z):(0,o.Yn)(w,L),D=(0,l.jsxs)("span",{role:"img","aria-label":B,tabIndex:0,"data-testid":"score-delta-badge","data-direction":V,className:"inline-flex shrink-0 items-center whitespace-nowrap rounded-full font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-lv-focus ".concat(R.pill," ").concat(null!==(n=h(d.OD,(0,u.VY)(L)))&&void 0!==n?n:""),children:[(0,l.jsx)(E,{size:R.icon,strokeWidth:2.5,"aria-hidden":"true",className:"shrink-0"}),(0,l.jsx)("span",{children:"".concat(w," ").concat(o.QZ.scoreDeltaSeparator," ").concat(L)}),!!S&&!Z&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{"aria-hidden":"true",children:"\xb7"}),(0,l.jsx)("span",{"data-testid":"score-delta-suffix",className:"border-b border-dashed border-lv-border-media",children:S})]})]});return(0,l.jsx)(a.Z,{title:z,placement:"top",stableChild:!0,children:D})}},2971:function(e,t,n){n.d(t,{Ij:function(){return o},ON:function(){return a},wq:function(){return s}});var l=n(57437);let r="var(--lv-selected)",i="var(--lv-text-tertiary)",s=[{value:"contain",tooltip:"Fit — scale to fit side-to-side (may letterbox)",icon:e=>{let t=e?r:i;return(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 12 12",fill:"none",children:[(0,l.jsx)("path",{d:"M7.3589 6.0343H10.0096M10.0096 6.0343L8.94932 4.97364M10.0096 6.0343L8.94932 7.09496M3.11778 7.09496L2.0575 6.0343M2.0575 6.0343L3.11778 4.97364M2.0575 6.0343H4.7082",stroke:t,strokeWidth:"0.624888",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M1 3.22222V2.11111C1 1.81643 1.11702 1.53381 1.32532 1.32544C1.53362 1.11706 1.81613 1 2.11071 1H3.22143M8.775 1H9.88571C10.1803 1 10.4628 1.11706 10.6711 1.32544C10.8794 1.53381 10.9964 1.81643 10.9964 2.11111V3.22222M10.9964 8.77778V9.88889C10.9964 10.1836 10.8794 10.4662 10.6711 10.6746C10.4628 10.8829 10.1803 11 9.88571 11H8.775M3.22143 11H2.11071C1.81613 11 1.53362 10.8829 1.32532 10.6746C1.11702 10.4662 1 10.1836 1 9.88889V8.77778",stroke:t,strokeWidth:"1.11091",strokeLinecap:"round",strokeLinejoin:"round"})]})}},{value:"cover",tooltip:"Cover — scale to fill the entire region (may crop edges)",icon:e=>{let t=e?r:i;return(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 12 12",fill:"none",children:[(0,l.jsx)("path",{d:"M6.97119 5.09644L8.84552 3.22144M8.84552 3.22144L7.34606 3.22144M8.84552 3.22144L8.84552 4.72144M5.09686 5.09644L3.22253 3.22144M3.22253 3.22144L4.722 3.22144M3.22253 3.22144L3.22253 4.72144M7.34606 8.84644L8.84552 8.84644M8.84552 8.84644L8.84552 7.34644M8.84552 8.84644L6.97119 6.97144M4.722 8.84644L3.22253 8.84644M3.22253 8.84644L3.22253 7.34644M3.22253 8.84644L5.09686 6.97144",stroke:t,strokeWidth:"0.624888",strokeLinecap:"round",strokeLinejoin:"round"}),(0,l.jsx)("path",{d:"M1 3.22222V2.11111C1 1.81643 1.11702 1.53381 1.32532 1.32544C1.53362 1.11706 1.81613 1 2.11071 1H3.22143M8.775 1H9.88571C10.1803 1 10.4628 1.11706 10.6711 1.32544C10.8794 1.53381 10.9964 1.81643 10.9964 2.11111V3.22222M10.9964 8.77778V9.88889C10.9964 10.1836 10.8794 10.4662 10.6711 10.6746C10.4628 10.8829 10.1803 11 9.88571 11H8.775M3.22143 11H2.11071C1.81613 11 1.53362 10.8829 1.32532 10.6746C1.11702 10.4662 1 10.1836 1 9.88889V8.77778",stroke:t,strokeWidth:"1.11091",strokeLinecap:"round",strokeLinejoin:"round"})]})}}],a=[{value:"left",tooltip:"Align left",icon:e=>{let t=e?r:i;return(0,l.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 10 8",fill:"none",children:(0,l.jsx)("path",{d:"M0.5 7.5V0.5M5.5 1L2.5 4M2.5 4L5.5 7M2.5 4H9.5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})})}},{value:"center",tooltip:"Align center (horizontal)",icon:e=>{let t=e?r:i;return(0,l.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 11 11",fill:"none",children:(0,l.jsx)("path",{d:"M5.5 0.5V10.5M3.5 4.5H1.5C1.23478 4.5 0.98043 4.39464 0.792893 4.20711C0.605357 4.01957 0.5 3.76522 0.5 3.5V2.5C0.5 1.95 0.95 1.5 1.5 1.5H3.5M7.5 4.5H9.5C9.76522 4.5 10.0196 4.39464 10.2071 4.20711C10.3946 4.01957 10.5 3.76522 10.5 3.5V2.5C10.5 2.23478 10.3946 1.98043 10.2071 1.79289C10.0196 1.60536 9.76522 1.5 9.5 1.5H7.5M3.5 9.5H3C2.73478 9.5 2.48043 9.39464 2.29289 9.20711C2.10536 9.01957 2 8.76522 2 8.5V7.5C2 6.95 2.45 6.5 3 6.5H3.5M7.5 6.5H8C8.26522 6.5 8.51957 6.60536 8.70711 6.79289C8.89464 6.98043 9 7.23478 9 7.5V8.5C9 8.76522 8.89464 9.01957 8.70711 9.20711C8.51957 9.39464 8.26522 9.5 8 9.5H7.5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})})}},{value:"right",tooltip:"Align right",icon:e=>{let t=e?r:i;return(0,l.jsx)("svg",{width:"14",height:"11",viewBox:"0 0 10 8",fill:"none",children:(0,l.jsx)("path",{d:"M7.5 4H0.5M7.5 4L4.5 7M7.5 4L4.5 1M9.5 0.5V7.5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})})}}],o=[{value:"top",tooltip:"Align top",icon:e=>{let t=e?r:i;return(0,l.jsx)("svg",{width:"11",height:"14",viewBox:"0 0 8 10",fill:"none",children:(0,l.jsx)("path",{d:"M0.5 0.5H7.5M7 5.5L4 2.5M4 2.5L1 5.5M4 2.5V9.5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})})}},{value:"center",tooltip:"Align center (vertical)",icon:e=>{let t=e?r:i;return(0,l.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 11 11",fill:"none",children:(0,l.jsx)("path",{d:"M0.5 5.5H10.5M4.5 7.5V9.5C4.5 9.76522 4.39464 10.0196 4.20711 10.2071C4.01957 10.3946 3.76522 10.5 3.5 10.5H2.5C2.23478 10.5 1.98043 10.3946 1.79289 10.2071C1.60536 10.0196 1.5 9.76522 1.5 9.5V7.5M4.5 3.5V1.5C4.5 1.23478 4.39464 0.98043 4.20711 0.792893C4.01957 0.605357 3.76522 0.5 3.5 0.5H2.5C2.23478 0.5 1.98043 0.605357 1.79289 0.792893C1.60536 0.98043 1.5 1.23478 1.5 1.5V3.5M9.5 7.5V8C9.5 8.26522 9.39464 8.51957 9.20711 8.70711C9.01957 8.89464 8.76522 9 8.5 9H7.5C7.23478 9 6.98043 8.89464 6.79289 8.70711C6.60536 8.51957 6.5 8.26522 6.5 8V7.5M6.5 3.5V3C6.5 2.45 6.95 2 7.5 2H8.5C8.76522 2 9.01957 2.10536 9.20711 2.29289C9.39464 2.48043 9.5 2.73478 9.5 3V3.5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})})}},{value:"bottom",tooltip:"Align bottom",icon:e=>{let t=e?r:i;return(0,l.jsx)("svg",{width:"11",height:"14",viewBox:"0 0 8 10",fill:"none",children:(0,l.jsx)("path",{d:"M4 7.5V0.5M4 7.5L1 4.5M4 7.5L7 4.5M7.5 9.5H0.5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})})}}]}}]);

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.