(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(":root{--dark-background-color: #1c1e21;--dark-close-icon-hover: #ffffff33;--dark-close-icon: #ffffff1a;--dark-close: #ffffff;--dark-text: #1c1e21;--default-background-color: #ffffff;--default-close-icon-hover: #e4e6eb;--default-close-icon: #e4e6eba5;--default-close: rgb(28, 30, 33);--default-text: #e4e6eb;--enter-animation: cubic-bezier(.14, 1, .34, 1);--exit-animation: cubic-bezier(.45, .1, .2, 1);--green-color: #00a400;--link-color: #4599ff;--main-icon-color: #bcc0c4}.App{text-align:center;display:flex;align-items:center;flex-direction:column}.statusNotification{align-items:center;border-radius:8px;box-sizing:content-box;direction:ltr;display:flex;height:48px;justify-content:center;line-height:16px;min-width:288;padding:16px 10px;position:fixed;text-align:left;transform:scale(1);z-index:10000;-webkit-box-align:center;-webkit-box-pack:start;-webkit-font-smoothing:antialiased;box-shadow:0 0 10px #1e293c33}.defaultColor{background-color:var(--default-background-color);color:var(--dark-text)}.darkColor{background-color:var(--dark-background-color);color:var(--default-text)}.topLeft{top:24px;left:24px}.topRight{top:24px;right:24px}.topCenter{top:24px}.bottomRight{bottom:24px;right:24px}.bottomLeft{bottom:24px;left:24px}.bottomCenter{bottom:24px}.onlineColor{fill:var(--green-color)}.mainColor{fill:var(--main-icon-color)}.statusNotification div{padding:6px}.statusNotification>.statusNotificationIcon{box-sizing:border-box;pointer-events:all;position:relative;-webkit-font-smoothing:antialiased}.statusNotification>.statusNotificationRefresh>span{cursor:pointer}.statusNotification>.statusNotificationRefresh{color:var(--link-color);direction:ltr;display:block;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;line-height:18px;max-width:100%;min-width:0px;outline-color:var(--link-color);overflow-wrap:break-word;pointer-events:all;text-align:left;touch-action:manipulation;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;-ms-touch-action:manipulation}.statusNotification>.statusNotificationRefresh:hover{text-decoration:underline solid var(--link-color) auto}.statusNotification>.statusNotificationCloseIcon{display:flex;justify-content:center;align-items:center;flex-direction:column;cursor:pointer;border-radius:50%}.statusNotification>.statusNotificationCloseIcon.defaultColor{background-color:var(--default-close-icon);fill:var(--default-close)}.statusNotification>.statusNotificationCloseIcon.defaultColor:hover{background-color:var(--default-close-icon-hover)}.statusNotification>.statusNotificationCloseIcon.darkColor{background-color:var(--dark-close-icon);fill:var(--dark-close)}.statusNotification>.statusNotificationCloseIcon.darkColor:hover{background-color:var(--dark-close-icon-hover)}.fade-enter,.fade-appear{opacity:0;transform:translateY(100%)}.fade-enter-active,.fade-appear-active{opacity:1;transform:translateY(0);transition:opacity .26s,transform .26s var(--enter-animation);-o-transition:opacity .26s,transform .26s var(--enter-animation);-moz-transition:opacity .26s,transform .26s var(--enter-animation);-webkit-transition:opacity .26s,transform .26s var(--enter-animation)}.fade-enter-done{opacity:1}.fade-exit{opacity:1;transform:translateY(0)}.fade-exit-active{opacity:.3;transform:translateY(200%);transition:opacity .26s,transform .26s var(--exit-animation);-o-transition:opacity .26s,transform .26s var(--exit-animation);-moz-transition:opacity .26s,transform .26s var(--exit-animation);-webkit-transition:opacity .26s,transform .26s var(--exit-animation)}.fade-exit-done{opacity:0}")),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(); "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),E=require("react-transition-group");function u(t){const i=Math.floor((new Date().getTime()-t.getTime())/1e3);let e=i/31536e3;return e>1?Math.floor(e)+" years":(e=i/2592e3,e>1?Math.floor(e)+" months":(e=i/86400,e>1?Math.floor(e)+" days":(e=i/3600,e>1?Math.floor(e)+" hours":(e=i/60,e>2?Math.floor(e)+" minutes":e>1?Math.floor(e)+" minute":Math.floor(i)+" seconds"))))}const b="https://www.gstatic.com/generate_204",D=typeof window<"u",R=typeof navigator<"u";function S(){return R?(navigator==null?void 0:navigator.connection)||(navigator==null?void 0:navigator.mozConnection)||(navigator==null?void 0:navigator.webkitConnection)||null:!1}const F=R?navigator.onLine:!0;function z(t,i){let e;switch(i.type){case"offline":t.online?t.online&&(e={...t,online:!1,time:{since:new Date,diff:u(new Date)}}):e={...t,online:!1,time:{since:t.time.since,diff:u(t.time.since)}};break;case"online":t.online?e={...t,online:!0,time:{since:t.time.since,diff:u(t.time.since)}}:t.online||(e={...t,online:!0,time:{since:new Date,diff:u(new Date)}});break;default:e={...t}}return e}function p({pollingUrl:t=b,pollingDuration:i=12e3}={}){const[e,r]=n.useReducer(z,{online:F,time:{since:new Date,diff:u(new Date)}}),c=S(),f=n.useCallback(async()=>{await fetch(t,{mode:"no-cors"}).then(o=>o&&r({type:"online"})).catch(()=>r({type:"offline"}))},[t]);A(f,i);const s=n.useCallback(async({type:o})=>{o==="online"?f():r({type:"offline"})},[f]);return n.useEffect(()=>{if(D)return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}},[s]),{attributes:{isOnline:e.online},connectionInfo:c,error:null,isOffline:!e.online,isOnline:e.online,time:{since:e.time.since,difference:e.time.diff}}}function A(t,i){const e=n.useRef();n.useEffect(()=>{e.current=t},[t]),n.useEffect(()=>{function r(){e.current()}if(i!==null){const c=setInterval(r,i);return()=>clearInterval(c)}},[i])}function B(){const[t,i]=n.useState(!0),{isOffline:e}=p();return n.useEffect(()=>{t&&e&&i(!1)},[e]),{isFirstRender:t}}const T=n.createElement("svg",{viewBox:"0 0 24 24",className:"mainColor",height:"24",width:"24"},n.createElement("path",{d:"M23.7805.2195c.2925.293.2925.768 0 1.061l-22.5 22.5C1.134 23.927.942 24 .75 24c-.192 0-.384-.073-.5305-.2195-.2925-.293-.2925-.768 0-1.061l12.1967947-12.1971509c-2.3773758-.1150468-4.79162015.7286756-6.6038447 2.5401009-.3905.3905-1.0235.3905-1.414 0-.3905-.3905-.3905-1.024 0-1.414 2.65728981-2.65728981 6.3696459-3.62280965 9.8005664-2.90852144l2.430738-2.43186193C11.7816792 4.58111626 6.15198938 5.65271062 2.27735 9.52735c-.3905.3905-1.0235.3905-1.414 0-.3905-.3905-.3905-1.0235 0-1.414 4.6714534-4.67191574 11.571522-5.78608437 17.3096457-3.34843552L22.7195.2195c.293-.2925.768-.2925 1.061 0zM12 18.5c.6905 0 1.25.5595 1.25 1.25S12.6905 21 12 21s-1.25-.5595-1.25-1.25.5595-1.25 1.25-1.25zm1.4175-4.81495c.9705.2455 1.8905.741 2.6485 1.499.3905.3905.3905 1.0235 0 1.414-.1955.1955-.451.293-.707.293-.256 0-.512-.0975-.707-.293-.7835333-.7835333-1.8301422-1.1445778-2.8581093-1.0880116L11.574 15.52855l1.8435-1.8435zm3.8154-3.8154c.848.4725 1.649 1.059 2.3685 1.779.391.39.391 1.023 0 1.414-.195.195-.451.293-.707.293-.2555 0-.5115-.098-.707-.293-.7285-.728-1.5575-1.291-2.439-1.7085zm2.1908-2.1908l1.4425-1.4425c.8.545 1.5615 1.168 2.2705 1.877.3905.3905.3905 1.0235 0 1.414-.1955.1955-.451.293-.707.293-.256 0-.5115-.0975-.707-.293-.5933333-.59333333-1.2283333-1.11861111-1.895162-1.57959491L19.4237 7.67885l1.4425-1.4425z"})),Z=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9.627",height:"9.632",viewBox:"0 0 9.627 9.632"},n.createElement("path",{d:"M73.468,72.3l-3.137-3.149a.215.215,0,0,1,0-.3l3.144-3.108a.348.348,0,0,0,0-.491l-.938-.943a.345.345,0,0,0-.246-.1.356.356,0,0,0-.246.1l-3.131,3.1a.215.215,0,0,1-.3,0l-3.136-3.1a.345.345,0,0,0-.246-.1.356.356,0,0,0-.246.1l-.935.943a.348.348,0,0,0,0,.491L67.2,68.845a.215.215,0,0,1,0,.3L64.062,72.3a.347.347,0,0,0-.1.246.337.337,0,0,0,.1.246L65,73.73a.346.346,0,0,0,.246.1.34.34,0,0,0,.246-.1l3.122-3.137a.215.215,0,0,1,.3,0l3.125,3.134a.346.346,0,0,0,.246.1.34.34,0,0,0,.246-.1l.938-.943a.347.347,0,0,0,.1-.246A.36.36,0,0,0,73.468,72.3Z",transform:"translate(-63.95 -64.2)"})),_=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"onlineColor",width:"20.424",height:"15.62",viewBox:"0 0 20.424 15.62"},n.createElement("g",{transform:"translate(-254.91 -407.348)"},n.createElement("path",{d:"M275.073,411.455a14.062,14.062,0,0,0-4.44-2.988l0,0c-.136-.057-.274-.1-.411-.156-.169-.066-.337-.135-.508-.194s-.35-.11-.525-.163c-.156-.047-.311-.1-.468-.139-.187-.05-.375-.089-.564-.131-.15-.033-.3-.069-.448-.1-.191-.036-.382-.062-.573-.09-.151-.022-.3-.047-.455-.064-.186-.021-.371-.033-.557-.045-.161-.012-.322-.026-.483-.032s-.348,0-.522,0-.348,0-.522,0-.322.02-.483.032c-.186.013-.371.024-.557.045-.152.017-.3.042-.455.064-.191.028-.382.054-.574.09-.15.028-.3.064-.448.1-.188.042-.377.081-.564.131-.157.041-.312.092-.468.139-.175.053-.351.1-.525.163s-.339.128-.508.194c-.137.053-.275.1-.411.156l0,0a14.061,14.061,0,0,0-4.44,2.988.893.893,0,0,0,1.263,1.263,12.274,12.274,0,0,1,4.817-2.961c.157-.052.315-.1.473-.15.128-.037.257-.069.386-.1.149-.037.3-.075.448-.107s.277-.054.416-.078.286-.051.429-.071.287-.035.431-.05.283-.03.425-.04.288-.015.432-.02.286-.01.429-.01.285,0,.429.01.289.01.432.02.283.025.425.04.288.03.431.05.286.046.429.071.278.049.416.078.3.07.448.107c.129.033.258.064.386.1.159.045.317.1.474.15a12.275,12.275,0,0,1,4.817,2.961.893.893,0,0,0,1.263-1.263Z",transform:"translate(0 0)"}),n.createElement("path",{d:"M275.846,420.176a9.588,9.588,0,0,0-6.014-2.771l-.067,0c-.152-.011-.305-.02-.458-.023-.087,0-.175,0-.262,0s-.175,0-.263,0c-.153,0-.305.012-.458.023l-.067,0a9.589,9.589,0,0,0-6.014,2.771.893.893,0,0,0,1.263,1.263,7.891,7.891,0,0,1,11.077,0,.893.893,0,0,0,1.263-1.263Z",transform:"translate(-3.923 -5.561)"}),n.createElement("path",{d:"M276.453,437.411a1.117,1.117,0,1,1-1.117,1.117h0A1.117,1.117,0,0,1,276.453,437.411Z",transform:"translate(-11.33 -16.676)"}),n.createElement("path",{d:"M276.531,428.72a5.1,5.1,0,0,0-1.919-1.195,5.288,5.288,0,0,0-4.193,0,5.092,5.092,0,0,0-1.919,1.195.894.894,0,1,0,1.265,1.264,3.332,3.332,0,0,1,1.7-.907,4.661,4.661,0,0,1,2.1,0,3.333,3.333,0,0,1,1.7.907.894.894,0,0,0,1.265-1.264Z",transform:"translate(-7.394 -10.952)"}))),j="Your internet connection was restored.",P="You are currently offline.",q=n.forwardRef((t,i)=>{const[e,r]=n.useState(!1),{darkMode:c=!1,destoryOnClose:f=!0,duration:s=4500,eventsCallback:o,isOnline:a,position:L="bottomLeft",statusText:M}=t,[g,C]=n.useState(!1),N=n.useRef(null),k=n.useRef(null),h=n.useRef(null),{isFirstRender:w}=B(),m=a?N:k,d=l=>r(l);n.useImperativeHandle(i,()=>({openStatus:()=>d(!0)})),n.useEffect(()=>{if(!w)return d(!0)},[a,w]),n.useEffect(()=>{const l=()=>h.current&&clearTimeout(h.current);if(!g&&s>0&&e)return h.current=setTimeout(()=>{d(!1)},s),l},[s,g,e,a]);const y=()=>{o.onRefreshClick?o.onRefreshClick():location.reload()},I=l=>{l.preventDefault(),l.stopPropagation(),o!=null&&o.onCloseClick&&o.onCloseClick(),d(!1)};return w&&a?null:n.createElement(E.CSSTransition,{in:e,timeout:260,nodeRef:m,appear:!0,classNames:"fade",unmountOnExit:f},n.createElement(E.SwitchTransition,{mode:"out-in"},n.createElement(E.CSSTransition,{key:a?"Online":"Offline",nodeRef:m,addEndListener:l=>{var v;(v=m.current)==null||v.addEventListener("transitionend",l,!1)},classNames:"fade"},n.createElement("div",{className:O("statusNotification",c?"darkColor":"defaultColor",L),ref:m,onMouseEnter:()=>{C(!0)},onMouseLeave:()=>{C(!1)}},n.createElement("div",{className:"statusNotificationIcon"},a?_:T),n.createElement("div",null,H(a,M)),!a&&n.createElement("div",{className:"statusNotificationRefresh"},n.createElement("span",{onClick:y},"Refresh")),n.createElement("div",{className:O("statusNotificationCloseIcon",c?"darkColor":"defaultColor"),onClick:I},Z)))))}),G=n.memo(q),H=(t,i)=>t?(i==null?void 0:i.online)??j:(i==null?void 0:i.offline)??P,O=(...t)=>t.filter(Boolean).join(" ");exports.OnlineStatusNotification=G;exports.useOnlineStatus=p;