1import{j as e,L as n}from"./react-vendor-BDHNqS4B.js";import{b as z}from"./Header-BkbupWq-.js";import{F as $}from"./Footer-CtylQEAH.js";import{a_ as A,A as y,B as c,X as _,b as j,n as M}from"./main-m_sUF2N4.js";import{u as H}from"./useSEO-CoArDrdl.js";import{a as I,T as R,g as f}from"./usePriceReviewProducts-BeYKlbKA.js";import{R as O}from"./ReviewPriceDisplay-DfIoLGNY.js";import{P as E}from"./ProductReviewRatingBadge-CyxkMrfM.js";import{g,s as p,j as k}from"./priceReviewPricing-BlvAWvXm.js";import{C as L,A as T}from"./chevron-right-CpkQxGj-.js";import{S as W}from"./scale-B2l5za8q.js";import{S as C}from"./store-DWI30bPC.js";import{Z as U}from"./zap-CowlN_Ex.js";import{S as V}from"./shield-check-we62WOC3.js";import{E as B}from"./external-link-BIpC4MGv.js";import{S as Z}from"./sparkles-BcmYxR0H.js";import{C as F}from"./check-DS0-tR9o.js";import"./amplify-DYDcjoow.js";import"./tag-D40gy_Nl.js";import"./query-7-WHkg5t.js";import"./textarea-D7qsgB_p.js";import"./reportService-tEzofQZ6.js";import"./phone-B2rvvDkK.js";import"./type-CVgQCqWZ.js";import"./priceReviewApi-BFijUeFQ.js";import"./star-Dim9pf51.js";const q=[{key:"lowest",label:"æä½å¹"},{key:"savings",label:"æ
³å¹
"},{key:"stores",label:"åºèæ¸é"},{key:"bestStore",label:"æä½åºè"},{key:"highest",label:"æé«å ±å¹"},{key:"size",label:"è¦æ ¼"}],Re=()=>{const{ids:s,remove:r,clear:t,max:o}=A(),{data:x,isLoading:l,isError:m,error:d}=I(s),i=(x==null?void 0:x.items)||[];if(H({title:"ç¢åæ¯è¼ | PetWell Review",description:"ä¸¦ææ¯è¼å¯µç©ç¨åç坦广 ¼ãåºèæ¸éåæä½å ±å¹ã",canonicalUrl:"https://petwellhk.com/compare",noindex:!0}),s.length===0)return e.jsx(S,{max:o});const v=i.length>0?Math.min(...i.map(a=>g(a).lowestPrice)):0,u=i.length>0?Math.max(...i.map(a=>a.storeCount)):0,h=i.length>0?Math.max(...i.map(a=>p(a))):0;return e.jsxs("div",{className:"review-page min-h-screen",children:[e.jsx(z,{}),e.jsx("div",{className:"border-b border-[hsl(var(--review-line))] bg-white",children:e.jsxs("div",{className:"container mx-auto flex items-center gap-1 overflow-x-auto whitespace-nowrap px-4 py-2.5 text-[12px] text-muted-foreground",children:[e.jsxs(n,{to:"/review",className:"inline-flex items-center gap-1 hover:text-primary",children:[e.jsx(y,{className:"h-3 w-3"})," æ ¼å¹"]}),e.jsx(L,{className:"h-3 w-3 shrink-0 opacity-40"}),e.jsx("span",{className:"font-medium text-foreground",children:"ç¢åæ¯è¼"})]})}),e.jsxs("section",{className:"container mx-auto px-4 py-4 md:py-6",children:[e.jsxs("div",{className:"review-panel overflow-hidden bg-white",children:[e.jsxs("div",{className:"flex flex-col gap-4 border-b border-[hsl(var(--review-line))] p-4 sm:flex-row sm:items-center sm:justify-between md:p-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-2",children:[e.jsxs("span",{className:"review-chip inline-flex items-center gap-1 border border-primary/20 bg-secondary/60 px-2 py-0.5 text-[11px] font-semibold text-primary",children:[e.jsx(W,{className:"h-3 w-3"}),"ç¢åæ¯è¼"]}),e.jsxs("span",{className:"review-stat-pill px-2 py-0.5 text-[11px] text-muted-foreground",children:[s.length," / ",o," ä»¶"]})]}),e.jsx("h1",{className:"review-display text-xl leading-snug md:text-2xl",children:"ä¸¦ææ¯è¼å ±å¹"}),e.jsx("p",{className:"mt-1.5 text-[13px] text-muted-foreground",children:"並æçæ¸
æ¥éæ¬¾ææµãééåºèæå¤é¸æã"})]}),e.jsxs("div",{className:"flex shrink-0 gap-2",children:[e.jsx(c,{variant:"outline",size:"sm",asChild:!0,className:"h-8 rounded-md border-[hsl(var(--review-line))] text-[12px]",children:e.jsxs(n,{to:"/review",children:[e.jsx(y,{className:"mr-1 h-3.5 w-3.5"}),"ç¹¼çºæ ¼å¹"]})}),e.jsx(c,{variant:"outline",size:"sm",onClick:t,className:"h-8 rounded-md border-[hsl(var(--review-line))] text-[12px]",children:"æ¸
é¤å
¨é¨"})]})]}),i.length>0&&!l&&e.jsxs("div",{className:"grid grid-cols-3 divide-x divide-[hsl(var(--review-line))] border-b border-[hsl(var(--review-line))]",children:[e.jsx(w,{icon:R,label:"æä½å¹",value:k(v)}),e.jsx(w,{icon:C,label:"æå¤åºè",value:`${u} é`}),e.jsx(w,{icon:U,label:"æå¤§æ
³å¹
",value:h>0?`${h}%`:"â"})]})]}),e.jsxs("p",{className:"mt-3 flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[e.jsx(V,{className:"h-3.5 w-3.5 shrink-0 text-primary"}),"广 ¼æ¯æ¥æ´æ° · è½å®åè«ä»¥åºèé é¢çºæº"]})]}),e.jsx("section",{className:"container mx-auto px-4 pb-8 md:pb-10",children:l?e.jsx(Q,{}):m?e.jsx(Y,{message:d.message}):i.length===0?e.jsx(S,{max:o}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"space-y-2 md:hidden",children:i.map(a=>e.jsx(J,{product:a,onRemove:()=>r(a.id),bestPrice:v,bestStores:u,bestSavings:h},a.id))}),e.jsx("div",{className:"review-panel hidden overflow-hidden bg-white md:block",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("div",{className:"review-stagger min-w-max",style:{display:"grid",gridTemplateColumns:`132px repeat(${i.length}, minmax(220px, 1fr))`},children:[e.jsx("div",{className:"border-b border-r border-[hsl(var(--review-line))] bg-[hsl(var(--review-canvas))]/50 p-4"}),i.map(a=>e.jsx(D,{product:a,onRemove:()=>r(a.id)},a.id)),q.map(a=>e.jsx(G,{label:a.label,products:i,rowKey:a.key,bestPrice:v,bestStores:u,bestSavings:h},a.key)),e.jsx("div",{className:"border-r border-[hsl(var(--review-line))] bg-[hsl(var(--review-canvas))]/50 p-4 text-[12px] font-medium text-muted-foreground",children:"è¡å"}),i.map(a=>{var P;return e.jsx("div",{className:"border-b border-[hsl(var(--review-line))] p-4 last:border-b-0",children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(c,{asChild:!0,size:"sm",className:"h-8 flex-1 rounded-md text-[12px]",children:e.jsx(n,{to:f(a),children:"ç詳æ
"})}),((P=a.topOffers[0])==null?void 0:P.url)&&e.jsx(c,{asChild:!0,size:"sm",variant:"outline",className:"h-8 rounded-md border-[hsl(var(--review-line))] px-2.5",children:e.jsx("a",{href:a.topOffers[0].url,target:"_blank",rel:"noopener noreferrer","aria-label":"å»åºè購買",children:e.jsx(B,{className:"h-3.5 w-3.5"})})})]})},`actions-${a.id}`)})]})})})]})}),e.jsx("section",{className:"border-t border-[hsl(var(--review-line))] bg-white",children:e.jsxs("div",{className:"container mx-auto grid gap-6 px-4 py-8 md:grid-cols-[1.4fr_1fr] md:py-10",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[12px] text-muted-foreground",children:"éæ¼ PetWell æ ¼å¹"}),e.jsxs("h2",{className:"review-display mt-2 text-xl leading-snug md:text-2xl",children:["æååè³£å¢ï¼åªä¿å¹«ä½ ",e.jsx("span",{className:"text-primary",children:"çæ¸
æ¥"}),"å¹é¢"]}),e.jsx("p",{className:"mt-2 max-w-lg text-[14px] leading-relaxed text-muted-foreground",children:"ææå¹æ ¼ç± PetWell ç·¨
1è¼¯é¨æ´çèªé¦æ¸¯å¯µç©åºå
¬éå ±å¹ã广 ¼è庫åå¯è½é¨æè®åï¼è½å®åè«ä»¥åºèé é¢çºæºã"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(N,{icon:Z,label:"æ³æåå 鿬¾ï¼",sub:"WhatsApp 編輯é¨",href:"https://wa.me/85255954078"}),e.jsx(N,{icon:C,label:"åºä¸»åä½",sub:"å å
¥æ¯å¹è¯ç",href:"/other-services",internal:!0}),e.jsx(N,{icon:R,label:"æ ¼å¹å
¬å¹³å®å",sub:"é»è§£ä¿¡å¾é",href:"/about",internal:!0})]})]})}),e.jsx($,{})]})};function D({product:s,onRemove:r}){return e.jsxs("div",{className:"relative border-b border-r border-[hsl(var(--review-line))] p-4 last:border-r-0",children:[e.jsx("button",{type:"button",onClick:r,"aria-label":"ç§»é¤",className:"absolute right-3 top-3 flex h-7 w-7 items-center justify-center rounded-md border border-[hsl(var(--review-line))] bg-white text-muted-foreground transition-colors hover:border-primary/30 hover:text-foreground",children:e.jsx(_,{className:"h-3.5 w-3.5"})}),e.jsxs("div",{className:"pr-8",children:[e.jsx(n,{to:f(s),className:"group mb-3 block aspect-square max-h-[120px] overflow-hidden rounded-md bg-[hsl(var(--review-canvas))]/40 p-2",children:s.image?e.jsx("img",{src:s.image,alt:s.name,className:"h-full w-full object-contain transition-transform duration-300 group-hover:scale-[1.03]"}):e.jsx("div",{className:"flex h-full items-center justify-center text-[12px] text-muted-foreground",children:"â"})}),e.jsx(n,{to:`/review/brand/${encodeURIComponent(s.brand)}`,className:"review-chip mb-1.5 inline-block border border-primary/20 bg-secondary/60 px-2 py-0.5 text-[10px] font-semibold text-primary hover:border-primary/40",children:s.brand}),e.jsx(n,{to:f(s),children:e.jsx("p",{className:"line-clamp-2 text-[13px] font-semibold leading-snug text-foreground hover:text-primary",children:s.name})}),e.jsx(E,{avgRating:s.avgRating,numReviews:s.numReviews,className:"mt-1.5"})]})]})}function G({label:s,products:r,rowKey:t,bestPrice:o,bestStores:x,bestSavings:l}){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-b border-r border-[hsl(var(--review-line))] bg-[hsl(var(--review-canvas))]/50 p-4 text-[12px] font-medium text-muted-foreground",children:s}),r.map(m=>{const d=K(m,t,o,x,l),i=ee(m,t);return e.jsx("div",{className:j("border-b border-r border-[hsl(var(--review-line))] p-4 text-center last:border-r-0",d&&"bg-primary/[0.04]"),children:t==="lowest"?e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx(O,{product:m,size:"sm",highlight:d}),d&&e.jsxs("span",{className:"review-savings-pill inline-flex items-center gap-0.5 rounded-sm px-1.5 py-0.5 text-[10px]",children:[e.jsx(F,{className:"h-3 w-3"})," ææµ"]})]}):t==="savings"?e.jsx("div",{className:"flex flex-col items-center gap-1",children:p(m)>0?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:j("text-[14px] font-bold",d?"text-primary":"text-foreground"),children:[p(m),"%"]}),d&&e.jsx("span",{className:"text-[10px] font-medium text-primary",children:"æ
³æå¤"})]}):e.jsx("span",{className:"text-[13px] text-muted-foreground",children:"â"})}):e.jsx(X,{value:i,highlight:d})},`${t}-${m.id}`)})]})}function X({value:s,highlight:r}){return e.jsxs("p",{className:j("text-[13px]",r?"font-semibold text-primary":"text-foreground"),children:[r&&e.jsx(F,{className:"mr-1 inline h-3.5 w-3.5"}),s]})}function J({product:s,onRemove:r,bestPrice:t,bestStores:o,bestSavings:x}){var u,h;const l=p(s),d=g(s).lowestPrice===t,i=s.storeCount===o,v=l===x&&l>0;return e.jsxs("article",{className:"review-panel review-card-product overflow-hidden bg-white",children:[e.jsxs("div",{className:"flex gap-3 p-3",children:[e.jsxs(n,{to:f(s),className:"relative block h-[88px] w-[88px] shrink-0 overflow-hidden rounded-md bg-[hsl(var(--review-canvas))]/40 p-1.5",children:[s.image?e.jsx("img",{src:s.image,alt:s.name,className:"h-full w-full object-contain"}):e.jsx("div",{className:"flex h-full items-center justify-center text-[11px] text-muted-foreground",children:"â"}),l>0&&e.jsxs("span",{className:"review-savings-pill absolute left-1 top-1 rounded-sm px-1 py-px text-[9px] leading-none",children:["æ
³",l,"%"]})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(n,{to:`/review/brand/${encodeURIComponent(s.brand)}`,className:"review-chip mb-1 inline-block border border-primary/20 bg-secondary/60 px-1.5 py-px text-[10px] font-semibold text-primary",children:s.brand}),e.jsx(n,{to:f(s),children:e.jsx("h3",{className:"line-clamp-2 text-[13px] font-semibold leading-snug text-foreground hover:text-primary",children:s.name})}),e.jsx(E,{avgRating:s.avgRating,numReviews:s.numReviews,className:"mt-1"})]}),e.jsx("button",{type:"button",onClick:r,"aria-label":"ç§»é¤",className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-[hsl(var(--review-line))] text-muted-foreground hover:text-foreground",children:e.jsx(_,{className:"h-3.5 w-3.5"})})]}),e.jsxs("div",{className:"mt-3 grid grid-cols-3 gap-1.5",children:[e.jsx(b,{label:"æä½å¹",active:d,children:e.jsx(O,{product:s,size:"xs",highlight:d,showPurchaseNote:!1})}),e.jsx(b,{label:"åºè",active:i,children:e.jsxs("span",{className:j("text-[13px] font-bold",i&&"text-primary"),children:[s.storeCount," é"]})}),e.jsx(b,{label:"æ
³å¹
",active:v,children:e.jsx("span",{className:j("text-[13px] font-bold",v?"text-primary":"text-foreground"),children:l>0?`${l}%`:"â"})})]}),e.jsxs("p",{className:"mt-2 flex items-center gap-1 text-[11px] text-muted-foreground",children:[e.jsx(C,{className:"h-3 w-3 shrink-0"}),((u=s.topOffers[0])==null?void 0:u.store)||"â"]}
1)]})]}),e.jsxs("div",{className:"flex gap-2 border-t border-[hsl(var(--review-line))] p-3",children:[e.jsx(c,{asChild:!0,size:"sm",className:"h-8 flex-1 rounded-md text-[12px]",children:e.jsx(n,{to:f(s),children:"ç詳æ
"})}),((h=s.topOffers[0])==null?void 0:h.url)&&e.jsx(c,{asChild:!0,size:"sm",variant:"outline",className:"h-8 rounded-md border-[hsl(var(--review-line))] px-3 text-[12px]",children:e.jsxs("a",{href:s.topOffers[0].url,target:"_blank",rel:"noopener noreferrer",children:["å»è³¼è²· ",e.jsx(B,{className:"ml-1 h-3 w-3"})]})})]})]})}function b({label:s,active:r,children:t}){return e.jsxs("div",{className:j("rounded-md border px-2 py-1.5 text-center",r?"border-primary/20 bg-primary/[0.05]":"border-[hsl(var(--review-line))] bg-[hsl(var(--review-canvas))]/30"),children:[e.jsx("p",{className:"text-[10px] text-muted-foreground",children:s}),e.jsx("div",{className:"mt-0.5",children:t})]})}function w({icon:s,label:r,value:t}){return e.jsxs("div",{className:"review-pdp-stat px-3 py-3 text-center md:px-4 md:py-4",children:[e.jsx(s,{className:"mx-auto mb-1 h-4 w-4 text-primary",strokeWidth:2}),e.jsx("p",{className:"text-[16px] font-bold tabular-nums text-foreground md:text-[18px]",children:t}),e.jsx("p",{className:"text-[10px] text-muted-foreground md:text-[11px]",children:r})]})}function N({icon:s,label:r,sub:t,href:o,internal:x}){const l="group flex items-center gap-3 rounded-lg border border-[hsl(var(--review-line))] bg-white px-3 py-2.5 hover:border-primary/30",m=e.jsxs(e.Fragment,{children:[e.jsx(s,{className:"h-4 w-4 text-primary",strokeWidth:2}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("p",{className:"text-[14px] font-medium",children:r}),e.jsx("p",{className:"text-[12px] text-muted-foreground",children:t})]}),e.jsx(T,{className:"h-3.5 w-3.5 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]});return x?e.jsx(n,{to:o,className:l,children:m}):e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:l,children:m})}function Q(){return e.jsxs("div",{className:"review-panel flex items-center justify-center p-12 text-[14px] text-muted-foreground",children:[e.jsx(M,{className:"mr-2 h-5 w-5 animate-spin text-primary"}),"æ£å¨æ´çæ¯è¼è³æâ¦"]})}function Y({message:s}){return e.jsxs("div",{className:"review-panel border-destructive/30 p-6 text-center",children:[e.jsx("h2",{className:"review-display text-xl",children:"æ«ææªè½è¼å
¥"}),e.jsx("p",{className:"mx-auto mt-2 max-w-xl text-[14px] text-muted-foreground",children:s}),e.jsx(c,{asChild:!0,className:"mt-4 rounded-md",children:e.jsx(n,{to:"/review",children:"è¿åæ ¼å¹"})})]})}function S({max:s}){return e.jsxs("div",{className:"review-page min-h-screen",children:[e.jsx(z,{}),e.jsx("div",{className:"border-b border-[hsl(var(--review-line))] bg-white",children:e.jsxs("div",{className:"container mx-auto flex items-center gap-1 px-4 py-2.5 text-[12px] text-muted-foreground",children:[e.jsxs(n,{to:"/review",className:"inline-flex items-center gap-1 hover:text-primary",children:[e.jsx(y,{className:"h-3 w-3"})," æ ¼å¹"]}),e.jsx(L,{className:"h-3 w-3 shrink-0 opacity-40"}),e.jsx("span",{className:"font-medium text-foreground",children:"ç¢åæ¯è¼"})]})}),e.jsx("main",{className:"container mx-auto flex flex-1 items-center justify-center px-4 py-12 md:py-16",children:e.jsxs("div",{className:"review-panel w-full max-w-md p-8 text-center md:p-10",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-md border border-primary/20 bg-secondary/60",children:e.jsx(W,{className:"h-7 w-7 text-primary",strokeWidth:1.75})}),e.jsx("h1",{className:"review-display text-xl md:text-2xl",children:"æªæç¢å坿¯è¼"}),e.jsxs("p",{className:"mt-2 text-[13px] leading-relaxed text-muted-foreground",children:["åºæ ¼å¹é é¢åé¸ 2 è³ ",s," ä»¶ç¢åï¼åè¿åä¸¦ææ¯è¼ã"]}),e.jsx(c,{asChild:!0,className:"mt-5 rounded-md",children:e.jsx(n,{to:"/review",children:"å徿 ¼å¹"})})]})}),e.jsx($,{})]})}function K(s,r,t,o,x){switch(r){case"lowest":return g(s).lowestPrice===t;case"savings":return p(s)===x&&x>0;case"stores":return s.storeCount===o;case"bestStore":case"highest":case"size":return!1;default:return r}}function ee(s,r){var t;switch(r){case"lowest":return k(g(s).lowestPrice);case"savings":return p(s)>0?`${p(s)}%`:"â";case"stores":return`${s.storeCount} é`;case"bestStore":return((t=s.topOffers[0])==null?void 0:t.store)||"â";case"highest":return k(g(s).highestPrice);case"size":return s.size||"â";default:return r}}export{Re as default};
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.