misaki-studio-internal 0.1.48 → 0.1.50
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.
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 ds(e){return"composedPath"in e?e.composedPath()[0]:e.target}const hs=Math.min,ms=Math.max,gs=Math.round,vs=(Math.floor,e=>({x:e,y:e}));function ys(e,t,n){return ms(e,hs(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 d;switch(u){case"top":d={x:l,y:r.y-o.height};break;case"bottom":d={x:l,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(ws(t)){case"start":d[s]-=p*(n&&c?-1:1);break;case"end":d[s]+=p*(n&&c?-1:1)}return d}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=hs(r.right,e.right),e.bottom=hs(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:d,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(d="end"===a?-1*h:h),u?{x:d*l,y:p*c}:{x:p*c,y:d*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:d=0}=bs(t,e),h=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}}(d),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+h.top)/b.y,bottom:(_.bottom-g.bottom+h.bottom)/b.y,left:(g.left-_.left+h.left)/b.x,right:(_.right-g.right+h.right)/b.x}}(t,u),f=Ts(_s(o)),p=xs(f);let d=c[p],h=c[f];if(i){const e="y"===p?"bottom":"right";d=ys(d+l["y"===p?"top":"left"],d,d-l[e])}if(s){const e="y"===f?"bottom":"right";h=ys(h+l["y"===f?"top":"left"],h,h-l[e])}const m=a.fn({...t,[p]:d,[f]:h});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,d={},h=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:d,rects:c,platform:s,elements:{reference:e,floating:t}});l=null!=g?g:l,f=null!=v?v:f,d={...d,[i]:{...d[i],...y}},b&&h<=50&&(h++,"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:d}})(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 da(e){const t=(0,F.useRef)(e);return ra(()=>{t.current=e}),t}const ha=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:d,capture:h}=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(d),{escapeKey:x,outsidePress:E}=xa(h),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=ds(e))||t.removeEventListener("keydown",n)};null==(t=ds(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=ds(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,d=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)||d)return;const h=m?ga(m.nodesRef.current,p):[];if(h.length>0){let e=!0;if(h.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=ds(e))||t.removeEventListener(c,n)};null==(t=ds(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 d=[];return p&&(Fi(o.domReference)&&(d=as(o.domReference)),Fi(o.floating)&&(d=d.concat(as(o.floating))),!Fi(o.reference)&&o.reference&&o.reference.contextElement&&(d=d.concat(as(o.reference.contextElement)))),d=d.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)}),d.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),d.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,d]=F.useState(r);Vs(p,r)||d(r);const[h,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||h,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}}}),d=F.useCallback(e=>{const t=Fi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),h=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:h,setPositionReference:d,domReference:l}),[p.refs,h,d]),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:d,tree:h}=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=ds(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(h&&ga(h.nodesRef.current,d).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,d=fa(),h=la(),m=da(c),g=da(u),v=da(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(ha),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:d,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:d,x:e.clientX,y:e.clientY,onClose(){L(),A(),O(e)}})(e))}},[s,a,e,l,f,p,O,A,L,r,n,v,d,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(ha,"");const r=s.domReference,o=null==d||null==(t=d.nodesRef.current.find(e=>e.id===h))||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,h,s,d,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:d,onPointerEnter:h}=l(),m=r.current;return(0,F.useLayoutEffect)(()=>(null==m||m.addEventListener("mousemove",p),null==m||m.addEventListener("pointerdown",d),null==m||m.addEventListener("pointerenter",h),()=>{null==m||m.removeEventListener("mousemove",p),null==m||m.removeEventListener("pointerdown",d),null==m||m.removeEventListener("pointerenter",h)}),[m,p,d,h]),(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),d=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:d}:{},[s,d])}(u),l=Ea(u),{getReferenceProps:f,getFloatingProps:p}=Aa([c,l]),{onPointerDown:d,onMouseDown:h,onClick:m,onKeyDown:g,onKeyUp:v}=f(),y=r.current;return(0,F.useLayoutEffect)(()=>(null==y||y.addEventListener("pointerdown",d),null==y||y.addEventListener("click",m),null==y||y.addEventListener("mousedown",h),null==y||y.addEventListener("keydown",g),null==y||y.addEventListener("keyup",v),()=>{null==y||y.removeEventListener("pointerdown",d),null==y||y.removeEventListener("click",m),null==y||y.removeEventListener("mousedown",h),null==y||y.removeEventListener("keydown",g),null==y||y.removeEventListener("keyup",v)}),[y,d,h,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=(0,F.memo)(e=>{const[t,n]=(0,F.useState)(e.isVisible?e.enter<0?"view":"enter":void 0),r=(0,F.useMemo)(()=>({next:void 0,time:void 0}),[]);return(0,F.useEffect)(()=>{e.isVisible?void 0===t&&"view"!==r.next?(r.time&&clearTimeout(r.time),r.next="view",n("enter"),r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,n("view")},e.enter)):"enter"!==t&&"exit"!==t||"view"===r.next||(r.time&&clearTimeout(r.time),r.next="view",r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,n("view")},e.enter)):"view"!==t&&"enter"!==t||"exit"===r.next||(r.time&&clearTimeout(r.time),r.next="exit",n("exit"),r.time=setTimeout(()=>{r.time=void 0,r.next=void 0,n(void 0)},e.exit))},[e.isVisible,t]),(0,X.jsx)(X.Fragment,{children:t&&e.children(t)})}),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()})}}const Xa=e=>{var t;const[n,r]=F.useState(),o=F.useRef(null),i=F.useMemo(()=>new Va,[]);return i.update=e=>{r(`w${e}px`)},F.useLayoutEffect(()=>{o.current&&(i.render({nodeId:"div",ref:o.current},e.sizes),i.finish())}),(0,X.jsx)("div",Object.assign({},e.divProps,{style:Object.assign({},e.style),ref:t=>{var n,r;o.current=t,null===(r=null===(n=e.divProps)||void 0===n?void 0:n.ref)||void 0===r||r.call(n,t)},className:e.className,children:null===(t=e.children)||void 0===t?void 0:t.call(e,n)}))};class Za{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 Ka=(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}},Ja=e=>{const[t,n]=(0,F.useState)({}),r=(0,F.useMemo)(()=>K().cloneDeep(e),[]);return{state:r,getState:()=>r,setState:e=>(n({}),!0)}},Qa="undefined"!=typeof window,eu=Qa?window:null,tu=Qa?document:null,nu={replace:0,none:1,blend:2},ru=Symbol(),ou=Symbol(),iu=Symbol(),su=Symbol(),au=(Symbol(),Symbol()),uu=1e-11,cu=1e12,lu=1e3,fu="",pu=new Map;pu.set("x","translateX"),pu.set("y","translateY"),pu.set("z","translateZ");const du=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],hu=du.reduce((e,t)=>({...e,[t]:t+"("}),{}),mu=()=>{},gu=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,vu=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,yu=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,bu=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,_u=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,wu=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,xu=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,Eu=/([a-z])([A-Z])/g,Tu=/(\w+)(\([^)]+\)+)/g,Su=/(\*=|\+=|-=)/,Ru={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:lu,delay:0,loopDelay:0,ease:"out(2)",composition:nu.replace,modifier:e=>e,onBegin:mu,onBeforeUpdate:mu,onUpdate:mu,onLoop:mu,onPause:mu,onComplete:mu,onRender:mu},Ou={defaults:Ru,root:tu,scope:null,precision:4,timeScale:1,tickThreshold:200},Au={version:"4.0.2",engine:null};Qa&&(eu.AnimeJS||(eu.AnimeJS=[]),eu.AnimeJS.push(Au));const Lu=(e,t)=>0===e.indexOf(t),Iu=Date.now,Nu=Array.isArray,Cu=e=>e&&e.constructor===Object,Pu=e=>"number"==typeof e&&!isNaN(e),ku=e=>"string"==typeof e,ju=e=>"function"==typeof e,Du=e=>void 0===e,$u=e=>Du(e)||null===e,Mu=e=>Qa&&e instanceof SVGElement,Bu=e=>gu.test(e),zu=e=>Lu(e,"rgb"),Fu=e=>Lu(e,"hsl"),Uu=e=>!Ou.defaults.hasOwnProperty(e),Wu=e=>ku(e)?parseFloat(e):e,Hu=Math.pow,qu=Math.sqrt,Yu=Math.sin,Gu=Math.cos,Vu=Math.abs,Xu=(Math.exp,Math.ceil),Zu=Math.floor,Ku=Math.asin,Ju=(Math.max,Math.atan2,Math.PI),Qu=Math.round,ec=(e,t,n)=>e<t?t:e>n?n:e,tc={},nc=(e,t)=>{if(t<0)return e;if(!t)return Qu(e);let n=tc[t];return n||(n=tc[t]=10**t),Qu(e*n)/n},rc=(e,t,n)=>e+(t-e)*n,oc=e=>e===1/0?cu:e===-1/0?-1e12:e,ic=e=>e<=uu?uu:oc(nc(e,11)),sc=e=>Nu(e)?[...e]:e,ac=(e,t)=>{const n={...e};for(let r in t){const o=e[r];n[r]=Du(o)?t[r]:o}return n},uc=(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}},cc=(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},lc=(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 fc{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=nc(lu/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<uu?uu:n,o=nc(lu/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<uu?uu: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 pc=(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,d=e._alternate,h=e._hasChildren,m=e._delay,g=e._currentTime,v=m+u,y=t-m,b=ec(g,-m,s),_=ec(y,-m,s),w=y-g,x=_>0,E=_>=s,T=s<=uu,S=2===o;let R=0,O=y,A=0;if(c>1){const t=~~(_/(u+(E?0:f)));e._currentIteration=ec(t,0,c),E&&e._currentIteration--,R=e._currentIteration%2,O=_%(u+f)||0}const L=p^(d&&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||h||!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)),!h){const t=S||(C?-1*w:w)>=Ou.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,d=l._nextRep,h=l._prevRep,m=e!==nu.none;if((t||(n!==i||o<=p+(d?d._delay:0))&&(0!==n||o>=l._absoluteStartTime))&&(!m||!l._isOverridden&&(!l._isOverlapped||o<=p)&&(!d||d._isOverridden||o<=d._absoluteStartTime)&&(!h||h._isOverridden||o>=h._absoluteStartTime+h._changeDuration+l._delay))){const t=l._currentTime=ec(N-l._startTime,0,i),n=l._ease(t/l._updateDuration),o=l._modifier,p=l._valueType,d=l._tweenType,h=0===d,g=0===p,v=g&&h||0===n||1===n?-1:Ou.precision;let y,b;if(g)y=b=o(nc(rc(l._fromNumber,l._toNumber,n),v));else if(1===p)b=o(nc(rc(l._fromNumber,l._toNumber,n),v)),y=`${b}${l._unit}`;else if(2===p){const e=l._fromNumbers,t=l._toNumbers,r=nc(ec(o(rc(e[0],t[0],n)),0,255),0),i=nc(ec(o(rc(e[1],t[1],n)),0,255),0),s=nc(ec(o(rc(e[2],t[2],n)),0,255),0),a=ec(o(nc(rc(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(nc(rc(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===nu.blend)l._value=y;else{const e=l.property;s=l.target,h?s[e]=y:1===d?s.setAttribute(e,y):(a=s.style,3===d?(s!==u&&(u=s,c=s[su]),c[e]=y,f=1):2===d?a[e]=y:4===d&&a.setProperty(e,y)),x&&(A=1)}}if(f&&l._renderTransforms){let e=fu;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<=uu&&a)&&(e.onComplete(e),e.completed=!C):x&&E?c===1/0?e._startTime+=e.duration:e._currentIteration>=c-1&&(e.paused=!0,a||h||(e.completed=!0,n||i&&(C||!i.began)||(e.onComplete(e),e._resolve(e)))):e.completed=!1,A},dc=(e,t,n,r,o)=>{const i=e._currentIteration;if(pc(e,t,n,r,o),e._hasChildren){const s=e,a=s.backwards,u=r?t:s._iterationTime,c=Iu();let l=0,f=!0;if(!r&&s._currentIteration!==i){const e=s.iterationDuration;uc(s,t=>{if(a){const r=t.duration,o=t._offset+t._delay;n||!(r<=uu)||o&&o+r!==e||t.onComplete(t)}else!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&pc(t,e,n,1,2),t.began=!1,t.completed=!1}),n||s.onLoop(s)}uc(s,e=>{const t=nc((u-e._offset)*e._speed,12),i=e._fps<s._fps?e.requestTick(c):o;l+=pc(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:mu},mc=Qa?requestAnimationFrame:setImmediate,gc=Qa?cancelAnimationFrame:clearImmediate;class vc extends fc{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Ru,this.paused=!(!Qa||!tu.hidden),this.reqId=null}update(){const e=this._currentTime=Iu();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?(cc(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):dc(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=mc(bc)),this}pause(){return this.paused=!0,_c()}resume(){if(this.paused)return this.paused=!1,uc(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(1===Ou.timeScale?1:lu)}set speed(e){this._speed=e*Ou.timeScale,uc(this,e=>e.speed=e._speed)}get timeUnit(){return 1===Ou.timeScale?"ms":"s"}set timeUnit(e){const t="s"===e,n=t?.001:1;if(Ou.timeScale!==n){Ou.timeScale=n,Ou.tickThreshold=200*n;const e=t?.001:lu;this.defaults.duration*=e,this._speed*=e}}get precision(){return Ou.precision}set precision(e){Ou.precision=e}}const yc=(()=>{const e=new vc(Iu());return Qa&&(Au.engine=e,tu.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(tu.hidden?e.pause():e.resume())})),e})(),bc=()=>{yc._head?(yc.reqId=mc(bc),yc.update()):yc.reqId=0},_c=()=>(gc(yc.reqId),yc.reqId=0,yc);function wc(e){const t=ku(e)?Ou.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function xc(e){if($u(e))return[];if(Nu(e)){const t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!$u(r)){const e=wc(r);if(e)for(let t=0,r=e.length;t<r;t++){const r=e[t];if(!$u(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(!Qa)return[e];const t=wc(e);return t?Array.from(t):[e]}function Ec(e){const t=xc(e),n=t.length;if(n)for(let e=0;e<n;e++){const n=t[e];if(!n[ru]){n[ru]=!0;const e=Mu(n);(n.nodeType||e)&&(n[ou]=!0,n[iu]=e,n[su]={})}}return t}const Tc=["opacity","rotate","overflow","color"],Sc=(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),Rc=(e,t)=>Du(e)?t:e,Oc=(e,t,n,r,o)=>{if(ju(e)){const i=()=>{const o=e(t,n,r);return isNaN(+o)?o||0:+o};return o&&(o.func=i),i()}return e},Ac=(e,t)=>e[ou]?e[iu]&&((e,t)=>{if(Tc.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:du.includes(t)||pu.get(t)?3:Lu(t,"--")?4:t in e.style?2:t in e?0:1:0,Lc=(e,t,n)=>{const r=e.style[t];r&&n&&(n[t]=r);const o=r||getComputedStyle(e[au]||e).getPropertyValue(t);return"auto"===o?"0":o},Ic=(e,t,n,r)=>{const o=Du(n)?Ac(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[su];let s;for(;s=Tu.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&&!Du(o)?o:Lu(t,"scale")?"1":Lu(t,"rotate")||Lu(t,"skew")?"0deg":"0px"})(e,t,r):4===o?Lc(e,t,r).trimStart():Lc(e,t,r)},Nc=(e,t,n)=>"-"===n?e-t:"+"===n?e+t:e*t,Cc=(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(" ")&&xu.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=>Bu(e)||zu(e)||Fu(e))(n))return t.t=2,t.d=zu(r=n)?(e=>{const t=vu.exec(e)||yu.exec(e),n=Du(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]})(r):Bu(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):Fu(r)?(e=>{const t=bu.exec(e)||_u.exec(e),n=+t[1]/360,r=+t[2]/100,o=+t[3]/100,i=Du(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=nc(255*Sc(t,e,n+1/3),0),a=nc(255*Sc(t,e,n),0),u=nc(255*Sc(t,e,n-1/3),0)}return[s,a,u,i]})(r):[0,0,0,1],t;{const e=n.match(wu);return t.t=3,t.d=e?e.map(Number):[],t.s=n.split(wu)||[],t}}var r;return t.n=n,t},Pc=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=sc(e._toNumbers),t.s=sc(e._strings),t),kc={t:0,n:0,u:null,o:null,d:null,s:null},jc={_rep:new WeakMap,_add:new Map},Dc=(e,t,n="_rep")=>{const r=jc[n];let o=r.get(e);return o||(o={},r.set(e,o)),o[t]?o[t]:o[t]={_head:null,_tail:null}},$c=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,Mc=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=uu,e._currentTime=uu},Bc=(e,t)=>{const n=e._composition;if(n===nu.replace){const n=e._absoluteStartTime;lc(t,e,$c,"_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){Mc(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)Mc(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<uu&&Mc(r)}let s=!0;if(uc(t,e=>{e._isOverlapped||(s=!1)}),s){const e=t.parent;if(e){let n=!0;uc(e,e=>{e!==t&&uc(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}else if(n===nu.blend){const t=Dc(e.target,e.property,"_add"),n=(e=>{let t=hc.animation;return t||(t={duration:uu,computeDeltaTime:mu,_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?sc(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}}}),pc(t,1,1,0,2)}),t})(jc._add);let r=t._head;r||(r={...e},r._composition=nu.replace,r._updateDuration=uu,r._startTime=0,r._numbers=sc(e._fromNumbers),r._number=0,r._next=null,r._prev=null,lc(t,r),lc(n,r));const o=e._toNumber;if(e._fromNumber=r._fromNumber-o,e._toNumber=0,e._numbers=sc(e._fromNumbers),e._number=0,r._fromNumber=o,e._toNumbers){const t=sc(e._toNumbers);t&&t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}lc(t,e,null,"_prevAdd","_nextAdd")}return e},zc=e=>{const t=e._composition;if(t!==nu.none){const n=e.target,r=e.property,o=jc._rep.get(n)[r];if(cc(o,e,"_prevRep","_nextRep"),t===nu.blend){const t=jc._add,o=t.get(n);if(!o)return;const i=o[r],s=hc.animation;cc(i,e,"_prevAdd","_nextAdd");const a=i._head;if(a&&a===i._tail){cc(i,a,"_prevAdd","_nextAdd"),cc(s,a);let e=!0;for(let t in o)if(o[t]._head){e=!1;break}e&&t.delete(n)}}}return e},Fc=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Uc=e=>e._cancelled?(e._hasChildren?uc(e,Uc):uc(e,e=>{e._composition!==nu.none&&Bc(e,Dc(e.target,e.property))}),e._cancelled=0,e):e;let Wc=0;class Hc extends fc{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:d,onLoop:h,onPause:m,onBegin:g,onBeforeUpdate:v,onUpdate:y}=e;Ou.scope&&Ou.scope.revertibles.push(this);const b=t?0:yc._elapsedTime,_=t?t.defaults:Ou.defaults,w=ju(o)||Du(o)?_.delay:+o,x=ju(i)||Du(i)?1/0:+i,E=Rc(u,_.loop),T=Rc(c,_.loopDelay),S=!0===E||E===1/0||E<0?1/0:E+1;let R=0;if(t)R=n;else{let e=Iu();yc.paused&&(yc.requestTick(e),e=yc._elapsedTime),R=e-yc._startTime}this.id=Du(r)?++Wc:r,this.parent=t,this.duration=oc((x+T)*S-T)||uu,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=h||_.onLoop,this.onPause=m||_.onPause,this.onComplete=d||_.onComplete,this.iterationDuration=x,this.iterationCount=S,this._autoplay=!t&&Rc(l,_.autoplay),this._offset=R,this._delay=w,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=mu,this._running=!1,this._reversed=+Rc(s,_.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Rc(a,_.alternate),this._prev=null,this._next=null,this._elapsedTime=b,this._startTime=b,this._lastTime=b,this._fps=Rc(f,_.frameRate),this._speed=Rc(p,_.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return ec(nc(this._currentTime,Ou.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return nc(this._iterationTime,Ou.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return ec(nc(this._currentTime/this.duration,5),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return ec(nc(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*ec(+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 Uc(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,dc(this,0,1,e,2),Fc(this),this._hasChildren&&uc(this,Fc),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&dc(this,this.duration,1,e,2),this.reset(e);const t=this._autoplay;return!0===t?this.resume():t&&!Du(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*yc._speed);return this._startTime=Iu()-(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<=uu&&!this._hasChildren?dc(this,uu,0,0,2):(this._running||(lc(yc,this),yc._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,yc.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){Uc(this),this.completed=!1;const r=this.paused;return this.paused=!0,dc(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?Zu(cu/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?uc(this,e=>e.cancel(),!0):uc(this,zc),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=ic(e);if(t===n)return this;const r=e/t,o=e<=uu;return this.duration=o?uu:n,this.iterationDuration=o?uu:ic(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){dc(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=mu){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=mu};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}}const qc=e=>e,Yc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Gc=(e=.5,t=0,n=.5,r=1)=>e===t&&n===r?qc:o=>0===o||1===o?o:Yc(((e,t,n)=>{let r,o,i=0,s=1,a=0;do{o=i+(s-i)/2,r=Yc(o,t,n)-e,r>0?s=o:i=o}while(Vu(r)>1e-7&&++a<100);return o})(o,e,n),t,r),Vc=(e=10,t)=>{const n=t?Xu:Zu;return t=>n(ec(t,0,1)*e)*(1/e)},Xc=(...e)=>{const t=e.length;if(!t)return qc;const n=t-1,r=e[0],o=e[n],i=[0],s=[Wu(r)];for(let t=1;t<n;t++){const r=e[t],o=ku(r)?r.trim().split(" "):[r],a=o[0],u=o[1];i.push(Du(u)?t/n:Wu(u)/100),s.push(Wu(a))}return s.push(Wu(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]}},Zc=(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(ec(s,o,1))}return n.push(1),Xc(...n)},Kc=Ju/2,Jc=2*Ju,Qc=(e=1.68)=>t=>Hu(t,+e),el={[fu]:Qc,Quad:Qc(2),Cubic:Qc(3),Quart:Qc(4),Quint:Qc(5),Sine:e=>1-Gu(e*Kc),Circ:e=>1-qu(1-e*e),Expo:e=>e?Hu(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Hu(2,--n))-1)/11;);return 1/Hu(4,3-n)-7.5625*Hu((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=ec(+e,1,10),r=ec(+t,uu,2),o=r/Jc*Ku(1/n),i=Jc/r;return e=>0===e||1===e?e:-n*Hu(2,-10*(1-e))*Yu((1-e-o)*i)}},tl={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},nl=(()=>{const e={linear:Xc,irregular:Zc,steps:Vc,cubicBezier:Gc};for(let t in tl)for(let n in el){const r=el[n],o=tl[t];e[t+n]=n===fu||"Back"===n||"Elastic"===n?(e,t)=>o(r(e,t)):o(r)}return e})(),rl={linear:qc},ol=e=>ju(e)?e:ku(e)?((e,t,n)=>{if(n[e])return n[e];if(e.indexOf("(")<=-1){const r=tl[e]||e.includes("Back")||e.includes("Elastic")?t[e]():t[e];return r?n[e]=r:qc}{const r=e.slice(0,-1).split("("),o=t[r[0]];return o?n[e]=o(...r[1].split(",")):qc}})(e,nl,rl):qc,il={},sl=(e,t,n)=>{if(3===n){return pu.get(e)||e}if(2===n||1===n&&Mu(t)&&e in t.style){const t=il[e];if(t)return t;{const t=e?e.replace(Eu,"$1-$2").toLowerCase():e;return il[e]=t,t}}return e},al={deg:1,rad:180/Ju,turn:360},ul={},cl=(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=ul[s];if(Du(a)||r){let r;if(o in al)r=i*al[o]/al[n];else{const t=100,s=e.cloneNode(),a=e.parentNode,u=a&&a!==tu?a:tu.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,ul[s]=r}else t.n=a;return t.t,t.u=n,t},ll=e=>{if(e._hasChildren)uc(e,ll,!0);else{const t=e;t.pause(),uc(t,e=>{const n=e.property,r=e.target;if(r[ou]){const o=r.style,i=t._inlineStyles[n];if(3===e._tweenType){const t=r[su];if(Du(i)||i===fu?delete t[n]:t[n]=i,e._renderTransforms)if(Object.keys(t).length){let e=fu;for(let n in t)e+=hu[n]+t[n]+") ";o.transform=e}else o.removeProperty("transform")}else Du(i)||i===fu?o.removeProperty(n):o[n]=i;t._tail===e&&t.targets.forEach(e=>{e.getAttribute&&e.getAttribute("style")===fu&&e.removeAttribute("style")})}})}return e},fl={t:0,n:0,u:null,o:null,d:null,s:null},pl={t:0,n:0,u:null,o:null,d:null,s:null},dl={func:null},hl=[null],ml=[null,null],gl={to:null};let vl,yl,bl=0;class _l extends Hc{constructor(e,t,n,r,o=!1,i=0,s=0){super(t,n,r);const a=Ec(e),u=a.length,c=t.keyframes,l=c?ac(((e,t)=>{const n={};if(Nu(e)){const t=[].concat(...e.map(e=>Object.keys(e))).filter(Uu);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];Uu(n)?n===o&&(t.to=r):t[n]=r}return t});n[o]=i}}else{const r=Rc(t.duration,Ou.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(Uu(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:d,playbackEase:h,modifier:m,composition:g,onRender:v}=l,y=n?n.defaults:Ou.defaults,b=Rc(h,y.playbackEase),_=b?ol(b):null,w=!Du(d)&&!Du(d.ease),x=w?d.ease:Rc(d,_?"linear":y.ease),E=w?d.duration:Rc(p,y.duration),T=Rc(f,y.delay),S=m||y.modifier,R=Du(g)&&u>=lu?nu.none:Du(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(Uu(e)){const i=Ac(t,e),s=sl(e,t,i);let a=l[e];const u=Nu(a);if(o&&!u&&(ml[0]=a,ml[1]=a,a=ml),u){const e=a.length,t=!Cu(a[0]);2===e&&t?(gl.to=a,hl[0]=gl,vl=hl):e>2&&t?(vl=[],a.forEach((e,t)=>{t?1===t?(ml[1]=e,vl.push(ml)):vl.push(e):ml[0]=e})):vl=a}else hl[0]=a,vl=hl;let d=null,h=null,m=NaN,g=0,v=0;for(let e=vl.length;v<e;v++){const o=vl[v];Cu(o)?yl=o:(gl.to=o,yl=gl),dl.func=null;const a=Oc(yl.to,t,r,c,dl);let u;Cu(a)&&!Du(a.to)?(yl=a,u=a.to):u=a;const l=Oc(yl.from,t,r,c),f=yl.ease,p=!Du(f)&&!Du(f.ease),y=p?f.ease:f||x,b=p?f.duration:Oc(Rc(yl.duration,e>1?Oc(E,t,r,c)/e:E),t,r,c),_=Oc(Rc(yl.delay,v?0:T),t,r,c),w=Oc(Rc(yl.composition,R),t,r,c),L=Pu(w)?w:nu[w],I=yl.modifier||S,P=!Du(l),k=!Du(u),j=Nu(u),D=j||P&&k,$=h?g+_:_,M=A+$;C||!P&&!j||(C=1);let B=h;if(L!==nu.none){d||(d=Dc(t,s));let e=d._head;for(;e&&!e._isOverridden&&e._absoluteStartTime<=M;)if(B=e,e=e._nextRep,e&&e._absoluteStartTime>=M)for(;e;)Mc(e),e=e._nextRep}if(D?(Cc(j?Oc(u[0],t,r,c):l,fl),Cc(j?Oc(u[1],t,r,c,dl):u,pl),0===fl.t&&(B?1===B._valueType&&(fl.t=1,fl.u=B._unit):(Cc(Ic(t,s,i,O),kc),1===kc.t&&(fl.t=1,fl.u=kc.u)))):(k?Cc(u,pl):h?Pc(h,pl):Cc(n&&B&&B.parent.parent===n?B._value:Ic(t,s,i,O),pl),P?Cc(l,fl):h?Pc(h,fl):Cc(n&&B&&B.parent.parent===n?B._value:Ic(t,s,i,O),fl)),fl.o&&(fl.n=Nc(B?B._toNumber:Cc(Ic(t,s,i,O),kc).n,fl.n,fl.o)),pl.o&&(pl.n=Nc(fl.n,pl.n,pl.o)),fl.t!==pl.t)if(3===fl.t||3===pl.t){const e=3===fl.t?fl:pl,t=3===fl.t?pl:fl;t.t=3,t.s=sc(e.s),t.d=e.d.map(()=>t.n)}else if(1===fl.t||1===pl.t){const e=1===fl.t?fl:pl,t=1===fl.t?pl:fl;t.t=1,t.u=e.u}else if(2===fl.t||2===pl.t){const e=2===fl.t?fl:pl,t=2===fl.t?pl:fl;t.t=2,t.s=e.s,t.d=[0,0,0,1]}if(fl.u!==pl.u){let e=pl.u?fl:pl;e=cl(t,e,pl.u?pl.u:fl.u,!1)}if(pl.d&&fl.d&&pl.d.length!==fl.d.length){const e=fl.d.length>pl.d.length?fl:pl,t=e===fl?pl:fl;t.d=e.d.map((e,n)=>Du(t.d[n])?0:t.d[n]),t.s=sc(e.s)}const z=nc(+b||uu,12),F={parent:this,id:bl++,property:s,target:t,_value:null,_func:dl.func,_ease:ol(y),_fromNumbers:sc(fl.d),_toNumbers:sc(pl.d),_strings:sc(pl.s),_fromNumber:fl.n,_toNumber:pl.n,_numbers:sc(fl.d),_number:fl.n,_unit:pl.u,_modifier:I,_currentTime:0,_startTime:$,_delay:+_,_updateDuration:z,_changeDuration:z,_absoluteStartTime:M,_tweenType:i,_valueType:pl.t,_composition:L,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};L!==nu.none&&Bc(F,d),isNaN(m)&&(m=F._startTime),g=nc($+z,12),h=F,N++,lc(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;uc(this,t=>{e>=f&&e<p&&(t._renderTransforms=1,t._composition===nu.blend&&uc(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?(uc(this,e=>{e._startTime-e._delay||(e._delay-=I),e._startTime-=I}),L-=I):I=0,L||(L=uu,this.iterationCount=0),this.targets=a,this.duration=L===uu?uu:oc((L+this._loopDelay)*this.iterationCount-this._loopDelay)||uu,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===ic(e))return this;const n=e/t;return uc(this,e=>{e._updateDuration=ic(e._updateDuration*n),e._changeDuration=ic(e._changeDuration*n),e._currentTime*=n,e._startTime*=n,e._absoluteStartTime*=n}),super.stretch(e)}refresh(){return uc(this,e=>{const t=Ic(e.target,e.property,e._tweenType);Cc(t,kc),e._fromNumbers=sc(kc.d),e._fromNumber=kc.n,e._func&&(Cc(e._func(),pl),e._toNumbers=sc(pl.d),e._strings=sc(pl.s),e._toNumber=pl.n)}),this}revert(){return super.revert(),ll(this)}then(e){return super.then(e)}}du.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t))),Qa&&(Du(CSS)||Object.hasOwnProperty.call(CSS,"registerProperty"));const wl={_head:null,_tail:null},xl=(e,t,n)=>{let r=wl._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(),cc(wl,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}},El=(e=mu)=>new Hc({duration:1*Ou.timeScale,onComplete:e},null,0).resume();function Tl(e,t,n){const r=Ec(e);if(!r.length)return;const[o]=r,i=Ac(o,t),s=sl(t,o,i);let a=Ic(o,s);if(Du(n))return a;if(Cc(a,kc),0===kc.t||1===kc.t){if(!1===n)return kc.n;{const e=cl(o,kc,n,!1);return`${nc(e.n,Ou.precision)}${e.u}`}}}const Sl=(e,t)=>{if(!Du(t))return t.duration=uu,t.composition=Rc(t.composition,nu.none),new _l(e,t,null,0,!0).resume()},Rl=(e,t,n)=>{let r=!1;return uc(t,o=>{const i=o.target;if(e.includes(i)){const e=o.property,s=o._tweenType,a=sl(n,i,s);(!a||a&&a===e)&&(o.parent._tail===o&&3===o._tweenType&&o._prev&&3===o._prev._tweenType&&(o._prev._renderTransforms=1),cc(t,o),zc(o),r=!0)}},!0),r},Ol=(e,t,n)=>{const r=xc(e),o=t||yc,i=t&&t.controlAnimation&&t;for(let e=0,t=r.length;e<t;e++){const t=r[e];xl(t,n,i)}let s;if(o._hasChildren){let t=0;uc(o,i=>{if(!i._hasChildren)if(s=Rl(r,i,n),s&&!i._head)i.cancel(),cc(o,i);else{const e=i._offset+i._delay+i.duration;e>t&&(t=e)}i._head?Ol(e,i,n):i._hasChildren=!1},!0),Du(o.iterationDuration)||(o.iterationDuration=t)}else s=Rl(r,o,n);return s&&!o._head&&(o._hasChildren=!1,o.cancel&&o.cancel()),r},Al=(e,t,n)=>{const r=10**(n||0);return Zu((Math.random()*(t-e+1/r)+e)*r)/r},Ll=(e,t,n,r)=>{let o=lu/Ou.defaults.frameRate;if(!1!==r){const e=r||yc._hasChildren&&yc;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},Il=e=>(...t)=>{const n=e(...t);return new Proxy(mu,{apply:(e,t,[r])=>n(r),get:(e,t)=>Il((...e)=>{const r=Cl[t](...e);return e=>r(n(e))})})},Nl=(e,t=0)=>(...n)=>(n.length<e.length?Il(((e,t=0)=>(...n)=>t?t=>e(...n,t):t=>e(t,...n))(e,t)):e)(...n),Cl={$:Ec,get:Tl,set:Sl,remove:Ol,cleanInlineStyles:ll,random:Al,randomPick:e=>e[Al(0,e.length-1)],shuffle:e=>{let t,n,r=e.length;for(;r;)n=Al(0,--r),t=e[r],e[r]=e[n],e[n]=t;return e},lerp:Ll,sync:El,clamp:Nl(ec),round:Nl(nc),snap:Nl((e,t)=>Nu(t)?t.reduce((t,n)=>Vu(n-e)<Vu(t-e)?n:t):t?Qu(e/t)*t:e),wrap:Nl((e,t,n)=>((e-t)%(n-t)+(n-t))%(n-t)+t),interpolate:Nl(rc,1),mapRange:Nl((e,t,n,r,o)=>r+(e-t)/(n-t)*(o-r)),roundPad:Nl((e,t)=>(+e).toFixed(t)),padStart:Nl((e,t,n)=>`${e}`.padStart(t,n)),padEnd:Nl((e,t,n)=>`${e}`.padEnd(t,n)),degToRad:Nl(e=>e*Ju/180),radToDeg:Nl(e=>180*e/Ju)},Pl=(e,t)=>{let n=e.iterationDuration;if(n===uu&&(n=0),Du(t))return n;if(Pu(+t))return+t;const r=t,o=e?e.labels:null,i=!$u(o),s=((e,t)=>{if(Lu(t,"<")){const n="<"===t[1],r=e._tail,o=r?r._offset+r._delay:0;return n?o:o+r.duration}})(e,r),a=!Du(s),u=Su.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 Nc(l,f,e[0])}return a?s:i?Du(o[r])?n:o[r]:n};function kl(e,t,n,r,o,i){const s=Pu(e.duration)&&e.duration<=uu?n-uu:n;dc(t,s,1,1,1);const a=r?new _l(r,e,t,s,!1,o,i):new Hc(e,t,s);return a.init(1),lc(t,a),uc(t,e=>{const n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=function(e){return oc((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||uu}(t),t}class jl extends Hc{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=Ou.defaults;this.defaults=t?ac(t,n):n,this.onRender=e.onRender||n.onRender;const r=Rc(e.playbackEase,n.playbackEase);this._ease=r?ol(r):null,this.iterationDuration=0}add(e,t,n){const r=Cu(t),o=Cu(e);if(r||o){if(this._hasChildren=!0,r){const r=t;if(ju(n)){const t=n,o=xc(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,Du(a)||(n.id=a+"-"+u),kl(n,this,t(e,u,c,this),e,u,c),u++})}else kl(r,this,Pl(this,n),e)}else kl(e,this,Pl(this,t));return this.init(1)}}sync(e,t){if(Du(e)||e&&Du(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 Du(t)?this:(t.duration=uu,t.composition=nu.replace,this.add(e,t,n))}call(e,t){return Du(e)||e&&!ju(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return Du(e)||e&&!ku(e)||(this.labels[e]=Pl(this,t)),this}remove(e,t){return Ol(e,this,t),this}stretch(e){const t=this.duration;if(t===ic(e))return this;const n=e/t,r=this.labels;uc(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return uc(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),uc(this,e=>e.revert,!0),ll(this)}then(e){return super.then(e)}}const Dl=(e,t)=>e&&ju(e)?e(t):e,$l=new Map;class Ml{constructor(e){this.element=e,this.useWin=this.element===tu.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 Hc({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const e=this.backwardX||this.backwardY;uc(this,e=>e.handleScroll(),e)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Hc({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=nc(t>0?Math.sqrt(s*s+a*a)/t:0,5)}}).init(),this.resizeTicker=new Hc({autoplay:!1,duration:250*Ou.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Hc({autoplay:!1,duration:500*Ou.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?eu:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=nc(e?eu.scrollX:t.scrollLeft,0),this.scrollY=nc(e?eu.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=eu.innerWidth,this.winHeight=(()=>{const e=document.createElement("div");tu.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return tu.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(){uc(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),uc(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?eu:this.element).removeEventListener("scroll",this),$l.delete(this.element)}}const Bl=(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}=Cc(a,kc);let l=u;return"%"===c?l=u/100*n:c&&(l=cl(e,kc,"px",!0).n),s&&r<0&&(l+=r),i&&o>0&&(l+=o),l},zl=(e,t,n,r,o)=>{let i;if(ku(t)){const s=Su.exec(t);if(s){const a=s[0],u=a[0],c=t.split(a),l="min"===c[0],f="max"===c[0],p=Bl(e,c[0],n,r,o),d=Bl(e,c[1],n,r,o);if(l){const t=Nc(Bl(e,"min",n),d,u);i=t<p?p:t}else if(f){const t=Nc(Bl(e,"max",n),d,u);i=t>p?p:t}else i=Nc(p,d,u)}else i=Bl(e,t,n,r,o)}else i=t;return nc(i,0)},Fl=e=>{let t;const n=e.targets;for(let e=0,r=n.length;e<r;e++){const r=n[e];if(r[ou]){t=r;break}}return t};let Ul=0;const Wl=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Hl{constructor(e={}){Ou.scope&&Ou.scope.revertibles.push(this);const t=Rc(e.sync,"play pause"),n=t?ol(t):null,r=t&&("linear"===t||t===qc),o=t&&!(n===qc&&!r),i=t&&(Pu(t)||!0===t||r),s=t&&ku(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=Ul++,this.id=Du(e.id)?this.index:e.id,this.container=(e=>{const t=e&&xc(e)[0]||tu.body;let n=$l.get(t);return n||(n=new Ml(t),$l.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]:mu,this.onSyncLeave=a&&!u&&a[1]?a[1]:mu,this.onSyncEnterForward=a&&u&&a[0]?a[0]:mu,this.onSyncLeaveForward=a&&u&&a[1]?a[1]:mu,this.onSyncEnterBackward=a&&u&&a[2]?a[2]:mu,this.onSyncLeaveBackward=a&&u&&a[3]?a[3]:mu,this.onEnter=e.onEnter||mu,this.onLeave=e.onLeave||mu,this.onEnterForward=e.onEnterForward||mu,this.onLeaveForward=e.onLeaveForward||mu,this.onEnterBackward=e.onEnterBackward||mu,this.onLeaveBackward=e.onLeaveBackward||mu,this.onUpdate=e.onUpdate||mu,this.onSyncComplete=e.onSyncComplete||mu,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=Rc(e.debug,!1),this._next=null,this._prev=null,lc(this.container,this),El(()=>{if(!this.reverted){if(!this.target){const t=xc(e.target)[0];this.target=t||tu.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;Du(e.targets)?uc(e,e=>{e.targets&&!t&&(t=Fl(e))}):t=Fl(e),this.target=t||tu.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:nc(ec(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=Rc(Dl(e.repeat,this),!0),this.horizontal="x"===Rc(Dl(e.axis,this),"y"),this.enter=Rc(Dl(e.enter,this),"end start"),this.leave=Rc(Dl(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=tu.createElement("div"),o=tu.createElement("div"),i=tu.createElement("div"),s=Wl[this.index%Wl.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,d=t?0:10,h=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",d,h,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,d=n%2,h=a<y,m=a>(r?t?u:c:t?l:f)-y,b=(r?d&&!h:!d&&!h)||m,_=tu.createElement("div"),w=tu.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[d]}${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: ${d?s:"rgba(0,0,0,.75)"};\n background-color: ${d?"rgba(0,0,0,.65)":s};\n border: 2px solid ${d?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"===Tl(e.element,"position")&&(this.debugStyles=Sl(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"===Tl(n.element,"position")&&Sl(n.element,{position:"relative "});for(;s&&s!==n.element&&s!==tu.body;){const t="sticky"===Tl(s,"position")&&Sl(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,d=r?n.width:n.height,h=(r?n.scrollWidth:n.scrollHeight)-d,m=this.enter,g=this.leave;let v="start",y="end",b="end",_="start";if(ku(m)){const e=m.split(" ");b=e[0],v=e.length>1?e[1]:v}else if(Cu(m)){const e=m;Du(e.container)||(b=e.container),Du(e.target)||(v=e.target)}else Pu(m)&&(b=m);if(ku(g)){const e=g.split(" ");_=e[0],y=e.length>1?e[1]:y}else if(Cu(g)){const e=g;Du(e.container)||(_=e.container),Du(e.target)||(y=e.target)}else Pu(g)&&(_=g);const w=zl(t,v,p),x=zl(t,y,p),E=w+f-d,T=x+f-h,S=zl(t,b,d,E,T),R=zl(t,_,d,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,d=this._debug&&this.$debug;let h=!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&&Pu(r)){if(r<1){const e=t<g&&1===g?1e-4:t>g&&!g?-1e-4:0;g=nc(Ll(t,g,rc(.01,.2,r),!1)+e,6)}}else n&&(g=n(g));h=g!==this.prevProgress,m=1===t,h&&!m&&r&&t&&s.wakeTicker.restart()}if(d){const e=i?s.scrollY:s.scrollX;d.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):(d&&l&&(d.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)&&(h=!0),h&&(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 cc(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const ql=(e={})=>new Hl(e);var Yl,Gl,Vl,Xl,Zl,Kl,Jl;!function(e){e[e.XY=1]="XY",e[e.SIZE=2]="SIZE"}(Yl||(Yl={})),function(e){e[e.ALL=1]="ALL",e[e.SEPARATE=2]="SEPARATE"}(Gl||(Gl={})),function(e){e[e.X=1]="X",e[e.Y=2]="Y"}(Vl||(Vl={})),function(e){e[e.AUTOPLAY=1]="AUTOPLAY",e[e.SCROLL_SYNC=2]="SCROLL_SYNC",e[e.STATES=3]="STATES",e[e.NONE=4]="NONE"}(Xl||(Xl={})),function(e){e[e.FIXED=1]="FIXED",e[e.RELATIVE=2]="RELATIVE"}(Zl||(Zl={})),function(e){e[e.APPEAR=1]="APPEAR",e[e.MOUNT=2]="MOUNT"}(Kl||(Kl={})),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"}(Jl||(Jl={}));const Ql={[Jl.PLAY]:"play",[Jl.PAUSE]:"pause",[Jl.REVERSE]:"reverse",[Jl.IGNORE]:"ignore",[Jl.DESTROY]:"destroy",[Jl.INIT]:"init",[Jl.RE_PLAY]:"re_play"};var ef;!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"}(ef||(ef={}));const tf={[ef.FIXED]:"",[ef.PERCENTAGE]:"%",[ef.START]:"top",[ef.START_PLUS]:"+=top",[ef.END]:"bottom",[ef.END_PLUS]:"+=bottom"},nf={[ef.FIXED]:"",[ef.PERCENTAGE]:"%",[ef.START]:"top",[ef.START_PLUS]:"+=left",[ef.END]:"right",[ef.END_PLUS]:"+=right"},rf=(e,t,n)=>{const r=e===Vl.Y?tf:nf;return t===ef.START||t===ef.END?`${r[t]}`:`${null!=n?n:""}${r[t]}`};var of,sf;!function(e){e[e.SMOOTH=0]="SMOOTH",e[e.INSTANT=1]="INSTANT"}(of||(of={})),function(e){e[e.NORMAL=1]="NORMAL",e[e.REVERSE=2]="REVERSE",e[e.ALTERNATE=3]="ALTERNATE"}(sf||(sf={}));const af={[sf.NORMAL]:"normal",[sf.REVERSE]:"reverse",[sf.ALTERNATE]:"alternate"},uf=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()]:[]},cf=(e,t={},n)=>{const r=Object.entries(t).reduce((e,[t,n])=>(e[t]=Ql[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,d;const h=r.name;let m=o[h];if(!m){const v=af[r.direction||sf.NORMAL];a[h]={direction:v};let y=!1;const b=r.config;if(b.type_===Xl.SCROLL_SYNC){const e=b.smoothness.type===of.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=rf(b.direction,b.container.enter.type,b.container.enter.value),i=rf(b.direction,b.container.leave.type,b.container.leave.value),s=rf(b.direction,b.target.enter.type,b.target.enter.value),a=rf(b.direction,b.target.leave.type,b.target.leave.value);y=ql({axis:b.direction===Vl.Y?"y":"x",container:t,target:r,sync:e,enter:`${o} ${s}`,leave:`${i} ${a}`})}else if(b.type_===Xl.AUTOPLAY&&b.on.type_===Kl.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=rf(b.on.direction,b.on.container.enter.type,b.on.container.enter.value),o=rf(b.on.direction,b.on.container.leave.type,b.on.container.leave.value),i=rf(b.on.direction,b.on.target.enter.type,b.on.target.enter.value),s=rf(b.on.direction,b.on.target.leave.type,b.on.target.leave.value);y=ql({axis:b.on.direction===Vl.Y?"y":"x",container:e,target:t,sync:!0,enter:`${r} ${i}`,leave:`${o} ${s}`})}else b.type_===Xl.AUTOPLAY&&b.on.type_===Kl.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 jl(g).init());null===(d=Object.values(e).find(e=>e.node===r))||void 0===d||d.data.forEach(e=>{ff={},w.add(e.targets,e.params,0),ff={}}),m={node:r,instance:w,elements:s},o[h]=m,m.instance.seek(Number(m.instance.defaults.duration)),m.instance.seek(0),_=!0,m.instance.onComplete=()=>{a[h].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?uf(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,(0,F.useLayoutEffect)(()=>{s.clean(),Object.entries(t).forEach(([t,n])=>{const r=e[t];if(!r)return;if(n===Jl.IGNORE)return;if(n===Jl.DESTROY)return void s.destroy(r.node);const o=uf(r.data);o.length?(s.get(r.node,o),n===Jl.PLAY?r&&s.play(r.node):n===Jl.PAUSE?r&&s.pause(r.node):n===Jl.RE_PLAY?r&&s.play(r.node,!0):n===Jl.REVERSE&&r&&s.reverse(r.node)):s.destroy(r.node)})}),{timelines:s}},lf=({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 ff={};const pf=(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=ff[`${r}-${i}`];let d=f;return p&&(d=-p+f),ff[`${r}-${i}`]=void 0===p?f:p+d,d};let df=0;const hf=()=>(0,F.useMemo)(()=>"C"+ ++df,[]),mf=e=>{const t=(0,F.useMemo)(()=>({current:!1,timeout:void 0}),[]);(0,F.useEffect)(()=>{t.current||e.option.runOnInit?e.option.debounce?(t.timeout&&clearTimeout(t.timeout),t.timeout=setTimeout(()=>{t.timeout=void 0,e.on()},e.option.delay)):e.on():t.current=!0},e.values)},gf=(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},vf=(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},yf=(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},bf=(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},_f=e=>"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?e.toString():void 0,wf=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 xf,Ef;!function(e){e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e[e.BOTTOM=4]="BOTTOM"}(xf||(xf={})),function(e){e[e.PLUS=1]="PLUS",e[e.MINUS=2]="MINUS"}(Ef||(Ef={}));const Tf=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===xf.TOP?o=Number(t.scrollTop+(s.top-i.top)):e.config===xf.BOTTOM?o=Number(t.scrollTop+(s.bottom-i.top)):e.config===xf.LEFT?o=Number(t.scrollLeft+(s.left-i.left)):e.config===xf.RIGHT&&(o=Number(t.scrollLeft+(s.right-i.left))),e.operator===Ef.PLUS?o+=n:e.operator===Ef.MINUS&&(o-=n)}else e.config===xf.TOP?o=0:e.config===xf.BOTTOM?o=-t.scrollHeight:e.config===xf.LEFT?o=0:e.config===xf.RIGHT&&(o=-t.scrollWidth),e.operator===Ef.PLUS?o+=n:e.operator===Ef.MINUS&&(o-=n);e.config===xf.TOP||e.config===xf.BOTTOM?t.scrollTo({behavior:"instant",top:o}):t.scrollTo({behavior:"instant",left:o})}},Sf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Rf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Of=e=>({element:e.currentTarget}),Af=e=>({element:e.currentTarget}),Lf=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 ds(e){return"composedPath"in e?e.composedPath()[0]:e.target}const hs=Math.min,ms=Math.max,gs=Math.round,vs=(Math.floor,e=>({x:e,y:e}));function ys(e,t,n){return ms(e,hs(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 d;switch(u){case"top":d={x:l,y:r.y-o.height};break;case"bottom":d={x:l,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(ws(t)){case"start":d[s]-=p*(n&&c?-1:1);break;case"end":d[s]+=p*(n&&c?-1:1)}return d}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=hs(r.right,e.right),e.bottom=hs(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:d,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(d="end"===a?-1*h:h),u?{x:d*l,y:p*c}:{x:p*c,y:d*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:d=0}=bs(t,e),h=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}}(d),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+h.top)/b.y,bottom:(_.bottom-g.bottom+h.bottom)/b.y,left:(g.left-_.left+h.left)/b.x,right:(_.right-g.right+h.right)/b.x}}(t,u),f=Ts(_s(o)),p=xs(f);let d=c[p],h=c[f];if(i){const e="y"===p?"bottom":"right";d=ys(d+l["y"===p?"top":"left"],d,d-l[e])}if(s){const e="y"===f?"bottom":"right";h=ys(h+l["y"===f?"top":"left"],h,h-l[e])}const m=a.fn({...t,[p]:d,[f]:h});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,d={},h=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:d,rects:c,platform:s,elements:{reference:e,floating:t}});l=null!=g?g:l,f=null!=v?v:f,d={...d,[i]:{...d[i],...y}},b&&h<=50&&(h++,"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:d}})(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 da(e){const t=(0,F.useRef)(e);return ra(()=>{t.current=e}),t}const ha=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:d,capture:h}=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(d),{escapeKey:x,outsidePress:E}=xa(h),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=ds(e))||t.removeEventListener("keydown",n)};null==(t=ds(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=ds(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,d=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)||d)return;const h=m?ga(m.nodesRef.current,p):[];if(h.length>0){let e=!0;if(h.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=ds(e))||t.removeEventListener(c,n)};null==(t=ds(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 d=[];return p&&(Fi(o.domReference)&&(d=as(o.domReference)),Fi(o.floating)&&(d=d.concat(as(o.floating))),!Fi(o.reference)&&o.reference&&o.reference.contextElement&&(d=d.concat(as(o.reference.contextElement)))),d=d.filter(e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)}),d.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),d.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,d]=F.useState(r);Vs(p,r)||d(r);const[h,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||h,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}}}),d=F.useCallback(e=>{const t=Fi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;u(t),p.refs.setReference(t)},[p.refs]),h=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:h,setPositionReference:d,domReference:l}),[p.refs,h,d]),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:d,tree:h}=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=ds(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(h&&ga(h.nodesRef.current,d).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,d=fa(),h=la(),m=da(c),g=da(u),v=da(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(ha),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:d,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:d,x:e.clientX,y:e.clientY,onClose(){L(),A(),O(e)}})(e))}},[s,a,e,l,f,p,O,A,L,r,n,v,d,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(ha,"");const r=s.domReference,o=null==d||null==(t=d.nodesRef.current.find(e=>e.id===h))||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,h,s,d,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:d,onPointerEnter:h}=l(),m=r.current;return(0,F.useLayoutEffect)(()=>(null==m||m.addEventListener("mousemove",p),null==m||m.addEventListener("pointerdown",d),null==m||m.addEventListener("pointerenter",h),()=>{null==m||m.removeEventListener("mousemove",p),null==m||m.removeEventListener("pointerdown",d),null==m||m.removeEventListener("pointerenter",h)}),[m,p,d,h]),(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),d=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:d}:{},[s,d])}(u),l=Ea(u),{getReferenceProps:f,getFloatingProps:p}=Aa([c,l]),{onPointerDown:d,onMouseDown:h,onClick:m,onKeyDown:g,onKeyUp:v}=f(),y=r.current;return(0,F.useLayoutEffect)(()=>(null==y||y.addEventListener("pointerdown",d),null==y||y.addEventListener("click",m),null==y||y.addEventListener("mousedown",h),null==y||y.addEventListener("keydown",g),null==y||y.addEventListener("keyup",v),()=>{null==y||y.removeEventListener("pointerdown",d),null==y||y.removeEventListener("click",m),null==y||y.removeEventListener("mousedown",h),null==y||y.removeEventListener("keydown",g),null==y||y.removeEventListener("keyup",v)}),[y,d,h,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=(0,F.memo)(e=>{const[t,n]=(0,F.useState)(e.isVisible?e.enter<0?"view":"enter":void 0),r=(0,F.useMemo)(()=>({next:void 0,time:void 0}),[]);return(0,F.useEffect)(()=>{e.isVisible?void 0===t&&"view"!==r.next?(r.time&&clearTimeout(r.time),r.next="view",n("enter"),r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,n("view")},e.enter)):"enter"!==t&&"exit"!==t||"view"===r.next||(r.time&&clearTimeout(r.time),r.next="view",r.time=setTimeout(()=>{r.next=void 0,r.time=void 0,n("view")},e.enter)):"view"!==t&&"enter"!==t||"exit"===r.next||(r.time&&clearTimeout(r.time),r.next="exit",n("exit"),r.time=setTimeout(()=>{r.time=void 0,r.next=void 0,n(void 0)},e.exit))},[e.isVisible,t]),(0,X.jsx)(X.Fragment,{children:t&&e.children(t)})}),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()})}}const Xa=e=>{var t;const[n,r]=F.useState(),o=F.useRef(null),i=F.useMemo(()=>new Va,[]);return i.update=e=>{r(`w${e}px`)},F.useLayoutEffect(()=>{o.current&&(i.render({nodeId:"div",ref:o.current},e.sizes),i.finish())}),(0,X.jsx)("div",Object.assign({},e.divProps,{style:Object.assign({},e.style),ref:t=>{var n,r;o.current=t,null===(r=null===(n=e.divProps)||void 0===n?void 0:n.ref)||void 0===r||r.call(n,t)},className:e.className,children:null===(t=e.children)||void 0===t?void 0:t.call(e,n)}))};class Za{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 Ka=(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}},Ja=e=>{const[t,n]=(0,F.useState)({}),r=(0,F.useMemo)(()=>K().cloneDeep(e),[]);return{state:r,getState:()=>r,setState:e=>(n({}),!0)}},Qa="undefined"!=typeof window,eu=Qa?window:null,tu=Qa?document:null,nu={replace:0,none:1,blend:2},ru=Symbol(),ou=Symbol(),iu=Symbol(),su=Symbol(),au=(Symbol(),Symbol()),uu=1e-11,cu=1e12,lu=1e3,fu="",pu=new Map;pu.set("x","translateX"),pu.set("y","translateY"),pu.set("z","translateZ");const du=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],hu=du.reduce((e,t)=>({...e,[t]:t+"("}),{}),mu=()=>{},gu=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,vu=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,yu=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,bu=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,_u=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,wu=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,xu=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,Eu=/([a-z])([A-Z])/g,Tu=/(\w+)(\([^)]+\)+)/g,Su=/(\*=|\+=|-=)/,Ru={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:120,loop:0,reversed:!1,alternate:!1,autoplay:!0,duration:lu,delay:0,loopDelay:0,ease:"out(2)",composition:nu.replace,modifier:e=>e,onBegin:mu,onBeforeUpdate:mu,onUpdate:mu,onLoop:mu,onPause:mu,onComplete:mu,onRender:mu},Ou={defaults:Ru,root:tu,scope:null,precision:4,timeScale:1,tickThreshold:200},Au={version:"4.0.2",engine:null};Qa&&(eu.AnimeJS||(eu.AnimeJS=[]),eu.AnimeJS.push(Au));const Lu=(e,t)=>0===e.indexOf(t),Iu=Date.now,Nu=Array.isArray,Cu=e=>e&&e.constructor===Object,Pu=e=>"number"==typeof e&&!isNaN(e),ku=e=>"string"==typeof e,ju=e=>"function"==typeof e,Du=e=>void 0===e,$u=e=>Du(e)||null===e,Mu=e=>Qa&&e instanceof SVGElement,Bu=e=>gu.test(e),zu=e=>Lu(e,"rgb"),Fu=e=>Lu(e,"hsl"),Uu=e=>!Ou.defaults.hasOwnProperty(e),Wu=e=>ku(e)?parseFloat(e):e,Hu=Math.pow,qu=Math.sqrt,Yu=Math.sin,Gu=Math.cos,Vu=Math.abs,Xu=(Math.exp,Math.ceil),Zu=Math.floor,Ku=Math.asin,Ju=(Math.max,Math.atan2,Math.PI),Qu=Math.round,ec=(e,t,n)=>e<t?t:e>n?n:e,tc={},nc=(e,t)=>{if(t<0)return e;if(!t)return Qu(e);let n=tc[t];return n||(n=tc[t]=10**t),Qu(e*n)/n},rc=(e,t,n)=>e+(t-e)*n,oc=e=>e===1/0?cu:e===-1/0?-1e12:e,ic=e=>e<=uu?uu:oc(nc(e,11)),sc=e=>Nu(e)?[...e]:e,ac=(e,t)=>{const n={...e};for(let r in t){const o=e[r];n[r]=Du(o)?t[r]:o}return n},uc=(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}},cc=(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},lc=(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 fc{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._elapsedTime=e,this._startTime=e,this._lastTime=e,this._scheduledTime=0,this._frameDuration=nc(lu/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<uu?uu:n,o=nc(lu/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<uu?uu: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 pc=(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,d=e._alternate,h=e._hasChildren,m=e._delay,g=e._currentTime,v=m+u,y=t-m,b=ec(g,-m,s),_=ec(y,-m,s),w=y-g,x=_>0,E=_>=s,T=s<=uu,S=2===o;let R=0,O=y,A=0;if(c>1){const t=~~(_/(u+(E?0:f)));e._currentIteration=ec(t,0,c),E&&e._currentIteration--,R=e._currentIteration%2,O=_%(u+f)||0}const L=p^(d&&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||h||!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)),!h){const t=S||(C?-1*w:w)>=Ou.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,d=l._nextRep,h=l._prevRep,m=e!==nu.none;if((t||(n!==i||o<=p+(d?d._delay:0))&&(0!==n||o>=l._absoluteStartTime))&&(!m||!l._isOverridden&&(!l._isOverlapped||o<=p)&&(!d||d._isOverridden||o<=d._absoluteStartTime)&&(!h||h._isOverridden||o>=h._absoluteStartTime+h._changeDuration+l._delay))){const t=l._currentTime=ec(N-l._startTime,0,i),n=l._ease(t/l._updateDuration),o=l._modifier,p=l._valueType,d=l._tweenType,h=0===d,g=0===p,v=g&&h||0===n||1===n?-1:Ou.precision;let y,b;if(g)y=b=o(nc(rc(l._fromNumber,l._toNumber,n),v));else if(1===p)b=o(nc(rc(l._fromNumber,l._toNumber,n),v)),y=`${b}${l._unit}`;else if(2===p){const e=l._fromNumbers,t=l._toNumbers,r=nc(ec(o(rc(e[0],t[0],n)),0,255),0),i=nc(ec(o(rc(e[1],t[1],n)),0,255),0),s=nc(ec(o(rc(e[2],t[2],n)),0,255),0),a=ec(o(nc(rc(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(nc(rc(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===nu.blend)l._value=y;else{const e=l.property;s=l.target,h?s[e]=y:1===d?s.setAttribute(e,y):(a=s.style,3===d?(s!==u&&(u=s,c=s[su]),c[e]=y,f=1):2===d?a[e]=y:4===d&&a.setProperty(e,y)),x&&(A=1)}}if(f&&l._renderTransforms){let e=fu;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<=uu&&a)&&(e.onComplete(e),e.completed=!C):x&&E?c===1/0?e._startTime+=e.duration:e._currentIteration>=c-1&&(e.paused=!0,a||h||(e.completed=!0,n||i&&(C||!i.began)||(e.onComplete(e),e._resolve(e)))):e.completed=!1,A},dc=(e,t,n,r,o)=>{const i=e._currentIteration;if(pc(e,t,n,r,o),e._hasChildren){const s=e,a=s.backwards,u=r?t:s._iterationTime,c=Iu();let l=0,f=!0;if(!r&&s._currentIteration!==i){const e=s.iterationDuration;uc(s,t=>{if(a){const r=t.duration,o=t._offset+t._delay;n||!(r<=uu)||o&&o+r!==e||t.onComplete(t)}else!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&pc(t,e,n,1,2),t.began=!1,t.completed=!1}),n||s.onLoop(s)}uc(s,e=>{const t=nc((u-e._offset)*e._speed,12),i=e._fps<s._fps?e.requestTick(c):o;l+=pc(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:mu},mc=Qa?requestAnimationFrame:setImmediate,gc=Qa?cancelAnimationFrame:clearImmediate;class vc extends fc{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=Ru,this.paused=!(!Qa||!tu.hidden),this.reqId=null}update(){const e=this._currentTime=Iu();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?(cc(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):dc(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=mc(bc)),this}pause(){return this.paused=!0,_c()}resume(){if(this.paused)return this.paused=!1,uc(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(1===Ou.timeScale?1:lu)}set speed(e){this._speed=e*Ou.timeScale,uc(this,e=>e.speed=e._speed)}get timeUnit(){return 1===Ou.timeScale?"ms":"s"}set timeUnit(e){const t="s"===e,n=t?.001:1;if(Ou.timeScale!==n){Ou.timeScale=n,Ou.tickThreshold=200*n;const e=t?.001:lu;this.defaults.duration*=e,this._speed*=e}}get precision(){return Ou.precision}set precision(e){Ou.precision=e}}const yc=(()=>{const e=new vc(Iu());return Qa&&(Au.engine=e,tu.addEventListener("visibilitychange",()=>{e.pauseOnDocumentHidden&&(tu.hidden?e.pause():e.resume())})),e})(),bc=()=>{yc._head?(yc.reqId=mc(bc),yc.update()):yc.reqId=0},_c=()=>(gc(yc.reqId),yc.reqId=0,yc);function wc(e){const t=ku(e)?Ou.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function xc(e){if($u(e))return[];if(Nu(e)){const t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){const r=t[e];if(!$u(r)){const e=wc(r);if(e)for(let t=0,r=e.length;t<r;t++){const r=e[t];if(!$u(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(!Qa)return[e];const t=wc(e);return t?Array.from(t):[e]}function Ec(e){const t=xc(e),n=t.length;if(n)for(let e=0;e<n;e++){const n=t[e];if(!n[ru]){n[ru]=!0;const e=Mu(n);(n.nodeType||e)&&(n[ou]=!0,n[iu]=e,n[su]={})}}return t}const Tc=["opacity","rotate","overflow","color"],Sc=(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),Rc=(e,t)=>Du(e)?t:e,Oc=(e,t,n,r,o)=>{if(ju(e)){const i=()=>{const o=e(t,n,r);return isNaN(+o)?o||0:+o};return o&&(o.func=i),i()}return e},Ac=(e,t)=>e[ou]?e[iu]&&((e,t)=>{if(Tc.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:du.includes(t)||pu.get(t)?3:Lu(t,"--")?4:t in e.style?2:t in e?0:1:0,Lc=(e,t,n)=>{const r=e.style[t];r&&n&&(n[t]=r);const o=r||getComputedStyle(e[au]||e).getPropertyValue(t);return"auto"===o?"0":o},Ic=(e,t,n,r)=>{const o=Du(n)?Ac(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[su];let s;for(;s=Tu.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&&!Du(o)?o:Lu(t,"scale")?"1":Lu(t,"rotate")||Lu(t,"skew")?"0deg":"0px"})(e,t,r):4===o?Lc(e,t,r).trimStart():Lc(e,t,r)},Nc=(e,t,n)=>"-"===n?e-t:"+"===n?e+t:e*t,Cc=(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(" ")&&xu.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=>Bu(e)||zu(e)||Fu(e))(n))return t.t=2,t.d=zu(r=n)?(e=>{const t=vu.exec(e)||yu.exec(e),n=Du(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]})(r):Bu(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):Fu(r)?(e=>{const t=bu.exec(e)||_u.exec(e),n=+t[1]/360,r=+t[2]/100,o=+t[3]/100,i=Du(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=nc(255*Sc(t,e,n+1/3),0),a=nc(255*Sc(t,e,n),0),u=nc(255*Sc(t,e,n-1/3),0)}return[s,a,u,i]})(r):[0,0,0,1],t;{const e=n.match(wu);return t.t=3,t.d=e?e.map(Number):[],t.s=n.split(wu)||[],t}}var r;return t.n=n,t},Pc=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=sc(e._toNumbers),t.s=sc(e._strings),t),kc={t:0,n:0,u:null,o:null,d:null,s:null},jc={_rep:new WeakMap,_add:new Map},Dc=(e,t,n="_rep")=>{const r=jc[n];let o=r.get(e);return o||(o={},r.set(e,o)),o[t]?o[t]:o[t]={_head:null,_tail:null}},$c=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,Mc=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=uu,e._currentTime=uu},Bc=(e,t)=>{const n=e._composition;if(n===nu.replace){const n=e._absoluteStartTime;lc(t,e,$c,"_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){Mc(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)Mc(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<uu&&Mc(r)}let s=!0;if(uc(t,e=>{e._isOverlapped||(s=!1)}),s){const e=t.parent;if(e){let n=!0;uc(e,e=>{e!==t&&uc(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}else if(n===nu.blend){const t=Dc(e.target,e.property,"_add"),n=(e=>{let t=hc.animation;return t||(t={duration:uu,computeDeltaTime:mu,_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?sc(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}}}),pc(t,1,1,0,2)}),t})(jc._add);let r=t._head;r||(r={...e},r._composition=nu.replace,r._updateDuration=uu,r._startTime=0,r._numbers=sc(e._fromNumbers),r._number=0,r._next=null,r._prev=null,lc(t,r),lc(n,r));const o=e._toNumber;if(e._fromNumber=r._fromNumber-o,e._toNumber=0,e._numbers=sc(e._fromNumbers),e._number=0,r._fromNumber=o,e._toNumbers){const t=sc(e._toNumbers);t&&t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}lc(t,e,null,"_prevAdd","_nextAdd")}return e},zc=e=>{const t=e._composition;if(t!==nu.none){const n=e.target,r=e.property,o=jc._rep.get(n)[r];if(cc(o,e,"_prevRep","_nextRep"),t===nu.blend){const t=jc._add,o=t.get(n);if(!o)return;const i=o[r],s=hc.animation;cc(i,e,"_prevAdd","_nextAdd");const a=i._head;if(a&&a===i._tail){cc(i,a,"_prevAdd","_nextAdd"),cc(s,a);let e=!0;for(let t in o)if(o[t]._head){e=!1;break}e&&t.delete(n)}}}return e},Fc=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Uc=e=>e._cancelled?(e._hasChildren?uc(e,Uc):uc(e,e=>{e._composition!==nu.none&&Bc(e,Dc(e.target,e.property))}),e._cancelled=0,e):e;let Wc=0;class Hc extends fc{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:d,onLoop:h,onPause:m,onBegin:g,onBeforeUpdate:v,onUpdate:y}=e;Ou.scope&&Ou.scope.revertibles.push(this);const b=t?0:yc._elapsedTime,_=t?t.defaults:Ou.defaults,w=ju(o)||Du(o)?_.delay:+o,x=ju(i)||Du(i)?1/0:+i,E=Rc(u,_.loop),T=Rc(c,_.loopDelay),S=!0===E||E===1/0||E<0?1/0:E+1;let R=0;if(t)R=n;else{let e=Iu();yc.paused&&(yc.requestTick(e),e=yc._elapsedTime),R=e-yc._startTime}this.id=Du(r)?++Wc:r,this.parent=t,this.duration=oc((x+T)*S-T)||uu,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=h||_.onLoop,this.onPause=m||_.onPause,this.onComplete=d||_.onComplete,this.iterationDuration=x,this.iterationCount=S,this._autoplay=!t&&Rc(l,_.autoplay),this._offset=R,this._delay=w,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=mu,this._running=!1,this._reversed=+Rc(s,_.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=Rc(a,_.alternate),this._prev=null,this._next=null,this._elapsedTime=b,this._startTime=b,this._lastTime=b,this._fps=Rc(f,_.frameRate),this._speed=Rc(p,_.playbackRate)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(1).play()}get currentTime(){return ec(nc(this._currentTime,Ou.precision),-this._delay,this.duration)}set currentTime(e){const t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return nc(this._iterationTime,Ou.precision)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return ec(nc(this._currentTime/this.duration,5),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return ec(nc(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*ec(+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 Uc(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,dc(this,0,1,e,2),Fc(this),this._hasChildren&&uc(this,Fc),this}init(e=0){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&dc(this,this.duration,1,e,2),this.reset(e);const t=this._autoplay;return!0===t?this.resume():t&&!Du(t.linked)&&t.link(this),this}resetTime(){const e=1/(this._speed*yc._speed);return this._startTime=Iu()-(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<=uu&&!this._hasChildren?dc(this,uu,0,0,2):(this._running||(lc(yc,this),yc._hasChildren=!0,this._running=!0),this.resetTime(),this._startTime-=12,yc.wake()),this):this}restart(){return this.reset(0).resume()}seek(e,t=0,n=0){Uc(this),this.completed=!1;const r=this.paused;return this.paused=!0,dc(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?Zu(cu/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?uc(this,e=>e.cancel(),!0):uc(this,zc),this._cancelled=1,this.pause()}stretch(e){const t=this.duration,n=ic(e);if(t===n)return this;const r=e/t,o=e<=uu;return this.duration=o?uu:n,this.iterationDuration=o?uu:ic(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){dc(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=mu){const t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=mu};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}}const qc=e=>e,Yc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Gc=(e=.5,t=0,n=.5,r=1)=>e===t&&n===r?qc:o=>0===o||1===o?o:Yc(((e,t,n)=>{let r,o,i=0,s=1,a=0;do{o=i+(s-i)/2,r=Yc(o,t,n)-e,r>0?s=o:i=o}while(Vu(r)>1e-7&&++a<100);return o})(o,e,n),t,r),Vc=(e=10,t)=>{const n=t?Xu:Zu;return t=>n(ec(t,0,1)*e)*(1/e)},Xc=(...e)=>{const t=e.length;if(!t)return qc;const n=t-1,r=e[0],o=e[n],i=[0],s=[Wu(r)];for(let t=1;t<n;t++){const r=e[t],o=ku(r)?r.trim().split(" "):[r],a=o[0],u=o[1];i.push(Du(u)?t/n:Wu(u)/100),s.push(Wu(a))}return s.push(Wu(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]}},Zc=(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(ec(s,o,1))}return n.push(1),Xc(...n)},Kc=Ju/2,Jc=2*Ju,Qc=(e=1.68)=>t=>Hu(t,+e),el={[fu]:Qc,Quad:Qc(2),Cubic:Qc(3),Quart:Qc(4),Quint:Qc(5),Sine:e=>1-Gu(e*Kc),Circ:e=>1-qu(1-e*e),Expo:e=>e?Hu(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Hu(2,--n))-1)/11;);return 1/Hu(4,3-n)-7.5625*Hu((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=ec(+e,1,10),r=ec(+t,uu,2),o=r/Jc*Ku(1/n),i=Jc/r;return e=>0===e||1===e?e:-n*Hu(2,-10*(1-e))*Yu((1-e-o)*i)}},tl={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},nl=(()=>{const e={linear:Xc,irregular:Zc,steps:Vc,cubicBezier:Gc};for(let t in tl)for(let n in el){const r=el[n],o=tl[t];e[t+n]=n===fu||"Back"===n||"Elastic"===n?(e,t)=>o(r(e,t)):o(r)}return e})(),rl={linear:qc},ol=e=>ju(e)?e:ku(e)?((e,t,n)=>{if(n[e])return n[e];if(e.indexOf("(")<=-1){const r=tl[e]||e.includes("Back")||e.includes("Elastic")?t[e]():t[e];return r?n[e]=r:qc}{const r=e.slice(0,-1).split("("),o=t[r[0]];return o?n[e]=o(...r[1].split(",")):qc}})(e,nl,rl):qc,il={},sl=(e,t,n)=>{if(3===n){return pu.get(e)||e}if(2===n||1===n&&Mu(t)&&e in t.style){const t=il[e];if(t)return t;{const t=e?e.replace(Eu,"$1-$2").toLowerCase():e;return il[e]=t,t}}return e},al={deg:1,rad:180/Ju,turn:360},ul={},cl=(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=ul[s];if(Du(a)||r){let r;if(o in al)r=i*al[o]/al[n];else{const t=100,s=e.cloneNode(),a=e.parentNode,u=a&&a!==tu?a:tu.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,ul[s]=r}else t.n=a;return t.t,t.u=n,t},ll=e=>{if(e._hasChildren)uc(e,ll,!0);else{const t=e;t.pause(),uc(t,e=>{const n=e.property,r=e.target;if(r[ou]){const o=r.style,i=t._inlineStyles[n];if(3===e._tweenType){const t=r[su];if(Du(i)||i===fu?delete t[n]:t[n]=i,e._renderTransforms)if(Object.keys(t).length){let e=fu;for(let n in t)e+=hu[n]+t[n]+") ";o.transform=e}else o.removeProperty("transform")}else Du(i)||i===fu?o.removeProperty(n):o[n]=i;t._tail===e&&t.targets.forEach(e=>{e.getAttribute&&e.getAttribute("style")===fu&&e.removeAttribute("style")})}})}return e},fl={t:0,n:0,u:null,o:null,d:null,s:null},pl={t:0,n:0,u:null,o:null,d:null,s:null},dl={func:null},hl=[null],ml=[null,null],gl={to:null};let vl,yl,bl=0;class _l extends Hc{constructor(e,t,n,r,o=!1,i=0,s=0){super(t,n,r);const a=Ec(e),u=a.length,c=t.keyframes,l=c?ac(((e,t)=>{const n={};if(Nu(e)){const t=[].concat(...e.map(e=>Object.keys(e))).filter(Uu);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];Uu(n)?n===o&&(t.to=r):t[n]=r}return t});n[o]=i}}else{const r=Rc(t.duration,Ou.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(Uu(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:d,playbackEase:h,modifier:m,composition:g,onRender:v}=l,y=n?n.defaults:Ou.defaults,b=Rc(h,y.playbackEase),_=b?ol(b):null,w=!Du(d)&&!Du(d.ease),x=w?d.ease:Rc(d,_?"linear":y.ease),E=w?d.duration:Rc(p,y.duration),T=Rc(f,y.delay),S=m||y.modifier,R=Du(g)&&u>=lu?nu.none:Du(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(Uu(e)){const i=Ac(t,e),s=sl(e,t,i);let a=l[e];const u=Nu(a);if(o&&!u&&(ml[0]=a,ml[1]=a,a=ml),u){const e=a.length,t=!Cu(a[0]);2===e&&t?(gl.to=a,hl[0]=gl,vl=hl):e>2&&t?(vl=[],a.forEach((e,t)=>{t?1===t?(ml[1]=e,vl.push(ml)):vl.push(e):ml[0]=e})):vl=a}else hl[0]=a,vl=hl;let d=null,h=null,m=NaN,g=0,v=0;for(let e=vl.length;v<e;v++){const o=vl[v];Cu(o)?yl=o:(gl.to=o,yl=gl),dl.func=null;const a=Oc(yl.to,t,r,c,dl);let u;Cu(a)&&!Du(a.to)?(yl=a,u=a.to):u=a;const l=Oc(yl.from,t,r,c),f=yl.ease,p=!Du(f)&&!Du(f.ease),y=p?f.ease:f||x,b=p?f.duration:Oc(Rc(yl.duration,e>1?Oc(E,t,r,c)/e:E),t,r,c),_=Oc(Rc(yl.delay,v?0:T),t,r,c),w=Oc(Rc(yl.composition,R),t,r,c),L=Pu(w)?w:nu[w],I=yl.modifier||S,P=!Du(l),k=!Du(u),j=Nu(u),D=j||P&&k,$=h?g+_:_,M=A+$;C||!P&&!j||(C=1);let B=h;if(L!==nu.none){d||(d=Dc(t,s));let e=d._head;for(;e&&!e._isOverridden&&e._absoluteStartTime<=M;)if(B=e,e=e._nextRep,e&&e._absoluteStartTime>=M)for(;e;)Mc(e),e=e._nextRep}if(D?(Cc(j?Oc(u[0],t,r,c):l,fl),Cc(j?Oc(u[1],t,r,c,dl):u,pl),0===fl.t&&(B?1===B._valueType&&(fl.t=1,fl.u=B._unit):(Cc(Ic(t,s,i,O),kc),1===kc.t&&(fl.t=1,fl.u=kc.u)))):(k?Cc(u,pl):h?Pc(h,pl):Cc(n&&B&&B.parent.parent===n?B._value:Ic(t,s,i,O),pl),P?Cc(l,fl):h?Pc(h,fl):Cc(n&&B&&B.parent.parent===n?B._value:Ic(t,s,i,O),fl)),fl.o&&(fl.n=Nc(B?B._toNumber:Cc(Ic(t,s,i,O),kc).n,fl.n,fl.o)),pl.o&&(pl.n=Nc(fl.n,pl.n,pl.o)),fl.t!==pl.t)if(3===fl.t||3===pl.t){const e=3===fl.t?fl:pl,t=3===fl.t?pl:fl;t.t=3,t.s=sc(e.s),t.d=e.d.map(()=>t.n)}else if(1===fl.t||1===pl.t){const e=1===fl.t?fl:pl,t=1===fl.t?pl:fl;t.t=1,t.u=e.u}else if(2===fl.t||2===pl.t){const e=2===fl.t?fl:pl,t=2===fl.t?pl:fl;t.t=2,t.s=e.s,t.d=[0,0,0,1]}if(fl.u!==pl.u){let e=pl.u?fl:pl;e=cl(t,e,pl.u?pl.u:fl.u,!1)}if(pl.d&&fl.d&&pl.d.length!==fl.d.length){const e=fl.d.length>pl.d.length?fl:pl,t=e===fl?pl:fl;t.d=e.d.map((e,n)=>Du(t.d[n])?0:t.d[n]),t.s=sc(e.s)}const z=nc(+b||uu,12),F={parent:this,id:bl++,property:s,target:t,_value:null,_func:dl.func,_ease:ol(y),_fromNumbers:sc(fl.d),_toNumbers:sc(pl.d),_strings:sc(pl.s),_fromNumber:fl.n,_toNumber:pl.n,_numbers:sc(fl.d),_number:fl.n,_unit:pl.u,_modifier:I,_currentTime:0,_startTime:$,_delay:+_,_updateDuration:z,_changeDuration:z,_absoluteStartTime:M,_tweenType:i,_valueType:pl.t,_composition:L,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};L!==nu.none&&Bc(F,d),isNaN(m)&&(m=F._startTime),g=nc($+z,12),h=F,N++,lc(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;uc(this,t=>{e>=f&&e<p&&(t._renderTransforms=1,t._composition===nu.blend&&uc(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?(uc(this,e=>{e._startTime-e._delay||(e._delay-=I),e._startTime-=I}),L-=I):I=0,L||(L=uu,this.iterationCount=0),this.targets=a,this.duration=L===uu?uu:oc((L+this._loopDelay)*this.iterationCount-this._loopDelay)||uu,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===ic(e))return this;const n=e/t;return uc(this,e=>{e._updateDuration=ic(e._updateDuration*n),e._changeDuration=ic(e._changeDuration*n),e._currentTime*=n,e._startTime*=n,e._absoluteStartTime*=n}),super.stretch(e)}refresh(){return uc(this,e=>{const t=Ic(e.target,e.property,e._tweenType);Cc(t,kc),e._fromNumbers=sc(kc.d),e._fromNumber=kc.n,e._func&&(Cc(e._func(),pl),e._toNumbers=sc(pl.d),e._strings=sc(pl.s),e._toNumber=pl.n)}),this}revert(){return super.revert(),ll(this)}then(e){return super.then(e)}}du.filter(e=>["X","Y","Z"].some(t=>e.endsWith(t))),Qa&&(Du(CSS)||Object.hasOwnProperty.call(CSS,"registerProperty"));const wl={_head:null,_tail:null},xl=(e,t,n)=>{let r=wl._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(),cc(wl,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}},El=(e=mu)=>new Hc({duration:1*Ou.timeScale,onComplete:e},null,0).resume();function Tl(e,t,n){const r=Ec(e);if(!r.length)return;const[o]=r,i=Ac(o,t),s=sl(t,o,i);let a=Ic(o,s);if(Du(n))return a;if(Cc(a,kc),0===kc.t||1===kc.t){if(!1===n)return kc.n;{const e=cl(o,kc,n,!1);return`${nc(e.n,Ou.precision)}${e.u}`}}}const Sl=(e,t)=>{if(!Du(t))return t.duration=uu,t.composition=Rc(t.composition,nu.none),new _l(e,t,null,0,!0).resume()},Rl=(e,t,n)=>{let r=!1;return uc(t,o=>{const i=o.target;if(e.includes(i)){const e=o.property,s=o._tweenType,a=sl(n,i,s);(!a||a&&a===e)&&(o.parent._tail===o&&3===o._tweenType&&o._prev&&3===o._prev._tweenType&&(o._prev._renderTransforms=1),cc(t,o),zc(o),r=!0)}},!0),r},Ol=(e,t,n)=>{const r=xc(e),o=t||yc,i=t&&t.controlAnimation&&t;for(let e=0,t=r.length;e<t;e++){const t=r[e];xl(t,n,i)}let s;if(o._hasChildren){let t=0;uc(o,i=>{if(!i._hasChildren)if(s=Rl(r,i,n),s&&!i._head)i.cancel(),cc(o,i);else{const e=i._offset+i._delay+i.duration;e>t&&(t=e)}i._head?Ol(e,i,n):i._hasChildren=!1},!0),Du(o.iterationDuration)||(o.iterationDuration=t)}else s=Rl(r,o,n);return s&&!o._head&&(o._hasChildren=!1,o.cancel&&o.cancel()),r},Al=(e,t,n)=>{const r=10**(n||0);return Zu((Math.random()*(t-e+1/r)+e)*r)/r},Ll=(e,t,n,r)=>{let o=lu/Ou.defaults.frameRate;if(!1!==r){const e=r||yc._hasChildren&&yc;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},Il=e=>(...t)=>{const n=e(...t);return new Proxy(mu,{apply:(e,t,[r])=>n(r),get:(e,t)=>Il((...e)=>{const r=Cl[t](...e);return e=>r(n(e))})})},Nl=(e,t=0)=>(...n)=>(n.length<e.length?Il(((e,t=0)=>(...n)=>t?t=>e(...n,t):t=>e(t,...n))(e,t)):e)(...n),Cl={$:Ec,get:Tl,set:Sl,remove:Ol,cleanInlineStyles:ll,random:Al,randomPick:e=>e[Al(0,e.length-1)],shuffle:e=>{let t,n,r=e.length;for(;r;)n=Al(0,--r),t=e[r],e[r]=e[n],e[n]=t;return e},lerp:Ll,sync:El,clamp:Nl(ec),round:Nl(nc),snap:Nl((e,t)=>Nu(t)?t.reduce((t,n)=>Vu(n-e)<Vu(t-e)?n:t):t?Qu(e/t)*t:e),wrap:Nl((e,t,n)=>((e-t)%(n-t)+(n-t))%(n-t)+t),interpolate:Nl(rc,1),mapRange:Nl((e,t,n,r,o)=>r+(e-t)/(n-t)*(o-r)),roundPad:Nl((e,t)=>(+e).toFixed(t)),padStart:Nl((e,t,n)=>`${e}`.padStart(t,n)),padEnd:Nl((e,t,n)=>`${e}`.padEnd(t,n)),degToRad:Nl(e=>e*Ju/180),radToDeg:Nl(e=>180*e/Ju)},Pl=(e,t)=>{let n=e.iterationDuration;if(n===uu&&(n=0),Du(t))return n;if(Pu(+t))return+t;const r=t,o=e?e.labels:null,i=!$u(o),s=((e,t)=>{if(Lu(t,"<")){const n="<"===t[1],r=e._tail,o=r?r._offset+r._delay:0;return n?o:o+r.duration}})(e,r),a=!Du(s),u=Su.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 Nc(l,f,e[0])}return a?s:i?Du(o[r])?n:o[r]:n};function kl(e,t,n,r,o,i){const s=Pu(e.duration)&&e.duration<=uu?n-uu:n;dc(t,s,1,1,1);const a=r?new _l(r,e,t,s,!1,o,i):new Hc(e,t,s);return a.init(1),lc(t,a),uc(t,e=>{const n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=function(e){return oc((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||uu}(t),t}class jl extends Hc{constructor(e={}){super(e,null,0),this.duration=0,this.labels={};const t=e.defaults,n=Ou.defaults;this.defaults=t?ac(t,n):n,this.onRender=e.onRender||n.onRender;const r=Rc(e.playbackEase,n.playbackEase);this._ease=r?ol(r):null,this.iterationDuration=0}add(e,t,n){const r=Cu(t),o=Cu(e);if(r||o){if(this._hasChildren=!0,r){const r=t;if(ju(n)){const t=n,o=xc(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,Du(a)||(n.id=a+"-"+u),kl(n,this,t(e,u,c,this),e,u,c),u++})}else kl(r,this,Pl(this,n),e)}else kl(e,this,Pl(this,t));return this.init(1)}}sync(e,t){if(Du(e)||e&&Du(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 Du(t)?this:(t.duration=uu,t.composition=nu.replace,this.add(e,t,n))}call(e,t){return Du(e)||e&&!ju(e)?this:this.add({duration:0,onComplete:()=>e(this)},t)}label(e,t){return Du(e)||e&&!ku(e)||(this.labels[e]=Pl(this,t)),this}remove(e,t){return Ol(e,this,t),this}stretch(e){const t=this.duration;if(t===ic(e))return this;const n=e/t,r=this.labels;uc(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return uc(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),uc(this,e=>e.revert,!0),ll(this)}then(e){return super.then(e)}}const Dl=(e,t)=>e&&ju(e)?e(t):e,$l=new Map;class Ml{constructor(e){this.element=e,this.useWin=this.element===tu.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 Hc({autoplay:!1,onBegin:()=>this.dataTimer.resume(),onUpdate:()=>{const e=this.backwardX||this.backwardY;uc(this,e=>e.handleScroll(),e)},onComplete:()=>this.dataTimer.pause()}).init(),this.dataTimer=new Hc({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=nc(t>0?Math.sqrt(s*s+a*a)/t:0,5)}}).init(),this.resizeTicker=new Hc({autoplay:!1,duration:250*Ou.timeScale,onComplete:()=>{this.updateWindowBounds(),this.refreshScrollObservers(),this.handleScroll()}}).init(),this.wakeTicker=new Hc({autoplay:!1,duration:500*Ou.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?eu:this.element).addEventListener("scroll",this,!1)}updateScrollCoords(){const e=this.useWin,t=this.element;this.scrollX=nc(e?eu.scrollX:t.scrollLeft,0),this.scrollY=nc(e?eu.scrollY:t.scrollTop,0)}updateWindowBounds(){this.winWidth=eu.innerWidth,this.winHeight=(()=>{const e=document.createElement("div");tu.body.appendChild(e),e.style.height="100lvh";const t=e.offsetHeight;return tu.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(){uc(this,e=>{e._debug&&e.removeDebug()}),this.updateBounds(),uc(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?eu:this.element).removeEventListener("scroll",this),$l.delete(this.element)}}const Bl=(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}=Cc(a,kc);let l=u;return"%"===c?l=u/100*n:c&&(l=cl(e,kc,"px",!0).n),s&&r<0&&(l+=r),i&&o>0&&(l+=o),l},zl=(e,t,n,r,o)=>{let i;if(ku(t)){const s=Su.exec(t);if(s){const a=s[0],u=a[0],c=t.split(a),l="min"===c[0],f="max"===c[0],p=Bl(e,c[0],n,r,o),d=Bl(e,c[1],n,r,o);if(l){const t=Nc(Bl(e,"min",n),d,u);i=t<p?p:t}else if(f){const t=Nc(Bl(e,"max",n),d,u);i=t>p?p:t}else i=Nc(p,d,u)}else i=Bl(e,t,n,r,o)}else i=t;return nc(i,0)},Fl=e=>{let t;const n=e.targets;for(let e=0,r=n.length;e<r;e++){const r=n[e];if(r[ou]){t=r;break}}return t};let Ul=0;const Wl=["#FF4B4B","#FF971B","#FFC730","#F9F640","#7AFF5A","#18FF74","#17E09B","#3CFFEC","#05DBE9","#33B3F1","#638CF9","#C563FE","#FF4FCF","#F93F8A"];class Hl{constructor(e={}){Ou.scope&&Ou.scope.revertibles.push(this);const t=Rc(e.sync,"play pause"),n=t?ol(t):null,r=t&&("linear"===t||t===qc),o=t&&!(n===qc&&!r),i=t&&(Pu(t)||!0===t||r),s=t&&ku(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=Ul++,this.id=Du(e.id)?this.index:e.id,this.container=(e=>{const t=e&&xc(e)[0]||tu.body;let n=$l.get(t);return n||(n=new Ml(t),$l.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]:mu,this.onSyncLeave=a&&!u&&a[1]?a[1]:mu,this.onSyncEnterForward=a&&u&&a[0]?a[0]:mu,this.onSyncLeaveForward=a&&u&&a[1]?a[1]:mu,this.onSyncEnterBackward=a&&u&&a[2]?a[2]:mu,this.onSyncLeaveBackward=a&&u&&a[3]?a[3]:mu,this.onEnter=e.onEnter||mu,this.onLeave=e.onLeave||mu,this.onEnterForward=e.onEnterForward||mu,this.onLeaveForward=e.onLeaveForward||mu,this.onEnterBackward=e.onEnterBackward||mu,this.onLeaveBackward=e.onLeaveBackward||mu,this.onUpdate=e.onUpdate||mu,this.onSyncComplete=e.onSyncComplete||mu,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=Rc(e.debug,!1),this._next=null,this._prev=null,lc(this.container,this),El(()=>{if(!this.reverted){if(!this.target){const t=xc(e.target)[0];this.target=t||tu.body,this.refresh()}this._debug&&this.debug()}})}link(e){if(e&&(e.pause(),this.linked=e,!this._params.target)){let t;Du(e.targets)?uc(e,e=>{e.targets&&!t&&(t=Fl(e))}):t=Fl(e),this.target=t||tu.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:nc(ec(e,0,1),6)}refresh(){this.reverted=!1;const e=this._params;return this.repeat=Rc(Dl(e.repeat,this),!0),this.horizontal="x"===Rc(Dl(e.axis,this),"y"),this.enter=Rc(Dl(e.enter,this),"end start"),this.leave=Rc(Dl(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=tu.createElement("div"),o=tu.createElement("div"),i=tu.createElement("div"),s=Wl[this.index%Wl.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,d=t?0:10,h=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",d,h,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,d=n%2,h=a<y,m=a>(r?t?u:c:t?l:f)-y,b=(r?d&&!h:!d&&!h)||m,_=tu.createElement("div"),w=tu.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[d]}${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: ${d?s:"rgba(0,0,0,.75)"};\n background-color: ${d?"rgba(0,0,0,.65)":s};\n border: 2px solid ${d?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"===Tl(e.element,"position")&&(this.debugStyles=Sl(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"===Tl(n.element,"position")&&Sl(n.element,{position:"relative "});for(;s&&s!==n.element&&s!==tu.body;){const t="sticky"===Tl(s,"position")&&Sl(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,d=r?n.width:n.height,h=(r?n.scrollWidth:n.scrollHeight)-d,m=this.enter,g=this.leave;let v="start",y="end",b="end",_="start";if(ku(m)){const e=m.split(" ");b=e[0],v=e.length>1?e[1]:v}else if(Cu(m)){const e=m;Du(e.container)||(b=e.container),Du(e.target)||(v=e.target)}else Pu(m)&&(b=m);if(ku(g)){const e=g.split(" ");_=e[0],y=e.length>1?e[1]:y}else if(Cu(g)){const e=g;Du(e.container)||(_=e.container),Du(e.target)||(y=e.target)}else Pu(g)&&(_=g);const w=zl(t,v,p),x=zl(t,y,p),E=w+f-d,T=x+f-h,S=zl(t,b,d,E,T),R=zl(t,_,d,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,d=this._debug&&this.$debug;let h=!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&&Pu(r)){if(r<1){const e=t<g&&1===g?1e-4:t>g&&!g?-1e-4:0;g=nc(Ll(t,g,rc(.01,.2,r),!1)+e,6)}}else n&&(g=n(g));h=g!==this.prevProgress,m=1===t,h&&!m&&r&&t&&s.wakeTicker.restart()}if(d){const e=i?s.scrollY:s.scrollX;d.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):(d&&l&&(d.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)&&(h=!0),h&&(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 cc(e,this),e._head||e.revert(),this._debug&&this.removeDebug(),this.reverted=!0,this}}const ql=(e={})=>new Hl(e);var Yl,Gl,Vl,Xl,Zl,Kl,Jl;!function(e){e[e.XY=1]="XY",e[e.SIZE=2]="SIZE"}(Yl||(Yl={})),function(e){e[e.ALL=1]="ALL",e[e.SEPARATE=2]="SEPARATE"}(Gl||(Gl={})),function(e){e[e.X=1]="X",e[e.Y=2]="Y"}(Vl||(Vl={})),function(e){e[e.AUTOPLAY=1]="AUTOPLAY",e[e.SCROLL_SYNC=2]="SCROLL_SYNC",e[e.STATES=3]="STATES",e[e.NONE=4]="NONE"}(Xl||(Xl={})),function(e){e[e.FIXED=1]="FIXED",e[e.RELATIVE=2]="RELATIVE"}(Zl||(Zl={})),function(e){e[e.APPEAR=1]="APPEAR",e[e.MOUNT=2]="MOUNT"}(Kl||(Kl={})),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"}(Jl||(Jl={}));const Ql={[Jl.PLAY]:"play",[Jl.PAUSE]:"pause",[Jl.REVERSE]:"reverse",[Jl.IGNORE]:"ignore",[Jl.DESTROY]:"destroy",[Jl.INIT]:"init",[Jl.RE_PLAY]:"re_play"};var ef;!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"}(ef||(ef={}));const tf={[ef.FIXED]:"",[ef.PERCENTAGE]:"%",[ef.START]:"top",[ef.START_PLUS]:"+=top",[ef.END]:"bottom",[ef.END_PLUS]:"+=bottom"},nf={[ef.FIXED]:"",[ef.PERCENTAGE]:"%",[ef.START]:"top",[ef.START_PLUS]:"+=left",[ef.END]:"right",[ef.END_PLUS]:"+=right"},rf=(e,t,n)=>{const r=e===Vl.Y?tf:nf;return t===ef.START||t===ef.END?`${r[t]}`:`${null!=n?n:""}${r[t]}`};var of,sf;!function(e){e[e.SMOOTH=0]="SMOOTH",e[e.INSTANT=1]="INSTANT"}(of||(of={})),function(e){e[e.NORMAL=1]="NORMAL",e[e.REVERSE=2]="REVERSE",e[e.ALTERNATE=3]="ALTERNATE"}(sf||(sf={}));const af={[sf.NORMAL]:"normal",[sf.REVERSE]:"reverse",[sf.ALTERNATE]:"alternate"},uf=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()]:[]},cf=(e,t={},n,r)=>{const o=Object.entries(t).reduce((e,[t,n])=>(e[t]=Ql[n],e),{}),[i,s]=(0,F.useState)({}),a=(0,F.useMemo)(()=>{const t=Object.entries(e).reduce((e,[t])=>(e[t]={complete:!1},e),{}),r={},i={},u=(o,a)=>{var u,c,l,f,p,d;const h=o.name;let m=r[h];if(!m){const v=af[o.direction||sf.NORMAL];i[h]={direction:v};let y=!1;const b=o.config;if(b.type_===Xl.SCROLL_SYNC){const e=b.smoothness.type===of.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=rf(b.direction,b.container.enter.type,b.container.enter.value),i=rf(b.direction,b.container.leave.type,b.container.leave.value),s=rf(b.direction,b.target.enter.type,b.target.enter.value),a=rf(b.direction,b.target.leave.type,b.target.leave.value);y=ql({axis:b.direction===Vl.Y?"y":"x",container:t,target:r,sync:e,enter:`${o} ${s}`,leave:`${i} ${a}`})}else if(b.type_===Xl.AUTOPLAY&&b.on.type_===Kl.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=rf(b.on.direction,b.on.container.enter.type,b.on.container.enter.value),o=rf(b.on.direction,b.on.container.leave.type,b.on.container.leave.value),i=rf(b.on.direction,b.on.target.enter.type,b.on.target.enter.value),s=rf(b.on.direction,b.on.target.leave.type,b.on.target.leave.value);y=ql({axis:b.on.direction===Vl.Y?"y":"x",container:e,target:t,sync:!0,enter:`${r} ${i}`,leave:`${o} ${s}`})}else b.type_===Xl.AUTOPLAY&&b.on.type_===Kl.MOUNT&&(y=!0);let _=!1;const w=(g={alternate:"alternate"===v,autoplay:y,loop:!!o.loop,onBegin:()=>{_&&(t[o.name].begin=!0,t[o.name].complete=!1,o.listener&&s({}))},onUpdate:e=>{_&&1===e.progress&&(t[o.name].begin=!0,t[o.name].complete=!0,o.listener&&s({}))},defaults:{duration:1e3*o.seconds}},new jl(g).init());null===(d=Object.values(e).find(e=>e.node===o))||void 0===d||d.data.forEach(e=>{ff={},w.add(e.targets,e.params,0),ff={}}),m={node:o,instance:w,elements:a},r[h]=m,m.instance.seek(Number(m.instance.defaults.duration)),m.instance.seek(0),_=!0,m.instance.onComplete=()=>{i[h].playing=!1}}var g;return m.instance};return{player:o,states:t,list:r,play:(e,t)=>{const n=u(e),r=e.name;"play"!==i[r].state&&(i[r].state="play",i[r].reverse||t&&n.paused&&n.restart(),n.play(),i[r].reverse=!1,i[r].playing=!0)},pause:e=>{const t=e.name;"pause"!==i[t].state&&(i[t].state="pause",u(e).pause(),i[t].playing=!1)},reverse:e=>{const t=e.name;"reverse"!==i[t].state&&(i[t].state="reverse",u(e).reverse(),i[t].reverse=!0,i[t].playing=!0)},get:u,destroy:e=>{let t=r[e.name];t&&(delete i[e.name],delete r[e.name],t.instance.pause())},direction:e=>i[e.name].direction,clean:()=>Object.entries(a.list).forEach(([t,n])=>{var r,o;const i=e[t],s=i?uf(i.data):[];((null===(r=n.elements)||void 0===r?void 0:r.length)!==s.length||(null===(o=n.elements)||void 0===o?void 0:o.map(e=>s.includes(e)).includes(!1)))&&a.destroy(n.node)})}},[]);return a.player=o,(0,F.useLayoutEffect)(()=>{const n=new MutationObserver(e=>{for(const t of e)"childList"===t.type?console.log("A child node has been added or removed."):"attributes"===t.type&&console.log(`The ${t.attributeName} attribute was modified.`)});return r&&n.observe(r,{childList:!0,subtree:!0}),a.clean(),Object.entries(t).forEach(([t,n])=>{const r=e[t];if(!r)return;if(n===Jl.IGNORE)return;if(n===Jl.DESTROY)return void a.destroy(r.node);const o=uf(r.data);o.length?(a.get(r.node,o),n===Jl.PLAY?r&&a.play(r.node):n===Jl.PAUSE?r&&a.pause(r.node):n===Jl.RE_PLAY?r&&a.play(r.node,!0):n===Jl.REVERSE&&r&&a.reverse(r.node)):a.destroy(r.node)}),()=>{n.disconnect()}},[r]),{instances:a}},lf=({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 ff={};const pf=(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=ff[`${r}-${i}`];let d=f;return p&&(d=-p+f),ff[`${r}-${i}`]=void 0===p?f:p+d,d};let df=0;const hf=()=>(0,F.useMemo)(()=>"C"+ ++df,[]),mf=e=>{const t=(0,F.useMemo)(()=>({current:!1,timeout:void 0}),[]);(0,F.useEffect)(()=>{t.current||e.option.runOnInit?e.option.debounce?(t.timeout&&clearTimeout(t.timeout),t.timeout=setTimeout(()=>{t.timeout=void 0,e.on()},e.option.delay)):e.on():t.current=!0},e.values)},gf=(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},vf=(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},yf=(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},bf=(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},_f=e=>"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?e.toString():void 0,wf=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 xf,Ef;!function(e){e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT",e[e.BOTTOM=4]="BOTTOM"}(xf||(xf={})),function(e){e[e.PLUS=1]="PLUS",e[e.MINUS=2]="MINUS"}(Ef||(Ef={}));const Tf=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===xf.TOP?o=Number(t.scrollTop+(s.top-i.top)):e.config===xf.BOTTOM?o=Number(t.scrollTop+(s.bottom-i.top)):e.config===xf.LEFT?o=Number(t.scrollLeft+(s.left-i.left)):e.config===xf.RIGHT&&(o=Number(t.scrollLeft+(s.right-i.left))),e.operator===Ef.PLUS?o+=n:e.operator===Ef.MINUS&&(o-=n)}else e.config===xf.TOP?o=0:e.config===xf.BOTTOM?o=-t.scrollHeight:e.config===xf.LEFT?o=0:e.config===xf.RIGHT&&(o=-t.scrollWidth),e.operator===Ef.PLUS?o+=n:e.operator===Ef.MINUS&&(o-=n);e.config===xf.TOP||e.config===xf.BOTTOM?t.scrollTo({behavior:"instant",top:o}):t.scrollTo({behavior:"instant",left:o})}},Sf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Rf=e=>({text:e.currentTarget.value||"",element:e.currentTarget}),Of=e=>({element:e.currentTarget}),Af=e=>({element:e.currentTarget}),Lf=e=>({element:e.currentTarget})})(),u})());
|
|
@@ -34,7 +34,7 @@ export declare const ResponsiveDiv: (props: {
|
|
|
34
34
|
divProps?: react.DOMAttributes<HTMLDivElement> & {
|
|
35
35
|
ref?: (elm?: any) => void;
|
|
36
36
|
};
|
|
37
|
-
children
|
|
37
|
+
children?: (screen?: string) => react.ReactNode;
|
|
38
38
|
sizes: {
|
|
39
39
|
width: number;
|
|
40
40
|
className: string[];
|
package/dist/utils/timeline.d.ts
CHANGED
|
@@ -151,8 +151,8 @@ export declare const getTimelineElements: (data: {
|
|
|
151
151
|
}[]) => Element[];
|
|
152
152
|
export declare const useTimeline: <T extends Timelines, Keys extends keyof T>(timelinesData: Timelines, states: { [K_2 in Keys]?: TimelineCommandOption; } | undefined, styles: {
|
|
153
153
|
readonly [key: string]: string;
|
|
154
|
-
}) => {
|
|
155
|
-
|
|
154
|
+
}, rootElement?: HTMLDivElement) => {
|
|
155
|
+
instances: {
|
|
156
156
|
player: { [K in Keys]: TimelineCommands; };
|
|
157
157
|
states: { [K_1 in Keys]: TimelineState; };
|
|
158
158
|
list: {
|