PageSourceSearch

https://www.peachandlily.com/cdn/shop/t/595/assets/vendor-floating-ui.ZL8VzMa-.min.js

js peachandlily.com collected 2026-10-02 04:25:02 UTC 14,118 bytes, 1 lines download raw bytes

vendor: 11,178 bytes, line 1
1const t=Math.min,e=Math.max,n=Math.round,o=Math.floor,i=t=>({x:t,y:t}),r={left:"right",right:"left",bottom:"top",top:"bottom"},l={start:"end",end:"start"};function c(t,e){return"function"==typeof t?t(e):t}function s(t){return t.split("-")[0]}function a(t){return t.split("-")[1]}function f(t){return"y"===t?"height":"width"}function u(t){return["top","bottom"].includes(s(t))?"y":"x"}function d(t){return"x"===u(t)?"y":"x"}function h(t){return t.replace(/start|end/g,t=>l[t])}function m(t){return t.replace(/left|right|bottom|top/g,t=>r[t])}function p(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function g(t,e,n){let{reference:o,floating:i}=t;const r=u(e),l=d(e),c=f(l),h=s(e),m="y"===r,p=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,y=o[c]/2-i[c]/2;let w;switch(h){case"top":w={x:p,y:o.y-i.height};break;case"bottom":w={x:p,y:o.y+o.height};break;case"right":w={x:o.x+o.width,y:g};break;case"left":w={x:o.x-i.width,y:g};break;default:w={x:o.x,y:o.y}}switch(a(e)){case"start":w[l]-=y*(n&&m?-1:1);break;case"end":w[l]+=y*(n&&m?-1:1)}return w}function y(t){return v(t)?(t.nodeName||"").toLowerCase():"#document"}function w(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function x(t){var e;return null==(e=(v(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function v(t){return t instanceof Node||t instanceof w(t).Node}function b(t){return t instanceof Element||t instanceof w(t).Element}function R(t){return t instanceof HTMLElement||t instanceof w(t).HTMLElement}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof w(t).ShadowRoot)}function L(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=O(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function E(t){return["table","td","th"].includes(y(t))}function A(t){const e=S(),n=O(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(t=>(n.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(n.contain||"").includes(t))}function S(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function D(t){return["html","body","#document"].includes(y(t))}function O(t){return w(t).getComputedStyle(t)}function C(t){return b(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function F(t){if("html"===y(t))return t;const e=t.assignedSlot||t.parentNode||T(t)&&t.host||x(t);return T(e)?e.host:e}function P(t){const e=F(t);return D(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&L(e)?e:P(e)}function k(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=P(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=w(i);return r?e.concat(l,l.visualViewport||[],L(i)?i:[],l.frameElement&&n?k(l.frameElement):[]):e.concat(i,k(i,[],n))}function H(t){const e=O(t);let o=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=R(t),l=r?t.offsetWidth:o,c=r?t.offsetHeight:i,s=n(o)!==l||n(i)!==c;return s&&(o=l,i=c),{width:o,height:i,$:s}}function W(t){return b(t)?t:t.contextElement}function B(t){const e=W(t);if(!R(e))return i(1);const o=e.getBoundingClientRect(),{width:r,height:l,$:c}=H(e);let s=(c?n(o.width):o.width)/r,a=(c?n(o.height):o.height)/l;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const V=i(0);function M(t){const e=w(t);return S()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:V}function z(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),l=W(t);let c=i(1);e&&(o?b(o)&&(c=B(o)):c=B(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==w(t))&&e}(l,n,o)?M(l):i(0);let a=(r.left+s.x)/c.x,f=(r.top+s.y)/c.y,u=r.width/c.x,d=r.height/c.y;if(l){const t=w(l),e=o&&b(o)?w(o):o;let n=t,i=n.frameElement;for(;i&&o&&e!==n;){const t=B(i),e=i.getBoundingClientRect(),o=O(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,l=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x,f*=t.y,u*=t.x,d*=t.y,a+=r,f+=l,n=w(i),i=n.frameElement}}return p({width:u,height:d,x:a,y:f})}const N=[":popover-open",":modal"];function I(t){return N.some(e=>{try{return t.matches(e)}catch(n){return!1}})}function q(t){return z(x(t)).left+C(t).scrollLeft}function X(t,n,o){let r;if("viewport"===n)r=function(t,e){const n=w(t),o=x(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,c=0,s=0;if(i){r=i.width,l=i.height;const t=S();(!t||t&&"fixed"===e)&&(c=i.offsetLeft,s=i.offsetTop)}return{width:r,height:l,x:c,y:s}}(t,o);else if("document"===n)r=function(t){const n=x(t),o=C(t),i=t.ownerDocument.body,r=e(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),l=e(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-o.scrollLeft+q(t);const s=-o.scrollTop;return"rtl"===O(i).direction&&(c+=e(n.clientWidth,i.clientWidth)-r),{width:r,height:l,x:c,y:s}}(x(t));else if(b(n))r=function(t,e){const n=z(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,l=R(t)?B(t):i(1);return{width:t.clientWidth*l.x,height:t.clientHeight*l.y,x:r*l.x,y:o*l.y}}(n,o);else{const e=M(t);r={...n,x:n.x-e.x,y:n.y-e.y}}return p(r)}function Y(t,e){const n=F(t);return!(n===e||!b(n)||D(n))&&("fixed"===O(n).position||Y(n,e))}function $(t,e,n){const o=R(e),r=x(e),l="fixed"===n,c=z(t,!0,l,e);let s={scrollLeft:0,scrollTop:0};const a=i(0);if(o||!o&&!l)if(("body"!==y(e)||L(r))&&(s=C(e)),o){const t=z(e,!0,l,e);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else r&&(a.x=q(r));return{x:c.left+s.scrollLeft-a.x,y:c.top+s.scrollTop-a.y,width:c.width,height:c.height}}function _(t){return"static"===O(t).position}function j(t,e){return R(t)&&"fixed"!==O(t).position?e?e(t):t.offsetParent:null}function G(t,e){const n=w(t);if(I(t))return n;if(!R(t)){let e=F(t);for(;e&&!D(e);){if(b(e)&&!_(e))return e;e=F(e)}return n}let o=j(t,e);for(;o&&E(o)&&_(o);)o=j(o,e);return o&&D(o)&&_(o)&&!A(o)?n:o||function(t){let e=F(t);for(;R(e)&&!D(e);){if(A(e))return e;e=F(e)}return null}(t)||n}const J={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const l="fixed"===r,c=x(o),s=!!e&&I(e.floating);if(o===c||s&&l)return n;let a={scrollLeft:0,scrollTop:0},f=i(1);const u=i(0),d=R(o);if((d||!d&&!l)&&(("body"!==y(o)||L(c))&&(a=C(o)),R(o))){const t=z(o);f=B(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+u.x,y:n.y*f.y-a.scrollTop*f.y+u.y}},getDocumentElement:x,getClippingRect:function(n){let{element:o,boundary:i,rootBoundary:r,strategy:l}=n;const c=[..."clippingAncestors"===i?I(o)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=k(t,[],!1).filter(t=>b(t)&&"body"!==y(t)),i=null;const r="fixed"===O(t).position;let l=r?F(t):t;for(;b(l)&&!D(l);){const e=O(l),n=A(l);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||L(l)&&!n&&Y(t,l))?o=o.filter(t=>t!==l):i=e,l=F(l)}return e.set(t,o),o}(o,this._c):[].concat(i),r],s=c[0],a=c.reduce((n,i)=>{const r=X(o,i,l);return n.top=e(r.top,n.top),n.right=t(r.right,n.right),n.bottom=t(r.bottom,n.bottom),n.left=e(r.left,n.left),n},X(o,s,l));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:G,getElementRects:async function(t){const e=this.getOffsetParent||G,n=this.getDimensions,o=await n(t.floating);return{reference:$(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=H(t);return{width:e,height:n}},getScale:B,isElement:b,isRTL:function(t){return"rtl"===O(t).direction}};function K(n,i,r,l){void 0===l&&(l={});const{ancestorScroll:c=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:u=!1}=l,d=W(n),h=c||s?[...d?k(d):[],...k(i)]:[];h.forEach(t=>{c&&t.addEventListener("scroll",r,{passive:!0}),s&&t.addEventListener("resize",r)});const m=d&&f?function(n,i){let r,l=null;const c=x(n);function s(){var t;clearTimeout(r),null==(t=l)||t.disconnect(),l=null}return function a(f,u){void 0===f&&(f=!1),void 0===u&&(u=1),s();const{left:d,top:h,width:m,height:p}=n.getBoundingClientRect();if(f||i(),!m||!p)return;const g={rootMargin:-o(h)+"px "+-o(c.clientWidth-(d+m))+"px "+-o(c.clientHeight-(h+p))+"px "+-o(d)+"px",threshold:e(0,t(1,u))||1};let y=!0;function w(t){const e=t[0].intersectionRatio;if(e!==u){if(!y)return a();e?a(!1,e):r=setTimeout(()=>{a(!1,1e-7)},1e3)}y=!1}try{l=new IntersectionObserver(w,{...g,root:c.ownerDocument})}catch(x){l=new IntersectionObserver(w,g)}l.observe(n)}(!0),s}(d,r):null;let p,g=-1,y=null;a&&(y=new ResizeObserver(t=>{let[e]=t;e&&e.target===d&&y&&(y.unobserve(i),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var t;null==(t=y)||t.observe(i)})),r()}),d&&!u&&y.observe(d),y.observe(i));let w=u?z(n):null;return u&&function t(){const e=z(n);!w||e.x===w.x&&e.y===w.y&&e.width===w.width&&e.height===w.height||r(),w=e,p=requestAnimationFrame(t)}(),r(),()=>{var t;h.forEach(t=>{c&&t.removeEventListener("scroll",r),s&&t.removeEventListener("resize",r)}),null==m||m(),null==(t=y)||t.disconnect(),y=null,u&&cancelAnimationFrame(p)}}const Q=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:f}=e,d=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),l=s(n),f=a(n),d="y"===u(n),h=["left","top"].includes(l)?-1:1,m=r&&d?-1:1,p=c(e,t);let{mainAxis:g,crossAxis:y,alignmentAxis:w}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof w&&(y="end"===f?-1*w:w),d?{x:y*m,y:g*h}:{x:g*h,y:y*m}}(e,t);return l===(null==(n=f.offset)?void 0:n.placement)&&null!=(o=f.arrow)&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},U=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:u,platform:g,elements:y}=e,{mainAxis:w=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:R="none",flipAlignment:T=!0,...L}=c(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const E=s(i),A=s(u)===u,S=await(null==g.isRTL?void 0:g.isRTL(y.floating)),D=v||(A||!T?[m(u)]:function(t){const e=m(t);return[h(t),e,h(e)]}(u));v||"none"===R||D.push(...function(t,e,n,o){const i=a(t);let r=function(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:l;default:return[]}}(s(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(h)))),r}(u,T,R,S));const O=[u,...D],C=await async function(t,e){var n;void 0===e&&(e={});
vendor: 2,940 bytes, line 1
1const{x:o,y:i,platform:r,rects:l,elements:s,strategy:a}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=c(e,t),g=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(m),y=s[h?"floating"===d?"reference":"floating":d],w=p(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(y)))||n?y:y.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(s.floating)),boundary:f,rootBoundary:u,strategy:a})),x="floating"===d?{x:o,y:i,width:l.floating.width,height:l.floating.height}:l.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(s.floating)),b=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},R=p(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:v,strategy:a}):x);return{top:(w.top-R.top+g.top)/b.y,bottom:(R.bottom-w.bottom+g.bottom)/b.y,left:(w.left-R.left+g.left)/b.x,right:(R.right-w.right+g.right)/b.x}}(e,L),F=[];let P=(null==(o=r.flip)?void 0:o.overflows)||[];if(w&&F.push(C[E]),x){const t=function(t,e,n){void 0===n&&(n=!1);const o=a(t),i=d(t),r=f(i);let l="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=m(l)),[l,m(l)]}(i,l,S);F.push(C[t[0]],C[t[1]])}if(P=[...P,{placement:i,overflows:F}],!F.every(t=>t<=0)){var k,H;const t=((null==(k=r.flip)?void 0:k.index)||0)+1,e=O[t];if(e)return{data:{index:t,overflows:P},reset:{placement:e}};let n=null==(H=P.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:H.placement;if(!n)switch(b){case"bestFit":{var W;const t=null==(W=P.map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:W[0];t&&(n=t);break}case"initialPlacement":n=u}if(i!==n)return{reset:{placement:n}}}return{}}}},Z=(t,e,n)=>{const o=new Map,i={platform:J,...n},r={...i.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,c=r.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(e));let a=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=g(a,o,s),d=o,h={},m=0;for(let p=0;p<c.length;p++){const{name:n,fn:r}=c[p],{x:y,y:w,data:x,reset:v}=await r({x:f,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:a,platform:l,elements:{reference:t,floating:e}});f=null!=y?y:f,u=null!=w?w:u,h={...h,[n]:{...h[n],...x}},v&&m<=50&&(m++,"object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(a=!0===v.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:f,y:u}=g(a,d,s))),p=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:h}})(t,e,{...i,platform:r})};export{K as a,Z as c,U as f,Q as o};

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.