"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54938],{54938:function(e,t,r){r.d(t,{e:function(){return f}});const o=e=>.5*(1-Math.cos(Math.PI*e)),n={_elementScroll:void 0,get elementScroll(){return this._elementScroll||(this._elementScroll=HTMLElement.prototype.scroll||HTMLElement.prototype.scrollTo||function(e,t){this.scrollLeft=e,this.scrollTop=t})},_elementScrollIntoView:void 0,get elementScrollIntoView(){return this._elementScrollIntoView||(this._elementScrollIntoView=HTMLElement.prototype.scrollIntoView)},_windowScroll:void 0,get windowScroll(){return this._windowScroll||(this._windowScroll=window.scroll||window.scrollTo)}},i=()=>{var e,t,r;return null!==(r=null===(t=null===(e=window.performance)||void 0===e?void 0:e.now)||void 0===t?void 0:t.call(e))&&void 0!==r?r:Date.now()},l=e=>{const t=(i()-e.timeStamp)/(e.duration||500);if(t>1)return e.method(e.targetX,e.targetY),void e.callback();const r=(e.timingFunc||o)(t),n=e.startX+(e.targetX-e.startX)*r,c=e.startY+(e.targetY-e.startY)*r;e.method(n,c),e.rafId=requestAnimationFrame((()=>{l(e)}))},c=e=>isFinite(e)?Number(e):0,s=(e,t)=>{var r,o;const s=n.elementScroll.bind(e);if(void 0===t.left&&void 0===t.top)return;const a=e.scrollLeft,d=e.scrollTop,u=c(null!==(r=t.left)&&void 0!==r?r:a),w=c(null!==(o=t.top)&&void 0!==o?o:d);if("smooth"!==t.behavior)return s(u,w);const h=()=>{window.removeEventListener("wheel",p),window.removeEventListener("touchmove",p)},m={timeStamp:i(),duration:t.duration,startX:a,startY:d,targetX:u,targetY:w,rafId:0,method:s,timingFunc:t.timingFunc,callback:h},p=()=>{cancelAnimationFrame(m.rafId),h()};window.addEventListener("wheel",p,{passive:!0,once:!0}),window.addEventListener("touchmove",p,{passive:!0,once:!0}),l(m)},a=(e,t,r,o,n,i,l,c)=>it||i>e&&l=t&&c>=r?i-e-o:l>t&&cr?l-t+n:0,d=e=>"visible"!==e&&"clip"!==e,u=(e,t)=>(e.clientHeight{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(t){return null}})(e);return!!t&&(t.clientHeight{const t=e.parentNode;return null!==t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?t.host:t},h=(e,t)=>e<-t?-t:e>t?t:e,m=e=>e in document.documentElement.style,p=(e,t)=>{const{top:r,right:o,bottom:n,left:i}=e.getBoundingClientRect(),[l,c,s,a]=["top","right","bottom","left"].map((e=>{const r=["scroll-margin","scroll-snap-margin"].filter(m)[0],o=t.getPropertyValue(`${r}-${e}`);return parseInt(o,10)||0}));return[r-l,o+c,n+s,i-a]},f=(e,t)=>{if(!1===e.isConnected)return;const r=document.scrollingElement||document.documentElement,o=[],n=getComputedStyle(document.documentElement);for(let s=w(e);null!==s;s=w(s)){if(s===r){o.push(s);break}const e=getComputedStyle(s);if((s!==document.body||!u(s,e)||u(document.documentElement,n))&&(u(s,e)&&o.push(s),"fixed"===e.position))break}const i=window.visualViewport?window.visualViewport.width:innerWidth,l=window.visualViewport?window.visualViewport.height:innerHeight,c=window.scrollX||window.pageXOffset,d=window.scrollY||window.pageYOffset,m=getComputedStyle(e),[f,g,b,v]=p(e,m),k=b-f,E=g-v,S=(e=>{switch(e){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0})(m.writingMode||m.getPropertyValue("-webkit-writing-mode")||m.getPropertyValue("-ms-writing-mode")),y="rtl"!==m.direction,[_,I]=((e,t,r)=>{let[o,n]=[e.block||"start",e.inline||"nearest"],i=0;switch(r||(i^=2),t){case 0:i=i>>1|(1&i)<<1,[o,n]=[n,o];break;case 1:case 3:i^=1;break;case 4:i^=2}return[o,n].map(((e,t)=>{switch(e){case"center":return 1;case"nearest":return 0;default:return"start"===e===!(i>>t&1)?2:3}}))})(t,S,y);let V=(()=>{switch(I){case 1:return f+k/2;case 2:case 0:return f;case 3:return b}})(),W=(()=>{switch(_){case 1:return v+E/2;case 3:return g;case 2:case 0:return v}})();const H=[];o.forEach((e=>{const{height:o,width:n,top:u,right:w,bottom:m,left:p}=e.getBoundingClientRect(),f=getComputedStyle(e),g=parseInt(f.borderLeftWidth,10),b=parseInt(f.borderTopWidth,10),v=parseInt(f.borderRightWidth,10),S=parseInt(f.borderBottomWidth,10);let y=0,T=0;const L="offsetWidth"in e?e.offsetWidth-e.clientWidth-g-v:0,C="offsetHeight"in e?e.offsetHeight-e.clientHeight-b-S:0;if(r===e){switch(I){case 2:y=V;break;case 3:y=V-l;break;case 1:y=V-l/2;break;case 0:y=a(d,d+l,l,b,S,d+V,d+V+k,k)}switch(_){case 2:T=W;break;case 3:T=W-i;break;case 1:T=W-i/2;break;case 0:T=a(c,c+i,i,g,v,c+W,c+W+E,E)}y+=d,T+=c}else{switch(I){case 2:y=V-u-b;break;case 3:y=V-m+S+C;break;case 1:y=V-(u+o/2)+C/2;break;case 0:y=a(u,m,o,b,S+C,V,V+k,k)}switch(_){case 2:T=W-p-g;break;case 3:T=W-w+v+L;break;case 1:T=W-(p+n/2)+L/2;break;case 0:T=a(p,w,n,g,v+L,W,W+E,E)}const{scrollLeft:t,scrollTop:r}=e;y=h(r+y,e.scrollHeight-o+C),T=h(t+T,e.scrollWidth-n+L),V+=r-y,W+=t-T}H.push((()=>s(e,{...t,top:y,left:T})))})),H.forEach((e=>e()))}}}]);