PageSourceSearch

https://petwellhk.com/assets/useSEO-CoArDrdl.js

js petwellhk.com collected 2026-10-06 05:23:53 UTC 4,229 bytes, 1 lines download raw bytes

1import{r as L}from"./react-vendor-BDHNqS4B.js";const A="https://petwellhk.com";function k(n){const o=n.indexOf("#"),t=o===-1?n:n.slice(0,o),c=t.indexOf("?"),s=c===-1?t:t.slice(0,c),l=c===-1?"":t.slice(c);return s===A||s===`${A}/`?`${A}/${l}`:`${s.replace(/\/+$/,"")}${l}`}const P=A,z="https://storage.googleapis.com/gpt-engineer-file-uploads/JHL1szBw74V1hbPrOlIVhZq067C3/social-images/social-1759652520246-PetWell Logo (Instagram Post).png",N="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1",B="noindex, nofollow";function G(n){if(!n||typeof n!="string")return z;const o=n.trim();return/^https?:\/\//i.test(o)?o:o.startsWith("//")?`https:${o}`:o.startsWith("/")?`${P}${o}`:z}let E="";const J=({title:n,description:o,keywords:t,ogImage:c,ogType:s="website",canonicalUrl:l,structuredData:u,faqItems:f,howToSteps:p,speakableSelectors:g,articlePublishedTime:b,articleModifiedTime:w,articleAuthor:x,articleSection:_,articleTags:y,noindex:O=!1,robots:S,locale:H="zh_HK",htmlLang:v="zh-HK",hreflang:q=["zh-HK","x-default"]})=>{L.useEffect(()=>{E||(E=document.title),document.title=n;let d=document.querySelector('meta[name="description"]');if(d||(d=document.createElement("meta"),d.setAttribute("name","description"),document.head.appendChild(d)),d.getAttribute("content"),d.setAttribute("content",o),t){let e=document.querySelector('meta[name="keywords"]');e||(e=document.createElement("meta"),e.setAttribute("name","keywords"),document.head.appendChild(e)),e.setAttribute("content",t)}const $=G(c);i("og:title",n),i("og:description",o),i("og:image",$),i("og:image:secure_url",$),i("og:type",s),i("og:site_name","PetWell HK"),document.documentElement.lang=v,i("og:locale",H),i("og:locale:alternate",H==="en_HK"?"zh_HK":"en_HK");const C=k(l||`${P}${window.location.pathname}${window.location.search}`);i("og:url",C),m("robots",O?B:S||N),m("googlebot",O?B:"index, follow"),s==="article"&&(b&&i("article:published_time",b),w&&i("article:modified_time",w),x&&i("article:author",x),_&&i("article:section",_),y&&y.length>0&&(document.querySelectorAll('meta[property="article:tag"]').forEach(e=>e.remove()),y.forEach(e=>{const r=document.createElement("meta");r.setAttribute("property","article:tag"),r.setAttribute("content",e),document.head.appendChild(r)}))),m("twitter:card","summary_large_image"),m("twitter:title",n),m("twitter:description",o),m("twitter:image",$),m("twitter:site","@PetWellHK");let h=document.querySelector('link[rel="canonical"]');h||(h=document.createElement("link"),h.setAttribute("rel","canonical"),document.head.appendChild(h)),h.setAttribute("href",C),document.querySelectorAll('link[rel="alternate"][hreflang]').forEach(e=>e.remove());for(const e of q){const r=document.createElement("link");r.setAttribute("rel","alternate"),r.setAttribute("hreflang",e),r.setAttribute("href",C),document.head.appendChild(r)}const a=[];if(u&&(Array.isArray(u)?a.push(...u):a.push(u)),f&&f.length>0){const e={"@context":"https://schema.org","@type":"FAQPage",mainEntity:f.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))};a.push(e)}if(p){const e={"@context":"https://schema.org","@type":"HowTo",name:p.name,description:p.description,step:p.steps.map((r,W)=>({"@type":"HowToStep",position:W+1,name:r.name,text:r.text}))};a.push(e)}if(g&&g.length>0){const e={"@context":"https://schema.org","@type":"WebPage",name:n,speakable:{"@type":"SpeakableSpecification",cssSelector:g}};a.push(e)}const I=[],K=document.getElementById("seo-structured-data");if(K&&K.remove(),a.length>0){const e=document.createElement("script");e.type="application/ld+json",e.text=JSON.stringify(a.length===1?a[0]:a),e.id="seo-structured-data",document.head.appendChild(e),I.push(e)}return()=>{E&&(document.title=E),I.forEach(e=>e.remove())}},[n,o,t,c,s,l,u,f,p,g,b,w,x,_,y,O,S,H,v,q])};function i(n,o){let t=document.querySelector(`meta[property="${n}"]`);t||(t=document.createElement("meta"),t.setAttribute("property",n),document.head.appendChild(t)),t.setAttribute("content",o)}function m(n,o){let t=document.querySelector(`meta[name="${n}"]`);t||(t=document.createElement("meta"),t.setAttribute("name",n),document.head.appendChild(t)),t.setAttribute("content",o)}export{J as u};

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.