PageSourceSearch

https://www.cooperpetcare.app/_next/static/chunks/7804-ff7cac84de5…?dpl=dpl_38Jxz25iRnJFSkbyWDoYcxA2AjA1

js cooperpetcare.app collected 2026-10-02 00:25:49 UTC 37,374 bytes, 1 lines download raw bytes

vendor: 4,267 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7804],{9339:(t,e,i)=>{Object.defineProperty(e,"__esModule",{value:!0});var n={callServer:function(){return o.callServer},createServerReference:function(){return l.createServerReference},findSourceMapURL:function(){return r.findSourceMapURL}};for(var s in n)Object.defineProperty(e,s,{enumerable:!0,get:n[s]});let o=i(77304),r=i(4060),l=i(77197)},21285:(t,e,i)=>{i.d(e,{X:()=>te});var n='input:not([inert]),select:not([inert]),textarea:not([inert]),a[href]:not([inert]),button:not([inert]),[tabindex]:not(slot):not([inert]),audio[controls]:not([inert]),video[controls]:not([inert]),[contenteditable]:not([contenteditable="false"]):not([inert]),details>summary:first-of-type:not([inert]),details:not([inert])',s="u"<typeof Element,o=s?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!s&&Element.prototype.getRootNode?function(t){var e;return null==t||null==(e=t.getRootNode)?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},l=function(t,e){void 0===e&&(e=!0);var i,n=null==t||null==(i=t.getAttribute)?void 0:i.call(t,"inert");return""===n||"true"===n||e&&t&&l(t.parentNode)},a=function(t){var e,i=null==t||null==(e=t.getAttribute)?void 0:e.call(t,"contenteditable");return""===i||"true"===i},c=function(t,e,i){if(l(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(n));return e&&o.call(t,n)&&s.unshift(t),s=s.filter(i)},h=function(t,e,i){for(var s=[],r=Array.from(t);r.length;){var a=r.shift();if(!l(a,!1))if("SLOT"===a.tagName){var c=a.assignedElements(),u=h(c.length?c:a.children,!0,i);i.flatten?s.push.apply(s,u):s.push({scopeParent:a,candidates:u})}else{o.call(a,n)&&i.filter(a)&&(e||!t.includes(a))&&s.push(a);var d=a.shadowRoot||"function"==typeof i.getShadowRoot&&i.getShadowRoot(a),g=!l(d,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(a));if(d&&g){var b=h(!0===d?a.children:d.children,!0,i);i.flatten?s.push.apply(s,b):s.push({scopeParent:a,candidates:b})}else r.unshift.apply(r,a.children)}}return s},u=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},d=function(t){if(!t)throw Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||a(t))&&!u(t)?0:t.tabIndex},g=function(t,e){var i=d(t);return i<0&&e&&!u(t)?0:i},b=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},p=function(t){return"INPUT"===t.tagName},m=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},f=function(t){if(!t.name)return!0;var e,i=t.form||r(t),n=function(t){return i.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("u">typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=n(window.CSS.escape(t.name));else try{e=n(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var s=m(e,t.form);return!s||s===t},v=function(t){return p(t)&&"radio"===t.type&&!f(t)},y=function(t){var e,i,n,s,o,l,a,c=t&&r(t),h=null==(e=c)?void 0:e.host,u=!1;if(c&&c!==t)for(u=!!(null!=(i=h)&&null!=(n=i.ownerDocument)&&n.contains(h)||null!=t&&null!=(s=t.ownerDocument)&&s.contains(t));!u&&h;)u=!!(null!=(l=h=null==(o=c=r(h))?void 0:o.host)&&null!=(a=l.ownerDocument)&&a.contains(h));return u},S=function(t){var e=t.getBoundingClientRect(),i=e.width,n=e.height;return 0===i&&0===n},C=function(t,e){var i=e.displayCheck,n=e.getShadowRoot;if("full-native"===i&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var s=o.call(t,"details>summary:first-of-type")?t.parentElement:t;if(o.call(s,"details:not([open]) *"))return!0;if(i&&"full"!==i&&"full-native"!==i&&"legacy-full"!==i){if("non-zero-area"===i)return S(t)}else{if("function"==typeof n){for(var l=t;t;){var a=t.parentElement,c=r(t);if(a&&!a.shadowRoot&&!0===n(a))return S(t);t=t.assignedSlot?t.assignedSlot:a||c===t.ownerDocument?a:c.host}t=l}if(y(t))return!t.getClientRects().length;if("legacy-full"!==i)return!0}return!1}
1,P=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var i=0;i<e.children.length;i++){var n=e.children.item(i);if("LEGEND"===n.tagName)return!!o.call(e,"fieldset[disabled] *")||!n.contains(t)}return!0}e=e.parentElement}return!1},w=function(t,e){return!(e.disabled||l(e)||p(e)&&"hidden"===e.type||C(e,t)||"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(t){return"SUMMARY"===t.tagName})||P(e))},k=function(t,e){return!(v(e)||0>d(e))&&!!w(t,e)},E=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!isNaN(e)||!!(e>=0)},R=function(t){var e=[],i=[];return t.forEach(function(t,n){var s=!!t.scopeParent,o=s?t.scopeParent:t,r=g(o,s),l=s?R(t.candidates):o;0===r?s?e.push.apply(e,l):e.push(o):i.push({documentOrder:n,tabIndex:r,item:t,isScope:s,content:l})}),i.sort(b).reduce(function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t},[]).concat(e)},D=function(t,e){return R((e=e||{}).getShadowRoot?h([t],e.includeContainer,{filter:k.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:E}):c(t,e.includeContainer,k.bind(null,e)))},T=class{static intersect(t,e){let i=Math.max(t.left,e.left),n=Math.min(t.right,e.right),s=Math.max(t.top,e.top),o=Math.min(t.bottom,e.bottom),r=Math.max(0,n-i),l=Math.max(0,o-s);return new DOMRect(i,s,r,l)}static clip(t,e){let i={...t.toJSON(),top:t.top+e.top,left:t.left+e.left,bottom:t.bottom-e.bottom,right:t.right-e.right};return i.width=i.right-i.left,i.height=i.bottom-i.top,new DOMRect(i.left,i.top,i.width,i.height)}static clipOffsets(t,e){return{top:e.top-t.top,left:e.left-t.left,bottom:t.bottom-e.bottom,right:t.right-e.right}}static equals(t,e){return null==t||null==e?t===e:t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}static sizeEqual(t,e){return Math.round(t.width)===Math.round(e.width)&&Math.round(t.height)===Math.round(e.height)}},I=[...Array.from({length:1e3},(t,e)=>e/1e3),1],M=class{constructor(t,e,i){this.#t=e,this.#e=i,this.#i=i.clientRect,this.#n(t)}#t;#s=void 0;#e;#i;#o=void 0;get visibleRect(){let t=this.#e.clip;return t?T.clip(this.#i,t):this.#i}get isIntersecting(){let{width:t,height:e}=this.visibleRect;return t>0&&e>0}#n(t){let e,i,n,s,o,r,{root:l,rootBounds:a}=this.#e,{visibleRect:c}=this;this.#s?.disconnect(),this.#s=new IntersectionObserver(this.#r,{root:l,rootMargin:(e=Math.max(c.width,3),i=Math.max(c.height,3),n=c.top-a.top- -1,s=c.left-a.left- -1,o=a.right-c.left-e- -1,r=a.bottom-c.top-i- -1,`${-Math.round(n)}px ${-Math.round(o)}px ${-Math.round(r)}px ${-Math.round(s)}px`),threshold:I}),this.#s.observe(t)}#r=t=>{if(!this.#s)return;let e=t[t.length-1];if(e){let{intersectionRatio:t,boundingClientRect:i}=e,n=this.#i;this.#i=i;let s=this.#o,o=!T.equals(i,n);if(t!==this.#o||o){let n=this.#e.rootBounds,r=T.intersect(i,n),l=r.width>0&&r.height>0;if(!l)return;this.#o=t,(null!=s||o)&&(this.#t(new O(e.target,i,e.intersectionRect,l,n),this),this.#n(e.target))}}};disconnect(){this.#s?.disconnect()}},O=class{constructor(t,e,i,n,s){this.target=t,this.boundingClientRect=e,this.intersectionRect=i,this.isIntersecting=n,this.rootBounds=s}},L=class{constructor(t,e){const i=function(t){return t&&t.nodeType!==Node.DOCUMENT_NODE?t:t?.defaultView??window}(t);if(function(t){return B(t)&&t.nodeType===Node.ELEMENT_NODE}(i)){const t=i.ownerDocument??document;this.rootBounds=i.getBoundingClientRect(),this.#l=new ResizeObserver(t=>{for(let i of t){let[{inlineSize:t,blockSize:n}]=i.borderBoxSize;if(T.sizeEqual(this.rootBounds,{width:t,height:n}))continue;let s=i.target.getBoundingClientRect();this.rootBounds=s,e(s,this)}}),this.#l.observe(i),t.addEventListener("scroll",t=>{t.target&&t.target!==i&&B(t.target)&&t.target.contains(i)&&(this.rootBounds=i.getBoundingClientRect(),e(this.rootBounds,this))},{capture:!0,passive:!0,signal:this.#a.signal})}else{const t=i.visualViewport??i;this.rootBounds=x(i);const n=()=>{let t=x(i);T.equals(this.rootBounds,t)||(this.rootBounds=t,e(t,this))};t.addEventListener("resize",n,{signal:this.#a.signal})}}#l;#a=new AbortController;rootBounds;disconnect(){this.#l?.disconnect(),this.#a.abort()}};
1function x(t){return new DOMRect(0,0,t.visualViewport?.width??t.innerWidth,t.visualViewport?.height??t.innerHeight)}function B(t){return"nodeType"in t}var _=class{constructor(t,e){this.#e=e,this.#t=e=>{let i=[];for(let t of e){let e=this.intersections.get(t.target);this.intersections.set(t.target,t),e?.isIntersecting===t.isIntersecting&&T.equals(e?.intersectionRect,t.intersectionRect)||i.push(t)}i.length>0&&t(i,this)}}#t;#c=new Map;#e;intersections=new WeakMap;observe(t){let e=t.ownerDocument;if(!e)return;let i=this.#c.get(e);i||(i=new IntersectionObserver(this.#t,{...this.#e,threshold:I}),this.#c.set(e,i)),i.observe(t)}unobserve(t){let e=t.ownerDocument;if(!e)return;let i=this.#c.get(e);i&&(i.unobserve(t),this.intersections.delete(t))}disconnect(){for(let t of this.#c.values())t.disconnect();this.#c.clear()}},N=class{constructor(t,e){this.#t=t,this.#e=e,this.#h=new L(e?.root,this.#u),this.#d=new _(this.#g,e),this.#l=new ResizeObserver(this.#b)}#t;#e;#p=new Map;#l;#m=new WeakMap;#h;#d;observe(t){this.#d.observe(t)}unobserve(t){t?(this.#p.get(t)?.disconnect(),this.#d.unobserve(t),this.#m.delete(t)):this.disconnect()}disconnect(){for(let t of this.#p.values())t.disconnect();this.#p.clear(),this.#l.disconnect(),this.#h.disconnect(),this.#d.disconnect()}#f(t){let e=[];for(let s of t){var i,n;let{target:t}=s;i=s,null!=(n=this.#m.get(t))&&i.target===n.target&&i.isIntersecting===n.isIntersecting&&T.equals(i.boundingClientRect,n.boundingClientRect)&&T.equals(i.intersectionRect,n.intersectionRect)||(this.#m.set(t,s),e.push(s))}e.length>0&&this.#t(e)}#u=t=>{let e=[];for(let[i]of this.#p){let n=i.getBoundingClientRect(),s=this.#v(i,n);e.push(new A(i,n,s.visibleRect,s.isIntersecting,t))}this.#f(e)};#v(t,e){let i=this.#d;this.#p.get(t)?.disconnect();let n=new M(t,this.#y,{clientRect:e,root:this.#e?.root,rootBounds:this.#h.rootBounds,get clip(){let e=i.intersections.get(t);if(!e)return;let{intersectionRect:n,boundingClientRect:s}=e;return T.clipOffsets(s,n)}});return this.#p.set(t,n),n}#g=t=>{let e=[];for(let i of t){let{target:t,isIntersecting:n,boundingClientRect:s}=i;n?(this.#v(t,s),this.#l.observe(t)):(this.#p.get(t)?.disconnect(),this.#p.delete(t),this.#l.unobserve(t));let o=this.#p.get(t);e.push(new A(t,s,o?.visibleRect??i.intersectionRect,n,this.#h.rootBounds))}this.#f(e)};#y=(t,e)=>{this.#f([new A(t.target,t.boundingClientRect,e.visibleRect,t.isIntersecting,this.#h.rootBounds)])};#b=t=>{let e=[];for(let i of t){let{target:t,borderBoxSize:n}=i,s=this.#m.get(t);if(s){let[{inlineSize:t,blockSize:e}]=n;if(T.sizeEqual(s.boundingClientRect,{width:t,height:e}))continue}let o=t.getBoundingClientRect(),r=this.#v(t,o);e.push(new A(t,o,r.visibleRect,this.#d.intersections.get(t)?.isIntersecting??!1,this.#h.rootBounds))}this.#f(e)}},A=class{constructor(t,e,i,n,s){this.target=t,this.boundingClientRect=e,this.intersectionRect=i,this.isIntersecting=n,this.rootBounds=s}};function H(t,e,i,n){return t<e?console.warn(`ForesightJS: "${n}" value ${t} is below minimum bound ${e}, clamping to ${e}`):t>i&&console.warn(`ForesightJS: "${n}" value ${t} is above maximum bound ${i}, clamping to ${i}`),Math.min(Math.max(t,e),i)}function z(t){if("number"==typeof t){let e=H(t,0,2e3,"hitslop");return{top:e,left:e,right:e,bottom:e}}return{top:H(t.top,0,2e3,"hitslop - top"),left:H(t.left,0,2e3,"hitslop - left"),right:H(t.right,0,2e3,"hitslop - right"),bottom:H(t.bottom,0,2e3,"hitslop - bottom")}}function V(t,e){return{left:t.left-e.left,right:t.right+e.right,top:t.top-e.top,bottom:t.bottom+e.bottom}}function j(t,e){return t&&e?t.left===e.left&&t.right===e.right&&t.top===e.top&&t.bottom===e.bottom:t===e}function F(t,e){return t.x>=e.left&&t.x<=e.right&&t.y>=e.top&&t.y<=e.bottom}function $(){return!(typeof window>"u"||typeof navigator>"u")&&window.matchMedia("(pointer: coarse)").matches&&navigator.maxTouchPoints>0}function U(t,e){return void 0!==t&&e!==t}var q=class{constructor(t){this._isConnected=!1,this.elements=t.elements,this.callCallback=t.callCallback,this.emit=t.emit,this.settings=t.settings}get isConnected(){return this._isConnected}disconnect(){this.isConnected&&(this.devLog(`Disconnecting ${this.moduleName}...`),this.abortController?.abort(`${this.moduleName} module disconnected`),this.onDisconnect(),this._isConnected=!1)}connect(){this.devLog(`Connecting ${this.moduleName}...`),this.onConnect(),this._isConnected=!0}devLog(t){if(this.settings.enableManagerLogging){let e=this.moduleName.includes("Predictor")?"#ea580c":"#2563eb";console.log(`%c\u{1F6E0}\uFE0F ${this.moduleName}: ${t}`,`color: ${e}; font-weight: bold;`)}}createAbortController(){this.abortController&&!this.abortController.signal.aborted||(this.abortController=new AbortController,this.devLog(`Created new AbortController for ${this.moduleName}`))}};function W(t,e,i){let n=0,s=1,o=e.x-t.x,r=e.y-t.y,l=(t,e)=>{if(0===t){if(e<0)return!1}else{let i=e/t;if(t<0){if(i>s)return!1;i>n&&(n=i)}else{if(i<n)return!1;i<s&&(s=i)}}return!0};return!!l(-o,t.x-i.left)&&!!l(o,i.right-t.x)&&!!l(-r,t.y-i.top)&&!!l(r,i.bottom-t.y)&&n<=s}var G=class extends q{constructor(t){super(t.dependencies),this.moduleName="MousePredictor",this.trajectoryPositions=t.trajectoryPositions}updatePointerState(t){let e={x:t.clientX,y:t.clientY};this.trajectoryPositions.currentPoint=e,this.settings.enableMousePrediction?this.trajectoryPositions.predictedPoint=function(t,e,
1i){let n=performance.now(),{x:s,y:o}=t;if(e.add({point:t,time:n}),e.length<2)return{x:s,y:o};let[r,l]=e.getFirstLast();if(!r||!l)return{x:s,y:o};let a=(l.time-r.time)*.001;if(0===a)return{x:s,y:o};let c=l.point.x-r.point.x,h=l.point.y-r.point.y,u=.001*i;return{x:s+c/a*u,y:o+h/a*u}}(e,this.trajectoryPositions.positions,this.settings.trajectoryPredictionTime):this.trajectoryPositions.predictedPoint=e}processMouseMovement(t){this.updatePointerState(t);let e=this.settings.enableMousePrediction,i=this.trajectoryPositions.currentPoint;for(let t of this.elements.values()){if(!t.isIntersectingWithViewport||!t.callbackInfo.isCallbackActive||t.callbackInfo.isRunningCallback)continue;let n=t.elementBounds.expandedRect;if(e)W(i,this.trajectoryPositions.predictedPoint,n)&&this.callCallback(t,{kind:"mouse",subType:"trajectory"});else if(F(i,n))return void this.callCallback(t,{kind:"mouse",subType:"hover"})}this.emit({type:"mouseTrajectoryUpdate",predictionEnabled:e,trajectoryPositions:this.trajectoryPositions})}onDisconnect(){}onConnect(){}},K=class extends q{constructor(t){super(t.dependencies),this.moduleName="ScrollPredictor",this.predictedScrollPoint=null,this.scrollDirection=null,this.onDisconnect=()=>this.resetScrollProps(),this.trajectoryPositions=t.trajectoryPositions}resetScrollProps(){this.scrollDirection=null,this.predictedScrollPoint=null}handleScrollPrefetch(t,e){var i;let n,s;t.isIntersectingWithViewport&&!t.callbackInfo.isRunningCallback&&t.callbackInfo.isCallbackActive&&(this.scrollDirection=this.scrollDirection??(i=t.elementBounds.originalRect,n=e.top-i.top,s=e.left-i.left,n<-1?"down":n>1?"up":s<-1?"right":s>1?"left":"none"),"none"!==this.scrollDirection&&(this.predictedScrollPoint=this.predictedScrollPoint??function(t,e,i){let{x:n,y:s}=t,o={x:n,y:s};switch(e){case"down":o.y+=i;break;case"up":o.y-=i;break;case"left":o.x-=i;break;case"right":o.x+=i}return o}(this.trajectoryPositions.currentPoint,this.scrollDirection,this.settings.scrollMargin),W(this.trajectoryPositions.currentPoint,this.predictedScrollPoint,t.elementBounds.expandedRect)&&this.callCallback(t,{kind:"scroll",subType:this.scrollDirection}),this.emit({type:"scrollTrajectoryUpdate",currentPoint:this.trajectoryPositions.currentPoint,predictedPoint:this.predictedScrollPoint,scrollDirection:this.scrollDirection})))}onConnect(){}},J=class extends q{constructor(t){super(t),this.moduleName="TabPredictor",this.lastKeyDown=null,this.tabbableElementsCache=[],this.lastFocusedIndex=null,this.handleKeyDown=t=>{"Tab"===t.key&&(this.lastKeyDown=t)},this.handleFocusIn=t=>{if(!this.lastKeyDown)return;let e=t.target;if(!(e instanceof HTMLElement))return;this.tabbableElementsCache.length&&-1!==this.lastFocusedIndex||(this.devLog("Caching tabbable elements"),this.tabbableElementsCache=D(document.documentElement));let i=this.lastKeyDown.shiftKey,n=function(t,e,i,n){if(null!==e&&e>-1){let s=t?e-1:e+1;if(s>=0&&s<i.length&&i[s]===n)return s}return i.findIndex(t=>t===n)}(i,this.lastFocusedIndex,this.tabbableElementsCache,e);this.lastFocusedIndex=n,this.lastKeyDown=null;let s=[],o=this.settings.tabOffset,r=this.elements;for(let t=0;t<=o;t++){let e=i?n-t:n+t,o=this.tabbableElementsCache[e];o&&o instanceof Element&&r.has(o)&&s.push(o)}for(let t of s){let e=r.get(t);e&&!e.callbackInfo.isRunningCallback&&e.callbackInfo.isCallbackActive&&this.callCallback(e,{kind:"tab",subType:i?"reverse":"forwards"})}}}invalidateCache(){this.tabbableElementsCache.length&&this.devLog("Invalidating tabbable elements cache"),this.tabbableElementsCache=[],this.lastFocusedIndex=null}onConnect(){typeof document>"u"||(this.createAbortController(),document.addEventListener("keydown",this.handleKeyDown,{signal:this.abortController?.signal,passive:!0}),document.addEventListener("focusin",this.handleFocusIn,{signal:this.abortController?.signal,passive:!0}))}onDisconnect(){this.tabbableElementsCache=[],this.lastFocusedIndex=null,this.lastKeyDown=null}},X=class{constructor(t){if(this.head=0,this.count=0,t<=0)throw Error("CircularBuffer capacity must be greater than 0");this.capacity=t,this.buffer=Array(t)}add(t){this.buffer[this.head]=t,this.head=(this.head+1)%this.capacity,this.count<this.capacity&&this.count++}getFirst(){if(0!==this.count)return this.count<this.capacity?this.buffer[0]:this.buffer[this.head]}getLast(){if(0!==this.count){if(this.count<this.capacity)return this.buffer[this.count-1];{let t=(this.head-1+this.capacity)%this.capacity;return this.buffer[t]}}}getFirstLast(){if(0===this.count)return[void 0,void 0];if(1===this.count){let t=this.count<this.capacity?this.buffer[0]:this.buffer[this.head];return[t,t]}return[this.getFirst(),this.getLast()]}resize(t){if(t<=0)throw Error("CircularBuffer capacity must be greater than 0");if(t===this.capacity)return;let e=this.getAllItems();if(this.capacity=t,this.buffer=Array(t),this.head=0,this.count=0,e.length>t)for(let i of e.slice(-t))this.add(i);else for(let t of e)this.add(t)}getAllItems(){if(0===this.count)return[];let t=Array(this.count);if(this.count<this.capacity)for(let e=0;e<this.count;e++)t[e]=this.buffer[e];else{let e=this.head;for(let i=0;i<this.capacity;i++){let n=(e+i)%this.capacity;t[i]=this.buffer[n]}}return t}clear(){this.head=0,this.count=0}get length(){return this.count}get size(){return this.capacity}get isFull(){return this.count===this.capacity}get isEmpty(){return 0===this.count}},Y=class extends q{constructor(t){super(t),this.moduleName="DesktopHandler",this.positionObserver=null,this.trajectoryPositions={positions:new X(8),currentPoint:{x:0,y:0},predictedPoint:{x:0,y:0}},this.handlePositionChange=t=>{let e=this.settings.enableScrollPrediction;for(let i of t){let t=this.elements.get(i.target);t&&(e?this.scrollPredictor?.handleScrollPrefetch(t,i.boundingClientRect):this.checkForMouseHover(t),this.handlePositionChangeDataUpdates(t,i))}e&&this.scrollPredictor?.resetScrollProps()},this.checkForMouseHover=t=>{F(this.trajectoryPositions.currentPoint,t.elementBounds.expandedRect)&&this.callCallback(t,{kind:"mouse",subType:"hover"})},this.handlePositionChangeDataUpdates=(t,e)=>{let i=[],n=e.isIntersecting;t.isIntersectingWithViewport!==n&&(i.push("visibility"),t.isIntersectingWithViewport=n),n&&(i.push("bounds"),t.elementBounds={hitSlop:t.elementBounds.hitSlop,originalRect:e.boundingClientRect,expandedRect:V(e.boundingClientRect,t.elementBounds.hitSlop)}
1),i.length&&this.emit({type:"elementDataUpdated",elementData:t,updatedProps:i})},this.processMouseMovement=t=>this.mousePredictor.processMouseMovement(t),this.invalidateTabCache=()=>this.tabPredictor?.invalidateCache(),this.observeElement=t=>this.positionObserver?.observe(t),this.unobserveElement=t=>this.positionObserver?.unobserve(t),this.connectTabPredictor=()=>this.tabPredictor.connect(),this.connectScrollPredictor=()=>this.scrollPredictor.connect(),this.connectMousePredictor=()=>this.mousePredictor.connect(),this.disconnectTabPredictor=()=>this.tabPredictor.disconnect(),this.disconnectScrollPredictor=()=>this.scrollPredictor.disconnect(),this.disconnectMousePredictor=()=>this.mousePredictor.disconnect(),this.tabPredictor=new J(t),this.scrollPredictor=new K({dependencies:t,trajectoryPositions:this.trajectoryPositions}),this.mousePredictor=new G({dependencies:t,trajectoryPositions:this.trajectoryPositions})}onConnect(){this.settings.enableTabPrediction&&this.connectTabPredictor(),this.settings.enableScrollPrediction&&this.connectScrollPredictor(),this.connectMousePredictor(),this.positionObserver=new N(this.handlePositionChange);let t=["mouse"];for(let e of(this.settings.enableTabPrediction&&t.push("tab"),this.settings.enableScrollPrediction&&t.push("scroll"),this.devLog(`Connected predictors: [${t.join(", ")}] and PositionObserver`),this.elements.keys()))this.positionObserver.observe(e)}onDisconnect(){this.disconnectMousePredictor(),this.disconnectTabPredictor(),this.disconnectScrollPredictor(),this.positionObserver?.disconnect(),this.positionObserver=null}},Q=class extends q{constructor(t){super(t),this.moduleName="ViewportPredictor",this.intersectionObserver=null,this.onConnect=()=>this.intersectionObserver=new IntersectionObserver(this.handleViewportEnter),this.observeElement=t=>this.intersectionObserver?.observe(t),this.unobserveElement=t=>this.intersectionObserver?.unobserve(t),this.handleViewportEnter=t=>{for(let e of t){if(!e.isIntersecting)continue;let t=this.elements.get(e.target);t&&(this.callCallback(t,{kind:"viewport"}),this.unobserveElement(e.target))}}}onDisconnect(){this.intersectionObserver?.disconnect(),this.intersectionObserver=null}},Z=class extends q{constructor(t){super(t),this.moduleName="TouchStartPredictor",this.onConnect=()=>this.createAbortController(),this.onDisconnect=()=>{},this.handleTouchStart=t=>{let e=t.currentTarget,i=this.elements.get(e);i&&(this.callCallback(i,{kind:"touch"}),this.unobserveElement(e))}}observeElement(t){t instanceof HTMLElement&&t.addEventListener("pointerdown",this.handleTouchStart,{signal:this.abortController?.signal})}unobserveElement(t){t instanceof HTMLElement&&t.removeEventListener("pointerdown",this.handleTouchStart)}},tt=class extends q{constructor(t){super(t),this.moduleName="TouchDeviceHandler",this.predictor=null,this.onDisconnect=()=>{this.devLog("Disconnecting touch predictor"),this.predictor?.disconnect()},this.onConnect=()=>this.setTouchPredictor(),this.observeElement=t=>this.predictor?.observeElement(t),this.unobserveElement=t=>this.predictor?.unobserveElement(t),this.viewportPredictor=new Q(t),this.touchStartPredictor=new Z(t),this.predictor=this.viewportPredictor}setTouchPredictor(){switch(this.predictor?.disconnect(),this.settings.touchDeviceStrategy){case"viewport":this.predictor=this.viewportPredictor,this.devLog("Connected touch strategy: viewport (ViewportPredictor)");break;case"onTouchStart":this.predictor=this.touchStartPredictor,this.devLog("Connected touch strategy: onTouchStart (TouchStartPredictor)");break;case"none":this.predictor=null,this.devLog('Touch strategy set to "none" - no predictor connected');return;default:this.settings.touchDeviceStrategy}for(let t of(this.predictor?.connect(),this.elements.keys()))this.predictor?.observeElement(t)}},te=class t{constructor(t){this.elements=new Map,this.idCounter=0,this.activeElementCount=0,this.isSetup=!1,this._globalCallbackHits={mouse:{hover:0,trajectory:0},tab:{forwards:0,reverse:0},scroll:{down:0,left:0,right:0,up:0},touch:0,viewport:0,total:0},this._globalSettings={debug:!1,enableManagerLogging:!1,enableMousePrediction:!0,enableScrollPrediction:!0,positionHistorySize:8,trajectoryPredictionTime:120,scrollMargin:150,defaultHitSlop:{top:0,left:0,right:0,bottom:0},enableTabPrediction:!0,tabOffset:2,touchDeviceStrategy:"onTouchStart",minimumConnectionType:"3g"},this.pendingPointerEvent=null,this.rafId=null,this.domObserver=null,this.eventListeners=new Map,this.currentDeviceStrategy=$()?"touch":"mouse",this.handlePointerMove=t=>{this.pendingPointerEvent=t,t.pointerType!=this.currentDeviceStrategy&&(this.emit
1({type:"deviceStrategyChanged",timestamp:Date.now(),newStrategy:t.pointerType,oldStrategy:this.currentDeviceStrategy}),this.setDeviceStrategy(this.currentDeviceStrategy=t.pointerType)),this.rafId||(this.rafId=requestAnimationFrame(()=>{if(this.handler instanceof tt){this.rafId=null;return}this.pendingPointerEvent&&this.handler.processMouseMovement(this.pendingPointerEvent),this.rafId=null}))},this.handleDomMutations=t=>{if(!t.length)return;this.desktopHandler?.invalidateTabCache();let e=!1;for(let i=0;i<t.length;i++){let n=t[i];if("childList"===n.type&&n.removedNodes.length>0){e=!0;break}}if(e)for(let t of this.elements.keys())t.isConnected||this.unregister(t,"disconnected")},void 0!==t&&this.initializeManagerSettings(t);let e={elements:this.elements,callCallback:this.callCallback.bind(this),emit:this.emit.bind(this),settings:this._globalSettings};this.desktopHandler=new Y(e),this.touchDeviceHandler=new tt(e),this.handler="mouse"===this.currentDeviceStrategy?this.desktopHandler:this.touchDeviceHandler,this.devLog(`ForesightManager initialized with device strategy: ${this.currentDeviceStrategy}`),this.initializeGlobalListeners()}generateId(){return`foresight-${++this.idCounter}`}static initialize(e){return this.isInitiated||(t.manager=new t(e)),t.manager}addEventListener(t,e,i){if(i?.signal?.aborted)return()=>{};let n=this.eventListeners.get(t)??[];n.push(e),this.eventListeners.set(t,n),i?.signal?.addEventListener("abort",()=>this.removeEventListener(t,e))}removeEventListener(t,e){let i=this.eventListeners.get(t);if(!i)return;let n=i.indexOf(e);n>-1&&i.splice(n,1)}emit(t){let e=this.eventListeners.get(t.type)?.slice();if(e)for(let i=0;i<e.length;i++)try{e[i](t)}catch(e){console.error(`Error in ForesightManager event listener ${i} for ${t.type}:`,e)}}get getManagerData(){return{registeredElements:this.elements,globalSettings:this._globalSettings,globalCallbackHits:this._globalCallbackHits,eventListeners:this.eventListeners,currentDeviceStrategy:this.currentDeviceStrategy,activeElementCount:this.activeElementCount}}static get isInitiated(){return!!t.manager}static get instance(){return this.initialize()}get registeredElements(){return this.elements}register({element:t,callback:e,hitSlop:i,name:n,meta:s,reactivateAfter:o}){let r,{isTouchDevice:l,isLimitedConnection:a,shouldRegister:c}={isTouchDevice:$(),isLimitedConnection:r=function(){let t=navigator.connection;if(!t)return!1;let e=te.instance.getManagerData.globalSettings.minimumConnectionType,i=["slow-2g","2g","3g","4g"];return i.indexOf(t.effectiveType)<i.indexOf(e)||t.saveData}(),shouldRegister:!r};if(!c)return{isLimitedConnection:a,isTouchDevice:l,isRegistered:!1,unregister:()=>{}};let h=this.elements.get(t);if(h)return h.registerCount++,{isLimitedConnection:a,isTouchDevice:l,isRegistered:!1,unregister:()=>{}};this.isSetup||this.initializeGlobalListeners();let u=t.getBoundingClientRect(),d=i?z(i):this._globalSettings.defaultHitSlop,g={id:this.generateId(),element:t,callback:e,elementBounds:{originalRect:u,expandedRect:V(u,d),hitSlop:d},name:n||t.id||"unnamed",isIntersectingWithViewport:function(t){if(typeof window>"u"||typeof document>"u")return!1;let e=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return t.top<i&&t.bottom>0&&t.left<e&&t.right>0}(u),registerCount:1,meta:s??{},callbackInfo:{callbackFiredCount:0,lastCallbackInvokedAt:void 0,lastCallbackCompletedAt:void 0,lastCallbackRuntime:void 0,lastCallbackStatus:void 0,lastCallbackErrorMessage:void 0,reactivateAfter:o??1/0,isCallbackActive:!0,isRunningCallback:!1,reactivateTimeoutId:void 0}};return this.elements.set(t,g),this.activeElementCount++,this.handler.observeElement(t),this.emit({type:"elementRegistered",timestamp:Date.now(),elementData:g}),{isTouchDevice:l,isLimitedConnection:a,isRegistered:!0,unregister:()=>{this.unregister(t)}}}unregister(t,e){let i=this.elements.get(t);if(!i)return;this.clearReactivateTimeout(i),this.handler.unobserveElement(t),this.elements.delete(t),i.callbackInfo.isCallbackActive&&this.activeElementCount--;let n=0===this.elements.size&&this.isSetup;n&&(this.devLog("All elements unregistered, removing global listeners"),this.removeGlobalListeners()),i&&this.emit
1({type:"elementUnregistered",elementData:i,timestamp:Date.now(),unregisterReason:e??"by user",wasLastRegisteredElement:n})}updateHitCounters(t){switch(t.kind){case"mouse":this._globalCallbackHits.mouse[t.subType]++;break;case"tab":this._globalCallbackHits.tab[t.subType]++;break;case"scroll":this._globalCallbackHits.scroll[t.subType]++;break;case"touch":this._globalCallbackHits.touch++;break;case"viewport":this._globalCallbackHits.viewport++}this._globalCallbackHits.total++}reactivate(t){let e=this.elements.get(t);e&&(this.isSetup||this.initializeGlobalListeners(),this.clearReactivateTimeout(e),e.callbackInfo.isRunningCallback||(e.callbackInfo.isCallbackActive=!0,this.activeElementCount++,this.handler.observeElement(t),this.emit({type:"elementReactivated",elementData:e,timestamp:Date.now()})))}clearReactivateTimeout(t){clearTimeout(t.callbackInfo.reactivateTimeoutId),t.callbackInfo.reactivateTimeoutId=void 0}makeElementUnactive(t){t.callbackInfo.callbackFiredCount++,t.callbackInfo.lastCallbackInvokedAt=Date.now(),t.callbackInfo.isRunningCallback=!0,this.clearReactivateTimeout(t)}callCallback(t,e){!t.callbackInfo.isRunningCallback&&t.callbackInfo.isCallbackActive&&(this.makeElementUnactive(t),(async()=>{this.updateHitCounters(e),this.emit({type:"callbackInvoked",timestamp:Date.now(),elementData:t,hitType:e});let i=performance.now(),n,s=null;try{await t.callback(),n="success"}catch(e){s=e instanceof Error?e.message:String(e),n="error",console.error(`Error in callback for element ${t.name}:`,e)}t.callbackInfo.lastCallbackCompletedAt=Date.now(),t.callbackInfo.isRunningCallback=!1,t.callbackInfo.isCallbackActive=!1,this.activeElementCount--,this.handler.unobserveElement(t.element),t.callbackInfo.reactivateAfter!==1/0&&(t.callbackInfo.reactivateTimeoutId=setTimeout(()=>{this.reactivate(t.element)},t.callbackInfo.reactivateAfter));let o=0===this.activeElementCount;o&&(this.devLog("All elements unactivated, removing global listeners"),this.removeGlobalListeners()),this.emit({type:"callbackCompleted",timestamp:Date.now(),elementData:t,hitType:e,elapsed:t.callbackInfo.lastCallbackRuntime=performance.now()-i,status:t.callbackInfo.lastCallbackStatus=n,errorMessage:t.callbackInfo.lastCallbackErrorMessage=s,wasLastActiveElement:o})})())}setDeviceStrategy(t){let e=this.handler instanceof Y?"mouse":"touch";e!==t&&this.devLog(`Switching device strategy from ${e} to ${t}`),this.handler.disconnect(),this.handler="mouse"===t?this.desktopHandler:this.touchDeviceHandler,this.handler.connect()}initializeGlobalListeners(){this.isSetup||typeof document>"u"||(this.devLog("Initializing global listeners (pointermove, MutationObserver)"),this.setDeviceStrategy(this.currentDeviceStrategy),document.addEventListener("pointermove",this.handlePointerMove),this.domObserver=new MutationObserver(this.handleDomMutations),this.domObserver.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!1}),this.isSetup=!0)}removeGlobalListeners(){typeof document>"u"||(this.isSetup=!1,this.domObserver?.disconnect(),this.domObserver=null,document.removeEventListener("pointermove",this.handlePointerMove),this.handler.disconnect(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.pendingPointerEvent=null)}forceUpdateAllElementBounds(){for(let[,t]of this.elements)t.isIntersectingWithViewport&&this.forceUpdateElementBounds(t)}forceUpdateElementBounds(t){let e=t.element.getBoundingClientRect(),i=V(e,t.elementBounds.hitSlop);if(!j(i,t.elementBounds.expandedRect)){let n={...t,elementBounds:{...t.elementBounds,originalRect:e,expandedRect:i}};this.elements.set(t.element,n),this.emit({type:"elementDataUpdated",elementData:n,updatedProps:["bounds"]})}}initializeManagerSettings(t){this.updateNumericSettings(t.trajectoryPredictionTime,"trajectoryPredictionTime",10,200),this.updateNumericSettings(t.positionHistorySize,"positionHistorySize",2,30),this.updateNumericSettings(t.scrollMargin,"scrollMargin",30,300),this.updateNumericSettings(t.tabOffset,"tabOffset",0,20),this.updateBooleanSetting(t.enableMousePrediction,"enableMousePrediction"),this.updateBooleanSetting(t.enableScrollPrediction,"enableScrollPrediction"),this.updateBooleanSetting(t.enableTabPrediction,"enableTabPrediction"),this.updateBooleanSetting(t.enableManagerLogging,"enableManagerLogging"),void 0!==t.defaultHitSlop&&(this._globalSettings.defaultHitSlop=z(t.defaultHitSlop)),void 0!==t.touchDeviceStrategy&&(this._globalSettings.touchDeviceStrategy=t.touchDeviceStrategy),void 0!==t.minimumConnectionType&&(this._globalSettings.minimumConnectionType=t.minimumConnectionType),void 0!==t.debug&&(this._globalSettings.debug=t.debug)}updateNumericSettings(t,e,i,n){return!!U(t,this._globalSettings[e])&&(this._globalSettings[e]=H(t,i,n,e),!0)}updateBooleanSetting(t,e){return!!U(t,this._globalSettings[e])&&(this._globalSettings[e]=t,!0)}alterGlobalSettings(t){let e=[],i=this._globalSettings.trajectoryPredictionTime;this.updateNumericSettings(t?.trajectoryPredictionTime,"trajectoryPredictionTime",10,200)&&e.push({setting:"trajectoryPredictionTime",oldValue:i,newValue:this._globalSettings.trajectoryPredictionTime});let n=this._globalSettings.positionHistorySize;this.updateNumericSettings(t?.positionHistorySize,"positionHistorySize",2,30)&&(e.push({setting:"positionHistorySize",oldValue:n,newValue:this._globalSettings.positionHistorySize}),this.desktopHandler.trajectoryPositions.positions.resize(this._globalSettings.positionHistorySize));let s=this._globalSettings.scrollMargin;if(this.updateNumericSettings(t?.scrollMargin,"scrollMargin",30,300)){let t=this._globalSettings.scrollMargin;e.push({setting:"scrollMargin",oldValue:s,newValue:t})}let o=this._globalSettings.tabOffset;this.updateNumericSettings(t?.tabOffset,"tabOffset",0,20)&&(this._globalSettings.tabOffset=H(t.tabOffset,0,20,"tabOffset"),e.push({setting:"tabOffset",oldValue:o,newValue:this._globalSettings.tabOffset}));let r=this._globalSettings.enableMousePrediction;this.updateBooleanSetting(t?.enableMousePrediction,"enableMousePrediction")&&e.push({setting:"enableMousePrediction",oldValue:r,newValue:this._globalSettings.enableMousePrediction});let l=this._globalSettings.enableScrollPrediction;this.updateBooleanSetting(t?.enableScrollPrediction,"enableScrollPrediction")&&(this.handler instanceof Y&&(this._globalSettings.enableScrollPrediction?this.handler.connectScrollPredictor():this.handler.disconnectScrollPredictor()),e.push({setting:"enableScrollPrediction",oldValue:l,newValue:this._globalSettings.enableScrollPrediction}));let a=this._globalSettings.enableTabPrediction;if(this.updateBooleanSetting(t?.enableTabPrediction,"enableTabPrediction")&&(this.handler instanceof Y&&(this._globalSettings.enableTabPrediction?this.handler.connectTabPredictor():this.handler.disconnectTabPredictor()),e.push({setting:"enableTabPrediction",oldValue:a,newValue:this._globalSettings.enableTabPrediction})),t?.defaultHitSlop!==void 0){let i=this._globalSettings.defaultHitSlop,n=z(t.defaultHitSlop);j(i,n)||(this._globalSettings.defaultHitSlop=n,e.push({setting:"defaultHitSlop",oldValue:i,newValue:n}),this.forceUpdateAllElementBounds())}if(t?.touchDeviceStrategy!==void 0){let i=this._globalSettings.touchDeviceStrategy,n=t.touchDeviceStrategy;this._globalSettings.touchDeviceStrategy=n,e.push({setting:"touchDeviceStrategy",oldValue:i,newValue:n}),this.handler instanceof tt&&this.handler.setTouchPredictor()}if(t?.minimumConnectionType!==void 0){let i=this._globalSettings.minimumConnectionType;this._globalSettings.minimumConnectionType=t.minimumConnectionType,e.push({setting:"minimumConnectionType",oldValue:i,newValue:this._globalSettings.minimumConnectionType})}e.length>
10&&this.emit({type:"managerSettingsChanged",timestamp:Date.now(),managerData:this.getManagerData,updatedSettings:e})}devLog(t){this._globalSettings.enableManagerLogging&&console.log(`%c\u{1F6E0}\uFE0F ForesightManager: ${t}`,"color: #16a34a; font-weight: bold;")}}},50910:(t,e,i)=>{i.d(e,{c:()=>o});var n=i(53256);function s(t,e){return(...t)=>{try{return e(...t)}catch{throw Error(void 0)}}}let o=s(0,n.c3);s(0,n.kc)},73321:(t,e,i)=>{var n=i(74645);i.o(n,"usePathname")&&i.d(e,{usePathname:function(){return n.usePathname}}),i.o(n,"useRouter")&&i.d(e,{useRouter:function(){return n.useRouter}}),i.o(n,"useSearchParams")&&i.d(e,{useSearchParams:function(){return n.useSearchParams}})}}]);

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.