PageSourceSearch

https://www.withinpets.com/cdn/shop/t/3/assets/header.js?v=83446087686751104761774972925

js withinpets.com collected 2026-10-05 09:34:28 UTC 8,885 bytes, 1 lines download raw bytes

1var dt=Object.defineProperty,ht=Object.defineProperties;var ft=Object.getOwnPropertyDescriptors;var tt=Object.getOwnPropertySymbols;var mt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable;var et=e=>{throw TypeError(e)};var W=(e,n,t)=>n in e?dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,nt=(e,n)=>{for(var t in n||(n={}))mt.call(n,t)&&W(e,t,n[t]);if(tt)for(var t of tt(n))pt.call(n,t)&&W(e,t,n[t]);return e},rt=(e,n)=>ht(e,ft(n));var p=(e,n,t)=>W(e,typeof n!="symbol"?n+"":n,t),X=(e,n,t)=>n.has(e)||et("Cannot "+t);var r=(e,n,t)=>(X(e,n,"read from private field"),t?t.call(e):n.get(e)),u=(e,n,t)=>n.has(e)?et("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),d=(e,n,t,o)=>(X(e,n,"write to private field"),o?o.call(e,t):n.set(e,t),t),b=(e,n,t)=>(X(e,n,"access private method"),t);var ot=typeof window.requestIdleCallback=="function"?window.requestIdleCallback:setTimeout;var it={current:void 0};var xt=matchMedia("(prefers-reduced-motion: reduce)");function st(e){document.readyState==="complete"?e():window.addEventListener("load",e)}var St=matchMedia("(min-width: 750px)");var z=class extends HTMLElement{shimmer(){this.setAttribute("shimmer","")}};customElements.get("text-component")||customElements.define("text-component",z);function at(e){let n=document.head.querySelector('meta[name="theme-color"]');n&&e&&n.setAttribute("content",e)}var M,E,V=class{constructor(){u(this,M,new Set);u(this,E,!1);p(this,"schedule",async n=>{r(this,M).add(n),r(this,E)||(d(this,E,!0),it.current&&await it.current,requestAnimationFrame(this.flush))});p(this,"flush",()=>{for(let n of r(this,M))setTimeout(n,0);r(this,M).clear(),d(this,E,!1)})}};M=new WeakMap,E=new WeakMap;var gt=new V;typeof Theme!="undefined"&&(Theme.utilities=rt(nt({},Theme.utilities),{scheduler:gt}));var U=class extends HTMLElement{connectedCallback(){if(!this.shadowRoot){let n=this.querySelector(':scope > template[shadowrootmode="open"]');if(!(n instanceof HTMLTemplateElement))return;this.attachShadow({mode:"open"}).append(n.content.cloneNode(!0))}}},v,H,C,T,A=class extends U{constructor(){super(...arguments);u(this,v);p(this,"refs",{});p(this,"requiredRefs");u(this,C,new MutationObserver(t=>{t.some(o=>o.type==="attributes"&&r(this,T).call(this,o.target)||o.type==="childList"&&[...o.addedNodes,...o.removedNodes].some(r(this,T)))&&b(this,v,H).call(this)}));u(this,T,t=>G(lt(t))===this)}get roots(){return this.shadowRoot?[this,this.shadowRoot]:[this]}connectedCallback(){super.connectedCallback(),yt(),b(this,v,H).call(this),ot(()=>{for(let t of this.roots)r(this,C).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ref"],attributeOldValue:!0})})}updatedCallback(){r(this,C).takeRecords(),b(this,v,H).call(this)}disconnectedCallback(){r(this,C).disconnect()}};v=new WeakSet,H=function(){var s,a;let t={},o=this.roots.reduce((i,c)=>{for(let l of c.querySelectorAll("[ref]"))r(this,T).call(this,l)&&i.add(l);return i},new Set);for(let i of o){let c=(s=i.getAttribute("ref"))!=null?s:"",l=c.endsWith("[]"),h=l?c.slice(0,-2):c;if(l){let f=Array.isArray(t[h])?t[h]:[];f.push(i),t[h]=f}else t[h]=i}if((a=this.requiredRefs)!=null&&a.length){for(let i of this.requiredRefs)if(!(i in t))throw new $(i,this)}this.refs=t},C=new WeakMap,T=new WeakMap;function lt(e){if(e.parentNode)return e.parentNode;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function G(e){if(!e)return null;if(e instanceof A||e instanceof HTMLElement&&e.tagName.toLowerCase().endsWith("-component"))return e;let n=lt(e);return n?G(n):null}var ct=!1;function yt(){if(ct)return;ct=!0;let e=["click","change","select","focus","blur","submit","input","keydown","keyup","toggle"],n=["focus","blur"],t=["pointerenter","pointerleave"];for(let s of[...e,...t]){let a=`on:${s}`;document.addEventListener(s,i=>{var Q;let c=o(i);if(!c)return;let l=i.target!==c?new Proxy(i,{get(y,Z){if(Z==="target")return c;let F=Reflect.get(y,Z);return typeof F=="function"?F.bind(y):F}}):i,h=(Q=c.getAttribute(a))!=null?Q:"",[f,g]=h.split("/"),D=h.match(/([\/\?][^\/\?]+)([\/\?][^\/\?]+)$/),J=D?D[2]:null,B=f?f.startsWith("#")?document.querySelector(f):c.closest(f):G(c);if(!(B instanceof A)||!g)return;g=g.replace(/\?.*/,"");let K=B[g];if(typeof K=="function")try{let y=[l];J&&y.unshift(bt(J)),K.call(B,...y)}catch(y){console.error(y)}},{capture:!0})}function o(s){var i,c;let a=(c=(i=s.composedPath)==null?void 0:i.call(s)[0])!=null?c:s.target;if(a instanceof Element)return a.hasAttribute(`on:${s.type}`)?a:t.includes(s.type)?null:s.bubbles||n.includes(s.type)?a.closest(`[on\\:${s.type}]`):null}}function bt(e){let n=e[0],t=e.slice(1);return n==="?"?Object.fromEntries(Array.from(new URLSearchParams(t).entries()).map(([o,s])=>[o,ut(s)])):ut(t)}function ut(e){if(e==="true")return!0;
1if(e==="false")return!1;let n=Number(e);return!isNaN(n)&&e.trim()!==""?n:e}var $=class extends Error{constructor(n,t){super(`Required ref "${n}" not found in component ${t.tagName.toLowerCase()}`)}};var w,x,L,R,S,m,_,I,q,P,k,j,O,N,Y=class extends A{constructor(){super(...arguments);u(this,k);p(this,"requiredRefs",["headerDrawerContainer","headerMenu","headerRowTop"]);u(this,w,null);u(this,x,null);u(this,L,!1);u(this,R,0);u(this,S,null);u(this,m,null);u(this,_,150);u(this,I,new ResizeObserver(([t])=>{if(!t||!t.borderBoxSize[0])return;let o=Math.round(t.borderBoxSize[0].blockSize);document.body.style.setProperty("--header-height",`${o}px`),r(this,w)&&window.innerWidth>r(this,w)&&b(this,k,j).call(this,!1)}));u(this,q,(t=!0)=>{if(r(this,x))return;let o={threshold:t?1:0};d(this,x,new IntersectionObserver(([s])=>{if(!s)return;let{isIntersecting:a}=s;t?(this.dataset.stickyState=a?"inactive":"active",this.dataset.themeColor&&at(this.dataset.themeColor)):d(this,L,!a||this.dataset.stickyState==="active")},o)),r(this,x).observe(this)});u(this,P,t=>{b(this,k,j).call(this,t.detail.minimumReached)});u(this,O,()=>{r(this,m)===null&&d(this,m,requestAnimationFrame(()=>{d(this,m,null),r(this,N).call(this)}))});u(this,N,()=>{var c,l;let t=this.getAttribute("sticky");if(!r(this,L)&&t!=="always")return;let o=(l=(c=document.scrollingElement)==null?void 0:c.scrollTop)!=null?l:0,s=this.getBoundingClientRect().top,a=o<r(this,R),i=s>=0;if(r(this,S)&&(clearTimeout(r(this,S)),d(this,S,null)),t==="always"){i?this.dataset.scrollDirection="none":a?this.dataset.scrollDirection="up":this.dataset.scrollDirection="down",d(this,R,o);return}a?(this.removeAttribute("data-animating"),i?(d(this,L,!1),this.dataset.stickyState="inactive",this.dataset.scrollDirection="none"):(this.dataset.stickyState="active",this.dataset.scrollDirection="up")):this.dataset.stickyState==="active"?(this.dataset.scrollDirection="none",this.setAttribute("data-animating",""),d(this,S,setTimeout(()=>{this.dataset.stickyState="idle",this.removeAttribute("data-animating")},r(this,_)))):(this.dataset.scrollDirection="none",this.dataset.stickyState="idle"),d(this,R,o)})}connectedCallback(){super.connectedCallback(),r(this,I).observe(this),this.addEventListener("overflowMinimum",r(this,P));let t=this.getAttribute("sticky");t&&(r(this,q).call(this,t==="always"),(t==="scroll-up"||t==="always")&&document.addEventListener("scroll",r(this,O)))}disconnectedCallback(){var t;super.disconnectedCallback(),r(this,I).disconnect(),(t=r(this,x))==null||t.disconnect(),this.removeEventListener("overflowMinimum",r(this,P)),document.removeEventListener("scroll",r(this,O)),r(this,m)!==null&&(cancelAnimationFrame(r(this,m)),d(this,m,null)),document.body.style.setProperty("--header-height","0px")}};w=new WeakMap,x=new WeakMap,L=new WeakMap,R=new WeakMap,S=new WeakMap,m=new WeakMap,_=new WeakMap,I=new WeakMap,q=new WeakMap,P=new WeakMap,k=new WeakSet,j=function(t){t?(this.refs.headerDrawerContainer.classList.remove("desktop:hidden"),d(this,w,window.innerWidth),this.refs.headerMenu.classList.add("hidden")):(this.refs.headerDrawerContainer.classList.add("desktop:hidden"),d(this,w,null),this.refs.headerMenu.classList.remove("hidden"))},O=new WeakMap,N=new WeakMap;customElements.get("header-component")||customElements.define("header-component",Y);st(()=>{let e=document.querySelector("header-component"),n=document.querySelector("#header-group");if(n){let t=new ResizeObserver(a=>{let i=a.reduce((l,h)=>{var f,g,D;return h.target!==e||e.hasAttribute("transparent")&&((f=e.parentElement)!=null&&f.nextElementSibling)?l+((D=(g=h.borderBoxSize[0])==null?void 0:g.blockSize)!=null?D:0):l},0),c=Math.round(i);document.body.style.setProperty("--header-group-height",`${c}px`)});e instanceof HTMLElement&&t.observe(e);let o=n.children;for(let a=0;a<o.length;a++){let i=o[a];i instanceof HTMLElement&&t.observe(i)}new MutationObserver(a=>{for(let i of a)if(i.type==="childList"){let c=n.children;for(let l=0;l<c.length;l++){let h=c[l];h instanceof HTMLElement&&t.observe(h)}}}).observe(n,{childList:!0})}});

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.