(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4903],{15666:(t,e,i)=>{"use strict";i.d(e,{zE:()=>G});var n,r,s,a,o,l,u=i(85572),h=i.n(u),c=function(t){this.startX=t.startX,this.startY=t.startY,this.endX=t.endX,this.endY=t.endY,this.totalX=this.endX-this.startX,this.totalY=this.endY-this.startY,this.startMultiplierX=t.startMultiplierX||1,this.endMultiplierX=t.endMultiplierX||1,this.startMultiplierY=t.startMultiplierY||1,this.endMultiplierY=t.endMultiplierY||1};function d(){return(d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}!function(t){t.speed="speed",t.translateX="translateX",t.translateY="translateY",t.rotate="rotate",t.rotateX="rotateX",t.rotateY="rotateY",t.rotateZ="rotateZ",t.scale="scale",t.scaleX="scaleX",t.scaleY="scaleY",t.scaleZ="scaleZ",t.opacity="opacity"}(n||(n={})),function(t){t.px="px",t["%"]="%",t.vh="vh",t.vw="vw"}(r||(r={})),function(t){t.deg="deg",t.turn="turn",t.rad="rad"}(s||(s={})),(a||(a={}))[""]="",function(t){t.vertical="vertical",t.horizontal="horizontal"}(o||(o={})),function(t){t.ease="ease",t.easeIn="easeIn",t.easeOut="easeOut",t.easeInOut="easeInOut",t.easeInQuad="easeInQuad",t.easeInCubic="easeInCubic",t.easeInQuart="easeInQuart",t.easeInQuint="easeInQuint",t.easeInSine="easeInSine",t.easeInExpo="easeInExpo",t.easeInCirc="easeInCirc",t.easeOutQuad="easeOutQuad",t.easeOutCubic="easeOutCubic",t.easeOutQuart="easeOutQuart",t.easeOutQuint="easeOutQuint",t.easeOutSine="easeOutSine",t.easeOutExpo="easeOutExpo",t.easeOutCirc="easeOutCirc",t.easeInOutQuad="easeInOutQuad",t.easeInOutCubic="easeInOutCubic",t.easeInOutQuart="easeInOutQuart",t.easeInOutQuint="easeInOutQuint",t.easeInOutSine="easeInOutSine",t.easeInOutExpo="easeInOutExpo",t.easeInOutCirc="easeInOutCirc",t.easeInBack="easeInBack",t.easeOutBack="easeOutBack",t.easeInOutBack="easeInOutBack"}(l||(l={}));var f=0,p=function(){function t(t){var e=t.el.getBoundingClientRect();if(t.view.scrollContainer){var i=t.view.scrollContainer.getBoundingClientRect();e=d({},e,{top:e.top-i.top,right:e.right-i.left,bottom:e.bottom-i.top,left:e.left-i.left})}this.height=t.el.offsetHeight,this.width=t.el.offsetWidth,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,t.rootMargin&&this._setRectWithRootMargin(t.rootMargin)}return t.prototype._setRectWithRootMargin=function(t){var e=t.top+t.bottom,i=t.left+t.right;this.top-=t.top,this.right+=t.right,this.bottom+=t.bottom,this.left-=t.left,this.height+=e,this.width+=i},t}(),g=[a[""],r.px,r["%"],r.vh,r.vw,s.deg,s.turn,s.rad];function v(t,e){void 0===e&&(e=r["%"]);var i={value:0,unit:e};if(void 0===t)return i;if("number"!=typeof t&&"string"!=typeof t)throw Error("Invalid value provided. Must provide a value as a string or number");if(i.value=parseFloat(t=String(t)),i.unit=t.match(/[\d.\-+]*\s*(.*)/)[1]||e,!g.includes(i.unit))throw Error("Invalid unit provided.");return i}var m={ease:[.25,.1,.25,1],easeIn:[.42,0,1,1],easeOut:[0,0,.58,1],easeInOut:[.42,0,.58,1],easeInQuad:[.55,.085,.68,.53],easeInCubic:[.55,.055,.675,.19],easeInQuart:[.895,.03,.685,.22],easeInQuint:[.755,.05,.855,.06],easeInSine:[.47,0,.745,.715],easeInExpo:[.95,.05,.795,.035],easeInCirc:[.6,.04,.98,.335],easeOutQuad:[.25,.46,.45,.94],easeOutCubic:[.215,.61,.355,1],easeOutQuart:[.165,.84,.44,1],easeOutQuint:[.23,1,.32,1],easeOutSine:[.39,.575,.565,1],easeOutExpo:[.19,1,.22,1],easeOutCirc:[.075,.82,.165,1],easeInOutQuad:[.455,.03,.515,.955],easeInOutCubic:[.645,.045,.355,1],easeInOutQuart:[.77,0,.175,1],easeInOutQuint:[.86,0,.07,1],easeInOutSine:[.445,.05,.55,.95],easeInOutExpo:[1,0,0,1],easeInOutCirc:[.785,.135,.15,.86],easeInBack:[.6,-.28,.735,.045],easeOutBack:[.175,.885,.32,1.275],easeInOutBack:[.68,-.55,.265,1.55]};function y(t){if(Array.isArray(t))return h()(t[0],t[1],t[2],t[3]);if("string"==typeof t&&void 0!==m[t]){var e=m[t];return h()(e[0],e[1],e[2],e[3])}}var b=Object.values(n),w={speed:"px",translateX:"%",translateY:"%",rotate:"deg",rotateX:"deg",rotateY:"deg",rotateZ:"deg",scale:"",scaleX:"",scaleY:"",scaleZ:"",opacity:""};function _(t,e){var i={};return b.forEach(function(n){var r=w[n];if("number"==typeof(null==t?void 0:t[n])){var s=null==t?void 0:t[n],a=v(10*(s||0)+"px"),l=v(-10*(s||0)+"px"),u={start:a.value,end:l.value,unit:a.unit};e===o.vertical&&(i.translateY=u),e===o.horizontal&&(i.translateX=u)}if(Array.isArray(null==t?void 0:t[n])){var h=null==t?void 0:t[n];if(void 0!==h[0]&&void 0!==h[1]){var c=v(null==h?void 0:h[0],r),d=v(null==h?void 0:h[1],r),f=y(null==h?void 0:h[2]);if(i[n]={start:c.value,end:d.value,unit:c.unit,easing:f},c.unit!==d.unit)throw Error("Must provide matching units for the min and max offset values of each axis.")}}}),i}function C(t,e,i,n){var r=(i-t)/e;return n&&(r=n(r)),r}function O(t,e){var i,n;return{value:(i="function"==typeof t.easing?t.easing(e):e,n=(null==t?void 0:t.start)||0,(((null==t?void 0:t.end)||0)-n)*(i-0)/1+n),unit:null==t?void 0:t.unit}}var E=Object.values(n).filter(function(t){return"opacity"!==t});function P(t){var e=t.el;e&&(e.style.transform="",e.style.opacity="")}function S(t,e,i){return Math.max(i/(i+(Math.abs(t)+Math.abs(e))*(e>t?-1:1)),1)}function A(t,e){var i=t.start,n=t.end,r=t.unit;if("%"===r){var s=e/100;i*=s,n*=s}if("vw"===r){var a=i/100,o=n/100;i=window.innerWidth*a,n=window.innerWidth*o}if("vh"===r){var l=i/100,u=n/100;i=window.innerHeight*l,n=window.innerHeight*u}return{start:i,end:n}}var I={start:0,end:0,unit:""},x=function(t,e,i){return Math.min(Math.max(t,e),i)},M=function(){function t(t){var e,i;this.el=t.el,this.props=t.props,this.scrollAxis=t.scrollAxis,this.disabledParallaxController=t.disabledParallaxController||!1,this.id=++f,this.effects=_(this.props,this.scrollAxis),this.isInView=null,this.progress=0,this._setElementEasing(t.props.easing),e=t.el,i=Object.keys(this.effects).includes("opacity"),e.style.willChange="transform"+(i?",opacity":"")}var e=t.prototype;return e.updateProps=function(t){return this.props=d({},this.props,t),this.effects=_(t,this.scrollAxis),this._setElementEasing(t.easing),this},e.setCachedAttributes=function(t,e){P(this),this.rect=new p({el:this.props.targetElement||this.el,rootMargin:this.props.rootMargin,view:t});var i,n,r,s,a,l,u,h,f,g,v,m,y=(i=this.props,n=this.effects,r=this.scrollAxis,!i.rootMargin&&!i.targetElement&&!i.shouldDisableScalingTranslations&&(!!n.translateX&&r===o.horizontal||!!n.translateY&&r===o.vertical));return"number"==typeof this.props.startScroll&&"number"==typeof this.props.endScroll?(this.limits=new c({startX:this.props.startScroll,startY:this.props.startScroll,endX:this.props.endScroll,endY:this.props.endScroll}),this._setElementStyles(),this):(y?(this.limits=function(t,e,i,n,r,s){var a=i.translateX||I,l=i.translateY||I,u=A(a,t.width),h=u.start,d=u.end,f=A(l,t.height),p=f.start,g=f.end,v=t.top-e.height,m=t.left-e.width,y=t.bottom,b=t.right,w=1,_=1;r===o.vertical&&(_=w=S(p,g,e.height+t.height));var C=1,O=1;if(r===o.horizontal&&(O=C=S(h,d,e.width+t.width)),p<0&&(v+=p*w),g>0&&(y+=g*_),h<0&&(m+=h*C),d>0&&(b+=d*O),m+=n.x,b+=n.x,v+=n.y,y+=n.y,s){var E=n.y+t.top<e.height,P=n.x+t.left<e.width,x=n.y+t.bottom>e.scrollHeight-e.height,M=n.x+t.right>e.scrollWidth-e.height;E&&x&&(w=1,_=1,v=0,y=e.scrollHeight-e.height),P&&M&&(C=1,O=1,m=0,b=e.scrollWidth-e.width),!E&&x&&(v=t.top-e.height+n.y,w=S(p,g,(y=e.scrollHeight-e.height)-v),_=1,p<0&&(v+=p*w)),!P&&M&&(m=t.left-e.width+n.x,C=S(h,d,(b=e.scrollWidth-e.width)-m),O=1,h<0&&(m+=h*C)),E&&!x&&(v=0,w=1,_=S(p,g,(y=t.bottom+n.y)-v),g>0&&(y+=g*_)),P&&!M&&(m=0,C=1,O=S(h,d,(b=t.right+n.x)-m),d>0&&(b+=d*O))}return new c({startX:m,startY:v,endX:b,endY:y,startMultiplierX:C,endMultiplierX:O,startMultiplierY:w,endMultiplierY:_})}(this.rect,t,this.effects,e,this.scrollAxis,this.props.shouldAlwaysCompleteAnimation),this.scaledEffects=(s=this.effects,a=this.limits,(l=d({},s)).translateX&&(l.translateX=d({},s.translateX,{start:l.translateX.start*a.startMultiplierX,end:l.translateX.end*a.endMultiplierX})),l.translateY&&(l.translateY=d({},s.translateY,{start:l.translateY.start*a.startMultiplierY,end:l.translateY.end*a.endMultiplierY})),l)):this.limits=(u=this.rect,h=this.props.shouldAlwaysCompleteAnimation,f=u.top-t.height,g=u.left-t.width,v=u.bottom,m=u.right,g+=e.x,m+=e.x,f+=e.y,v+=e.y,h&&(e.y+u.top<t.height&&(f=0),e.x+u.left<t.width&&(g=0),v>t.scrollHeight-t.height&&(v=t.scrollHeight-t.height),m>t.scrollWidth-t.width&&(m=t.scrollWidth-t.width)),new c({startX:g,startY:f,endX:m,endY:v})),this._setElementStyles(),this)},e._updateElementIsInView=function(t){var e=null===this.isInView;t!==this.isInView&&(t?this.props.onEnter&&this.props.onEnter(this):!e&&(this._setFinalProgress(),this._setElementStyles(),this.props.onExit&&this.props.onExit(this))),this.isInView=t},e._setFinalProgress=function(){var t=x(Math.round(this.progress),0,1);this._updateElementProgress(t)},e._setElementStyles=function(){this.props.disabled||this.disabledParallaxController||function(t,e,i){if(i){var n,r,s,a,o,l=(n=t,r=e,E.reduce(function(t,e){var i=n[e]&&O(n[e],r);return void 0===i||void 0===i.value||void 0===i.unit?t:t+(e+"("+i.value+i.unit)+")"},"")),u=(s=t,a=e,void 0===(o=s.opacity&&O(s.opacity,a))||void 0===o.value||void 0===o.unit?"":""+o.value);i.style.transform=l,i.style.opacity=u}}(this.scaledEffects||this.effects,this.progress,this.el)},e._updateElementProgress=function(t){this.progress=t,this.props.onProgressChange&&this.props.onProgressChange(this.progress),this.props.onChange&&this.props.onChange(this)},e._setElementEasing=function(t){this.easing=y(t)},e.updateElementOptions=function(t){this.scrollAxis=t.scrollAxis,this.disabledParallaxController=t.disabledParallaxController||!1},e.updatePosition=function(t){if(!this.limits)return this;var e=this.scrollAxis===o.vertical,i=null===this.isInView,n=e?this.limits.startY:this.limits.startX,r=e?this.limits.endY:this.limits.endX,s=e?this.limits.totalY:this.limits.totalX,a=e?t.y:t.x,l=a>=n&&a<=r;if(this._updateElementIsInView(l),l){var u=C(n,s,a,this.easing);this._updateElementProgress(u),this._setElementStyles()}else i&&(this.progress=x(Math.round(C(n,s,a,this.easing)),0,1),this._setElementStyles());return this},t}(),Q=function(){function t(t){this.scrollContainer=t.scrollContainer,this.width=t.width,this.height=t.height,this.scrollHeight=t.scrollHeight,this.scrollWidth=t.scrollWidth}var e=t.prototype;return e.hasChanged=function(t){return t.width!==this.width||t.height!==this.height||t.scrollWidth!==this.scrollWidth||t.scrollHeight!==this.scrollHeight},e.setSize=function(t){return this.width=t.width,this.height=t.height,this.scrollHeight=t.scrollHeight,this.scrollWidth=t.scrollWidth,this},t}(),j=function(){function t(t,e){this.x=t,this.y=e,this.dx=0,this.dy=0}return t.prototype.setScroll=function(t,e){return this.dx=t-this.x,this.dy=e-this.y,this.x=t,this.y=e,this},t}(),k=function(){function t(t){var e=t.scrollAxis,i=void 0===e?o.vertical:e,n=t.scrollContainer,r=t.disabled;this.disabled=void 0!==r&&r,this.scrollAxis=i,this.elements=[],this._hasScrollContainer=!!n,this.viewEl=null!=n?n:window;var s=this._getScrollPosition(),a=s[0],l=s[1];this.scroll=new j(a,l),this.view=new Q({width:0,height:0,scrollWidth:0,scrollHeight:0,scrollContainer:this._hasScrollContainer?n:void 0}),this._ticking=!1,this._supportsPassive=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){return t=!0,!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}(),this._bindAllMethods(),this.disabled||(this._addListeners(this.viewEl),this._addResizeObserver(),this._setViewSize())}t.init=function(e){if("undefined"==typeof window)throw Error("Looks like ParallaxController.init() was called on the server. This method must be called on the client.");return new t(e)};var e=t.prototype;return e._bindAllMethods=function(){var t=this;["_addListeners","_removeListeners","_getScrollPosition","_handleScroll","_handleUpdateCache","_updateAllElements","_updateElementPosition","_setViewSize","_addResizeObserver","_checkIfViewHasChanged","_getViewParams","getElements","createElement","removeElementById","resetElementStyles","updateElementPropsById","update","updateScrollContainer","destroy"].forEach(function(e){t[e]=t[e].bind(t)})},e._addListeners=function(t){t.addEventListener("scroll",this._handleScroll,!!this._supportsPassive&&{passive:!0}),window.addEventListener("resize",this._handleUpdateCache,!1),window.addEventListener("blur",this._handleUpdateCache,!1),window.addEventListener("focus",this._handleUpdateCache,!1),window.addEventListener("load",this._handleUpdateCache,!1)},e._removeListeners=function(t){var e;t.removeEventListener("scroll",this._handleScroll,!1),window.removeEventListener("resize",this._handleUpdateCache,!1),window.removeEventListener("blur",this._handleUpdateCache,!1),window.removeEventListener("focus",this._handleUpdateCache,!1),window.removeEventListener("load",this._handleUpdateCache,!1),null==(e=this._resizeObserver)||e.disconnect()},e._addResizeObserver=function(){var t=this;try{var e=this._hasScrollContainer?this.viewEl:document.documentElement;this._resizeObserver=new ResizeObserver(function(){return t.update()}),this._resizeObserver.observe(e)}catch(t){console.warn("Failed to create the resize observer in the ParallaxContoller")}},e._getScrollPosition=function(){return[this._hasScrollContainer?this.viewEl.scrollLeft:window.pageXOffset,this._hasScrollContainer?this.viewEl.scrollTop:window.pageYOffset]},e._handleScroll=function(){var t,e=this._getScrollPosition(),i=e[0],n=e[1];this.scroll.setScroll(i,n),!this._ticking&&(null==(t=this.elements)?void 0:t.length)>0&&(this._ticking=!0,window.requestAnimationFrame(this._updateAllElements))},e._handleUpdateCache=function(){this._setViewSize(),this._updateAllElements({updateCache:!0})},e._updateAllElements=function(t){var e=this,i=(void 0===t?{}:t).updateCache;this.elements&&this.elements.forEach(function(t){i&&t.setCachedAttributes(e.view,e.scroll),e._updateElementPosition(t)}),this._ticking=!1},e._updateElementPosition=function(t){t.props.disabled||this.disabled||t.updatePosition(this.scroll)},e._getViewParams=function(){if(this._hasScrollContainer){var t=this.viewEl.offsetWidth,e=this.viewEl.offsetHeight,i=this.viewEl.scrollHeight,n=this.viewEl.scrollWidth;return this.view.setSize({width:t,height:e,scrollHeight:i,scrollWidth:n})}var r=document.documentElement;return{width:window.innerWidth||r.clientWidth,height:window.innerHeight||r.clientHeight,scrollHeight:r.scrollHeight,scrollWidth:r.scrollWidth}},e._setViewSize=function(){return this.view.setSize(this._getViewParams())},e._checkIfViewHasChanged=function(){return this.view.hasChanged(this._getViewParams())},e.getElements=function(){return this.elements},e.createElement=function(t){var e=new M(d({},t,{scrollAxis:this.scrollAxis,disabledParallaxController:this.disabled}));return e.setCachedAttributes(this.view,this.scroll),this.elements=this.elements?[].concat(this.elements,[e]):[e],this._updateElementPosition(e),this._checkIfViewHasChanged()&&this.update(),e},e.removeElementById=function(t){this.elements&&(this.elements=this.elements.filter(function(e){return e.id!==t}))},e.updateElementPropsById=function(t,e){this.elements&&(this.elements=this.elements.map(function(i){return i.id===t?i.updateProps(e):i})),this.update()},e.resetElementStyles=function(t){P(t)},e.update=function(){var t=this._getScrollPosition(),e=t[0],i=t[1];this.scroll.setScroll(e,i),this._setViewSize(),this._updateAllElements({updateCache:!0})},e.updateScrollContainer=function(t){this._removeListeners(this.viewEl),this.viewEl=t,this._hasScrollContainer=!!t,this.view=new Q({width:0,height:0,scrollWidth:0,scrollHeight:0,scrollContainer:t}),this._setViewSize(),this._addListeners(this.viewEl),this._updateAllElements({updateCache:!0})},e.disableParallaxController=function(){this.disabled=!0,this._removeListeners(this.viewEl),this.elements&&this.elements.forEach(function(t){return P(t)})},e.enableParallaxController=function(){var t=this;this.disabled=!1,this.elements&&this.elements.forEach(function(e){return e.updateElementOptions({disabledParallaxController:!1,scrollAxis:t.scrollAxis})}),this._addListeners(this.viewEl),this._addResizeObserver(),this._setViewSize()},e.disableAllElements=function(){console.warn("deprecated: use disableParallaxController() instead"),this.elements&&(this.elements=this.elements.map(function(t){return t.updateProps({disabled:!0})})),this.update()},e.enableAllElements=function(){console.warn("deprecated: use enableParallaxController() instead"),this.elements&&(this.elements=this.elements.map(function(t){return t.updateProps({disabled:!1})})),this.update()},e.destroy=function(){this._removeListeners(this.viewEl),this.elements&&this.elements.forEach(function(t){return P(t)}),this.elements=void 0},t}(),q=i(12115);function D(){return(D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function X(t,e){if(null==t)return{};var i,n,r={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(r[i]=t[i]);return r}function Y(t){var e,i=t.disabled,n=t.easing,r=t.endScroll,s=t.onChange,a=t.onEnter,o=t.onExit,l=t.onProgressChange,u=t.opacity,h=t.rootMargin,c=t.rotate,d=t.rotateX,f=t.rotateY,p=t.rotateZ,g=t.scale,v=t.scaleX,m=t.scaleY,y=t.scaleZ,b=t.shouldAlwaysCompleteAnimation,w=t.shouldDisableScalingTranslations,_=t.speed,C=t.startScroll,O=t.targetElement,E=t.translateX,P=t.translateY,S=X(t,null);return{parallaxProps:(Object.keys(e={disabled:i,easing:n,endScroll:r,onChange:s,onEnter:a,onExit:o,onProgressChange:l,opacity:u,rootMargin:h,rotate:c,rotateX:d,rotateY:f,rotateZ:p,scale:g,scaleX:v,scaleY:m,scaleZ:y,shouldAlwaysCompleteAnimation:b,shouldDisableScalingTranslations:w,speed:_,startScroll:C,targetElement:O,translateX:E,translateY:P}).forEach(function(t){return void 0===e[t]&&delete e[t]}),e),rest:S}}var L=q.createContext(null),z={height:0},H={position:"absolute",top:0,left:0,right:0,bottom:0};function G(t){var e,i=(0,q.useRef)(null);return!i.current&&(e={scrollAxis:t.scrollAxis||o.vertical,scrollContainer:t.scrollContainer,disabled:t.isDisabled},i.current="undefined"!=typeof window?k.init(e):null),(0,q.useEffect)(function(){t.scrollContainer&&i.current&&i.current.updateScrollContainer(t.scrollContainer)},[t.scrollContainer,i.current]),(0,q.useEffect)(function(){t.isDisabled&&i.current&&i.current.disableParallaxController(),!t.isDisabled&&i.current&&i.current.enableParallaxController()},[t.isDisabled,i.current]),(0,q.useEffect)(function(){return function(){(null==i?void 0:i.current)&&(null==i||i.current.destroy())}},[]),q.createElement(L.Provider,{value:i.current},t.children)}},25738:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=n||"";return r&&(a=n.toString().trim().replace(/[A-Za-z0-9\u00C0-\u00FF]+[^\s-]*/g,function(t,e,n){return e>0&&e+t.length!==n.length&&t.search(i)>-1&&":"!==n.charAt(e-2)&&("-"!==n.charAt(e+t.length)||"-"===n.charAt(e-1))&&0>n.charAt(e-1).search(/[^\s-]/)?t.toLowerCase():t.substr(1).search(/[A-Z]|\../)>-1?t:t.charAt(0).toUpperCase()+t.substr(1)})),s&&(a="string"==typeof(e=t=a)&&-1!==e.indexOf("@")?(console.warn("This arg looks like an email address, redacting."),"REDACTED (Potential Email Address)"):t),a};var i=/^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|vs?\.?|via)$/i},31195:(t,e,i)=>{"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.Ay=void 0;var r=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var i=s(e);if(i&&i.has(t))return i.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var l=a?Object.getOwnPropertyDescriptor(t,o):null;l&&(l.get||l.set)?Object.defineProperty(r,o,l):r[o]=t[o]}return r.default=t,i&&i.set(t,r),r}(i(47595));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(s=function(t){return t?i:e})(t)}r.GA4,e.Ay=r.default},34560:(t,e,i)=>{"use strict";i.d(e,{$:()=>o,s:()=>a});var n=i(7165),r=i(57948),s=i(6784),a=class extends r.k{#t;#e;#i;constructor(t){super(),this.mutationId=t.mutationId,this.#e=t.mutationCache,this.#t=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#e.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){this.#i=(0,s.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#n({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});let e="pending"===this.state.status,i=!this.#i.canStart();try{if(!e){this.#n({type:"pending",variables:t,isPaused:i}),await this.#e.config.onMutate?.(t,this);let e=await this.options.onMutate?.(t);e!==this.state.context&&this.#n({type:"pending",context:e,variables:t,isPaused:i})}let n=await this.#i.start();return await this.#e.config.onSuccess?.(n,t,this.state.context,this),await this.options.onSuccess?.(n,t,this.state.context),await this.#e.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,t,this.state.context),this.#n({type:"success",data:n}),n}catch(e){try{throw await this.#e.config.onError?.(e,t,this.state.context,this),await this.options.onError?.(e,t,this.state.context),await this.#e.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,e,t,this.state.context),e}finally{this.#n({type:"error",error:e})}}finally{this.#e.runNext(this)}}#n(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),n.j.batch(()=>{this.#t.forEach(e=>{e.onMutationUpdate(t)}),this.#e.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},45410:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(){for(var t,e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];"undefined"!=typeof window&&(void 0===window.gtag&&(window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)}),(t=window).gtag.apply(t,i))}},47595:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.GA4=void 0;var n=l(i(45410)),r=l(i(25738)),s=["eventCategory","eventAction","eventLabel","eventValue","hitType"],a=["title","location"],o=["page","hitType"];function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i,n,r={},s=Object.keys(t);for(n=0;n<s.length;n++)i=s[n],e.indexOf(i)>=0||(r[i]=t[i]);return r}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)i=s[n],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function f(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?d(Object(i),!0).forEach(function(e){v(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function p(t,e){if(t){if("string"==typeof t)return g(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if("Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return g(t,e)}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function v(t,e,i){return(e=m(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t){var e=function(t,e){if("object"!==h(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==h(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===h(e)?e:String(e)}var y=function(){var t;function e(){var t=this;!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,e),v(this,"reset",function(){t.isInitialized=!1,t._testMode=!1,t._currentMeasurementId,t._hasLoadedGA=!1,t._isQueuing=!1,t._queueGtag=[]}),v(this,"_gtag",function(){for(var e=arguments.length,i=Array(e),r=0;r<e;r++)i[r]=arguments[r];t._testMode?t._queueGtag.push(i):t._isQueuing?t._queueGtag.push(i):n.default.apply(void 0,i)}),v(this,"_loadGA",function(e,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"https://www.googletagmanager.com/gtag/js";if("undefined"!=typeof window&&"undefined"!=typeof document&&!t._hasLoadedGA){var r=document.createElement("script");r.async=!0,r.src="".concat(n,"?id=").concat(e),i&&r.setAttribute("nonce",i),document.body.appendChild(r),window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},t._hasLoadedGA=!0}}),v(this,"_toGtagOptions",function(t){if(t){var e={cookieUpdate:"cookie_update",cookieExpires:"cookie_expires",cookieDomain:"cookie_domain",cookieFlags:"cookie_flags",userId:"user_id",clientId:"client_id",anonymizeIp:"anonymize_ip",contentGroup1:"content_group1",contentGroup2:"content_group2",contentGroup3:"content_group3",contentGroup4:"content_group4",contentGroup5:"content_group5",allowAdFeatures:"allow_google_signals",allowAdPersonalizationSignals:"allow_ad_personalization_signals",nonInteraction:"non_interaction",page:"page_path",hitCallback:"event_callback"};return Object.entries(t).reduce(function(t,i){var n=function(t){if(Array.isArray(t))return t}(i)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,s,a,o=[],l=!0,u=!1;try{s=(i=i.call(t)).next;for(;!(l=(n=s.call(i)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(t){u=!0,r=t}finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(u)throw r}}return o}}(i,2)||p(i,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=n[0],s=n[1];return e[r]?t[e[r]]=s:t[r]=s,t},{})}}),v(this,"initialize",function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw Error("Require GA_MEASUREMENT_ID");var n="string"==typeof e?[{trackingId:e}]:e;t._currentMeasurementId=n[0].trackingId;var r=i.gaOptions,s=i.gtagOptions,a=i.nonce,o=i.testMode,l=void 0!==o&&o,u=i.gtagUrl;if(t._testMode=l,l||t._loadGA(t._currentMeasurementId,a,u),t.isInitialized||(t._gtag("js",new Date),n.forEach(function(e){var i=f(f(f({},t._toGtagOptions(f(f({},r),e.gaOptions))),s),e.gtagOptions);Object.keys(i).length?t._gtag("config",e.trackingId,i):t._gtag("config",e.trackingId)})),t.isInitialized=!0,!l){var h=c(t._queueGtag);for(t._queueGtag=[],t._isQueuing=!1;h.length;){var d=h.shift();t._gtag.apply(t,c(d)),"get"===d[0]&&(t._isQueuing=!0)}}}),v(this,"set",function(e){if(!e){console.warn("`fieldsObject` is required in .set()");return}if("object"!==h(e)){console.warn("Expected `fieldsObject` arg to be an Object");return}0===Object.keys(e).length&&console.warn("empty `fieldsObject` given to .set()"),t._gaCommand("set",e)}),v(this,"_gaCommandSendEvent",function(e,i,n,r,s){t._gtag("event",i,f(f({event_category:e,event_label:n,value:r},s&&{non_interaction:s.nonInteraction}),t._toGtagOptions(s)))}),v(this,"_gaCommandSendEventParameters",function(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];if("string"==typeof i[0])t._gaCommandSendEvent.apply(t,c(i.slice(1)));else{var r=i[0],a=r.eventCategory,o=r.eventAction,l=r.eventLabel,h=r.eventValue,d=(r.hitType,u(r,s));t._gaCommandSendEvent(a,o,l,h,d)}}),v(this,"_gaCommandSendTiming",function(e,i,n,r){t._gtag("event","timing_complete",{name:i,value:n,event_category:e,event_label:r})}),v(this,"_gaCommandSendPageview",function(e,i){if(i&&Object.keys(i).length){var n=t._toGtagOptions(i),r=n.title,s=n.location,o=u(n,a);t._gtag("event","page_view",f(f(f(f({},e&&{page_path:e}),r&&{page_title:r}),s&&{page_location:s}),o))}else e?t._gtag("event","page_view",{page_path:e}):t._gtag("event","page_view")}),v(this,"_gaCommandSendPageviewParameters",function(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];if("string"==typeof i[0])t._gaCommandSendPageview.apply(t,c(i.slice(1)));else{var r=i[0],s=r.page,a=(r.hitType,u(r,o));t._gaCommandSendPageview(s,a)}}),v(this,"_gaCommandSend",function(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];var r="string"==typeof i[0]?i[0]:i[0].hitType;switch(r){case"event":t._gaCommandSendEventParameters.apply(t,i);break;case"pageview":t._gaCommandSendPageviewParameters.apply(t,i);break;case"timing":t._gaCommandSendTiming.apply(t,c(i.slice(1)));break;case"screenview":case"transaction":case"item":case"social":case"exception":console.warn("Unsupported send command: ".concat(r));break;default:console.warn("Send command doesn't exist: ".concat(r))}}),v(this,"_gaCommandSet",function(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];"string"==typeof i[0]&&(i[0]=v({},i[0],i[1])),t._gtag("set",t._toGtagOptions(i[0]))}),v(this,"_gaCommand",function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];switch(e){case"send":t._gaCommandSend.apply(t,n);break;case"set":t._gaCommandSet.apply(t,n);break;default:console.warn("Command doesn't exist: ".concat(e))}}),v(this,"ga",function(){for(var e=arguments.length,i=Array(e),n=0;n<e;n++)i[n]=arguments[n];if("string"==typeof i[0])t._gaCommand.apply(t,i);else{var r=i[0];t._gtag("get",t._currentMeasurementId,"client_id",function(e){t._isQueuing=!1;var i=t._queueGtag;for(r({get:function(i){return"clientId"===i?e:"trackingId"===i?t._currentMeasurementId:"apiVersion"===i?"1":void 0}});i.length;){var n=i.shift();t._gtag.apply(t,c(n))}}),t._isQueuing=!0}return t.ga}),v(this,"event",function(e,i){if("string"==typeof e)t._gtag("event",e,t._toGtagOptions(i));else{var n=e.action,s=e.category,a=e.label,o=e.value,l=e.nonInteraction,u=e.transport;if(!s||!n){console.warn("args.category AND args.action are required in event()");return}var h={hitType:"event",eventCategory:(0,r.default)(s),eventAction:(0,r.default)(n)};a&&(h.eventLabel=(0,r.default)(a)),void 0!==o&&("number"!=typeof o?console.warn("Expected `args.value` arg to be a Number."):h.eventValue=o),void 0!==l&&("boolean"!=typeof l?console.warn("`args.nonInteraction` must be a boolean."):h.nonInteraction=l),void 0!==u&&("string"!=typeof u?console.warn("`args.transport` must be a string."):(-1===["beacon","xhr","image"].indexOf(u)&&console.warn("`args.transport` must be either one of these values: `beacon`, `xhr` or `image`"),h.transport=u)),t._gaCommand("send",h)}}),v(this,"send",function(e){t._gaCommand("send",e)}),this.reset()}return t=[{key:"gtag",value:function(){this._gtag.apply(this,arguments)}}],function(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}();e.GA4=y,e.default=new y},50192:(t,e,i)=>{"use strict";i.d(e,{E:()=>n});var n=function(){return null}},85572:t=>{var e="function"==typeof Float32Array;function i(t,e,i){return(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t}function n(t,e,i){return 3*(1-3*i+3*e)*t*t+2*(3*i-6*e)*t+3*e}function r(t){return t}t.exports=function(t,s,a,o){if(!(0<=t&&t<=1&&0<=a&&a<=1))throw Error("bezier x values must be in [0, 1] range");if(t===s&&a===o)return r;for(var l=e?new Float32Array(11):Array(11),u=0;u<11;++u)l[u]=i(.1*u,t,a);return function(e){return 0===e?0:1===e?1:i(function(e){for(var r=0,s=1;10!==s&&l[s]<=e;++s)r+=.1;var o=r+(e-l[--s])/(l[s+1]-l[s])*.1,u=n(o,t,a);return u>=.001?function(t,e,r,s){for(var a=0;a<4;++a){var o=n(e,r,s);if(0===o)break;var l=i(e,r,s)-t;e-=l/o}return e}(e,o,t,a):0===u?o:function(t,e,n,r,s){var a,o,l=0;do(a=i(o=e+(n-e)/2,r,s)-t)>0?n=o:e=o;while(Math.abs(a)>1e-7&&++l<10);return o}(e,r,r+.1,t,a)}(e),s,o)}}},87017:(t,e,i)=>{"use strict";i.d(e,{E:()=>g});var n=i(52020),r=i(39853),s=i(7165),a=i(25910),o=class extends a.Q{constructor(t={}){super(),this.config=t,this.#r=new Map}#r;build(t,e,i){let s=e.queryKey,a=e.queryHash??(0,n.F$)(s,e),o=this.get(a);return o||(o=new r.X({client:t,queryKey:s,queryHash:a,options:t.defaultQueryOptions(e),state:i,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){this.#r.has(t.queryHash)||(this.#r.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){let e=this.#r.get(t.queryHash);e&&(t.destroy(),e===t&&this.#r.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){s.j.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#r.get(t)}getAll(){return[...this.#r.values()]}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,n.MK)(e,t))}findAll(t={}){let e=this.getAll();return Object.keys(t).length>0?e.filter(e=>(0,n.MK)(t,e)):e}notify(t){s.j.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){s.j.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){s.j.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},l=i(34560),u=class extends a.Q{constructor(t={}){super(),this.config=t,this.#s=new Set,this.#a=new Map,this.#o=0}#s;#a;#o;build(t,e,i){let n=new l.s({mutationCache:this,mutationId:++this.#o,options:t.defaultMutationOptions(e),state:i});return this.add(n),n}add(t){this.#s.add(t);let e=h(t);if("string"==typeof e){let i=this.#a.get(e);i?i.push(t):this.#a.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#s.delete(t)){let e=h(t);if("string"==typeof e){let i=this.#a.get(e);if(i){if(i.length>1){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}else i[0]===t&&this.#a.delete(e)}}}this.notify({type:"removed",mutation:t})}canRun(t){let e=h(t);if("string"!=typeof e)return!0;{let i=this.#a.get(e),n=i?.find(t=>"pending"===t.state.status);return!n||n===t}}runNext(t){let e=h(t);if("string"!=typeof e)return Promise.resolve();{let i=this.#a.get(e)?.find(e=>e!==t&&e.state.isPaused);return i?.continue()??Promise.resolve()}}clear(){s.j.batch(()=>{this.#s.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#s.clear(),this.#a.clear()})}getAll(){return Array.from(this.#s)}find(t){let e={exact:!0,...t};return this.getAll().find(t=>(0,n.nJ)(e,t))}findAll(t={}){return this.getAll().filter(e=>(0,n.nJ)(t,e))}notify(t){s.j.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){let t=this.getAll().filter(t=>t.state.isPaused);return s.j.batch(()=>Promise.all(t.map(t=>t.continue().catch(n.lQ))))}};function h(t){return t.options.scope?.id}var c=i(50920),d=i(21239);function f(t){return{onFetch:(e,i)=>{let r=e.options,s=e.fetchOptions?.meta?.fetchMore?.direction,a=e.state.data?.pages||[],o=e.state.data?.pageParams||[],l={pages:[],pageParams:[]},u=0,h=async()=>{let i=!1,h=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(e.signal.aborted?i=!0:e.signal.addEventListener("abort",()=>{i=!0}),e.signal)})},c=(0,n.ZM)(e.options,e.fetchOptions),d=async(t,r,s)=>{if(i)return Promise.reject();if(null==r&&t.pages.length)return Promise.resolve(t);let a={client:e.client,queryKey:e.queryKey,pageParam:r,direction:s?"backward":"forward",meta:e.options.meta};h(a);let o=await c(a),{maxPages:l}=e.options,u=s?n.ZZ:n.y9;return{pages:u(t.pages,o,l),pageParams:u(t.pageParams,r,l)}};if(s&&a.length){let t="backward"===s,e={pages:a,pageParams:o},i=(t?function(t,{pages:e,pageParams:i}){return e.length>0?t.getPreviousPageParam?.(e[0],e,i[0],i):void 0}:p)(r,e);l=await d(e,i,t)}else{let e=t??a.length;do{let t=0===u?o[0]??r.initialPageParam:p(r,l);if(u>0&&null==t)break;l=await d(l,t),u++}while(u<e)}return l};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},i):e.fetchFn=h}}}function p(t,{pages:e,pageParams:i}){let n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,i[n],i):void 0}var g=class{#l;#e;#u;#h;#c;#d;#f;#p;constructor(t={}){this.#l=t.queryCache||new o,this.#e=t.mutationCache||new u,this.#u=t.defaultOptions||{},this.#h=new Map,this.#c=new Map,this.#d=0}mount(){this.#d++,1===this.#d&&(this.#f=c.m.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#l.onFocus())}),this.#p=d.t.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#l.onOnline())}))}unmount(){this.#d--,0===this.#d&&(this.#f?.(),this.#f=void 0,this.#p?.(),this.#p=void 0)}isFetching(t){return this.#l.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){let e=this.defaultQueryOptions({queryKey:t});return this.#l.get(e.queryHash)?.state.data}ensureQueryData(t){let e=this.defaultQueryOptions(t),i=this.#l.build(this,e),r=i.state.data;return void 0===r?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime((0,n.d2)(e.staleTime,i))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return this.#l.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,i){let r=this.defaultQueryOptions({queryKey:t}),s=this.#l.get(r.queryHash),a=s?.state.data,o=(0,n.Zw)(e,a);if(void 0!==o)return this.#l.build(this,r).setData(o,{...i,manual:!0})}setQueriesData(t,e,i){return s.j.batch(()=>this.#l.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,e,i)]))}getQueryState(t){let e=this.defaultQueryOptions({queryKey:t});return this.#l.get(e.queryHash)?.state}removeQueries(t){let e=this.#l;s.j.batch(()=>{e.findAll(t).forEach(t=>{e.remove(t)})})}resetQueries(t,e){let i=this.#l;return s.j.batch(()=>(i.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){let i={revert:!0,...e};return Promise.all(s.j.batch(()=>this.#l.findAll(t).map(t=>t.cancel(i)))).then(n.lQ).catch(n.lQ)}invalidateQueries(t,e={}){return s.j.batch(()=>(this.#l.findAll(t).forEach(t=>{t.invalidate()}),t?.refetchType==="none")?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e))}refetchQueries(t,e={}){let i={...e,cancelRefetch:e.cancelRefetch??!0};return Promise.all(s.j.batch(()=>this.#l.findAll(t).filter(t=>!t.isDisabled()).map(t=>{let e=t.fetch(void 0,i);return i.throwOnError||(e=e.catch(n.lQ)),"paused"===t.state.fetchStatus?Promise.resolve():e}))).then(n.lQ)}fetchQuery(t){let e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);let i=this.#l.build(this,e);return i.isStaleByTime((0,n.d2)(e.staleTime,i))?i.fetch(e):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(n.lQ).catch(n.lQ)}fetchInfiniteQuery(t){return t.behavior=f(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(n.lQ).catch(n.lQ)}ensureInfiniteQueryData(t){return t.behavior=f(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return d.t.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#l}getMutationCache(){return this.#e}getDefaultOptions(){return this.#u}setDefaultOptions(t){this.#u=t}setQueryDefaults(t,e){this.#h.set((0,n.EN)(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){let e=[...this.#h.values()],i={};return e.forEach(e=>{(0,n.Cp)(t,e.queryKey)&&Object.assign(i,e.defaultOptions)}),i}setMutationDefaults(t,e){this.#c.set((0,n.EN)(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){let e=[...this.#c.values()],i={};return e.forEach(e=>{(0,n.Cp)(t,e.mutationKey)&&Object.assign(i,e.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;let e={...this.#u.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=(0,n.F$)(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===n.hT&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#u.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#l.clear(),this.#e.clear()}}}}]); |