(function(){"use strict";function Mx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Qr={exports:{}},na={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Hd;function Tx(){if(Hd)return na;Hd=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function o(a,s,r){var u=null;if(r!==void 0&&(u=""+r),s.key!==void 0&&(u=""+s.key),"key"in s){r={};for(var f in s)f!=="key"&&(r[f]=s[f])}else r=s;return s=r.ref,{$$typeof:n,type:a,key:u,ref:s!==void 0?s:null,props:r}}return na.Fragment=e,na.jsx=o,na.jsxs=o,na}var Ud;function Ax(){return Ud||(Ud=1,Qr.exports=Tx()),Qr.exports}var g=Ax(),Zr={exports:{}},mt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Vd;function Nx(){if(Vd)return mt;Vd=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),r=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=y&&A[y]||A["@@iterator"],typeof A=="function"?A:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function j(A,X,nt){this.props=A,this.context=X,this.refs=C,this.updater=nt||_}j.prototype.isReactComponent={},j.prototype.setState=function(A,X){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,X,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function M(){}M.prototype=j.prototype;function D(A,X,nt){this.props=A,this.context=X,this.refs=C,this.updater=nt||_}var U=D.prototype=new M;U.constructor=D,k(U,j.prototype),U.isPureReactComponent=!0;var z=Array.isArray,w={H:null,A:null,T:null,S:null,V:null},Y=Object.prototype.hasOwnProperty;function G(A,X,nt,it,lt,bt){return nt=bt.ref,{$$typeof:n,type:A,key:X,ref:nt!==void 0?nt:null,props:bt}}function K(A,X){return G(A.type,X,void 0,void 0,void 0,A.props)}function I(A){return typeof A=="object"&&A!==null&&A.$$typeof===n}function J(A){var X={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(nt){return X[nt]})}var ot=/\/+/g;function L(A,X){return typeof A=="object"&&A!==null&&A.key!=null?J(""+A.key):X.toString(36)}function gt(){}function rt(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(gt,gt):(A.status="pending",A.then(function(X){A.status==="pending"&&(A.status="fulfilled",A.value=X)},function(X){A.status==="pending"&&(A.status="rejected",A.reason=X)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function tt(A,X,nt,it,lt){var bt=typeof A;(bt==="undefined"||bt==="boolean")&&(A=null);var ut=!1;if(A===null)ut=!0;else switch(bt){case"bigint":case"string":case"number":ut=!0;break;case"object":switch(A.$$typeof){case n:case e:ut=!0;break;case b:return ut=A._init,tt(ut(A._payload),X,nt,it,lt)}}if(ut)return lt=lt(A),ut=it===""?"."+L(A,0):it,z(lt)?(nt="",ut!=null&&(nt=ut.replace(ot,"$&/")+"/"),tt(lt,X,nt,"",function(We){return We})):lt!=null&&(I(lt)&&(lt=K(lt,nt+(lt.key==null||A&&A.key===lt.key?"":(""+lt.key).replace(ot,"$&/")+"/")+ut)),X.push(lt)),1;ut=0;var pe=it===""?".":it+":";if(z(A))for(var Vt=0;Vt<A.length;Vt++)it=A[Vt],bt=pe+L(it,Vt),ut+=tt(it,X,nt,bt,lt);else if(Vt=v(A),typeof Vt=="function")for(A=Vt.call(A),Vt=0;!(it=A.next()).done;)it=it.value,bt=pe+L(it,Vt++),ut+=tt(it,X,nt,bt,lt);else if(bt==="object"){if(typeof A.then=="function")return tt(rt(A),X,nt,it,lt);throw X=String(A),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return ut}function H(A,X,nt){if(A==null)return A;var it=[],lt=0;return tt(A,it,"","",function(bt){return X.call(nt,bt,lt++)}),it}function Z(A){if(A._status===-1){var X=A._result;X=X(),X.then(function(nt){(A._status===0||A._status===-1)&&(A._status=1,A._result=nt)},function(nt){(A._status===0||A._status===-1)&&(A._status=2,A._result=nt)}),A._status===-1&&(A._status=0,A._result=X)}if(A._status===1)return A._result.default;throw A._result}var at=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function ct(){}return mt.Children={map:H,forEach:function(A,X,nt){H(A,function(){X.apply(this,arguments)},nt)},count:function(A){var X=0;return H(A,function(){X++}),X},toArray:function(A){return H(A,function(X){return X})||[]},only:function(A){if(!I(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},mt.Component=j,mt.Fragment=o,mt.Profiler=s,mt.PureComponent=D,mt.StrictMode=a,mt.Suspense=h,mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,mt.__COMPILER_RUNTIME={__proto__:null,c:function(A){return w.H.useMemoCache(A)}},mt.cache=function(A){return function(){return A.apply(null,arguments)}},mt.cloneElement=function(A,X,nt){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var it=k({},A.props),lt=A.key,bt=void 0;if(X!=null)for(ut in X.ref!==void 0&&(bt=void 0),X.key!==void 0&&(lt=""+X.key),X)!Y.call(X,ut)||ut==="key"||ut==="__self"||ut==="__source"||ut==="ref"&&X.ref===void 0||(it[ut]=X[ut]);var ut=arguments.length-2;if(ut===1)it.children=nt;else if(1<ut){for(var pe=Array(ut),Vt=0;Vt<ut;Vt++)pe[Vt]=arguments[Vt+2];it.children=pe}return G(A.type,lt,void 0,void 0,bt,it)},mt.createContext=function(A){return A={$$typeof:u,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:r,_context:A},A},mt.createElement=function(A,X,nt){var it,lt={},bt=null;if(X!=null)for(it in X.key!==void 0&&(bt=""+X.key),X)Y.call(X,it)&&it!=="key"&&it!=="__self"&&it!=="__source"&&(lt[it]=X[it]);var ut=arguments.length-2;if(ut===1)lt.children=nt;else if(1<ut){for(var pe=Array(ut),Vt=0;Vt<ut;Vt++)pe[Vt]=arguments[Vt+2];lt.children=pe}if(A&&A.defaultProps)for(it in ut=A.defaultProps,ut)lt[it]===void 0&&(lt[it]=ut[it]);return G(A,bt,void 0,void 0,null,lt)},mt.createRef=function(){return{current:null}},mt.forwardRef=function(A){return{$$typeof:f,render:A}},mt.isValidElement=I,mt.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:Z}},mt.memo=function(A,X){return{$$typeof:p,type:A,compare:X===void 0?null:X}},mt.startTransition=function(A){var X=w.T,nt={};w.T=nt;try{var it=A(),lt=w.S;lt!==null&&lt(nt,it),typeof it=="object"&&it!==null&&typeof it.then=="function"&&it.then(ct,at)}catch(bt){at(bt)}finally{w.T=X}},mt.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},mt.use=function(A){return w.H.use(A)},mt.useActionState=function(A,X,nt){return w.H.useActionState(A,X,nt)},mt.useCallback=function(A,X){return w.H.useCallback(A,X)},mt.useContext=function(A){return w.H.useContext(A)},mt.useDebugValue=function(){},mt.useDeferredValue=function(A,X){return w.H.useDeferredValue(A,X)},mt.useEffect=function(A,X,nt){var it=w.H;if(typeof nt=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return it.useEffect(A,X)},mt.useId=function(){return w.H.useId()},mt.useImperativeHandle=function(A,X,nt){return w.H.useImperativeHandle(A,X,nt)},mt.useInsertionEffect=function(A,X){return w.H.useInsertionEffect(A,X)},mt.useLayoutEffect=function(A,X){return w.H.useLayoutEffect(A,X)},mt.useMemo=function(A,X){return w.H.useMemo(A,X)},mt.useOptimistic=function(A,X){return w.H.useOptimistic(A,X)},mt.useReducer=function(A,X,nt){return w.H.useReducer(A,X,nt)},mt.useRef=function(A){return w.H.useRef(A)},mt.useState=function(A){return w.H.useState(A)},mt.useSyncExternalStore=function(A,X,nt){return w.H.useSyncExternalStore(A,X,nt)},mt.useTransition=function(){return w.H.useTransition()},mt.version="19.1.1",mt}var Pd;function Ir(){return Pd||(Pd=1,Zr.exports=Nx()),Zr.exports}var E=Ir();const Te=Mx(E);var Jr={exports:{}},ia={},tc={exports:{}},ec={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Yd;function Ox(){return Yd||(Yd=1,(function(n){function e(H,Z){var at=H.length;H.push(Z);t:for(;0<at;){var ct=at-1>>>1,A=H[ct];if(0<s(A,Z))H[ct]=Z,H[at]=A,at=ct;else break t}}function o(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var Z=H[0],at=H.pop();if(at!==Z){H[0]=at;t:for(var ct=0,A=H.length,X=A>>>1;ct<X;){var nt=2*(ct+1)-1,it=H[nt],lt=nt+1,bt=H[lt];if(0>s(it,at))lt<A&&0>s(bt,it)?(H[ct]=bt,H[lt]=at,ct=lt):(H[ct]=it,H[nt]=at,ct=nt);else if(lt<A&&0>s(bt,at))H[ct]=bt,H[lt]=at,ct=lt;else break t}}return Z}function s(H,Z){var at=H.sortIndex-Z.sortIndex;return at!==0?at:H.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;n.unstable_now=function(){return r.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var h=[],p=[],b=1,y=null,v=3,_=!1,k=!1,C=!1,j=!1,M=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function z(H){for(var Z=o(p);Z!==null;){if(Z.callback===null)a(p);else if(Z.startTime<=H)a(p),Z.sortIndex=Z.expirationTime,e(h,Z);else break;Z=o(p)}}function w(H){if(C=!1,z(H),!k)if(o(h)!==null)k=!0,Y||(Y=!0,L());else{var Z=o(p);Z!==null&&tt(w,Z.startTime-H)}}var Y=!1,G=-1,K=5,I=-1;function J(){return j?!0:!(n.unstable_now()-I<K)}function ot(){if(j=!1,Y){var H=n.unstable_now();I=H;var Z=!0;try{t:{k=!1,C&&(C=!1,D(G),G=-1),_=!0;var at=v;try{e:{for(z(H),y=o(h);y!==null&&!(y.expirationTime>H&&J());){var ct=y.callback;if(typeof ct=="function"){y.callback=null,v=y.priorityLevel;var A=ct(y.expirationTime<=H);if(H=n.unstable_now(),typeof A=="function"){y.callback=A,z(H),Z=!0;break e}y===o(h)&&a(h),z(H)}else a(h);y=o(h)}if(y!==null)Z=!0;else{var X=o(p);X!==null&&tt(w,X.startTime-H),Z=!1}}break t}finally{y=null,v=at,_=!1}Z=void 0}}finally{Z?L():Y=!1}}}var L;if(typeof U=="function")L=function(){U(ot)};else if(typeof MessageChannel<"u"){var gt=new MessageChannel,rt=gt.port2;gt.port1.onmessage=ot,L=function(){rt.postMessage(null)}}else L=function(){M(ot,0)};function tt(H,Z){G=M(function(){H(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(H){switch(v){case 1:case 2:case 3:var Z=3;break;default:Z=v}var at=v;v=Z;try{return H()}finally{v=at}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(H,Z){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var at=v;v=H;try{return Z()}finally{v=at}},n.unstable_scheduleCallback=function(H,Z,at){var ct=n.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?ct+at:ct):at=ct,H){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=at+A,H={id:b++,callback:Z,priorityLevel:H,startTime:at,expirationTime:A,sortIndex:-1},at>ct?(H.sortIndex=at,e(p,H),o(h)===null&&H===o(p)&&(C?(D(G),G=-1):C=!0,tt(w,at-ct))):(H.sortIndex=A,e(h,H),k||_||(k=!0,Y||(Y=!0,L()))),H},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(H){var Z=v;return function(){var at=v;v=Z;try{return H.apply(this,arguments)}finally{v=at}}}})(ec)),ec}var qd;function Rx(){return qd||(qd=1,tc.exports=Ox()),tc.exports}var nc={exports:{}},fe={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fd;function Dx(){if(Fd)return fe;Fd=1;var n=Ir();function e(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(e(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal");function r(h,p,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:h,containerInfo:p,implementation:b}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return fe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,fe.createPortal=function(h,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return r(h,p,null,b)},fe.flushSync=function(h){var p=u.T,b=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=p,a.p=b,a.d.f()}},fe.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(h,p))},fe.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},fe.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var b=p.as,y=f(b,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?a.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:_}):b==="script"&&a.d.X(h,{crossOrigin:y,integrity:v,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},fe.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=f(p.as,p.crossOrigin);a.d.M(h,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(h)},fe.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,y=f(b,p.crossOrigin);a.d.L(h,b,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},fe.preloadModule=function(h,p){if(typeof h=="string")if(p){var b=f(p.as,p.crossOrigin);a.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(h)},fe.requestFormReset=function(h){a.d.r(h)},fe.unstable_batchedUpdates=function(h,p){return h(p)},fe.useFormState=function(h,p,b){return u.H.useFormState(h,p,b)},fe.useFormStatus=function(){return u.H.useHostTransitionStatus()},fe.version="19.1.1",fe}var Xd;function Gd(){if(Xd)return nc.exports;Xd=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),nc.exports=Dx(),nc.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Kd;function zx(){if(Kd)return ia;Kd=1;var n=Rx(),e=Ir(),o=Gd();function a(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function r(t){var i=t,l=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(l=i.return),t=i.return;while(t)}return i.tag===3?l:null}function u(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function f(t){if(r(t)!==t)throw Error(a(188))}function h(t){var i=t.alternate;if(!i){if(i=r(t),i===null)throw Error(a(188));return i!==t?null:t}for(var l=t,c=i;;){var d=l.return;if(d===null)break;var m=d.alternate;if(m===null){if(c=d.return,c!==null){l=c;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===l)return f(d),t;if(m===c)return f(d),i;m=m.sibling}throw Error(a(188))}if(l.return!==c.return)l=d,c=m;else{for(var x=!1,S=d.child;S;){if(S===l){x=!0,l=d,c=m;break}if(S===c){x=!0,c=d,l=m;break}S=S.sibling}if(!x){for(S=m.child;S;){if(S===l){x=!0,l=m,c=d;break}if(S===c){x=!0,c=m,l=d;break}S=S.sibling}if(!x)throw Error(a(189))}}if(l.alternate!==c)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?t:i}function p(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=p(t),i!==null)return i;t=t.sibling}return null}var b=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),D=Symbol.for("react.consumer"),U=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),ot=Symbol.iterator;function L(t){return t===null||typeof t!="object"?null:(t=ot&&t[ot]||t["@@iterator"],typeof t=="function"?t:null)}var gt=Symbol.for("react.client.reference");function rt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===gt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case j:return"Profiler";case C:return"StrictMode";case w:return"Suspense";case Y:return"SuspenseList";case I:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case _:return"Portal";case U:return(t.displayName||"Context")+".Provider";case D:return(t._context.displayName||"Context")+".Consumer";case z:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case G:return i=t.displayName||null,i!==null?i:rt(t.type)||"Memo";case K:i=t._payload,t=t._init;try{return rt(t(i))}catch{}}return null}var tt=Array.isArray,H=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},ct=[],A=-1;function X(t){return{current:t}}function nt(t){0>A||(t.current=ct[A],ct[A]=null,A--)}function it(t,i){A++,ct[A]=t.current,t.current=i}var lt=X(null),bt=X(null),ut=X(null),pe=X(null);function Vt(t,i){switch(it(ut,i),it(bt,t),it(lt,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?nx(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=nx(i),t=ix(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}nt(lt),it(lt,t)}function We(){nt(lt),nt(bt),nt(ut)}function Ha(t){t.memoizedState!==null&&it(pe,t);var i=lt.current,l=ix(i,t.type);i!==l&&(it(bt,t),it(lt,l))}function mo(t){bt.current===t&&(nt(lt),nt(bt)),pe.current===t&&(nt(pe),Rl._currentValue=at)}var Ua=Object.prototype.hasOwnProperty,Va=n.unstable_scheduleCallback,Pa=n.unstable_cancelCallback,Su=n.unstable_shouldYield,ju=n.unstable_requestPaint,$e=n.unstable_now,ku=n.unstable_getCurrentPriorityLevel,zs=n.unstable_ImmediatePriority,Ls=n.unstable_UserBlockingPriority,N=n.unstable_NormalPriority,wt=n.unstable_LowPriority,$t=n.unstable_IdlePriority,Nn=n.log,Be=n.unstable_setDisableYieldValue,Qe=null,xe=null;function ei(t){if(typeof Nn=="function"&&Be(t),xe&&typeof xe.setStrictMode=="function")try{xe.setStrictMode(Qe,t)}catch{}}var He=Math.clz32?Math.clz32:n3,t3=Math.log,e3=Math.LN2;function n3(t){return t>>>=0,t===0?32:31-(t3(t)/e3|0)|0}var Bs=256,Hs=4194304;function Hi(t){var i=t&42;if(i!==0)return i;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Us(t,i,l){var c=t.pendingLanes;if(c===0)return 0;var d=0,m=t.suspendedLanes,x=t.pingedLanes;t=t.warmLanes;var S=c&134217727;return S!==0?(c=S&~m,c!==0?d=Hi(c):(x&=S,x!==0?d=Hi(x):l||(l=S&~t,l!==0&&(d=Hi(l))))):(S=c&~m,S!==0?d=Hi(S):x!==0?d=Hi(x):l||(l=c&~t,l!==0&&(d=Hi(l)))),d===0?0:i!==0&&i!==d&&(i&m)===0&&(m=d&-d,l=i&-i,m>=l||m===32&&(l&4194048)!==0)?i:d}function Ya(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function i3(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Um(){var t=Bs;return Bs<<=1,(Bs&4194048)===0&&(Bs=256),t}function Vm(){var t=Hs;return Hs<<=1,(Hs&62914560)===0&&(Hs=4194304),t}function Cu(t){for(var i=[],l=0;31>l;l++)i.push(t);return i}function qa(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function o3(t,i,l,c,d,m){var x=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var S=t.entanglements,T=t.expirationTimes,P=t.hiddenUpdates;for(l=x&~l;0<l;){var W=31-He(l),Q=1<<W;S[W]=0,T[W]=-1;var q=P[W];if(q!==null)for(P[W]=null,W=0;W<q.length;W++){var F=q[W];F!==null&&(F.lane&=-536870913)}l&=~Q}c!==0&&Pm(t,c,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(x&~i))}function Pm(t,i,l){t.pendingLanes|=i,t.suspendedLanes&=~i;var c=31-He(i);t.entangledLanes|=i,t.entanglements[c]=t.entanglements[c]|1073741824|l&4194090}function Ym(t,i){var l=t.entangledLanes|=i;for(t=t.entanglements;l;){var c=31-He(l),d=1<<c;d&i|t[c]&i&&(t[c]|=i),l&=~d}}function Eu(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Mu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function qm(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:wx(t.type))}function a3(t,i){var l=Z.p;try{return Z.p=t,i()}finally{Z.p=l}}var ni=Math.random().toString(36).slice(2),me="__reactFiber$"+ni,je="__reactProps$"+ni,bo="__reactContainer$"+ni,Tu="__reactEvents$"+ni,l3="__reactListeners$"+ni,s3="__reactHandles$"+ni,Fm="__reactResources$"+ni,Fa="__reactMarker$"+ni;function Au(t){delete t[me],delete t[je],delete t[Tu],delete t[l3],delete t[s3]}function yo(t){var i=t[me];if(i)return i;for(var l=t.parentNode;l;){if(i=l[bo]||l[me]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(t=sx(t);t!==null;){if(l=t[me])return l;t=sx(t)}return i}t=l,l=t.parentNode}return null}function xo(t){if(t=t[me]||t[bo]){var i=t.tag;if(i===5||i===6||i===13||i===26||i===27||i===3)return t}return null}function Xa(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(a(33))}function vo(t){var i=t[Fm];return i||(i=t[Fm]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function oe(t){t[Fa]=!0}var Xm=new Set,Gm={};function Ui(t,i){_o(t,i),_o(t+"Capture",i)}function _o(t,i){for(Gm[t]=i,t=0;t<i.length;t++)Xm.add(i[t])}var r3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Km={},Wm={};function c3(t){return Ua.call(Wm,t)?!0:Ua.call(Km,t)?!1:r3.test(t)?Wm[t]=!0:(Km[t]=!0,!1)}function Vs(t,i,l){if(c3(i))if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,""+l)}}function Ps(t,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,""+l)}}function On(t,i,l,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(i,l,""+c)}}var Nu,$m;function wo(t){if(Nu===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);Nu=i&&i[1]||"",$m=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Nu+t+$m}var Ou=!1;function Ru(t,i){if(!t||Ou)return"";Ou=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(F){var q=F}Reflect.construct(t,[],Q)}else{try{Q.call()}catch(F){q=F}t.call(Q.prototype)}}else{try{throw Error()}catch(F){q=F}(Q=t())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(F){if(F&&q&&typeof F.stack=="string")return[F.stack,q.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),x=m[0],S=m[1];if(x&&S){var T=x.split(`
`),P=S.split(`
`);for(d=c=0;c<T.length&&!T[c].includes("DetermineComponentFrameRoot");)c++;for(;d<P.length&&!P[d].includes("DetermineComponentFrameRoot");)d++;if(c===T.length||d===P.length)for(c=T.length-1,d=P.length-1;1<=c&&0<=d&&T[c]!==P[d];)d--;for(;1<=c&&0<=d;c--,d--)if(T[c]!==P[d]){if(c!==1||d!==1)do if(c--,d--,0>d||T[c]!==P[d]){var W=`
`+T[c].replace(" at new "," at ");return t.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",t.displayName)),W}while(1<=c&&0<=d);break}}}finally{Ou=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?wo(l):""}function u3(t){switch(t.tag){case 26:case 27:case 5:return wo(t.type);case 16:return wo("Lazy");case 13:return wo("Suspense");case 19:return wo("SuspenseList");case 0:case 15:return Ru(t.type,!1);case 11:return Ru(t.type.render,!1);case 1:return Ru(t.type,!0);case 31:return wo("Activity");default:return""}}function Qm(t){try{var i="";do i+=u3(t),t=t.return;while(t);return i}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}function Ze(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Zm(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function f3(t){var i=Zm(t)?"checked":"value",l=Object.getOwnPropertyDescriptor(t.constructor.prototype,i),c=""+t[i];if(!t.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,m=l.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return d.call(this)},set:function(x){c=""+x,m.call(this,x)}}),Object.defineProperty(t,i,{enumerable:l.enumerable}),{getValue:function(){return c},setValue:function(x){c=""+x},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function Ys(t){t._valueTracker||(t._valueTracker=f3(t))}function Im(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var l=i.getValue(),c="";return t&&(c=Zm(t)?t.checked?"true":"false":t.value),t=c,t!==l?(i.setValue(t),!0):!1}function qs(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var d3=/[\n"\\]/g;function Ie(t){return t.replace(d3,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Du(t,i,l,c,d,m,x,S){t.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.type=x:t.removeAttribute("type"),i!=null?x==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+Ze(i)):t.value!==""+Ze(i)&&(t.value=""+Ze(i)):x!=="submit"&&x!=="reset"||t.removeAttribute("value"),i!=null?zu(t,x,Ze(i)):l!=null?zu(t,x,Ze(l)):c!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.name=""+Ze(S):t.removeAttribute("name")}function Jm(t,i,l,c,d,m,x,S){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),i!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||i!=null))return;l=l!=null?""+Ze(l):"",i=i!=null?""+Ze(i):l,S||i===t.value||(t.value=i),t.defaultValue=i}c=c??d,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=S?t.checked:!!c,t.defaultChecked=!!c,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.name=x)}function zu(t,i,l){i==="number"&&qs(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function So(t,i,l,c){if(t=t.options,i){i={};for(var d=0;d<l.length;d++)i["$"+l[d]]=!0;for(l=0;l<t.length;l++)d=i.hasOwnProperty("$"+t[l].value),t[l].selected!==d&&(t[l].selected=d),d&&c&&(t[l].defaultSelected=!0)}else{for(l=""+Ze(l),i=null,d=0;d<t.length;d++){if(t[d].value===l){t[d].selected=!0,c&&(t[d].defaultSelected=!0);return}i!==null||t[d].disabled||(i=t[d])}i!==null&&(i.selected=!0)}}function tb(t,i,l){if(i!=null&&(i=""+Ze(i),i!==t.value&&(t.value=i),l==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=l!=null?""+Ze(l):""}function eb(t,i,l,c){if(i==null){if(c!=null){if(l!=null)throw Error(a(92));if(tt(c)){if(1<c.length)throw Error(a(93));c=c[0]}l=c}l==null&&(l=""),i=l}l=Ze(i),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c)}function jo(t,i){if(i){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=i;return}}t.textContent=i}var h3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function nb(t,i,l){var c=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":c?t.setProperty(i,l):typeof l!="number"||l===0||h3.has(i)?i==="float"?t.cssFloat=l:t[i]=(""+l).trim():t[i]=l+"px"}function ib(t,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(t=t.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var d in i)c=i[d],i.hasOwnProperty(d)&&l[d]!==c&&nb(t,d,c)}else for(var m in i)i.hasOwnProperty(m)&&nb(t,m,i[m])}function Lu(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var g3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),p3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fs(t){return p3.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Bu=null;function Hu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ko=null,Co=null;function ob(t){var i=xo(t);if(i&&(t=i.stateNode)){var l=t[je]||null;t:switch(t=i.stateNode,i.type){case"input":if(Du(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ie(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var c=l[i];if(c!==t&&c.form===t.form){var d=c[je]||null;if(!d)throw Error(a(90));Du(c,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<l.length;i++)c=l[i],c.form===t.form&&Im(c)}break t;case"textarea":tb(t,l.value,l.defaultValue);break t;case"select":i=l.value,i!=null&&So(t,!!l.multiple,i,!1)}}}var Uu=!1;function ab(t,i,l){if(Uu)return t(i,l);Uu=!0;try{var c=t(i);return c}finally{if(Uu=!1,(ko!==null||Co!==null)&&(Tr(),ko&&(i=ko,t=Co,Co=ko=null,ob(i),t)))for(i=0;i<t.length;i++)ob(t[i])}}function Ga(t,i){var l=t.stateNode;if(l===null)return null;var c=l[je]||null;if(c===null)return null;l=c[i];t:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vu=!1;if(Rn)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){Vu=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{Vu=!1}var ii=null,Pu=null,Xs=null;function lb(){if(Xs)return Xs;var t,i=Pu,l=i.length,c,d="value"in ii?ii.value:ii.textContent,m=d.length;for(t=0;t<l&&i[t]===d[t];t++);var x=l-t;for(c=1;c<=x&&i[l-c]===d[m-c];c++);return Xs=d.slice(t,1<c?1-c:void 0)}function Gs(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function Ks(){return!0}function sb(){return!1}function ke(t){function i(l,c,d,m,x){this._reactName=l,this._targetInst=d,this.type=c,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var S in t)t.hasOwnProperty(S)&&(l=t[S],this[S]=l?l(m):m[S]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Ks:sb,this.isPropagationStopped=sb,this}return b(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ks)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ks)},persist:function(){},isPersistent:Ks}),i}var Vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ws=ke(Vi),Wa=b({},Vi,{view:0,detail:0}),m3=ke(Wa),Yu,qu,$a,$s=b({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==$a&&($a&&t.type==="mousemove"?(Yu=t.screenX-$a.screenX,qu=t.screenY-$a.screenY):qu=Yu=0,$a=t),Yu)},movementY:function(t){return"movementY"in t?t.movementY:qu}}),rb=ke($s),b3=b({},$s,{dataTransfer:0}),y3=ke(b3),x3=b({},Wa,{relatedTarget:0}),Fu=ke(x3),v3=b({},Vi,{animationName:0,elapsedTime:0,pseudoElement:0}),_3=ke(v3),w3=b({},Vi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),S3=ke(w3),j3=b({},Vi,{data:0}),cb=ke(j3),k3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C3={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},E3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function M3(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=E3[t])?!!i[t]:!1}function Xu(){return M3}var T3=b({},Wa,{key:function(t){if(t.key){var i=k3[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=Gs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?C3[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(t){return t.type==="keypress"?Gs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Gs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),A3=ke(T3),N3=b({},$s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ub=ke(N3),O3=b({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),R3=ke(O3),D3=b({},Vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),z3=ke(D3),L3=b({},$s,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),B3=ke(L3),H3=b({},Vi,{newState:0,oldState:0}),U3=ke(H3),V3=[9,13,27,32],Gu=Rn&&"CompositionEvent"in window,Qa=null;Rn&&"documentMode"in document&&(Qa=document.documentMode);var P3=Rn&&"TextEvent"in window&&!Qa,fb=Rn&&(!Gu||Qa&&8<Qa&&11>=Qa),db=" ",hb=!1;function gb(t,i){switch(t){case"keyup":return V3.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pb(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Eo=!1;function Y3(t,i){switch(t){case"compositionend":return pb(i);case"keypress":return i.which!==32?null:(hb=!0,db);case"textInput":return t=i.data,t===db&&hb?null:t;default:return null}}function q3(t,i){if(Eo)return t==="compositionend"||!Gu&&gb(t,i)?(t=lb(),Xs=Pu=ii=null,Eo=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return fb&&i.locale!=="ko"?null:i.data;default:return null}}var F3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mb(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!F3[t.type]:i==="textarea"}function bb(t,i,l,c){ko?Co?Co.push(c):Co=[c]:ko=c,i=zr(i,"onChange"),0<i.length&&(l=new Ws("onChange","change",null,l,c),t.push({event:l,listeners:i}))}var Za=null,Ia=null;function X3(t){Zy(t,0)}function Qs(t){var i=Xa(t);if(Im(i))return t}function yb(t,i){if(t==="change")return i}var xb=!1;if(Rn){var Ku;if(Rn){var Wu="oninput"in document;if(!Wu){var vb=document.createElement("div");vb.setAttribute("oninput","return;"),Wu=typeof vb.oninput=="function"}Ku=Wu}else Ku=!1;xb=Ku&&(!document.documentMode||9<document.documentMode)}function _b(){Za&&(Za.detachEvent("onpropertychange",wb),Ia=Za=null)}function wb(t){if(t.propertyName==="value"&&Qs(Ia)){var i=[];bb(i,Ia,t,Hu(t)),ab(X3,i)}}function G3(t,i,l){t==="focusin"?(_b(),Za=i,Ia=l,Za.attachEvent("onpropertychange",wb)):t==="focusout"&&_b()}function K3(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Qs(Ia)}function W3(t,i){if(t==="click")return Qs(i)}function $3(t,i){if(t==="input"||t==="change")return Qs(i)}function Q3(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var Ue=typeof Object.is=="function"?Object.is:Q3;function Ja(t,i){if(Ue(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var l=Object.keys(t),c=Object.keys(i);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var d=l[c];if(!Ua.call(i,d)||!Ue(t[d],i[d]))return!1}return!0}function Sb(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function jb(t,i){var l=Sb(t);t=0;for(var c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=i&&c>=i)return{node:l,offset:i-t};t=c}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Sb(l)}}function kb(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?kb(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function Cb(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=qs(t.document);i instanceof t.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)t=i.contentWindow;else break;i=qs(t.document)}return i}function $u(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var Z3=Rn&&"documentMode"in document&&11>=document.documentMode,Mo=null,Qu=null,tl=null,Zu=!1;function Eb(t,i,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Zu||Mo==null||Mo!==qs(c)||(c=Mo,"selectionStart"in c&&$u(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),tl&&Ja(tl,c)||(tl=c,c=zr(Qu,"onSelect"),0<c.length&&(i=new Ws("onSelect","select",null,i,l),t.push({event:i,listeners:c}),i.target=Mo)))}function Pi(t,i){var l={};return l[t.toLowerCase()]=i.toLowerCase(),l["Webkit"+t]="webkit"+i,l["Moz"+t]="moz"+i,l}var To={animationend:Pi("Animation","AnimationEnd"),animationiteration:Pi("Animation","AnimationIteration"),animationstart:Pi("Animation","AnimationStart"),transitionrun:Pi("Transition","TransitionRun"),transitionstart:Pi("Transition","TransitionStart"),transitioncancel:Pi("Transition","TransitionCancel"),transitionend:Pi("Transition","TransitionEnd")},Iu={},Mb={};Rn&&(Mb=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function Yi(t){if(Iu[t])return Iu[t];if(!To[t])return t;var i=To[t],l;for(l in i)if(i.hasOwnProperty(l)&&l in Mb)return Iu[t]=i[l];return t}var Tb=Yi("animationend"),Ab=Yi("animationiteration"),Nb=Yi("animationstart"),I3=Yi("transitionrun"),J3=Yi("transitionstart"),tk=Yi("transitioncancel"),Ob=Yi("transitionend"),Rb=new Map,Ju="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ju.push("scrollEnd");function fn(t,i){Rb.set(t,i),Ui(i,[t])}var Db=new WeakMap;function Je(t,i){if(typeof t=="object"&&t!==null){var l=Db.get(t);return l!==void 0?l:(i={value:t,source:i,stack:Qm(i)},Db.set(t,i),i)}return{value:t,source:i,stack:Qm(i)}}var tn=[],Ao=0,tf=0;function Zs(){for(var t=Ao,i=tf=Ao=0;i<t;){var l=tn[i];tn[i++]=null;var c=tn[i];tn[i++]=null;var d=tn[i];tn[i++]=null;var m=tn[i];if(tn[i++]=null,c!==null&&d!==null){var x=c.pending;x===null?d.next=d:(d.next=x.next,x.next=d),c.pending=d}m!==0&&zb(l,d,m)}}function Is(t,i,l,c){tn[Ao++]=t,tn[Ao++]=i,tn[Ao++]=l,tn[Ao++]=c,tf|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function ef(t,i,l,c){return Is(t,i,l,c),Js(t)}function No(t,i){return Is(t,null,null,i),Js(t)}function zb(t,i,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var d=!1,m=t.return;m!==null;)m.childLanes|=l,c=m.alternate,c!==null&&(c.childLanes|=l),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&i!==null&&(d=31-He(l),t=m.hiddenUpdates,c=t[d],c===null?t[d]=[i]:c.push(i),i.lane=l|536870912),m):null}function Js(t){if(50<kl)throw kl=0,rd=null,Error(a(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var Oo={};function ek(t,i,l,c){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ve(t,i,l,c){return new ek(t,i,l,c)}function nf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Dn(t,i){var l=t.alternate;return l===null?(l=Ve(t.tag,i,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=i,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,i=t.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Lb(t,i){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,i=l.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function tr(t,i,l,c,d,m){var x=0;if(c=t,typeof t=="function")nf(t)&&(x=1);else if(typeof t=="string")x=iC(t,l,lt.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case I:return t=Ve(31,l,i,d),t.elementType=I,t.lanes=m,t;case k:return qi(l.children,d,m,i);case C:x=8,d|=24;break;case j:return t=Ve(12,l,i,d|2),t.elementType=j,t.lanes=m,t;case w:return t=Ve(13,l,i,d),t.elementType=w,t.lanes=m,t;case Y:return t=Ve(19,l,i,d),t.elementType=Y,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case M:case U:x=10;break t;case D:x=9;break t;case z:x=11;break t;case G:x=14;break t;case K:x=16,c=null;break t}x=29,l=Error(a(130,t===null?"null":typeof t,"")),c=null}return i=Ve(x,l,i,d),i.elementType=t,i.type=c,i.lanes=m,i}function qi(t,i,l,c){return t=Ve(7,t,c,i),t.lanes=l,t}function of(t,i,l){return t=Ve(6,t,null,i),t.lanes=l,t}function af(t,i,l){return i=Ve(4,t.children!==null?t.children:[],t.key,i),i.lanes=l,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var Ro=[],Do=0,er=null,nr=0,en=[],nn=0,Fi=null,zn=1,Ln="";function Xi(t,i){Ro[Do++]=nr,Ro[Do++]=er,er=t,nr=i}function Bb(t,i,l){en[nn++]=zn,en[nn++]=Ln,en[nn++]=Fi,Fi=t;var c=zn;t=Ln;var d=32-He(c)-1;c&=~(1<<d),l+=1;var m=32-He(i)+d;if(30<m){var x=d-d%5;m=(c&(1<<x)-1).toString(32),c>>=x,d-=x,zn=1<<32-He(i)+d|l<<d|c,Ln=m+t}else zn=1<<m|l<<d|c,Ln=t}function lf(t){t.return!==null&&(Xi(t,1),Bb(t,1,0))}function sf(t){for(;t===er;)er=Ro[--Do],Ro[Do]=null,nr=Ro[--Do],Ro[Do]=null;for(;t===Fi;)Fi=en[--nn],en[nn]=null,Ln=en[--nn],en[nn]=null,zn=en[--nn],en[nn]=null}var ve=null,Xt=null,Mt=!1,Gi=null,yn=!1,rf=Error(a(519));function Ki(t){var i=Error(a(418,""));throw il(Je(i,t)),rf}function Hb(t){var i=t.stateNode,l=t.type,c=t.memoizedProps;switch(i[me]=t,i[je]=c,l){case"dialog":jt("cancel",i),jt("close",i);break;case"iframe":case"object":case"embed":jt("load",i);break;case"video":case"audio":for(l=0;l<El.length;l++)jt(El[l],i);break;case"source":jt("error",i);break;case"img":case"image":case"link":jt("error",i),jt("load",i);break;case"details":jt("toggle",i);break;case"input":jt("invalid",i),Jm(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0),Ys(i);break;case"select":jt("invalid",i);break;case"textarea":jt("invalid",i),eb(i,c.value,c.defaultValue,c.children),Ys(i)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||c.suppressHydrationWarning===!0||ex(i.textContent,l)?(c.popover!=null&&(jt("beforetoggle",i),jt("toggle",i)),c.onScroll!=null&&jt("scroll",i),c.onScrollEnd!=null&&jt("scrollend",i),c.onClick!=null&&(i.onclick=Lr),i=!0):i=!1,i||Ki(t)}function Ub(t){for(ve=t.return;ve;)switch(ve.tag){case 5:case 13:yn=!1;return;case 27:case 3:yn=!0;return;default:ve=ve.return}}function el(t){if(t!==ve)return!1;if(!Mt)return Ub(t),Mt=!0,!1;var i=t.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||jd(t.type,t.memoizedProps)),l=!l),l&&Xt&&Ki(t),Ub(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));t:{for(t=t.nextSibling,i=0;t;){if(t.nodeType===8)if(l=t.data,l==="/$"){if(i===0){Xt=hn(t.nextSibling);break t}i--}else l!=="$"&&l!=="$!"&&l!=="$?"||i++;t=t.nextSibling}Xt=null}}else i===27?(i=Xt,xi(t.type)?(t=Md,Md=null,Xt=t):Xt=i):Xt=ve?hn(t.stateNode.nextSibling):null;return!0}function nl(){Xt=ve=null,Mt=!1}function Vb(){var t=Gi;return t!==null&&(Me===null?Me=t:Me.push.apply(Me,t),Gi=null),t}function il(t){Gi===null?Gi=[t]:Gi.push(t)}var cf=X(null),Wi=null,Bn=null;function oi(t,i,l){it(cf,i._currentValue),i._currentValue=l}function Hn(t){t._currentValue=cf.current,nt(cf)}function uf(t,i,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),t===l)break;t=t.return}}function ff(t,i,l,c){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var x=d.child;m=m.firstContext;t:for(;m!==null;){var S=m;m=d;for(var T=0;T<i.length;T++)if(S.context===i[T]){m.lanes|=l,S=m.alternate,S!==null&&(S.lanes|=l),uf(m.return,l,t),c||(x=null);break t}m=S.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(a(341));x.lanes|=l,m=x.alternate,m!==null&&(m.lanes|=l),uf(x,l,t),x=null}else x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===t){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}}function ol(t,i,l,c){t=null;for(var d=i,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var x=d.alternate;if(x===null)throw Error(a(387));if(x=x.memoizedProps,x!==null){var S=d.type;Ue(d.pendingProps.value,x.value)||(t!==null?t.push(S):t=[S])}}else if(d===pe.current){if(x=d.alternate,x===null)throw Error(a(387));x.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Rl):t=[Rl])}d=d.return}t!==null&&ff(i,t,l,c),i.flags|=262144}function ir(t){for(t=t.firstContext;t!==null;){if(!Ue(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function $i(t){Wi=t,Bn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function be(t){return Pb(Wi,t)}function or(t,i){return Wi===null&&$i(t),Pb(t,i)}function Pb(t,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},Bn===null){if(t===null)throw Error(a(308));Bn=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else Bn=Bn.next=i;return l}var nk=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){i.aborted=!0,t.forEach(function(l){return l()})}},ik=n.unstable_scheduleCallback,ok=n.unstable_NormalPriority,ee={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function df(){return{controller:new nk,data:new Map,refCount:0}}function al(t){t.refCount--,t.refCount===0&&ik(ok,function(){t.controller.abort()})}var ll=null,hf=0,zo=0,Lo=null;function ak(t,i){if(ll===null){var l=ll=[];hf=0,zo=pd(),Lo={status:"pending",value:void 0,then:function(c){l.push(c)}}}return hf++,i.then(Yb,Yb),i}function Yb(){if(--hf===0&&ll!==null){Lo!==null&&(Lo.status="fulfilled");var t=ll;ll=null,zo=0,Lo=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function lk(t,i){var l=[],c={status:"pending",value:null,reason:null,then:function(d){l.push(d)}};return t.then(function(){c.status="fulfilled",c.value=i;for(var d=0;d<l.length;d++)(0,l[d])(i)},function(d){for(c.status="rejected",c.reason=d,d=0;d<l.length;d++)(0,l[d])(void 0)}),c}var qb=H.S;H.S=function(t,i){typeof i=="object"&&i!==null&&typeof i.then=="function"&&ak(t,i),qb!==null&&qb(t,i)};var Qi=X(null);function gf(){var t=Qi.current;return t!==null?t:Ht.pooledCache}function ar(t,i){i===null?it(Qi,Qi.current):it(Qi,i.pool)}function Fb(){var t=gf();return t===null?null:{parent:ee._currentValue,pool:t}}var sl=Error(a(460)),Xb=Error(a(474)),lr=Error(a(542)),pf={then:function(){}};function Gb(t){return t=t.status,t==="fulfilled"||t==="rejected"}function sr(){}function Kb(t,i,l){switch(l=t[l],l===void 0?t.push(i):l!==i&&(i.then(sr,sr),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,$b(t),t;default:if(typeof i.status=="string")i.then(sr,sr);else{if(t=Ht,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=i,t.status="pending",t.then(function(c){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=c}},function(c){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,$b(t),t}throw rl=i,sl}}var rl=null;function Wb(){if(rl===null)throw Error(a(459));var t=rl;return rl=null,t}function $b(t){if(t===sl||t===lr)throw Error(a(483))}var ai=!1;function mf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bf(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function li(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function si(t,i,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(At&2)!==0){var d=c.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),c.pending=i,i=Js(t),zb(t,null,l),i}return Is(t,c,i,l),Js(t)}function cl(t,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var c=i.lanes;c&=t.pendingLanes,l|=c,i.lanes=l,Ym(t,l)}}function yf(t,i){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var d=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var x={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?d=m=x:m=m.next=x,l=l.next}while(l!==null);m===null?d=m=i:m=m.next=i}else d=m=i;l={baseState:c.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=i:t.next=i,l.lastBaseUpdate=i}var xf=!1;function ul(){if(xf){var t=Lo;if(t!==null)throw t}}function fl(t,i,l,c){xf=!1;var d=t.updateQueue;ai=!1;var m=d.firstBaseUpdate,x=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var T=S,P=T.next;T.next=null,x===null?m=P:x.next=P,x=T;var W=t.alternate;W!==null&&(W=W.updateQueue,S=W.lastBaseUpdate,S!==x&&(S===null?W.firstBaseUpdate=P:S.next=P,W.lastBaseUpdate=T))}if(m!==null){var Q=d.baseState;x=0,W=P=T=null,S=m;do{var q=S.lane&-536870913,F=q!==S.lane;if(F?(Ct&q)===q:(c&q)===q){q!==0&&q===zo&&(xf=!0),W!==null&&(W=W.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});t:{var pt=t,dt=S;q=i;var Dt=l;switch(dt.tag){case 1:if(pt=dt.payload,typeof pt=="function"){Q=pt.call(Dt,Q,q);break t}Q=pt;break t;case 3:pt.flags=pt.flags&-65537|128;case 0:if(pt=dt.payload,q=typeof pt=="function"?pt.call(Dt,Q,q):pt,q==null)break t;Q=b({},Q,q);break t;case 2:ai=!0}}q=S.callback,q!==null&&(t.flags|=64,F&&(t.flags|=8192),F=d.callbacks,F===null?d.callbacks=[q]:F.push(q))}else F={lane:q,tag:S.tag,payload:S.payload,callback:S.callback,next:null},W===null?(P=W=F,T=Q):W=W.next=F,x|=q;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;F=S,S=F.next,F.next=null,d.lastBaseUpdate=F,d.shared.pending=null}}while(!0);W===null&&(T=Q),d.baseState=T,d.firstBaseUpdate=P,d.lastBaseUpdate=W,m===null&&(d.shared.lanes=0),pi|=x,t.lanes=x,t.memoizedState=Q}}function Qb(t,i){if(typeof t!="function")throw Error(a(191,t));t.call(i)}function Zb(t,i){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Qb(l[t],i)}var Bo=X(null),rr=X(0);function Ib(t,i){t=Xn,it(rr,t),it(Bo,i),Xn=t|i.baseLanes}function vf(){it(rr,Xn),it(Bo,Bo.current)}function _f(){Xn=rr.current,nt(Bo),nt(rr)}var ri=0,yt=null,Ot=null,It=null,cr=!1,Ho=!1,Zi=!1,ur=0,dl=0,Uo=null,sk=0;function Qt(){throw Error(a(321))}function wf(t,i){if(i===null)return!1;for(var l=0;l<i.length&&l<t.length;l++)if(!Ue(t[l],i[l]))return!1;return!0}function Sf(t,i,l,c,d,m){return ri=m,yt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,H.H=t===null||t.memoizedState===null?z0:L0,Zi=!1,m=l(c,d),Zi=!1,Ho&&(m=t0(i,l,c,d)),Jb(t),m}function Jb(t){H.H=mr;var i=Ot!==null&&Ot.next!==null;if(ri=0,It=Ot=yt=null,cr=!1,dl=0,Uo=null,i)throw Error(a(300));t===null||ae||(t=t.dependencies,t!==null&&ir(t)&&(ae=!0))}function t0(t,i,l,c){yt=t;var d=0;do{if(Ho&&(Uo=null),dl=0,Ho=!1,25<=d)throw Error(a(301));if(d+=1,It=Ot=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}H.H=gk,m=i(l,c)}while(Ho);return m}function rk(){var t=H.H,i=t.useState()[0];return i=typeof i.then=="function"?hl(i):i,t=t.useState()[0],(Ot!==null?Ot.memoizedState:null)!==t&&(yt.flags|=1024),i}function jf(){var t=ur!==0;return ur=0,t}function kf(t,i,l){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~l}function Cf(t){if(cr){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}cr=!1}ri=0,It=Ot=yt=null,Ho=!1,dl=ur=0,Uo=null}function Ce(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return It===null?yt.memoizedState=It=t:It=It.next=t,It}function Jt(){if(Ot===null){var t=yt.alternate;t=t!==null?t.memoizedState:null}else t=Ot.next;var i=It===null?yt.memoizedState:It.next;if(i!==null)It=i,Ot=t;else{if(t===null)throw yt.alternate===null?Error(a(467)):Error(a(310));Ot=t,t={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},It===null?yt.memoizedState=It=t:It=It.next=t}return It}function Ef(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hl(t){var i=dl;return dl+=1,Uo===null&&(Uo=[]),t=Kb(Uo,t,i),i=yt,(It===null?i.memoizedState:It.next)===null&&(i=i.alternate,H.H=i===null||i.memoizedState===null?z0:L0),t}function fr(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return hl(t);if(t.$$typeof===U)return be(t)}throw Error(a(438,String(t)))}function Mf(t){var i=null,l=yt.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var c=yt.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=Ef(),yt.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(t),c=0;c<t;c++)l[c]=J;return i.index++,l}function Un(t,i){return typeof i=="function"?i(t):i}function dr(t){var i=Jt();return Tf(i,Ot,t)}function Tf(t,i,l){var c=t.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=l;var d=t.baseQueue,m=c.pending;if(m!==null){if(d!==null){var x=d.next;d.next=m.next,m.next=x}i.baseQueue=d=m,c.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{i=d.next;var S=x=null,T=null,P=i,W=!1;do{var Q=P.lane&-536870913;if(Q!==P.lane?(Ct&Q)===Q:(ri&Q)===Q){var q=P.revertLane;if(q===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),Q===zo&&(W=!0);else if((ri&q)===q){P=P.next,q===zo&&(W=!0);continue}else Q={lane:0,revertLane:P.revertLane,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},T===null?(S=T=Q,x=m):T=T.next=Q,yt.lanes|=q,pi|=q;Q=P.action,Zi&&l(m,Q),m=P.hasEagerState?P.eagerState:l(m,Q)}else q={lane:Q,revertLane:P.revertLane,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},T===null?(S=T=q,x=m):T=T.next=q,yt.lanes|=Q,pi|=Q;P=P.next}while(P!==null&&P!==i);if(T===null?x=m:T.next=S,!Ue(m,t.memoizedState)&&(ae=!0,W&&(l=Lo,l!==null)))throw l;t.memoizedState=m,t.baseState=x,t.baseQueue=T,c.lastRenderedState=m}return d===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Af(t){var i=Jt(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=t;var c=l.dispatch,d=l.pending,m=i.memoizedState;if(d!==null){l.pending=null;var x=d=d.next;do m=t(m,x.action),x=x.next;while(x!==d);Ue(m,i.memoizedState)||(ae=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),l.lastRenderedState=m}return[m,c]}function e0(t,i,l){var c=yt,d=Jt(),m=Mt;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=i();var x=!Ue((Ot||d).memoizedState,l);x&&(d.memoizedState=l,ae=!0),d=d.queue;var S=o0.bind(null,c,d,t);if(gl(2048,8,S,[t]),d.getSnapshot!==i||x||It!==null&&It.memoizedState.tag&1){if(c.flags|=2048,Vo(9,hr(),i0.bind(null,c,d,l,i),null),Ht===null)throw Error(a(349));m||(ri&124)!==0||n0(c,i,l)}return l}function n0(t,i,l){t.flags|=16384,t={getSnapshot:i,value:l},i=yt.updateQueue,i===null?(i=Ef(),yt.updateQueue=i,i.stores=[t]):(l=i.stores,l===null?i.stores=[t]:l.push(t))}function i0(t,i,l,c){i.value=l,i.getSnapshot=c,a0(i)&&l0(t)}function o0(t,i,l){return l(function(){a0(i)&&l0(t)})}function a0(t){var i=t.getSnapshot;t=t.value;try{var l=i();return!Ue(t,l)}catch{return!0}}function l0(t){var i=No(t,2);i!==null&&Xe(i,t,2)}function Nf(t){var i=Ce();if(typeof t=="function"){var l=t;if(t=l(),Zi){ei(!0);try{l()}finally{ei(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:t},i}function s0(t,i,l,c){return t.baseState=l,Tf(t,Ot,typeof c=="function"?c:Un)}function ck(t,i,l,c,d){if(pr(t))throw Error(a(485));if(t=i.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};H.T!==null?l(!0):m.isTransition=!1,c(m),l=i.pending,l===null?(m.next=i.pending=m,r0(i,m)):(m.next=l.next,i.pending=l.next=m)}}function r0(t,i){var l=i.action,c=i.payload,d=t.state;if(i.isTransition){var m=H.T,x={};H.T=x;try{var S=l(d,c),T=H.S;T!==null&&T(x,S),c0(t,i,S)}catch(P){Of(t,i,P)}finally{H.T=m}}else try{m=l(d,c),c0(t,i,m)}catch(P){Of(t,i,P)}}function c0(t,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){u0(t,i,c)},function(c){return Of(t,i,c)}):u0(t,i,l)}function u0(t,i,l){i.status="fulfilled",i.value=l,f0(i),t.state=l,i=t.pending,i!==null&&(l=i.next,l===i?t.pending=null:(l=l.next,i.next=l,r0(t,l)))}function Of(t,i,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=l,f0(i),i=i.next;while(i!==c)}t.action=null}function f0(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function d0(t,i){return i}function h0(t,i){if(Mt){var l=Ht.formState;if(l!==null){t:{var c=yt;if(Mt){if(Xt){e:{for(var d=Xt,m=yn;d.nodeType!==8;){if(!m){d=null;break e}if(d=hn(d.nextSibling),d===null){d=null;break e}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){Xt=hn(d.nextSibling),c=d.data==="F!";break t}}Ki(c)}c=!1}c&&(i=l[0])}}return l=Ce(),l.memoizedState=l.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d0,lastRenderedState:i},l.queue=c,l=O0.bind(null,yt,c),c.dispatch=l,c=Nf(!1),m=Bf.bind(null,yt,!1,c.queue),c=Ce(),d={state:i,dispatch:null,action:t,pending:null},c.queue=d,l=ck.bind(null,yt,d,m,l),d.dispatch=l,c.memoizedState=t,[i,l,!1]}function g0(t){var i=Jt();return p0(i,Ot,t)}function p0(t,i,l){if(i=Tf(t,i,d0)[0],t=dr(Un)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=hl(i)}catch(x){throw x===sl?lr:x}else c=i;i=Jt();var d=i.queue,m=d.dispatch;return l!==i.memoizedState&&(yt.flags|=2048,Vo(9,hr(),uk.bind(null,d,l),null)),[c,m,t]}function uk(t,i){t.action=i}function m0(t){var i=Jt(),l=Ot;if(l!==null)return p0(i,l,t);Jt(),i=i.memoizedState,l=Jt();var c=l.queue.dispatch;return l.memoizedState=t,[i,c,!1]}function Vo(t,i,l,c){return t={tag:t,create:l,deps:c,inst:i,next:null},i=yt.updateQueue,i===null&&(i=Ef(),yt.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,i.lastEffect=t),t}function hr(){return{destroy:void 0,resource:void 0}}function b0(){return Jt().memoizedState}function gr(t,i,l,c){var d=Ce();c=c===void 0?null:c,yt.flags|=t,d.memoizedState=Vo(1|i,hr(),l,c)}function gl(t,i,l,c){var d=Jt();c=c===void 0?null:c;var m=d.memoizedState.inst;Ot!==null&&c!==null&&wf(c,Ot.memoizedState.deps)?d.memoizedState=Vo(i,m,l,c):(yt.flags|=t,d.memoizedState=Vo(1|i,m,l,c))}function y0(t,i){gr(8390656,8,t,i)}function x0(t,i){gl(2048,8,t,i)}function v0(t,i){return gl(4,2,t,i)}function _0(t,i){return gl(4,4,t,i)}function w0(t,i){if(typeof i=="function"){t=t();var l=i(t);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function S0(t,i,l){l=l!=null?l.concat([t]):null,gl(4,4,w0.bind(null,i,t),l)}function Rf(){}function j0(t,i){var l=Jt();i=i===void 0?null:i;var c=l.memoizedState;return i!==null&&wf(i,c[1])?c[0]:(l.memoizedState=[t,i],t)}function k0(t,i){var l=Jt();i=i===void 0?null:i;var c=l.memoizedState;if(i!==null&&wf(i,c[1]))return c[0];if(c=t(),Zi){ei(!0);try{t()}finally{ei(!1)}}return l.memoizedState=[c,i],c}function Df(t,i,l){return l===void 0||(ri&1073741824)!==0?t.memoizedState=i:(t.memoizedState=l,t=My(),yt.lanes|=t,pi|=t,l)}function C0(t,i,l,c){return Ue(l,i)?l:Bo.current!==null?(t=Df(t,l,c),Ue(t,i)||(ae=!0),t):(ri&42)===0?(ae=!0,t.memoizedState=l):(t=My(),yt.lanes|=t,pi|=t,i)}function E0(t,i,l,c,d){var m=Z.p;Z.p=m!==0&&8>m?m:8;var x=H.T,S={};H.T=S,Bf(t,!1,i,l);try{var T=d(),P=H.S;if(P!==null&&P(S,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var W=lk(T,c);pl(t,i,W,Fe(t))}else pl(t,i,c,Fe(t))}catch(Q){pl(t,i,{then:function(){},status:"rejected",reason:Q},Fe())}finally{Z.p=m,H.T=x}}function fk(){}function zf(t,i,l,c){if(t.tag!==5)throw Error(a(476));var d=M0(t).queue;E0(t,d,i,at,l===null?fk:function(){return T0(t),l(c)})}function M0(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:at},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Un,lastRenderedState:l},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function T0(t){var i=M0(t).next.queue;pl(t,i,{},Fe())}function Lf(){return be(Rl)}function A0(){return Jt().memoizedState}function N0(){return Jt().memoizedState}function dk(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var l=Fe();t=li(l);var c=si(i,t,l);c!==null&&(Xe(c,i,l),cl(c,i,l)),i={cache:df()},t.payload=i;return}i=i.return}}function hk(t,i,l){var c=Fe();l={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null},pr(t)?R0(i,l):(l=ef(t,i,l,c),l!==null&&(Xe(l,t,c),D0(l,i,c)))}function O0(t,i,l){var c=Fe();pl(t,i,l,c)}function pl(t,i,l,c){var d={lane:c,revertLane:0,action:l,hasEagerState:!1,eagerState:null,next:null};if(pr(t))R0(i,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var x=i.lastRenderedState,S=m(x,l);if(d.hasEagerState=!0,d.eagerState=S,Ue(S,x))return Is(t,i,d,0),Ht===null&&Zs(),!1}catch{}finally{}if(l=ef(t,i,d,c),l!==null)return Xe(l,t,c),D0(l,i,c),!0}return!1}function Bf(t,i,l,c){if(c={lane:2,revertLane:pd(),action:c,hasEagerState:!1,eagerState:null,next:null},pr(t)){if(i)throw Error(a(479))}else i=ef(t,l,c,2),i!==null&&Xe(i,t,2)}function pr(t){var i=t.alternate;return t===yt||i!==null&&i===yt}function R0(t,i){Ho=cr=!0;var l=t.pending;l===null?i.next=i:(i.next=l.next,l.next=i),t.pending=i}function D0(t,i,l){if((l&4194048)!==0){var c=i.lanes;c&=t.pendingLanes,l|=c,i.lanes=l,Ym(t,l)}}var mr={readContext:be,use:fr,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useLayoutEffect:Qt,useInsertionEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useSyncExternalStore:Qt,useId:Qt,useHostTransitionStatus:Qt,useFormState:Qt,useActionState:Qt,useOptimistic:Qt,useMemoCache:Qt,useCacheRefresh:Qt},z0={readContext:be,use:fr,useCallback:function(t,i){return Ce().memoizedState=[t,i===void 0?null:i],t},useContext:be,useEffect:y0,useImperativeHandle:function(t,i,l){l=l!=null?l.concat([t]):null,gr(4194308,4,w0.bind(null,i,t),l)},useLayoutEffect:function(t,i){return gr(4194308,4,t,i)},useInsertionEffect:function(t,i){gr(4,2,t,i)},useMemo:function(t,i){var l=Ce();i=i===void 0?null:i;var c=t();if(Zi){ei(!0);try{t()}finally{ei(!1)}}return l.memoizedState=[c,i],c},useReducer:function(t,i,l){var c=Ce();if(l!==void 0){var d=l(i);if(Zi){ei(!0);try{l(i)}finally{ei(!1)}}}else d=i;return c.memoizedState=c.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},c.queue=t,t=t.dispatch=hk.bind(null,yt,t),[c.memoizedState,t]},useRef:function(t){var i=Ce();return t={current:t},i.memoizedState=t},useState:function(t){t=Nf(t);var i=t.queue,l=O0.bind(null,yt,i);return i.dispatch=l,[t.memoizedState,l]},useDebugValue:Rf,useDeferredValue:function(t,i){var l=Ce();return Df(l,t,i)},useTransition:function(){var t=Nf(!1);return t=E0.bind(null,yt,t.queue,!0,!1),Ce().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,l){var c=yt,d=Ce();if(Mt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),Ht===null)throw Error(a(349));(Ct&124)!==0||n0(c,i,l)}d.memoizedState=l;var m={value:l,getSnapshot:i};return d.queue=m,y0(o0.bind(null,c,m,t),[t]),c.flags|=2048,Vo(9,hr(),i0.bind(null,c,m,l,i),null),l},useId:function(){var t=Ce(),i=Ht.identifierPrefix;if(Mt){var l=Ln,c=zn;l=(c&~(1<<32-He(c)-1)).toString(32)+l,i="«"+i+"R"+l,l=ur++,0<l&&(i+="H"+l.toString(32)),i+="»"}else l=sk++,i="«"+i+"r"+l.toString(32)+"»";return t.memoizedState=i},useHostTransitionStatus:Lf,useFormState:h0,useActionState:h0,useOptimistic:function(t){var i=Ce();i.memoizedState=i.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=Bf.bind(null,yt,!0,l),l.dispatch=i,[t,i]},useMemoCache:Mf,useCacheRefresh:function(){return Ce().memoizedState=dk.bind(null,yt)}},L0={readContext:be,use:fr,useCallback:j0,useContext:be,useEffect:x0,useImperativeHandle:S0,useInsertionEffect:v0,useLayoutEffect:_0,useMemo:k0,useReducer:dr,useRef:b0,useState:function(){return dr(Un)},useDebugValue:Rf,useDeferredValue:function(t,i){var l=Jt();return C0(l,Ot.memoizedState,t,i)},useTransition:function(){var t=dr(Un)[0],i=Jt().memoizedState;return[typeof t=="boolean"?t:hl(t),i]},useSyncExternalStore:e0,useId:A0,useHostTransitionStatus:Lf,useFormState:g0,useActionState:g0,useOptimistic:function(t,i){var l=Jt();return s0(l,Ot,t,i)},useMemoCache:Mf,useCacheRefresh:N0},gk={readContext:be,use:fr,useCallback:j0,useContext:be,useEffect:x0,useImperativeHandle:S0,useInsertionEffect:v0,useLayoutEffect:_0,useMemo:k0,useReducer:Af,useRef:b0,useState:function(){return Af(Un)},useDebugValue:Rf,useDeferredValue:function(t,i){var l=Jt();return Ot===null?Df(l,t,i):C0(l,Ot.memoizedState,t,i)},useTransition:function(){var t=Af(Un)[0],i=Jt().memoizedState;return[typeof t=="boolean"?t:hl(t),i]},useSyncExternalStore:e0,useId:A0,useHostTransitionStatus:Lf,useFormState:m0,useActionState:m0,useOptimistic:function(t,i){var l=Jt();return Ot!==null?s0(l,Ot,t,i):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Mf,useCacheRefresh:N0},Po=null,ml=0;function br(t){var i=ml;return ml+=1,Po===null&&(Po=[]),Kb(Po,t,i)}function bl(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function yr(t,i){throw i.$$typeof===y?Error(a(525)):(t=Object.prototype.toString.call(i),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function B0(t){var i=t._init;return i(t._payload)}function H0(t){function i(B,R){if(t){var V=B.deletions;V===null?(B.deletions=[R],B.flags|=16):V.push(R)}}function l(B,R){if(!t)return null;for(;R!==null;)i(B,R),R=R.sibling;return null}function c(B){for(var R=new Map;B!==null;)B.key!==null?R.set(B.key,B):R.set(B.index,B),B=B.sibling;return R}function d(B,R){return B=Dn(B,R),B.index=0,B.sibling=null,B}function m(B,R,V){return B.index=V,t?(V=B.alternate,V!==null?(V=V.index,V<R?(B.flags|=67108866,R):V):(B.flags|=67108866,R)):(B.flags|=1048576,R)}function x(B){return t&&B.alternate===null&&(B.flags|=67108866),B}function S(B,R,V,$){return R===null||R.tag!==6?(R=of(V,B.mode,$),R.return=B,R):(R=d(R,V),R.return=B,R)}function T(B,R,V,$){var st=V.type;return st===k?W(B,R,V.props.children,$,V.key):R!==null&&(R.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===K&&B0(st)===R.type)?(R=d(R,V.props),bl(R,V),R.return=B,R):(R=tr(V.type,V.key,V.props,null,B.mode,$),bl(R,V),R.return=B,R)}function P(B,R,V,$){return R===null||R.tag!==4||R.stateNode.containerInfo!==V.containerInfo||R.stateNode.implementation!==V.implementation?(R=af(V,B.mode,$),R.return=B,R):(R=d(R,V.children||[]),R.return=B,R)}function W(B,R,V,$,st){return R===null||R.tag!==7?(R=qi(V,B.mode,$,st),R.return=B,R):(R=d(R,V),R.return=B,R)}function Q(B,R,V){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=of(""+R,B.mode,V),R.return=B,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case v:return V=tr(R.type,R.key,R.props,null,B.mode,V),bl(V,R),V.return=B,V;case _:return R=af(R,B.mode,V),R.return=B,R;case K:var $=R._init;return R=$(R._payload),Q(B,R,V)}if(tt(R)||L(R))return R=qi(R,B.mode,V,null),R.return=B,R;if(typeof R.then=="function")return Q(B,br(R),V);if(R.$$typeof===U)return Q(B,or(B,R),V);yr(B,R)}return null}function q(B,R,V,$){var st=R!==null?R.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return st!==null?null:S(B,R,""+V,$);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===st?T(B,R,V,$):null;case _:return V.key===st?P(B,R,V,$):null;case K:return st=V._init,V=st(V._payload),q(B,R,V,$)}if(tt(V)||L(V))return st!==null?null:W(B,R,V,$,null);if(typeof V.then=="function")return q(B,R,br(V),$);if(V.$$typeof===U)return q(B,R,or(B,V),$);yr(B,V)}return null}function F(B,R,V,$,st){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return B=B.get(V)||null,S(R,B,""+$,st);if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return B=B.get($.key===null?V:$.key)||null,T(R,B,$,st);case _:return B=B.get($.key===null?V:$.key)||null,P(R,B,$,st);case K:var vt=$._init;return $=vt($._payload),F(B,R,V,$,st)}if(tt($)||L($))return B=B.get(V)||null,W(R,B,$,st,null);if(typeof $.then=="function")return F(B,R,V,br($),st);if($.$$typeof===U)return F(B,R,V,or(R,$),st);yr(R,$)}return null}function pt(B,R,V,$){for(var st=null,vt=null,ft=R,ht=R=0,se=null;ft!==null&&ht<V.length;ht++){ft.index>ht?(se=ft,ft=null):se=ft.sibling;var Et=q(B,ft,V[ht],$);if(Et===null){ft===null&&(ft=se);break}t&&ft&&Et.alternate===null&&i(B,ft),R=m(Et,R,ht),vt===null?st=Et:vt.sibling=Et,vt=Et,ft=se}if(ht===V.length)return l(B,ft),Mt&&Xi(B,ht),st;if(ft===null){for(;ht<V.length;ht++)ft=Q(B,V[ht],$),ft!==null&&(R=m(ft,R,ht),vt===null?st=ft:vt.sibling=ft,vt=ft);return Mt&&Xi(B,ht),st}for(ft=c(ft);ht<V.length;ht++)se=F(ft,B,ht,V[ht],$),se!==null&&(t&&se.alternate!==null&&ft.delete(se.key===null?ht:se.key),R=m(se,R,ht),vt===null?st=se:vt.sibling=se,vt=se);return t&&ft.forEach(function(ji){return i(B,ji)}),Mt&&Xi(B,ht),st}function dt(B,R,V,$){if(V==null)throw Error(a(151));for(var st=null,vt=null,ft=R,ht=R=0,se=null,Et=V.next();ft!==null&&!Et.done;ht++,Et=V.next()){ft.index>ht?(se=ft,ft=null):se=ft.sibling;var ji=q(B,ft,Et.value,$);if(ji===null){ft===null&&(ft=se);break}t&&ft&&ji.alternate===null&&i(B,ft),R=m(ji,R,ht),vt===null?st=ji:vt.sibling=ji,vt=ji,ft=se}if(Et.done)return l(B,ft),Mt&&Xi(B,ht),st;if(ft===null){for(;!Et.done;ht++,Et=V.next())Et=Q(B,Et.value,$),Et!==null&&(R=m(Et,R,ht),vt===null?st=Et:vt.sibling=Et,vt=Et);return Mt&&Xi(B,ht),st}for(ft=c(ft);!Et.done;ht++,Et=V.next())Et=F(ft,B,ht,Et.value,$),Et!==null&&(t&&Et.alternate!==null&&ft.delete(Et.key===null?ht:Et.key),R=m(Et,R,ht),vt===null?st=Et:vt.sibling=Et,vt=Et);return t&&ft.forEach(function(pC){return i(B,pC)}),Mt&&Xi(B,ht),st}function Dt(B,R,V,$){if(typeof V=="object"&&V!==null&&V.type===k&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:t:{for(var st=V.key;R!==null;){if(R.key===st){if(st=V.type,st===k){if(R.tag===7){l(B,R.sibling),$=d(R,V.props.children),$.return=B,B=$;break t}}else if(R.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===K&&B0(st)===R.type){l(B,R.sibling),$=d(R,V.props),bl($,V),$.return=B,B=$;break t}l(B,R);break}else i(B,R);R=R.sibling}V.type===k?($=qi(V.props.children,B.mode,$,V.key),$.return=B,B=$):($=tr(V.type,V.key,V.props,null,B.mode,$),bl($,V),$.return=B,B=$)}return x(B);case _:t:{for(st=V.key;R!==null;){if(R.key===st)if(R.tag===4&&R.stateNode.containerInfo===V.containerInfo&&R.stateNode.implementation===V.implementation){l(B,R.sibling),$=d(R,V.children||[]),$.return=B,B=$;break t}else{l(B,R);break}else i(B,R);R=R.sibling}$=af(V,B.mode,$),$.return=B,B=$}return x(B);case K:return st=V._init,V=st(V._payload),Dt(B,R,V,$)}if(tt(V))return pt(B,R,V,$);if(L(V)){if(st=L(V),typeof st!="function")throw Error(a(150));return V=st.call(V),dt(B,R,V,$)}if(typeof V.then=="function")return Dt(B,R,br(V),$);if(V.$$typeof===U)return Dt(B,R,or(B,V),$);yr(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,R!==null&&R.tag===6?(l(B,R.sibling),$=d(R,V),$.return=B,B=$):(l(B,R),$=of(V,B.mode,$),$.return=B,B=$),x(B)):l(B,R)}return function(B,R,V,$){try{ml=0;var st=Dt(B,R,V,$);return Po=null,st}catch(ft){if(ft===sl||ft===lr)throw ft;var vt=Ve(29,ft,null,B.mode);return vt.lanes=$,vt.return=B,vt}finally{}}}var Yo=H0(!0),U0=H0(!1),on=X(null),xn=null;function ci(t){var i=t.alternate;it(ne,ne.current&1),it(on,t),xn===null&&(i===null||Bo.current!==null||i.memoizedState!==null)&&(xn=t)}function V0(t){if(t.tag===22){if(it(ne,ne.current),it(on,t),xn===null){var i=t.alternate;i!==null&&i.memoizedState!==null&&(xn=t)}}else ui()}function ui(){it(ne,ne.current),it(on,on.current)}function Vn(t){nt(on),xn===t&&(xn=null),nt(ne)}var ne=X(0);function xr(t){for(var i=t;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||Ed(l)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}function Hf(t,i,l,c){i=t.memoizedState,l=l(c,i),l=l==null?i:b({},i,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Uf={enqueueSetState:function(t,i,l){t=t._reactInternals;var c=Fe(),d=li(c);d.payload=i,l!=null&&(d.callback=l),i=si(t,d,c),i!==null&&(Xe(i,t,c),cl(i,t,c))},enqueueReplaceState:function(t,i,l){t=t._reactInternals;var c=Fe(),d=li(c);d.tag=1,d.payload=i,l!=null&&(d.callback=l),i=si(t,d,c),i!==null&&(Xe(i,t,c),cl(i,t,c))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var l=Fe(),c=li(l);c.tag=2,i!=null&&(c.callback=i),i=si(t,c,l),i!==null&&(Xe(i,t,l),cl(i,t,l))}};function P0(t,i,l,c,d,m,x){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,m,x):i.prototype&&i.prototype.isPureReactComponent?!Ja(l,c)||!Ja(d,m):!0}function Y0(t,i,l,c){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,c),i.state!==t&&Uf.enqueueReplaceState(i,i.state,null)}function Ii(t,i){var l=i;if("ref"in i){l={};for(var c in i)c!=="ref"&&(l[c]=i[c])}if(t=t.defaultProps){l===i&&(l=b({},l));for(var d in t)l[d]===void 0&&(l[d]=t[d])}return l}var vr=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function q0(t){vr(t)}function F0(t){console.error(t)}function X0(t){vr(t)}function _r(t,i){try{var l=t.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function G0(t,i,l){try{var c=t.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Vf(t,i,l){return l=li(l),l.tag=3,l.payload={element:null},l.callback=function(){_r(t,i)},l}function K0(t){return t=li(t),t.tag=3,t}function W0(t,i,l,c){var d=l.type.getDerivedStateFromError;if(typeof d=="function"){var m=c.value;t.payload=function(){return d(m)},t.callback=function(){G0(i,l,c)}}var x=l.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(t.callback=function(){G0(i,l,c),typeof d!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function pk(t,i,l,c,d){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=l.alternate,i!==null&&ol(i,l,d,!0),l=on.current,l!==null){switch(l.tag){case 13:return xn===null?ud():l.alternate===null&&Gt===0&&(Gt=3),l.flags&=-257,l.flags|=65536,l.lanes=d,c===pf?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([c]):i.add(c),dd(t,c,d)),!1;case 22:return l.flags|=65536,c===pf?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([c]):l.add(c)),dd(t,c,d)),!1}throw Error(a(435,l.tag))}return dd(t,c,d),ud(),!1}if(Mt)return i=on.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,c!==rf&&(t=Error(a(422),{cause:c}),il(Je(t,l)))):(c!==rf&&(i=Error(a(423),{cause:c}),il(Je(i,l))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,c=Je(c,l),d=Vf(t.stateNode,c,d),yf(t,d),Gt!==4&&(Gt=2)),!1;var m=Error(a(520),{cause:c});if(m=Je(m,l),jl===null?jl=[m]:jl.push(m),Gt!==4&&(Gt=2),i===null)return!0;c=Je(c,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,t=d&-d,l.lanes|=t,t=Vf(l.stateNode,c,t),yf(l,t),!1;case 1:if(i=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(mi===null||!mi.has(m))))return l.flags|=65536,d&=-d,l.lanes|=d,d=K0(d),W0(d,t,l,c),yf(l,d),!1}l=l.return}while(l!==null);return!1}var $0=Error(a(461)),ae=!1;function re(t,i,l,c){i.child=t===null?U0(i,null,l,c):Yo(i,t.child,l,c)}function Q0(t,i,l,c,d){l=l.render;var m=i.ref;if("ref"in c){var x={};for(var S in c)S!=="ref"&&(x[S]=c[S])}else x=c;return $i(i),c=Sf(t,i,l,x,m,d),S=jf(),t!==null&&!ae?(kf(t,i,d),Pn(t,i,d)):(Mt&&S&&lf(i),i.flags|=1,re(t,i,c,d),i.child)}function Z0(t,i,l,c,d){if(t===null){var m=l.type;return typeof m=="function"&&!nf(m)&&m.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=m,I0(t,i,m,c,d)):(t=tr(l.type,null,c,i,i.mode,d),t.ref=i.ref,t.return=i,i.child=t)}if(m=t.child,!Wf(t,d)){var x=m.memoizedProps;if(l=l.compare,l=l!==null?l:Ja,l(x,c)&&t.ref===i.ref)return Pn(t,i,d)}return i.flags|=1,t=Dn(m,c),t.ref=i.ref,t.return=i,i.child=t}function I0(t,i,l,c,d){if(t!==null){var m=t.memoizedProps;if(Ja(m,c)&&t.ref===i.ref)if(ae=!1,i.pendingProps=c=m,Wf(t,d))(t.flags&131072)!==0&&(ae=!0);else return i.lanes=t.lanes,Pn(t,i,d)}return Pf(t,i,l,c,d)}function J0(t,i,l){var c=i.pendingProps,d=c.children,m=t!==null?t.memoizedState:null;if(c.mode==="hidden"){if((i.flags&128)!==0){if(c=m!==null?m.baseLanes|l:l,t!==null){for(d=i.child=t.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;i.childLanes=m&~c}else i.childLanes=0,i.child=null;return ty(t,i,c,l)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&ar(i,m!==null?m.cachePool:null),m!==null?Ib(i,m):vf(),V0(i);else return i.lanes=i.childLanes=536870912,ty(t,i,m!==null?m.baseLanes|l:l,l)}else m!==null?(ar(i,m.cachePool),Ib(i,m),ui(),i.memoizedState=null):(t!==null&&ar(i,null),vf(),ui());return re(t,i,d,l),i.child}function ty(t,i,l,c){var d=gf();return d=d===null?null:{parent:ee._currentValue,pool:d},i.memoizedState={baseLanes:l,cachePool:d},t!==null&&ar(i,null),vf(),V0(i),t!==null&&ol(t,i,c,!0),null}function wr(t,i){var l=i.ref;if(l===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(t===null||t.ref!==l)&&(i.flags|=4194816)}}function Pf(t,i,l,c,d){return $i(i),l=Sf(t,i,l,c,void 0,d),c=jf(),t!==null&&!ae?(kf(t,i,d),Pn(t,i,d)):(Mt&&c&&lf(i),i.flags|=1,re(t,i,l,d),i.child)}function ey(t,i,l,c,d,m){return $i(i),i.updateQueue=null,l=t0(i,c,l,d),Jb(t),c=jf(),t!==null&&!ae?(kf(t,i,m),Pn(t,i,m)):(Mt&&c&&lf(i),i.flags|=1,re(t,i,l,m),i.child)}function ny(t,i,l,c,d){if($i(i),i.stateNode===null){var m=Oo,x=l.contextType;typeof x=="object"&&x!==null&&(m=be(x)),m=new l(c,m),i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Uf,i.stateNode=m,m._reactInternals=i,m=i.stateNode,m.props=c,m.state=i.memoizedState,m.refs={},mf(i),x=l.contextType,m.context=typeof x=="object"&&x!==null?be(x):Oo,m.state=i.memoizedState,x=l.getDerivedStateFromProps,typeof x=="function"&&(Hf(i,l,x,c),m.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&Uf.enqueueReplaceState(m,m.state,null),fl(i,c,m,d),ul(),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(t===null){m=i.stateNode;var S=i.memoizedProps,T=Ii(l,S);m.props=T;var P=m.context,W=l.contextType;x=Oo,typeof W=="object"&&W!==null&&(x=be(W));var Q=l.getDerivedStateFromProps;W=typeof Q=="function"||typeof m.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,W||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S||P!==x)&&Y0(i,m,c,x),ai=!1;var q=i.memoizedState;m.state=q,fl(i,c,m,d),ul(),P=i.memoizedState,S||q!==P||ai?(typeof Q=="function"&&(Hf(i,l,Q,c),P=i.memoizedState),(T=ai||P0(i,l,T,c,q,P,x))?(W||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(i.flags|=4194308)):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=P),m.props=c,m.state=P,m.context=x,c=T):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{m=i.stateNode,bf(t,i),x=i.memoizedProps,W=Ii(l,x),m.props=W,Q=i.pendingProps,q=m.context,P=l.contextType,T=Oo,typeof P=="object"&&P!==null&&(T=be(P)),S=l.getDerivedStateFromProps,(P=typeof S=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==Q||q!==T)&&Y0(i,m,c,T),ai=!1,q=i.memoizedState,m.state=q,fl(i,c,m,d),ul();var F=i.memoizedState;x!==Q||q!==F||ai||t!==null&&t.dependencies!==null&&ir(t.dependencies)?(typeof S=="function"&&(Hf(i,l,S,c),F=i.memoizedState),(W=ai||P0(i,l,W,c,q,F,T)||t!==null&&t.dependencies!==null&&ir(t.dependencies))?(P||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,F,T),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,F,T)),typeof m.componentDidUpdate=="function"&&(i.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===t.memoizedProps&&q===t.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&q===t.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=F),m.props=c,m.state=F,m.context=T,c=W):(typeof m.componentDidUpdate!="function"||x===t.memoizedProps&&q===t.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&q===t.memoizedState||(i.flags|=1024),c=!1)}return m=c,wr(t,i),c=(i.flags&128)!==0,m||c?(m=i.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:m.render(),i.flags|=1,t!==null&&c?(i.child=Yo(i,t.child,null,d),i.child=Yo(i,null,l,d)):re(t,i,l,d),i.memoizedState=m.state,t=i.child):t=Pn(t,i,d),t}function iy(t,i,l,c){return nl(),i.flags|=256,re(t,i,l,c),i.child}var Yf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qf(t){return{baseLanes:t,cachePool:Fb()}}function Ff(t,i,l){return t=t!==null?t.childLanes&~l:0,i&&(t|=an),t}function oy(t,i,l){var c=i.pendingProps,d=!1,m=(i.flags&128)!==0,x;if((x=m)||(x=t!==null&&t.memoizedState===null?!1:(ne.current&2)!==0),x&&(d=!0,i.flags&=-129),x=(i.flags&32)!==0,i.flags&=-33,t===null){if(Mt){if(d?ci(i):ui(),Mt){var S=Xt,T;if(T=S){t:{for(T=S,S=yn;T.nodeType!==8;){if(!S){S=null;break t}if(T=hn(T.nextSibling),T===null){S=null;break t}}S=T}S!==null?(i.memoizedState={dehydrated:S,treeContext:Fi!==null?{id:zn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},T=Ve(18,null,null,0),T.stateNode=S,T.return=i,i.child=T,ve=i,Xt=null,T=!0):T=!1}T||Ki(i)}if(S=i.memoizedState,S!==null&&(S=S.dehydrated,S!==null))return Ed(S)?i.lanes=32:i.lanes=536870912,null;Vn(i)}return S=c.children,c=c.fallback,d?(ui(),d=i.mode,S=Sr({mode:"hidden",children:S},d),c=qi(c,d,l,null),S.return=i,c.return=i,S.sibling=c,i.child=S,d=i.child,d.memoizedState=qf(l),d.childLanes=Ff(t,x,l),i.memoizedState=Yf,c):(ci(i),Xf(i,S))}if(T=t.memoizedState,T!==null&&(S=T.dehydrated,S!==null)){if(m)i.flags&256?(ci(i),i.flags&=-257,i=Gf(t,i,l)):i.memoizedState!==null?(ui(),i.child=t.child,i.flags|=128,i=null):(ui(),d=c.fallback,S=i.mode,c=Sr({mode:"visible",children:c.children},S),d=qi(d,S,l,null),d.flags|=2,c.return=i,d.return=i,c.sibling=d,i.child=c,Yo(i,t.child,null,l),c=i.child,c.memoizedState=qf(l),c.childLanes=Ff(t,x,l),i.memoizedState=Yf,i=d);else if(ci(i),Ed(S)){if(x=S.nextSibling&&S.nextSibling.dataset,x)var P=x.dgst;x=P,c=Error(a(419)),c.stack="",c.digest=x,il({value:c,source:null,stack:null}),i=Gf(t,i,l)}else if(ae||ol(t,i,l,!1),x=(l&t.childLanes)!==0,ae||x){if(x=Ht,x!==null&&(c=l&-l,c=(c&42)!==0?1:Eu(c),c=(c&(x.suspendedLanes|l))!==0?0:c,c!==0&&c!==T.retryLane))throw T.retryLane=c,No(t,c),Xe(x,t,c),$0;S.data==="$?"||ud(),i=Gf(t,i,l)}else S.data==="$?"?(i.flags|=192,i.child=t.child,i=null):(t=T.treeContext,Xt=hn(S.nextSibling),ve=i,Mt=!0,Gi=null,yn=!1,t!==null&&(en[nn++]=zn,en[nn++]=Ln,en[nn++]=Fi,zn=t.id,Ln=t.overflow,Fi=i),i=Xf(i,c.children),i.flags|=4096);return i}return d?(ui(),d=c.fallback,S=i.mode,T=t.child,P=T.sibling,c=Dn(T,{mode:"hidden",children:c.children}),c.subtreeFlags=T.subtreeFlags&65011712,P!==null?d=Dn(P,d):(d=qi(d,S,l,null),d.flags|=2),d.return=i,c.return=i,c.sibling=d,i.child=c,c=d,d=i.child,S=t.child.memoizedState,S===null?S=qf(l):(T=S.cachePool,T!==null?(P=ee._currentValue,T=T.parent!==P?{parent:P,pool:P}:T):T=Fb(),S={baseLanes:S.baseLanes|l,cachePool:T}),d.memoizedState=S,d.childLanes=Ff(t,x,l),i.memoizedState=Yf,c):(ci(i),l=t.child,t=l.sibling,l=Dn(l,{mode:"visible",children:c.children}),l.return=i,l.sibling=null,t!==null&&(x=i.deletions,x===null?(i.deletions=[t],i.flags|=16):x.push(t)),i.child=l,i.memoizedState=null,l)}function Xf(t,i){return i=Sr({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function Sr(t,i){return t=Ve(22,t,null,i),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Gf(t,i,l){return Yo(i,t.child,null,l),t=Xf(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function ay(t,i,l){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i),uf(t.return,i,l)}function Kf(t,i,l,c,d){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:d}:(m.isBackwards=i,m.rendering=null,m.renderingStartTime=0,m.last=c,m.tail=l,m.tailMode=d)}function ly(t,i,l){var c=i.pendingProps,d=c.revealOrder,m=c.tail;if(re(t,i,c.children,l),c=ne.current,(c&2)!==0)c=c&1|2,i.flags|=128;else{if(t!==null&&(t.flags&128)!==0)t:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ay(t,l,i);else if(t.tag===19)ay(t,l,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break t;for(;t.sibling===null;){if(t.return===null||t.return===i)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}switch(it(ne,c),d){case"forwards":for(l=i.child,d=null;l!==null;)t=l.alternate,t!==null&&xr(t)===null&&(d=l),l=l.sibling;l=d,l===null?(d=i.child,i.child=null):(d=l.sibling,l.sibling=null),Kf(i,!1,d,l,m);break;case"backwards":for(l=null,d=i.child,i.child=null;d!==null;){if(t=d.alternate,t!==null&&xr(t)===null){i.child=d;break}t=d.sibling,d.sibling=l,l=d,d=t}Kf(i,!0,l,null,m);break;case"together":Kf(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Pn(t,i,l){if(t!==null&&(i.dependencies=t.dependencies),pi|=i.lanes,(l&i.childLanes)===0)if(t!==null){if(ol(t,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(a(153));if(i.child!==null){for(t=i.child,l=Dn(t,t.pendingProps),i.child=l,l.return=i;t.sibling!==null;)t=t.sibling,l=l.sibling=Dn(t,t.pendingProps),l.return=i;l.sibling=null}return i.child}function Wf(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&ir(t)))}function mk(t,i,l){switch(i.tag){case 3:Vt(i,i.stateNode.containerInfo),oi(i,ee,t.memoizedState.cache),nl();break;case 27:case 5:Ha(i);break;case 4:Vt(i,i.stateNode.containerInfo);break;case 10:oi(i,i.type,i.memoizedProps.value);break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ci(i),i.flags|=128,null):(l&i.child.childLanes)!==0?oy(t,i,l):(ci(i),t=Pn(t,i,l),t!==null?t.sibling:null);ci(i);break;case 19:var d=(t.flags&128)!==0;if(c=(l&i.childLanes)!==0,c||(ol(t,i,l,!1),c=(l&i.childLanes)!==0),d){if(c)return ly(t,i,l);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),it(ne,ne.current),c)break;return null;case 22:case 23:return i.lanes=0,J0(t,i,l);case 24:oi(i,ee,t.memoizedState.cache)}return Pn(t,i,l)}function sy(t,i,l){if(t!==null)if(t.memoizedProps!==i.pendingProps)ae=!0;else{if(!Wf(t,l)&&(i.flags&128)===0)return ae=!1,mk(t,i,l);ae=(t.flags&131072)!==0}else ae=!1,Mt&&(i.flags&1048576)!==0&&Bb(i,nr,i.index);switch(i.lanes=0,i.tag){case 16:t:{t=i.pendingProps;var c=i.elementType,d=c._init;if(c=d(c._payload),i.type=c,typeof c=="function")nf(c)?(t=Ii(c,t),i.tag=1,i=ny(null,i,c,t,l)):(i.tag=0,i=Pf(null,i,c,t,l));else{if(c!=null){if(d=c.$$typeof,d===z){i.tag=11,i=Q0(null,i,c,t,l);break t}else if(d===G){i.tag=14,i=Z0(null,i,c,t,l);break t}}throw i=rt(c)||c,Error(a(306,i,""))}}return i;case 0:return Pf(t,i,i.type,i.pendingProps,l);case 1:return c=i.type,d=Ii(c,i.pendingProps),ny(t,i,c,d,l);case 3:t:{if(Vt(i,i.stateNode.containerInfo),t===null)throw Error(a(387));c=i.pendingProps;var m=i.memoizedState;d=m.element,bf(t,i),fl(i,c,null,l);var x=i.memoizedState;if(c=x.cache,oi(i,ee,c),c!==m.cache&&ff(i,[ee],l,!0),ul(),c=x.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:x.cache},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){i=iy(t,i,c,l);break t}else if(c!==d){d=Je(Error(a(424)),i),il(d),i=iy(t,i,c,l);break t}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Xt=hn(t.firstChild),ve=i,Mt=!0,Gi=null,yn=!0,l=U0(i,null,c,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(nl(),c===d){i=Pn(t,i,l);break t}re(t,i,c,l)}i=i.child}return i;case 26:return wr(t,i),t===null?(l=fx(i.type,null,i.pendingProps,null))?i.memoizedState=l:Mt||(l=i.type,t=i.pendingProps,c=Br(ut.current).createElement(l),c[me]=i,c[je]=t,ue(c,l,t),oe(c),i.stateNode=c):i.memoizedState=fx(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return Ha(i),t===null&&Mt&&(c=i.stateNode=rx(i.type,i.pendingProps,ut.current),ve=i,yn=!0,d=Xt,xi(i.type)?(Md=d,Xt=hn(c.firstChild)):Xt=d),re(t,i,i.pendingProps.children,l),wr(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&Mt&&((d=c=Xt)&&(c=Fk(c,i.type,i.pendingProps,yn),c!==null?(i.stateNode=c,ve=i,Xt=hn(c.firstChild),yn=!1,d=!0):d=!1),d||Ki(i)),Ha(i),d=i.type,m=i.pendingProps,x=t!==null?t.memoizedProps:null,c=m.children,jd(d,m)?c=null:x!==null&&jd(d,x)&&(i.flags|=32),i.memoizedState!==null&&(d=Sf(t,i,rk,null,null,l),Rl._currentValue=d),wr(t,i),re(t,i,c,l),i.child;case 6:return t===null&&Mt&&((t=l=Xt)&&(l=Xk(l,i.pendingProps,yn),l!==null?(i.stateNode=l,ve=i,Xt=null,t=!0):t=!1),t||Ki(i)),null;case 13:return oy(t,i,l);case 4:return Vt(i,i.stateNode.containerInfo),c=i.pendingProps,t===null?i.child=Yo(i,null,c,l):re(t,i,c,l),i.child;case 11:return Q0(t,i,i.type,i.pendingProps,l);case 7:return re(t,i,i.pendingProps,l),i.child;case 8:return re(t,i,i.pendingProps.children,l),i.child;case 12:return re(t,i,i.pendingProps.children,l),i.child;case 10:return c=i.pendingProps,oi(i,i.type,c.value),re(t,i,c.children,l),i.child;case 9:return d=i.type._context,c=i.pendingProps.children,$i(i),d=be(d),c=c(d),i.flags|=1,re(t,i,c,l),i.child;case 14:return Z0(t,i,i.type,i.pendingProps,l);case 15:return I0(t,i,i.type,i.pendingProps,l);case 19:return ly(t,i,l);case 31:return c=i.pendingProps,l=i.mode,c={mode:c.mode,children:c.children},t===null?(l=Sr(c,l),l.ref=i.ref,i.child=l,l.return=i,i=l):(l=Dn(t.child,c),l.ref=i.ref,i.child=l,l.return=i,i=l),i;case 22:return J0(t,i,l);case 24:return $i(i),c=be(ee),t===null?(d=gf(),d===null&&(d=Ht,m=df(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=l),d=m),i.memoizedState={parent:c,cache:d},mf(i),oi(i,ee,d)):((t.lanes&l)!==0&&(bf(t,i),fl(i,null,null,l),ul()),d=t.memoizedState,m=i.memoizedState,d.parent!==c?(d={parent:c,cache:c},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),oi(i,ee,c)):(c=m.cache,oi(i,ee,c),c!==d.cache&&ff(i,[ee],l,!0))),re(t,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Yn(t){t.flags|=4}function ry(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!mx(i)){if(i=on.current,i!==null&&((Ct&4194048)===Ct?xn!==null:(Ct&62914560)!==Ct&&(Ct&536870912)===0||i!==xn))throw rl=pf,Xb;t.flags|=8192}}function jr(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?Vm():536870912,t.lanes|=i,Go|=i)}function yl(t,i){if(!Mt)switch(t.tailMode){case"hidden":i=t.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Ft(t){var i=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(i)for(var d=t.child;d!==null;)l|=d.lanes|d.childLanes,c|=d.subtreeFlags&65011712,c|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)l|=d.lanes|d.childLanes,c|=d.subtreeFlags,c|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=c,t.childLanes=l,i}function bk(t,i,l){var c=i.pendingProps;switch(sf(i),i.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ft(i),null;case 1:return Ft(i),null;case 3:return l=i.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Hn(ee),We(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(el(i)?Yn(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Vb())),Ft(i),null;case 26:return l=i.memoizedState,t===null?(Yn(i),l!==null?(Ft(i),ry(i,l)):(Ft(i),i.flags&=-16777217)):l?l!==t.memoizedState?(Yn(i),Ft(i),ry(i,l)):(Ft(i),i.flags&=-16777217):(t.memoizedProps!==c&&Yn(i),Ft(i),i.flags&=-16777217),null;case 27:mo(i),l=ut.current;var d=i.type;if(t!==null&&i.stateNode!=null)t.memoizedProps!==c&&Yn(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Ft(i),null}t=lt.current,el(i)?Hb(i):(t=rx(d,c,l),i.stateNode=t,Yn(i))}return Ft(i),null;case 5:if(mo(i),l=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&Yn(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Ft(i),null}if(t=lt.current,el(i))Hb(i);else{switch(d=Br(ut.current),t){case 1:t=d.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:t=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":t=d.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":t=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":t=d.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof c.is=="string"?d.createElement("select",{is:c.is}):d.createElement("select"),c.multiple?t.multiple=!0:c.size&&(t.size=c.size);break;default:t=typeof c.is=="string"?d.createElement(l,{is:c.is}):d.createElement(l)}}t[me]=i,t[je]=c;t:for(d=i.child;d!==null;){if(d.tag===5||d.tag===6)t.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===i)break t;for(;d.sibling===null;){if(d.return===null||d.return===i)break t;d=d.return}d.sibling.return=d.return,d=d.sibling}i.stateNode=t;t:switch(ue(t,l,c),l){case"button":case"input":case"select":case"textarea":t=!!c.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&Yn(i)}}return Ft(i),i.flags&=-16777217,null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==c&&Yn(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(t=ut.current,el(i)){if(t=i.stateNode,l=i.memoizedProps,c=null,d=ve,d!==null)switch(d.tag){case 27:case 5:c=d.memoizedProps}t[me]=i,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||ex(t.nodeValue,l)),t||Ki(i)}else t=Br(t).createTextNode(c),t[me]=i,i.stateNode=t}return Ft(i),null;case 13:if(c=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=el(i),c!==null&&c.dehydrated!==null){if(t===null){if(!d)throw Error(a(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[me]=i}else nl(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ft(i),d=!1}else d=Vb(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(Vn(i),i):(Vn(i),null)}if(Vn(i),(i.flags&128)!==0)return i.lanes=l,i;if(l=c!==null,t=t!==null&&t.memoizedState!==null,l){c=i.child,d=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(d=c.alternate.memoizedState.cachePool.pool);var m=null;c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==d&&(c.flags|=2048)}return l!==t&&l&&(i.child.flags|=8192),jr(i,i.updateQueue),Ft(i),null;case 4:return We(),t===null&&xd(i.stateNode.containerInfo),Ft(i),null;case 10:return Hn(i.type),Ft(i),null;case 19:if(nt(ne),d=i.memoizedState,d===null)return Ft(i),null;if(c=(i.flags&128)!==0,m=d.rendering,m===null)if(c)yl(d,!1);else{if(Gt!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(m=xr(t),m!==null){for(i.flags|=128,yl(d,!1),t=m.updateQueue,i.updateQueue=t,jr(i,t),i.subtreeFlags=0,t=l,l=i.child;l!==null;)Lb(l,t),l=l.sibling;return it(ne,ne.current&1|2),i.child}t=t.sibling}d.tail!==null&&$e()>Er&&(i.flags|=128,c=!0,yl(d,!1),i.lanes=4194304)}else{if(!c)if(t=xr(m),t!==null){if(i.flags|=128,c=!0,t=t.updateQueue,i.updateQueue=t,jr(i,t),yl(d,!0),d.tail===null&&d.tailMode==="hidden"&&!m.alternate&&!Mt)return Ft(i),null}else 2*$e()-d.renderingStartTime>Er&&l!==536870912&&(i.flags|=128,c=!0,yl(d,!1),i.lanes=4194304);d.isBackwards?(m.sibling=i.child,i.child=m):(t=d.last,t!==null?t.sibling=m:i.child=m,d.last=m)}return d.tail!==null?(i=d.tail,d.rendering=i,d.tail=i.sibling,d.renderingStartTime=$e(),i.sibling=null,t=ne.current,it(ne,c?t&1|2:t&1),i):(Ft(i),null);case 22:case 23:return Vn(i),_f(),c=i.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(l&536870912)!==0&&(i.flags&128)===0&&(Ft(i),i.subtreeFlags&6&&(i.flags|=8192)):Ft(i),l=i.updateQueue,l!==null&&jr(i,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==l&&(i.flags|=2048),t!==null&&nt(Qi),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Hn(ee),Ft(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function yk(t,i){switch(sf(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return Hn(ee),We(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return mo(i),null;case 13:if(Vn(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(a(340));nl()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return nt(ne),null;case 4:return We(),null;case 10:return Hn(i.type),null;case 22:case 23:return Vn(i),_f(),t!==null&&nt(Qi),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return Hn(ee),null;case 25:return null;default:return null}}function cy(t,i){switch(sf(i),i.tag){case 3:Hn(ee),We();break;case 26:case 27:case 5:mo(i);break;case 4:We();break;case 13:Vn(i);break;case 19:nt(ne);break;case 10:Hn(i.type);break;case 22:case 23:Vn(i),_f(),t!==null&&nt(Qi);break;case 24:Hn(ee)}}function xl(t,i){try{var l=i.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&t)===t){c=void 0;var m=l.create,x=l.inst;c=m(),x.destroy=c}l=l.next}while(l!==d)}}catch(S){Lt(i,i.return,S)}}function fi(t,i,l){try{var c=i.updateQueue,d=c!==null?c.lastEffect:null;if(d!==null){var m=d.next;c=m;do{if((c.tag&t)===t){var x=c.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,d=i;var T=l,P=S;try{P()}catch(W){Lt(d,T,W)}}}c=c.next}while(c!==m)}}catch(W){Lt(i,i.return,W)}}function uy(t){var i=t.updateQueue;if(i!==null){var l=t.stateNode;try{Zb(i,l)}catch(c){Lt(t,t.return,c)}}}function fy(t,i,l){l.props=Ii(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){Lt(t,i,c)}}function vl(t,i){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(d){Lt(t,i,d)}}function vn(t,i){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(d){Lt(t,i,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(d){Lt(t,i,d)}else l.current=null}function dy(t){var i=t.type,l=t.memoizedProps,c=t.stateNode;try{t:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break t;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(d){Lt(t,t.return,d)}}function $f(t,i,l){try{var c=t.stateNode;Uk(c,t.type,l,i),c[je]=i}catch(d){Lt(t,t.return,d)}}function hy(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&xi(t.type)||t.tag===4}function Qf(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||hy(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&xi(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zf(t,i,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(t),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Lr));else if(c!==4&&(c===27&&xi(t.type)&&(l=t.stateNode,i=null),t=t.child,t!==null))for(Zf(t,i,l),t=t.sibling;t!==null;)Zf(t,i,l),t=t.sibling}function kr(t,i,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?l.insertBefore(t,i):l.appendChild(t);else if(c!==4&&(c===27&&xi(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(kr(t,i,l),t=t.sibling;t!==null;)kr(t,i,l),t=t.sibling}function gy(t){var i=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);ue(i,c,l),i[me]=t,i[je]=l}catch(m){Lt(t,t.return,m)}}var qn=!1,Zt=!1,If=!1,py=typeof WeakSet=="function"?WeakSet:Set,le=null;function xk(t,i){if(t=t.containerInfo,wd=qr,t=Cb(t),$u(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var d=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break t}var x=0,S=-1,T=-1,P=0,W=0,Q=t,q=null;e:for(;;){for(var F;Q!==l||d!==0&&Q.nodeType!==3||(S=x+d),Q!==m||c!==0&&Q.nodeType!==3||(T=x+c),Q.nodeType===3&&(x+=Q.nodeValue.length),(F=Q.firstChild)!==null;)q=Q,Q=F;for(;;){if(Q===t)break e;if(q===l&&++P===d&&(S=x),q===m&&++W===c&&(T=x),(F=Q.nextSibling)!==null)break;Q=q,q=Q.parentNode}Q=F}l=S===-1||T===-1?null:{start:S,end:T}}else l=null}l=l||{start:0,end:0}}else l=null;for(Sd={focusedElem:t,selectionRange:l},qr=!1,le=i;le!==null;)if(i=le,t=i.child,(i.subtreeFlags&1024)!==0&&t!==null)t.return=i,le=t;else for(;le!==null;){switch(i=le,m=i.alternate,t=i.flags,i.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,l=i,d=m.memoizedProps,m=m.memoizedState,c=l.stateNode;try{var pt=Ii(l.type,d,l.elementType===l.type);t=c.getSnapshotBeforeUpdate(pt,m),c.__reactInternalSnapshotBeforeUpdate=t}catch(dt){Lt(l,l.return,dt)}}break;case 3:if((t&1024)!==0){if(t=i.stateNode.containerInfo,l=t.nodeType,l===9)Cd(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Cd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=i.sibling,t!==null){t.return=i.return,le=t;break}le=i.return}}function my(t,i,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:di(t,l),c&4&&xl(5,l);break;case 1:if(di(t,l),c&4)if(t=l.stateNode,i===null)try{t.componentDidMount()}catch(x){Lt(l,l.return,x)}else{var d=Ii(l.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(d,i,t.__reactInternalSnapshotBeforeUpdate)}catch(x){Lt(l,l.return,x)}}c&64&&uy(l),c&512&&vl(l,l.return);break;case 3:if(di(t,l),c&64&&(t=l.updateQueue,t!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{Zb(t,i)}catch(x){Lt(l,l.return,x)}}break;case 27:i===null&&c&4&&gy(l);case 26:case 5:di(t,l),i===null&&c&4&&dy(l),c&512&&vl(l,l.return);break;case 12:di(t,l);break;case 13:di(t,l),c&4&&xy(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=Mk.bind(null,l),Gk(t,l))));break;case 22:if(c=l.memoizedState!==null||qn,!c){i=i!==null&&i.memoizedState!==null||Zt,d=qn;var m=Zt;qn=c,(Zt=i)&&!m?hi(t,l,(l.subtreeFlags&8772)!==0):di(t,l),qn=d,Zt=m}break;case 30:break;default:di(t,l)}}function by(t){var i=t.alternate;i!==null&&(t.alternate=null,by(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&Au(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Yt=null,Ee=!1;function Fn(t,i,l){for(l=l.child;l!==null;)yy(t,i,l),l=l.sibling}function yy(t,i,l){if(xe&&typeof xe.onCommitFiberUnmount=="function")try{xe.onCommitFiberUnmount(Qe,l)}catch{}switch(l.tag){case 26:Zt||vn(l,i),Fn(t,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Zt||vn(l,i);var c=Yt,d=Ee;xi(l.type)&&(Yt=l.stateNode,Ee=!1),Fn(t,i,l),Tl(l.stateNode),Yt=c,Ee=d;break;case 5:Zt||vn(l,i);case 6:if(c=Yt,d=Ee,Yt=null,Fn(t,i,l),Yt=c,Ee=d,Yt!==null)if(Ee)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(l.stateNode)}catch(m){Lt(l,i,m)}else try{Yt.removeChild(l.stateNode)}catch(m){Lt(l,i,m)}break;case 18:Yt!==null&&(Ee?(t=Yt,lx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Bl(t)):lx(Yt,l.stateNode));break;case 4:c=Yt,d=Ee,Yt=l.stateNode.containerInfo,Ee=!0,Fn(t,i,l),Yt=c,Ee=d;break;case 0:case 11:case 14:case 15:Zt||fi(2,l,i),Zt||fi(4,l,i),Fn(t,i,l);break;case 1:Zt||(vn(l,i),c=l.stateNode,typeof c.componentWillUnmount=="function"&&fy(l,i,c)),Fn(t,i,l);break;case 21:Fn(t,i,l);break;case 22:Zt=(c=Zt)||l.memoizedState!==null,Fn(t,i,l),Zt=c;break;default:Fn(t,i,l)}}function xy(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Bl(t)}catch(l){Lt(i,i.return,l)}}function vk(t){switch(t.tag){case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new py),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new py),i;default:throw Error(a(435,t.tag))}}function Jf(t,i){var l=vk(t);i.forEach(function(c){var d=Tk.bind(null,t,c);l.has(c)||(l.add(c),c.then(d,d))})}function Pe(t,i){var l=i.deletions;if(l!==null)for(var c=0;c<l.length;c++){var d=l[c],m=t,x=i,S=x;t:for(;S!==null;){switch(S.tag){case 27:if(xi(S.type)){Yt=S.stateNode,Ee=!1;break t}break;case 5:Yt=S.stateNode,Ee=!1;break t;case 3:case 4:Yt=S.stateNode.containerInfo,Ee=!0;break t}S=S.return}if(Yt===null)throw Error(a(160));yy(m,x,d),Yt=null,Ee=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(i.subtreeFlags&13878)for(i=i.child;i!==null;)vy(i,t),i=i.sibling}var dn=null;function vy(t,i){var l=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Pe(i,t),Ye(t),c&4&&(fi(3,t,t.return),xl(3,t),fi(5,t,t.return));break;case 1:Pe(i,t),Ye(t),c&512&&(Zt||l===null||vn(l,l.return)),c&64&&qn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var d=dn;if(Pe(i,t),Ye(t),c&512&&(Zt||l===null||vn(l,l.return)),c&4){var m=l!==null?l.memoizedState:null;if(c=t.memoizedState,l===null)if(c===null)if(t.stateNode===null){t:{c=t.type,l=t.memoizedProps,d=d.ownerDocument||d;e:switch(c){case"title":m=d.getElementsByTagName("title")[0],(!m||m[Fa]||m[me]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(c),d.head.insertBefore(m,d.querySelector("head > title"))),ue(m,c,l),m[me]=t,oe(m),c=m;break t;case"link":var x=gx("link","href",d).get(c+(l.href||""));if(x){for(var S=0;S<x.length;S++)if(m=x[S],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){x.splice(S,1);break e}}m=d.createElement(c),ue(m,c,l),d.head.appendChild(m);break;case"meta":if(x=gx("meta","content",d).get(c+(l.content||""))){for(S=0;S<x.length;S++)if(m=x[S],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){x.splice(S,1);break e}}m=d.createElement(c),ue(m,c,l),d.head.appendChild(m);break;default:throw Error(a(468,c))}m[me]=t,oe(m),c=m}t.stateNode=c}else px(d,t.type,t.stateNode);else t.stateNode=hx(d,c,t.memoizedProps);else m!==c?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,c===null?px(d,t.type,t.stateNode):hx(d,c,t.memoizedProps)):c===null&&t.stateNode!==null&&$f(t,t.memoizedProps,l.memoizedProps)}break;case 27:Pe(i,t),Ye(t),c&512&&(Zt||l===null||vn(l,l.return)),l!==null&&c&4&&$f(t,t.memoizedProps,l.memoizedProps);break;case 5:if(Pe(i,t),Ye(t),c&512&&(Zt||l===null||vn(l,l.return)),t.flags&32){d=t.stateNode;try{jo(d,"")}catch(F){Lt(t,t.return,F)}}c&4&&t.stateNode!=null&&(d=t.memoizedProps,$f(t,d,l!==null?l.memoizedProps:d)),c&1024&&(If=!0);break;case 6:if(Pe(i,t),Ye(t),c&4){if(t.stateNode===null)throw Error(a(162));c=t.memoizedProps,l=t.stateNode;try{l.nodeValue=c}catch(F){Lt(t,t.return,F)}}break;case 3:if(Vr=null,d=dn,dn=Hr(i.containerInfo),Pe(i,t),dn=d,Ye(t),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Bl(i.containerInfo)}catch(F){Lt(t,t.return,F)}If&&(If=!1,_y(t));break;case 4:c=dn,dn=Hr(t.stateNode.containerInfo),Pe(i,t),Ye(t),dn=c;break;case 12:Pe(i,t),Ye(t);break;case 13:Pe(i,t),Ye(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ad=$e()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Jf(t,c)));break;case 22:d=t.memoizedState!==null;var T=l!==null&&l.memoizedState!==null,P=qn,W=Zt;if(qn=P||d,Zt=W||T,Pe(i,t),Zt=W,qn=P,Ye(t),c&8192)t:for(i=t.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(l===null||T||qn||Zt||Ji(t)),l=null,i=t;;){if(i.tag===5||i.tag===26){if(l===null){T=l=i;try{if(m=T.stateNode,d)x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{S=T.stateNode;var Q=T.memoizedProps.style,q=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(F){Lt(T,T.return,F)}}}else if(i.tag===6){if(l===null){T=i;try{T.stateNode.nodeValue=d?"":T.memoizedProps}catch(F){Lt(T,T.return,F)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===t)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break t;for(;i.sibling===null;){if(i.return===null||i.return===t)break t;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=t.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,Jf(t,l))));break;case 19:Pe(i,t),Ye(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Jf(t,c)));break;case 30:break;case 21:break;default:Pe(i,t),Ye(t)}}function Ye(t){var i=t.flags;if(i&2){try{for(var l,c=t.return;c!==null;){if(hy(c)){l=c;break}c=c.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var d=l.stateNode,m=Qf(t);kr(t,m,d);break;case 5:var x=l.stateNode;l.flags&32&&(jo(x,""),l.flags&=-33);var S=Qf(t);kr(t,S,x);break;case 3:case 4:var T=l.stateNode.containerInfo,P=Qf(t);Zf(t,P,T);break;default:throw Error(a(161))}}catch(W){Lt(t,t.return,W)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function _y(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;_y(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),t=t.sibling}}function di(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)my(t,i.alternate,i),i=i.sibling}function Ji(t){for(t=t.child;t!==null;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:fi(4,i,i.return),Ji(i);break;case 1:vn(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&fy(i,i.return,l),Ji(i);break;case 27:Tl(i.stateNode);case 26:case 5:vn(i,i.return),Ji(i);break;case 22:i.memoizedState===null&&Ji(i);break;case 30:Ji(i);break;default:Ji(i)}t=t.sibling}}function hi(t,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,d=t,m=i,x=m.flags;switch(m.tag){case 0:case 11:case 15:hi(d,m,l),xl(4,m);break;case 1:if(hi(d,m,l),c=m,d=c.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(P){Lt(c,c.return,P)}if(c=m,d=c.updateQueue,d!==null){var S=c.stateNode;try{var T=d.shared.hiddenCallbacks;if(T!==null)for(d.shared.hiddenCallbacks=null,d=0;d<T.length;d++)Qb(T[d],S)}catch(P){Lt(c,c.return,P)}}l&&x&64&&uy(m),vl(m,m.return);break;case 27:gy(m);case 26:case 5:hi(d,m,l),l&&c===null&&x&4&&dy(m),vl(m,m.return);break;case 12:hi(d,m,l);break;case 13:hi(d,m,l),l&&x&4&&xy(d,m);break;case 22:m.memoizedState===null&&hi(d,m,l),vl(m,m.return);break;case 30:break;default:hi(d,m,l)}i=i.sibling}}function td(t,i){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&al(l))}function ed(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&al(t))}function _n(t,i,l,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)wy(t,i,l,c),i=i.sibling}function wy(t,i,l,c){var d=i.flags;switch(i.tag){case 0:case 11:case 15:_n(t,i,l,c),d&2048&&xl(9,i);break;case 1:_n(t,i,l,c);break;case 3:_n(t,i,l,c),d&2048&&(t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&al(t)));break;case 12:if(d&2048){_n(t,i,l,c),t=i.stateNode;try{var m=i.memoizedProps,x=m.id,S=m.onPostCommit;typeof S=="function"&&S(x,i.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(T){Lt(i,i.return,T)}}else _n(t,i,l,c);break;case 13:_n(t,i,l,c);break;case 23:break;case 22:m=i.stateNode,x=i.alternate,i.memoizedState!==null?m._visibility&2?_n(t,i,l,c):_l(t,i):m._visibility&2?_n(t,i,l,c):(m._visibility|=2,qo(t,i,l,c,(i.subtreeFlags&10256)!==0)),d&2048&&td(x,i);break;case 24:_n(t,i,l,c),d&2048&&ed(i.alternate,i);break;default:_n(t,i,l,c)}}function qo(t,i,l,c,d){for(d=d&&(i.subtreeFlags&10256)!==0,i=i.child;i!==null;){var m=t,x=i,S=l,T=c,P=x.flags;switch(x.tag){case 0:case 11:case 15:qo(m,x,S,T,d),xl(8,x);break;case 23:break;case 22:var W=x.stateNode;x.memoizedState!==null?W._visibility&2?qo(m,x,S,T,d):_l(m,x):(W._visibility|=2,qo(m,x,S,T,d)),d&&P&2048&&td(x.alternate,x);break;case 24:qo(m,x,S,T,d),d&&P&2048&&ed(x.alternate,x);break;default:qo(m,x,S,T,d)}i=i.sibling}}function _l(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=t,c=i,d=c.flags;switch(c.tag){case 22:_l(l,c),d&2048&&td(c.alternate,c);break;case 24:_l(l,c),d&2048&&ed(c.alternate,c);break;default:_l(l,c)}i=i.sibling}}var wl=8192;function Fo(t){if(t.subtreeFlags&wl)for(t=t.child;t!==null;)Sy(t),t=t.sibling}function Sy(t){switch(t.tag){case 26:Fo(t),t.flags&wl&&t.memoizedState!==null&&aC(dn,t.memoizedState,t.memoizedProps);break;case 5:Fo(t);break;case 3:case 4:var i=dn;dn=Hr(t.stateNode.containerInfo),Fo(t),dn=i;break;case 22:t.memoizedState===null&&(i=t.alternate,i!==null&&i.memoizedState!==null?(i=wl,wl=16777216,Fo(t),wl=i):Fo(t));break;default:Fo(t)}}function jy(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function Sl(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];le=c,Cy(c,t)}jy(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ky(t),t=t.sibling}function ky(t){switch(t.tag){case 0:case 11:case 15:Sl(t),t.flags&2048&&fi(9,t,t.return);break;case 3:Sl(t);break;case 12:Sl(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,Cr(t)):Sl(t);break;default:Sl(t)}}function Cr(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];le=c,Cy(c,t)}jy(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:fi(8,i,i.return),Cr(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,Cr(i));break;default:Cr(i)}t=t.sibling}}function Cy(t,i){for(;le!==null;){var l=le;switch(l.tag){case 0:case 11:case 15:fi(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:al(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,le=c;else t:for(l=t;le!==null;){c=le;var d=c.sibling,m=c.return;if(by(c),c===l){le=null;break t}if(d!==null){d.return=m,le=d;break t}le=m}}}var _k={getCacheForType:function(t){var i=be(ee),l=i.data.get(t);return l===void 0&&(l=t(),i.data.set(t,l)),l}},wk=typeof WeakMap=="function"?WeakMap:Map,At=0,Ht=null,St=null,Ct=0,Nt=0,qe=null,gi=!1,Xo=!1,nd=!1,Xn=0,Gt=0,pi=0,to=0,id=0,an=0,Go=0,jl=null,Me=null,od=!1,ad=0,Er=1/0,Mr=null,mi=null,ce=0,bi=null,Ko=null,Wo=0,ld=0,sd=null,Ey=null,kl=0,rd=null;function Fe(){if((At&2)!==0&&Ct!==0)return Ct&-Ct;if(H.T!==null){var t=zo;return t!==0?t:pd()}return qm()}function My(){an===0&&(an=(Ct&536870912)===0||Mt?Um():536870912);var t=on.current;return t!==null&&(t.flags|=32),an}function Xe(t,i,l){(t===Ht&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)&&($o(t,0),yi(t,Ct,an,!1)),qa(t,l),((At&2)===0||t!==Ht)&&(t===Ht&&((At&2)===0&&(to|=l),Gt===4&&yi(t,Ct,an,!1)),wn(t))}function Ty(t,i,l){if((At&6)!==0)throw Error(a(327));var c=!l&&(i&124)===0&&(i&t.expiredLanes)===0||Ya(t,i),d=c?kk(t,i):fd(t,i,!0),m=c;do{if(d===0){Xo&&!c&&yi(t,i,0,!1);break}else{if(l=t.current.alternate,m&&!Sk(l)){d=fd(t,i,!1),m=!1;continue}if(d===2){if(m=i,t.errorRecoveryDisabledLanes&m)var x=0;else x=t.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){i=x;t:{var S=t;d=jl;var T=S.current.memoizedState.isDehydrated;if(T&&($o(S,x).flags|=256),x=fd(S,x,!1),x!==2){if(nd&&!T){S.errorRecoveryDisabledLanes|=m,to|=m,d=4;break t}m=Me,Me=d,m!==null&&(Me===null?Me=m:Me.push.apply(Me,m))}d=x}if(m=!1,d!==2)continue}}if(d===1){$o(t,0),yi(t,i,0,!0);break}t:{switch(c=t,m=d,m){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:yi(c,i,an,!gi);break t;case 2:Me=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(d=ad+300-$e(),10<d)){if(yi(c,i,an,!gi),Us(c,0,!0)!==0)break t;c.timeoutHandle=ox(Ay.bind(null,c,l,Me,Mr,od,i,an,to,Go,gi,m,2,-0,0),d);break t}Ay(c,l,Me,Mr,od,i,an,to,Go,gi,m,0,-0,0)}}break}while(!0);wn(t)}function Ay(t,i,l,c,d,m,x,S,T,P,W,Q,q,F){if(t.timeoutHandle=-1,Q=i.subtreeFlags,(Q&8192||(Q&16785408)===16785408)&&(Ol={stylesheets:null,count:0,unsuspend:oC},Sy(i),Q=lC(),Q!==null)){t.cancelPendingCommit=Q(By.bind(null,t,i,m,l,c,d,x,S,T,W,1,q,F)),yi(t,m,x,!P);return}By(t,i,m,l,c,d,x,S,T)}function Sk(t){for(var i=t;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var d=l[c],m=d.getSnapshot;d=d.value;try{if(!Ue(m(),d))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function yi(t,i,l,c){i&=~id,i&=~to,t.suspendedLanes|=i,t.pingedLanes&=~i,c&&(t.warmLanes|=i),c=t.expirationTimes;for(var d=i;0<d;){var m=31-He(d),x=1<<m;c[m]=-1,d&=~x}l!==0&&Pm(t,l,i)}function Tr(){return(At&6)===0?(Cl(0),!1):!0}function cd(){if(St!==null){if(Nt===0)var t=St.return;else t=St,Bn=Wi=null,Cf(t),Po=null,ml=0,t=St;for(;t!==null;)cy(t.alternate,t),t=t.return;St=null}}function $o(t,i){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,Pk(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),cd(),Ht=t,St=l=Dn(t.current,null),Ct=i,Nt=0,qe=null,gi=!1,Xo=Ya(t,i),nd=!1,Go=an=id=to=pi=Gt=0,Me=jl=null,od=!1,(i&8)!==0&&(i|=i&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=i;0<c;){var d=31-He(c),m=1<<d;i|=t[d],c&=~m}return Xn=i,Zs(),l}function Ny(t,i){yt=null,H.H=mr,i===sl||i===lr?(i=Wb(),Nt=3):i===Xb?(i=Wb(),Nt=4):Nt=i===$0?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,qe=i,St===null&&(Gt=1,_r(t,Je(i,t.current)))}function Oy(){var t=H.H;return H.H=mr,t===null?mr:t}function Ry(){var t=H.A;return H.A=_k,t}function ud(){Gt=4,gi||(Ct&4194048)!==Ct&&on.current!==null||(Xo=!0),(pi&134217727)===0&&(to&134217727)===0||Ht===null||yi(Ht,Ct,an,!1)}function fd(t,i,l){var c=At;At|=2;var d=Oy(),m=Ry();(Ht!==t||Ct!==i)&&(Mr=null,$o(t,i)),i=!1;var x=Gt;t:do try{if(Nt!==0&&St!==null){var S=St,T=qe;switch(Nt){case 8:cd(),x=6;break t;case 3:case 2:case 9:case 6:on.current===null&&(i=!0);var P=Nt;if(Nt=0,qe=null,Qo(t,S,T,P),l&&Xo){x=0;break t}break;default:P=Nt,Nt=0,qe=null,Qo(t,S,T,P)}}jk(),x=Gt;break}catch(W){Ny(t,W)}while(!0);return i&&t.shellSuspendCounter++,Bn=Wi=null,At=c,H.H=d,H.A=m,St===null&&(Ht=null,Ct=0,Zs()),x}function jk(){for(;St!==null;)Dy(St)}function kk(t,i){var l=At;At|=2;var c=Oy(),d=Ry();Ht!==t||Ct!==i?(Mr=null,Er=$e()+500,$o(t,i)):Xo=Ya(t,i);t:do try{if(Nt!==0&&St!==null){i=St;var m=qe;e:switch(Nt){case 1:Nt=0,qe=null,Qo(t,i,m,1);break;case 2:case 9:if(Gb(m)){Nt=0,qe=null,zy(i);break}i=function(){Nt!==2&&Nt!==9||Ht!==t||(Nt=7),wn(t)},m.then(i,i);break t;case 3:Nt=7;break t;case 4:Nt=5;break t;case 7:Gb(m)?(Nt=0,qe=null,zy(i)):(Nt=0,qe=null,Qo(t,i,m,7));break;case 5:var x=null;switch(St.tag){case 26:x=St.memoizedState;case 5:case 27:var S=St;if(!x||mx(x)){Nt=0,qe=null;var T=S.sibling;if(T!==null)St=T;else{var P=S.return;P!==null?(St=P,Ar(P)):St=null}break e}}Nt=0,qe=null,Qo(t,i,m,5);break;case 6:Nt=0,qe=null,Qo(t,i,m,6);break;case 8:cd(),Gt=6;break t;default:throw Error(a(462))}}Ck();break}catch(W){Ny(t,W)}while(!0);return Bn=Wi=null,H.H=c,H.A=d,At=l,St!==null?0:(Ht=null,Ct=0,Zs(),Gt)}function Ck(){for(;St!==null&&!Su();)Dy(St)}function Dy(t){var i=sy(t.alternate,t,Xn);t.memoizedProps=t.pendingProps,i===null?Ar(t):St=i}function zy(t){var i=t,l=i.alternate;switch(i.tag){case 15:case 0:i=ey(l,i,i.pendingProps,i.type,void 0,Ct);break;case 11:i=ey(l,i,i.pendingProps,i.type.render,i.ref,Ct);break;case 5:Cf(i);default:cy(l,i),i=St=Lb(i,Xn),i=sy(l,i,Xn)}t.memoizedProps=t.pendingProps,i===null?Ar(t):St=i}function Qo(t,i,l,c){Bn=Wi=null,Cf(i),Po=null,ml=0;var d=i.return;try{if(pk(t,d,i,l,Ct)){Gt=1,_r(t,Je(l,t.current)),St=null;return}}catch(m){if(d!==null)throw St=d,m;Gt=1,_r(t,Je(l,t.current)),St=null;return}i.flags&32768?(Mt||c===1?t=!0:Xo||(Ct&536870912)!==0?t=!1:(gi=t=!0,(c===2||c===9||c===3||c===6)&&(c=on.current,c!==null&&c.tag===13&&(c.flags|=16384))),Ly(i,t)):Ar(i)}function Ar(t){var i=t;do{if((i.flags&32768)!==0){Ly(i,gi);return}t=i.return;var l=bk(i.alternate,i,Xn);if(l!==null){St=l;return}if(i=i.sibling,i!==null){St=i;return}St=i=t}while(i!==null);Gt===0&&(Gt=5)}function Ly(t,i){do{var l=yk(t.alternate,t);if(l!==null){l.flags&=32767,St=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(t=t.sibling,t!==null)){St=t;return}St=t=l}while(t!==null);Gt=6,St=null}function By(t,i,l,c,d,m,x,S,T){t.cancelPendingCommit=null;do Nr();while(ce!==0);if((At&6)!==0)throw Error(a(327));if(i!==null){if(i===t.current)throw Error(a(177));if(m=i.lanes|i.childLanes,m|=tf,o3(t,l,m,x,S,T),t===Ht&&(St=Ht=null,Ct=0),Ko=i,bi=t,Wo=l,ld=m,sd=d,Ey=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Ak(N,function(){return Yy(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=H.T,H.T=null,d=Z.p,Z.p=2,x=At,At|=4;try{xk(t,i,l)}finally{At=x,Z.p=d,H.T=c}}ce=1,Hy(),Uy(),Vy()}}function Hy(){if(ce===1){ce=0;var t=bi,i=Ko,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var c=Z.p;Z.p=2;var d=At;At|=4;try{vy(i,t);var m=Sd,x=Cb(t.containerInfo),S=m.focusedElem,T=m.selectionRange;if(x!==S&&S&&S.ownerDocument&&kb(S.ownerDocument.documentElement,S)){if(T!==null&&$u(S)){var P=T.start,W=T.end;if(W===void 0&&(W=P),"selectionStart"in S)S.selectionStart=P,S.selectionEnd=Math.min(W,S.value.length);else{var Q=S.ownerDocument||document,q=Q&&Q.defaultView||window;if(q.getSelection){var F=q.getSelection(),pt=S.textContent.length,dt=Math.min(T.start,pt),Dt=T.end===void 0?dt:Math.min(T.end,pt);!F.extend&&dt>Dt&&(x=Dt,Dt=dt,dt=x);var B=jb(S,dt),R=jb(S,Dt);if(B&&R&&(F.rangeCount!==1||F.anchorNode!==B.node||F.anchorOffset!==B.offset||F.focusNode!==R.node||F.focusOffset!==R.offset)){var V=Q.createRange();V.setStart(B.node,B.offset),F.removeAllRanges(),dt>Dt?(F.addRange(V),F.extend(R.node,R.offset)):(V.setEnd(R.node,R.offset),F.addRange(V))}}}}for(Q=[],F=S;F=F.parentNode;)F.nodeType===1&&Q.push({element:F,left:F.scrollLeft,top:F.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Q.length;S++){var $=Q[S];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}qr=!!wd,Sd=wd=null}finally{At=d,Z.p=c,H.T=l}}t.current=i,ce=2}}function Uy(){if(ce===2){ce=0;var t=bi,i=Ko,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var c=Z.p;Z.p=2;var d=At;At|=4;try{my(t,i.alternate,i)}finally{At=d,Z.p=c,H.T=l}}ce=3}}function Vy(){if(ce===4||ce===3){ce=0,ju();var t=bi,i=Ko,l=Wo,c=Ey;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ce=5:(ce=0,Ko=bi=null,Py(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(mi=null),Mu(l),i=i.stateNode,xe&&typeof xe.onCommitFiberRoot=="function")try{xe.onCommitFiberRoot(Qe,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=H.T,d=Z.p,Z.p=2,H.T=null;try{for(var m=t.onRecoverableError,x=0;x<c.length;x++){var S=c[x];m(S.value,{componentStack:S.stack})}}finally{H.T=i,Z.p=d}}(Wo&3)!==0&&Nr(),wn(t),d=t.pendingLanes,(l&4194090)!==0&&(d&42)!==0?t===rd?kl++:(kl=0,rd=t):kl=0,Cl(0)}}function Py(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,al(i)))}function Nr(t){return Hy(),Uy(),Vy(),Yy()}function Yy(){if(ce!==5)return!1;var t=bi,i=ld;ld=0;var l=Mu(Wo),c=H.T,d=Z.p;try{Z.p=32>l?32:l,H.T=null,l=sd,sd=null;var m=bi,x=Wo;if(ce=0,Ko=bi=null,Wo=0,(At&6)!==0)throw Error(a(331));var S=At;if(At|=4,ky(m.current),wy(m,m.current,x,l),At=S,Cl(0,!1),xe&&typeof xe.onPostCommitFiberRoot=="function")try{xe.onPostCommitFiberRoot(Qe,m)}catch{}return!0}finally{Z.p=d,H.T=c,Py(t,i)}}function qy(t,i,l){i=Je(l,i),i=Vf(t.stateNode,i,2),t=si(t,i,2),t!==null&&(qa(t,2),wn(t))}function Lt(t,i,l){if(t.tag===3)qy(t,t,l);else for(;i!==null;){if(i.tag===3){qy(i,t,l);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(mi===null||!mi.has(c))){t=Je(l,t),l=K0(2),c=si(i,l,2),c!==null&&(W0(l,c,i,t),qa(c,2),wn(c));break}}i=i.return}}function dd(t,i,l){var c=t.pingCache;if(c===null){c=t.pingCache=new wk;var d=new Set;c.set(i,d)}else d=c.get(i),d===void 0&&(d=new Set,c.set(i,d));d.has(l)||(nd=!0,d.add(l),t=Ek.bind(null,t,i,l),i.then(t,t))}function Ek(t,i,l){var c=t.pingCache;c!==null&&c.delete(i),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Ht===t&&(Ct&l)===l&&(Gt===4||Gt===3&&(Ct&62914560)===Ct&&300>$e()-ad?(At&2)===0&&$o(t,0):id|=l,Go===Ct&&(Go=0)),wn(t)}function Fy(t,i){i===0&&(i=Vm()),t=No(t,i),t!==null&&(qa(t,i),wn(t))}function Mk(t){var i=t.memoizedState,l=0;i!==null&&(l=i.retryLane),Fy(t,l)}function Tk(t,i){var l=0;switch(t.tag){case 13:var c=t.stateNode,d=t.memoizedState;d!==null&&(l=d.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),Fy(t,l)}function Ak(t,i){return Va(t,i)}var Or=null,Zo=null,hd=!1,Rr=!1,gd=!1,eo=0;function wn(t){t!==Zo&&t.next===null&&(Zo===null?Or=Zo=t:Zo=Zo.next=t),Rr=!0,hd||(hd=!0,Ok())}function Cl(t,i){if(!gd&&Rr){gd=!0;do for(var l=!1,c=Or;c!==null;){if(t!==0){var d=c.pendingLanes;if(d===0)var m=0;else{var x=c.suspendedLanes,S=c.pingedLanes;m=(1<<31-He(42|t)+1)-1,m&=d&~(x&~S),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,Wy(c,m))}else m=Ct,m=Us(c,c===Ht?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||Ya(c,m)||(l=!0,Wy(c,m));c=c.next}while(l);gd=!1}}function Nk(){Xy()}function Xy(){Rr=hd=!1;var t=0;eo!==0&&(Vk()&&(t=eo),eo=0);for(var i=$e(),l=null,c=Or;c!==null;){var d=c.next,m=Gy(c,i);m===0?(c.next=null,l===null?Or=d:l.next=d,d===null&&(Zo=l)):(l=c,(t!==0||(m&3)!==0)&&(Rr=!0)),c=d}Cl(t)}function Gy(t,i){for(var l=t.suspendedLanes,c=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var x=31-He(m),S=1<<x,T=d[x];T===-1?((S&l)===0||(S&c)!==0)&&(d[x]=i3(S,i)):T<=i&&(t.expiredLanes|=S),m&=~S}if(i=Ht,l=Ct,l=Us(t,t===i?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===i&&(Nt===2||Nt===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Pa(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Ya(t,l)){if(i=l&-l,i===t.callbackPriority)return i;switch(c!==null&&Pa(c),Mu(l)){case 2:case 8:l=Ls;break;case 32:l=N;break;case 268435456:l=$t;break;default:l=N}return c=Ky.bind(null,t),l=Va(l,c),t.callbackPriority=i,t.callbackNode=l,i}return c!==null&&c!==null&&Pa(c),t.callbackPriority=2,t.callbackNode=null,2}function Ky(t,i){if(ce!==0&&ce!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Nr()&&t.callbackNode!==l)return null;var c=Ct;return c=Us(t,t===Ht?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(Ty(t,c,i),Gy(t,$e()),t.callbackNode!=null&&t.callbackNode===l?Ky.bind(null,t):null)}function Wy(t,i){if(Nr())return null;Ty(t,i,!0)}function Ok(){Yk(function(){(At&6)!==0?Va(zs,Nk):Xy()})}function pd(){return eo===0&&(eo=Um()),eo}function $y(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Fs(""+t)}function Qy(t,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,t.id&&l.setAttribute("form",t.id),i.parentNode.insertBefore(l,i),t=new FormData(t),l.parentNode.removeChild(l),t}function Rk(t,i,l,c,d){if(i==="submit"&&l&&l.stateNode===d){var m=$y((d[je]||null).action),x=c.submitter;x&&(i=(i=x[je]||null)?$y(i.formAction):x.getAttribute("formAction"),i!==null&&(m=i,x=null));var S=new Ws("action","action",null,c,d);t.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(eo!==0){var T=x?Qy(d,x):new FormData(d);zf(l,{pending:!0,data:T,method:d.method,action:m},null,T)}}else typeof m=="function"&&(S.preventDefault(),T=x?Qy(d,x):new FormData(d),zf(l,{pending:!0,data:T,method:d.method,action:m},m,T))},currentTarget:d}]})}}for(var md=0;md<Ju.length;md++){var bd=Ju[md],Dk=bd.toLowerCase(),zk=bd[0].toUpperCase()+bd.slice(1);fn(Dk,"on"+zk)}fn(Tb,"onAnimationEnd"),fn(Ab,"onAnimationIteration"),fn(Nb,"onAnimationStart"),fn("dblclick","onDoubleClick"),fn("focusin","onFocus"),fn("focusout","onBlur"),fn(I3,"onTransitionRun"),fn(J3,"onTransitionStart"),fn(tk,"onTransitionCancel"),fn(Ob,"onTransitionEnd"),_o("onMouseEnter",["mouseout","mouseover"]),_o("onMouseLeave",["mouseout","mouseover"]),_o("onPointerEnter",["pointerout","pointerover"]),_o("onPointerLeave",["pointerout","pointerover"]),Ui("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ui("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ui("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ui("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ui("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ui("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function Zy(t,i){i=(i&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],d=c.event;c=c.listeners;t:{var m=void 0;if(i)for(var x=c.length-1;0<=x;x--){var S=c[x],T=S.instance,P=S.currentTarget;if(S=S.listener,T!==m&&d.isPropagationStopped())break t;m=S,d.currentTarget=P;try{m(d)}catch(W){vr(W)}d.currentTarget=null,m=T}else for(x=0;x<c.length;x++){if(S=c[x],T=S.instance,P=S.currentTarget,S=S.listener,T!==m&&d.isPropagationStopped())break t;m=S,d.currentTarget=P;try{m(d)}catch(W){vr(W)}d.currentTarget=null,m=T}}}}function jt(t,i){var l=i[Tu];l===void 0&&(l=i[Tu]=new Set);var c=t+"__bubble";l.has(c)||(Iy(i,t,2,!1),l.add(c))}function yd(t,i,l){var c=0;i&&(c|=4),Iy(l,t,c,i)}var Dr="_reactListening"+Math.random().toString(36).slice(2);function xd(t){if(!t[Dr]){t[Dr]=!0,Xm.forEach(function(l){l!=="selectionchange"&&(Lk.has(l)||yd(l,!1,t),yd(l,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Dr]||(i[Dr]=!0,yd("selectionchange",!1,i))}}function Iy(t,i,l,c){switch(wx(i)){case 2:var d=cC;break;case 8:d=uC;break;default:d=Rd}l=d.bind(null,i,l,t),d=void 0,!Vu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),c?d!==void 0?t.addEventListener(i,l,{capture:!0,passive:d}):t.addEventListener(i,l,!0):d!==void 0?t.addEventListener(i,l,{passive:d}):t.addEventListener(i,l,!1)}function vd(t,i,l,c,d){var m=c;if((i&1)===0&&(i&2)===0&&c!==null)t:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var S=c.stateNode.containerInfo;if(S===d)break;if(x===4)for(x=c.return;x!==null;){var T=x.tag;if((T===3||T===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;S!==null;){if(x=yo(S),x===null)return;if(T=x.tag,T===5||T===6||T===26||T===27){c=m=x;continue t}S=S.parentNode}}c=c.return}ab(function(){var P=m,W=Hu(l),Q=[];t:{var q=Rb.get(t);if(q!==void 0){var F=Ws,pt=t;switch(t){case"keypress":if(Gs(l)===0)break t;case"keydown":case"keyup":F=A3;break;case"focusin":pt="focus",F=Fu;break;case"focusout":pt="blur",F=Fu;break;case"beforeblur":case"afterblur":F=Fu;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":F=rb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":F=y3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":F=R3;break;case Tb:case Ab:case Nb:F=_3;break;case Ob:F=z3;break;case"scroll":case"scrollend":F=m3;break;case"wheel":F=B3;break;case"copy":case"cut":case"paste":F=S3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":F=ub;break;case"toggle":case"beforetoggle":F=U3}var dt=(i&4)!==0,Dt=!dt&&(t==="scroll"||t==="scrollend"),B=dt?q!==null?q+"Capture":null:q;dt=[];for(var R=P,V;R!==null;){var $=R;if(V=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||V===null||B===null||($=Ga(R,B),$!=null&&dt.push(Ml(R,$,V))),Dt)break;R=R.return}0<dt.length&&(q=new F(q,pt,null,l,W),Q.push({event:q,listeners:dt}))}}if((i&7)===0){t:{if(q=t==="mouseover"||t==="pointerover",F=t==="mouseout"||t==="pointerout",q&&l!==Bu&&(pt=l.relatedTarget||l.fromElement)&&(yo(pt)||pt[bo]))break t;if((F||q)&&(q=W.window===W?W:(q=W.ownerDocument)?q.defaultView||q.parentWindow:window,F?(pt=l.relatedTarget||l.toElement,F=P,pt=pt?yo(pt):null,pt!==null&&(Dt=r(pt),dt=pt.tag,pt!==Dt||dt!==5&&dt!==27&&dt!==6)&&(pt=null)):(F=null,pt=P),F!==pt)){if(dt=rb,$="onMouseLeave",B="onMouseEnter",R="mouse",(t==="pointerout"||t==="pointerover")&&(dt=ub,$="onPointerLeave",B="onPointerEnter",R="pointer"),Dt=F==null?q:Xa(F),V=pt==null?q:Xa(pt),q=new dt($,R+"leave",F,l,W),q.target=Dt,q.relatedTarget=V,$=null,yo(W)===P&&(dt=new dt(B,R+"enter",pt,l,W),dt.target=V,dt.relatedTarget=Dt,$=dt),Dt=$,F&&pt)e:{for(dt=F,B=pt,R=0,V=dt;V;V=Io(V))R++;for(V=0,$=B;$;$=Io($))V++;for(;0<R-V;)dt=Io(dt),R--;for(;0<V-R;)B=Io(B),V--;for(;R--;){if(dt===B||B!==null&&dt===B.alternate)break e;dt=Io(dt),B=Io(B)}dt=null}else dt=null;F!==null&&Jy(Q,q,F,dt,!1),pt!==null&&Dt!==null&&Jy(Q,Dt,pt,dt,!0)}}t:{if(q=P?Xa(P):window,F=q.nodeName&&q.nodeName.toLowerCase(),F==="select"||F==="input"&&q.type==="file")var st=yb;else if(mb(q))if(xb)st=$3;else{st=K3;var vt=G3}else F=q.nodeName,!F||F.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?P&&Lu(P.elementType)&&(st=yb):st=W3;if(st&&(st=st(t,P))){bb(Q,st,l,W);break t}vt&&vt(t,q,P),t==="focusout"&&P&&q.type==="number"&&P.memoizedProps.value!=null&&zu(q,"number",q.value)}switch(vt=P?Xa(P):window,t){case"focusin":(mb(vt)||vt.contentEditable==="true")&&(Mo=vt,Qu=P,tl=null);break;case"focusout":tl=Qu=Mo=null;break;case"mousedown":Zu=!0;break;case"contextmenu":case"mouseup":case"dragend":Zu=!1,Eb(Q,l,W);break;case"selectionchange":if(Z3)break;case"keydown":case"keyup":Eb(Q,l,W)}var ft;if(Gu)t:{switch(t){case"compositionstart":var ht="onCompositionStart";break t;case"compositionend":ht="onCompositionEnd";break t;case"compositionupdate":ht="onCompositionUpdate";break t}ht=void 0}else Eo?gb(t,l)&&(ht="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(ht="onCompositionStart");ht&&(fb&&l.locale!=="ko"&&(Eo||ht!=="onCompositionStart"?ht==="onCompositionEnd"&&Eo&&(ft=lb()):(ii=W,Pu="value"in ii?ii.value:ii.textContent,Eo=!0)),vt=zr(P,ht),0<vt.length&&(ht=new cb(ht,t,null,l,W),Q.push({event:ht,listeners:vt}),ft?ht.data=ft:(ft=pb(l),ft!==null&&(ht.data=ft)))),(ft=P3?Y3(t,l):q3(t,l))&&(ht=zr(P,"onBeforeInput"),0<ht.length&&(vt=new cb("onBeforeInput","beforeinput",null,l,W),Q.push({event:vt,listeners:ht}),vt.data=ft)),Rk(Q,t,P,l,W)}Zy(Q,i)})}function Ml(t,i,l){return{instance:t,listener:i,currentTarget:l}}function zr(t,i){for(var l=i+"Capture",c=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Ga(t,l),d!=null&&c.unshift(Ml(t,d,m)),d=Ga(t,i),d!=null&&c.push(Ml(t,d,m))),t.tag===3)return c;t=t.return}return[]}function Io(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Jy(t,i,l,c,d){for(var m=i._reactName,x=[];l!==null&&l!==c;){var S=l,T=S.alternate,P=S.stateNode;if(S=S.tag,T!==null&&T===c)break;S!==5&&S!==26&&S!==27||P===null||(T=P,d?(P=Ga(l,m),P!=null&&x.unshift(Ml(l,P,T))):d||(P=Ga(l,m),P!=null&&x.push(Ml(l,P,T)))),l=l.return}x.length!==0&&t.push({event:i,listeners:x})}var Bk=/\r\n?/g,Hk=/\u0000|\uFFFD/g;function tx(t){return(typeof t=="string"?t:""+t).replace(Bk,`
`).replace(Hk,"")}function ex(t,i){return i=tx(i),tx(t)===i}function Lr(){}function Rt(t,i,l,c,d,m){switch(l){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||jo(t,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&jo(t,""+c);break;case"className":Ps(t,"class",c);break;case"tabIndex":Ps(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ps(t,l,c);break;case"style":ib(t,c,m);break;case"data":if(i!=="object"){Ps(t,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Fs(""+c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(l==="formAction"?(i!=="input"&&Rt(t,i,"name",d.name,d,null),Rt(t,i,"formEncType",d.formEncType,d,null),Rt(t,i,"formMethod",d.formMethod,d,null),Rt(t,i,"formTarget",d.formTarget,d,null)):(Rt(t,i,"encType",d.encType,d,null),Rt(t,i,"method",d.method,d,null),Rt(t,i,"target",d.target,d,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Fs(""+c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=Lr);break;case"onScroll":c!=null&&jt("scroll",t);break;case"onScrollEnd":c!=null&&jt("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=Fs(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""+c):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":jt("beforetoggle",t),jt("toggle",t),Vs(t,"popover",c);break;case"xlinkActuate":On(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":On(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":On(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":On(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":On(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":On(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":On(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":On(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":On(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Vs(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=g3.get(l)||l,Vs(t,l,c))}}function _d(t,i,l,c,d,m){switch(l){case"style":ib(t,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"children":typeof c=="string"?jo(t,c):(typeof c=="number"||typeof c=="bigint")&&jo(t,""+c);break;case"onScroll":c!=null&&jt("scroll",t);break;case"onScrollEnd":c!=null&&jt("scrollend",t);break;case"onClick":c!=null&&(t.onclick=Lr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gm.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(d=l.endsWith("Capture"),i=l.slice(2,d?l.length-7:void 0),m=t[je]||null,m=m!=null?m[l]:null,typeof m=="function"&&t.removeEventListener(i,m,d),typeof c=="function")){typeof m!="function"&&m!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(i,c,d);break t}l in t?t[l]=c:c===!0?t.setAttribute(l,""):Vs(t,l,c)}}}function ue(t,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jt("error",t),jt("load",t);var c=!1,d=!1,m;for(m in l)if(l.hasOwnProperty(m)){var x=l[m];if(x!=null)switch(m){case"src":c=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Rt(t,i,m,x,l,null)}}d&&Rt(t,i,"srcSet",l.srcSet,l,null),c&&Rt(t,i,"src",l.src,l,null);return;case"input":jt("invalid",t);var S=m=x=d=null,T=null,P=null;for(c in l)if(l.hasOwnProperty(c)){var W=l[c];if(W!=null)switch(c){case"name":d=W;break;case"type":x=W;break;case"checked":T=W;break;case"defaultChecked":P=W;break;case"value":m=W;break;case"defaultValue":S=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,i));break;default:Rt(t,i,c,W,l,null)}}Jm(t,m,S,T,P,x,d,!1),Ys(t);return;case"select":jt("invalid",t),c=x=m=null;for(d in l)if(l.hasOwnProperty(d)&&(S=l[d],S!=null))switch(d){case"value":m=S;break;case"defaultValue":x=S;break;case"multiple":c=S;default:Rt(t,i,d,S,l,null)}i=m,l=x,t.multiple=!!c,i!=null?So(t,!!c,i,!1):l!=null&&So(t,!!c,l,!0);return;case"textarea":jt("invalid",t),m=d=c=null;for(x in l)if(l.hasOwnProperty(x)&&(S=l[x],S!=null))switch(x){case"value":c=S;break;case"defaultValue":d=S;break;case"children":m=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Rt(t,i,x,S,l,null)}eb(t,c,d,m),Ys(t);return;case"option":for(T in l)if(l.hasOwnProperty(T)&&(c=l[T],c!=null))switch(T){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Rt(t,i,T,c,l,null)}return;case"dialog":jt("beforetoggle",t),jt("toggle",t),jt("cancel",t),jt("close",t);break;case"iframe":case"object":jt("load",t);break;case"video":case"audio":for(c=0;c<El.length;c++)jt(El[c],t);break;case"image":jt("error",t),jt("load",t);break;case"details":jt("toggle",t);break;case"embed":case"source":case"link":jt("error",t),jt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in l)if(l.hasOwnProperty(P)&&(c=l[P],c!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Rt(t,i,P,c,l,null)}return;default:if(Lu(i)){for(W in l)l.hasOwnProperty(W)&&(c=l[W],c!==void 0&&_d(t,i,W,c,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(c=l[S],c!=null&&Rt(t,i,S,c,l,null))}function Uk(t,i,l,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,x=null,S=null,T=null,P=null,W=null;for(F in l){var Q=l[F];if(l.hasOwnProperty(F)&&Q!=null)switch(F){case"checked":break;case"value":break;case"defaultValue":T=Q;default:c.hasOwnProperty(F)||Rt(t,i,F,null,c,Q)}}for(var q in c){var F=c[q];if(Q=l[q],c.hasOwnProperty(q)&&(F!=null||Q!=null))switch(q){case"type":m=F;break;case"name":d=F;break;case"checked":P=F;break;case"defaultChecked":W=F;break;case"value":x=F;break;case"defaultValue":S=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,i));break;default:F!==Q&&Rt(t,i,q,F,c,Q)}}Du(t,x,S,T,P,W,m,d);return;case"select":F=x=S=q=null;for(m in l)if(T=l[m],l.hasOwnProperty(m)&&T!=null)switch(m){case"value":break;case"multiple":F=T;default:c.hasOwnProperty(m)||Rt(t,i,m,null,c,T)}for(d in c)if(m=c[d],T=l[d],c.hasOwnProperty(d)&&(m!=null||T!=null))switch(d){case"value":q=m;break;case"defaultValue":S=m;break;case"multiple":x=m;default:m!==T&&Rt(t,i,d,m,c,T)}i=S,l=x,c=F,q!=null?So(t,!!l,q,!1):!!c!=!!l&&(i!=null?So(t,!!l,i,!0):So(t,!!l,l?[]:"",!1));return;case"textarea":F=q=null;for(S in l)if(d=l[S],l.hasOwnProperty(S)&&d!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Rt(t,i,S,null,c,d)}for(x in c)if(d=c[x],m=l[x],c.hasOwnProperty(x)&&(d!=null||m!=null))switch(x){case"value":q=d;break;case"defaultValue":F=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==m&&Rt(t,i,x,d,c,m)}tb(t,q,F);return;case"option":for(var pt in l)if(q=l[pt],l.hasOwnProperty(pt)&&q!=null&&!c.hasOwnProperty(pt))switch(pt){case"selected":t.selected=!1;break;default:Rt(t,i,pt,null,c,q)}for(T in c)if(q=c[T],F=l[T],c.hasOwnProperty(T)&&q!==F&&(q!=null||F!=null))switch(T){case"selected":t.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:Rt(t,i,T,q,c,F)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var dt in l)q=l[dt],l.hasOwnProperty(dt)&&q!=null&&!c.hasOwnProperty(dt)&&Rt(t,i,dt,null,c,q);for(P in c)if(q=c[P],F=l[P],c.hasOwnProperty(P)&&q!==F&&(q!=null||F!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(a(137,i));break;default:Rt(t,i,P,q,c,F)}return;default:if(Lu(i)){for(var Dt in l)q=l[Dt],l.hasOwnProperty(Dt)&&q!==void 0&&!c.hasOwnProperty(Dt)&&_d(t,i,Dt,void 0,c,q);for(W in c)q=c[W],F=l[W],!c.hasOwnProperty(W)||q===F||q===void 0&&F===void 0||_d(t,i,W,q,c,F);return}}for(var B in l)q=l[B],l.hasOwnProperty(B)&&q!=null&&!c.hasOwnProperty(B)&&Rt(t,i,B,null,c,q);for(Q in c)q=c[Q],F=l[Q],!c.hasOwnProperty(Q)||q===F||q==null&&F==null||Rt(t,i,Q,q,c,F)}var wd=null,Sd=null;function Br(t){return t.nodeType===9?t:t.ownerDocument}function nx(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ix(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function jd(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var kd=null;function Vk(){var t=window.event;return t&&t.type==="popstate"?t===kd?!1:(kd=t,!0):(kd=null,!1)}var ox=typeof setTimeout=="function"?setTimeout:void 0,Pk=typeof clearTimeout=="function"?clearTimeout:void 0,ax=typeof Promise=="function"?Promise:void 0,Yk=typeof queueMicrotask=="function"?queueMicrotask:typeof ax<"u"?function(t){return ax.resolve(null).then(t).catch(qk)}:ox;function qk(t){setTimeout(function(){throw t})}function xi(t){return t==="head"}function lx(t,i){var l=i,c=0,d=0;do{var m=l.nextSibling;if(t.removeChild(l),m&&m.nodeType===8)if(l=m.data,l==="/$"){if(0<c&&8>c){l=c;var x=t.ownerDocument;if(l&1&&Tl(x.documentElement),l&2&&Tl(x.body),l&4)for(l=x.head,Tl(l),x=l.firstChild;x;){var S=x.nextSibling,T=x.nodeName;x[Fa]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&x.rel.toLowerCase()==="stylesheet"||l.removeChild(x),x=S}}if(d===0){t.removeChild(m),Bl(i);return}d--}else l==="$"||l==="$?"||l==="$!"?d++:c=l.charCodeAt(0)-48;else c=0;l=m}while(l);Bl(i)}function Cd(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Cd(l),Au(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Fk(t,i,l,c){for(;t.nodeType===1;){var d=l;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Fa])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=hn(t.nextSibling),t===null)break}return null}function Xk(t,i,l){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=hn(t.nextSibling),t===null))return null;return t}function Ed(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function Gk(t,i){var l=t.ownerDocument;if(t.data!=="$?"||l.readyState==="complete")i();else{var c=function(){i(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function hn(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="F!"||i==="F")break;if(i==="/$")return null}}return t}var Md=null;function sx(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"){if(i===0)return t;i--}else l==="/$"&&i++}t=t.previousSibling}return null}function rx(t,i,l){switch(i=Br(l),t){case"html":if(t=i.documentElement,!t)throw Error(a(452));return t;case"head":if(t=i.head,!t)throw Error(a(453));return t;case"body":if(t=i.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function Tl(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Au(t)}var ln=new Map,cx=new Set;function Hr(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gn=Z.d;Z.d={f:Kk,r:Wk,D:$k,C:Qk,L:Zk,m:Ik,X:tC,S:Jk,M:eC};function Kk(){var t=Gn.f(),i=Tr();return t||i}function Wk(t){var i=xo(t);i!==null&&i.tag===5&&i.type==="form"?T0(i):Gn.r(t)}var Jo=typeof document>"u"?null:document;function ux(t,i,l){var c=Jo;if(c&&typeof i=="string"&&i){var d=Ie(i);d='link[rel="'+t+'"][href="'+d+'"]',typeof l=="string"&&(d+='[crossorigin="'+l+'"]'),cx.has(d)||(cx.add(d),t={rel:t,crossOrigin:l,href:i},c.querySelector(d)===null&&(i=c.createElement("link"),ue(i,"link",t),oe(i),c.head.appendChild(i)))}}function $k(t){Gn.D(t),ux("dns-prefetch",t,null)}function Qk(t,i){Gn.C(t,i),ux("preconnect",t,i)}function Zk(t,i,l){Gn.L(t,i,l);var c=Jo;if(c&&t&&i){var d='link[rel="preload"][as="'+Ie(i)+'"]';i==="image"&&l&&l.imageSrcSet?(d+='[imagesrcset="'+Ie(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(d+='[imagesizes="'+Ie(l.imageSizes)+'"]')):d+='[href="'+Ie(t)+'"]';var m=d;switch(i){case"style":m=ta(t);break;case"script":m=ea(t)}ln.has(m)||(t=b({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:t,as:i},l),ln.set(m,t),c.querySelector(d)!==null||i==="style"&&c.querySelector(Al(m))||i==="script"&&c.querySelector(Nl(m))||(i=c.createElement("link"),ue(i,"link",t),oe(i),c.head.appendChild(i)))}}function Ik(t,i){Gn.m(t,i);var l=Jo;if(l&&t){var c=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+Ie(c)+'"][href="'+Ie(t)+'"]',m=d;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ea(t)}if(!ln.has(m)&&(t=b({rel:"modulepreload",href:t},i),ln.set(m,t),l.querySelector(d)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Nl(m)))return}c=l.createElement("link"),ue(c,"link",t),oe(c),l.head.appendChild(c)}}}function Jk(t,i,l){Gn.S(t,i,l);var c=Jo;if(c&&t){var d=vo(c).hoistableStyles,m=ta(t);i=i||"default";var x=d.get(m);if(!x){var S={loading:0,preload:null};if(x=c.querySelector(Al(m)))S.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":i},l),(l=ln.get(m))&&Td(t,l);var T=x=c.createElement("link");oe(T),ue(T,"link",t),T._p=new Promise(function(P,W){T.onload=P,T.onerror=W}),T.addEventListener("load",function(){S.loading|=1}),T.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Ur(x,i,c)}x={type:"stylesheet",instance:x,count:1,state:S},d.set(m,x)}}}function tC(t,i){Gn.X(t,i);var l=Jo;if(l&&t){var c=vo(l).hoistableScripts,d=ea(t),m=c.get(d);m||(m=l.querySelector(Nl(d)),m||(t=b({src:t,async:!0},i),(i=ln.get(d))&&Ad(t,i),m=l.createElement("script"),oe(m),ue(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(d,m))}}function eC(t,i){Gn.M(t,i);var l=Jo;if(l&&t){var c=vo(l).hoistableScripts,d=ea(t),m=c.get(d);m||(m=l.querySelector(Nl(d)),m||(t=b({src:t,async:!0,type:"module"},i),(i=ln.get(d))&&Ad(t,i),m=l.createElement("script"),oe(m),ue(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(d,m))}}function fx(t,i,l,c){var d=(d=ut.current)?Hr(d):null;if(!d)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=ta(l.href),l=vo(d).hoistableStyles,c=l.get(i),c||(c={type:"style",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=ta(l.href);var m=vo(d).hoistableStyles,x=m.get(t);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,x),(m=d.querySelector(Al(t)))&&!m._p&&(x.instance=m,x.state.loading=5),ln.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ln.set(t,l),m||nC(d,t,l,x.state))),i&&c===null)throw Error(a(528,""));return x}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=ea(l),l=vo(d).hoistableScripts,c=l.get(i),c||(c={type:"script",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function ta(t){return'href="'+Ie(t)+'"'}function Al(t){return'link[rel="stylesheet"]['+t+"]"}function dx(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function nC(t,i,l,c){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=t.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),ue(i,"link",l),oe(i),t.head.appendChild(i))}function ea(t){return'[src="'+Ie(t)+'"]'}function Nl(t){return"script[async]"+t}function hx(t,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var c=t.querySelector('style[data-href~="'+Ie(l.href)+'"]');if(c)return i.instance=c,oe(c),c;var d=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),oe(c),ue(c,"style",d),Ur(c,l.precedence,t),i.instance=c;case"stylesheet":d=ta(l.href);var m=t.querySelector(Al(d));if(m)return i.state.loading|=4,i.instance=m,oe(m),m;c=dx(l),(d=ln.get(d))&&Td(c,d),m=(t.ownerDocument||t).createElement("link"),oe(m);var x=m;return x._p=new Promise(function(S,T){x.onload=S,x.onerror=T}),ue(m,"link",c),i.state.loading|=4,Ur(m,l.precedence,t),i.instance=m;case"script":return m=ea(l.src),(d=t.querySelector(Nl(m)))?(i.instance=d,oe(d),d):(c=l,(d=ln.get(m))&&(c=b({},l),Ad(c,d)),t=t.ownerDocument||t,d=t.createElement("script"),oe(d),ue(d,"link",c),t.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Ur(c,l.precedence,t));return i.instance}function Ur(t,i,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=c.length?c[c.length-1]:null,m=d,x=0;x<c.length;x++){var S=c[x];if(S.dataset.precedence===i)m=S;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(t,i.firstChild))}function Td(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function Ad(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var Vr=null;function gx(t,i,l){if(Vr===null){var c=new Map,d=Vr=new Map;d.set(l,c)}else d=Vr,c=d.get(l),c||(c=new Map,d.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),d=0;d<l.length;d++){var m=l[d];if(!(m[Fa]||m[me]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(i)||"";x=t+x;var S=c.get(x);S?S.push(m):c.set(x,[m])}}return c}function px(t,i,l){t=t.ownerDocument||t,t.head.insertBefore(l,i==="title"?t.querySelector("head > title"):null)}function iC(t,i,l){if(l===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return t=i.disabled,typeof i.precedence=="string"&&t==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function mx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var Ol=null;function oC(){}function aC(t,i,l){if(Ol===null)throw Error(a(475));var c=Ol;if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=ta(l.href),m=t.querySelector(Al(d));if(m){t=m._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(c.count++,c=Pr.bind(c),t.then(c,c)),i.state.loading|=4,i.instance=m,oe(m);return}m=t.ownerDocument||t,l=dx(l),(d=ln.get(d))&&Td(l,d),m=m.createElement("link"),oe(m);var x=m;x._p=new Promise(function(S,T){x.onload=S,x.onerror=T}),ue(m,"link",l),i.instance=m}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(c.count++,i=Pr.bind(c),t.addEventListener("load",i),t.addEventListener("error",i))}}function lC(){if(Ol===null)throw Error(a(475));var t=Ol;return t.stylesheets&&t.count===0&&Nd(t,t.stylesheets),0<t.count?function(i){var l=setTimeout(function(){if(t.stylesheets&&Nd(t,t.stylesheets),t.unsuspend){var c=t.unsuspend;t.unsuspend=null,c()}},6e4);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(l)}}:null}function Pr(){if(this.count--,this.count===0){if(this.stylesheets)Nd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Yr=null;function Nd(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yr=new Map,i.forEach(sC,t),Yr=null,Pr.call(t))}function sC(t,i){if(!(i.state.loading&4)){var l=Yr.get(t);if(l)var c=l.get(null);else{l=new Map,Yr.set(t,l);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var x=d[m];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(l.set(x.dataset.precedence,x),c=x)}c&&l.set(null,c)}d=i.instance,x=d.getAttribute("data-precedence"),m=l.get(x)||c,m===c&&l.set(null,d),l.set(x,d),this.count++,c=Pr.bind(this),d.addEventListener("load",c),d.addEventListener("error",c),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),i.state.loading|=4}}var Rl={$$typeof:U,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function rC(t,i,l,c,d,m,x,S){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Cu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.hiddenUpdates=Cu(null),this.identifierPrefix=c,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function bx(t,i,l,c,d,m,x,S,T,P,W,Q){return t=new rC(t,i,l,x,S,T,P,Q),i=1,m===!0&&(i|=24),m=Ve(3,null,null,i),t.current=m,m.stateNode=t,i=df(),i.refCount++,t.pooledCache=i,i.refCount++,m.memoizedState={element:c,isDehydrated:l,cache:i},mf(m),t}function yx(t){return t?(t=Oo,t):Oo}function xx(t,i,l,c,d,m){d=yx(d),c.context===null?c.context=d:c.pendingContext=d,c=li(i),c.payload={element:l},m=m===void 0?null:m,m!==null&&(c.callback=m),l=si(t,c,i),l!==null&&(Xe(l,t,i),cl(l,t,i))}function vx(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<i?l:i}}function Od(t,i){vx(t,i),(t=t.alternate)&&vx(t,i)}function _x(t){if(t.tag===13){var i=No(t,67108864);i!==null&&Xe(i,t,67108864),Od(t,67108864)}}var qr=!0;function cC(t,i,l,c){var d=H.T;H.T=null;var m=Z.p;try{Z.p=2,Rd(t,i,l,c)}finally{Z.p=m,H.T=d}}function uC(t,i,l,c){var d=H.T;H.T=null;var m=Z.p;try{Z.p=8,Rd(t,i,l,c)}finally{Z.p=m,H.T=d}}function Rd(t,i,l,c){if(qr){var d=Dd(c);if(d===null)vd(t,i,c,Fr,l),Sx(t,c);else if(dC(d,t,i,l,c))c.stopPropagation();else if(Sx(t,c),i&4&&-1<fC.indexOf(t)){for(;d!==null;){var m=xo(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=Hi(m.pendingLanes);if(x!==0){var S=m;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var T=1<<31-He(x);S.entanglements[1]|=T,x&=~T}wn(m),(At&6)===0&&(Er=$e()+500,Cl(0))}}break;case 13:S=No(m,2),S!==null&&Xe(S,m,2),Tr(),Od(m,2)}if(m=Dd(c),m===null&&vd(t,i,c,Fr,l),m===d)break;d=m}d!==null&&c.stopPropagation()}else vd(t,i,c,null,l)}}function Dd(t){return t=Hu(t),zd(t)}var Fr=null;function zd(t){if(Fr=null,t=yo(t),t!==null){var i=r(t);if(i===null)t=null;else{var l=i.tag;if(l===13){if(t=u(i),t!==null)return t;t=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return Fr=t,null}function wx(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ku()){case zs:return 2;case Ls:return 8;case N:case wt:return 32;case $t:return 268435456;default:return 32}default:return 32}}var Ld=!1,vi=null,_i=null,wi=null,Dl=new Map,zl=new Map,Si=[],fC="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Sx(t,i){switch(t){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":Dl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":zl.delete(i.pointerId)}}function Ll(t,i,l,c,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:i,domEventName:l,eventSystemFlags:c,nativeEvent:m,targetContainers:[d]},i!==null&&(i=xo(i),i!==null&&_x(i)),t):(t.eventSystemFlags|=c,i=t.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),t)}function dC(t,i,l,c,d){switch(i){case"focusin":return vi=Ll(vi,t,i,l,c,d),!0;case"dragenter":return _i=Ll(_i,t,i,l,c,d),!0;case"mouseover":return wi=Ll(wi,t,i,l,c,d),!0;case"pointerover":var m=d.pointerId;return Dl.set(m,Ll(Dl.get(m)||null,t,i,l,c,d)),!0;case"gotpointercapture":return m=d.pointerId,zl.set(m,Ll(zl.get(m)||null,t,i,l,c,d)),!0}return!1}function jx(t){var i=yo(t.target);if(i!==null){var l=r(i);if(l!==null){if(i=l.tag,i===13){if(i=u(l),i!==null){t.blockedOn=i,a3(t.priority,function(){if(l.tag===13){var c=Fe();c=Eu(c);var d=No(l,c);d!==null&&Xe(d,l,c),Od(l,c)}});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Xr(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var l=Dd(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);Bu=c,l.target.dispatchEvent(c),Bu=null}else return i=xo(l),i!==null&&_x(i),t.blockedOn=l,!1;i.shift()}return!0}function kx(t,i,l){Xr(t)&&l.delete(i)}function hC(){Ld=!1,vi!==null&&Xr(vi)&&(vi=null),_i!==null&&Xr(_i)&&(_i=null),wi!==null&&Xr(wi)&&(wi=null),Dl.forEach(kx),zl.forEach(kx)}function Gr(t,i){t.blockedOn===i&&(t.blockedOn=null,Ld||(Ld=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,hC)))}var Kr=null;function Cx(t){Kr!==t&&(Kr=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Kr===t&&(Kr=null);for(var i=0;i<t.length;i+=3){var l=t[i],c=t[i+1],d=t[i+2];if(typeof c!="function"){if(zd(c||l)===null)continue;break}var m=xo(l);m!==null&&(t.splice(i,3),i-=3,zf(m,{pending:!0,data:d,method:l.method,action:c},c,d))}}))}function Bl(t){function i(T){return Gr(T,t)}vi!==null&&Gr(vi,t),_i!==null&&Gr(_i,t),wi!==null&&Gr(wi,t),Dl.forEach(i),zl.forEach(i);for(var l=0;l<Si.length;l++){var c=Si[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Si.length&&(l=Si[0],l.blockedOn===null);)jx(l),l.blockedOn===null&&Si.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var d=l[c],m=l[c+1],x=d[je]||null;if(typeof m=="function")x||Cx(l);else if(x){var S=null;if(m&&m.hasAttribute("formAction")){if(d=m,x=m[je]||null)S=x.formAction;else if(zd(d)!==null)continue}else S=x.action;typeof S=="function"?l[c+1]=S:(l.splice(c,3),c-=3),Cx(l)}}}function Bd(t){this._internalRoot=t}Wr.prototype.render=Bd.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,c=Fe();xx(l,c,t,i,null,null)},Wr.prototype.unmount=Bd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;xx(t.current,2,null,t,null,null),Tr(),i[bo]=null}};function Wr(t){this._internalRoot=t}Wr.prototype.unstable_scheduleHydration=function(t){if(t){var i=qm();t={blockedOn:null,target:t,priority:i};for(var l=0;l<Si.length&&i!==0&&i<Si[l].priority;l++);Si.splice(l,0,t),l===0&&jx(t)}};var Ex=e.version;if(Ex!=="19.1.1")throw Error(a(527,Ex,"19.1.1"));Z.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=h(i),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var gC={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$r.isDisabled&&$r.supportsFiber)try{Qe=$r.inject(gC),xe=$r}catch{}}return ia.createRoot=function(t,i){if(!s(t))throw Error(a(299));var l=!1,c="",d=q0,m=F0,x=X0,S=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(S=i.unstable_transitionCallbacks)),i=bx(t,1,!1,null,null,l,c,d,m,x,S,null),t[bo]=i.current,xd(t),new Bd(i)},ia.hydrateRoot=function(t,i,l){if(!s(t))throw Error(a(299));var c=!1,d="",m=q0,x=F0,S=X0,T=null,P=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(d=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(x=l.onCaughtError),l.onRecoverableError!==void 0&&(S=l.onRecoverableError),l.unstable_transitionCallbacks!==void 0&&(T=l.unstable_transitionCallbacks),l.formState!==void 0&&(P=l.formState)),i=bx(t,1,!0,i,l??null,c,d,m,x,S,T,P),i.context=yx(null),l=i.current,c=Fe(),c=Eu(c),d=li(c),d.callback=null,si(l,d,c),l=c,i.current.lanes=l,qa(i,l),wn(i),t[bo]=i.current,xd(t),new Wr(i)},ia.version="19.1.1",ia}var Wd;function Lx(){if(Wd)return Jr.exports;Wd=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Jr.exports=zx(),Jr.exports}var Bx=Lx();/**
 * react-router v7.15.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var $d="popstate";function Qd(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Hx(n={}){function e(s,r){let{pathname:u="/",search:f="",hash:h=""}=ki(s.location.hash.substring(1));return!u.startsWith("/")&&!u.startsWith(".")&&(u="/"+u),ic("",{pathname:u,search:f,hash:h},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function o(s,r){let u=s.document.querySelector("base"),f="";if(u&&u.getAttribute("href")){let h=s.location.href,p=h.indexOf("#");f=p===-1?h:h.slice(0,p)}return f+"#"+(typeof r=="string"?r:oa(r))}function a(s,r){Ge(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(r)})`)}return Vx(e,o,a,n)}function Pt(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function Ge(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Ux(){return Math.random().toString(36).substring(2,10)}function Zd(n,e){return{usr:n.state,key:n.key,idx:e,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function ic(n,e,o=null,a,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof e=="string"?ki(e):e,state:o,key:e&&e.key||a||Ux(),mask:s}}function oa({pathname:n="/",search:e="",hash:o=""}){return e&&e!=="?"&&(n+=e.charAt(0)==="?"?e:"?"+e),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function ki(n){let e={};if(n){let o=n.indexOf("#");o>=0&&(e.hash=n.substring(o),n=n.substring(0,o));let a=n.indexOf("?");a>=0&&(e.search=n.substring(a),n=n.substring(0,a)),n&&(e.pathname=n)}return e}function Vx(n,e,o,a={}){let{window:s=document.defaultView,v5Compat:r=!1}=a,u=s.history,f="POP",h=null,p=b();p==null&&(p=0,u.replaceState({...u.state,idx:p},""));function b(){return(u.state||{idx:null}).idx}function y(){f="POP";let j=b(),M=j==null?null:j-p;p=j,h&&h({action:f,location:C.location,delta:M})}function v(j,M){f="PUSH";let D=Qd(j)?j:ic(C.location,j,M);o&&o(D,j),p=b()+1;let U=Zd(D,p),z=C.createHref(D.mask||D);try{u.pushState(U,"",z)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;s.location.assign(z)}r&&h&&h({action:f,location:C.location,delta:1})}function _(j,M){f="REPLACE";let D=Qd(j)?j:ic(C.location,j,M);o&&o(D,j),p=b();let U=Zd(D,p),z=C.createHref(D.mask||D);u.replaceState(U,"",z),r&&h&&h({action:f,location:C.location,delta:0})}function k(j){return Px(j)}let C={get action(){return f},get location(){return n(s,u)},listen(j){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener($d,y),h=j,()=>{s.removeEventListener($d,y),h=null}},createHref(j){return e(s,j)},createURL:k,encodeLocation(j){let M=k(j);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:v,replace:_,go(j){return u.go(j)}};return C}function Px(n,e=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Pt(o,"No window.location.(origin|href) available to create URL");let a=typeof n=="string"?n:oa(n);return a=a.replace(/ $/,"%20"),!e&&a.startsWith("//")&&(a=o+a),new URL(a,o)}function Id(n,e,o="/"){return Yx(n,e,o,!1)}function Yx(n,e,o,a,s){let r=typeof e=="string"?ki(e):e,u=Sn(r.pathname||"/",o);if(u==null)return null;let f=qx(n),h=null,p=ev(u);for(let b=0;h==null&&b<f.length;++b)h=Jx(f[b],p,a);return h}function qx(n){let e=Jd(n);return Fx(e),e}function Jd(n,e=[],o=[],a="",s=!1){let r=(u,f,h=s,p)=>{let b={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&h)return;Pt(b.relativePath.startsWith(a),`Absolute route path "${b.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(a.length)}let y=sn([a,b.relativePath]),v=o.concat(b);u.children&&u.children.length>0&&(Pt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Jd(u.children,e,v,y,h)),!(u.path==null&&!u.index)&&e.push({path:y,score:Zx(y,u.index),routesMeta:v})};return n.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))r(u,f);else for(let h of th(u.path))r(u,f,!0,h)}),e}function th(n){let e=n.split("/");if(e.length===0)return[];let[o,...a]=e,s=o.endsWith("?"),r=o.replace(/\?$/,"");if(a.length===0)return s?[r,""]:[r];let u=th(a.join("/")),f=[];return f.push(...u.map(h=>h===""?r:[r,h].join("/"))),s&&f.push(...u),f.map(h=>n.startsWith("/")&&h===""?"/":h)}function Fx(n){n.sort((e,o)=>e.score!==o.score?o.score-e.score:Ix(e.routesMeta.map(a=>a.childrenIndex),o.routesMeta.map(a=>a.childrenIndex)))}var Xx=/^:[\w-]+$/,Gx=3,Kx=2,Wx=1,$x=10,Qx=-2,eh=n=>n==="*";function Zx(n,e){let o=n.split("/"),a=o.length;return o.some(eh)&&(a+=Qx),e&&(a+=Kx),o.filter(s=>!eh(s)).reduce((s,r)=>s+(Xx.test(r)?Gx:r===""?Wx:$x),a)}function Ix(n,e){return n.length===e.length&&n.slice(0,-1).every((a,s)=>a===e[s])?n[n.length-1]-e[e.length-1]:0}function Jx(n,e,o=!1){let{routesMeta:a}=n,s={},r="/",u=[];for(let f=0;f<a.length;++f){let h=a[f],p=f===a.length-1,b=r==="/"?e:e.slice(r.length)||"/",y=Hl({path:h.relativePath,caseSensitive:h.caseSensitive,end:p},b),v=h.route;if(!y&&p&&o&&!a[a.length-1].route.index&&(y=Hl({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},b)),!y)return null;Object.assign(s,y.params),u.push({params:s,pathname:sn([r,y.pathname]),pathnameBase:av(sn([r,y.pathnameBase])),route:v}),y.pathnameBase!=="/"&&(r=sn([r,y.pathnameBase]))}return u}function Hl(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,a]=tv(n.path,n.caseSensitive,n.end),s=e.match(o);if(!s)return null;let r=s[0],u=r.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((p,{paramName:b,isOptional:y},v)=>{if(b==="*"){let k=f[v]||"";u=r.slice(0,r.length-k.length).replace(/(.)\/+$/,"$1")}const _=f[v];return y&&!_?p[b]=void 0:p[b]=(_||"").replace(/%2F/g,"/"),p},{}),pathname:r,pathnameBase:u,pattern:n}}function tv(n,e=!1,o=!0){Ge(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let a=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,h,p,b)=>{if(a.push({paramName:f,isOptional:h!=null}),h){let y=b.charAt(p+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(a.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),a]}function ev(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ge(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),n}}function Sn(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let o=e.endsWith("/")?e.length-1:e.length,a=n.charAt(o);return a&&a!=="/"?null:n.slice(o)||"/"}var nv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function iv(n,e="/"){let{pathname:o,search:a="",hash:s=""}=typeof n=="string"?ki(n):n,r;return o?(o=ih(o),o.startsWith("/")?r=nh(o.substring(1),"/"):r=nh(o,e)):r=e,{pathname:r,search:lv(a),hash:sv(s)}}function nh(n,e){let o=Vl(e).split("/");return n.split("/").forEach(s=>{s===".."?o.length>1&&o.pop():s!=="."&&o.push(s)}),o.length>1?o.join("/"):"/"}function oc(n,e,o,a){return`Cannot include a '${n}' character in a manually specified \`to.${e}\` field [${JSON.stringify(a)}].  Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ov(n){return n.filter((e,o)=>o===0||e.route.path&&e.route.path.length>0)}function ac(n){let e=ov(n);return e.map((o,a)=>a===e.length-1?o.pathname:o.pathnameBase)}function Ul(n,e,o,a=!1){let s;typeof n=="string"?s=ki(n):(s={...n},Pt(!s.pathname||!s.pathname.includes("?"),oc("?","pathname","search",s)),Pt(!s.pathname||!s.pathname.includes("#"),oc("#","pathname","hash",s)),Pt(!s.search||!s.search.includes("#"),oc("#","search","hash",s)));let r=n===""||s.pathname==="",u=r?"/":s.pathname,f;if(u==null)f=o;else{let y=e.length-1;if(!a&&u.startsWith("..")){let v=u.split("/");for(;v[0]==="..";)v.shift(),y-=1;s.pathname=v.join("/")}f=y>=0?e[y]:"/"}let h=iv(s,f),p=u&&u!=="/"&&u.endsWith("/"),b=(r||u===".")&&o.endsWith("/");return!h.pathname.endsWith("/")&&(p||b)&&(h.pathname+="/"),h}var ih=n=>n.replace(/\/\/+/g,"/"),sn=n=>ih(n.join("/")),Vl=n=>n.replace(/\/+$/,""),av=n=>Vl(n).replace(/^\/*/,"/"),lv=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,sv=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,rv=class{constructor(n,e,o,a=!1){this.status=n,this.statusText=e||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function cv(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function uv(n){let e=n.map(o=>o.route.path).filter(Boolean);return sn(e)||"/"}var oh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ah(n,e){let o=n;if(typeof o!="string"||!nv.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let a=o,s=!1;if(oh)try{let r=new URL(window.location.href),u=o.startsWith("//")?new URL(r.protocol+o):new URL(o),f=Sn(u.pathname,e);u.origin===r.origin&&f!=null?o=f+u.search+u.hash:s=!0}catch{Ge(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var lh=["POST","PUT","PATCH","DELETE"];new Set(lh);var fv=["GET",...lh];new Set(fv);var no=E.createContext(null);no.displayName="DataRouter";var Pl=E.createContext(null);Pl.displayName="DataRouterState";var sh=E.createContext(!1);function dv(){return E.useContext(sh)}var rh=E.createContext({isTransitioning:!1});rh.displayName="ViewTransition";var hv=E.createContext(new Map);hv.displayName="Fetchers";var gv=E.createContext(null);gv.displayName="Await";var Ae=E.createContext(null);Ae.displayName="Navigation";var aa=E.createContext(null);aa.displayName="Location";var gn=E.createContext({outlet:null,matches:[],isDataRoute:!1});gn.displayName="Route";var lc=E.createContext(null);lc.displayName="RouteError";var ch="REACT_ROUTER_ERROR",pv="REDIRECT",mv="ROUTE_ERROR_RESPONSE";function bv(n){if(n.startsWith(`${ch}:${pv}:{`))try{let e=JSON.parse(n.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function yv(n){if(n.startsWith(`${ch}:${mv}:{`))try{let e=JSON.parse(n.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new rv(e.status,e.statusText,e.data)}catch{}}function xv(n,{relative:e}={}){Pt(io(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:a}=E.useContext(Ae),{hash:s,pathname:r,search:u}=la(n,{relative:e}),f=r;return o!=="/"&&(f=r==="/"?o:sn([o,r])),a.createHref({pathname:f,search:u,hash:s})}function io(){return E.useContext(aa)!=null}function rn(){return Pt(io(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(aa).location}var uh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fh(n){E.useContext(Ae).static||E.useLayoutEffect(n)}function sc(){let{isDataRoute:n}=E.useContext(gn);return n?Ov():vv()}function vv(){Pt(io(),"useNavigate() may be used only in the context of a <Router> component.");let n=E.useContext(no),{basename:e,navigator:o}=E.useContext(Ae),{matches:a}=E.useContext(gn),{pathname:s}=rn(),r=JSON.stringify(ac(a)),u=E.useRef(!1);return fh(()=>{u.current=!0}),E.useCallback((h,p={})=>{if(Ge(u.current,uh),!u.current)return;if(typeof h=="number"){o.go(h);return}let b=Ul(h,JSON.parse(r),s,p.relative==="path");n==null&&e!=="/"&&(b.pathname=b.pathname==="/"?e:sn([e,b.pathname])),(p.replace?o.replace:o.push)(b,p.state,p)},[e,o,r,s,n])}E.createContext(null);function la(n,{relative:e}={}){let{matches:o}=E.useContext(gn),{pathname:a}=rn(),s=JSON.stringify(ac(o));return E.useMemo(()=>Ul(n,JSON.parse(s),a,e==="path"),[n,s,a,e])}function _v(n,e){return dh(n,e)}function dh(n,e,o){Pt(io(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=E.useContext(Ae),{matches:s}=E.useContext(gn),r=s[s.length-1],u=r?r.params:{},f=r?r.pathname:"/",h=r?r.pathnameBase:"/",p=r&&r.route;{let j=p&&p.path||"";ph(f,!p||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let b=rn(),y;if(e){let j=typeof e=="string"?ki(e):e;Pt(h==="/"||j.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${j.pathname}" was given in the \`location\` prop.`),y=j}else y=b;let v=y.pathname||"/",_=v;if(h!=="/"){let j=h.replace(/^\//,"").split("/");_="/"+v.replace(/^\//,"").split("/").slice(j.length).join("/")}let k=o&&o.state.matches.length?o.state.matches.map(j=>Object.assign(j,{route:o.manifest[j.route.id]||j.route})):Id(n,{pathname:_});Ge(p||k!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Ge(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=Cv(k&&k.map(j=>Object.assign({},j,{params:Object.assign({},u,j.params),pathname:sn([h,a.encodeLocation?a.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?h:sn([h,a.encodeLocation?a.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),s,o);return e&&C?E.createElement(aa.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...y},navigationType:"POP"}},C):C}function wv(){let n=Nv(),e=cv(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),o=n instanceof Error?n.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},r={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",n),u=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:r},"ErrorBoundary")," or"," ",E.createElement("code",{style:r},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),o?E.createElement("pre",{style:s},o):null,u)}var Sv=E.createElement(wv,null),hh=class extends E.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,e){return e.location!==n.location||e.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:e.error,location:e.location,revalidation:n.revalidation||e.revalidation}}componentDidCatch(n,e){this.props.onError?this.props.onError(n,e):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const o=yv(n.digest);o&&(n=o)}let e=n!==void 0?E.createElement(gn.Provider,{value:this.props.routeContext},E.createElement(lc.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?E.createElement(jv,{error:n},e):e}};hh.contextType=sh;var rc=new WeakMap;function jv({children:n,error:e}){let{basename:o}=E.useContext(Ae);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let a=bv(e.digest);if(a){let s=rc.get(e);if(s)throw s;let r=ah(a.location,o);if(oh&&!rc.get(e))if(r.isExternal||a.reloadDocument)window.location.href=r.absoluteURL||r.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:a.replace}));throw rc.set(e,u),u}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${r.absoluteURL||r.to}`})}}return n}function kv({routeContext:n,match:e,children:o}){let a=E.useContext(no);return a&&a.static&&a.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(gn.Provider,{value:n},o)}function Cv(n,e=[],o){let a=o?.state;if(n==null){if(!a)return null;if(a.errors)n=a.matches;else if(e.length===0&&!a.initialized&&a.matches.length>0)n=a.matches;else return null}let s=n,r=a?.errors;if(r!=null){let b=s.findIndex(y=>y.route.id&&r?.[y.route.id]!==void 0);Pt(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(r).join(",")}`),s=s.slice(0,Math.min(s.length,b+1))}let u=!1,f=-1;if(o&&a){u=a.renderFallback;for(let b=0;b<s.length;b++){let y=s[b];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=b),y.route.id){let{loaderData:v,errors:_}=a,k=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!_||_[y.route.id]===void 0);if(y.route.lazy||k){o.isStatic&&(u=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let h=o?.onError,p=a&&h?(b,y)=>{h(b,{location:a.location,params:a.matches?.[0]?.params??{},pattern:uv(a.matches),errorInfo:y})}:void 0;return s.reduceRight((b,y,v)=>{let _,k=!1,C=null,j=null;a&&(_=r&&y.route.id?r[y.route.id]:void 0,C=y.route.errorElement||Sv,u&&(f<0&&v===0?(ph("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,j=null):f===v&&(k=!0,j=y.route.hydrateFallbackElement||null)));let M=e.concat(s.slice(0,v+1)),D=()=>{let U;return _?U=C:k?U=j:y.route.Component?U=E.createElement(y.route.Component,null):y.route.element?U=y.route.element:U=b,E.createElement(kv,{match:y,routeContext:{outlet:b,matches:M,isDataRoute:a!=null},children:U})};return a&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?E.createElement(hh,{location:a.location,revalidation:a.revalidation,component:C,error:_,children:D(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:p}):D()},null)}function cc(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ev(n){let e=E.useContext(no);return Pt(e,cc(n)),e}function Mv(n){let e=E.useContext(Pl);return Pt(e,cc(n)),e}function Tv(n){let e=E.useContext(gn);return Pt(e,cc(n)),e}function uc(n){let e=Tv(n),o=e.matches[e.matches.length-1];return Pt(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function Av(){return uc("useRouteId")}function Nv(){let n=E.useContext(lc),e=Mv("useRouteError"),o=uc("useRouteError");return n!==void 0?n:e.errors?.[o]}function Ov(){let{router:n}=Ev("useNavigate"),e=uc("useNavigate"),o=E.useRef(!1);return fh(()=>{o.current=!0}),E.useCallback(async(s,r={})=>{Ge(o.current,uh),o.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:e,...r}))},[n,e])}var gh={};function ph(n,e,o){!e&&!gh[n]&&(gh[n]=!0,Ge(!1,o))}E.memo(Rv);function Rv({routes:n,manifest:e,future:o,state:a,isStatic:s,onError:r}){return dh(n,void 0,{manifest:e,state:a,isStatic:s,onError:r})}function Dv({to:n,replace:e,state:o,relative:a}){Pt(io(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=E.useContext(Ae);Ge(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:r}=E.useContext(gn),{pathname:u}=rn(),f=sc(),h=Ul(n,ac(r),u,a==="path"),p=JSON.stringify(h);return E.useEffect(()=>{f(JSON.parse(p),{replace:e,state:o,relative:a})},[f,p,a,e,o]),null}function fc(n){Pt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function zv({basename:n="/",children:e=null,location:o,navigationType:a="POP",navigator:s,static:r=!1,useTransitions:u}){Pt(!io(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=n.replace(/^\/*/,"/"),h=E.useMemo(()=>({basename:f,navigator:s,static:r,useTransitions:u,future:{}}),[f,s,r,u]);typeof o=="string"&&(o=ki(o));let{pathname:p="/",search:b="",hash:y="",state:v=null,key:_="default",mask:k}=o,C=E.useMemo(()=>{let j=Sn(p,f);return j==null?null:{location:{pathname:j,search:b,hash:y,state:v,key:_,mask:k},navigationType:a}},[f,p,b,y,v,_,a,k]);return Ge(C!=null,`<Router basename="${f}"> is not able to match the URL "${p}${b}${y}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:E.createElement(Ae.Provider,{value:h},E.createElement(aa.Provider,{children:e,value:C}))}function Lv({children:n,location:e}){return _v(dc(n),e)}function dc(n,e=[]){let o=[];return E.Children.forEach(n,(a,s)=>{if(!E.isValidElement(a))return;let r=[...e,s];if(a.type===E.Fragment){o.push.apply(o,dc(a.props.children,r));return}Pt(a.type===fc,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let u={id:a.props.id||r.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(u.children=dc(a.props.children,r)),o.push(u)}),o}var Yl="get",ql="application/x-www-form-urlencoded";function Fl(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Bv(n){return Fl(n)&&n.tagName.toLowerCase()==="button"}function Hv(n){return Fl(n)&&n.tagName.toLowerCase()==="form"}function Uv(n){return Fl(n)&&n.tagName.toLowerCase()==="input"}function Vv(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Pv(n,e){return n.button===0&&(!e||e==="_self")&&!Vv(n)}var Xl=null;function Yv(){if(Xl===null)try{new FormData(document.createElement("form"),0),Xl=!1}catch{Xl=!0}return Xl}var qv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hc(n){return n!=null&&!qv.has(n)?(Ge(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ql}"`),null):n}function Fv(n,e){let o,a,s,r,u;if(Hv(n)){let f=n.getAttribute("action");a=f?Sn(f,e):null,o=n.getAttribute("method")||Yl,s=hc(n.getAttribute("enctype"))||ql,r=new FormData(n)}else if(Bv(n)||Uv(n)&&(n.type==="submit"||n.type==="image")){let f=n.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=n.getAttribute("formaction")||f.getAttribute("action");if(a=h?Sn(h,e):null,o=n.getAttribute("formmethod")||f.getAttribute("method")||Yl,s=hc(n.getAttribute("formenctype"))||hc(f.getAttribute("enctype"))||ql,r=new FormData(f,n),!Yv()){let{name:p,type:b,value:y}=n;if(b==="image"){let v=p?`${p}.`:"";r.append(`${v}x`,"0"),r.append(`${v}y`,"0")}else p&&r.append(p,y)}}else{if(Fl(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Yl,a=null,s=ql,u=n}return r&&s==="text/plain"&&(u=r,r=void 0),{action:a,method:o.toLowerCase(),encType:s,formData:r,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gc(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function mh(n,e,o,a){let s=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:e&&Sn(s.pathname,e)==="/"?s.pathname=`${Vl(e)}/_root.${a}`:s.pathname=`${Vl(s.pathname)}.${a}`,s}async function Xv(n,e){if(n.id in e)return e[n.id];try{let o=await import(n.module);return e[n.id]=o,o}catch(o){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gv(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Kv(n,e,o){let a=await Promise.all(n.map(async s=>{let r=e.routes[s.route.id];if(r){let u=await Xv(r,o);return u.links?u.links():[]}return[]}));return Zv(a.flat(1).filter(Gv).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function bh(n,e,o,a,s,r){let u=(h,p)=>o[p]?h.route.id!==o[p].route.id:!0,f=(h,p)=>o[p].pathname!==h.pathname||o[p].route.path?.endsWith("*")&&o[p].params["*"]!==h.params["*"];return r==="assets"?e.filter((h,p)=>u(h,p)||f(h,p)):r==="data"?e.filter((h,p)=>{let b=a.routes[h.route.id];if(!b||!b.hasLoader)return!1;if(u(h,p)||f(h,p))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:o[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Wv(n,e,{includeHydrateFallback:o}={}){return $v(n.map(a=>{let s=e.routes[a.route.id];if(!s)return[];let r=[s.module];return s.clientActionModule&&(r=r.concat(s.clientActionModule)),s.clientLoaderModule&&(r=r.concat(s.clientLoaderModule)),o&&s.hydrateFallbackModule&&(r=r.concat(s.hydrateFallbackModule)),s.imports&&(r=r.concat(s.imports)),r}).flat(1))}function $v(n){return[...new Set(n)]}function Qv(n){let e={},o=Object.keys(n).sort();for(let a of o)e[a]=n[a];return e}function Zv(n,e){let o=new Set;return new Set(e),n.reduce((a,s)=>{let r=JSON.stringify(Qv(s));return o.has(r)||(o.add(r),a.push({key:r,link:s})),a},[])}function pc(){let n=E.useContext(no);return gc(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Iv(){let n=E.useContext(Pl);return gc(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var mc=E.createContext(void 0);mc.displayName="FrameworkContext";function bc(){let n=E.useContext(mc);return gc(n,"You must render this element inside a <HydratedRouter> element"),n}function Jv(n,e){let o=E.useContext(mc),[a,s]=E.useState(!1),[r,u]=E.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:p,onMouseLeave:b,onTouchStart:y}=e,v=E.useRef(null);E.useEffect(()=>{if(n==="render"&&u(!0),n==="viewport"){let C=M=>{M.forEach(D=>{u(D.isIntersecting)})},j=new IntersectionObserver(C,{threshold:.5});return v.current&&j.observe(v.current),()=>{j.disconnect()}}},[n]),E.useEffect(()=>{if(a){let C=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(C)}}},[a]);let _=()=>{s(!0)},k=()=>{s(!1),u(!1)};return o?n!=="intent"?[r,v,{}]:[r,v,{onFocus:sa(f,_),onBlur:sa(h,k),onMouseEnter:sa(p,_),onMouseLeave:sa(b,k),onTouchStart:sa(y,_)}]:[!1,v,{}]}function sa(n,e){return o=>{n&&n(o),o.defaultPrevented||e(o)}}function t1({page:n,...e}){let o=dv(),{router:a}=pc(),s=E.useMemo(()=>Id(a.routes,n,a.basename),[a.routes,n,a.basename]);return s?o?E.createElement(n1,{page:n,matches:s,...e}):E.createElement(i1,{page:n,matches:s,...e}):null}function e1(n){let{manifest:e,routeModules:o}=bc(),[a,s]=E.useState([]);return E.useEffect(()=>{let r=!1;return Kv(n,e,o).then(u=>{r||s(u)}),()=>{r=!0}},[n,e,o]),a}function n1({page:n,matches:e,...o}){let a=rn(),{future:s}=bc(),{basename:r}=pc(),u=E.useMemo(()=>{if(n===a.pathname+a.search+a.hash)return[];let f=mh(n,r,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,p=[];for(let b of e)typeof b.route.shouldRevalidate=="function"?h=!0:p.push(b.route.id);return h&&p.length>0&&f.searchParams.set("_routes",p.join(",")),[f.pathname+f.search]},[r,s.unstable_trailingSlashAwareDataRequests,n,a,e]);return E.createElement(E.Fragment,null,u.map(f=>E.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...o})))}function i1({page:n,matches:e,...o}){let a=rn(),{future:s,manifest:r,routeModules:u}=bc(),{basename:f}=pc(),{loaderData:h,matches:p}=Iv(),b=E.useMemo(()=>bh(n,e,p,r,a,"data"),[n,e,p,r,a]),y=E.useMemo(()=>bh(n,e,p,r,a,"assets"),[n,e,p,r,a]),v=E.useMemo(()=>{if(n===a.pathname+a.search+a.hash)return[];let C=new Set,j=!1;if(e.forEach(D=>{let U=r.routes[D.route.id];!U||!U.hasLoader||(!b.some(z=>z.route.id===D.route.id)&&D.route.id in h&&u[D.route.id]?.shouldRevalidate||U.hasClientLoader?j=!0:C.add(D.route.id))}),C.size===0)return[];let M=mh(n,f,s.unstable_trailingSlashAwareDataRequests,"data");return j&&C.size>0&&M.searchParams.set("_routes",e.filter(D=>C.has(D.route.id)).map(D=>D.route.id).join(",")),[M.pathname+M.search]},[f,s.unstable_trailingSlashAwareDataRequests,h,a,r,b,e,n,u]),_=E.useMemo(()=>Wv(y,r),[y,r]),k=e1(y);return E.createElement(E.Fragment,null,v.map(C=>E.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...o})),_.map(C=>E.createElement("link",{key:C,rel:"modulepreload",href:C,...o})),k.map(({key:C,link:j})=>E.createElement("link",{key:C,nonce:o.nonce,...j,crossOrigin:j.crossOrigin??o.crossOrigin})))}function o1(...n){return e=>{n.forEach(o=>{typeof o=="function"?o(e):o!=null&&(o.current=e)})}}var a1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{a1&&(window.__reactRouterVersion="7.15.0")}catch{}function l1({basename:n,children:e,useTransitions:o,window:a}){let s=E.useRef();s.current==null&&(s.current=Hx({window:a,v5Compat:!0}));let r=s.current,[u,f]=E.useState({action:r.action,location:r.location}),h=E.useCallback(p=>{o===!1?f(p):E.startTransition(()=>f(p))},[o]);return E.useLayoutEffect(()=>r.listen(h),[r,h]),E.createElement(zv,{basename:n,children:e,location:u.location,navigationType:u.action,navigator:r,useTransitions:o})}var yh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xh=E.forwardRef(function({onClick:e,discover:o="render",prefetch:a="none",relative:s,reloadDocument:r,replace:u,mask:f,state:h,target:p,to:b,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:_,...k},C){let{basename:j,navigator:M,useTransitions:D}=E.useContext(Ae),U=typeof b=="string"&&yh.test(b),z=ah(b,j);b=z.to;let w=xv(b,{relative:s}),Y=rn(),G=null;if(f){let tt=Ul(f,[],Y.mask?Y.mask.pathname:"/",!0);j!=="/"&&(tt.pathname=tt.pathname==="/"?j:sn([j,tt.pathname])),G=M.createHref(tt)}let[K,I,J]=Jv(a,k),ot=u1(b,{replace:u,mask:f,state:h,target:p,preventScrollReset:y,relative:s,viewTransition:v,defaultShouldRevalidate:_,useTransitions:D});function L(tt){e&&e(tt),tt.defaultPrevented||ot(tt)}let gt=!(z.isExternal||r),rt=E.createElement("a",{...k,...J,href:(gt?G:void 0)||z.absoluteURL||w,onClick:gt?L:e,ref:o1(C,I),target:p,"data-discover":!U&&o==="render"?"true":void 0});return K&&!U?E.createElement(E.Fragment,null,rt,E.createElement(t1,{page:w})):rt});xh.displayName="Link";var s1=E.forwardRef(function({"aria-current":e="page",caseSensitive:o=!1,className:a="",end:s=!1,style:r,to:u,viewTransition:f,children:h,...p},b){let y=la(u,{relative:p.relative}),v=rn(),_=E.useContext(Pl),{navigator:k,basename:C}=E.useContext(Ae),j=_!=null&&p1(y)&&f===!0,M=k.encodeLocation?k.encodeLocation(y).pathname:y.pathname,D=v.pathname,U=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;o||(D=D.toLowerCase(),U=U?U.toLowerCase():null,M=M.toLowerCase()),U&&C&&(U=Sn(U,C)||U);const z=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let w=D===M||!s&&D.startsWith(M)&&D.charAt(z)==="/",Y=U!=null&&(U===M||!s&&U.startsWith(M)&&U.charAt(M.length)==="/"),G={isActive:w,isPending:Y,isTransitioning:j},K=w?e:void 0,I;typeof a=="function"?I=a(G):I=[a,w?"active":null,Y?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let J=typeof r=="function"?r(G):r;return E.createElement(xh,{...p,"aria-current":K,className:I,ref:b,style:J,to:u,viewTransition:f},typeof h=="function"?h(G):h)});s1.displayName="NavLink";var r1=E.forwardRef(({discover:n="render",fetcherKey:e,navigate:o,reloadDocument:a,replace:s,state:r,method:u=Yl,action:f,onSubmit:h,relative:p,preventScrollReset:b,viewTransition:y,defaultShouldRevalidate:v,..._},k)=>{let{useTransitions:C}=E.useContext(Ae),j=h1(),M=g1(f,{relative:p}),D=u.toLowerCase()==="get"?"get":"post",U=typeof f=="string"&&yh.test(f),z=w=>{if(h&&h(w),w.defaultPrevented)return;w.preventDefault();let Y=w.nativeEvent.submitter,G=Y?.getAttribute("formmethod")||u,K=()=>j(Y||w.currentTarget,{fetcherKey:e,method:G,navigate:o,replace:s,state:r,relative:p,preventScrollReset:b,viewTransition:y,defaultShouldRevalidate:v});C&&o!==!1?E.startTransition(()=>K()):K()};return E.createElement("form",{ref:k,method:D,action:M,onSubmit:a?h:z,..._,"data-discover":!U&&n==="render"?"true":void 0})});r1.displayName="Form";function c1(n){return`${n} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function vh(n){let e=E.useContext(no);return Pt(e,c1(n)),e}function u1(n,{target:e,replace:o,mask:a,state:s,preventScrollReset:r,relative:u,viewTransition:f,defaultShouldRevalidate:h,useTransitions:p}={}){let b=sc(),y=rn(),v=la(n,{relative:u});return E.useCallback(_=>{if(Pv(_,e)){_.preventDefault();let k=o!==void 0?o:oa(y)===oa(v),C=()=>b(n,{replace:k,mask:a,state:s,preventScrollReset:r,relative:u,viewTransition:f,defaultShouldRevalidate:h});p?E.startTransition(()=>C()):C()}},[y,b,v,o,a,s,e,n,r,u,f,h,p])}var f1=0,d1=()=>`__${String(++f1)}__`;function h1(){let{router:n}=vh("useSubmit"),{basename:e}=E.useContext(Ae),o=Av(),a=n.fetch,s=n.navigate;return E.useCallback(async(r,u={})=>{let{action:f,method:h,encType:p,formData:b,body:y}=Fv(r,e);if(u.navigate===!1){let v=u.fetcherKey||d1();await a(v,o,u.action||f,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:y,formMethod:u.method||h,formEncType:u.encType||p,flushSync:u.flushSync})}else await s(u.action||f,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:b,body:y,formMethod:u.method||h,formEncType:u.encType||p,replace:u.replace,state:u.state,fromRouteId:o,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,s,e,o])}function g1(n,{relative:e}={}){let{basename:o}=E.useContext(Ae),a=E.useContext(gn);Pt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),r={...la(n||".",{relative:e})},u=rn();if(n==null){r.search=u.search;let f=new URLSearchParams(r.search),h=f.getAll("index");if(h.some(b=>b==="")){f.delete("index"),h.filter(y=>y).forEach(y=>f.append("index",y));let b=f.toString();r.search=b?`?${b}`:""}}return(!n||n===".")&&s.route.index&&(r.search=r.search?r.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(r.pathname=r.pathname==="/"?o:sn([o,r.pathname])),oa(r)}function p1(n,{relative:e}={}){let o=E.useContext(rh);Pt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=vh("useViewTransitionState"),s=la(n,{relative:e});if(!o.isTransitioning)return!1;let r=Sn(o.currentLocation.pathname,a)||o.currentLocation.pathname,u=Sn(o.nextLocation.pathname,a)||o.nextLocation.pathname;return Hl(s.pathname,u)!=null||Hl(s.pathname,r)!=null}var jn=Gd(),_h={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},wh=Te.createContext&&Te.createContext(_h),m1=["attr","size","title"];function b1(n,e){if(n==null)return{};var o,a,s=y1(n,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(a=0;a<r.length;a++)o=r[a],e.indexOf(o)===-1&&{}.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function y1(n,e){if(n==null)return{};var o={};for(var a in n)if({}.hasOwnProperty.call(n,a)){if(e.indexOf(a)!==-1)continue;o[a]=n[a]}return o}function Gl(){return Gl=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var a in o)({}).hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},Gl.apply(null,arguments)}function Sh(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),o.push.apply(o,a)}return o}function Kl(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?Sh(Object(o),!0).forEach(function(a){x1(n,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Sh(Object(o)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(o,a))})}return n}function x1(n,e,o){return(e=v1(e))in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}function v1(n){var e=_1(n,"string");return typeof e=="symbol"?e:e+""}function _1(n,e){if(typeof n!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function jh(n){return n&&n.map((e,o)=>Te.createElement(e.tag,Kl({key:o},e.attr),jh(e.child)))}function xt(n){return e=>Te.createElement(w1,Gl({attr:Kl({},n.attr)},e),jh(n.child))}function w1(n){var e=o=>{var{attr:a,size:s,title:r}=n,u=b1(n,m1),f=s||o.size||"1em",h;return o.className&&(h=o.className),n.className&&(h=(h?h+" ":"")+n.className),Te.createElement("svg",Gl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},o.attr,a,u,{className:h,style:Kl(Kl({color:n.color||o.color},o.style),n.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),r&&Te.createElement("title",null,r),n.children)};return wh!==void 0?Te.createElement(wh.Consumer,null,o=>e(o)):e(_h)}function kh(n){return xt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256.55 8C116.52 8 8 110.34 8 248.57c0 72.3 29.71 134.78 78.07 177.94 8.35 7.51 6.63 11.86 8.05 58.23A19.92 19.92 0 0 0 122 502.31c52.91-23.3 53.59-25.14 62.56-22.7C337.85 521.8 504 423.7 504 248.57 504 110.34 396.59 8 256.55 8zm149.24 185.13l-73 115.57a37.37 37.37 0 0 1-53.91 9.93l-58.08-43.47a15 15 0 0 0-18 0l-78.37 59.44c-10.46 7.93-24.16-4.6-17.11-15.67l73-115.57a37.36 37.36 0 0 1 53.91-9.93l58.06 43.46a15 15 0 0 0 18 0l78.41-59.38c10.44-7.98 24.14 4.54 17.09 15.62z"},child:[]}]})(n)}function Ch(n){return xt({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(n)}function S1(n){return xt({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"},child:[]}]})(n)}function j1(n){return xt({attr:{viewBox:"0 0 536 512"},child:[{tag:"path",attr:{d:"M508.55 171.51L362.18 150.2 296.77 17.81C290.89 5.98 279.42 0 267.95 0c-11.4 0-22.79 5.9-28.69 17.81l-65.43 132.38-146.38 21.29c-26.25 3.8-36.77 36.09-17.74 54.59l105.89 103-25.06 145.48C86.98 495.33 103.57 512 122.15 512c4.93 0 10-1.17 14.87-3.75l130.95-68.68 130.94 68.7c4.86 2.55 9.92 3.71 14.83 3.71 18.6 0 35.22-16.61 31.66-37.4l-25.03-145.49 105.91-102.98c19.04-18.5 8.52-50.8-17.73-54.6zm-121.74 123.2l-18.12 17.62 4.28 24.88 19.52 113.45-102.13-53.59-22.38-11.74.03-317.19 51.03 103.29 11.18 22.63 25.01 3.64 114.23 16.63-82.65 80.38z"},child:[]}]})(n)}function k1(n){return xt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"},child:[]}]})(n)}function C1(n){return xt({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(n)}function E1(n){return xt({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"},child:[]}]})(n)}function Eh(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(n)}function M1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"15",y1:"9",x2:"9",y2:"15"},child:[]},{tag:"line",attr:{x1:"9",y1:"9",x2:"15",y2:"15"},child:[]}]})(n)}function T1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"9",cy:"7",r:"4"},child:[]},{tag:"path",attr:{d:"M23 21v-2a4 4 0 0 0-3-3.87"},child:[]},{tag:"path",attr:{d:"M16 3.13a4 4 0 0 1 0 7.75"},child:[]}]})(n)}function A1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"5",y:"2",width:"14",height:"20",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"12",y1:"18",x2:"12.01",y2:"18"},child:[]}]})(n)}function N1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"},child:[]}]})(n)}function Mh(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"},child:[]},{tag:"polyline",attr:{points:"17 21 17 13 7 13 7 21"},child:[]},{tag:"polyline",attr:{points:"7 3 7 8 15 8"},child:[]}]})(n)}function O1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"23 4 23 10 17 10"},child:[]},{tag:"path",attr:{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"},child:[]}]})(n)}function Th(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"1 4 1 10 7 10"},child:[]},{tag:"path",attr:{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"},child:[]}]})(n)}function R1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(n)}function D1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"5 3 19 12 5 21 5 3"},child:[]}]})(n)}function z1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"},child:[]}]})(n)}function L1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"5",x2:"5",y2:"19"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"2.5"},child:[]},{tag:"circle",attr:{cx:"17.5",cy:"17.5",r:"2.5"},child:[]}]})(n)}function B1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"8",y1:"21",x2:"16",y2:"21"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12",y2:"21"},child:[]}]})(n)}function H1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"3",y1:"12",x2:"21",y2:"12"},child:[]},{tag:"line",attr:{x1:"3",y1:"6",x2:"21",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"18",x2:"21",y2:"18"},child:[]}]})(n)}function U1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M7 11V7a5 5 0 0 1 10 0v4"},child:[]}]})(n)}function V1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"4"},child:[]},{tag:"line",attr:{x1:"4.93",y1:"4.93",x2:"9.17",y2:"9.17"},child:[]},{tag:"line",attr:{x1:"14.83",y1:"14.83",x2:"19.07",y2:"19.07"},child:[]},{tag:"line",attr:{x1:"14.83",y1:"9.17",x2:"19.07",y2:"4.93"},child:[]},{tag:"line",attr:{x1:"14.83",y1:"9.17",x2:"18.36",y2:"5.64"},child:[]},{tag:"line",attr:{x1:"4.93",y1:"19.07",x2:"9.17",y2:"14.83"},child:[]}]})(n)}function P1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(n)}function Y1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"14",y:"3",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"14",y:"14",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"3",y:"14",width:"7",height:"7"},child:[]}]})(n)}function q1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]}]})(n)}function yc(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]},{tag:"polyline",attr:{points:"15 3 21 3 21 9"},child:[]},{tag:"line",attr:{x1:"10",y1:"14",x2:"21",y2:"3"},child:[]}]})(n)}function Ah(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(n)}function F1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(n)}function X1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 18 22 12 16 6"},child:[]},{tag:"polyline",attr:{points:"8 6 2 12 8 18"},child:[]}]})(n)}function xc(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"polyline",attr:{points:"12 6 12 12 16 14"},child:[]}]})(n)}function vc(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"6 9 12 15 18 9"},child:[]}]})(n)}function _c(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(n)}function G1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"},child:[]},{tag:"polyline",attr:{points:"22 4 12 14.01 9 11.01"},child:[]}]})(n)}function Nh(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"7",y1:"17",x2:"17",y2:"7"},child:[]},{tag:"polyline",attr:{points:"7 7 17 7 17 17"},child:[]}]})(n)}function K1(n){return xt({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(n)}/*!
 * @kurkle/color v0.3.4
 * https://github.com/kurkle/color#readme
 * (c) 2024 Jukka Kurkela
 * Released under the MIT License
 */function ra(n){return n+.5|0}const Kn=(n,e,o)=>Math.max(Math.min(n,o),e);function ca(n){return Kn(ra(n*2.55),0,255)}function Wn(n){return Kn(ra(n*255),0,255)}function kn(n){return Kn(ra(n/2.55)/100,0,1)}function Oh(n){return Kn(ra(n*100),0,100)}const Ke={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},wc=[..."0123456789ABCDEF"],W1=n=>wc[n&15],$1=n=>wc[(n&240)>>4]+wc[n&15],Wl=n=>(n&240)>>4===(n&15),Q1=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function Z1(n){var e=n.length,o;return n[0]==="#"&&(e===4||e===5?o={r:255&Ke[n[1]]*17,g:255&Ke[n[2]]*17,b:255&Ke[n[3]]*17,a:e===5?Ke[n[4]]*17:255}:(e===7||e===9)&&(o={r:Ke[n[1]]<<4|Ke[n[2]],g:Ke[n[3]]<<4|Ke[n[4]],b:Ke[n[5]]<<4|Ke[n[6]],a:e===9?Ke[n[7]]<<4|Ke[n[8]]:255})),o}const I1=(n,e)=>n<255?e(n):"";function J1(n){var e=Q1(n)?W1:$1;return n?"#"+e(n.r)+e(n.g)+e(n.b)+I1(n.a,e):void 0}const t_=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rh(n,e,o){const a=e*Math.min(o,1-o),s=(r,u=(r+n/30)%12)=>o-a*Math.max(Math.min(u-3,9-u,1),-1);return[s(0),s(8),s(4)]}function e_(n,e,o){const a=(s,r=(s+n/60)%6)=>o-o*e*Math.max(Math.min(r,4-r,1),0);return[a(5),a(3),a(1)]}function n_(n,e,o){const a=Rh(n,1,.5);let s;for(e+o>1&&(s=1/(e+o),e*=s,o*=s),s=0;s<3;s++)a[s]*=1-e-o,a[s]+=e;return a}function i_(n,e,o,a,s){return n===s?(e-o)/a+(e<o?6:0):e===s?(o-n)/a+2:(n-e)/a+4}function Sc(n){const o=n.r/255,a=n.g/255,s=n.b/255,r=Math.max(o,a,s),u=Math.min(o,a,s),f=(r+u)/2;let h,p,b;return r!==u&&(b=r-u,p=f>.5?b/(2-r-u):b/(r+u),h=i_(o,a,s,b,r),h=h*60+.5),[h|0,p||0,f]}function jc(n,e,o,a){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,o,a)).map(Wn)}function kc(n,e,o){return jc(Rh,n,e,o)}function o_(n,e,o){return jc(n_,n,e,o)}function a_(n,e,o){return jc(e_,n,e,o)}function Dh(n){return(n%360+360)%360}function l_(n){const e=t_.exec(n);let o=255,a;if(!e)return;e[5]!==a&&(o=e[6]?ca(+e[5]):Wn(+e[5]));const s=Dh(+e[2]),r=+e[3]/100,u=+e[4]/100;return e[1]==="hwb"?a=o_(s,r,u):e[1]==="hsv"?a=a_(s,r,u):a=kc(s,r,u),{r:a[0],g:a[1],b:a[2],a:o}}function s_(n,e){var o=Sc(n);o[0]=Dh(o[0]+e),o=kc(o),n.r=o[0],n.g=o[1],n.b=o[2]}function r_(n){if(!n)return;const e=Sc(n),o=e[0],a=Oh(e[1]),s=Oh(e[2]);return n.a<255?`hsla(${o}, ${a}%, ${s}%, ${kn(n.a)})`:`hsl(${o}, ${a}%, ${s}%)`}const zh={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Lh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function c_(){const n={},e=Object.keys(Lh),o=Object.keys(zh);let a,s,r,u,f;for(a=0;a<e.length;a++){for(u=f=e[a],s=0;s<o.length;s++)r=o[s],f=f.replace(r,zh[r]);r=parseInt(Lh[u],16),n[f]=[r>>16&255,r>>8&255,r&255]}return n}let $l;function u_(n){$l||($l=c_(),$l.transparent=[0,0,0,0]);const e=$l[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const f_=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function d_(n){const e=f_.exec(n);let o=255,a,s,r;if(e){if(e[7]!==a){const u=+e[7];o=e[8]?ca(u):Kn(u*255,0,255)}return a=+e[1],s=+e[3],r=+e[5],a=255&(e[2]?ca(a):Kn(a,0,255)),s=255&(e[4]?ca(s):Kn(s,0,255)),r=255&(e[6]?ca(r):Kn(r,0,255)),{r:a,g:s,b:r,a:o}}}function h_(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${kn(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const Cc=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,oo=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function g_(n,e,o){const a=oo(kn(n.r)),s=oo(kn(n.g)),r=oo(kn(n.b));return{r:Wn(Cc(a+o*(oo(kn(e.r))-a))),g:Wn(Cc(s+o*(oo(kn(e.g))-s))),b:Wn(Cc(r+o*(oo(kn(e.b))-r))),a:n.a+o*(e.a-n.a)}}function Ql(n,e,o){if(n){let a=Sc(n);a[e]=Math.max(0,Math.min(a[e]+a[e]*o,e===0?360:1)),a=kc(a),n.r=a[0],n.g=a[1],n.b=a[2]}}function Bh(n,e){return n&&Object.assign(e||{},n)}function Hh(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Wn(n[3]))):(e=Bh(n,{r:0,g:0,b:0,a:1}),e.a=Wn(e.a)),e}function p_(n){return n.charAt(0)==="r"?d_(n):l_(n)}class ua{constructor(e){if(e instanceof ua)return e;const o=typeof e;let a;o==="object"?a=Hh(e):o==="string"&&(a=Z1(e)||u_(e)||p_(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=Bh(this._rgb);return e&&(e.a=kn(e.a)),e}set rgb(e){this._rgb=Hh(e)}rgbString(){return this._valid?h_(this._rgb):void 0}hexString(){return this._valid?J1(this._rgb):void 0}hslString(){return this._valid?r_(this._rgb):void 0}mix(e,o){if(e){const a=this.rgb,s=e.rgb;let r;const u=o===r?.5:o,f=2*u-1,h=a.a-s.a,p=((f*h===-1?f:(f+h)/(1+f*h))+1)/2;r=1-p,a.r=255&p*a.r+r*s.r+.5,a.g=255&p*a.g+r*s.g+.5,a.b=255&p*a.b+r*s.b+.5,a.a=u*a.a+(1-u)*s.a,this.rgb=a}return this}interpolate(e,o){return e&&(this._rgb=g_(this._rgb,e._rgb,o)),this}clone(){return new ua(this.rgb)}alpha(e){return this._rgb.a=Wn(e),this}clearer(e){const o=this._rgb;return o.a*=1-e,this}greyscale(){const e=this._rgb,o=ra(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=o,this}opaquer(e){const o=this._rgb;return o.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ql(this._rgb,2,e),this}darken(e){return Ql(this._rgb,2,-e),this}saturate(e){return Ql(this._rgb,1,e),this}desaturate(e){return Ql(this._rgb,1,-e),this}rotate(e){return s_(this._rgb,e),this}}/*!
 * Chart.js v4.5.1
 * https://www.chartjs.org
 * (c) 2025 Chart.js Contributors
 * Released under the MIT License
 */function Cn(){}const m_=(()=>{let n=0;return()=>n++})();function Bt(n){return n==null}function ie(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function kt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function de(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function pn(n,e){return de(n)?n:e}function _t(n,e){return typeof n>"u"?e:n}const b_=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/e,Uh=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Ut(n,e,o){if(n&&typeof n.call=="function")return n.apply(o,e)}function Tt(n,e,o,a){let s,r,u;if(ie(n))for(r=n.length,s=0;s<r;s++)e.call(o,n[s],s);else if(kt(n))for(u=Object.keys(n),r=u.length,s=0;s<r;s++)e.call(o,n[u[s]],u[s])}function Zl(n,e){let o,a,s,r;if(!n||!e||n.length!==e.length)return!1;for(o=0,a=n.length;o<a;++o)if(s=n[o],r=e[o],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function Il(n){if(ie(n))return n.map(Il);if(kt(n)){const e=Object.create(null),o=Object.keys(n),a=o.length;let s=0;for(;s<a;++s)e[o[s]]=Il(n[o[s]]);return e}return n}function Vh(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function y_(n,e,o,a){if(!Vh(n))return;const s=e[n],r=o[n];kt(s)&&kt(r)?fa(s,r,a):e[n]=Il(r)}function fa(n,e,o){const a=ie(e)?e:[e],s=a.length;if(!kt(n))return n;o=o||{};const r=o.merger||y_;let u;for(let f=0;f<s;++f){if(u=a[f],!kt(u))continue;const h=Object.keys(u);for(let p=0,b=h.length;p<b;++p)r(h[p],n,u,o)}return n}function da(n,e){return fa(n,e,{merger:x_})}function x_(n,e,o){if(!Vh(n))return;const a=e[n],s=o[n];kt(a)&&kt(s)?da(a,s):Object.prototype.hasOwnProperty.call(e,n)||(e[n]=Il(s))}const Ph={"":n=>n,x:n=>n.x,y:n=>n.y};function v_(n){const e=n.split("."),o=[];let a="";for(const s of e)a+=s,a.endsWith("\\")?a=a.slice(0,-1)+".":(o.push(a),a="");return o}function __(n){const e=v_(n);return o=>{for(const a of e){if(a==="")break;o=o&&o[a]}return o}}function ha(n,e){return(Ph[e]||(Ph[e]=__(e)))(n)}function Ec(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Jl=n=>typeof n<"u",$n=n=>typeof n=="function",Yh=(n,e)=>{if(n.size!==e.size)return!1;for(const o of n)if(!e.has(o))return!1;return!0};function w_(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const zt=Math.PI,qt=2*zt,S_=qt+zt,ts=Number.POSITIVE_INFINITY,j_=zt/180,te=zt/2,Ci=zt/4,qh=zt*2/3,Fh=Math.log10,ao=Math.sign;function ga(n,e,o){return Math.abs(n-e)<o}function Xh(n){const e=Math.round(n);n=ga(n,e,n/1e3)?e:n;const o=Math.pow(10,Math.floor(Fh(n))),a=n/o;return(a<=1?1:a<=2?2:a<=5?5:10)*o}function k_(n){const e=[],o=Math.sqrt(n);let a;for(a=1;a<o;a++)n%a===0&&(e.push(a),e.push(n/a));return o===(o|0)&&e.push(o),e.sort((s,r)=>s-r).pop(),e}function C_(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function pa(n){return!C_(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function E_(n,e){const o=Math.round(n);return o-e<=n&&o+e>=n}function M_(n,e,o){let a,s,r;for(a=0,s=n.length;a<s;a++)r=n[a][o],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function En(n){return n*(zt/180)}function T_(n){return n*(180/zt)}function Gh(n){if(!de(n))return;let e=1,o=0;for(;Math.round(n*e)/e!==n;)e*=10,o++;return o}function Kh(n,e){const o=e.x-n.x,a=e.y-n.y,s=Math.sqrt(o*o+a*a);let r=Math.atan2(a,o);return r<-.5*zt&&(r+=qt),{angle:r,distance:s}}function Mc(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function A_(n,e){return(n-e+S_)%qt-zt}function Ne(n){return(n%qt+qt)%qt}function ma(n,e,o,a){const s=Ne(n),r=Ne(e),u=Ne(o),f=Ne(r-s),h=Ne(u-s),p=Ne(s-r),b=Ne(s-u);return s===r||s===u||a&&r===u||f>h&&p<b}function ye(n,e,o){return Math.max(e,Math.min(o,n))}function N_(n){return ye(n,-32768,32767)}function Ei(n,e,o,a=1e-6){return n>=Math.min(e,o)-a&&n<=Math.max(e,o)+a}function Tc(n,e,o){o=o||(u=>n[u]<e);let a=n.length-1,s=0,r;for(;a-s>1;)r=s+a>>1,o(r)?s=r:a=r;return{lo:s,hi:a}}const Mi=(n,e,o,a)=>Tc(n,o,a?s=>{const r=n[s][e];return r<o||r===o&&n[s+1][e]===o}:s=>n[s][e]<o),O_=(n,e,o)=>Tc(n,o,a=>n[a][e]>=o);function R_(n,e,o){let a=0,s=n.length;for(;a<s&&n[a]<e;)a++;for(;s>a&&n[s-1]>o;)s--;return a>0||s<n.length?n.slice(a,s):n}const Wh=["push","pop","shift","splice","unshift"];function D_(n,e){if(n._chartjs){n._chartjs.listeners.push(e);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Wh.forEach(o=>{const a="_onData"+Ec(o),s=n[o];Object.defineProperty(n,o,{configurable:!0,enumerable:!1,value(...r){const u=s.apply(this,r);return n._chartjs.listeners.forEach(f=>{typeof f[a]=="function"&&f[a](...r)}),u}})})}function $h(n,e){const o=n._chartjs;if(!o)return;const a=o.listeners,s=a.indexOf(e);s!==-1&&a.splice(s,1),!(a.length>0)&&(Wh.forEach(r=>{delete n[r]}),delete n._chartjs)}function z_(n){const e=new Set(n);return e.size===n.length?n:Array.from(e)}const Qh=(function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame})();function Zh(n,e){let o=[],a=!1;return function(...s){o=s,a||(a=!0,Qh.call(window,()=>{a=!1,n.apply(e,o)}))}}function L_(n,e){let o;return function(...a){return e?(clearTimeout(o),o=setTimeout(n,e,a)):n.apply(this,a),e}}const Ih=n=>n==="start"?"left":n==="end"?"right":"center",Oe=(n,e,o)=>n==="start"?e:n==="end"?o:(e+o)/2,B_=(n,e,o,a)=>n===(a?"left":"right")?o:n==="center"?(e+o)/2:e;function H_(n,e,o){const a=e.length;let s=0,r=a;if(n._sorted){const{iScale:u,vScale:f,_parsed:h}=n,p=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,b=u.axis,{min:y,max:v,minDefined:_,maxDefined:k}=u.getUserBounds();if(_){if(s=Math.min(Mi(h,b,y).lo,o?a:Mi(e,b,u.getPixelForValue(y)).lo),p){const C=h.slice(0,s+1).reverse().findIndex(j=>!Bt(j[f.axis]));s-=Math.max(0,C)}s=ye(s,0,a-1)}if(k){let C=Math.max(Mi(h,u.axis,v,!0).hi+1,o?0:Mi(e,b,u.getPixelForValue(v),!0).hi+1);if(p){const j=h.slice(C-1).findIndex(M=>!Bt(M[f.axis]));C+=Math.max(0,j)}r=ye(C,s,a)-s}else r=a-s}return{start:s,count:r}}function U_(n){const{xScale:e,yScale:o,_scaleRanges:a}=n,s={xmin:e.min,xmax:e.max,ymin:o.min,ymax:o.max};if(!a)return n._scaleRanges=s,!0;const r=a.xmin!==e.min||a.xmax!==e.max||a.ymin!==o.min||a.ymax!==o.max;return Object.assign(a,s),r}const es=n=>n===0||n===1,Jh=(n,e,o)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*qt/o)),tg=(n,e,o)=>Math.pow(2,-10*n)*Math.sin((n-e)*qt/o)+1,ba={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*te)+1,easeOutSine:n=>Math.sin(n*te),easeInOutSine:n=>-.5*(Math.cos(zt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>es(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>es(n)?n:Jh(n,.075,.3),easeOutElastic:n=>es(n)?n:tg(n,.075,.3),easeInOutElastic(n){return es(n)?n:n<.5?.5*Jh(n*2,.1125,.45):.5+.5*tg(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-ba.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ba.easeInBounce(n*2)*.5:ba.easeOutBounce(n*2-1)*.5+.5};function Ac(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function eg(n){return Ac(n)?n:new ua(n)}function Nc(n){return Ac(n)?n:new ua(n).saturate(.5).darken(.1).hexString()}const V_=["x","y","borderWidth","radius","tension"],P_=["color","borderColor","backgroundColor"];function Y_(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),n.set("animations",{colors:{type:"color",properties:P_},numbers:{type:"number",properties:V_}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function q_(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const ng=new Map;function F_(n,e){e=e||{};const o=n+JSON.stringify(e);let a=ng.get(o);return a||(a=new Intl.NumberFormat(n,e),ng.set(o,a)),a}function Oc(n,e,o){return F_(e,o).format(n)}const X_={values(n){return ie(n)?n:""+n},numeric(n,e,o){if(n===0)return"0";const a=this.chart.options.locale;let s,r=n;if(o.length>1){const p=Math.max(Math.abs(o[0].value),Math.abs(o[o.length-1].value));(p<1e-4||p>1e15)&&(s="scientific"),r=G_(n,o)}const u=Fh(Math.abs(r)),f=isNaN(u)?1:Math.max(Math.min(-1*Math.floor(u),20),0),h={notation:s,minimumFractionDigits:f,maximumFractionDigits:f};return Object.assign(h,this.options.ticks.format),Oc(n,a,h)}};function G_(n,e){let o=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(o)>=1&&n!==Math.floor(n)&&(o=n-Math.floor(n)),o}var ig={formatters:X_};function K_(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,o)=>o.lineWidth,tickColor:(e,o)=>o.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ig.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ti=Object.create(null),Rc=Object.create(null);function ya(n,e){if(!e)return n;const o=e.split(".");for(let a=0,s=o.length;a<s;++a){const r=o[a];n=n[r]||(n[r]=Object.create(null))}return n}function Dc(n,e,o){return typeof e=="string"?fa(ya(n,e),o):fa(ya(n,""),e)}class W_{constructor(e,o){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=a=>a.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(a,s)=>Nc(s.backgroundColor),this.hoverBorderColor=(a,s)=>Nc(s.borderColor),this.hoverColor=(a,s)=>Nc(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(o)}set(e,o){return Dc(this,e,o)}get(e){return ya(this,e)}describe(e,o){return Dc(Rc,e,o)}override(e,o){return Dc(Ti,e,o)}route(e,o,a,s){const r=ya(this,e),u=ya(this,a),f="_"+o;Object.defineProperties(r,{[f]:{value:r[o],writable:!0},[o]:{enumerable:!0,get(){const h=this[f],p=u[s];return kt(h)?Object.assign({},p,h):_t(h,p)},set(h){this[f]=h}}})}apply(e){e.forEach(o=>o(this))}}var Kt=new W_({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Y_,q_,K_]);function $_(n){return!n||Bt(n.size)||Bt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function og(n,e,o,a,s){let r=e[s];return r||(r=e[s]=n.measureText(s).width,o.push(s)),r>a&&(a=r),a}function Ai(n,e,o){const a=n.currentDevicePixelRatio,s=o!==0?Math.max(o/2,.5):0;return Math.round((e-s)*a)/a+s}function ag(n,e){!e&&!n||(e=e||n.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,n.width,n.height),e.restore())}function zc(n,e,o,a){lg(n,e,o,a,null)}function lg(n,e,o,a,s){let r,u,f,h,p,b,y,v;const _=e.pointStyle,k=e.rotation,C=e.radius;let j=(k||0)*j_;if(_&&typeof _=="object"&&(r=_.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){n.save(),n.translate(o,a),n.rotate(j),n.drawImage(_,-_.width/2,-_.height/2,_.width,_.height),n.restore();return}if(!(isNaN(C)||C<=0)){switch(n.beginPath(),_){default:s?n.ellipse(o,a,s/2,C,0,0,qt):n.arc(o,a,C,0,qt),n.closePath();break;case"triangle":b=s?s/2:C,n.moveTo(o+Math.sin(j)*b,a-Math.cos(j)*C),j+=qh,n.lineTo(o+Math.sin(j)*b,a-Math.cos(j)*C),j+=qh,n.lineTo(o+Math.sin(j)*b,a-Math.cos(j)*C),n.closePath();break;case"rectRounded":p=C*.516,h=C-p,u=Math.cos(j+Ci)*h,y=Math.cos(j+Ci)*(s?s/2-p:h),f=Math.sin(j+Ci)*h,v=Math.sin(j+Ci)*(s?s/2-p:h),n.arc(o-y,a-f,p,j-zt,j-te),n.arc(o+v,a-u,p,j-te,j),n.arc(o+y,a+f,p,j,j+te),n.arc(o-v,a+u,p,j+te,j+zt),n.closePath();break;case"rect":if(!k){h=Math.SQRT1_2*C,b=s?s/2:h,n.rect(o-b,a-h,2*b,2*h);break}j+=Ci;case"rectRot":y=Math.cos(j)*(s?s/2:C),u=Math.cos(j)*C,f=Math.sin(j)*C,v=Math.sin(j)*(s?s/2:C),n.moveTo(o-y,a-f),n.lineTo(o+v,a-u),n.lineTo(o+y,a+f),n.lineTo(o-v,a+u),n.closePath();break;case"crossRot":j+=Ci;case"cross":y=Math.cos(j)*(s?s/2:C),u=Math.cos(j)*C,f=Math.sin(j)*C,v=Math.sin(j)*(s?s/2:C),n.moveTo(o-y,a-f),n.lineTo(o+y,a+f),n.moveTo(o+v,a-u),n.lineTo(o-v,a+u);break;case"star":y=Math.cos(j)*(s?s/2:C),u=Math.cos(j)*C,f=Math.sin(j)*C,v=Math.sin(j)*(s?s/2:C),n.moveTo(o-y,a-f),n.lineTo(o+y,a+f),n.moveTo(o+v,a-u),n.lineTo(o-v,a+u),j+=Ci,y=Math.cos(j)*(s?s/2:C),u=Math.cos(j)*C,f=Math.sin(j)*C,v=Math.sin(j)*(s?s/2:C),n.moveTo(o-y,a-f),n.lineTo(o+y,a+f),n.moveTo(o+v,a-u),n.lineTo(o-v,a+u);break;case"line":u=s?s/2:Math.cos(j)*C,f=Math.sin(j)*C,n.moveTo(o-u,a-f),n.lineTo(o+u,a+f);break;case"dash":n.moveTo(o,a),n.lineTo(o+Math.cos(j)*(s?s/2:C),a+Math.sin(j)*C);break;case!1:n.closePath();break}n.fill(),e.borderWidth>0&&n.stroke()}}function xa(n,e,o){return o=o||.5,!e||n&&n.x>e.left-o&&n.x<e.right+o&&n.y>e.top-o&&n.y<e.bottom+o}function ns(n,e){n.save(),n.beginPath(),n.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),n.clip()}function is(n){n.restore()}function Q_(n,e,o,a,s){if(!e)return n.lineTo(o.x,o.y);if(s==="middle"){const r=(e.x+o.x)/2;n.lineTo(r,e.y),n.lineTo(r,o.y)}else s==="after"!=!!a?n.lineTo(e.x,o.y):n.lineTo(o.x,e.y);n.lineTo(o.x,o.y)}function Z_(n,e,o,a){if(!e)return n.lineTo(o.x,o.y);n.bezierCurveTo(a?e.cp1x:e.cp2x,a?e.cp1y:e.cp2y,a?o.cp2x:o.cp1x,a?o.cp2y:o.cp1y,o.x,o.y)}function I_(n,e){e.translation&&n.translate(e.translation[0],e.translation[1]),Bt(e.rotation)||n.rotate(e.rotation),e.color&&(n.fillStyle=e.color),e.textAlign&&(n.textAlign=e.textAlign),e.textBaseline&&(n.textBaseline=e.textBaseline)}function J_(n,e,o,a,s){if(s.strikethrough||s.underline){const r=n.measureText(a),u=e-r.actualBoundingBoxLeft,f=e+r.actualBoundingBoxRight,h=o-r.actualBoundingBoxAscent,p=o+r.actualBoundingBoxDescent,b=s.strikethrough?(h+p)/2:p;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(u,b),n.lineTo(f,b),n.stroke()}}function t2(n,e){const o=n.fillStyle;n.fillStyle=e.color,n.fillRect(e.left,e.top,e.width,e.height),n.fillStyle=o}function os(n,e,o,a,s,r={}){const u=ie(e)?e:[e],f=r.strokeWidth>0&&r.strokeColor!=="";let h,p;for(n.save(),n.font=s.string,I_(n,r),h=0;h<u.length;++h)p=u[h],r.backdrop&&t2(n,r.backdrop),f&&(r.strokeColor&&(n.strokeStyle=r.strokeColor),Bt(r.strokeWidth)||(n.lineWidth=r.strokeWidth),n.strokeText(p,o,a,r.maxWidth)),n.fillText(p,o,a,r.maxWidth),J_(n,o,a,p,r),a+=Number(s.lineHeight);n.restore()}function Lc(n,e){const{x:o,y:a,w:s,h:r,radius:u}=e;n.arc(o+u.topLeft,a+u.topLeft,u.topLeft,1.5*zt,zt,!0),n.lineTo(o,a+r-u.bottomLeft),n.arc(o+u.bottomLeft,a+r-u.bottomLeft,u.bottomLeft,zt,te,!0),n.lineTo(o+s-u.bottomRight,a+r),n.arc(o+s-u.bottomRight,a+r-u.bottomRight,u.bottomRight,te,0,!0),n.lineTo(o+s,a+u.topRight),n.arc(o+s-u.topRight,a+u.topRight,u.topRight,0,-te,!0),n.lineTo(o+u.topLeft,a)}const e2=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,n2=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function i2(n,e){const o=(""+n).match(e2);if(!o||o[1]==="normal")return e*1.2;switch(n=+o[2],o[3]){case"px":return n;case"%":n/=100;break}return e*n}const o2=n=>+n||0;function Bc(n,e){const o={},a=kt(e),s=a?Object.keys(e):e,r=kt(n)?a?u=>_t(n[u],n[e[u]]):u=>n[u]:()=>n;for(const u of s)o[u]=o2(r(u));return o}function a2(n){return Bc(n,{top:"y",right:"x",bottom:"y",left:"x"})}function va(n){return Bc(n,["topLeft","topRight","bottomLeft","bottomRight"])}function cn(n){const e=a2(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function _e(n,e){n=n||{},e=e||Kt.font;let o=_t(n.size,e.size);typeof o=="string"&&(o=parseInt(o,10));let a=_t(n.style,e.style);a&&!(""+a).match(n2)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);const s={family:_t(n.family,e.family),lineHeight:i2(_t(n.lineHeight,e.lineHeight),o),size:o,style:a,weight:_t(n.weight,e.weight),string:""};return s.string=$_(s),s}function as(n,e,o,a){let s,r,u;for(s=0,r=n.length;s<r;++s)if(u=n[s],u!==void 0&&u!==void 0)return u}function l2(n,e,o){const{min:a,max:s}=n,r=Uh(e,(s-a)/2),u=(f,h)=>o&&f===0?0:f+h;return{min:u(a,-Math.abs(r)),max:u(s,r)}}function Ni(n,e){return Object.assign(Object.create(n),e)}function Hc(n,e=[""],o,a,s=()=>n[0]){const r=o||n;typeof a>"u"&&(a=fg("_fallback",n));const u={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:r,_fallback:a,_getTarget:s,override:f=>Hc([f,...n],e,r,a)};return new Proxy(u,{deleteProperty(f,h){return delete f[h],delete f._keys,delete n[0][h],!0},get(f,h){return rg(f,h,()=>g2(h,e,n,f))},getOwnPropertyDescriptor(f,h){return Reflect.getOwnPropertyDescriptor(f._scopes[0],h)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(f,h){return dg(f).includes(h)},ownKeys(f){return dg(f)},set(f,h,p){const b=f._storage||(f._storage=s());return f[h]=b[h]=p,delete f._keys,!0}})}function lo(n,e,o,a){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:o,_stack:new Set,_descriptors:sg(n,a),setContext:r=>lo(n,r,o,a),override:r=>lo(n.override(r),e,o,a)};return new Proxy(s,{deleteProperty(r,u){return delete r[u],delete n[u],!0},get(r,u,f){return rg(r,u,()=>r2(r,u,f))},getOwnPropertyDescriptor(r,u){return r._descriptors.allKeys?Reflect.has(n,u)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,u)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(r,u){return Reflect.has(n,u)},ownKeys(){return Reflect.ownKeys(n)},set(r,u,f){return n[u]=f,delete r[u],!0}})}function sg(n,e={scriptable:!0,indexable:!0}){const{_scriptable:o=e.scriptable,_indexable:a=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:o,indexable:a,isScriptable:$n(o)?o:()=>o,isIndexable:$n(a)?a:()=>a}}const s2=(n,e)=>n?n+Ec(e):e,Uc=(n,e)=>kt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function rg(n,e,o){if(Object.prototype.hasOwnProperty.call(n,e)||e==="constructor")return n[e];const a=o();return n[e]=a,a}function r2(n,e,o){const{_proxy:a,_context:s,_subProxy:r,_descriptors:u}=n;let f=a[e];return $n(f)&&u.isScriptable(e)&&(f=c2(e,f,n,o)),ie(f)&&f.length&&(f=u2(e,f,n,u.isIndexable)),Uc(e,f)&&(f=lo(f,s,r&&r[e],u)),f}function c2(n,e,o,a){const{_proxy:s,_context:r,_subProxy:u,_stack:f}=o;if(f.has(n))throw new Error("Recursion detected: "+Array.from(f).join("->")+"->"+n);f.add(n);let h=e(r,u||a);return f.delete(n),Uc(n,h)&&(h=Vc(s._scopes,s,n,h)),h}function u2(n,e,o,a){const{_proxy:s,_context:r,_subProxy:u,_descriptors:f}=o;if(typeof r.index<"u"&&a(n))return e[r.index%e.length];if(kt(e[0])){const h=e,p=s._scopes.filter(b=>b!==h);e=[];for(const b of h){const y=Vc(p,s,n,b);e.push(lo(y,r,u&&u[n],f))}}return e}function cg(n,e,o){return $n(n)?n(e,o):n}const f2=(n,e)=>n===!0?e:typeof n=="string"?ha(e,n):void 0;function d2(n,e,o,a,s){for(const r of e){const u=f2(o,r);if(u){n.add(u);const f=cg(u._fallback,o,s);if(typeof f<"u"&&f!==o&&f!==a)return f}else if(u===!1&&typeof a<"u"&&o!==a)return null}return!1}function Vc(n,e,o,a){const s=e._rootScopes,r=cg(e._fallback,o,a),u=[...n,...s],f=new Set;f.add(a);let h=ug(f,u,o,r||o,a);return h===null||typeof r<"u"&&r!==o&&(h=ug(f,u,r,h,a),h===null)?!1:Hc(Array.from(f),[""],s,r,()=>h2(e,o,a))}function ug(n,e,o,a,s){for(;o;)o=d2(n,e,o,a,s);return o}function h2(n,e,o){const a=n._getTarget();e in a||(a[e]={});const s=a[e];return ie(s)&&kt(o)?o:s||{}}function g2(n,e,o,a){let s;for(const r of e)if(s=fg(s2(r,n),o),typeof s<"u")return Uc(n,s)?Vc(o,a,n,s):s}function fg(n,e){for(const o of e){if(!o)continue;const a=o[n];if(typeof a<"u")return a}}function dg(n){let e=n._keys;return e||(e=n._keys=p2(n._scopes)),e}function p2(n){const e=new Set;for(const o of n)for(const a of Object.keys(o).filter(s=>!s.startsWith("_")))e.add(a);return Array.from(e)}const m2=Number.EPSILON||1e-14,so=(n,e)=>e<n.length&&!n[e].skip&&n[e],hg=n=>n==="x"?"y":"x";function b2(n,e,o,a){const s=n.skip?e:n,r=e,u=o.skip?e:o,f=Mc(r,s),h=Mc(u,r);let p=f/(f+h),b=h/(f+h);p=isNaN(p)?0:p,b=isNaN(b)?0:b;const y=a*p,v=a*b;return{previous:{x:r.x-y*(u.x-s.x),y:r.y-y*(u.y-s.y)},next:{x:r.x+v*(u.x-s.x),y:r.y+v*(u.y-s.y)}}}function y2(n,e,o){const a=n.length;let s,r,u,f,h,p=so(n,0);for(let b=0;b<a-1;++b)if(h=p,p=so(n,b+1),!(!h||!p)){if(ga(e[b],0,m2)){o[b]=o[b+1]=0;continue}s=o[b]/e[b],r=o[b+1]/e[b],f=Math.pow(s,2)+Math.pow(r,2),!(f<=9)&&(u=3/Math.sqrt(f),o[b]=s*u*e[b],o[b+1]=r*u*e[b])}}function x2(n,e,o="x"){const a=hg(o),s=n.length;let r,u,f,h=so(n,0);for(let p=0;p<s;++p){if(u=f,f=h,h=so(n,p+1),!f)continue;const b=f[o],y=f[a];u&&(r=(b-u[o])/3,f[`cp1${o}`]=b-r,f[`cp1${a}`]=y-r*e[p]),h&&(r=(h[o]-b)/3,f[`cp2${o}`]=b+r,f[`cp2${a}`]=y+r*e[p])}}function v2(n,e="x"){const o=hg(e),a=n.length,s=Array(a).fill(0),r=Array(a);let u,f,h,p=so(n,0);for(u=0;u<a;++u)if(f=h,h=p,p=so(n,u+1),!!h){if(p){const b=p[e]-h[e];s[u]=b!==0?(p[o]-h[o])/b:0}r[u]=f?p?ao(s[u-1])!==ao(s[u])?0:(s[u-1]+s[u])/2:s[u-1]:s[u]}y2(n,s,r),x2(n,r,e)}function ls(n,e,o){return Math.max(Math.min(n,o),e)}function _2(n,e){let o,a,s,r,u,f=xa(n[0],e);for(o=0,a=n.length;o<a;++o)u=r,r=f,f=o<a-1&&xa(n[o+1],e),r&&(s=n[o],u&&(s.cp1x=ls(s.cp1x,e.left,e.right),s.cp1y=ls(s.cp1y,e.top,e.bottom)),f&&(s.cp2x=ls(s.cp2x,e.left,e.right),s.cp2y=ls(s.cp2y,e.top,e.bottom)))}function w2(n,e,o,a,s){let r,u,f,h;if(e.spanGaps&&(n=n.filter(p=>!p.skip)),e.cubicInterpolationMode==="monotone")v2(n,s);else{let p=a?n[n.length-1]:n[0];for(r=0,u=n.length;r<u;++r)f=n[r],h=b2(p,f,n[Math.min(r+1,u-(a?0:1))%u],e.tension),f.cp1x=h.previous.x,f.cp1y=h.previous.y,f.cp2x=h.next.x,f.cp2y=h.next.y,p=f}e.capBezierPoints&&_2(n,o)}function Pc(){return typeof window<"u"&&typeof document<"u"}function Yc(n){let e=n.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function ss(n,e,o){let a;return typeof n=="string"?(a=parseInt(n,10),n.indexOf("%")!==-1&&(a=a/100*e.parentNode[o])):a=n,a}const rs=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function S2(n,e){return rs(n).getPropertyValue(e)}const j2=["top","right","bottom","left"];function Oi(n,e,o){const a={};o=o?"-"+o:"";for(let s=0;s<4;s++){const r=j2[s];a[r]=parseFloat(n[e+"-"+r+o])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}const k2=(n,e,o)=>(n>0||e>0)&&(!o||!o.shadowRoot);function C2(n,e){const o=n.touches,a=o&&o.length?o[0]:n,{offsetX:s,offsetY:r}=a;let u=!1,f,h;if(k2(s,r,n.target))f=s,h=r;else{const p=e.getBoundingClientRect();f=a.clientX-p.left,h=a.clientY-p.top,u=!0}return{x:f,y:h,box:u}}function Ri(n,e){if("native"in n)return n;const{canvas:o,currentDevicePixelRatio:a}=e,s=rs(o),r=s.boxSizing==="border-box",u=Oi(s,"padding"),f=Oi(s,"border","width"),{x:h,y:p,box:b}=C2(n,o),y=u.left+(b&&f.left),v=u.top+(b&&f.top);let{width:_,height:k}=e;return r&&(_-=u.width+f.width,k-=u.height+f.height),{x:Math.round((h-y)/_*o.width/a),y:Math.round((p-v)/k*o.height/a)}}function E2(n,e,o){let a,s;if(e===void 0||o===void 0){const r=n&&Yc(n);if(!r)e=n.clientWidth,o=n.clientHeight;else{const u=r.getBoundingClientRect(),f=rs(r),h=Oi(f,"border","width"),p=Oi(f,"padding");e=u.width-p.width-h.width,o=u.height-p.height-h.height,a=ss(f.maxWidth,r,"clientWidth"),s=ss(f.maxHeight,r,"clientHeight")}}return{width:e,height:o,maxWidth:a||ts,maxHeight:s||ts}}const Qn=n=>Math.round(n*10)/10;function M2(n,e,o,a){const s=rs(n),r=Oi(s,"margin"),u=ss(s.maxWidth,n,"clientWidth")||ts,f=ss(s.maxHeight,n,"clientHeight")||ts,h=E2(n,e,o);let{width:p,height:b}=h;if(s.boxSizing==="content-box"){const v=Oi(s,"border","width"),_=Oi(s,"padding");p-=_.width+v.width,b-=_.height+v.height}return p=Math.max(0,p-r.width),b=Math.max(0,a?p/a:b-r.height),p=Qn(Math.min(p,u,h.maxWidth)),b=Qn(Math.min(b,f,h.maxHeight)),p&&!b&&(b=Qn(p/2)),(e!==void 0||o!==void 0)&&a&&h.height&&b>h.height&&(b=h.height,p=Qn(Math.floor(b*a))),{width:p,height:b}}function gg(n,e,o){const a=e||1,s=Qn(n.height*a),r=Qn(n.width*a);n.height=Qn(n.height),n.width=Qn(n.width);const u=n.canvas;return u.style&&(o||!u.style.height&&!u.style.width)&&(u.style.height=`${n.height}px`,u.style.width=`${n.width}px`),n.currentDevicePixelRatio!==a||u.height!==s||u.width!==r?(n.currentDevicePixelRatio=a,u.height=s,u.width=r,n.ctx.setTransform(a,0,0,a,0,0),!0):!1}const T2=(function(){let n=!1;try{const e={get passive(){return n=!0,!1}};Pc()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return n})();function pg(n,e){const o=S2(n,e),a=o&&o.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}function Di(n,e,o,a){return{x:n.x+o*(e.x-n.x),y:n.y+o*(e.y-n.y)}}function A2(n,e,o,a){return{x:n.x+o*(e.x-n.x),y:a==="middle"?o<.5?n.y:e.y:a==="after"?o<1?n.y:e.y:o>0?e.y:n.y}}function N2(n,e,o,a){const s={x:n.cp2x,y:n.cp2y},r={x:e.cp1x,y:e.cp1y},u=Di(n,s,o),f=Di(s,r,o),h=Di(r,e,o),p=Di(u,f,o),b=Di(f,h,o);return Di(p,b,o)}const O2=function(n,e){return{x(o){return n+n+e-o},setWidth(o){e=o},textAlign(o){return o==="center"?o:o==="right"?"left":"right"},xPlus(o,a){return o-a},leftForLtr(o,a){return o-a}}},R2=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function ro(n,e,o){return n?O2(e,o):R2()}function mg(n,e){let o,a;(e==="ltr"||e==="rtl")&&(o=n.canvas.style,a=[o.getPropertyValue("direction"),o.getPropertyPriority("direction")],o.setProperty("direction",e,"important"),n.prevTextDirection=a)}function bg(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function yg(n){return n==="angle"?{between:ma,compare:A_,normalize:Ne}:{between:Ei,compare:(e,o)=>e-o,normalize:e=>e}}function xg({start:n,end:e,count:o,loop:a,style:s}){return{start:n%o,end:e%o,loop:a&&(e-n+1)%o===0,style:s}}function D2(n,e,o){const{property:a,start:s,end:r}=o,{between:u,normalize:f}=yg(a),h=e.length;let{start:p,end:b,loop:y}=n,v,_;if(y){for(p+=h,b+=h,v=0,_=h;v<_&&u(f(e[p%h][a]),s,r);++v)p--,b--;p%=h,b%=h}return b<p&&(b+=h),{start:p,end:b,loop:y,style:n.style}}function vg(n,e,o){if(!o)return[n];const{property:a,start:s,end:r}=o,u=e.length,{compare:f,between:h,normalize:p}=yg(a),{start:b,end:y,loop:v,style:_}=D2(n,e,o),k=[];let C=!1,j=null,M,D,U;const z=()=>h(s,U,M)&&f(s,U)!==0,w=()=>f(r,M)===0||h(r,U,M),Y=()=>C||z(),G=()=>!C||w();for(let K=b,I=b;K<=y;++K)D=e[K%u],!D.skip&&(M=p(D[a]),M!==U&&(C=h(M,s,r),j===null&&Y()&&(j=f(M,s)===0?K:I),j!==null&&G()&&(k.push(xg({start:j,end:K,loop:v,count:u,style:_})),j=null),I=K,U=M));return j!==null&&k.push(xg({start:j,end:y,loop:v,count:u,style:_})),k}function _g(n,e){const o=[],a=n.segments;for(let s=0;s<a.length;s++){const r=vg(a[s],n.points,e);r.length&&o.push(...r)}return o}function z2(n,e,o,a){let s=0,r=e-1;if(o&&!a)for(;s<e&&!n[s].skip;)s++;for(;s<e&&n[s].skip;)s++;for(s%=e,o&&(r+=s);r>s&&n[r%e].skip;)r--;return r%=e,{start:s,end:r}}function L2(n,e,o,a){const s=n.length,r=[];let u=e,f=n[e],h;for(h=e+1;h<=o;++h){const p=n[h%s];p.skip||p.stop?f.skip||(a=!1,r.push({start:e%s,end:(h-1)%s,loop:a}),e=u=p.stop?h:null):(u=h,f.skip&&(e=h)),f=p}return u!==null&&r.push({start:e%s,end:u%s,loop:a}),r}function B2(n,e){const o=n.points,a=n.options.spanGaps,s=o.length;if(!s)return[];const r=!!n._loop,{start:u,end:f}=z2(o,s,r,a);if(a===!0)return wg(n,[{start:u,end:f,loop:r}],o,e);const h=f<u?f+s:f,p=!!n._fullLoop&&u===0&&f===s-1;return wg(n,L2(o,u,h,p),o,e)}function wg(n,e,o,a){return!a||!a.setContext||!o?e:H2(n,e,o,a)}function H2(n,e,o,a){const s=n._chart.getContext(),r=Sg(n.options),{_datasetIndex:u,options:{spanGaps:f}}=n,h=o.length,p=[];let b=r,y=e[0].start,v=y;function _(k,C,j,M){const D=f?-1:1;if(k!==C){for(k+=h;o[k%h].skip;)k-=D;for(;o[C%h].skip;)C+=D;k%h!==C%h&&(p.push({start:k%h,end:C%h,loop:j,style:M}),b=M,y=C%h)}}for(const k of e){y=f?y:k.start;let C=o[y%h],j;for(v=y+1;v<=k.end;v++){const M=o[v%h];j=Sg(a.setContext(Ni(s,{type:"segment",p0:C,p1:M,p0DataIndex:(v-1)%h,p1DataIndex:v%h,datasetIndex:u}))),U2(j,b)&&_(y,v-1,k.loop,b),C=M,b=j}y<v-1&&_(y,v-1,k.loop,b)}return p}function Sg(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function U2(n,e){if(!e)return!1;const o=[],a=function(s,r){return Ac(r)?(o.includes(r)||o.push(r),o.indexOf(r)):r};return JSON.stringify(n,a)!==JSON.stringify(e,a)}function cs(n,e,o){return n.options.clip?n[o]:e[o]}function V2(n,e){const{xScale:o,yScale:a}=n;return o&&a?{left:cs(o,e,"left"),right:cs(o,e,"right"),top:cs(a,e,"top"),bottom:cs(a,e,"bottom")}:e}function jg(n,e){const o=e._clip;if(o.disabled)return!1;const a=V2(e,n.chartArea);return{left:o.left===!1?0:a.left-(o.left===!0?0:o.left),right:o.right===!1?n.width:a.right+(o.right===!0?0:o.right),top:o.top===!1?0:a.top-(o.top===!0?0:o.top),bottom:o.bottom===!1?n.height:a.bottom+(o.bottom===!0?0:o.bottom)}}/*!
 * Chart.js v4.5.1
 * https://www.chartjs.org
 * (c) 2025 Chart.js Contributors
 * Released under the MIT License
 */class P2{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,o,a,s){const r=o.listeners[s],u=o.duration;r.forEach(f=>f({chart:e,initial:o.initial,numSteps:u,currentStep:Math.min(a-o.start,u)}))}_refresh(){this._request||(this._running=!0,this._request=Qh.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let o=0;this._charts.forEach((a,s)=>{if(!a.running||!a.items.length)return;const r=a.items;let u=r.length-1,f=!1,h;for(;u>=0;--u)h=r[u],h._active?(h._total>a.duration&&(a.duration=h._total),h.tick(e),f=!0):(r[u]=r[r.length-1],r.pop());f&&(s.draw(),this._notify(s,a,e,"progress")),r.length||(a.running=!1,this._notify(s,a,e,"complete"),a.initial=!1),o+=r.length}),this._lastDate=e,o===0&&(this._running=!1)}_getAnims(e){const o=this._charts;let a=o.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},o.set(e,a)),a}listen(e,o,a){this._getAnims(e).listeners[o].push(a)}add(e,o){!o||!o.length||this._getAnims(e).items.push(...o)}has(e){return this._getAnims(e).items.length>0}start(e){const o=this._charts.get(e);o&&(o.running=!0,o.start=Date.now(),o.duration=o.items.reduce((a,s)=>Math.max(a,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const o=this._charts.get(e);return!(!o||!o.running||!o.items.length)}stop(e){const o=this._charts.get(e);if(!o||!o.items.length)return;const a=o.items;let s=a.length-1;for(;s>=0;--s)a[s].cancel();o.items=[],this._notify(e,o,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Mn=new P2;const kg="transparent",Y2={boolean(n,e,o){return o>.5?e:n},color(n,e,o){const a=eg(n||kg),s=a.valid&&eg(e||kg);return s&&s.valid?s.mix(a,o).hexString():e},number(n,e,o){return n+(e-n)*o}};class q2{constructor(e,o,a,s){const r=o[a];s=as([e.to,s,r,e.from]);const u=as([e.from,r,s]);this._active=!0,this._fn=e.fn||Y2[e.type||typeof u],this._easing=ba[e.easing]||ba.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=o,this._prop=a,this._from=u,this._to=s,this._promises=void 0}active(){return this._active}update(e,o,a){if(this._active){this._notify(!1);const s=this._target[this._prop],r=a-this._start,u=this._duration-r;this._start=a,this._duration=Math.floor(Math.max(u,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=as([e.to,o,s,e.from]),this._from=as([e.from,s,o])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const o=e-this._start,a=this._duration,s=this._prop,r=this._from,u=this._loop,f=this._to;let h;if(this._active=r!==f&&(u||o<a),!this._active){this._target[s]=f,this._notify(!0);return}if(o<0){this._target[s]=r;return}h=o/a%2,h=u&&h>1?2-h:h,h=this._easing(Math.min(1,Math.max(0,h))),this._target[s]=this._fn(r,f,h)}wait(){const e=this._promises||(this._promises=[]);return new Promise((o,a)=>{e.push({res:o,rej:a})})}_notify(e){const o=e?"res":"rej",a=this._promises||[];for(let s=0;s<a.length;s++)a[s][o]()}}class Cg{constructor(e,o){this._chart=e,this._properties=new Map,this.configure(o)}configure(e){if(!kt(e))return;const o=Object.keys(Kt.animation),a=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const r=e[s];if(!kt(r))return;const u={};for(const f of o)u[f]=r[f];(ie(r.properties)&&r.properties||[s]).forEach(f=>{(f===s||!a.has(f))&&a.set(f,u)})})}_animateOptions(e,o){const a=o.options,s=X2(e,a);if(!s)return[];const r=this._createAnimations(s,a);return a.$shared&&F2(e.options.$animations,a).then(()=>{e.options=a},()=>{}),r}_createAnimations(e,o){const a=this._properties,s=[],r=e.$animations||(e.$animations={}),u=Object.keys(o),f=Date.now();let h;for(h=u.length-1;h>=0;--h){const p=u[h];if(p.charAt(0)==="$")continue;if(p==="options"){s.push(...this._animateOptions(e,o));continue}const b=o[p];let y=r[p];const v=a.get(p);if(y)if(v&&y.active()){y.update(v,b,f);continue}else y.cancel();if(!v||!v.duration){e[p]=b;continue}r[p]=y=new q2(v,e,p,b),s.push(y)}return s}update(e,o){if(this._properties.size===0){Object.assign(e,o);return}const a=this._createAnimations(e,o);if(a.length)return Mn.add(this._chart,a),!0}}function F2(n,e){const o=[],a=Object.keys(e);for(let s=0;s<a.length;s++){const r=n[a[s]];r&&r.active()&&o.push(r.wait())}return Promise.all(o)}function X2(n,e){if(!e)return;let o=n.options;if(!o){n.options=e;return}return o.$shared&&(n.options=o=Object.assign({},o,{$shared:!1,$animations:{}})),o}function Eg(n,e){const o=n&&n.options||{},a=o.reverse,s=o.min===void 0?e:0,r=o.max===void 0?e:0;return{start:a?r:s,end:a?s:r}}function G2(n,e,o){if(o===!1)return!1;const a=Eg(n,o),s=Eg(e,o);return{top:s.end,right:a.end,bottom:s.start,left:a.start}}function K2(n){let e,o,a,s;return kt(n)?(e=n.top,o=n.right,a=n.bottom,s=n.left):e=o=a=s=n,{top:e,right:o,bottom:a,left:s,disabled:n===!1}}function Mg(n,e){const o=[],a=n._getSortedDatasetMetas(e);let s,r;for(s=0,r=a.length;s<r;++s)o.push(a[s].index);return o}function Tg(n,e,o,a={}){const s=n.keys,r=a.mode==="single";let u,f,h,p;if(e===null)return;let b=!1;for(u=0,f=s.length;u<f;++u){if(h=+s[u],h===o){if(b=!0,a.all)continue;break}p=n.values[h],de(p)&&(r||e===0||ao(e)===ao(p))&&(e+=p)}return!b&&!a.all?0:e}function W2(n,e){const{iScale:o,vScale:a}=e,s=o.axis==="x"?"x":"y",r=a.axis==="x"?"x":"y",u=Object.keys(n),f=new Array(u.length);let h,p,b;for(h=0,p=u.length;h<p;++h)b=u[h],f[h]={[s]:b,[r]:n[b]};return f}function qc(n,e){const o=n&&n.options.stacked;return o||o===void 0&&e.stack!==void 0}function $2(n,e,o){return`${n.id}.${e.id}.${o.stack||o.type}`}function Q2(n){const{min:e,max:o,minDefined:a,maxDefined:s}=n.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:s?o:Number.POSITIVE_INFINITY}}function Z2(n,e,o){const a=n[e]||(n[e]={});return a[o]||(a[o]={})}function Ag(n,e,o,a){for(const s of e.getMatchingVisibleMetas(a).reverse()){const r=n[s.index];if(o&&r>0||!o&&r<0)return s.index}return null}function Ng(n,e){const{chart:o,_cachedMeta:a}=n,s=o._stacks||(o._stacks={}),{iScale:r,vScale:u,index:f}=a,h=r.axis,p=u.axis,b=$2(r,u,a),y=e.length;let v;for(let _=0;_<y;++_){const k=e[_],{[h]:C,[p]:j}=k,M=k._stacks||(k._stacks={});v=M[p]=Z2(s,b,C),v[f]=j,v._top=Ag(v,u,!0,a.type),v._bottom=Ag(v,u,!1,a.type);const D=v._visualValues||(v._visualValues={});D[f]=j}}function Fc(n,e){const o=n.scales;return Object.keys(o).filter(a=>o[a].axis===e).shift()}function I2(n,e){return Ni(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function J2(n,e,o){return Ni(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:o,index:e,mode:"default",type:"data"})}function _a(n,e){const o=n.controller.index,a=n.vScale&&n.vScale.axis;if(a){e=e||n._parsed;for(const s of e){const r=s._stacks;if(!r||r[a]===void 0||r[a][o]===void 0)return;delete r[a][o],r[a]._visualValues!==void 0&&r[a]._visualValues[o]!==void 0&&delete r[a]._visualValues[o]}}}const Xc=n=>n==="reset"||n==="none",Og=(n,e)=>e?n:Object.assign({},n),tw=(n,e,o)=>n&&!e.hidden&&e._stacked&&{keys:Mg(o,!0),values:null};class Gc{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,o){this.chart=e,this._ctx=e.ctx,this.index=o,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=qc(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&_a(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,o=this._cachedMeta,a=this.getDataset(),s=(y,v,_,k)=>y==="x"?v:y==="r"?k:_,r=o.xAxisID=_t(a.xAxisID,Fc(e,"x")),u=o.yAxisID=_t(a.yAxisID,Fc(e,"y")),f=o.rAxisID=_t(a.rAxisID,Fc(e,"r")),h=o.indexAxis,p=o.iAxisID=s(h,r,u,f),b=o.vAxisID=s(h,u,r,f);o.xScale=this.getScaleForId(r),o.yScale=this.getScaleForId(u),o.rScale=this.getScaleForId(f),o.iScale=this.getScaleForId(p),o.vScale=this.getScaleForId(b)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const o=this._cachedMeta;return e===o.iScale?o.vScale:o.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&$h(this._data,this),e._stacked&&_a(e)}_dataCheck(){const e=this.getDataset(),o=e.data||(e.data=[]),a=this._data;if(kt(o)){const s=this._cachedMeta;this._data=W2(o,s)}else if(a!==o){if(a){$h(a,this);const s=this._cachedMeta;_a(s),s._parsed=[]}o&&Object.isExtensible(o)&&D_(o,this),this._syncList=[],this._data=o}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const o=this._cachedMeta,a=this.getDataset();let s=!1;this._dataCheck();const r=o._stacked;o._stacked=qc(o.vScale,o),o.stack!==a.stack&&(s=!0,_a(o),o.stack=a.stack),this._resyncElements(e),(s||r!==o._stacked)&&(Ng(this,o._parsed),o._stacked=qc(o.vScale,o))}configure(){const e=this.chart.config,o=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),o,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,o){const{_cachedMeta:a,_data:s}=this,{iScale:r,_stacked:u}=a,f=r.axis;let h=e===0&&o===s.length?!0:a._sorted,p=e>0&&a._parsed[e-1],b,y,v;if(this._parsing===!1)a._parsed=s,a._sorted=!0,v=s;else{ie(s[e])?v=this.parseArrayData(a,s,e,o):kt(s[e])?v=this.parseObjectData(a,s,e,o):v=this.parsePrimitiveData(a,s,e,o);const _=()=>y[f]===null||p&&y[f]<p[f];for(b=0;b<o;++b)a._parsed[b+e]=y=v[b],h&&(_()&&(h=!1),p=y);a._sorted=h}u&&Ng(this,v)}parsePrimitiveData(e,o,a,s){const{iScale:r,vScale:u}=e,f=r.axis,h=u.axis,p=r.getLabels(),b=r===u,y=new Array(s);let v,_,k;for(v=0,_=s;v<_;++v)k=v+a,y[v]={[f]:b||r.parse(p[k],k),[h]:u.parse(o[k],k)};return y}parseArrayData(e,o,a,s){const{xScale:r,yScale:u}=e,f=new Array(s);let h,p,b,y;for(h=0,p=s;h<p;++h)b=h+a,y=o[b],f[h]={x:r.parse(y[0],b),y:u.parse(y[1],b)};return f}parseObjectData(e,o,a,s){const{xScale:r,yScale:u}=e,{xAxisKey:f="x",yAxisKey:h="y"}=this._parsing,p=new Array(s);let b,y,v,_;for(b=0,y=s;b<y;++b)v=b+a,_=o[v],p[b]={x:r.parse(ha(_,f),v),y:u.parse(ha(_,h),v)};return p}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,o,a){const s=this.chart,r=this._cachedMeta,u=o[e.axis],f={keys:Mg(s,!0),values:o._stacks[e.axis]._visualValues};return Tg(f,u,r.index,{mode:a})}updateRangeFromParsed(e,o,a,s){const r=a[o.axis];let u=r===null?NaN:r;const f=s&&a._stacks[o.axis];s&&f&&(s.values=f,u=Tg(s,r,this._cachedMeta.index)),e.min=Math.min(e.min,u),e.max=Math.max(e.max,u)}getMinMax(e,o){const a=this._cachedMeta,s=a._parsed,r=a._sorted&&e===a.iScale,u=s.length,f=this._getOtherScale(e),h=tw(o,a,this.chart),p={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:b,max:y}=Q2(f);let v,_;function k(){_=s[v];const C=_[f.axis];return!de(_[e.axis])||b>C||y<C}for(v=0;v<u&&!(!k()&&(this.updateRangeFromParsed(p,e,_,h),r));++v);if(r){for(v=u-1;v>=0;--v)if(!k()){this.updateRangeFromParsed(p,e,_,h);break}}return p}getAllParsedValues(e){const o=this._cachedMeta._parsed,a=[];let s,r,u;for(s=0,r=o.length;s<r;++s)u=o[s][e.axis],de(u)&&a.push(u);return a}getMaxOverflow(){return!1}getLabelAndValue(e){const o=this._cachedMeta,a=o.iScale,s=o.vScale,r=this.getParsed(e);return{label:a?""+a.getLabelForValue(r[a.axis]):"",value:s?""+s.getLabelForValue(r[s.axis]):""}}_update(e){const o=this._cachedMeta;this.update(e||"default"),o._clip=K2(_t(this.options.clip,G2(o.xScale,o.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,o=this.chart,a=this._cachedMeta,s=a.data||[],r=o.chartArea,u=[],f=this._drawStart||0,h=this._drawCount||s.length-f,p=this.options.drawActiveElementsOnTop;let b;for(a.dataset&&a.dataset.draw(e,r,f,h),b=f;b<f+h;++b){const y=s[b];y.hidden||(y.active&&p?u.push(y):y.draw(e,r))}for(b=0;b<u.length;++b)u[b].draw(e,r)}getStyle(e,o){const a=o?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(e||0,a)}getContext(e,o,a){const s=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const u=this._cachedMeta.data[e];r=u.$context||(u.$context=J2(this.getContext(),e,u)),r.parsed=this.getParsed(e),r.raw=s.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=I2(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!o,r.mode=a,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,o){return this._resolveElementOptions(this.dataElementType.id,o,e)}_resolveElementOptions(e,o="default",a){const s=o==="active",r=this._cachedDataOpts,u=e+"-"+o,f=r[u],h=this.enableOptionSharing&&Jl(a);if(f)return Og(f,h);const p=this.chart.config,b=p.datasetElementScopeKeys(this._type,e),y=s?[`${e}Hover`,"hover",e,""]:[e,""],v=p.getOptionScopes(this.getDataset(),b),_=Object.keys(Kt.elements[e]),k=()=>this.getContext(a,s,o),C=p.resolveNamedOptions(v,_,k,y);return C.$shared&&(C.$shared=h,r[u]=Object.freeze(Og(C,h))),C}_resolveAnimations(e,o,a){const s=this.chart,r=this._cachedDataOpts,u=`animation-${o}`,f=r[u];if(f)return f;let h;if(s.options.animation!==!1){const b=this.chart.config,y=b.datasetAnimationScopeKeys(this._type,o),v=b.getOptionScopes(this.getDataset(),y);h=b.createResolver(v,this.getContext(e,a,o))}const p=new Cg(s,h&&h.animations);return h&&h._cacheable&&(r[u]=Object.freeze(p)),p}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,o){return!o||Xc(e)||this.chart._animationsDisabled}_getSharedOptions(e,o){const a=this.resolveDataElementOptions(e,o),s=this._sharedOptions,r=this.getSharedOptions(a),u=this.includeOptions(o,r)||r!==s;return this.updateSharedOptions(r,o,a),{sharedOptions:r,includeOptions:u}}updateElement(e,o,a,s){Xc(s)?Object.assign(e,a):this._resolveAnimations(o,s).update(e,a)}updateSharedOptions(e,o,a){e&&!Xc(o)&&this._resolveAnimations(void 0,o).update(e,a)}_setStyle(e,o,a,s){e.active=s;const r=this.getStyle(o,s);this._resolveAnimations(o,a,s).update(e,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(e,o,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,o,a){this._setStyle(e,a,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const o=this._data,a=this._cachedMeta.data;for(const[f,h,p]of this._syncList)this[f](h,p);this._syncList=[];const s=a.length,r=o.length,u=Math.min(r,s);u&&this.parse(0,u),r>s?this._insertElements(s,r-s,e):r<s&&this._removeElements(r,s-r)}_insertElements(e,o,a=!0){const s=this._cachedMeta,r=s.data,u=e+o;let f;const h=p=>{for(p.length+=o,f=p.length-1;f>=u;f--)p[f]=p[f-o]};for(h(r),f=e;f<u;++f)r[f]=new this.dataElementType;this._parsing&&h(s._parsed),this.parse(e,o),a&&this.updateElements(r,e,o,"reset")}updateElements(e,o,a,s){}_removeElements(e,o){const a=this._cachedMeta;if(this._parsing){const s=a._parsed.splice(e,o);a._stacked&&_a(a,s)}a.data.splice(e,o)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[o,a,s]=e;this[o](a,s)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,o){o&&this._sync(["_removeElements",e,o]);const a=arguments.length-2;a&&this._sync(["_insertElements",e,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function ew(n,e,o){let a=1,s=1,r=0,u=0;if(e<qt){const f=n,h=f+e,p=Math.cos(f),b=Math.sin(f),y=Math.cos(h),v=Math.sin(h),_=(U,z,w)=>ma(U,f,h,!0)?1:Math.max(z,z*o,w,w*o),k=(U,z,w)=>ma(U,f,h,!0)?-1:Math.min(z,z*o,w,w*o),C=_(0,p,y),j=_(te,b,v),M=k(zt,p,y),D=k(zt+te,b,v);a=(C-M)/2,s=(j-D)/2,r=-(C+M)/2,u=-(j+D)/2}return{ratioX:a,ratioY:s,offsetX:r,offsetY:u}}class nw extends Gc{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const o=e.data,{labels:{pointStyle:a,textAlign:s,color:r,useBorderRadius:u,borderRadius:f}}=e.legend.options;return o.labels.length&&o.datasets.length?o.labels.map((h,p)=>{const y=e.getDatasetMeta(0).controller.getStyle(p);return{text:h,fillStyle:y.backgroundColor,fontColor:r,hidden:!e.getDataVisibility(p),lineDash:y.borderDash,lineDashOffset:y.borderDashOffset,lineJoin:y.borderJoinStyle,lineWidth:y.borderWidth,strokeStyle:y.borderColor,textAlign:s,pointStyle:a,borderRadius:u&&(f||y.borderRadius),index:p}}):[]}},onClick(e,o,a){a.chart.toggleDataVisibility(o.index),a.chart.update()}}}};constructor(e,o){super(e,o),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,o){const a=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=a;else{let r=h=>+a[h];if(kt(a[e])){const{key:h="value"}=this._parsing;r=p=>+ha(a[p],h)}let u,f;for(u=e,f=e+o;u<f;++u)s._parsed[u]=r(u)}}_getRotation(){return En(this.options.rotation-90)}_getCircumference(){return En(this.options.circumference)}_getRotationExtents(){let e=qt,o=-qt;for(let a=0;a<this.chart.data.datasets.length;++a)if(this.chart.isDatasetVisible(a)&&this.chart.getDatasetMeta(a).type===this._type){const s=this.chart.getDatasetMeta(a).controller,r=s._getRotation(),u=s._getCircumference();e=Math.min(e,r),o=Math.max(o,r+u)}return{rotation:e,circumference:o-e}}update(e){const o=this.chart,{chartArea:a}=o,s=this._cachedMeta,r=s.data,u=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,f=Math.max((Math.min(a.width,a.height)-u)/2,0),h=Math.min(b_(this.options.cutout,f),1),p=this._getRingWeight(this.index),{circumference:b,rotation:y}=this._getRotationExtents(),{ratioX:v,ratioY:_,offsetX:k,offsetY:C}=ew(y,b,h),j=(a.width-u)/v,M=(a.height-u)/_,D=Math.max(Math.min(j,M)/2,0),U=Uh(this.options.radius,D),z=Math.max(U*h,0),w=(U-z)/this._getVisibleDatasetWeightTotal();this.offsetX=k*U,this.offsetY=C*U,s.total=this.calculateTotal(),this.outerRadius=U-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*p,0),this.updateElements(r,0,r.length,e)}_circumference(e,o){const a=this.options,s=this._cachedMeta,r=this._getCircumference();return o&&a.animation.animateRotate||!this.chart.getDataVisibility(e)||s._parsed[e]===null||s.data[e].hidden?0:this.calculateCircumference(s._parsed[e]*r/qt)}updateElements(e,o,a,s){const r=s==="reset",u=this.chart,f=u.chartArea,p=u.options.animation,b=(f.left+f.right)/2,y=(f.top+f.bottom)/2,v=r&&p.animateScale,_=v?0:this.innerRadius,k=v?0:this.outerRadius,{sharedOptions:C,includeOptions:j}=this._getSharedOptions(o,s);let M=this._getRotation(),D;for(D=0;D<o;++D)M+=this._circumference(D,r);for(D=o;D<o+a;++D){const U=this._circumference(D,r),z=e[D],w={x:b+this.offsetX,y:y+this.offsetY,startAngle:M,endAngle:M+U,circumference:U,outerRadius:k,innerRadius:_};j&&(w.options=C||this.resolveDataElementOptions(D,z.active?"active":s)),M+=U,this.updateElement(z,D,w,s)}}calculateTotal(){const e=this._cachedMeta,o=e.data;let a=0,s;for(s=0;s<o.length;s++){const r=e._parsed[s];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(s)&&!o[s].hidden&&(a+=Math.abs(r))}return a}calculateCircumference(e){const o=this._cachedMeta.total;return o>0&&!isNaN(e)?qt*(Math.abs(e)/o):0}getLabelAndValue(e){const o=this._cachedMeta,a=this.chart,s=a.data.labels||[],r=Oc(o._parsed[e],a.options.locale);return{label:s[e]||"",value:r}}getMaxBorderWidth(e){let o=0;const a=this.chart;let s,r,u,f,h;if(!e){for(s=0,r=a.data.datasets.length;s<r;++s)if(a.isDatasetVisible(s)){u=a.getDatasetMeta(s),e=u.data,f=u.controller;break}}if(!e)return 0;for(s=0,r=e.length;s<r;++s)h=f.resolveDataElementOptions(s),h.borderAlign!=="inner"&&(o=Math.max(o,h.borderWidth||0,h.hoverBorderWidth||0));return o}getMaxOffset(e){let o=0;for(let a=0,s=e.length;a<s;++a){const r=this.resolveDataElementOptions(a);o=Math.max(o,r.offset||0,r.hoverOffset||0)}return o}_getRingWeightOffset(e){let o=0;for(let a=0;a<e;++a)this.chart.isDatasetVisible(a)&&(o+=this._getRingWeight(a));return o}_getRingWeight(e){return Math.max(_t(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class iw extends Gc{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const o=this._cachedMeta,{dataset:a,data:s=[],_dataset:r}=o,u=this.chart._animationsDisabled;let{start:f,count:h}=H_(o,s,u);this._drawStart=f,this._drawCount=h,U_(o)&&(f=0,h=s.length),a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!r._decimated,a.points=s;const p=this.resolveDatasetElementOptions(e);this.options.showLine||(p.borderWidth=0),p.segment=this.options.segment,this.updateElement(a,void 0,{animated:!u,options:p},e),this.updateElements(s,f,h,e)}updateElements(e,o,a,s){const r=s==="reset",{iScale:u,vScale:f,_stacked:h,_dataset:p}=this._cachedMeta,{sharedOptions:b,includeOptions:y}=this._getSharedOptions(o,s),v=u.axis,_=f.axis,{spanGaps:k,segment:C}=this.options,j=pa(k)?k:Number.POSITIVE_INFINITY,M=this.chart._animationsDisabled||r||s==="none",D=o+a,U=e.length;let z=o>0&&this.getParsed(o-1);for(let w=0;w<U;++w){const Y=e[w],G=M?Y:{};if(w<o||w>=D){G.skip=!0;continue}const K=this.getParsed(w),I=Bt(K[_]),J=G[v]=u.getPixelForValue(K[v],w),ot=G[_]=r||I?f.getBasePixel():f.getPixelForValue(h?this.applyStack(f,K,h):K[_],w);G.skip=isNaN(J)||isNaN(ot)||I,G.stop=w>0&&Math.abs(K[v]-z[v])>j,C&&(G.parsed=K,G.raw=p.data[w]),y&&(G.options=b||this.resolveDataElementOptions(w,Y.active?"active":s)),M||this.updateElement(Y,w,G,s),z=K}}getMaxOverflow(){const e=this._cachedMeta,o=e.dataset,a=o.options&&o.options.borderWidth||0,s=e.data||[];if(!s.length)return a;const r=s[0].size(this.resolveDataElementOptions(0)),u=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(a,r,u)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function zi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kc{static override(e){Object.assign(Kc.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return zi()}parse(){return zi()}format(){return zi()}add(){return zi()}diff(){return zi()}startOf(){return zi()}endOf(){return zi()}}var ow={_date:Kc};function aw(n,e,o,a){const{controller:s,data:r,_sorted:u}=n,f=s._cachedMeta.iScale,h=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(f&&e===f.axis&&e!=="r"&&u&&r.length){const p=f._reversePixels?O_:Mi;if(a){if(s._sharedOptions){const b=r[0],y=typeof b.getRange=="function"&&b.getRange(e);if(y){const v=p(r,e,o-y),_=p(r,e,o+y);return{lo:v.lo,hi:_.hi}}}}else{const b=p(r,e,o);if(h){const{vScale:y}=s._cachedMeta,{_parsed:v}=n,_=v.slice(0,b.lo+1).reverse().findIndex(C=>!Bt(C[y.axis]));b.lo-=Math.max(0,_);const k=v.slice(b.hi).findIndex(C=>!Bt(C[y.axis]));b.hi+=Math.max(0,k)}return b}}return{lo:0,hi:r.length-1}}function us(n,e,o,a,s){const r=n.getSortedVisibleDatasetMetas(),u=o[e];for(let f=0,h=r.length;f<h;++f){const{index:p,data:b}=r[f],{lo:y,hi:v}=aw(r[f],e,u,s);for(let _=y;_<=v;++_){const k=b[_];k.skip||a(k,p,_)}}}function lw(n){const e=n.indexOf("x")!==-1,o=n.indexOf("y")!==-1;return function(a,s){const r=e?Math.abs(a.x-s.x):0,u=o?Math.abs(a.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(u,2))}}function Wc(n,e,o,a,s){const r=[];return!s&&!n.isPointInArea(e)||us(n,o,e,function(f,h,p){!s&&!xa(f,n.chartArea,0)||f.inRange(e.x,e.y,a)&&r.push({element:f,datasetIndex:h,index:p})},!0),r}function sw(n,e,o,a){let s=[];function r(u,f,h){const{startAngle:p,endAngle:b}=u.getProps(["startAngle","endAngle"],a),{angle:y}=Kh(u,{x:e.x,y:e.y});ma(y,p,b)&&s.push({element:u,datasetIndex:f,index:h})}return us(n,o,e,r),s}function rw(n,e,o,a,s,r){let u=[];const f=lw(o);let h=Number.POSITIVE_INFINITY;function p(b,y,v){const _=b.inRange(e.x,e.y,s);if(a&&!_)return;const k=b.getCenterPoint(s);if(!(!!r||n.isPointInArea(k))&&!_)return;const j=f(e,k);j<h?(u=[{element:b,datasetIndex:y,index:v}],h=j):j===h&&u.push({element:b,datasetIndex:y,index:v})}return us(n,o,e,p),u}function $c(n,e,o,a,s,r){return!r&&!n.isPointInArea(e)?[]:o==="r"&&!a?sw(n,e,o,s):rw(n,e,o,a,s,r)}function Rg(n,e,o,a,s){const r=[],u=o==="x"?"inXRange":"inYRange";let f=!1;return us(n,o,e,(h,p,b)=>{h[u]&&h[u](e[o],s)&&(r.push({element:h,datasetIndex:p,index:b}),f=f||h.inRange(e.x,e.y,s))}),a&&!f?[]:r}var cw={modes:{index(n,e,o,a){const s=Ri(e,n),r=o.axis||"x",u=o.includeInvisible||!1,f=o.intersect?Wc(n,s,r,a,u):$c(n,s,r,!1,a,u),h=[];return f.length?(n.getSortedVisibleDatasetMetas().forEach(p=>{const b=f[0].index,y=p.data[b];y&&!y.skip&&h.push({element:y,datasetIndex:p.index,index:b})}),h):[]},dataset(n,e,o,a){const s=Ri(e,n),r=o.axis||"xy",u=o.includeInvisible||!1;let f=o.intersect?Wc(n,s,r,a,u):$c(n,s,r,!1,a,u);if(f.length>0){const h=f[0].datasetIndex,p=n.getDatasetMeta(h).data;f=[];for(let b=0;b<p.length;++b)f.push({element:p[b],datasetIndex:h,index:b})}return f},point(n,e,o,a){const s=Ri(e,n),r=o.axis||"xy",u=o.includeInvisible||!1;return Wc(n,s,r,a,u)},nearest(n,e,o,a){const s=Ri(e,n),r=o.axis||"xy",u=o.includeInvisible||!1;return $c(n,s,r,o.intersect,a,u)},x(n,e,o,a){const s=Ri(e,n);return Rg(n,s,"x",o.intersect,a)},y(n,e,o,a){const s=Ri(e,n);return Rg(n,s,"y",o.intersect,a)}}};const Dg=["left","top","right","bottom"];function wa(n,e){return n.filter(o=>o.pos===e)}function zg(n,e){return n.filter(o=>Dg.indexOf(o.pos)===-1&&o.box.axis===e)}function Sa(n,e){return n.sort((o,a)=>{const s=e?a:o,r=e?o:a;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function uw(n){const e=[];let o,a,s,r,u,f;for(o=0,a=(n||[]).length;o<a;++o)s=n[o],{position:r,options:{stack:u,stackWeight:f=1}}=s,e.push({index:o,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:u&&r+u,stackWeight:f});return e}function fw(n){const e={};for(const o of n){const{stack:a,pos:s,stackWeight:r}=o;if(!a||!Dg.includes(s))continue;const u=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});u.count++,u.weight+=r}return e}function dw(n,e){const o=fw(n),{vBoxMaxWidth:a,hBoxMaxHeight:s}=e;let r,u,f;for(r=0,u=n.length;r<u;++r){f=n[r];const{fullSize:h}=f.box,p=o[f.stack],b=p&&f.stackWeight/p.weight;f.horizontal?(f.width=b?b*a:h&&e.availableWidth,f.height=s):(f.width=a,f.height=b?b*s:h&&e.availableHeight)}return o}function hw(n){const e=uw(n),o=Sa(e.filter(p=>p.box.fullSize),!0),a=Sa(wa(e,"left"),!0),s=Sa(wa(e,"right")),r=Sa(wa(e,"top"),!0),u=Sa(wa(e,"bottom")),f=zg(e,"x"),h=zg(e,"y");return{fullSize:o,leftAndTop:a.concat(r),rightAndBottom:s.concat(h).concat(u).concat(f),chartArea:wa(e,"chartArea"),vertical:a.concat(s).concat(h),horizontal:r.concat(u).concat(f)}}function Lg(n,e,o,a){return Math.max(n[o],e[o])+Math.max(n[a],e[a])}function Bg(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function gw(n,e,o,a){const{pos:s,box:r}=o,u=n.maxPadding;if(!kt(s)){o.size&&(n[s]-=o.size);const y=a[o.stack]||{size:0,count:1};y.size=Math.max(y.size,o.horizontal?r.height:r.width),o.size=y.size/y.count,n[s]+=o.size}r.getPadding&&Bg(u,r.getPadding());const f=Math.max(0,e.outerWidth-Lg(u,n,"left","right")),h=Math.max(0,e.outerHeight-Lg(u,n,"top","bottom")),p=f!==n.w,b=h!==n.h;return n.w=f,n.h=h,o.horizontal?{same:p,other:b}:{same:b,other:p}}function pw(n){const e=n.maxPadding;function o(a){const s=Math.max(e[a]-n[a],0);return n[a]+=s,s}n.y+=o("top"),n.x+=o("left"),o("right"),o("bottom")}function mw(n,e){const o=e.maxPadding;function a(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(u=>{r[u]=Math.max(e[u],o[u])}),r}return a(n?["left","right"]:["top","bottom"])}function ja(n,e,o,a){const s=[];let r,u,f,h,p,b;for(r=0,u=n.length,p=0;r<u;++r){f=n[r],h=f.box,h.update(f.width||e.w,f.height||e.h,mw(f.horizontal,e));const{same:y,other:v}=gw(e,o,f,a);p|=y&&s.length,b=b||v,h.fullSize||s.push(f)}return p&&ja(s,e,o,a)||b}function fs(n,e,o,a,s){n.top=o,n.left=e,n.right=e+a,n.bottom=o+s,n.width=a,n.height=s}function Hg(n,e,o,a){const s=o.padding;let{x:r,y:u}=e;for(const f of n){const h=f.box,p=a[f.stack]||{placed:0,weight:1},b=f.stackWeight/p.weight||1;if(f.horizontal){const y=e.w*b,v=p.size||h.height;Jl(p.start)&&(u=p.start),h.fullSize?fs(h,s.left,u,o.outerWidth-s.right-s.left,v):fs(h,e.left+p.placed,u,y,v),p.start=u,p.placed+=y,u=h.bottom}else{const y=e.h*b,v=p.size||h.width;Jl(p.start)&&(r=p.start),h.fullSize?fs(h,r,s.top,v,o.outerHeight-s.bottom-s.top):fs(h,r,e.top+p.placed,v,y),p.start=r,p.placed+=y,r=h.right}}e.x=r,e.y=u}var Zn={addBox(n,e){n.boxes||(n.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(o){e.draw(o)}}]},n.boxes.push(e)},removeBox(n,e){const o=n.boxes?n.boxes.indexOf(e):-1;o!==-1&&n.boxes.splice(o,1)},configure(n,e,o){e.fullSize=o.fullSize,e.position=o.position,e.weight=o.weight},update(n,e,o,a){if(!n)return;const s=cn(n.options.layout.padding),r=Math.max(e-s.width,0),u=Math.max(o-s.height,0),f=hw(n.boxes),h=f.vertical,p=f.horizontal;Tt(n.boxes,C=>{typeof C.beforeLayout=="function"&&C.beforeLayout()});const b=h.reduce((C,j)=>j.box.options&&j.box.options.display===!1?C:C+1,0)||1,y=Object.freeze({outerWidth:e,outerHeight:o,padding:s,availableWidth:r,availableHeight:u,vBoxMaxWidth:r/2/b,hBoxMaxHeight:u/2}),v=Object.assign({},s);Bg(v,cn(a));const _=Object.assign({maxPadding:v,w:r,h:u,x:s.left,y:s.top},s),k=dw(h.concat(p),y);ja(f.fullSize,_,y,k),ja(h,_,y,k),ja(p,_,y,k)&&ja(h,_,y,k),pw(_),Hg(f.leftAndTop,_,y,k),_.x+=_.w,_.y+=_.h,Hg(f.rightAndBottom,_,y,k),n.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h,height:_.h,width:_.w},Tt(f.chartArea,C=>{const j=C.box;Object.assign(j,n.chartArea),j.update(_.w,_.h,{left:0,top:0,right:0,bottom:0})})}};class Ug{acquireContext(e,o){}releaseContext(e){return!1}addEventListener(e,o,a){}removeEventListener(e,o,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,o,a,s){return o=Math.max(0,o||e.width),a=a||e.height,{width:o,height:Math.max(0,s?Math.floor(o/s):a)}}isAttached(e){return!0}updateConfig(e){}}class bw extends Ug{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ds="$chartjs",yw={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vg=n=>n===null||n==="";function xw(n,e){const o=n.style,a=n.getAttribute("height"),s=n.getAttribute("width");if(n[ds]={initial:{height:a,width:s,style:{display:o.display,height:o.height,width:o.width}}},o.display=o.display||"block",o.boxSizing=o.boxSizing||"border-box",Vg(s)){const r=pg(n,"width");r!==void 0&&(n.width=r)}if(Vg(a))if(n.style.height==="")n.height=n.width/(e||2);else{const r=pg(n,"height");r!==void 0&&(n.height=r)}return n}const Pg=T2?{passive:!0}:!1;function vw(n,e,o){n&&n.addEventListener(e,o,Pg)}function _w(n,e,o){n&&n.canvas&&n.canvas.removeEventListener(e,o,Pg)}function ww(n,e){const o=yw[n.type]||n.type,{x:a,y:s}=Ri(n,e);return{type:o,chart:e,native:n,x:a!==void 0?a:null,y:s!==void 0?s:null}}function hs(n,e){for(const o of n)if(o===e||o.contains(e))return!0}function Sw(n,e,o){const a=n.canvas,s=new MutationObserver(r=>{let u=!1;for(const f of r)u=u||hs(f.addedNodes,a),u=u&&!hs(f.removedNodes,a);u&&o()});return s.observe(document,{childList:!0,subtree:!0}),s}function jw(n,e,o){const a=n.canvas,s=new MutationObserver(r=>{let u=!1;for(const f of r)u=u||hs(f.removedNodes,a),u=u&&!hs(f.addedNodes,a);u&&o()});return s.observe(document,{childList:!0,subtree:!0}),s}const ka=new Map;let Yg=0;function qg(){const n=window.devicePixelRatio;n!==Yg&&(Yg=n,ka.forEach((e,o)=>{o.currentDevicePixelRatio!==n&&e()}))}function kw(n,e){ka.size||window.addEventListener("resize",qg),ka.set(n,e)}function Cw(n){ka.delete(n),ka.size||window.removeEventListener("resize",qg)}function Ew(n,e,o){const a=n.canvas,s=a&&Yc(a);if(!s)return;const r=Zh((f,h)=>{const p=s.clientWidth;o(f,h),p<s.clientWidth&&o()},window),u=new ResizeObserver(f=>{const h=f[0],p=h.contentRect.width,b=h.contentRect.height;p===0&&b===0||r(p,b)});return u.observe(s),kw(n,r),u}function Qc(n,e,o){o&&o.disconnect(),e==="resize"&&Cw(n)}function Mw(n,e,o){const a=n.canvas,s=Zh(r=>{n.ctx!==null&&o(ww(r,n))},n);return vw(a,e,s),s}class Tw extends Ug{acquireContext(e,o){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(xw(e,o),a):null}releaseContext(e){const o=e.canvas;if(!o[ds])return!1;const a=o[ds].initial;["height","width"].forEach(r=>{const u=a[r];Bt(u)?o.removeAttribute(r):o.setAttribute(r,u)});const s=a.style||{};return Object.keys(s).forEach(r=>{o.style[r]=s[r]}),o.width=o.width,delete o[ds],!0}addEventListener(e,o,a){this.removeEventListener(e,o);const s=e.$proxies||(e.$proxies={}),u={attach:Sw,detach:jw,resize:Ew}[o]||Mw;s[o]=u(e,o,a)}removeEventListener(e,o){const a=e.$proxies||(e.$proxies={}),s=a[o];if(!s)return;({attach:Qc,detach:Qc,resize:Qc}[o]||_w)(e,o,s),a[o]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,o,a,s){return M2(e,o,a,s)}isAttached(e){const o=e&&Yc(e);return!!(o&&o.isConnected)}}function Aw(n){return!Pc()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?bw:Tw}class Li{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:o,y:a}=this.getProps(["x","y"],e);return{x:o,y:a}}hasValue(){return pa(this.x)&&pa(this.y)}getProps(e,o){const a=this.$animations;if(!o||!a)return this;const s={};return e.forEach(r=>{s[r]=a[r]&&a[r].active()?a[r]._to:this[r]}),s}}function Nw(n,e){const o=n.options.ticks,a=Ow(n),s=Math.min(o.maxTicksLimit||a,a),r=o.major.enabled?Dw(e):[],u=r.length,f=r[0],h=r[u-1],p=[];if(u>s)return zw(e,p,r,u/s),p;const b=Rw(r,e,s);if(u>0){let y,v;const _=u>1?Math.round((h-f)/(u-1)):null;for(gs(e,p,b,Bt(_)?0:f-_,f),y=0,v=u-1;y<v;y++)gs(e,p,b,r[y],r[y+1]);return gs(e,p,b,h,Bt(_)?e.length:h+_),p}return gs(e,p,b),p}function Ow(n){const e=n.options.offset,o=n._tickSize(),a=n._length/o+(e?0:1),s=n._maxLength/o;return Math.floor(Math.min(a,s))}function Rw(n,e,o){const a=Lw(n),s=e.length/o;if(!a)return Math.max(s,1);const r=k_(a);for(let u=0,f=r.length-1;u<f;u++){const h=r[u];if(h>s)return h}return Math.max(s,1)}function Dw(n){const e=[];let o,a;for(o=0,a=n.length;o<a;o++)n[o].major&&e.push(o);return e}function zw(n,e,o,a){let s=0,r=o[0],u;for(a=Math.ceil(a),u=0;u<n.length;u++)u===r&&(e.push(n[u]),s++,r=o[s*a])}function gs(n,e,o,a,s){const r=_t(a,0),u=Math.min(_t(s,n.length),n.length);let f=0,h,p,b;for(o=Math.ceil(o),s&&(h=s-a,o=h/Math.floor(h/o)),b=r;b<0;)f++,b=Math.round(r+f*o);for(p=Math.max(r,0);p<u;p++)p===b&&(e.push(n[p]),f++,b=Math.round(r+f*o))}function Lw(n){const e=n.length;let o,a;if(e<2)return!1;for(a=n[0],o=1;o<e;++o)if(n[o]-n[o-1]!==a)return!1;return a}const Bw=n=>n==="left"?"right":n==="right"?"left":n,Fg=(n,e,o)=>e==="top"||e==="left"?n[e]+o:n[e]-o,Xg=(n,e)=>Math.min(e||n,n);function Gg(n,e){const o=[],a=n.length/e,s=n.length;let r=0;for(;r<s;r+=a)o.push(n[Math.floor(r)]);return o}function Hw(n,e,o){const a=n.ticks.length,s=Math.min(e,a-1),r=n._startPixel,u=n._endPixel,f=1e-6;let h=n.getPixelForTick(s),p;if(!(o&&(a===1?p=Math.max(h-r,u-h):e===0?p=(n.getPixelForTick(1)-h)/2:p=(h-n.getPixelForTick(s-1))/2,h+=s<e?p:-p,h<r-f||h>u+f)))return h}function Uw(n,e){Tt(n,o=>{const a=o.gc,s=a.length/2;let r;if(s>e){for(r=0;r<s;++r)delete o.data[a[r]];a.splice(0,s)}})}function Ca(n){return n.drawTicks?n.tickLength:0}function Kg(n,e){if(!n.display)return 0;const o=_e(n.font,e),a=cn(n.padding);return(ie(n.text)?n.text.length:1)*o.lineHeight+a.height}function Vw(n,e){return Ni(n,{scale:e,type:"scale"})}function Pw(n,e,o){return Ni(n,{tick:o,index:e,type:"tick"})}function Yw(n,e,o){let a=Ih(n);return(o&&e!=="right"||!o&&e==="right")&&(a=Bw(a)),a}function qw(n,e,o,a){const{top:s,left:r,bottom:u,right:f,chart:h}=n,{chartArea:p,scales:b}=h;let y=0,v,_,k;const C=u-s,j=f-r;if(n.isHorizontal()){if(_=Oe(a,r,f),kt(o)){const M=Object.keys(o)[0],D=o[M];k=b[M].getPixelForValue(D)+C-e}else o==="center"?k=(p.bottom+p.top)/2+C-e:k=Fg(n,o,e);v=f-r}else{if(kt(o)){const M=Object.keys(o)[0],D=o[M];_=b[M].getPixelForValue(D)-j+e}else o==="center"?_=(p.left+p.right)/2-j+e:_=Fg(n,o,e);k=Oe(a,u,s),y=o==="left"?-te:te}return{titleX:_,titleY:k,maxWidth:v,rotation:y}}class co extends Li{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,o){return e}getUserBounds(){let{_userMin:e,_userMax:o,_suggestedMin:a,_suggestedMax:s}=this;return e=pn(e,Number.POSITIVE_INFINITY),o=pn(o,Number.NEGATIVE_INFINITY),a=pn(a,Number.POSITIVE_INFINITY),s=pn(s,Number.NEGATIVE_INFINITY),{min:pn(e,a),max:pn(o,s),minDefined:de(e),maxDefined:de(o)}}getMinMax(e){let{min:o,max:a,minDefined:s,maxDefined:r}=this.getUserBounds(),u;if(s&&r)return{min:o,max:a};const f=this.getMatchingVisibleMetas();for(let h=0,p=f.length;h<p;++h)u=f[h].controller.getMinMax(this,e),s||(o=Math.min(o,u.min)),r||(a=Math.max(a,u.max));return o=r&&o>a?a:o,a=s&&o>a?o:a,{min:pn(o,pn(a,o)),max:pn(a,pn(o,a))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ut(this.options.beforeUpdate,[this])}update(e,o,a){const{beginAtZero:s,grace:r,ticks:u}=this.options,f=u.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=o,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=l2(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const h=f<this.ticks.length;this._convertTicksToLabels(h?Gg(this.ticks,f):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),u.display&&(u.autoSkip||u.source==="auto")&&(this.ticks=Nw(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),h&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,o,a;this.isHorizontal()?(o=this.left,a=this.right):(o=this.top,a=this.bottom,e=!e),this._startPixel=o,this._endPixel=a,this._reversePixels=e,this._length=a-o,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ut(this.options.afterUpdate,[this])}beforeSetDimensions(){Ut(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ut(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Ut(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ut(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const o=this.options.ticks;let a,s,r;for(a=0,s=e.length;a<s;a++)r=e[a],r.label=Ut(o.callback,[r.value,a,e],this)}afterTickToLabelConversion(){Ut(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ut(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,o=e.ticks,a=Xg(this.ticks.length,e.ticks.maxTicksLimit),s=o.minRotation||0,r=o.maxRotation;let u=s,f,h,p;if(!this._isVisible()||!o.display||s>=r||a<=1||!this.isHorizontal()){this.labelRotation=s;return}const b=this._getLabelSizes(),y=b.widest.width,v=b.highest.height,_=ye(this.chart.width-y,0,this.maxWidth);f=e.offset?this.maxWidth/a:_/(a-1),y+6>f&&(f=_/(a-(e.offset?.5:1)),h=this.maxHeight-Ca(e.grid)-o.padding-Kg(e.title,this.chart.options.font),p=Math.sqrt(y*y+v*v),u=T_(Math.min(Math.asin(ye((b.highest.height+6)/f,-1,1)),Math.asin(ye(h/p,-1,1))-Math.asin(ye(v/p,-1,1)))),u=Math.max(s,Math.min(r,u))),this.labelRotation=u}afterCalculateLabelRotation(){Ut(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ut(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:o,options:{ticks:a,title:s,grid:r}}=this,u=this._isVisible(),f=this.isHorizontal();if(u){const h=Kg(s,o.options.font);if(f?(e.width=this.maxWidth,e.height=Ca(r)+h):(e.height=this.maxHeight,e.width=Ca(r)+h),a.display&&this.ticks.length){const{first:p,last:b,widest:y,highest:v}=this._getLabelSizes(),_=a.padding*2,k=En(this.labelRotation),C=Math.cos(k),j=Math.sin(k);if(f){const M=a.mirror?0:j*y.width+C*v.height;e.height=Math.min(this.maxHeight,e.height+M+_)}else{const M=a.mirror?0:C*y.width+j*v.height;e.width=Math.min(this.maxWidth,e.width+M+_)}this._calculatePadding(p,b,j,C)}}this._handleMargins(),f?(this.width=this._length=o.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=o.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,o,a,s){const{ticks:{align:r,padding:u},position:f}=this.options,h=this.labelRotation!==0,p=f!=="top"&&this.axis==="x";if(this.isHorizontal()){const b=this.getPixelForTick(0)-this.left,y=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,_=0;h?p?(v=s*e.width,_=a*o.height):(v=a*e.height,_=s*o.width):r==="start"?_=o.width:r==="end"?v=e.width:r!=="inner"&&(v=e.width/2,_=o.width/2),this.paddingLeft=Math.max((v-b+u)*this.width/(this.width-b),0),this.paddingRight=Math.max((_-y+u)*this.width/(this.width-y),0)}else{let b=o.height/2,y=e.height/2;r==="start"?(b=0,y=e.height):r==="end"&&(b=o.height,y=0),this.paddingTop=b+u,this.paddingBottom=y+u}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ut(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:o}=this.options;return o==="top"||o==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let o,a;for(o=0,a=e.length;o<a;o++)Bt(e[o].label)&&(e.splice(o,1),a--,o--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const o=this.options.ticks.sampleSize;let a=this.ticks;o<a.length&&(a=Gg(a,o)),this._labelSizes=e=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,o,a){const{ctx:s,_longestTextCache:r}=this,u=[],f=[],h=Math.floor(o/Xg(o,a));let p=0,b=0,y,v,_,k,C,j,M,D,U,z,w;for(y=0;y<o;y+=h){if(k=e[y].label,C=this._resolveTickFontOptions(y),s.font=j=C.string,M=r[j]=r[j]||{data:{},gc:[]},D=C.lineHeight,U=z=0,!Bt(k)&&!ie(k))U=og(s,M.data,M.gc,U,k),z=D;else if(ie(k))for(v=0,_=k.length;v<_;++v)w=k[v],!Bt(w)&&!ie(w)&&(U=og(s,M.data,M.gc,U,w),z+=D);u.push(U),f.push(z),p=Math.max(U,p),b=Math.max(z,b)}Uw(r,o);const Y=u.indexOf(p),G=f.indexOf(b),K=I=>({width:u[I]||0,height:f[I]||0});return{first:K(0),last:K(o-1),widest:K(Y),highest:K(G),widths:u,heights:f}}getLabelForValue(e){return e}getPixelForValue(e,o){return NaN}getValueForPixel(e){}getPixelForTick(e){const o=this.ticks;return e<0||e>o.length-1?null:this.getPixelForValue(o[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const o=this._startPixel+e*this._length;return N_(this._alignToPixels?Ai(this.chart,o,0):o)}getDecimalForPixel(e){const o=(e-this._startPixel)/this._length;return this._reversePixels?1-o:o}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:o}=this;return e<0&&o<0?o:e>0&&o>0?e:0}getContext(e){const o=this.ticks||[];if(e>=0&&e<o.length){const a=o[e];return a.$context||(a.$context=Pw(this.getContext(),e,a))}return this.$context||(this.$context=Vw(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,o=En(this.labelRotation),a=Math.abs(Math.cos(o)),s=Math.abs(Math.sin(o)),r=this._getLabelSizes(),u=e.autoSkipPadding||0,f=r?r.widest.width+u:0,h=r?r.highest.height+u:0;return this.isHorizontal()?h*a>f*s?f/a:h/s:h*s<f*a?h/a:f/s}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const o=this.axis,a=this.chart,s=this.options,{grid:r,position:u,border:f}=s,h=r.offset,p=this.isHorizontal(),y=this.ticks.length+(h?1:0),v=Ca(r),_=[],k=f.setContext(this.getContext()),C=k.display?k.width:0,j=C/2,M=function(H){return Ai(a,H,C)};let D,U,z,w,Y,G,K,I,J,ot,L,gt;if(u==="top")D=M(this.bottom),G=this.bottom-v,I=D-j,ot=M(e.top)+j,gt=e.bottom;else if(u==="bottom")D=M(this.top),ot=e.top,gt=M(e.bottom)-j,G=D+j,I=this.top+v;else if(u==="left")D=M(this.right),Y=this.right-v,K=D-j,J=M(e.left)+j,L=e.right;else if(u==="right")D=M(this.left),J=e.left,L=M(e.right)-j,Y=D+j,K=this.left+v;else if(o==="x"){if(u==="center")D=M((e.top+e.bottom)/2+.5);else if(kt(u)){const H=Object.keys(u)[0],Z=u[H];D=M(this.chart.scales[H].getPixelForValue(Z))}ot=e.top,gt=e.bottom,G=D+j,I=G+v}else if(o==="y"){if(u==="center")D=M((e.left+e.right)/2);else if(kt(u)){const H=Object.keys(u)[0],Z=u[H];D=M(this.chart.scales[H].getPixelForValue(Z))}Y=D-j,K=Y-v,J=e.left,L=e.right}const rt=_t(s.ticks.maxTicksLimit,y),tt=Math.max(1,Math.ceil(y/rt));for(U=0;U<y;U+=tt){const H=this.getContext(U),Z=r.setContext(H),at=f.setContext(H),ct=Z.lineWidth,A=Z.color,X=at.dash||[],nt=at.dashOffset,it=Z.tickWidth,lt=Z.tickColor,bt=Z.tickBorderDash||[],ut=Z.tickBorderDashOffset;z=Hw(this,U,h),z!==void 0&&(w=Ai(a,z,ct),p?Y=K=J=L=w:G=I=ot=gt=w,_.push({tx1:Y,ty1:G,tx2:K,ty2:I,x1:J,y1:ot,x2:L,y2:gt,width:ct,color:A,borderDash:X,borderDashOffset:nt,tickWidth:it,tickColor:lt,tickBorderDash:bt,tickBorderDashOffset:ut}))}return this._ticksLength=y,this._borderValue=D,_}_computeLabelItems(e){const o=this.axis,a=this.options,{position:s,ticks:r}=a,u=this.isHorizontal(),f=this.ticks,{align:h,crossAlign:p,padding:b,mirror:y}=r,v=Ca(a.grid),_=v+b,k=y?-b:_,C=-En(this.labelRotation),j=[];let M,D,U,z,w,Y,G,K,I,J,ot,L,gt="middle";if(s==="top")Y=this.bottom-k,G=this._getXAxisLabelAlignment();else if(s==="bottom")Y=this.top+k,G=this._getXAxisLabelAlignment();else if(s==="left"){const tt=this._getYAxisLabelAlignment(v);G=tt.textAlign,w=tt.x}else if(s==="right"){const tt=this._getYAxisLabelAlignment(v);G=tt.textAlign,w=tt.x}else if(o==="x"){if(s==="center")Y=(e.top+e.bottom)/2+_;else if(kt(s)){const tt=Object.keys(s)[0],H=s[tt];Y=this.chart.scales[tt].getPixelForValue(H)+_}G=this._getXAxisLabelAlignment()}else if(o==="y"){if(s==="center")w=(e.left+e.right)/2-_;else if(kt(s)){const tt=Object.keys(s)[0],H=s[tt];w=this.chart.scales[tt].getPixelForValue(H)}G=this._getYAxisLabelAlignment(v).textAlign}o==="y"&&(h==="start"?gt="top":h==="end"&&(gt="bottom"));const rt=this._getLabelSizes();for(M=0,D=f.length;M<D;++M){U=f[M],z=U.label;const tt=r.setContext(this.getContext(M));K=this.getPixelForTick(M)+r.labelOffset,I=this._resolveTickFontOptions(M),J=I.lineHeight,ot=ie(z)?z.length:1;const H=ot/2,Z=tt.color,at=tt.textStrokeColor,ct=tt.textStrokeWidth;let A=G;u?(w=K,G==="inner"&&(M===D-1?A=this.options.reverse?"left":"right":M===0?A=this.options.reverse?"right":"left":A="center"),s==="top"?p==="near"||C!==0?L=-ot*J+J/2:p==="center"?L=-rt.highest.height/2-H*J+J:L=-rt.highest.height+J/2:p==="near"||C!==0?L=J/2:p==="center"?L=rt.highest.height/2-H*J:L=rt.highest.height-ot*J,y&&(L*=-1),C!==0&&!tt.showLabelBackdrop&&(w+=J/2*Math.sin(C))):(Y=K,L=(1-ot)*J/2);let X;if(tt.showLabelBackdrop){const nt=cn(tt.backdropPadding),it=rt.heights[M],lt=rt.widths[M];let bt=L-nt.top,ut=0-nt.left;switch(gt){case"middle":bt-=it/2;break;case"bottom":bt-=it;break}switch(G){case"center":ut-=lt/2;break;case"right":ut-=lt;break;case"inner":M===D-1?ut-=lt:M>0&&(ut-=lt/2);break}X={left:ut,top:bt,width:lt+nt.width,height:it+nt.height,color:tt.backdropColor}}j.push({label:z,font:I,textOffset:L,options:{rotation:C,color:Z,strokeColor:at,strokeWidth:ct,textAlign:A,textBaseline:gt,translation:[w,Y],backdrop:X}})}return j}_getXAxisLabelAlignment(){const{position:e,ticks:o}=this.options;if(-En(this.labelRotation))return e==="top"?"left":"right";let s="center";return o.align==="start"?s="left":o.align==="end"?s="right":o.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(e){const{position:o,ticks:{crossAlign:a,mirror:s,padding:r}}=this.options,u=this._getLabelSizes(),f=e+r,h=u.widest.width;let p,b;return o==="left"?s?(b=this.right+r,a==="near"?p="left":a==="center"?(p="center",b+=h/2):(p="right",b+=h)):(b=this.right-f,a==="near"?p="right":a==="center"?(p="center",b-=h/2):(p="left",b=this.left)):o==="right"?s?(b=this.left+r,a==="near"?p="right":a==="center"?(p="center",b-=h/2):(p="left",b-=h)):(b=this.left+f,a==="near"?p="left":a==="center"?(p="center",b+=h/2):(p="right",b=this.right)):p="right",{textAlign:p,x:b}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,o=this.options.position;if(o==="left"||o==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(o==="top"||o==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:o},left:a,top:s,width:r,height:u}=this;o&&(e.save(),e.fillStyle=o,e.fillRect(a,s,r,u),e.restore())}getLineWidthForValue(e){const o=this.options.grid;if(!this._isVisible()||!o.display)return 0;const s=this.ticks.findIndex(r=>r.value===e);return s>=0?o.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const o=this.options.grid,a=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,u;const f=(h,p,b)=>{!b.width||!b.color||(a.save(),a.lineWidth=b.width,a.strokeStyle=b.color,a.setLineDash(b.borderDash||[]),a.lineDashOffset=b.borderDashOffset,a.beginPath(),a.moveTo(h.x,h.y),a.lineTo(p.x,p.y),a.stroke(),a.restore())};if(o.display)for(r=0,u=s.length;r<u;++r){const h=s[r];o.drawOnChartArea&&f({x:h.x1,y:h.y1},{x:h.x2,y:h.y2},h),o.drawTicks&&f({x:h.tx1,y:h.ty1},{x:h.tx2,y:h.ty2},{color:h.tickColor,width:h.tickWidth,borderDash:h.tickBorderDash,borderDashOffset:h.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:o,options:{border:a,grid:s}}=this,r=a.setContext(this.getContext()),u=a.display?r.width:0;if(!u)return;const f=s.setContext(this.getContext(0)).lineWidth,h=this._borderValue;let p,b,y,v;this.isHorizontal()?(p=Ai(e,this.left,u)-u/2,b=Ai(e,this.right,f)+f/2,y=v=h):(y=Ai(e,this.top,u)-u/2,v=Ai(e,this.bottom,f)+f/2,p=b=h),o.save(),o.lineWidth=r.width,o.strokeStyle=r.color,o.beginPath(),o.moveTo(p,y),o.lineTo(b,v),o.stroke(),o.restore()}drawLabels(e){if(!this.options.ticks.display)return;const a=this.ctx,s=this._computeLabelArea();s&&ns(a,s);const r=this.getLabelItems(e);for(const u of r){const f=u.options,h=u.font,p=u.label,b=u.textOffset;os(a,p,0,b,h,f)}s&&is(a)}drawTitle(){const{ctx:e,options:{position:o,title:a,reverse:s}}=this;if(!a.display)return;const r=_e(a.font),u=cn(a.padding),f=a.align;let h=r.lineHeight/2;o==="bottom"||o==="center"||kt(o)?(h+=u.bottom,ie(a.text)&&(h+=r.lineHeight*(a.text.length-1))):h+=u.top;const{titleX:p,titleY:b,maxWidth:y,rotation:v}=qw(this,h,o,f);os(e,a.text,0,0,r,{color:a.color,maxWidth:y,rotation:v,textAlign:Yw(f,o,s),textBaseline:"middle",translation:[p,b]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,o=e.ticks&&e.ticks.z||0,a=_t(e.grid&&e.grid.z,-1),s=_t(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==co.prototype.draw?[{z:o,draw:r=>{this.draw(r)}}]:[{z:a,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:o,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const o=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",s=[];let r,u;for(r=0,u=o.length;r<u;++r){const f=o[r];f[a]===this.id&&(!e||f.type===e)&&s.push(f)}return s}_resolveTickFontOptions(e){const o=this.options.ticks.setContext(this.getContext(e));return _e(o.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ps{constructor(e,o,a){this.type=e,this.scope=o,this.override=a,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const o=Object.getPrototypeOf(e);let a;Gw(o)&&(a=this.register(o));const s=this.items,r=e.id,u=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in s||(s[r]=e,Fw(e,u,a),this.override&&Kt.override(e.id,e.overrides)),u}get(e){return this.items[e]}unregister(e){const o=this.items,a=e.id,s=this.scope;a in o&&delete o[a],s&&a in Kt[s]&&(delete Kt[s][a],this.override&&delete Ti[a])}}function Fw(n,e,o){const a=fa(Object.create(null),[o?Kt.get(o):{},Kt.get(e),n.defaults]);Kt.set(e,a),n.defaultRoutes&&Xw(e,n.defaultRoutes),n.descriptors&&Kt.describe(e,n.descriptors)}function Xw(n,e){Object.keys(e).forEach(o=>{const a=o.split("."),s=a.pop(),r=[n].concat(a).join("."),u=e[o].split("."),f=u.pop(),h=u.join(".");Kt.route(r,s,h,f)})}function Gw(n){return"id"in n&&"defaults"in n}class Kw{constructor(){this.controllers=new ps(Gc,"datasets",!0),this.elements=new ps(Li,"elements"),this.plugins=new ps(Object,"plugins"),this.scales=new ps(co,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,o,a){[...o].forEach(s=>{const r=a||this._getRegistryForType(s);a||r.isForType(s)||r===this.plugins&&s.id?this._exec(e,r,s):Tt(s,u=>{const f=a||this._getRegistryForType(u);this._exec(e,f,u)})})}_exec(e,o,a){const s=Ec(e);Ut(a["before"+s],[],a),o[e](a),Ut(a["after"+s],[],a)}_getRegistryForType(e){for(let o=0;o<this._typedRegistries.length;o++){const a=this._typedRegistries[o];if(a.isForType(e))return a}return this.plugins}_get(e,o,a){const s=o.get(e);if(s===void 0)throw new Error('"'+e+'" is not a registered '+a+".");return s}}var mn=new Kw;class Ww{constructor(){this._init=void 0}notify(e,o,a,s){if(o==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const r=s?this._descriptors(e).filter(s):this._descriptors(e),u=this._notify(r,e,o,a);return o==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),u}_notify(e,o,a,s){s=s||{};for(const r of e){const u=r.plugin,f=u[a],h=[o,s,r.options];if(Ut(f,h,u)===!1&&s.cancelable)return!1}return!0}invalidate(){Bt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const o=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),o}_createDescriptors(e,o){const a=e&&e.config,s=_t(a.options&&a.options.plugins,{}),r=$w(a);return s===!1&&!o?[]:Zw(e,r,s,o)}_notifyStateChanges(e){const o=this._oldCache||[],a=this._cache,s=(r,u)=>r.filter(f=>!u.some(h=>f.plugin.id===h.plugin.id));this._notify(s(o,a),e,"stop"),this._notify(s(a,o),e,"start")}}function $w(n){const e={},o=[],a=Object.keys(mn.plugins.items);for(let r=0;r<a.length;r++)o.push(mn.getPlugin(a[r]));const s=n.plugins||[];for(let r=0;r<s.length;r++){const u=s[r];o.indexOf(u)===-1&&(o.push(u),e[u.id]=!0)}return{plugins:o,localIds:e}}function Qw(n,e){return!e&&n===!1?null:n===!0?{}:n}function Zw(n,{plugins:e,localIds:o},a,s){const r=[],u=n.getContext();for(const f of e){const h=f.id,p=Qw(a[h],s);p!==null&&r.push({plugin:f,options:Iw(n.config,{plugin:f,local:o[h]},p,u)})}return r}function Iw(n,{plugin:e,local:o},a,s){const r=n.pluginScopeKeys(e),u=n.getOptionScopes(a,r);return o&&e.defaults&&u.push(e.defaults),n.createResolver(u,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Zc(n,e){const o=Kt.datasets[n]||{};return((e.datasets||{})[n]||{}).indexAxis||e.indexAxis||o.indexAxis||"x"}function Jw(n,e){let o=n;return n==="_index_"?o=e:n==="_value_"&&(o=e==="x"?"y":"x"),o}function tS(n,e){return n===e?"_index_":"_value_"}function Wg(n){if(n==="x"||n==="y"||n==="r")return n}function eS(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Ic(n,...e){if(Wg(n))return n;for(const o of e){const a=o.axis||eS(o.position)||n.length>1&&Wg(n[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function $g(n,e,o){if(o[e+"AxisID"]===n)return{axis:e}}function nS(n,e){if(e.data&&e.data.datasets){const o=e.data.datasets.filter(a=>a.xAxisID===n||a.yAxisID===n);if(o.length)return $g(n,"x",o[0])||$g(n,"y",o[0])}return{}}function iS(n,e){const o=Ti[n.type]||{scales:{}},a=e.scales||{},s=Zc(n.type,e),r=Object.create(null);return Object.keys(a).forEach(u=>{const f=a[u];if(!kt(f))return console.error(`Invalid scale configuration for scale: ${u}`);if(f._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${u}`);const h=Ic(u,f,nS(u,n),Kt.scales[f.type]),p=tS(h,s),b=o.scales||{};r[u]=da(Object.create(null),[{axis:h},f,b[h],b[p]])}),n.data.datasets.forEach(u=>{const f=u.type||n.type,h=u.indexAxis||Zc(f,e),b=(Ti[f]||{}).scales||{};Object.keys(b).forEach(y=>{const v=Jw(y,h),_=u[v+"AxisID"]||v;r[_]=r[_]||Object.create(null),da(r[_],[{axis:v},a[_],b[y]])})}),Object.keys(r).forEach(u=>{const f=r[u];da(f,[Kt.scales[f.type],Kt.scale])}),r}function Qg(n){const e=n.options||(n.options={});e.plugins=_t(e.plugins,{}),e.scales=iS(n,e)}function Zg(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function oS(n){return n=n||{},n.data=Zg(n.data),Qg(n),n}const Ig=new Map,Jg=new Set;function ms(n,e){let o=Ig.get(n);return o||(o=e(),Ig.set(n,o),Jg.add(o)),o}const Ea=(n,e,o)=>{const a=ha(e,o);a!==void 0&&n.add(a)};class aS{constructor(e){this._config=oS(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Zg(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Qg(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ms(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,o){return ms(`${e}.transition.${o}`,()=>[[`datasets.${e}.transitions.${o}`,`transitions.${o}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,o){return ms(`${e}-${o}`,()=>[[`datasets.${e}.elements.${o}`,`datasets.${e}`,`elements.${o}`,""]])}pluginScopeKeys(e){const o=e.id,a=this.type;return ms(`${a}-plugin-${o}`,()=>[[`plugins.${o}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,o){const a=this._scopeCache;let s=a.get(e);return(!s||o)&&(s=new Map,a.set(e,s)),s}getOptionScopes(e,o,a){const{options:s,type:r}=this,u=this._cachedScopes(e,a),f=u.get(o);if(f)return f;const h=new Set;o.forEach(b=>{e&&(h.add(e),b.forEach(y=>Ea(h,e,y))),b.forEach(y=>Ea(h,s,y)),b.forEach(y=>Ea(h,Ti[r]||{},y)),b.forEach(y=>Ea(h,Kt,y)),b.forEach(y=>Ea(h,Rc,y))});const p=Array.from(h);return p.length===0&&p.push(Object.create(null)),Jg.has(o)&&u.set(o,p),p}chartOptionScopes(){const{options:e,type:o}=this;return[e,Ti[o]||{},Kt.datasets[o]||{},{type:o},Kt,Rc]}resolveNamedOptions(e,o,a,s=[""]){const r={$shared:!0},{resolver:u,subPrefixes:f}=tp(this._resolverCache,e,s);let h=u;if(sS(u,o)){r.$shared=!1,a=$n(a)?a():a;const p=this.createResolver(e,a,f);h=lo(u,a,p)}for(const p of o)r[p]=h[p];return r}createResolver(e,o,a=[""],s){const{resolver:r}=tp(this._resolverCache,e,a);return kt(o)?lo(r,o,void 0,s):r}}function tp(n,e,o){let a=n.get(e);a||(a=new Map,n.set(e,a));const s=o.join();let r=a.get(s);return r||(r={resolver:Hc(e,o),subPrefixes:o.filter(f=>!f.toLowerCase().includes("hover"))},a.set(s,r)),r}const lS=n=>kt(n)&&Object.getOwnPropertyNames(n).some(e=>$n(n[e]));function sS(n,e){const{isScriptable:o,isIndexable:a}=sg(n);for(const s of e){const r=o(s),u=a(s),f=(u||r)&&n[s];if(r&&($n(f)||lS(f))||u&&ie(f))return!0}return!1}var rS="4.5.1";const cS=["top","bottom","left","right","chartArea"];function ep(n,e){return n==="top"||n==="bottom"||cS.indexOf(n)===-1&&e==="x"}function np(n,e){return function(o,a){return o[n]===a[n]?o[e]-a[e]:o[n]-a[n]}}function ip(n){const e=n.chart,o=e.options.animation;e.notifyPlugins("afterRender"),Ut(o&&o.onComplete,[n],e)}function uS(n){const e=n.chart,o=e.options.animation;Ut(o&&o.onProgress,[n],e)}function op(n){return Pc()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const bs={},ap=n=>{const e=op(n);return Object.values(bs).filter(o=>o.canvas===e).pop()};function fS(n,e,o){const a=Object.keys(n);for(const s of a){const r=+s;if(r>=e){const u=n[s];delete n[s],(o>0||r>e)&&(n[r+o]=u)}}}function dS(n,e,o,a){return!o||n.type==="mouseout"?null:a?e:n}let Ma=class{static defaults=Kt;static instances=bs;static overrides=Ti;static registry=mn;static version=rS;static getChart=ap;static register(...e){mn.add(...e),lp()}static unregister(...e){mn.remove(...e),lp()}constructor(e,o){const a=this.config=new aS(o),s=op(e),r=ap(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const u=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||Aw(s)),this.platform.updateConfig(a);const f=this.platform.acquireContext(s,u.aspectRatio),h=f&&f.canvas,p=h&&h.height,b=h&&h.width;if(this.id=m_(),this.ctx=f,this.canvas=h,this.width=b,this.height=p,this._options=u,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ww,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=L_(y=>this.update(y),u.resizeDelay||0),this._dataChanges=[],bs[this.id]=this,!f||!h){console.error("Failed to create chart: can't acquire context from the given item");return}Mn.listen(this,"complete",ip),Mn.listen(this,"progress",uS),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:o},width:a,height:s,_aspectRatio:r}=this;return Bt(e)?o&&r?r:s?a/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return mn}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():gg(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ag(this.canvas,this.ctx),this}stop(){return Mn.stop(this),this}resize(e,o){Mn.running(this)?this._resizeBeforeDraw={width:e,height:o}:this._resize(e,o)}_resize(e,o){const a=this.options,s=this.canvas,r=a.maintainAspectRatio&&this.aspectRatio,u=this.platform.getMaximumSize(s,e,o,r),f=a.devicePixelRatio||this.platform.getDevicePixelRatio(),h=this.width?"resize":"attach";this.width=u.width,this.height=u.height,this._aspectRatio=this.aspectRatio,gg(this,f,!0)&&(this.notifyPlugins("resize",{size:u}),Ut(a.onResize,[this,u],this),this.attached&&this._doResize(h)&&this.render())}ensureScalesHaveIDs(){const o=this.options.scales||{};Tt(o,(a,s)=>{a.id=s})}buildOrUpdateScales(){const e=this.options,o=e.scales,a=this.scales,s=Object.keys(a).reduce((u,f)=>(u[f]=!1,u),{});let r=[];o&&(r=r.concat(Object.keys(o).map(u=>{const f=o[u],h=Ic(u,f),p=h==="r",b=h==="x";return{options:f,dposition:p?"chartArea":b?"bottom":"left",dtype:p?"radialLinear":b?"category":"linear"}}))),Tt(r,u=>{const f=u.options,h=f.id,p=Ic(h,f),b=_t(f.type,u.dtype);(f.position===void 0||ep(f.position,p)!==ep(u.dposition))&&(f.position=u.dposition),s[h]=!0;let y=null;if(h in a&&a[h].type===b)y=a[h];else{const v=mn.getScale(b);y=new v({id:h,type:b,ctx:this.ctx,chart:this}),a[y.id]=y}y.init(f,e)}),Tt(s,(u,f)=>{u||delete a[f]}),Tt(a,u=>{Zn.configure(this,u,u.options),Zn.addBox(this,u)})}_updateMetasets(){const e=this._metasets,o=this.data.datasets.length,a=e.length;if(e.sort((s,r)=>s.index-r.index),a>o){for(let s=o;s<a;++s)this._destroyDatasetMeta(s);e.splice(o,a-o)}this._sortedMetasets=e.slice(0).sort(np("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:o}}=this;e.length>o.length&&delete this._stacks,e.forEach((a,s)=>{o.filter(r=>r===a._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],o=this.data.datasets;let a,s;for(this._removeUnreferencedMetasets(),a=0,s=o.length;a<s;a++){const r=o[a];let u=this.getDatasetMeta(a);const f=r.type||this.config.type;if(u.type&&u.type!==f&&(this._destroyDatasetMeta(a),u=this.getDatasetMeta(a)),u.type=f,u.indexAxis=r.indexAxis||Zc(f,this.options),u.order=r.order||0,u.index=a,u.label=""+r.label,u.visible=this.isDatasetVisible(a),u.controller)u.controller.updateIndex(a),u.controller.linkScales();else{const h=mn.getController(f),{datasetElementType:p,dataElementType:b}=Kt.datasets[f];Object.assign(h,{dataElementType:mn.getElement(b),datasetElementType:p&&mn.getElement(p)}),u.controller=new h(this,a),e.push(u.controller)}}return this._updateMetasets(),e}_resetElements(){Tt(this.data.datasets,(e,o)=>{this.getDatasetMeta(o).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const o=this.config;o.update();const a=this._options=o.createResolver(o.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let u=0;for(let p=0,b=this.data.datasets.length;p<b;p++){const{controller:y}=this.getDatasetMeta(p),v=!s&&r.indexOf(y)===-1;y.buildOrUpdateElements(v),u=Math.max(+y.getMaxOverflow(),u)}u=this._minPadding=a.layout.autoPadding?u:0,this._updateLayout(u),s||Tt(r,p=>{p.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(np("z","_idx"));const{_active:f,_lastEvent:h}=this;h?this._eventHandler(h,!0):f.length&&this._updateHoverStyles(f,f,!0),this.render()}_updateScales(){Tt(this.scales,e=>{Zn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,o=new Set(Object.keys(this._listeners)),a=new Set(e.events);(!Yh(o,a)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,o=this._getUniformDataChanges()||[];for(const{method:a,start:s,count:r}of o){const u=a==="_removeElements"?-r:r;fS(e,s,u)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const o=this.data.datasets.length,a=r=>new Set(e.filter(u=>u[0]===r).map((u,f)=>f+","+u.splice(1).join(","))),s=a(0);for(let r=1;r<o;r++)if(!Yh(s,a(r)))return;return Array.from(s).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Zn.update(this,this.width,this.height,e);const o=this.chartArea,a=o.width<=0||o.height<=0;this._layers=[],Tt(this.boxes,s=>{a&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let o=0,a=this.data.datasets.length;o<a;++o)this.getDatasetMeta(o).controller.configure();for(let o=0,a=this.data.datasets.length;o<a;++o)this._updateDataset(o,$n(e)?e({datasetIndex:o}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,o){const a=this.getDatasetMeta(e),s={meta:a,index:e,mode:o,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(a.controller._update(o),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Mn.has(this)?this.attached&&!Mn.running(this)&&Mn.start(this):(this.draw(),ip({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:a,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const o=this._layers;for(e=0;e<o.length&&o[e].z<=0;++e)o[e].draw(this.chartArea);for(this._drawDatasets();e<o.length;++e)o[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const o=this._sortedMetasets,a=[];let s,r;for(s=0,r=o.length;s<r;++s){const u=o[s];(!e||u.visible)&&a.push(u)}return a}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let o=e.length-1;o>=0;--o)this._drawDataset(e[o]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const o=this.ctx,a={meta:e,index:e.index,cancelable:!0},s=jg(this,e);this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&ns(o,s),e.controller.draw(),s&&is(o),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return xa(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,o,a,s){const r=cw.modes[o];return typeof r=="function"?r(this,e,a,s):[]}getDatasetMeta(e){const o=this.data.datasets[e],a=this._metasets;let s=a.filter(r=>r&&r._dataset===o).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:o&&o.order||0,index:e,_dataset:o,_parsed:[],_sorted:!1},a.push(s)),s}getContext(){return this.$context||(this.$context=Ni(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const o=this.data.datasets[e];if(!o)return!1;const a=this.getDatasetMeta(e);return typeof a.hidden=="boolean"?!a.hidden:!o.hidden}setDatasetVisibility(e,o){const a=this.getDatasetMeta(e);a.hidden=!o}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,o,a){const s=a?"show":"hide",r=this.getDatasetMeta(e),u=r.controller._resolveAnimations(void 0,s);Jl(o)?(r.data[o].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),u.update(r,{visible:a}),this.update(f=>f.datasetIndex===e?s:void 0))}hide(e,o){this._updateVisibility(e,o,!1)}show(e,o){this._updateVisibility(e,o,!0)}_destroyDatasetMeta(e){const o=this._metasets[e];o&&o.controller&&o.controller._destroy(),delete this._metasets[e]}_stop(){let e,o;for(this.stop(),Mn.remove(this),e=0,o=this.data.datasets.length;e<o;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:o}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),ag(e,o),this.platform.releaseContext(o),this.canvas=null,this.ctx=null),delete bs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,o=this.platform,a=(r,u)=>{o.addEventListener(this,r,u),e[r]=u},s=(r,u,f)=>{r.offsetX=u,r.offsetY=f,this._eventHandler(r)};Tt(this.options.events,r=>a(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,o=this.platform,a=(h,p)=>{o.addEventListener(this,h,p),e[h]=p},s=(h,p)=>{e[h]&&(o.removeEventListener(this,h,p),delete e[h])},r=(h,p)=>{this.canvas&&this.resize(h,p)};let u;const f=()=>{s("attach",f),this.attached=!0,this.resize(),a("resize",r),a("detach",u)};u=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),a("attach",f)},o.isAttached(this.canvas)?f():u()}unbindEvents(){Tt(this._listeners,(e,o)=>{this.platform.removeEventListener(this,o,e)}),this._listeners={},Tt(this._responsiveListeners,(e,o)=>{this.platform.removeEventListener(this,o,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,o,a){const s=a?"set":"remove";let r,u,f,h;for(o==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),f=0,h=e.length;f<h;++f){u=e[f];const p=u&&this.getDatasetMeta(u.datasetIndex).controller;p&&p[s+"HoverStyle"](u.element,u.datasetIndex,u.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const o=this._active||[],a=e.map(({datasetIndex:r,index:u})=>{const f=this.getDatasetMeta(r);if(!f)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:f.data[u],index:u}});!Zl(a,o)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,o))}notifyPlugins(e,o,a){return this._plugins.notify(this,e,o,a)}isPluginEnabled(e){return this._plugins._cache.filter(o=>o.plugin.id===e).length===1}_updateHoverStyles(e,o,a){const s=this.options.hover,r=(h,p)=>h.filter(b=>!p.some(y=>b.datasetIndex===y.datasetIndex&&b.index===y.index)),u=r(o,e),f=a?e:r(e,o);u.length&&this.updateHoverStyle(u,s.mode,!1),f.length&&s.mode&&this.updateHoverStyle(f,s.mode,!0)}_eventHandler(e,o){const a={event:e,replay:o,cancelable:!0,inChartArea:this.isPointInArea(e)},s=u=>(u.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",a,s)===!1)return;const r=this._handleEvent(e,o,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,s),(r||a.changed)&&this.render(),this}_handleEvent(e,o,a){const{_active:s=[],options:r}=this,u=o,f=this._getActiveElements(e,s,a,u),h=w_(e),p=dS(e,this._lastEvent,a,h);a&&(this._lastEvent=null,Ut(r.onHover,[e,f,this],this),h&&Ut(r.onClick,[e,f,this],this));const b=!Zl(f,s);return(b||o)&&(this._active=f,this._updateHoverStyles(f,s,o)),this._lastEvent=p,b}_getActiveElements(e,o,a,s){if(e.type==="mouseout")return[];if(!a)return o;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,s)}};function lp(){return Tt(Ma.instances,n=>n._plugins.invalidate())}function hS(n,e,o){const{startAngle:a,x:s,y:r,outerRadius:u,innerRadius:f,options:h}=e,{borderWidth:p,borderJoinStyle:b}=h,y=Math.min(p/u,Ne(a-o));if(n.beginPath(),n.arc(s,r,u-p/2,a+y/2,o-y/2),f>0){const v=Math.min(p/f,Ne(a-o));n.arc(s,r,f+p/2,o-v/2,a+v/2,!0)}else{const v=Math.min(p/2,u*Ne(a-o));if(b==="round")n.arc(s,r,v,o-zt/2,a+zt/2,!0);else if(b==="bevel"){const _=2*v*v,k=-_*Math.cos(o+zt/2)+s,C=-_*Math.sin(o+zt/2)+r,j=_*Math.cos(a+zt/2)+s,M=_*Math.sin(a+zt/2)+r;n.lineTo(k,C),n.lineTo(j,M)}}n.closePath(),n.moveTo(0,0),n.rect(0,0,n.canvas.width,n.canvas.height),n.clip("evenodd")}function gS(n,e,o){const{startAngle:a,pixelMargin:s,x:r,y:u,outerRadius:f,innerRadius:h}=e;let p=s/f;n.beginPath(),n.arc(r,u,f,a-p,o+p),h>s?(p=s/h,n.arc(r,u,h,o+p,a-p,!0)):n.arc(r,u,s,o+te,a-te),n.closePath(),n.clip()}function pS(n){return Bc(n,["outerStart","outerEnd","innerStart","innerEnd"])}function mS(n,e,o,a){const s=pS(n.options.borderRadius),r=(o-e)/2,u=Math.min(r,a*e/2),f=h=>{const p=(o-Math.min(r,h))*a/2;return ye(h,0,Math.min(r,p))};return{outerStart:f(s.outerStart),outerEnd:f(s.outerEnd),innerStart:ye(s.innerStart,0,u),innerEnd:ye(s.innerEnd,0,u)}}function uo(n,e,o,a){return{x:o+n*Math.cos(e),y:a+n*Math.sin(e)}}function ys(n,e,o,a,s,r){const{x:u,y:f,startAngle:h,pixelMargin:p,innerRadius:b}=e,y=Math.max(e.outerRadius+a+o-p,0),v=b>0?b+a+o+p:0;let _=0;const k=s-h;if(a){const tt=b>0?b-a:0,H=y>0?y-a:0,Z=(tt+H)/2,at=Z!==0?k*Z/(Z+a):k;_=(k-at)/2}const C=Math.max(.001,k*y-o/zt)/y,j=(k-C)/2,M=h+j+_,D=s-j-_,{outerStart:U,outerEnd:z,innerStart:w,innerEnd:Y}=mS(e,v,y,D-M),G=y-U,K=y-z,I=M+U/G,J=D-z/K,ot=v+w,L=v+Y,gt=M+w/ot,rt=D-Y/L;if(n.beginPath(),r){const tt=(I+J)/2;if(n.arc(u,f,y,I,tt),n.arc(u,f,y,tt,J),z>0){const ct=uo(K,J,u,f);n.arc(ct.x,ct.y,z,J,D+te)}const H=uo(L,D,u,f);if(n.lineTo(H.x,H.y),Y>0){const ct=uo(L,rt,u,f);n.arc(ct.x,ct.y,Y,D+te,rt+Math.PI)}const Z=(D-Y/v+(M+w/v))/2;if(n.arc(u,f,v,D-Y/v,Z,!0),n.arc(u,f,v,Z,M+w/v,!0),w>0){const ct=uo(ot,gt,u,f);n.arc(ct.x,ct.y,w,gt+Math.PI,M-te)}const at=uo(G,M,u,f);if(n.lineTo(at.x,at.y),U>0){const ct=uo(G,I,u,f);n.arc(ct.x,ct.y,U,M-te,I)}}else{n.moveTo(u,f);const tt=Math.cos(I)*y+u,H=Math.sin(I)*y+f;n.lineTo(tt,H);const Z=Math.cos(J)*y+u,at=Math.sin(J)*y+f;n.lineTo(Z,at)}n.closePath()}function bS(n,e,o,a,s){const{fullCircles:r,startAngle:u,circumference:f}=e;let h=e.endAngle;if(r){ys(n,e,o,a,h,s);for(let p=0;p<r;++p)n.fill();isNaN(f)||(h=u+(f%qt||qt))}return ys(n,e,o,a,h,s),n.fill(),h}function yS(n,e,o,a,s){const{fullCircles:r,startAngle:u,circumference:f,options:h}=e,{borderWidth:p,borderJoinStyle:b,borderDash:y,borderDashOffset:v,borderRadius:_}=h,k=h.borderAlign==="inner";if(!p)return;n.setLineDash(y||[]),n.lineDashOffset=v,k?(n.lineWidth=p*2,n.lineJoin=b||"round"):(n.lineWidth=p,n.lineJoin=b||"bevel");let C=e.endAngle;if(r){ys(n,e,o,a,C,s);for(let j=0;j<r;++j)n.stroke();isNaN(f)||(C=u+(f%qt||qt))}k&&gS(n,e,C),h.selfJoin&&C-u>=zt&&_===0&&b!=="miter"&&hS(n,e,C),r||(ys(n,e,o,a,C,s),n.stroke())}class xS extends Li{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,o,a){const s=this.getProps(["x","y"],a),{angle:r,distance:u}=Kh(s,{x:e,y:o}),{startAngle:f,endAngle:h,innerRadius:p,outerRadius:b,circumference:y}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),v=(this.options.spacing+this.options.borderWidth)/2,_=_t(y,h-f),k=ma(r,f,h)&&f!==h,C=_>=qt||k,j=Ei(u,p+v,b+v);return C&&j}getCenterPoint(e){const{x:o,y:a,startAngle:s,endAngle:r,innerRadius:u,outerRadius:f}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:h,spacing:p}=this.options,b=(s+r)/2,y=(u+f+p+h)/2;return{x:o+Math.cos(b)*y,y:a+Math.sin(b)*y}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:o,circumference:a}=this,s=(o.offset||0)/4,r=(o.spacing||0)/2,u=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=a>qt?Math.floor(a/qt):0,a===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const f=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(f)*s,Math.sin(f)*s);const h=1-Math.sin(Math.min(zt,a||0)),p=s*h;e.fillStyle=o.backgroundColor,e.strokeStyle=o.borderColor,bS(e,this,p,r,u),yS(e,this,p,r,u),e.restore()}}function sp(n,e,o=e){n.lineCap=_t(o.borderCapStyle,e.borderCapStyle),n.setLineDash(_t(o.borderDash,e.borderDash)),n.lineDashOffset=_t(o.borderDashOffset,e.borderDashOffset),n.lineJoin=_t(o.borderJoinStyle,e.borderJoinStyle),n.lineWidth=_t(o.borderWidth,e.borderWidth),n.strokeStyle=_t(o.borderColor,e.borderColor)}function vS(n,e,o){n.lineTo(o.x,o.y)}function _S(n){return n.stepped?Q_:n.tension||n.cubicInterpolationMode==="monotone"?Z_:vS}function rp(n,e,o={}){const a=n.length,{start:s=0,end:r=a-1}=o,{start:u,end:f}=e,h=Math.max(s,u),p=Math.min(r,f),b=s<u&&r<u||s>f&&r>f;return{count:a,start:h,loop:e.loop,ilen:p<h&&!b?a+p-h:p-h}}function wS(n,e,o,a){const{points:s,options:r}=e,{count:u,start:f,loop:h,ilen:p}=rp(s,o,a),b=_S(r);let{move:y=!0,reverse:v}=a||{},_,k,C;for(_=0;_<=p;++_)k=s[(f+(v?p-_:_))%u],!k.skip&&(y?(n.moveTo(k.x,k.y),y=!1):b(n,C,k,v,r.stepped),C=k);return h&&(k=s[(f+(v?p:0))%u],b(n,C,k,v,r.stepped)),!!h}function SS(n,e,o,a){const s=e.points,{count:r,start:u,ilen:f}=rp(s,o,a),{move:h=!0,reverse:p}=a||{};let b=0,y=0,v,_,k,C,j,M;const D=z=>(u+(p?f-z:z))%r,U=()=>{C!==j&&(n.lineTo(b,j),n.lineTo(b,C),n.lineTo(b,M))};for(h&&(_=s[D(0)],n.moveTo(_.x,_.y)),v=0;v<=f;++v){if(_=s[D(v)],_.skip)continue;const z=_.x,w=_.y,Y=z|0;Y===k?(w<C?C=w:w>j&&(j=w),b=(y*b+z)/++y):(U(),n.lineTo(z,w),k=Y,y=0,C=j=w),M=w}U()}function Jc(n){const e=n.options,o=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!o?SS:wS}function jS(n){return n.stepped?A2:n.tension||n.cubicInterpolationMode==="monotone"?N2:Di}function kS(n,e,o,a){let s=e._path;s||(s=e._path=new Path2D,e.path(s,o,a)&&s.closePath()),sp(n,e.options),n.stroke(s)}function CS(n,e,o,a){const{segments:s,options:r}=e,u=Jc(e);for(const f of s)sp(n,r,f.style),n.beginPath(),u(n,e,f,{start:o,end:o+a-1})&&n.closePath(),n.stroke()}const ES=typeof Path2D=="function";function MS(n,e,o,a){ES&&!e.options.segment?kS(n,e,o,a):CS(n,e,o,a)}class xs extends Li{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"};constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,o){const a=this.options;if((a.tension||a.cubicInterpolationMode==="monotone")&&!a.stepped&&!this._pointsUpdated){const s=a.spanGaps?this._loop:this._fullLoop;w2(this._points,a,e,s,o),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=B2(this,this.options.segment))}first(){const e=this.segments,o=this.points;return e.length&&o[e[0].start]}last(){const e=this.segments,o=this.points,a=e.length;return a&&o[e[a-1].end]}interpolate(e,o){const a=this.options,s=e[o],r=this.points,u=_g(this,{property:o,start:s,end:s});if(!u.length)return;const f=[],h=jS(a);let p,b;for(p=0,b=u.length;p<b;++p){const{start:y,end:v}=u[p],_=r[y],k=r[v];if(_===k){f.push(_);continue}const C=Math.abs((s-_[o])/(k[o]-_[o])),j=h(_,k,C,a.stepped);j[o]=e[o],f.push(j)}return f.length===1?f[0]:f}pathSegment(e,o,a){return Jc(this)(e,this,o,a)}path(e,o,a){const s=this.segments,r=Jc(this);let u=this._loop;o=o||0,a=a||this.points.length-o;for(const f of s)u&=r(e,this,f,{start:o,end:o+a-1});return!!u}draw(e,o,a,s){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),MS(e,this,a,s),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function cp(n,e,o,a){const s=n.options,{[o]:r}=n.getProps([o],a);return Math.abs(e-r)<s.radius+s.hitRadius}class TS extends Li{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,o,a){const s=this.options,{x:r,y:u}=this.getProps(["x","y"],a);return Math.pow(e-r,2)+Math.pow(o-u,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(e,o){return cp(this,e,"x",o)}inYRange(e,o){return cp(this,e,"y",o)}getCenterPoint(e){const{x:o,y:a}=this.getProps(["x","y"],e);return{x:o,y:a}}size(e){e=e||this.options||{};let o=e.radius||0;o=Math.max(o,o&&e.hoverRadius||0);const a=o&&e.borderWidth||0;return(o+a)*2}draw(e,o){const a=this.options;this.skip||a.radius<.1||!xa(this,o,this.size(a)/2)||(e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.fillStyle=a.backgroundColor,zc(e,a,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function AS(n,e,o){const a=n.segments,s=n.points,r=e.points,u=[];for(const f of a){let{start:h,end:p}=f;p=vs(h,p,s);const b=tu(o,s[h],s[p],f.loop);if(!e.segments){u.push({source:f,target:b,start:s[h],end:s[p]});continue}const y=_g(e,b);for(const v of y){const _=tu(o,r[v.start],r[v.end],v.loop),k=vg(f,s,_);for(const C of k)u.push({source:C,target:v,start:{[o]:up(b,_,"start",Math.max)},end:{[o]:up(b,_,"end",Math.min)}})}}return u}function tu(n,e,o,a){if(a)return;let s=e[n],r=o[n];return n==="angle"&&(s=Ne(s),r=Ne(r)),{property:n,start:s,end:r}}function NS(n,e){const{x:o=null,y:a=null}=n||{},s=e.points,r=[];return e.segments.forEach(({start:u,end:f})=>{f=vs(u,f,s);const h=s[u],p=s[f];a!==null?(r.push({x:h.x,y:a}),r.push({x:p.x,y:a})):o!==null&&(r.push({x:o,y:h.y}),r.push({x:o,y:p.y}))}),r}function vs(n,e,o){for(;e>n;e--){const a=o[e];if(!isNaN(a.x)&&!isNaN(a.y))break}return e}function up(n,e,o,a){return n&&e?a(n[o],e[o]):n?n[o]:e?e[o]:0}function fp(n,e){let o=[],a=!1;return ie(n)?(a=!0,o=n):o=NS(n,e),o.length?new xs({points:o,options:{tension:0},_loop:a,_fullLoop:a}):null}function dp(n){return n&&n.fill!==!1}function OS(n,e,o){let s=n[e].fill;const r=[e];let u;if(!o)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!de(s))return s;if(u=n[s],!u)return!1;if(u.visible)return s;r.push(s),s=u.fill}return!1}function RS(n,e,o){const a=BS(n);if(kt(a))return isNaN(a.value)?!1:a;let s=parseFloat(a);return de(s)&&Math.floor(s)===s?DS(a[0],e,s,o):["origin","start","end","stack","shape"].indexOf(a)>=0&&a}function DS(n,e,o,a){return(n==="-"||n==="+")&&(o=e+o),o===e||o<0||o>=a?!1:o}function zS(n,e){let o=null;return n==="start"?o=e.bottom:n==="end"?o=e.top:kt(n)?o=e.getPixelForValue(n.value):e.getBasePixel&&(o=e.getBasePixel()),o}function LS(n,e,o){let a;return n==="start"?a=o:n==="end"?a=e.options.reverse?e.min:e.max:kt(n)?a=n.value:a=e.getBaseValue(),a}function BS(n){const e=n.options,o=e.fill;let a=_t(o&&o.target,o);return a===void 0&&(a=!!e.backgroundColor),a===!1||a===null?!1:a===!0?"origin":a}function HS(n){const{scale:e,index:o,line:a}=n,s=[],r=a.segments,u=a.points,f=US(e,o);f.push(fp({x:null,y:e.bottom},a));for(let h=0;h<r.length;h++){const p=r[h];for(let b=p.start;b<=p.end;b++)VS(s,u[b],f)}return new xs({points:s,options:{}})}function US(n,e){const o=[],a=n.getMatchingVisibleMetas("line");for(let s=0;s<a.length;s++){const r=a[s];if(r.index===e)break;r.hidden||o.unshift(r.dataset)}return o}function VS(n,e,o){const a=[];for(let s=0;s<o.length;s++){const r=o[s],{first:u,last:f,point:h}=PS(r,e,"x");if(!(!h||u&&f)){if(u)a.unshift(h);else if(n.push(h),!f)break}}n.push(...a)}function PS(n,e,o){const a=n.interpolate(e,o);if(!a)return{};const s=a[o],r=n.segments,u=n.points;let f=!1,h=!1;for(let p=0;p<r.length;p++){const b=r[p],y=u[b.start][o],v=u[b.end][o];if(Ei(s,y,v)){f=s===y,h=s===v;break}}return{first:f,last:h,point:a}}class hp{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,o,a){const{x:s,y:r,radius:u}=this;return o=o||{start:0,end:qt},e.arc(s,r,u,o.end,o.start,!0),!a.bounds}interpolate(e){const{x:o,y:a,radius:s}=this,r=e.angle;return{x:o+Math.cos(r)*s,y:a+Math.sin(r)*s,angle:r}}}function YS(n){const{chart:e,fill:o,line:a}=n;if(de(o))return qS(e,o);if(o==="stack")return HS(n);if(o==="shape")return!0;const s=FS(n);return s instanceof hp?s:fp(s,a)}function qS(n,e){const o=n.getDatasetMeta(e);return o&&n.isDatasetVisible(e)?o.dataset:null}function FS(n){return(n.scale||{}).getPointPositionForValue?GS(n):XS(n)}function XS(n){const{scale:e={},fill:o}=n,a=zS(o,e);if(de(a)){const s=e.isHorizontal();return{x:s?a:null,y:s?null:a}}return null}function GS(n){const{scale:e,fill:o}=n,a=e.options,s=e.getLabels().length,r=a.reverse?e.max:e.min,u=LS(o,e,r),f=[];if(a.grid.circular){const h=e.getPointPositionForValue(0,r);return new hp({x:h.x,y:h.y,radius:e.getDistanceFromCenterForValue(u)})}for(let h=0;h<s;++h)f.push(e.getPointPositionForValue(h,u));return f}function eu(n,e,o){const a=YS(e),{chart:s,index:r,line:u,scale:f,axis:h}=e,p=u.options,b=p.fill,y=p.backgroundColor,{above:v=y,below:_=y}=b||{},k=s.getDatasetMeta(r),C=jg(s,k);a&&u.points.length&&(ns(n,o),KS(n,{line:u,target:a,above:v,below:_,area:o,scale:f,axis:h,clip:C}),is(n))}function KS(n,e){const{line:o,target:a,above:s,below:r,area:u,scale:f,clip:h}=e,p=o._loop?"angle":e.axis;n.save();let b=r;r!==s&&(p==="x"?(gp(n,a,u.top),nu(n,{line:o,target:a,color:s,scale:f,property:p,clip:h}),n.restore(),n.save(),gp(n,a,u.bottom)):p==="y"&&(pp(n,a,u.left),nu(n,{line:o,target:a,color:r,scale:f,property:p,clip:h}),n.restore(),n.save(),pp(n,a,u.right),b=s)),nu(n,{line:o,target:a,color:b,scale:f,property:p,clip:h}),n.restore()}function gp(n,e,o){const{segments:a,points:s}=e;let r=!0,u=!1;n.beginPath();for(const f of a){const{start:h,end:p}=f,b=s[h],y=s[vs(h,p,s)];r?(n.moveTo(b.x,b.y),r=!1):(n.lineTo(b.x,o),n.lineTo(b.x,b.y)),u=!!e.pathSegment(n,f,{move:u}),u?n.closePath():n.lineTo(y.x,o)}n.lineTo(e.first().x,o),n.closePath(),n.clip()}function pp(n,e,o){const{segments:a,points:s}=e;let r=!0,u=!1;n.beginPath();for(const f of a){const{start:h,end:p}=f,b=s[h],y=s[vs(h,p,s)];r?(n.moveTo(b.x,b.y),r=!1):(n.lineTo(o,b.y),n.lineTo(b.x,b.y)),u=!!e.pathSegment(n,f,{move:u}),u?n.closePath():n.lineTo(o,y.y)}n.lineTo(o,e.first().y),n.closePath(),n.clip()}function nu(n,e){const{line:o,target:a,property:s,color:r,scale:u,clip:f}=e,h=AS(o,a,s);for(const{source:p,target:b,start:y,end:v}of h){const{style:{backgroundColor:_=r}={}}=p,k=a!==!0;n.save(),n.fillStyle=_,WS(n,u,f,k&&tu(s,y,v)),n.beginPath();const C=!!o.pathSegment(n,p);let j;if(k){C?n.closePath():mp(n,a,v,s);const M=!!a.pathSegment(n,b,{move:C,reverse:!0});j=C&&M,j||mp(n,a,y,s)}n.closePath(),n.fill(j?"evenodd":"nonzero"),n.restore()}}function WS(n,e,o,a){const s=e.chart.chartArea,{property:r,start:u,end:f}=a||{};if(r==="x"||r==="y"){let h,p,b,y;r==="x"?(h=u,p=s.top,b=f,y=s.bottom):(h=s.left,p=u,b=s.right,y=f),n.beginPath(),o&&(h=Math.max(h,o.left),b=Math.min(b,o.right),p=Math.max(p,o.top),y=Math.min(y,o.bottom)),n.rect(h,p,b-h,y-p),n.clip()}}function mp(n,e,o,a){const s=e.interpolate(o,a);s&&n.lineTo(s.x,s.y)}var $S={id:"filler",afterDatasetsUpdate(n,e,o){const a=(n.data.datasets||[]).length,s=[];let r,u,f,h;for(u=0;u<a;++u)r=n.getDatasetMeta(u),f=r.dataset,h=null,f&&f.options&&f instanceof xs&&(h={visible:n.isDatasetVisible(u),index:u,fill:RS(f,u,a),chart:n,axis:r.controller.options.indexAxis,scale:r.vScale,line:f}),r.$filler=h,s.push(h);for(u=0;u<a;++u)h=s[u],!(!h||h.fill===!1)&&(h.fill=OS(s,u,o.propagate))},beforeDraw(n,e,o){const a=o.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),r=n.chartArea;for(let u=s.length-1;u>=0;--u){const f=s[u].$filler;f&&(f.line.updateControlPoints(r,f.axis),a&&f.fill&&eu(n.ctx,f,r))}},beforeDatasetsDraw(n,e,o){if(o.drawTime!=="beforeDatasetsDraw")return;const a=n.getSortedVisibleDatasetMetas();for(let s=a.length-1;s>=0;--s){const r=a[s].$filler;dp(r)&&eu(n.ctx,r,n.chartArea)}},beforeDatasetDraw(n,e,o){const a=e.meta.$filler;!dp(a)||o.drawTime!=="beforeDatasetDraw"||eu(n.ctx,a,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const bp=(n,e)=>{let{boxHeight:o=e,boxWidth:a=e}=n;return n.usePointStyle&&(o=Math.min(o,e),a=n.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:o,itemHeight:Math.max(e,o)}},QS=(n,e)=>n!==null&&e!==null&&n.datasetIndex===e.datasetIndex&&n.index===e.index;class yp extends Li{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,o,a){this.maxWidth=e,this.maxHeight=o,this._margins=a,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let o=Ut(e.generateLabels,[this.chart],this)||[];e.filter&&(o=o.filter(a=>e.filter(a,this.chart.data))),e.sort&&(o=o.sort((a,s)=>e.sort(a,s,this.chart.data))),this.options.reverse&&o.reverse(),this.legendItems=o}fit(){const{options:e,ctx:o}=this;if(!e.display){this.width=this.height=0;return}const a=e.labels,s=_e(a.font),r=s.size,u=this._computeTitleHeight(),{boxWidth:f,itemHeight:h}=bp(a,r);let p,b;o.font=s.string,this.isHorizontal()?(p=this.maxWidth,b=this._fitRows(u,r,f,h)+10):(b=this.maxHeight,p=this._fitCols(u,s,f,h)+10),this.width=Math.min(p,e.maxWidth||this.maxWidth),this.height=Math.min(b,e.maxHeight||this.maxHeight)}_fitRows(e,o,a,s){const{ctx:r,maxWidth:u,options:{labels:{padding:f}}}=this,h=this.legendHitBoxes=[],p=this.lineWidths=[0],b=s+f;let y=e;r.textAlign="left",r.textBaseline="middle";let v=-1,_=-b;return this.legendItems.forEach((k,C)=>{const j=a+o/2+r.measureText(k.text).width;(C===0||p[p.length-1]+j+2*f>u)&&(y+=b,p[p.length-(C>0?0:1)]=0,_+=b,v++),h[C]={left:0,top:_,row:v,width:j,height:s},p[p.length-1]+=j+f}),y}_fitCols(e,o,a,s){const{ctx:r,maxHeight:u,options:{labels:{padding:f}}}=this,h=this.legendHitBoxes=[],p=this.columnSizes=[],b=u-e;let y=f,v=0,_=0,k=0,C=0;return this.legendItems.forEach((j,M)=>{const{itemWidth:D,itemHeight:U}=ZS(a,o,r,j,s);M>0&&_+U+2*f>b&&(y+=v+f,p.push({width:v,height:_}),k+=v+f,C++,v=_=0),h[M]={left:k,top:_,col:C,width:D,height:U},v=Math.max(v,D),_+=U+f}),y+=v,p.push({width:v,height:_}),y}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:o,options:{align:a,labels:{padding:s},rtl:r}}=this,u=ro(r,this.left,this.width);if(this.isHorizontal()){let f=0,h=Oe(a,this.left+s,this.right-this.lineWidths[f]);for(const p of o)f!==p.row&&(f=p.row,h=Oe(a,this.left+s,this.right-this.lineWidths[f])),p.top+=this.top+e+s,p.left=u.leftForLtr(u.x(h),p.width),h+=p.width+s}else{let f=0,h=Oe(a,this.top+e+s,this.bottom-this.columnSizes[f].height);for(const p of o)p.col!==f&&(f=p.col,h=Oe(a,this.top+e+s,this.bottom-this.columnSizes[f].height)),p.top=h,p.left+=this.left+s,p.left=u.leftForLtr(u.x(p.left),p.width),h+=p.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;ns(e,this),this._draw(),is(e)}}_draw(){const{options:e,columnSizes:o,lineWidths:a,ctx:s}=this,{align:r,labels:u}=e,f=Kt.color,h=ro(e.rtl,this.left,this.width),p=_e(u.font),{padding:b}=u,y=p.size,v=y/2;let _;this.drawTitle(),s.textAlign=h.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=p.string;const{boxWidth:k,boxHeight:C,itemHeight:j}=bp(u,y),M=function(Y,G,K){if(isNaN(k)||k<=0||isNaN(C)||C<0)return;s.save();const I=_t(K.lineWidth,1);if(s.fillStyle=_t(K.fillStyle,f),s.lineCap=_t(K.lineCap,"butt"),s.lineDashOffset=_t(K.lineDashOffset,0),s.lineJoin=_t(K.lineJoin,"miter"),s.lineWidth=I,s.strokeStyle=_t(K.strokeStyle,f),s.setLineDash(_t(K.lineDash,[])),u.usePointStyle){const J={radius:C*Math.SQRT2/2,pointStyle:K.pointStyle,rotation:K.rotation,borderWidth:I},ot=h.xPlus(Y,k/2),L=G+v;lg(s,J,ot,L,u.pointStyleWidth&&k)}else{const J=G+Math.max((y-C)/2,0),ot=h.leftForLtr(Y,k),L=va(K.borderRadius);s.beginPath(),Object.values(L).some(gt=>gt!==0)?Lc(s,{x:ot,y:J,w:k,h:C,radius:L}):s.rect(ot,J,k,C),s.fill(),I!==0&&s.stroke()}s.restore()},D=function(Y,G,K){os(s,K.text,Y,G+j/2,p,{strikethrough:K.hidden,textAlign:h.textAlign(K.textAlign)})},U=this.isHorizontal(),z=this._computeTitleHeight();U?_={x:Oe(r,this.left+b,this.right-a[0]),y:this.top+b+z,line:0}:_={x:this.left+b,y:Oe(r,this.top+z+b,this.bottom-o[0].height),line:0},mg(this.ctx,e.textDirection);const w=j+b;this.legendItems.forEach((Y,G)=>{s.strokeStyle=Y.fontColor,s.fillStyle=Y.fontColor;const K=s.measureText(Y.text).width,I=h.textAlign(Y.textAlign||(Y.textAlign=u.textAlign)),J=k+v+K;let ot=_.x,L=_.y;h.setWidth(this.width),U?G>0&&ot+J+b>this.right&&(L=_.y+=w,_.line++,ot=_.x=Oe(r,this.left+b,this.right-a[_.line])):G>0&&L+w>this.bottom&&(ot=_.x=ot+o[_.line].width+b,_.line++,L=_.y=Oe(r,this.top+z+b,this.bottom-o[_.line].height));const gt=h.x(ot);if(M(gt,L,Y),ot=B_(I,ot+k+v,U?ot+J:this.right,e.rtl),D(h.x(ot),L,Y),U)_.x+=J+b;else if(typeof Y.text!="string"){const rt=p.lineHeight;_.y+=xp(Y,rt)+b}else _.y+=w}),bg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,o=e.title,a=_e(o.font),s=cn(o.padding);if(!o.display)return;const r=ro(e.rtl,this.left,this.width),u=this.ctx,f=o.position,h=a.size/2,p=s.top+h;let b,y=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),b=this.top+p,y=Oe(e.align,y,this.right-v);else{const k=this.columnSizes.reduce((C,j)=>Math.max(C,j.height),0);b=p+Oe(e.align,this.top,this.bottom-k-e.labels.padding-this._computeTitleHeight())}const _=Oe(f,y,y+v);u.textAlign=r.textAlign(Ih(f)),u.textBaseline="middle",u.strokeStyle=o.color,u.fillStyle=o.color,u.font=a.string,os(u,o.text,_,b,a)}_computeTitleHeight(){const e=this.options.title,o=_e(e.font),a=cn(e.padding);return e.display?o.lineHeight+a.height:0}_getLegendItemAt(e,o){let a,s,r;if(Ei(e,this.left,this.right)&&Ei(o,this.top,this.bottom)){for(r=this.legendHitBoxes,a=0;a<r.length;++a)if(s=r[a],Ei(e,s.left,s.left+s.width)&&Ei(o,s.top,s.top+s.height))return this.legendItems[a]}return null}handleEvent(e){const o=this.options;if(!tj(e.type,o))return;const a=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const s=this._hoveredItem,r=QS(s,a);s&&!r&&Ut(o.onLeave,[e,s,this],this),this._hoveredItem=a,a&&!r&&Ut(o.onHover,[e,a,this],this)}else a&&Ut(o.onClick,[e,a,this],this)}}function ZS(n,e,o,a,s){const r=IS(a,n,e,o),u=JS(s,a,e.lineHeight);return{itemWidth:r,itemHeight:u}}function IS(n,e,o,a){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((r,u)=>r.length>u.length?r:u)),e+o.size/2+a.measureText(s).width}function JS(n,e,o){let a=n;return typeof e.text!="string"&&(a=xp(e,o)),a}function xp(n,e){const o=n.text?n.text.length:0;return e*o}function tj(n,e){return!!((n==="mousemove"||n==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(n==="click"||n==="mouseup"))}var ej={id:"legend",_element:yp,start(n,e,o){const a=n.legend=new yp({ctx:n.ctx,options:o,chart:n});Zn.configure(n,a,o),Zn.addBox(n,a)},stop(n){Zn.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,e,o){const a=n.legend;Zn.configure(n,a,o),a.options=o},afterUpdate(n){const e=n.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(n,e){e.replay||n.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,e,o){const a=e.datasetIndex,s=o.chart;s.isDatasetVisible(a)?(s.hide(a),e.hidden=!0):(s.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const e=n.data.datasets,{labels:{usePointStyle:o,pointStyle:a,textAlign:s,color:r,useBorderRadius:u,borderRadius:f}}=n.legend.options;return n._getSortedDatasetMetas().map(h=>{const p=h.controller.getStyle(o?0:void 0),b=cn(p.borderWidth);return{text:e[h.index].label,fillStyle:p.backgroundColor,fontColor:r,hidden:!h.visible,lineCap:p.borderCapStyle,lineDash:p.borderDash,lineDashOffset:p.borderDashOffset,lineJoin:p.borderJoinStyle,lineWidth:(b.width+b.height)/4,strokeStyle:p.borderColor,pointStyle:a||p.pointStyle,rotation:p.rotation,textAlign:s||p.textAlign,borderRadius:u&&(f||p.borderRadius),datasetIndex:h.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};const Ta={average(n){if(!n.length)return!1;let e,o,a=new Set,s=0,r=0;for(e=0,o=n.length;e<o;++e){const f=n[e].element;if(f&&f.hasValue()){const h=f.tooltipPosition();a.add(h.x),s+=h.y,++r}}return r===0||a.size===0?!1:{x:[...a].reduce((f,h)=>f+h)/a.size,y:s/r}},nearest(n,e){if(!n.length)return!1;let o=e.x,a=e.y,s=Number.POSITIVE_INFINITY,r,u,f;for(r=0,u=n.length;r<u;++r){const h=n[r].element;if(h&&h.hasValue()){const p=h.getCenterPoint(),b=Mc(e,p);b<s&&(s=b,f=h)}}if(f){const h=f.tooltipPosition();o=h.x,a=h.y}return{x:o,y:a}}};function bn(n,e){return e&&(ie(e)?Array.prototype.push.apply(n,e):n.push(e)),n}function Tn(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
`)>-1?n.split(`
`):n}function nj(n,e){const{element:o,datasetIndex:a,index:s}=e,r=n.getDatasetMeta(a).controller,{label:u,value:f}=r.getLabelAndValue(s);return{chart:n,label:u,parsed:r.getParsed(s),raw:n.data.datasets[a].data[s],formattedValue:f,dataset:r.getDataset(),dataIndex:s,datasetIndex:a,element:o}}function vp(n,e){const o=n.chart.ctx,{body:a,footer:s,title:r}=n,{boxWidth:u,boxHeight:f}=e,h=_e(e.bodyFont),p=_e(e.titleFont),b=_e(e.footerFont),y=r.length,v=s.length,_=a.length,k=cn(e.padding);let C=k.height,j=0,M=a.reduce((z,w)=>z+w.before.length+w.lines.length+w.after.length,0);if(M+=n.beforeBody.length+n.afterBody.length,y&&(C+=y*p.lineHeight+(y-1)*e.titleSpacing+e.titleMarginBottom),M){const z=e.displayColors?Math.max(f,h.lineHeight):h.lineHeight;C+=_*z+(M-_)*h.lineHeight+(M-1)*e.bodySpacing}v&&(C+=e.footerMarginTop+v*b.lineHeight+(v-1)*e.footerSpacing);let D=0;const U=function(z){j=Math.max(j,o.measureText(z).width+D)};return o.save(),o.font=p.string,Tt(n.title,U),o.font=h.string,Tt(n.beforeBody.concat(n.afterBody),U),D=e.displayColors?u+2+e.boxPadding:0,Tt(a,z=>{Tt(z.before,U),Tt(z.lines,U),Tt(z.after,U)}),D=0,o.font=b.string,Tt(n.footer,U),o.restore(),j+=k.width,{width:j,height:C}}function ij(n,e){const{y:o,height:a}=e;return o<a/2?"top":o>n.height-a/2?"bottom":"center"}function oj(n,e,o,a){const{x:s,width:r}=a,u=o.caretSize+o.caretPadding;if(n==="left"&&s+r+u>e.width||n==="right"&&s-r-u<0)return!0}function aj(n,e,o,a){const{x:s,width:r}=o,{width:u,chartArea:{left:f,right:h}}=n;let p="center";return a==="center"?p=s<=(f+h)/2?"left":"right":s<=r/2?p="left":s>=u-r/2&&(p="right"),oj(p,n,e,o)&&(p="center"),p}function _p(n,e,o){const a=o.yAlign||e.yAlign||ij(n,o);return{xAlign:o.xAlign||e.xAlign||aj(n,e,o,a),yAlign:a}}function lj(n,e){let{x:o,width:a}=n;return e==="right"?o-=a:e==="center"&&(o-=a/2),o}function sj(n,e,o){let{y:a,height:s}=n;return e==="top"?a+=o:e==="bottom"?a-=s+o:a-=s/2,a}function wp(n,e,o,a){const{caretSize:s,caretPadding:r,cornerRadius:u}=n,{xAlign:f,yAlign:h}=o,p=s+r,{topLeft:b,topRight:y,bottomLeft:v,bottomRight:_}=va(u);let k=lj(e,f);const C=sj(e,h,p);return h==="center"?f==="left"?k+=p:f==="right"&&(k-=p):f==="left"?k-=Math.max(b,v)+s:f==="right"&&(k+=Math.max(y,_)+s),{x:ye(k,0,a.width-e.width),y:ye(C,0,a.height-e.height)}}function _s(n,e,o){const a=cn(o.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-a.right:n.x+a.left}function Sp(n){return bn([],Tn(n))}function rj(n,e,o){return Ni(n,{tooltip:e,tooltipItems:o,type:"tooltip"})}function jp(n,e){const o=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return o?n.override(o):n}const kp={beforeTitle:Cn,title(n){if(n.length>0){const e=n[0],o=e.chart.data.labels,a=o?o.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return o[e.dataIndex]}return""},afterTitle:Cn,beforeBody:Cn,beforeLabel:Cn,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let e=n.dataset.label||"";e&&(e+=": ");const o=n.formattedValue;return Bt(o)||(e+=o),e},labelColor(n){const o=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:o.borderColor,backgroundColor:o.backgroundColor,borderWidth:o.borderWidth,borderDash:o.borderDash,borderDashOffset:o.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const o=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:o.pointStyle,rotation:o.rotation}},afterLabel:Cn,afterBody:Cn,beforeFooter:Cn,footer:Cn,afterFooter:Cn};function we(n,e,o,a){const s=n[e].call(o,a);return typeof s>"u"?kp[e].call(o,a):s}let Cp=class extends Li{static positioners=Ta;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const o=this.chart,a=this.options.setContext(this.getContext()),s=a.enabled&&o.options.animation&&a.animations,r=new Cg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=rj(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,o){const{callbacks:a}=o,s=we(a,"beforeTitle",this,e),r=we(a,"title",this,e),u=we(a,"afterTitle",this,e);let f=[];return f=bn(f,Tn(s)),f=bn(f,Tn(r)),f=bn(f,Tn(u)),f}getBeforeBody(e,o){return Sp(we(o.callbacks,"beforeBody",this,e))}getBody(e,o){const{callbacks:a}=o,s=[];return Tt(e,r=>{const u={before:[],lines:[],after:[]},f=jp(a,r);bn(u.before,Tn(we(f,"beforeLabel",this,r))),bn(u.lines,we(f,"label",this,r)),bn(u.after,Tn(we(f,"afterLabel",this,r))),s.push(u)}),s}getAfterBody(e,o){return Sp(we(o.callbacks,"afterBody",this,e))}getFooter(e,o){const{callbacks:a}=o,s=we(a,"beforeFooter",this,e),r=we(a,"footer",this,e),u=we(a,"afterFooter",this,e);let f=[];return f=bn(f,Tn(s)),f=bn(f,Tn(r)),f=bn(f,Tn(u)),f}_createItems(e){const o=this._active,a=this.chart.data,s=[],r=[],u=[];let f=[],h,p;for(h=0,p=o.length;h<p;++h)f.push(nj(this.chart,o[h]));return e.filter&&(f=f.filter((b,y,v)=>e.filter(b,y,v,a))),e.itemSort&&(f=f.sort((b,y)=>e.itemSort(b,y,a))),Tt(f,b=>{const y=jp(e.callbacks,b);s.push(we(y,"labelColor",this,b)),r.push(we(y,"labelPointStyle",this,b)),u.push(we(y,"labelTextColor",this,b))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=u,this.dataPoints=f,f}update(e,o){const a=this.options.setContext(this.getContext()),s=this._active;let r,u=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const f=Ta[a.position].call(this,s,this._eventPosition);u=this._createItems(a),this.title=this.getTitle(u,a),this.beforeBody=this.getBeforeBody(u,a),this.body=this.getBody(u,a),this.afterBody=this.getAfterBody(u,a),this.footer=this.getFooter(u,a);const h=this._size=vp(this,a),p=Object.assign({},f,h),b=_p(this.chart,a,p),y=wp(a,p,b,this.chart);this.xAlign=b.xAlign,this.yAlign=b.yAlign,r={opacity:1,x:y.x,y:y.y,width:h.width,height:h.height,caretX:f.x,caretY:f.y}}this._tooltipItems=u,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:o})}drawCaret(e,o,a,s){const r=this.getCaretPosition(e,a,s);o.lineTo(r.x1,r.y1),o.lineTo(r.x2,r.y2),o.lineTo(r.x3,r.y3)}getCaretPosition(e,o,a){const{xAlign:s,yAlign:r}=this,{caretSize:u,cornerRadius:f}=a,{topLeft:h,topRight:p,bottomLeft:b,bottomRight:y}=va(f),{x:v,y:_}=e,{width:k,height:C}=o;let j,M,D,U,z,w;return r==="center"?(z=_+C/2,s==="left"?(j=v,M=j-u,U=z+u,w=z-u):(j=v+k,M=j+u,U=z-u,w=z+u),D=j):(s==="left"?M=v+Math.max(h,b)+u:s==="right"?M=v+k-Math.max(p,y)-u:M=this.caretX,r==="top"?(U=_,z=U-u,j=M-u,D=M+u):(U=_+C,z=U+u,j=M+u,D=M-u),w=U),{x1:j,x2:M,x3:D,y1:U,y2:z,y3:w}}drawTitle(e,o,a){const s=this.title,r=s.length;let u,f,h;if(r){const p=ro(a.rtl,this.x,this.width);for(e.x=_s(this,a.titleAlign,a),o.textAlign=p.textAlign(a.titleAlign),o.textBaseline="middle",u=_e(a.titleFont),f=a.titleSpacing,o.fillStyle=a.titleColor,o.font=u.string,h=0;h<r;++h)o.fillText(s[h],p.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+f,h+1===r&&(e.y+=a.titleMarginBottom-f)}}_drawColorBox(e,o,a,s,r){const u=this.labelColors[a],f=this.labelPointStyles[a],{boxHeight:h,boxWidth:p}=r,b=_e(r.bodyFont),y=_s(this,"left",r),v=s.x(y),_=h<b.lineHeight?(b.lineHeight-h)/2:0,k=o.y+_;if(r.usePointStyle){const C={radius:Math.min(p,h)/2,pointStyle:f.pointStyle,rotation:f.rotation,borderWidth:1},j=s.leftForLtr(v,p)+p/2,M=k+h/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,zc(e,C,j,M),e.strokeStyle=u.borderColor,e.fillStyle=u.backgroundColor,zc(e,C,j,M)}else{e.lineWidth=kt(u.borderWidth)?Math.max(...Object.values(u.borderWidth)):u.borderWidth||1,e.strokeStyle=u.borderColor,e.setLineDash(u.borderDash||[]),e.lineDashOffset=u.borderDashOffset||0;const C=s.leftForLtr(v,p),j=s.leftForLtr(s.xPlus(v,1),p-2),M=va(u.borderRadius);Object.values(M).some(D=>D!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,Lc(e,{x:C,y:k,w:p,h,radius:M}),e.fill(),e.stroke(),e.fillStyle=u.backgroundColor,e.beginPath(),Lc(e,{x:j,y:k+1,w:p-2,h:h-2,radius:M}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(C,k,p,h),e.strokeRect(C,k,p,h),e.fillStyle=u.backgroundColor,e.fillRect(j,k+1,p-2,h-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,o,a){const{body:s}=this,{bodySpacing:r,bodyAlign:u,displayColors:f,boxHeight:h,boxWidth:p,boxPadding:b}=a,y=_e(a.bodyFont);let v=y.lineHeight,_=0;const k=ro(a.rtl,this.x,this.width),C=function(K){o.fillText(K,k.x(e.x+_),e.y+v/2),e.y+=v+r},j=k.textAlign(u);let M,D,U,z,w,Y,G;for(o.textAlign=u,o.textBaseline="middle",o.font=y.string,e.x=_s(this,j,a),o.fillStyle=a.bodyColor,Tt(this.beforeBody,C),_=f&&j!=="right"?u==="center"?p/2+b:p+2+b:0,z=0,Y=s.length;z<Y;++z){for(M=s[z],D=this.labelTextColors[z],o.fillStyle=D,Tt(M.before,C),U=M.lines,f&&U.length&&(this._drawColorBox(o,e,z,k,a),v=Math.max(y.lineHeight,h)),w=0,G=U.length;w<G;++w)C(U[w]),v=y.lineHeight;Tt(M.after,C)}_=0,v=y.lineHeight,Tt(this.afterBody,C),e.y-=r}drawFooter(e,o,a){const s=this.footer,r=s.length;let u,f;if(r){const h=ro(a.rtl,this.x,this.width);for(e.x=_s(this,a.footerAlign,a),e.y+=a.footerMarginTop,o.textAlign=h.textAlign(a.footerAlign),o.textBaseline="middle",u=_e(a.footerFont),o.fillStyle=a.footerColor,o.font=u.string,f=0;f<r;++f)o.fillText(s[f],h.x(e.x),e.y+u.lineHeight/2),e.y+=u.lineHeight+a.footerSpacing}}drawBackground(e,o,a,s){const{xAlign:r,yAlign:u}=this,{x:f,y:h}=e,{width:p,height:b}=a,{topLeft:y,topRight:v,bottomLeft:_,bottomRight:k}=va(s.cornerRadius);o.fillStyle=s.backgroundColor,o.strokeStyle=s.borderColor,o.lineWidth=s.borderWidth,o.beginPath(),o.moveTo(f+y,h),u==="top"&&this.drawCaret(e,o,a,s),o.lineTo(f+p-v,h),o.quadraticCurveTo(f+p,h,f+p,h+v),u==="center"&&r==="right"&&this.drawCaret(e,o,a,s),o.lineTo(f+p,h+b-k),o.quadraticCurveTo(f+p,h+b,f+p-k,h+b),u==="bottom"&&this.drawCaret(e,o,a,s),o.lineTo(f+_,h+b),o.quadraticCurveTo(f,h+b,f,h+b-_),u==="center"&&r==="left"&&this.drawCaret(e,o,a,s),o.lineTo(f,h+y),o.quadraticCurveTo(f,h,f+y,h),o.closePath(),o.fill(),s.borderWidth>0&&o.stroke()}_updateAnimationTarget(e){const o=this.chart,a=this.$animations,s=a&&a.x,r=a&&a.y;if(s||r){const u=Ta[e.position].call(this,this._active,this._eventPosition);if(!u)return;const f=this._size=vp(this,e),h=Object.assign({},u,this._size),p=_p(o,e,h),b=wp(e,h,p,o);(s._to!==b.x||r._to!==b.y)&&(this.xAlign=p.xAlign,this.yAlign=p.yAlign,this.width=f.width,this.height=f.height,this.caretX=u.x,this.caretY=u.y,this._resolveAnimations().update(this,b))}}_willRender(){return!!this.opacity}draw(e){const o=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(o);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const u=cn(o.padding),f=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;o.enabled&&f&&(e.save(),e.globalAlpha=a,this.drawBackground(r,e,s,o),mg(e,o.textDirection),r.y+=u.top,this.drawTitle(r,e,o),this.drawBody(r,e,o),this.drawFooter(r,e,o),bg(e,o.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,o){const a=this._active,s=e.map(({datasetIndex:f,index:h})=>{const p=this.chart.getDatasetMeta(f);if(!p)throw new Error("Cannot find a dataset at index "+f);return{datasetIndex:f,element:p.data[h],index:h}}),r=!Zl(a,s),u=this._positionChanged(s,o);(r||u)&&(this._active=s,this._eventPosition=o,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,o,a=!0){if(o&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],u=this._getActiveElements(e,r,o,a),f=this._positionChanged(u,e),h=o||!Zl(u,r)||f;return h&&(this._active=u,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,o))),h}_getActiveElements(e,o,a,s){const r=this.options;if(e.type==="mouseout")return[];if(!s)return o.filter(f=>this.chart.data.datasets[f.datasetIndex]&&this.chart.getDatasetMeta(f.datasetIndex).controller.getParsed(f.index)!==void 0);const u=this.chart.getElementsAtEventForMode(e,r.mode,r,a);return r.reverse&&u.reverse(),u}_positionChanged(e,o){const{caretX:a,caretY:s,options:r}=this,u=Ta[r.position].call(this,e,o);return u!==!1&&(a!==u.x||s!==u.y)}};var Ep={id:"tooltip",_element:Cp,positioners:Ta,afterInit(n,e,o){o&&(n.tooltip=new Cp({chart:n,options:o}))},beforeUpdate(n,e,o){n.tooltip&&n.tooltip.initialize(o)},reset(n,e,o){n.tooltip&&n.tooltip.initialize(o)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const o={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",{...o,cancelable:!0})===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",o)}},afterEvent(n,e){if(n.tooltip){const o=e.replay;n.tooltip.handleEvent(e.event,o,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:kp},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const cj=(n,e,o,a)=>(typeof e=="string"?(o=n.push(e)-1,a.unshift({index:o,label:e})):isNaN(e)&&(o=null),o);function uj(n,e,o,a){const s=n.indexOf(e);if(s===-1)return cj(n,e,o,a);const r=n.lastIndexOf(e);return s!==r?o:s}const fj=(n,e)=>n===null?null:ye(Math.round(n),0,e);function Mp(n){const e=this.getLabels();return n>=0&&n<e.length?e[n]:n}class dj extends co{static id="category";static defaults={ticks:{callback:Mp}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const o=this._addedLabels;if(o.length){const a=this.getLabels();for(const{index:s,label:r}of o)a[s]===r&&a.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,o){if(Bt(e))return null;const a=this.getLabels();return o=isFinite(o)&&a[o]===e?o:uj(a,e,_t(o,e),this._addedLabels),fj(o,a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:o}=this.getUserBounds();let{min:a,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(a=0),o||(s=this.getLabels().length-1)),this.min=a,this.max=s}buildTicks(){const e=this.min,o=this.max,a=this.options.offset,s=[];let r=this.getLabels();r=e===0&&o===r.length-1?r:r.slice(e,o+1),this._valueRange=Math.max(r.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let u=e;u<=o;u++)s.push({value:u});return s}getLabelForValue(e){return Mp.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const o=this.ticks;return e<0||e>o.length-1?null:this.getPixelForValue(o[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function hj(n,e){const o=[],{bounds:s,step:r,min:u,max:f,precision:h,count:p,maxTicks:b,maxDigits:y,includeBounds:v}=n,_=r||1,k=b-1,{min:C,max:j}=e,M=!Bt(u),D=!Bt(f),U=!Bt(p),z=(j-C)/(y+1);let w=Xh((j-C)/k/_)*_,Y,G,K,I;if(w<1e-14&&!M&&!D)return[{value:C},{value:j}];I=Math.ceil(j/w)-Math.floor(C/w),I>k&&(w=Xh(I*w/k/_)*_),Bt(h)||(Y=Math.pow(10,h),w=Math.ceil(w*Y)/Y),s==="ticks"?(G=Math.floor(C/w)*w,K=Math.ceil(j/w)*w):(G=C,K=j),M&&D&&r&&E_((f-u)/r,w/1e3)?(I=Math.round(Math.min((f-u)/w,b)),w=(f-u)/I,G=u,K=f):U?(G=M?u:G,K=D?f:K,I=p-1,w=(K-G)/I):(I=(K-G)/w,ga(I,Math.round(I),w/1e3)?I=Math.round(I):I=Math.ceil(I));const J=Math.max(Gh(w),Gh(G));Y=Math.pow(10,Bt(h)?J:h),G=Math.round(G*Y)/Y,K=Math.round(K*Y)/Y;let ot=0;for(M&&(v&&G!==u?(o.push({value:u}),G<u&&ot++,ga(Math.round((G+ot*w)*Y)/Y,u,Tp(u,z,n))&&ot++):G<u&&ot++);ot<I;++ot){const L=Math.round((G+ot*w)*Y)/Y;if(D&&L>f)break;o.push({value:L})}return D&&v&&K!==f?o.length&&ga(o[o.length-1].value,f,Tp(f,z,n))?o[o.length-1].value=f:o.push({value:f}):(!D||K===f)&&o.push({value:K}),o}function Tp(n,e,{horizontal:o,minRotation:a}){const s=En(a),r=(o?Math.sin(s):Math.cos(s))||.001,u=.75*e*(""+n).length;return Math.min(e/r,u)}class gj extends co{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,o){return Bt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:o,maxDefined:a}=this.getUserBounds();let{min:s,max:r}=this;const u=h=>s=o?s:h,f=h=>r=a?r:h;if(e){const h=ao(s),p=ao(r);h<0&&p<0?f(0):h>0&&p>0&&u(0)}if(s===r){let h=r===0?1:Math.abs(r*.05);f(r+h),e||u(s-h)}this.min=s,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:o,stepSize:a}=e,s;return a?(s=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),o=o||11),o&&(s=Math.min(o,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,o=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const s={maxTicks:a,bounds:e.bounds,min:e.min,max:e.max,precision:o.precision,step:o.stepSize,count:o.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:o.minRotation||0,includeBounds:o.includeBounds!==!1},r=this._range||this,u=hj(s,r);return e.bounds==="ticks"&&M_(u,this,"value"),e.reverse?(u.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),u}configure(){const e=this.ticks;let o=this.min,a=this.max;if(super.configure(),this.options.offset&&e.length){const s=(a-o)/Math.max(e.length-1,1)/2;o-=s,a+=s}this._startValue=o,this._endValue=a,this._valueRange=a-o}getLabelForValue(e){return Oc(e,this.chart.options.locale,this.options.ticks.format)}}class pj extends gj{static id="linear";static defaults={ticks:{callback:ig.formatters.numeric}};determineDataLimits(){const{min:e,max:o}=this.getMinMax(!0);this.min=de(e)?e:0,this.max=de(o)?o:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),o=e?this.width:this.height,a=En(this.options.ticks.minRotation),s=(e?Math.sin(a):Math.cos(a))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(o/Math.min(40,r.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const ws={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Se=Object.keys(ws);function Ap(n,e){return n-e}function Np(n,e){if(Bt(e))return null;const o=n._adapter,{parser:a,round:s,isoWeekday:r}=n._parseOpts;let u=e;return typeof a=="function"&&(u=a(u)),de(u)||(u=typeof a=="string"?o.parse(u,a):o.parse(u)),u===null?null:(s&&(u=s==="week"&&(pa(r)||r===!0)?o.startOf(u,"isoWeek",r):o.startOf(u,s)),+u)}function Op(n,e,o,a){const s=Se.length;for(let r=Se.indexOf(n);r<s-1;++r){const u=ws[Se[r]],f=u.steps?u.steps:Number.MAX_SAFE_INTEGER;if(u.common&&Math.ceil((o-e)/(f*u.size))<=a)return Se[r]}return Se[s-1]}function mj(n,e,o,a,s){for(let r=Se.length-1;r>=Se.indexOf(o);r--){const u=Se[r];if(ws[u].common&&n._adapter.diff(s,a,u)>=e-1)return u}return Se[o?Se.indexOf(o):0]}function bj(n){for(let e=Se.indexOf(n)+1,o=Se.length;e<o;++e)if(ws[Se[e]].common)return Se[e]}function Rp(n,e,o){if(!o)n[e]=!0;else if(o.length){const{lo:a,hi:s}=Tc(o,e),r=o[a]>=e?o[a]:o[s];n[r]=!0}}function yj(n,e,o,a){const s=n._adapter,r=+s.startOf(e[0].value,a),u=e[e.length-1].value;let f,h;for(f=r;f<=u;f=+s.add(f,1,a))h=o[f],h>=0&&(e[h].major=!0);return e}function Dp(n,e,o){const a=[],s={},r=e.length;let u,f;for(u=0;u<r;++u)f=e[u],s[f]=u,a.push({value:f,major:!1});return r===0||!o?a:yj(n,a,s,o)}class zp extends co{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,o={}){const a=e.time||(e.time={}),s=this._adapter=new ow._date(e.adapters.date);s.init(o),da(a.displayFormats,s.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=o.normalized}parse(e,o){return e===void 0?null:Np(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,o=this._adapter,a=e.time.unit||"day";let{min:s,max:r,minDefined:u,maxDefined:f}=this.getUserBounds();function h(p){!u&&!isNaN(p.min)&&(s=Math.min(s,p.min)),!f&&!isNaN(p.max)&&(r=Math.max(r,p.max))}(!u||!f)&&(h(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&h(this.getMinMax(!1))),s=de(s)&&!isNaN(s)?s:+o.startOf(Date.now(),a),r=de(r)&&!isNaN(r)?r:+o.endOf(Date.now(),a)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(o=e[0],a=e[e.length-1]),{min:o,max:a}}buildTicks(){const e=this.options,o=e.time,a=e.ticks,s=a.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const r=this.min,u=this.max,f=R_(s,r,u);return this._unit=o.unit||(a.autoSkip?Op(o.minUnit,this.min,this.max,this._getLabelCapacity(r)):mj(this,f.length,o.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:bj(this._unit),this.initOffsets(s),e.reverse&&f.reverse(),Dp(this,f,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let o=0,a=0,s,r;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?o=1-s:o=(this.getDecimalForValue(e[1])-s)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?a=r:a=(r-this.getDecimalForValue(e[e.length-2]))/2);const u=e.length<3?.5:.25;o=ye(o,0,u),a=ye(a,0,u),this._offsets={start:o,end:a,factor:1/(o+1+a)}}_generate(){const e=this._adapter,o=this.min,a=this.max,s=this.options,r=s.time,u=r.unit||Op(r.minUnit,o,a,this._getLabelCapacity(o)),f=_t(s.ticks.stepSize,1),h=u==="week"?r.isoWeekday:!1,p=pa(h)||h===!0,b={};let y=o,v,_;if(p&&(y=+e.startOf(y,"isoWeek",h)),y=+e.startOf(y,p?"day":u),e.diff(a,o,u)>1e5*f)throw new Error(o+" and "+a+" are too far apart with stepSize of "+f+" "+u);const k=s.ticks.source==="data"&&this.getDataTimestamps();for(v=y,_=0;v<a;v=+e.add(v,f,u),_++)Rp(b,v,k);return(v===a||s.bounds==="ticks"||_===1)&&Rp(b,v,k),Object.keys(b).sort(Ap).map(C=>+C)}getLabelForValue(e){const o=this._adapter,a=this.options.time;return a.tooltipFormat?o.format(e,a.tooltipFormat):o.format(e,a.displayFormats.datetime)}format(e,o){const s=this.options.time.displayFormats,r=this._unit,u=o||s[r];return this._adapter.format(e,u)}_tickFormatFunction(e,o,a,s){const r=this.options,u=r.ticks.callback;if(u)return Ut(u,[e,o,a],this);const f=r.time.displayFormats,h=this._unit,p=this._majorUnit,b=h&&f[h],y=p&&f[p],v=a[o],_=p&&y&&v&&v.major;return this._adapter.format(e,s||(_?y:b))}generateTickLabels(e){let o,a,s;for(o=0,a=e.length;o<a;++o)s=e[o],s.label=this._tickFormatFunction(s.value,o,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const o=this._offsets,a=this.getDecimalForValue(e);return this.getPixelForDecimal((o.start+a)*o.factor)}getValueForPixel(e){const o=this._offsets,a=this.getDecimalForPixel(e)/o.factor-o.end;return this.min+a*(this.max-this.min)}_getLabelSize(e){const o=this.options.ticks,a=this.ctx.measureText(e).width,s=En(this.isHorizontal()?o.maxRotation:o.minRotation),r=Math.cos(s),u=Math.sin(s),f=this._resolveTickFontOptions(0).size;return{w:a*r+f*u,h:a*u+f*r}}_getLabelCapacity(e){const o=this.options.time,a=o.displayFormats,s=a[o.unit]||a.millisecond,r=this._tickFormatFunction(e,0,Dp(this,[e],this._majorUnit),s),u=this._getLabelSize(r),f=Math.floor(this.isHorizontal()?this.width/u.w:this.height/u.h)-1;return f>0?f:1}getDataTimestamps(){let e=this._cache.data||[],o,a;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(o=0,a=s.length;o<a;++o)e=e.concat(s[o].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let o,a;if(e.length)return e;const s=this.getLabels();for(o=0,a=s.length;o<a;++o)e.push(Np(this,s[o]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return z_(e.sort(Ap))}}function Ss(n,e,o){let a=0,s=n.length-1,r,u,f,h;o?(e>=n[a].pos&&e<=n[s].pos&&({lo:a,hi:s}=Mi(n,"pos",e)),{pos:r,time:f}=n[a],{pos:u,time:h}=n[s]):(e>=n[a].time&&e<=n[s].time&&({lo:a,hi:s}=Mi(n,"time",e)),{time:r,pos:f}=n[a],{time:u,pos:h}=n[s]);const p=u-r;return p?f+(h-f)*(e-r)/p:f}class mC extends zp{static id="timeseries";static defaults=zp.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),o=this._table=this.buildLookupTable(e);this._minPos=Ss(o,this.min),this._tableRange=Ss(o,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:o,max:a}=this,s=[],r=[];let u,f,h,p,b;for(u=0,f=e.length;u<f;++u)p=e[u],p>=o&&p<=a&&s.push(p);if(s.length<2)return[{time:o,pos:0},{time:a,pos:1}];for(u=0,f=s.length;u<f;++u)b=s[u+1],h=s[u-1],p=s[u],Math.round((b+h)/2)!==p&&r.push({time:p,pos:u/(f-1)});return r}_generate(){const e=this.min,o=this.max;let a=super.getDataTimestamps();return(!a.includes(e)||!a.length)&&a.splice(0,0,e),(!a.includes(o)||a.length===1)&&a.push(o),a.sort((s,r)=>s-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const o=this.getDataTimestamps(),a=this.getLabelTimestamps();return o.length&&a.length?e=this.normalize(o.concat(a)):e=o.length?o:a,e=this._cache.all=e,e}getDecimalForValue(e){return(Ss(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const o=this._offsets,a=this.getDecimalForPixel(e)/o.factor-o.end;return Ss(this._table,a*this._tableRange+this._minPos,!0)}}const Lp="label";function Bp(n,e){typeof n=="function"?n(e):n&&(n.current=e)}function xj(n,e){const o=n.options;o&&e&&Object.assign(o,e)}function Hp(n,e){n.labels=e}function Up(n,e,o=Lp){const a=[];n.datasets=e.map(s=>{const r=n.datasets.find(u=>u[o]===s[o]);return!r||!s.data||a.includes(r)?{...s}:(a.push(r),Object.assign(r,s),r)})}function vj(n,e=Lp){const o={labels:[],datasets:[]};return Hp(o,n.labels),Up(o,n.datasets,e),o}function _j(n,e){const{height:o=150,width:a=300,redraw:s=!1,datasetIdKey:r,type:u,data:f,options:h,plugins:p=[],fallbackContent:b,updateMode:y,...v}=n,_=E.useRef(null),k=E.useRef(null),C=()=>{_.current&&(k.current=new Ma(_.current,{type:u,data:vj(f,r),options:h&&{...h},plugins:p}),Bp(e,k.current))},j=()=>{Bp(e,null),k.current&&(k.current.destroy(),k.current=null)};return E.useEffect(()=>{!s&&k.current&&h&&xj(k.current,h)},[s,h]),E.useEffect(()=>{!s&&k.current&&Hp(k.current.config.data,f.labels)},[s,f.labels]),E.useEffect(()=>{!s&&k.current&&f.datasets&&Up(k.current.config.data,f.datasets,r)},[s,f.datasets]),E.useEffect(()=>{k.current&&(s?(j(),setTimeout(C)):k.current.update(y))},[s,h,f.labels,f.datasets,y]),E.useEffect(()=>{k.current&&(j(),setTimeout(C))},[u]),E.useEffect(()=>(C(),()=>j()),[]),g.jsx("canvas",{ref:_,role:"img",height:o,width:a,...v,children:b})}const wj=E.forwardRef(_j);function Vp(n,e){return Ma.register(e),E.forwardRef((o,a)=>g.jsx(wj,{...o,ref:a,type:n}))}const Sj=Vp("line",iw),jj=Vp("doughnut",nw);Ma.register(dj,pj,TS,xs,Ep,ej,$S);const iu=[{key:"all",label:"All"},{key:"visitors",label:"Visitor"},{key:"views",label:"Views"},{key:"conversions",label:"Conversion"}],ou={visitors:{border:"#6366f1",bg:"rgba(99,102,241,0.08)"},views:{border:"#8b5cf6",bg:"rgba(139,92,246,0.08)"},conversions:{border:"#0084ff",bg:"rgba(0,132,255,0.08)"}},kj={visitors:"bg-indigo-500",views:"bg-purple-500",conversions:"bg-[#0084ff]"};function Cj({chartData:n,loading:e}){const[o,a]=E.useState("all"),s=o==="all"?["visitors","views","conversions"]:[o],r=s.map(h=>({label:iu.find(p=>p.key===h)?.label||h,data:n?.datasets?.[h]||[],borderColor:ou[h].border,backgroundColor:ou[h].bg,fill:!0,tension:.4,pointRadius:4,pointHoverRadius:6,pointBackgroundColor:ou[h].border,borderWidth:2})),u={labels:n?.labels||[],datasets:r},f={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{backgroundColor:"#1e293b",titleColor:"#94a3b8",bodyColor:"#f1f5f9",padding:10,cornerRadius:8}},scales:{x:{grid:{color:"rgba(0,0,0,0.04)"},ticks:{color:"#94a3b8",font:{size:11}}},y:{beginAtZero:!0,grid:{color:"rgba(0,0,0,0.04)"},ticks:{color:"#94a3b8",font:{size:11},precision:0}}}};return g.jsxs("div",{className:"bg-white rounded shadow-sm border border-gray-100 p-5",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-5",children:[g.jsx("h3",{className:"text-sm font-semibold text-gray-700 m-0",children:"Performance Trendline"}),g.jsx("div",{className:"flex items-center flex-wrap gap-3",children:s.map(h=>g.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-gray-500",children:[g.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full ${kj[h]}`}),iu.find(p=>p.key===h)?.label]},h))})]}),g.jsx("div",{className:"flex items-center gap-2 mb-5",children:iu.map(h=>g.jsx("button",{onClick:()=>a(h.key),className:`px-3 py-1.5 rounded text-xs font-medium transition-colors border ${o===h.key?"bg-indigo-600 text-white border-indigo-600":"bg-white text-gray-500 border-gray-200 hover:border-indigo-300 hover:text-indigo-600"}`,children:h.label},h.key))}),g.jsx("div",{className:"relative",style:{height:220},children:e?g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-6 h-6 border-2 border-indigo-300 border-t-indigo-600 rounded-full animate-spin"})}):n?.labels?.length===0?g.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-sm text-gray-400",children:"No data for selected period"}):g.jsx(Sj,{data:u,options:f})})]})}const Ej=window.mcsAdmin?.strings??{},Mj=(()=>{try{const n=document.createElement("textarea");return e=>(n.innerHTML=e,n.value)}catch{return n=>n}})(),O=n=>Mj(Ej[n]??n);Ma.register(xS,Ep);const Tj={desktop:{label:"Desktop",icon:g.jsx(B1,{size:22,strokeWidth:1.8}),iconColor:"text-blue-500",colors:["#93c5fd","#3b82f6","#1e3a8a"]},mobile:{label:"Mobile",icon:g.jsx(A1,{size:20,strokeWidth:1.8}),iconColor:"text-green-500",colors:["#86efac","#22c55e","#14532d"]},other:{label:"Others",icon:g.jsx(Y1,{size:20,strokeWidth:1.8}),iconColor:"text-purple-500",colors:["#c4b5fd","#8b5cf6","#4c1d95"]}},Aj=[{key:"views",label:"View",dotIdx:0},{key:"conversions",label:"Conversion",dotIdx:1},{key:"visitors",label:"Visitors",dotIdx:2}];function Nj({deviceKey:n,stats:e,loading:o}){const a=Tj[n],s=[e.views,e.conversions,e.visitors],r=s.reduce((h,p)=>h+p,0),u={datasets:[{data:r>0?s:[1],backgroundColor:r>0?a.colors:["#e5e7eb"],borderWidth:0,hoverOffset:2}]},f={cutout:"68%",plugins:{legend:{display:!1},tooltip:{enabled:r>0}},animation:{duration:600}};return g.jsxs("div",{className:"bg-white rounded shadow-sm border border-gray-100 p-5 flex flex-col items-center",children:[g.jsx("div",{className:"relative mb-4",style:{width:110,height:110},children:o?g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-5 h-5 border-2 border-gray-200 border-t-gray-400 rounded-full animate-spin"})}):g.jsxs(g.Fragment,{children:[g.jsx(jj,{data:u,options:f}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-0.5",children:[g.jsx("span",{className:a.iconColor,children:a.icon}),g.jsx("span",{className:"text-xs font-semibold text-gray-700",children:O(a.label)})]})]})}),g.jsx("div",{className:"w-full space-y-2",children:Aj.map(h=>g.jsxs("div",{className:"flex items-center justify-between text-sm",children:[g.jsxs("span",{className:"flex items-center gap-2 text-gray-500",children:[g.jsx("span",{className:"inline-block w-2 h-2 rounded-full flex-shrink-0",style:{background:a.colors[h.dotIdx]}}),O(h.label)]}),g.jsx("span",{className:"font-semibold text-gray-700",children:o?"—":e[h.key].toLocaleString()})]},h.key))})]})}function Oj({deviceData:n,loading:e}){const o={views:0,conversions:0,visitors:0},a=n||{desktop:o,mobile:o,other:o};return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-gray-700 m-0",children:O("Devices")}),g.jsx("div",{className:"grid grid-cols-3 gap-4",children:["desktop","mobile","other"].map(s=>g.jsx(Nj,{deviceKey:s,stats:a[s]||o,loading:e},s))})]})}const Pp="https://flagcdn.com/16x12",{demoUrl:Yp="",isPro:Rj=!1}=window.mcsAdmin||{},Dj=(n="")=>Yp?`${Yp}${n}`:"#";function zj({code:n}){if(!n||n.length!==2)return null;const e=n.toLowerCase();return g.jsx("img",{src:`${Pp}/${e}.png`,srcSet:`${Pp}/${e}.png 1x, https://flagcdn.com/32x24/${e}.png 2x`,width:"16",height:"12",alt:n,className:"inline-block rounded-sm flex-shrink-0",onError:o=>{o.target.style.display="none"}})}function Lj(){return g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:"divide-y divide-gray-50 select-none pointer-events-none blur-[2px] opacity-40","aria-hidden":"true",children:[...Array(6)].map((n,e)=>g.jsxs("div",{className:"grid grid-cols-3 gap-2 px-5 py-2.5",children:[g.jsx("div",{className:"col-span-1 h-4 bg-gray-200 rounded",style:{width:`${55+e%3*12}%`}}),g.jsx("div",{className:"h-4 bg-gray-200 rounded justify-self-end w-10"}),g.jsx("div",{className:"h-4 bg-gray-200 rounded justify-self-end w-10"})]},e))}),g.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-2 bg-white/50",children:[g.jsx(U1,{className:"w-7 h-7 text-gray-400","aria-hidden":"true"}),g.jsx("span",{className:"text-sm font-semibold text-gray-600",children:O("Pro Feature")}),g.jsxs("a",{href:Dj("#pricing"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 px-3.5 py-1.5 rounded bg-[#0084ff] hover:bg-[#0073e6] text-white text-xs font-semibold transition-colors",children:[O("Upgrade to Pro")," ",g.jsx("span",{"aria-hidden":"true",children:"→"})]})]})]})}function au({title:n,rows:e,colLabel:o,loading:a,showFlag:s=!1,locked:r=!1}){return g.jsxs("div",{className:"bg-white rounded shadow-sm border border-gray-100 flex flex-col",children:[g.jsx("div",{className:"px-5 py-4 border-b border-gray-100",children:g.jsx("h3",{className:"text-sm font-semibold text-gray-700 m-0",children:n})}),g.jsxs("div",{className:"flex-1 overflow-hidden",children:[g.jsxs("div",{className:"grid grid-cols-3 gap-2 px-5 py-4 bg-gray-50 border-b border-gray-100",children:[g.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide col-span-1",children:o}),g.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide text-right",children:O("Views")}),g.jsx("span",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide text-right",children:O("Conversion")})]}),r?g.jsx(Lj,{}):a?g.jsx("div",{className:"px-5 py-6 space-y-3",children:[...Array(5)].map((u,f)=>g.jsx("div",{className:"h-4 bg-gray-100 rounded animate-pulse",style:{width:`${70+f%3*10}%`}},f))}):e.length===0?g.jsx("div",{className:"px-5 py-8 text-center text-sm text-gray-400",children:O("No data")}):g.jsx("div",{className:"divide-y divide-gray-50",children:e.map((u,f)=>g.jsxs("div",{className:"grid grid-cols-3 gap-2 px-5 py-2.5 hover:bg-gray-50 transition-colors",children:[g.jsxs("div",{className:"col-span-1 flex items-center gap-2 min-w-0",children:[s&&g.jsx(zj,{code:u.label}),g.jsx("span",{className:"text-sm text-gray-700 truncate",title:u.label,children:u.label||"—"})]}),g.jsx("span",{className:"text-sm font-semibold text-gray-700 text-right",children:u.views.toLocaleString()}),g.jsx("span",{className:"text-sm font-semibold text-gray-700 text-right",children:u.conversions.toLocaleString()})]},f))})]})]})}function Bj({tableData:n,loading:e}){const o=!Rj,a=n?.countries||[],s=n?.pages||[],r=n?.browsers||[];return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-gray-700 m-0",children:O("Traffic Breakdown")}),g.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[g.jsx(au,{title:O("Countries"),rows:a,colLabel:O("Country"),loading:e,showFlag:!0,locked:o}),g.jsx(au,{title:O("Pages"),rows:s,colLabel:O("Page URL"),loading:e,locked:o}),g.jsx(au,{title:O("Browsers"),rows:r,colLabel:O("Browser"),loading:e,locked:o})]})]})}const Hj=[{value:"this_week",label:"This Week"},{value:"last_week",label:"Last Week"},{value:"this_month",label:"This Month"},{value:"last_month",label:"Last Month"},{value:"this_year",label:"This Year"},{value:"last_year",label:"Last Year"},{value:"custom",label:"Custom Date"}],Uj={Visitor:{border:"border-indigo-500",icon:"text-indigo-200",bg:"bg-indigo-50"},Views:{border:"border-purple-500",icon:"text-purple-200",bg:"bg-purple-50"},Conversion:{border:"!border-blue-500",icon:"text-blue-200",bg:"bg-blue-50"},"Conversion Rate":{border:"!border-cyan-500",icon:"text-cyan-200",bg:"bg-cyan-50"}};function Vj({colorKey:n,label:e,value:o,icon:a,loading:s}){const r=Uj[n]||{border:"border-gray-300",icon:"text-gray-200"};return g.jsxs("div",{className:`bg-white rounded shadow-sm border border-gray-100 border-l-4 ${r.border} p-5 flex items-center justify-between gap-3 min-w-0 overflow-hidden`,children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-2",children:e}),s?g.jsx("div",{className:"h-8 w-16 bg-gray-100 rounded-md animate-pulse"}):g.jsx("p",{className:"text-3xl font-bold text-gray-800 leading-none",children:o})]}),g.jsx("div",{className:`flex-shrink-0 ${r.icon} opacity-80`,children:a})]})}function Pj({value:n,onChange:e,children:o}){return g.jsx("select",{value:n,onChange:e,className:"border border-gray-200 rounded !px-3 !py-1 text-sm text-gray-600 bg-white shadow-sm focus:outline-none focus:ring-2 focus:ring-[#0084ff] cursor-pointer min-w-[180px] h-10 !leading-[32px]",children:o})}const Yj={visitors:0,views:0,conversions:0,conversion_rate:"0.00"};function qj(){const{restUrl:n,nonce:e}=window.mcsDashboard||{},[o,a]=E.useState(Yj),[s,r]=E.useState(null),[u,f]=E.useState(null),[h,p]=E.useState("this_week"),[b,y]=E.useState(""),[v,_]=E.useState(""),[k,C]=E.useState(!0),[j,M]=E.useState(!0),[D,U]=E.useState(!0),[z,w]=E.useState(null),[Y,G]=E.useState(!0),K=E.useCallback(()=>{const rt=new URLSearchParams({period:h});return h==="custom"&&b&&v&&(rt.set("date_from",b),rt.set("date_to",v)),rt},[h,b,v]),I=E.useCallback(async()=>{if(!n)return;const rt=K(),H={headers:{"X-WP-Nonce":e},credentials:"same-origin"};C(!0),M(!0),U(!0),G(!0);const[Z,at,ct,A]=await Promise.allSettled([fetch(`${n}/analytics?${rt}`,H),fetch(`${n}/analytics/chart?${rt}`,H),fetch(`${n}/analytics/devices?${rt}`,H),fetch(`${n}/analytics/tables?${rt}`,H)]);Z.status==="fulfilled"&&Z.value.ok&&a(await Z.value.json()),C(!1),at.status==="fulfilled"&&at.value.ok&&r(await at.value.json()),M(!1),ct.status==="fulfilled"&&ct.value.ok&&f(await ct.value.json()),U(!1),A.status==="fulfilled"&&A.value.ok&&w(await A.value.json()),G(!1)},[n,e,K]);E.useEffect(()=>{I()},[I]);const J=Hj.map(rt=>({value:rt.value,label:O(rt.label)})),ot=[{colorKey:"Visitor",label:O("Visitor"),value:Number(o.visitors).toLocaleString(),icon:g.jsx(T1,{size:44,strokeWidth:1.5})},{colorKey:"Views",label:O("Views"),value:Number(o.views).toLocaleString(),icon:g.jsx(q1,{size:44,strokeWidth:1.5})},{colorKey:"Conversion",label:O("Conversion"),value:Number(o.conversions).toLocaleString(),icon:g.jsx(z1,{size:44,strokeWidth:1.5})},{colorKey:"Conversion Rate",label:O("Conversion Rate"),value:`${o.conversion_rate}%`,icon:g.jsx(L1,{size:44,strokeWidth:1.5})}],L=typeof document<"u"?document.getElementById("mcs-page-actions"):null,gt=g.jsxs("a",{href:"https://themeatelier.net/create-support-ticket/",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-[#0084ff] hover:bg-[#0065cc] text-white rounded text-sm font-semibold no-underline transition-colors duration-150 flex-shrink-0 hover:text-white",children:[g.jsx(P1,{size:15,strokeWidth:2}),O("Support")]});return g.jsxs(g.Fragment,{children:[L&&jn.createPortal(gt,L),g.jsxs("div",{className:"bg-[#f0f0f1]",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 mb-5",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("h2",{className:"text-lg font-semibold text-gray-800 m-0 p-0",children:O("Analytics")}),k&&g.jsx("span",{className:"text-gray-400",children:g.jsx(O1,{size:16,strokeWidth:2,className:"animate-spin"})})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Pj,{value:h,onChange:rt=>p(rt.target.value),children:J.map(rt=>g.jsx("option",{value:rt.value,children:rt.label},rt.value))}),h==="custom"&&g.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[g.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-600",children:[O("From"),g.jsx("input",{type:"date",value:b,onChange:rt=>y(rt.target.value),className:"h-10 border border-slate-200 rounded px-3.5"})]}),g.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-600",children:[O("To"),g.jsx("input",{type:"date",value:v,onChange:rt=>_(rt.target.value),className:"h-10 border border-slate-200 rounded px-3.5"})]})]})]})]}),g.jsx("div",{className:"grid grid-cols-4 gap-4",children:ot.map(rt=>g.jsx(Vj,{...rt,loading:k},rt.label))}),g.jsx("div",{className:"mt-5",children:g.jsx(Cj,{chartData:s,loading:j})}),g.jsx("div",{className:"mt-5",children:g.jsx(Oj,{deviceData:u,loading:D})}),g.jsx("div",{className:"mt-5 pb-6",children:g.jsx(Bj,{tableData:z,loading:Y})})]})]})}function qp(n,e){const o=E.useRef(n),a=E.useRef(e);o.current=n,a.current=e,E.useEffect(()=>{const s=r=>{(r.ctrlKey||r.metaKey)&&!r.altKey&&!r.shiftKey&&(r.key==="s"||r.key==="S")&&(r.preventDefault(),!a.current&&typeof o.current=="function"&&o.current())};return window.addEventListener("keydown",s,{capture:!0}),()=>window.removeEventListener("keydown",s,{capture:!0})},[])}function Fj(n){return xt({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"},child:[]},{tag:"path",attr:{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"},child:[]}]})(n)}function lu({content:n,delay:e=200,grace:o=180,placement:a="top",maxWidth:s=220,variant:r="dark",children:u}){const[f,h]=E.useState(!1),[p,b]=E.useState({top:0,left:0}),y=E.useRef(null),v=E.useRef(null),_=E.useRef(null),k=r==="dark",C=E.useCallback(()=>{const J=y.current;if(!J)return;const ot=J.getBoundingClientRect(),L=window.scrollX,gt=window.scrollY;b(a==="right"?{top:ot.top+gt+ot.height/2,left:ot.right+L+12}:a==="bottom"?{top:ot.bottom+gt+10,left:ot.left+L+ot.width/2}:{top:ot.top+gt-8,left:ot.left+L+ot.width/2})},[a]),j=()=>{clearTimeout(_.current),C(),v.current=setTimeout(()=>h(!0),e)},M=()=>{clearTimeout(v.current),_.current=setTimeout(()=>h(!1),o)},D=()=>{clearTimeout(_.current)},U=()=>{clearTimeout(_.current),h(!1)},z=k?"#ffffff":"#1e1e1e",w=k?"#374151":"#ffffff",Y=k?"#dde1e7":"transparent",G=k?"0 4px 24px rgba(0,0,0,.14), 0 1px 4px rgba(0,0,0,.08)":"0 4px 18px rgba(0,0,0,.32)",K={right:"translate(0, -50%)",bottom:"translate(-50%, 0)",top:"translate(-50%, calc(-100% - 2px))"}[a],I=()=>a==="right"?g.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0},children:[g.jsx("div",{style:{width:0,height:0,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:`9px solid ${k?Y:z}`}}),k&&g.jsx("div",{style:{position:"absolute",left:9,width:0,height:0,borderTop:"7px solid transparent",borderBottom:"7px solid transparent",borderRight:`8px solid ${z}`}})]}):a==="bottom"?g.jsx("div",{style:{width:0,height:0,margin:"0 auto",borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderBottom:`6px solid ${z}`}}):null;return g.jsxs(g.Fragment,{children:[g.jsx("span",{ref:y,onMouseEnter:j,onMouseLeave:M,style:{display:"inline-flex"},children:u}),f&&n&&jn.createPortal(g.jsxs("div",{onMouseEnter:D,onMouseLeave:U,style:{position:"absolute",zIndex:9999999,top:p.top+5,left:p.left,maxWidth:s,transform:K,pointerEvents:"auto",display:"flex",alignItems:"center"},children:[g.jsx(I,{}),g.jsx("div",{style:{background:z,color:w,fontSize:12,lineHeight:1.5,borderRadius:4,padding:"12px 14px",border:`1px solid ${Y}`,boxShadow:G,wordBreak:"break-word",whiteSpace:"normal"},children:n}),a==="top"&&g.jsx("div",{style:{position:"absolute",bottom:-6,left:"50%",transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:`6px solid ${z}`}})]}),document.body)]})}const Xj={chat_layout:{help:"Choose how your Messenger chat appears.",demo:"#shortcode"},"opt-fbid":{help:"Add your profile or page ID to receive messages.",docs:"floating-chat/single-agent/?ref=1"},show_current_time:{help:"Enable to display the current time before the agent’s message.",image:"src/Admin/assets/images/preview/current_time.webp",demo:"better-chat-support-for-messenger/?ref=1#shortcode",docs:"floating-chat/current-time/?ref=1"},"agent-message":{help:"Add a custom message to display inside the agent’s message box.",image:"src/Admin/assets/images/preview/agent_message.webp",demo:"#shortcode",docs:"floating-chat/agent-message/?ref=1"},"select-timezone":{help:"Select your local timezone. Availability schedules will be applied based on this timezone.",docs:"floating-chat/single-agent/?ref=1"},"opt-availablity":{help:"Set your daily availability using 24-hour format (e.g., 09:00 to 18:00). To mark a full day as offline, set both From and To values to 00:00."},"bubble-search":{help:"Show or hide the search box. This helps visitors quickly find an agent when you have many agents.",image:"src/Admin/assets/images/preview/search_field.webp",demo:"#example_4",docs:"floating-chat/single-agent/?ref=1"},"opt-chat-agents":{help:"Add and manage your chat agents. Each agent can have a name, photo, Facebook ID, pre-filled message, timezone, availability, designation, and custom online/offline text. You can add as many agents as you need.",demo:"#shortcode",docs:"floating-chat/single-agent/?ref=1"},"agent-fbid":{help:"Add the Facebook ID (profile or page) for this agent to receive messages."},"agent-online-text":{help:"Set the text that will be shown when the agent is available/online (e.g., “I am Online”)."},"agent-offline-text":{help:"Set the text that will be shown when the agent is unavailable/offline (e.g., “I am Offline”)."},agent_photo_type:{help:"Choose how the agent photo is displayed:",docs:"floating-chat/single-agent/?ref=1"},"agent-photo":{help:"Upload an agent photo to display inside the chat bubble.",image:"src/Admin/assets/images/preview/user_image.webp",demo:"#shortcode",docs:"floating-chat/single-agent/?ref=1"},"agent-name":{help:"Enter the agent’s name to display inside the chat bubble.",image:"src/Admin/assets/images/preview/agent_name.webp",demo:"#shortcode",docs:"floating-chat/single-agent/?ref=1"},"agent-subtitle":{help:"Enter a subtitle to display below the agent’s name in the chat bubble.",image:"src/Admin/assets/images/preview/agent_subtitle.webp",demo:"#shortcode",docs:"floating-chat/single-agent/?ref=1"},offline_agent_subtitle:{help:"Enter a subtitle to display when the agent is offline in the chat bubble.",image:"src/Admin/assets/images/preview/agent_subtitle.webp",demo:"#shortcode",docs:"floating-chat/single-agent/?ref=1"},"bubble-title":{help:"Enter the main title text to display at the top of the chat bubble.",image:"src/Admin/assets/images/preview/bubble_title.webp",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},"bubble-subtitle":{help:"Enter a subtitle to display below the main title inside the chat bubble.",image:"src/Admin/assets/images/preview/bubble_subtitle.webp",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},"header-content-position":{help:"Choose the alignment for the header content.",image:"src/Admin/assets/images/preview/header_left_center.webp",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},"before-chat-icon":{help:"Select an icon to display before the send message button text.",image:"src/Admin/assets/images/preview/send_message_icon.webp",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},"before-chat-icon-native":{help:"Choose a native icon from the built-in library of 2000+ icons to display before the send message button text.",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},"before-chat-icon-custom":{help:"Upload or select a custom icon from your media library to display before the send message button text.",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},"chat-button-text":{help:"Enter the text to display on the send message button.",image:"src/Admin/assets/images/preview/send_message_text.webp",demo:"#shortcode",docs:"floating-chat/multi-agent/?ref=1"},footer_content:{help:"Enable or disable the footer text below the chat box. You can also replace the default text with your own custom message.",demo:"#shortcode"},footer_content_text:{help:"Enter the text or HTML you’d like to show in the footer when the footer content option is enabled.",demo:"#shortcode"},"opt-button-style":{help:"Choose a style for the floating chat button from the available design options.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},agent_avatar_type:{help:"Choose how the agent photo is displayed:",docs:"floating-chat/button/?ref=1"},agent_avatar:{help:"Upload an agent photo to display inside the chat bubble.",image:"src/Admin/assets/images/preview/user_image.jpg",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},chat_button_image_type:{help:"Choose how the button image is displayed:",docs:"floating-chat/button/?ref=1"},chat_button_image:{help:"Upload an agent photo to display inside the chat bubble.",image:"src/Admin/assets/images/preview/user_image.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},button_top_label:{help:"Enter the text to display inside the floating chat button top label.",image:"src/Admin/assets/images/preview/button_text.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"bubble-text":{help:"Enter the text to display inside the floating chat button main label.",image:"src/Admin/assets/images/preview/button_text.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},chat_button_top_label:{help:"Enter the text to display inside the floating chat button top label.",image:"src/Admin/assets/images/preview/button_top_text.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},chat_button_text:{help:"Enter the text to display inside the floating chat button main label.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},online_text:{help:"Set the text to display when the agent is online and available for chat.",image:"src/Admin/assets/images/preview/i_am_on.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},offline_text:{help:"Set the text to display when the agent is offline or unavailable for chat.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"circle-button-icon-1":{help:"Select an icon to display inside the circular chat button.",image:"src/Admin/assets/images/preview/circle_icon.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"circle-button-icon-native":{help:"Choose a native icon from the built-in library of 2000+ icons to display inside the circular chat button.",docs:"floating-chat/button/?ref=1"},"circle-button-icon-custom":{help:"Upload or select a custom icon from your media library to display inside the circular chat button.",docs:"floating-chat/button/?ref=1"},"circle-button-close-1":{help:"Select the icon to display when the circular chat button is in the close state.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"circle-button-close-native":{help:"Choose a native icon from the built-in library to display when the circular chat button is in the close state.",docs:"floating-chat/button/?ref=1"},"circle-button-close-custom":{help:"Upload or select a custom icon from your media library to display when the circular chat button is in the close state.",docs:"floating-chat/button/?ref=1"},"circle-button-icon":{help:"Select an icon to display inside the floating chat button.",image:"src/Admin/assets/images/preview/button_icon.webp",docs:"floating-chat/button/?ref=1"},"button-icon-native":{help:"Choose a native icon from the built-in library of 2000+ icons to display inside the floating chat button.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"button-icon-custom":{help:"Upload or select a custom icon from your media library to display inside the floating chat button.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"circle-button-close":{help:"Select the icon to display when the floating chat button is in the close state.",image:"src/Admin/assets/images/preview/button_icon_close.jpg",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"button-close-native":{help:"Choose a native icon from the built-in library to display when the floating chat button is in the close state.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"button-close-custom":{help:"Upload or select a custom icon from your media library to display when the floating chat button is in the close state.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"circle-animation":{help:"Select the animation effect used when toggling the circular chat button between open and close states.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},button_size:{help:"Select the size of the button."},button_size_custom:{help:"Scale in percentage relative to normal size.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_icon_color:{help:"You can define normal and hover colors for the button icon.",image:"src/Admin/assets/images/preview/icon_background.webp"},bubble_icon_bg:{help:"Enable/Disable Button Inner Icon Background",image:"src/Admin/assets/images/preview/icon_background.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_icon_bg_color:{help:"You can define normal and hover background colors for the button icon."},bubble_button_bg:{help:"Set your button background color.",image:"src/Admin/assets/images/preview/button_text.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_button_text:{help:"Set your button label color.",image:"src/Admin/assets/images/preview/button_text.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_button_border:{help:"Set border for the floating chat button.",image:"src/Admin/assets/images/preview/icon_background.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},notification_icon:{help:"Toggle to show or hide the notification icon in the interface."},notification_number:{help:'Select a number to display as a notification badge on the icon. Choose "None" to hide the number.'},bubble_icon_border:{help:"Set border for the floating chat button.",image:"src/Admin/assets/images/preview/button_border.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"bubble-button-padding":{help:"Adjust the inner spacing (padding) of the floating chat button.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_button_tooltip:{help:"Enable and customize the tooltip text that appears when hovering over the floating chat button.",image:"src/Admin/assets/images/preview/button_tooltip.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_button_tooltip_text:{help:"Enter the text that will appear inside the tooltip when hovering over the floating chat button.",image:"src/Admin/assets/images/preview/button_tooltip.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_button_tooltip_background:{help:"Choose the background color for the tooltip that appears when hovering over the floating chat button.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},bubble_button_tooltip_width:{help:"Set the maximum width of the tooltip that appears when hovering over the floating chat button.",image:"src/Admin/assets/images/preview/button_tooltip_width.webp",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"bubble-position":{help:"Select the screen position where the floating chat button will appear.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},right_bottom:{help:"Set the margin (spacing) of the floating chat button from the bottom and right edges of the screen. Adjust to reposition the button as needed.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},left_bottom:{help:"Set the margin (spacing) of the floating chat button from the bottom and left edges of the screen. Adjust to reposition the button as needed.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},right_middle:{help:"Set the margin (spacing) of the floating chat button from the right edge of the screen when positioned in the middle. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},left_middle:{help:"Set the margin (spacing) of the floating chat button from the left edge of the screen when positioned in the middle. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"enable-positioning-tablet":{help:"Enable this option to set a custom bubble position specifically for tablet devices. Useful for optimizing layout and user experience on medium screens.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"bubble-position-tablet":{help:"Select the screen position where the chat bubble will appear.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},right_bottom_tablet:{help:"Set the margin (spacing) of the chat bubble from the bottom and right edges of the screen. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},left_bottom_tablet:{help:"Set the margin (spacing) of the chat bubble from the bottom and left edges of the screen. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},right_middle_tablet:{help:"Set the margin (spacing) of the chat bubble from the right edge of the screen when positioned in the middle. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},left_middle_tablet:{help:"Set the margin (spacing) of the chat bubble from the left edge of the screen when positioned in the middle. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"enable-positioning-mobile":{help:"Enable this option to set a custom chat bubble position specifically for mobile devices. Useful for optimizing layout and usability on smaller screens.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"bubble-position-mobile":{help:"Select the screen position where the chat bubble will appear.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},right_bottom_mobile:{help:"Set the margin (spacing) of the chat bubble from the bottom and right edges of the screen. Adjust to reposition the bubble as needed.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},left_bottom_mobile:{help:"Set the margin (spacing) of the chat bubble from the bottom and left edges of the screen. Adjust to reposition the bubble as needed.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},right_middle_mobile:{help:"Set the margin (spacing) of the chat bubble from the right edge of the screen when positioned in the middle. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},left_middle_mobile:{help:"Set the margin (spacing) of the chat bubble from the left edge of the screen when positioned in the middle. Adjust to fine-tune its placement.",demo:"#shortcode",docs:"floating-chat/button/?ref=1"},"autoshow-popup":{help:"Enable this option to automatically open the chat popup when the page loads. Useful for drawing visitor attention without requiring a click.",docs:"floating-chat/style-settings/?ref=1"},auto_open_popup_timeout:{help:"Set the delay (in seconds) before the chat popup automatically opens after the page loads.",docs:"floating-chat/style-settings/?ref=1"},"select-animation":{help:'Choose an animation style for how the chat bubble appears on the screen. You can pick a specific effect or select "Random" to apply a different animation each time.',demo:"#shortcode",docs:"floating-chat/style-settings/?ref=1"},theme_style:{help:"Select the visual style for your chat bubble. This setting changes the overall look and feel of the chat interface.",demo:"single-agent/?ref=1"},"bubble-style":{help:"Choose a color mode for the chat bubble. This controls the overall appearance and theme style of the bubble.",demo:"#shortcode",docs:"floating-chat/style-settings/?ref=1"},alternative_mSupportBubble:{help:"Add custom CSS selectors (e.g., .classname, #idname) that can also act as triggers to open the chat bubble. Useful when you want other elements on your site to open the chat besides the default button.",docs:"floating-chat/style-settings/?ref=1"},color_settings:{help:"Set your brand colors for the chat bubble. Adjust the Primary and Secondary colors to match your site style.",image:"src/Admin/assets/images/preview/button_border.jpg",demo:"#shortcode",docs:"floating-chat/style-settings/?ref=1"},send_button_color:{help:"Choose the colors for the send button.",docs:"floating-chat/style-settings/?ref=1"},better_chat_support_typography:{help:"Select the font family and weight for your chat bubble text. Adjust these options to keep the widget consistent with your site’s typography.",docs:"floating-chat/style-settings/?ref=1"},"bubble-visibility":{help:"Everywhere:",docs:"floating-chat/others/?ref=1"},visibility:{help:"Select where the chat bubble should be visible. You can enable it by specific content types such as pages, posts, products, categories, or tags.",docs:"floating-chat/others/?ref=1"},theme_page_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected items.",docs:"floating-chat/others/?ref=1"},theme_page_all:{help:"Enable this option to apply the chat bubble visibility rule to all theme pages at once, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},theme_page:{help:"Select a specific theme page where the chat bubble visibility rule should apply. Options include Blog, 404, or Search pages.",docs:"floating-chat/others/?ref=1"},page_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected pages.",docs:"floating-chat/others/?ref=1"},page_all:{help:"Enable this option to apply the chat bubble visibility rule to all pages across your site, instead of selecting individual pages.",docs:"floating-chat/others/?ref=1"},page:{help:"Select one or more specific pages where the chat bubble visibility rule should apply.",docs:"floating-chat/others/?ref=1"},posts_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected posts.",docs:"floating-chat/others/?ref=1"},posts_all:{help:"Enable this option to apply the chat bubble visibility rule to all posts across your site, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},posts:{help:"Select one or more specific posts where the chat bubble visibility rule should apply.",docs:"floating-chat/others/?ref=1"},product_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected products.",docs:"floating-chat/others/?ref=1"},product_all:{help:"Enable this option to apply the chat bubble visibility rule to all products across your store, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},product:{help:"Select one or more specific products where the chat bubble visibility rule should apply.",docs:"floating-chat/others/?ref=1"},category_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected post categories.",docs:"floating-chat/others/?ref=1"},category_all:{help:"Enable this option to apply the chat bubble visibility rule to all post categories, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},category:{help:"Select one or more specific post categories where the chat bubble visibility rule should apply.",docs:"floating-chat/others/?ref=1"},tags_target:{help:"Choose whether to include or exclude the selected post tags from displaying the chat bubble.",demo:"#shortcode"},tags_all:{help:"Enable this option to apply the chat bubble visibility rule to all post tags, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},tags:{help:"Select one or more specific post tags where the chat bubble visibility rule should apply.",docs:"floating-chat/others/?ref=1"},product_category_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected product categories.",docs:"floating-chat/others/?ref=1"},product_category_all:{help:"Enable this option to apply the chat bubble visibility rule to all product categories, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},product_category:{help:"Select one or more specific product categories where the chat bubble visibility rule should apply.",docs:"floating-chat/others/?ref=1"},product_tags_target:{help:"Choose whether to show (Include) or hide (Exclude) the chat bubble on the selected product tags.",docs:"floating-chat/others/?ref=1"},product_tags_all:{help:"Enable this option to apply the chat bubble visibility rule to all product tags, instead of selecting them individually.",docs:"floating-chat/others/?ref=1"},product_tags:{help:"Export or import plugin settings for backup or migration purposes."},better_chat_support_typography_family:{help:"Select the font family and weight for your chat bubble text. Adjust these options to keep the widget consistent with your site’s typography.",docs:"floating-chat/style-settings/?ref=1"},cleanup_data_deletion:{help:"Enable this option to completely remove all Messenger Chat Support plugin data when the plugin is deleted from your site.",demo:"settings/?ref=1"},open_in_new_tab:{help:"Enable this option to open the Messenger chat link in a new browser tab when clicked.",demo:"settings/?ref=1"},mcs_custom_css:{help:"Add your own custom CSS to override or extend the default styling of the chat box.",demo:"settings/?ref=1"},mcs_custom_js:{help:"Add your own custom JavaScript to extend or customize chat box behavior.",demo:"settings/?ref=1"},"opt-shortcode-select":{help:"Choose between Simple or Advanced button styles for the shortcode. The Advanced style supports agent details (photo, name, designation), while the Simple style is a basic Messenger button.",demo:"#shortcode",docs:"button-integration/shortcodes/?ref=1"}},{pluginUrl:Gj="",docsUrl:Kj="",demoUrl:Wj=""}=typeof window<"u"&&window.mcsAdmin||{};function Fp(n){const e=Xj[n];return e?{help:e.help||"",helpImage:e.image!=null?`${Gj}${e.image}`:void 0,liveDemo:e.demo!=null?`${Wj}${e.demo}`:void 0,openDocs:e.docs!=null?`${Kj}${e.docs}`:void 0}:null}function $j({text:n,image:e,liveDemo:o,openDocs:a}){return g.jsxs("div",{style:{minWidth:200},children:[e&&g.jsx("div",{style:{marginBottom:10,borderRadius:4,overflow:"hidden",border:"1px solid #eef0f3"},children:g.jsx("img",{src:e,alt:"",style:{display:"block",width:"100%",height:"auto"}})}),n&&g.jsx("div",{style:{color:"#fff",fontSize:14,lineHeight:1.6,fontWeight:500},children:n}),(o||a)&&g.jsxs("div",{style:{display:"flex",gap:8,marginTop:e||n?11:0,flexWrap:"wrap"},children:[o&&g.jsx("a",{href:o,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:5,background:"#0084ff",color:"#fff",fontSize:12,fontWeight:600,textDecoration:"none",padding:"10px 12px",borderRadius:4,lineHeight:1.2,transition:"background .15s"},onMouseEnter:s=>s.currentTarget.style.background="#0065cc",onMouseLeave:s=>s.currentTarget.style.background="#0084ff",children:O("Live Demo")}),a&&g.jsx("a",{href:a,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",gap:5,background:"transparent",color:"#0084ff",fontSize:12,fontWeight:600,textDecoration:"none",padding:"0px 12px",borderRadius:4,lineHeight:"34px",border:"1px solid #0084ff",transition:"background .15s"},onMouseEnter:s=>(s.currentTarget.style.background="#0084ff",s.currentTarget.style.color="#fff"),onMouseLeave:s=>(s.currentTarget.style.background="transparent",s.currentTarget.style.color="#0084ff"),children:O("Open Docs")})]})]})}function et({label:n,help:e,helpImage:o,liveDemo:a,openDocs:s,helpKey:r,desc:u,children:f,className:h=""}){const p=r?Fp(r):null;p&&(e=e??p.help,o=o??p.helpImage,a=a??p.liveDemo,s=s??p.openDocs);const b=n&&O(n),y=e||o||a||s;return g.jsxs("div",{className:`flex items-start gap-0 border-b border-gray-100 last:border-b-0 ${h}`,children:[n&&g.jsxs("div",{className:"flex-shrink-0 py-4 px-5 text-sm text-gray-700 font-medium leading-snug",style:{width:210},children:[g.jsx("span",{className:"inline align-middle",children:b}),y&&g.jsx(lu,{content:g.jsx($j,{text:e,image:o,liveDemo:a,openDocs:s}),placement:"right",variant:"light",maxWidth:300,delay:140,grace:200,children:g.jsx(Fj,{style:{width:14,height:14,color:"#9ca3af",cursor:"help",marginLeft:5,verticalAlign:"middle",flexShrink:0,transition:"color .15s",position:"relative",top:5},onMouseEnter:v=>{v.currentTarget.style.color="#0084ff"},onMouseLeave:v=>{v.currentTarget.style.color="#9ca3af"}})})]}),g.jsxs("div",{className:"flex-1 min-w-0 py-4 pr-5",children:[f,u&&g.jsx("p",{className:"text-sm text-gray-400 mt-1.5 leading-snug",dangerouslySetInnerHTML:{__html:u}})]})]})}function un({value:n="",onChange:e,placeholder:o="",type:a="text"}){return g.jsx("input",{type:a,value:n,onChange:s=>e(s.target.value),placeholder:o,className:"w-full max-w-lg border !border-gray-300 !rounded px-3 py-2 text-sm text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0084ff] focus:border-transparent"})}function Xp({value:n="",onChange:e,placeholder:o="",rows:a=4}){return g.jsx("textarea",{value:n,onChange:s=>e(s.target.value),placeholder:o,rows:a,className:"w-full max-w-lg border !border-gray-300 !rounded px-3 py-2 text-sm text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0084ff] focus:border-transparent resize-y"})}function Qj(n){return typeof n=="string"?[n,n]:Array.isArray(n)?[String(n[0]),String(n[1]??n[0])]:[String(n.value??""),String(n.label??n.value??"")]}function su(n){return String(n).toLowerCase().replace(/[_/]/g," ")}function ru(n){return String(n).includes("/")?n.replace(/_/g," "):n}function Aa({value:n="",onChange:e,options:o=[],placeholder:a=O("Select…"),searchable:s=!1}){const[r,u]=E.useState(""),[f,h]=E.useState(!1),[p,b]=E.useState({top:0,left:0,width:240}),y=E.useRef(null),v=E.useRef(null),_=Array.isArray(o)?o.map(Qj):Object.entries(o).map(([w,Y])=>[w,String(Y)]),k=su(r.trim()),C=k?_.filter(([w,Y])=>su(w).includes(k)||su(Y).includes(k)):_,j=_.find(([w])=>String(w)===String(n))?.[1]??a,M=E.useCallback(()=>{if(!y.current)return;const w=y.current.getBoundingClientRect();b({top:w.bottom+window.scrollY,left:w.left+window.scrollX,width:w.width})},[]);E.useEffect(()=>{if(!f)return;M();const w=()=>M();return window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[f,M]),E.useEffect(()=>{f&&v.current&&setTimeout(()=>v.current?.focus(),20)},[f]),E.useEffect(()=>{if(!f)return;const w=Y=>{const G=document.getElementById("mcs-select-portal");y.current&&!y.current.contains(Y.target)&&G&&!G.contains(Y.target)&&(h(!1),u(""))};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[f]);const D=()=>{M(),h(w=>!w)},U=w=>{e(w),h(!1),u("")};if(!s)return g.jsxs("select",{value:n,onChange:w=>e(w.target.value),className:"border !border-gray-300 !rounded px-3 py-2 text-sm text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0084ff] w-full max-w-lg bg-white",children:[a&&g.jsx("option",{value:"",children:a}),_.map(([w,Y])=>g.jsx("option",{value:w,children:ru(Y)},w))]});const z=f&&jn.createPortal(g.jsxs("div",{id:"mcs-select-portal",style:{position:"absolute",top:p.top,left:p.left,width:p.width,zIndex:9999999,background:"#fff",border:"1px solid #e5e7eb",borderRadius:6,boxShadow:"0 6px 20px rgba(0,0,0,.13)",maxHeight:280,overflowY:"auto"},children:[g.jsx("div",{style:{position:"sticky",top:0,background:"#fff",padding:8,borderBottom:"1px solid #f3f4f6",zIndex:1},children:g.jsx("input",{ref:v,type:"text",value:r,onChange:w=>u(w.target.value),onKeyDown:w=>{w.key==="Escape"&&(h(!1),u(""))},placeholder:O("Search…"),style:{width:"100%",border:"1px solid #d1d5db",borderRadius:4,padding:"5px 9px",fontSize:13,outline:"none",boxSizing:"border-box"},onFocus:w=>w.target.style.borderColor="#0084ff",onBlur:w=>w.target.style.borderColor="#d1d5db"})}),r.trim()&&g.jsxs("div",{style:{padding:"4px 12px 2px",fontSize:11,color:"#9ca3af"},children:[C.length," ",C.length!==1?O("results"):O("result")]}),C.length===0?g.jsx("div",{style:{padding:"10px 12px",fontSize:13,color:"#9ca3af"},children:O("No results found.")}):C.map(([w,Y])=>{const G=String(w)===String(n),K=ru(Y);return g.jsx("button",{type:"button",onClick:()=>U(w),style:{display:"block",width:"100%",textAlign:"left",padding:"7px 12px",fontSize:13,background:G?"#eff6ff":"transparent",color:G?"#0084ff":"#374151",fontWeight:G?600:400,border:0,cursor:"pointer",transition:"background .1s"},onMouseEnter:I=>{G||(I.currentTarget.style.background="#f9fafb")},onMouseLeave:I=>{G||(I.currentTarget.style.background="transparent")},children:K},w)})]}),document.body);return g.jsxs(g.Fragment,{children:[g.jsxs("button",{ref:y,type:"button",onClick:D,className:"w-full max-w-lg border border-gray-300 rounded px-3 py-2 text-sm text-left bg-white focus:outline-none focus:ring-2 focus:ring-[#0084ff] flex items-center justify-between gap-2",children:[g.jsx("span",{className:`truncate ${n?"text-gray-800":"text-gray-400"}`,children:ru(j)}),g.jsx(vc,{className:`w-4 h-4 text-gray-400 flex-shrink-0 transition-transform duration-150 ${f?"rotate-180":""}`})]}),z]})}function Bi({value:n,onChange:e,labelOn:o="Enabled",labelOff:a="Disabled",width:s}){const r=O(o),u=O(a),f=n===!0||n==="true"||n===1,h=28,p=8,b=8,y=Math.max(String(r).length,String(u).length),v=s??Math.max(60,h+y*p+b),_=f?v-h:4;return g.jsxs("button",{type:"button",role:"switch","aria-checked":f,onClick:()=>e(!f),style:{position:"relative",display:"inline-block",width:v,height:26,padding:0,margin:0,overflow:"hidden",borderRadius:4,backgroundColor:f?"#1a74e4":"#ed6f6f",cursor:"pointer",border:"none",userSelect:"none",flexShrink:0,transition:"background-color 0.1s",verticalAlign:"middle"},children:[g.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:0,left:0,right:0,fontSize:11,lineHeight:"26px",fontWeight:500,fontStyle:"normal",textAlign:"center",textTransform:"uppercase",color:"#fff",paddingRight:h,opacity:f?1:0,transition:"opacity 0.1s",pointerEvents:"none",whiteSpace:"nowrap"},children:r}),g.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:0,left:0,right:0,fontSize:11,lineHeight:"26px",fontWeight:500,fontStyle:"normal",textAlign:"center",textTransform:"uppercase",color:"#fff",paddingLeft:h,opacity:f?0:1,transition:"opacity 0.1s",pointerEvents:"none",whiteSpace:"nowrap"},children:u}),g.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:4,left:_,width:24,height:18,backgroundColor:"#fff",borderRadius:4,boxShadow:"1px 1px 1px rgba(0,0,0,0.15)",transition:"left 0.1s",pointerEvents:"none"}}),g.jsx("span",{className:"sr-only",children:f?r:u})]})}function he({value:n,onChange:e,options:o={}}){const a=Array.isArray(o)?o.map(s=>({value:s.value,label:s.label,icon:s.icon,pro:s.pro})):Object.entries(o).map(([s,r])=>({value:s,label:r}));return g.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(({value:s,label:r,icon:u,pro:f})=>{const h=!f&&String(n)===String(s);return g.jsxs("div",{className:"relative inline-flex",style:f?{pointerEvents:"none"}:void 0,title:f?O("Available in Pro"):void 0,children:[g.jsx("button",{type:"button",onClick:()=>e(s),disabled:f,"aria-label":u?r:void 0,className:["rounded border text-sm font-medium transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-[#0084ff]",u?"w-10 h-9 inline-flex items-center justify-center text-lg leading-none":"px-3 py-1.5",f?"bg-gray-50 border-gray-200 text-gray-400 cursor-not-allowed":h?"bg-[#0084ff] border-[#0084ff] text-white":"bg-white border-gray-300 text-gray-600 hover:border-[#0084ff] hover:text-[#0084ff]"].join(" "),children:u?g.jsx("i",{className:u}):r}),f&&g.jsx("span",{className:"absolute top-0 right-0 bg-gray-500 text-white text-[8px] font-bold leading-none px-1 py-0.5 rounded",style:{letterSpacing:"0.5px"},children:O("PRO")})]},s)})})}function cu({value:n,onChange:e,options:o={}}){const[a,s]=E.useState(null),r=Object.entries(o);return g.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"0 0"},children:r.map(([u,f])=>{const h=!!f.pro,p=!h&&String(n)===String(u),b=a===u,y=p?"#1a74e4":b&&!h?"#8396a2":"gray",v=p||b,_=()=>e(u);return g.jsxs("div",{onMouseEnter:()=>!h&&s(u),onMouseLeave:()=>s(null),style:{position:"relative",display:"inline-block",margin:"0 5px 8px 5px",cursor:h?"not-allowed":"pointer",userSelect:"none",textAlign:"center",backgroundColor:"#fff"},title:h?O("Available in Pro"):void 0,children:[h&&g.jsx("span",{style:{position:"absolute",top:5,right:5,background:"#6b7280",color:"#fff",fontSize:9,fontWeight:700,letterSpacing:"0.5px",lineHeight:1,padding:"3px 5px",borderRadius:3,zIndex:10,pointerEvents:"none"},children:O("PRO")}),g.jsx("span",{"aria-hidden":"true",style:{position:"absolute",top:5,right:5,width:15,height:15,borderRadius:"50%",background:"#1a74e4",display:"flex",alignItems:"center",justifyContent:"center",opacity:p?1:0,transition:"opacity 0.2s",pointerEvents:"none",zIndex:10},children:g.jsx(_c,{size:10,color:"#fff",strokeWidth:3})}),f.image&&g.jsx("img",{src:f.image,alt:f.text??u,onClick:_,style:{display:"block",maxWidth:"100%",width:"120px",maxHeight:80,height:80,borderRadius:5,outline:"none",outlineOffset:-3,cursor:h?"not-allowed":"pointer",transition:"outline-color 0.2s",border:`2px solid ${y}`,opacity:h?.5:1,pointerEvents:h?"none":"auto"}}),g.jsxs("span",{onClick:_,style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:5,fontSize:12,fontWeight:500,color:h?"#9ca3af":"#374151",cursor:h?"not-allowed":"pointer",lineHeight:1.4,pointerEvents:h?"none":"auto"},children:[f.text??u,!h&&f.demoUrl&&g.jsx("a",{href:f.demoUrl,target:"_blank",rel:"noopener noreferrer",className:"mcs-demo-icon","data-tooltip":O("Demo"),onClick:k=>k.stopPropagation(),style:{marginLeft:6,opacity:v?1:0,pointerEvents:v?"auto":"none",transition:"opacity 0.2s linear, color 0.15s",lineHeight:1,display:"inline-flex",alignItems:"center"},children:g.jsx(yc,{size:11})})]})]},u)})})}function js({value:n="#000000",onChange:e}){return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"color",value:n||"#000000",onChange:o=>e(o.target.value),className:"w-8 h-8 !rounded border !border-gray-300 cursor-pointer"}),g.jsx("input",{type:"text",value:n||"",onChange:o=>e(o.target.value),placeholder:"#000000",className:"w-28 !h-8 !min-h-8 border !border-gray-300 rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-[#0084ff]"})]})}function fo({value:n={},onChange:e,options:o={}}){const a=(s,r)=>e({...n,[s]:r});return g.jsx("div",{className:"flex flex-wrap gap-6",children:Object.entries(o).map(([s,r])=>g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("span",{className:"text-xs font-medium text-gray-500",children:r}),g.jsx(js,{value:n[s]??"#000000",onChange:u=>a(s,u)})]},s))})}function uu({value:n=0,onChange:e,min:o=0,max:a=100,step:s=1,unit:r=""}){const u=Number(n)||0;return g.jsxs("div",{className:"flex items-center gap-3 max-w-lg",children:[g.jsx("input",{type:"range",min:o,max:a,step:s,value:u,onChange:f=>e(Number(f.target.value)),className:"flex-1 accent-[#0084ff]"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("input",{type:"number",min:o,max:a,step:s,value:u,onChange:f=>e(Number(f.target.value)),className:"w-20 !h-8 !min-h-8 border border-gray-300 rounded px-2 py-1.5 text-sm text-center focus:outline-none focus:ring-2 focus:ring-[#0084ff]"}),r&&g.jsx("span",{className:"text-sm text-gray-400",children:r})]})]})}const Zj=["px","em","rem","%"];function Re({value:n={},onChange:e,top:o=!0,right:a=!0,bottom:s=!0,left:r=!0}){const u={top:"",right:"",bottom:"",left:"",unit:"px",...n},f=(p,b)=>e({...u,[p]:b}),h=[{key:"top",label:O("Top"),show:o},{key:"right",label:O("Right"),show:a},{key:"bottom",label:O("Bottom"),show:s},{key:"left",label:O("Left"),show:r}].filter(p=>p.show);return g.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[h.map(({key:p,label:b})=>g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:b}),g.jsx("input",{type:"number",value:u[p]??"",onChange:y=>f(p,y.target.value),className:"w-20 !h-8 !min-h-8 border border-gray-300 rounded px-2 py-1.5 text-sm text-center focus:outline-none focus:ring-2 focus:ring-[#0084ff]"})]},p)),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:O("Unit")}),g.jsx("select",{value:u.unit,onChange:p=>f("unit",p.target.value),className:"!h-8 !min-h-8 border border-gray-300 rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-[#0084ff] !leading-[normal]",children:Zj.map(p=>g.jsx("option",{value:p,children:p},p))})]})]})}function In({value:n={},onChange:e,placeholder:o="Upload or select an image",preview:a=!0}){const s=typeof n=="string"?n:n?.url??"",r=O(o),u=()=>{if(!window.wp?.media){alert(O("WordPress media library is not available."));return}const f=window.wp.media({title:O("Select Image"),button:{text:O("Use this image")},multiple:!1,library:{type:"image"}});f.on("select",()=>{const h=f.state().get("selection").first().toJSON();e({url:h.url,id:h.id})}),f.open()};return g.jsxs("div",{className:"flex flex-col gap-3 max-w-sm",children:[a&&s&&g.jsxs("div",{className:"relative group w-32 h-32 rounded overflow-hidden border border-gray-200 bg-gray-50",children:[g.jsx("img",{src:s,alt:O("Preview"),className:"w-full h-full object-cover"}),g.jsx("button",{type:"button",onClick:()=>e({url:"",id:""}),className:"absolute inset-0 bg-black/40 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:O("Remove")})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"button",onClick:u,className:"px-3 py-2 bg-white border border-gray-300 rounded text-sm text-gray-700 hover:border-[#0084ff] hover:text-[#0084ff] transition-colors",children:O(s?"Change Image":"Select Image")}),s&&g.jsx("button",{type:"button",onClick:()=>e({url:"",id:""}),className:"px-3 py-2 bg-white border border-gray-300 rounded text-sm text-red-500 hover:border-red-400 transition-colors",children:O("Remove")})]}),!s&&g.jsx("p",{className:"text-xs text-gray-400",children:r})]})}const fu=[{key:"availablity-sunday",label:"Sunday",short:"Sun"},{key:"availablity-monday",label:"Monday",short:"Mon"},{key:"availablity-tuesday",label:"Tuesday",short:"Tue"},{key:"availablity-wednesday",label:"Wednesday",short:"Wed"},{key:"availablity-thursday",label:"Thursday",short:"Thu"},{key:"availablity-friday",label:"Friday",short:"Fri"},{key:"availablity-saturday",label:"Saturday",short:"Sat"}],Gp=Array.from({length:24},(n,e)=>String(e).padStart(2,"0")),Kp=Array.from({length:60},(n,e)=>String(e).padStart(2,"0")),ho=44,Wp=5,$p=Math.floor(Wp/2)*ho,ks="#0084ff";function Ij(n=""){const[e="00",o="00"]=(n||"00:00").split(":");return{h:Math.min(23,Math.max(0,parseInt(e,10)||0)),m:Math.min(59,Math.max(0,parseInt(o,10)||0))}}function Qp(n){return!n||!n.from&&!n.to?!1:n.from==="00:00"&&n.to==="00:00"}const du=({content:n,children:e})=>g.jsx(lu,{content:n,placement:"top",maxWidth:200,delay:250,children:e});function Zp({items:n,index:e,onIndexChange:o}){const a=E.useRef(null),s=E.useRef(null);E.useEffect(()=>{a.current&&(a.current.scrollTop=e*ho)},[]);const r=()=>{cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(!a.current)return;const f=Math.round(a.current.scrollTop/ho),h=Math.max(0,Math.min(n.length-1,f));h!==e&&o(h)})},u=f=>{a.current?.scrollTo({top:f*ho,behavior:"smooth"}),o(f)};return g.jsxs("div",{ref:a,onScroll:r,className:"mcs-wheel",style:{flex:1,height:ho*Wp,overflowY:"scroll",scrollSnapType:"y mandatory"},children:[g.jsx("div",{style:{height:$p,flexShrink:0}}),n.map((f,h)=>{const p=h===e;return g.jsx("div",{onClick:()=>u(h),style:{height:ho,scrollSnapAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"0 10px"},children:g.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:36,borderRadius:10,background:p?ks:"transparent",color:p?"#fff":"#1f3a5f",fontSize:18,fontWeight:600,lineHeight:1,transition:"background 0.15s, color 0.15s",userSelect:"none"},children:f})},f)}),g.jsx("div",{style:{height:$p,flexShrink:0}})]})}function Ip({label:n,value:e="",onChange:o}){const[a,s]=E.useState(!1),[r,u]=E.useState(0),[f,h]=E.useState(0),[p,b]=E.useState({top:0,left:0}),y=E.useRef(null),v=e||"--:--",_=E.useCallback(()=>{if(!y.current)return;const M=y.current.getBoundingClientRect();b({top:M.bottom+window.scrollY+6,left:M.left+window.scrollX})},[]),k=()=>{const{h:M,m:D}=Ij(e||"00:00");u(M),h(D),_(),s(!0)};E.useEffect(()=>{if(!a)return;const M=()=>_(),D=()=>_(),U=w=>{const Y=document.getElementById("mcs-wheel-portal");y.current&&!y.current.contains(w.target)&&Y&&!Y.contains(w.target)&&s(!1)},z=w=>{w.key==="Escape"&&s(!1)};return window.addEventListener("scroll",M,!0),window.addEventListener("resize",D),document.addEventListener("mousedown",U),document.addEventListener("keydown",z),()=>{window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",D),document.removeEventListener("mousedown",U),document.removeEventListener("keydown",z)}},[a,_]);const C=()=>{o(`${Gp[r]}:${Kp[f]}`),s(!1)},j=a&&jn.createPortal(g.jsxs("div",{id:"mcs-wheel-portal",style:{position:"absolute",top:p.top,left:p.left,width:260,zIndex:9999999,background:"#fff",border:"1px solid #e5e7eb",borderRadius:12,boxShadow:"0 8px 30px rgba(0,0,0,.15)",overflow:"hidden"},children:[g.jsxs("div",{style:{display:"flex",position:"relative"},children:[g.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:2,background:"linear-gradient(to bottom, rgba(255,255,255,.7) 0%, transparent 30%, transparent 70%, rgba(255,255,255,.7) 100%)"}}),g.jsx(Zp,{items:Gp,index:r,onIndexChange:u}),g.jsx(Zp,{items:Kp,index:f,onIndexChange:h})]}),g.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:24,padding:"10px 20px 12px",borderTop:"1px solid #f0f0f0"},children:[g.jsx("button",{type:"button",onClick:()=>s(!1),style:{fontSize:14,fontWeight:500,color:"#9ca3af",background:"none",border:"none",cursor:"pointer",padding:0},children:O("Cancel")}),g.jsx("button",{type:"button",onClick:C,style:{fontSize:14,fontWeight:600,color:"#6b7280",background:"none",border:"none",cursor:"pointer",padding:0},onMouseEnter:M=>M.currentTarget.style.color=ks,onMouseLeave:M=>M.currentTarget.style.color="#6b7280",children:O("Ok")})]})]}),document.body);return g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-gray-500 mb-1.5 font-medium uppercase tracking-wide",children:n}),g.jsxs("button",{ref:y,type:"button","aria-haspopup":"dialog","aria-expanded":a,onClick:()=>a?s(!1):k(),style:{border:"1px solid #d1d5db",fontFamily:"ui-monospace, monospace",color:e?"#1f3a5f":"#9ca3af",transition:"border-color .15s"},className:"cursor-pointer text-sm py-2 px-3 rounded bg-white min-w-[130px] gap-3 inline-flex items-center justify-between",onMouseEnter:M=>M.currentTarget.style.borderColor=ks,onMouseLeave:M=>M.currentTarget.style.borderColor=a?ks:"#d1d5db",children:[g.jsx("span",{children:v}),g.jsx(xc,{size:18,color:"#9ca3af",strokeWidth:1.8})]}),j]})}function Jj({value:n={},onChange:e}){const[o,a]=E.useState(fu[1].key),s=(b,y,v)=>{const _=n[b]??{from:"",to:""};e({...n,[b]:{..._,[y]:v}})},r=b=>e({...n,[b]:{from:"00:00",to:"00:00"}}),u=b=>{const y={...n};delete y[b],e(y)},f=n[o]??{from:"",to:""},h=Qp(f),p=O(fu.find(b=>b.key===o)?.label??"");return g.jsxs("div",{className:"w-full max-w-5xl",children:[g.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:fu.map(({key:b,label:y,short:v})=>{const _=n[b],k=Qp(_),C=b===o,j=O(y),M=k?`${j}: ${O("Offline")}`:_?.from&&_?.to?`${j}: ${_.from} – ${_.to}`:`${j}: ${O("Online (always)")}`;return g.jsx(du,{content:M,children:g.jsxs("button",{type:"button",onClick:()=>a(b),className:["flex items-center gap-1.5 px-3 py-1.5 rounded border text-xs font-semibold transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-[#0084ff]",C?"bg-[#0084ff] border-[#0084ff] text-white shadow-sm":"bg-white border-gray-300 text-gray-600 hover:border-[#0084ff] hover:text-[#0084ff]"].join(" "),children:[g.jsx("span",{className:["inline-block w-1.5 h-1.5 rounded-full flex-shrink-0",k?C?"bg-red-300":"bg-red-400":C?"bg-green-300":"bg-green-500"].join(" ")}),O(v)]})},b)})}),g.jsxs("div",{className:"bg-white border border-gray-200 rounded shadow-sm overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-gray-50 border-b border-gray-100",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${h?"bg-red-400":"bg-green-500"}`}),g.jsx("span",{className:"text-sm font-semibold text-gray-700",children:p}),g.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${h?"bg-red-50 text-red-500":"bg-green-50 text-green-600"}`,children:O(h?"Offline":"Online")})]}),g.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[!h&&g.jsx(du,{content:O("Mark this day as offline (unavailable)"),children:g.jsx("button",{type:"button",onClick:()=>r(o),className:"text-gray-400 hover:text-red-500 transition-colors focus:outline-none",children:O("Mark offline")})}),h&&g.jsx(du,{content:O("Mark this day as online (always available)"),children:g.jsx("button",{type:"button",onClick:()=>u(o),className:"text-gray-400 hover:text-green-600 transition-colors focus:outline-none",children:O("Mark online")})})]})]}),g.jsxs("div",{className:"px-5 py-4 flex items-end gap-4 flex-wrap",children:[g.jsx(Ip,{label:O("From"),value:f.from||"",onChange:b=>s(o,"from",b)}),g.jsx("div",{className:"pb-2 text-gray-300 select-none",children:g.jsx(K1,{size:18,strokeWidth:2})}),g.jsx(Ip,{label:O("To"),value:f.to||"",onChange:b=>s(o,"to",b)})]}),g.jsx("div",{className:"px-5 pb-4 -mt-1",children:g.jsx("p",{className:"text-xs text-gray-400 leading-snug m-0",children:O("Set your daily availability using 24-hour format (e.g. 09:00 to 18:00).")})})]})]})}function t4({text:n,image:e,liveDemo:o,openDocs:a}){return g.jsxs("div",{style:{minWidth:200},children:[e&&g.jsx("div",{style:{marginBottom:10,borderRadius:4,overflow:"hidden",border:"1px solid #eef0f3"},children:g.jsx("img",{src:e,alt:"",style:{display:"block",width:"100%",height:"auto"}})}),n&&g.jsx("div",{style:{color:"#fff",fontSize:14,lineHeight:1.6,fontWeight:500},children:n}),(o||a)&&g.jsxs("div",{style:{display:"flex",gap:8,marginTop:e||n?11:0,flexWrap:"wrap"},children:[o&&g.jsx("a",{href:o,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",background:"#0084ff",color:"#fff",fontSize:12,fontWeight:600,textDecoration:"none",padding:"10px 12px",borderRadius:4,lineHeight:1.2},onMouseEnter:s=>s.currentTarget.style.background="#0065cc",onMouseLeave:s=>s.currentTarget.style.background="#0084ff",children:"Live Demo"}),a&&g.jsx("a",{href:a,target:"_blank",rel:"noreferrer",style:{display:"inline-flex",alignItems:"center",background:"transparent",color:"#0084ff",fontSize:12,fontWeight:600,textDecoration:"none",padding:"0 12px",borderRadius:4,lineHeight:"34px",border:"1px solid #0084ff"},onMouseEnter:s=>{s.currentTarget.style.background="#0084ff",s.currentTarget.style.color="#fff"},onMouseLeave:s=>{s.currentTarget.style.background="transparent",s.currentTarget.style.color="#0084ff"},children:"Open Docs"})]})]})}function Jp({children:n,helpKey:e,help:o,helpImage:a,liveDemo:s,openDocs:r,className:u="text-xs font-medium text-gray-500 mb-1 block"}){const f=e?Fp(e):null;f&&(o=o??f.help,a=a??f.helpImage,s=s??f.liveDemo,r=r??f.openDocs);const h=o||a||s||r;return g.jsxs("label",{className:u,children:[g.jsx("span",{className:"inline align-middle",children:n}),h&&g.jsx(lu,{content:g.jsx(t4,{text:o,image:a,liveDemo:s,openDocs:r}),placement:"right",variant:"light",maxWidth:300,delay:140,grace:200,children:g.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:15,height:15,borderRadius:"50%",border:"1.5px solid #9ca3af",color:"#9ca3af",fontSize:9,fontWeight:700,cursor:"help",userSelect:"none",marginLeft:5,lineHeight:1,verticalAlign:"middle",flexShrink:0,transition:"border-color .15s, color .15s"},onMouseEnter:p=>{p.currentTarget.style.borderColor="#0084ff",p.currentTarget.style.color="#0084ff"},onMouseLeave:p=>{p.currentTarget.style.borderColor="#9ca3af",p.currentTarget.style.color="#9ca3af"},children:"i"})})]})}function e4({value:n=[],onChange:e,options:o={},columns:a=2}){const s=Array.isArray(n)?n:Object.entries(n).filter(([,u])=>u).map(([u])=>u),r=u=>{const f=s.includes(u)?s.filter(h=>h!==u):[...s,u];e(f)};return g.jsx("div",{className:"grid gap-2",style:{gridTemplateColumns:`repeat(${a}, minmax(0, 1fr))`},children:Object.entries(o).map(([u,f])=>{const h=f&&typeof f=="object",p=h?f.label:f;return(h?!!f.pro:!1)?g.jsxs("span",{title:O("Available in Pro"),className:"flex items-center gap-2 cursor-not-allowed select-none",style:{pointerEvents:"none"},children:[g.jsx("input",{type:"checkbox",checked:!1,disabled:!0,readOnly:!0,className:"w-4 h-4 rounded border-gray-300 accent-gray-400 cursor-not-allowed"}),g.jsxs("span",{className:"text-sm text-gray-400 inline-flex items-center gap-1.5",children:[p,g.jsx("span",{className:"bg-gray-500 text-white text-[8px] font-bold leading-none px-1 py-0.5 rounded",style:{letterSpacing:"0.5px"},children:O("PRO")})]})]},u):g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer group",children:[g.jsx("input",{type:"checkbox",checked:s.includes(u),onChange:()=>r(u),className:"w-4 h-4 rounded border-gray-300 text-[#0084ff] accent-[#0084ff] focus:ring-[#0084ff]"}),g.jsx("span",{className:"text-sm text-gray-700 group-hover:text-gray-900",children:p})]},u)})})}const n4=["solid","dashed","dotted","double","groove","ridge","inset","outset","none"];function tm({value:n={},onChange:e,showHoverColor:o=!0,showBorderRadius:a=!0}){const s={all:"0",style:"solid",color:"",hover_color:"",border_radius:"50",...n},r=(u,f)=>e({...s,[u]:f});return g.jsxs("div",{className:"flex flex-wrap gap-4 items-end",children:[g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:"Width (px)"}),g.jsx("input",{type:"number",min:0,max:20,value:s.all??"",onChange:u=>r("all",u.target.value),className:"w-20 !h-8 !min-h-8 border border-gray-300 rounded px-2 py-1.5 text-sm text-center focus:outline-none focus:ring-2 focus:ring-[#0084ff]"})]}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:"Style"}),g.jsx("select",{value:s.style,onChange:u=>r("style",u.target.value),className:"!h-8 !min-h-8 border border-gray-300 rounded px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-[#0084ff] !leading-[normal]",children:n4.map(u=>g.jsx("option",{value:u,children:u},u))})]}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:"Color"}),g.jsx(js,{value:s.color,onChange:u=>r("color",u)})]}),o&&g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:"Hover Color"}),g.jsx(js,{value:s.hover_color,onChange:u=>r("hover_color",u)})]}),a&&g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("label",{className:"text-xs text-gray-500",children:"Radius (px)"}),g.jsx("input",{type:"number",min:0,max:999,value:s.border_radius??"",onChange:u=>r("border_radius",u.target.value),className:"w-20 !h-8 !min-h-8 border border-gray-300 rounded px-2 py-1.5 text-sm text-center focus:outline-none focus:ring-2 focus:ring-[#0084ff]"})]})]})}function i4({value:n=[],onChange:e,items:o=[],placeholder:a="Select items…",emptyMessage:s="No items available."}){const r=O(a),u=O(s),[f,h]=E.useState(!1),[p,b]=E.useState(""),y=E.useRef(null),v=E.useRef(null),_=E.useRef(null),[k,C]=E.useState({left:0,width:0,top:0,maxHeight:240,openUp:!1}),j=E.useCallback(()=>{const w=v.current;if(!w)return;const Y=w.getBoundingClientRect(),G=4,K=8,I=240,J=window.innerHeight-Y.bottom,ot=Y.top,L=J<Math.min(I,200)&&ot>J,gt=(L?ot:J)-G-K,rt=Math.max(120,Math.min(I,gt));C(L?{left:Y.left,width:Y.width,bottom:window.innerHeight-Y.top+G,maxHeight:rt,openUp:!0}:{left:Y.left,width:Y.width,top:Y.bottom+G,maxHeight:rt,openUp:!1})},[]);E.useEffect(()=>{if(f)return j(),window.addEventListener("scroll",j,!0),window.addEventListener("resize",j),()=>{window.removeEventListener("scroll",j,!0),window.removeEventListener("resize",j)}},[f,j]),E.useEffect(()=>{const w=Y=>{y.current&&y.current.contains(Y.target)||_.current&&_.current.contains(Y.target)||h(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]);const M=(Array.isArray(n)?n:[]).map(String),D=w=>{const Y=String(w);e(M.includes(Y)?M.filter(G=>G!==Y):[...M,Y])},U=p?o.filter(w=>(w.title||w.name||"").toLowerCase().includes(p.toLowerCase())):o,z=o.filter(w=>M.includes(String(w.id)));return g.jsxs("div",{className:"relative max-w-lg",ref:y,children:[z.length>0&&g.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:z.map(w=>g.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-blue-50 text-[#0084ff] border border-blue-200 rounded text-xs font-medium",children:[w.title||w.name,g.jsx("button",{type:"button",onClick:()=>D(w.id),className:"text-[#0084ff] hover:text-blue-800 leading-none",children:"×"})]},w.id))}),g.jsxs("button",{ref:v,type:"button",onClick:()=>h(w=>!w),className:"w-full border border-gray-300 rounded px-3 py-2 text-sm text-left bg-white focus:outline-none focus:ring-2 focus:ring-[#0084ff] flex items-center justify-between",children:[g.jsx("span",{className:"text-gray-400",children:r}),g.jsx(vc,{className:`w-4 h-4 text-gray-400 transition-transform ${f?"rotate-180":""}`})]}),f&&jn.createPortal(g.jsxs("div",{ref:_,style:{position:"fixed",left:k.left,width:k.width,maxHeight:k.maxHeight,zIndex:1e5,...k.openUp?{bottom:k.bottom}:{top:k.top}},className:"bg-white border border-gray-200 rounded shadow-lg overflow-auto",children:[g.jsx("div",{className:"p-2 border-b border-gray-100 sticky top-0 bg-white",children:g.jsx("input",{type:"text",value:p,onChange:w=>b(w.target.value),placeholder:O("Search…"),autoFocus:!0,className:"w-full border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-[#0084ff]"})}),U.length===0&&g.jsx("p",{className:"px-3 py-2 text-sm text-gray-400",children:u}),U.map(w=>{const Y=M.includes(String(w.id));return g.jsxs("label",{className:`flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-gray-50 ${Y?"bg-blue-50":""}`,children:[g.jsx("input",{type:"checkbox",checked:Y,onChange:()=>D(w.id),className:"w-4 h-4 rounded accent-[#0084ff]"}),g.jsx("span",{className:"text-sm text-gray-700",children:w.title||w.name})]},w.id)})]}),document.body)]})}const em=["icofont-upload-alt","icofont-upload","icofont-cloud-upload","icofont-eye-alt","icofont-code-alt","icofont-code-not-allowed","icofont-vscode","icofont-shield","icofont-shield-alt","icofont-rounded-down","icofont-rounded-left-down","icofont-rounded-left-up","icofont-rounded-left","icofont-rounded-right-down","icofont-rounded-right-up","icofont-rounded-right","icofont-rounded-up","icofont-rounded-double-right","icofont-rounded-double-left","icofont-ui-play","icofont-play","icofont-play-alt-2","icofont-spinner-alt-3","icofont-spinner-alt-5","icofont-ui-volume","icofont-volume-up","icofont-volume-down","icofont-mute-volume","icofont-volume-mute","icofont-expand","icofont-close","icofont-close-line","icofont-close-circled","icofont-search-1","icofont-search-2","icofont-ui-search","icofont-check","icofont-check-alt","icofont-verification-check","icofont-life-ring","icofont-paint","icofont-long-arrow-down","icofont-long-arrow-left","icofont-long-arrow-right","icofont-long-arrow-up","icofont-simple-left","icofont-bubble-left","icofont-caret-left","icofont-caret-right","icofont-bubble-right","icofont-simple-right","icofont-plus","icofont-plus-circle","icofont-copy-invert","icofont-ui-copy","icofont-question-circle","icofont-minus","icofont-minus-circle","icofont-download-alt","icofont-downloaded","icofont-loop","icofont-blood-drop","icofont-volume-off","icofont-user-male","icofont-close-line-circled","icofont-check-circled","icofont-drag","icofont-drag1","icofont-envelope","icofont-envelope-open","icofont-gear","icofont-gears","icofont-gear-alt","icofont-hand","icofont-location-pin","icofont-toggle-off","icofont-toggle-on","icofont-question","icofont-outdent","icofont-settings-alt","icofont-monitor","icofont-ui-mute","icofont-brand-whatsapp","icofont-whatsapp","icofont-ui-messaging","icofont-ui-message","icofont-text-height","icofont-text-width","icofont-mobile-phone","icofont-ui-video-message","icofont-ui-text-chat","icofont-ui-video-chat","icofont-wechat","icofont-chat","icofont-snapchat","icofont-ui-chat","icofont-brand-snapchat","icofont-ui-call","icofont-telephone","icofont-address-book","icofont-google-map","icofont-search-map","icofont-ui-map","icofont-map-pins","icofont-map","icofont-crown-king","icofont-crown-queen","icofont-dart","icofont-flora-flower","icofont-gift-box","icofont-halloween-pumpkin","icofont-hand-power","icofont-sand-clock","icofont-love","icofont-ship-wheel","icofont-snowmobile","icofont-space-shuttle","icofont-star-shape","icofont-tree-alt","icofont-unity-hand","icofont-woman-bird","icofont-butterfly","icofont-camel","icofont-cow","icofont-crab","icofont-crocodile","icofont-elephant","icofont-brand-acer","icofont-brand-adidas","icofont-brand-adobe","icofont-brand-air-new-zealand","icofont-brand-airbnb","icofont-brand-aircell","icofont-brand-airtel","icofont-brand-alcatel","icofont-brand-alibaba","icofont-brand-aliexpress","icofont-brand-alipay","icofont-brand-amazon","icofont-brand-amd","icofont-brand-american-airlines","icofont-brand-android-robot","icofont-brand-android","icofont-brand-aol","icofont-brand-apple","icofont-brand-appstore","icofont-brand-asus","icofont-brand-ati","icofont-brand-att","icofont-brand-audi","icofont-brand-axiata","icofont-brand-bada","icofont-brand-bbc","icofont-brand-bing","icofont-brand-blackberry","icofont-brand-bmw","icofont-brand-box","icofont-brand-burger-king","icofont-brand-business-insider","icofont-brand-buzzfeed","icofont-brand-cannon","icofont-brand-casio","icofont-brand-china-mobile","icofont-brand-china-telecom","icofont-brand-china-unicom","icofont-brand-cisco","icofont-brand-citibank","icofont-brand-cnet","icofont-brand-cnn","icofont-brand-cocal-cola","icofont-brand-compaq","icofont-brand-debian","icofont-brand-delicious","icofont-brand-dell","icofont-brand-designbump","icofont-brand-designfloat","icofont-brand-disney","icofont-brand-dodge","icofont-brand-dove","icofont-brand-drupal","icofont-brand-ebay","icofont-brand-eleven","icofont-brand-emirates","icofont-brand-espn","icofont-brand-etihad-airways","icofont-brand-etisalat","icofont-brand-etsy","icofont-brand-fastrack","icofont-brand-fedex","icofont-brand-ferrari","icofont-brand-fitbit","icofont-brand-flikr","icofont-brand-forbes","icofont-brand-foursquare","icofont-brand-foxconn","icofont-brand-fujitsu","icofont-brand-general-electric","icofont-brand-gillette","icofont-brand-gizmodo","icofont-brand-gnome","icofont-brand-google","icofont-brand-gopro","icofont-brand-gucci","icofont-brand-hallmark","icofont-brand-hi5","icofont-brand-honda","icofont-brand-hp","icofont-brand-hsbc","icofont-brand-htc","icofont-brand-huawei","icofont-brand-hulu","icofont-brand-hyundai","icofont-brand-ibm","icofont-brand-icofont","icofont-brand-icq","icofont-brand-ikea","icofont-brand-imdb","icofont-brand-indiegogo","icofont-brand-intel","icofont-brand-ipair","icofont-brand-jaguar","icofont-brand-java","icofont-brand-joomla","icofont-brand-kickstarter","icofont-brand-kik","icofont-brand-lastfm","icofont-brand-lego","icofont-brand-lenovo","icofont-brand-levis","icofont-brand-lexus","icofont-brand-lg","icofont-brand-life-hacker","icofont-brand-linux-mint","icofont-brand-linux","icofont-brand-lionix","icofont-brand-loreal","icofont-brand-louis-vuitton","icofont-brand-mac-os","icofont-brand-marvel-app","icofont-brand-mashable","icofont-brand-mazda","icofont-brand-mcdonals","icofont-brand-mercedes","icofont-brand-micromax","icofont-brand-microsoft","icofont-brand-mobileme","icofont-brand-mobily","icofont-brand-motorola","icofont-brand-msi","icofont-brand-mts","icofont-brand-myspace","icofont-brand-mytv","icofont-brand-nasa","icofont-brand-natgeo","icofont-brand-nbc","icofont-brand-nescafe","icofont-brand-nestle","icofont-brand-netflix","icofont-brand-nexus","icofont-brand-nike","icofont-brand-nokia","icofont-brand-nvidia","icofont-brand-omega","icofont-brand-opensuse","icofont-brand-oracle","icofont-brand-panasonic","icofont-brand-paypal","icofont-brand-pepsi","icofont-brand-philips","icofont-brand-pizza-hut","icofont-brand-playstation","icofont-brand-puma","icofont-brand-qatar-air","icofont-brand-qvc","icofont-brand-readernaut","icofont-brand-redbull","icofont-brand-reebok","icofont-brand-reuters","icofont-brand-samsung","icofont-brand-sap","icofont-brand-saudia-airlines","icofont-brand-scribd","icofont-brand-shell","icofont-brand-siemens","icofont-brand-sk-telecom","icofont-brand-slideshare","icofont-brand-smashing-magazine","icofont-brand-sony-ericsson","icofont-brand-sony","icofont-brand-soundcloud","icofont-brand-sprint","icofont-brand-squidoo","icofont-brand-starbucks","icofont-brand-stc","icofont-brand-steam","icofont-brand-suzuki","icofont-brand-symbian","icofont-brand-t-mobile","icofont-brand-tango","icofont-brand-target","icofont-brand-tata-indicom","icofont-brand-techcrunch","icofont-brand-telenor","icofont-brand-teliasonera","icofont-brand-tesla","icofont-brand-the-verge","icofont-brand-thenextweb","icofont-brand-toshiba","icofont-brand-toyota","icofont-brand-tribenet","icofont-brand-ubuntu","icofont-brand-unilever","icofont-brand-vaio","icofont-brand-verizon","icofont-brand-viber","icofont-brand-vodafone","icofont-brand-volkswagen","icofont-brand-walmart","icofont-brand-warnerbros","icofont-brand-wikipedia","icofont-brand-windows","icofont-brand-wire","icofont-brand-wordpress","icofont-brand-xiaomi","icofont-brand-yahoobuzz","icofont-brand-yamaha","icofont-brand-youtube","icofont-brand-zain","icofont-figma","icofont-illustrator","icofont-photoshop","icofont-bank-alt","icofont-bank","icofont-barcode","icofont-bill-alt","icofont-billboard","icofont-briefcase-1","icofont-briefcase-2","icofont-businessman","icofont-businesswoman","icofont-chair","icofont-coins","icofont-company","icofont-contact-add","icofont-files-stack","icofont-handshake-deal","icofont-id-card","icofont-meeting-add","icofont-money-bag","icofont-pie-chart","icofont-presentation-alt","icofont-presentation","icofont-stamp","icofont-stock-mobile","icofont-chart-arrows-axis","icofont-chart-bar-graph","icofont-chart-flow-1","icofont-chart-flow-2","icofont-chart-flow","icofont-chart-growth","icofont-chart-histogram-alt","icofont-chart-histogram","icofont-chart-line-alt","icofont-chart-line","icofont-chart-pie-alt","icofont-chart-pie","icofont-chart-radar-graph","icofont-architecture-alt","icofont-architecture","icofont-barricade","icofont-bolt","icofont-bricks","icofont-building-alt","icofont-bull-dozer","icofont-calculations","icofont-cement-mix","icofont-cement-mixer","icofont-concrete-mixer","icofont-danger-zone","icofont-drill","icofont-eco-energy","icofont-eco-environmen","icofont-energy-air","icofont-energy-oil","icofont-energy-savings","icofont-energy-solar","icofont-energy-water","icofont-engineer","icofont-fire-extinguisher-alt","icofont-fire-extinguisher","icofont-fix-tools","icofont-fork-lift","icofont-glue-oil","icofont-hammer-alt","icofont-hammer","icofont-help-robot","icofont-industries-1","icofont-industries-2","icofont-industries-3","icofont-industries-4","icofont-industries-5","icofont-industries","icofont-labour","icofont-mining","icofont-paint-brush","icofont-pollution","icofont-power-zone","icofont-radio-active","icofont-recycle-alt","icofont-recycling-man","icofont-safety-hat-light","icofont-safety-hat","icofont-saw","icofont-screw-driver","icofont-tools-1","icofont-tools-bag","icofont-tow-truck","icofont-trolley","icofont-trowel","icofont-under-construction-alt","icofont-under-construction","icofont-vehicle-cement","icofont-vehicle-crane","icofont-vehicle-delivery-van","icofont-vehicle-dozer","icofont-vehicle-excavator","icofont-vehicle-trucktor","icofont-vehicle-wrecking","icofont-worker","icofont-workers-group","icofont-wrench","icofont-afghani-false","icofont-afghani-minus","icofont-afghani-plus","icofont-afghani-true","icofont-afghani","icofont-baht-false","icofont-baht-minus","icofont-baht-plus","icofont-baht-true","icofont-baht","icofont-bitcoin-false","icofont-bitcoin-minus","icofont-bitcoin-plus","icofont-bitcoin-true","icofont-bitcoin","icofont-dollar-flase","icofont-dollar-minus","icofont-dollar-plus","icofont-dollar-true","icofont-dollar","icofont-dong-false","icofont-dong-minus","icofont-dong-plus","icofont-dong-true","icofont-dong","icofont-euro-false","icofont-euro-minus","icofont-euro-plus","icofont-euro-true","icofont-euro","icofont-frank-false","icofont-frank-minus","icofont-frank-plus","icofont-frank-true","icofont-frank","icofont-hryvnia-false","icofont-hryvnia-minus","icofont-hryvnia-plus","icofont-hryvnia-true","icofont-hryvnia","icofont-lira-false","icofont-lira-minus","icofont-lira-plus","icofont-lira-true","icofont-lira","icofont-peseta-false","icofont-peseta-minus","icofont-peseta-plus","icofont-peseta-true","icofont-peseta","icofont-peso-false","icofont-peso-minus","icofont-peso-plus","icofont-peso-true","icofont-peso","icofont-pound-false","icofont-pound-minus","icofont-pound-plus","icofont-pound-true","icofont-pound","icofont-renminbi-false","icofont-renminbi-minus","icofont-renminbi-plus","icofont-renminbi-true","icofont-renminbi","icofont-riyal-false","icofont-riyal-minus","icofont-riyal-plus","icofont-riyal-true","icofont-riyal","icofont-rouble-false","icofont-rouble-minus","icofont-rouble-plus","icofont-rouble-true","icofont-rouble","icofont-rupee-false","icofont-rupee-minus","icofont-rupee-plus","icofont-rupee-true","icofont-rupee","icofont-taka-false","icofont-taka-minus","icofont-taka-plus","icofont-taka-true","icofont-taka","icofont-turkish-lira-false","icofont-turkish-lira-minus","icofont-turkish-lira-plus","icofont-turkish-lira-true","icofont-turkish-lira","icofont-won-false","icofont-won-minus","icofont-won-plus","icofont-won-true","icofont-won","icofont-yen-false","icofont-yen-minus","icofont-yen-plus","icofont-yen-true","icofont-yen","icofont-android-nexus","icofont-android-tablet","icofont-apple-watch","icofont-drawing-tablet","icofont-earphone","icofont-flash-drive","icofont-game-console","icofont-game-controller","icofont-game-pad","icofont-game","icofont-headphone-alt-1","icofont-headphone-alt-2","icofont-headphone-alt-3","icofont-headphone-alt","icofont-headphone","icofont-htc-one","icofont-imac","icofont-ipad","icofont-iphone","icofont-ipod-nano","icofont-ipod-touch","icofont-keyboard-alt","icofont-keyboard-wireless","icofont-keyboard","icofont-laptop-alt","icofont-laptop","icofont-macbook","icofont-magic-mouse","icofont-micro-chip","icofont-microphone-alt","icofont-microphone","icofont-mouse","icofont-mp3-player","icofont-nintendo","icofont-playstation-alt","icofont-psvita","icofont-radio-mic","icofont-radio","icofont-refrigerator","icofont-samsung-galaxy","icofont-surface-tablet","icofont-ui-head-phone","icofont-ui-keyboard","icofont-washing-machine","icofont-wifi-router","icofont-wii-u","icofont-windows-lumia","icofont-wireless-mouse","icofont-xbox-360","icofont-arrow-down","icofont-arrow-left","icofont-arrow-right","icofont-arrow-up","icofont-block-down","icofont-block-left","icofont-block-right","icofont-block-up","icofont-bubble-down","icofont-bubble-up","icofont-caret-down","icofont-caret-up","icofont-circled-down","icofont-circled-left","icofont-circled-right","icofont-circled-up","icofont-collapse","icofont-cursor-drag","icofont-curved-double-left","icofont-curved-double-right","icofont-curved-down","icofont-curved-left","icofont-curved-right","icofont-curved-up","icofont-dotted-down","icofont-dotted-left","icofont-dotted-right","icofont-dotted-up","icofont-double-left","icofont-double-right","icofont-expand-alt","icofont-hand-down","icofont-hand-drag","icofont-hand-drag1","icofont-hand-drag2","icofont-hand-drawn-alt-down","icofont-hand-drawn-alt-left","icofont-hand-drawn-alt-right","icofont-hand-drawn-alt-up","icofont-hand-drawn-down","icofont-hand-drawn-left","icofont-hand-drawn-right","icofont-hand-drawn-up","icofont-hand-grippers","icofont-hand-left","icofont-hand-right","icofont-hand-up","icofont-line-block-down","icofont-line-block-left","icofont-line-block-right","icofont-line-block-up","icofont-rounded-collapse","icofont-rounded-expand","icofont-scroll-bubble-down","icofont-scroll-bubble-left","icofont-scroll-bubble-right","icofont-scroll-bubble-up","icofont-scroll-double-down","icofont-scroll-double-left","icofont-scroll-double-right","icofont-scroll-double-up","icofont-scroll-down","icofont-scroll-left","icofont-scroll-long-down","icofont-scroll-long-left","icofont-scroll-long-right","icofont-scroll-long-up","icofont-scroll-right","icofont-scroll-up","icofont-simple-down","icofont-simple-left-down","icofont-simple-left-up","icofont-simple-right-down","icofont-simple-right-up","icofont-simple-up","icofont-square-down","icofont-square-left","icofont-square-right","icofont-square-up","icofont-stylish-down","icofont-stylish-left","icofont-stylish-right","icofont-stylish-up","icofont-swoosh-down","icofont-swoosh-left","icofont-swoosh-right","icofont-swoosh-up","icofont-thin-double-left","icofont-thin-double-right","icofont-thin-down","icofont-thin-left","icofont-thin-right","icofont-thin-up","icofont-abc","icofont-atom","icofont-award","icofont-bell-alt","icofont-black-board","icofont-book-alt","icofont-book","icofont-brainstorming","icofont-certificate-alt-1","icofont-certificate-alt-2","icofont-certificate","icofont-education","icofont-electron","icofont-fountain-pen","icofont-globe-alt","icofont-graduate-alt","icofont-graduate","icofont-group-students","icofont-hat-alt","icofont-hat","icofont-instrument","icofont-lamp-light","icofont-medal","icofont-microscope-alt","icofont-microscope","icofont-paper","icofont-pen-alt-4","icofont-pen-nib","icofont-pencil-alt-5","icofont-quill-pen","icofont-read-book-alt","icofont-read-book","icofont-school-bag","icofont-school-bus","icofont-student-alt","icofont-student","icofont-teacher","icofont-test-bulb","icofont-test-tube-alt","icofont-university","icofont-angry","icofont-astonished","icofont-confounded","icofont-confused","icofont-crying","icofont-dizzy","icofont-expressionless","icofont-heart-eyes","icofont-laughing","icofont-nerd-smile","icofont-open-mouth","icofont-rage","icofont-rolling-eyes","icofont-sad","icofont-simple-smile","icofont-slightly-smile","icofont-smirk","icofont-stuck-out-tongue","icofont-wink-smile","icofont-worried","icofont-file-alt","icofont-file-audio","icofont-file-avi-mp4","icofont-file-bmp","icofont-file-code","icofont-file-css","icofont-file-document","icofont-file-eps","icofont-file-excel","icofont-file-exe","icofont-file-file","icofont-file-flv","icofont-file-gif","icofont-file-html5","icofont-file-image","icofont-file-iso","icofont-file-java","icofont-file-javascript","icofont-file-jpg","icofont-file-midi","icofont-file-mov","icofont-file-mp3","icofont-file-pdf","icofont-file-php","icofont-file-png","icofont-file-powerpoint","icofont-file-presentation","icofont-file-psb","icofont-file-psd","icofont-file-python","icofont-file-ruby","icofont-file-spreadsheet","icofont-file-sql","icofont-file-svg","icofont-file-text","icofont-file-tiff","icofont-file-video","icofont-file-wave","icofont-file-wmv","icofont-file-word","icofont-file-zip","icofont-cycling-alt","icofont-cycling","icofont-dumbbell","icofont-dumbbells","icofont-gym-alt-1","icofont-gym-alt-2","icofont-gym-alt-3","icofont-gym","icofont-muscle-weight","icofont-muscle","icofont-apple","icofont-arabian-coffee","icofont-artichoke","icofont-asparagus","icofont-avocado","icofont-baby-food","icofont-banana","icofont-bbq","icofont-beans","icofont-beer","icofont-bell-pepper-capsicum","icofont-birthday-cake","icofont-bread","icofont-broccoli","icofont-burger","icofont-cabbage","icofont-carrot","icofont-cauli-flower","icofont-cheese","icofont-chef","icofont-cherry","icofont-chicken-fry","icofont-chicken","icofont-cocktail","icofont-coconut-water","icofont-coconut","icofont-coffee-alt","icofont-coffee-cup","icofont-coffee-mug","icofont-coffee-pot","icofont-cola","icofont-corn","icofont-croissant","icofont-crop-plant","icofont-cucumber","icofont-culinary","icofont-cup-cake","icofont-dining-table","icofont-donut","icofont-egg-plant","icofont-egg-poached","icofont-farmer-alt","icofont-farmer","icofont-fast-food","icofont-food-basket","icofont-food-cart","icofont-fork-and-knife","icofont-french-fries","icofont-fruits","icofont-grapes","icofont-honey","icofont-hot-dog","icofont-ice-cream-alt","icofont-ice-cream","icofont-juice","icofont-ketchup","icofont-kiwi","icofont-layered-cake","icofont-lemon-alt","icofont-lemon","icofont-lobster","icofont-mango","icofont-milk","icofont-mushroom","icofont-noodles","icofont-onion","icofont-orange","icofont-pear","icofont-peas","icofont-pepper","icofont-pie-alt","icofont-pie","icofont-pineapple","icofont-pizza-slice","icofont-pizza","icofont-plant","icofont-popcorn","icofont-potato","icofont-pumpkin","icofont-raddish","icofont-restaurant-menu","icofont-restaurant","icofont-salt-and-pepper","icofont-sandwich","icofont-sausage","icofont-soft-drinks","icofont-soup-bowl","icofont-spoon-and-fork","icofont-steak","icofont-strawberry","icofont-sub-sandwich","icofont-sushi","icofont-taco","icofont-tea-pot","icofont-tea","icofont-tomato","icofont-watermelon","icofont-wheat","icofont-baby-backpack","icofont-baby-cloth","icofont-baby-milk-bottle","icofont-baby-trolley","icofont-baby","icofont-candy","icofont-holding-hands","icofont-infant-nipple","icofont-kids-scooter","icofont-safety-pin","icofont-teddy-bear","icofont-toy-ball","icofont-toy-cat","icofont-toy-duck","icofont-toy-elephant","icofont-toy-hand","icofont-toy-horse","icofont-toy-lattu","icofont-toy-train","icofont-burglar","icofont-cannon-firing","icofont-cc-camera","icofont-cop-badge","icofont-cop","icofont-court-hammer","icofont-court","icofont-finger-print","icofont-gavel","icofont-handcuff-alt","icofont-handcuff","icofont-investigation","icofont-investigator","icofont-jail","icofont-judge","icofont-law-alt-1","icofont-law-alt-2","icofont-law-alt-3","icofont-law-book","icofont-law-document","icofont-law-order","icofont-law-protect","icofont-law-scales","icofont-law","icofont-lawyer-alt-1","icofont-lawyer-alt-2","icofont-lawyer","icofont-legal","icofont-pistol","icofont-police-badge","icofont-police-cap","icofont-police-car-alt-1","icofont-police-car-alt-2","icofont-police-car","icofont-police-hat","icofont-police-van","icofont-police","icofont-thief-alt","icofont-thief","icofont-abacus-alt","icofont-abacus","icofont-angle-180","icofont-angle-45","icofont-angle-90","icofont-angle","icofont-calculator-alt-1","icofont-calculator-alt-2","icofont-calculator","icofont-circle-ruler-alt","icofont-circle-ruler","icofont-compass-alt-1","icofont-compass-alt-2","icofont-compass-alt-3","icofont-compass-alt-4","icofont-golden-ratio","icofont-marker-alt-1","icofont-marker-alt-2","icofont-marker-alt-3","icofont-marker","icofont-math","icofont-mathematical-alt-1","icofont-mathematical-alt-2","icofont-mathematical","icofont-pen-alt-1","icofont-pen-alt-2","icofont-pen-alt-3","icofont-pen-holder-alt-1","icofont-pen-holder","icofont-pen","icofont-pencil-alt-1","icofont-pencil-alt-2","icofont-pencil-alt-3","icofont-pencil-alt-4","icofont-pencil","icofont-ruler-alt-1","icofont-ruler-alt-2","icofont-ruler-compass-alt","icofont-ruler-compass","icofont-ruler-pencil-alt-1","icofont-ruler-pencil-alt-2","icofont-ruler-pencil","icofont-ruler","icofont-rulers-alt","icofont-rulers","icofont-square-root","icofont-ui-calculator","icofont-aids","icofont-ambulance-crescent","icofont-ambulance-cross","icofont-ambulance","icofont-autism","icofont-bandage","icofont-blind","icofont-blood-test","icofont-blood","icofont-brain-alt","icofont-brain","icofont-capsule","icofont-crutch","icofont-disabled","icofont-dna-alt-1","icofont-dna-alt-2","icofont-dna","icofont-doctor-alt","icofont-doctor","icofont-drug-pack","icofont-drug","icofont-first-aid-alt","icofont-first-aid","icofont-heart-beat-alt","icofont-heart-beat","icofont-heartbeat","icofont-herbal","icofont-hospital","icofont-icu","icofont-injection-syringe","icofont-laboratory","icofont-medical-sign-alt","icofont-medical-sign","icofont-nurse-alt","icofont-nurse","icofont-nursing-home","icofont-operation-theater","icofont-paralysis-disability","icofont-patient-bed","icofont-patient-file","icofont-pills","icofont-prescription","icofont-pulse","icofont-stethoscope-alt","icofont-stethoscope","icofont-stretcher","icofont-surgeon-alt","icofont-surgeon","icofont-tablets","icofont-test-bottle","icofont-test-tube","icofont-thermometer-alt","icofont-thermometer","icofont-tooth","icofont-xray","icofont-ui-add","icofont-ui-alarm","icofont-ui-battery","icofont-ui-block","icofont-ui-bluetooth","icofont-ui-brightness","icofont-ui-browser","icofont-ui-calendar","icofont-ui-camera","icofont-ui-cart","icofont-ui-cell-phone","icofont-ui-check","icofont-ui-clip-board","icofont-ui-clip","icofont-ui-clock","icofont-ui-close","icofont-ui-contact-list","icofont-ui-cut","icofont-ui-delete","icofont-ui-dial-phone","icofont-ui-edit","icofont-ui-email","icofont-ui-file","icofont-ui-fire-wall","icofont-ui-flash-light","icofont-ui-flight","icofont-ui-folder","icofont-ui-game","icofont-ui-handicapped","icofont-ui-home","icofont-ui-image","icofont-ui-laoding","icofont-ui-lock","icofont-ui-love-add","icofont-ui-love-broken","icofont-ui-love-remove","icofont-ui-love","icofont-ui-movie","icofont-ui-music-player","icofont-ui-music","icofont-ui-network","icofont-ui-next","icofont-ui-note","icofont-ui-office","icofont-ui-password","icofont-ui-pause","icofont-ui-play-stop","icofont-ui-pointer","icofont-ui-power","icofont-ui-press","icofont-ui-previous","icofont-ui-rate-add","icofont-ui-rate-blank","icofont-ui-rate-remove","icofont-ui-rating","icofont-ui-record","icofont-ui-remove","icofont-ui-reply","icofont-ui-rotation","icofont-ui-rss","icofont-ui-settings","icofont-ui-social-link","icofont-ui-tag","icofont-ui-text-loading","icofont-ui-theme","icofont-ui-timer","icofont-ui-touch-phone","icofont-ui-travel","icofont-ui-unlock","icofont-ui-user-group","icofont-ui-user","icofont-ui-v-card","icofont-ui-video-play","icofont-ui-video","icofont-ui-weather","icofont-ui-wifi","icofont-ui-zoom-in","icofont-ui-zoom-out","icofont-cassette-player","icofont-cassette","icofont-forward","icofont-guiter","icofont-movie","icofont-multimedia","icofont-music-alt","icofont-music-disk","icofont-music-note","icofont-music-notes","icofont-music","icofont-pause","icofont-play-alt-1","icofont-play-alt-3","icofont-play-pause","icofont-record","icofont-retro-music-disk","icofont-rewind","icofont-song-notes","icofont-sound-wave-alt","icofont-sound-wave","icofont-stop","icofont-video-alt","icofont-video-cam","icofont-video-clapper","icofont-video","icofont-volume-bar","icofont-youtube-play","icofont-2checkout-alt","icofont-2checkout","icofont-amazon-alt","icofont-amazon","icofont-american-express-alt","icofont-american-express","icofont-apple-pay-alt","icofont-apple-pay","icofont-bank-transfer-alt","icofont-bank-transfer","icofont-braintree-alt","icofont-braintree","icofont-cash-on-delivery-alt","icofont-cash-on-delivery","icofont-diners-club-alt-1","icofont-diners-club-alt-2","icofont-diners-club-alt-3","icofont-diners-club","icofont-discover-alt","icofont-discover","icofont-eway-alt","icofont-eway","icofont-google-wallet-alt-1","icofont-google-wallet-alt-2","icofont-google-wallet-alt-3","icofont-google-wallet","icofont-jcb-alt","icofont-jcb","icofont-maestro-alt","icofont-maestro","icofont-mastercard-alt","icofont-mastercard","icofont-payoneer-alt","icofont-payoneer","icofont-paypal-alt","icofont-paypal","icofont-sage-alt","icofont-sage","icofont-skrill-alt","icofont-skrill","icofont-stripe-alt","icofont-stripe","icofont-visa-alt","icofont-visa-electron","icofont-visa","icofont-western-union-alt","icofont-western-union","icofont-boy","icofont-business-man-alt-1","icofont-business-man-alt-2","icofont-business-man-alt-3","icofont-business-man","icofont-female","icofont-funky-man","icofont-girl-alt","icofont-girl","icofont-group","icofont-hotel-boy-alt","icofont-hotel-boy","icofont-kid","icofont-man-in-glasses","icofont-people","icofont-support","icofont-user-alt-1","icofont-user-alt-2","icofont-user-alt-3","icofont-user-alt-4","icofont-user-alt-5","icofont-user-alt-6","icofont-user-alt-7","icofont-user-female","icofont-user-suited","icofont-user","icofont-users-alt-1","icofont-users-alt-2","icofont-users-alt-3","icofont-users-alt-4","icofont-users-alt-5","icofont-users-alt-6","icofont-users-social","icofont-users","icofont-waiter-alt","icofont-waiter","icofont-woman-in-glasses","icofont-search-document","icofont-search-folder","icofont-search-job","icofont-search-property","icofont-search-restaurant","icofont-search-stock","icofont-search-user","icofont-search","icofont-500px","icofont-aim","icofont-badoo","icofont-baidu-tieba","icofont-bbm-messenger","icofont-bebo","icofont-behance","icofont-blogger","icofont-bootstrap","icofont-brightkite","icofont-cloudapp","icofont-concrete5","icofont-delicious","icofont-designbump","icofont-designfloat","icofont-deviantart","icofont-digg","icofont-discord","icofont-dotcms","icofont-dribbble","icofont-dribble","icofont-dropbox","icofont-ebuddy","icofont-ello","icofont-ember","icofont-envato","icofont-evernote","icofont-facebook-messenger","icofont-facebook","icofont-feedburner","icofont-flikr","icofont-folkd","icofont-foursquare","icofont-friendfeed","icofont-ghost","icofont-github","icofont-gnome","icofont-google-buzz","icofont-google-hangouts","icofont-google-plus","icofont-google-talk","icofont-hype-machine","icofont-instagram","icofont-kakaotalk","icofont-kickstarter","icofont-kik","icofont-kiwibox","icofont-line-messenger","icofont-line","icofont-linkedin","icofont-linux-mint","icofont-live-messenger","icofont-livejournal","icofont-magento","icofont-meetme","icofont-meetup","icofont-mixx","icofont-newsvine","icofont-nimbuss","icofont-odnoklassniki","icofont-opencart","icofont-oscommerce","icofont-pandora","icofont-photobucket","icofont-picasa","icofont-pinterest","icofont-prestashop","icofont-qik","icofont-qq","icofont-readernaut","icofont-reddit","icofont-renren","icofont-rss","icofont-shopify","icofont-silverstripe","icofont-skype","icofont-slack","icofont-slashdot","icofont-slidshare","icofont-smugmug","icofont-soundcloud","icofont-spotify","icofont-stack-exchange","icofont-stack-overflow","icofont-steam","icofont-stumbleupon","icofont-tagged","icofont-technorati","icofont-telegram","icofont-tiktok","icofont-tinder","icofont-trello","icofont-tumblr","icofont-twitch","icofont-twitter","icofont-typo3","icofont-ubercart","icofont-viber","icofont-viddler","icofont-vimeo","icofont-vine","icofont-virb","icofont-virtuemart","icofont-vk","icofont-weibo","icofont-x","icofont-xing","icofont-yahoo","icofont-yelp","icofont-youku","icofont-youtube","icofont-zencart","icofont-badminton-birdie","icofont-baseball","icofont-baseballer","icofont-basketball-hoop","icofont-basketball","icofont-billiard-ball","icofont-boot-alt-1","icofont-boot-alt-2","icofont-boot","icofont-bowling-alt","icofont-bowling","icofont-canoe","icofont-cheer-leader","icofont-climbing","icofont-corner","icofont-field-alt","icofont-field","icofont-football-alt","icofont-football-american","icofont-football","icofont-foul","icofont-goal-keeper","icofont-goal","icofont-golf-alt","icofont-golf-bag","icofont-golf-cart","icofont-golf-field","icofont-golf","icofont-golfer","icofont-helmet","icofont-hockey-alt","icofont-hockey","icofont-ice-skate","icofont-jersey-alt","icofont-jersey","icofont-jumping","icofont-kick","icofont-leg","icofont-match-review","icofont-medal-sport","icofont-offside","icofont-olympic-logo","icofont-olympic","icofont-padding","icofont-penalty-card","icofont-racer","icofont-racing-car","icofont-racing-flag-alt","icofont-racing-flag","icofont-racings-wheel","icofont-referee","icofont-refree-jersey","icofont-result-sport","icofont-rugby-ball","icofont-rugby-player","icofont-rugby","icofont-runner-alt-1","icofont-runner-alt-2","icofont-runner","icofont-score-board","icofont-skiing-man","icofont-skydiving-goggles","icofont-snow-mobile","icofont-steering","icofont-stopwatch","icofont-substitute","icofont-swimmer","icofont-table-tennis","icofont-team-alt","icofont-team","icofont-tennis-player","icofont-tennis","icofont-tracking","icofont-trophy-alt","icofont-trophy","icofont-volleyball-alt","icofont-volleyball-fire","icofont-volleyball","icofont-water-bottle","icofont-whistle-alt","icofont-whistle","icofont-win-trophy","icofont-align-center","icofont-align-left","icofont-align-right","icofont-all-caps","icofont-bold","icofont-brush","icofont-clip-board","icofont-color-bucket","icofont-color-picker","icofont-copy","icofont-cut","icofont-delete-alt","icofont-edit-alt","icofont-eraser-alt","icofont-font","icofont-heading","icofont-indent","icofont-italic-alt","icofont-italic","icofont-justify-all","icofont-justify-center","icofont-justify-left","icofont-justify-right","icofont-link-broken","icofont-paper-clip","icofont-paragraph","icofont-pin","icofont-printer","icofont-redo","icofont-rotation","icofont-save","icofont-small-cap","icofont-strike-through","icofont-sub-listing","icofont-subscript","icofont-superscript","icofont-table","icofont-trash","icofont-underline","icofont-undo","icofont-air-balloon","icofont-airplane-alt","icofont-airplane","icofont-articulated-truck","icofont-auto-mobile","icofont-auto-rickshaw","icofont-bicycle-alt-1","icofont-bicycle-alt-2","icofont-bicycle","icofont-bus-alt-1","icofont-bus-alt-2","icofont-bus-alt-3","icofont-bus","icofont-cab","icofont-cable-car","icofont-car-alt-1","icofont-car-alt-2","icofont-car-alt-3","icofont-car-alt-4","icofont-car","icofont-delivery-time","icofont-fast-delivery","icofont-fire-truck-alt","icofont-fire-truck","icofont-free-delivery","icofont-helicopter","icofont-motor-bike-alt","icofont-motor-bike","icofont-motor-biker","icofont-oil-truck","icofont-rickshaw","icofont-rocket-alt-1","icofont-rocket-alt-2","icofont-rocket","icofont-sail-boat-alt-1","icofont-sail-boat-alt-2","icofont-sail-boat","icofont-scooter","icofont-sea-plane","icofont-ship-alt","icofont-ship","icofont-speed-boat","icofont-taxi","icofont-tractor","icofont-train-line","icofont-train-steam","icofont-tram","icofont-truck-alt","icofont-truck-loaded","icofont-truck","icofont-van-alt","icofont-van","icofont-yacht","icofont-5-star-hotel","icofont-air-ticket","icofont-beach-bed","icofont-beach","icofont-camping-vest","icofont-direction-sign","icofont-hill-side","icofont-hill","icofont-hotel","icofont-island-alt","icofont-island","icofont-sandals-female","icofont-sandals-male","icofont-travelling","icofont-breakdown","icofont-celsius","icofont-clouds","icofont-cloudy","icofont-dust","icofont-eclipse","icofont-fahrenheit","icofont-forest-fire","icofont-full-night","icofont-full-sunny","icofont-hail-night","icofont-hail-rainy-night","icofont-hail-rainy-sunny","icofont-hail-rainy","icofont-hail-sunny","icofont-hail-thunder-night","icofont-hail-thunder-sunny","icofont-hail-thunder","icofont-hail","icofont-hill-night","icofont-hill-sunny","icofont-hurricane","icofont-meteor","icofont-night","icofont-rainy-night","icofont-rainy-sunny","icofont-rainy-thunder","icofont-rainy","icofont-snow-alt","icofont-snow-flake","icofont-snow-temp","icofont-snow","icofont-snowy-hail","icofont-snowy-night-hail","icofont-snowy-night-rainy","icofont-snowy-night","icofont-snowy-rainy","icofont-snowy-sunny-hail","icofont-snowy-sunny-rainy","icofont-snowy-sunny","icofont-snowy-thunder-night","icofont-snowy-thunder-sunny","icofont-snowy-thunder","icofont-snowy-windy-night","icofont-snowy-windy-sunny","icofont-snowy-windy","icofont-snowy","icofont-sun-alt","icofont-sun-rise","icofont-sun-set","icofont-sun","icofont-sunny-day-temp","icofont-sunny","icofont-thunder-light","icofont-tornado","icofont-umbrella-alt","icofont-umbrella","icofont-volcano","icofont-wave","icofont-wind-scale-0","icofont-wind-scale-1","icofont-wind-scale-10","icofont-wind-scale-11","icofont-wind-scale-12","icofont-wind-scale-2","icofont-wind-scale-3","icofont-wind-scale-4","icofont-wind-scale-5","icofont-wind-scale-6","icofont-wind-scale-7","icofont-wind-scale-8","icofont-wind-scale-9","icofont-wind-waves","icofont-wind","icofont-windy-hail","icofont-windy-night","icofont-windy-raining","icofont-windy-sunny","icofont-windy-thunder-raining","icofont-windy-thunder","icofont-windy","icofont-addons","icofont-adjust","icofont-alarm","icofont-anchor","icofont-archive","icofont-at","icofont-attachment","icofont-audio","icofont-automation","icofont-badge","icofont-bag-alt","icofont-bag","icofont-ban","icofont-bar-code","icofont-bars","icofont-basket","icofont-battery-empty","icofont-battery-full","icofont-battery-half","icofont-battery-low","icofont-beaker","icofont-beard","icofont-bed","icofont-bell","icofont-beverage","icofont-bill","icofont-bin","icofont-binary","icofont-binoculars","icofont-bluetooth","icofont-bomb","icofont-book-mark","icofont-box","icofont-briefcase","icofont-broken","icofont-bucket","icofont-bucket1","icofont-bucket2","icofont-bug","icofont-building","icofont-bulb-alt","icofont-bullet","icofont-bullhorn","icofont-bullseye","icofont-calendar","icofont-camera-alt","icofont-camera","icofont-card","icofont-cart-alt","icofont-cart","icofont-cc","icofont-charging","icofont-checked","icofont-children-care","icofont-clip","icofont-clock-time","icofont-close-line-squared-alt","icofont-close-line-squared","icofont-close-squared-alt","icofont-close-squared","icofont-cloud-download","icofont-cloud-refresh","icofont-cloud","icofont-code","icofont-comment","icofont-compass-alt","icofont-compass","icofont-computer","icofont-connection","icofont-console","icofont-contacts","icofont-contrast","icofont-copyright","icofont-credit-card","icofont-crop","icofont-crown","icofont-cube","icofont-cubes","icofont-dashboard-web","icofont-dashboard","icofont-data","icofont-database-add","icofont-database-locked","icofont-database-remove","icofont-database","icofont-delete","icofont-diamond","icofont-dice-multiple","icofont-dice","icofont-disc","icofont-diskette","icofont-document-folder","icofont-download","icofont-drag2","icofont-drag3","icofont-earth","icofont-ebook","icofont-edit","icofont-eject","icofont-email","icofont-eraser","icofont-error","icofont-excavator","icofont-exchange","icofont-exclamation-circle","icofont-exclamation-square","icofont-exclamation-tringle","icofont-exclamation","icofont-exit","icofont-external-link","icofont-external","icofont-eye-blocked","icofont-eye-dropper","icofont-eye","icofont-favourite","icofont-fax","icofont-file-fill","icofont-film","icofont-filter","icofont-fire-alt","icofont-fire-burn","icofont-fire","icofont-flag-alt-1","icofont-flag-alt-2","icofont-flag","icofont-flame-torch","icofont-flash-light","icofont-flash","icofont-flask","icofont-focus","icofont-folder-open","icofont-folder","icofont-foot-print","icofont-garbage","icofont-gift","icofont-glass","icofont-globe","icofont-graffiti","icofont-grocery","icofont-hanger","icofont-hard-disk","icofont-heart-alt","icofont-heart","icofont-history","icofont-home","icofont-horn","icofont-hour-glass","icofont-id","icofont-image","icofont-inbox","icofont-infinite","icofont-info-circle","icofont-info-square","icofont-info","icofont-institution","icofont-interface","icofont-invisible","icofont-jacket","icofont-jar","icofont-jewlery","icofont-karate","icofont-key-hole","icofont-key","icofont-label","icofont-lamp","icofont-layers","icofont-layout","icofont-leaf","icofont-leaflet","icofont-learn","icofont-lego","icofont-lens","icofont-letter","icofont-letterbox","icofont-library","icofont-license","icofont-life-bouy","icofont-life-buoy","icofont-life-jacket","icofont-light-bulb","icofont-lighter","icofont-lightning-ray","icofont-like","icofont-line-height","icofont-link-alt","icofont-link","icofont-list","icofont-listening","icofont-listine-dots","icofont-listing-box","icofont-listing-number","icofont-live-support","icofont-location-arrow","icofont-lock","icofont-login","icofont-logout","icofont-lollipop","icofont-long-drive","icofont-look","icofont-luggage","icofont-lunch","icofont-lungs","icofont-magic-alt","icofont-magic","icofont-magnet","icofont-mail-box","icofont-mail","icofont-male","icofont-maximize","icofont-measure","icofont-medicine","icofont-mega-phone","icofont-megaphone-alt","icofont-megaphone","icofont-memorial","icofont-memory-card","icofont-mic-mute","icofont-mic","icofont-military","icofont-mill","icofont-minus-square","icofont-molecule","icofont-money","icofont-moon","icofont-mop","icofont-muffin","icofont-mustache","icofont-navigation-menu","icofont-navigation","icofont-network-tower","icofont-network","icofont-news","icofont-newspaper","icofont-no-smoking","icofont-not-allowed","icofont-notebook","icofont-notepad","icofont-notification","icofont-numbered","icofont-opposite","icofont-optic","icofont-options","icofont-package","icofont-page","icofont-paper-plane","icofont-paperclip","icofont-papers","icofont-pay","icofont-penguin-linux","icofont-pestle","icofont-phone-circle","icofont-phone","icofont-picture","icofont-pine","icofont-pixels","icofont-plugin","icofont-plus-square","icofont-polygonal","icofont-power","icofont-price","icofont-print","icofont-puzzle","icofont-qr-code","icofont-queen","icofont-question-square","icofont-quote-left","icofont-quote-right","icofont-random","icofont-recycle","icofont-refresh","icofont-repair","icofont-reply-all","icofont-reply","icofont-resize","icofont-responsive","icofont-retweet","icofont-road","icofont-robot","icofont-royal","icofont-rss-feed","icofont-safety","icofont-sale-discount","icofont-sass","icofont-satellite","icofont-send-mail","icofont-server","icofont-settings","icofont-share-alt","icofont-share-boxed","icofont-share","icofont-shopping-cart","icofont-sign-in","icofont-sign-out","icofont-signal","icofont-site-map","icofont-smart-phone","icofont-soccer","icofont-sort-alt","icofont-sort","icofont-space","icofont-spanner","icofont-speech-comments","icofont-speed-meter","icofont-spinner-alt-1","icofont-spinner-alt-2","icofont-spinner-alt-4","icofont-spinner-alt-6","icofont-spinner","icofont-spreadsheet","icofont-square","icofont-ssl-security","icofont-star-alt-1","icofont-star-alt-2","icofont-star","icofont-street-view","icofont-support-faq","icofont-tack-pin","icofont-tag","icofont-tags","icofont-tasks-alt","icofont-tasks","icofont-telescope","icofont-terminal","icofont-thumbs-down","icofont-thumbs-up","icofont-tick-boxed","icofont-tick-mark","icofont-ticket","icofont-tie","icofont-tools-alt-2","icofont-tools","icofont-touch","icofont-traffic-light","icofont-transparent","icofont-tree","icofont-unique-idea","icofont-unlock","icofont-unlocked","icofont-usb-drive","icofont-usb","icofont-vector-path","icofont-visual-studio","icofont-vuejs","icofont-wall-clock","icofont-wall","icofont-wallet","icofont-warning-alt","icofont-warning","icofont-water-drop","icofont-web","icofont-wheelchair","icofont-wifi-alt","icofont-wifi","icofont-world","icofont-zigzag","icofont-zipped","icofont-bat","icofont-bear-face","icofont-bear-tracks","icofont-bear","icofont-bird-alt","icofont-bird-flying","icofont-bird","icofont-birds","icofont-bone","icofont-bull","icofont-butterfly-alt","icofont-camel-alt","icofont-camel-head","icofont-cat-alt-1","icofont-cat-alt-2","icofont-cat-alt-3","icofont-cat-dog","icofont-cat-face","icofont-cat","icofont-cow-head","icofont-deer-head","icofont-dog-alt","icofont-dog-barking","icofont-dog","icofont-dolphin","icofont-duck-tracks","icofont-eagle-head","icofont-eaten-fish","icofont-elephant-alt","icofont-elephant-head-alt","icofont-elephant-head","icofont-elk","icofont-fish-1","icofont-fish-2","icofont-fish-3","icofont-fish-4","icofont-fish-5","icofont-fish","icofont-fox-alt","icofont-fox","icofont-frog-tracks","icofont-frog","icofont-froggy","icofont-giraffe-head-1","icofont-giraffe-head-2","icofont-giraffe-head","icofont-giraffe","icofont-goat-head","icofont-gorilla","icofont-hen-tracks","icofont-horse-head-1","icofont-horse-head-2","icofont-horse-head","icofont-horse-tracks","icofont-jellyfish","icofont-kangaroo","icofont-lemur","icofont-lion-head-1","icofont-lion-head-2","icofont-lion-head","icofont-lion","icofont-monkey-2","icofont-monkey-3","icofont-monkey-face","icofont-monkey","icofont-octopus-alt","icofont-octopus","icofont-owl","icofont-panda-face","icofont-panda","icofont-panther","icofont-parrot-lip","icofont-parrot","icofont-paw","icofont-pelican","icofont-penguin","icofont-pig-face","icofont-pig","icofont-pigeon-1","icofont-pigeon-2","icofont-pigeon","icofont-rabbit","icofont-rat","icofont-rhino-head","icofont-rhino","icofont-rooster","icofont-seahorse","icofont-seal","icofont-shrimp-alt","icofont-shrimp","icofont-snail-1","icofont-snail-2","icofont-snail-3","icofont-snail","icofont-snake","icofont-squid","icofont-squirrel","icofont-tiger-face","icofont-tiger","icofont-turtle","icofont-whale","icofont-woodpecker","icofont-zebra","icofont-angry-monster","icofont-bathtub","icofont-bird-wings","icofont-bow","icofont-castle","icofont-circuit","icofont-disability-race","icofont-diving-goggle","icofont-eye-open","icofont-flora","icofont-hand-thunder","icofont-king-monster","icofont-magician-hat","icofont-native-american","icofont-owl-look","icofont-phoenix","icofont-robot-face","icofont-skull-danger","icofont-skull-face","icofont-swirl","icofont-tattoo-wing","icofont-throne","icofont-triangle","icofont-weed"],Cs=200;function Na({value:n="",onChange:e,addLabel:o="Add Icon",removeLabel:a="Remove Icon",placeholder:s="No icon selected"}){o=O(o),a=O(a),s=O(s);const[r,u]=E.useState(!1),[f,h]=E.useState(""),[p,b]=E.useState(Cs),y=E.useRef(null),v=E.useRef(null),_=E.useMemo(()=>{const D=f.trim().toLowerCase();return D?em.filter(U=>U.includes(D)):em},[f]);E.useEffect(()=>{b(Cs),v.current&&(v.current.scrollTop=0)},[f]),E.useEffect(()=>{if(!r)return;const D=setTimeout(()=>y.current?.focus(),50),U=document.body.style.overflow;document.body.style.overflow="hidden";const z=w=>w.key==="Escape"&&u(!1);return document.addEventListener("keydown",z),()=>{clearTimeout(D),document.body.style.overflow=U,document.removeEventListener("keydown",z)}},[r]);const k=E.useCallback(()=>{h(""),b(Cs),u(!0)},[]),C=E.useCallback(D=>{e(D),u(!1)},[e]),j=E.useCallback(D=>{const U=D.currentTarget;U.scrollTop+U.clientHeight>=U.scrollHeight-240&&b(z=>z<_.length?z+Cs:z)},[_.length]),M=_.slice(0,p);return g.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[n?g.jsx("span",{className:"inline-flex items-center justify-center w-10 h-10 rounded border border-gray-200 bg-gray-50 text-gray-700 text-xl",children:g.jsx("i",{className:n})}):g.jsx("span",{className:"text-xs text-gray-400",children:s}),g.jsx("button",{type:"button",onClick:k,className:"px-3 py-2 bg-[#0084ff] border border-[#0084ff] rounded text-sm font-medium text-white hover:bg-[#0073e6] transition-colors focus:outline-none focus:ring-2 focus:ring-[#0084ff]",children:o}),n&&g.jsx("button",{type:"button",onClick:()=>e(""),className:"px-3 py-2 bg-white border border-gray-300 rounded text-sm font-medium text-red-500 hover:border-red-400 transition-colors",children:a}),r&&jn.createPortal(g.jsxs("div",{className:"fixed inset-0 z-[100000] flex items-center justify-center p-4",role:"dialog","aria-modal":"true",children:[g.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:()=>u(!1)}),g.jsxs("div",{className:"relative flex flex-col w-full max-w-4xl max-h-[80vh] bg-white rounded shadow-2xl overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-gray-100",children:[g.jsx("h3",{className:"text-sm font-bold text-gray-800",children:o}),g.jsx("button",{type:"button",onClick:()=>u(!1),"aria-label":O("Close"),className:"w-7 h-7 inline-flex items-center justify-center rounded-md text-gray-400 hover:text-gray-700 hover:bg-gray-100 transition-colors",children:g.jsx(Eh,{size:16,strokeWidth:2})})]}),g.jsx("div",{className:"px-5 py-3 border-b border-gray-100",children:g.jsx("input",{ref:y,type:"text",value:f,onChange:D=>h(D.target.value),placeholder:O("Search icons…"),className:"w-full border border-gray-300 rounded px-3 py-2 text-sm text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0084ff] focus:border-transparent"})}),g.jsx("div",{ref:v,onScroll:j,className:"flex-1 overflow-y-auto p-3",children:_.length===0?g.jsx("p",{className:"py-12 text-center text-sm text-gray-400",children:O("No icons match “%s”.").replace("%s",f)}):g.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(47px,1fr))] gap-1.5",children:M.map(D=>{const U=D===n;return g.jsx("button",{type:"button",title:D,onClick:()=>C(D),className:["aspect-square flex items-center justify-center rounded border text-xl transition-colors",U?"bg-[#0084ff] border-[#0084ff] text-white":"bg-white border-gray-200 text-gray-600 hover:border-[#0084ff] hover:text-[#0084ff] hover:bg-blue-50"].join(" "),children:g.jsx("i",{className:D})},D)})})}),g.jsx("div",{className:"px-5 py-2.5 border-t border-gray-100 text-xs text-gray-400",children:O("Showing %1$s of %2$s icons").replace("%1$s",Math.min(p,_.length)).replace("%2$s",_.length)})]})]}),document.body)]})}function o4(n){return xt({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-1.5 0a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z"},child:[]},{tag:"path",attr:{d:"M12 1c.266 0 .532.009.797.028.763.055 1.345.617 1.512 1.304l.352 1.45c.019.078.09.171.225.221.247.089.49.19.728.302.13.061.246.044.315.002l1.275-.776c.603-.368 1.411-.353 1.99.147.402.349.78.726 1.128 1.129.501.578.515 1.386.147 1.99l-.776 1.274c-.042.069-.058.185.002.315.112.238.213.481.303.728.048.135.142.205.22.225l1.45.352c.687.167 1.249.749 1.303 1.512.038.531.038 1.063 0 1.594-.054.763-.616 1.345-1.303 1.512l-1.45.352c-.078.019-.171.09-.221.225-.089.248-.19.491-.302.728-.061.13-.044.246-.002.315l.776 1.275c.368.603.353 1.411-.147 1.99-.349.402-.726.78-1.129 1.128-.578.501-1.386.515-1.99.147l-1.274-.776c-.069-.042-.185-.058-.314.002a8.606 8.606 0 0 1-.729.303c-.135.048-.205.142-.225.22l-.352 1.45c-.167.687-.749 1.249-1.512 1.303-.531.038-1.063.038-1.594 0-.763-.054-1.345-.616-1.512-1.303l-.352-1.45c-.019-.078-.09-.171-.225-.221a8.138 8.138 0 0 1-.728-.302c-.13-.061-.246-.044-.315-.002l-1.275.776c-.603.368-1.411.353-1.99-.147-.402-.349-.78-.726-1.128-1.129-.501-.578-.515-1.386-.147-1.99l.776-1.274c.042-.069.058-.185-.002-.314a8.606 8.606 0 0 1-.303-.729c-.048-.135-.142-.205-.22-.225l-1.45-.352c-.687-.167-1.249-.749-1.304-1.512a11.158 11.158 0 0 1 0-1.594c.055-.763.617-1.345 1.304-1.512l1.45-.352c.078-.019.171-.09.221-.225.089-.248.19-.491.302-.728.061-.13.044-.246.002-.315l-.776-1.275c-.368-.603-.353-1.411.147-1.99.349-.402.726-.78 1.129-1.128.578-.501 1.386-.515 1.99-.147l1.274.776c.069.042.185.058.315-.002.238-.112.481-.213.728-.303.135-.048.205-.142.225-.22l.352-1.45c.167-.687.749-1.249 1.512-1.304C11.466 1.01 11.732 1 12 1Zm-.69 1.525c-.055.004-.135.05-.161.161l-.353 1.45a1.832 1.832 0 0 1-1.172 1.277 7.147 7.147 0 0 0-.6.249 1.833 1.833 0 0 1-1.734-.074l-1.274-.776c-.098-.06-.186-.036-.228 0a9.774 9.774 0 0 0-.976.976c-.036.042-.06.131 0 .228l.776 1.274c.314.529.342 1.18.074 1.734a7.147 7.147 0 0 0-.249.6 1.831 1.831 0 0 1-1.278 1.173l-1.45.351c-.11.027-.156.107-.16.162a9.63 9.63 0 0 0 0 1.38c.004.055.05.135.161.161l1.45.353a1.832 1.832 0 0 1 1.277 1.172c.074.204.157.404.249.6.268.553.24 1.204-.074 1.733l-.776 1.275c-.06.098-.036.186 0 .228.301.348.628.675.976.976.042.036.131.06.228 0l1.274-.776a1.83 1.83 0 0 1 1.734-.075c.196.093.396.176.6.25a1.831 1.831 0 0 1 1.173 1.278l.351 1.45c.027.11.107.156.162.16a9.63 9.63 0 0 0 1.38 0c.055-.004.135-.05.161-.161l.353-1.45a1.834 1.834 0 0 1 1.172-1.278 6.82 6.82 0 0 0 .6-.248 1.831 1.831 0 0 1 1.733.074l1.275.776c.098.06.186.036.228 0 .348-.301.675-.628.976-.976.036-.042.06-.131 0-.228l-.776-1.275a1.834 1.834 0 0 1-.075-1.733c.093-.196.176-.396.25-.6a1.831 1.831 0 0 1 1.278-1.173l1.45-.351c.11-.027.156-.107.16-.162a9.63 9.63 0 0 0 0-1.38c-.004-.055-.05-.135-.161-.161l-1.45-.353c-.626-.152-1.08-.625-1.278-1.172a6.576 6.576 0 0 0-.248-.6 1.833 1.833 0 0 1 .074-1.734l.776-1.274c.06-.098.036-.186 0-.228a9.774 9.774 0 0 0-.976-.976c-.042-.036-.131-.06-.228 0l-1.275.776a1.831 1.831 0 0 1-1.733.074 6.88 6.88 0 0 0-.6-.249 1.835 1.835 0 0 1-1.173-1.278l-.351-1.45c-.027-.11-.107-.156-.162-.16a9.63 9.63 0 0 0-1.38 0Z"},child:[]}]})(n)}const{restUrl:Es="",nonce:a4="",pluginUrl:l4="",docsUrl:nm="",demoUrl:im=""}=window.mcsAdmin||{},De=(n="")=>nm?`${nm}${n}`:"#",ze=(n="")=>im?`${im}${n}`:"#",Ms={"X-WP-Nonce":a4,"Content-Type":"application/json"},om="mcs-floating-section",am={general:["opt-fbid","show_current_time","agent-message","select-timezone","opt-availablity","bubble-search","opt-chat-agents"],"header-footer":["agent_photo_type","agent-photo","agent-name","agent-subtitle","offline_agent_subtitle","header-content-position","before-chat-icon","before-chat-icon-native","before-chat-icon-custom","chat-button-text","bubble-title","bubble-subtitle","footer_content","footer_content_text"],button:["opt-button-style","agent_avatar_type","agent_avatar","button_top_label","bubble-text","online_text","offline_text","chat_button_image_type","chat_button_image","chat_button_top_label","chat_button_text","circle-button-icon-1","circle-button-icon-native","circle-button-icon-custom","circle-button-close-1","circle-button-close-native","circle-button-close-custom","circle-animation","circle-button-icon","button-icon-native","button-icon-custom","circle-button-close","button-close-native","button-close-custom","button_size","button_size_custom","bubble_icon_color","bubble_icon_bg","bubble_icon_bg_color","bubble_button_bg","bubble_button_text","bubble_button_border","bubble_icon_border","bubble-button-padding","notification_icon","notification_number","bubble_button_tooltip","bubble_button_tooltip_text","bubble_button_tooltip_background","bubble_button_tooltip_width","bubble-position","right_bottom","left_bottom","right_middle","left_middle","enable-positioning-tablet","bubble-position-tablet","right_bottom_tablet","left_bottom_tablet","right_middle_tablet","left_middle_tablet","enable-positioning-mobile","bubble-position-mobile","right_bottom_mobile","left_bottom_mobile","right_middle_mobile","left_middle_mobile"],style:["autoshow-popup","auto_open_popup_timeout","select-animation","theme_style","theme_background_image","bubble-style","color_settings","send_button_color","better_chat_support_typography_family","better_chat_support_typography","alternative_mSupportBubble"],others:["bubble-visibility","visibility","theme_page_target","theme_page_all","theme_page","page_target","page_all","page","posts_target","posts_all","posts","product_target","product_all","product","category_target","category_all","category","tags_target","tags_all","tags","product_category_target","product_category_all","product_category","product_tags_target","product_tags_all","product_tags","visibility_by_theme_page","visibility_by_page","visibility_by_posts","visibility_by_product","visibility_by_category","visibility_by_tags","visibility_by_product_category","visibility_by_product_tags"],backup:[]},s4=Object.keys(am);function r4(){try{const n=localStorage.getItem(om);return s4.includes(n)?n:"general"}catch{return"general"}}function lm(n){if(!n||typeof n!="object"||n.better_chat_support_typography_family)return n;const e=n.better_chat_support_typography;return!e||typeof e!="object"||!e["font-family"]?n:{...n,better_chat_support_typography_family:e["font-family"]}}function sm(n){if(!n||typeof n!="object")return n;const e={visibility_by_theme_page:["theme_page_target","theme_page_all","theme_page"],visibility_by_page:["page_target","page_all","page"],visibility_by_posts:["posts_target","posts_all","posts"],visibility_by_product:["product_target","product_all","product"],visibility_by_category:["category_target","category_all","category"],visibility_by_tags:["tags_target","tags_all","tags"],visibility_by_product_category:["product_category_target","product_category_all","product_category"],visibility_by_product_tags:["product_tags_target","product_tags_all","product_tags"]},o={...n};let a=!1;return Object.entries(e).forEach(([s,r])=>{const u=n[s];!u||typeof u!="object"||r.forEach(f=>{(o[f]===void 0||o[f]===""||Array.isArray(o[f])&&o[f].length===0)&&u[f]!==void 0&&u[f]!==""&&(o[f]=u[f],a=!0)})}),a?o:n}const go={general:g.jsx(o4,{className:"w-3.5 h-3.5"}),headerFooter:g.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),g.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),g.jsx("line",{x1:"3",y1:"15",x2:"21",y2:"15"})]}),button:g.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:g.jsx("rect",{x:"2",y:"7",width:"20",height:"10",rx:"2"})}),style:g.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("path",{d:"M12 2a10 10 0 1 0 10 10"}),g.jsx("path",{d:"M12 2v10l4.24 4.24"})]}),others:g.jsx(H1,{className:"w-3.5 h-3.5"}),backup:g.jsx(N1,{className:"w-3.5 h-3.5"})},hu=[{value:"icofont-facebook-messenger",label:"Messenger",icon:"icofont-facebook-messenger"},{value:"icofont-live-support",label:"Live Support",icon:"icofont-live-support"},{value:"icofont-ui-messaging",label:"Chat",icon:"icofont-ui-messaging"},{value:"icofont-telegram",label:"Telegram",icon:"icofont-telegram"},{value:"icofont-paper-plane",label:"Paper Plane",icon:"icofont-paper-plane"}],rm=[{value:"icofont-close",label:"Close",icon:"icofont-close"},{value:"icofont-close-line",label:"Close Line",icon:"icofont-close-line"},{value:"icofont-close-circled",label:"Close Circle",icon:"icofont-close-circled"},{value:"icofont-ui-close",label:"UI Close",icon:"icofont-ui-close"},{value:"icofont-close-squared-alt",label:"Close Square",icon:"icofont-close-squared-alt"}],c4={native:"Native",custom:"Custom",no_icon:"No Icon"},u4={native:!0,custom:!0,no_icon:!1},Oa=(n,...e)=>[...n,...e.map(o=>({value:o,label:c4[o],pro:u4[o]||!1}))];function Wt({title:n}){return g.jsx("div",{className:"px-5 py-4 bg-gray-50 border-b border-gray-100",children:g.jsx("h4",{className:"text-xs font-bold text-gray-500 uppercase tracking-widest m-0",children:O(n)})})}function cm({label:n,isChecked:e,targetKey:o,allKey:a,listKey:s,listItems:r,value:u,onChange:f}){const[h,p]=E.useState(!1);if(!e)return null;const b=(_,k="")=>u[_]??k,y=(_,k)=>f({...u,[_]:k}),v=b(a)===!0||b(a)==="true";return g.jsxs("div",{className:"border border-gray-100 mb-3",children:[g.jsxs("button",{type:"button",onClick:()=>p(_=>!_),className:`w-full flex items-center justify-between px-5 py-3.5 text-left transition-colors duration-150 bg-gray-100 ${h?"bg-blue-50/60":"hover:bg-gray-50/80"}`,children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:`w-1 h-4 rounded-full shrink-0 transition-colors duration-150 ${h?"bg-[#0084ff]":"bg-gray-200"}`}),g.jsx("span",{className:`text-sm font-medium transition-colors duration-150 ${h?"text-[#0065cc]":"text-gray-700"}`,children:n})]}),g.jsx(vc,{className:`w-4 h-4 transition-all duration-200 ${h?"rotate-180 text-[#0084ff]":"text-gray-400"}`})]}),h&&g.jsxs("div",{className:"px-5 pt-4 pb-5 space-y-4 bg-[#f8fafc] border-t border-gray-100",children:[g.jsx(he,{value:b(o,"include"),onChange:_=>y(o,_),options:{include:O("Include (show on selected)"),exclude:O("Exclude (hide on selected)")}}),g.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer select-none",children:[g.jsx("input",{type:"checkbox",checked:v,onChange:_=>y(a,_.target.checked),className:"w-4 h-4 rounded accent-[#0084ff] shrink-0"}),g.jsxs("span",{className:"text-sm text-gray-600",children:[O("Apply to all")," ",g.jsx("span",{className:"font-medium text-gray-700",children:n})]})]}),!v&&g.jsx(i4,{value:b(s,[]),onChange:_=>y(s,_),items:r,placeholder:`${O("Choose")} ${n}…`,emptyMessage:`${O("No")} ${n} ${O("found.")}`})]})]})}function f4(n){let e=(n||"").trim();return e?/^https?:\/\//i.test(e)?e:(e=e.replace(/^@/,"").replace(/^(www\.)?(m\.me|facebook\.com)\//i,""),`https://m.me/${e}`):""}function d4({value:n="",onChange:e,placeholder:o=""}){const a=(n||"").trim(),s=a==="",r=f4(a);return g.jsxs("div",{className:"flex items-stretch gap-2 w-full max-w-lg",children:[g.jsx("input",{type:"text",value:n,onChange:u=>e(u.target.value),placeholder:o,className:"flex-1 min-w-0 border !border-gray-300 !rounded px-3 py-2 text-sm text-gray-800 focus:outline-none focus:ring-2 focus:ring-[#0084ff] focus:border-transparent"}),g.jsxs("a",{href:s?void 0:r,target:"_blank",rel:"noopener noreferrer","aria-disabled":s,title:O(s?"Enter a Facebook username to test":"Test Link"),onClick:u=>{s&&u.preventDefault()},className:["inline-flex items-center gap-1.5 px-3.5 rounded text-sm font-medium whitespace-nowrap no-underline transition-colors",s?"bg-gray-100 text-gray-400 cursor-not-allowed pointer-events-none border border-gray-200":"bg-[#0084ff] text-white hover:bg-[#0065cc] hover:text-white"].join(" "),children:[g.jsx(yc,{size:14,strokeWidth:2}),O("Test Link")]})]})}function h4(){const n=typeof window<"u"&&window.mcsPreloaded&&window.mcsPreloaded.opt||null,[e,o]=E.useState(()=>n?sm(lm(n)):{}),[a,s]=E.useState([]),[r,u]=E.useState({pages:[],posts:[],categories:[],tags:[],products:[],product_categories:[],product_tags:[]}),[f,h]=E.useState(!n),[p,b]=E.useState(!1),[y,v]=E.useState(!1),[_,k]=E.useState(!1),[C,j]=E.useState(""),[M,D]=E.useState(r4),[U,z]=E.useState(null);E.useEffect(()=>(z(document.getElementById("mcs-page-actions")),()=>z(null)),[]),E.useEffect(()=>{try{localStorage.setItem(om,M)}catch{}},[M]),E.useEffect(()=>{Promise.all([fetch(`${Es}/settings/mcs-opt`,{headers:Ms,credentials:"same-origin"}).then(N=>N.json()),fetch(`${Es}/settings/timezones`,{headers:Ms,credentials:"same-origin"}).then(N=>N.json()),fetch(`${Es}/settings/wp-content`,{headers:Ms,credentials:"same-origin"}).then(N=>N.json())]).then(([N,wt,$t])=>{n||o(sm(lm(N??{}))),s(Array.isArray(wt)?wt:[]),u($t??{})}).catch(()=>{n||j(O("Failed to load settings."))}).finally(()=>h(!1))},[]);const w=E.useCallback((N,wt)=>{o($t=>({...$t,[N]:wt})),k(!0),v(!1)},[]),Y=async()=>{b(!0),j("");try{(await(await fetch(`${Es}/settings/mcs-opt`,{method:"POST",headers:Ms,credentials:"same-origin",body:JSON.stringify(e)})).json()).success?(k(!1),v(!0),setTimeout(()=>v(!1),3e3)):j(O("Save failed. Please try again."))}catch{j(O("Network error."))}finally{b(!1)}};qp(Y,p);const G=N=>{const wt=am[N]||[];if(!wt.length||!window.confirm(O("Reset this section to default values?")))return;const $t=window.mcsAdmin?.defaultAgents;o(Nn=>{const Be={...Nn};return wt.forEach(Qe=>{Qe==="opt-chat-agents"&&Array.isArray($t)?Be[Qe]=$t:delete Be[Qe]}),Be}),k(!0),v(!1)},K=()=>{const N=new Blob([JSON.stringify(e,null,2)],{type:"application/json"});Object.assign(document.createElement("a"),{href:URL.createObjectURL(N),download:"mcs-opt-backup.json"}).click()},I=N=>{const wt=N.target.files?.[0];if(!wt)return;const $t=new FileReader;$t.onload=Nn=>{try{const Be=JSON.parse(Nn.target.result);typeof Be=="object"&&!Array.isArray(Be)?(o(Be),alert(O("Imported. Click Save to apply."))):alert(O("Invalid file."))}catch{alert(O("Could not parse file."))}},$t.readAsText(wt),N.target.value=""},J=E.useMemo(()=>{const{webfonts:N={}}=window.BetterChatSupport_typography_json||{},wt={"":"Default (inherit)"};return(N.safe?.fonts||[]).forEach($t=>{wt[$t]=$t}),Object.keys(N.google?.fonts||{}).forEach($t=>{wt[$t]=$t}),wt},[]),ot=E.useCallback(N=>{o(wt=>({...wt,better_chat_support_typography_family:N})),v(!1)},[]);if(f)return g.jsxs("div",{className:"p-6 animate-pulse","aria-busy":"true","aria-live":"polite",children:[g.jsx("div",{className:"h-4 w-56 bg-gray-200 rounded mb-4"}),g.jsx("div",{className:"flex gap-3 mb-8 flex-wrap",children:Array.from({length:5}).map((N,wt)=>g.jsx("div",{className:"w-28 h-20 bg-gray-200 rounded-lg"},wt))}),g.jsxs("div",{className:"flex gap-6",children:[g.jsx("div",{className:"w-56 flex-shrink-0 space-y-3",children:Array.from({length:6}).map((N,wt)=>g.jsx("div",{className:"h-10 bg-gray-200 rounded"},wt))}),g.jsx("div",{className:"flex-1 space-y-5",children:Array.from({length:6}).map((N,wt)=>g.jsxs("div",{className:"flex items-start gap-6",children:[g.jsxs("div",{className:"w-60 flex-shrink-0 space-y-2",children:[g.jsx("div",{className:"h-4 w-40 bg-gray-200 rounded"}),g.jsx("div",{className:"h-3 w-52 bg-gray-100 rounded"})]}),g.jsx("div",{className:"flex-1 h-10 bg-gray-200 rounded"})]},wt))})]})]});const L=(N,wt="")=>e[N]??wt,gt=N=>L(N)===!0||L(N)==="true"||L(N)===1,rt=L("chat_layout","agent"),tt=rt==="agent",H=rt==="button",Z=!1,at=rt!=="off",ct=String(L("opt-button-style","1")),A=l4,X=N=>`${A}src/Admin/assets/images/preview/${N}`,nt={off:{image:`${A}src/Admin/assets/images/off.svg`,text:O("Disable Chat"),demoUrl:""},agent:{image:`${A}src/Admin/assets/images/single_agent.svg`,text:O("Single Agent"),demoUrl:ze("#example_1")},button:{image:`${A}src/Admin/assets/images/simple_button.svg`,text:O("Chat Button"),demoUrl:ze("#example_9")},multi:{image:`${A}src/Admin/assets/images/multi_agent.svg`,text:O("Multi-Agent List"),pro:!0},multi_grid:{image:`${A}src/Admin/assets/images/multi_grid.svg`,text:O("Multi-Agent Grid"),pro:!0}},it={1:{image:`${A}src/Admin/assets/images/button-1.svg`,text:O("Icon Button"),demoUrl:ze("#shortcode")},2:{image:`${A}src/Admin/assets/images/button-2.svg`,text:O("Simple Button"),demoUrl:ze("#shortcode")},10:{image:`${A}src/Admin/assets/images/advance-filled.svg`,text:O("Advance Button"),pro:!0}},lt={flat_theme:{image:`${A}src/Admin/assets/images/flat_theme.jpg`,text:O("Flat Theme")},custom_theme:{image:`${A}src/Admin/assets/images/custom_theme.jpg`,text:O("Custom Theme")}},bt=(()=>{let N=null;try{typeof Intl<"u"&&Intl.DisplayNames&&(N=new Intl.DisplayNames(["en"],{type:"region"}))}catch{}return a.map(wt=>{const $t=typeof wt=="string"?wt:wt?.id??"",Nn=typeof wt=="object"?wt?.code??"":"";let Be="";if(N&&Nn&&/^[A-Z]{2}$/.test(Nn))try{Be=N.of(Nn)??""}catch{}const Qe=$t.replace(/_/g," "),xe=Be?`${Qe} (${Be})`:Qe;return[$t,xe]})})(),ut=Array.isArray(L("visibility"))?L("visibility"):[],pe=[{id:"general",label:O("General"),icon:go.general},{id:"header-footer",label:O("Header & Footer"),icon:go.headerFooter,hidden:H},{id:"button",label:O("Button"),icon:go.button},{id:"style",label:O("Style"),icon:go.style},{id:"others",label:O("Others"),icon:go.others},{id:"backup",label:O("Backup"),icon:go.backup}].filter(N=>!N.hidden),We=pe.map(N=>N.id).includes(M)?M:"general",Ha=g.jsxs("div",{children:[(tt||H)&&g.jsx(et,{helpKey:"opt-fbid",label:"Facebook ID",help:"Add your profile or page ID to receive messages.",openDocs:De("floating-chat/single-agent/?ref=1"),desc:`If your link is facebook.com/themeatelier, just use themeatelier in this field.
 <b>(the bubble/button will not be shown if it’s empty)</b>`,children:g.jsx(d4,{value:L("opt-fbid"),onChange:N=>w("opt-fbid",N),placeholder:"e.g: themeatelier"})}),tt&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"show_current_time",label:"Current Time",help:"Enable to display the current time before the agent's message.",helpImage:X("current_time.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/current-time/?ref=1"),children:g.jsx(Bi,{value:L("show_current_time",!0),onChange:N=>w("show_current_time",N)})}),g.jsx(et,{helpKey:"agent-message",label:"Message From Agent",help:"Add a custom message to display inside the agent's message box.",helpImage:X("agent_message.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/agent-message/?ref=1"),children:g.jsx(Xp,{value:L("agent-message","Hello, Welcome to the site. Please click below button for chatting me through messenger."),onChange:N=>w("agent-message",N),rows:4})})]}),(tt||H)&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Availability"}),g.jsx(et,{helpKey:"select-timezone",label:"Timezone",help:"Select your local timezone. Availability schedules will be applied based on this timezone.",openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(Aa,{value:L("select-timezone"),onChange:N=>w("select-timezone",N),options:bt,searchable:!0,placeholder:"Select timezone"})}),g.jsx(et,{label:"Availability",children:g.jsx(Jj,{value:L("opt-availablity",{}),onChange:N=>w("opt-availablity",N)})})]}),Z]}),mo=g.jsxs("div",{children:[tt&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Box Header"}),g.jsx(et,{helpKey:"agent_photo_type",label:"Agent Photo Type",help:"Choose how the agent photo is displayed — Default uses the built-in photo, Custom lets you upload your own, None shows no photo.",openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(he,{value:L("agent_photo_type","default"),onChange:N=>w("agent_photo_type",N),options:{default:"Default",custom:"Custom",none:"None"}})}),L("agent_photo_type")==="custom"&&g.jsx(et,{helpKey:"agent-photo",label:"Agent Photo",help:"Upload an agent photo to display inside the chat bubble.",helpImage:X("user_image.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(In,{value:L("agent-photo",{}),onChange:N=>w("agent-photo",N)})}),g.jsx(et,{helpKey:"agent-name",label:"Agent Name",help:"Enter the agent's name to display inside the chat bubble.",helpImage:X("agent_name.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(un,{value:L("agent-name","John Doe"),onChange:N=>w("agent-name",N)})}),g.jsx(et,{helpKey:"agent-subtitle",label:"Online Subtitle",help:"Enter a subtitle to display below the agent's name in the chat bubble.",helpImage:X("agent_subtitle.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(un,{value:L("agent-subtitle","Typically replies within a day."),onChange:N=>w("agent-subtitle",N)})}),g.jsx(et,{helpKey:"offline_agent_subtitle",label:"Offline Subtitle",help:"Enter a subtitle to display when the agent is offline in the chat bubble.",helpImage:X("agent_subtitle.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(un,{value:L("offline_agent_subtitle","Currently offline, will reply soon."),onChange:N=>w("offline_agent_subtitle",N)})}),g.jsx(et,{helpKey:"header-content-position",label:"Header Content Alignment",help:"Choose the alignment for the header content.",helpImage:X("header_left_center.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/multi-agent/?ref=1"),children:g.jsx(he,{value:L("header-content-position","left"),onChange:N=>w("header-content-position",N),options:{left:"Left",center:"Center"}})})]}),tt&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Send Message Button"}),g.jsx(et,{helpKey:"before-chat-icon",label:"Icon for Send Message Button",help:"Select an icon to display before the send message button text.",helpImage:X("send_message_icon.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/multi-agent/?ref=1"),children:g.jsx(he,{value:L("before-chat-icon","icofont-facebook-messenger"),onChange:N=>w("before-chat-icon",N),options:Oa(hu,"no_icon","native","custom")})}),L("before-chat-icon")==="native"&&g.jsx(et,{helpKey:"before-chat-icon-native",label:"Native Icon",children:g.jsx(Na,{value:L("before-chat-icon-native","icofont-facebook-messenger"),onChange:N=>w("before-chat-icon-native",N)})}),L("before-chat-icon")==="custom"&&g.jsx(et,{helpKey:"before-chat-icon-custom",label:"Custom Icon Image",children:g.jsx(In,{value:L("before-chat-icon-custom",{}),onChange:N=>w("before-chat-icon-custom",N)})}),g.jsx(et,{helpKey:"chat-button-text",label:"Send Message Button Label",help:"Enter the text to display on the send message button.",helpImage:X("send_message_text.webp"),liveDemo:ze("#shortcode"),openDocs:De("floating-chat/multi-agent/?ref=1"),children:g.jsx(un,{value:L("chat-button-text","Send Message"),onChange:N=>w("chat-button-text",N)})})]}),Z,(tt||Z)&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Box Footer"}),g.jsx(et,{helpKey:"footer_content",label:"Footer Content",help:"Enable or disable the footer text below the chat box. You can also replace the default text with your own custom message.",openDocs:De("floating-chat/single-agent/?ref=1"),children:g.jsx(Bi,{value:L("footer_content"),onChange:N=>w("footer_content",N)})}),gt("footer_content")&&g.jsx(et,{helpKey:"footer_content_text",label:"Custom Footer Text",help:"Text or HTML shown in the footer when footer content is enabled.",children:g.jsx(Xp,{value:L("footer_content_text","Chat with us on Messenger!"),onChange:N=>w("footer_content_text",N),rows:3})})]})]}),Ua=g.jsxs("div",{children:[g.jsx(Wt,{title:"Button Style"}),g.jsx(et,{helpKey:"opt-button-style",label:"Floating Button Style",help:"Choose a style for the floating chat button.",children:g.jsx(cu,{value:ct,onChange:N=>w("opt-button-style",N),options:it})}),(tt||H)&&ct==="10"&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"agent_avatar_type",label:"Agent Avatar Type",children:g.jsx(he,{value:L("agent_avatar_type","default"),onChange:N=>w("agent_avatar_type",N),options:{default:"Default",custom:"Custom",none:"None"}})}),L("agent_avatar_type")==="custom"&&g.jsx(et,{helpKey:"agent_avatar",label:"Agent Avatar Image",children:g.jsx(In,{value:L("agent_avatar",{}),onChange:N=>w("agent_avatar",N)})}),g.jsx(et,{helpKey:"button_top_label",label:"Button Top Label",help:"Small label above the main button text.",children:g.jsx(un,{value:L("button_top_label","John Doe / Technical support"),onChange:N=>w("button_top_label",N)})}),g.jsx(et,{helpKey:"bubble-text",label:"Button Main Label",children:g.jsx(un,{value:L("bubble-text","How may I help you?"),onChange:N=>w("bubble-text",N)})}),g.jsx(et,{helpKey:"online_text",label:"Online Text",children:g.jsx(un,{value:L("online_text","I Am Online"),onChange:N=>w("online_text",N)})}),g.jsx(et,{helpKey:"offline_text",label:"Offline Text",children:g.jsx(un,{value:L("offline_text","I Am Offline"),onChange:N=>w("offline_text",N)})})]}),Z,ct==="2"&&g.jsx(et,{helpKey:"bubble-text",label:"Button Main Label",children:g.jsx(un,{value:L("bubble-text","How may I help you?"),onChange:N=>w("bubble-text",N)})}),Z,ct==="1"&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Icon Button Icons"}),g.jsx(et,{helpKey:"circle-button-icon-1",label:"Open Icon",children:g.jsx(he,{value:L("circle-button-icon-1","icofont-facebook-messenger"),onChange:N=>w("circle-button-icon-1",N),options:Oa(hu,"native","custom")})}),L("circle-button-icon-1")==="native"&&g.jsx(et,{helpKey:"circle-button-icon-native",label:"Open — Native Icon",children:g.jsx(Na,{value:L("circle-button-icon-native","icofont-facebook-messenger"),onChange:N=>w("circle-button-icon-native",N)})}),L("circle-button-icon-1")==="custom"&&g.jsx(et,{helpKey:"circle-button-icon-custom",label:"Open — Custom Icon",children:g.jsx(In,{value:L("circle-button-icon-custom",{}),onChange:N=>w("circle-button-icon-custom",N)})}),g.jsx(et,{helpKey:"circle-button-close-1",label:"Close Icon",children:g.jsx(he,{value:L("circle-button-close-1","icofont-close"),onChange:N=>w("circle-button-close-1",N),options:Oa(rm,"native","custom")})}),L("circle-button-close-1")==="native"&&g.jsx(et,{helpKey:"circle-button-close-native",label:"Close — Native Icon",children:g.jsx(Na,{value:L("circle-button-close-native","icofont-close"),onChange:N=>w("circle-button-close-native",N)})}),L("circle-button-close-1")==="custom"&&g.jsx(et,{helpKey:"circle-button-close-custom",label:"Close — Custom Icon",children:g.jsx(In,{value:L("circle-button-close-custom",{}),onChange:N=>w("circle-button-close-custom",N)})}),g.jsx(et,{helpKey:"circle-animation",label:"Open/Close Transition Effect",children:g.jsx(Aa,{value:L("circle-animation","1"),onChange:N=>w("circle-animation",N),options:{1:"Slide Down",3:"Fade",2:"Rotate",4:"Slide Up"}})})]}),ct==="2"&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Simple Button Icons"}),g.jsx(et,{helpKey:"circle-button-icon",label:"Button Icon",children:g.jsx(he,{value:L("circle-button-icon","icofont-facebook-messenger"),onChange:N=>w("circle-button-icon",N),options:Oa(hu,"native","custom","no_icon")})}),L("circle-button-icon")==="native"&&g.jsx(et,{helpKey:"button-icon-native",label:"Button — Native Icon",children:g.jsx(Na,{value:L("button-icon-native","icofont-facebook-messenger"),onChange:N=>w("button-icon-native",N)})}),L("circle-button-icon")==="custom"&&g.jsx(et,{helpKey:"button-icon-custom",label:"Button — Custom Icon",children:g.jsx(In,{value:L("button-icon-custom",{}),onChange:N=>w("button-icon-custom",N)})}),L("circle-button-icon")!=="no_icon"&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"circle-button-close",label:"Close Icon",children:g.jsx(he,{value:L("circle-button-close","icofont-close"),onChange:N=>w("circle-button-close",N),options:Oa(rm,"native","custom")})}),L("circle-button-close")==="native"&&g.jsx(et,{helpKey:"button-close-native",label:"Close — Native Icon",children:g.jsx(Na,{value:L("button-close-native","icofont-close"),onChange:N=>w("button-close-native",N)})}),L("circle-button-close")==="custom"&&g.jsx(et,{helpKey:"button-close-custom",label:"Close — Custom Icon",children:g.jsx(In,{value:L("button-close-custom",{}),onChange:N=>w("button-close-custom",N)})})]})]}),g.jsx(Wt,{title:"Button Size"}),g.jsx(et,{helpKey:"button_size",label:"Button Size",children:g.jsx(he,{value:L("button_size","1"),onChange:N=>w("button_size",N),options:{"0.7":"XS","0.8":"S",1:"M","1.2":"L","1.4":"XL","1.6":"XXL",custom:"Custom"}})}),L("button_size")==="custom"&&g.jsx(et,{helpKey:"button_size_custom",label:"Custom Size",help:"Scale % relative to normal size (100%).",children:g.jsx(uu,{value:L("button_size_custom",100),onChange:N=>w("button_size_custom",N),min:40,max:300,unit:"%"})}),g.jsx(Wt,{title:"Colors"}),ct!=="10"&&g.jsx(et,{helpKey:"bubble_icon_color",label:"Icon Color",children:g.jsx(fo,{value:L("bubble_icon_color",{}),onChange:N=>w("bubble_icon_color",N),options:{normal_color:"Normal",hover_color:"Hover"}})}),ct==="2"&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"bubble_icon_bg",label:"Icon Background",children:g.jsx(Bi,{value:L("bubble_icon_bg",!0),onChange:N=>w("bubble_icon_bg",N)})}),gt("bubble_icon_bg")&&g.jsx(et,{helpKey:"bubble_icon_bg_color",label:"Icon Background Color",children:g.jsx(fo,{value:L("bubble_icon_bg_color",{normal_color:"#ffffff",hover_color:"#ffffff"}),onChange:N=>w("bubble_icon_bg_color",N),options:{normal_color:"Normal",hover_color:"Hover"}})})]}),g.jsx(et,{helpKey:"bubble_button_bg",label:"Button Background",children:g.jsx(fo,{value:L("bubble_button_bg",{}),onChange:N=>w("bubble_button_bg",N),options:{normal_color:"Normal",hover_color:"Hover"}})}),ct!=="1"&&g.jsx(et,{helpKey:"bubble_button_text",label:"Button Label Color",children:g.jsx(fo,{value:L("bubble_button_text",{}),onChange:N=>w("bubble_button_text",N),options:{normal_color:"Normal",hover_color:"Hover"}})}),g.jsx(Wt,{title:"Border & Padding"}),g.jsx(et,{helpKey:"bubble_button_border",label:"Button Border",children:g.jsx(tm,{value:L("bubble_button_border",{all:"0",style:"solid",color:"",hover_color:"",border_radius:"50"}),onChange:N=>w("bubble_button_border",N)})}),ct!=="1"&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"bubble_icon_border",label:"Icon Border",children:g.jsx(tm,{value:L("bubble_icon_border",{all:"0",style:"solid",color:"#ffffff",hover_color:"#ffffff",border_radius:"50"}),onChange:N=>w("bubble_icon_border",N)})}),g.jsx(et,{helpKey:"bubble-button-padding",label:"Button Padding",children:g.jsx(Re,{value:L("bubble-button-padding",{top:"5",right:"15",bottom:"5",left:"6",unit:"px"}),onChange:N=>w("bubble-button-padding",N)})})]}),g.jsx(Wt,{title:"Notification Badge"}),g.jsx(et,{helpKey:"notification_icon",label:"Show Notification Icon",children:g.jsx(Bi,{value:L("notification_icon"),onChange:N=>w("notification_icon",N)})}),gt("notification_icon")&&g.jsx(et,{helpKey:"notification_number",label:"Notification Number",help:"Number shown on the badge. None = no number.",children:g.jsx(Aa,{value:L("notification_number",""),onChange:N=>w("notification_number",N),options:{"":"None",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"}})}),g.jsx(Wt,{title:"Button Tooltip"}),g.jsx(et,{helpKey:"bubble_button_tooltip",label:"Tooltip Behaviour",children:g.jsx(he,{value:L("bubble_button_tooltip","on_hover"),onChange:N=>w("bubble_button_tooltip",N),options:{on_hover:"On Hover",show:"Always Show",hide:"Hide"}})}),L("bubble_button_tooltip")!=="hide"&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"bubble_button_tooltip_text",label:"Tooltip Text",children:g.jsx(un,{value:L("bubble_button_tooltip_text","Need Help? Chat with us"),onChange:N=>w("bubble_button_tooltip_text",N)})}),g.jsx(et,{helpKey:"bubble_button_tooltip_background",label:"Tooltip Background",children:g.jsx(js,{value:L("bubble_button_tooltip_background","#f5f7f9"),onChange:N=>w("bubble_button_tooltip_background",N)})}),g.jsx(et,{helpKey:"bubble_button_tooltip_width",label:"Tooltip Width",help:"Max width in px.",children:g.jsx(uu,{value:L("bubble_button_tooltip_width",180),onChange:N=>w("bubble_button_tooltip_width",N),min:20,max:500,step:5,unit:"px"})})]}),g.jsx(Wt,{title:"Position"}),g.jsx(et,{helpKey:"bubble-position",label:"Bubble Position",children:g.jsx(he,{value:L("bubble-position","bottom_right"),onChange:N=>w("bubble-position",N),options:{bottom_right:"Bottom Right",bottom_left:"Bottom Left",middle_right:"Middle Right",middle_left:"Middle Left"}})}),L("bubble-position")==="bottom_right"&&g.jsx(et,{helpKey:"right_bottom",label:"Margin — Bottom Right",children:g.jsx(Re,{top:!1,left:!1,value:L("right_bottom",{right:"30",bottom:"30",unit:"px"}),onChange:N=>w("right_bottom",N)})}),L("bubble-position")==="bottom_left"&&g.jsx(et,{helpKey:"left_bottom",label:"Margin — Bottom Left",children:g.jsx(Re,{top:!1,right:!1,value:L("left_bottom",{left:"30",bottom:"30",unit:"px"}),onChange:N=>w("left_bottom",N)})}),L("bubble-position")==="middle_right"&&g.jsx(et,{helpKey:"right_middle",label:"Margin — Middle Right",children:g.jsx(Re,{top:!1,left:!1,bottom:!1,value:L("right_middle",{right:"20",unit:"px"}),onChange:N=>w("right_middle",N)})}),L("bubble-position")==="middle_left"&&g.jsx(et,{helpKey:"left_middle",label:"Margin — Middle Left",children:g.jsx(Re,{top:!1,right:!1,bottom:!1,value:L("left_middle",{left:"20",unit:"px"}),onChange:N=>w("left_middle",N)})}),g.jsx(et,{helpKey:"enable-positioning-tablet",label:"Different Position for Tablet",children:g.jsx(Bi,{value:L("enable-positioning-tablet"),onChange:N=>w("enable-positioning-tablet",N),labelOn:"Yes",labelOff:"No"})}),gt("enable-positioning-tablet")&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"bubble-position-tablet",label:"Tablet Position",children:g.jsx(he,{value:L("bubble-position-tablet","bottom_right"),onChange:N=>w("bubble-position-tablet",N),options:{bottom_right:"Bottom Right",bottom_left:"Bottom Left",middle_right:"Middle Right",middle_left:"Middle Left"}})}),L("bubble-position-tablet")==="bottom_right"&&g.jsx(et,{helpKey:"right_bottom_tablet",label:"Tablet — Bottom Right",children:g.jsx(Re,{top:!1,left:!1,value:L("right_bottom_tablet",{right:"30",bottom:"30",unit:"px"}),onChange:N=>w("right_bottom_tablet",N)})}),L("bubble-position-tablet")==="bottom_left"&&g.jsx(et,{helpKey:"left_bottom_tablet",label:"Tablet — Bottom Left",children:g.jsx(Re,{top:!1,right:!1,value:L("left_bottom_tablet",{left:"30",bottom:"30",unit:"px"}),onChange:N=>w("left_bottom_tablet",N)})}),L("bubble-position-tablet")==="middle_right"&&g.jsx(et,{helpKey:"right_middle_tablet",label:"Tablet — Middle Right",children:g.jsx(Re,{top:!1,left:!1,bottom:!1,value:L("right_middle_tablet",{right:"20",unit:"px"}),onChange:N=>w("right_middle_tablet",N)})}),L("bubble-position-tablet")==="middle_left"&&g.jsx(et,{helpKey:"left_middle_tablet",label:"Tablet — Middle Left",children:g.jsx(Re,{top:!1,right:!1,bottom:!1,value:L("left_middle_tablet",{left:"20",unit:"px"}),onChange:N=>w("left_middle_tablet",N)})})]}),g.jsx(et,{helpKey:"enable-positioning-mobile",label:"Different Position for Mobile",children:g.jsx(Bi,{value:L("enable-positioning-mobile"),onChange:N=>w("enable-positioning-mobile",N),labelOn:"Yes",labelOff:"No"})}),gt("enable-positioning-mobile")&&g.jsxs(g.Fragment,{children:[g.jsx(et,{helpKey:"bubble-position-mobile",label:"Mobile Position",children:g.jsx(he,{value:L("bubble-position-mobile","bottom_right"),onChange:N=>w("bubble-position-mobile",N),options:{bottom_right:"Bottom Right",bottom_left:"Bottom Left",middle_right:"Middle Right",middle_left:"Middle Left"}})}),L("bubble-position-mobile")==="bottom_right"&&g.jsx(et,{helpKey:"right_bottom_mobile",label:"Mobile — Bottom Right",children:g.jsx(Re,{top:!1,left:!1,value:L("right_bottom_mobile",{right:"30",bottom:"30",unit:"px"}),onChange:N=>w("right_bottom_mobile",N)})}),L("bubble-position-mobile")==="bottom_left"&&g.jsx(et,{helpKey:"left_bottom_mobile",label:"Mobile — Bottom Left",children:g.jsx(Re,{top:!1,right:!1,value:L("left_bottom_mobile",{left:"30",bottom:"30",unit:"px"}),onChange:N=>w("left_bottom_mobile",N)})}),L("bubble-position-mobile")==="middle_right"&&g.jsx(et,{helpKey:"right_middle_mobile",label:"Mobile — Middle Right",children:g.jsx(Re,{top:!1,left:!1,bottom:!1,value:L("right_middle_mobile",{right:"20",unit:"px"}),onChange:N=>w("right_middle_mobile",N)})}),L("bubble-position-mobile")==="middle_left"&&g.jsx(et,{helpKey:"left_middle_mobile",label:"Mobile — Middle Left",children:g.jsx(Re,{top:!1,right:!1,bottom:!1,value:L("left_middle_mobile",{left:"20",unit:"px"}),onChange:N=>w("left_middle_mobile",N)})})]})]}),Va=g.jsxs("div",{children:[(tt||Z)&&g.jsxs(g.Fragment,{children:[g.jsx(Wt,{title:"Popup Behaviour"}),g.jsx(et,{helpKey:"autoshow-popup",label:"Auto Open Popup",help:"Automatically opens the chat popup on page load.",children:g.jsx(Bi,{value:L("autoshow-popup",!1),onChange:N=>w("autoshow-popup",N)})}),gt("autoshow-popup")&&g.jsx(et,{helpKey:"auto_open_popup_timeout",label:"Auto Open Delay",help:"Delay in ms before auto-opening (0 = immediate).",children:g.jsx(uu,{value:L("auto_open_popup_timeout",0),onChange:N=>w("auto_open_popup_timeout",N),min:0,max:3e4,step:100,unit:"ms"})}),g.jsx(et,{helpKey:"select-animation",label:"Bubble Animation",help:"How the chat bubble appears on screen.",children:g.jsx(Aa,{value:L("select-animation","random"),onChange:N=>w("select-animation",N),options:{1:"Fade Right",2:"Fade Down",3:"Ease Down",4:"Fade In Scale",5:"Rotation",6:"Slide Fall",7:"Slide Down",8:"Rotate Left",9:"Flip Horizontal",10:"Flip Vertical",11:"Flip Up",12:"Super Scaled",13:"Slide Up",random:"Random"}})}),g.jsx(et,{helpKey:"theme_style",label:"Theme Style",help:"Visual style for the chat popup.",children:g.jsx(cu,{value:L("theme_style","flat_theme"),onChange:N=>w("theme_style",N),options:lt})}),L("theme_style")==="custom_theme"&&g.jsx(et,{label:"Background Image",children:g.jsx(In,{value:L("theme_background_image",{}),onChange:N=>w("theme_background_image",N)})})]}),g.jsx(Wt,{title:"Color Scheme"}),g.jsx(et,{helpKey:"bubble-style",label:"Bubble Layout Mode",help:"Light / Dark / Night colour mode.",children:g.jsx(he,{value:L("bubble-style","default"),onChange:N=>w("bubble-style",N),options:[{value:"default",label:"Light Mode"},{value:"dark",label:"Dark Mode",pro:!0},{value:"night",label:"Night Mode",pro:!0}]})}),g.jsx(et,{helpKey:"color_settings",label:"Primary & Secondary Colors",help:"Brand colours used throughout the chat bubble.",children:g.jsx(fo,{value:L("color_settings",{primary:"#0084ff",secondary:"#0066ff"}),onChange:N=>w("color_settings",N),options:{primary:"Primary",secondary:"Secondary"}})}),g.jsx(et,{helpKey:"send_button_color",label:"Send Button Colors",children:g.jsx(fo,{value:L("send_button_color",{}),onChange:N=>w("send_button_color",N),options:{color:"Color",hover_color:"Hover Color",background:"Background",hover_background:"Hover Background"}})}),g.jsx(Wt,{title:"Typography"}),g.jsx(et,{helpKey:"better_chat_support_typography_family",label:"Google Font Family",help:"Leave blank to inherit the site's font.",children:g.jsx(Aa,{value:L("better_chat_support_typography_family",""),onChange:ot,options:J,searchable:!0,placeholder:"Search fonts…"})}),g.jsx(Wt,{title:"Other"}),g.jsx(et,{helpKey:"alternative_mSupportBubble",label:"Custom Bubble Trigger",help:"Extra CSS selectors that also open the chat (e.g. .my-btn, #chat-trigger).",children:g.jsx(un,{value:L("alternative_mSupportBubble",""),onChange:N=>w("alternative_mSupportBubble",N),placeholder:".classname, #idname"})})]}),Pa=g.jsxs("div",{children:[g.jsx(Wt,{title:"Device Visibility"}),g.jsx(et,{helpKey:"bubble-visibility",label:"Show Chat On",help:"Control which device types see the chat bubble.",children:g.jsx(he,{value:L("bubble-visibility","everywhere"),onChange:N=>w("bubble-visibility",N),options:{everywhere:"Everywhere",desktop:"Desktop Only",tablet:"Tablet Only",mobile:"Mobile Only"}})}),g.jsx(Wt,{title:"Content Visibility"}),g.jsx(et,{helpKey:"visibility",label:"Enable Visibility Rules By",help:"Select content types that should use include/exclude rules.",children:g.jsx(e4,{value:ut,onChange:N=>w("visibility",N),options:{theme_page:"Theme Pages",page:"Pages",posts:{label:"Posts",pro:!0},product:{label:"Products",pro:!0},category:{label:"Post Categories",pro:!0},tags:{label:"Post Tags",pro:!0},product_category:{label:"Product Categories",pro:!0},product_tags:{label:"Product Tags",pro:!0}}})}),ut.length>0&&g.jsxs("div",{className:"overflow-hidden p-5",children:[g.jsx(cm,{label:O("Theme Pages"),isChecked:ut.includes("theme_page"),targetKey:"theme_page_target",allKey:"theme_page_all",listKey:"theme_page",listItems:[{id:"post_page",title:O("Blog Page")},{id:"404_page",title:O("404 Page")},{id:"search_page",title:O("Search Page")}],value:e,onChange:o}),g.jsx(cm,{label:O("Pages"),isChecked:ut.includes("page"),targetKey:"page_target",allKey:"page_all",listKey:"page",listItems:r.pages,value:e,onChange:o})]})]}),Su=g.jsxs("div",{children:[g.jsx(Wt,{title:"Export"}),g.jsx(et,{label:"Export Settings",help:"Download your current settings as a JSON backup file.",children:g.jsx("button",{type:"button",onClick:K,className:"px-4 py-2 bg-[#0084ff] hover:bg-[#0065cc] text-white rounded text-sm font-semibold transition-colors",children:O("Download Backup")})}),g.jsx(Wt,{title:"Import"}),g.jsx(et,{label:"Import Settings",help:"Restore settings from a previously exported JSON file. This overwrites current settings.",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx("input",{type:"file",accept:".json,application/json",onChange:I,className:"block text-sm text-gray-500 file:mr-3 file:py-1.5 file:px-3 file:rounded file:border-0 file:text-sm file:font-semibold file:bg-blue-50 file:text-[#0084ff] hover:file:bg-blue-100 cursor-pointer"}),g.jsxs("p",{className:"text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-2.5 py-1.5",children:[O("After importing, click")," ",g.jsx("strong",{children:O("Save Settings")})," ",O("to apply.")]})]})})]}),ju={general:Ha,"header-footer":mo,button:Ua,style:Va,others:Pa,backup:Su},$e=_?"#1a74e4":"#e2e8f0",ku=_?"#fff":"#64748b",zs=O(p?"Saving…":y?"Changes Saved":"Save Settings"),Ls=g.jsxs(g.Fragment,{children:[g.jsxs("button",{type:"button",onClick:Y,disabled:p,style:{background:$e,color:ku,transition:"background .2s, color .2s"},className:"inline-flex items-center gap-1.5 p-4 py-3 rounded text-xs font-bold uppercase tracking-wide disabled:opacity-60",children:[g.jsx(Mh,{className:"w-3.5 h-3.5",strokeWidth:2.5}),zs]}),g.jsxs("button",{type:"button",onClick:()=>G(We),className:"inline-flex items-center gap-1.5 px-4 py-3 bg-red-500 hover:bg-red-600 text-white rounded text-xs font-bold uppercase tracking-wide transition-colors",children:[g.jsx(Th,{className:"w-3.5 h-3.5",strokeWidth:2.5}),O("Reset Section")]})]});return g.jsxs("div",{className:"bg-[#f0f0f1] flex flex-col",children:[U&&jn.createPortal(Ls,U),C&&g.jsx("div",{className:"mx-5 mt-3 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-600",children:C}),g.jsxs("div",{className:"bg-white border-b border-gray-200 px-5 py-4",children:[g.jsx(Jp,{helpKey:"chat_layout",className:"text-sm font-medium text-gray-700 mb-3 inline-block",children:O("Choose Your Chat Experience")}),g.jsx(cu,{value:rt,onChange:N=>{w("chat_layout",N),N==="button"&&M==="header-footer"&&D("general")},options:nt})]}),at?g.jsxs("div",{className:"flex flex-1",children:[g.jsx("div",{className:"w-56 flex-shrink-0 bg-white border-r border-gray-200",children:g.jsx("ul",{className:"py-0",children:pe.map(N=>{const wt=We===N.id;return g.jsx("li",{className:"bg-gray-50 hover:bg-gray-100 border-b border-gray-200 mb-0",children:g.jsxs("button",{type:"button",onClick:()=>D(N.id),className:["w-full flex items-center gap-2.5 p-4 text-left transition-colors focus:outline-none border-l-2",wt?"text-[#0084ff] border-[#0084ff] font-semibold":"text-gray-600 border-transparent hover:text-gray-900"].join(" "),children:[g.jsx("span",{className:wt?"text-[#0084ff]":"text-gray-400",children:N.icon}),g.jsx("span",{className:"text-xs uppercase tracking-wider font-semibold",children:N.label})]})},N.id)})})}),g.jsx("div",{className:"flex-1 bg-white overflow-auto",children:ju[We]??null})]}):g.jsx("div",{className:"m-5 p-4 bg-green-50 border border-green-200 rounded text-sm text-green-700",children:O("Chat is disabled. You can still use shortcodes and Gutenberg blocks.")})]})}const{pluginUrl:um=""}=window.mcsAdmin||{};function g4(n){return navigator.clipboard?.writeText?navigator.clipboard.writeText(n):new Promise((e,o)=>{const a=document.createElement("textarea");a.value=n,a.setAttribute("readonly",""),a.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(a),a.focus(),a.select();try{const s=document.execCommand("copy");document.body.removeChild(a),s?e():o(new Error("execCommand returned false"))}catch(s){document.body.removeChild(a),o(s)}})}const gu=[{id:"1",image:`${um}src/Admin/assets/images/button-with-info.svg`,shortcode:'[better_chat_support style="1" fbid="themeAtelier" message="Hi! I have a question about your service." timezone="Asia/Dhaka" top_label="John / Technical support" main_label="How can I help you?" online="I am online" offline="I am offline" sunday="00:00-23:59" monday="00:00-23:59" tuesday="00:00-23:59" wednesday="00:00-23:59" thursday="00:00-23:59" friday="00:00-23:59" saturday="00:00-23:59"]',attrs:'Available Attributes = style="1", fbid="Facebook user name", message="Your desired message" top_label="Button top label" main_label="Button main label" visibility="desktop/tablet/mobile", size="1", background="#0084ff", hover_background="#0066ff", text_color="#ffffff", hover_text_color="#ffffff", padding="5px 15px 5px 6px", border_radius="50px", border="0px", border_style="solid", border_color="#0084ff", border_hover_color="#0066ff"'},{id:"2",image:`${um}src/Admin/assets/images/button2.svg`,shortcode:'[better_chat_support style="2" fbid="themeAtelier" message="Hi! I have a question about your service." label="How can I help you?" sunday="00:00-23:59" monday="00:00-23:59" tuesday="00:00-23:59" wednesday="00:00-23:59" thursday="00:00-23:59" friday="00:00-23:59" saturday="00:00-23:59"]',attrs:'Available Attributes = style="2", fbid="Facebook user name", message="Your desired message" label="Button label" visibility="desktop/tablet/mobile", size="1", background="#0084ff", hover_background="#0066ff", text_color="#ffffff", hover_text_color="#ffffff", padding="5px 15px 5px 6px", border_radius="50px", icon="yes/no" icon_bg="yes/no" icon_background="#ffffff", hover_icon_background="#ffffff", icon_color="#0084ff", hover_icon_color="#0066ff", border="0px", border_style="solid", border_color="#0084ff", border_hover_color="#0066ff"'}];function fm({label:n,children:e}){return g.jsxs("div",{className:"flex items-start gap-0 border-b border-gray-100 last:border-0",children:[g.jsx("div",{className:"w-52 flex-shrink-0 py-5 px-5 text-sm text-gray-600 font-medium",children:n}),g.jsx("div",{className:"flex-1 px-5 py-4",children:e})]})}function p4(){const[n,e]=E.useState("1"),[o,a]=E.useState(!1),[s,r]=E.useState(!1),u=gu.find(h=>h.id===n)??gu[0],f=()=>{r(!1),g4(u.shortcode).then(()=>{a(!0),setTimeout(()=>a(!1),2500)}).catch(()=>{r(!0),setTimeout(()=>r(!1),3e3)})};return g.jsx("div",{className:"bg-[#f0f0f1]",children:g.jsxs("div",{className:"bg-white shadow-sm",children:[g.jsx(fm,{label:O("Select Button Style"),children:g.jsx("div",{className:"flex gap-4 flex-wrap",children:gu.map(h=>{const p=h.id===n;return g.jsxs("button",{type:"button",onClick:()=>e(h.id),className:["relative rounded border-2 overflow-hidden transition-all duration-150 focus:outline-none","w-48 h-28 flex items-center justify-center bg-gray-50",p?"border-[#0084ff] shadow-md":"border-gray-200 hover:border-gray-400"].join(" "),children:[g.jsx("img",{src:h.image,alt:`Style ${h.id}`,className:"max-w-full max-h-full object-contain p-2",onError:b=>{b.target.style.display="none"}}),p&&g.jsx("span",{className:"absolute top-1.5 right-1.5 w-5 h-5 bg-[#0084ff] rounded-full flex items-center justify-center",children:g.jsx(_c,{className:"w-3 h-3 text-white",strokeWidth:3})})]},h.id)})})}),g.jsx(fm,{label:O("Shortcode"),children:g.jsxs("div",{className:"space-y-3",children:[g.jsx("textarea",{readOnly:!0,value:u.shortcode,rows:4,onClick:h=>h.target.select(),className:"w-full border border-gray-300 rounded px-3 py-2.5 text-sm font-mono text-gray-700 bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#0084ff] resize-none cursor-text"}),g.jsx("div",{children:g.jsx("button",{type:"button",onClick:f,className:["inline-flex items-center gap-2 px-4 py-2 rounded text-sm font-semibold transition-colors",s?"bg-red-500 text-white":o?"bg-green-500 text-white":"bg-[#0084ff] hover:bg-[#0065cc] text-white"].join(" "),children:s?g.jsxs(g.Fragment,{children:[g.jsx(M1,{className:"w-4 h-4"}),O("Copy Failed — Select & Ctrl+C")]}):o?g.jsxs(g.Fragment,{children:[g.jsx(_c,{className:"w-4 h-4"}),O("Copied!")]}):g.jsxs(g.Fragment,{children:[g.jsx(F1,{className:"w-4 h-4"}),O("Copy Shortcode")]})})}),g.jsxs("p",{className:"text-xs text-gray-500 leading-relaxed font-normal",children:[g.jsx("strong",{className:"text-gray-600",children:u.attrs.startsWith("Available Attributes =")?"Available Attributes =":""})," ",u.attrs.replace(/^Available Attributes =\s*/,"")]})]})})]})})}function dm(n,e){(e==null||e>n.length)&&(e=n.length);for(var o=0,a=Array(e);o<e;o++)a[o]=n[o];return a}function m4(n){if(Array.isArray(n))return n}function b4(n,e,o){return(e=j4(e))in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}function y4(n,e){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var a,s,r,u,f=[],h=!0,p=!1;try{if(r=(o=o.call(n)).next,e!==0)for(;!(h=(a=r.call(o)).done)&&(f.push(a.value),f.length!==e);h=!0);}catch(b){p=!0,s=b}finally{try{if(!h&&o.return!=null&&(u=o.return(),Object(u)!==u))return}finally{if(p)throw s}}return f}}function x4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hm(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),o.push.apply(o,a)}return o}function gm(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?hm(Object(o),!0).forEach(function(a){b4(n,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):hm(Object(o)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(o,a))})}return n}function v4(n,e){if(n==null)return{};var o,a,s=_4(n,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(a=0;a<r.length;a++)o=r[a],e.indexOf(o)===-1&&{}.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function _4(n,e){if(n==null)return{};var o={};for(var a in n)if({}.hasOwnProperty.call(n,a)){if(e.indexOf(a)!==-1)continue;o[a]=n[a]}return o}function w4(n,e){return m4(n)||y4(n,e)||k4(n,e)||x4()}function S4(n,e){if(typeof n!="object"||!n)return n;var o=n[Symbol.toPrimitive];if(o!==void 0){var a=o.call(n,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function j4(n){var e=S4(n,"string");return typeof e=="symbol"?e:e+""}function k4(n,e){if(n){if(typeof n=="string")return dm(n,e);var o={}.toString.call(n).slice(8,-1);return o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set"?Array.from(n):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?dm(n,e):void 0}}function C4(n,e,o){return e in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n}function pm(n,e){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),o.push.apply(o,a)}return o}function mm(n){for(var e=1;e<arguments.length;e++){var o=arguments[e]!=null?arguments[e]:{};e%2?pm(Object(o),!0).forEach(function(a){C4(n,a,o[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):pm(Object(o)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(o,a))})}return n}function E4(){for(var n=arguments.length,e=new Array(n),o=0;o<n;o++)e[o]=arguments[o];return function(a){return e.reduceRight(function(s,r){return r(s)},a)}}function Ra(n){return function e(){for(var o=this,a=arguments.length,s=new Array(a),r=0;r<a;r++)s[r]=arguments[r];return s.length>=n.length?n.apply(this,s):function(){for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];return e.apply(o,[].concat(s,f))}}}function Ts(n){return{}.toString.call(n).includes("Object")}function M4(n){return!Object.keys(n).length}function Da(n){return typeof n=="function"}function T4(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function A4(n,e){return Ts(e)||Jn("changeType"),Object.keys(e).some(function(o){return!T4(n,o)})&&Jn("changeField"),e}function N4(n){Da(n)||Jn("selectorType")}function O4(n){Da(n)||Ts(n)||Jn("handlerType"),Ts(n)&&Object.values(n).some(function(e){return!Da(e)})&&Jn("handlersType")}function R4(n){n||Jn("initialIsRequired"),Ts(n)||Jn("initialType"),M4(n)&&Jn("initialContent")}function D4(n,e){throw new Error(n[e]||n.default)}var z4={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Jn=Ra(D4)(z4),As={changes:A4,selector:N4,handler:O4,initial:R4};function L4(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};As.initial(n),As.handler(e);var o={current:n},a=Ra(U4)(o,e),s=Ra(H4)(o),r=Ra(As.changes)(n),u=Ra(B4)(o);function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(b){return b};return As.selector(p),p(o.current)}function h(p){E4(a,s,r,u)(p)}return[f,h]}function B4(n,e){return Da(e)?e(n.current):e}function H4(n,e){return n.current=mm(mm({},n.current),e),e}function U4(n,e,o){return Da(e)?e(n.current):Object.keys(o).forEach(function(a){var s;return(s=e[a])===null||s===void 0?void 0:s.call(e,n.current[a])}),o}var V4={create:L4},P4={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Y4(n){return function e(){for(var o=this,a=arguments.length,s=new Array(a),r=0;r<a;r++)s[r]=arguments[r];return s.length>=n.length?n.apply(this,s):function(){for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];return e.apply(o,[].concat(s,f))}}}function q4(n){return{}.toString.call(n).includes("Object")}function F4(n){return n||ym("configIsRequired"),q4(n)||ym("configType"),n.urls?(X4(),{paths:{vs:n.urls.monacoBase}}):n}function X4(){console.warn(bm.deprecation)}function G4(n,e){throw new Error(n[e]||n.default)}var bm={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
    You are using deprecated way of configuration.

    Instead of using
      monaco.config({ urls: { monacoBase: '...' } })
    use
      monaco.config({ paths: { vs: '...' } })

    For more please check the link https://github.com/suren-atoyan/monaco-loader#config
  `},ym=Y4(G4)(bm),K4={config:F4},W4=function(){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];return function(s){return o.reduceRight(function(r,u){return u(r)},s)}};function xm(n,e){return Object.keys(e).forEach(function(o){e[o]instanceof Object&&n[o]&&Object.assign(e[o],xm(n[o],e[o]))}),gm(gm({},n),e)}var $4={type:"cancelation",msg:"operation is manually canceled"};function pu(n){var e=!1,o=new Promise(function(a,s){n.then(function(r){return e?s($4):a(r)}),n.catch(s)});return o.cancel=function(){return e=!0},o}var Q4=["monaco"],Z4=V4.create({config:P4,isInitialized:!1,resolve:null,reject:null,monaco:null}),vm=w4(Z4,2),za=vm[0],Ns=vm[1];function I4(n){var e=K4.config(n),o=e.monaco,a=v4(e,Q4);Ns(function(s){return{config:xm(s.config,a),monaco:o}})}function J4(){var n=za(function(e){var o=e.monaco,a=e.isInitialized,s=e.resolve;return{monaco:o,isInitialized:a,resolve:s}});if(!n.isInitialized){if(Ns({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),pu(mu);if(window.monaco&&window.monaco.editor)return _m(window.monaco),n.resolve(window.monaco),pu(mu);W4(t5,n5)(i5)}return pu(mu)}function t5(n){return document.body.appendChild(n)}function e5(n){var e=document.createElement("script");return n&&(e.src=n),e}function n5(n){var e=za(function(a){var s=a.config,r=a.reject;return{config:s,reject:r}}),o=e5("".concat(e.config.paths.vs,"/loader.js"));return o.onload=function(){return n()},o.onerror=e.reject,o}function i5(){var n=za(function(o){var a=o.config,s=o.resolve,r=o.reject;return{config:a,resolve:s,reject:r}}),e=window.require;e.config(n.config),e(["vs/editor/editor.main"],function(o){var a=o.m||o;_m(a),n.resolve(a)},function(o){n.reject(o)})}function _m(n){za().monaco||Ns({monaco:n})}function o5(){return za(function(n){var e=n.monaco;return e})}var mu=new Promise(function(n,e){return Ns({resolve:n,reject:e})}),wm={config:I4,init:J4,__getMonacoInstance:o5},a5={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},bu=a5,l5={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},s5=l5;function r5({children:n}){return Te.createElement("div",{style:s5.container},n)}var c5=r5,u5=c5;function f5({width:n,height:e,isEditorReady:o,loading:a,_ref:s,className:r,wrapperProps:u}){return Te.createElement("section",{style:{...bu.wrapper,width:n,height:e},...u},!o&&Te.createElement(u5,null,a),Te.createElement("div",{ref:s,style:{...bu.fullWidth,...!o&&bu.hide},className:r}))}var d5=f5,Sm=E.memo(d5);function h5(n){E.useEffect(n,[])}var jm=h5;function g5(n,e,o=!0){let a=E.useRef(!0);E.useEffect(a.current||!o?()=>{a.current=!1}:n,e)}var Le=g5;function La(){}function po(n,e,o,a){return p5(n,a)||m5(n,e,o,a)}function p5(n,e){return n.editor.getModel(km(n,e))}function m5(n,e,o,a){return n.editor.createModel(e,o,a?km(n,a):void 0)}function km(n,e){return n.Uri.parse(e)}function b5({original:n,modified:e,language:o,originalLanguage:a,modifiedLanguage:s,originalModelPath:r,modifiedModelPath:u,keepCurrentOriginalModel:f=!1,keepCurrentModifiedModel:h=!1,theme:p="light",loading:b="Loading...",options:y={},height:v="100%",width:_="100%",className:k,wrapperProps:C={},beforeMount:j=La,onMount:M=La}){let[D,U]=E.useState(!1),[z,w]=E.useState(!0),Y=E.useRef(null),G=E.useRef(null),K=E.useRef(null),I=E.useRef(M),J=E.useRef(j),ot=E.useRef(!1);jm(()=>{let tt=wm.init();return tt.then(H=>(G.current=H)&&w(!1)).catch(H=>H?.type!=="cancelation"&&console.error("Monaco initialization: error:",H)),()=>Y.current?rt():tt.cancel()}),Le(()=>{if(Y.current&&G.current){let tt=Y.current.getOriginalEditor(),H=po(G.current,n||"",a||o||"text",r||"");H!==tt.getModel()&&tt.setModel(H)}},[r],D),Le(()=>{if(Y.current&&G.current){let tt=Y.current.getModifiedEditor(),H=po(G.current,e||"",s||o||"text",u||"");H!==tt.getModel()&&tt.setModel(H)}},[u],D),Le(()=>{let tt=Y.current.getModifiedEditor();tt.getOption(G.current.editor.EditorOption.readOnly)?tt.setValue(e||""):e!==tt.getValue()&&(tt.executeEdits("",[{range:tt.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),tt.pushUndoStop())},[e],D),Le(()=>{Y.current?.getModel()?.original.setValue(n||"")},[n],D),Le(()=>{let{original:tt,modified:H}=Y.current.getModel();G.current.editor.setModelLanguage(tt,a||o||"text"),G.current.editor.setModelLanguage(H,s||o||"text")},[o,a,s],D),Le(()=>{G.current?.editor.setTheme(p)},[p],D),Le(()=>{Y.current?.updateOptions(y)},[y],D);let L=E.useCallback(()=>{if(!G.current)return;J.current(G.current);let tt=po(G.current,n||"",a||o||"text",r||""),H=po(G.current,e||"",s||o||"text",u||"");Y.current?.setModel({original:tt,modified:H})},[o,e,s,n,a,r,u]),gt=E.useCallback(()=>{!ot.current&&K.current&&(Y.current=G.current.editor.createDiffEditor(K.current,{automaticLayout:!0,...y}),L(),G.current?.editor.setTheme(p),U(!0),ot.current=!0)},[y,p,L]);E.useEffect(()=>{D&&I.current(Y.current,G.current)},[D]),E.useEffect(()=>{!z&&!D&&gt()},[z,D,gt]);function rt(){let tt=Y.current?.getModel();f||tt?.original?.dispose(),h||tt?.modified?.dispose(),Y.current?.dispose()}return Te.createElement(Sm,{width:_,height:v,isEditorReady:D,loading:b,_ref:K,className:k,wrapperProps:C})}var y5=b5;E.memo(y5);function x5(n){let e=E.useRef();return E.useEffect(()=>{e.current=n},[n]),e.current}var v5=x5,Os=new Map;function _5({defaultValue:n,defaultLanguage:e,defaultPath:o,value:a,language:s,path:r,theme:u="light",line:f,loading:h="Loading...",options:p={},overrideServices:b={},saveViewState:y=!0,keepCurrentModel:v=!1,width:_="100%",height:k="100%",className:C,wrapperProps:j={},beforeMount:M=La,onMount:D=La,onChange:U,onValidate:z=La}){let[w,Y]=E.useState(!1),[G,K]=E.useState(!0),I=E.useRef(null),J=E.useRef(null),ot=E.useRef(null),L=E.useRef(D),gt=E.useRef(M),rt=E.useRef(),tt=E.useRef(a),H=v5(r),Z=E.useRef(!1),at=E.useRef(!1);jm(()=>{let X=wm.init();return X.then(nt=>(I.current=nt)&&K(!1)).catch(nt=>nt?.type!=="cancelation"&&console.error("Monaco initialization: error:",nt)),()=>J.current?A():X.cancel()}),Le(()=>{let X=po(I.current,n||a||"",e||s||"",r||o||"");X!==J.current?.getModel()&&(y&&Os.set(H,J.current?.saveViewState()),J.current?.setModel(X),y&&J.current?.restoreViewState(Os.get(r)))},[r],w),Le(()=>{J.current?.updateOptions(p)},[p],w),Le(()=>{!J.current||a===void 0||(J.current.getOption(I.current.editor.EditorOption.readOnly)?J.current.setValue(a):a!==J.current.getValue()&&(at.current=!0,J.current.executeEdits("",[{range:J.current.getModel().getFullModelRange(),text:a,forceMoveMarkers:!0}]),J.current.pushUndoStop(),at.current=!1))},[a],w),Le(()=>{let X=J.current?.getModel();X&&s&&I.current?.editor.setModelLanguage(X,s)},[s],w),Le(()=>{f!==void 0&&J.current?.revealLine(f)},[f],w),Le(()=>{I.current?.editor.setTheme(u)},[u],w);let ct=E.useCallback(()=>{if(!(!ot.current||!I.current)&&!Z.current){gt.current(I.current);let X=r||o,nt=po(I.current,a||n||"",e||s||"",X||"");J.current=I.current?.editor.create(ot.current,{model:nt,automaticLayout:!0,...p},b),y&&J.current.restoreViewState(Os.get(X)),I.current.editor.setTheme(u),f!==void 0&&J.current.revealLine(f),Y(!0),Z.current=!0}},[n,e,o,a,s,r,p,b,y,u,f]);E.useEffect(()=>{w&&L.current(J.current,I.current)},[w]),E.useEffect(()=>{!G&&!w&&ct()},[G,w,ct]),tt.current=a,E.useEffect(()=>{w&&U&&(rt.current?.dispose(),rt.current=J.current?.onDidChangeModelContent(X=>{at.current||U(J.current.getValue(),X)}))},[w,U]),E.useEffect(()=>{if(w){let X=I.current.editor.onDidChangeMarkers(nt=>{let it=J.current.getModel()?.uri;if(it&&nt.find(lt=>lt.path===it.path)){let lt=I.current.editor.getModelMarkers({resource:it});z?.(lt)}});return()=>{X?.dispose()}}return()=>{}},[w,z]);function A(){rt.current?.dispose(),v?y&&Os.set(r,J.current.saveViewState()):J.current.getModel()?.dispose(),J.current.dispose()}return Te.createElement(Sm,{width:_,height:k,isEditorReady:w,loading:h,_ref:ot,className:C,wrapperProps:j})}var w5=_5,S5=E.memo(w5),j5=S5;function Cm({language:n,value:e="",onChange:o,label:a,height:s=260}){return g.jsxs("div",{className:"rounded overflow-hidden border border-gray-700 bg-[#1e1e1e]",children:[g.jsx("div",{className:"text-gray-400 text-xs px-3 py-1.5 flex items-center gap-2 border-b border-gray-700",children:g.jsx("span",{className:"font-mono uppercase tracking-wide",children:a})}),g.jsx(j5,{height:s,language:n,theme:"vs-dark",value:e,onChange:r=>o(r??""),loading:g.jsxs("div",{className:"flex items-center gap-2 text-gray-400 text-sm px-4 py-6",children:[g.jsx("span",{className:"inline-block w-4 h-4 border-2 border-gray-500 border-t-transparent rounded-full animate-spin"}),O("Loading editor…")]}),options:{minimap:{enabled:!1},fontSize:13,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,wordWrap:"on",tabSize:2,renderLineHighlight:"line",smoothScrolling:!0,padding:{top:10,bottom:10},fixedOverflowWidgets:!0,scrollbar:{alwaysConsumeMouseWheel:!1}}})]})}const{restUrl:Em="",nonce:k5=""}=window.mcsAdmin||{},Mm={"X-WP-Nonce":k5,"Content-Type":"application/json"},Tm="mcs-settings-section",C5=["cleanup_data_deletion","open_in_new_tab","mcs_custom_css","mcs_custom_js"];function Rs({label:n,help:e,helpKey:o,children:a}){return g.jsxs("div",{className:"flex items-start gap-6 py-4 border-b border-gray-100 last:border-b-0",children:[g.jsxs("div",{className:"w-60 flex-shrink-0",children:[g.jsx(Jp,{helpKey:o,className:"text-sm text-gray-700 font-medium leading-snug",children:O(n)}),e&&g.jsx("p",{className:"text-xs text-gray-400 mt-0.5 leading-snug",children:O(e)})]}),g.jsx("div",{className:"flex-1 min-w-0 pt-0.5",children:a})]})}function E5({checked:n,onChange:e}){return g.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>e(!n),className:`relative inline-flex h-6 w-11 rounded-full transition-colors duration-200 focus:outline-none ${n?"bg-[#0084ff]":"bg-gray-300"}`,children:g.jsx("span",{className:`inline-block w-4 h-4 bg-white rounded-full shadow transition-transform duration-200 m-1 ${n?"translate-x-5":"translate-x-0"}`})})}function M5({settings:n,onChange:e,error:o}){const a=(u,f="")=>n[u]??f,s=(u,f)=>e({...n,[u]:f}),r=u=>{const f=a(u);return f===!0||f==="true"||f===1||f==="1"};return g.jsxs("div",{className:"flex-1 p-6 overflow-auto",children:[o&&g.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded text-sm text-red-600",children:o}),g.jsxs("div",{className:"mb-6",children:[g.jsx(Rs,{label:"Clean-up Data on Deletion",helpKey:"cleanup_data_deletion",help:"Completely remove all plugin data when the plugin is deleted.",children:g.jsx("input",{type:"checkbox",checked:r("cleanup_data_deletion"),onChange:u=>s("cleanup_data_deletion",u.target.checked),className:"w-4 h-4 accent-[#0084ff] mt-0.5"})}),g.jsx(Rs,{label:"Open in New Tab",helpKey:"open_in_new_tab",help:"Open the Messenger chat link in a new browser tab when clicked.",children:g.jsx(E5,{checked:r("open_in_new_tab"),onChange:u=>s("open_in_new_tab",u)})})]}),g.jsx(Rs,{label:"Custom CSS",helpKey:"mcs_custom_css",help:"Add your own CSS to override or extend the default chat styling.",children:g.jsx(Cm,{language:"css",label:"CSS",value:a("mcs_custom_css"),onChange:u=>s("mcs_custom_css",u)})}),g.jsx("div",{className:"mt-4",children:g.jsx(Rs,{label:"Custom JavaScript",helpKey:"mcs_custom_js",help:"Add your own JavaScript to extend or customise chat behaviour.",children:g.jsx(Cm,{language:"javascript",label:"JS",value:a("mcs_custom_js"),onChange:u=>s("mcs_custom_js",u)})})})]})}const T5=[{id:"advanced",label:"Advance",icon:g.jsx(X1,{className:"w-4 h-4"})}];function A5(){const n=T5.map(K=>K.id),[e,o]=E.useState(()=>{try{const K=localStorage.getItem(Tm);return n.includes(K)?K:"advanced"}catch{return"advanced"}}),a=typeof window<"u"&&window.mcsPreloaded&&window.mcsPreloaded.settings||null,[s,r]=E.useState(()=>a??{}),[u,f]=E.useState(!a),[h,p]=E.useState(!1),[b,y]=E.useState(!1),[v,_]=E.useState(!1),[k,C]=E.useState("");E.useEffect(()=>{fetch(`${Em}/settings/mcs_settings`,{headers:Mm,credentials:"same-origin"}).then(K=>K.json()).then(K=>{a||r(K??{})}).catch(()=>{a||C(O("Failed to load settings."))}).finally(()=>f(!1))},[]),E.useEffect(()=>{try{localStorage.setItem(Tm,e)}catch{}},[e]);const j=E.useCallback(K=>{r(K),_(!0),y(!1)},[]),M=async()=>{p(!0),C("");try{(await(await fetch(`${Em}/settings/mcs_settings`,{method:"POST",headers:Mm,credentials:"same-origin",body:JSON.stringify(s)})).json()).success?(_(!1),y(!0),setTimeout(()=>y(!1),3e3)):C(O("Save failed. Please try again."))}catch{C(O("Network error. Please try again."))}finally{p(!1)}};qp(M,h);const D=()=>{window.confirm(O("Reset this section to default values?"))&&(r(K=>{const I={...K};return C5.forEach(J=>delete I[J]),I}),_(!0),y(!1))},U=document.getElementById("mcs-page-actions"),z=v?"#1a74e4":"#e2e8f0",w=v?"#fff":"#64748b",Y=O(h?"Saving…":b?"Changes Saved":"Save Settings"),G=e==="advanced"?g.jsxs(g.Fragment,{children:[g.jsxs("button",{type:"button",onClick:M,disabled:h,style:{background:z,color:w,transition:"background .2s, color .2s"},className:"inline-flex items-center gap-1.5 p-4 py-3 rounded text-xs font-bold uppercase tracking-wide disabled:opacity-60",children:[g.jsx(Mh,{className:"w-3.5 h-3.5",strokeWidth:2.5}),Y]}),g.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-1.5 px-4 py-3 bg-red-500 hover:bg-red-600 text-white rounded text-xs font-bold uppercase tracking-wide transition-colors",children:[g.jsx(Th,{className:"w-3.5 h-3.5",strokeWidth:2.5}),O("Reset Section")]})]}):null;return u?g.jsxs("div",{className:"flex",style:{minHeight:"calc(100vh - 80px)"},"aria-busy":"true","aria-live":"polite",children:[g.jsx("div",{className:"w-56 flex-shrink-0 bg-white border-r border-gray-200 animate-pulse",children:Array.from({length:2}).map((K,I)=>g.jsx("div",{className:"px-4 py-4 border-b border-gray-200",children:g.jsx("div",{className:"h-4 w-28 bg-gray-200 rounded"})},I))}),g.jsxs("div",{className:"flex-1 p-6 animate-pulse space-y-5",children:[Array.from({length:2}).map((K,I)=>g.jsxs("div",{className:"flex items-start gap-6",children:[g.jsxs("div",{className:"w-60 flex-shrink-0 space-y-2",children:[g.jsx("div",{className:"h-4 w-40 bg-gray-200 rounded"}),g.jsx("div",{className:"h-3 w-52 bg-gray-100 rounded"})]}),g.jsx("div",{className:"flex-1 h-10 bg-gray-200 rounded"})]},I)),g.jsx("div",{className:"h-48 bg-gray-200 rounded"})]})]}):g.jsxs("div",{className:"flex flex-col",style:{minHeight:"calc(100vh - 80px)"},children:[U&&jn.createPortal(G,U),g.jsx("div",{className:"flex flex-1",children:g.jsx("div",{className:"flex-1 bg-white overflow-auto",children:e==="advanced"&&g.jsx(M5,{settings:s,onChange:j,error:k})})})]})}const yu=typeof document<"u"?document.createElement("textarea"):null;function Ba(n){return!n||!yu?n??"":(yu.innerHTML=n,yu.value)}const{restUrl:xu="",nonce:vu="",version:Am="",pluginUrl:N5="",adminUrl:O5="",docsUrl:R5="",demoUrl:Nm="",userName:Om=""}=window.mcsAdmin||{},ge="#0084ff",D5="#0073e6",An=n=>`${N5}src/Admin/HelpPage/assets/images/${n}`,ti=(n="")=>Nm?`${Nm}${n}`:"#",z5=[{id:"get-start-tab",icon:"icofont-play-alt-2",label:"Get Started"},{id:"recommended-tab",icon:"icofont-thumbs-up",label:"Recommended"},{id:"lite-to-pro-tab",icon:"icofont-badge",label:"Lite Vs Pro"},{id:"pro-plugins-tab",icon:"icofont-info-circle",label:"Pro Plugins"}],Rm=[{title:"All Free Version Features",free:"check",pro:"check"},{title:"Single Agent & Chat Button Layouts",free:"check",pro:"check"},{title:"Icon & Simple Button Styles",free:"check",pro:"check"},{title:"Time based availability for agents",free:"check",pro:"check"},{title:"Bubble animation",free:"14",pro:"14"},{title:"Open/Close Transition Effects",free:"4",pro:"4"},{title:"Typography & Google Fonts",free:"check",pro:"check"},{title:"Responsive Positioning (Desktop/Tablet/Mobile)",free:"check",pro:"check"},{title:"Button Tooltip & Notification Badge",free:"check",pro:"check"},{title:"Custom CSS & JavaScript",free:"check",pro:"check"},{title:"Shortcode Buttons",free:"check",pro:"check"},{title:"WooCommerce Buttons",free:"check",pro:"check"},{title:"Gutenberg Button Blocks",free:"check",pro:"check"},{title:"Export/Import Option",free:"check",pro:"check"},{title:"Multi-Agent Layouts (List & Grid)",hot:!0,free:"close",pro:"check"},{title:"Advance Chat Button Style",free:"close",pro:"check"},{title:"Dark & Night Layout Mode",free:"close",pro:"check"},{title:"Custom Button Icons & Images",free:"close",pro:"check"},{title:"Advanced Visibility (Posts, Products, Categories, Tags)",hot:!0,free:"close",pro:"check"},{title:"Automatic Updates & Priority Support",free:"close",pro:"check"}],L5=Rm.filter(n=>n.free==="close").map(n=>({title:n.title,hot:!!n.hot})),B5=[{href:"https://themeatelier.net/downloads/better-chat-support-for-messenger/",image:An("mcs.png"),title:"Better Chat Support for Messenger - WordPress Chat Plugin",desc:"Add a Facebook Messenger live chat button to your WordPress site and connect with visitors in real time to turn them into loyal customers."},{href:"https://wpchathelp.com/",image:An("chat-help.png"),title:"WhatsApp Chat Help - Chat Support Plugin for WordPress",desc:"WhatsApp Chat Help allows website owners to easily add a WhatsApp chat support button to their WordPress site."},{href:"https://wpeventful.com/",image:An("eventful.png"),title:"Eventful - Event Showcase Addon for The Events Calendar",desc:'With "Eventful," you can effortlessly create intelligent layouts for "The Events Calendar" plugin, effectively addressing and resolving compatibility issues that may arise.'},{href:"https://darkifywp.com/",image:"https://ps.w.org/darkify/assets/icon-256x256.gif?rev=3301202",title:"Darkify - WordPress Dark Mode Plugin",desc:"Darkify – is an extremely advanced dark mode plugin for any WordPress website. The plugin has the option to enable a dark mode switcher for the front end and also WordPress admin."},{href:"https://wpdomainforsale.com/",image:An("thumbnail-2.png"),title:"Domain For Sale Plugin for WordPress",desc:"The ultimate WordPress plugin for domain sales, appraisals, auctions, and marketplace management."},{href:ti("#shortcode"),image:An("greet-logo.png"),title:"Greet Bubble - Video Greetings, Video Welcome for WordPress",desc:"Placing a video on websites can significantly increase sales of services or products. Greet is a professional video bubble plugin for displaying welcome videos in a fun and engaging way."}],Dm=[{title:"Simple and easy to use",text:"This is exactly what I was looking for, I just need the chat bubble, the customer clicks on it and jumps to the landing page. Works great!",avatar:An("TomQv.jpeg"),author:"TomQv",rating:5,url:"https://wordpress.org/support/plugin/better-chat-support/reviews/?filter=5"},{title:"Great plugin!",text:"Thank you for that easy to use, easy to setup plugin. Works great and allows me to have direct contact with my Messenger clients.",avatar:An("Pascal.jpeg"),author:"Pascal",rating:5,url:"https://wordpress.org/support/plugin/better-chat-support/reviews/?filter=5"},{title:"Thank you very much",text:"I appreciate your work. It was easy to set it up.",avatar:An("user_image.jpg"),author:"st025",rating:5,url:"https://wordpress.org/support/plugin/better-chat-support/reviews/?filter=5"}],zm="https://wordpress.org/support/plugin/better-chat-support/reviews/?filter=5",_u="uskCC8jo4mo";function H5(){const n=new Date().getHours();return n<12?O("Good morning"):n<18?O("Good afternoon"):O("Good evening")}function Lm({kind:n,value:e}){return e==="check"?g.jsx("span",{className:`themeatelier-${n}`,children:g.jsx(C1,{size:16,color:"#22c55e",style:{display:"inline-block",verticalAlign:"middle"},"aria-label":"Included"})}):e==="close"?g.jsx("span",{className:`themeatelier-${n}`,children:g.jsx(Ch,{size:16,color:"#ef4444",style:{display:"inline-block",verticalAlign:"middle"},"aria-label":"Not included"})}):g.jsx("span",{className:`themeatelier-${n}`,children:g.jsx("b",{children:e})})}function U5({rating:n=0}){return g.jsx(wu,{value:n/20})}function wu({value:n=0,size:e=13}){return g.jsx("span",{className:"inline-flex items-center gap-0.5 text-amber-400",children:Array.from({length:5}).map((o,a)=>{const s=a+1;return n>=s?g.jsx(S1,{size:e},a):n>=s-.5?g.jsx(j1,{size:e},a):g.jsx(E1,{size:e,className:"text-gray-300"},a)})})}function V5({videoId:n,onClose:e}){return E.useEffect(()=>{const o=s=>{s.key==="Escape"&&e()};document.addEventListener("keydown",o);const a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=a}},[e]),jn.createPortal(g.jsx("div",{className:"fixed inset-0 z-[100001] flex items-center justify-center bg-black/80 p-4 backdrop-blur-sm",onClick:e,role:"dialog","aria-modal":"true",children:g.jsxs("div",{className:"relative w-full max-w-4xl",onClick:o=>o.stopPropagation(),children:[g.jsx("button",{type:"button",onClick:e,"aria-label":O("Close"),className:"absolute -top-11 right-0 inline-flex h-9 w-9 items-center justify-center rounded-full bg-white/15 text-white transition-colors hover:bg-white/30",children:g.jsx(Eh,{size:20})}),g.jsx("div",{className:"aspect-video w-full overflow-hidden rounded-xl bg-black shadow-2xl",children:g.jsx("iframe",{className:"h-full w-full",src:`https://www.youtube.com/embed/${n}?autoplay=1&rel=0`,title:"Better Chat Support - Overview",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0})})]})}),document.body)}function P5({onPlay:n}){return g.jsxs("button",{type:"button",onClick:n,"aria-label":O("Play overview video"),className:"group relative block aspect-video w-full overflow-hidden rounded-xl border-0 bg-gray-900 p-0 shadow-sm",children:[g.jsx("img",{src:`https://img.youtube.com/vi/${_u}/maxresdefault.jpg`,alt:"",className:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-105",onError:e=>{e.currentTarget.src=`https://img.youtube.com/vi/${_u}/hqdefault.jpg`}}),g.jsx("span",{className:"absolute inset-0 bg-black/10 transition-colors group-hover:bg-black/20"}),g.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:g.jsx("span",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-white/95 shadow-lg ring-8 ring-white/20 transition-transform group-hover:scale-110",children:g.jsx(D1,{size:26,className:"ml-1",style:{color:ge},fill:"currentColor"})})})]})}function Y5({plugin:n,busy:e,onInstall:o,onActivate:a}){const s=e===n.slug;let r;return n.active?r=g.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-green-50 text-green-600 text-xs font-semibold border border-green-200",children:[g.jsx(G1,{size:14})," ",O("Active")]}):n.installed?r=g.jsx("button",{type:"button",disabled:s,onClick:()=>a(n),style:{backgroundColor:ge},className:"inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-md text-white text-xs font-semibold transition-opacity hover:opacity-90 disabled:opacity-60",children:O(s?"Activating…":"Activate")}):r=g.jsxs("button",{type:"button",disabled:s,onClick:()=>o(n),style:{color:ge,borderColor:ge},className:"inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-md bg-white text-xs font-semibold border transition-colors hover:bg-blue-50 disabled:opacity-60",children:[g.jsx(Ah,{size:13})," ",O(s?"Installing…":"Install Now")]}),g.jsxs("div",{className:"group flex flex-col rounded-xl border border-gray-200 bg-white shadow-sm hover:shadow-md hover:border-gray-300 transition-all overflow-hidden",children:[g.jsxs("div",{className:"flex gap-4 p-5",children:[g.jsx("img",{src:n.icon,alt:"",className:"w-16 h-16 rounded-lg object-cover flex-shrink-0 bg-gray-50 border border-gray-100",onError:u=>{u.currentTarget.style.visibility="hidden"}}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-3",children:[g.jsx("h3",{className:"text-sm font-bold text-gray-900 leading-snug m-0",children:g.jsx("a",{href:n.wporgUrl,target:"_blank",rel:"noopener noreferrer",className:"no-underline hover:text-[#0084ff]",children:Ba(n.name)})}),g.jsx("div",{className:"flex-shrink-0",children:r})]}),g.jsx("p",{className:"mt-1.5 mb-0 text-xs text-gray-500 leading-relaxed line-clamp-2",children:Ba(n.description)}),g.jsxs("div",{className:"mt-2 text-[11px] text-gray-400",children:["By ",g.jsx("span",{className:"text-gray-500 font-medium",children:"ThemeAtelier"})]})]})]}),g.jsxs("div",{className:"mt-auto flex items-center flex-wrap gap-x-4 gap-y-1 px-5 py-3 border-t border-gray-100 bg-gray-50/60 text-[11px] text-gray-500",children:[n.rating>0&&g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx(U5,{rating:n.rating}),g.jsxs("span",{children:["(",n.numRatings,")"]})]}),n.activeInstalls&&g.jsxs("span",{className:"inline-flex items-center gap-1",children:[g.jsx(Ah,{size:12})," ",n.activeInstalls," ",O("active")]}),n.version&&g.jsxs("span",{children:["v",n.version]}),n.lastUpdated&&g.jsxs("span",{className:"inline-flex items-center gap-1",children:[g.jsx(xc,{size:12})," ",n.lastUpdated]}),g.jsxs("a",{href:n.wporgUrl,target:"_blank",rel:"noopener noreferrer",className:"ml-auto inline-flex items-center gap-0.5 font-medium no-underline hover:underline",style:{color:ge},children:[O("More Details")," ",g.jsx(Nh,{size:12})]})]})]})}function q5(){return g.jsx("div",{className:"rounded-xl border border-gray-200 bg-white p-5 animate-pulse",children:g.jsxs("div",{className:"flex gap-4",children:[g.jsx("div",{className:"w-16 h-16 rounded-lg bg-gray-200 flex-shrink-0"}),g.jsxs("div",{className:"flex-1 space-y-2",children:[g.jsx("div",{className:"h-4 bg-gray-200 rounded w-2/3"}),g.jsx("div",{className:"h-3 bg-gray-100 rounded w-full"}),g.jsx("div",{className:"h-3 bg-gray-100 rounded w-4/5"})]})]})})}function F5({review:n}){return g.jsxs("article",{className:"relative flex h-full flex-col rounded-xl border border-gray-200 bg-white p-6 shadow-sm transition-shadow hover:shadow-md",children:[g.jsx(k1,{className:"absolute right-5 top-5 text-gray-100",size:34,"aria-hidden":"true"}),g.jsx(wu,{value:n.rating||5,size:15}),n.title&&g.jsx("h4",{className:"mt-3 mb-1 text-sm font-bold text-gray-900 leading-snug",children:Ba(n.title)}),g.jsx("p",{className:"relative z-10 m-0 text-sm leading-relaxed text-gray-600 line-clamp-5",children:Ba(n.text)}),g.jsxs("div",{className:"mt-5 flex items-center gap-3 border-t border-gray-100 pt-4",children:[g.jsx("img",{src:n.avatar,alt:"",className:"h-10 w-10 rounded-full object-cover bg-gray-100",onError:e=>{e.currentTarget.src=An("user_image.jpg")}}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate text-sm font-semibold text-gray-900",children:Ba(n.author)}),g.jsxs("a",{href:n.url||zm,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[11px] font-medium no-underline hover:underline",style:{color:ge},children:[O("Verified on WordPress.org")," ",g.jsx(yc,{size:11})]})]})]})]})}function Bm({className:n="mt-10"}){const[e,o]=E.useState([]),[a,s]=E.useState(5),[r,u]=E.useState(0),[f,h]=E.useState(!0);return E.useEffect(()=>{let p=!1;return fetch(`${xu}/help/reviews`,{headers:{"X-WP-Nonce":vu},credentials:"same-origin"}).then(b=>b.ok?b.json():Promise.reject(new Error(`HTTP ${b.status}`))).then(b=>{if(p)return;const y=Array.isArray(b?.reviews)&&b.reviews.length?b.reviews:Dm;o(y),s(b?.rating||5),u(b?.numRatings||5)}).catch(()=>{p||(o(Dm),s(5),u(5))}).finally(()=>{p||h(!1)}),()=>{p=!0}},[]),g.jsxs("div",{className:n,children:[g.jsxs("div",{className:"text-center",children:[g.jsx("h2",{className:"mt-1 mb-0 text-2xl font-bold text-gray-900",children:O("What our users are saying")}),g.jsxs("div",{className:"mt-2 flex items-center justify-center gap-2",children:[g.jsx(wu,{value:a,size:16}),g.jsx("span",{className:"text-sm font-semibold text-gray-900",children:Number(a).toFixed(1)}),r>0&&g.jsxs("span",{className:"text-sm text-gray-500",children:[O("from")," ",r," ",O(r===1?"review":"reviews")]})]})]}),f?g.jsx("div",{className:"mt-6 flex flex-wrap justify-center gap-5",children:Array.from({length:3}).map((p,b)=>g.jsxs("div",{className:"w-[300px] rounded-xl border border-gray-200 bg-white p-6 animate-pulse sm:w-[340px]",children:[g.jsx("div",{className:"h-4 w-24 rounded bg-gray-200"}),g.jsx("div",{className:"mt-4 h-3 w-full rounded bg-gray-100"}),g.jsx("div",{className:"mt-2 h-3 w-5/6 rounded bg-gray-100"}),g.jsx("div",{className:"mt-2 h-3 w-2/3 rounded bg-gray-100"}),g.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[g.jsx("div",{className:"h-10 w-10 rounded-full bg-gray-200"}),g.jsx("div",{className:"h-3 w-24 rounded bg-gray-100"})]})]},b))}):g.jsx("div",{className:"mt-6 flex flex-wrap justify-center gap-5",children:e.map((p,b)=>g.jsx("div",{className:"w-[300px] sm:w-[340px]",children:g.jsx(F5,{review:p})},b))}),g.jsx("div",{className:"mt-6 text-center",children:g.jsxs("a",{href:zm,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-lg border border-gray-200 bg-white px-4 py-2 text-xs font-semibold text-gray-700 no-underline transition-colors hover:border-gray-300 hover:bg-gray-50",children:[O("Read all reviews")," ",g.jsx(Nh,{size:13})]})})]})}function X5({onSeeComparison:n}){return g.jsx("aside",{className:"overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm",children:g.jsxs("div",{className:"bg-gradient-to-b from-blue-50/70 to-white px-6 pb-6 pt-6",children:[g.jsxs("h3",{className:"m-0 text-lg font-extrabold leading-snug text-gray-900",children:[O("Go Pro & Unlock More!")," 🚀"]}),g.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-gray-500",children:O("Unlock the full potential of Better Chat Support to turn more visitors into customers.")}),g.jsx("ul",{className:"m-0 mt-5 list-none space-y-3 p-0",children:L5.map((e,o)=>g.jsxs("li",{className:"flex items-start gap-2.5 text-sm font-medium text-gray-800",children:[g.jsx("span",{className:"mt-px text-base leading-none",style:{color:ge},"aria-hidden":"true",children:"✦"}),g.jsxs("span",{children:[O(e.title),e.hot?" 🔥":""]})]},o))}),g.jsxs("div",{className:"mt-6 flex items-center gap-4",children:[g.jsxs("a",{href:ti("#pricing"),target:"_blank",rel:"noopener noreferrer",style:{backgroundColor:ge},className:"inline-flex items-center justify-center gap-1.5 rounded-lg px-4 py-2.5 text-sm font-bold text-white no-underline shadow-sm transition-opacity hover:text-white hover:opacity-90",children:["👑 ",O("Upgrade to Pro")]}),g.jsx("button",{type:"button",onClick:n,className:"text-sm font-semibold text-gray-500 underline decoration-gray-300 underline-offset-2 transition-colors hover:text-gray-700 hover:decoration-gray-400",children:O("Lite vs Pro")})]})]})})}function G5(){const[n,e]=E.useState("get-start-tab"),[o,a]=E.useState(!1),[s,r]=E.useState([]),[u,f]=E.useState(!0),[h,p]=E.useState(!1),[b,y]=E.useState(null),[v,_]=E.useState(0);E.useEffect(()=>{let z=!1;return f(!0),p(!1),fetch(`${xu}/help/recommended-plugins`,{headers:{"X-WP-Nonce":vu},credentials:"same-origin"}).then(w=>{if(!w.ok)throw new Error(`HTTP ${w.status}`);return w.json()}).then(w=>{if(z)return;const Y=Array.isArray(w?.plugins)?w.plugins:[];r(Y),p(Y.length===0&&!!w?.error)}).catch(()=>{z||(r([]),p(!0))}).finally(()=>{z||f(!1)}),()=>{z=!0}},[v]);const[k,C]=E.useState(""),j=async(z,w,Y)=>{y(z.slug),C("");try{const G=await fetch(`${xu}/help/${w}`,{method:"POST",headers:{"X-WP-Nonce":vu,"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(Y)}),K=await G.json().catch(()=>null);if(G.ok&&K?.success){r(I=>I.map(J=>J.slug===z.slug?{...J,installed:K.installed??J.installed,active:K.active??J.active,plugin:K.plugin??J.plugin}:J));return}if(G.ok){_(I=>I+1);return}C(`${z.name}: ${K?.message||O("Action failed. Please try again.")}`)}catch{C(`${z.name}: ${O("Action failed. Please try again.")}`)}finally{y(null)}},M=z=>j(z,"install-plugin",{slug:z.slug}),D=z=>j(z,"activate-plugin",{plugin:z.plugin}),U=E.useCallback(()=>a(!1),[]);return g.jsxs("div",{className:"better-chat-support bcs-help bg-[#eef0f2]",children:[o&&g.jsx(V5,{videoId:_u,onClose:U}),g.jsxs("div",{className:"bg-[#117a52] px-6 py-2.5 text-center text-[13px] font-medium text-white",children:["🔔 ",O("You're on Lite — unlock the full power at")," ",g.jsx("b",{className:"font-bold",children:"50% OFF"}),"."," ",g.jsx("b",{className:"font-bold",children:O("Lifetime Deal")}),". ",O("Pay once, Use forever.")," ",g.jsxs("a",{href:ti("#pricing"),target:"_blank",rel:"noopener noreferrer",className:"font-bold text-white underline decoration-white/60 underline-offset-2 hover:decoration-white hover:text-white",children:[O("Upgrade to Pro")," →"]})]}),g.jsx("header",{style:{backgroundColor:ge},className:"text-white",children:g.jsxs("div",{className:"mx-auto flex max-w-7xl items-center justify-between gap-4 px-6 py-4",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"w-11 h-11 rounded-full flex items-center justify-center bg-linear-to-br from-[#a435f0] to-[#0084ff] shrink-0 shadow-sm",children:g.jsx(kh,{className:"text-white",size:24,"aria-hidden":"true"})}),g.jsxs("span",{className:"text-lg font-bold tracking-tight",children:[O("Better"),g.jsx("span",{className:"font-extrabold",children:O("ChatSupport")})]}),Am&&g.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/40 px-2.5 py-0.5 text-xs font-semibold text-white/90",children:[g.jsx(xc,{size:11})," ",Am]})]}),g.jsxs("a",{href:"https://wordpress.org/support/plugin/better-chat-support/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm font-semibold text-white no-underline opacity-95 transition-opacity hover:opacity-100 hover:text-white",children:[g.jsx(V1,{size:16})," ",O("Get Help")]})]})}),g.jsx("nav",{className:"bg-white shadow-sm",children:g.jsxs("div",{className:"mx-auto flex max-w-7xl items-stretch gap-1 overflow-x-auto px-4 pt-6",children:[z5.map(z=>{const w=n===z.id;return g.jsxs("button",{type:"button",onClick:()=>e(z.id),className:`relative inline-flex items-center whitespace-nowrap border px-5 py-4 text-sm font-semibold border-transparent transition-colors rounded-t-lg border-b-0 ${w?"!border-[#0084ff] bg-white text-[#0084ff]":"text-gray-700 hover:text-gray-900"}`,children:[O(z.label),z.badge&&g.jsxs("sup",{className:"ml-1 text-[9px] font-bold uppercase tracking-wide text-[#0084ff]",children:[O(z.badge),"!"]})]},z.id)}),g.jsxs("a",{href:ti("#pricing"),target:"_blank",rel:"noopener noreferrer",className:"ml-auto hidden items-center gap-1.5 whitespace-nowrap px-5 text-sm font-semibold no-underline hover:underline sm:inline-flex",style:{color:ge},children:["🚀 ",O("Upgrade To Pro!")]})]})}),g.jsxs("main",{className:"mx-auto max-w-7xl px-4 py-8",children:[n==="get-start-tab"&&g.jsxs("div",{className:"grid grid-cols-1 items-start gap-6 lg:grid-cols-3",children:[g.jsxs("div",{className:"flex flex-col gap-6 lg:col-span-2",children:[g.jsx("section",{className:"rounded-xl border border-gray-200 bg-white p-7 shadow-sm",children:g.jsxs("div",{className:"grid grid-cols-1 items-center gap-7 md:grid-cols-2",children:[g.jsxs("div",{children:[g.jsxs("p",{className:"m-0 text-sm font-medium text-gray-400",children:[H5(),Om?`, ${Om}`:""]}),g.jsx("h1",{className:"mt-1 mb-0 text-[26px] font-bold leading-tight text-gray-900",children:O("Welcome to Better Chat Support!")}),g.jsx("p",{className:"mt-3 mb-0 text-sm leading-relaxed text-gray-500",children:O("Thank you for installing Better Chat Support for Messenger! This video will help you get started with the plugin. Enjoy!")}),g.jsxs("a",{href:`${O5}?page=mcs`,style:{backgroundColor:ge},className:"mt-6 inline-flex items-center gap-2 rounded-lg px-5 py-3 text-sm font-bold text-white no-underline shadow-sm transition-opacity hover:text-white hover:opacity-90",onMouseEnter:z=>z.currentTarget.style.backgroundColor=D5,onMouseLeave:z=>z.currentTarget.style.backgroundColor=ge,children:[g.jsx(R1,{size:17})," ",O("Set Up Your Chat Button")]})]}),g.jsx(P5,{onPlay:()=>a(!0)})]})}),g.jsx(Bm,{className:""})]}),g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx(X5,{onSeeComparison:()=>e("lite-to-pro-tab")}),[{href:`${R5}overview`,icon:"icofont-file-alt",title:"Documentation",desc:"Explore Messenger Chat Support plugin capabilities in our enriched documentation.",cta:"Browse Now"},{href:"https://wordpress.org/support/plugin/better-chat-support/",icon:"icofont-support",title:"Technical Support",desc:"For personalized assistance, reach out to our skilled support team for prompt help.",cta:"Get Support"}].map((z,w)=>g.jsxs("div",{className:"rounded-xl border border-gray-200 bg-white p-6 shadow-sm transition-shadow hover:shadow-md",children:[g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx("span",{className:"text-xl leading-none",style:{color:ge},"aria-hidden":"true",children:g.jsx("i",{className:z.icon})}),g.jsx("h4",{className:"m-0 text-base font-bold text-gray-900",children:O(z.title)})]}),g.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-gray-500",children:O(z.desc)}),g.jsx("a",{href:z.href,target:"_blank",rel:"noopener noreferrer",className:"mt-4 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-semibold text-gray-700 no-underline transition-colors hover:border-gray-400 hover:bg-gray-50",children:O(z.cta)})]},w))]})]}),n==="recommended-tab"&&g.jsxs("section",{children:[g.jsxs("div",{className:"mb-6",children:[g.jsx("h2",{className:"m-0 text-2xl font-bold text-gray-900",children:O("Enhance your Website with our Free Robust Plugins")}),g.jsx("p",{className:"mt-1 mb-0 text-sm text-gray-500",children:O("Free, high-quality plugins by ThemeAtelier — install in one click.")})]}),k&&g.jsxs("div",{className:"mb-4 flex items-start gap-2 rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700",children:[g.jsx(Ch,{size:14,className:"mt-0.5 flex-shrink-0"}),g.jsx("span",{children:k})]}),g.jsx("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:u?Array.from({length:4}).map((z,w)=>g.jsx(q5,{},w)):s.length===0?g.jsxs("div",{className:"col-span-full flex flex-col items-center gap-3 py-12 text-center",children:[g.jsx("p",{className:"m-0 text-sm text-gray-500",children:O(h?"Couldn’t load plugins right now. Please check your connection and try again.":"No recommended plugins are available at the moment.")}),h&&g.jsx("button",{type:"button",onClick:()=>_(z=>z+1),style:{backgroundColor:ge},className:"inline-flex items-center gap-1.5 rounded-md px-4 py-2 text-xs font-semibold text-white transition-opacity hover:opacity-90",children:O("Try Again")})]}):s.map(z=>g.jsx(Y5,{plugin:z,busy:b,onInstall:M,onActivate:D},z.slug))})]}),n==="lite-to-pro-tab"&&g.jsxs("section",{className:"themeatelier__help lite_vs_pro_page",children:[g.jsxs("div",{className:"mb-6 flex flex-col items-start justify-between gap-4 rounded-xl border border-blue-200 bg-blue-50 px-7 py-6 sm:flex-row sm:items-center",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h2",{className:"m-0 text-xl font-bold text-gray-900",children:O("Lite vs Pro Comparison")}),g.jsx("p",{className:"mt-1 mb-0 text-sm text-gray-600",children:O("Get Better Chat Support Pro today and unlock all the powerful features.")})]}),g.jsx("a",{href:ti("#pricing"),target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-2 rounded-lg bg-green-600 px-6 py-3 text-sm font-bold text-white no-underline shadow-sm transition-colors hover:bg-green-700 hover:text-white",children:O("Upgrade to Pro Now!")})]}),g.jsx("div",{className:"themeatelier-features",children:g.jsxs("ul",{children:[g.jsxs("li",{className:"themeatelier-header",children:[g.jsx("span",{className:"themeatelier-title",children:O("FEATURES")}),g.jsx("span",{className:"themeatelier-free",children:O("Lite")}),g.jsxs("span",{className:"themeatelier-pro",children:["🚀",O("PRO")]})]}),Rm.map((z,w)=>g.jsxs("li",{className:"themeatelier-body",children:[g.jsxs("span",{className:"themeatelier-title",children:[O(z.title),z.hot&&g.jsx("i",{className:"themeatelier-hot",children:O("Hot")})]}),g.jsx(Lm,{kind:"free",value:z.free}),g.jsx(Lm,{kind:"pro",value:z.pro})]},w))]})}),g.jsxs("div",{className:"themeatelier-upgrade-to-pro",children:[g.jsx("h2",{className:"themeatelier-section-title",children:O("Upgrade To PRO & Enjoy Advanced Features!")}),g.jsxs("span",{className:"themeatelier-section-subtitle",children:[O("Already,")," ",g.jsx("b",{children:"2000+"})," ",O("people are using Better Chat Support on their websites to turn visitors into customers with powerful video greetings — why won’t you?")]}),g.jsxs("div",{className:"themeatelier-upgrade-to-pro-btn",children:[g.jsxs("div",{className:"themeatelier-action-btn",children:[g.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:ti("#pricing"),className:"chat_btn_primary",children:O("Upgrade to Pro Now!")}),g.jsxs("span",{className:"themeatelier-small-paragraph",children:[O("14-Day No-Questions-Asked")," ",g.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://themeatelier.net/refund-policy/",children:O("Refund Policy")})]})]}),g.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"chat_btn_secondary",href:ti("#features"),children:O("See All Features")}),g.jsx("a",{target:"_blank",rel:"noopener noreferrer",className:"chat_btn_secondary",href:ti("#shortcode"),children:O("Pro Live Demo")})]})]}),g.jsx(Bm,{})]}),n==="pro-plugins-tab"&&g.jsx("section",{className:"themeatelier__help about-page",children:g.jsxs("div",{className:"themeatelier-our-plugin-list",children:[g.jsx("h2",{className:"help_page_title !mb-6 !mt-0",children:O("Upgrade your Website with our High-quality Plugins!")}),g.jsx("div",{className:"themeatelier-our-plugin-list-wrap",children:B5.map((z,w)=>g.jsxs("a",{target:"_blank",rel:"noopener noreferrer",className:"themeatelier-our-plugin-list-box",href:z.href,children:[g.jsxs("div",{className:"box_btn",children:[O("View Details")," ",g.jsx("i",{className:"icofont-long-arrow-right"})]}),g.jsx("img",{src:z.image,alt:"logo"}),g.jsx("h4",{children:z.title}),g.jsx("p",{children:z.desc})]},w))})]})})]}),g.jsx("footer",{className:"border-t border-gray-200 bg-white pb-6",children:g.jsxs("div",{className:"mx-auto flex max-w-7xl flex-col items-center gap-3 px-6 py-7 text-center",children:[g.jsxs("p",{className:"m-0 text-sm text-gray-600",children:[O("Made With")," ",g.jsx("i",{className:"icofont-heart-alt text-red-500"})," ",O("By the Team")," ",g.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://themeatelier.net/",className:"font-semibold no-underline hover:underline",style:{color:ge},children:"ThemeAtelier"})]}),g.jsx("p",{className:"m-0 text-xs text-gray-400",children:O("Get connected with")}),g.jsx("ul",{className:"m-0 flex list-none items-center gap-3 p-0",children:[{href:"https://www.facebook.com/ThemeAtelier/",icon:"icofont-facebook"},{href:"https://x.com/intent/follow?screen_name=themeatelier",icon:"icofont-x"},{href:"https://profiles.wordpress.org/themeatelier/#content-plugins",icon:"icofont-brand-wordpress"},{href:"https://www.youtube.com/@themeatelier",icon:"icofont-youtube-play"}].map((z,w)=>g.jsx("li",{children:g.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:z.href,className:"flex h-9 w-9 items-center justify-center rounded-full bg-gray-100 text-gray-600 no-underline transition-colors hover:text-white",onMouseEnter:Y=>Y.currentTarget.style.backgroundColor=ge,onMouseLeave:Y=>Y.currentTarget.style.backgroundColor="",children:g.jsx("i",{className:z.icon})})},w))})]})})]})}const Ds=[{path:"/",slug:"mcs",screen:"toplevel_page_mcs",Component:qj},{path:"/floating",slug:"mcs-floating",screen:"messenger_page_mcs-floating",Component:h4},{path:"/shortcodes",slug:"shortcodes",screen:"messenger_page_shortcodes",Component:p4},{path:"/settings",slug:"settings",screen:"messenger_page_settings",Component:A5},{path:"/help",slug:"mcs-help",screen:"messenger_page_mcs-help",Component:G5}];function K5(n){return Ds.find(e=>e.slug===n)?.path??null}function W5(n){return Ds.find(e=>e.screen===n)?.path??"/"}function $5(n){return Ds.find(e=>e.path===n)?.slug??"mcs"}function Hm(n){try{return new URL(n,window.location.origin).searchParams.get("page")}catch{return null}}const Q5={"/":"Dashboard","/floating":"Floating Chat","/shortcodes":"Shortcodes","/settings":"Settings","/help":"Help"};function Z5({children:n}){const{version:e=""}=window.mcsAdmin||{},o=rn(),a=sc(),s=Q5[o.pathname]||"Dashboard",r=o.pathname!=="/help",f=!["/","/shortcodes"].includes(o.pathname),h=E.useRef(null),p=E.useRef(null),[b,y]=E.useState({active:!1,top:32,left:0});E.useEffect(()=>{const _=k=>{if(k.defaultPrevented||k.button!==0||k.metaKey||k.ctrlKey||k.shiftKey||k.altKey)return;const C=document.getElementById("toplevel_page_mcs");if(!C)return;const j=k.target.closest("a");if(!j||!C.contains(j))return;const M=K5(Hm(j.getAttribute("href")||""));M&&(k.preventDefault(),a(M))};return document.addEventListener("click",_),()=>document.removeEventListener("click",_)},[a]),E.useEffect(()=>(document.body.classList.toggle("mcs-help-page",o.pathname==="/help"),()=>document.body.classList.remove("mcs-help-page")),[o.pathname]),E.useEffect(()=>{const _=$5(o.pathname),k=document.getElementById("toplevel_page_mcs");k&&(k.querySelectorAll(".wp-submenu li").forEach(C=>{const j=C.querySelector("a"),M=j?Hm(j.getAttribute("href")||""):null;C.classList.toggle("current",M===_)}),k.classList.add("wp-has-current-submenu","wp-menu-open"),k.classList.remove("wp-not-current-submenu"))},[o.pathname]),E.useEffect(()=>{const _=()=>parseInt(getComputedStyle(document.documentElement).marginTop,10)||32,k=()=>{const M=document.getElementById("wpcontent");return M?M.getBoundingClientRect().left:0},C=()=>{const M=h.current;if(!M)return;const D=_(),U=k(),z=f&&M.getBoundingClientRect().top<D;y(w=>w.active===z&&w.top===D&&w.left===U?w:{active:z,top:D,left:U})};window.addEventListener("scroll",C,{passive:!0}),window.addEventListener("resize",C);const j=new MutationObserver(C);return j.observe(document.body,{attributes:!0,attributeFilter:["class"]}),C(),()=>{window.removeEventListener("scroll",C),window.removeEventListener("resize",C),j.disconnect()}},[f]);const v=b.active?p.current?.offsetHeight??64:0;return g.jsxs("div",{className:"mcs-admin-wrap bg-[#f0f0f1]",children:[r&&g.jsxs(g.Fragment,{children:[g.jsx("div",{ref:h,"aria-hidden":"true"}),b.active&&g.jsx("div",{style:{height:v+20},"aria-hidden":"true"}),g.jsxs("div",{ref:p,className:"bg-white border-b border-gray-200 px-5 py-4 flex flex-wrap items-center justify-between gap-3 shadow-sm",style:b.active?{position:"fixed",top:b.top,left:b.left+20,right:20,zIndex:100,borderRadius:"7px"}:{marginBottom:"1.25rem",borderRadius:"0.375rem"},children:[g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[g.jsx("span",{className:"w-11 h-11 rounded-full flex items-center justify-center bg-linear-to-br from-[#a435f0] to-[#0084ff] shrink-0 shadow-sm",children:g.jsx(kh,{className:"text-white",size:24,"aria-hidden":"true"})}),g.jsxs("div",{className:"min-w-0 leading-tight",children:[g.jsx("h1",{className:"text-base font-bold text-gray-900 m-0 p-0 leading-tight truncate",children:O(s)}),g.jsxs("p",{className:"text-xs text-gray-400 m-0 p-0 mt-0.5 leading-tight",children:[O("Messenger")," v",e]})]})]}),g.jsx("div",{id:"mcs-page-actions",className:"flex flex-wrap items-center gap-2"})]})]}),g.jsx("div",{className:"p-0",children:n})]})}function I5(){if(window.location.hash.replace(/^#/,""))return;const{currentPage:e}=window.mcsAdmin||{},o=W5(e);if(o!=="/"){const{pathname:a,search:s}=window.location;window.history.replaceState(null,"",`${a}${s}#${o}`)}}I5();function J5(){return E.useEffect(()=>{(async()=>{try{const e=await fetch(window.mcsAdmin?.restUrl+"/settings/mcs-opt",{method:"GET",headers:{"X-WP-Nonce":window.mcsAdmin?.nonce},credentials:"same-origin"});if(e.ok){const o=await e.json(),a=o?.better_chat_support_typography,s=o?.better_chat_support_typography_family||(a&&typeof a=="object"?a["font-family"]:"");if(s){const r=s.replace(/ /g,"+"),u=`google-font-${s.replace(/\s+/g,"-")}`;if(!document.getElementById(u)){const f=document.createElement("link");f.id=u,f.href=`https://fonts.googleapis.com/css2?family=${r}&display=swap`,f.rel="stylesheet",document.head.appendChild(f)}}}}catch(e){console.debug("Could not load preview font:",e)}})()},[]),g.jsx(l1,{children:g.jsxs(Lv,{children:[Ds.map(n=>{const e=n.Component,o=g.jsx(Z5,{children:g.jsx(e,{})});return g.jsx(fc,{path:n.path,element:o},n.path)}),g.jsx(fc,{path:"*",element:g.jsx(Dv,{to:"/",replace:!0})})]})})}Bx.createRoot(document.getElementById("mcs_react")).render(g.jsx(E.StrictMode,{children:g.jsx(J5,{})}))})();
