misaki-studio-internal 0.1.42 → 0.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -541,4 +541,4 @@
541
541
  height: 2px !important;
542
542
  border-radius: 2px;
543
543
  }
544
- `,yi=(e,t)=>{},bi={canPush:yi,canRemove:yi,canRemoveAll:yi,canPushAt:(e,t,n)=>{},canRemoveAt:(e,t)=>{},canMath:(e,t)=>{},canCall:(e,...t)=>{},isType:e=>e,isArrayType:e=>e};var _i=a(514),wi=a(72),xi=a.n(wi),Ei=a(825),Ti=a.n(Ei),Si=a(659),Ri=a.n(Si),Oi=a(56),Ai=a.n(Oi),Li=a(540),Ii=a.n(Li),Ni=a(113),Ci=a.n(Ni),Pi=a(983),ki={};ki.styleTagTransform=Ci(),ki.setAttributes=Ai(),ki.insert=Ri().bind(null,"head"),ki.domAPI=Ti(),ki.insertStyleElement=Ii(),xi()(Pi.Ay,ki);const ji=Pi.Ay&&Pi.Ay.locals?Pi.Ay.locals:void 0;function Di(){return"undefined"!=typeof window}function $i(e){return zi(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Bi(e){var t;return null==(t=(zi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zi(e){return!!Di()&&(e instanceof Node||e instanceof Mi(e).Node)}function Fi(e){return!!Di()&&(e instanceof Element||e instanceof Mi(e).Element)}function Ui(e){return!!Di()&&(e instanceof HTMLElement||e instanceof Mi(e).HTMLElement)}function Wi(e){return!(!Di()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot)}const Hi=new Set(["inline","contents"]);function qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hi.has(o)}const Yi=new Set(["table","td","th"]);function Gi(e){return Yi.has($i(e))}const Vi=[":popover-open",":modal"];function Xi(e){return Vi.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Zi=["transform","translate","scale","rotate","perspective"],Ki=["transform","translate","scale","rotate","perspective","filter"],Ji=["paint","layout","strict","content"];function Qi(e){const t=es(),n=Fi(e)?rs(e):e;return Zi.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Ki.some(e=>(n.willChange||"").includes(e))||Ji.some(e=>(n.contain||"").includes(e))}function es(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ts=new Set(["html","body","#document"]);function ns(e){return ts.has($i(e))}function rs(e){return Mi(e).getComputedStyle(e)}function os(e){return Fi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function is(e){if("html"===$i(e))return e;const t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||Bi(e);return Wi(t)?t.host:t}function ss(e){const t=is(e);return ns(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ui(t)&&qi(t)?t:ss(t)}function as(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ss(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Mi(o);if(i){const e=us(s);return t.concat(s,s.visualViewport||[],qi(o)?o:[],e&&n?as(e):[])}return t.concat(o,as(o,[],n))}function us(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Wi(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ls(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fs(e){return(null==e?void 0:e.ownerDocument)||document}function ps(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function hs(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ds=Math.min,ms=Math.max,gs=Math.round,vs=(Math.floor,e=>({x:e,y:e}));function ys(e,t,n){return ms(e,ds(t,n))}function bs(e,t){return"function"==typeof e?e(t):e}function _s(e){return e.split("-")[0]}function ws(e){return e.split("-")[1]}function xs(e){return"x"===e?"y":"x"}const Es=new Set(["top","bottom"]);function Ts(e){return Es.has(_s(e))?"y":"x"}function Ss(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Rs(e,t,n){let{reference:r,floating:o}=e;const i=Ts(t),s=function(e){return xs(Ts(e))}(t),a="y"===s?"height":"width",u=_s(t),c="y"===i,l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(ws(t)){case"start":h[s]-=p*(n&&c?-1:1);break;case"end":h[s]+=p*(n&&c?-1:1)}return h}const Os=new Set(["left","top"]);function As(e){const t=rs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ui(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=gs(n)!==i||gs(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ls(e){return Fi(e)?e:e.contextElement}function Is(e){const t=Ls(e);if(!Ui(t))return vs(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=As(t);let s=(i?gs(n.width):n.width)/r,a=(i?gs(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ns=vs(0);function Cs(e){const t=Mi(e);return es()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ns}function Ps(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ls(e);let s=vs(1);t&&(r?Fi(r)&&(s=Is(r)):s=Is(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Mi(e))&&t}(i,n,r)?Cs(i):vs(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,f=o.height/s.y;if(i){const e=Mi(i),t=r&&Fi(r)?Mi(r):r;let n=e,o=us(n);for(;o&&r&&t!==n;){const e=Is(o),t=o.getBoundingClientRect(),r=rs(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,l*=e.x,f*=e.y,u+=i,c+=s,n=Mi(o),o=us(n)}}return Ss({width:l,height:f,x:u,y:c})}function ks(e,t){const n=os(e).scrollLeft;return t?t.left+n:Ps(Bi(e)).left+n}function js(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ks(e,n),y:n.top+t.scrollTop}}const Ds=new Set(["absolute","fixed"]);function $s(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Mi(e),r=Bi(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const e=es();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}const c=ks(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:u}}(e,n);else if("document"===t)r=function(e){const t=Bi(e),n=os(e),r=e.ownerDocument.body,o=ms(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ms(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ks(e);const a=-n.scrollTop;return"rtl"===rs(r).direction&&(s+=ms(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Bi(e));else if(Fi(t))r=function(e,t){const n=Ps(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ui(e)?Is(e):vs(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Cs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ss(r)}function Ms(e,t){const n=is(e);return!(n===t||!Fi(n)||ns(n))&&("fixed"===rs(n).position||Ms(n,t))}function Bs(e,t,n){const r=Ui(t),o=Bi(t),i="fixed"===n,s=Ps(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=vs(0);function c(){u.x=ks(o)}if(r||!r&&!i)if(("body"!==$i(t)||qi(o))&&(a=os(t)),r){const e=Ps(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=!o||r||i?vs(0):js(o,a);return{x:s.left+a.scrollLeft-u.x-l.x,y:s.top+a.scrollTop-u.y-l.y,width:s.width,height:s.height}}function zs(e){return"static"===rs(e).position}function Fs(e,t){if(!Ui(e)||"fixed"===rs(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Bi(e)===n&&(n=n.ownerDocument.body),n}function Us(e,t){const n=Mi(e);if(Xi(e))return n;if(!Ui(e)){let t=is(e);for(;t&&!ns(t);){if(Fi(t)&&!zs(t))return t;t=is(t)}return n}let r=Fs(e,t);for(;r&&Gi(r)&&zs(r);)r=Fs(r,t);return r&&ns(r)&&zs(r)&&!Qi(r)?n:r||function(e){let t=is(e);for(;Ui(t)&&!ns(t);){if(Qi(t))return t;if(Xi(t))return null;t=is(t)}return null}(e)||n}const Ws={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Bi(r),a=!!t&&Xi(t.floating);if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=vs(1);const l=vs(0),f=Ui(r);if((f||!f&&!i)&&(("body"!==$i(r)||qi(s))&&(u=os(r)),Ui(r))){const e=Ps(r);c=Is(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const p=!s||f||i?vs(0):js(s,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+p.x,y:n.y*c.y-u.scrollTop*c.y+l.y+p.y}},getDocumentElement:Bi,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Xi(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=as(e,[],!1).filter(e=>Fi(e)&&"body"!==$i(e)),o=null;const i="fixed"===rs(e).position;let s=i?is(e):e;for(;Fi(s)&&!ns(s);){const t=rs(s),n=Qi(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Ds.has(o.position)||qi(s)&&!n&&Ms(e,s))?r=r.filter(e=>e!==s):o=t,s=is(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((e,n)=>{const r=$s(t,n,o);return e.top=ms(r.top,e.top),e.right=ds(r.right,e.right),e.bottom=ds(r.bottom,e.bottom),e.left=ms(r.left,e.left),e},$s(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Us,getElementRects:async function(e){const t=this.getOffsetParent||Us,n=this.getDimensions,r=await n(e.floating);return{reference:Bs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=As(e);return{width:t,height:n}},getScale:Is,isElement:Fi,isRTL:function(e){return"rtl"===rs(e).direction}},Hs=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=_s(n),a=ws(n),u="y"===Ts(n),c=Os.has(s)?-1:1,l=i&&u?-1:1,f=bs(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:d}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof d&&(h="end"===a?-1*d:d),u?{x:h*l,y:p*c}:{x:p*c,y:h*l}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},qs=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=bs(e,t),c={x:n,y:r},l=await async function(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=bs(t,e),d=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),m=a[p?"floating"===f?"reference":"floating":f],g=Ss(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v="floating"===f?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},_=Ss(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:u}):v);return{top:(g.top-_.top+d.top)/b.y,bottom:(_.bottom-g.bottom+d.bottom)/b.y,left:(g.left-_.left+d.left)/b.x,right:(_.right-g.right+d.right)/b.x}}(t,u),f=Ts(_s(o)),p=xs(f);let h=c[p],d=c[f];if(i){const e="y"===p?"bottom":"right";h=ys(h+l["y"===p?"top":"left"],h,h-l[e])}if(s){const e="y"===f?"bottom":"right";d=ys(d+l["y"===f?"top":"left"],d,d-l[e])}const m=a.fn({...t,[p]:h,[f]:d});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[f]:s}}}}}},Ys=(e,t,n)=>{const r=new Map,o={platform:Ws,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),u=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Rs(c,r,u),p=r,h={},d=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:v,data:y,reset:b}=await m({x:l,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});l=null!=g?g:l,f=null!=v?v:f,h={...h,[i]:{...h[i],...y}},b&&d<=50&&(d++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:l,y:f}=Rs(c,p,u))),n=-1)}return{x:l,y:f,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Gs="undefined"!=typeof document?F.useLayoutEffect:function(){};function Vs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Vs(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Vs(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Xs(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zs(e,t){const n=Xs(e);return Math.round(t*n)/n}function Ks(e){const t=F.useRef(e);return Gs(()=>{t.current=e}),t}const Js=(e,t)=>({...Hs(e),options:[e,t]}),Qs=(e,t)=>({...qs(e),options:[e,t]}),ea={...U},ta=ea.useInsertionEffect||(e=>e());function na(e){const t=F.useRef(()=>{});return ta(()=>{t.current=e}),F.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}var ra="undefined"!=typeof document?F.useLayoutEffect:F.useEffect;let oa=!1,ia=0;const sa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ia++,aa=ea.useId||function(){const[e,t]=F.useState(()=>oa?sa():void 0);return ra(()=>{null==e&&t(sa())},[]),F.useEffect(()=>{oa=!0},[]),e};const ua=F.createContext(null),ca=F.createContext(null),la=()=>{var e;return(null==(e=F.useContext(ua))?void 0:e.id)||null},fa=()=>F.useContext(ca);function pa(e){return"data-floating-ui-"+e}function ha(e){const t=(0,F.useRef)(e);return ra(()=>{t.current=e}),t}const da=pa("safe-polygon");function ma(e,t,n){return n&&!ls(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function ga(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}const va="data-floating-ui-focusable";function ya(e){return Ui(e.target)&&"BUTTON"===e.target.tagName}function ba(e){return function(e){return Ui(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e)}const _a={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wa={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xa=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Ea(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:u=!0,outsidePressEvent:c="pointerdown",referencePress:l=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:d}=t,m=fa(),g=na("function"==typeof u?u:()=>!1),v="function"==typeof u?g:u,y=F.useRef(!1),b=F.useRef(!1),{escapeKey:_,outsidePress:w}=xa(h),{escapeKey:x,outsidePress:E}=xa(d),T=F.useRef(!1),S=na(e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(T.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,u=m?ga(m.nodesRef.current,o):[];if(!_&&(e.stopPropagation(),u.length>0)){let e=!0;if(u.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),R=na(e=>{var t;const n=()=>{var t;S(e),null==(t=hs(e))||t.removeEventListener("keydown",n)};null==(t=hs(e))||t.addEventListener("keydown",n)}),O=na(e=>{var t;const n=y.current;y.current=!1;const s=b.current;if(b.current=!1,"click"===c&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=hs(e),u="["+pa("inert")+"]",l=fs(o.floating).querySelectorAll(u);let f=Fi(a)?a:null;for(;f&&!ns(f);){const e=is(f);if(ns(e)||!Fi(e))break;f=e}if(l.length&&Fi(a)&&!a.matches("html,body")&&!cs(a,o.floating)&&Array.from(l).every(e=>!cs(f,e)))return;if(Ui(a)&&I){const t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight;let r=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===rs(a).direction&&(r=e.offsetX<=a.offsetWidth-a.clientWidth),r||t&&e.offsetY>a.clientHeight)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=m&&ga(m.nodesRef.current,p).some(t=>{var n;return ps(e,null==(n=t.context)?void 0:n.elements.floating)});if(ps(e,o.floating)||ps(e,o.domReference)||h)return;const d=m?ga(m.nodesRef.current,p):[];if(d.length>0){let e=!0;if(d.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}r(!1,e,"outside-press")}),A=na(e=>{var t;const n=()=>{var t;O(e),null==(t=hs(e))||t.removeEventListener(c,n)};null==(t=hs(e))||t.addEventListener(c,n)});F.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=_,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function u(){window.clearTimeout(e),T.current=!0}function l(){e=window.setTimeout(()=>{T.current=!1},es()?5:0)}const f=fs(o.floating);a&&(f.addEventListener("keydown",x?R:S,x),f.addEventListener("compositionstart",u),f.addEventListener("compositionend",l)),v&&f.addEventListener(c,E?A:O,E);let h=[];return p&&(Fi(o.domReference)&&(h=as(o.domReference)),Fi(o.floating)&&(h=h.concat(as(o.floating))),!Fi(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(as(o.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{a&&(f.removeEventListener("keydown",x?R:S,x),f.removeEventListener("compositionstart",u),f.removeEventListener("compositionend",l)),v&&f.removeEventListener(c,E?A:O,E),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,o,a,v,c,n,r,p,s,_,w,S,x,R,O,E,A]),F.useEffect(()=>{y.current=!1},[v,c]);const L=F.useMemo(()=>({onKeyDown:S,[_a[f]]:e=>{l&&r(!1,e.nativeEvent,"reference-press")}}),[S,r,l,f]),I=F.useMemo(()=>({onKeyDown:S,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[wa[c]]:()=>{y.current=!0}}),[S,c]);return F.useMemo(()=>s?{reference:L,floating:I}:{},[s,L,I])}function Ta(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=aa(),i=F.useRef({}),[s]=F.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),a=null!=la(),[u,c]=F.useState(r.reference),l=na((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),f=F.useMemo(()=>({setPositionReference:c}),[]),p=F.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return F.useMemo(()=>({dataRef:i,open:t,onOpenChange:l,elements:p,events:s,floatingId:o,refs:f}),[t,l,p,s,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=F.useState(null),[a,u]=F.useState(null),c=(null==o?void 0:o.reference)||i,l=F.useRef(null),f=fa();ra(()=>{c&&(l.current=c)},[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[l,f]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=F.useState(r);Vs(p,r)||h(r);const[d,m]=F.useState(null),[g,v]=F.useState(null),y=F.useCallback(e=>{e!==x.current&&(x.current=e,m(e))},[]),b=F.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),_=i||d,w=s||g,x=F.useRef(null),E=F.useRef(null),T=F.useRef(l),S=null!=u,R=Ks(u),O=Ks(o),A=Ks(c),L=F.useCallback(()=>{if(!x.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),Ys(x.current,E.current,e).then(e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!Vs(T.current,t)&&(T.current=t,_i.flushSync(()=>{f(t)}))})},[p,t,n,O,A]);Gs(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);const I=F.useRef(!1);Gs(()=>(I.current=!0,()=>{I.current=!1}),[]),Gs(()=>{if(_&&(x.current=_),w&&(E.current=w),_&&w){if(R.current)return R.current(_,w,L);L()}},[_,w,L,R,S]);const N=F.useMemo(()=>({reference:x,floating:E,setReference:y,setFloating:b}),[y,b]),C=F.useMemo(()=>({reference:_,floating:w}),[_,w]),P=F.useMemo(()=>{const e={position:n,left:0,top:0};if(!C.floating)return e;const t=Zs(C.floating,l.x),r=Zs(C.floating,l.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Xs(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,C.floating,l.x,l.y]);return F.useMemo(()=>({...l,update:L,refs:N,elements:C,floatingStyles:P}),[l,L,N,C,P])}({...e,elements:{...o,...a&&{reference:a}}}),h=F.useCallback(e=>{const t=Fi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),d=F.useCallback(e=>{(Fi(e)||null===e)&&(l.current=e,s(e)),(Fi(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Fi(e))&&p.refs.setReference(e)},[p.refs]),m=F.useMemo(()=>({...p.refs,setReference:d,setPositionReference:h,domReference:l}),[p.refs,d,h]),g=F.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),v=F.useMemo(()=>({...p,...r,refs:m,elements:g,nodeId:t}),[p,m,g,t,r]);return ra(()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),F.useMemo(()=>({...p,context:v,refs:m,elements:g}),[p,m,g,v])}const Sa="active",Ra="selected";function Oa(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Sa]:t,[Ra]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[va]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var s;o&&[Sa,Ra].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function Aa(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=F.useCallback(t=>Oa(t,e,"reference"),t),i=F.useCallback(t=>Oa(t,e,"floating"),n),s=F.useCallback(t=>Oa(t,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function La(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,s=i-1;e<i;s=e++){const[i,a]=t[e]||[0,0],[u,c]=t[s]||[0,0];a>=r!=c>=r&&n<=(u-i)*(r-a)/(c-a)+i&&(o=!o)}return o}function Ia(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,u=performance.now();const c=e=>{let{x:n,y:c,placement:l,elements:f,onClose:p,nodeId:h,tree:d}=e;return function(e){function m(){clearTimeout(o),p()}if(clearTimeout(o),!f.domReference||!f.floating||null==l||null==n||null==c)return;const{clientX:g,clientY:v}=e,y=[g,v],b=hs(e),_="mouseleave"===e.type,w=cs(f.floating,b),x=cs(f.domReference,b),E=f.domReference.getBoundingClientRect(),T=f.floating.getBoundingClientRect(),S=l.split("-")[0],R=n>T.right-T.width/2,O=c>T.bottom-T.height/2,A=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,E),L=T.width>E.width,I=T.height>E.height,N=(L?E:T).left,C=(L?E:T).right,P=(I?E:T).top,k=(I?E:T).bottom;if(w&&(i=!0,!_))return;if(x&&(i=!1),x&&!_)return void(i=!0);if(_&&Fi(e.relatedTarget)&&cs(f.floating,e.relatedTarget))return;if(d&&ga(d.nodesRef.current,h).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===S&&c>=E.bottom-1||"bottom"===S&&c<=E.top+1||"left"===S&&n>=E.right-1||"right"===S&&n<=E.left+1)return m();let j=[];switch(S){case"top":j=[[N,E.top+1],[N,T.bottom-1],[C,T.bottom-1],[C,E.top+1]];break;case"bottom":j=[[N,T.top+1],[N,E.bottom-1],[C,E.bottom-1],[C,T.top+1]];break;case"left":j=[[T.right-1,k],[T.right-1,P],[E.left+1,P],[E.left+1,k]];break;case"right":j=[[E.right-1,k],[E.right-1,P],[T.left+1,P],[T.left+1,k]]}if(!La([g,v],j)){if(i&&!A)return m();if(!_&&r){const t=function(e,t){const n=performance.now(),r=n-u;if(null===s||null===a||0===r)return s=e,a=t,u=n,null;const o=e-s,i=t-a,c=Math.sqrt(o*o+i*i);return s=e,a=t,u=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}La([g,v],function(e){let[n,r]=e;switch(S){case"top":return[[L?n+t/2:R?n+4*t:n-4*t,r+t+1],[L?n-t/2:R?n+4*t:n-4*t,r+t+1],[T.left,R||L?T.bottom-t:T.top],[T.right,R?L?T.bottom-t:T.top:T.bottom-t]];case"bottom":return[[L?n+t/2:R?n+4*t:n-4*t,r-t],[L?n-t/2:R?n+4*t:n-4*t,r-t],[T.left,R||L?T.top+t:T.bottom],[T.right,R?L?T.top+t:T.bottom:T.top+t]];case"left":{const e=[n+t+1,I?r+t/2:O?r+4*t:r-4*t],o=[n+t+1,I?r-t/2:O?r+4*t:r-4*t];return[[O||I?T.right-t:T.left,T.top],[O?I?T.right-t:T.left:T.right-t,T.bottom],e,o]}case"right":return[[n-t,I?r+t/2:O?r+4*t:r-4*t],[n-t,I?r-t/2:O?r+4*t:r-4*t],[O||I?T.left+t:T.right,T.top],[O?I?T.left+t:T.right:T.left+t,T.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const Na=i;let Ca=1e5;const Pa=()=>Ca++,ka=({top:e,left:t,isVisible:n=!1,children:r,style:o})=>{const[i,s]=(0,F.useState)(!0),[a,u]=(0,F.useState)(!0);return(0,F.useEffect)(()=>{u(!0),n?setTimeout(()=>{s(!1)},50):(setTimeout(()=>{s(!0)},50),setTimeout(()=>{u(!1)},300))},[n]),(0,X.jsx)(X.Fragment,{children:a&&(0,_i.createPortal)((0,X.jsx)("div",{className:Na.root,style:Object.assign(Object.assign({},null==o?void 0:o.root),{"--background-color":i?"rgba(0, 0, 0, 0.0)":"rgba(0, 0, 0, 0.4)"}),children:(0,X.jsx)("div",{className:Na.background,property:i?"--top-value: 50%":`--top-value: ${e}`,style:Object.assign(Object.assign({},null==o?void 0:o.background),{"--top-value":i?"50%":e,"--left-value":i?"50%":t,"--transform-value":i?"translateX(-50%) translateY(-50%) scale(.9)":"translateX(-50%) translateY(-50%) scale(1)","--opacity-value":i?"0":"1"}),children:r()})}),document.body)})},ja=({children:e,parent:t,onChange:n,popupAlignmentProps:r,isVisible:o,action:i="click",onInteractOutsidePopup:s})=>{const[a,u]=(0,F.useState)(null),c=(0,F.useRef)(null),[l,f]=(0,F.useState)(o||!1),p=null==t?void 0:t({isOpen:l,setRef:e=>u(e),remove:()=>f(!1)});return(0,F.useEffect)(()=>{let e;return l&&c.current&&a&&(e=new $a({popupAlignmentProps:r,element:c.current,parent:a,autoRemove:!o,filterElementOnAutoRemove:[a],onRemove:()=>{f(!1)},onInteractOutside:()=>{null==s||s(c.current||void 0)}})),()=>{null==e||e.remove()}},[l,c.current,a]),(0,F.useEffect)(()=>{const e=()=>f(!l),t=a;return t&&(null==t||t.addEventListener(i,e)),()=>{null==t||t.removeEventListener(i,e)}},[a,l]),(0,F.useEffect)(()=>{const e=()=>f(!l),t=a;return t&&(null==t||t.addEventListener(i,e)),()=>{null==t||t.removeEventListener(i,e)}},[a,l]),(0,F.useEffect)(()=>{void 0!==o&&f(o)},[o]),(0,F.useEffect)(()=>{null==n||n(l)},[l]),(0,X.jsxs)(X.Fragment,{children:[p,l&&(0,_i.createPortal)((0,X.jsx)("div",{className:Na["popup-element"],style:r.style,ref:c,children:e({remove:()=>f(!1),parentRef:a||void 0})}),document.body)]})};let Da=[];class $a{setMovable(){this.element.addEventListener("mousedown",this.onDown)}adjustElement(e){const t=e.getBoundingClientRect(),n={top:t.top,left:t.left,height:t.height,width:t.width,right:0,bottom:0};n.bottom=n.top+n.height,n.right=n.left+n.width;const r=document.body.offsetWidth-10,o=document.body.offsetHeight-10,i=e.offsetTop,s=e.offsetLeft;if(n.height<o)n.top<10?e.style.top="10px":n.bottom>o&&(e.style.top=i-(n.bottom-o)+"px");else if(n.height>o){e.style.top="0px";const t=e.getBoundingClientRect();t.top<0&&(e.style.top=-t.top+"px")}if(n.width<r)n.left<10?e.style.left="10px":n.right>r&&(e.style.left=s-(n.right-r)+"px");else if(n.width>r){e.style.left="0px";const t=e.getBoundingClientRect();t.left<0&&(e.style.left=-t.left+"px")}}onResize(){const{yType:e="top-edge",xType:t="left-edge",yMargin:n=0,xMargin:r=0,width:o,minWidth:i,height:s,minHeight:a}=this.popupAlignmentProps,u=this.element,c=this.parent.getBoundingClientRect();u.style.contain="layout",o&&(u.style.width="auto"===o?"auto":`${c.width}px`),i&&(u.style.minWidth="auto"===i?"auto":`${c.width}px`),s&&(u.style.height="auto"===s?"auto":`${c.height}px`),a&&(u.style.minHeight="auto"===a?"auto":`${c.height}px`);const l=u.getBoundingClientRect();if("left"===t)u.style.left=`${(c.left<1?0:c.left)-l.width+r}px`;else if("left-edge"===t)u.style.left=`${(c.left<1?0:c.left)+r}px`;else if("right-edge"===t)u.style.left=`${(c.left<1?0:c.left)-l.width+c.width+r}px`;else if("center"===t){const e=c.width/2-l.width/2;u.style.left=`${(c.left<1?0:c.left)+e+r}px`}else u.style.left=`${(c.right<1?0:c.right)+r}px`;if("top"===e)u.style.top=`${(c.top<1?0:c.top)-l.height+n}px`;else if("top-edge"===e)u.style.top=`${(c.top<1?0:c.top)+n}px`;else if("bottom-edge"===e)u.style.top=`${(c.top<1?0:c.top)-l.height+c.height+n}px`;else if("center"===e){const e=c.height/2-l.height/2;u.style.top=`${(c.top<1?0:c.top)+e+n}px`}else u.style.top=`${(c.bottom<1?0:c.bottom)+n}px`;u.style.scale=(c.width/this.parent.offsetWidth).toString(),this.adjustElement(u),u.style.opacity="1"}constructor(e){this.onDown=e=>{const t=parseInt(this.element.style.left),n=parseInt(this.element.style.top),r=r=>{this.element.style.left=t-(e.clientX-r.clientX)+"px",this.element.style.top=n-(e.clientY-r.clientY)+"px"},o=()=>{i()},i=()=>{window.removeEventListener("mousemove",r),window.addEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},this.resizeObserver=new ResizeObserver(e=>{this.onResize()}),this.filterElementOnAutoRemove=[],this.onDownElement=!1,this.onElementMousedown=()=>{this.onDownElement=!0},this.onWindowMousedown=e=>{const t=[...this.filterElementOnAutoRemove||[],...Da],n=t?document.elementsFromPoint(e.clientX,e.clientY).filter(e=>null==t?void 0:t.includes(e)):[];!1!==this.onDownElement||n.length||(this.autoRemove&&this.remove(),this.onInteractOutside&&this.onInteractOutside()),this.onDownElement=!1},this.onWindowResize=()=>{this.onResize&&window.requestAnimationFrame(()=>{this.onResize()})},this.onWindowWheel=()=>{this.onResize&&window.requestAnimationFrame(()=>{this.onResize()})},this.element=e.element,this.parent=e.parent,Da.push(e.element),Da.push(e.parent),this.onRemove=e.onRemove,this.popupAlignmentProps=e.popupAlignmentProps,this.autoRemove=e.autoRemove,this.onInteractOutside=e.onInteractOutside,this.filterElementOnAutoRemove=e.filterElementOnAutoRemove,(e.autoRemove||e.onInteractOutside)&&(this.element.addEventListener("mousedown",this.onElementMousedown),window.addEventListener("mousedown",this.onWindowMousedown),window.addEventListener("resize",this.onWindowResize),window.addEventListener("wheel",this.onWindowWheel)),this.onResize(),this.resizeObserver.observe(e.element),this.resizeObserver.observe(e.parent)}setXY(e,t){this.element.style.top=t+"px",this.element.style.left=e+"px"}setXYString(e,t){this.element.style.top=t,this.element.style.left=e}remove(){var e;Da=Da.filter(e=>e!==this.element&&e!==this.parent),this.element.removeEventListener("mousedown",this.onElementMousedown),window.removeEventListener("mousedown",this.onWindowMousedown),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("wheel",this.onWindowWheel),null===(e=this.onRemove)||void 0===e||e.call(this)}}const Ma=e=>{const[t,n]=(0,F.useState)(!1),r=(0,F.useRef)(),{refs:o,x:i,y:s,strategy:a,context:u}=Ta({open:t,onOpenChange:n,middleware:[Qs(),Js(e.offset||0)],placement:e.placement}),c=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:u=0,handleClose:c=null,mouseOnly:l=!1,restMs:f=0,move:p=!0}=t,h=fa(),d=la(),m=ha(c),g=ha(u),v=ha(n),y=F.useRef(),b=F.useRef(-1),_=F.useRef(),w=F.useRef(-1),x=F.useRef(!0),E=F.useRef(!1),T=F.useRef(()=>{}),S=F.useRef(!1),R=F.useCallback(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[o]);F.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(b.current),clearTimeout(w.current),x.current=!0,S.current=!1)}},[a,i]),F.useEffect(()=>{if(!a)return;if(!m.current)return;if(!n)return;function e(e){R()&&r(!1,e,"hover")}const t=fs(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,n,r,a,m,R]);const O=F.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=ma(g.current,"close",y.current);o&&!_.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(clearTimeout(b.current),r(!1,e,n))},[g,r]),A=na(()=>{T.current(),_.current=void 0}),L=na(()=>{if(E.current){const e=fs(s.floating).body;e.style.pointerEvents="",e.removeAttribute(da),E.current=!1}});F.useEffect(()=>{if(a&&Fi(s.domReference)){var e;const t=s.domReference;return n&&t.addEventListener("mouseleave",c),null==(e=s.floating)||e.addEventListener("mouseleave",c),p&&t.addEventListener("mousemove",i,{once:!0}),t.addEventListener("mouseenter",i),t.addEventListener("mouseleave",u),()=>{var e;n&&t.removeEventListener("mouseleave",c),null==(e=s.floating)||e.removeEventListener("mouseleave",c),p&&t.removeEventListener("mousemove",i),t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",u)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function i(e){if(clearTimeout(b.current),x.current=!1,l&&!ls(y.current)||f>0&&!ma(g.current,"open"))return;const t=ma(g.current,"open",y.current);t?b.current=window.setTimeout(()=>{v.current||r(!0,e,"hover")},t):r(!0,e,"hover")}function u(e){if(t())return;T.current();const r=fs(s.floating);if(clearTimeout(w.current),S.current=!1,m.current&&o.current.floatingContext){n||clearTimeout(b.current),_.current=m.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){L(),A(),O(e,!0,"safe-polygon")}});const t=_.current;return r.addEventListener("mousemove",t),void(T.current=()=>{r.removeEventListener("mousemove",t)})}("touch"!==y.current||!cs(s.floating,e.relatedTarget))&&O(e)}function c(e){t()||o.current.floatingContext&&(null==m.current||m.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){L(),A(),O(e)}})(e))}},[s,a,e,l,f,p,O,A,L,r,n,v,h,g,m,o]),ra(()=>{var e;if(a&&n&&null!=(e=m.current)&&e.__options.blockPointerEvents&&R()){E.current=!0;const e=s.floating;if(Fi(s.domReference)&&e){var t;const n=fs(s.floating).body;n.setAttribute(da,"");const r=s.domReference,o=null==h||null==(t=h.nodesRef.current.find(e=>e.id===d))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,n,d,s,h,m,R]),ra(()=>{n||(y.current=void 0,S.current=!1,A(),L())},[n,A,L]),F.useEffect(()=>()=>{A(),clearTimeout(b.current),clearTimeout(w.current),L()},[a,s.domReference,A,L]);const I=F.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){x.current||v.current||r(!0,t,"hover")}l&&!ls(y.current)||n||0===f||S.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(w.current),"touch"===y.current?o():(S.current=!0,w.current=window.setTimeout(o,f)))}}},[l,r,n,v,f]),N=F.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(e){O(e.nativeEvent,!1)}}),[O]);return F.useMemo(()=>a?{reference:I,floating:N}:{},[a,I,N])}(u,{handleClose:Ia({requireIntent:!1})}),{getReferenceProps:l,getFloatingProps:f}=Aa([c]),{onMouseMove:p,onPointerDown:h,onPointerEnter:d}=l(),m=r.current;return(0,F.useLayoutEffect)(()=>(null==m||m.addEventListener("mousemove",p),null==m||m.addEventListener("pointerdown",h),null==m||m.addEventListener("pointerenter",d),()=>{null==m||m.removeEventListener("mousemove",p),null==m||m.removeEventListener("pointerdown",h),null==m||m.removeEventListener("pointerenter",d)}),[m,p,h,d]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{r.current=e,o.setReference(e)}),t&&(0,_i.createPortal)((0,X.jsx)("div",Object.assign({ref:o.setFloating,style:{position:a,top:null!=s?s:0,left:null!=i?i:0,zIndex:Pa()}},f(),{children:e.element})),document.body)]})},Ba=e=>{const[t,n]=(0,F.useState)(!1),r=(0,F.useRef)(),{refs:o,x:i,y:s,strategy:a,context:u}=Ta({open:t,onOpenChange:n,middleware:[Qs(),Js(e.offset||0)],placement:e.placement}),c=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:u=!0,ignoreMouse:c=!1,keyboardHandlers:l=!0}=t,f=F.useRef(),p=F.useRef(!1),h=F.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current;0===e.button&&"click"!==a&&(ls(t,!0)&&c||(!n||!u||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=f.current;"mousedown"===a&&f.current?f.current=void 0:ls(t,!0)&&c||(!n||!u||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){f.current=void 0,e.defaultPrevented||!l||ya(e)||(" "!==e.key||ba(i)||(e.preventDefault(),p.current=!0),"Enter"===e.key&&r(!n||!u,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!l||ya(e)||ba(i)||" "===e.key&&p.current&&(p.current=!1,r(!n||!u,e.nativeEvent,"click"))}}),[o,i,a,c,l,r,n,u]);return F.useMemo(()=>s?{reference:h}:{},[s,h])}(u),l=Ea(u),{getReferenceProps:f,getFloatingProps:p}=Aa([c,l]),{onPointerDown:h,onMouseDown:d,onClick:m,onKeyDown:g,onKeyUp:v}=f(),y=r.current;return(0,F.useLayoutEffect)(()=>(null==y||y.addEventListener("pointerdown",h),null==y||y.addEventListener("click",m),null==y||y.addEventListener("mousedown",d),null==y||y.addEventListener("keydown",g),null==y||y.addEventListener("keyup",v),()=>{null==y||y.removeEventListener("pointerdown",h),null==y||y.removeEventListener("click",m),null==y||y.removeEventListener("mousedown",d),null==y||y.removeEventListener("keydown",g),null==y||y.removeEventListener("keyup",v)}),[y,h,d,m,g,v]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{r.current=e,o.setReference(e)}),t&&(0,_i.createPortal)((0,X.jsx)("div",Object.assign({ref:o.setFloating,style:{position:a,top:null!=s?s:0,left:null!=i?i:0,zIndex:Pa()}},p(),{children:e.element})),document.body)]})},za=e=>{const t=(0,F.useRef)(),{refs:n,x:r,y:o,strategy:i,context:s}=Ta({open:e.isOpen,middleware:[Qs(),Js(e.offset||0)],placement:e.placement,onOpenChange(n,r,o){var i;null===(i=e.onInteractOutside)||void 0===i||i.call(e,t.current)}}),a=Ea(s),{getReferenceProps:u,getFloatingProps:c}=Aa([a]),{onPointerDown:l,onKeyDown:f}=u(),p=t.current;return(0,F.useLayoutEffect)(()=>(null==p||p.addEventListener("pointerdown",l),null==p||p.addEventListener("keydown",f),()=>{null==p||p.removeEventListener("pointerdown",l),null==p||p.removeEventListener("keydown",f)}),[p,l,f]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{t.current=e,n.setReference(e)}),e.isOpen&&(0,_i.createPortal)((0,X.jsx)("div",Object.assign({ref:n.setFloating,style:{position:i,top:null!=o?o:0,left:null!=r?r:0,zIndex:Pa()}},c(),{children:e.element})),document.body)]})},Fa=({children:e})=>{const t=document.body,[,n]=(0,F.useState)({});return(0,F.useEffect)(()=>{t.style.overflow="hidden";const e=new ResizeObserver(e=>{n({})});return e.observe(t),()=>{t.style.overflow="",e.disconnect()}},[t]),(0,X.jsx)(X.Fragment,{children:(0,_i.createPortal)((0,X.jsx)("div",{style:{top:`${t.scrollTop}px`,left:`${t.scrollLeft}px`,width:`${t.scrollWidth}px`,height:`${t.scrollHeight}px`,position:"absolute",zIndex:Pa()},children:(0,X.jsx)("div",{style:{top:"0px",left:"0px",width:`${t.clientWidth}px`,height:`${t.clientHeight}px`,position:"absolute"},children:e})}),t)})};var Ua;!function(e){e[e.OVERLAY=13]="OVERLAY",e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e[e.BOTTOM=4]="BOTTOM",e[e.TOP_START=5]="TOP_START",e[e.LEFT_START=6]="LEFT_START",e[e.RIGHT_START=7]="RIGHT_START",e[e.BOTTOM_START=8]="BOTTOM_START",e[e.TOP_END=9]="TOP_END",e[e.LEFT_END=10]="LEFT_END",e[e.RIGHT_END=11]="RIGHT_END",e[e.BOTTOM_END=12]="BOTTOM_END"}(Ua||(Ua={}));const Wa=(e,t=0)=>{const n=`${t}px`;return e===Ua.TOP?`translate(-50%, calc(-100% - ${n}))`:e===Ua.BOTTOM?`translate(-50%, calc(0% - ${n}))`:e===Ua.LEFT?`translate(calc(-100% - ${n}), -50%)`:e===Ua.RIGHT?`translate(calc(${n}), -50%)`:e===Ua.TOP_START?`translate(calc(-100% - ${n}), calc(-100% - ${n}))`:e===Ua.TOP_END?`translate(calc(0% + ${n}), calc(-100% - ${n}))`:e===Ua.LEFT_START?`translate(calc(-100% - ${n}), calc(-100%))`:e===Ua.LEFT_END?`translate(calc(-100% - ${n}), calc(0px}))`:e===Ua.RIGHT_END?`translate(calc(${n}), calc(-100%))`:e===Ua.RIGHT_START?`translate(calc(${n}), calc(0px}))`:e===Ua.BOTTOM_END?`translate(calc(0px), calc(${n}))`:e===Ua.BOTTOM_START?`translate(calc(-100% - ${n}), calc(${n}))`:e===Ua.OVERLAY?"translate(calc(-50%), calc(-50%))":""},Ha=e=>{const[t,n]=(0,F.useState)(!1),[r,o]=(0,F.useState)(null),[i,s]=(0,F.useState)(null);return(0,F.useLayoutEffect)(()=>{const e=()=>{n(!0)},t=()=>{n(!1)};return null==r||r.addEventListener("mouseenter",e),null==r||r.addEventListener("mouseleave",t),()=>{null==r||r.removeEventListener("mouseenter",e),null==r||r.removeEventListener("mouseleave",t)}},[r]),(0,F.useLayoutEffect)(()=>{const e=e=>{i&&r&&(i.style.opacity="1",i.style.transform=`translate(${e.clientX}px, ${e.clientY}px)`)};return i&&(null===window||void 0===window||window.addEventListener("mousemove",e)),()=>{null===window||void 0===window||window.removeEventListener("mouseenter",e)}},[i]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{o(e)}),t&&(0,_i.createPortal)((0,X.jsx)("div",{ref:e=>{s(e)},style:{zIndex:Pa(),pointerEvents:"none",opacity:0,position:"absolute"},children:(0,X.jsx)("div",{style:{transform:Wa(e.placement,e.offset),position:"absolute"},children:e.element})}),document.body)]})},qa=e=>{const[t,n]=(0,F.useState)(0),r=(0,F.useMemo)(()=>({state:e.isVisible?e.enter<0?"view":"enter":void 0,next:void 0,time:void 0}),[]),o=e=>{r.state=e,n(t+1)};return(0,F.useEffect)(()=>{e.isVisible?void 0===r.state&&"view"!==r.next?(r.time&&clearTimeout(r.time),r.next="view",o("enter"),r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,o("view")},e.enter)):"enter"!==r.state&&"exit"!==r.state||"view"===r.next||(r.time&&clearTimeout(r.time),r.next="view",r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,o("view")},e.enter)):"view"!==r.state&&"enter"!==r.state||"exit"===r.next||(r.time&&clearTimeout(r.time),r.next="exit",o("exit"),r.time=setTimeout(()=>{r.time=void 0,r.next=void 0,o(void 0)},e.exit))},[e.isVisible,t]),(0,X.jsx)(X.Fragment,{children:r.state&&e.children(r.state)})},Ya=(e,t)=>"%"===(null==t?void 0:t.unit)?e*((t.value||0)/100):(null==t?void 0:t.value)||0,Ga=(e,t,n)=>{let r=0;const o=o=>{const i=e.find((e,n,r)=>{let o=t.clientWidth;const i=t.computedStyleMap(),s=i.get("padding-left"),a=i.get("padding-left");if(o=o-Ya(o,s)-Ya(o,a),0===n)return o>=e;if(r.length===n+1)return!0;{const t=r[n-1];if(o>=e&&o<t)return!0}});r!==i&&(n(o,r,i),r=i)},i=new ResizeObserver(()=>{o(!1)});return o(!0),i.observe(t),i};class Va{constructor(){this.elements={},this.getValue=()=>Object.values(this.elements).filter(e=>e.size).map(e=>e.size).join(","),this.lastValue="",this.onUpdate=()=>{var e;const t=this.getValue();this.lastValue!==t&&(this.lastValue=t,null===(e=this.update)||void 0===e||e.call(this,t))}}render(e,t){if(e.nodeId)if(this.elements[e.nodeId]){const t=this.elements[e.nodeId];t.rendered=!0,t.item=e}else this.elements[e.nodeId]={rendered:!0,item:e,sizes:t}}finish(){Object.values(this.elements).map(e=>!!e.item.ref).includes(!1)||Object.entries(this.elements).forEach(([e,t])=>{var n,r;if(t.rendered){const e=t.item.ref,n=(n,r,o)=>{window.requestAnimationFrame(()=>{const n=t.sizes.find(e=>e.width===r),i=t.sizes.find(e=>e.width===o);(null==n?void 0:n.className)&&(null==e||e.classList.remove(...null==n?void 0:n.className)),(null==i?void 0:i.className)&&(null==e||e.classList.add(...null==i?void 0:i.className)),t.size=o,this.onUpdate()})};e&&(t.size&&e.classList.add(`w${t.size}px`),t.resizeObserver&&t.item.ref===t.element||(null===(r=t.resizeObserver)||void 0===r||r.disconnect(),t.element=e,t.resizeObserver=Ga(t.sizes.map(({width:e})=>e),e,n)))}else null===(n=t.resizeObserver)||void 0===n||n.disconnect(),delete this.elements[e];t.rendered=!1})}remove(){Object.values(this.elements).forEach(e=>{var t;null===(t=e.resizeObserver)||void 0===t||t.disconnect()})}}class Xa{constructor(e,t){this.bank={},this.collectResponse=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]={loading:n.loading,response:{body:n.response},error:n.error,request:n.request},e),{}),this.validateRequest=(e,t,n)=>{const r=this.getApisRequest(n);Object.entries(t).forEach(([e,t])=>{t.load(r[e])}),this.bank[e].apis=this.collectResponse(t)},this.emit=(e,t)=>{this.bank[e].events.forEach(e=>{t&&t===e||e()})},this.baseState=e,this.getApisRequest=t}mount(e,t){if(this.bank[e])this.bank[e].events.includes(t)||this.bank[e].events.push(t);else{const n=K().cloneDeep(this.baseState),r=this.getApisRequest(n),o=Object.entries(r).reduce((t,[n,r])=>{const o=new Y(()=>{this.emit(e)});return o.load(r),t[n]=o,t},{});this.bank[e]={state:n,mutated:n,apiLoaders:o,apis:this.collectResponse(o),events:[t]}}}unMount(e,t){if(this.bank[e]){const n=this.bank[e].events.indexOf(t);-1!==n&&this.bank[e].events.splice(n,1)}}set(e,t,n){const r=this.bank[e];this.validateRequest(e,r.apiLoaders,t),this.emit(e,n)}}const Za=(e,t)=>{const[n,r]=(0,F.useState)({}),o=(0,F.useMemo)(()=>{const n=()=>r({});return t.mount(e,n),n},[e]);return(0,F.useEffect)(()=>{},[o,e]),{state:t.bank[e].mutated,apis:t.bank[e].apis,set:(n,r)=>(t.set(e,n,r?o:void 0),!0),setState:n=>{const r=t.bank[e].state;return n(r),t.set(e,r),!0},get:()=>t.bank[e].state}},Ka=e=>{const[t,n]=(0,F.useState)({}),r=(0,F.useMemo)(()=>K().cloneDeep(e),[]);return{state:r,getState:()=>r,setState:e=>(n({}),!0)}},Ja="undefined"!=typeof window,Qa=Ja?window:null,eu=Ja?document:null,tu={replace:0,none:1,blend:2},nu=Symbol(),ru=Symbol(),ou=Symbol(),iu=Symbol(),su=(Symbol(),Symbol()),au=1e-11,uu=1e12,cu=1e3,lu="",fu=new Map;fu.set("x","translateX"),fu.set("y","translateY"),fu.set("z","translateZ");const pu=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],hu=pu.reduce((e,t)=>({...e,[t]:t+"("}),{}),du=()=>{},mu=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,gu=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,vu=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,yu=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,bu=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,_u=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,wu=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,xu=/([a-z])([A-Z])/g,Eu=/(\w+)(\([^)]+\)+)/g,Tu=/(\*=|\+=|-=)/,Su={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:cu,delay:0,loopDelay:0,ease:"out(2)",composition:tu.replace,modifier:e=>e,onBegin:du,onBeforeUpdate:du,onUpdate:du,onLoop:du,onPause:du,onComplete:du,onRender:du},Ru={defaults:Su,root:eu,scope:null,precision:4,timeScale:1,tickThreshold:200},Ou={version:"4.0.2",engine:null};Ja&&(Qa.AnimeJS||(Qa.AnimeJS=[]),Qa.AnimeJS.push(Ou));const Au=(e,t)=>0===e.indexOf(t),Lu=Date.now,Iu=Array.isArray,Nu=e=>e&&e.constructor===Object,Cu=e=>"number"==typeof e&&!isNaN(e),Pu=e=>"string"==typeof e,ku=e=>"function"==typeof e,ju=e=>void 0===e,Du=e=>ju(e)||null===e,$u=e=>Ja&&e instanceof SVGElement,Mu=e=>mu.test(e),Bu=e=>Au(e,"rgb"),zu=e=>Au(e,"hsl"),Fu=e=>!Ru.defaults.hasOwnProperty(e),Uu=e=>Pu(e)?parseFloat(e):e,Wu=Math.pow,Hu=Math.sqrt,qu=Math.sin,Yu=Math.cos,Gu=Math.abs,Vu=(Math.exp,Math.ceil),Xu=Math.floor,Zu=Math.asin,Ku=(Math.max,Math.atan2,Math.PI),Ju=Math.round,Qu=(e,t,n)=>e<t?t:e>n?n:e,ec={},tc=(e,t)=>{if(t<0)return e;if(!t)return Ju(e);let n=ec[t];return n||(n=ec[t]=10**t),Ju(e*n)/n},nc=(e,t,n)=>e+(t-e)*n,rc=e=>e===1/0?uu:e===-1/0?-1e12:e,oc=e=>e<=au?au:rc(tc(e,11)),ic=e=>Iu(e)?[...e]:e,sc=(e,t)=>{const n={...e};for(let r in t){const o=e[r];n[r]=ju(o)?t[r]:o}return n},ac=(e,t,n,r="_prev",o="_next")=>{let i=e._head,s=o;for(n&&(i=e._tail,s=r);i;){const e=i[s];t(i),i=e}},uc=(e,t,n="_prev",r="_next")=>{const o=t[n],i=t[r];o?o[r]=i:e._head=i,i?i[n]=o:e._tail=o,t[n]=null,t[r]=null},cc=(e,t,n,r="_prev",o="_next")=>{let i=e._tail;for(;i&&n&&n(i,t);)i=i[r];const s=i?i[o]:e._head;i?i[o]=t:e._head=t,s?s[r]=t:e._tail=t,t[r]=i,t[o]=s};class lc{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=tc(cu/120,0),this._fps=120,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<au?au:n,o=tc(cu/r,0);this._fps=r,this._frameDuration=o,this._scheduledTime+=o-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<au?au:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return 0;const r=this._frameDuration,o=n-t;return this._scheduledTime+=o<r?r:o,1}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const fc=(e,t,n,r,o)=>{const i=e.parent,s=e.duration,a=e.completed,u=e.iterationDuration,c=e.iterationCount,l=e._currentIteration,f=e._loopDelay,p=e._reversed,h=e._alternate,d=e._hasChildren,m=e._delay,g=e._currentTime,v=m+u,y=t-m,b=Qu(g,-m,s),_=Qu(y,-m,s),w=y-g,x=_>0,E=_>=s,T=s<=au,S=2===o;let R=0,O=y,A=0;if(c>1){const t=~~(_/(u+(E?0:f)));e._currentIteration=Qu(t,0,c),E&&e._currentIteration--,R=e._currentIteration%2,O=_%(u+f)||0}const L=p^(h&&R),I=e._ease;let N=E?L?0:s:L?u-O:O;I&&(N=u*I(N/u)||0);const C=(i?i.backwards:y<g)?!L:!!L;if(e._currentTime=y,e._iterationTime=N,e.backwards=C,x&&!e.began?(e.began=!0,n||i&&(C||!i.began)||e.onBegin(e)):y<=0&&(e.began=!1),n||d||!x||e._currentIteration===l||e.onLoop(e),S||1===o&&(t>=m&&t<=v||t<=m&&b>m||t>=v&&b!==s)||N>=v&&b!==s||N<=m&&b>0||t<=b&&b===s&&a||E&&!a&&T){if(x&&(e.computeDeltaTime(b),n||e.onBeforeUpdate(e)),!d){const t=S||(C?-1*w:w)>=Ru.tickThreshold,o=e._offset+(i?i._offset:0)+m+N;let s,a,u,c,l=e._head,f=0;for(;l;){const e=l._composition,n=l._currentTime,i=l._changeDuration,p=l._absoluteStartTime+l._changeDuration,h=l._nextRep,d=l._prevRep,m=e!==tu.none;if((t||(n!==i||o<=p+(h?h._delay:0))&&(0!==n||o>=l._absoluteStartTime))&&(!m||!l._isOverridden&&(!l._isOverlapped||o<=p)&&(!h||h._isOverridden||o<=h._absoluteStartTime)&&(!d||d._isOverridden||o>=d._absoluteStartTime+d._changeDuration+l._delay))){const t=l._currentTime=Qu(N-l._startTime,0,i),n=l._ease(t/l._updateDuration),o=l._modifier,p=l._valueType,h=l._tweenType,d=0===h,g=0===p,v=g&&d||0===n||1===n?-1:Ru.precision;let y,b;if(g)y=b=o(tc(nc(l._fromNumber,l._toNumber,n),v));else if(1===p)b=o(tc(nc(l._fromNumber,l._toNumber,n),v)),y=`${b}${l._unit}`;else if(2===p){const e=l._fromNumbers,t=l._toNumbers,r=tc(Qu(o(nc(e[0],t[0],n)),0,255),0),i=tc(Qu(o(nc(e[1],t[1],n)),0,255),0),s=tc(Qu(o(nc(e[2],t[2],n)),0,255),0),a=Qu(o(tc(nc(e[3],t[3],n),v)),0,1);if(y=`rgba(${r},${i},${s},${a})`,m){const e=l._numbers;e[0]=r,e[1]=i,e[2]=s,e[3]=a}}else if(3===p){y=l._strings[0];for(let e=0,t=l._toNumbers.length;e<t;e++){const t=o(tc(nc(l._fromNumbers[e],l._toNumbers[e],n),v)),r=l._strings[e+1];y+=`${r?t+r:t}`,m&&(l._numbers[e]=t)}}if(m&&(l._number=b),r||e===tu.blend)l._value=y;else{const e=l.property;s=l.target,d?s[e]=y:1===h?s.setAttribute(e,y):(a=s.style,3===h?(s!==u&&(u=s,c=s[iu]),c[e]=y,f=1):2===h?a[e]=y:4===h&&a.setProperty(e,y)),x&&(A=1)}}if(f&&l._renderTransforms){let e=lu;for(let t in c)e+=`${hu[t]}${c[t]}) `;a.transform=e,f=0}l=l._next}!n&&A&&e.onRender(e)}!n&&x&&e.onUpdate(e)}return i&&T?!n&&(i.began&&!C&&y>=s&&!a||C&&y<=au&&a)&&(e.onComplete(e),e.completed=!C):x&&E?c===1/0?e._startTime+=e.duration:e._currentIteration>=c-1&&(e.paused=!0,a||d||(e.completed=!0,n||i&&(C||!i.began)||(e.onComplete(e),e._resolve(e)))):e.completed=!1,A},pc=(e,t,n,r,o)=>{const i=e._currentIteration;if(fc(e,t,n,r,o),e._hasChildren){const s=e,a=s.backwards,u=r?t:s._iterationTime,c=Lu();let l=0,f=!0;if(!r&&s._currentIteration!==i){const e=s.iterationDuration;ac(s,t=>{if(a){const r=t.duration,o=t._offset+t._delay;n||!(r<=au)||o&&o+r!==e||t.onComplete(t)}else!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&fc(t,e,n,1,2),t.began=!1,t.completed=!1}),n||s.onLoop(s)}ac(s,e=>{const t=tc((u-e._offset)*e._speed,12),i=e._fps<s._fps?e.requestTick(c):o;l+=fc(e,t,n,r,i),!e.completed&&f&&(f=!1)},a),!n&&l&&s.onRender(s),f&&s._currentTime>=s.duration&&(s.paused=!0,s.completed||(s.completed=!0,n||(s.onComplete(s),s._resolve(s))))}},hc={animation:null,update:du},dc=Ja?requestAnimationFrame:setImmediate,mc=Ja?cancelAnimationFrame:clearImmediate;class gc extends lc{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Su,this.paused=!(!Ja||!eu.hidden),this.reqId=null}update(){const e=this._currentTime=Lu();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const o=r._next;r.paused?(uc(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):pc(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):1),r=o}hc.update()}}wake(){return!this.useDefaultMainLoop||this.reqId||this.paused||(this.reqId=dc(yc)),this}pause(){return this.paused=!0,bc()}resume(){if(this.paused)return this.paused=!1,ac(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(1===Ru.timeScale?1:cu)}set speed(e){this._speed=e*Ru.timeScale,ac(this,e=>e.speed=e._speed)}get timeUnit(){return 1===Ru.timeScale?"ms":"s"}set timeUnit(e){const t="s"===e,n=t?.001:1;if(Ru.timeScale!==n){Ru.timeScale=n,Ru.tickThreshold=200*n;const e=t?.001:cu;this.defaults.duration*=e,this._speed*=e}}get precision(){return Ru.precision}set precision(e){Ru.precision=e}}const vc=(()=>{const e=new gc(Lu());return Ja&&(Ou.engine=e,eu.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(eu.hidden?e.pause():e.resume())})),e})(),yc=()=>{vc._head?(vc.reqId=dc(yc),vc.update()):vc.reqId=0},bc=()=>(mc(vc.reqId),vc.reqId=0,vc);function _c(e){const t=Pu(e)?Ru.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function wc(e){if(Du(e))return[];if(Iu(e)){const t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!Du(r)){const e=_c(r);if(e)for(let t=0,r=e.length;t<r;t++){const r=e[t];if(!Du(r)){let e=!1;for(let t=0,o=n.length;t<o;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,o=n.length;t<o;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}if(!Ja)return[e];const t=_c(e);return t?Array.from(t):[e]}function xc(e){const t=wc(e),n=t.length;if(n)for(let e=0;e<n;e++){const n=t[e];if(!n[nu]){n[nu]=!0;const e=$u(n);(n.nodeType||e)&&(n[ru]=!0,n[ou]=e,n[iu]={})}}return t}const Ec=["opacity","rotate","overflow","color"],Tc=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Sc=(e,t)=>ju(e)?t:e,Rc=(e,t,n,r,o)=>{if(ku(e)){const i=()=>{const o=e(t,n,r);return isNaN(+o)?o||0:+o};return o&&(o.func=i),i()}return e},Oc=(e,t)=>e[ru]?e[ou]&&((e,t)=>{if(Ec.includes(t))return!1;if(e.getAttribute(t)||t in e){if("scale"===t){const t=e.parentNode;return t&&"filter"===t.tagName}return!0}})(e,t)?1:pu.includes(t)||fu.get(t)?3:Au(t,"--")?4:t in e.style?2:t in e?0:1:0,Ac=(e,t,n)=>{const r=e.style[t];r&&n&&(n[t]=r);const o=r||getComputedStyle(e[su]||e).getPropertyValue(t);return"auto"===o?"0":o},Lc=(e,t,n,r)=>{const o=ju(n)?Oc(e,t):n;return 0===o?e[t]||0:1===o?e.getAttribute(t):3===o?((e,t,n)=>{const r=e.style.transform;let o;if(r){const i=e[iu];let s;for(;s=Eu.exec(r);){const e=s[1],r=s[2].slice(1,-1);i[e]=r,e===t&&(o=r,n&&(n[t]=r))}}return r&&!ju(o)?o:Au(t,"scale")?"1":Au(t,"rotate")||Au(t,"skew")?"0deg":"0px"})(e,t,r):4===o?Ac(e,t,r).trimStart():Ac(e,t,r)},Ic=(e,t,n)=>"-"===n?e-t:"+"===n?e+t:e*t,Nc=(e,t)=>{if(t.t=0,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;const n=+e;if(isNaN(n)){let n=e;"="===n[1]&&(t.o=n[0],n=n.slice(2));const o=!n.includes(" ")&&wu.exec(n);if(o)return t.t=1,t.n=+o[1],t.u=o[2],t;if(t.o)return t.n=+n,t;if((e=>Mu(e)||Bu(e)||zu(e))(n))return t.t=2,t.d=Bu(r=n)?(e=>{const t=gu.exec(e)||vu.exec(e),n=ju(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]})(r):Mu(r)?(e=>{const t=e.length,n=4===t||5===t;return[+("0x"+e[1]+e[n?1:2]),+("0x"+e[n?2:3]+e[n?2:4]),+("0x"+e[n?3:5]+e[n?3:6]),5===t||9===t?+(+("0x"+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]})(r):zu(r)?(e=>{const t=yu.exec(e)||bu.exec(e),n=+t[1]/360,r=+t[2]/100,o=+t[3]/100,i=ju(t[4])?1:+t[4];let s,a,u;if(0===r)s=a=u=o;else{const e=o<.5?o*(1+r):o+r-o*r,t=2*o-e;s=tc(255*Tc(t,e,n+1/3),0),a=tc(255*Tc(t,e,n),0),u=tc(255*Tc(t,e,n-1/3),0)}return[s,a,u,i]})(r):[0,0,0,1],t;{const e=n.match(_u);return t.t=3,t.d=e?e.map(Number):[],t.s=n.split(_u)||[],t}}var r;return t.n=n,t},Cc=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=ic(e._toNumbers),t.s=ic(e._strings),t),Pc={t:0,n:0,u:null,o:null,d:null,s:null},kc={_rep:new WeakMap,_add:new Map},jc=(e,t,n="_rep")=>{const r=kc[n];let o=r.get(e);return o||(o={},r.set(e,o)),o[t]?o[t]:o[t]={_head:null,_tail:null}},Dc=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,$c=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=au,e._currentTime=au},Mc=(e,t)=>{const n=e._composition;if(n===tu.replace){const n=e._absoluteStartTime;cc(t,e,Dc,"_prevRep","_nextRep");const r=e._prevRep;if(r){const t=r.parent,o=r._absoluteStartTime+r._changeDuration;if(e.parent.id!==t.id&&t.iterationCount>1&&o+(t.duration-t.iterationDuration)>n){$c(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)$c(e),e=e._prevRep}const i=n-e._delay;if(o>i){const e=r._startTime,t=o-(e+r._updateDuration);r._changeDuration=i-t-e,r._currentTime=r._changeDuration,r._isOverlapped=1,r._changeDuration<au&&$c(r)}let s=!0;if(ac(t,e=>{e._isOverlapped||(s=!1)}),s){const e=t.parent;if(e){let n=!0;ac(e,e=>{e!==t&&ac(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}else if(n===tu.blend){const t=jc(e.target,e.property,"_add"),n=(e=>{let t=hc.animation;return t||(t={duration:au,computeDeltaTime:du,_offset:0,_delay:0,_head:null,_tail:null},hc.animation=t,hc.update=()=>{e.forEach(e=>{for(let t in e){const n=e[t],r=n._head;if(r){const e=r._valueType,t=3===e||2===e?ic(r._fromNumbers):null;let o=r._fromNumber,i=n._tail;for(;i&&i!==r;){if(t)for(let e=0,n=i._numbers.length;e<n;e++)t[e]+=i._numbers[e];else o+=i._number;i=i._prevAdd}r._toNumber=o,r._toNumbers=t}}}),fc(t,1,1,0,2)}),t})(kc._add);let r=t._head;r||(r={...e},r._composition=tu.replace,r._updateDuration=au,r._startTime=0,r._numbers=ic(e._fromNumbers),r._number=0,r._next=null,r._prev=null,cc(t,r),cc(n,r));const o=e._toNumber;if(e._fromNumber=r._fromNumber-o,e._toNumber=0,e._numbers=ic(e._fromNumbers),e._number=0,r._fromNumber=o,e._toNumbers){const t=ic(e._toNumbers);t&&t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}cc(t,e,null,"_prevAdd","_nextAdd")}return e},Bc=e=>{const t=e._composition;if(t!==tu.none){const n=e.target,r=e.property,o=kc._rep.get(n)[r];if(uc(o,e,"_prevRep","_nextRep"),t===tu.blend){const t=kc._add,o=t.get(n);if(!o)return;const i=o[r],s=hc.animation;uc(i,e,"_prevAdd","_nextAdd");const a=i._head;if(a&&a===i._tail){uc(i,a,"_prevAdd","_nextAdd"),uc(s,a);let e=!0;for(let t in o)if(o[t]._head){e=!1;break}e&&t.delete(n)}}}return e},zc=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Fc=e=>e._cancelled?(e._hasChildren?ac(e,Fc):ac(e,e=>{e._composition!==tu.none&&Mc(e,jc(e.target,e.property))}),e._cancelled=0,e):e;let Uc=0;class Wc extends lc{constructor(e={},t=null,n=0){super(0);const{id:r,delay:o,duration:i,reversed:s,alternate:a,loop:u,loopDelay:c,autoplay:l,frameRate:f,playbackRate:p,onComplete:h,onLoop:d,onPause:m,onBegin:g,onBeforeUpdate:v,onUpdate:y}=e;Ru.scope&&Ru.scope.revertibles.push(this);const b=t?0:vc._elapsedTime,_=t?t.defaults:Ru.defaults,w=ku(o)||ju(o)?_.delay:+o,x=ku(i)||ju(i)?1/0:+i,E=Sc(u,_.loop),T=Sc(c,_.loopDelay),S=!0===E||E===1/0||E<0?1/0:E+1;let R=0;if(t)R=n;else{let e=Lu();vc.paused&&(vc.requestTick(e),e=vc._elapsedTime),R=e-vc._startTime}this.id=ju(r)?++Uc:r,this.parent=t,this.duration=rc((x+T)*S-T)||au,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=g||_.onBegin,this.onBeforeUpdate=v||_.onBeforeUpdate,this.onUpdate=y||_.onUpdate,this.onLoop=d||_.onLoop,this.onPause=m||_.onPause,this.onComplete=h||_.onComplete,this.iterationDuration=x,this.iterationCount=S,this._autoplay=!t&&Sc(l,_.autoplay),this._offset=R,this._delay=w,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=du,this._running=!1,this._reversed=+Sc(s,_.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Sc(a,_.alternate),this._prev=null,this._next=null,this._elapsedTime=b,this._startTime=b,this._lastTime=b,this._fps=Sc(f,_.frameRate),this._speed=Sc(p,_.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return Qu(tc(this._currentTime,Ru.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return tc(this._iterationTime,Ru.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Qu(tc(this._currentTime/this.duration,5),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Qu(tc(this._iterationTime/this.iterationDuration,5),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Qu(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return Fc(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,pc(this,0,1,e,2),zc(this),this._hasChildren&&ac(this,zc),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&pc(this,this.duration,1,e,2),this.reset(e);const t=this._autoplay;return!0===t?this.resume():t&&!ju(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*vc._speed);return this._startTime=Lu()-(this._currentTime+this._delay)*e,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=au&&!this._hasChildren?pc(this,au,0,0,2):(this._running||(cc(vc,this),vc._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,vc.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){Fc(this),this.completed=!1;const r=this.paused;return this.paused=!0,pc(this,e+this._delay,~~t,~~n,1),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Xu(uu/n):t;return this._reversed=+(!this._alternate||r%2?!e:e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?ac(this,e=>e.cancel(),!0):ac(this,Bc),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=oc(e);if(t===n)return this;const r=e/t,o=e<=au;return this.duration=o?au:n,this.iterationDuration=o?au:oc(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){pc(this,0,1,0,1);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=du){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=du};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}}const Hc=e=>e,qc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Yc=(e=.5,t=0,n=.5,r=1)=>e===t&&n===r?Hc:o=>0===o||1===o?o:qc(((e,t,n)=>{let r,o,i=0,s=1,a=0;do{o=i+(s-i)/2,r=qc(o,t,n)-e,r>0?s=o:i=o}while(Gu(r)>1e-7&&++a<100);return o})(o,e,n),t,r),Gc=(e=10,t)=>{const n=t?Vu:Xu;return t=>n(Qu(t,0,1)*e)*(1/e)},Vc=(...e)=>{const t=e.length;if(!t)return Hc;const n=t-1,r=e[0],o=e[n],i=[0],s=[Uu(r)];for(let t=1;t<n;t++){const r=e[t],o=Pu(r)?r.trim().split(" "):[r],a=o[0],u=o[1];i.push(ju(u)?t/n:Uu(u)/100),s.push(Uu(a))}return s.push(Uu(o)),i.push(1),function(e){for(let t=1,n=i.length;t<n;t++){const n=i[t];if(e<=n){const r=i[t-1],o=s[t-1];return o+(s[t]-o)*(e-r)/(n-r)}}return s[s.length-1]}},Xc=(e=10,t=1)=>{const n=[0],r=e-1;for(let e=1;e<r;e++){const o=n[e-1],i=e/r,s=i*(1-t)+(i+((e+1)/r-i)*Math.random())*t;n.push(Qu(s,o,1))}return n.push(1),Vc(...n)},Zc=Ku/2,Kc=2*Ku,Jc=(e=1.68)=>t=>Wu(t,+e),Qc={[lu]:Jc,Quad:Jc(2),Cubic:Jc(3),Quart:Jc(4),Quint:Jc(5),Sine:e=>1-Yu(e*Zc),Circ:e=>1-Hu(1-e*e),Expo:e=>e?Wu(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Wu(2,--n))-1)/11;);return 1/Wu(4,3-n)-7.5625*Wu((3*t-2)/22-e,2)},Back:(e=1.70158)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{const n=Qu(+e,1,10),r=Qu(+t,au,2),o=r/Kc*Zu(1/n),i=Kc/r;return e=>0===e||1===e?e:-n*Wu(2,-10*(1-e))*qu((1-e-o)*i)}},el={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(2*t)/2:1-e(-2*t+2)/2,outIn:e=>t=>t<.5?(1-e(1-2*t))/2:(e(2*t-1)+1)/2},tl=(()=>{const e={linear:Vc,irregular:Xc,steps:Gc,cubicBezier:Yc};for(let t in el)for(let n in Qc){const r=Qc[n],o=el[t];e[t+n]=n===lu||"Back"===n||"Elastic"===n?(e,t)=>o(r(e,t)):o(r)}return e})(),nl={linear:Hc},rl=e=>ku(e)?e:Pu(e)?((e,t,n)=>{if(n[e])return n[e];if(e.indexOf("(")<=-1){const r=el[e]||e.includes("Back")||e.includes("Elastic")?t[e]():t[e];return r?n[e]=r:Hc}{const r=e.slice(0,-1).split("("),o=t[r[0]];return o?n[e]=o(...r[1].split(",")):Hc}})(e,tl,nl):Hc,ol={},il=(e,t,n)=>{if(3===n){return fu.get(e)||e}if(2===n||1===n&&$u(t)&&e in t.style){const t=ol[e];if(t)return t;{const t=e?e.replace(xu,"$1-$2").toLowerCase():e;return ol[e]=t,t}}return e},sl={deg:1,rad:180/Ku,turn:360},al={},ul=(e,t,n,r=!1)=>{const o=t.u,i=t.n;if(1===t.t&&o===n)return t;const s=i+o+n,a=al[s];if(ju(a)||r){let r;if(o in sl)r=i*sl[o]/sl[n];else{const t=100,s=e.cloneNode(),a=e.parentNode,u=a&&a!==eu?a:eu.body;u.appendChild(s);const c=s.style;c.width=t+o;const l=s.offsetWidth||t;c.width=t+n;const f=l/(s.offsetWidth||t);u.removeChild(s),r=f*i}t.n=r,al[s]=r}else t.n=a;return t.t,t.u=n,t},cl=e=>{if(e._hasChildren)ac(e,cl,!0);else{const t=e;t.pause(),ac(t,e=>{const n=e.property,r=e.target;if(r[ru]){const o=r.style,i=t._inlineStyles[n];if(3===e._tweenType){const t=r[iu];if(ju(i)||i===lu?delete t[n]:t[n]=i,e._renderTransforms)if(Object.keys(t).length){let e=lu;for(let n in t)e+=hu[n]+t[n]+") ";o.transform=e}else o.removeProperty("transform")}else ju(i)||i===lu?o.removeProperty(n):o[n]=i;t._tail===e&&t.targets.forEach(e=>{e.getAttribute&&e.getAttribute("style")===lu&&e.removeAttribute("style")})}})}return e},ll={t:0,n:0,u:null,o:null,d:null,s:null},fl={t:0,n:0,u:null,o:null,d:null,s:null},pl={func:null},hl=[null],dl=[null,null],ml={to:null};let gl,vl,yl=0;class bl extends Wc{constructor(e,t,n,r,o=!1,i=0,s=0){super(t,n,r);const a=xc(e),u=a.length,c=t.keyframes,l=c?sc(((e,t)=>{const n={};if(Iu(e)){const t=[].concat(...e.map(e=>Object.keys(e))).filter(Fu);for(let r=0,o=t.length;r<o;r++){const o=t[r],i=e.map(e=>{const t={};for(let n in e){const r=e[n];Fu(n)?n===o&&(t.to=r):t[n]=r}return t});n[o]=i}}else{const r=Sc(t.duration,Ru.defaults.duration),o=Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o);o.forEach(e=>{const t=e.o,o=e.p;for(let e in o)if(Fu(e)){let i=n[e];i||(i=n[e]=[]);const s=t*r;let a=i.length,u=i[a-1];const c={to:o[e]};let l=0;for(let e=0;e<a;e++)l+=i[e].duration;1===a&&(c.from=u.to),o.ease&&(c.ease=o.ease),c.duration=s-(a?l:0),i.push(c)}return e});for(let e in n){const t=n[e];let r;for(let e=0,n=t.length;e<n;e++){const n=t[e],o=n.ease;n.ease=r||void 0,r=o}t[0].duration||t.shift()}}return n})(c,t),t):t,{delay:f,duration:p,ease:h,playbackEase:d,modifier:m,composition:g,onRender:v}=l,y=n?n.defaults:Ru.defaults,b=Sc(d,y.playbackEase),_=b?rl(b):null,w=!ju(h)&&!ju(h.ease),x=w?h.ease:Sc(h,_?"linear":y.ease),E=w?h.duration:Sc(p,y.duration),T=Sc(f,y.delay),S=m||y.modifier,R=ju(g)&&u>=cu?tu.none:ju(g)?y.composition:g,O={},A=this._offset+(n?n._offset:0);let L=NaN,I=NaN,N=0,C=0;for(let e=0;e<u;e++){const t=a[e],r=i||e,c=s||u;let f=NaN,p=NaN;for(let e in l)if(Fu(e)){const i=Oc(t,e),s=il(e,t,i);let a=l[e];const u=Iu(a);if(o&&!u&&(dl[0]=a,dl[1]=a,a=dl),u){const e=a.length,t=!Nu(a[0]);2===e&&t?(ml.to=a,hl[0]=ml,gl=hl):e>2&&t?(gl=[],a.forEach((e,t)=>{t?1===t?(dl[1]=e,gl.push(dl)):gl.push(e):dl[0]=e})):gl=a}else hl[0]=a,gl=hl;let h=null,d=null,m=NaN,g=0,v=0;for(let e=gl.length;v<e;v++){const o=gl[v];Nu(o)?vl=o:(ml.to=o,vl=ml),pl.func=null;const a=Rc(vl.to,t,r,c,pl);let u;Nu(a)&&!ju(a.to)?(vl=a,u=a.to):u=a;const l=Rc(vl.from,t,r,c),f=vl.ease,p=!ju(f)&&!ju(f.ease),y=p?f.ease:f||x,b=p?f.duration:Rc(Sc(vl.duration,e>1?Rc(E,t,r,c)/e:E),t,r,c),_=Rc(Sc(vl.delay,v?0:T),t,r,c),w=Rc(Sc(vl.composition,R),t,r,c),L=Cu(w)?w:tu[w],I=vl.modifier||S,P=!ju(l),k=!ju(u),j=Iu(u),D=j||P&&k,$=d?g+_:_,M=A+$;C||!P&&!j||(C=1);let B=d;if(L!==tu.none){h||(h=jc(t,s));let e=h._head;for(;e&&!e._isOverridden&&e._absoluteStartTime<=M;)if(B=e,e=e._nextRep,e&&e._absoluteStartTime>=M)for(;e;)$c(e),e=e._nextRep}if(D?(Nc(j?Rc(u[0],t,r,c):l,ll),Nc(j?Rc(u[1],t,r,c,pl):u,fl),0===ll.t&&(B?1===B._valueType&&(ll.t=1,ll.u=B._unit):(Nc(Lc(t,s,i,O),Pc),1===Pc.t&&(ll.t=1,ll.u=Pc.u)))):(k?Nc(u,fl):d?Cc(d,fl):Nc(n&&B&&B.parent.parent===n?B._value:Lc(t,s,i,O),fl),P?Nc(l,ll):d?Cc(d,ll):Nc(n&&B&&B.parent.parent===n?B._value:Lc(t,s,i,O),ll)),ll.o&&(ll.n=Ic(B?B._toNumber:Nc(Lc(t,s,i,O),Pc).n,ll.n,ll.o)),fl.o&&(fl.n=Ic(ll.n,fl.n,fl.o)),ll.t!==fl.t)if(3===ll.t||3===fl.t){const e=3===ll.t?ll:fl,t=3===ll.t?fl:ll;t.t=3,t.s=ic(e.s),t.d=e.d.map(()=>t.n)}else if(1===ll.t||1===fl.t){const e=1===ll.t?ll:fl,t=1===ll.t?fl:ll;t.t=1,t.u=e.u}else if(2===ll.t||2===fl.t){const e=2===ll.t?ll:fl,t=2===ll.t?fl:ll;t.t=2,t.s=e.s,t.d=[0,0,0,1]}if(ll.u!==fl.u){let e=fl.u?ll:fl;e=ul(t,e,fl.u?fl.u:ll.u,!1)}if(fl.d&&ll.d&&fl.d.length!==ll.d.length){const e=ll.d.length>fl.d.length?ll:fl,t=e===ll?fl:ll;t.d=e.d.map((e,n)=>ju(t.d[n])?0:t.d[n]),t.s=ic(e.s)}const z=tc(+b||au,12),F={parent:this,id:yl++,property:s,target:t,_value:null,_func:pl.func,_ease:rl(y),_fromNumbers:ic(ll.d),_toNumbers:ic(fl.d),_strings:ic(fl.s),_fromNumber:ll.n,_toNumber:fl.n,_numbers:ic(ll.d),_number:ll.n,_unit:fl.u,_modifier:I,_currentTime:0,_startTime:$,_delay:+_,_updateDuration:z,_changeDuration:z,_absoluteStartTime:M,_tweenType:i,_valueType:fl.t,_composition:L,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};L!==tu.none&&Mc(F,h),isNaN(m)&&(m=F._startTime),g=tc($+z,12),d=F,N++,cc(this,F)}(isNaN(I)||m<I)&&(I=m),(isNaN(L)||g>L)&&(L=g),3===i&&(f=N-v,p=N)}if(!isNaN(f)){let e=0;ac(this,t=>{e>=f&&e<p&&(t._renderTransforms=1,t._composition===tu.blend&&ac(hc.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}u||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),I?(ac(this,e=>{e._startTime-e._delay||(e._delay-=I),e._startTime-=I}),L-=I):I=0,L||(L=au,this.iterationCount=0),this.targets=a,this.duration=L===au?au:rc((L+this._loopDelay)*this.iterationCount-this._loopDelay)||au,this.onRender=v||y.onRender,this._ease=_,this._delay=I,this.iterationDuration=L,this._inlineStyles=O,!this._autoplay&&C&&this.onRender(this)}stretch(e){const t=this.duration;if(t===oc(e))return this;const n=e/t;return ac(this,e=>{e._updateDuration=oc(e._updateDuration*n),e._changeDuration=oc(e._changeDuration*n),e._currentTime*=n,e._startTime*=n,e._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ac(this,e=>{const t=Lc(e.target,e.property,e._tweenType);Nc(t,Pc),e._fromNumbers=ic(Pc.d),e._fromNumber=Pc.n,e._func&&(Nc(e._func(),fl),e._toNumbers=ic(fl.d),e._strings=ic(fl.s),e._toNumber=fl.n)}),this}revert(){return super.revert(),cl(this)}then(e){return super.then(e)}}pu.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t))),Ja&&(ju(CSS)||Object.hasOwnProperty.call(CSS,"registerProperty"));const _l={_head:null,_tail:null},wl=(e,t,n)=>{let r=_l._head;for(;r;){const o=r._next,i=r.$el===e,s=!t||r.property===t,a=!n||r.parent===n;if(i&&s&&a){const e=r.animation;try{e.commitStyles()}catch{}e.cancel(),uc(_l,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.muteCallbacks||(t.paused=!0,t.onComplete(t),t._resolve(t))))}r=o}},xl=(e=du)=>new Wc({duration:1*Ru.timeScale,onComplete:e},null,0).resume();function El(e,t,n){const r=xc(e);if(!r.length)return;const[o]=r,i=Oc(o,t),s=il(t,o,i);let a=Lc(o,s);if(ju(n))return a;if(Nc(a,Pc),0===Pc.t||1===Pc.t){if(!1===n)return Pc.n;{const e=ul(o,Pc,n,!1);return`${tc(e.n,Ru.precision)}${e.u}`}}}const Tl=(e,t)=>{if(!ju(t))return t.duration=au,t.composition=Sc(t.composition,tu.none),new bl(e,t,null,0,!0).resume()},Sl=(e,t,n)=>{let r=!1;return ac(t,o=>{const i=o.target;if(e.includes(i)){const e=o.property,s=o._tweenType,a=il(n,i,s);(!a||a&&a===e)&&(o.parent._tail===o&&3===o._tweenType&&o._prev&&3===o._prev._tweenType&&(o._prev._renderTransforms=1),uc(t,o),Bc(o),r=!0)}},!0),r},Rl=(e,t,n)=>{const r=wc(e),o=t||vc,i=t&&t.controlAnimation&&t;for(let e=0,t=r.length;e<t;e++){const t=r[e];wl(t,n,i)}let s;if(o._hasChildren){let t=0;ac(o,i=>{if(!i._hasChildren)if(s=Sl(r,i,n),s&&!i._head)i.cancel(),uc(o,i);else{const e=i._offset+i._delay+i.duration;e>t&&(t=e)}i._head?Rl(e,i,n):i._hasChildren=!1},!0),ju(o.iterationDuration)||(o.iterationDuration=t)}else s=Sl(r,o,n);return s&&!o._head&&(o._hasChildren=!1,o.cancel&&o.cancel()),r},Ol=(e,t,n)=>{const r=10**(n||0);return Xu((Math.random()*(t-e+1/r)+e)*r)/r},Al=(e,t,n,r)=>{let o=cu/Ru.defaults.frameRate;if(!1!==r){const e=r||vc._hasChildren&&vc;e&&e.deltaTime&&(o=e.deltaTime)}const i=1-Math.exp(-n*o*.1);return n?1===n?t:(1-i)*e+i*t:e},Ll=e=>(...t)=>{const n=e(...t);return new Proxy(du,{apply:(e,t,[r])=>n(r),get:(e,t)=>Ll((...e)=>{const r=Nl[t](...e);return e=>r(n(e))})})},Il=(e,t=0)=>(...n)=>(n.length<e.length?Ll(((e,t=0)=>(...n)=>t?t=>e(...n,t):t=>e(t,...n))(e,t)):e)(...n),Nl={$:xc,get:El,set:Tl,remove:Rl,cleanInlineStyles:cl,random:Ol,randomPick:e=>e[Ol(0,e.length-1)],shuffle:e=>{let t,n,r=e.length;for(;r;)n=Ol(0,--r),t=e[r],e[r]=e[n],e[n]=t;return e},lerp:Al,sync:xl,clamp:Il(Qu),round:Il(tc),snap:Il((e,t)=>Iu(t)?t.reduce((t,n)=>Gu(n-e)<Gu(t-e)?n:t):t?Ju(e/t)*t:e),wrap:Il((e,t,n)=>((e-t)%(n-t)+(n-t))%(n-t)+t),interpolate:Il(nc,1),mapRange:Il((e,t,n,r,o)=>r+(e-t)/(n-t)*(o-r)),roundPad:Il((e,t)=>(+e).toFixed(t)),padStart:Il((e,t,n)=>`${e}`.padStart(t,n)),padEnd:Il((e,t,n)=>`${e}`.padEnd(t,n)),degToRad:Il(e=>e*Ku/180),radToDeg:Il(e=>180*e/Ku)},Cl=(e,t)=>{let n=e.iterationDuration;if(n===au&&(n=0),ju(t))return n;if(Cu(+t))return+t;const r=t,o=e?e.labels:null,i=!Du(o),s=((e,t)=>{if(Au(t,"<")){const n="<"===t[1],r=e._tail,o=r?r._offset+r._delay:0;return n?o:o+r.duration}})(e,r),a=!ju(s),u=Tu.exec(r);if(u){const e=u[0],t=r.split(e),c=i&&t[0]?o[t[0]]:n,l=a?s:i?c:n,f=+t[1];return Ic(l,f,e[0])}return a?s:i?ju(o[r])?n:o[r]:n};function Pl(e,t,n,r,o,i){const s=Cu(e.duration)&&e.duration<=au?n-au:n;pc(t,s,1,1,1);const a=r?new bl(r,e,t,s,!1,o,i):new Wc(e,t,s);return a.init(1),cc(t,a),ac(t,e=>{const n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=function(e){return rc((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||au}(t),t}class kl extends Wc{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=Ru.defaults;this.defaults=t?sc(t,n):n,this.onRender=e.onRender||n.onRender;const r=Sc(e.playbackEase,n.playbackEase);this._ease=r?rl(r):null,this.iterationDuration=0}add(e,t,n){const r=Nu(t),o=Nu(e);if(r||o){if(this._hasChildren=!0,r){const r=t;if(ku(n)){const t=n,o=wc(e),i=this.duration,s=this.iterationDuration,a=r.id;let u=0;const c=o.length;o.forEach(e=>{const n={...r};this.duration=i,this.iterationDuration=s,ju(a)||(n.id=a+"-"+u),Pl(n,this,t(e,u,c,this),e,u,c),u++})}else Pl(r,this,Cl(this,n),e)}else Pl(e,this,Cl(this,t));return this.init(1)}}sync(e,t){if(ju(e)||e&&ju(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:"linear"},t)}set(e,t,n){return ju(t)?this:(t.duration=au,t.composition=tu.replace,this.add(e,t,n))}call(e,t){return ju(e)||e&&!ku(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return ju(e)||e&&!Pu(e)||(this.labels[e]=Cl(this,t)),this}remove(e,t){return Rl(e,this,t),this}stretch(e){const t=this.duration;if(t===oc(e))return this;const n=e/t,r=this.labels;ac(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return ac(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ac(this,e=>e.revert,!0),cl(this)}then(e){return super.then(e)}}const jl=(e,t)=>e&&ku(e)?e(t):e,Dl=new Map;class $l{constructor(e){this.element=e,this.useWin=this.element===eu.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Wc({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const e=this.backwardX||this.backwardY;ac(this,e=>e.handleScroll(),e)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Wc({autoplay:!1,frameRate:30,onUpdate:e=>{const t=e.deltaTime,n=this.prevScrollX,r=this.prevScrollY,o=this.scrollX,i=this.scrollY,s=n-o,a=r-i;this.prevScrollX=o,this.prevScrollY=i,s&&(this.backwardX=n>o),a&&(this.backwardY=r>i),this.velocity=tc(t>0?Math.sqrt(s*s+a*a)/t:0,5)}}).init(),this.resizeTicker=new Wc({autoplay:!1,duration:250*Ru.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Wc({autoplay:!1,duration:500*Ru.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?Qa:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=tc(e?Qa.scrollX:t.scrollLeft,0),this.scrollY=tc(e?Qa.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Qa.innerWidth,this.winHeight=(()=>{const e=document.createElement("div");eu.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return eu.body.removeChild(e),t})()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;let n,r;if(this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds(),this.useWin)n=this.winWidth,r=this.winHeight;else{const e=t.getBoundingClientRect();n=e.width,r=e.height,this.top=e.top,this.left=e.left}this.width=n,this.height=r}refreshScrollObservers(){ac(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ac(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){"scroll"===e.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.unobserve(this.element),(this.useWin?Qa:this.element).removeEventListener("scroll",this),Dl.delete(this.element)}}const Ml=(e,t,n,r,o)=>{const i="min"===t,s="max"===t,a="top"===t||"left"===t||"start"===t||i?0:"bottom"===t||"right"===t||"end"===t||s?"100%":"center"===t?"50%":t,{n:u,u:c}=Nc(a,Pc);let l=u;return"%"===c?l=u/100*n:c&&(l=ul(e,Pc,"px",!0).n),s&&r<0&&(l+=r),i&&o>0&&(l+=o),l},Bl=(e,t,n,r,o)=>{let i;if(Pu(t)){const s=Tu.exec(t);if(s){const a=s[0],u=a[0],c=t.split(a),l="min"===c[0],f="max"===c[0],p=Ml(e,c[0],n,r,o),h=Ml(e,c[1],n,r,o);if(l){const t=Ic(Ml(e,"min",n),h,u);i=t<p?p:t}else if(f){const t=Ic(Ml(e,"max",n),h,u);i=t>p?p:t}else i=Ic(p,h,u)}else i=Ml(e,t,n,r,o)}else i=t;return tc(i,0)},zl=e=>{let t;const n=e.targets;for(let e=0,r=n.length;e<r;e++){const r=n[e];if(r[ru]){t=r;break}}return t};let Fl=0;const Ul=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Wl{constructor(e={}){Ru.scope&&Ru.scope.revertibles.push(this);const t=Sc(e.sync,"play pause"),n=t?rl(t):null,r=t&&("linear"===t||t===Hc),o=t&&!(n===Hc&&!r),i=t&&(Cu(t)||!0===t||r),s=t&&Pu(t)&&!o&&!i,a=s?t.split(" ").map(e=>()=>{const t=this.linked;return t&&t[e]?t[e]():null}):null,u=s&&a.length>2;this.index=Fl++,this.id=ju(e.id)?this.index:e.id,this.container=(e=>{const t=e&&wc(e)[0]||eu.body;let n=Dl.get(t);return n||(n=new $l(t),Dl.set(t,n)),n})(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=o||i||!!a,this.syncEase=o?n:null,this.syncSmooth=i?!0===t||r?1:t:null,this.onSyncEnter=a&&!u&&a[0]?a[0]:du,this.onSyncLeave=a&&!u&&a[1]?a[1]:du,this.onSyncEnterForward=a&&u&&a[0]?a[0]:du,this.onSyncLeaveForward=a&&u&&a[1]?a[1]:du,this.onSyncEnterBackward=a&&u&&a[2]?a[2]:du,this.onSyncLeaveBackward=a&&u&&a[3]?a[3]:du,this.onEnter=e.onEnter||du,this.onLeave=e.onLeave||du,this.onEnterForward=e.onEnterForward||du,this.onLeaveForward=e.onLeaveForward||du,this.onEnterBackward=e.onEnterBackward||du,this.onLeaveBackward=e.onLeaveBackward||du,this.onUpdate=e.onUpdate||du,this.onSyncComplete=e.onSyncComplete||du,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offsets=[],this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=Sc(e.debug,!1),this._next=null,this._prev=null,cc(this.container,this),xl(()=>{if(!this.reverted){if(!this.target){const t=wc(e.target)[0];this.target=t||eu.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;ju(e.targets)?ac(e,e=>{e.targets&&!t&&(t=zl(e))}):t=zl(e),this.target=t||eu.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:tc(Qu(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=Sc(jl(e.repeat,this),!0),this.horizontal="x"===Sc(jl(e.axis,this),"y"),this.enter=Sc(jl(e.enter,this),"end start"),this.leave=Sc(jl(e.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,n=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=eu.createElement("div"),o=eu.createElement("div"),i=eu.createElement("div"),s=Ul[this.index%Ul.length],a=e.useWin,u=a?e.winWidth:e.width,c=a?e.winHeight:e.height,l=e.scrollWidth,f=e.scrollHeight,p=this.container.width>360?320:260,h=t?0:10,d=t?10:0,m=t?24:p/2,g=t?m:15,v=t?60:m,y=t?v:g,b=t?"repeat-x":"repeat-y",_=e=>t?"0px "+e+"px":e+"px 2px",w=e=>`linear-gradient(${t?90:0}deg, ${e} 2px, transparent 1px)`,x=(e,t,n,r,o)=>`position:${e};left:${t}px;top:${n}px;width:${r}px;height:${o}px;`;r.style.cssText=`${x("absolute",h,d,t?l:p,t?p:f)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${t?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,o.style.cssText=`${x("sticky",0,0,t?u:m,t?m:c)}`,n||(o.style.cssText+=`background:\n ${w("#FFFF")}${_(m-10)} / 100px 100px ${b},\n ${w("#FFF8")}${_(m-10)} / 10px 10px ${b};\n `),i.style.cssText=`${x("relative",0,0,t?l:m,t?m:f)}`,n||(i.style.cssText+=`background:\n ${w("#FFFF")}${_(0)} / ${t?"100px 10px":"10px 100px"} ${b},\n ${w("#FFF8")}${_(0)} / ${t?"10px 0px":"0px 10px"} ${b};\n `);const E=[" enter: "," leave: "];this.coords.forEach((e,n)=>{const r=n>1,a=(r?0:this.offset)+e,h=n%2,d=a<y,m=a>(r?t?u:c:t?l:f)-y,b=(r?h&&!d:!h&&!d)||m,_=eu.createElement("div"),w=eu.createElement("div"),T=t?b?"right":"left":b?"bottom":"top",S=b?(t?v:g)+(r?t?-1:m?0:-2:t?-1:-2):t?1:0;w.innerHTML=`${this.id}${E[h]}${this.thresholds[n]}`,_.style.cssText=`${x("absolute",0,0,v,g)}\n display: flex;\n flex-direction: ${t?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${T}: 2px solid ${s};\n `,w.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${g};\n margin-${t?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${t&&b||!t&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${h?s:"rgba(0,0,0,.75)"};\n background-color: ${h?"rgba(0,0,0,.65)":s};\n border: 2px solid ${h?s:"transparent"};\n border-${t?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${t?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,_.appendChild(w);let R=a-S+(t?1:0);_.style[t?"left":"top"]=`${R}px`,(r?o:i).appendChild(_)}),r.appendChild(o),r.appendChild(i),e.element.appendChild(r),n||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===El(e.element,"position")&&(this.debugStyles=Tl(e.element,{position:"relative "}))}updateBounds(){let e;this._debug&&this.removeDebug();const t=this.target,n=this.container,r=this.horizontal,o=this.linked;let i,s=t,a=0,u=0,c=s;o&&(i=o.currentTime,o.seek(0,!0));const l="static"===El(n.element,"position")&&Tl(n.element,{position:"relative "});for(;s&&s!==n.element&&s!==eu.body;){const t="sticky"===El(s,"position")&&Tl(s,{position:"static"});s===c&&(a+=s.offsetLeft||0,u+=s.offsetTop||0,c=s.offsetParent),s=s.parentElement,t&&(e||(e=[]),e.push(t))}l&&l.revert();const f=r?a:u,p=r?t.offsetWidth:t.offsetHeight,h=r?n.width:n.height,d=(r?n.scrollWidth:n.scrollHeight)-h,m=this.enter,g=this.leave;let v="start",y="end",b="end",_="start";if(Pu(m)){const e=m.split(" ");b=e[0],v=e.length>1?e[1]:v}else if(Nu(m)){const e=m;ju(e.container)||(b=e.container),ju(e.target)||(v=e.target)}else Cu(m)&&(b=m);if(Pu(g)){const e=g.split(" ");_=e[0],y=e.length>1?e[1]:y}else if(Nu(g)){const e=g;ju(e.container)||(_=e.container),ju(e.target)||(y=e.target)}else Cu(g)&&(_=g);const w=Bl(t,v,p),x=Bl(t,y,p),E=w+f-h,T=x+f-d,S=Bl(t,b,h,E,T),R=Bl(t,_,h,E,T),O=w+f-S,A=x+f-R,L=A-O;this.offsets[0]=a,this.offsets[1]=u,this.offset=f,this.offsetStart=O,this.offsetEnd=A,this.distance=L<=0?0:L,this.thresholds=[v,y,b,_],this.coords=[w,x,S,R],e&&e.forEach(e=>e.revert()),o&&o.seek(i,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,o=e&&(n||r),i=this.horizontal,s=this.container,a=this.scroll,u=a<=this.offsetStart,c=a>=this.offsetEnd,l=!u&&!c,f=a===this.offsetStart||a===this.offsetEnd,p=!this.hasEntered&&f,h=this._debug&&this.$debug;let d=!1,m=!1,g=this.progress;if(u&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),o){const t=e.progress;if(r&&Cu(r)){if(r<1){const e=t<g&&1===g?1e-4:t>g&&!g?-1e-4:0;g=tc(Al(t,g,nc(.01,.2,r),!1)+e,6)}}else n&&(g=n(g));d=g!==this.prevProgress,m=1===t,d&&!m&&r&&t&&s.wakeTicker.restart()}if(h){const e=i?s.scrollY:s.scrollX;h.style[i?"top":"left"]=e+10+"px"}(l&&!this.isInView||p&&!this.forceEnter&&!this.hasEntered)&&(l&&(this.isInView=!0),this.forceEnter&&this.hasEntered?l&&(this.forceEnter=!1):(h&&l&&(h.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,p&&(this.forceEnter=!0))),(l||!l&&this.isInView)&&(d=!0),d&&(o&&e.seek(e.duration*g),this.onUpdate(this)),!l&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(m=!0)),g>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const e=this.container;return uc(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const Hl=(e={})=>new Wl(e);var ql,Yl,Gl,Vl,Xl,Zl,Kl;!function(e){e[e.XY=1]="XY",e[e.SIZE=2]="SIZE"}(ql||(ql={})),function(e){e[e.ALL=1]="ALL",e[e.SEPARATE=2]="SEPARATE"}(Yl||(Yl={})),function(e){e[e.X=1]="X",e[e.Y=2]="Y"}(Gl||(Gl={})),function(e){e[e.AUTOPLAY=1]="AUTOPLAY",e[e.SCROLL_SYNC=2]="SCROLL_SYNC",e[e.STATES=3]="STATES",e[e.NONE=4]="NONE"}(Vl||(Vl={})),function(e){e[e.FIXED=1]="FIXED",e[e.RELATIVE=2]="RELATIVE"}(Xl||(Xl={})),function(e){e[e.APPEAR=1]="APPEAR",e[e.MOUNT=2]="MOUNT"}(Zl||(Zl={})),function(e){e[e.PLAY=1]="PLAY",e[e.PAUSE=2]="PAUSE",e[e.REVERSE=3]="REVERSE",e[e.IGNORE=4]="IGNORE",e[e.DESTROY=5]="DESTROY",e[e.INIT=6]="INIT",e[e.RE_PLAY=7]="RE_PLAY"}(Kl||(Kl={}));const Jl={[Kl.PLAY]:"play",[Kl.PAUSE]:"pause",[Kl.REVERSE]:"reverse",[Kl.IGNORE]:"ignore",[Kl.DESTROY]:"destroy",[Kl.INIT]:"init",[Kl.RE_PLAY]:"re_play"};var Ql;!function(e){e[e.FIXED=0]="FIXED",e[e.PERCENTAGE=1]="PERCENTAGE",e[e.START=2]="START",e[e.START_PLUS=3]="START_PLUS",e[e.END=4]="END",e[e.END_PLUS=5]="END_PLUS"}(Ql||(Ql={}));const ef={[Ql.FIXED]:"",[Ql.PERCENTAGE]:"%",[Ql.START]:"top",[Ql.START_PLUS]:"+=top",[Ql.END]:"bottom",[Ql.END_PLUS]:"+=bottom"},tf={[Ql.FIXED]:"",[Ql.PERCENTAGE]:"%",[Ql.START]:"top",[Ql.START_PLUS]:"+=left",[Ql.END]:"right",[Ql.END_PLUS]:"+=right"},nf=(e,t,n)=>{const r=e===Gl.Y?ef:tf;return t===Ql.START||t===Ql.END?`${r[t]}`:`${null!=n?n:""}${r[t]}`};var rf,of;!function(e){e[e.SMOOTH=0]="SMOOTH",e[e.INSTANT=1]="INSTANT"}(rf||(rf={})),function(e){e[e.NORMAL=1]="NORMAL",e[e.REVERSE=2]="REVERSE",e[e.ALTERNATE=3]="ALTERNATE"}(of||(of={}));const sf={[of.NORMAL]:"normal",[of.REVERSE]:"reverse",[of.ALTERNATE]:"alternate"},af=e=>{const t=[];e.forEach(e=>{Array.isArray(e.targets)?t.push(...e.targets):"string"==typeof e.targets&&t.push(e.targets)});const n=t.join(", ").trim();return n?[...document.querySelectorAll(n).values()]:[]},uf=(e,t={},n)=>{const r=Object.entries(t).reduce((e,[t,n])=>(e[t]=Jl[n],e),{}),[o,i]=(0,F.useState)({}),s=(0,F.useMemo)(()=>{const t=Object.entries(e).reduce((e,[t])=>(e[t]={complete:!1},e),{}),o={},a={},u=(r,s)=>{var u,c,l,f,p,h;const d=r.name;let m=o[d];if(!m){const v=sf[r.direction||of.NORMAL];a[d]={direction:v};let y=!1;const b=r.config;if(b.type_===Vl.SCROLL_SYNC){const e=b.smoothness.type===rf.INSTANT||b.smoothness.value||0,t=(null==b?void 0:b.container.element)?"."+n[`E${null==b?void 0:b.container.element}`]:"#__next",r=null!==(u=null==b?void 0:b.target.element)&&void 0!==u?u:"-",o=nf(b.direction,b.container.enter.type,b.container.enter.value),i=nf(b.direction,b.container.leave.type,b.container.leave.value),s=nf(b.direction,b.target.enter.type,b.target.enter.value),a=nf(b.direction,b.target.leave.type,b.target.leave.value);y=Hl({axis:b.direction===Gl.Y?"y":"x",container:t,target:r,sync:e,enter:`${o} ${s}`,leave:`${i} ${a}`})}else if(b.type_===Vl.AUTOPLAY&&b.on.type_===Zl.APPEAR){const e=(null===(c=b.on)||void 0===c?void 0:c.container.element)?"."+n[`E${null===(l=b.on)||void 0===l?void 0:l.container.element}`]:"#__next",t=null!==(p=null===(f=b.on)||void 0===f?void 0:f.target.element)&&void 0!==p?p:"-",r=nf(b.on.direction,b.on.container.enter.type,b.on.container.enter.value),o=nf(b.on.direction,b.on.container.leave.type,b.on.container.leave.value),i=nf(b.on.direction,b.on.target.enter.type,b.on.target.enter.value),s=nf(b.on.direction,b.on.target.leave.type,b.on.target.leave.value);y=Hl({axis:b.on.direction===Gl.Y?"y":"x",container:e,target:t,sync:!0,enter:`${r} ${i}`,leave:`${o} ${s}`})}else b.type_===Vl.AUTOPLAY&&b.on.type_===Zl.MOUNT&&(y=!0);let _=!1;const w=(g={alternate:"alternate"===v,autoplay:y,loop:!!r.loop,onBegin:()=>{_&&(t[r.name].begin=!0,t[r.name].complete=!1,r.listener&&i({}))},onUpdate:e=>{_&&1===e.progress&&(t[r.name].begin=!0,t[r.name].complete=!0,r.listener&&i({}))},defaults:{duration:1e3*r.seconds}},new kl(g).init());null===(h=Object.values(e).find(e=>e.node===r))||void 0===h||h.data.forEach(e=>{lf={},w.add(e.targets,e.params,0),lf={}}),m={node:r,instance:w,elements:s},o[d]=m,m.instance.seek(Number(m.instance.defaults.duration)),m.instance.seek(0),_=!0,m.instance.onComplete=()=>{a[d].playing=!1}}var g;return m.instance};return{player:r,states:t,list:o,play:(e,t)=>{const n=u(e),r=e.name;"play"!==a[r].state&&(a[r].state="play",a[r].reverse||t&&n.paused&&n.restart(),n.play(),a[r].reverse=!1,a[r].playing=!0)},pause:e=>{const t=e.name;"pause"!==a[t].state&&(a[t].state="pause",u(e).pause(),a[t].playing=!1)},reverse:e=>{const t=e.name;"reverse"!==a[t].state&&(a[t].state="reverse",u(e).reverse(),a[t].reverse=!0,a[t].playing=!0)},get:u,destroy:e=>{let t=o[e.name];t&&(delete a[e.name],delete o[e.name],t.instance.pause())},direction:e=>a[e.name].direction,clean:()=>Object.entries(s.list).forEach(([t,n])=>{var r,o;const i=e[t],a=i?af(i.data):[];((null===(r=n.elements)||void 0===r?void 0:r.length)!==a.length||(null===(o=n.elements)||void 0===o?void 0:o.map(e=>a.includes(e)).includes(!1)))&&s.destroy(n.node)})}},[]);return s.player=r,{instances:s,scan:()=>{Object.entries(t).forEach(([t,n])=>{const r=e[t];if(!r)return;if(n===Kl.IGNORE)return;if(n===Kl.DESTROY)return void s.destroy(r.node);const o=af(r.data);o.length?(s.get(r.node,o),n===Kl.PLAY?r&&s.play(r.node):n===Kl.PAUSE?r&&s.pause(r.node):n===Kl.RE_PLAY?r&&s.play(r.node,!0):n===Kl.REVERSE&&r&&s.reverse(r.node)):s.destroy(r.node)})}}},cf=({text:e})=>(0,X.jsx)(X.Fragment,{children:e.split("\n").map((e,t,n)=>(0,X.jsxs)(X.Fragment,{children:[e.split(" ").map((e,t,n)=>{const r=n.length===t+1;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("span",{style:{display:"inline-block"},children:e.split("").map(e=>(0,X.jsx)("span",{style:{display:"inline-block"},children:e}))}),r?(0,X.jsx)(X.Fragment,{}):(0,X.jsx)("span",{children:" "})]})}),(0,X.jsx)("br",{})]}))});let lf={};const ff=(e,t,n,r)=>(o,i,s)=>{const a=s-1,u=Math.round(Math.max(a/100*(100*(1-e)),a/100*(100*e))),c=Math.round(a/100*(100*e)),l=Math.abs(c-i),f=(t-t*n)/u*l,p=lf[r];let h=f;return p&&(h=-p+f),lf[r]=h,h};let pf=0;const hf=()=>(0,F.useMemo)(()=>"C"+ ++pf,[]),df=e=>{const t=(0,F.useRef)(!1);(0,F.useEffect)(()=>{t.current=!0},[]),(0,F.useEffect)(()=>{if(!t.current||e.option.runOnInit)return e.on();t.current=!1},e.values)},mf=(e,t,n)=>{if(e===t)return[];const r=[];for(let o=e;o<=t;e<t?o++:o--)r.push(n(o));return r},gf=(e,t)=>{const n=[],r=e.length;n.length=r;for(let o=0;o<r;o++)n[o]=t(e[o],o);return n},vf=(e,t)=>{const n=[],r=Object.entries(e),o=r.length;n.length=o;for(let e=0;e<o;e++)n[e]=t(r[e][0],r[e][1],e);return n},yf=(e,t)=>{const n=[],r=e.length;n.length=r;for(let o=0;o<r;o++)n[o]=t(e[o],o,r===o+1);return n},bf=e=>"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?e.toString():void 0,_f=e=>({top:(null==e?void 0:e.top)?e.top.value+e.top.type:void 0,left:(null==e?void 0:e.left)?e.left.value+e.left.type:void 0,width:(null==e?void 0:e.width)?e.width.value+e.width.type:void 0,height:(null==e?void 0:e.height)?e.height.value+e.height.type:void 0,backgroundColor:null==e?void 0:e.fill,backgroundImage:null==e?void 0:e.image});var wf,xf;!function(e){e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e[e.BOTTOM=4]="BOTTOM"}(wf||(wf={})),function(e){e[e.PLUS=1]="PLUS",e[e.MINUS=2]="MINUS"}(xf||(xf={}));const Ef=e=>{const t=e.container?document.querySelector(e.container):document.querySelector("#__next"),n=e.value||0;let r=e.target?document.querySelector(e.target):void 0;if(t){let o=0;const i=t.getBoundingClientRect();if(r){const s=r.getBoundingClientRect();e.config===wf.TOP?o=Number(t.scrollTop+(s.top-i.top)):e.config===wf.BOTTOM?o=Number(t.scrollTop+(s.bottom-i.top)):e.config===wf.LEFT?o=Number(t.scrollLeft+(s.left-i.left)):e.config===wf.RIGHT&&(o=Number(t.scrollLeft+(s.right-i.left))),e.operator===xf.PLUS?o+=n:e.operator===xf.MINUS&&(o-=n)}else e.config===wf.TOP?o=0:e.config===wf.BOTTOM?o=-t.scrollHeight:e.config===wf.LEFT?o=0:e.config===wf.RIGHT&&(o=-t.scrollWidth),e.operator===xf.PLUS?o+=n:e.operator===xf.MINUS&&(o-=n);e.config===wf.TOP||e.config===wf.BOTTOM?t.scrollTo({behavior:"instant",top:o}):t.scrollTo({behavior:"instant",left:o})}},Tf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Sf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Rf=e=>({element:e.currentTarget}),Of=e=>({element:e.currentTarget}),Af=e=>({element:e.currentTarget})})(),u})());
544
+ `,yi=(e,t)=>{},bi={canPush:yi,canRemove:yi,canRemoveAll:yi,canPushAt:(e,t,n)=>{},canRemoveAt:(e,t)=>{},canMath:(e,t)=>{},canCall:(e,...t)=>{},isType:e=>e,isArrayType:e=>e};var _i=a(514),wi=a(72),xi=a.n(wi),Ei=a(825),Ti=a.n(Ei),Si=a(659),Ri=a.n(Si),Oi=a(56),Ai=a.n(Oi),Li=a(540),Ii=a.n(Li),Ni=a(113),Ci=a.n(Ni),Pi=a(983),ki={};ki.styleTagTransform=Ci(),ki.setAttributes=Ai(),ki.insert=Ri().bind(null,"head"),ki.domAPI=Ti(),ki.insertStyleElement=Ii(),xi()(Pi.Ay,ki);const ji=Pi.Ay&&Pi.Ay.locals?Pi.Ay.locals:void 0;function Di(){return"undefined"!=typeof window}function $i(e){return zi(e)?(e.nodeName||"").toLowerCase():"#document"}function Mi(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Bi(e){var t;return null==(t=(zi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function zi(e){return!!Di()&&(e instanceof Node||e instanceof Mi(e).Node)}function Fi(e){return!!Di()&&(e instanceof Element||e instanceof Mi(e).Element)}function Ui(e){return!!Di()&&(e instanceof HTMLElement||e instanceof Mi(e).HTMLElement)}function Wi(e){return!(!Di()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Mi(e).ShadowRoot)}const Hi=new Set(["inline","contents"]);function qi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hi.has(o)}const Yi=new Set(["table","td","th"]);function Gi(e){return Yi.has($i(e))}const Vi=[":popover-open",":modal"];function Xi(e){return Vi.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Zi=["transform","translate","scale","rotate","perspective"],Ki=["transform","translate","scale","rotate","perspective","filter"],Ji=["paint","layout","strict","content"];function Qi(e){const t=es(),n=Fi(e)?rs(e):e;return Zi.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Ki.some(e=>(n.willChange||"").includes(e))||Ji.some(e=>(n.contain||"").includes(e))}function es(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ts=new Set(["html","body","#document"]);function ns(e){return ts.has($i(e))}function rs(e){return Mi(e).getComputedStyle(e)}function os(e){return Fi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function is(e){if("html"===$i(e))return e;const t=e.assignedSlot||e.parentNode||Wi(e)&&e.host||Bi(e);return Wi(t)?t.host:t}function ss(e){const t=is(e);return ns(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ui(t)&&qi(t)?t:ss(t)}function as(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ss(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=Mi(o);if(i){const e=us(s);return t.concat(s,s.visualViewport||[],qi(o)?o:[],e&&n?as(e):[])}return t.concat(o,as(o,[],n))}function us(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cs(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Wi(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ls(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fs(e){return(null==e?void 0:e.ownerDocument)||document}function ps(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function hs(e){return"composedPath"in e?e.composedPath()[0]:e.target}const ds=Math.min,ms=Math.max,gs=Math.round,vs=(Math.floor,e=>({x:e,y:e}));function ys(e,t,n){return ms(e,ds(t,n))}function bs(e,t){return"function"==typeof e?e(t):e}function _s(e){return e.split("-")[0]}function ws(e){return e.split("-")[1]}function xs(e){return"x"===e?"y":"x"}const Es=new Set(["top","bottom"]);function Ts(e){return Es.has(_s(e))?"y":"x"}function Ss(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Rs(e,t,n){let{reference:r,floating:o}=e;const i=Ts(t),s=function(e){return xs(Ts(e))}(t),a="y"===s?"height":"width",u=_s(t),c="y"===i,l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let h;switch(u){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(ws(t)){case"start":h[s]-=p*(n&&c?-1:1);break;case"end":h[s]+=p*(n&&c?-1:1)}return h}const Os=new Set(["left","top"]);function As(e){const t=rs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ui(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=gs(n)!==i||gs(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Ls(e){return Fi(e)?e:e.contextElement}function Is(e){const t=Ls(e);if(!Ui(t))return vs(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=As(t);let s=(i?gs(n.width):n.width)/r,a=(i?gs(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Ns=vs(0);function Cs(e){const t=Mi(e);return es()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ns}function Ps(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ls(e);let s=vs(1);t&&(r?Fi(r)&&(s=Is(r)):s=Is(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Mi(e))&&t}(i,n,r)?Cs(i):vs(0);let u=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,l=o.width/s.x,f=o.height/s.y;if(i){const e=Mi(i),t=r&&Fi(r)?Mi(r):r;let n=e,o=us(n);for(;o&&r&&t!==n;){const e=Is(o),t=o.getBoundingClientRect(),r=rs(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,l*=e.x,f*=e.y,u+=i,c+=s,n=Mi(o),o=us(n)}}return Ss({width:l,height:f,x:u,y:c})}function ks(e,t){const n=os(e).scrollLeft;return t?t.left+n:Ps(Bi(e)).left+n}function js(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ks(e,n),y:n.top+t.scrollTop}}const Ds=new Set(["absolute","fixed"]);function $s(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Mi(e),r=Bi(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,u=0;if(o){i=o.width,s=o.height;const e=es();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}const c=ks(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-o);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:a,y:u}}(e,n);else if("document"===t)r=function(e){const t=Bi(e),n=os(e),r=e.ownerDocument.body,o=ms(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ms(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ks(e);const a=-n.scrollTop;return"rtl"===rs(r).direction&&(s+=ms(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(Bi(e));else if(Fi(t))r=function(e,t){const n=Ps(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ui(e)?Is(e):vs(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Cs(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ss(r)}function Ms(e,t){const n=is(e);return!(n===t||!Fi(n)||ns(n))&&("fixed"===rs(n).position||Ms(n,t))}function Bs(e,t,n){const r=Ui(t),o=Bi(t),i="fixed"===n,s=Ps(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const u=vs(0);function c(){u.x=ks(o)}if(r||!r&&!i)if(("body"!==$i(t)||qi(o))&&(a=os(t)),r){const e=Ps(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const l=!o||r||i?vs(0):js(o,a);return{x:s.left+a.scrollLeft-u.x-l.x,y:s.top+a.scrollTop-u.y-l.y,width:s.width,height:s.height}}function zs(e){return"static"===rs(e).position}function Fs(e,t){if(!Ui(e)||"fixed"===rs(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Bi(e)===n&&(n=n.ownerDocument.body),n}function Us(e,t){const n=Mi(e);if(Xi(e))return n;if(!Ui(e)){let t=is(e);for(;t&&!ns(t);){if(Fi(t)&&!zs(t))return t;t=is(t)}return n}let r=Fs(e,t);for(;r&&Gi(r)&&zs(r);)r=Fs(r,t);return r&&ns(r)&&zs(r)&&!Qi(r)?n:r||function(e){let t=is(e);for(;Ui(t)&&!ns(t);){if(Qi(t))return t;if(Xi(t))return null;t=is(t)}return null}(e)||n}const Ws={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=Bi(r),a=!!t&&Xi(t.floating);if(r===s||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=vs(1);const l=vs(0),f=Ui(r);if((f||!f&&!i)&&(("body"!==$i(r)||qi(s))&&(u=os(r)),Ui(r))){const e=Ps(r);c=Is(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const p=!s||f||i?vs(0):js(s,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+l.x+p.x,y:n.y*c.y-u.scrollTop*c.y+l.y+p.y}},getDocumentElement:Bi,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Xi(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=as(e,[],!1).filter(e=>Fi(e)&&"body"!==$i(e)),o=null;const i="fixed"===rs(e).position;let s=i?is(e):e;for(;Fi(s)&&!ns(s);){const t=rs(s),n=Qi(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Ds.has(o.position)||qi(s)&&!n&&Ms(e,s))?r=r.filter(e=>e!==s):o=t,s=is(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce((e,n)=>{const r=$s(t,n,o);return e.top=ms(r.top,e.top),e.right=ds(r.right,e.right),e.bottom=ds(r.bottom,e.bottom),e.left=ms(r.left,e.left),e},$s(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Us,getElementRects:async function(e){const t=this.getOffsetParent||Us,n=this.getDimensions,r=await n(e.floating);return{reference:Bs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=As(e);return{width:t,height:n}},getScale:Is,isElement:Fi,isRTL:function(e){return"rtl"===rs(e).direction}},Hs=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,u=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=_s(n),a=ws(n),u="y"===Ts(n),c=Os.has(s)?-1:1,l=i&&u?-1:1,f=bs(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:d}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof d&&(h="end"===a?-1*d:d),u?{x:h*l,y:p*c}:{x:p*c,y:h*l}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:s}}}}},qs=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=bs(e,t),c={x:n,y:r},l=await async function(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=bs(t,e),d=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),m=a[p?"floating"===f?"reference":"floating":f],g=Ss(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),v="floating"===f?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},_=Ss(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:u}):v);return{top:(g.top-_.top+d.top)/b.y,bottom:(_.bottom-g.bottom+d.bottom)/b.y,left:(g.left-_.left+d.left)/b.x,right:(_.right-g.right+d.right)/b.x}}(t,u),f=Ts(_s(o)),p=xs(f);let h=c[p],d=c[f];if(i){const e="y"===p?"bottom":"right";h=ys(h+l["y"===p?"top":"left"],h,h-l[e])}if(s){const e="y"===f?"bottom":"right";d=ys(d+l["y"===f?"top":"left"],d,d-l[e])}const m=a.fn({...t,[p]:h,[f]:d});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[p]:i,[f]:s}}}}}},Ys=(e,t,n)=>{const r=new Map,o={platform:Ws,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),u=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=Rs(c,r,u),p=r,h={},d=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:g,y:v,data:y,reset:b}=await m({x:l,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});l=null!=g?g:l,f=null!=v?v:f,h={...h,[i]:{...h[i],...y}},b&&d<=50&&(d++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:l,y:f}=Rs(c,p,u))),n=-1)}return{x:l,y:f,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Gs="undefined"!=typeof document?F.useLayoutEffect:function(){};function Vs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Vs(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Vs(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Xs(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zs(e,t){const n=Xs(e);return Math.round(t*n)/n}function Ks(e){const t=F.useRef(e);return Gs(()=>{t.current=e}),t}const Js=(e,t)=>({...Hs(e),options:[e,t]}),Qs=(e,t)=>({...qs(e),options:[e,t]}),ea={...U},ta=ea.useInsertionEffect||(e=>e());function na(e){const t=F.useRef(()=>{});return ta(()=>{t.current=e}),F.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}var ra="undefined"!=typeof document?F.useLayoutEffect:F.useEffect;let oa=!1,ia=0;const sa=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ia++,aa=ea.useId||function(){const[e,t]=F.useState(()=>oa?sa():void 0);return ra(()=>{null==e&&t(sa())},[]),F.useEffect(()=>{oa=!0},[]),e};const ua=F.createContext(null),ca=F.createContext(null),la=()=>{var e;return(null==(e=F.useContext(ua))?void 0:e.id)||null},fa=()=>F.useContext(ca);function pa(e){return"data-floating-ui-"+e}function ha(e){const t=(0,F.useRef)(e);return ra(()=>{t.current=e}),t}const da=pa("safe-polygon");function ma(e,t,n){return n&&!ls(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function ga(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}const va="data-floating-ui-focusable";function ya(e){return Ui(e.target)&&"BUTTON"===e.target.tagName}function ba(e){return function(e){return Ui(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e)}const _a={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wa={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},xa=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Ea(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:u=!0,outsidePressEvent:c="pointerdown",referencePress:l=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:d}=t,m=fa(),g=na("function"==typeof u?u:()=>!1),v="function"==typeof u?g:u,y=F.useRef(!1),b=F.useRef(!1),{escapeKey:_,outsidePress:w}=xa(h),{escapeKey:x,outsidePress:E}=xa(d),T=F.useRef(!1),S=na(e=>{var t;if(!n||!s||!a||"Escape"!==e.key)return;if(T.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,u=m?ga(m.nodesRef.current,o):[];if(!_&&(e.stopPropagation(),u.length>0)){let e=!0;if(u.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),R=na(e=>{var t;const n=()=>{var t;S(e),null==(t=hs(e))||t.removeEventListener("keydown",n)};null==(t=hs(e))||t.addEventListener("keydown",n)}),O=na(e=>{var t;const n=y.current;y.current=!1;const s=b.current;if(b.current=!1,"click"===c&&s)return;if(n)return;if("function"==typeof v&&!v(e))return;const a=hs(e),u="["+pa("inert")+"]",l=fs(o.floating).querySelectorAll(u);let f=Fi(a)?a:null;for(;f&&!ns(f);){const e=is(f);if(ns(e)||!Fi(e))break;f=e}if(l.length&&Fi(a)&&!a.matches("html,body")&&!cs(a,o.floating)&&Array.from(l).every(e=>!cs(f,e)))return;if(Ui(a)&&I){const t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight;let r=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===rs(a).direction&&(r=e.offsetX<=a.offsetWidth-a.clientWidth),r||t&&e.offsetY>a.clientHeight)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=m&&ga(m.nodesRef.current,p).some(t=>{var n;return ps(e,null==(n=t.context)?void 0:n.elements.floating)});if(ps(e,o.floating)||ps(e,o.domReference)||h)return;const d=m?ga(m.nodesRef.current,p):[];if(d.length>0){let e=!0;if(d.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}r(!1,e,"outside-press")}),A=na(e=>{var t;const n=()=>{var t;O(e),null==(t=hs(e))||t.removeEventListener(c,n)};null==(t=hs(e))||t.addEventListener(c,n)});F.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=_,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function u(){window.clearTimeout(e),T.current=!0}function l(){e=window.setTimeout(()=>{T.current=!1},es()?5:0)}const f=fs(o.floating);a&&(f.addEventListener("keydown",x?R:S,x),f.addEventListener("compositionstart",u),f.addEventListener("compositionend",l)),v&&f.addEventListener(c,E?A:O,E);let h=[];return p&&(Fi(o.domReference)&&(h=as(o.domReference)),Fi(o.floating)&&(h=h.concat(as(o.floating))),!Fi(o.reference)&&o.reference&&o.reference.contextElement&&(h=h.concat(as(o.reference.contextElement)))),h=h.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)}),h.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{a&&(f.removeEventListener("keydown",x?R:S,x),f.removeEventListener("compositionstart",u),f.removeEventListener("compositionend",l)),v&&f.removeEventListener(c,E?A:O,E),h.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,o,a,v,c,n,r,p,s,_,w,S,x,R,O,E,A]),F.useEffect(()=>{y.current=!1},[v,c]);const L=F.useMemo(()=>({onKeyDown:S,[_a[f]]:e=>{l&&r(!1,e.nativeEvent,"reference-press")}}),[S,r,l,f]),I=F.useMemo(()=>({onKeyDown:S,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[wa[c]]:()=>{y.current=!0}}),[S,c]);return F.useMemo(()=>s?{reference:L,floating:I}:{},[s,L,I])}function Ta(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=aa(),i=F.useRef({}),[s]=F.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),a=null!=la(),[u,c]=F.useState(r.reference),l=na((e,t,r)=>{i.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:a}),null==n||n(e,t,r)}),f=F.useMemo(()=>({setPositionReference:c}),[]),p=F.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return F.useMemo(()=>({dataRef:i,open:t,onOpenChange:l,elements:p,events:s,floatingId:o,refs:f}),[t,l,p,s,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=F.useState(null),[a,u]=F.useState(null),c=(null==o?void 0:o.reference)||i,l=F.useRef(null),f=fa();ra(()=>{c&&(l.current=c)},[c]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:c}=e,[l,f]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=F.useState(r);Vs(p,r)||h(r);const[d,m]=F.useState(null),[g,v]=F.useState(null),y=F.useCallback(e=>{e!==x.current&&(x.current=e,m(e))},[]),b=F.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),_=i||d,w=s||g,x=F.useRef(null),E=F.useRef(null),T=F.useRef(l),S=null!=u,R=Ks(u),O=Ks(o),A=Ks(c),L=F.useCallback(()=>{if(!x.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),Ys(x.current,E.current,e).then(e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!Vs(T.current,t)&&(T.current=t,_i.flushSync(()=>{f(t)}))})},[p,t,n,O,A]);Gs(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[c]);const I=F.useRef(!1);Gs(()=>(I.current=!0,()=>{I.current=!1}),[]),Gs(()=>{if(_&&(x.current=_),w&&(E.current=w),_&&w){if(R.current)return R.current(_,w,L);L()}},[_,w,L,R,S]);const N=F.useMemo(()=>({reference:x,floating:E,setReference:y,setFloating:b}),[y,b]),C=F.useMemo(()=>({reference:_,floating:w}),[_,w]),P=F.useMemo(()=>{const e={position:n,left:0,top:0};if(!C.floating)return e;const t=Zs(C.floating,l.x),r=Zs(C.floating,l.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Xs(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,C.floating,l.x,l.y]);return F.useMemo(()=>({...l,update:L,refs:N,elements:C,floatingStyles:P}),[l,L,N,C,P])}({...e,elements:{...o,...a&&{reference:a}}}),h=F.useCallback(e=>{const t=Fi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),d=F.useCallback(e=>{(Fi(e)||null===e)&&(l.current=e,s(e)),(Fi(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Fi(e))&&p.refs.setReference(e)},[p.refs]),m=F.useMemo(()=>({...p.refs,setReference:d,setPositionReference:h,domReference:l}),[p.refs,d,h]),g=F.useMemo(()=>({...p.elements,domReference:c}),[p.elements,c]),v=F.useMemo(()=>({...p,...r,refs:m,elements:g,nodeId:t}),[p,m,g,t,r]);return ra(()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),F.useMemo(()=>({...p,context:v,refs:m,elements:g}),[p,m,g,v])}const Sa="active",Ra="selected";function Oa(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Sa]:t,[Ra]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[va]:""},...i,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,i]=t;var s;o&&[Sa,Ra].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=i)}),e):e,{})}}function Aa(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=F.useCallback(t=>Oa(t,e,"reference"),t),i=F.useCallback(t=>Oa(t,e,"floating"),n),s=F.useCallback(t=>Oa(t,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function La(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,s=i-1;e<i;s=e++){const[i,a]=t[e]||[0,0],[u,c]=t[s]||[0,0];a>=r!=c>=r&&n<=(u-i)*(r-a)/(c-a)+i&&(o=!o)}return o}function Ia(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,u=performance.now();const c=e=>{let{x:n,y:c,placement:l,elements:f,onClose:p,nodeId:h,tree:d}=e;return function(e){function m(){clearTimeout(o),p()}if(clearTimeout(o),!f.domReference||!f.floating||null==l||null==n||null==c)return;const{clientX:g,clientY:v}=e,y=[g,v],b=hs(e),_="mouseleave"===e.type,w=cs(f.floating,b),x=cs(f.domReference,b),E=f.domReference.getBoundingClientRect(),T=f.floating.getBoundingClientRect(),S=l.split("-")[0],R=n>T.right-T.width/2,O=c>T.bottom-T.height/2,A=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,E),L=T.width>E.width,I=T.height>E.height,N=(L?E:T).left,C=(L?E:T).right,P=(I?E:T).top,k=(I?E:T).bottom;if(w&&(i=!0,!_))return;if(x&&(i=!1),x&&!_)return void(i=!0);if(_&&Fi(e.relatedTarget)&&cs(f.floating,e.relatedTarget))return;if(d&&ga(d.nodesRef.current,h).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===S&&c>=E.bottom-1||"bottom"===S&&c<=E.top+1||"left"===S&&n>=E.right-1||"right"===S&&n<=E.left+1)return m();let j=[];switch(S){case"top":j=[[N,E.top+1],[N,T.bottom-1],[C,T.bottom-1],[C,E.top+1]];break;case"bottom":j=[[N,T.top+1],[N,E.bottom-1],[C,E.bottom-1],[C,T.top+1]];break;case"left":j=[[T.right-1,k],[T.right-1,P],[E.left+1,P],[E.left+1,k]];break;case"right":j=[[E.right-1,k],[E.right-1,P],[T.left+1,P],[T.left+1,k]]}if(!La([g,v],j)){if(i&&!A)return m();if(!_&&r){const t=function(e,t){const n=performance.now(),r=n-u;if(null===s||null===a||0===r)return s=e,a=t,u=n,null;const o=e-s,i=t-a,c=Math.sqrt(o*o+i*i);return s=e,a=t,u=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}La([g,v],function(e){let[n,r]=e;switch(S){case"top":return[[L?n+t/2:R?n+4*t:n-4*t,r+t+1],[L?n-t/2:R?n+4*t:n-4*t,r+t+1],[T.left,R||L?T.bottom-t:T.top],[T.right,R?L?T.bottom-t:T.top:T.bottom-t]];case"bottom":return[[L?n+t/2:R?n+4*t:n-4*t,r-t],[L?n-t/2:R?n+4*t:n-4*t,r-t],[T.left,R||L?T.top+t:T.bottom],[T.right,R?L?T.top+t:T.bottom:T.top+t]];case"left":{const e=[n+t+1,I?r+t/2:O?r+4*t:r-4*t],o=[n+t+1,I?r-t/2:O?r+4*t:r-4*t];return[[O||I?T.right-t:T.left,T.top],[O?I?T.right-t:T.left:T.right-t,T.bottom],e,o]}case"right":return[[n-t,I?r+t/2:O?r+4*t:r-4*t],[n-t,I?r-t/2:O?r+4*t:r-4*t],[O||I?T.left+t:T.right,T.top],[O?I?T.left+t:T.right:T.left+t,T.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const Na=i;let Ca=1e5;const Pa=()=>Ca++,ka=({top:e,left:t,isVisible:n=!1,children:r,style:o})=>{const[i,s]=(0,F.useState)(!0),[a,u]=(0,F.useState)(!0);return(0,F.useEffect)(()=>{u(!0),n?setTimeout(()=>{s(!1)},50):(setTimeout(()=>{s(!0)},50),setTimeout(()=>{u(!1)},300))},[n]),(0,X.jsx)(X.Fragment,{children:a&&(0,_i.createPortal)((0,X.jsx)("div",{className:Na.root,style:Object.assign(Object.assign({},null==o?void 0:o.root),{"--background-color":i?"rgba(0, 0, 0, 0.0)":"rgba(0, 0, 0, 0.4)"}),children:(0,X.jsx)("div",{className:Na.background,property:i?"--top-value: 50%":`--top-value: ${e}`,style:Object.assign(Object.assign({},null==o?void 0:o.background),{"--top-value":i?"50%":e,"--left-value":i?"50%":t,"--transform-value":i?"translateX(-50%) translateY(-50%) scale(.9)":"translateX(-50%) translateY(-50%) scale(1)","--opacity-value":i?"0":"1"}),children:r()})}),document.body)})},ja=({children:e,parent:t,onChange:n,popupAlignmentProps:r,isVisible:o,action:i="click",onInteractOutsidePopup:s})=>{const[a,u]=(0,F.useState)(null),c=(0,F.useRef)(null),[l,f]=(0,F.useState)(o||!1),p=null==t?void 0:t({isOpen:l,setRef:e=>u(e),remove:()=>f(!1)});return(0,F.useEffect)(()=>{let e;return l&&c.current&&a&&(e=new $a({popupAlignmentProps:r,element:c.current,parent:a,autoRemove:!o,filterElementOnAutoRemove:[a],onRemove:()=>{f(!1)},onInteractOutside:()=>{null==s||s(c.current||void 0)}})),()=>{null==e||e.remove()}},[l,c.current,a]),(0,F.useEffect)(()=>{const e=()=>f(!l),t=a;return t&&(null==t||t.addEventListener(i,e)),()=>{null==t||t.removeEventListener(i,e)}},[a,l]),(0,F.useEffect)(()=>{const e=()=>f(!l),t=a;return t&&(null==t||t.addEventListener(i,e)),()=>{null==t||t.removeEventListener(i,e)}},[a,l]),(0,F.useEffect)(()=>{void 0!==o&&f(o)},[o]),(0,F.useEffect)(()=>{null==n||n(l)},[l]),(0,X.jsxs)(X.Fragment,{children:[p,l&&(0,_i.createPortal)((0,X.jsx)("div",{className:Na["popup-element"],style:r.style,ref:c,children:e({remove:()=>f(!1),parentRef:a||void 0})}),document.body)]})};let Da=[];class $a{setMovable(){this.element.addEventListener("mousedown",this.onDown)}adjustElement(e){const t=e.getBoundingClientRect(),n={top:t.top,left:t.left,height:t.height,width:t.width,right:0,bottom:0};n.bottom=n.top+n.height,n.right=n.left+n.width;const r=document.body.offsetWidth-10,o=document.body.offsetHeight-10,i=e.offsetTop,s=e.offsetLeft;if(n.height<o)n.top<10?e.style.top="10px":n.bottom>o&&(e.style.top=i-(n.bottom-o)+"px");else if(n.height>o){e.style.top="0px";const t=e.getBoundingClientRect();t.top<0&&(e.style.top=-t.top+"px")}if(n.width<r)n.left<10?e.style.left="10px":n.right>r&&(e.style.left=s-(n.right-r)+"px");else if(n.width>r){e.style.left="0px";const t=e.getBoundingClientRect();t.left<0&&(e.style.left=-t.left+"px")}}onResize(){const{yType:e="top-edge",xType:t="left-edge",yMargin:n=0,xMargin:r=0,width:o,minWidth:i,height:s,minHeight:a}=this.popupAlignmentProps,u=this.element,c=this.parent.getBoundingClientRect();u.style.contain="layout",o&&(u.style.width="auto"===o?"auto":`${c.width}px`),i&&(u.style.minWidth="auto"===i?"auto":`${c.width}px`),s&&(u.style.height="auto"===s?"auto":`${c.height}px`),a&&(u.style.minHeight="auto"===a?"auto":`${c.height}px`);const l=u.getBoundingClientRect();if("left"===t)u.style.left=`${(c.left<1?0:c.left)-l.width+r}px`;else if("left-edge"===t)u.style.left=`${(c.left<1?0:c.left)+r}px`;else if("right-edge"===t)u.style.left=`${(c.left<1?0:c.left)-l.width+c.width+r}px`;else if("center"===t){const e=c.width/2-l.width/2;u.style.left=`${(c.left<1?0:c.left)+e+r}px`}else u.style.left=`${(c.right<1?0:c.right)+r}px`;if("top"===e)u.style.top=`${(c.top<1?0:c.top)-l.height+n}px`;else if("top-edge"===e)u.style.top=`${(c.top<1?0:c.top)+n}px`;else if("bottom-edge"===e)u.style.top=`${(c.top<1?0:c.top)-l.height+c.height+n}px`;else if("center"===e){const e=c.height/2-l.height/2;u.style.top=`${(c.top<1?0:c.top)+e+n}px`}else u.style.top=`${(c.bottom<1?0:c.bottom)+n}px`;u.style.scale=(c.width/this.parent.offsetWidth).toString(),this.adjustElement(u),u.style.opacity="1"}constructor(e){this.onDown=e=>{const t=parseInt(this.element.style.left),n=parseInt(this.element.style.top),r=r=>{this.element.style.left=t-(e.clientX-r.clientX)+"px",this.element.style.top=n-(e.clientY-r.clientY)+"px"},o=()=>{i()},i=()=>{window.removeEventListener("mousemove",r),window.addEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},this.resizeObserver=new ResizeObserver(e=>{this.onResize()}),this.filterElementOnAutoRemove=[],this.onDownElement=!1,this.onElementMousedown=()=>{this.onDownElement=!0},this.onWindowMousedown=e=>{const t=[...this.filterElementOnAutoRemove||[],...Da],n=t?document.elementsFromPoint(e.clientX,e.clientY).filter(e=>null==t?void 0:t.includes(e)):[];!1!==this.onDownElement||n.length||(this.autoRemove&&this.remove(),this.onInteractOutside&&this.onInteractOutside()),this.onDownElement=!1},this.onWindowResize=()=>{this.onResize&&window.requestAnimationFrame(()=>{this.onResize()})},this.onWindowWheel=()=>{this.onResize&&window.requestAnimationFrame(()=>{this.onResize()})},this.element=e.element,this.parent=e.parent,Da.push(e.element),Da.push(e.parent),this.onRemove=e.onRemove,this.popupAlignmentProps=e.popupAlignmentProps,this.autoRemove=e.autoRemove,this.onInteractOutside=e.onInteractOutside,this.filterElementOnAutoRemove=e.filterElementOnAutoRemove,(e.autoRemove||e.onInteractOutside)&&(this.element.addEventListener("mousedown",this.onElementMousedown),window.addEventListener("mousedown",this.onWindowMousedown),window.addEventListener("resize",this.onWindowResize),window.addEventListener("wheel",this.onWindowWheel)),this.onResize(),this.resizeObserver.observe(e.element),this.resizeObserver.observe(e.parent)}setXY(e,t){this.element.style.top=t+"px",this.element.style.left=e+"px"}setXYString(e,t){this.element.style.top=t,this.element.style.left=e}remove(){var e;Da=Da.filter(e=>e!==this.element&&e!==this.parent),this.element.removeEventListener("mousedown",this.onElementMousedown),window.removeEventListener("mousedown",this.onWindowMousedown),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("wheel",this.onWindowWheel),null===(e=this.onRemove)||void 0===e||e.call(this)}}const Ma=e=>{const[t,n]=(0,F.useState)(!1),r=(0,F.useRef)(),{refs:o,x:i,y:s,strategy:a,context:u}=Ta({open:t,onOpenChange:n,middleware:[Qs(),Js(e.offset||0)],placement:e.placement}),c=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:u=0,handleClose:c=null,mouseOnly:l=!1,restMs:f=0,move:p=!0}=t,h=fa(),d=la(),m=ha(c),g=ha(u),v=ha(n),y=F.useRef(),b=F.useRef(-1),_=F.useRef(),w=F.useRef(-1),x=F.useRef(!0),E=F.useRef(!1),T=F.useRef(()=>{}),S=F.useRef(!1),R=F.useCallback(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[o]);F.useEffect(()=>{if(a)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(b.current),clearTimeout(w.current),x.current=!0,S.current=!1)}},[a,i]),F.useEffect(()=>{if(!a)return;if(!m.current)return;if(!n)return;function e(e){R()&&r(!1,e,"hover")}const t=fs(s.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[s.floating,n,r,a,m,R]);const O=F.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=ma(g.current,"close",y.current);o&&!_.current?(clearTimeout(b.current),b.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(clearTimeout(b.current),r(!1,e,n))},[g,r]),A=na(()=>{T.current(),_.current=void 0}),L=na(()=>{if(E.current){const e=fs(s.floating).body;e.style.pointerEvents="",e.removeAttribute(da),E.current=!1}});F.useEffect(()=>{if(a&&Fi(s.domReference)){var e;const t=s.domReference;return n&&t.addEventListener("mouseleave",c),null==(e=s.floating)||e.addEventListener("mouseleave",c),p&&t.addEventListener("mousemove",i,{once:!0}),t.addEventListener("mouseenter",i),t.addEventListener("mouseleave",u),()=>{var e;n&&t.removeEventListener("mouseleave",c),null==(e=s.floating)||e.removeEventListener("mouseleave",c),p&&t.removeEventListener("mousemove",i),t.removeEventListener("mouseenter",i),t.removeEventListener("mouseleave",u)}}function t(){return!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)}function i(e){if(clearTimeout(b.current),x.current=!1,l&&!ls(y.current)||f>0&&!ma(g.current,"open"))return;const t=ma(g.current,"open",y.current);t?b.current=window.setTimeout(()=>{v.current||r(!0,e,"hover")},t):r(!0,e,"hover")}function u(e){if(t())return;T.current();const r=fs(s.floating);if(clearTimeout(w.current),S.current=!1,m.current&&o.current.floatingContext){n||clearTimeout(b.current),_.current=m.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){L(),A(),O(e,!0,"safe-polygon")}});const t=_.current;return r.addEventListener("mousemove",t),void(T.current=()=>{r.removeEventListener("mousemove",t)})}("touch"!==y.current||!cs(s.floating,e.relatedTarget))&&O(e)}function c(e){t()||o.current.floatingContext&&(null==m.current||m.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){L(),A(),O(e)}})(e))}},[s,a,e,l,f,p,O,A,L,r,n,v,h,g,m,o]),ra(()=>{var e;if(a&&n&&null!=(e=m.current)&&e.__options.blockPointerEvents&&R()){E.current=!0;const e=s.floating;if(Fi(s.domReference)&&e){var t;const n=fs(s.floating).body;n.setAttribute(da,"");const r=s.domReference,o=null==h||null==(t=h.nodesRef.current.find(e=>e.id===d))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[a,n,d,s,h,m,R]),ra(()=>{n||(y.current=void 0,S.current=!1,A(),L())},[n,A,L]),F.useEffect(()=>()=>{A(),clearTimeout(b.current),clearTimeout(w.current),L()},[a,s.domReference,A,L]);const I=F.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){x.current||v.current||r(!0,t,"hover")}l&&!ls(y.current)||n||0===f||S.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(w.current),"touch"===y.current?o():(S.current=!0,w.current=window.setTimeout(o,f)))}}},[l,r,n,v,f]),N=F.useMemo(()=>({onMouseEnter(){clearTimeout(b.current)},onMouseLeave(e){O(e.nativeEvent,!1)}}),[O]);return F.useMemo(()=>a?{reference:I,floating:N}:{},[a,I,N])}(u,{handleClose:Ia({requireIntent:!1})}),{getReferenceProps:l,getFloatingProps:f}=Aa([c]),{onMouseMove:p,onPointerDown:h,onPointerEnter:d}=l(),m=r.current;return(0,F.useLayoutEffect)(()=>(null==m||m.addEventListener("mousemove",p),null==m||m.addEventListener("pointerdown",h),null==m||m.addEventListener("pointerenter",d),()=>{null==m||m.removeEventListener("mousemove",p),null==m||m.removeEventListener("pointerdown",h),null==m||m.removeEventListener("pointerenter",d)}),[m,p,h,d]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{r.current=e,o.setReference(e)}),t&&(0,_i.createPortal)((0,X.jsx)("div",Object.assign({ref:o.setFloating,style:{position:a,top:null!=s?s:0,left:null!=i?i:0,zIndex:Pa()}},f(),{children:e.element})),document.body)]})},Ba=e=>{const[t,n]=(0,F.useState)(!1),r=(0,F.useRef)(),{refs:o,x:i,y:s,strategy:a,context:u}=Ta({open:t,onOpenChange:n,middleware:[Qs(),Js(e.offset||0)],placement:e.placement}),c=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:u=!0,ignoreMouse:c=!1,keyboardHandlers:l=!0}=t,f=F.useRef(),p=F.useRef(!1),h=F.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current;0===e.button&&"click"!==a&&(ls(t,!0)&&c||(!n||!u||o.current.openEvent&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=f.current;"mousedown"===a&&f.current?f.current=void 0:ls(t,!0)&&c||(!n||!u||o.current.openEvent&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){f.current=void 0,e.defaultPrevented||!l||ya(e)||(" "!==e.key||ba(i)||(e.preventDefault(),p.current=!0),"Enter"===e.key&&r(!n||!u,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!l||ya(e)||ba(i)||" "===e.key&&p.current&&(p.current=!1,r(!n||!u,e.nativeEvent,"click"))}}),[o,i,a,c,l,r,n,u]);return F.useMemo(()=>s?{reference:h}:{},[s,h])}(u),l=Ea(u),{getReferenceProps:f,getFloatingProps:p}=Aa([c,l]),{onPointerDown:h,onMouseDown:d,onClick:m,onKeyDown:g,onKeyUp:v}=f(),y=r.current;return(0,F.useLayoutEffect)(()=>(null==y||y.addEventListener("pointerdown",h),null==y||y.addEventListener("click",m),null==y||y.addEventListener("mousedown",d),null==y||y.addEventListener("keydown",g),null==y||y.addEventListener("keyup",v),()=>{null==y||y.removeEventListener("pointerdown",h),null==y||y.removeEventListener("click",m),null==y||y.removeEventListener("mousedown",d),null==y||y.removeEventListener("keydown",g),null==y||y.removeEventListener("keyup",v)}),[y,h,d,m,g,v]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{r.current=e,o.setReference(e)}),t&&(0,_i.createPortal)((0,X.jsx)("div",Object.assign({ref:o.setFloating,style:{position:a,top:null!=s?s:0,left:null!=i?i:0,zIndex:Pa()}},p(),{children:e.element})),document.body)]})},za=e=>{const t=(0,F.useRef)(),{refs:n,x:r,y:o,strategy:i,context:s}=Ta({open:e.isOpen,middleware:[Qs(),Js(e.offset||0)],placement:e.placement,onOpenChange(n,r,o){var i;null===(i=e.onInteractOutside)||void 0===i||i.call(e,t.current)}}),a=Ea(s),{getReferenceProps:u,getFloatingProps:c}=Aa([a]),{onPointerDown:l,onKeyDown:f}=u(),p=t.current;return(0,F.useLayoutEffect)(()=>(null==p||p.addEventListener("pointerdown",l),null==p||p.addEventListener("keydown",f),()=>{null==p||p.removeEventListener("pointerdown",l),null==p||p.removeEventListener("keydown",f)}),[p,l,f]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{t.current=e,n.setReference(e)}),e.isOpen&&(0,_i.createPortal)((0,X.jsx)("div",Object.assign({ref:n.setFloating,style:{position:i,top:null!=o?o:0,left:null!=r?r:0,zIndex:Pa()}},c(),{children:e.element})),document.body)]})},Fa=({children:e})=>{const t=document.body,[,n]=(0,F.useState)({});return(0,F.useEffect)(()=>{t.style.overflow="hidden";const e=new ResizeObserver(e=>{n({})});return e.observe(t),()=>{t.style.overflow="",e.disconnect()}},[t]),(0,X.jsx)(X.Fragment,{children:(0,_i.createPortal)((0,X.jsx)("div",{style:{top:`${t.scrollTop}px`,left:`${t.scrollLeft}px`,width:`${t.scrollWidth}px`,height:`${t.scrollHeight}px`,position:"absolute",zIndex:Pa()},children:(0,X.jsx)("div",{style:{top:"0px",left:"0px",width:`${t.clientWidth}px`,height:`${t.clientHeight}px`,position:"absolute"},children:e})}),t)})};var Ua;!function(e){e[e.OVERLAY=13]="OVERLAY",e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e[e.BOTTOM=4]="BOTTOM",e[e.TOP_START=5]="TOP_START",e[e.LEFT_START=6]="LEFT_START",e[e.RIGHT_START=7]="RIGHT_START",e[e.BOTTOM_START=8]="BOTTOM_START",e[e.TOP_END=9]="TOP_END",e[e.LEFT_END=10]="LEFT_END",e[e.RIGHT_END=11]="RIGHT_END",e[e.BOTTOM_END=12]="BOTTOM_END"}(Ua||(Ua={}));const Wa=(e,t=0)=>{const n=`${t}px`;return e===Ua.TOP?`translate(-50%, calc(-100% - ${n}))`:e===Ua.BOTTOM?`translate(-50%, calc(0% - ${n}))`:e===Ua.LEFT?`translate(calc(-100% - ${n}), -50%)`:e===Ua.RIGHT?`translate(calc(${n}), -50%)`:e===Ua.TOP_START?`translate(calc(-100% - ${n}), calc(-100% - ${n}))`:e===Ua.TOP_END?`translate(calc(0% + ${n}), calc(-100% - ${n}))`:e===Ua.LEFT_START?`translate(calc(-100% - ${n}), calc(-100%))`:e===Ua.LEFT_END?`translate(calc(-100% - ${n}), calc(0px}))`:e===Ua.RIGHT_END?`translate(calc(${n}), calc(-100%))`:e===Ua.RIGHT_START?`translate(calc(${n}), calc(0px}))`:e===Ua.BOTTOM_END?`translate(calc(0px), calc(${n}))`:e===Ua.BOTTOM_START?`translate(calc(-100% - ${n}), calc(${n}))`:e===Ua.OVERLAY?"translate(calc(-50%), calc(-50%))":""},Ha=e=>{const[t,n]=(0,F.useState)(!1),[r,o]=(0,F.useState)(null),[i,s]=(0,F.useState)(null);return(0,F.useLayoutEffect)(()=>{const e=()=>{n(!0)},t=()=>{n(!1)};return null==r||r.addEventListener("mouseenter",e),null==r||r.addEventListener("mouseleave",t),()=>{null==r||r.removeEventListener("mouseenter",e),null==r||r.removeEventListener("mouseleave",t)}},[r]),(0,F.useLayoutEffect)(()=>{const e=e=>{i&&r&&(i.style.opacity="1",i.style.transform=`translate(${e.clientX}px, ${e.clientY}px)`)};return i&&(null===window||void 0===window||window.addEventListener("mousemove",e)),()=>{null===window||void 0===window||window.removeEventListener("mouseenter",e)}},[i]),(0,X.jsxs)(X.Fragment,{children:[e.children(e=>{o(e)}),t&&(0,_i.createPortal)((0,X.jsx)("div",{ref:e=>{s(e)},style:{zIndex:Pa(),pointerEvents:"none",opacity:0,position:"absolute"},children:(0,X.jsx)("div",{style:{transform:Wa(e.placement,e.offset),position:"absolute"},children:e.element})}),document.body)]})},qa=e=>{const[t,n]=(0,F.useState)(!0),r=(0,F.useMemo)(()=>({state:e.isVisible?e.enter<0?"view":"enter":void 0,next:void 0,time:void 0}),[]);return(0,F.useEffect)(()=>{e.isVisible?void 0===r.state&&"view"!==r.next?(r.time&&clearTimeout(r.time),r.next="view",r.state="enter",n(!t),r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,r.state="view",n(!t)},e.enter)):"enter"!==r.state&&"exit"!==r.state||"view"===r.next||(r.time&&clearTimeout(r.time),r.next="view",r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,r.state="view",n(!t)},e.enter)):"view"!==r.state&&"enter"!==r.state||"exit"===r.next||(r.time&&clearTimeout(r.time),r.next="exit",r.state="exit",n(!t),r.time=setTimeout(()=>{r.time=void 0,r.next=void 0,r.state=void 0,n(!t)},e.exit))},[e.isVisible,n]),(0,X.jsx)(X.Fragment,{children:r.state&&e.children(r.state)})},Ya=(e,t)=>"%"===(null==t?void 0:t.unit)?e*((t.value||0)/100):(null==t?void 0:t.value)||0,Ga=(e,t,n)=>{let r=0;const o=o=>{const i=e.find((e,n,r)=>{let o=t.clientWidth;const i=t.computedStyleMap(),s=i.get("padding-left"),a=i.get("padding-left");if(o=o-Ya(o,s)-Ya(o,a),0===n)return o>=e;if(r.length===n+1)return!0;{const t=r[n-1];if(o>=e&&o<t)return!0}});r!==i&&(n(o,r,i),r=i)},i=new ResizeObserver(()=>{o(!1)});return o(!0),i.observe(t),i};class Va{constructor(){this.elements={},this.getValue=()=>Object.values(this.elements).filter(e=>e.size).map(e=>e.size).join(","),this.lastValue="",this.onUpdate=()=>{var e;const t=this.getValue();this.lastValue!==t&&(this.lastValue=t,null===(e=this.update)||void 0===e||e.call(this,t))}}render(e,t){if(e.nodeId)if(this.elements[e.nodeId]){const t=this.elements[e.nodeId];t.rendered=!0,t.item=e}else this.elements[e.nodeId]={rendered:!0,item:e,sizes:t}}finish(){Object.values(this.elements).map(e=>!!e.item.ref).includes(!1)||Object.entries(this.elements).forEach(([e,t])=>{var n,r;if(t.rendered){const e=t.item.ref,n=(n,r,o)=>{window.requestAnimationFrame(()=>{const n=t.sizes.find(e=>e.width===r),i=t.sizes.find(e=>e.width===o);(null==n?void 0:n.className)&&(null==e||e.classList.remove(...null==n?void 0:n.className)),(null==i?void 0:i.className)&&(null==e||e.classList.add(...null==i?void 0:i.className)),t.size=o,this.onUpdate()})};e&&(t.size&&e.classList.add(`w${t.size}px`),t.resizeObserver&&t.item.ref===t.element||(null===(r=t.resizeObserver)||void 0===r||r.disconnect(),t.element=e,t.resizeObserver=Ga(t.sizes.map(({width:e})=>e),e,n)))}else null===(n=t.resizeObserver)||void 0===n||n.disconnect(),delete this.elements[e];t.rendered=!1})}remove(){Object.values(this.elements).forEach(e=>{var t;null===(t=e.resizeObserver)||void 0===t||t.disconnect()})}}class Xa{constructor(e,t){this.bank={},this.collectResponse=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]={loading:n.loading,response:{body:n.response},error:n.error,request:n.request},e),{}),this.validateRequest=(e,t,n)=>{const r=this.getApisRequest(n);Object.entries(t).forEach(([e,t])=>{t.load(r[e])}),this.bank[e].apis=this.collectResponse(t)},this.emit=(e,t)=>{this.bank[e].events.forEach(e=>{t&&t===e||e()})},this.baseState=e,this.getApisRequest=t}mount(e,t){if(this.bank[e])this.bank[e].events.includes(t)||this.bank[e].events.push(t);else{const n=K().cloneDeep(this.baseState),r=this.getApisRequest(n),o=Object.entries(r).reduce((t,[n,r])=>{const o=new Y(()=>{this.emit(e)});return o.load(r),t[n]=o,t},{});this.bank[e]={state:n,mutated:n,apiLoaders:o,apis:this.collectResponse(o),events:[t]}}}unMount(e,t){if(this.bank[e]){const n=this.bank[e].events.indexOf(t);-1!==n&&this.bank[e].events.splice(n,1)}}set(e,t,n){const r=this.bank[e];this.validateRequest(e,r.apiLoaders,t),this.emit(e,n)}}const Za=(e,t)=>{const[n,r]=(0,F.useState)({}),o=(0,F.useMemo)(()=>{const n=()=>r({});return t.mount(e,n),n},[e]);return(0,F.useEffect)(()=>{},[o,e]),{state:t.bank[e].mutated,apis:t.bank[e].apis,set:(n,r)=>(t.set(e,n,r?o:void 0),!0),setState:n=>{const r=t.bank[e].state;return n(r),t.set(e,r),!0},get:()=>t.bank[e].state}},Ka=e=>{const[t,n]=(0,F.useState)({}),r=(0,F.useMemo)(()=>K().cloneDeep(e),[]);return{state:r,getState:()=>r,setState:e=>(n({}),!0)}},Ja="undefined"!=typeof window,Qa=Ja?window:null,eu=Ja?document:null,tu={replace:0,none:1,blend:2},nu=Symbol(),ru=Symbol(),ou=Symbol(),iu=Symbol(),su=(Symbol(),Symbol()),au=1e-11,uu=1e12,cu=1e3,lu="",fu=new Map;fu.set("x","translateX"),fu.set("y","translateY"),fu.set("z","translateZ");const pu=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],hu=pu.reduce((e,t)=>({...e,[t]:t+"("}),{}),du=()=>{},mu=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,gu=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,vu=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,yu=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,bu=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,_u=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,wu=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,xu=/([a-z])([A-Z])/g,Eu=/(\w+)(\([^)]+\)+)/g,Tu=/(\*=|\+=|-=)/,Su={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:cu,delay:0,loopDelay:0,ease:"out(2)",composition:tu.replace,modifier:e=>e,onBegin:du,onBeforeUpdate:du,onUpdate:du,onLoop:du,onPause:du,onComplete:du,onRender:du},Ru={defaults:Su,root:eu,scope:null,precision:4,timeScale:1,tickThreshold:200},Ou={version:"4.0.2",engine:null};Ja&&(Qa.AnimeJS||(Qa.AnimeJS=[]),Qa.AnimeJS.push(Ou));const Au=(e,t)=>0===e.indexOf(t),Lu=Date.now,Iu=Array.isArray,Nu=e=>e&&e.constructor===Object,Cu=e=>"number"==typeof e&&!isNaN(e),Pu=e=>"string"==typeof e,ku=e=>"function"==typeof e,ju=e=>void 0===e,Du=e=>ju(e)||null===e,$u=e=>Ja&&e instanceof SVGElement,Mu=e=>mu.test(e),Bu=e=>Au(e,"rgb"),zu=e=>Au(e,"hsl"),Fu=e=>!Ru.defaults.hasOwnProperty(e),Uu=e=>Pu(e)?parseFloat(e):e,Wu=Math.pow,Hu=Math.sqrt,qu=Math.sin,Yu=Math.cos,Gu=Math.abs,Vu=(Math.exp,Math.ceil),Xu=Math.floor,Zu=Math.asin,Ku=(Math.max,Math.atan2,Math.PI),Ju=Math.round,Qu=(e,t,n)=>e<t?t:e>n?n:e,ec={},tc=(e,t)=>{if(t<0)return e;if(!t)return Ju(e);let n=ec[t];return n||(n=ec[t]=10**t),Ju(e*n)/n},nc=(e,t,n)=>e+(t-e)*n,rc=e=>e===1/0?uu:e===-1/0?-1e12:e,oc=e=>e<=au?au:rc(tc(e,11)),ic=e=>Iu(e)?[...e]:e,sc=(e,t)=>{const n={...e};for(let r in t){const o=e[r];n[r]=ju(o)?t[r]:o}return n},ac=(e,t,n,r="_prev",o="_next")=>{let i=e._head,s=o;for(n&&(i=e._tail,s=r);i;){const e=i[s];t(i),i=e}},uc=(e,t,n="_prev",r="_next")=>{const o=t[n],i=t[r];o?o[r]=i:e._head=i,i?i[n]=o:e._tail=o,t[n]=null,t[r]=null},cc=(e,t,n,r="_prev",o="_next")=>{let i=e._tail;for(;i&&n&&n(i,t);)i=i[r];const s=i?i[o]:e._head;i?i[o]=t:e._head=t,s?s[r]=t:e._tail=t,t[r]=i,t[o]=s};class lc{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=tc(cu/120,0),this._fps=120,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){const t=this._frameDuration,n=+e,r=n<au?au:n,o=tc(cu/r,0);this._fps=r,this._frameDuration=o,this._scheduledTime+=o-t}get speed(){return this._speed}set speed(e){const t=+e;this._speed=t<au?au:t}requestTick(e){const t=this._scheduledTime,n=this._elapsedTime;if(this._elapsedTime+=e-n,n<t)return 0;const r=this._frameDuration,o=n-t;return this._scheduledTime+=o<r?r:o,1}computeDeltaTime(e){const t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}}const fc=(e,t,n,r,o)=>{const i=e.parent,s=e.duration,a=e.completed,u=e.iterationDuration,c=e.iterationCount,l=e._currentIteration,f=e._loopDelay,p=e._reversed,h=e._alternate,d=e._hasChildren,m=e._delay,g=e._currentTime,v=m+u,y=t-m,b=Qu(g,-m,s),_=Qu(y,-m,s),w=y-g,x=_>0,E=_>=s,T=s<=au,S=2===o;let R=0,O=y,A=0;if(c>1){const t=~~(_/(u+(E?0:f)));e._currentIteration=Qu(t,0,c),E&&e._currentIteration--,R=e._currentIteration%2,O=_%(u+f)||0}const L=p^(h&&R),I=e._ease;let N=E?L?0:s:L?u-O:O;I&&(N=u*I(N/u)||0);const C=(i?i.backwards:y<g)?!L:!!L;if(e._currentTime=y,e._iterationTime=N,e.backwards=C,x&&!e.began?(e.began=!0,n||i&&(C||!i.began)||e.onBegin(e)):y<=0&&(e.began=!1),n||d||!x||e._currentIteration===l||e.onLoop(e),S||1===o&&(t>=m&&t<=v||t<=m&&b>m||t>=v&&b!==s)||N>=v&&b!==s||N<=m&&b>0||t<=b&&b===s&&a||E&&!a&&T){if(x&&(e.computeDeltaTime(b),n||e.onBeforeUpdate(e)),!d){const t=S||(C?-1*w:w)>=Ru.tickThreshold,o=e._offset+(i?i._offset:0)+m+N;let s,a,u,c,l=e._head,f=0;for(;l;){const e=l._composition,n=l._currentTime,i=l._changeDuration,p=l._absoluteStartTime+l._changeDuration,h=l._nextRep,d=l._prevRep,m=e!==tu.none;if((t||(n!==i||o<=p+(h?h._delay:0))&&(0!==n||o>=l._absoluteStartTime))&&(!m||!l._isOverridden&&(!l._isOverlapped||o<=p)&&(!h||h._isOverridden||o<=h._absoluteStartTime)&&(!d||d._isOverridden||o>=d._absoluteStartTime+d._changeDuration+l._delay))){const t=l._currentTime=Qu(N-l._startTime,0,i),n=l._ease(t/l._updateDuration),o=l._modifier,p=l._valueType,h=l._tweenType,d=0===h,g=0===p,v=g&&d||0===n||1===n?-1:Ru.precision;let y,b;if(g)y=b=o(tc(nc(l._fromNumber,l._toNumber,n),v));else if(1===p)b=o(tc(nc(l._fromNumber,l._toNumber,n),v)),y=`${b}${l._unit}`;else if(2===p){const e=l._fromNumbers,t=l._toNumbers,r=tc(Qu(o(nc(e[0],t[0],n)),0,255),0),i=tc(Qu(o(nc(e[1],t[1],n)),0,255),0),s=tc(Qu(o(nc(e[2],t[2],n)),0,255),0),a=Qu(o(tc(nc(e[3],t[3],n),v)),0,1);if(y=`rgba(${r},${i},${s},${a})`,m){const e=l._numbers;e[0]=r,e[1]=i,e[2]=s,e[3]=a}}else if(3===p){y=l._strings[0];for(let e=0,t=l._toNumbers.length;e<t;e++){const t=o(tc(nc(l._fromNumbers[e],l._toNumbers[e],n),v)),r=l._strings[e+1];y+=`${r?t+r:t}`,m&&(l._numbers[e]=t)}}if(m&&(l._number=b),r||e===tu.blend)l._value=y;else{const e=l.property;s=l.target,d?s[e]=y:1===h?s.setAttribute(e,y):(a=s.style,3===h?(s!==u&&(u=s,c=s[iu]),c[e]=y,f=1):2===h?a[e]=y:4===h&&a.setProperty(e,y)),x&&(A=1)}}if(f&&l._renderTransforms){let e=lu;for(let t in c)e+=`${hu[t]}${c[t]}) `;a.transform=e,f=0}l=l._next}!n&&A&&e.onRender(e)}!n&&x&&e.onUpdate(e)}return i&&T?!n&&(i.began&&!C&&y>=s&&!a||C&&y<=au&&a)&&(e.onComplete(e),e.completed=!C):x&&E?c===1/0?e._startTime+=e.duration:e._currentIteration>=c-1&&(e.paused=!0,a||d||(e.completed=!0,n||i&&(C||!i.began)||(e.onComplete(e),e._resolve(e)))):e.completed=!1,A},pc=(e,t,n,r,o)=>{const i=e._currentIteration;if(fc(e,t,n,r,o),e._hasChildren){const s=e,a=s.backwards,u=r?t:s._iterationTime,c=Lu();let l=0,f=!0;if(!r&&s._currentIteration!==i){const e=s.iterationDuration;ac(s,t=>{if(a){const r=t.duration,o=t._offset+t._delay;n||!(r<=au)||o&&o+r!==e||t.onComplete(t)}else!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&fc(t,e,n,1,2),t.began=!1,t.completed=!1}),n||s.onLoop(s)}ac(s,e=>{const t=tc((u-e._offset)*e._speed,12),i=e._fps<s._fps?e.requestTick(c):o;l+=fc(e,t,n,r,i),!e.completed&&f&&(f=!1)},a),!n&&l&&s.onRender(s),f&&s._currentTime>=s.duration&&(s.paused=!0,s.completed||(s.completed=!0,n||(s.onComplete(s),s._resolve(s))))}},hc={animation:null,update:du},dc=Ja?requestAnimationFrame:setImmediate,mc=Ja?cancelAnimationFrame:clearImmediate;class gc extends lc{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Su,this.paused=!(!Ja||!eu.hidden),this.reqId=null}update(){const e=this._currentTime=Lu();if(this.requestTick(e)){this.computeDeltaTime(e);const t=this._speed,n=this._fps;let r=this._head;for(;r;){const o=r._next;r.paused?(uc(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):pc(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):1),r=o}hc.update()}}wake(){return!this.useDefaultMainLoop||this.reqId||this.paused||(this.reqId=dc(yc)),this}pause(){return this.paused=!0,bc()}resume(){if(this.paused)return this.paused=!1,ac(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(1===Ru.timeScale?1:cu)}set speed(e){this._speed=e*Ru.timeScale,ac(this,e=>e.speed=e._speed)}get timeUnit(){return 1===Ru.timeScale?"ms":"s"}set timeUnit(e){const t="s"===e,n=t?.001:1;if(Ru.timeScale!==n){Ru.timeScale=n,Ru.tickThreshold=200*n;const e=t?.001:cu;this.defaults.duration*=e,this._speed*=e}}get precision(){return Ru.precision}set precision(e){Ru.precision=e}}const vc=(()=>{const e=new gc(Lu());return Ja&&(Ou.engine=e,eu.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(eu.hidden?e.pause():e.resume())})),e})(),yc=()=>{vc._head?(vc.reqId=dc(yc),vc.update()):vc.reqId=0},bc=()=>(mc(vc.reqId),vc.reqId=0,vc);function _c(e){const t=Pu(e)?Ru.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function wc(e){if(Du(e))return[];if(Iu(e)){const t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!Du(r)){const e=_c(r);if(e)for(let t=0,r=e.length;t<r;t++){const r=e[t];if(!Du(r)){let e=!1;for(let t=0,o=n.length;t<o;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,o=n.length;t<o;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}if(!Ja)return[e];const t=_c(e);return t?Array.from(t):[e]}function xc(e){const t=wc(e),n=t.length;if(n)for(let e=0;e<n;e++){const n=t[e];if(!n[nu]){n[nu]=!0;const e=$u(n);(n.nodeType||e)&&(n[ru]=!0,n[ou]=e,n[iu]={})}}return t}const Ec=["opacity","rotate","overflow","color"],Tc=(e,t,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Sc=(e,t)=>ju(e)?t:e,Rc=(e,t,n,r,o)=>{if(ku(e)){const i=()=>{const o=e(t,n,r);return isNaN(+o)?o||0:+o};return o&&(o.func=i),i()}return e},Oc=(e,t)=>e[ru]?e[ou]&&((e,t)=>{if(Ec.includes(t))return!1;if(e.getAttribute(t)||t in e){if("scale"===t){const t=e.parentNode;return t&&"filter"===t.tagName}return!0}})(e,t)?1:pu.includes(t)||fu.get(t)?3:Au(t,"--")?4:t in e.style?2:t in e?0:1:0,Ac=(e,t,n)=>{const r=e.style[t];r&&n&&(n[t]=r);const o=r||getComputedStyle(e[su]||e).getPropertyValue(t);return"auto"===o?"0":o},Lc=(e,t,n,r)=>{const o=ju(n)?Oc(e,t):n;return 0===o?e[t]||0:1===o?e.getAttribute(t):3===o?((e,t,n)=>{const r=e.style.transform;let o;if(r){const i=e[iu];let s;for(;s=Eu.exec(r);){const e=s[1],r=s[2].slice(1,-1);i[e]=r,e===t&&(o=r,n&&(n[t]=r))}}return r&&!ju(o)?o:Au(t,"scale")?"1":Au(t,"rotate")||Au(t,"skew")?"0deg":"0px"})(e,t,r):4===o?Ac(e,t,r).trimStart():Ac(e,t,r)},Ic=(e,t,n)=>"-"===n?e-t:"+"===n?e+t:e*t,Nc=(e,t)=>{if(t.t=0,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;const n=+e;if(isNaN(n)){let n=e;"="===n[1]&&(t.o=n[0],n=n.slice(2));const o=!n.includes(" ")&&wu.exec(n);if(o)return t.t=1,t.n=+o[1],t.u=o[2],t;if(t.o)return t.n=+n,t;if((e=>Mu(e)||Bu(e)||zu(e))(n))return t.t=2,t.d=Bu(r=n)?(e=>{const t=gu.exec(e)||vu.exec(e),n=ju(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]})(r):Mu(r)?(e=>{const t=e.length,n=4===t||5===t;return[+("0x"+e[1]+e[n?1:2]),+("0x"+e[n?2:3]+e[n?2:4]),+("0x"+e[n?3:5]+e[n?3:6]),5===t||9===t?+(+("0x"+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]})(r):zu(r)?(e=>{const t=yu.exec(e)||bu.exec(e),n=+t[1]/360,r=+t[2]/100,o=+t[3]/100,i=ju(t[4])?1:+t[4];let s,a,u;if(0===r)s=a=u=o;else{const e=o<.5?o*(1+r):o+r-o*r,t=2*o-e;s=tc(255*Tc(t,e,n+1/3),0),a=tc(255*Tc(t,e,n),0),u=tc(255*Tc(t,e,n-1/3),0)}return[s,a,u,i]})(r):[0,0,0,1],t;{const e=n.match(_u);return t.t=3,t.d=e?e.map(Number):[],t.s=n.split(_u)||[],t}}var r;return t.n=n,t},Cc=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=ic(e._toNumbers),t.s=ic(e._strings),t),Pc={t:0,n:0,u:null,o:null,d:null,s:null},kc={_rep:new WeakMap,_add:new Map},jc=(e,t,n="_rep")=>{const r=kc[n];let o=r.get(e);return o||(o={},r.set(e,o)),o[t]?o[t]:o[t]={_head:null,_tail:null}},Dc=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,$c=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=au,e._currentTime=au},Mc=(e,t)=>{const n=e._composition;if(n===tu.replace){const n=e._absoluteStartTime;cc(t,e,Dc,"_prevRep","_nextRep");const r=e._prevRep;if(r){const t=r.parent,o=r._absoluteStartTime+r._changeDuration;if(e.parent.id!==t.id&&t.iterationCount>1&&o+(t.duration-t.iterationDuration)>n){$c(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)$c(e),e=e._prevRep}const i=n-e._delay;if(o>i){const e=r._startTime,t=o-(e+r._updateDuration);r._changeDuration=i-t-e,r._currentTime=r._changeDuration,r._isOverlapped=1,r._changeDuration<au&&$c(r)}let s=!0;if(ac(t,e=>{e._isOverlapped||(s=!1)}),s){const e=t.parent;if(e){let n=!0;ac(e,e=>{e!==t&&ac(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}else if(n===tu.blend){const t=jc(e.target,e.property,"_add"),n=(e=>{let t=hc.animation;return t||(t={duration:au,computeDeltaTime:du,_offset:0,_delay:0,_head:null,_tail:null},hc.animation=t,hc.update=()=>{e.forEach(e=>{for(let t in e){const n=e[t],r=n._head;if(r){const e=r._valueType,t=3===e||2===e?ic(r._fromNumbers):null;let o=r._fromNumber,i=n._tail;for(;i&&i!==r;){if(t)for(let e=0,n=i._numbers.length;e<n;e++)t[e]+=i._numbers[e];else o+=i._number;i=i._prevAdd}r._toNumber=o,r._toNumbers=t}}}),fc(t,1,1,0,2)}),t})(kc._add);let r=t._head;r||(r={...e},r._composition=tu.replace,r._updateDuration=au,r._startTime=0,r._numbers=ic(e._fromNumbers),r._number=0,r._next=null,r._prev=null,cc(t,r),cc(n,r));const o=e._toNumber;if(e._fromNumber=r._fromNumber-o,e._toNumber=0,e._numbers=ic(e._fromNumbers),e._number=0,r._fromNumber=o,e._toNumbers){const t=ic(e._toNumbers);t&&t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}cc(t,e,null,"_prevAdd","_nextAdd")}return e},Bc=e=>{const t=e._composition;if(t!==tu.none){const n=e.target,r=e.property,o=kc._rep.get(n)[r];if(uc(o,e,"_prevRep","_nextRep"),t===tu.blend){const t=kc._add,o=t.get(n);if(!o)return;const i=o[r],s=hc.animation;uc(i,e,"_prevAdd","_nextAdd");const a=i._head;if(a&&a===i._tail){uc(i,a,"_prevAdd","_nextAdd"),uc(s,a);let e=!0;for(let t in o)if(o[t]._head){e=!1;break}e&&t.delete(n)}}}return e},zc=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Fc=e=>e._cancelled?(e._hasChildren?ac(e,Fc):ac(e,e=>{e._composition!==tu.none&&Mc(e,jc(e.target,e.property))}),e._cancelled=0,e):e;let Uc=0;class Wc extends lc{constructor(e={},t=null,n=0){super(0);const{id:r,delay:o,duration:i,reversed:s,alternate:a,loop:u,loopDelay:c,autoplay:l,frameRate:f,playbackRate:p,onComplete:h,onLoop:d,onPause:m,onBegin:g,onBeforeUpdate:v,onUpdate:y}=e;Ru.scope&&Ru.scope.revertibles.push(this);const b=t?0:vc._elapsedTime,_=t?t.defaults:Ru.defaults,w=ku(o)||ju(o)?_.delay:+o,x=ku(i)||ju(i)?1/0:+i,E=Sc(u,_.loop),T=Sc(c,_.loopDelay),S=!0===E||E===1/0||E<0?1/0:E+1;let R=0;if(t)R=n;else{let e=Lu();vc.paused&&(vc.requestTick(e),e=vc._elapsedTime),R=e-vc._startTime}this.id=ju(r)?++Uc:r,this.parent=t,this.duration=rc((x+T)*S-T)||au,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=g||_.onBegin,this.onBeforeUpdate=v||_.onBeforeUpdate,this.onUpdate=y||_.onUpdate,this.onLoop=d||_.onLoop,this.onPause=m||_.onPause,this.onComplete=h||_.onComplete,this.iterationDuration=x,this.iterationCount=S,this._autoplay=!t&&Sc(l,_.autoplay),this._offset=R,this._delay=w,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=du,this._running=!1,this._reversed=+Sc(s,_.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Sc(a,_.alternate),this._prev=null,this._next=null,this._elapsedTime=b,this._startTime=b,this._lastTime=b,this._fps=Sc(f,_.frameRate),this._speed=Sc(p,_.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return Qu(tc(this._currentTime,Ru.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return tc(this._iterationTime,Ru.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Qu(tc(this._currentTime/this.duration,5),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Qu(tc(this._iterationTime/this.iterationDuration,5),0,1)}set iterationProgress(e){const t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Qu(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=0){return Fc(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,pc(this,0,1,e,2),zc(this),this._hasChildren&&ac(this,zc),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&pc(this,this.duration,1,e,2),this.reset(e);const t=this._autoplay;return!0===t?this.resume():t&&!ju(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*vc._speed);return this._startTime=Lu()-(this._currentTime+this._delay)*e,this}pause(){return this.paused||(this.paused=!0,this.onPause(this)),this}resume(){return this.paused?(this.paused=!1,this.duration<=au&&!this._hasChildren?pc(this,au,0,0,2):(this._running||(cc(vc,this),vc._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,vc.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){Fc(this),this.completed=!1;const r=this.paused;return this.paused=!0,pc(this,e+this._delay,~~t,~~n,1),r?this:this.resume()}alternate(){const e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Xu(uu/n):t;return this._reversed=+(!this._alternate||r%2?!e:e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?ac(this,e=>e.cancel(),!0):ac(this,Bc),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=oc(e);if(t===n)return this;const r=e/t,o=e<=au;return this.duration=o?au:n,this.iterationDuration=o?au:oc(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){pc(this,0,1,0,1);const e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(){return this.seek(this.duration).cancel()}then(e=du){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=du};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}}const Hc=e=>e,qc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Yc=(e=.5,t=0,n=.5,r=1)=>e===t&&n===r?Hc:o=>0===o||1===o?o:qc(((e,t,n)=>{let r,o,i=0,s=1,a=0;do{o=i+(s-i)/2,r=qc(o,t,n)-e,r>0?s=o:i=o}while(Gu(r)>1e-7&&++a<100);return o})(o,e,n),t,r),Gc=(e=10,t)=>{const n=t?Vu:Xu;return t=>n(Qu(t,0,1)*e)*(1/e)},Vc=(...e)=>{const t=e.length;if(!t)return Hc;const n=t-1,r=e[0],o=e[n],i=[0],s=[Uu(r)];for(let t=1;t<n;t++){const r=e[t],o=Pu(r)?r.trim().split(" "):[r],a=o[0],u=o[1];i.push(ju(u)?t/n:Uu(u)/100),s.push(Uu(a))}return s.push(Uu(o)),i.push(1),function(e){for(let t=1,n=i.length;t<n;t++){const n=i[t];if(e<=n){const r=i[t-1],o=s[t-1];return o+(s[t]-o)*(e-r)/(n-r)}}return s[s.length-1]}},Xc=(e=10,t=1)=>{const n=[0],r=e-1;for(let e=1;e<r;e++){const o=n[e-1],i=e/r,s=i*(1-t)+(i+((e+1)/r-i)*Math.random())*t;n.push(Qu(s,o,1))}return n.push(1),Vc(...n)},Zc=Ku/2,Kc=2*Ku,Jc=(e=1.68)=>t=>Wu(t,+e),Qc={[lu]:Jc,Quad:Jc(2),Cubic:Jc(3),Quart:Jc(4),Quint:Jc(5),Sine:e=>1-Yu(e*Zc),Circ:e=>1-Hu(1-e*e),Expo:e=>e?Wu(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Wu(2,--n))-1)/11;);return 1/Wu(4,3-n)-7.5625*Wu((3*t-2)/22-e,2)},Back:(e=1.70158)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{const n=Qu(+e,1,10),r=Qu(+t,au,2),o=r/Kc*Zu(1/n),i=Kc/r;return e=>0===e||1===e?e:-n*Wu(2,-10*(1-e))*qu((1-e-o)*i)}},el={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(2*t)/2:1-e(-2*t+2)/2,outIn:e=>t=>t<.5?(1-e(1-2*t))/2:(e(2*t-1)+1)/2},tl=(()=>{const e={linear:Vc,irregular:Xc,steps:Gc,cubicBezier:Yc};for(let t in el)for(let n in Qc){const r=Qc[n],o=el[t];e[t+n]=n===lu||"Back"===n||"Elastic"===n?(e,t)=>o(r(e,t)):o(r)}return e})(),nl={linear:Hc},rl=e=>ku(e)?e:Pu(e)?((e,t,n)=>{if(n[e])return n[e];if(e.indexOf("(")<=-1){const r=el[e]||e.includes("Back")||e.includes("Elastic")?t[e]():t[e];return r?n[e]=r:Hc}{const r=e.slice(0,-1).split("("),o=t[r[0]];return o?n[e]=o(...r[1].split(",")):Hc}})(e,tl,nl):Hc,ol={},il=(e,t,n)=>{if(3===n){return fu.get(e)||e}if(2===n||1===n&&$u(t)&&e in t.style){const t=ol[e];if(t)return t;{const t=e?e.replace(xu,"$1-$2").toLowerCase():e;return ol[e]=t,t}}return e},sl={deg:1,rad:180/Ku,turn:360},al={},ul=(e,t,n,r=!1)=>{const o=t.u,i=t.n;if(1===t.t&&o===n)return t;const s=i+o+n,a=al[s];if(ju(a)||r){let r;if(o in sl)r=i*sl[o]/sl[n];else{const t=100,s=e.cloneNode(),a=e.parentNode,u=a&&a!==eu?a:eu.body;u.appendChild(s);const c=s.style;c.width=t+o;const l=s.offsetWidth||t;c.width=t+n;const f=l/(s.offsetWidth||t);u.removeChild(s),r=f*i}t.n=r,al[s]=r}else t.n=a;return t.t,t.u=n,t},cl=e=>{if(e._hasChildren)ac(e,cl,!0);else{const t=e;t.pause(),ac(t,e=>{const n=e.property,r=e.target;if(r[ru]){const o=r.style,i=t._inlineStyles[n];if(3===e._tweenType){const t=r[iu];if(ju(i)||i===lu?delete t[n]:t[n]=i,e._renderTransforms)if(Object.keys(t).length){let e=lu;for(let n in t)e+=hu[n]+t[n]+") ";o.transform=e}else o.removeProperty("transform")}else ju(i)||i===lu?o.removeProperty(n):o[n]=i;t._tail===e&&t.targets.forEach(e=>{e.getAttribute&&e.getAttribute("style")===lu&&e.removeAttribute("style")})}})}return e},ll={t:0,n:0,u:null,o:null,d:null,s:null},fl={t:0,n:0,u:null,o:null,d:null,s:null},pl={func:null},hl=[null],dl=[null,null],ml={to:null};let gl,vl,yl=0;class bl extends Wc{constructor(e,t,n,r,o=!1,i=0,s=0){super(t,n,r);const a=xc(e),u=a.length,c=t.keyframes,l=c?sc(((e,t)=>{const n={};if(Iu(e)){const t=[].concat(...e.map(e=>Object.keys(e))).filter(Fu);for(let r=0,o=t.length;r<o;r++){const o=t[r],i=e.map(e=>{const t={};for(let n in e){const r=e[n];Fu(n)?n===o&&(t.to=r):t[n]=r}return t});n[o]=i}}else{const r=Sc(t.duration,Ru.defaults.duration),o=Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o);o.forEach(e=>{const t=e.o,o=e.p;for(let e in o)if(Fu(e)){let i=n[e];i||(i=n[e]=[]);const s=t*r;let a=i.length,u=i[a-1];const c={to:o[e]};let l=0;for(let e=0;e<a;e++)l+=i[e].duration;1===a&&(c.from=u.to),o.ease&&(c.ease=o.ease),c.duration=s-(a?l:0),i.push(c)}return e});for(let e in n){const t=n[e];let r;for(let e=0,n=t.length;e<n;e++){const n=t[e],o=n.ease;n.ease=r||void 0,r=o}t[0].duration||t.shift()}}return n})(c,t),t):t,{delay:f,duration:p,ease:h,playbackEase:d,modifier:m,composition:g,onRender:v}=l,y=n?n.defaults:Ru.defaults,b=Sc(d,y.playbackEase),_=b?rl(b):null,w=!ju(h)&&!ju(h.ease),x=w?h.ease:Sc(h,_?"linear":y.ease),E=w?h.duration:Sc(p,y.duration),T=Sc(f,y.delay),S=m||y.modifier,R=ju(g)&&u>=cu?tu.none:ju(g)?y.composition:g,O={},A=this._offset+(n?n._offset:0);let L=NaN,I=NaN,N=0,C=0;for(let e=0;e<u;e++){const t=a[e],r=i||e,c=s||u;let f=NaN,p=NaN;for(let e in l)if(Fu(e)){const i=Oc(t,e),s=il(e,t,i);let a=l[e];const u=Iu(a);if(o&&!u&&(dl[0]=a,dl[1]=a,a=dl),u){const e=a.length,t=!Nu(a[0]);2===e&&t?(ml.to=a,hl[0]=ml,gl=hl):e>2&&t?(gl=[],a.forEach((e,t)=>{t?1===t?(dl[1]=e,gl.push(dl)):gl.push(e):dl[0]=e})):gl=a}else hl[0]=a,gl=hl;let h=null,d=null,m=NaN,g=0,v=0;for(let e=gl.length;v<e;v++){const o=gl[v];Nu(o)?vl=o:(ml.to=o,vl=ml),pl.func=null;const a=Rc(vl.to,t,r,c,pl);let u;Nu(a)&&!ju(a.to)?(vl=a,u=a.to):u=a;const l=Rc(vl.from,t,r,c),f=vl.ease,p=!ju(f)&&!ju(f.ease),y=p?f.ease:f||x,b=p?f.duration:Rc(Sc(vl.duration,e>1?Rc(E,t,r,c)/e:E),t,r,c),_=Rc(Sc(vl.delay,v?0:T),t,r,c),w=Rc(Sc(vl.composition,R),t,r,c),L=Cu(w)?w:tu[w],I=vl.modifier||S,P=!ju(l),k=!ju(u),j=Iu(u),D=j||P&&k,$=d?g+_:_,M=A+$;C||!P&&!j||(C=1);let B=d;if(L!==tu.none){h||(h=jc(t,s));let e=h._head;for(;e&&!e._isOverridden&&e._absoluteStartTime<=M;)if(B=e,e=e._nextRep,e&&e._absoluteStartTime>=M)for(;e;)$c(e),e=e._nextRep}if(D?(Nc(j?Rc(u[0],t,r,c):l,ll),Nc(j?Rc(u[1],t,r,c,pl):u,fl),0===ll.t&&(B?1===B._valueType&&(ll.t=1,ll.u=B._unit):(Nc(Lc(t,s,i,O),Pc),1===Pc.t&&(ll.t=1,ll.u=Pc.u)))):(k?Nc(u,fl):d?Cc(d,fl):Nc(n&&B&&B.parent.parent===n?B._value:Lc(t,s,i,O),fl),P?Nc(l,ll):d?Cc(d,ll):Nc(n&&B&&B.parent.parent===n?B._value:Lc(t,s,i,O),ll)),ll.o&&(ll.n=Ic(B?B._toNumber:Nc(Lc(t,s,i,O),Pc).n,ll.n,ll.o)),fl.o&&(fl.n=Ic(ll.n,fl.n,fl.o)),ll.t!==fl.t)if(3===ll.t||3===fl.t){const e=3===ll.t?ll:fl,t=3===ll.t?fl:ll;t.t=3,t.s=ic(e.s),t.d=e.d.map(()=>t.n)}else if(1===ll.t||1===fl.t){const e=1===ll.t?ll:fl,t=1===ll.t?fl:ll;t.t=1,t.u=e.u}else if(2===ll.t||2===fl.t){const e=2===ll.t?ll:fl,t=2===ll.t?fl:ll;t.t=2,t.s=e.s,t.d=[0,0,0,1]}if(ll.u!==fl.u){let e=fl.u?ll:fl;e=ul(t,e,fl.u?fl.u:ll.u,!1)}if(fl.d&&ll.d&&fl.d.length!==ll.d.length){const e=ll.d.length>fl.d.length?ll:fl,t=e===ll?fl:ll;t.d=e.d.map((e,n)=>ju(t.d[n])?0:t.d[n]),t.s=ic(e.s)}const z=tc(+b||au,12),F={parent:this,id:yl++,property:s,target:t,_value:null,_func:pl.func,_ease:rl(y),_fromNumbers:ic(ll.d),_toNumbers:ic(fl.d),_strings:ic(fl.s),_fromNumber:ll.n,_toNumber:fl.n,_numbers:ic(ll.d),_number:ll.n,_unit:fl.u,_modifier:I,_currentTime:0,_startTime:$,_delay:+_,_updateDuration:z,_changeDuration:z,_absoluteStartTime:M,_tweenType:i,_valueType:fl.t,_composition:L,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};L!==tu.none&&Mc(F,h),isNaN(m)&&(m=F._startTime),g=tc($+z,12),d=F,N++,cc(this,F)}(isNaN(I)||m<I)&&(I=m),(isNaN(L)||g>L)&&(L=g),3===i&&(f=N-v,p=N)}if(!isNaN(f)){let e=0;ac(this,t=>{e>=f&&e<p&&(t._renderTransforms=1,t._composition===tu.blend&&ac(hc.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}u||console.warn("No target found. Make sure the element you're trying to animate is accessible before creating your animation."),I?(ac(this,e=>{e._startTime-e._delay||(e._delay-=I),e._startTime-=I}),L-=I):I=0,L||(L=au,this.iterationCount=0),this.targets=a,this.duration=L===au?au:rc((L+this._loopDelay)*this.iterationCount-this._loopDelay)||au,this.onRender=v||y.onRender,this._ease=_,this._delay=I,this.iterationDuration=L,this._inlineStyles=O,!this._autoplay&&C&&this.onRender(this)}stretch(e){const t=this.duration;if(t===oc(e))return this;const n=e/t;return ac(this,e=>{e._updateDuration=oc(e._updateDuration*n),e._changeDuration=oc(e._changeDuration*n),e._currentTime*=n,e._startTime*=n,e._absoluteStartTime*=n}),super.stretch(e)}refresh(){return ac(this,e=>{const t=Lc(e.target,e.property,e._tweenType);Nc(t,Pc),e._fromNumbers=ic(Pc.d),e._fromNumber=Pc.n,e._func&&(Nc(e._func(),fl),e._toNumbers=ic(fl.d),e._strings=ic(fl.s),e._toNumber=fl.n)}),this}revert(){return super.revert(),cl(this)}then(e){return super.then(e)}}pu.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t))),Ja&&(ju(CSS)||Object.hasOwnProperty.call(CSS,"registerProperty"));const _l={_head:null,_tail:null},wl=(e,t,n)=>{let r=_l._head;for(;r;){const o=r._next,i=r.$el===e,s=!t||r.property===t,a=!n||r.parent===n;if(i&&s&&a){const e=r.animation;try{e.commitStyles()}catch{}e.cancel(),uc(_l,r);const t=r.parent;t&&(t._completed++,t.animations.length===t._completed&&(t.completed=!0,t.muteCallbacks||(t.paused=!0,t.onComplete(t),t._resolve(t))))}r=o}},xl=(e=du)=>new Wc({duration:1*Ru.timeScale,onComplete:e},null,0).resume();function El(e,t,n){const r=xc(e);if(!r.length)return;const[o]=r,i=Oc(o,t),s=il(t,o,i);let a=Lc(o,s);if(ju(n))return a;if(Nc(a,Pc),0===Pc.t||1===Pc.t){if(!1===n)return Pc.n;{const e=ul(o,Pc,n,!1);return`${tc(e.n,Ru.precision)}${e.u}`}}}const Tl=(e,t)=>{if(!ju(t))return t.duration=au,t.composition=Sc(t.composition,tu.none),new bl(e,t,null,0,!0).resume()},Sl=(e,t,n)=>{let r=!1;return ac(t,o=>{const i=o.target;if(e.includes(i)){const e=o.property,s=o._tweenType,a=il(n,i,s);(!a||a&&a===e)&&(o.parent._tail===o&&3===o._tweenType&&o._prev&&3===o._prev._tweenType&&(o._prev._renderTransforms=1),uc(t,o),Bc(o),r=!0)}},!0),r},Rl=(e,t,n)=>{const r=wc(e),o=t||vc,i=t&&t.controlAnimation&&t;for(let e=0,t=r.length;e<t;e++){const t=r[e];wl(t,n,i)}let s;if(o._hasChildren){let t=0;ac(o,i=>{if(!i._hasChildren)if(s=Sl(r,i,n),s&&!i._head)i.cancel(),uc(o,i);else{const e=i._offset+i._delay+i.duration;e>t&&(t=e)}i._head?Rl(e,i,n):i._hasChildren=!1},!0),ju(o.iterationDuration)||(o.iterationDuration=t)}else s=Sl(r,o,n);return s&&!o._head&&(o._hasChildren=!1,o.cancel&&o.cancel()),r},Ol=(e,t,n)=>{const r=10**(n||0);return Xu((Math.random()*(t-e+1/r)+e)*r)/r},Al=(e,t,n,r)=>{let o=cu/Ru.defaults.frameRate;if(!1!==r){const e=r||vc._hasChildren&&vc;e&&e.deltaTime&&(o=e.deltaTime)}const i=1-Math.exp(-n*o*.1);return n?1===n?t:(1-i)*e+i*t:e},Ll=e=>(...t)=>{const n=e(...t);return new Proxy(du,{apply:(e,t,[r])=>n(r),get:(e,t)=>Ll((...e)=>{const r=Nl[t](...e);return e=>r(n(e))})})},Il=(e,t=0)=>(...n)=>(n.length<e.length?Ll(((e,t=0)=>(...n)=>t?t=>e(...n,t):t=>e(t,...n))(e,t)):e)(...n),Nl={$:xc,get:El,set:Tl,remove:Rl,cleanInlineStyles:cl,random:Ol,randomPick:e=>e[Ol(0,e.length-1)],shuffle:e=>{let t,n,r=e.length;for(;r;)n=Ol(0,--r),t=e[r],e[r]=e[n],e[n]=t;return e},lerp:Al,sync:xl,clamp:Il(Qu),round:Il(tc),snap:Il((e,t)=>Iu(t)?t.reduce((t,n)=>Gu(n-e)<Gu(t-e)?n:t):t?Ju(e/t)*t:e),wrap:Il((e,t,n)=>((e-t)%(n-t)+(n-t))%(n-t)+t),interpolate:Il(nc,1),mapRange:Il((e,t,n,r,o)=>r+(e-t)/(n-t)*(o-r)),roundPad:Il((e,t)=>(+e).toFixed(t)),padStart:Il((e,t,n)=>`${e}`.padStart(t,n)),padEnd:Il((e,t,n)=>`${e}`.padEnd(t,n)),degToRad:Il(e=>e*Ku/180),radToDeg:Il(e=>180*e/Ku)},Cl=(e,t)=>{let n=e.iterationDuration;if(n===au&&(n=0),ju(t))return n;if(Cu(+t))return+t;const r=t,o=e?e.labels:null,i=!Du(o),s=((e,t)=>{if(Au(t,"<")){const n="<"===t[1],r=e._tail,o=r?r._offset+r._delay:0;return n?o:o+r.duration}})(e,r),a=!ju(s),u=Tu.exec(r);if(u){const e=u[0],t=r.split(e),c=i&&t[0]?o[t[0]]:n,l=a?s:i?c:n,f=+t[1];return Ic(l,f,e[0])}return a?s:i?ju(o[r])?n:o[r]:n};function Pl(e,t,n,r,o,i){const s=Cu(e.duration)&&e.duration<=au?n-au:n;pc(t,s,1,1,1);const a=r?new bl(r,e,t,s,!1,o,i):new Wc(e,t,s);return a.init(1),cc(t,a),ac(t,e=>{const n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=function(e){return rc((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||au}(t),t}class kl extends Wc{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=Ru.defaults;this.defaults=t?sc(t,n):n,this.onRender=e.onRender||n.onRender;const r=Sc(e.playbackEase,n.playbackEase);this._ease=r?rl(r):null,this.iterationDuration=0}add(e,t,n){const r=Nu(t),o=Nu(e);if(r||o){if(this._hasChildren=!0,r){const r=t;if(ku(n)){const t=n,o=wc(e),i=this.duration,s=this.iterationDuration,a=r.id;let u=0;const c=o.length;o.forEach(e=>{const n={...r};this.duration=i,this.iterationDuration=s,ju(a)||(n.id=a+"-"+u),Pl(n,this,t(e,u,c,this),e,u,c),u++})}else Pl(r,this,Cl(this,n),e)}else Pl(e,this,Cl(this,t));return this.init(1)}}sync(e,t){if(ju(e)||e&&ju(e.pause))return this;e.pause();const n=+(e.effect?e.effect.getTiming().duration:e.duration);return this.add(e,{currentTime:[0,n],duration:n,ease:"linear"},t)}set(e,t,n){return ju(t)?this:(t.duration=au,t.composition=tu.replace,this.add(e,t,n))}call(e,t){return ju(e)||e&&!ku(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return ju(e)||e&&!Pu(e)||(this.labels[e]=Cl(this,t)),this}remove(e,t){return Rl(e,this,t),this}stretch(e){const t=this.duration;if(t===oc(e))return this;const n=e/t,r=this.labels;ac(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return ac(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),ac(this,e=>e.revert,!0),cl(this)}then(e){return super.then(e)}}const jl=(e,t)=>e&&ku(e)?e(t):e,Dl=new Map;class $l{constructor(e){this.element=e,this.useWin=this.element===eu.body,this.winWidth=0,this.winHeight=0,this.width=0,this.height=0,this.left=0,this.top=0,this.zIndex=0,this.scrollX=0,this.scrollY=0,this.prevScrollX=0,this.prevScrollY=0,this.scrollWidth=0,this.scrollHeight=0,this.velocity=0,this.backwardX=!1,this.backwardY=!1,this.scrollTicker=new Wc({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const e=this.backwardX||this.backwardY;ac(this,e=>e.handleScroll(),e)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Wc({autoplay:!1,frameRate:30,onUpdate:e=>{const t=e.deltaTime,n=this.prevScrollX,r=this.prevScrollY,o=this.scrollX,i=this.scrollY,s=n-o,a=r-i;this.prevScrollX=o,this.prevScrollY=i,s&&(this.backwardX=n>o),a&&(this.backwardY=r>i),this.velocity=tc(t>0?Math.sqrt(s*s+a*a)/t:0,5)}}).init(),this.resizeTicker=new Wc({autoplay:!1,duration:250*Ru.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Wc({autoplay:!1,duration:500*Ru.timeScale,onBegin:()=>{this.scrollTicker.resume()},onComplete:()=>{this.scrollTicker.pause()}}).init(),this._head=null,this._tail=null,this.updateScrollCoords(),this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll(),this.resizeObserver=new ResizeObserver(()=>this.resizeTicker.restart()),this.resizeObserver.observe(this.element),(this.useWin?Qa:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=tc(e?Qa.scrollX:t.scrollLeft,0),this.scrollY=tc(e?Qa.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=Qa.innerWidth,this.winHeight=(()=>{const e=document.createElement("div");eu.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return eu.body.removeChild(e),t})()}updateBounds(){const e=getComputedStyle(this.element),t=this.element;let n,r;if(this.scrollWidth=t.scrollWidth+parseFloat(e.marginLeft)+parseFloat(e.marginRight),this.scrollHeight=t.scrollHeight+parseFloat(e.marginTop)+parseFloat(e.marginBottom),this.updateWindowBounds(),this.useWin)n=this.winWidth,r=this.winHeight;else{const e=t.getBoundingClientRect();n=e.width,r=e.height,this.top=e.top,this.left=e.left}this.width=n,this.height=r}refreshScrollObservers(){ac(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),ac(this,e=>{e.refresh(),e._debug&&e.debug()})}refresh(){this.updateWindowBounds(),this.updateBounds(),this.refreshScrollObservers(),this.handleScroll()}handleScroll(){this.updateScrollCoords(),this.wakeTicker.restart()}handleEvent(e){"scroll"===e.type&&this.handleScroll()}revert(){this.scrollTicker.cancel(),this.dataTimer.cancel(),this.resizeTicker.cancel(),this.wakeTicker.cancel(),this.resizeObserver.unobserve(this.element),(this.useWin?Qa:this.element).removeEventListener("scroll",this),Dl.delete(this.element)}}const Ml=(e,t,n,r,o)=>{const i="min"===t,s="max"===t,a="top"===t||"left"===t||"start"===t||i?0:"bottom"===t||"right"===t||"end"===t||s?"100%":"center"===t?"50%":t,{n:u,u:c}=Nc(a,Pc);let l=u;return"%"===c?l=u/100*n:c&&(l=ul(e,Pc,"px",!0).n),s&&r<0&&(l+=r),i&&o>0&&(l+=o),l},Bl=(e,t,n,r,o)=>{let i;if(Pu(t)){const s=Tu.exec(t);if(s){const a=s[0],u=a[0],c=t.split(a),l="min"===c[0],f="max"===c[0],p=Ml(e,c[0],n,r,o),h=Ml(e,c[1],n,r,o);if(l){const t=Ic(Ml(e,"min",n),h,u);i=t<p?p:t}else if(f){const t=Ic(Ml(e,"max",n),h,u);i=t>p?p:t}else i=Ic(p,h,u)}else i=Ml(e,t,n,r,o)}else i=t;return tc(i,0)},zl=e=>{let t;const n=e.targets;for(let e=0,r=n.length;e<r;e++){const r=n[e];if(r[ru]){t=r;break}}return t};let Fl=0;const Ul=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Wl{constructor(e={}){Ru.scope&&Ru.scope.revertibles.push(this);const t=Sc(e.sync,"play pause"),n=t?rl(t):null,r=t&&("linear"===t||t===Hc),o=t&&!(n===Hc&&!r),i=t&&(Cu(t)||!0===t||r),s=t&&Pu(t)&&!o&&!i,a=s?t.split(" ").map(e=>()=>{const t=this.linked;return t&&t[e]?t[e]():null}):null,u=s&&a.length>2;this.index=Fl++,this.id=ju(e.id)?this.index:e.id,this.container=(e=>{const t=e&&wc(e)[0]||eu.body;let n=Dl.get(t);return n||(n=new $l(t),Dl.set(t,n)),n})(e.container),this.target=null,this.linked=null,this.repeat=null,this.horizontal=null,this.enter=null,this.leave=null,this.sync=o||i||!!a,this.syncEase=o?n:null,this.syncSmooth=i?!0===t||r?1:t:null,this.onSyncEnter=a&&!u&&a[0]?a[0]:du,this.onSyncLeave=a&&!u&&a[1]?a[1]:du,this.onSyncEnterForward=a&&u&&a[0]?a[0]:du,this.onSyncLeaveForward=a&&u&&a[1]?a[1]:du,this.onSyncEnterBackward=a&&u&&a[2]?a[2]:du,this.onSyncLeaveBackward=a&&u&&a[3]?a[3]:du,this.onEnter=e.onEnter||du,this.onLeave=e.onLeave||du,this.onEnterForward=e.onEnterForward||du,this.onLeaveForward=e.onLeaveForward||du,this.onEnterBackward=e.onEnterBackward||du,this.onLeaveBackward=e.onLeaveBackward||du,this.onUpdate=e.onUpdate||du,this.onSyncComplete=e.onSyncComplete||du,this.reverted=!1,this.completed=!1,this.began=!1,this.isInView=!1,this.forceEnter=!1,this.hasEntered=!1,this.offsets=[],this.offset=0,this.offsetStart=0,this.offsetEnd=0,this.distance=0,this.prevProgress=0,this.thresholds=["start","end","end","start"],this.coords=[0,0,0,0],this.debugStyles=null,this.$debug=null,this._params=e,this._debug=Sc(e.debug,!1),this._next=null,this._prev=null,cc(this.container,this),xl(()=>{if(!this.reverted){if(!this.target){const t=wc(e.target)[0];this.target=t||eu.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;ju(e.targets)?ac(e,e=>{e.targets&&!t&&(t=zl(e))}):t=zl(e),this.target=t||eu.body,this.refresh()}return this}get velocity(){return this.container.velocity}get backward(){return this.horizontal?this.container.backwardX:this.container.backwardY}get scroll(){return this.horizontal?this.container.scrollX:this.container.scrollY}get progress(){const e=(this.scroll-this.offsetStart)/this.distance;return e===1/0||isNaN(e)?0:tc(Qu(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=Sc(jl(e.repeat,this),!0),this.horizontal="x"===Sc(jl(e.axis,this),"y"),this.enter=Sc(jl(e.enter,this),"end start"),this.leave=Sc(jl(e.leave,this),"start end"),this.updateBounds(),this.handleScroll(),this}removeDebug(){return this.$debug&&(this.$debug.parentNode.removeChild(this.$debug),this.$debug=null),this.debugStyles&&(this.debugStyles.revert(),this.$debug=null),this}debug(){this.removeDebug();const e=this.container,t=this.horizontal,n=e.element.querySelector(":scope > .animejs-onscroll-debug"),r=eu.createElement("div"),o=eu.createElement("div"),i=eu.createElement("div"),s=Ul[this.index%Ul.length],a=e.useWin,u=a?e.winWidth:e.width,c=a?e.winHeight:e.height,l=e.scrollWidth,f=e.scrollHeight,p=this.container.width>360?320:260,h=t?0:10,d=t?10:0,m=t?24:p/2,g=t?m:15,v=t?60:m,y=t?v:g,b=t?"repeat-x":"repeat-y",_=e=>t?"0px "+e+"px":e+"px 2px",w=e=>`linear-gradient(${t?90:0}deg, ${e} 2px, transparent 1px)`,x=(e,t,n,r,o)=>`position:${e};left:${t}px;top:${n}px;width:${r}px;height:${o}px;`;r.style.cssText=`${x("absolute",h,d,t?l:p,t?p:f)}\n pointer-events: none;\n z-index: ${this.container.zIndex++};\n display: flex;\n flex-direction: ${t?"column":"row"};\n filter: drop-shadow(0px 1px 0px rgba(0,0,0,.75));\n `,o.style.cssText=`${x("sticky",0,0,t?u:m,t?m:c)}`,n||(o.style.cssText+=`background:\n ${w("#FFFF")}${_(m-10)} / 100px 100px ${b},\n ${w("#FFF8")}${_(m-10)} / 10px 10px ${b};\n `),i.style.cssText=`${x("relative",0,0,t?l:m,t?m:f)}`,n||(i.style.cssText+=`background:\n ${w("#FFFF")}${_(0)} / ${t?"100px 10px":"10px 100px"} ${b},\n ${w("#FFF8")}${_(0)} / ${t?"10px 0px":"0px 10px"} ${b};\n `);const E=[" enter: "," leave: "];this.coords.forEach((e,n)=>{const r=n>1,a=(r?0:this.offset)+e,h=n%2,d=a<y,m=a>(r?t?u:c:t?l:f)-y,b=(r?h&&!d:!h&&!d)||m,_=eu.createElement("div"),w=eu.createElement("div"),T=t?b?"right":"left":b?"bottom":"top",S=b?(t?v:g)+(r?t?-1:m?0:-2:t?-1:-2):t?1:0;w.innerHTML=`${this.id}${E[h]}${this.thresholds[n]}`,_.style.cssText=`${x("absolute",0,0,v,g)}\n display: flex;\n flex-direction: ${t?"column":"row"};\n justify-content: flex-${r?"start":"end"};\n align-items: flex-${b?"end":"start"};\n border-${T}: 2px solid ${s};\n `,w.style.cssText=`\n overflow: hidden;\n max-width: ${p/2-10}px;\n height: ${g};\n margin-${t?b?"right":"left":b?"bottom":"top"}: -2px;\n padding: 1px;\n font-family: ui-monospace, monospace;\n font-size: 10px;\n letter-spacing: -.025em;\n line-height: 9px;\n font-weight: 600;\n text-align: ${t&&b||!t&&!r?"right":"left"};\n white-space: pre;\n text-overflow: ellipsis;\n color: ${h?s:"rgba(0,0,0,.75)"};\n background-color: ${h?"rgba(0,0,0,.65)":s};\n border: 2px solid ${h?s:"transparent"};\n border-${t?b?"top-left":"top-right":b?"top-left":"bottom-left"}-radius: 5px;\n border-${t?b?"bottom-left":"bottom-right":b?"top-right":"bottom-right"}-radius: 5px;\n `,_.appendChild(w);let R=a-S+(t?1:0);_.style[t?"left":"top"]=`${R}px`,(r?o:i).appendChild(_)}),r.appendChild(o),r.appendChild(i),e.element.appendChild(r),n||r.classList.add("animejs-onscroll-debug"),this.$debug=r,"static"===El(e.element,"position")&&(this.debugStyles=Tl(e.element,{position:"relative "}))}updateBounds(){let e;this._debug&&this.removeDebug();const t=this.target,n=this.container,r=this.horizontal,o=this.linked;let i,s=t,a=0,u=0,c=s;o&&(i=o.currentTime,o.seek(0,!0));const l="static"===El(n.element,"position")&&Tl(n.element,{position:"relative "});for(;s&&s!==n.element&&s!==eu.body;){const t="sticky"===El(s,"position")&&Tl(s,{position:"static"});s===c&&(a+=s.offsetLeft||0,u+=s.offsetTop||0,c=s.offsetParent),s=s.parentElement,t&&(e||(e=[]),e.push(t))}l&&l.revert();const f=r?a:u,p=r?t.offsetWidth:t.offsetHeight,h=r?n.width:n.height,d=(r?n.scrollWidth:n.scrollHeight)-h,m=this.enter,g=this.leave;let v="start",y="end",b="end",_="start";if(Pu(m)){const e=m.split(" ");b=e[0],v=e.length>1?e[1]:v}else if(Nu(m)){const e=m;ju(e.container)||(b=e.container),ju(e.target)||(v=e.target)}else Cu(m)&&(b=m);if(Pu(g)){const e=g.split(" ");_=e[0],y=e.length>1?e[1]:y}else if(Nu(g)){const e=g;ju(e.container)||(_=e.container),ju(e.target)||(y=e.target)}else Cu(g)&&(_=g);const w=Bl(t,v,p),x=Bl(t,y,p),E=w+f-h,T=x+f-d,S=Bl(t,b,h,E,T),R=Bl(t,_,h,E,T),O=w+f-S,A=x+f-R,L=A-O;this.offsets[0]=a,this.offsets[1]=u,this.offset=f,this.offsetStart=O,this.offsetEnd=A,this.distance=L<=0?0:L,this.thresholds=[v,y,b,_],this.coords=[w,x,S,R],e&&e.forEach(e=>e.revert()),o&&o.seek(i,!0),this._debug&&this.debug()}handleScroll(){const e=this.linked,t=this.sync,n=this.syncEase,r=this.syncSmooth,o=e&&(n||r),i=this.horizontal,s=this.container,a=this.scroll,u=a<=this.offsetStart,c=a>=this.offsetEnd,l=!u&&!c,f=a===this.offsetStart||a===this.offsetEnd,p=!this.hasEntered&&f,h=this._debug&&this.$debug;let d=!1,m=!1,g=this.progress;if(u&&this.began&&(this.began=!1),g>0&&!this.began&&(this.began=!0),o){const t=e.progress;if(r&&Cu(r)){if(r<1){const e=t<g&&1===g?1e-4:t>g&&!g?-1e-4:0;g=tc(Al(t,g,nc(.01,.2,r),!1)+e,6)}}else n&&(g=n(g));d=g!==this.prevProgress,m=1===t,d&&!m&&r&&t&&s.wakeTicker.restart()}if(h){const e=i?s.scrollY:s.scrollX;h.style[i?"top":"left"]=e+10+"px"}(l&&!this.isInView||p&&!this.forceEnter&&!this.hasEntered)&&(l&&(this.isInView=!0),this.forceEnter&&this.hasEntered?l&&(this.forceEnter=!1):(h&&l&&(h.style.zIndex=""+this.container.zIndex++),this.onSyncEnter(this),this.onEnter(this),this.backward?(this.onSyncEnterBackward(this),this.onEnterBackward(this)):(this.onSyncEnterForward(this),this.onEnterForward(this)),this.hasEntered=!0,p&&(this.forceEnter=!0))),(l||!l&&this.isInView)&&(d=!0),d&&(o&&e.seek(e.duration*g),this.onUpdate(this)),!l&&this.isInView&&(this.isInView=!1,this.onSyncLeave(this),this.onLeave(this),this.backward?(this.onSyncLeaveBackward(this),this.onLeaveBackward(this)):(this.onSyncLeaveForward(this),this.onLeaveForward(this)),t&&!r&&(m=!0)),g>=1&&this.began&&!this.completed&&(t&&m||!t)&&(t&&this.onSyncComplete(this),this.completed=!0,(!this.repeat&&!e||!this.repeat&&e&&e.completed)&&this.revert()),g<1&&this.completed&&(this.completed=!1),this.prevProgress=g}revert(){if(this.reverted)return;const e=this.container;return uc(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const Hl=(e={})=>new Wl(e);var ql,Yl,Gl,Vl,Xl,Zl,Kl;!function(e){e[e.XY=1]="XY",e[e.SIZE=2]="SIZE"}(ql||(ql={})),function(e){e[e.ALL=1]="ALL",e[e.SEPARATE=2]="SEPARATE"}(Yl||(Yl={})),function(e){e[e.X=1]="X",e[e.Y=2]="Y"}(Gl||(Gl={})),function(e){e[e.AUTOPLAY=1]="AUTOPLAY",e[e.SCROLL_SYNC=2]="SCROLL_SYNC",e[e.STATES=3]="STATES",e[e.NONE=4]="NONE"}(Vl||(Vl={})),function(e){e[e.FIXED=1]="FIXED",e[e.RELATIVE=2]="RELATIVE"}(Xl||(Xl={})),function(e){e[e.APPEAR=1]="APPEAR",e[e.MOUNT=2]="MOUNT"}(Zl||(Zl={})),function(e){e[e.PLAY=1]="PLAY",e[e.PAUSE=2]="PAUSE",e[e.REVERSE=3]="REVERSE",e[e.IGNORE=4]="IGNORE",e[e.DESTROY=5]="DESTROY",e[e.INIT=6]="INIT",e[e.RE_PLAY=7]="RE_PLAY"}(Kl||(Kl={}));const Jl={[Kl.PLAY]:"play",[Kl.PAUSE]:"pause",[Kl.REVERSE]:"reverse",[Kl.IGNORE]:"ignore",[Kl.DESTROY]:"destroy",[Kl.INIT]:"init",[Kl.RE_PLAY]:"re_play"};var Ql;!function(e){e[e.FIXED=0]="FIXED",e[e.PERCENTAGE=1]="PERCENTAGE",e[e.START=2]="START",e[e.START_PLUS=3]="START_PLUS",e[e.END=4]="END",e[e.END_PLUS=5]="END_PLUS"}(Ql||(Ql={}));const ef={[Ql.FIXED]:"",[Ql.PERCENTAGE]:"%",[Ql.START]:"top",[Ql.START_PLUS]:"+=top",[Ql.END]:"bottom",[Ql.END_PLUS]:"+=bottom"},tf={[Ql.FIXED]:"",[Ql.PERCENTAGE]:"%",[Ql.START]:"top",[Ql.START_PLUS]:"+=left",[Ql.END]:"right",[Ql.END_PLUS]:"+=right"},nf=(e,t,n)=>{const r=e===Gl.Y?ef:tf;return t===Ql.START||t===Ql.END?`${r[t]}`:`${null!=n?n:""}${r[t]}`};var rf,of;!function(e){e[e.SMOOTH=0]="SMOOTH",e[e.INSTANT=1]="INSTANT"}(rf||(rf={})),function(e){e[e.NORMAL=1]="NORMAL",e[e.REVERSE=2]="REVERSE",e[e.ALTERNATE=3]="ALTERNATE"}(of||(of={}));const sf={[of.NORMAL]:"normal",[of.REVERSE]:"reverse",[of.ALTERNATE]:"alternate"},af=e=>{const t=[];e.forEach(e=>{Array.isArray(e.targets)?t.push(...e.targets):"string"==typeof e.targets&&t.push(e.targets)});const n=t.join(", ").trim();return n?[...document.querySelectorAll(n).values()]:[]},uf=(e,t={},n)=>{const r=Object.entries(t).reduce((e,[t,n])=>(e[t]=Jl[n],e),{}),[o,i]=(0,F.useState)({}),s=(0,F.useMemo)(()=>{const t=Object.entries(e).reduce((e,[t])=>(e[t]={complete:!1},e),{}),o={},a={},u=(r,s)=>{var u,c,l,f,p,h;const d=r.name;let m=o[d];if(!m){const v=sf[r.direction||of.NORMAL];a[d]={direction:v};let y=!1;const b=r.config;if(b.type_===Vl.SCROLL_SYNC){const e=b.smoothness.type===rf.INSTANT||b.smoothness.value||0,t=(null==b?void 0:b.container.element)?"."+n[`E${null==b?void 0:b.container.element}`]:"#__next",r=null!==(u=null==b?void 0:b.target.element)&&void 0!==u?u:"-",o=nf(b.direction,b.container.enter.type,b.container.enter.value),i=nf(b.direction,b.container.leave.type,b.container.leave.value),s=nf(b.direction,b.target.enter.type,b.target.enter.value),a=nf(b.direction,b.target.leave.type,b.target.leave.value);y=Hl({axis:b.direction===Gl.Y?"y":"x",container:t,target:r,sync:e,enter:`${o} ${s}`,leave:`${i} ${a}`})}else if(b.type_===Vl.AUTOPLAY&&b.on.type_===Zl.APPEAR){const e=(null===(c=b.on)||void 0===c?void 0:c.container.element)?"."+n[`E${null===(l=b.on)||void 0===l?void 0:l.container.element}`]:"#__next",t=null!==(p=null===(f=b.on)||void 0===f?void 0:f.target.element)&&void 0!==p?p:"-",r=nf(b.on.direction,b.on.container.enter.type,b.on.container.enter.value),o=nf(b.on.direction,b.on.container.leave.type,b.on.container.leave.value),i=nf(b.on.direction,b.on.target.enter.type,b.on.target.enter.value),s=nf(b.on.direction,b.on.target.leave.type,b.on.target.leave.value);y=Hl({axis:b.on.direction===Gl.Y?"y":"x",container:e,target:t,sync:!0,enter:`${r} ${i}`,leave:`${o} ${s}`})}else b.type_===Vl.AUTOPLAY&&b.on.type_===Zl.MOUNT&&(y=!0);let _=!1;const w=(g={alternate:"alternate"===v,autoplay:y,loop:!!r.loop,onBegin:()=>{_&&(t[r.name].begin=!0,t[r.name].complete=!1,r.listener&&i({}))},onUpdate:e=>{_&&1===e.progress&&(t[r.name].begin=!0,t[r.name].complete=!0,r.listener&&i({}))},defaults:{duration:1e3*r.seconds}},new kl(g).init());null===(h=Object.values(e).find(e=>e.node===r))||void 0===h||h.data.forEach(e=>{lf={},w.add(e.targets,e.params,0),lf={}}),m={node:r,instance:w,elements:s},o[d]=m,m.instance.seek(Number(m.instance.defaults.duration)),m.instance.seek(0),_=!0,m.instance.onComplete=()=>{a[d].playing=!1}}var g;return m.instance};return{player:r,states:t,list:o,play:(e,t)=>{const n=u(e),r=e.name;"play"!==a[r].state&&(a[r].state="play",a[r].reverse||t&&n.paused&&n.restart(),n.play(),a[r].reverse=!1,a[r].playing=!0)},pause:e=>{const t=e.name;"pause"!==a[t].state&&(a[t].state="pause",u(e).pause(),a[t].playing=!1)},reverse:e=>{const t=e.name;"reverse"!==a[t].state&&(a[t].state="reverse",u(e).reverse(),a[t].reverse=!0,a[t].playing=!0)},get:u,destroy:e=>{let t=o[e.name];t&&(delete a[e.name],delete o[e.name],t.instance.pause())},direction:e=>a[e.name].direction,clean:()=>Object.entries(s.list).forEach(([t,n])=>{var r,o;const i=e[t],a=i?af(i.data):[];((null===(r=n.elements)||void 0===r?void 0:r.length)!==a.length||(null===(o=n.elements)||void 0===o?void 0:o.map(e=>a.includes(e)).includes(!1)))&&s.destroy(n.node)})}},[]);return s.player=r,{instances:s,scan:()=>{Object.entries(t).forEach(([t,n])=>{const r=e[t];if(!r)return;if(n===Kl.IGNORE)return;if(n===Kl.DESTROY)return void s.destroy(r.node);const o=af(r.data);o.length?(s.get(r.node,o),n===Kl.PLAY?r&&s.play(r.node):n===Kl.PAUSE?r&&s.pause(r.node):n===Kl.RE_PLAY?r&&s.play(r.node,!0):n===Kl.REVERSE&&r&&s.reverse(r.node)):s.destroy(r.node)})}}},cf=({text:e})=>(0,X.jsx)(X.Fragment,{children:e.split("\n").map((e,t,n)=>(0,X.jsxs)(X.Fragment,{children:[e.split(" ").map((e,t,n)=>{const r=n.length===t+1;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("span",{style:{display:"inline-block"},children:e.split("").map(e=>(0,X.jsx)("span",{style:{display:"inline-block"},children:e}))}),r?(0,X.jsx)(X.Fragment,{}):(0,X.jsx)("span",{children:" "})]})}),(0,X.jsx)("br",{})]}))});let lf={};const ff=(e,t,n,r)=>(o,i,s)=>{const a=s-1,u=Math.round(Math.max(a/100*(100*(1-e)),a/100*(100*e))),c=Math.round(a/100*(100*e)),l=Math.abs(c-i),f=(t-t*n)/u*l,p=lf[r];let h=f;return p&&(h=-p+f),lf[r]=h,h};let pf=0;const hf=()=>(0,F.useMemo)(()=>"C"+ ++pf,[]),df=e=>{const t=(0,F.useRef)(!1);(0,F.useEffect)(()=>{t.current=!0},[]),(0,F.useEffect)(()=>{if(!t.current||e.option.runOnInit)return e.on();t.current=!1},e.values)},mf=(e,t,n)=>{if(e===t)return[];const r=[];for(let o=e;o<=t;e<t?o++:o--)r.push(n(o));return r},gf=(e,t)=>{const n=[],r=e.length;n.length=r;for(let o=0;o<r;o++)n[o]=t(e[o],o);return n},vf=(e,t)=>{const n=[],r=Object.entries(e),o=r.length;n.length=o;for(let e=0;e<o;e++)n[e]=t(r[e][0],r[e][1],e);return n},yf=(e,t)=>{const n=[],r=e.length;n.length=r;for(let o=0;o<r;o++)n[o]=t(e[o],o,r===o+1);return n},bf=e=>"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?e.toString():void 0,_f=e=>({top:(null==e?void 0:e.top)?e.top.value+e.top.type:void 0,left:(null==e?void 0:e.left)?e.left.value+e.left.type:void 0,width:(null==e?void 0:e.width)?e.width.value+e.width.type:void 0,height:(null==e?void 0:e.height)?e.height.value+e.height.type:void 0,backgroundColor:null==e?void 0:e.fill,backgroundImage:null==e?void 0:e.image});var wf,xf;!function(e){e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e[e.BOTTOM=4]="BOTTOM"}(wf||(wf={})),function(e){e[e.PLUS=1]="PLUS",e[e.MINUS=2]="MINUS"}(xf||(xf={}));const Ef=e=>{const t=e.container?document.querySelector(e.container):document.querySelector("#__next"),n=e.value||0;let r=e.target?document.querySelector(e.target):void 0;if(t){let o=0;const i=t.getBoundingClientRect();if(r){const s=r.getBoundingClientRect();e.config===wf.TOP?o=Number(t.scrollTop+(s.top-i.top)):e.config===wf.BOTTOM?o=Number(t.scrollTop+(s.bottom-i.top)):e.config===wf.LEFT?o=Number(t.scrollLeft+(s.left-i.left)):e.config===wf.RIGHT&&(o=Number(t.scrollLeft+(s.right-i.left))),e.operator===xf.PLUS?o+=n:e.operator===xf.MINUS&&(o-=n)}else e.config===wf.TOP?o=0:e.config===wf.BOTTOM?o=-t.scrollHeight:e.config===wf.LEFT?o=0:e.config===wf.RIGHT&&(o=-t.scrollWidth),e.operator===xf.PLUS?o+=n:e.operator===xf.MINUS&&(o-=n);e.config===wf.TOP||e.config===wf.BOTTOM?t.scrollTo({behavior:"instant",top:o}):t.scrollTo({behavior:"instant",left:o})}},Tf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Sf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Rf=e=>({element:e.currentTarget}),Of=e=>({element:e.currentTarget}),Af=e=>({element:e.currentTarget})})(),u})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "misaki-studio-internal",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "main": "dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "scripts": {