function OE(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const o=Object.getOwnPropertyDescriptor(i,r);o&&Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();var HH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _S(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Og={exports:{}},Od={};/**
 * @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 Xx;function zE(){if(Xx)return Od;Xx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,r,o){var c=null;if(o!==void 0&&(c=""+o),r.key!==void 0&&(c=""+r.key),"key"in r){o={};for(var u in r)u!=="key"&&(o[u]=r[u])}else o=r;return r=o.ref,{$$typeof:e,type:i,key:c,ref:r!==void 0?r:null,props:o}}return Od.Fragment=t,Od.jsx=n,Od.jsxs=n,Od}var Qx;function BE(){return Qx||(Qx=1,Og.exports=zE()),Og.exports}var f=BE(),zg={exports:{}},zd={},Bg={exports:{}},Fg={};/**
 * @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 Zx;function FE(){return Zx||(Zx=1,(function(e){function t(J,at){var K=J.length;J.push(at);t:for(;0<K;){var dt=K-1>>>1,Tt=J[dt];if(0<r(Tt,at))J[dt]=at,J[K]=Tt,K=dt;else break t}}function n(J){return J.length===0?null:J[0]}function i(J){if(J.length===0)return null;var at=J[0],K=J.pop();if(K!==at){J[0]=K;t:for(var dt=0,Tt=J.length,X=Tt>>>1;dt<X;){var P=2*(dt+1)-1,q=J[P],W=P+1,lt=J[W];if(0>r(q,K))W<Tt&&0>r(lt,q)?(J[dt]=lt,J[W]=K,dt=W):(J[dt]=q,J[P]=K,dt=P);else if(W<Tt&&0>r(lt,K))J[dt]=lt,J[W]=K,dt=W;else break t}}return at}function r(J,at){var K=J.sortIndex-at.sortIndex;return K!==0?K:J.id-at.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var h=[],d=[],p=1,v=null,S=3,b=!1,_=!1,A=!1,j=!1,E=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function z(J){for(var at=n(d);at!==null;){if(at.callback===null)i(d);else if(at.startTime<=J)i(d),at.sortIndex=at.expirationTime,t(h,at);else break;at=n(d)}}function $(J){if(A=!1,z(J),!_)if(n(h)!==null)_=!0,ut||(ut=!0,Y());else{var at=n(d);at!==null&&yt($,at.startTime-J)}}var ut=!1,nt=-1,H=5,Q=-1;function ct(){return j?!0:!(e.unstable_now()-Q<H)}function F(){if(j=!1,ut){var J=e.unstable_now();Q=J;var at=!0;try{t:{_=!1,A&&(A=!1,L(nt),nt=-1),b=!0;var K=S;try{e:{for(z(J),v=n(h);v!==null&&!(v.expirationTime>J&&ct());){var dt=v.callback;if(typeof dt=="function"){v.callback=null,S=v.priorityLevel;var Tt=dt(v.expirationTime<=J);if(J=e.unstable_now(),typeof Tt=="function"){v.callback=Tt,z(J),at=!0;break e}v===n(h)&&i(h),z(J)}else i(h);v=n(h)}if(v!==null)at=!0;else{var X=n(d);X!==null&&yt($,X.startTime-J),at=!1}}break t}finally{v=null,S=K,b=!1}at=void 0}}finally{at?Y():ut=!1}}}var Y;if(typeof D=="function")Y=function(){D(F)};else if(typeof MessageChannel<"u"){var ot=new MessageChannel,tt=ot.port2;ot.port1.onmessage=F,Y=function(){tt.postMessage(null)}}else Y=function(){E(F,0)};function yt(J,at){nt=E(function(){J(e.unstable_now())},at)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return S},e.unstable_next=function(J){switch(S){case 1:case 2:case 3:var at=3;break;default:at=S}var K=S;S=at;try{return J()}finally{S=K}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(J,at){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var K=S;S=J;try{return at()}finally{S=K}},e.unstable_scheduleCallback=function(J,at,K){var dt=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?dt+K:dt):K=dt,J){case 1:var Tt=-1;break;case 2:Tt=250;break;case 5:Tt=1073741823;break;case 4:Tt=1e4;break;default:Tt=5e3}return Tt=K+Tt,J={id:p++,callback:at,priorityLevel:J,startTime:K,expirationTime:Tt,sortIndex:-1},K>dt?(J.sortIndex=K,t(d,J),n(h)===null&&J===n(d)&&(A?(L(nt),nt=-1):A=!0,yt($,K-dt))):(J.sortIndex=Tt,t(h,J),_||b||(_=!0,ut||(ut=!0,Y()))),J},e.unstable_shouldYield=ct,e.unstable_wrapCallback=function(J){var at=S;return function(){var K=S;S=at;try{return J.apply(this,arguments)}finally{S=K}}}})(Fg)),Fg}var Jx;function IE(){return Jx||(Jx=1,Bg.exports=FE()),Bg.exports}var Ig={exports:{}},Ze={};/**
 * @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 t5;function UE(){if(t5)return Ze;t5=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function b(X){return X===null||typeof X!="object"?null:(X=S&&X[S]||X["@@iterator"],typeof X=="function"?X:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,j={};function E(X,P,q){this.props=X,this.context=P,this.refs=j,this.updater=q||_}E.prototype.isReactComponent={},E.prototype.setState=function(X,P){if(typeof X!="object"&&typeof X!="function"&&X!=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,X,P,"setState")},E.prototype.forceUpdate=function(X){this.updater.enqueueForceUpdate(this,X,"forceUpdate")};function L(){}L.prototype=E.prototype;function D(X,P,q){this.props=X,this.context=P,this.refs=j,this.updater=q||_}var z=D.prototype=new L;z.constructor=D,A(z,E.prototype),z.isPureReactComponent=!0;var $=Array.isArray;function ut(){}var nt={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function Q(X,P,q){var W=q.ref;return{$$typeof:e,type:X,key:P,ref:W!==void 0?W:null,props:q}}function ct(X,P){return Q(X.type,P,X.props)}function F(X){return typeof X=="object"&&X!==null&&X.$$typeof===e}function Y(X){var P={"=":"=0",":":"=2"};return"$"+X.replace(/[=:]/g,function(q){return P[q]})}var ot=/\/+/g;function tt(X,P){return typeof X=="object"&&X!==null&&X.key!=null?Y(""+X.key):P.toString(36)}function yt(X){switch(X.status){case"fulfilled":return X.value;case"rejected":throw X.reason;default:switch(typeof X.status=="string"?X.then(ut,ut):(X.status="pending",X.then(function(P){X.status==="pending"&&(X.status="fulfilled",X.value=P)},function(P){X.status==="pending"&&(X.status="rejected",X.reason=P)})),X.status){case"fulfilled":return X.value;case"rejected":throw X.reason}}throw X}function J(X,P,q,W,lt){var ht=typeof X;(ht==="undefined"||ht==="boolean")&&(X=null);var ft=!1;if(X===null)ft=!0;else switch(ht){case"bigint":case"string":case"number":ft=!0;break;case"object":switch(X.$$typeof){case e:case t:ft=!0;break;case p:return ft=X._init,J(ft(X._payload),P,q,W,lt)}}if(ft)return lt=lt(X),ft=W===""?"."+tt(X,0):W,$(lt)?(q="",ft!=null&&(q=ft.replace(ot,"$&/")+"/"),J(lt,P,q,"",function(Dt){return Dt})):lt!=null&&(F(lt)&&(lt=ct(lt,q+(lt.key==null||X&&X.key===lt.key?"":(""+lt.key).replace(ot,"$&/")+"/")+ft)),P.push(lt)),1;ft=0;var Ct=W===""?".":W+":";if($(X))for(var _t=0;_t<X.length;_t++)W=X[_t],ht=Ct+tt(W,_t),ft+=J(W,P,q,ht,lt);else if(_t=b(X),typeof _t=="function")for(X=_t.call(X),_t=0;!(W=X.next()).done;)W=W.value,ht=Ct+tt(W,_t++),ft+=J(W,P,q,ht,lt);else if(ht==="object"){if(typeof X.then=="function")return J(yt(X),P,q,W,lt);throw P=String(X),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(X).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return ft}function at(X,P,q){if(X==null)return X;var W=[],lt=0;return J(X,W,"","",function(ht){return P.call(q,ht,lt++)}),W}function K(X){if(X._status===-1){var P=X._result;P=P(),P.then(function(q){(X._status===0||X._status===-1)&&(X._status=1,X._result=q)},function(q){(X._status===0||X._status===-1)&&(X._status=2,X._result=q)}),X._status===-1&&(X._status=0,X._result=P)}if(X._status===1)return X._result.default;throw X._result}var dt=typeof reportError=="function"?reportError:function(X){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof X=="object"&&X!==null&&typeof X.message=="string"?String(X.message):String(X),error:X});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",X);return}console.error(X)},Tt={map:at,forEach:function(X,P,q){at(X,function(){P.apply(this,arguments)},q)},count:function(X){var P=0;return at(X,function(){P++}),P},toArray:function(X){return at(X,function(P){return P})||[]},only:function(X){if(!F(X))throw Error("React.Children.only expected to receive a single React element child.");return X}};return Ze.Activity=v,Ze.Children=Tt,Ze.Component=E,Ze.Fragment=n,Ze.Profiler=r,Ze.PureComponent=D,Ze.StrictMode=i,Ze.Suspense=h,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=nt,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(X){return nt.H.useMemoCache(X)}},Ze.cache=function(X){return function(){return X.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cloneElement=function(X,P,q){if(X==null)throw Error("The argument must be a React element, but you passed "+X+".");var W=A({},X.props),lt=X.key;if(P!=null)for(ht in P.key!==void 0&&(lt=""+P.key),P)!H.call(P,ht)||ht==="key"||ht==="__self"||ht==="__source"||ht==="ref"&&P.ref===void 0||(W[ht]=P[ht]);var ht=arguments.length-2;if(ht===1)W.children=q;else if(1<ht){for(var ft=Array(ht),Ct=0;Ct<ht;Ct++)ft[Ct]=arguments[Ct+2];W.children=ft}return Q(X.type,lt,W)},Ze.createContext=function(X){return X={$$typeof:c,_currentValue:X,_currentValue2:X,_threadCount:0,Provider:null,Consumer:null},X.Provider=X,X.Consumer={$$typeof:o,_context:X},X},Ze.createElement=function(X,P,q){var W,lt={},ht=null;if(P!=null)for(W in P.key!==void 0&&(ht=""+P.key),P)H.call(P,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(lt[W]=P[W]);var ft=arguments.length-2;if(ft===1)lt.children=q;else if(1<ft){for(var Ct=Array(ft),_t=0;_t<ft;_t++)Ct[_t]=arguments[_t+2];lt.children=Ct}if(X&&X.defaultProps)for(W in ft=X.defaultProps,ft)lt[W]===void 0&&(lt[W]=ft[W]);return Q(X,ht,lt)},Ze.createRef=function(){return{current:null}},Ze.forwardRef=function(X){return{$$typeof:u,render:X}},Ze.isValidElement=F,Ze.lazy=function(X){return{$$typeof:p,_payload:{_status:-1,_result:X},_init:K}},Ze.memo=function(X,P){return{$$typeof:d,type:X,compare:P===void 0?null:P}},Ze.startTransition=function(X){var P=nt.T,q={};nt.T=q;try{var W=X(),lt=nt.S;lt!==null&&lt(q,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(ut,dt)}catch(ht){dt(ht)}finally{P!==null&&q.types!==null&&(P.types=q.types),nt.T=P}},Ze.unstable_useCacheRefresh=function(){return nt.H.useCacheRefresh()},Ze.use=function(X){return nt.H.use(X)},Ze.useActionState=function(X,P,q){return nt.H.useActionState(X,P,q)},Ze.useCallback=function(X,P){return nt.H.useCallback(X,P)},Ze.useContext=function(X){return nt.H.useContext(X)},Ze.useDebugValue=function(){},Ze.useDeferredValue=function(X,P){return nt.H.useDeferredValue(X,P)},Ze.useEffect=function(X,P){return nt.H.useEffect(X,P)},Ze.useEffectEvent=function(X){return nt.H.useEffectEvent(X)},Ze.useId=function(){return nt.H.useId()},Ze.useImperativeHandle=function(X,P,q){return nt.H.useImperativeHandle(X,P,q)},Ze.useInsertionEffect=function(X,P){return nt.H.useInsertionEffect(X,P)},Ze.useLayoutEffect=function(X,P){return nt.H.useLayoutEffect(X,P)},Ze.useMemo=function(X,P){return nt.H.useMemo(X,P)},Ze.useOptimistic=function(X,P){return nt.H.useOptimistic(X,P)},Ze.useReducer=function(X,P,q){return nt.H.useReducer(X,P,q)},Ze.useRef=function(X){return nt.H.useRef(X)},Ze.useState=function(X){return nt.H.useState(X)},Ze.useSyncExternalStore=function(X,P,q){return nt.H.useSyncExternalStore(X,P,q)},Ze.useTransition=function(){return nt.H.useTransition()},Ze.version="19.2.0",Ze}var e5;function Qp(){return e5||(e5=1,Ig.exports=UE()),Ig.exports}var Ug={exports:{}},Xs={};/**
 * @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 n5;function qE(){if(n5)return Xs;n5=1;var e=Qp();function t(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function o(h,d,p){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:v==null?null:""+v,children:h,containerInfo:d,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Xs.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Xs.createPortal=function(h,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(h,d,null,p)},Xs.flushSync=function(h){var d=c.T,p=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=d,i.p=p,i.d.f()}},Xs.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,i.d.C(h,d))},Xs.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Xs.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var p=d.as,v=u(p,d.crossOrigin),S=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?i.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:b}):p==="script"&&i.d.X(h,{crossOrigin:v,integrity:S,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Xs.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=u(d.as,d.crossOrigin);i.d.M(h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&i.d.M(h)},Xs.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,v=u(p,d.crossOrigin);i.d.L(h,p,{crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Xs.preloadModule=function(h,d){if(typeof h=="string")if(d){var p=u(d.as,d.crossOrigin);i.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else i.d.m(h)},Xs.requestFormReset=function(h){i.d.r(h)},Xs.unstable_batchedUpdates=function(h,d){return h(d)},Xs.useFormState=function(h,d,p){return c.H.useFormState(h,d,p)},Xs.useFormStatus=function(){return c.H.useHostTransitionStatus()},Xs.version="19.2.0",Xs}var i5;function jS(){if(i5)return Ug.exports;i5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ug.exports=qE(),Ug.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 s5;function VE(){if(s5)return zd;s5=1;var e=IE(),t=Qp(),n=jS();function i(s){var a="https://react.dev/errors/"+s;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var a=s,l=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,(a.flags&4098)!==0&&(l=a.return),s=a.return;while(s)}return a.tag===3?l:null}function c(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function u(s){if(s.tag===31){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function h(s){if(o(s)!==s)throw Error(i(188))}function d(s){var a=s.alternate;if(!a){if(a=o(s),a===null)throw Error(i(188));return a!==s?null:s}for(var l=s,m=a;;){var y=l.return;if(y===null)break;var w=y.alternate;if(w===null){if(m=y.return,m!==null){l=m;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===l)return h(y),s;if(w===m)return h(y),a;w=w.sibling}throw Error(i(188))}if(l.return!==m.return)l=y,m=w;else{for(var k=!1,V=y.child;V;){if(V===l){k=!0,l=y,m=w;break}if(V===m){k=!0,m=y,l=w;break}V=V.sibling}if(!k){for(V=w.child;V;){if(V===l){k=!0,l=w,m=y;break}if(V===m){k=!0,m=w,l=y;break}V=V.sibling}if(!k)throw Error(i(189))}}if(l.alternate!==m)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?s:a}function p(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s;for(s=s.child;s!==null;){if(a=p(s),a!==null)return a;s=s.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),D=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),ut=Symbol.for("react.suspense_list"),nt=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),ct=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function Y(s){return s===null||typeof s!="object"?null:(s=F&&s[F]||s["@@iterator"],typeof s=="function"?s:null)}var ot=Symbol.for("react.client.reference");function tt(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===ot?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case A:return"Fragment";case E:return"Profiler";case j:return"StrictMode";case $:return"Suspense";case ut:return"SuspenseList";case Q:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case _:return"Portal";case D:return s.displayName||"Context";case L:return(s._context.displayName||"Context")+".Consumer";case z:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case nt:return a=s.displayName||null,a!==null?a:tt(s.type)||"Memo";case H:a=s._payload,s=s._init;try{return tt(s(a))}catch{}}return null}var yt=Array.isArray,J=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},dt=[],Tt=-1;function X(s){return{current:s}}function P(s){0>Tt||(s.current=dt[Tt],dt[Tt]=null,Tt--)}function q(s,a){Tt++,dt[Tt]=s.current,s.current=a}var W=X(null),lt=X(null),ht=X(null),ft=X(null);function Ct(s,a){switch(q(ht,a),q(lt,s),q(W,null),a.nodeType){case 9:case 11:s=(s=a.documentElement)&&(s=s.namespaceURI)?bx(s):0;break;default:if(s=a.tagName,a=a.namespaceURI)a=bx(a),s=xx(a,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}P(W),q(W,s)}function _t(){P(W),P(lt),P(ht)}function Dt(s){s.memoizedState!==null&&q(ft,s);var a=W.current,l=xx(a,s.type);a!==l&&(q(lt,s),q(W,l))}function $t(s){lt.current===s&&(P(W),P(lt)),ft.current===s&&(P(ft),Ld._currentValue=K)}var Wt,Xt;function se(s){if(Wt===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);Wt=a&&a[1]||"",Xt=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Wt+s+Xt}var et=!1;function Qt(s,a){if(!s||et)return"";et=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(a){var qt=function(){throw Error()};if(Object.defineProperty(qt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qt,[])}catch(Pt){var kt=Pt}Reflect.construct(s,[],qt)}else{try{qt.call()}catch(Pt){kt=Pt}s.call(qt.prototype)}}else{try{throw Error()}catch(Pt){kt=Pt}(qt=s())&&typeof qt.catch=="function"&&qt.catch(function(){})}}catch(Pt){if(Pt&&kt&&typeof Pt.stack=="string")return[Pt.stack,kt.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=m.DetermineComponentFrameRoot(),k=w[0],V=w[1];if(k&&V){var mt=k.split(`
`),Mt=V.split(`
`);for(y=m=0;m<mt.length&&!mt[m].includes("DetermineComponentFrameRoot");)m++;for(;y<Mt.length&&!Mt[y].includes("DetermineComponentFrameRoot");)y++;if(m===mt.length||y===Mt.length)for(m=mt.length-1,y=Mt.length-1;1<=m&&0<=y&&mt[m]!==Mt[y];)y--;for(;1<=m&&0<=y;m--,y--)if(mt[m]!==Mt[y]){if(m!==1||y!==1)do if(m--,y--,0>y||mt[m]!==Mt[y]){var Bt=`
`+mt[m].replace(" at new "," at ");return s.displayName&&Bt.includes("<anonymous>")&&(Bt=Bt.replace("<anonymous>",s.displayName)),Bt}while(1<=m&&0<=y);break}}}finally{et=!1,Error.prepareStackTrace=l}return(l=s?s.displayName||s.name:"")?se(l):""}function Ke(s,a){switch(s.tag){case 26:case 27:case 5:return se(s.type);case 16:return se("Lazy");case 13:return s.child!==a&&a!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return Qt(s.type,!1);case 11:return Qt(s.type.render,!1);case 1:return Qt(s.type,!0);case 31:return se("Activity");default:return""}}function Ce(s){try{var a="",l=null;do a+=Ke(s,l),l=s,s=s.return;while(s);return a}catch(m){return`
Error generating stack: `+m.message+`
`+m.stack}}var Ut=Object.prototype.hasOwnProperty,oe=e.unstable_scheduleCallback,Zt=e.unstable_cancelCallback,ie=e.unstable_shouldYield,xe=e.unstable_requestPaint,ye=e.unstable_now,nn=e.unstable_getCurrentPriorityLevel,Ue=e.unstable_ImmediatePriority,on=e.unstable_UserBlockingPriority,je=e.unstable_NormalPriority,le=e.unstable_LowPriority,qe=e.unstable_IdlePriority,pe=e.log,Gn=e.unstable_setDisableYieldValue,sn=null,Jt=null;function Re(s){if(typeof pe=="function"&&Gn(s),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(sn,s)}catch{}}var rn=Math.clz32?Math.clz32:_e,we=Math.log,Ln=Math.LN2;function _e(s){return s>>>=0,s===0?32:31-(we(s)/Ln|0)|0}var Ee=256,_n=262144,Se=4194304;function be(s){var a=s&42;if(a!==0)return a;switch(s&-s){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:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function un(s,a,l){var m=s.pendingLanes;if(m===0)return 0;var y=0,w=s.suspendedLanes,k=s.pingedLanes;s=s.warmLanes;var V=m&134217727;return V!==0?(m=V&~w,m!==0?y=be(m):(k&=V,k!==0?y=be(k):l||(l=V&~s,l!==0&&(y=be(l))))):(V=m&~w,V!==0?y=be(V):k!==0?y=be(k):l||(l=m&~s,l!==0&&(y=be(l)))),y===0?0:a!==0&&a!==y&&(a&w)===0&&(w=y&-y,l=a&-a,w>=l||w===32&&(l&4194048)!==0)?a:y}function nr(s,a){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&a)===0}function ki(s,a){switch(s){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 br(){var s=Se;return Se<<=1,(Se&62914560)===0&&(Se=4194304),s}function Li(s){for(var a=[],l=0;31>l;l++)a.push(s);return a}function Ne(s,a){s.pendingLanes|=a,a!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function bi(s,a,l,m,y,w){var k=s.pendingLanes;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=l,s.entangledLanes&=l,s.errorRecoveryDisabledLanes&=l,s.shellSuspendCounter=0;var V=s.entanglements,mt=s.expirationTimes,Mt=s.hiddenUpdates;for(l=k&~l;0<l;){var Bt=31-rn(l),qt=1<<Bt;V[Bt]=0,mt[Bt]=-1;var kt=Mt[Bt];if(kt!==null)for(Mt[Bt]=null,Bt=0;Bt<kt.length;Bt++){var Pt=kt[Bt];Pt!==null&&(Pt.lane&=-536870913)}l&=~qt}m!==0&&xr(s,m,0),w!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=w&~(k&~a))}function xr(s,a,l){s.pendingLanes|=a,s.suspendedLanes&=~a;var m=31-rn(a);s.entangledLanes|=a,s.entanglements[m]=s.entanglements[m]|1073741824|l&261930}function Yn(s,a){var l=s.entangledLanes|=a;for(s=s.entanglements;l;){var m=31-rn(l),y=1<<m;y&a|s[m]&a&&(s[m]|=a),l&=~y}}function _s(s,a){var l=a&-a;return l=(l&42)!==0?1:On(l),(l&(s.suspendedLanes|a))!==0?0:l}function On(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function ui(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function ti(){var s=at.p;return s!==0?s:(s=window.event,s===void 0?32:Vx(s.type))}function pa(s,a){var l=at.p;try{return at.p=s,a()}finally{at.p=l}}var Wn=Math.random().toString(36).slice(2),jn="__reactFiber$"+Wn,En="__reactProps$"+Wn,Ji="__reactContainer$"+Wn,ps="__reactEvents$"+Wn,js="__reactListeners$"+Wn,Xe="__reactHandles$"+Wn,Vs="__reactResources$"+Wn,Hs="__reactMarker$"+Wn;function $r(s){delete s[jn],delete s[En],delete s[ps],delete s[js],delete s[Xe]}function Es(s){var a=s[jn];if(a)return a;for(var l=s.parentNode;l;){if(a=l[Ji]||l[jn]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(s=jx(s);s!==null;){if(l=s[jn])return l;s=jx(s)}return a}s=l,l=s.parentNode}return null}function Ms(s){if(s=s[jn]||s[Ji]){var a=s.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return s}return null}function wr(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s.stateNode;throw Error(i(33))}function Sr(s){var a=s[Vs];return a||(a=s[Vs]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function ei(s){s[Hs]=!0}var go=new Set,vn={};function Ts(s,a){Nr(s,a),Nr(s+"Capture",a)}function Nr(s,a){for(vn[s]=a,s=0;s<a.length;s++)go.add(a[s])}var vo=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]*$"),ir={},tl={};function yo(s){return Ut.call(tl,s)?!0:Ut.call(ir,s)?!1:vo.test(s)?tl[s]=!0:(ir[s]=!0,!1)}function gs(s,a,l){if(yo(a))if(l===null)s.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":s.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){s.removeAttribute(a);return}}s.setAttribute(a,""+l)}}function hi(s,a,l){if(l===null)s.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(a);return}s.setAttribute(a,""+l)}}function sr(s,a,l,m){if(m===null)s.removeAttribute(l);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttributeNS(a,l,""+m)}}function Ie(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function el(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function rs(s,a,l){var m=Object.getOwnPropertyDescriptor(s.constructor.prototype,a);if(!s.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var y=m.get,w=m.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return y.call(this)},set:function(k){l=""+k,w.call(this,k)}}),Object.defineProperty(s,a,{enumerable:m.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function ga(s){if(!s._valueTracker){var a=el(s)?"checked":"value";s._valueTracker=rs(s,a,""+s[a])}}function va(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var l=a.getValue(),m="";return s&&(m=el(s)?s.checked?"true":"false":s.value),s=m,s!==l?(a.setValue(s),!0):!1}function as(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var ni=/[\n"\\]/g;function di(s){return s.replace(ni,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function rr(s,a,l,m,y,w,k,V){s.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.type=k:s.removeAttribute("type"),a!=null?k==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+Ie(a)):s.value!==""+Ie(a)&&(s.value=""+Ie(a)):k!=="submit"&&k!=="reset"||s.removeAttribute("value"),a!=null?Gr(s,k,Ie(a)):l!=null?Gr(s,k,Ie(l)):m!=null&&s.removeAttribute("value"),y==null&&w!=null&&(s.defaultChecked=!!w),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?s.name=""+Ie(V):s.removeAttribute("name")}function vs(s,a,l,m,y,w,k,V){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(s.type=w),a!=null||l!=null){if(!(w!=="submit"&&w!=="reset"||a!=null)){ga(s);return}l=l!=null?""+Ie(l):"",a=a!=null?""+Ie(a):l,V||a===s.value||(s.value=a),s.defaultValue=a}m=m??y,m=typeof m!="function"&&typeof m!="symbol"&&!!m,s.checked=V?s.checked:!!m,s.defaultChecked=!!m,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.name=k),ga(s)}function Gr(s,a,l){a==="number"&&as(s.ownerDocument)===s||s.defaultValue===""+l||(s.defaultValue=""+l)}function Hi(s,a,l,m){if(s=s.options,a){a={};for(var y=0;y<l.length;y++)a["$"+l[y]]=!0;for(l=0;l<s.length;l++)y=a.hasOwnProperty("$"+s[l].value),s[l].selected!==y&&(s[l].selected=y),y&&m&&(s[l].defaultSelected=!0)}else{for(l=""+Ie(l),a=null,y=0;y<s.length;y++){if(s[y].value===l){s[y].selected=!0,m&&(s[y].defaultSelected=!0);return}a!==null||s[y].disabled||(a=s[y])}a!==null&&(a.selected=!0)}}function nl(s,a,l){if(a!=null&&(a=""+Ie(a),a!==s.value&&(s.value=a),l==null)){s.defaultValue!==a&&(s.defaultValue=a);return}s.defaultValue=l!=null?""+Ie(l):""}function ar(s,a,l,m){if(a==null){if(m!=null){if(l!=null)throw Error(i(92));if(yt(m)){if(1<m.length)throw Error(i(93));m=m[0]}l=m}l==null&&(l=""),a=l}l=Ie(a),s.defaultValue=l,m=s.textContent,m===l&&m!==""&&m!==null&&(s.value=m),ga(s)}function $s(s,a){if(a){var l=s.firstChild;if(l&&l===s.lastChild&&l.nodeType===3){l.nodeValue=a;return}}s.textContent=a}var xi=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 il(s,a,l){var m=a.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?m?s.setProperty(a,""):a==="float"?s.cssFloat="":s[a]="":m?s.setProperty(a,l):typeof l!="number"||l===0||xi.has(a)?a==="float"?s.cssFloat=l:s[a]=(""+l).trim():s[a]=l+"px"}function Pi(s,a,l){if(a!=null&&typeof a!="object")throw Error(i(62));if(s=s.style,l!=null){for(var m in l)!l.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?s.setProperty(m,""):m==="float"?s.cssFloat="":s[m]="");for(var y in a)m=a[y],a.hasOwnProperty(y)&&l[y]!==m&&il(s,y,m)}else for(var w in a)a.hasOwnProperty(w)&&il(s,w,a[w])}function ya(s){if(s.indexOf("-")===-1)return!1;switch(s){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 Yr=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"]]),Ua=/^[\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 wi(s){return Ua.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Gs(){}var or=null;function qa(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ba=null,De=null;function sl(s){var a=Ms(s);if(a&&(s=a.stateNode)){var l=s[En]||null;t:switch(s=a.stateNode,a.type){case"input":if(rr(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),a=l.name,l.type==="radio"&&a!=null){for(l=s;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+di(""+a)+'"][type="radio"]'),a=0;a<l.length;a++){var m=l[a];if(m!==s&&m.form===s.form){var y=m[En]||null;if(!y)throw Error(i(90));rr(m,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<l.length;a++)m=l[a],m.form===s.form&&va(m)}break t;case"textarea":nl(s,l.value,l.defaultValue);break t;case"select":a=l.value,a!=null&&Hi(s,!!l.multiple,a,!1)}}}var bo=!1;function rl(s,a,l){if(bo)return s(a,l);bo=!0;try{var m=s(a);return m}finally{if(bo=!1,(ba!==null||De!==null)&&(om(),ba&&(a=ba,s=De,De=ba=null,sl(a),s)))for(a=0;a<s.length;a++)sl(s[a])}}function Mn(s,a){var l=s.stateNode;if(l===null)return null;var m=l[En]||null;if(m===null)return null;l=m[a];t:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(s=s.type,m=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!m;break t;default:s=!1}if(s)return null;if(l&&typeof l!="function")throw Error(i(231,a,typeof l));return l}var Si=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xo=!1;if(Si)try{var xa={};Object.defineProperty(xa,"passive",{get:function(){xo=!0}}),window.addEventListener("test",xa,xa),window.removeEventListener("test",xa,xa)}catch{xo=!1}var ys=null,wa=null,lr=null;function Wr(){if(lr)return lr;var s,a=wa,l=a.length,m,y="value"in ys?ys.value:ys.textContent,w=y.length;for(s=0;s<l&&a[s]===y[s];s++);var k=l-s;for(m=1;m<=k&&a[l-m]===y[w-m];m++);return lr=y.slice(s,1<m?1-m:void 0)}function Ri(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function Sa(){return!0}function wo(){return!1}function Di(s){function a(l,m,y,w,k){this._reactName=l,this._targetInst=y,this.type=m,this.nativeEvent=w,this.target=k,this.currentTarget=null;for(var V in s)s.hasOwnProperty(V)&&(l=s[V],this[V]=l?l(w):w[V]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Sa:wo,this.isPropagationStopped=wo,this}return v(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Sa)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Sa)},persist:function(){},isPersistent:Sa}),a}var Ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ys=Di(Ar),Cr=v({},Ar,{view:0,detail:0}),_r=Di(Cr),Va,Kr,Xr,Ha=v({},Cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oe,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Xr&&(Xr&&s.type==="mousemove"?(Va=s.screenX-Xr.screenX,Kr=s.screenY-Xr.screenY):Kr=Va=0,Xr=s),Va)},movementY:function(s){return"movementY"in s?s.movementY:Kr}}),So=Di(Ha),Qr=v({},Ha,{dataTransfer:0}),Zr=Di(Qr),Fl=v({},Cr,{relatedTarget:0}),ks=Di(Fl),No=v({},Ar,{animationName:0,elapsedTime:0,pseudoElement:0}),N=Di(No),O=v({},Ar,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),st=Di(O),pt=v({},Ar,{data:0}),xt=Di(pt),zt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ht={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"},ne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fe(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=ne[s])?!!a[s]:!1}function Oe(){return fe}var R=v({},Cr,{key:function(s){if(s.key){var a=zt[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=Ri(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Ht[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oe,charCode:function(s){return s.type==="keypress"?Ri(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Ri(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Nt=Di(R),Lt=v({},Ha,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Me=Di(Lt),me=v({},Cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oe}),Pe=Di(me),ge=v({},Ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),en=Di(ge),ze=v({},Ha,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=Di(ze),Ye=v({},Ar,{newState:0,oldState:0}),ii=Di(Ye),Jr=[9,13,27,32],cr=Si&&"CompositionEvent"in window,ta=null;Si&&"documentMode"in document&&(ta=document.documentMode);var al=Si&&"TextEvent"in window&&!ta,$a=Si&&(!cr||ta&&8<ta&&11>=ta),ts=" ",Ao=!1;function Co(s,a){switch(s){case"keyup":return Jr.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Il(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Na=!1;function Ls(s,a){switch(s){case"compositionend":return Il(a);case"keypress":return a.which!==32?null:(Ao=!0,ts);case"textInput":return s=a.data,s===ts&&Ao?null:s;default:return null}}function Ga(s,a){if(Na)return s==="compositionend"||!cr&&Co(s,a)?(s=Wr(),lr=wa=ys=null,Na=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return $a&&a.locale!=="ko"?null:a.data;default:return null}}var Ul={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 Dc(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!Ul[s.type]:a==="textarea"}function ur(s,a,l,m){ba?De?De.push(m):De=[m]:ba=m,a=mm(a,"onChange"),0<a.length&&(l=new Ys("onChange","change",null,l,m),s.push({event:l,listeners:a}))}var ea=null,Ya=null;function Oc(s){fx(s,0)}function na(s){var a=wr(s);if(va(a))return s}function _o(s,a){if(s==="change")return a}var Ws=!1;if(Si){var Ps;if(Si){var Aa="oninput"in document;if(!Aa){var Ca=document.createElement("div");Ca.setAttribute("oninput","return;"),Aa=typeof Ca.oninput=="function"}Ps=Aa}else Ps=!1;Ws=Ps&&(!document.documentMode||9<document.documentMode)}function Wa(){ea&&(ea.detachEvent("onpropertychange",ql),Ya=ea=null)}function ql(s){if(s.propertyName==="value"&&na(Ya)){var a=[];ur(a,Ya,s,qa(s)),rl(Oc,a)}}function Vl(s,a,l){s==="focusin"?(Wa(),ea=a,Ya=l,ea.attachEvent("onpropertychange",ql)):s==="focusout"&&Wa()}function Ni(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return na(Ya)}function _u(s,a){if(s==="click")return na(a)}function _a(s,a){if(s==="input"||s==="change")return na(a)}function ja(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var os=typeof Object.is=="function"?Object.is:ja;function Ka(s,a){if(os(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var l=Object.keys(s),m=Object.keys(a);if(l.length!==m.length)return!1;for(m=0;m<l.length;m++){var y=l[m];if(!Ut.call(a,y)||!os(s[y],a[y]))return!1}return!0}function Hl(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function $l(s,a){var l=Hl(s);s=0;for(var m;l;){if(l.nodeType===3){if(m=s+l.textContent.length,s<=a&&m>=a)return{node:l,offset:a-s};s=m}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Hl(l)}}function Xa(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?Xa(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function Qa(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var a=as(s.document);a instanceof s.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch{l=!1}if(l)s=a.contentWindow;else break;a=as(s.document)}return a}function Ea(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}var ol=Si&&"documentMode"in document&&11>=document.documentMode,hr=null,Za=null,bs=null,jr=!1;function An(s,a,l){var m=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;jr||hr==null||hr!==as(m)||(m=hr,"selectionStart"in m&&Ea(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),bs&&Ka(bs,m)||(bs=m,m=mm(Za,"onSelect"),0<m.length&&(a=new Ys("onSelect","select",null,a,l),s.push({event:a,listeners:m}),a.target=hr)))}function yn(s,a){var l={};return l[s.toLowerCase()]=a.toLowerCase(),l["Webkit"+s]="webkit"+a,l["Moz"+s]="moz"+a,l}var Un={animationend:yn("Animation","AnimationEnd"),animationiteration:yn("Animation","AnimationIteration"),animationstart:yn("Animation","AnimationStart"),transitionrun:yn("Transition","TransitionRun"),transitionstart:yn("Transition","TransitionStart"),transitioncancel:yn("Transition","TransitionCancel"),transitionend:yn("Transition","TransitionEnd")},Ai={},Ma={};Si&&(Ma=document.createElement("div").style,"AnimationEvent"in window||(delete Un.animationend.animation,delete Un.animationiteration.animation,delete Un.animationstart.animation),"TransitionEvent"in window||delete Un.transitionend.transition);function ia(s){if(Ai[s])return Ai[s];if(!Un[s])return s;var a=Un[s],l;for(l in a)if(a.hasOwnProperty(l)&&l in Ma)return Ai[s]=a[l];return s}var ll=ia("animationend"),zc=ia("animationiteration"),ed=ia("animationstart"),zf=ia("transitionrun"),Bf=ia("transitionstart"),Ff=ia("transitioncancel"),nd=ia("transitionend"),id=new Map,cl="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(" ");cl.push("scrollEnd");function Er(s,a){id.set(s,a),Ts(a,[s])}var Bc=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},dr=[],ul=0,ju=0;function Fc(){for(var s=ul,a=ju=ul=0;a<s;){var l=dr[a];dr[a++]=null;var m=dr[a];dr[a++]=null;var y=dr[a];dr[a++]=null;var w=dr[a];if(dr[a++]=null,m!==null&&y!==null){var k=m.pending;k===null?y.next=y:(y.next=k.next,k.next=y),m.pending=y}w!==0&&Uc(l,y,w)}}function Ic(s,a,l,m){dr[ul++]=s,dr[ul++]=a,dr[ul++]=l,dr[ul++]=m,ju|=m,s.lanes|=m,s=s.alternate,s!==null&&(s.lanes|=m)}function Eu(s,a,l,m){return Ic(s,a,l,m),xs(s)}function Ja(s,a){return Ic(s,null,null,a),xs(s)}function Uc(s,a,l){s.lanes|=l;var m=s.alternate;m!==null&&(m.lanes|=l);for(var y=!1,w=s.return;w!==null;)w.childLanes|=l,m=w.alternate,m!==null&&(m.childLanes|=l),w.tag===22&&(s=w.stateNode,s===null||s._visibility&1||(y=!0)),s=w,w=w.return;return s.tag===3?(w=s.stateNode,y&&a!==null&&(y=31-rn(l),s=w.hiddenUpdates,m=s[y],m===null?s[y]=[a]:m.push(a),a.lane=l|536870912),w):null}function xs(s){if(50<Cd)throw Cd=0,ag=null,Error(i(185));for(var a=s.return;a!==null;)s=a,a=s.return;return s.tag===3?s.stateNode:null}var ls={};function Mu(s,a,l,m){this.tag=s,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=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ws(s,a,l,m){return new Mu(s,a,l,m)}function Tu(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Mr(s,a){var l=s.alternate;return l===null?(l=ws(s.tag,a,s.key,s.mode),l.elementType=s.elementType,l.type=s.type,l.stateNode=s.stateNode,l.alternate=s,s.alternate=l):(l.pendingProps=a,l.type=s.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=s.flags&65011712,l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,a=s.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=s.sibling,l.index=s.index,l.ref=s.ref,l.refCleanup=s.refCleanup,l}function qc(s,a){s.flags&=65011714;var l=s.alternate;return l===null?(s.childLanes=0,s.lanes=a,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,a=l.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),s}function Gl(s,a,l,m,y,w){var k=0;if(m=s,typeof s=="function")Tu(s)&&(k=1);else if(typeof s=="string")k=AE(s,l,W.current)?26:s==="html"||s==="head"||s==="body"?27:5;else t:switch(s){case Q:return s=ws(31,l,a,y),s.elementType=Q,s.lanes=w,s;case A:return jo(l.children,y,w,a);case j:k=8,y|=24;break;case E:return s=ws(12,l,a,y|2),s.elementType=E,s.lanes=w,s;case $:return s=ws(13,l,a,y),s.elementType=$,s.lanes=w,s;case ut:return s=ws(19,l,a,y),s.elementType=ut,s.lanes=w,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case D:k=10;break t;case L:k=9;break t;case z:k=11;break t;case nt:k=14;break t;case H:k=16,m=null;break t}k=29,l=Error(i(130,s===null?"null":typeof s,"")),m=null}return a=ws(k,l,a,y),a.elementType=s,a.type=m,a.lanes=w,a}function jo(s,a,l,m){return s=ws(7,s,m,a),s.lanes=l,s}function Vc(s,a,l){return s=ws(6,s,null,a),s.lanes=l,s}function ku(s){var a=ws(18,null,null,0);return a.stateNode=s,a}function Yl(s,a,l){return a=ws(4,s.children!==null?s.children:[],s.key,a),a.lanes=l,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}var Lu=new WeakMap;function Tr(s,a){if(typeof s=="object"&&s!==null){var l=Lu.get(s);return l!==void 0?l:(a={value:s,source:a,stack:Ce(a)},Lu.set(s,a),a)}return{value:s,source:a,stack:Ce(a)}}var Wl=[],hl=0,Pu=null,Hc=0,kr=[],Lr=0,Eo=null,Pr=1,Rr="";function fr(s,a){Wl[hl++]=Hc,Wl[hl++]=Pu,Pu=s,Hc=a}function If(s,a,l){kr[Lr++]=Pr,kr[Lr++]=Rr,kr[Lr++]=Eo,Eo=s;var m=Pr;s=Rr;var y=32-rn(m)-1;m&=~(1<<y),l+=1;var w=32-rn(a)+y;if(30<w){var k=y-y%5;w=(m&(1<<k)-1).toString(32),m>>=k,y-=k,Pr=1<<32-rn(a)+y|l<<y|m,Rr=w+s}else Pr=1<<w|l<<y|m,Rr=s}function sd(s){s.return!==null&&(fr(s,1),If(s,1,0))}function Ru(s){for(;s===Pu;)Pu=Wl[--hl],Wl[hl]=null,Hc=Wl[--hl],Wl[hl]=null;for(;s===Eo;)Eo=kr[--Lr],kr[Lr]=null,Rr=kr[--Lr],kr[Lr]=null,Pr=kr[--Lr],kr[Lr]=null}function Uf(s,a){kr[Lr++]=Pr,kr[Lr++]=Rr,kr[Lr++]=Eo,Pr=a.id,Rr=a.overflow,Eo=s}var cs=null,Kn=null,dn=!1,Rs=null,fi=!1,sa=Error(i(519));function Mo(s){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Kl(Tr(a,s)),sa}function rd(s){var a=s.stateNode,l=s.type,m=s.memoizedProps;switch(a[jn]=s,a[En]=m,l){case"dialog":mn("cancel",a),mn("close",a);break;case"iframe":case"object":case"embed":mn("load",a);break;case"video":case"audio":for(l=0;l<jd.length;l++)mn(jd[l],a);break;case"source":mn("error",a);break;case"img":case"image":case"link":mn("error",a),mn("load",a);break;case"details":mn("toggle",a);break;case"input":mn("invalid",a),vs(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":mn("invalid",a);break;case"textarea":mn("invalid",a),ar(a,m.value,m.defaultValue,m.children)}l=m.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||a.textContent===""+l||m.suppressHydrationWarning===!0||vx(a.textContent,l)?(m.popover!=null&&(mn("beforetoggle",a),mn("toggle",a)),m.onScroll!=null&&mn("scroll",a),m.onScrollEnd!=null&&mn("scrollend",a),m.onClick!=null&&(a.onclick=Gs),a=!0):a=!1,a||Mo(s,!0)}function to(s){for(cs=s.return;cs;)switch(cs.tag){case 5:case 31:case 13:fi=!1;return;case 27:case 3:fi=!0;return;default:cs=cs.return}}function us(s){if(s!==cs)return!1;if(!dn)return to(s),dn=!0,!1;var a=s.tag,l;if((l=a!==3&&a!==27)&&((l=a===5)&&(l=s.type,l=!(l!=="form"&&l!=="button")||wg(s.type,s.memoizedProps)),l=!l),l&&Kn&&Mo(s),to(s),a===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));Kn=_x(s)}else if(a===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));Kn=_x(s)}else a===27?(a=Kn,cc(s.type)?(s=_g,_g=null,Kn=s):Kn=a):Kn=cs?Pa(s.stateNode.nextSibling):null;return!0}function dl(){Kn=cs=null,dn=!1}function ad(){var s=Rs;return s!==null&&(Ir===null?Ir=s:Ir.push.apply(Ir,s),Rs=null),s}function Kl(s){Rs===null?Rs=[s]:Rs.push(s)}var Du=X(null),To=null,Ta=null;function ko(s,a,l){q(Du,a._currentValue),a._currentValue=l}function Dr(s){s._currentValue=Du.current,P(Du)}function Xl(s,a,l){for(;s!==null;){var m=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),s===l)break;s=s.return}}function fl(s,a,l,m){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var w=y.dependencies;if(w!==null){var k=y.child;w=w.firstContext;t:for(;w!==null;){var V=w;w=y;for(var mt=0;mt<a.length;mt++)if(V.context===a[mt]){w.lanes|=l,V=w.alternate,V!==null&&(V.lanes|=l),Xl(w.return,l,s),m||(k=null);break t}w=V.next}}else if(y.tag===18){if(k=y.return,k===null)throw Error(i(341));k.lanes|=l,w=k.alternate,w!==null&&(w.lanes|=l),Xl(k,l,s),k=null}else k=y.child;if(k!==null)k.return=y;else for(k=y;k!==null;){if(k===s){k=null;break}if(y=k.sibling,y!==null){y.return=k.return,k=y;break}k=k.return}y=k}}function Lo(s,a,l,m){s=null;for(var y=a,w=!1;y!==null;){if(!w){if((y.flags&524288)!==0)w=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var k=y.alternate;if(k===null)throw Error(i(387));if(k=k.memoizedProps,k!==null){var V=y.type;os(y.pendingProps.value,k.value)||(s!==null?s.push(V):s=[V])}}else if(y===ft.current){if(k=y.alternate,k===null)throw Error(i(387));k.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(Ld):s=[Ld])}y=y.return}s!==null&&fl(a,s,l,m),a.flags|=262144}function Ou(s){for(s=s.firstContext;s!==null;){if(!os(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Po(s){To=s,Ta=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function hs(s){return qf(To,s)}function zu(s,a){return To===null&&Po(s),qf(s,a)}function qf(s,a){var l=a._currentValue;if(a={context:a,memoizedValue:l,next:null},Ta===null){if(s===null)throw Error(i(308));Ta=a,s.dependencies={lanes:0,firstContext:a},s.flags|=524288}else Ta=Ta.next=a;return l}var C0=typeof AbortController<"u"?AbortController:function(){var s=[],a=this.signal={aborted:!1,addEventListener:function(l,m){s.push(m)}};this.abort=function(){a.aborted=!0,s.forEach(function(l){return l()})}},_0=e.unstable_scheduleCallback,j0=e.unstable_NormalPriority,Ci={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ql(){return{controller:new C0,data:new Map,refCount:0}}function $c(s){s.refCount--,s.refCount===0&&_0(j0,function(){s.controller.abort()})}var Gc=null,Bu=0,g=0,x=null;function C(s,a){if(Gc===null){var l=Gc=[];Bu=0,g=dg(),x={status:"pending",value:void 0,then:function(m){l.push(m)}}}return Bu++,a.then(T,T),a}function T(){if(--Bu===0&&Gc!==null){x!==null&&(x.status="fulfilled");var s=Gc;Gc=null,g=0,x=null;for(var a=0;a<s.length;a++)(0,s[a])()}}function B(s,a){var l=[],m={status:"pending",value:null,reason:null,then:function(y){l.push(y)}};return s.then(function(){m.status="fulfilled",m.value=a;for(var y=0;y<l.length;y++)(0,l[y])(a)},function(y){for(m.status="rejected",m.reason=y,y=0;y<l.length;y++)(0,l[y])(void 0)}),m}var I=J.S;J.S=function(s,a){Ub=ye(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&C(s,a),I!==null&&I(s,a)};var U=X(null);function G(){var s=U.current;return s!==null?s:Qn.pooledCache}function Z(s,a){a===null?q(U,U.current):q(U,a.pool)}function rt(){var s=G();return s===null?null:{parent:Ci._currentValue,pool:s}}var gt=Error(i(460)),jt=Error(i(474)),it=Error(i(542)),bt={then:function(){}};function St(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Ot(s,a,l){switch(l=s[l],l===void 0?s.push(a):l!==a&&(a.then(Gs,Gs),a=l),a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,Gt(s),s;default:if(typeof a.status=="string")a.then(Gs,Gs);else{if(s=Qn,s!==null&&100<s.shellSuspendCounter)throw Error(i(482));s=a,s.status="pending",s.then(function(m){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=m}},function(m){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,Gt(s),s}throw Rt=a,gt}}function At(s){try{var a=s._init;return a(s._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Rt=l,gt):l}}var Rt=null;function Ft(){if(Rt===null)throw Error(i(459));var s=Rt;return Rt=null,s}function Gt(s){if(s===gt||s===it)throw Error(i(483))}var Vt=null,ce=0;function te(s){var a=ce;return ce+=1,Vt===null&&(Vt=[]),Ot(Vt,s,a)}function He(s,a){a=a.props.ref,s.ref=a!==void 0?a:null}function re(s,a){throw a.$$typeof===S?Error(i(525)):(s=Object.prototype.toString.call(a),Error(i(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s)))}function hn(s){function a(wt,vt){if(s){var Et=wt.deletions;Et===null?(wt.deletions=[vt],wt.flags|=16):Et.push(vt)}}function l(wt,vt){if(!s)return null;for(;vt!==null;)a(wt,vt),vt=vt.sibling;return null}function m(wt){for(var vt=new Map;wt!==null;)wt.key!==null?vt.set(wt.key,wt):vt.set(wt.index,wt),wt=wt.sibling;return vt}function y(wt,vt){return wt=Mr(wt,vt),wt.index=0,wt.sibling=null,wt}function w(wt,vt,Et){return wt.index=Et,s?(Et=wt.alternate,Et!==null?(Et=Et.index,Et<vt?(wt.flags|=67108866,vt):Et):(wt.flags|=67108866,vt)):(wt.flags|=1048576,vt)}function k(wt){return s&&wt.alternate===null&&(wt.flags|=67108866),wt}function V(wt,vt,Et,It){return vt===null||vt.tag!==6?(vt=Vc(Et,wt.mode,It),vt.return=wt,vt):(vt=y(vt,Et),vt.return=wt,vt)}function mt(wt,vt,Et,It){var Le=Et.type;return Le===A?Bt(wt,vt,Et.props.children,It,Et.key):vt!==null&&(vt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===H&&At(Le)===vt.type)?(vt=y(vt,Et.props),He(vt,Et),vt.return=wt,vt):(vt=Gl(Et.type,Et.key,Et.props,null,wt.mode,It),He(vt,Et),vt.return=wt,vt)}function Mt(wt,vt,Et,It){return vt===null||vt.tag!==4||vt.stateNode.containerInfo!==Et.containerInfo||vt.stateNode.implementation!==Et.implementation?(vt=Yl(Et,wt.mode,It),vt.return=wt,vt):(vt=y(vt,Et.children||[]),vt.return=wt,vt)}function Bt(wt,vt,Et,It,Le){return vt===null||vt.tag!==7?(vt=jo(Et,wt.mode,It,Le),vt.return=wt,vt):(vt=y(vt,Et),vt.return=wt,vt)}function qt(wt,vt,Et){if(typeof vt=="string"&&vt!==""||typeof vt=="number"||typeof vt=="bigint")return vt=Vc(""+vt,wt.mode,Et),vt.return=wt,vt;if(typeof vt=="object"&&vt!==null){switch(vt.$$typeof){case b:return Et=Gl(vt.type,vt.key,vt.props,null,wt.mode,Et),He(Et,vt),Et.return=wt,Et;case _:return vt=Yl(vt,wt.mode,Et),vt.return=wt,vt;case H:return vt=At(vt),qt(wt,vt,Et)}if(yt(vt)||Y(vt))return vt=jo(vt,wt.mode,Et,null),vt.return=wt,vt;if(typeof vt.then=="function")return qt(wt,te(vt),Et);if(vt.$$typeof===D)return qt(wt,zu(wt,vt),Et);re(wt,vt)}return null}function kt(wt,vt,Et,It){var Le=vt!==null?vt.key:null;if(typeof Et=="string"&&Et!==""||typeof Et=="number"||typeof Et=="bigint")return Le!==null?null:V(wt,vt,""+Et,It);if(typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case b:return Et.key===Le?mt(wt,vt,Et,It):null;case _:return Et.key===Le?Mt(wt,vt,Et,It):null;case H:return Et=At(Et),kt(wt,vt,Et,It)}if(yt(Et)||Y(Et))return Le!==null?null:Bt(wt,vt,Et,It,null);if(typeof Et.then=="function")return kt(wt,vt,te(Et),It);if(Et.$$typeof===D)return kt(wt,vt,zu(wt,Et),It);re(wt,Et)}return null}function Pt(wt,vt,Et,It,Le){if(typeof It=="string"&&It!==""||typeof It=="number"||typeof It=="bigint")return wt=wt.get(Et)||null,V(vt,wt,""+It,Le);if(typeof It=="object"&&It!==null){switch(It.$$typeof){case b:return wt=wt.get(It.key===null?Et:It.key)||null,mt(vt,wt,It,Le);case _:return wt=wt.get(It.key===null?Et:It.key)||null,Mt(vt,wt,It,Le);case H:return It=At(It),Pt(wt,vt,Et,It,Le)}if(yt(It)||Y(It))return wt=wt.get(Et)||null,Bt(vt,wt,It,Le,null);if(typeof It.then=="function")return Pt(wt,vt,Et,te(It),Le);if(It.$$typeof===D)return Pt(wt,vt,Et,zu(vt,It),Le);re(vt,It)}return null}function ae(wt,vt,Et,It){for(var Le=null,Tn=null,ve=vt,an=vt=0,gn=null;ve!==null&&an<Et.length;an++){ve.index>an?(gn=ve,ve=null):gn=ve.sibling;var kn=kt(wt,ve,Et[an],It);if(kn===null){ve===null&&(ve=gn);break}s&&ve&&kn.alternate===null&&a(wt,ve),vt=w(kn,vt,an),Tn===null?Le=kn:Tn.sibling=kn,Tn=kn,ve=gn}if(an===Et.length)return l(wt,ve),dn&&fr(wt,an),Le;if(ve===null){for(;an<Et.length;an++)ve=qt(wt,Et[an],It),ve!==null&&(vt=w(ve,vt,an),Tn===null?Le=ve:Tn.sibling=ve,Tn=ve);return dn&&fr(wt,an),Le}for(ve=m(ve);an<Et.length;an++)gn=Pt(ve,wt,an,Et[an],It),gn!==null&&(s&&gn.alternate!==null&&ve.delete(gn.key===null?an:gn.key),vt=w(gn,vt,an),Tn===null?Le=gn:Tn.sibling=gn,Tn=gn);return s&&ve.forEach(function(mc){return a(wt,mc)}),dn&&fr(wt,an),Le}function Fe(wt,vt,Et,It){if(Et==null)throw Error(i(151));for(var Le=null,Tn=null,ve=vt,an=vt=0,gn=null,kn=Et.next();ve!==null&&!kn.done;an++,kn=Et.next()){ve.index>an?(gn=ve,ve=null):gn=ve.sibling;var mc=kt(wt,ve,kn.value,It);if(mc===null){ve===null&&(ve=gn);break}s&&ve&&mc.alternate===null&&a(wt,ve),vt=w(mc,vt,an),Tn===null?Le=mc:Tn.sibling=mc,Tn=mc,ve=gn}if(kn.done)return l(wt,ve),dn&&fr(wt,an),Le;if(ve===null){for(;!kn.done;an++,kn=Et.next())kn=qt(wt,kn.value,It),kn!==null&&(vt=w(kn,vt,an),Tn===null?Le=kn:Tn.sibling=kn,Tn=kn);return dn&&fr(wt,an),Le}for(ve=m(ve);!kn.done;an++,kn=Et.next())kn=Pt(ve,wt,an,kn.value,It),kn!==null&&(s&&kn.alternate!==null&&ve.delete(kn.key===null?an:kn.key),vt=w(kn,vt,an),Tn===null?Le=kn:Tn.sibling=kn,Tn=kn);return s&&ve.forEach(function(DE){return a(wt,DE)}),dn&&fr(wt,an),Le}function $n(wt,vt,Et,It){if(typeof Et=="object"&&Et!==null&&Et.type===A&&Et.key===null&&(Et=Et.props.children),typeof Et=="object"&&Et!==null){switch(Et.$$typeof){case b:t:{for(var Le=Et.key;vt!==null;){if(vt.key===Le){if(Le=Et.type,Le===A){if(vt.tag===7){l(wt,vt.sibling),It=y(vt,Et.props.children),It.return=wt,wt=It;break t}}else if(vt.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===H&&At(Le)===vt.type){l(wt,vt.sibling),It=y(vt,Et.props),He(It,Et),It.return=wt,wt=It;break t}l(wt,vt);break}else a(wt,vt);vt=vt.sibling}Et.type===A?(It=jo(Et.props.children,wt.mode,It,Et.key),It.return=wt,wt=It):(It=Gl(Et.type,Et.key,Et.props,null,wt.mode,It),He(It,Et),It.return=wt,wt=It)}return k(wt);case _:t:{for(Le=Et.key;vt!==null;){if(vt.key===Le)if(vt.tag===4&&vt.stateNode.containerInfo===Et.containerInfo&&vt.stateNode.implementation===Et.implementation){l(wt,vt.sibling),It=y(vt,Et.children||[]),It.return=wt,wt=It;break t}else{l(wt,vt);break}else a(wt,vt);vt=vt.sibling}It=Yl(Et,wt.mode,It),It.return=wt,wt=It}return k(wt);case H:return Et=At(Et),$n(wt,vt,Et,It)}if(yt(Et))return ae(wt,vt,Et,It);if(Y(Et)){if(Le=Y(Et),typeof Le!="function")throw Error(i(150));return Et=Le.call(Et),Fe(wt,vt,Et,It)}if(typeof Et.then=="function")return $n(wt,vt,te(Et),It);if(Et.$$typeof===D)return $n(wt,vt,zu(wt,Et),It);re(wt,Et)}return typeof Et=="string"&&Et!==""||typeof Et=="number"||typeof Et=="bigint"?(Et=""+Et,vt!==null&&vt.tag===6?(l(wt,vt.sibling),It=y(vt,Et),It.return=wt,wt=It):(l(wt,vt),It=Vc(Et,wt.mode,It),It.return=wt,wt=It),k(wt)):l(wt,vt)}return function(wt,vt,Et,It){try{ce=0;var Le=$n(wt,vt,Et,It);return Vt=null,Le}catch(ve){if(ve===gt||ve===it)throw ve;var Tn=ws(29,ve,null,wt.mode);return Tn.lanes=It,Tn.return=wt,Tn}finally{}}}var Xn=hn(!0),Qe=hn(!1),ee=!1;function Kt(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function si(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Be(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function tn(s,a,l){var m=s.updateQueue;if(m===null)return null;if(m=m.shared,(Dn&2)!==0){var y=m.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),m.pending=a,a=xs(s),Uc(s,null,l),a}return Ic(s,m,a,l),xs(s)}function Pn(s,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194048)!==0)){var m=a.lanes;m&=s.pendingLanes,l|=m,a.lanes=l,Yn(s,l)}}function $i(s,a){var l=s.updateQueue,m=s.alternate;if(m!==null&&(m=m.updateQueue,l===m)){var y=null,w=null;if(l=l.firstBaseUpdate,l!==null){do{var k={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};w===null?y=w=k:w=w.next=k,l=l.next}while(l!==null);w===null?y=w=a:w=w.next=a}else y=w=a;l={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:m.shared,callbacks:m.callbacks},s.updateQueue=l;return}s=l.lastBaseUpdate,s===null?l.firstBaseUpdate=a:s.next=a,l.lastBaseUpdate=a}var ds=!1;function qn(){if(ds){var s=x;if(s!==null)throw s}}function Oi(s,a,l,m){ds=!1;var y=s.updateQueue;ee=!1;var w=y.firstBaseUpdate,k=y.lastBaseUpdate,V=y.shared.pending;if(V!==null){y.shared.pending=null;var mt=V,Mt=mt.next;mt.next=null,k===null?w=Mt:k.next=Mt,k=mt;var Bt=s.alternate;Bt!==null&&(Bt=Bt.updateQueue,V=Bt.lastBaseUpdate,V!==k&&(V===null?Bt.firstBaseUpdate=Mt:V.next=Mt,Bt.lastBaseUpdate=mt))}if(w!==null){var qt=y.baseState;k=0,Bt=Mt=mt=null,V=w;do{var kt=V.lane&-536870913,Pt=kt!==V.lane;if(Pt?(pn&kt)===kt:(m&kt)===kt){kt!==0&&kt===g&&(ds=!0),Bt!==null&&(Bt=Bt.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});t:{var ae=s,Fe=V;kt=a;var $n=l;switch(Fe.tag){case 1:if(ae=Fe.payload,typeof ae=="function"){qt=ae.call($n,qt,kt);break t}qt=ae;break t;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=Fe.payload,kt=typeof ae=="function"?ae.call($n,qt,kt):ae,kt==null)break t;qt=v({},qt,kt);break t;case 2:ee=!0}}kt=V.callback,kt!==null&&(s.flags|=64,Pt&&(s.flags|=8192),Pt=y.callbacks,Pt===null?y.callbacks=[kt]:Pt.push(kt))}else Pt={lane:kt,tag:V.tag,payload:V.payload,callback:V.callback,next:null},Bt===null?(Mt=Bt=Pt,mt=qt):Bt=Bt.next=Pt,k|=kt;if(V=V.next,V===null){if(V=y.shared.pending,V===null)break;Pt=V,V=Pt.next,Pt.next=null,y.lastBaseUpdate=Pt,y.shared.pending=null}}while(!0);Bt===null&&(mt=qt),y.baseState=mt,y.firstBaseUpdate=Mt,y.lastBaseUpdate=Bt,w===null&&(y.shared.lanes=0),sc|=k,s.lanes=k,s.memoizedState=qt}}function Ss(s,a){if(typeof s!="function")throw Error(i(191,s));s.call(a)}function zi(s,a){var l=s.callbacks;if(l!==null)for(s.callbacks=null,s=0;s<l.length;s++)Ss(l[s],a)}var ln=X(null),xn=X(0);function ri(s,a){s=Nl,q(xn,s),q(ln,a),Nl=s|a.baseLanes}function Cn(){q(xn,Nl),q(ln,ln.current)}function Gi(){Nl=xn.current,P(ln),P(xn)}var ai=X(null),wn=null;function _i(s){var a=s.alternate;q(bn,bn.current&1),q(ai,s),wn===null&&(a===null||ln.current!==null||a.memoizedState!==null)&&(wn=s)}function Rn(s){q(bn,bn.current),q(ai,s),wn===null&&(wn=s)}function Bi(s){s.tag===22?(q(bn,bn.current),q(ai,s),wn===null&&(wn=s)):Fi()}function Fi(){q(bn,bn.current),q(ai,ai.current)}function zn(s){P(ai),wn===s&&(wn=null),P(bn)}var bn=X(0);function Ns(s){for(var a=s;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Ag(l)||Cg(l)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var mi=0,Te=null,ke=null,Sn=null,Ks=!1,Or=!1,Ds=!1,Ii=0,Ro=0,Do=null,Fu=0;function Vn(){throw Error(i(321))}function od(s,a){if(a===null)return!1;for(var l=0;l<a.length&&l<s.length;l++)if(!os(s[l],a[l]))return!1;return!0}function ld(s,a,l,m,y,w){return mi=w,Te=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,J.H=s===null||s.memoizedState===null?Zy:D0,Ds=!1,w=l(m,y),Ds=!1,Or&&(w=eo(a,l,m,y)),Iu(s),w}function Iu(s){J.H=gd;var a=ke!==null&&ke.next!==null;if(mi=0,Sn=ke=Te=null,Ks=!1,Ro=0,Do=null,a)throw Error(i(300));s===null||ns||(s=s.dependencies,s!==null&&Ou(s)&&(ns=!0))}function eo(s,a,l,m){Te=s;var y=0;do{if(Or&&(Do=null),Ro=0,Or=!1,25<=y)throw Error(i(301));if(y+=1,Sn=ke=null,s.updateQueue!=null){var w=s.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}J.H=Jy,w=a(l,m)}while(Or);return w}function E0(){var s=J.H,a=s.useState()[0];return a=typeof a.then=="function"?Oo(a):a,s=s.useState()[0],(ke!==null?ke.memoizedState:null)!==s&&(Te.flags|=1024),a}function cd(){var s=Ii!==0;return Ii=0,s}function ud(s,a,l){a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~l}function Uu(s){if(Ks){for(s=s.memoizedState;s!==null;){var a=s.queue;a!==null&&(a.pending=null),s=s.next}Ks=!1}mi=0,Sn=ke=Te=null,Or=!1,Ro=Ii=0,Do=null}function es(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Sn===null?Te.memoizedState=Sn=s:Sn=Sn.next=s,Sn}function pi(){if(ke===null){var s=Te.alternate;s=s!==null?s.memoizedState:null}else s=ke.next;var a=Sn===null?Te.memoizedState:Sn.next;if(a!==null)Sn=a,ke=s;else{if(s===null)throw Te.alternate===null?Error(i(467)):Error(i(310));ke=s,s={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Sn===null?Te.memoizedState=Sn=s:Sn=Sn.next=s}return Sn}function Yc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(s){var a=Ro;return Ro+=1,Do===null&&(Do=[]),s=Ot(Do,s,a),a=Te,(Sn===null?a.memoizedState:Sn.next)===null&&(a=a.alternate,J.H=a===null||a.memoizedState===null?Zy:D0),s}function Zl(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Oo(s);if(s.$$typeof===D)return hs(s)}throw Error(i(438,String(s)))}function ml(s){var a=null,l=Te.updateQueue;if(l!==null&&(a=l.memoCache),a==null){var m=Te.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),l===null&&(l=Yc(),Te.updateQueue=l),l.memoCache=a,l=a.data[a.index],l===void 0)for(l=a.data[a.index]=Array(s),m=0;m<s;m++)l[m]=ct;return a.index++,l}function ka(s,a){return typeof a=="function"?a(s):a}function qu(s){var a=pi();return Jl(a,ke,s)}function Jl(s,a,l){var m=s.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=l;var y=s.baseQueue,w=m.pending;if(w!==null){if(y!==null){var k=y.next;y.next=w.next,w.next=k}a.baseQueue=y=w,m.pending=null}if(w=s.baseState,y===null)s.memoizedState=w;else{a=y.next;var V=k=null,mt=null,Mt=a,Bt=!1;do{var qt=Mt.lane&-536870913;if(qt!==Mt.lane?(pn&qt)===qt:(mi&qt)===qt){var kt=Mt.revertLane;if(kt===0)mt!==null&&(mt=mt.next={lane:0,revertLane:0,gesture:null,action:Mt.action,hasEagerState:Mt.hasEagerState,eagerState:Mt.eagerState,next:null}),qt===g&&(Bt=!0);else if((mi&kt)===kt){Mt=Mt.next,kt===g&&(Bt=!0);continue}else qt={lane:0,revertLane:Mt.revertLane,gesture:null,action:Mt.action,hasEagerState:Mt.hasEagerState,eagerState:Mt.eagerState,next:null},mt===null?(V=mt=qt,k=w):mt=mt.next=qt,Te.lanes|=kt,sc|=kt;qt=Mt.action,Ds&&l(w,qt),w=Mt.hasEagerState?Mt.eagerState:l(w,qt)}else kt={lane:qt,revertLane:Mt.revertLane,gesture:Mt.gesture,action:Mt.action,hasEagerState:Mt.hasEagerState,eagerState:Mt.eagerState,next:null},mt===null?(V=mt=kt,k=w):mt=mt.next=kt,Te.lanes|=qt,sc|=qt;Mt=Mt.next}while(Mt!==null&&Mt!==a);if(mt===null?k=w:mt.next=V,!os(w,s.memoizedState)&&(ns=!0,Bt&&(l=x,l!==null)))throw l;s.memoizedState=w,s.baseState=k,s.baseQueue=mt,m.lastRenderedState=w}return y===null&&(m.lanes=0),[s.memoizedState,m.dispatch]}function Vu(s){var a=pi(),l=a.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=s;var m=l.dispatch,y=l.pending,w=a.memoizedState;if(y!==null){l.pending=null;var k=y=y.next;do w=s(w,k.action),k=k.next;while(k!==y);os(w,a.memoizedState)||(ns=!0),a.memoizedState=w,a.baseQueue===null&&(a.baseState=w),l.lastRenderedState=w}return[w,m]}function Hu(s,a,l){var m=Te,y=pi(),w=dn;if(w){if(l===void 0)throw Error(i(407));l=l()}else l=a();var k=!os((ke||y).memoizedState,l);if(k&&(y.memoizedState=l,ns=!0),y=y.queue,M0(dd.bind(null,m,y,s),[s]),y.getSnapshot!==a||k||Sn!==null&&Sn.memoizedState.tag&1){if(m.flags|=2048,gl(9,{destroy:void 0},hd.bind(null,m,y,l,a),null),Qn===null)throw Error(i(349));w||(mi&127)!==0||no(m,a,l)}return l}function no(s,a,l){s.flags|=16384,s={getSnapshot:a,value:l},a=Te.updateQueue,a===null?(a=Yc(),Te.updateQueue=a,a.stores=[s]):(l=a.stores,l===null?a.stores=[s]:l.push(s))}function hd(s,a,l,m){a.value=l,a.getSnapshot=m,Vf(a)&&fd(s)}function dd(s,a,l){return l(function(){Vf(a)&&fd(s)})}function Vf(s){var a=s.getSnapshot;s=s.value;try{var l=a();return!os(s,l)}catch{return!0}}function fd(s){var a=Ja(s,2);a!==null&&Ur(a,s,2)}function zo(s){var a=es();if(typeof s=="function"){var l=s;if(s=l(),Ds){Re(!0);try{l()}finally{Re(!1)}}}return a.memoizedState=a.baseState=s,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:s},a}function Hf(s,a,l,m){return s.baseState=l,Jl(s,ke,typeof m=="function"?m:ka)}function $f(s,a,l,m,y){if(Kf(s))throw Error(i(485));if(s=a.action,s!==null){var w={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){w.listeners.push(k)}};J.T!==null?l(!0):w.isTransition=!1,m(w),l=a.pending,l===null?(w.next=a.pending=w,Gf(a,w)):(w.next=l.next,a.pending=l.next=w)}}function Gf(s,a){var l=a.action,m=a.payload,y=s.state;if(a.isTransition){var w=J.T,k={};J.T=k;try{var V=l(y,m),mt=J.S;mt!==null&&mt(k,V),md(s,a,V)}catch(Mt){pl(s,a,Mt)}finally{w!==null&&k.types!==null&&(w.types=k.types),J.T=w}}else try{w=l(y,m),md(s,a,w)}catch(Mt){pl(s,a,Mt)}}function md(s,a,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(m){Yf(s,a,m)},function(m){return pl(s,a,m)}):Yf(s,a,l)}function Yf(s,a,l){a.status="fulfilled",a.value=l,$u(a),s.state=l,a=s.pending,a!==null&&(l=a.next,l===a?s.pending=null:(l=l.next,a.next=l,Gf(s,l)))}function pl(s,a,l){var m=s.pending;if(s.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=l,$u(a),a=a.next;while(a!==m)}s.action=null}function $u(s){s=s.listeners;for(var a=0;a<s.length;a++)(0,s[a])()}function Wc(s,a){return a}function La(s,a){if(dn){var l=Qn.formState;if(l!==null){t:{var m=Te;if(dn){if(Kn){e:{for(var y=Kn,w=fi;y.nodeType!==8;){if(!w){y=null;break e}if(y=Pa(y.nextSibling),y===null){y=null;break e}}w=y.data,y=w==="F!"||w==="F"?y:null}if(y){Kn=Pa(y.nextSibling),m=y.data==="F!";break t}}Mo(m)}m=!1}m&&(a=l[0])}}return l=es(),l.memoizedState=l.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wc,lastRenderedState:a},l.queue=m,l=Ky.bind(null,Te,m),m.dispatch=l,m=zo(!1),w=R0.bind(null,Te,!1,m.queue),m=es(),y={state:a,dispatch:null,action:s,pending:null},m.queue=y,l=$f.bind(null,Te,y,w,l),y.dispatch=l,m.memoizedState=s,[a,l,!1]}function io(s){var a=pi();return so(a,ke,s)}function so(s,a,l){if(a=Jl(s,a,Wc)[0],s=qu(ka)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Oo(a)}catch(k){throw k===gt?it:k}else m=a;a=pi();var y=a.queue,w=y.dispatch;return l!==a.memoizedState&&(Te.flags|=2048,gl(9,{destroy:void 0},Gu.bind(null,y,l),null)),[m,w,s]}function Gu(s,a){s.action=a}function Yu(s){var a=pi(),l=ke;if(l!==null)return so(a,l,s);pi(),a=a.memoizedState,l=pi();var m=l.queue.dispatch;return l.memoizedState=s,[a,m,!1]}function gl(s,a,l,m){return s={tag:s,create:l,deps:m,inst:a,next:null},a=Te.updateQueue,a===null&&(a=Yc(),Te.updateQueue=a),l=a.lastEffect,l===null?a.lastEffect=s.next=s:(m=l.next,l.next=s,s.next=m,a.lastEffect=s),s}function Wf(){return pi().memoizedState}function tc(s,a,l,m){var y=es();Te.flags|=s,y.memoizedState=gl(1|a,{destroy:void 0},l,m===void 0?null:m)}function ec(s,a,l,m){var y=pi();m=m===void 0?null:m;var w=y.memoizedState.inst;ke!==null&&m!==null&&od(m,ke.memoizedState.deps)?y.memoizedState=gl(a,w,l,m):(Te.flags|=s,y.memoizedState=gl(1|a,w,l,m))}function Dy(s,a){tc(8390656,8,s,a)}function M0(s,a){ec(2048,8,s,a)}function Mj(s){Te.flags|=4;var a=Te.updateQueue;if(a===null)a=Yc(),Te.updateQueue=a,a.events=[s];else{var l=a.events;l===null?a.events=[s]:l.push(s)}}function Oy(s){var a=pi().memoizedState;return Mj({ref:a,nextImpl:s}),function(){if((Dn&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function zy(s,a){return ec(4,2,s,a)}function By(s,a){return ec(4,4,s,a)}function Fy(s,a){if(typeof a=="function"){s=s();var l=a(s);return function(){typeof l=="function"?l():a(null)}}if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function Iy(s,a,l){l=l!=null?l.concat([s]):null,ec(4,4,Fy.bind(null,a,s),l)}function T0(){}function Uy(s,a){var l=pi();a=a===void 0?null:a;var m=l.memoizedState;return a!==null&&od(a,m[1])?m[0]:(l.memoizedState=[s,a],s)}function qy(s,a){var l=pi();a=a===void 0?null:a;var m=l.memoizedState;if(a!==null&&od(a,m[1]))return m[0];if(m=s(),Ds){Re(!0);try{s()}finally{Re(!1)}}return l.memoizedState=[m,a],m}function k0(s,a,l){return l===void 0||(mi&1073741824)!==0&&(pn&261930)===0?s.memoizedState=a:(s.memoizedState=l,s=Vb(),Te.lanes|=s,sc|=s,l)}function Vy(s,a,l,m){return os(l,a)?l:ln.current!==null?(s=k0(s,l,m),os(s,a)||(ns=!0),s):(mi&42)===0||(mi&1073741824)!==0&&(pn&261930)===0?(ns=!0,s.memoizedState=l):(s=Vb(),Te.lanes|=s,sc|=s,a)}function Hy(s,a,l,m,y){var w=at.p;at.p=w!==0&&8>w?w:8;var k=J.T,V={};J.T=V,R0(s,!1,a,l);try{var mt=y(),Mt=J.S;if(Mt!==null&&Mt(V,mt),mt!==null&&typeof mt=="object"&&typeof mt.then=="function"){var Bt=B(mt,m);pd(s,a,Bt,oa(s))}else pd(s,a,m,oa(s))}catch(qt){pd(s,a,{then:function(){},status:"rejected",reason:qt},oa())}finally{at.p=w,k!==null&&V.types!==null&&(k.types=V.types),J.T=k}}function Tj(){}function L0(s,a,l,m){if(s.tag!==5)throw Error(i(476));var y=$y(s).queue;Hy(s,y,a,K,l===null?Tj:function(){return Gy(s),l(m)})}function $y(s){var a=s.memoizedState;if(a!==null)return a;a={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:K},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:l},next:null},s.memoizedState=a,s=s.alternate,s!==null&&(s.memoizedState=a),a}function Gy(s){var a=$y(s);a.next===null&&(a=s.alternate.memoizedState),pd(s,a.next.queue,{},oa())}function P0(){return hs(Ld)}function Yy(){return pi().memoizedState}function Wy(){return pi().memoizedState}function kj(s){for(var a=s.return;a!==null;){switch(a.tag){case 24:case 3:var l=oa();s=Be(l);var m=tn(a,s,l);m!==null&&(Ur(m,a,l),Pn(m,a,l)),a={cache:Ql()},s.payload=a;return}a=a.return}}function Lj(s,a,l){var m=oa();l={lane:m,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Kf(s)?Xy(a,l):(l=Eu(s,a,l,m),l!==null&&(Ur(l,s,m),Qy(l,a,m)))}function Ky(s,a,l){var m=oa();pd(s,a,l,m)}function pd(s,a,l,m){var y={lane:m,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Kf(s))Xy(a,y);else{var w=s.alternate;if(s.lanes===0&&(w===null||w.lanes===0)&&(w=a.lastRenderedReducer,w!==null))try{var k=a.lastRenderedState,V=w(k,l);if(y.hasEagerState=!0,y.eagerState=V,os(V,k))return Ic(s,a,y,0),Qn===null&&Fc(),!1}catch{}finally{}if(l=Eu(s,a,y,m),l!==null)return Ur(l,s,m),Qy(l,a,m),!0}return!1}function R0(s,a,l,m){if(m={lane:2,revertLane:dg(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Kf(s)){if(a)throw Error(i(479))}else a=Eu(s,l,m,2),a!==null&&Ur(a,s,2)}function Kf(s){var a=s.alternate;return s===Te||a!==null&&a===Te}function Xy(s,a){Or=Ks=!0;var l=s.pending;l===null?a.next=a:(a.next=l.next,l.next=a),s.pending=a}function Qy(s,a,l){if((l&4194048)!==0){var m=a.lanes;m&=s.pendingLanes,l|=m,a.lanes=l,Yn(s,l)}}var gd={readContext:hs,use:Zl,useCallback:Vn,useContext:Vn,useEffect:Vn,useImperativeHandle:Vn,useLayoutEffect:Vn,useInsertionEffect:Vn,useMemo:Vn,useReducer:Vn,useRef:Vn,useState:Vn,useDebugValue:Vn,useDeferredValue:Vn,useTransition:Vn,useSyncExternalStore:Vn,useId:Vn,useHostTransitionStatus:Vn,useFormState:Vn,useActionState:Vn,useOptimistic:Vn,useMemoCache:Vn,useCacheRefresh:Vn};gd.useEffectEvent=Vn;var Zy={readContext:hs,use:Zl,useCallback:function(s,a){return es().memoizedState=[s,a===void 0?null:a],s},useContext:hs,useEffect:Dy,useImperativeHandle:function(s,a,l){l=l!=null?l.concat([s]):null,tc(4194308,4,Fy.bind(null,a,s),l)},useLayoutEffect:function(s,a){return tc(4194308,4,s,a)},useInsertionEffect:function(s,a){tc(4,2,s,a)},useMemo:function(s,a){var l=es();a=a===void 0?null:a;var m=s();if(Ds){Re(!0);try{s()}finally{Re(!1)}}return l.memoizedState=[m,a],m},useReducer:function(s,a,l){var m=es();if(l!==void 0){var y=l(a);if(Ds){Re(!0);try{l(a)}finally{Re(!1)}}}else y=a;return m.memoizedState=m.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},m.queue=s,s=s.dispatch=Lj.bind(null,Te,s),[m.memoizedState,s]},useRef:function(s){var a=es();return s={current:s},a.memoizedState=s},useState:function(s){s=zo(s);var a=s.queue,l=Ky.bind(null,Te,a);return a.dispatch=l,[s.memoizedState,l]},useDebugValue:T0,useDeferredValue:function(s,a){var l=es();return k0(l,s,a)},useTransition:function(){var s=zo(!1);return s=Hy.bind(null,Te,s.queue,!0,!1),es().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,a,l){var m=Te,y=es();if(dn){if(l===void 0)throw Error(i(407));l=l()}else{if(l=a(),Qn===null)throw Error(i(349));(pn&127)!==0||no(m,a,l)}y.memoizedState=l;var w={value:l,getSnapshot:a};return y.queue=w,Dy(dd.bind(null,m,w,s),[s]),m.flags|=2048,gl(9,{destroy:void 0},hd.bind(null,m,w,l,a),null),l},useId:function(){var s=es(),a=Qn.identifierPrefix;if(dn){var l=Rr,m=Pr;l=(m&~(1<<32-rn(m)-1)).toString(32)+l,a="_"+a+"R_"+l,l=Ii++,0<l&&(a+="H"+l.toString(32)),a+="_"}else l=Fu++,a="_"+a+"r_"+l.toString(32)+"_";return s.memoizedState=a},useHostTransitionStatus:P0,useFormState:La,useActionState:La,useOptimistic:function(s){var a=es();a.memoizedState=a.baseState=s;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=l,a=R0.bind(null,Te,!0,l),l.dispatch=a,[s,a]},useMemoCache:ml,useCacheRefresh:function(){return es().memoizedState=kj.bind(null,Te)},useEffectEvent:function(s){var a=es(),l={impl:s};return a.memoizedState=l,function(){if((Dn&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},D0={readContext:hs,use:Zl,useCallback:Uy,useContext:hs,useEffect:M0,useImperativeHandle:Iy,useInsertionEffect:zy,useLayoutEffect:By,useMemo:qy,useReducer:qu,useRef:Wf,useState:function(){return qu(ka)},useDebugValue:T0,useDeferredValue:function(s,a){var l=pi();return Vy(l,ke.memoizedState,s,a)},useTransition:function(){var s=qu(ka)[0],a=pi().memoizedState;return[typeof s=="boolean"?s:Oo(s),a]},useSyncExternalStore:Hu,useId:Yy,useHostTransitionStatus:P0,useFormState:io,useActionState:io,useOptimistic:function(s,a){var l=pi();return Hf(l,ke,s,a)},useMemoCache:ml,useCacheRefresh:Wy};D0.useEffectEvent=Oy;var Jy={readContext:hs,use:Zl,useCallback:Uy,useContext:hs,useEffect:M0,useImperativeHandle:Iy,useInsertionEffect:zy,useLayoutEffect:By,useMemo:qy,useReducer:Vu,useRef:Wf,useState:function(){return Vu(ka)},useDebugValue:T0,useDeferredValue:function(s,a){var l=pi();return ke===null?k0(l,s,a):Vy(l,ke.memoizedState,s,a)},useTransition:function(){var s=Vu(ka)[0],a=pi().memoizedState;return[typeof s=="boolean"?s:Oo(s),a]},useSyncExternalStore:Hu,useId:Yy,useHostTransitionStatus:P0,useFormState:Yu,useActionState:Yu,useOptimistic:function(s,a){var l=pi();return ke!==null?Hf(l,ke,s,a):(l.baseState=s,[s,l.queue.dispatch])},useMemoCache:ml,useCacheRefresh:Wy};Jy.useEffectEvent=Oy;function O0(s,a,l,m){a=s.memoizedState,l=l(m,a),l=l==null?a:v({},a,l),s.memoizedState=l,s.lanes===0&&(s.updateQueue.baseState=l)}var z0={enqueueSetState:function(s,a,l){s=s._reactInternals;var m=oa(),y=Be(m);y.payload=a,l!=null&&(y.callback=l),a=tn(s,y,m),a!==null&&(Ur(a,s,m),Pn(a,s,m))},enqueueReplaceState:function(s,a,l){s=s._reactInternals;var m=oa(),y=Be(m);y.tag=1,y.payload=a,l!=null&&(y.callback=l),a=tn(s,y,m),a!==null&&(Ur(a,s,m),Pn(a,s,m))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var l=oa(),m=Be(l);m.tag=2,a!=null&&(m.callback=a),a=tn(s,m,l),a!==null&&(Ur(a,s,l),Pn(a,s,l))}};function tb(s,a,l,m,y,w,k){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(m,w,k):a.prototype&&a.prototype.isPureReactComponent?!Ka(l,m)||!Ka(y,w):!0}function eb(s,a,l,m){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,m),a.state!==s&&z0.enqueueReplaceState(a,a.state,null)}function Kc(s,a){var l=a;if("ref"in a){l={};for(var m in a)m!=="ref"&&(l[m]=a[m])}if(s=s.defaultProps){l===a&&(l=v({},l));for(var y in s)l[y]===void 0&&(l[y]=s[y])}return l}function nb(s){Bc(s)}function ib(s){console.error(s)}function sb(s){Bc(s)}function Xf(s,a){try{var l=s.onUncaughtError;l(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function rb(s,a,l){try{var m=s.onCaughtError;m(l.value,{componentStack:l.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function B0(s,a,l){return l=Be(l),l.tag=3,l.payload={element:null},l.callback=function(){Xf(s,a)},l}function ab(s){return s=Be(s),s.tag=3,s}function ob(s,a,l,m){var y=l.type.getDerivedStateFromError;if(typeof y=="function"){var w=m.value;s.payload=function(){return y(w)},s.callback=function(){rb(a,l,m)}}var k=l.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(s.callback=function(){rb(a,l,m),typeof y!="function"&&(rc===null?rc=new Set([this]):rc.add(this));var V=m.stack;this.componentDidCatch(m.value,{componentStack:V!==null?V:""})})}function Pj(s,a,l,m,y){if(l.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=l.alternate,a!==null&&Lo(a,l,y,!0),l=ai.current,l!==null){switch(l.tag){case 31:case 13:return wn===null?lm():l.alternate===null&&Ui===0&&(Ui=3),l.flags&=-257,l.flags|=65536,l.lanes=y,m===bt?l.flags|=16384:(a=l.updateQueue,a===null?l.updateQueue=new Set([m]):a.add(m),cg(s,m,y)),!1;case 22:return l.flags|=65536,m===bt?l.flags|=16384:(a=l.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},l.updateQueue=a):(l=a.retryQueue,l===null?a.retryQueue=new Set([m]):l.add(m)),cg(s,m,y)),!1}throw Error(i(435,l.tag))}return cg(s,m,y),lm(),!1}if(dn)return a=ai.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,m!==sa&&(s=Error(i(422),{cause:m}),Kl(Tr(s,l)))):(m!==sa&&(a=Error(i(423),{cause:m}),Kl(Tr(a,l))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,m=Tr(m,l),y=B0(s.stateNode,m,y),$i(s,y),Ui!==4&&(Ui=2)),!1;var w=Error(i(520),{cause:m});if(w=Tr(w,l),Ad===null?Ad=[w]:Ad.push(w),Ui!==4&&(Ui=2),a===null)return!0;m=Tr(m,l),l=a;do{switch(l.tag){case 3:return l.flags|=65536,s=y&-y,l.lanes|=s,s=B0(l.stateNode,m,s),$i(l,s),!1;case 1:if(a=l.type,w=l.stateNode,(l.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(rc===null||!rc.has(w))))return l.flags|=65536,y&=-y,l.lanes|=y,y=ab(y),ob(y,s,l,m),$i(l,y),!1}l=l.return}while(l!==null);return!1}var F0=Error(i(461)),ns=!1;function Os(s,a,l,m){a.child=s===null?Qe(a,null,l,m):Xn(a,s.child,l,m)}function lb(s,a,l,m,y){l=l.render;var w=a.ref;if("ref"in m){var k={};for(var V in m)V!=="ref"&&(k[V]=m[V])}else k=m;return Po(a),m=ld(s,a,l,k,w,y),V=cd(),s!==null&&!ns?(ud(s,a,y),vl(s,a,y)):(dn&&V&&sd(a),a.flags|=1,Os(s,a,m,y),a.child)}function cb(s,a,l,m,y){if(s===null){var w=l.type;return typeof w=="function"&&!Tu(w)&&w.defaultProps===void 0&&l.compare===null?(a.tag=15,a.type=w,ub(s,a,w,m,y)):(s=Gl(l.type,null,m,a,a.mode,y),s.ref=a.ref,s.return=a,a.child=s)}if(w=s.child,!Y0(s,y)){var k=w.memoizedProps;if(l=l.compare,l=l!==null?l:Ka,l(k,m)&&s.ref===a.ref)return vl(s,a,y)}return a.flags|=1,s=Mr(w,m),s.ref=a.ref,s.return=a,a.child=s}function ub(s,a,l,m,y){if(s!==null){var w=s.memoizedProps;if(Ka(w,m)&&s.ref===a.ref)if(ns=!1,a.pendingProps=m=w,Y0(s,y))(s.flags&131072)!==0&&(ns=!0);else return a.lanes=s.lanes,vl(s,a,y)}return I0(s,a,l,m,y)}function hb(s,a,l,m){var y=m.children,w=s!==null?s.memoizedState:null;if(s===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(w=w!==null?w.baseLanes|l:l,s!==null){for(m=a.child=s.child,y=0;m!==null;)y=y|m.lanes|m.childLanes,m=m.sibling;m=y&~w}else m=0,a.child=null;return db(s,a,w,l,m)}if((l&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},s!==null&&Z(a,w!==null?w.cachePool:null),w!==null?ri(a,w):Cn(),Bi(a);else return m=a.lanes=536870912,db(s,a,w!==null?w.baseLanes|l:l,l,m)}else w!==null?(Z(a,w.cachePool),ri(a,w),Fi(),a.memoizedState=null):(s!==null&&Z(a,null),Cn(),Fi());return Os(s,a,y,l),a.child}function vd(s,a){return s!==null&&s.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function db(s,a,l,m,y){var w=G();return w=w===null?null:{parent:Ci._currentValue,pool:w},a.memoizedState={baseLanes:l,cachePool:w},s!==null&&Z(a,null),Cn(),Bi(a),s!==null&&Lo(s,a,m,!0),a.childLanes=y,null}function Qf(s,a){return a=Jf({mode:a.mode,children:a.children},s.mode),a.ref=s.ref,s.child=a,a.return=s,a}function fb(s,a,l){return Xn(a,s.child,null,l),s=Qf(a,a.pendingProps),s.flags|=2,zn(a),a.memoizedState=null,s}function Rj(s,a,l){var m=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,s===null){if(dn){if(m.mode==="hidden")return s=Qf(a,m),a.lanes=536870912,vd(null,s);if(Rn(a),(s=Kn)?(s=Cx(s,fi),s=s!==null&&s.data==="&"?s:null,s!==null&&(a.memoizedState={dehydrated:s,treeContext:Eo!==null?{id:Pr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},l=ku(s),l.return=a,a.child=l,cs=a,Kn=null)):s=null,s===null)throw Mo(a);return a.lanes=536870912,null}return Qf(a,m)}var w=s.memoizedState;if(w!==null){var k=w.dehydrated;if(Rn(a),y)if(a.flags&256)a.flags&=-257,a=fb(s,a,l);else if(a.memoizedState!==null)a.child=s.child,a.flags|=128,a=null;else throw Error(i(558));else if(ns||Lo(s,a,l,!1),y=(l&s.childLanes)!==0,ns||y){if(m=Qn,m!==null&&(k=_s(m,l),k!==0&&k!==w.retryLane))throw w.retryLane=k,Ja(s,k),Ur(m,s,k),F0;lm(),a=fb(s,a,l)}else s=w.treeContext,Kn=Pa(k.nextSibling),cs=a,dn=!0,Rs=null,fi=!1,s!==null&&Uf(a,s),a=Qf(a,m),a.flags|=4096;return a}return s=Mr(s.child,{mode:m.mode,children:m.children}),s.ref=a.ref,a.child=s,s.return=a,s}function Zf(s,a){var l=a.ref;if(l===null)s!==null&&s.ref!==null&&(a.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(s===null||s.ref!==l)&&(a.flags|=4194816)}}function I0(s,a,l,m,y){return Po(a),l=ld(s,a,l,m,void 0,y),m=cd(),s!==null&&!ns?(ud(s,a,y),vl(s,a,y)):(dn&&m&&sd(a),a.flags|=1,Os(s,a,l,y),a.child)}function mb(s,a,l,m,y,w){return Po(a),a.updateQueue=null,l=eo(a,m,l,y),Iu(s),m=cd(),s!==null&&!ns?(ud(s,a,w),vl(s,a,w)):(dn&&m&&sd(a),a.flags|=1,Os(s,a,l,w),a.child)}function pb(s,a,l,m,y){if(Po(a),a.stateNode===null){var w=ls,k=l.contextType;typeof k=="object"&&k!==null&&(w=hs(k)),w=new l(m,w),a.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=z0,a.stateNode=w,w._reactInternals=a,w=a.stateNode,w.props=m,w.state=a.memoizedState,w.refs={},Kt(a),k=l.contextType,w.context=typeof k=="object"&&k!==null?hs(k):ls,w.state=a.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(O0(a,l,k,m),w.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(k=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),k!==w.state&&z0.enqueueReplaceState(w,w.state,null),Oi(a,m,w,y),qn(),w.state=a.memoizedState),typeof w.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(s===null){w=a.stateNode;var V=a.memoizedProps,mt=Kc(l,V);w.props=mt;var Mt=w.context,Bt=l.contextType;k=ls,typeof Bt=="object"&&Bt!==null&&(k=hs(Bt));var qt=l.getDerivedStateFromProps;Bt=typeof qt=="function"||typeof w.getSnapshotBeforeUpdate=="function",V=a.pendingProps!==V,Bt||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(V||Mt!==k)&&eb(a,w,m,k),ee=!1;var kt=a.memoizedState;w.state=kt,Oi(a,m,w,y),qn(),Mt=a.memoizedState,V||kt!==Mt||ee?(typeof qt=="function"&&(O0(a,l,qt,m),Mt=a.memoizedState),(mt=ee||tb(a,l,mt,m,kt,Mt,k))?(Bt||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(a.flags|=4194308)):(typeof w.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=Mt),w.props=m,w.state=Mt,w.context=k,m=mt):(typeof w.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{w=a.stateNode,si(s,a),k=a.memoizedProps,Bt=Kc(l,k),w.props=Bt,qt=a.pendingProps,kt=w.context,Mt=l.contextType,mt=ls,typeof Mt=="object"&&Mt!==null&&(mt=hs(Mt)),V=l.getDerivedStateFromProps,(Mt=typeof V=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(k!==qt||kt!==mt)&&eb(a,w,m,mt),ee=!1,kt=a.memoizedState,w.state=kt,Oi(a,m,w,y),qn();var Pt=a.memoizedState;k!==qt||kt!==Pt||ee||s!==null&&s.dependencies!==null&&Ou(s.dependencies)?(typeof V=="function"&&(O0(a,l,V,m),Pt=a.memoizedState),(Bt=ee||tb(a,l,Bt,m,kt,Pt,mt)||s!==null&&s.dependencies!==null&&Ou(s.dependencies))?(Mt||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(m,Pt,mt),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(m,Pt,mt)),typeof w.componentDidUpdate=="function"&&(a.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof w.componentDidUpdate!="function"||k===s.memoizedProps&&kt===s.memoizedState||(a.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||k===s.memoizedProps&&kt===s.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Pt),w.props=m,w.state=Pt,w.context=mt,m=Bt):(typeof w.componentDidUpdate!="function"||k===s.memoizedProps&&kt===s.memoizedState||(a.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||k===s.memoizedProps&&kt===s.memoizedState||(a.flags|=1024),m=!1)}return w=m,Zf(s,a),m=(a.flags&128)!==0,w||m?(w=a.stateNode,l=m&&typeof l.getDerivedStateFromError!="function"?null:w.render(),a.flags|=1,s!==null&&m?(a.child=Xn(a,s.child,null,y),a.child=Xn(a,null,l,y)):Os(s,a,l,y),a.memoizedState=w.state,s=a.child):s=vl(s,a,y),s}function gb(s,a,l,m){return dl(),a.flags|=256,Os(s,a,l,m),a.child}var U0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function q0(s){return{baseLanes:s,cachePool:rt()}}function V0(s,a,l){return s=s!==null?s.childLanes&~l:0,a&&(s|=aa),s}function vb(s,a,l){var m=a.pendingProps,y=!1,w=(a.flags&128)!==0,k;if((k=w)||(k=s!==null&&s.memoizedState===null?!1:(bn.current&2)!==0),k&&(y=!0,a.flags&=-129),k=(a.flags&32)!==0,a.flags&=-33,s===null){if(dn){if(y?_i(a):Fi(),(s=Kn)?(s=Cx(s,fi),s=s!==null&&s.data!=="&"?s:null,s!==null&&(a.memoizedState={dehydrated:s,treeContext:Eo!==null?{id:Pr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},l=ku(s),l.return=a,a.child=l,cs=a,Kn=null)):s=null,s===null)throw Mo(a);return Cg(s)?a.lanes=32:a.lanes=536870912,null}var V=m.children;return m=m.fallback,y?(Fi(),y=a.mode,V=Jf({mode:"hidden",children:V},y),m=jo(m,y,l,null),V.return=a,m.return=a,V.sibling=m,a.child=V,m=a.child,m.memoizedState=q0(l),m.childLanes=V0(s,k,l),a.memoizedState=U0,vd(null,m)):(_i(a),H0(a,V))}var mt=s.memoizedState;if(mt!==null&&(V=mt.dehydrated,V!==null)){if(w)a.flags&256?(_i(a),a.flags&=-257,a=$0(s,a,l)):a.memoizedState!==null?(Fi(),a.child=s.child,a.flags|=128,a=null):(Fi(),V=m.fallback,y=a.mode,m=Jf({mode:"visible",children:m.children},y),V=jo(V,y,l,null),V.flags|=2,m.return=a,V.return=a,m.sibling=V,a.child=m,Xn(a,s.child,null,l),m=a.child,m.memoizedState=q0(l),m.childLanes=V0(s,k,l),a.memoizedState=U0,a=vd(null,m));else if(_i(a),Cg(V)){if(k=V.nextSibling&&V.nextSibling.dataset,k)var Mt=k.dgst;k=Mt,m=Error(i(419)),m.stack="",m.digest=k,Kl({value:m,source:null,stack:null}),a=$0(s,a,l)}else if(ns||Lo(s,a,l,!1),k=(l&s.childLanes)!==0,ns||k){if(k=Qn,k!==null&&(m=_s(k,l),m!==0&&m!==mt.retryLane))throw mt.retryLane=m,Ja(s,m),Ur(k,s,m),F0;Ag(V)||lm(),a=$0(s,a,l)}else Ag(V)?(a.flags|=192,a.child=s.child,a=null):(s=mt.treeContext,Kn=Pa(V.nextSibling),cs=a,dn=!0,Rs=null,fi=!1,s!==null&&Uf(a,s),a=H0(a,m.children),a.flags|=4096);return a}return y?(Fi(),V=m.fallback,y=a.mode,mt=s.child,Mt=mt.sibling,m=Mr(mt,{mode:"hidden",children:m.children}),m.subtreeFlags=mt.subtreeFlags&65011712,Mt!==null?V=Mr(Mt,V):(V=jo(V,y,l,null),V.flags|=2),V.return=a,m.return=a,m.sibling=V,a.child=m,vd(null,m),m=a.child,V=s.child.memoizedState,V===null?V=q0(l):(y=V.cachePool,y!==null?(mt=Ci._currentValue,y=y.parent!==mt?{parent:mt,pool:mt}:y):y=rt(),V={baseLanes:V.baseLanes|l,cachePool:y}),m.memoizedState=V,m.childLanes=V0(s,k,l),a.memoizedState=U0,vd(s.child,m)):(_i(a),l=s.child,s=l.sibling,l=Mr(l,{mode:"visible",children:m.children}),l.return=a,l.sibling=null,s!==null&&(k=a.deletions,k===null?(a.deletions=[s],a.flags|=16):k.push(s)),a.child=l,a.memoizedState=null,l)}function H0(s,a){return a=Jf({mode:"visible",children:a},s.mode),a.return=s,s.child=a}function Jf(s,a){return s=ws(22,s,null,a),s.lanes=0,s}function $0(s,a,l){return Xn(a,s.child,null,l),s=H0(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function yb(s,a,l){s.lanes|=a;var m=s.alternate;m!==null&&(m.lanes|=a),Xl(s.return,a,l)}function G0(s,a,l,m,y,w){var k=s.memoizedState;k===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:l,tailMode:y,treeForkCount:w}:(k.isBackwards=a,k.rendering=null,k.renderingStartTime=0,k.last=m,k.tail=l,k.tailMode=y,k.treeForkCount=w)}function bb(s,a,l){var m=a.pendingProps,y=m.revealOrder,w=m.tail;m=m.children;var k=bn.current,V=(k&2)!==0;if(V?(k=k&1|2,a.flags|=128):k&=1,q(bn,k),Os(s,a,m,l),m=dn?Hc:0,!V&&s!==null&&(s.flags&128)!==0)t:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&yb(s,l,a);else if(s.tag===19)yb(s,l,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break t;for(;s.sibling===null;){if(s.return===null||s.return===a)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(l=a.child,y=null;l!==null;)s=l.alternate,s!==null&&Ns(s)===null&&(y=l),l=l.sibling;l=y,l===null?(y=a.child,a.child=null):(y=l.sibling,l.sibling=null),G0(a,!1,y,l,w,m);break;case"backwards":case"unstable_legacy-backwards":for(l=null,y=a.child,a.child=null;y!==null;){if(s=y.alternate,s!==null&&Ns(s)===null){a.child=y;break}s=y.sibling,y.sibling=l,l=y,y=s}G0(a,!0,l,null,w,m);break;case"together":G0(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function vl(s,a,l){if(s!==null&&(a.dependencies=s.dependencies),sc|=a.lanes,(l&a.childLanes)===0)if(s!==null){if(Lo(s,a,l,!1),(l&a.childLanes)===0)return null}else return null;if(s!==null&&a.child!==s.child)throw Error(i(153));if(a.child!==null){for(s=a.child,l=Mr(s,s.pendingProps),a.child=l,l.return=a;s.sibling!==null;)s=s.sibling,l=l.sibling=Mr(s,s.pendingProps),l.return=a;l.sibling=null}return a.child}function Y0(s,a){return(s.lanes&a)!==0?!0:(s=s.dependencies,!!(s!==null&&Ou(s)))}function Dj(s,a,l){switch(a.tag){case 3:Ct(a,a.stateNode.containerInfo),ko(a,Ci,s.memoizedState.cache),dl();break;case 27:case 5:Dt(a);break;case 4:Ct(a,a.stateNode.containerInfo);break;case 10:ko(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Rn(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(_i(a),a.flags|=128,null):(l&a.child.childLanes)!==0?vb(s,a,l):(_i(a),s=vl(s,a,l),s!==null?s.sibling:null);_i(a);break;case 19:var y=(s.flags&128)!==0;if(m=(l&a.childLanes)!==0,m||(Lo(s,a,l,!1),m=(l&a.childLanes)!==0),y){if(m)return bb(s,a,l);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),q(bn,bn.current),m)break;return null;case 22:return a.lanes=0,hb(s,a,l,a.pendingProps);case 24:ko(a,Ci,s.memoizedState.cache)}return vl(s,a,l)}function xb(s,a,l){if(s!==null)if(s.memoizedProps!==a.pendingProps)ns=!0;else{if(!Y0(s,l)&&(a.flags&128)===0)return ns=!1,Dj(s,a,l);ns=(s.flags&131072)!==0}else ns=!1,dn&&(a.flags&1048576)!==0&&If(a,Hc,a.index);switch(a.lanes=0,a.tag){case 16:t:{var m=a.pendingProps;if(s=At(a.elementType),a.type=s,typeof s=="function")Tu(s)?(m=Kc(s,m),a.tag=1,a=pb(null,a,s,m,l)):(a.tag=0,a=I0(null,a,s,m,l));else{if(s!=null){var y=s.$$typeof;if(y===z){a.tag=11,a=lb(null,a,s,m,l);break t}else if(y===nt){a.tag=14,a=cb(null,a,s,m,l);break t}}throw a=tt(s)||s,Error(i(306,a,""))}}return a;case 0:return I0(s,a,a.type,a.pendingProps,l);case 1:return m=a.type,y=Kc(m,a.pendingProps),pb(s,a,m,y,l);case 3:t:{if(Ct(a,a.stateNode.containerInfo),s===null)throw Error(i(387));m=a.pendingProps;var w=a.memoizedState;y=w.element,si(s,a),Oi(a,m,null,l);var k=a.memoizedState;if(m=k.cache,ko(a,Ci,m),m!==w.cache&&fl(a,[Ci],l,!0),qn(),m=k.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:k.cache},a.updateQueue.baseState=w,a.memoizedState=w,a.flags&256){a=gb(s,a,m,l);break t}else if(m!==y){y=Tr(Error(i(424)),a),Kl(y),a=gb(s,a,m,l);break t}else{switch(s=a.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Kn=Pa(s.firstChild),cs=a,dn=!0,Rs=null,fi=!0,l=Qe(a,null,m,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(dl(),m===y){a=vl(s,a,l);break t}Os(s,a,m,l)}a=a.child}return a;case 26:return Zf(s,a),s===null?(l=kx(a.type,null,a.pendingProps,null))?a.memoizedState=l:dn||(l=a.type,s=a.pendingProps,m=pm(ht.current).createElement(l),m[jn]=a,m[En]=s,zs(m,l,s),ei(m),a.stateNode=m):a.memoizedState=kx(a.type,s.memoizedProps,a.pendingProps,s.memoizedState),null;case 27:return Dt(a),s===null&&dn&&(m=a.stateNode=Ex(a.type,a.pendingProps,ht.current),cs=a,fi=!0,y=Kn,cc(a.type)?(_g=y,Kn=Pa(m.firstChild)):Kn=y),Os(s,a,a.pendingProps.children,l),Zf(s,a),s===null&&(a.flags|=4194304),a.child;case 5:return s===null&&dn&&((y=m=Kn)&&(m=hE(m,a.type,a.pendingProps,fi),m!==null?(a.stateNode=m,cs=a,Kn=Pa(m.firstChild),fi=!1,y=!0):y=!1),y||Mo(a)),Dt(a),y=a.type,w=a.pendingProps,k=s!==null?s.memoizedProps:null,m=w.children,wg(y,w)?m=null:k!==null&&wg(y,k)&&(a.flags|=32),a.memoizedState!==null&&(y=ld(s,a,E0,null,null,l),Ld._currentValue=y),Zf(s,a),Os(s,a,m,l),a.child;case 6:return s===null&&dn&&((s=l=Kn)&&(l=dE(l,a.pendingProps,fi),l!==null?(a.stateNode=l,cs=a,Kn=null,s=!0):s=!1),s||Mo(a)),null;case 13:return vb(s,a,l);case 4:return Ct(a,a.stateNode.containerInfo),m=a.pendingProps,s===null?a.child=Xn(a,null,m,l):Os(s,a,m,l),a.child;case 11:return lb(s,a,a.type,a.pendingProps,l);case 7:return Os(s,a,a.pendingProps,l),a.child;case 8:return Os(s,a,a.pendingProps.children,l),a.child;case 12:return Os(s,a,a.pendingProps.children,l),a.child;case 10:return m=a.pendingProps,ko(a,a.type,m.value),Os(s,a,m.children,l),a.child;case 9:return y=a.type._context,m=a.pendingProps.children,Po(a),y=hs(y),m=m(y),a.flags|=1,Os(s,a,m,l),a.child;case 14:return cb(s,a,a.type,a.pendingProps,l);case 15:return ub(s,a,a.type,a.pendingProps,l);case 19:return bb(s,a,l);case 31:return Rj(s,a,l);case 22:return hb(s,a,l,a.pendingProps);case 24:return Po(a),m=hs(Ci),s===null?(y=G(),y===null&&(y=Qn,w=Ql(),y.pooledCache=w,w.refCount++,w!==null&&(y.pooledCacheLanes|=l),y=w),a.memoizedState={parent:m,cache:y},Kt(a),ko(a,Ci,y)):((s.lanes&l)!==0&&(si(s,a),Oi(a,null,null,l),qn()),y=s.memoizedState,w=a.memoizedState,y.parent!==m?(y={parent:m,cache:m},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),ko(a,Ci,m)):(m=w.cache,ko(a,Ci,m),m!==y.cache&&fl(a,[Ci],l,!0))),Os(s,a,a.pendingProps.children,l),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function yl(s){s.flags|=4}function W0(s,a,l,m,y){if((a=(s.mode&32)!==0)&&(a=!1),a){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(Yb())s.flags|=8192;else throw Rt=bt,jt}else s.flags&=-16777217}function wb(s,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!Ox(a))if(Yb())s.flags|=8192;else throw Rt=bt,jt}function tm(s,a){a!==null&&(s.flags|=4),s.flags&16384&&(a=s.tag!==22?br():536870912,s.lanes|=a,Qu|=a)}function yd(s,a){if(!dn)switch(s.tailMode){case"hidden":a=s.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?s.tail=null:l.sibling=null;break;case"collapsed":l=s.tail;for(var m=null;l!==null;)l.alternate!==null&&(m=l),l=l.sibling;m===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:m.sibling=null}}function oi(s){var a=s.alternate!==null&&s.alternate.child===s.child,l=0,m=0;if(a)for(var y=s.child;y!==null;)l|=y.lanes|y.childLanes,m|=y.subtreeFlags&65011712,m|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)l|=y.lanes|y.childLanes,m|=y.subtreeFlags,m|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=m,s.childLanes=l,a}function Oj(s,a,l){var m=a.pendingProps;switch(Ru(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oi(a),null;case 1:return oi(a),null;case 3:return l=a.stateNode,m=null,s!==null&&(m=s.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),Dr(Ci),_t(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(s===null||s.child===null)&&(us(a)?yl(a):s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ad())),oi(a),null;case 26:var y=a.type,w=a.memoizedState;return s===null?(yl(a),w!==null?(oi(a),wb(a,w)):(oi(a),W0(a,y,null,m,l))):w?w!==s.memoizedState?(yl(a),oi(a),wb(a,w)):(oi(a),a.flags&=-16777217):(s=s.memoizedProps,s!==m&&yl(a),oi(a),W0(a,y,s,m,l)),null;case 27:if($t(a),l=ht.current,y=a.type,s!==null&&a.stateNode!=null)s.memoizedProps!==m&&yl(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return oi(a),null}s=W.current,us(a)?rd(a):(s=Ex(y,m,l),a.stateNode=s,yl(a))}return oi(a),null;case 5:if($t(a),y=a.type,s!==null&&a.stateNode!=null)s.memoizedProps!==m&&yl(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return oi(a),null}if(w=W.current,us(a))rd(a);else{var k=pm(ht.current);switch(w){case 1:w=k.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:w=k.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":w=k.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":w=k.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":w=k.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof m.is=="string"?k.createElement("select",{is:m.is}):k.createElement("select"),m.multiple?w.multiple=!0:m.size&&(w.size=m.size);break;default:w=typeof m.is=="string"?k.createElement(y,{is:m.is}):k.createElement(y)}}w[jn]=a,w[En]=m;t:for(k=a.child;k!==null;){if(k.tag===5||k.tag===6)w.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===a)break t;for(;k.sibling===null;){if(k.return===null||k.return===a)break t;k=k.return}k.sibling.return=k.return,k=k.sibling}a.stateNode=w;t:switch(zs(w,y,m),y){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break t;case"img":m=!0;break t;default:m=!1}m&&yl(a)}}return oi(a),W0(a,a.type,s===null?null:s.memoizedProps,a.pendingProps,l),null;case 6:if(s&&a.stateNode!=null)s.memoizedProps!==m&&yl(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(i(166));if(s=ht.current,us(a)){if(s=a.stateNode,l=a.memoizedProps,m=null,y=cs,y!==null)switch(y.tag){case 27:case 5:m=y.memoizedProps}s[jn]=a,s=!!(s.nodeValue===l||m!==null&&m.suppressHydrationWarning===!0||vx(s.nodeValue,l)),s||Mo(a,!0)}else s=pm(s).createTextNode(m),s[jn]=a,a.stateNode=s}return oi(a),null;case 31:if(l=a.memoizedState,s===null||s.memoizedState!==null){if(m=us(a),l!==null){if(s===null){if(!m)throw Error(i(318));if(s=a.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(557));s[jn]=a}else dl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;oi(a),s=!1}else l=ad(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=l),s=!0;if(!s)return a.flags&256?(zn(a),a):(zn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return oi(a),null;case 13:if(m=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=us(a),m!==null&&m.dehydrated!==null){if(s===null){if(!y)throw Error(i(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(i(317));y[jn]=a}else dl(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;oi(a),y=!1}else y=ad(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(zn(a),a):(zn(a),null)}return zn(a),(a.flags&128)!==0?(a.lanes=l,a):(l=m!==null,s=s!==null&&s.memoizedState!==null,l&&(m=a.child,y=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(y=m.alternate.memoizedState.cachePool.pool),w=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(w=m.memoizedState.cachePool.pool),w!==y&&(m.flags|=2048)),l!==s&&l&&(a.child.flags|=8192),tm(a,a.updateQueue),oi(a),null);case 4:return _t(),s===null&&gg(a.stateNode.containerInfo),oi(a),null;case 10:return Dr(a.type),oi(a),null;case 19:if(P(bn),m=a.memoizedState,m===null)return oi(a),null;if(y=(a.flags&128)!==0,w=m.rendering,w===null)if(y)yd(m,!1);else{if(Ui!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(w=Ns(s),w!==null){for(a.flags|=128,yd(m,!1),s=w.updateQueue,a.updateQueue=s,tm(a,s),a.subtreeFlags=0,s=l,l=a.child;l!==null;)qc(l,s),l=l.sibling;return q(bn,bn.current&1|2),dn&&fr(a,m.treeForkCount),a.child}s=s.sibling}m.tail!==null&&ye()>rm&&(a.flags|=128,y=!0,yd(m,!1),a.lanes=4194304)}else{if(!y)if(s=Ns(w),s!==null){if(a.flags|=128,y=!0,s=s.updateQueue,a.updateQueue=s,tm(a,s),yd(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!dn)return oi(a),null}else 2*ye()-m.renderingStartTime>rm&&l!==536870912&&(a.flags|=128,y=!0,yd(m,!1),a.lanes=4194304);m.isBackwards?(w.sibling=a.child,a.child=w):(s=m.last,s!==null?s.sibling=w:a.child=w,m.last=w)}return m.tail!==null?(s=m.tail,m.rendering=s,m.tail=s.sibling,m.renderingStartTime=ye(),s.sibling=null,l=bn.current,q(bn,y?l&1|2:l&1),dn&&fr(a,m.treeForkCount),s):(oi(a),null);case 22:case 23:return zn(a),Gi(),m=a.memoizedState!==null,s!==null?s.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(l&536870912)!==0&&(a.flags&128)===0&&(oi(a),a.subtreeFlags&6&&(a.flags|=8192)):oi(a),l=a.updateQueue,l!==null&&tm(a,l.retryQueue),l=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==l&&(a.flags|=2048),s!==null&&P(U),null;case 24:return l=null,s!==null&&(l=s.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),Dr(Ci),oi(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function zj(s,a){switch(Ru(a),a.tag){case 1:return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return Dr(Ci),_t(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 26:case 27:case 5:return $t(a),null;case 31:if(a.memoizedState!==null){if(zn(a),a.alternate===null)throw Error(i(340));dl()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 13:if(zn(a),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(i(340));dl()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return P(bn),null;case 4:return _t(),null;case 10:return Dr(a.type),null;case 22:case 23:return zn(a),Gi(),s!==null&&P(U),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 24:return Dr(Ci),null;case 25:return null;default:return null}}function Sb(s,a){switch(Ru(a),a.tag){case 3:Dr(Ci),_t();break;case 26:case 27:case 5:$t(a);break;case 4:_t();break;case 31:a.memoizedState!==null&&zn(a);break;case 13:zn(a);break;case 19:P(bn);break;case 10:Dr(a.type);break;case 22:case 23:zn(a),Gi(),s!==null&&P(U);break;case 24:Dr(Ci)}}function bd(s,a){try{var l=a.updateQueue,m=l!==null?l.lastEffect:null;if(m!==null){var y=m.next;l=y;do{if((l.tag&s)===s){m=void 0;var w=l.create,k=l.inst;m=w(),k.destroy=m}l=l.next}while(l!==y)}}catch(V){Fn(a,a.return,V)}}function nc(s,a,l){try{var m=a.updateQueue,y=m!==null?m.lastEffect:null;if(y!==null){var w=y.next;m=w;do{if((m.tag&s)===s){var k=m.inst,V=k.destroy;if(V!==void 0){k.destroy=void 0,y=a;var mt=l,Mt=V;try{Mt()}catch(Bt){Fn(y,mt,Bt)}}}m=m.next}while(m!==w)}}catch(Bt){Fn(a,a.return,Bt)}}function Nb(s){var a=s.updateQueue;if(a!==null){var l=s.stateNode;try{zi(a,l)}catch(m){Fn(s,s.return,m)}}}function Ab(s,a,l){l.props=Kc(s.type,s.memoizedProps),l.state=s.memoizedState;try{l.componentWillUnmount()}catch(m){Fn(s,a,m)}}function xd(s,a){try{var l=s.ref;if(l!==null){switch(s.tag){case 26:case 27:case 5:var m=s.stateNode;break;case 30:m=s.stateNode;break;default:m=s.stateNode}typeof l=="function"?s.refCleanup=l(m):l.current=m}}catch(y){Fn(s,a,y)}}function Bo(s,a){var l=s.ref,m=s.refCleanup;if(l!==null)if(typeof m=="function")try{m()}catch(y){Fn(s,a,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(y){Fn(s,a,y)}else l.current=null}function Cb(s){var a=s.type,l=s.memoizedProps,m=s.stateNode;try{t:switch(a){case"button":case"input":case"select":case"textarea":l.autoFocus&&m.focus();break t;case"img":l.src?m.src=l.src:l.srcSet&&(m.srcset=l.srcSet)}}catch(y){Fn(s,s.return,y)}}function K0(s,a,l){try{var m=s.stateNode;rE(m,s.type,l,a),m[En]=a}catch(y){Fn(s,s.return,y)}}function _b(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&cc(s.type)||s.tag===4}function X0(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||_b(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&cc(s.type)||s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Q0(s,a,l){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(s,a):(a=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,a.appendChild(s),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=Gs));else if(m!==4&&(m===27&&cc(s.type)&&(l=s.stateNode,a=null),s=s.child,s!==null))for(Q0(s,a,l),s=s.sibling;s!==null;)Q0(s,a,l),s=s.sibling}function em(s,a,l){var m=s.tag;if(m===5||m===6)s=s.stateNode,a?l.insertBefore(s,a):l.appendChild(s);else if(m!==4&&(m===27&&cc(s.type)&&(l=s.stateNode),s=s.child,s!==null))for(em(s,a,l),s=s.sibling;s!==null;)em(s,a,l),s=s.sibling}function jb(s){var a=s.stateNode,l=s.memoizedProps;try{for(var m=s.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);zs(a,m,l),a[jn]=s,a[En]=l}catch(w){Fn(s,s.return,w)}}var bl=!1,is=!1,Z0=!1,Eb=typeof WeakSet=="function"?WeakSet:Set,As=null;function Bj(s,a){if(s=s.containerInfo,bg=Sm,s=Qa(s),Ea(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else t:{l=(l=s.ownerDocument)&&l.defaultView||window;var m=l.getSelection&&l.getSelection();if(m&&m.rangeCount!==0){l=m.anchorNode;var y=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{l.nodeType,w.nodeType}catch{l=null;break t}var k=0,V=-1,mt=-1,Mt=0,Bt=0,qt=s,kt=null;e:for(;;){for(var Pt;qt!==l||y!==0&&qt.nodeType!==3||(V=k+y),qt!==w||m!==0&&qt.nodeType!==3||(mt=k+m),qt.nodeType===3&&(k+=qt.nodeValue.length),(Pt=qt.firstChild)!==null;)kt=qt,qt=Pt;for(;;){if(qt===s)break e;if(kt===l&&++Mt===y&&(V=k),kt===w&&++Bt===m&&(mt=k),(Pt=qt.nextSibling)!==null)break;qt=kt,kt=qt.parentNode}qt=Pt}l=V===-1||mt===-1?null:{start:V,end:mt}}else l=null}l=l||{start:0,end:0}}else l=null;for(xg={focusedElem:s,selectionRange:l},Sm=!1,As=a;As!==null;)if(a=As,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,As=s;else for(;As!==null;){switch(a=As,w=a.alternate,s=a.flags,a.tag){case 0:if((s&4)!==0&&(s=a.updateQueue,s=s!==null?s.events:null,s!==null))for(l=0;l<s.length;l++)y=s[l],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&w!==null){s=void 0,l=a,y=w.memoizedProps,w=w.memoizedState,m=l.stateNode;try{var ae=Kc(l.type,y);s=m.getSnapshotBeforeUpdate(ae,w),m.__reactInternalSnapshotBeforeUpdate=s}catch(Fe){Fn(l,l.return,Fe)}}break;case 3:if((s&1024)!==0){if(s=a.stateNode.containerInfo,l=s.nodeType,l===9)Ng(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Ng(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(i(163))}if(s=a.sibling,s!==null){s.return=a.return,As=s;break}As=a.return}}function Mb(s,a,l){var m=l.flags;switch(l.tag){case 0:case 11:case 15:wl(s,l),m&4&&bd(5,l);break;case 1:if(wl(s,l),m&4)if(s=l.stateNode,a===null)try{s.componentDidMount()}catch(k){Fn(l,l.return,k)}else{var y=Kc(l.type,a.memoizedProps);a=a.memoizedState;try{s.componentDidUpdate(y,a,s.__reactInternalSnapshotBeforeUpdate)}catch(k){Fn(l,l.return,k)}}m&64&&Nb(l),m&512&&xd(l,l.return);break;case 3:if(wl(s,l),m&64&&(s=l.updateQueue,s!==null)){if(a=null,l.child!==null)switch(l.child.tag){case 27:case 5:a=l.child.stateNode;break;case 1:a=l.child.stateNode}try{zi(s,a)}catch(k){Fn(l,l.return,k)}}break;case 27:a===null&&m&4&&jb(l);case 26:case 5:wl(s,l),a===null&&m&4&&Cb(l),m&512&&xd(l,l.return);break;case 12:wl(s,l);break;case 31:wl(s,l),m&4&&Lb(s,l);break;case 13:wl(s,l),m&4&&Pb(s,l),m&64&&(s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(l=Yj.bind(null,l),fE(s,l))));break;case 22:if(m=l.memoizedState!==null||bl,!m){a=a!==null&&a.memoizedState!==null||is,y=bl;var w=is;bl=m,(is=a)&&!w?Sl(s,l,(l.subtreeFlags&8772)!==0):wl(s,l),bl=y,is=w}break;case 30:break;default:wl(s,l)}}function Tb(s){var a=s.alternate;a!==null&&(s.alternate=null,Tb(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&$r(a)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var gi=null,zr=!1;function xl(s,a,l){for(l=l.child;l!==null;)kb(s,a,l),l=l.sibling}function kb(s,a,l){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(sn,l)}catch{}switch(l.tag){case 26:is||Bo(l,a),xl(s,a,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:is||Bo(l,a);var m=gi,y=zr;cc(l.type)&&(gi=l.stateNode,zr=!1),xl(s,a,l),Md(l.stateNode),gi=m,zr=y;break;case 5:is||Bo(l,a);case 6:if(m=gi,y=zr,gi=null,xl(s,a,l),gi=m,zr=y,gi!==null)if(zr)try{(gi.nodeType===9?gi.body:gi.nodeName==="HTML"?gi.ownerDocument.body:gi).removeChild(l.stateNode)}catch(w){Fn(l,a,w)}else try{gi.removeChild(l.stateNode)}catch(w){Fn(l,a,w)}break;case 18:gi!==null&&(zr?(s=gi,Nx(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,l.stateNode),rh(s)):Nx(gi,l.stateNode));break;case 4:m=gi,y=zr,gi=l.stateNode.containerInfo,zr=!0,xl(s,a,l),gi=m,zr=y;break;case 0:case 11:case 14:case 15:nc(2,l,a),is||nc(4,l,a),xl(s,a,l);break;case 1:is||(Bo(l,a),m=l.stateNode,typeof m.componentWillUnmount=="function"&&Ab(l,a,m)),xl(s,a,l);break;case 21:xl(s,a,l);break;case 22:is=(m=is)||l.memoizedState!==null,xl(s,a,l),is=m;break;default:xl(s,a,l)}}function Lb(s,a){if(a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{rh(s)}catch(l){Fn(a,a.return,l)}}}function Pb(s,a){if(a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{rh(s)}catch(l){Fn(a,a.return,l)}}function Fj(s){switch(s.tag){case 31:case 13:case 19:var a=s.stateNode;return a===null&&(a=s.stateNode=new Eb),a;case 22:return s=s.stateNode,a=s._retryCache,a===null&&(a=s._retryCache=new Eb),a;default:throw Error(i(435,s.tag))}}function nm(s,a){var l=Fj(s);a.forEach(function(m){if(!l.has(m)){l.add(m);var y=Wj.bind(null,s,m);m.then(y,y)}})}function Br(s,a){var l=a.deletions;if(l!==null)for(var m=0;m<l.length;m++){var y=l[m],w=s,k=a,V=k;t:for(;V!==null;){switch(V.tag){case 27:if(cc(V.type)){gi=V.stateNode,zr=!1;break t}break;case 5:gi=V.stateNode,zr=!1;break t;case 3:case 4:gi=V.stateNode.containerInfo,zr=!0;break t}V=V.return}if(gi===null)throw Error(i(160));kb(w,k,y),gi=null,zr=!1,w=y.alternate,w!==null&&(w.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Rb(a,s),a=a.sibling}var ro=null;function Rb(s,a){var l=s.alternate,m=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Br(a,s),Fr(s),m&4&&(nc(3,s,s.return),bd(3,s),nc(5,s,s.return));break;case 1:Br(a,s),Fr(s),m&512&&(is||l===null||Bo(l,l.return)),m&64&&bl&&(s=s.updateQueue,s!==null&&(m=s.callbacks,m!==null&&(l=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=l===null?m:l.concat(m))));break;case 26:var y=ro;if(Br(a,s),Fr(s),m&512&&(is||l===null||Bo(l,l.return)),m&4){var w=l!==null?l.memoizedState:null;if(m=s.memoizedState,l===null)if(m===null)if(s.stateNode===null){t:{m=s.type,l=s.memoizedProps,y=y.ownerDocument||y;e:switch(m){case"title":w=y.getElementsByTagName("title")[0],(!w||w[Hs]||w[jn]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=y.createElement(m),y.head.insertBefore(w,y.querySelector("head > title"))),zs(w,m,l),w[jn]=s,ei(w),m=w;break t;case"link":var k=Rx("link","href",y).get(m+(l.href||""));if(k){for(var V=0;V<k.length;V++)if(w=k[V],w.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&w.getAttribute("rel")===(l.rel==null?null:l.rel)&&w.getAttribute("title")===(l.title==null?null:l.title)&&w.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){k.splice(V,1);break e}}w=y.createElement(m),zs(w,m,l),y.head.appendChild(w);break;case"meta":if(k=Rx("meta","content",y).get(m+(l.content||""))){for(V=0;V<k.length;V++)if(w=k[V],w.getAttribute("content")===(l.content==null?null:""+l.content)&&w.getAttribute("name")===(l.name==null?null:l.name)&&w.getAttribute("property")===(l.property==null?null:l.property)&&w.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&w.getAttribute("charset")===(l.charSet==null?null:l.charSet)){k.splice(V,1);break e}}w=y.createElement(m),zs(w,m,l),y.head.appendChild(w);break;default:throw Error(i(468,m))}w[jn]=s,ei(w),m=w}s.stateNode=m}else Dx(y,s.type,s.stateNode);else s.stateNode=Px(y,m,s.memoizedProps);else w!==m?(w===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):w.count--,m===null?Dx(y,s.type,s.stateNode):Px(y,m,s.memoizedProps)):m===null&&s.stateNode!==null&&K0(s,s.memoizedProps,l.memoizedProps)}break;case 27:Br(a,s),Fr(s),m&512&&(is||l===null||Bo(l,l.return)),l!==null&&m&4&&K0(s,s.memoizedProps,l.memoizedProps);break;case 5:if(Br(a,s),Fr(s),m&512&&(is||l===null||Bo(l,l.return)),s.flags&32){y=s.stateNode;try{$s(y,"")}catch(ae){Fn(s,s.return,ae)}}m&4&&s.stateNode!=null&&(y=s.memoizedProps,K0(s,y,l!==null?l.memoizedProps:y)),m&1024&&(Z0=!0);break;case 6:if(Br(a,s),Fr(s),m&4){if(s.stateNode===null)throw Error(i(162));m=s.memoizedProps,l=s.stateNode;try{l.nodeValue=m}catch(ae){Fn(s,s.return,ae)}}break;case 3:if(ym=null,y=ro,ro=gm(a.containerInfo),Br(a,s),ro=y,Fr(s),m&4&&l!==null&&l.memoizedState.isDehydrated)try{rh(a.containerInfo)}catch(ae){Fn(s,s.return,ae)}Z0&&(Z0=!1,Db(s));break;case 4:m=ro,ro=gm(s.stateNode.containerInfo),Br(a,s),Fr(s),ro=m;break;case 12:Br(a,s),Fr(s);break;case 31:Br(a,s),Fr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,nm(s,m)));break;case 13:Br(a,s),Fr(s),s.child.flags&8192&&s.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(sm=ye()),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,nm(s,m)));break;case 22:y=s.memoizedState!==null;var mt=l!==null&&l.memoizedState!==null,Mt=bl,Bt=is;if(bl=Mt||y,is=Bt||mt,Br(a,s),is=Bt,bl=Mt,Fr(s),m&8192)t:for(a=s.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(l===null||mt||bl||is||Xc(s)),l=null,a=s;;){if(a.tag===5||a.tag===26){if(l===null){mt=l=a;try{if(w=mt.stateNode,y)k=w.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{V=mt.stateNode;var qt=mt.memoizedProps.style,kt=qt!=null&&qt.hasOwnProperty("display")?qt.display:null;V.style.display=kt==null||typeof kt=="boolean"?"":(""+kt).trim()}}catch(ae){Fn(mt,mt.return,ae)}}}else if(a.tag===6){if(l===null){mt=a;try{mt.stateNode.nodeValue=y?"":mt.memoizedProps}catch(ae){Fn(mt,mt.return,ae)}}}else if(a.tag===18){if(l===null){mt=a;try{var Pt=mt.stateNode;y?Ax(Pt,!0):Ax(mt.stateNode,!1)}catch(ae){Fn(mt,mt.return,ae)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===s)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break t;for(;a.sibling===null;){if(a.return===null||a.return===s)break t;l===a&&(l=null),a=a.return}l===a&&(l=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=s.updateQueue,m!==null&&(l=m.retryQueue,l!==null&&(m.retryQueue=null,nm(s,l))));break;case 19:Br(a,s),Fr(s),m&4&&(m=s.updateQueue,m!==null&&(s.updateQueue=null,nm(s,m)));break;case 30:break;case 21:break;default:Br(a,s),Fr(s)}}function Fr(s){var a=s.flags;if(a&2){try{for(var l,m=s.return;m!==null;){if(_b(m)){l=m;break}m=m.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var y=l.stateNode,w=X0(s);em(s,w,y);break;case 5:var k=l.stateNode;l.flags&32&&($s(k,""),l.flags&=-33);var V=X0(s);em(s,V,k);break;case 3:case 4:var mt=l.stateNode.containerInfo,Mt=X0(s);Q0(s,Mt,mt);break;default:throw Error(i(161))}}catch(Bt){Fn(s,s.return,Bt)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function Db(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var a=s;Db(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),s=s.sibling}}function wl(s,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Mb(s,a.alternate,a),a=a.sibling}function Xc(s){for(s=s.child;s!==null;){var a=s;switch(a.tag){case 0:case 11:case 14:case 15:nc(4,a,a.return),Xc(a);break;case 1:Bo(a,a.return);var l=a.stateNode;typeof l.componentWillUnmount=="function"&&Ab(a,a.return,l),Xc(a);break;case 27:Md(a.stateNode);case 26:case 5:Bo(a,a.return),Xc(a);break;case 22:a.memoizedState===null&&Xc(a);break;case 30:Xc(a);break;default:Xc(a)}s=s.sibling}}function Sl(s,a,l){for(l=l&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,y=s,w=a,k=w.flags;switch(w.tag){case 0:case 11:case 15:Sl(y,w,l),bd(4,w);break;case 1:if(Sl(y,w,l),m=w,y=m.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Mt){Fn(m,m.return,Mt)}if(m=w,y=m.updateQueue,y!==null){var V=m.stateNode;try{var mt=y.shared.hiddenCallbacks;if(mt!==null)for(y.shared.hiddenCallbacks=null,y=0;y<mt.length;y++)Ss(mt[y],V)}catch(Mt){Fn(m,m.return,Mt)}}l&&k&64&&Nb(w),xd(w,w.return);break;case 27:jb(w);case 26:case 5:Sl(y,w,l),l&&m===null&&k&4&&Cb(w),xd(w,w.return);break;case 12:Sl(y,w,l);break;case 31:Sl(y,w,l),l&&k&4&&Lb(y,w);break;case 13:Sl(y,w,l),l&&k&4&&Pb(y,w);break;case 22:w.memoizedState===null&&Sl(y,w,l),xd(w,w.return);break;case 30:break;default:Sl(y,w,l)}a=a.sibling}}function J0(s,a){var l=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==l&&(s!=null&&s.refCount++,l!=null&&$c(l))}function tg(s,a){s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&$c(s))}function ao(s,a,l,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Ob(s,a,l,m),a=a.sibling}function Ob(s,a,l,m){var y=a.flags;switch(a.tag){case 0:case 11:case 15:ao(s,a,l,m),y&2048&&bd(9,a);break;case 1:ao(s,a,l,m);break;case 3:ao(s,a,l,m),y&2048&&(s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&$c(s)));break;case 12:if(y&2048){ao(s,a,l,m),s=a.stateNode;try{var w=a.memoizedProps,k=w.id,V=w.onPostCommit;typeof V=="function"&&V(k,a.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(mt){Fn(a,a.return,mt)}}else ao(s,a,l,m);break;case 31:ao(s,a,l,m);break;case 13:ao(s,a,l,m);break;case 23:break;case 22:w=a.stateNode,k=a.alternate,a.memoizedState!==null?w._visibility&2?ao(s,a,l,m):wd(s,a):w._visibility&2?ao(s,a,l,m):(w._visibility|=2,Wu(s,a,l,m,(a.subtreeFlags&10256)!==0||!1)),y&2048&&J0(k,a);break;case 24:ao(s,a,l,m),y&2048&&tg(a.alternate,a);break;default:ao(s,a,l,m)}}function Wu(s,a,l,m,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var w=s,k=a,V=l,mt=m,Mt=k.flags;switch(k.tag){case 0:case 11:case 15:Wu(w,k,V,mt,y),bd(8,k);break;case 23:break;case 22:var Bt=k.stateNode;k.memoizedState!==null?Bt._visibility&2?Wu(w,k,V,mt,y):wd(w,k):(Bt._visibility|=2,Wu(w,k,V,mt,y)),y&&Mt&2048&&J0(k.alternate,k);break;case 24:Wu(w,k,V,mt,y),y&&Mt&2048&&tg(k.alternate,k);break;default:Wu(w,k,V,mt,y)}a=a.sibling}}function wd(s,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var l=s,m=a,y=m.flags;switch(m.tag){case 22:wd(l,m),y&2048&&J0(m.alternate,m);break;case 24:wd(l,m),y&2048&&tg(m.alternate,m);break;default:wd(l,m)}a=a.sibling}}var Sd=8192;function Ku(s,a,l){if(s.subtreeFlags&Sd)for(s=s.child;s!==null;)zb(s,a,l),s=s.sibling}function zb(s,a,l){switch(s.tag){case 26:Ku(s,a,l),s.flags&Sd&&s.memoizedState!==null&&CE(l,ro,s.memoizedState,s.memoizedProps);break;case 5:Ku(s,a,l);break;case 3:case 4:var m=ro;ro=gm(s.stateNode.containerInfo),Ku(s,a,l),ro=m;break;case 22:s.memoizedState===null&&(m=s.alternate,m!==null&&m.memoizedState!==null?(m=Sd,Sd=16777216,Ku(s,a,l),Sd=m):Ku(s,a,l));break;default:Ku(s,a,l)}}function Bb(s){var a=s.alternate;if(a!==null&&(s=a.child,s!==null)){a.child=null;do a=s.sibling,s.sibling=null,s=a;while(s!==null)}}function Nd(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var m=a[l];As=m,Ib(m,s)}Bb(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Fb(s),s=s.sibling}function Fb(s){switch(s.tag){case 0:case 11:case 15:Nd(s),s.flags&2048&&nc(9,s,s.return);break;case 3:Nd(s);break;case 12:Nd(s);break;case 22:var a=s.stateNode;s.memoizedState!==null&&a._visibility&2&&(s.return===null||s.return.tag!==13)?(a._visibility&=-3,im(s)):Nd(s);break;default:Nd(s)}}function im(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var m=a[l];As=m,Ib(m,s)}Bb(s)}for(s=s.child;s!==null;){switch(a=s,a.tag){case 0:case 11:case 15:nc(8,a,a.return),im(a);break;case 22:l=a.stateNode,l._visibility&2&&(l._visibility&=-3,im(a));break;default:im(a)}s=s.sibling}}function Ib(s,a){for(;As!==null;){var l=As;switch(l.tag){case 0:case 11:case 15:nc(8,l,a);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var m=l.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:$c(l.memoizedState.cache)}if(m=l.child,m!==null)m.return=l,As=m;else t:for(l=s;As!==null;){m=As;var y=m.sibling,w=m.return;if(Tb(m),m===l){As=null;break t}if(y!==null){y.return=w,As=y;break t}As=w}}}var Ij={getCacheForType:function(s){var a=hs(Ci),l=a.data.get(s);return l===void 0&&(l=s(),a.data.set(s,l)),l},cacheSignal:function(){return hs(Ci).controller.signal}},Uj=typeof WeakMap=="function"?WeakMap:Map,Dn=0,Qn=null,fn=null,pn=0,Bn=0,ra=null,ic=!1,Xu=!1,eg=!1,Nl=0,Ui=0,sc=0,Qc=0,ng=0,aa=0,Qu=0,Ad=null,Ir=null,ig=!1,sm=0,Ub=0,rm=1/0,am=null,rc=null,fs=0,ac=null,Zu=null,Al=0,sg=0,rg=null,qb=null,Cd=0,ag=null;function oa(){return(Dn&2)!==0&&pn!==0?pn&-pn:J.T!==null?dg():ti()}function Vb(){if(aa===0)if((pn&536870912)===0||dn){var s=_n;_n<<=1,(_n&3932160)===0&&(_n=262144),aa=s}else aa=536870912;return s=ai.current,s!==null&&(s.flags|=32),aa}function Ur(s,a,l){(s===Qn&&(Bn===2||Bn===9)||s.cancelPendingCommit!==null)&&(Ju(s,0),oc(s,pn,aa,!1)),Ne(s,l),((Dn&2)===0||s!==Qn)&&(s===Qn&&((Dn&2)===0&&(Qc|=l),Ui===4&&oc(s,pn,aa,!1)),Fo(s))}function Hb(s,a,l){if((Dn&6)!==0)throw Error(i(327));var m=!l&&(a&127)===0&&(a&s.expiredLanes)===0||nr(s,a),y=m?Hj(s,a):lg(s,a,!0),w=m;do{if(y===0){Xu&&!m&&oc(s,a,0,!1);break}else{if(l=s.current.alternate,w&&!qj(l)){y=lg(s,a,!1),w=!1;continue}if(y===2){if(w=a,s.errorRecoveryDisabledLanes&w)var k=0;else k=s.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){a=k;t:{var V=s;y=Ad;var mt=V.current.memoizedState.isDehydrated;if(mt&&(Ju(V,k).flags|=256),k=lg(V,k,!1),k!==2){if(eg&&!mt){V.errorRecoveryDisabledLanes|=w,Qc|=w,y=4;break t}w=Ir,Ir=y,w!==null&&(Ir===null?Ir=w:Ir.push.apply(Ir,w))}y=k}if(w=!1,y!==2)continue}}if(y===1){Ju(s,0),oc(s,a,0,!0);break}t:{switch(m=s,w=y,w){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:oc(m,a,aa,!ic);break t;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(y=sm+300-ye(),10<y)){if(oc(m,a,aa,!ic),un(m,0,!0)!==0)break t;Al=a,m.timeoutHandle=wx($b.bind(null,m,l,Ir,am,ig,a,aa,Qc,Qu,ic,w,"Throttled",-0,0),y);break t}$b(m,l,Ir,am,ig,a,aa,Qc,Qu,ic,w,null,-0,0)}}break}while(!0);Fo(s)}function $b(s,a,l,m,y,w,k,V,mt,Mt,Bt,qt,kt,Pt){if(s.timeoutHandle=-1,qt=a.subtreeFlags,qt&8192||(qt&16785408)===16785408){qt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gs},zb(a,w,qt);var ae=(w&62914560)===w?sm-ye():(w&4194048)===w?Ub-ye():0;if(ae=_E(qt,ae),ae!==null){Al=w,s.cancelPendingCommit=ae(Jb.bind(null,s,a,w,l,m,y,k,V,mt,Bt,qt,null,kt,Pt)),oc(s,w,k,!Mt);return}}Jb(s,a,w,l,m,y,k,V,mt)}function qj(s){for(var a=s;;){var l=a.tag;if((l===0||l===11||l===15)&&a.flags&16384&&(l=a.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var m=0;m<l.length;m++){var y=l[m],w=y.getSnapshot;y=y.value;try{if(!os(w(),y))return!1}catch{return!1}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function oc(s,a,l,m){a&=~ng,a&=~Qc,s.suspendedLanes|=a,s.pingedLanes&=~a,m&&(s.warmLanes|=a),m=s.expirationTimes;for(var y=a;0<y;){var w=31-rn(y),k=1<<w;m[w]=-1,y&=~k}l!==0&&xr(s,l,a)}function om(){return(Dn&6)===0?(_d(0),!1):!0}function og(){if(fn!==null){if(Bn===0)var s=fn.return;else s=fn,Ta=To=null,Uu(s),Vt=null,ce=0,s=fn;for(;s!==null;)Sb(s.alternate,s),s=s.return;fn=null}}function Ju(s,a){var l=s.timeoutHandle;l!==-1&&(s.timeoutHandle=-1,lE(l)),l=s.cancelPendingCommit,l!==null&&(s.cancelPendingCommit=null,l()),Al=0,og(),Qn=s,fn=l=Mr(s.current,null),pn=a,Bn=0,ra=null,ic=!1,Xu=nr(s,a),eg=!1,Qu=aa=ng=Qc=sc=Ui=0,Ir=Ad=null,ig=!1,(a&8)!==0&&(a|=a&32);var m=s.entangledLanes;if(m!==0)for(s=s.entanglements,m&=a;0<m;){var y=31-rn(m),w=1<<y;a|=s[y],m&=~w}return Nl=a,Fc(),l}function Gb(s,a){Te=null,J.H=gd,a===gt||a===it?(a=Ft(),Bn=3):a===jt?(a=Ft(),Bn=4):Bn=a===F0?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ra=a,fn===null&&(Ui=1,Xf(s,Tr(a,s.current)))}function Yb(){var s=ai.current;return s===null?!0:(pn&4194048)===pn?wn===null:(pn&62914560)===pn||(pn&536870912)!==0?s===wn:!1}function Wb(){var s=J.H;return J.H=gd,s===null?gd:s}function Kb(){var s=J.A;return J.A=Ij,s}function lm(){Ui=4,ic||(pn&4194048)!==pn&&ai.current!==null||(Xu=!0),(sc&134217727)===0&&(Qc&134217727)===0||Qn===null||oc(Qn,pn,aa,!1)}function lg(s,a,l){var m=Dn;Dn|=2;var y=Wb(),w=Kb();(Qn!==s||pn!==a)&&(am=null,Ju(s,a)),a=!1;var k=Ui;t:do try{if(Bn!==0&&fn!==null){var V=fn,mt=ra;switch(Bn){case 8:og(),k=6;break t;case 3:case 2:case 9:case 6:ai.current===null&&(a=!0);var Mt=Bn;if(Bn=0,ra=null,th(s,V,mt,Mt),l&&Xu){k=0;break t}break;default:Mt=Bn,Bn=0,ra=null,th(s,V,mt,Mt)}}Vj(),k=Ui;break}catch(Bt){Gb(s,Bt)}while(!0);return a&&s.shellSuspendCounter++,Ta=To=null,Dn=m,J.H=y,J.A=w,fn===null&&(Qn=null,pn=0,Fc()),k}function Vj(){for(;fn!==null;)Xb(fn)}function Hj(s,a){var l=Dn;Dn|=2;var m=Wb(),y=Kb();Qn!==s||pn!==a?(am=null,rm=ye()+500,Ju(s,a)):Xu=nr(s,a);t:do try{if(Bn!==0&&fn!==null){a=fn;var w=ra;e:switch(Bn){case 1:Bn=0,ra=null,th(s,a,w,1);break;case 2:case 9:if(St(w)){Bn=0,ra=null,Qb(a);break}a=function(){Bn!==2&&Bn!==9||Qn!==s||(Bn=7),Fo(s)},w.then(a,a);break t;case 3:Bn=7;break t;case 4:Bn=5;break t;case 7:St(w)?(Bn=0,ra=null,Qb(a)):(Bn=0,ra=null,th(s,a,w,7));break;case 5:var k=null;switch(fn.tag){case 26:k=fn.memoizedState;case 5:case 27:var V=fn;if(k?Ox(k):V.stateNode.complete){Bn=0,ra=null;var mt=V.sibling;if(mt!==null)fn=mt;else{var Mt=V.return;Mt!==null?(fn=Mt,cm(Mt)):fn=null}break e}}Bn=0,ra=null,th(s,a,w,5);break;case 6:Bn=0,ra=null,th(s,a,w,6);break;case 8:og(),Ui=6;break t;default:throw Error(i(462))}}$j();break}catch(Bt){Gb(s,Bt)}while(!0);return Ta=To=null,J.H=m,J.A=y,Dn=l,fn!==null?0:(Qn=null,pn=0,Fc(),Ui)}function $j(){for(;fn!==null&&!ie();)Xb(fn)}function Xb(s){var a=xb(s.alternate,s,Nl);s.memoizedProps=s.pendingProps,a===null?cm(s):fn=a}function Qb(s){var a=s,l=a.alternate;switch(a.tag){case 15:case 0:a=mb(l,a,a.pendingProps,a.type,void 0,pn);break;case 11:a=mb(l,a,a.pendingProps,a.type.render,a.ref,pn);break;case 5:Uu(a);default:Sb(l,a),a=fn=qc(a,Nl),a=xb(l,a,Nl)}s.memoizedProps=s.pendingProps,a===null?cm(s):fn=a}function th(s,a,l,m){Ta=To=null,Uu(a),Vt=null,ce=0;var y=a.return;try{if(Pj(s,y,a,l,pn)){Ui=1,Xf(s,Tr(l,s.current)),fn=null;return}}catch(w){if(y!==null)throw fn=y,w;Ui=1,Xf(s,Tr(l,s.current)),fn=null;return}a.flags&32768?(dn||m===1?s=!0:Xu||(pn&536870912)!==0?s=!1:(ic=s=!0,(m===2||m===9||m===3||m===6)&&(m=ai.current,m!==null&&m.tag===13&&(m.flags|=16384))),Zb(a,s)):cm(a)}function cm(s){var a=s;do{if((a.flags&32768)!==0){Zb(a,ic);return}s=a.return;var l=Oj(a.alternate,a,Nl);if(l!==null){fn=l;return}if(a=a.sibling,a!==null){fn=a;return}fn=a=s}while(a!==null);Ui===0&&(Ui=5)}function Zb(s,a){do{var l=zj(s.alternate,s);if(l!==null){l.flags&=32767,fn=l;return}if(l=s.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!a&&(s=s.sibling,s!==null)){fn=s;return}fn=s=l}while(s!==null);Ui=6,fn=null}function Jb(s,a,l,m,y,w,k,V,mt){s.cancelPendingCommit=null;do um();while(fs!==0);if((Dn&6)!==0)throw Error(i(327));if(a!==null){if(a===s.current)throw Error(i(177));if(w=a.lanes|a.childLanes,w|=ju,bi(s,l,w,k,V,mt),s===Qn&&(fn=Qn=null,pn=0),Zu=a,ac=s,Al=l,sg=w,rg=y,qb=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Kj(je,function(){return sx(),null})):(s.callbackNode=null,s.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=J.T,J.T=null,y=at.p,at.p=2,k=Dn,Dn|=4;try{Bj(s,a,l)}finally{Dn=k,at.p=y,J.T=m}}fs=1,tx(),ex(),nx()}}function tx(){if(fs===1){fs=0;var s=ac,a=Zu,l=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||l){l=J.T,J.T=null;var m=at.p;at.p=2;var y=Dn;Dn|=4;try{Rb(a,s);var w=xg,k=Qa(s.containerInfo),V=w.focusedElem,mt=w.selectionRange;if(k!==V&&V&&V.ownerDocument&&Xa(V.ownerDocument.documentElement,V)){if(mt!==null&&Ea(V)){var Mt=mt.start,Bt=mt.end;if(Bt===void 0&&(Bt=Mt),"selectionStart"in V)V.selectionStart=Mt,V.selectionEnd=Math.min(Bt,V.value.length);else{var qt=V.ownerDocument||document,kt=qt&&qt.defaultView||window;if(kt.getSelection){var Pt=kt.getSelection(),ae=V.textContent.length,Fe=Math.min(mt.start,ae),$n=mt.end===void 0?Fe:Math.min(mt.end,ae);!Pt.extend&&Fe>$n&&(k=$n,$n=Fe,Fe=k);var wt=$l(V,Fe),vt=$l(V,$n);if(wt&&vt&&(Pt.rangeCount!==1||Pt.anchorNode!==wt.node||Pt.anchorOffset!==wt.offset||Pt.focusNode!==vt.node||Pt.focusOffset!==vt.offset)){var Et=qt.createRange();Et.setStart(wt.node,wt.offset),Pt.removeAllRanges(),Fe>$n?(Pt.addRange(Et),Pt.extend(vt.node,vt.offset)):(Et.setEnd(vt.node,vt.offset),Pt.addRange(Et))}}}}for(qt=[],Pt=V;Pt=Pt.parentNode;)Pt.nodeType===1&&qt.push({element:Pt,left:Pt.scrollLeft,top:Pt.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<qt.length;V++){var It=qt[V];It.element.scrollLeft=It.left,It.element.scrollTop=It.top}}Sm=!!bg,xg=bg=null}finally{Dn=y,at.p=m,J.T=l}}s.current=a,fs=2}}function ex(){if(fs===2){fs=0;var s=ac,a=Zu,l=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||l){l=J.T,J.T=null;var m=at.p;at.p=2;var y=Dn;Dn|=4;try{Mb(s,a.alternate,a)}finally{Dn=y,at.p=m,J.T=l}}fs=3}}function nx(){if(fs===4||fs===3){fs=0,xe();var s=ac,a=Zu,l=Al,m=qb;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?fs=5:(fs=0,Zu=ac=null,ix(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(rc=null),ui(l),a=a.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(sn,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=J.T,y=at.p,at.p=2,J.T=null;try{for(var w=s.onRecoverableError,k=0;k<m.length;k++){var V=m[k];w(V.value,{componentStack:V.stack})}}finally{J.T=a,at.p=y}}(Al&3)!==0&&um(),Fo(s),y=s.pendingLanes,(l&261930)!==0&&(y&42)!==0?s===ag?Cd++:(Cd=0,ag=s):Cd=0,_d(0)}}function ix(s,a){(s.pooledCacheLanes&=a)===0&&(a=s.pooledCache,a!=null&&(s.pooledCache=null,$c(a)))}function um(){return tx(),ex(),nx(),sx()}function sx(){if(fs!==5)return!1;var s=ac,a=sg;sg=0;var l=ui(Al),m=J.T,y=at.p;try{at.p=32>l?32:l,J.T=null,l=rg,rg=null;var w=ac,k=Al;if(fs=0,Zu=ac=null,Al=0,(Dn&6)!==0)throw Error(i(331));var V=Dn;if(Dn|=4,Fb(w.current),Ob(w,w.current,k,l),Dn=V,_d(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(sn,w)}catch{}return!0}finally{at.p=y,J.T=m,ix(s,a)}}function rx(s,a,l){a=Tr(l,a),a=B0(s.stateNode,a,2),s=tn(s,a,2),s!==null&&(Ne(s,2),Fo(s))}function Fn(s,a,l){if(s.tag===3)rx(s,s,l);else for(;a!==null;){if(a.tag===3){rx(a,s,l);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(rc===null||!rc.has(m))){s=Tr(l,s),l=ab(2),m=tn(a,l,2),m!==null&&(ob(l,m,a,s),Ne(m,2),Fo(m));break}}a=a.return}}function cg(s,a,l){var m=s.pingCache;if(m===null){m=s.pingCache=new Uj;var y=new Set;m.set(a,y)}else y=m.get(a),y===void 0&&(y=new Set,m.set(a,y));y.has(l)||(eg=!0,y.add(l),s=Gj.bind(null,s,a,l),a.then(s,s))}function Gj(s,a,l){var m=s.pingCache;m!==null&&m.delete(a),s.pingedLanes|=s.suspendedLanes&l,s.warmLanes&=~l,Qn===s&&(pn&l)===l&&(Ui===4||Ui===3&&(pn&62914560)===pn&&300>ye()-sm?(Dn&2)===0&&Ju(s,0):ng|=l,Qu===pn&&(Qu=0)),Fo(s)}function ax(s,a){a===0&&(a=br()),s=Ja(s,a),s!==null&&(Ne(s,a),Fo(s))}function Yj(s){var a=s.memoizedState,l=0;a!==null&&(l=a.retryLane),ax(s,l)}function Wj(s,a){var l=0;switch(s.tag){case 31:case 13:var m=s.stateNode,y=s.memoizedState;y!==null&&(l=y.retryLane);break;case 19:m=s.stateNode;break;case 22:m=s.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(a),ax(s,l)}function Kj(s,a){return oe(s,a)}var hm=null,eh=null,ug=!1,dm=!1,hg=!1,lc=0;function Fo(s){s!==eh&&s.next===null&&(eh===null?hm=eh=s:eh=eh.next=s),dm=!0,ug||(ug=!0,Qj())}function _d(s,a){if(!hg&&dm){hg=!0;do for(var l=!1,m=hm;m!==null;){if(s!==0){var y=m.pendingLanes;if(y===0)var w=0;else{var k=m.suspendedLanes,V=m.pingedLanes;w=(1<<31-rn(42|s)+1)-1,w&=y&~(k&~V),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(l=!0,ux(m,w))}else w=pn,w=un(m,m===Qn?w:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(w&3)===0||nr(m,w)||(l=!0,ux(m,w));m=m.next}while(l);hg=!1}}function Xj(){ox()}function ox(){dm=ug=!1;var s=0;lc!==0&&oE()&&(s=lc);for(var a=ye(),l=null,m=hm;m!==null;){var y=m.next,w=lx(m,a);w===0?(m.next=null,l===null?hm=y:l.next=y,y===null&&(eh=l)):(l=m,(s!==0||(w&3)!==0)&&(dm=!0)),m=y}fs!==0&&fs!==5||_d(s),lc!==0&&(lc=0)}function lx(s,a){for(var l=s.suspendedLanes,m=s.pingedLanes,y=s.expirationTimes,w=s.pendingLanes&-62914561;0<w;){var k=31-rn(w),V=1<<k,mt=y[k];mt===-1?((V&l)===0||(V&m)!==0)&&(y[k]=ki(V,a)):mt<=a&&(s.expiredLanes|=V),w&=~V}if(a=Qn,l=pn,l=un(s,s===a?l:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m=s.callbackNode,l===0||s===a&&(Bn===2||Bn===9)||s.cancelPendingCommit!==null)return m!==null&&m!==null&&Zt(m),s.callbackNode=null,s.callbackPriority=0;if((l&3)===0||nr(s,l)){if(a=l&-l,a===s.callbackPriority)return a;switch(m!==null&&Zt(m),ui(l)){case 2:case 8:l=on;break;case 32:l=je;break;case 268435456:l=qe;break;default:l=je}return m=cx.bind(null,s),l=oe(l,m),s.callbackPriority=a,s.callbackNode=l,a}return m!==null&&m!==null&&Zt(m),s.callbackPriority=2,s.callbackNode=null,2}function cx(s,a){if(fs!==0&&fs!==5)return s.callbackNode=null,s.callbackPriority=0,null;var l=s.callbackNode;if(um()&&s.callbackNode!==l)return null;var m=pn;return m=un(s,s===Qn?m:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),m===0?null:(Hb(s,m,a),lx(s,ye()),s.callbackNode!=null&&s.callbackNode===l?cx.bind(null,s):null)}function ux(s,a){if(um())return null;Hb(s,a,!0)}function Qj(){cE(function(){(Dn&6)!==0?oe(Ue,Xj):ox()})}function dg(){if(lc===0){var s=g;s===0&&(s=Ee,Ee<<=1,(Ee&261888)===0&&(Ee=256)),lc=s}return lc}function hx(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:wi(""+s)}function dx(s,a){var l=a.ownerDocument.createElement("input");return l.name=a.name,l.value=a.value,s.id&&l.setAttribute("form",s.id),a.parentNode.insertBefore(l,a),s=new FormData(s),l.parentNode.removeChild(l),s}function Zj(s,a,l,m,y){if(a==="submit"&&l&&l.stateNode===y){var w=hx((y[En]||null).action),k=m.submitter;k&&(a=(a=k[En]||null)?hx(a.formAction):k.getAttribute("formAction"),a!==null&&(w=a,k=null));var V=new Ys("action","action",null,m,y);s.push({event:V,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(lc!==0){var mt=k?dx(y,k):new FormData(y);L0(l,{pending:!0,data:mt,method:y.method,action:w},null,mt)}}else typeof w=="function"&&(V.preventDefault(),mt=k?dx(y,k):new FormData(y),L0(l,{pending:!0,data:mt,method:y.method,action:w},w,mt))},currentTarget:y}]})}}for(var fg=0;fg<cl.length;fg++){var mg=cl[fg],Jj=mg.toLowerCase(),tE=mg[0].toUpperCase()+mg.slice(1);Er(Jj,"on"+tE)}Er(ll,"onAnimationEnd"),Er(zc,"onAnimationIteration"),Er(ed,"onAnimationStart"),Er("dblclick","onDoubleClick"),Er("focusin","onFocus"),Er("focusout","onBlur"),Er(zf,"onTransitionRun"),Er(Bf,"onTransitionStart"),Er(Ff,"onTransitionCancel"),Er(nd,"onTransitionEnd"),Nr("onMouseEnter",["mouseout","mouseover"]),Nr("onMouseLeave",["mouseout","mouseover"]),Nr("onPointerEnter",["pointerout","pointerover"]),Nr("onPointerLeave",["pointerout","pointerover"]),Ts("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ts("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ts("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ts("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ts("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ts("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jd="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(" "),eE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jd));function fx(s,a){a=(a&4)!==0;for(var l=0;l<s.length;l++){var m=s[l],y=m.event;m=m.listeners;t:{var w=void 0;if(a)for(var k=m.length-1;0<=k;k--){var V=m[k],mt=V.instance,Mt=V.currentTarget;if(V=V.listener,mt!==w&&y.isPropagationStopped())break t;w=V,y.currentTarget=Mt;try{w(y)}catch(Bt){Bc(Bt)}y.currentTarget=null,w=mt}else for(k=0;k<m.length;k++){if(V=m[k],mt=V.instance,Mt=V.currentTarget,V=V.listener,mt!==w&&y.isPropagationStopped())break t;w=V,y.currentTarget=Mt;try{w(y)}catch(Bt){Bc(Bt)}y.currentTarget=null,w=mt}}}}function mn(s,a){var l=a[ps];l===void 0&&(l=a[ps]=new Set);var m=s+"__bubble";l.has(m)||(mx(a,s,2,!1),l.add(m))}function pg(s,a,l){var m=0;a&&(m|=4),mx(l,s,m,a)}var fm="_reactListening"+Math.random().toString(36).slice(2);function gg(s){if(!s[fm]){s[fm]=!0,go.forEach(function(l){l!=="selectionchange"&&(eE.has(l)||pg(l,!1,s),pg(l,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[fm]||(a[fm]=!0,pg("selectionchange",!1,a))}}function mx(s,a,l,m){switch(Vx(a)){case 2:var y=ME;break;case 8:y=TE;break;default:y=kg}l=y.bind(null,a,l,s),y=void 0,!xo||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),m?y!==void 0?s.addEventListener(a,l,{capture:!0,passive:y}):s.addEventListener(a,l,!0):y!==void 0?s.addEventListener(a,l,{passive:y}):s.addEventListener(a,l,!1)}function vg(s,a,l,m,y){var w=m;if((a&1)===0&&(a&2)===0&&m!==null)t:for(;;){if(m===null)return;var k=m.tag;if(k===3||k===4){var V=m.stateNode.containerInfo;if(V===y)break;if(k===4)for(k=m.return;k!==null;){var mt=k.tag;if((mt===3||mt===4)&&k.stateNode.containerInfo===y)return;k=k.return}for(;V!==null;){if(k=Es(V),k===null)return;if(mt=k.tag,mt===5||mt===6||mt===26||mt===27){m=w=k;continue t}V=V.parentNode}}m=m.return}rl(function(){var Mt=w,Bt=qa(l),qt=[];t:{var kt=id.get(s);if(kt!==void 0){var Pt=Ys,ae=s;switch(s){case"keypress":if(Ri(l)===0)break t;case"keydown":case"keyup":Pt=Nt;break;case"focusin":ae="focus",Pt=ks;break;case"focusout":ae="blur",Pt=ks;break;case"beforeblur":case"afterblur":Pt=ks;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":Pt=So;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Pt=Zr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Pt=Pe;break;case ll:case zc:case ed:Pt=N;break;case nd:Pt=en;break;case"scroll":case"scrollend":Pt=_r;break;case"wheel":Pt=Nn;break;case"copy":case"cut":case"paste":Pt=st;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Pt=Me;break;case"toggle":case"beforetoggle":Pt=ii}var Fe=(a&4)!==0,$n=!Fe&&(s==="scroll"||s==="scrollend"),wt=Fe?kt!==null?kt+"Capture":null:kt;Fe=[];for(var vt=Mt,Et;vt!==null;){var It=vt;if(Et=It.stateNode,It=It.tag,It!==5&&It!==26&&It!==27||Et===null||wt===null||(It=Mn(vt,wt),It!=null&&Fe.push(Ed(vt,It,Et))),$n)break;vt=vt.return}0<Fe.length&&(kt=new Pt(kt,ae,null,l,Bt),qt.push({event:kt,listeners:Fe}))}}if((a&7)===0){t:{if(kt=s==="mouseover"||s==="pointerover",Pt=s==="mouseout"||s==="pointerout",kt&&l!==or&&(ae=l.relatedTarget||l.fromElement)&&(Es(ae)||ae[Ji]))break t;if((Pt||kt)&&(kt=Bt.window===Bt?Bt:(kt=Bt.ownerDocument)?kt.defaultView||kt.parentWindow:window,Pt?(ae=l.relatedTarget||l.toElement,Pt=Mt,ae=ae?Es(ae):null,ae!==null&&($n=o(ae),Fe=ae.tag,ae!==$n||Fe!==5&&Fe!==27&&Fe!==6)&&(ae=null)):(Pt=null,ae=Mt),Pt!==ae)){if(Fe=So,It="onMouseLeave",wt="onMouseEnter",vt="mouse",(s==="pointerout"||s==="pointerover")&&(Fe=Me,It="onPointerLeave",wt="onPointerEnter",vt="pointer"),$n=Pt==null?kt:wr(Pt),Et=ae==null?kt:wr(ae),kt=new Fe(It,vt+"leave",Pt,l,Bt),kt.target=$n,kt.relatedTarget=Et,It=null,Es(Bt)===Mt&&(Fe=new Fe(wt,vt+"enter",ae,l,Bt),Fe.target=Et,Fe.relatedTarget=$n,It=Fe),$n=It,Pt&&ae)e:{for(Fe=nE,wt=Pt,vt=ae,Et=0,It=wt;It;It=Fe(It))Et++;It=0;for(var Le=vt;Le;Le=Fe(Le))It++;for(;0<Et-It;)wt=Fe(wt),Et--;for(;0<It-Et;)vt=Fe(vt),It--;for(;Et--;){if(wt===vt||vt!==null&&wt===vt.alternate){Fe=wt;break e}wt=Fe(wt),vt=Fe(vt)}Fe=null}else Fe=null;Pt!==null&&px(qt,kt,Pt,Fe,!1),ae!==null&&$n!==null&&px(qt,$n,ae,Fe,!0)}}t:{if(kt=Mt?wr(Mt):window,Pt=kt.nodeName&&kt.nodeName.toLowerCase(),Pt==="select"||Pt==="input"&&kt.type==="file")var Tn=_o;else if(Dc(kt))if(Ws)Tn=_a;else{Tn=Ni;var ve=Vl}else Pt=kt.nodeName,!Pt||Pt.toLowerCase()!=="input"||kt.type!=="checkbox"&&kt.type!=="radio"?Mt&&ya(Mt.elementType)&&(Tn=_o):Tn=_u;if(Tn&&(Tn=Tn(s,Mt))){ur(qt,Tn,l,Bt);break t}ve&&ve(s,kt,Mt),s==="focusout"&&Mt&&kt.type==="number"&&Mt.memoizedProps.value!=null&&Gr(kt,"number",kt.value)}switch(ve=Mt?wr(Mt):window,s){case"focusin":(Dc(ve)||ve.contentEditable==="true")&&(hr=ve,Za=Mt,bs=null);break;case"focusout":bs=Za=hr=null;break;case"mousedown":jr=!0;break;case"contextmenu":case"mouseup":case"dragend":jr=!1,An(qt,l,Bt);break;case"selectionchange":if(ol)break;case"keydown":case"keyup":An(qt,l,Bt)}var an;if(cr)t:{switch(s){case"compositionstart":var gn="onCompositionStart";break t;case"compositionend":gn="onCompositionEnd";break t;case"compositionupdate":gn="onCompositionUpdate";break t}gn=void 0}else Na?Co(s,l)&&(gn="onCompositionEnd"):s==="keydown"&&l.keyCode===229&&(gn="onCompositionStart");gn&&($a&&l.locale!=="ko"&&(Na||gn!=="onCompositionStart"?gn==="onCompositionEnd"&&Na&&(an=Wr()):(ys=Bt,wa="value"in ys?ys.value:ys.textContent,Na=!0)),ve=mm(Mt,gn),0<ve.length&&(gn=new xt(gn,s,null,l,Bt),qt.push({event:gn,listeners:ve}),an?gn.data=an:(an=Il(l),an!==null&&(gn.data=an)))),(an=al?Ls(s,l):Ga(s,l))&&(gn=mm(Mt,"onBeforeInput"),0<gn.length&&(ve=new xt("onBeforeInput","beforeinput",null,l,Bt),qt.push({event:ve,listeners:gn}),ve.data=an)),Zj(qt,s,Mt,l,Bt)}fx(qt,a)})}function Ed(s,a,l){return{instance:s,listener:a,currentTarget:l}}function mm(s,a){for(var l=a+"Capture",m=[];s!==null;){var y=s,w=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||w===null||(y=Mn(s,l),y!=null&&m.unshift(Ed(s,y,w)),y=Mn(s,a),y!=null&&m.push(Ed(s,y,w))),s.tag===3)return m;s=s.return}return[]}function nE(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function px(s,a,l,m,y){for(var w=a._reactName,k=[];l!==null&&l!==m;){var V=l,mt=V.alternate,Mt=V.stateNode;if(V=V.tag,mt!==null&&mt===m)break;V!==5&&V!==26&&V!==27||Mt===null||(mt=Mt,y?(Mt=Mn(l,w),Mt!=null&&k.unshift(Ed(l,Mt,mt))):y||(Mt=Mn(l,w),Mt!=null&&k.push(Ed(l,Mt,mt)))),l=l.return}k.length!==0&&s.push({event:a,listeners:k})}var iE=/\r\n?/g,sE=/\u0000|\uFFFD/g;function gx(s){return(typeof s=="string"?s:""+s).replace(iE,`
`).replace(sE,"")}function vx(s,a){return a=gx(a),gx(s)===a}function Hn(s,a,l,m,y,w){switch(l){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||$s(s,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&$s(s,""+m);break;case"className":hi(s,"class",m);break;case"tabIndex":hi(s,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":hi(s,l,m);break;case"style":Pi(s,m,w);break;case"data":if(a!=="object"){hi(s,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||l!=="href")){s.removeAttribute(l);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(l);break}m=wi(""+m),s.setAttribute(l,m);break;case"action":case"formAction":if(typeof m=="function"){s.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 w=="function"&&(l==="formAction"?(a!=="input"&&Hn(s,a,"name",y.name,y,null),Hn(s,a,"formEncType",y.formEncType,y,null),Hn(s,a,"formMethod",y.formMethod,y,null),Hn(s,a,"formTarget",y.formTarget,y,null)):(Hn(s,a,"encType",y.encType,y,null),Hn(s,a,"method",y.method,y,null),Hn(s,a,"target",y.target,y,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){s.removeAttribute(l);break}m=wi(""+m),s.setAttribute(l,m);break;case"onClick":m!=null&&(s.onclick=Gs);break;case"onScroll":m!=null&&mn("scroll",s);break;case"onScrollEnd":m!=null&&mn("scrollend",s);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(l=m.__html,l!=null){if(y.children!=null)throw Error(i(60));s.innerHTML=l}}break;case"multiple":s.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":s.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){s.removeAttribute("xlink:href");break}l=wi(""+m),s.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":m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(l,""+m):s.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":m&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(l,""):s.removeAttribute(l);break;case"capture":case"download":m===!0?s.setAttribute(l,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?s.setAttribute(l,m):s.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?s.setAttribute(l,m):s.removeAttribute(l);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?s.removeAttribute(l):s.setAttribute(l,m);break;case"popover":mn("beforetoggle",s),mn("toggle",s),gs(s,"popover",m);break;case"xlinkActuate":sr(s,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":sr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":sr(s,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":sr(s,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":sr(s,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":sr(s,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":sr(s,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":sr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":sr(s,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":gs(s,"is",m);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Yr.get(l)||l,gs(s,l,m))}}function yg(s,a,l,m,y,w){switch(l){case"style":Pi(s,m,w);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(l=m.__html,l!=null){if(y.children!=null)throw Error(i(60));s.innerHTML=l}}break;case"children":typeof m=="string"?$s(s,m):(typeof m=="number"||typeof m=="bigint")&&$s(s,""+m);break;case"onScroll":m!=null&&mn("scroll",s);break;case"onScrollEnd":m!=null&&mn("scrollend",s);break;case"onClick":m!=null&&(s.onclick=Gs);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vn.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(y=l.endsWith("Capture"),a=l.slice(2,y?l.length-7:void 0),w=s[En]||null,w=w!=null?w[l]:null,typeof w=="function"&&s.removeEventListener(a,w,y),typeof m=="function")){typeof w!="function"&&w!==null&&(l in s?s[l]=null:s.hasAttribute(l)&&s.removeAttribute(l)),s.addEventListener(a,m,y);break t}l in s?s[l]=m:m===!0?s.setAttribute(l,""):gs(s,l,m)}}}function zs(s,a,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":mn("error",s),mn("load",s);var m=!1,y=!1,w;for(w in l)if(l.hasOwnProperty(w)){var k=l[w];if(k!=null)switch(w){case"src":m=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Hn(s,a,w,k,l,null)}}y&&Hn(s,a,"srcSet",l.srcSet,l,null),m&&Hn(s,a,"src",l.src,l,null);return;case"input":mn("invalid",s);var V=w=k=y=null,mt=null,Mt=null;for(m in l)if(l.hasOwnProperty(m)){var Bt=l[m];if(Bt!=null)switch(m){case"name":y=Bt;break;case"type":k=Bt;break;case"checked":mt=Bt;break;case"defaultChecked":Mt=Bt;break;case"value":w=Bt;break;case"defaultValue":V=Bt;break;case"children":case"dangerouslySetInnerHTML":if(Bt!=null)throw Error(i(137,a));break;default:Hn(s,a,m,Bt,l,null)}}vs(s,w,V,mt,Mt,k,y,!1);return;case"select":mn("invalid",s),m=k=w=null;for(y in l)if(l.hasOwnProperty(y)&&(V=l[y],V!=null))switch(y){case"value":w=V;break;case"defaultValue":k=V;break;case"multiple":m=V;default:Hn(s,a,y,V,l,null)}a=w,l=k,s.multiple=!!m,a!=null?Hi(s,!!m,a,!1):l!=null&&Hi(s,!!m,l,!0);return;case"textarea":mn("invalid",s),w=y=m=null;for(k in l)if(l.hasOwnProperty(k)&&(V=l[k],V!=null))switch(k){case"value":m=V;break;case"defaultValue":y=V;break;case"children":w=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(i(91));break;default:Hn(s,a,k,V,l,null)}ar(s,m,y,w);return;case"option":for(mt in l)if(l.hasOwnProperty(mt)&&(m=l[mt],m!=null))switch(mt){case"selected":s.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Hn(s,a,mt,m,l,null)}return;case"dialog":mn("beforetoggle",s),mn("toggle",s),mn("cancel",s),mn("close",s);break;case"iframe":case"object":mn("load",s);break;case"video":case"audio":for(m=0;m<jd.length;m++)mn(jd[m],s);break;case"image":mn("error",s),mn("load",s);break;case"details":mn("toggle",s);break;case"embed":case"source":case"link":mn("error",s),mn("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Mt in l)if(l.hasOwnProperty(Mt)&&(m=l[Mt],m!=null))switch(Mt){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Hn(s,a,Mt,m,l,null)}return;default:if(ya(a)){for(Bt in l)l.hasOwnProperty(Bt)&&(m=l[Bt],m!==void 0&&yg(s,a,Bt,m,l,void 0));return}}for(V in l)l.hasOwnProperty(V)&&(m=l[V],m!=null&&Hn(s,a,V,m,l,null))}function rE(s,a,l,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,w=null,k=null,V=null,mt=null,Mt=null,Bt=null;for(Pt in l){var qt=l[Pt];if(l.hasOwnProperty(Pt)&&qt!=null)switch(Pt){case"checked":break;case"value":break;case"defaultValue":mt=qt;default:m.hasOwnProperty(Pt)||Hn(s,a,Pt,null,m,qt)}}for(var kt in m){var Pt=m[kt];if(qt=l[kt],m.hasOwnProperty(kt)&&(Pt!=null||qt!=null))switch(kt){case"type":w=Pt;break;case"name":y=Pt;break;case"checked":Mt=Pt;break;case"defaultChecked":Bt=Pt;break;case"value":k=Pt;break;case"defaultValue":V=Pt;break;case"children":case"dangerouslySetInnerHTML":if(Pt!=null)throw Error(i(137,a));break;default:Pt!==qt&&Hn(s,a,kt,Pt,m,qt)}}rr(s,k,V,mt,Mt,Bt,w,y);return;case"select":Pt=k=V=kt=null;for(w in l)if(mt=l[w],l.hasOwnProperty(w)&&mt!=null)switch(w){case"value":break;case"multiple":Pt=mt;default:m.hasOwnProperty(w)||Hn(s,a,w,null,m,mt)}for(y in m)if(w=m[y],mt=l[y],m.hasOwnProperty(y)&&(w!=null||mt!=null))switch(y){case"value":kt=w;break;case"defaultValue":V=w;break;case"multiple":k=w;default:w!==mt&&Hn(s,a,y,w,m,mt)}a=V,l=k,m=Pt,kt!=null?Hi(s,!!l,kt,!1):!!m!=!!l&&(a!=null?Hi(s,!!l,a,!0):Hi(s,!!l,l?[]:"",!1));return;case"textarea":Pt=kt=null;for(V in l)if(y=l[V],l.hasOwnProperty(V)&&y!=null&&!m.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:Hn(s,a,V,null,m,y)}for(k in m)if(y=m[k],w=l[k],m.hasOwnProperty(k)&&(y!=null||w!=null))switch(k){case"value":kt=y;break;case"defaultValue":Pt=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(i(91));break;default:y!==w&&Hn(s,a,k,y,m,w)}nl(s,kt,Pt);return;case"option":for(var ae in l)if(kt=l[ae],l.hasOwnProperty(ae)&&kt!=null&&!m.hasOwnProperty(ae))switch(ae){case"selected":s.selected=!1;break;default:Hn(s,a,ae,null,m,kt)}for(mt in m)if(kt=m[mt],Pt=l[mt],m.hasOwnProperty(mt)&&kt!==Pt&&(kt!=null||Pt!=null))switch(mt){case"selected":s.selected=kt&&typeof kt!="function"&&typeof kt!="symbol";break;default:Hn(s,a,mt,kt,m,Pt)}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 Fe in l)kt=l[Fe],l.hasOwnProperty(Fe)&&kt!=null&&!m.hasOwnProperty(Fe)&&Hn(s,a,Fe,null,m,kt);for(Mt in m)if(kt=m[Mt],Pt=l[Mt],m.hasOwnProperty(Mt)&&kt!==Pt&&(kt!=null||Pt!=null))switch(Mt){case"children":case"dangerouslySetInnerHTML":if(kt!=null)throw Error(i(137,a));break;default:Hn(s,a,Mt,kt,m,Pt)}return;default:if(ya(a)){for(var $n in l)kt=l[$n],l.hasOwnProperty($n)&&kt!==void 0&&!m.hasOwnProperty($n)&&yg(s,a,$n,void 0,m,kt);for(Bt in m)kt=m[Bt],Pt=l[Bt],!m.hasOwnProperty(Bt)||kt===Pt||kt===void 0&&Pt===void 0||yg(s,a,Bt,kt,m,Pt);return}}for(var wt in l)kt=l[wt],l.hasOwnProperty(wt)&&kt!=null&&!m.hasOwnProperty(wt)&&Hn(s,a,wt,null,m,kt);for(qt in m)kt=m[qt],Pt=l[qt],!m.hasOwnProperty(qt)||kt===Pt||kt==null&&Pt==null||Hn(s,a,qt,kt,m,Pt)}function yx(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function aE(){if(typeof performance.getEntriesByType=="function"){for(var s=0,a=0,l=performance.getEntriesByType("resource"),m=0;m<l.length;m++){var y=l[m],w=y.transferSize,k=y.initiatorType,V=y.duration;if(w&&V&&yx(k)){for(k=0,V=y.responseEnd,m+=1;m<l.length;m++){var mt=l[m],Mt=mt.startTime;if(Mt>V)break;var Bt=mt.transferSize,qt=mt.initiatorType;Bt&&yx(qt)&&(mt=mt.responseEnd,k+=Bt*(mt<V?1:(V-Mt)/(mt-Mt)))}if(--m,a+=8*(w+k)/(y.duration/1e3),s++,10<s)break}}if(0<s)return a/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var bg=null,xg=null;function pm(s){return s.nodeType===9?s:s.ownerDocument}function bx(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xx(s,a){if(s===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&a==="foreignObject"?0:s}function wg(s,a){return s==="textarea"||s==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Sg=null;function oE(){var s=window.event;return s&&s.type==="popstate"?s===Sg?!1:(Sg=s,!0):(Sg=null,!1)}var wx=typeof setTimeout=="function"?setTimeout:void 0,lE=typeof clearTimeout=="function"?clearTimeout:void 0,Sx=typeof Promise=="function"?Promise:void 0,cE=typeof queueMicrotask=="function"?queueMicrotask:typeof Sx<"u"?function(s){return Sx.resolve(null).then(s).catch(uE)}:wx;function uE(s){setTimeout(function(){throw s})}function cc(s){return s==="head"}function Nx(s,a){var l=a,m=0;do{var y=l.nextSibling;if(s.removeChild(l),y&&y.nodeType===8)if(l=y.data,l==="/$"||l==="/&"){if(m===0){s.removeChild(y),rh(a);return}m--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")m++;else if(l==="html")Md(s.ownerDocument.documentElement);else if(l==="head"){l=s.ownerDocument.head,Md(l);for(var w=l.firstChild;w;){var k=w.nextSibling,V=w.nodeName;w[Hs]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&w.rel.toLowerCase()==="stylesheet"||l.removeChild(w),w=k}}else l==="body"&&Md(s.ownerDocument.body);l=y}while(l);rh(a)}function Ax(s,a){var l=s;s=0;do{var m=l.nextSibling;if(l.nodeType===1?a?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(a?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),m&&m.nodeType===8)if(l=m.data,l==="/$"){if(s===0)break;s--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||s++;l=m}while(l)}function Ng(s){var a=s.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var l=a;switch(a=a.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Ng(l),$r(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}s.removeChild(l)}}function hE(s,a,l,m){for(;s.nodeType===1;){var y=l;if(s.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(m){if(!s[Hs])switch(a){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(w=s.getAttribute("rel"),w==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(w!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(w=s.getAttribute("src"),(w!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&w&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(a==="input"&&s.type==="hidden"){var w=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===w)return s}else return s;if(s=Pa(s.nextSibling),s===null)break}return null}function dE(s,a,l){if(a==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=Pa(s.nextSibling),s===null))return null;return s}function Cx(s,a){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!a||(s=Pa(s.nextSibling),s===null))return null;return s}function Ag(s){return s.data==="$?"||s.data==="$~"}function Cg(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function fE(s,a){var l=s.ownerDocument;if(s.data==="$~")s._reactRetry=a;else if(s.data!=="$?"||l.readyState!=="loading")a();else{var m=function(){a(),l.removeEventListener("DOMContentLoaded",m)};l.addEventListener("DOMContentLoaded",m),s._reactRetry=m}}function Pa(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return s}var _g=null;function _x(s){s=s.nextSibling;for(var a=0;s;){if(s.nodeType===8){var l=s.data;if(l==="/$"||l==="/&"){if(a===0)return Pa(s.nextSibling);a--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||a++}s=s.nextSibling}return null}function jx(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(a===0)return s;a--}else l!=="/$"&&l!=="/&"||a++}s=s.previousSibling}return null}function Ex(s,a,l){switch(a=pm(l),s){case"html":if(s=a.documentElement,!s)throw Error(i(452));return s;case"head":if(s=a.head,!s)throw Error(i(453));return s;case"body":if(s=a.body,!s)throw Error(i(454));return s;default:throw Error(i(451))}}function Md(s){for(var a=s.attributes;a.length;)s.removeAttributeNode(a[0]);$r(s)}var Ra=new Map,Mx=new Set;function gm(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Cl=at.d;at.d={f:mE,r:pE,D:gE,C:vE,L:yE,m:bE,X:wE,S:xE,M:SE};function mE(){var s=Cl.f(),a=om();return s||a}function pE(s){var a=Ms(s);a!==null&&a.tag===5&&a.type==="form"?Gy(a):Cl.r(s)}var nh=typeof document>"u"?null:document;function Tx(s,a,l){var m=nh;if(m&&typeof a=="string"&&a){var y=di(a);y='link[rel="'+s+'"][href="'+y+'"]',typeof l=="string"&&(y+='[crossorigin="'+l+'"]'),Mx.has(y)||(Mx.add(y),s={rel:s,crossOrigin:l,href:a},m.querySelector(y)===null&&(a=m.createElement("link"),zs(a,"link",s),ei(a),m.head.appendChild(a)))}}function gE(s){Cl.D(s),Tx("dns-prefetch",s,null)}function vE(s,a){Cl.C(s,a),Tx("preconnect",s,a)}function yE(s,a,l){Cl.L(s,a,l);var m=nh;if(m&&s&&a){var y='link[rel="preload"][as="'+di(a)+'"]';a==="image"&&l&&l.imageSrcSet?(y+='[imagesrcset="'+di(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(y+='[imagesizes="'+di(l.imageSizes)+'"]')):y+='[href="'+di(s)+'"]';var w=y;switch(a){case"style":w=ih(s);break;case"script":w=sh(s)}Ra.has(w)||(s=v({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:s,as:a},l),Ra.set(w,s),m.querySelector(y)!==null||a==="style"&&m.querySelector(Td(w))||a==="script"&&m.querySelector(kd(w))||(a=m.createElement("link"),zs(a,"link",s),ei(a),m.head.appendChild(a)))}}function bE(s,a){Cl.m(s,a);var l=nh;if(l&&s){var m=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+di(m)+'"][href="'+di(s)+'"]',w=y;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=sh(s)}if(!Ra.has(w)&&(s=v({rel:"modulepreload",href:s},a),Ra.set(w,s),l.querySelector(y)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(kd(w)))return}m=l.createElement("link"),zs(m,"link",s),ei(m),l.head.appendChild(m)}}}function xE(s,a,l){Cl.S(s,a,l);var m=nh;if(m&&s){var y=Sr(m).hoistableStyles,w=ih(s);a=a||"default";var k=y.get(w);if(!k){var V={loading:0,preload:null};if(k=m.querySelector(Td(w)))V.loading=5;else{s=v({rel:"stylesheet",href:s,"data-precedence":a},l),(l=Ra.get(w))&&jg(s,l);var mt=k=m.createElement("link");ei(mt),zs(mt,"link",s),mt._p=new Promise(function(Mt,Bt){mt.onload=Mt,mt.onerror=Bt}),mt.addEventListener("load",function(){V.loading|=1}),mt.addEventListener("error",function(){V.loading|=2}),V.loading|=4,vm(k,a,m)}k={type:"stylesheet",instance:k,count:1,state:V},y.set(w,k)}}}function wE(s,a){Cl.X(s,a);var l=nh;if(l&&s){var m=Sr(l).hoistableScripts,y=sh(s),w=m.get(y);w||(w=l.querySelector(kd(y)),w||(s=v({src:s,async:!0},a),(a=Ra.get(y))&&Eg(s,a),w=l.createElement("script"),ei(w),zs(w,"link",s),l.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(y,w))}}function SE(s,a){Cl.M(s,a);var l=nh;if(l&&s){var m=Sr(l).hoistableScripts,y=sh(s),w=m.get(y);w||(w=l.querySelector(kd(y)),w||(s=v({src:s,async:!0,type:"module"},a),(a=Ra.get(y))&&Eg(s,a),w=l.createElement("script"),ei(w),zs(w,"link",s),l.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},m.set(y,w))}}function kx(s,a,l,m){var y=(y=ht.current)?gm(y):null;if(!y)throw Error(i(446));switch(s){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=ih(l.href),l=Sr(y).hoistableStyles,m=l.get(a),m||(m={type:"style",instance:null,count:0,state:null},l.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){s=ih(l.href);var w=Sr(y).hoistableStyles,k=w.get(s);if(k||(y=y.ownerDocument||y,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(s,k),(w=y.querySelector(Td(s)))&&!w._p&&(k.instance=w,k.state.loading=5),Ra.has(s)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ra.set(s,l),w||NE(y,s,l,k.state))),a&&m===null)throw Error(i(528,""));return k}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=l.async,l=l.src,typeof l=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=sh(l),l=Sr(y).hoistableScripts,m=l.get(a),m||(m={type:"script",instance:null,count:0,state:null},l.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,s))}}function ih(s){return'href="'+di(s)+'"'}function Td(s){return'link[rel="stylesheet"]['+s+"]"}function Lx(s){return v({},s,{"data-precedence":s.precedence,precedence:null})}function NE(s,a,l,m){s.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=s.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),zs(a,"link",l),ei(a),s.head.appendChild(a))}function sh(s){return'[src="'+di(s)+'"]'}function kd(s){return"script[async]"+s}function Px(s,a,l){if(a.count++,a.instance===null)switch(a.type){case"style":var m=s.querySelector('style[data-href~="'+di(l.href)+'"]');if(m)return a.instance=m,ei(m),m;var y=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return m=(s.ownerDocument||s).createElement("style"),ei(m),zs(m,"style",y),vm(m,l.precedence,s),a.instance=m;case"stylesheet":y=ih(l.href);var w=s.querySelector(Td(y));if(w)return a.state.loading|=4,a.instance=w,ei(w),w;m=Lx(l),(y=Ra.get(y))&&jg(m,y),w=(s.ownerDocument||s).createElement("link"),ei(w);var k=w;return k._p=new Promise(function(V,mt){k.onload=V,k.onerror=mt}),zs(w,"link",m),a.state.loading|=4,vm(w,l.precedence,s),a.instance=w;case"script":return w=sh(l.src),(y=s.querySelector(kd(w)))?(a.instance=y,ei(y),y):(m=l,(y=Ra.get(w))&&(m=v({},l),Eg(m,y)),s=s.ownerDocument||s,y=s.createElement("script"),ei(y),zs(y,"link",m),s.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,vm(m,l.precedence,s));return a.instance}function vm(s,a,l){for(var m=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=m.length?m[m.length-1]:null,w=y,k=0;k<m.length;k++){var V=m[k];if(V.dataset.precedence===a)w=V;else if(w!==y)break}w?w.parentNode.insertBefore(s,w.nextSibling):(a=l.nodeType===9?l.head:l,a.insertBefore(s,a.firstChild))}function jg(s,a){s.crossOrigin==null&&(s.crossOrigin=a.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=a.referrerPolicy),s.title==null&&(s.title=a.title)}function Eg(s,a){s.crossOrigin==null&&(s.crossOrigin=a.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=a.referrerPolicy),s.integrity==null&&(s.integrity=a.integrity)}var ym=null;function Rx(s,a,l){if(ym===null){var m=new Map,y=ym=new Map;y.set(l,m)}else y=ym,m=y.get(l),m||(m=new Map,y.set(l,m));if(m.has(s))return m;for(m.set(s,null),l=l.getElementsByTagName(s),y=0;y<l.length;y++){var w=l[y];if(!(w[Hs]||w[jn]||s==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var k=w.getAttribute(a)||"";k=s+k;var V=m.get(k);V?V.push(w):m.set(k,[w])}}return m}function Dx(s,a,l){s=s.ownerDocument||s,s.head.insertBefore(l,a==="title"?s.querySelector("head > title"):null)}function AE(s,a,l){if(l===1||a.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return s=a.disabled,typeof a.precedence=="string"&&s==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ox(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function CE(s,a,l,m){if(l.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var y=ih(m.href),w=a.querySelector(Td(y));if(w){a=w._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(s.count++,s=bm.bind(s),a.then(s,s)),l.state.loading|=4,l.instance=w,ei(w);return}w=a.ownerDocument||a,m=Lx(m),(y=Ra.get(y))&&jg(m,y),w=w.createElement("link"),ei(w);var k=w;k._p=new Promise(function(V,mt){k.onload=V,k.onerror=mt}),zs(w,"link",m),l.instance=w}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(s.count++,l=bm.bind(s),a.addEventListener("load",l),a.addEventListener("error",l))}}var Mg=0;function _E(s,a){return s.stylesheets&&s.count===0&&wm(s,s.stylesheets),0<s.count||0<s.imgCount?function(l){var m=setTimeout(function(){if(s.stylesheets&&wm(s,s.stylesheets),s.unsuspend){var w=s.unsuspend;s.unsuspend=null,w()}},6e4+a);0<s.imgBytes&&Mg===0&&(Mg=62500*aE());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&wm(s,s.stylesheets),s.unsuspend)){var w=s.unsuspend;s.unsuspend=null,w()}},(s.imgBytes>Mg?50:800)+a);return s.unsuspend=l,function(){s.unsuspend=null,clearTimeout(m),clearTimeout(y)}}:null}function bm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wm(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var xm=null;function wm(s,a){s.stylesheets=null,s.unsuspend!==null&&(s.count++,xm=new Map,a.forEach(jE,s),xm=null,bm.call(s))}function jE(s,a){if(!(a.state.loading&4)){var l=xm.get(s);if(l)var m=l.get(null);else{l=new Map,xm.set(s,l);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<y.length;w++){var k=y[w];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(l.set(k.dataset.precedence,k),m=k)}m&&l.set(null,m)}y=a.instance,k=y.getAttribute("data-precedence"),w=l.get(k)||m,w===m&&l.set(null,y),l.set(k,y),this.count++,m=bm.bind(this),y.addEventListener("load",m),y.addEventListener("error",m),w?w.parentNode.insertBefore(y,w.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),a.state.loading|=4}}var Ld={$$typeof:D,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function EE(s,a,l,m,y,w,k,V,mt){this.tag=1,this.containerInfo=s,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=Li(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Li(0),this.hiddenUpdates=Li(null),this.identifierPrefix=m,this.onUncaughtError=y,this.onCaughtError=w,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=mt,this.incompleteTransitions=new Map}function zx(s,a,l,m,y,w,k,V,mt,Mt,Bt,qt){return s=new EE(s,a,l,k,mt,Mt,Bt,qt,V),a=1,w===!0&&(a|=24),w=ws(3,null,null,a),s.current=w,w.stateNode=s,a=Ql(),a.refCount++,s.pooledCache=a,a.refCount++,w.memoizedState={element:m,isDehydrated:l,cache:a},Kt(w),s}function Bx(s){return s?(s=ls,s):ls}function Fx(s,a,l,m,y,w){y=Bx(y),m.context===null?m.context=y:m.pendingContext=y,m=Be(a),m.payload={element:l},w=w===void 0?null:w,w!==null&&(m.callback=w),l=tn(s,m,a),l!==null&&(Ur(l,s,a),Pn(l,s,a))}function Ix(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<a?l:a}}function Tg(s,a){Ix(s,a),(s=s.alternate)&&Ix(s,a)}function Ux(s){if(s.tag===13||s.tag===31){var a=Ja(s,67108864);a!==null&&Ur(a,s,67108864),Tg(s,67108864)}}function qx(s){if(s.tag===13||s.tag===31){var a=oa();a=On(a);var l=Ja(s,a);l!==null&&Ur(l,s,a),Tg(s,a)}}var Sm=!0;function ME(s,a,l,m){var y=J.T;J.T=null;var w=at.p;try{at.p=2,kg(s,a,l,m)}finally{at.p=w,J.T=y}}function TE(s,a,l,m){var y=J.T;J.T=null;var w=at.p;try{at.p=8,kg(s,a,l,m)}finally{at.p=w,J.T=y}}function kg(s,a,l,m){if(Sm){var y=Lg(m);if(y===null)vg(s,a,m,Nm,l),Hx(s,m);else if(LE(y,s,a,l,m))m.stopPropagation();else if(Hx(s,m),a&4&&-1<kE.indexOf(s)){for(;y!==null;){var w=Ms(y);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var k=be(w.pendingLanes);if(k!==0){var V=w;for(V.pendingLanes|=2,V.entangledLanes|=2;k;){var mt=1<<31-rn(k);V.entanglements[1]|=mt,k&=~mt}Fo(w),(Dn&6)===0&&(rm=ye()+500,_d(0))}}break;case 31:case 13:V=Ja(w,2),V!==null&&Ur(V,w,2),om(),Tg(w,2)}if(w=Lg(m),w===null&&vg(s,a,m,Nm,l),w===y)break;y=w}y!==null&&m.stopPropagation()}else vg(s,a,m,null,l)}}function Lg(s){return s=qa(s),Pg(s)}var Nm=null;function Pg(s){if(Nm=null,s=Es(s),s!==null){var a=o(s);if(a===null)s=null;else{var l=a.tag;if(l===13){if(s=c(a),s!==null)return s;s=null}else if(l===31){if(s=u(a),s!==null)return s;s=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null)}}return Nm=s,null}function Vx(s){switch(s){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(nn()){case Ue:return 2;case on:return 8;case je:case le:return 32;case qe:return 268435456;default:return 32}default:return 32}}var Rg=!1,uc=null,hc=null,dc=null,Pd=new Map,Rd=new Map,fc=[],kE="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 Hx(s,a){switch(s){case"focusin":case"focusout":uc=null;break;case"dragenter":case"dragleave":hc=null;break;case"mouseover":case"mouseout":dc=null;break;case"pointerover":case"pointerout":Pd.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rd.delete(a.pointerId)}}function Dd(s,a,l,m,y,w){return s===null||s.nativeEvent!==w?(s={blockedOn:a,domEventName:l,eventSystemFlags:m,nativeEvent:w,targetContainers:[y]},a!==null&&(a=Ms(a),a!==null&&Ux(a)),s):(s.eventSystemFlags|=m,a=s.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),s)}function LE(s,a,l,m,y){switch(a){case"focusin":return uc=Dd(uc,s,a,l,m,y),!0;case"dragenter":return hc=Dd(hc,s,a,l,m,y),!0;case"mouseover":return dc=Dd(dc,s,a,l,m,y),!0;case"pointerover":var w=y.pointerId;return Pd.set(w,Dd(Pd.get(w)||null,s,a,l,m,y)),!0;case"gotpointercapture":return w=y.pointerId,Rd.set(w,Dd(Rd.get(w)||null,s,a,l,m,y)),!0}return!1}function $x(s){var a=Es(s.target);if(a!==null){var l=o(a);if(l!==null){if(a=l.tag,a===13){if(a=c(l),a!==null){s.blockedOn=a,pa(s.priority,function(){qx(l)});return}}else if(a===31){if(a=u(l),a!==null){s.blockedOn=a,pa(s.priority,function(){qx(l)});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Am(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var l=Lg(s.nativeEvent);if(l===null){l=s.nativeEvent;var m=new l.constructor(l.type,l);or=m,l.target.dispatchEvent(m),or=null}else return a=Ms(l),a!==null&&Ux(a),s.blockedOn=l,!1;a.shift()}return!0}function Gx(s,a,l){Am(s)&&l.delete(a)}function PE(){Rg=!1,uc!==null&&Am(uc)&&(uc=null),hc!==null&&Am(hc)&&(hc=null),dc!==null&&Am(dc)&&(dc=null),Pd.forEach(Gx),Rd.forEach(Gx)}function Cm(s,a){s.blockedOn===a&&(s.blockedOn=null,Rg||(Rg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,PE)))}var _m=null;function Yx(s){_m!==s&&(_m=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){_m===s&&(_m=null);for(var a=0;a<s.length;a+=3){var l=s[a],m=s[a+1],y=s[a+2];if(typeof m!="function"){if(Pg(m||l)===null)continue;break}var w=Ms(l);w!==null&&(s.splice(a,3),a-=3,L0(w,{pending:!0,data:y,method:l.method,action:m},m,y))}}))}function rh(s){function a(mt){return Cm(mt,s)}uc!==null&&Cm(uc,s),hc!==null&&Cm(hc,s),dc!==null&&Cm(dc,s),Pd.forEach(a),Rd.forEach(a);for(var l=0;l<fc.length;l++){var m=fc[l];m.blockedOn===s&&(m.blockedOn=null)}for(;0<fc.length&&(l=fc[0],l.blockedOn===null);)$x(l),l.blockedOn===null&&fc.shift();if(l=(s.ownerDocument||s).$$reactFormReplay,l!=null)for(m=0;m<l.length;m+=3){var y=l[m],w=l[m+1],k=y[En]||null;if(typeof w=="function")k||Yx(l);else if(k){var V=null;if(w&&w.hasAttribute("formAction")){if(y=w,k=w[En]||null)V=k.formAction;else if(Pg(y)!==null)continue}else V=k.action;typeof V=="function"?l[m+1]=V:(l.splice(m,3),m-=3),Yx(l)}}}function Wx(){function s(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(k){return y=k})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),m||setTimeout(l,20)}function l(){if(!m&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(l,100),function(){m=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Dg(s){this._internalRoot=s}jm.prototype.render=Dg.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(i(409));var l=a.current,m=oa();Fx(l,m,s,a,null,null)},jm.prototype.unmount=Dg.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;Fx(s.current,2,null,s,null,null),om(),a[Ji]=null}};function jm(s){this._internalRoot=s}jm.prototype.unstable_scheduleHydration=function(s){if(s){var a=ti();s={blockedOn:null,target:s,priority:a};for(var l=0;l<fc.length&&a!==0&&a<fc[l].priority;l++);fc.splice(l,0,s),l===0&&$x(s)}};var Kx=t.version;if(Kx!=="19.2.0")throw Error(i(527,Kx,"19.2.0"));at.findDOMNode=function(s){var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(i(188)):(s=Object.keys(s).join(","),Error(i(268,s)));return s=d(a),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var RE={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:J,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Em=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Em.isDisabled&&Em.supportsFiber)try{sn=Em.inject(RE),Jt=Em}catch{}}return zd.createRoot=function(s,a){if(!r(s))throw Error(i(299));var l=!1,m="",y=nb,w=ib,k=sb;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(w=a.onCaughtError),a.onRecoverableError!==void 0&&(k=a.onRecoverableError)),a=zx(s,1,!1,null,null,l,m,null,y,w,k,Wx),s[Ji]=a.current,gg(s),new Dg(a)},zd.hydrateRoot=function(s,a,l){if(!r(s))throw Error(i(299));var m=!1,y="",w=nb,k=ib,V=sb,mt=null;return l!=null&&(l.unstable_strictMode===!0&&(m=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onUncaughtError!==void 0&&(w=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(V=l.onRecoverableError),l.formState!==void 0&&(mt=l.formState)),a=zx(s,1,!0,a,l??null,m,y,mt,w,k,V,Wx),a.context=Bx(null),l=a.current,m=oa(),m=On(m),y=Be(m),y.callback=null,tn(l,y,m),l=m,a.current.lanes=l,Ne(a,l),Fo(a),s[Ji]=a.current,gg(s),new jm(a)},zd.version="19.2.0",zd}var r5;function HE(){if(r5)return zg.exports;r5=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zg.exports=VE(),zg.exports}var $E=HE();function GE(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,i,r,o,c=[],u="",h=e.split("/");for(h[0]||h.shift();r=h.shift();)n=r[0],n==="*"?(c.push(n),u+=r[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(i=r.indexOf("?",1),o=r.indexOf(".",1),c.push(r.substring(1,~i?i:~o?o:r.length)),u+=~i&&!~o?"(?:/([^/]+?))?":"/([^/]+?)",~o&&(u+=(~i?"?":"")+"\\"+r.substring(o))):u+="/"+r;return{keys:c,pattern:new RegExp("^"+u+(t?"(?=$|/)":"/?$"),"i")}}var M=Qp();const mr=_S(M),Af=OE({__proto__:null,default:mr},[M]);var qg={exports:{}},Vg={};/**
 * @license React
 * use-sync-external-store-shim.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 a5;function YE(){if(a5)return Vg;a5=1;var e=Qp();function t(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,r=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function u(v,S){var b=S(),_=i({inst:{value:b,getSnapshot:S}}),A=_[0].inst,j=_[1];return o(function(){A.value=b,A.getSnapshot=S,h(A)&&j({inst:A})},[v,b,S]),r(function(){return h(A)&&j({inst:A}),v(function(){h(A)&&j({inst:A})})},[v]),c(b),b}function h(v){var S=v.getSnapshot;v=v.value;try{var b=S();return!n(v,b)}catch{return!0}}function d(v,S){return S()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:u;return Vg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Vg}var o5;function WE(){return o5||(o5=1,qg.exports=YE()),qg.exports}var KE=WE();const XE=Af.useInsertionEffect,QE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ZE=QE?M.useLayoutEffect:M.useEffect,JE=XE||ZE,ES=e=>{const t=M.useRef([e,(...n)=>t[0](...n)]).current;return JE(()=>{t[0]=e}),t[1]},tM="popstate",v2="pushState",y2="replaceState",eM="hashchange",l5=[tM,v2,y2,eM],nM=e=>{for(const t of l5)addEventListener(t,e);return()=>{for(const t of l5)removeEventListener(t,e)}},MS=(e,t)=>KE.useSyncExternalStore(nM,e,t),iM=()=>location.search,sM=({ssrSearch:e=""}={})=>MS(iM,()=>e),c5=()=>location.pathname,rM=({ssrPath:e}={})=>MS(c5,e?()=>e:c5),aM=(e,{replace:t=!1,state:n=null}={})=>history[t?y2:v2](n,"",e),oM=(e={})=>[rM(e),aM],u5=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[u5]>"u"){for(const e of[v2,y2]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),i=new Event(e);return i.arguments=arguments,dispatchEvent(i),n}}Object.defineProperty(window,u5,{value:!0})}const lM=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",TS=(e="")=>e==="/"?"":e,cM=(e,t)=>e[0]==="~"?e.slice(1):TS(t)+e,uM=(e="",t)=>lM(cv(TS(e)),cv(t)),hM=e=>e[0]==="?"?e.slice(1):e,cv=e=>{try{return decodeURI(e)}catch{return e}},dM=e=>cv(hM(e)),kS={hook:oM,searchHook:sM,parser:GE,base:"",ssrPath:void 0,ssrSearch:void 0,hrefs:e=>e},LS=M.createContext(kS),$h=()=>M.useContext(LS),PS={},RS=M.createContext(PS),fM=()=>M.useContext(RS),Zp=e=>{const[t,n]=e.hook(e);return[uM(e.base,t),ES((i,r)=>n(cM(i,e.base),r))]},mM=()=>Zp($h()),pM=()=>{const e=$h();return dM(e.searchHook(e))},DS=(e,t,n,i)=>{const{pattern:r,keys:o}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",i),c=r.exec(n)||[],[u,...h]=c;return u!==void 0?[!0,(()=>{const d=o!==!1?Object.fromEntries(o.map((v,S)=>[v,h[S]])):c.groups;let p={...h};return d&&Object.assign(p,d),p})(),...i?[u]:[]]:[!1,null]},gM=({children:e,...t})=>{const n=$h(),i=t.hook?kS:n;let r=i;const[o,c]=t.ssrPath?.split("?")??[];c&&(t.ssrSearch=c,t.ssrPath=o),t.hrefs=t.hrefs??t.hook?.hrefs;let u=M.useRef({}),h=u.current,d=h;for(let p in i){const v=p==="base"?i[p]+(t[p]||""):t[p]||i[p];h===d&&v!==d[p]&&(u.current=d={...d}),d[p]=v,v!==i[p]&&(r=d)}return M.createElement(LS.Provider,{value:r,children:e})},h5=({children:e,component:t},n)=>t?M.createElement(t,{params:n}):typeof e=="function"?e(n):e,vM=e=>{let t=M.useRef(PS),n=t.current;for(const i in e)e[i]!==n[i]&&(n=e);return Object.keys(e).length===0&&(n=e),t.current=n},Mm=({path:e,nest:t,match:n,...i})=>{const r=$h(),[o]=Zp(r),[c,u,h]=n??DS(r.parser,e,o,t),d=vM({...fM(),...u});if(!c)return null;const p=h?M.createElement(gM,{base:h},h5(i,d)):h5(i,d);return M.createElement(RS.Provider,{value:d,children:p})},ou=M.forwardRef((e,t)=>{const n=$h(),[i,r]=Zp(n),{to:o="",href:c=o,onClick:u,asChild:h,children:d,className:p,replace:v,state:S,...b}=e,_=ES(j=>{j.ctrlKey||j.metaKey||j.altKey||j.shiftKey||j.button!==0||(u?.(j),j.defaultPrevented||(j.preventDefault(),r(c,e)))}),A=n.hrefs(c[0]==="~"?c.slice(1):n.base+c,n);return h&&M.isValidElement(d)?M.cloneElement(d,{onClick:_,href:A}):M.createElement("a",{...b,onClick:_,href:A,className:p?.call?p(i===c):p,children:d,ref:t})}),OS=e=>Array.isArray(e)?e.flatMap(t=>OS(t&&t.type===M.Fragment?t.props.children:t)):[e],yM=({children:e,location:t})=>{const n=$h(),[i]=Zp(n);for(const r of OS(e)){let o=0;if(M.isValidElement(r)&&(o=DS(n.parser,r.props.path,t||i,r.props.nest))[0])return M.cloneElement(r,{match:o})}return null};var Jp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},t0=typeof window>"u"||"Deno"in globalThis;function co(){}function bM(e,t){return typeof e=="function"?e(t):e}function xM(e){return typeof e=="number"&&e>=0&&e!==1/0}function wM(e,t){return Math.max(e+(t||0)-Date.now(),0)}function d5(e,t){return typeof e=="function"?e(t):e}function SM(e,t){return typeof e=="function"?e(t):e}function f5(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:o,queryKey:c,stale:u}=e;if(c){if(i){if(t.queryHash!==b2(c,t.options))return!1}else if(!cf(t.queryKey,c))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||r&&r!==t.state.fetchStatus||o&&!o(t))}function m5(e,t){const{exact:n,status:i,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(lf(t.options.mutationKey)!==lf(o))return!1}else if(!cf(t.options.mutationKey,o))return!1}return!(i&&t.state.status!==i||r&&!r(t))}function b2(e,t){return(t?.queryKeyHashFn||lf)(e)}function lf(e){return JSON.stringify(e,(t,n)=>uv(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function cf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!cf(e[n],t[n])):!1}function zS(e,t){if(e===t)return e;const n=p5(e)&&p5(t);if(n||uv(e)&&uv(t)){const i=n?e:Object.keys(e),r=i.length,o=n?t:Object.keys(t),c=o.length,u=n?[]:{};let h=0;for(let d=0;d<c;d++){const p=n?d:o[d];(!n&&i.includes(p)||n)&&e[p]===void 0&&t[p]===void 0?(u[p]=void 0,h++):(u[p]=zS(e[p],t[p]),u[p]===e[p]&&e[p]!==void 0&&h++)}return r===c&&h===r?e:u}return t}function p5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function uv(e){if(!g5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!g5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function g5(e){return Object.prototype.toString.call(e)==="[object Object]"}function NM(e){return new Promise(t=>{setTimeout(t,e)})}function AM(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zS(e,t):t}function CM(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function _M(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var x2=Symbol();function BS(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===x2?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var jM=class extends Jp{#t;#e;#n;constructor(){super(),this.#n=e=>{if(!t0&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},FS=new jM,EM=class extends Jp{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!t0&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},_p=new EM;function MM(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),e(r)},n.reject=r=>{i({status:"rejected",reason:r}),t(r)},n}function TM(e){return Math.min(1e3*2**e,3e4)}function IS(e){return(e??"online")==="online"?_p.isOnline():!0}var US=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Hg(e){return e instanceof US}function qS(e){let t=!1,n=0,i=!1,r;const o=MM(),c=A=>{i||(S(new US(A)),e.abort?.())},u=()=>{t=!0},h=()=>{t=!1},d=()=>FS.isFocused()&&(e.networkMode==="always"||_p.isOnline())&&e.canRun(),p=()=>IS(e.networkMode)&&e.canRun(),v=A=>{i||(i=!0,e.onSuccess?.(A),r?.(),o.resolve(A))},S=A=>{i||(i=!0,e.onError?.(A),r?.(),o.reject(A))},b=()=>new Promise(A=>{r=j=>{(i||d())&&A(j)},e.onPause?.()}).then(()=>{r=void 0,i||e.onContinue?.()}),_=()=>{if(i)return;let A;const j=n===0?e.initialPromise:void 0;try{A=j??e.fn()}catch(E){A=Promise.reject(E)}Promise.resolve(A).then(v).catch(E=>{if(i)return;const L=e.retry??(t0?0:3),D=e.retryDelay??TM,z=typeof D=="function"?D(n,E):D,$=L===!0||typeof L=="number"&&n<L||typeof L=="function"&&L(n,E);if(t||!$){S(E);return}n++,e.onFail?.(n,E),NM(z).then(()=>d()?void 0:b()).then(()=>{t?S(E):_()})})};return{promise:o,cancel:c,continue:()=>(r?.(),o),cancelRetry:u,continueRetry:h,canStart:p,start:()=>(p()?_():b().then(_),o)}}function kM(){let e=[],t=0,n=u=>{u()},i=u=>{u()},r=u=>setTimeout(u,0);const o=u=>{t?e.push(u):r(()=>{n(u)})},c=()=>{const u=e;e=[],u.length&&r(()=>{i(()=>{u.forEach(h=>{n(h)})})})};return{batch:u=>{let h;t++;try{h=u()}finally{t--,t||c()}return h},batchCalls:u=>(...h)=>{o(()=>{u(...h)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{r=u}}}var pr=kM(),VS=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xM(this.gcTime)&&(this.#t=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(t0?1/0:300*1e3))}clearGcTimeout(){this.#t&&(clearTimeout(this.#t),this.#t=void 0)}},LM=class extends VS{#t;#e;#n;#i;#a;#r;constructor(e){super(),this.#r=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=RM(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=AM(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(co).catch(co):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>SM(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===x2||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!wM(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#r?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(h=>h.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#r=!0,n.signal)})},r=()=>{const u=BS(this.options,t),h={queryKey:this.queryKey,meta:this.meta};return i(h),this.#r=!1,this.options.persister?this.options.persister(u,h,this):u(h)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:r};i(o),this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta});const c=u=>{Hg(u)&&u.silent||this.#s({type:"error",error:u}),Hg(u)||(this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this)),this.scheduleGc()};return this.#i=qS({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:u=>{if(u===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(h){c(h);return}this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),this.scheduleGc()},onError:c,onFail:(u,h)=>{this.#s({type:"failed",failureCount:u,error:h})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#i.start()}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...PM(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return Hg(i)&&i.revert&&this.#e?{...this.#e,fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),pr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function PM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:IS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function RM(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var DM=class extends Jp{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const i=t.queryKey,r=t.queryHash??b2(i,t);let o=this.get(r);return o||(o=new LM({cache:this,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){pr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>f5(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>f5(e,n)):t}notify(e){pr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){pr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},OM=class extends VS{#t;#e;#n;constructor(e){super(),this.mutationId=e.mutationId,this.#e=e.mutationCache,this.#t=[],this.state=e.state||zM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){this.#n=qS({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(i,r)=>{this.#i({type:"failed",failureCount:i,error:r})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const t=this.state.status==="pending",n=!this.#n.canStart();try{if(!t){this.#i({type:"pending",variables:e,isPaused:n}),await this.#e.config.onMutate?.(e,this);const r=await this.options.onMutate?.(e);r!==this.state.context&&this.#i({type:"pending",context:r,variables:e,isPaused:n})}const i=await this.#n.start();return await this.#e.config.onSuccess?.(i,e,this.state.context,this),await this.options.onSuccess?.(i,e,this.state.context),await this.#e.config.onSettled?.(i,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(i,null,e,this.state.context),this.#i({type:"success",data:i}),i}catch(i){try{throw await this.#e.config.onError?.(i,e,this.state.context,this),await this.options.onError?.(i,e,this.state.context),await this.#e.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,i,e,this.state.context),i}finally{this.#i({type:"error",error:i})}}finally{this.#e.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),pr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#e.notify({mutation:this,type:"updated",action:e})})}};function zM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var BM=class extends Jp{constructor(e={}){super(),this.config=e,this.#t=new Map,this.#e=Date.now()}#t;#e;build(e,t,n){const i=new OM({mutationCache:this,mutationId:++this.#e,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){const t=Tm(e),n=this.#t.get(t)??[];n.push(e),this.#t.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=Tm(e);if(this.#t.has(t)){const n=this.#t.get(t)?.filter(i=>i!==e);n&&(n.length===0?this.#t.delete(t):this.#t.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#t.get(Tm(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#t.get(Tm(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){pr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#t.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>m5(t,n))}findAll(e={}){return this.getAll().filter(t=>m5(e,t))}notify(e){pr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return pr.batch(()=>Promise.all(e.map(t=>t.continue().catch(co))))}};function Tm(e){return e.options.scope?.id??String(e.mutationId)}function v5(e){return{onFetch:(t,n)=>{const i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},h=0;const d=async()=>{let p=!1;const v=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},S=BS(t.options,t.fetchOptions),b=async(_,A,j)=>{if(p)return Promise.reject();if(A==null&&_.pages.length)return Promise.resolve(_);const E={queryKey:t.queryKey,pageParam:A,direction:j?"backward":"forward",meta:t.options.meta};v(E);const L=await S(E),{maxPages:D}=t.options,z=j?_M:CM;return{pages:z(_.pages,L,D),pageParams:z(_.pageParams,A,D)}};if(r&&o.length){const _=r==="backward",A=_?FM:y5,j={pages:o,pageParams:c},E=A(i,j);u=await b(j,E,_)}else{const _=e??o.length;do{const A=h===0?c[0]??i.initialPageParam:y5(i,u);if(h>0&&A==null)break;u=await b(u,A),h++}while(h<_)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function y5(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function FM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var IM=class{#t;#e;#n;#i;#a;#r;#s;#o;constructor(e={}){this.#t=e.queryCache||new DM,this.#e=e.mutationCache||new BM,this.#n=e.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#s=FS.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#o=_p.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),i=this.#t.build(this,n);return e.revalidateIfStale&&i.isStaleByTime(d5(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),o=this.#t.get(i.queryHash)?.state.data,c=bM(t,o);if(c!==void 0)return this.#t.build(this,i).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return pr.batch(()=>this.#t.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;pr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t,i={type:"active",...e};return pr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries(i,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},i=pr.batch(()=>this.#t.findAll(e).map(r=>r.cancel(n)));return Promise.all(i).then(co).catch(co)}invalidateQueries(e={},t={}){return pr.batch(()=>{if(this.#t.findAll(e).forEach(i=>{i.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:t?.cancelRefetch??!0},i=pr.batch(()=>this.#t.findAll(e).filter(r=>!r.isDisabled()).map(r=>{let o=r.fetch(void 0,n);return n.throwOnError||(o=o.catch(co)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(co)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(d5(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(co).catch(co)}fetchInfiniteQuery(e){return e.behavior=v5(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(co).catch(co)}ensureInfiniteQueryData(e){return e.behavior=v5(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _p.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#i.set(lf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()];let n={};return t.forEach(i=>{cf(e,i.queryKey)&&(n={...n,...i.defaultOptions})}),n}setMutationDefaults(e,t){this.#a.set(lf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(i=>{cf(e,i.mutationKey)&&(n={...n,...i.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=b2(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===x2&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},UM=M.createContext(void 0),qM=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(UM.Provider,{value:e,children:t}));async function VM(e){if(!e.ok){const t=await e.text()||e.statusText;throw new Error(`${e.status}: ${t}`)}}const HM=({on401:e})=>async({queryKey:t})=>{const n=await fetch(t.join("/"),{credentials:"include"});return await VM(n),await n.json()},$M=new IM({defaultOptions:{queries:{queryFn:HM({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),GM=1,YM=1e6;let $g=0;function WM(){return $g=($g+1)%Number.MAX_SAFE_INTEGER,$g.toString()}const Gg=new Map,b5=e=>{if(Gg.has(e))return;const t=setTimeout(()=>{Gg.delete(e),Yd({type:"REMOVE_TOAST",toastId:e})},YM);Gg.set(e,t)},KM=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,GM)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?b5(n):e.toasts.forEach(i=>{b5(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},lp=[];let cp={toasts:[]};function Yd(e){cp=KM(cp,e),lp.forEach(t=>{t(cp)})}function XM({...e}){const t=WM(),n=r=>Yd({type:"UPDATE_TOAST",toast:{...r,id:t}}),i=()=>Yd({type:"DISMISS_TOAST",toastId:t});return Yd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||i()}}}),{id:t,dismiss:i,update:n}}function QM(){const[e,t]=M.useState(cp);return M.useEffect(()=>(lp.push(t),()=>{const n=lp.indexOf(t);n>-1&&lp.splice(n,1)}),[e]),{...e,toast:XM,dismiss:n=>Yd({type:"DISMISS_TOAST",toastId:n})}}var Cf=jS();const HS=_S(Cf);function ua(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function x5(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Lc(...e){return t=>{let n=!1;const i=e.map(r=>{const o=x5(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():x5(e[r],null)}}}}function Ti(...e){return M.useCallback(Lc(...e),e)}function Pc(e,t=[]){let n=[];function i(o,c){const u=M.createContext(c),h=n.length;n=[...n,c];const d=v=>{const{scope:S,children:b,..._}=v,A=S?.[e]?.[h]||u,j=M.useMemo(()=>_,Object.values(_));return f.jsx(A.Provider,{value:j,children:b})};d.displayName=o+"Provider";function p(v,S){const b=S?.[e]?.[h]||u,_=M.useContext(b);if(_)return _;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${o}\``)}return[d,p]}const r=()=>{const o=n.map(c=>M.createContext(c));return function(u){const h=u?.[e]||o;return M.useMemo(()=>({[`__scope${e}`]:{...u,[e]:h}}),[u,h])}};return r.scopeName=e,[i,ZM(r,...t)]}function ZM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const c=i.reduce((u,{useScope:h,scopeName:d})=>{const v=h(o)[`__scope${d}`];return{...u,...v}},{});return M.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function hv(e){const t=JM(e),n=M.forwardRef((i,r)=>{const{children:o,...c}=i,u=M.Children.toArray(o),h=u.find(eT);if(h){const d=h.props.children,p=u.map(v=>v===h?M.Children.count(d)>1?M.Children.only(null):M.isValidElement(d)?d.props.children:null:v);return f.jsx(t,{...c,ref:r,children:M.isValidElement(d)?M.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function JM(e){const t=M.forwardRef((n,i)=>{const{children:r,...o}=n;if(M.isValidElement(r)){const c=iT(r),u=nT(o,r.props);return r.type!==M.Fragment&&(u.ref=i?Lc(i,c):c),M.cloneElement(r,u)}return M.Children.count(r)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tT=Symbol("radix.slottable");function eT(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tT}function nT(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...u)=>{o(...u),r(...u)}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function iT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function sT(e){const t=e+"CollectionProvider",[n,i]=Pc(t),[r,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=A=>{const{scope:j,children:E}=A,L=mr.useRef(null),D=mr.useRef(new Map).current;return f.jsx(r,{scope:j,itemMap:D,collectionRef:L,children:E})};c.displayName=t;const u=e+"CollectionSlot",h=hv(u),d=mr.forwardRef((A,j)=>{const{scope:E,children:L}=A,D=o(u,E),z=Ti(j,D.collectionRef);return f.jsx(h,{ref:z,children:L})});d.displayName=u;const p=e+"CollectionItemSlot",v="data-radix-collection-item",S=hv(p),b=mr.forwardRef((A,j)=>{const{scope:E,children:L,...D}=A,z=mr.useRef(null),$=Ti(j,z),ut=o(p,E);return mr.useEffect(()=>(ut.itemMap.set(z,{ref:z,...D}),()=>void ut.itemMap.delete(z))),f.jsx(S,{[v]:"",ref:$,children:L})});b.displayName=p;function _(A){const j=o(e+"CollectionConsumer",A);return mr.useCallback(()=>{const L=j.collectionRef.current;if(!L)return[];const D=Array.from(L.querySelectorAll(`[${v}]`));return Array.from(j.itemMap.values()).sort((ut,nt)=>D.indexOf(ut.ref.current)-D.indexOf(nt.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:d,ItemSlot:b},_,i]}var rT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Qo=rT.reduce((e,t)=>{const n=hv(`Primitive.${t}`),i=M.forwardRef((r,o)=>{const{asChild:c,...u}=r,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(h,{...u,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function $S(e,t){e&&Cf.flushSync(()=>e.dispatchEvent(t))}function Us(e){const t=M.useRef(e);return M.useEffect(()=>{t.current=e}),M.useMemo(()=>(...n)=>t.current?.(...n),[])}function GS(e,t=globalThis?.document){const n=Us(e);M.useEffect(()=>{const i=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var aT="DismissableLayer",dv="dismissableLayer.update",oT="dismissableLayer.pointerDownOutside",lT="dismissableLayer.focusOutside",w5,YS=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),WS=M.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:c,onDismiss:u,...h}=e,d=M.useContext(YS),[p,v]=M.useState(null),S=p?.ownerDocument??globalThis?.document,[,b]=M.useState({}),_=Ti(t,nt=>v(nt)),A=Array.from(d.layers),[j]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=A.indexOf(j),L=p?A.indexOf(p):-1,D=d.layersWithOutsidePointerEventsDisabled.size>0,z=L>=E,$=uT(nt=>{const H=nt.target,Q=[...d.branches].some(ct=>ct.contains(H));!z||Q||(r?.(nt),c?.(nt),nt.defaultPrevented||u?.())},S),ut=hT(nt=>{const H=nt.target;[...d.branches].some(ct=>ct.contains(H))||(o?.(nt),c?.(nt),nt.defaultPrevented||u?.())},S);return GS(nt=>{L===d.layers.size-1&&(i?.(nt),!nt.defaultPrevented&&u&&(nt.preventDefault(),u()))},S),M.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(w5=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),S5(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=w5)}},[p,S,n,d]),M.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),S5())},[p,d]),M.useEffect(()=>{const nt=()=>b({});return document.addEventListener(dv,nt),()=>document.removeEventListener(dv,nt)},[]),f.jsx(Qo.div,{...h,ref:_,style:{pointerEvents:D?z?"auto":"none":void 0,...e.style},onFocusCapture:ua(e.onFocusCapture,ut.onFocusCapture),onBlurCapture:ua(e.onBlurCapture,ut.onBlurCapture),onPointerDownCapture:ua(e.onPointerDownCapture,$.onPointerDownCapture)})});WS.displayName=aT;var cT="DismissableLayerBranch",KS=M.forwardRef((e,t)=>{const n=M.useContext(YS),i=M.useRef(null),r=Ti(t,i);return M.useEffect(()=>{const o=i.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),f.jsx(Qo.div,{...e,ref:r})});KS.displayName=cT;function uT(e,t=globalThis?.document){const n=Us(e),i=M.useRef(!1),r=M.useRef(()=>{});return M.useEffect(()=>{const o=u=>{if(u.target&&!i.current){let h=function(){XS(oT,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=h,t.addEventListener("click",r.current,{once:!0})):h()}else t.removeEventListener("click",r.current);i.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",o),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function hT(e,t=globalThis?.document){const n=Us(e),i=M.useRef(!1);return M.useEffect(()=>{const r=o=>{o.target&&!i.current&&XS(lT,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function S5(){const e=new CustomEvent(dv);document.dispatchEvent(e)}function XS(e,t,n,{discrete:i}){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?$S(r,o):r.dispatchEvent(o)}var dT=WS,fT=KS,ma=globalThis?.document?M.useLayoutEffect:()=>{},mT="Portal",QS=M.forwardRef((e,t)=>{const{container:n,...i}=e,[r,o]=M.useState(!1);ma(()=>o(!0),[]);const c=n||r&&globalThis?.document?.body;return c?HS.createPortal(f.jsx(Qo.div,{...i,ref:t}),c):null});QS.displayName=mT;function pT(e,t){return M.useReducer((n,i)=>t[n][i]??n,e)}var ZS=e=>{const{present:t,children:n}=e,i=gT(t),r=typeof n=="function"?n({present:i.isPresent}):M.Children.only(n),o=Ti(i.ref,vT(r));return typeof n=="function"||i.isPresent?M.cloneElement(r,{ref:o}):null};ZS.displayName="Presence";function gT(e){const[t,n]=M.useState(),i=M.useRef({}),r=M.useRef(e),o=M.useRef("none"),c=e?"mounted":"unmounted",[u,h]=pT(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const d=km(i.current);o.current=u==="mounted"?d:"none"},[u]),ma(()=>{const d=i.current,p=r.current;if(p!==e){const S=o.current,b=km(d);e?h("MOUNT"):b==="none"||d?.display==="none"?h("UNMOUNT"):h(p&&S!==b?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,h]),ma(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,v=b=>{const A=km(i.current).includes(b.animationName);if(b.target===t&&A&&(h("ANIMATION_END"),!r.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},S=b=>{b.target===t&&(o.current=km(i.current))};return t.addEventListener("animationstart",S),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",S),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:M.useCallback(d=>{d&&(i.current=getComputedStyle(d)),n(d)},[])}}function km(e){return e?.animationName||"none"}function vT(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yT({prop:e,defaultProp:t,onChange:n=()=>{}}){const[i,r]=bT({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:i,u=Us(n),h=M.useCallback(d=>{if(o){const v=typeof d=="function"?d(e):d;v!==e&&u(v)}else r(d)},[o,e,r,u]);return[c,h]}function bT({defaultProp:e,onChange:t}){const n=M.useState(e),[i]=n,r=M.useRef(i),o=Us(t);return M.useEffect(()=>{r.current!==i&&(o(i),r.current=i)},[i,r,o]),n}var xT="VisuallyHidden",w2=M.forwardRef((e,t)=>f.jsx(Qo.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));w2.displayName=xT;var S2="ToastProvider",[N2,wT,ST]=sT("Toast"),[JS]=Pc("Toast",[ST]),[NT,e0]=JS(S2),tN=e=>{const{__scopeToast:t,label:n="Notification",duration:i=5e3,swipeDirection:r="right",swipeThreshold:o=50,children:c}=e,[u,h]=M.useState(null),[d,p]=M.useState(0),v=M.useRef(!1),S=M.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${S2}\`. Expected non-empty \`string\`.`),f.jsx(N2.Provider,{scope:t,children:f.jsx(NT,{scope:t,label:n,duration:i,swipeDirection:r,swipeThreshold:o,toastCount:d,viewport:u,onViewportChange:h,onToastAdd:M.useCallback(()=>p(b=>b+1),[]),onToastRemove:M.useCallback(()=>p(b=>b-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:S,children:c})})};tN.displayName=S2;var eN="ToastViewport",AT=["F8"],fv="toast.viewportPause",mv="toast.viewportResume",nN=M.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:i=AT,label:r="Notifications ({hotkey})",...o}=e,c=e0(eN,n),u=wT(n),h=M.useRef(null),d=M.useRef(null),p=M.useRef(null),v=M.useRef(null),S=Ti(t,v,c.onViewportChange),b=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=c.toastCount>0;M.useEffect(()=>{const j=E=>{i.length!==0&&i.every(D=>E[D]||E.code===D)&&v.current?.focus()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[i]),M.useEffect(()=>{const j=h.current,E=v.current;if(_&&j&&E){const L=()=>{if(!c.isClosePausedRef.current){const ut=new CustomEvent(fv);E.dispatchEvent(ut),c.isClosePausedRef.current=!0}},D=()=>{if(c.isClosePausedRef.current){const ut=new CustomEvent(mv);E.dispatchEvent(ut),c.isClosePausedRef.current=!1}},z=ut=>{!j.contains(ut.relatedTarget)&&D()},$=()=>{j.contains(document.activeElement)||D()};return j.addEventListener("focusin",L),j.addEventListener("focusout",z),j.addEventListener("pointermove",L),j.addEventListener("pointerleave",$),window.addEventListener("blur",L),window.addEventListener("focus",D),()=>{j.removeEventListener("focusin",L),j.removeEventListener("focusout",z),j.removeEventListener("pointermove",L),j.removeEventListener("pointerleave",$),window.removeEventListener("blur",L),window.removeEventListener("focus",D)}}},[_,c.isClosePausedRef]);const A=M.useCallback(({tabbingDirection:j})=>{const L=u().map(D=>{const z=D.ref.current,$=[z,...zT(z)];return j==="forwards"?$:$.reverse()});return(j==="forwards"?L.reverse():L).flat()},[u]);return M.useEffect(()=>{const j=v.current;if(j){const E=L=>{const D=L.altKey||L.ctrlKey||L.metaKey;if(L.key==="Tab"&&!D){const $=document.activeElement,ut=L.shiftKey;if(L.target===j&&ut){d.current?.focus();return}const Q=A({tabbingDirection:ut?"backwards":"forwards"}),ct=Q.findIndex(F=>F===$);Yg(Q.slice(ct+1))?L.preventDefault():ut?d.current?.focus():p.current?.focus()}};return j.addEventListener("keydown",E),()=>j.removeEventListener("keydown",E)}},[u,A]),f.jsxs(fT,{ref:h,role:"region","aria-label":r.replace("{hotkey}",b),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&f.jsx(pv,{ref:d,onFocusFromOutsideViewport:()=>{const j=A({tabbingDirection:"forwards"});Yg(j)}}),f.jsx(N2.Slot,{scope:n,children:f.jsx(Qo.ol,{tabIndex:-1,...o,ref:S})}),_&&f.jsx(pv,{ref:p,onFocusFromOutsideViewport:()=>{const j=A({tabbingDirection:"backwards"});Yg(j)}})]})});nN.displayName=eN;var iN="ToastFocusProxy",pv=M.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...r}=e,o=e0(iN,n);return f.jsx(w2,{"aria-hidden":!0,tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:c=>{const u=c.relatedTarget;!o.viewport?.contains(u)&&i()}})});pv.displayName=iN;var n0="Toast",CT="toast.swipeStart",_T="toast.swipeMove",jT="toast.swipeCancel",ET="toast.swipeEnd",sN=M.forwardRef((e,t)=>{const{forceMount:n,open:i,defaultOpen:r,onOpenChange:o,...c}=e,[u=!0,h]=yT({prop:i,defaultProp:r,onChange:o});return f.jsx(ZS,{present:n||u,children:f.jsx(kT,{open:u,...c,ref:t,onClose:()=>h(!1),onPause:Us(e.onPause),onResume:Us(e.onResume),onSwipeStart:ua(e.onSwipeStart,d=>{d.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ua(e.onSwipeMove,d=>{const{x:p,y:v}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","move"),d.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:ua(e.onSwipeCancel,d=>{d.currentTarget.setAttribute("data-swipe","cancel"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ua(e.onSwipeEnd,d=>{const{x:p,y:v}=d.detail.delta;d.currentTarget.setAttribute("data-swipe","end"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),d.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),d.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${p}px`),d.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),h(!1)})})})});sN.displayName=n0;var[MT,TT]=JS(n0,{onClose(){}}),kT=M.forwardRef((e,t)=>{const{__scopeToast:n,type:i="foreground",duration:r,open:o,onClose:c,onEscapeKeyDown:u,onPause:h,onResume:d,onSwipeStart:p,onSwipeMove:v,onSwipeCancel:S,onSwipeEnd:b,..._}=e,A=e0(n0,n),[j,E]=M.useState(null),L=Ti(t,tt=>E(tt)),D=M.useRef(null),z=M.useRef(null),$=r||A.duration,ut=M.useRef(0),nt=M.useRef($),H=M.useRef(0),{onToastAdd:Q,onToastRemove:ct}=A,F=Us(()=>{j?.contains(document.activeElement)&&A.viewport?.focus(),c()}),Y=M.useCallback(tt=>{!tt||tt===1/0||(window.clearTimeout(H.current),ut.current=new Date().getTime(),H.current=window.setTimeout(F,tt))},[F]);M.useEffect(()=>{const tt=A.viewport;if(tt){const yt=()=>{Y(nt.current),d?.()},J=()=>{const at=new Date().getTime()-ut.current;nt.current=nt.current-at,window.clearTimeout(H.current),h?.()};return tt.addEventListener(fv,J),tt.addEventListener(mv,yt),()=>{tt.removeEventListener(fv,J),tt.removeEventListener(mv,yt)}}},[A.viewport,$,h,d,Y]),M.useEffect(()=>{o&&!A.isClosePausedRef.current&&Y($)},[o,$,A.isClosePausedRef,Y]),M.useEffect(()=>(Q(),()=>ct()),[Q,ct]);const ot=M.useMemo(()=>j?hN(j):null,[j]);return A.viewport?f.jsxs(f.Fragment,{children:[ot&&f.jsx(LT,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:ot}),f.jsx(MT,{scope:n,onClose:F,children:Cf.createPortal(f.jsx(N2.ItemSlot,{scope:n,children:f.jsx(dT,{asChild:!0,onEscapeKeyDown:ua(u,()=>{A.isFocusedToastEscapeKeyDownRef.current||F(),A.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(Qo.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":A.swipeDirection,..._,ref:L,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ua(e.onKeyDown,tt=>{tt.key==="Escape"&&(u?.(tt.nativeEvent),tt.nativeEvent.defaultPrevented||(A.isFocusedToastEscapeKeyDownRef.current=!0,F()))}),onPointerDown:ua(e.onPointerDown,tt=>{tt.button===0&&(D.current={x:tt.clientX,y:tt.clientY})}),onPointerMove:ua(e.onPointerMove,tt=>{if(!D.current)return;const yt=tt.clientX-D.current.x,J=tt.clientY-D.current.y,at=!!z.current,K=["left","right"].includes(A.swipeDirection),dt=["left","up"].includes(A.swipeDirection)?Math.min:Math.max,Tt=K?dt(0,yt):0,X=K?0:dt(0,J),P=tt.pointerType==="touch"?10:2,q={x:Tt,y:X},W={originalEvent:tt,delta:q};at?(z.current=q,Lm(_T,v,W,{discrete:!1})):N5(q,A.swipeDirection,P)?(z.current=q,Lm(CT,p,W,{discrete:!1}),tt.target.setPointerCapture(tt.pointerId)):(Math.abs(yt)>P||Math.abs(J)>P)&&(D.current=null)}),onPointerUp:ua(e.onPointerUp,tt=>{const yt=z.current,J=tt.target;if(J.hasPointerCapture(tt.pointerId)&&J.releasePointerCapture(tt.pointerId),z.current=null,D.current=null,yt){const at=tt.currentTarget,K={originalEvent:tt,delta:yt};N5(yt,A.swipeDirection,A.swipeThreshold)?Lm(ET,b,K,{discrete:!0}):Lm(jT,S,K,{discrete:!0}),at.addEventListener("click",dt=>dt.preventDefault(),{once:!0})}})})})}),A.viewport)})]}):null}),LT=e=>{const{__scopeToast:t,children:n,...i}=e,r=e0(n0,t),[o,c]=M.useState(!1),[u,h]=M.useState(!1);return DT(()=>c(!0)),M.useEffect(()=>{const d=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(d)},[]),u?null:f.jsx(QS,{asChild:!0,children:f.jsx(w2,{...i,children:o&&f.jsxs(f.Fragment,{children:[r.label," ",n]})})})},PT="ToastTitle",rN=M.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return f.jsx(Qo.div,{...i,ref:t})});rN.displayName=PT;var RT="ToastDescription",aN=M.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e;return f.jsx(Qo.div,{...i,ref:t})});aN.displayName=RT;var oN="ToastAction",lN=M.forwardRef((e,t)=>{const{altText:n,...i}=e;return n.trim()?f.jsx(uN,{altText:n,asChild:!0,children:f.jsx(A2,{...i,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${oN}\`. Expected non-empty \`string\`.`),null)});lN.displayName=oN;var cN="ToastClose",A2=M.forwardRef((e,t)=>{const{__scopeToast:n,...i}=e,r=TT(cN,n);return f.jsx(uN,{asChild:!0,children:f.jsx(Qo.button,{type:"button",...i,ref:t,onClick:ua(e.onClick,r.onClose)})})});A2.displayName=cN;var uN=M.forwardRef((e,t)=>{const{__scopeToast:n,altText:i,...r}=e;return f.jsx(Qo.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...r,ref:t})});function hN(e){const t=[];return Array.from(e.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&t.push(i.textContent),OT(i)){const r=i.ariaHidden||i.hidden||i.style.display==="none",o=i.dataset.radixToastAnnounceExclude==="";if(!r)if(o){const c=i.dataset.radixToastAnnounceAlt;c&&t.push(c)}else t.push(...hN(i))}}),t}function Lm(e,t,n,{discrete:i}){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?$S(r,o):r.dispatchEvent(o)}var N5=(e,t,n=0)=>{const i=Math.abs(e.x),r=Math.abs(e.y),o=i>r;return t==="left"||t==="right"?o&&i>n:!o&&r>n};function DT(e=()=>{}){const t=Us(e);ma(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[t])}function OT(e){return e.nodeType===e.ELEMENT_NODE}function zT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Yg(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var BT=tN,dN=nN,fN=sN,mN=rN,pN=aN,gN=lN,vN=A2;function yN(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=yN(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function bN(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=yN(e))&&(i&&(i+=" "),i+=t);return i}const A5=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,C5=bN,C2=(e,t)=>n=>{var i;if(t?.variants==null)return C5(e,n?.class,n?.className);const{variants:r,defaultVariants:o}=t,c=Object.keys(r).map(d=>{const p=n?.[d],v=o?.[d];if(p===null)return null;const S=A5(p)||A5(v);return r[d][S]}),u=n&&Object.entries(n).reduce((d,p)=>{let[v,S]=p;return S===void 0||(d[v]=S),d},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,p)=>{let{class:v,className:S,...b}=p;return Object.entries(b).every(_=>{let[A,j]=_;return Array.isArray(j)?j.includes({...o,...u}[A]):{...o,...u}[A]===j})?[...d,v,S]:d},[]);return C5(e,c,h,n?.class,n?.className)};/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),IT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),_5=e=>{const t=IT(e);return t.charAt(0).toUpperCase()+t.slice(1)},xN=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),UT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var qT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VT=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:o,iconNode:c,...u},h)=>M.createElement("svg",{ref:h,...qT,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:xN("lucide",r),...!o&&!UT(u)&&{"aria-hidden":"true"},...u},[...c.map(([d,p])=>M.createElement(d,p)),...Array.isArray(o)?o:[o]]));/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ge=(e,t)=>{const n=M.forwardRef(({className:i,...r},o)=>M.createElement(VT,{ref:o,iconNode:t,className:xN(`lucide-${FT(_5(e))}`,`lucide-${e}`,i),...r}));return n.displayName=_5(e),n};/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HT=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],$T=Ge("activity",HT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GT=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],Wg=Ge("arrow-down-up",GT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const YT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Wd=Ge("arrow-left",YT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const WT=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],KT=Ge("brain",WT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],wN=Ge("check",XT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QT=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ZT=Ge("chevron-left",QT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const JT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vo=Ge("chevron-right",JT);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const t8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],gv=Ge("circle-alert",t8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const e8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],iu=Ge("circle-check",e8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const n8=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],_l=Ge("circle-check-big",n8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const i8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pc=Ge("circle-x",i8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const s8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],r8=Ge("circle",s8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const a8=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],lu=Ge("coins",a8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const o8=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],l8=Ge("compass",o8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const c8=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],SN=Ge("copy",c8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const u8=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],h8=Ge("download",u8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const d8=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],jl=Ge("external-link",d8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const f8=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],m8=Ge("file-check",f8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const p8=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Kg=Ge("file-text",p8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const g8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Sc=Ge("globe",g8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const v8=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],y8=Ge("house",v8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const b8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],x8=Ge("info",b8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w8=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Vd=Ge("layers",w8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const S8=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],N8=Ge("link-2",S8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A8=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],El=Ge("loader-circle",A8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const C8=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],_8=Ge("lock-keyhole",C8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const j8=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],NN=Ge("lock",j8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const E8=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],AN=Ge("menu",E8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M8=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],up=Ge("message-circle",M8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const T8=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],k8=Ge("panel-left-close",T8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L8=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],P8=Ge("panel-left",L8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R8=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],vv=Ge("percent",R8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D8=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],O8=Ge("refresh-cw",D8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z8=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],j5=Ge("rocket",z8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B8=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Hd=Ge("search",B8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F8=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],I8=Ge("send",F8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U8=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],q8=Ge("settings",U8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V8=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],uf=Ge("shield",V8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H8=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],$8=Ge("target",H8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G8=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],yv=Ge("trending-up",G8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y8=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],W8=Ge("triangle-alert",Y8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K8=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],X8=Ge("twitter",K8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q8=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],E5=Ge("upload",Q8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z8=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],J8=Ge("users",Z8);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tk=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],Xg=Ge("wallet",tk);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ek=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],CN=Ge("x",ek);/**
 * @license lucide-react v0.545.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nk=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Kd=Ge("zap",nk),_2="-",ik=e=>{const t=rk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:c=>{const u=c.split(_2);return u[0]===""&&u.length!==1&&u.shift(),_N(u,t)||sk(c)},getConflictingClassGroupIds:(c,u)=>{const h=n[c]||[];return u&&i[c]?[...h,...i[c]]:h}}},_N=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),r=i?_N(e.slice(1),i):void 0;if(r)return r;if(t.validators.length===0)return;const o=e.join(_2);return t.validators.find(({validator:c})=>c(o))?.classGroupId},M5=/^\[(.+)\]$/,sk=e=>{if(M5.test(e)){const t=M5.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},rk=e=>{const{theme:t,classGroups:n}=e,i={nextPart:new Map,validators:[]};for(const r in n)bv(n[r],i,r,t);return i},bv=(e,t,n,i)=>{e.forEach(r=>{if(typeof r=="string"){const o=r===""?t:T5(t,r);o.classGroupId=n;return}if(typeof r=="function"){if(ak(r)){bv(r(i),t,n,i);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([o,c])=>{bv(c,T5(t,o),n,i)})})},T5=(e,t)=>{let n=e;return t.split(_2).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},ak=e=>e.isThemeGetter,ok=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const r=(o,c)=>{n.set(o,c),t++,t>e&&(t=0,i=n,n=new Map)};return{get(o){let c=n.get(o);if(c!==void 0)return c;if((c=i.get(o))!==void 0)return r(o,c),c},set(o,c){n.has(o)?n.set(o,c):r(o,c)}}},xv="!",wv=":",lk=wv.length,ck=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=r=>{const o=[];let c=0,u=0,h=0,d;for(let _=0;_<r.length;_++){let A=r[_];if(c===0&&u===0){if(A===wv){o.push(r.slice(h,_)),h=_+lk;continue}if(A==="/"){d=_;continue}}A==="["?c++:A==="]"?c--:A==="("?u++:A===")"&&u--}const p=o.length===0?r:r.substring(h),v=uk(p),S=v!==p,b=d&&d>h?d-h:void 0;return{modifiers:o,hasImportantModifier:S,baseClassName:v,maybePostfixModifierPosition:b}};if(t){const r=t+wv,o=i;i=c=>c.startsWith(r)?o(c.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:c,maybePostfixModifierPosition:void 0}}if(n){const r=i;i=o=>n({className:o,parseClassName:r})}return i},uk=e=>e.endsWith(xv)?e.substring(0,e.length-1):e.startsWith(xv)?e.substring(1):e,hk=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(i=>[i,!0]));return i=>{if(i.length<=1)return i;const r=[];let o=[];return i.forEach(c=>{c[0]==="["||t[c]?(r.push(...o.sort(),c),o=[]):o.push(c)}),r.push(...o.sort()),r}},dk=e=>({cache:ok(e.cacheSize),parseClassName:ck(e),sortModifiers:hk(e),...ik(e)}),fk=/\s+/,mk=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r,sortModifiers:o}=t,c=[],u=e.trim().split(fk);let h="";for(let d=u.length-1;d>=0;d-=1){const p=u[d],{isExternal:v,modifiers:S,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:A}=n(p);if(v){h=p+(h.length>0?" "+h:h);continue}let j=!!A,E=i(j?_.substring(0,A):_);if(!E){if(!j){h=p+(h.length>0?" "+h:h);continue}if(E=i(_),!E){h=p+(h.length>0?" "+h:h);continue}j=!1}const L=o(S).join(":"),D=b?L+xv:L,z=D+E;if(c.includes(z))continue;c.push(z);const $=r(E,j);for(let ut=0;ut<$.length;++ut){const nt=$[ut];c.push(D+nt)}h=p+(h.length>0?" "+h:h)}return h};function pk(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=jN(t))&&(i&&(i+=" "),i+=n);return i}const jN=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=jN(e[i]))&&(n&&(n+=" "),n+=t);return n};function gk(e,...t){let n,i,r,o=c;function c(h){const d=t.reduce((p,v)=>v(p),e());return n=dk(d),i=n.cache.get,r=n.cache.set,o=u,u(h)}function u(h){const d=i(h);if(d)return d;const p=mk(h,n);return r(h,p),p}return function(){return o(pk.apply(null,arguments))}}const ms=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},EN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,MN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vk=/^\d+\/\d+$/,yk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,xk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ah=e=>vk.test(e),cn=e=>!!e&&!Number.isNaN(Number(e)),gc=e=>!!e&&Number.isInteger(Number(e)),Qg=e=>e.endsWith("%")&&cn(e.slice(0,-1)),Ml=e=>yk.test(e),Nk=()=>!0,Ak=e=>bk.test(e)&&!xk.test(e),TN=()=>!1,Ck=e=>wk.test(e),_k=e=>Sk.test(e),jk=e=>!ue(e)&&!he(e),Ek=e=>Gh(e,PN,TN),ue=e=>EN.test(e),Zc=e=>Gh(e,RN,Ak),Zg=e=>Gh(e,Pk,cn),k5=e=>Gh(e,kN,TN),Mk=e=>Gh(e,LN,_k),Pm=e=>Gh(e,DN,Ck),he=e=>MN.test(e),Bd=e=>Yh(e,RN),Tk=e=>Yh(e,Rk),L5=e=>Yh(e,kN),kk=e=>Yh(e,PN),Lk=e=>Yh(e,LN),Rm=e=>Yh(e,DN,!0),Gh=(e,t,n)=>{const i=EN.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Yh=(e,t,n=!1)=>{const i=MN.exec(e);return i?i[1]?t(i[1]):n:!1},kN=e=>e==="position"||e==="percentage",LN=e=>e==="image"||e==="url",PN=e=>e==="length"||e==="size"||e==="bg-size",RN=e=>e==="length",Pk=e=>e==="number",Rk=e=>e==="family-name",DN=e=>e==="shadow",Dk=()=>{const e=ms("color"),t=ms("font"),n=ms("text"),i=ms("font-weight"),r=ms("tracking"),o=ms("leading"),c=ms("breakpoint"),u=ms("container"),h=ms("spacing"),d=ms("radius"),p=ms("shadow"),v=ms("inset-shadow"),S=ms("text-shadow"),b=ms("drop-shadow"),_=ms("blur"),A=ms("perspective"),j=ms("aspect"),E=ms("ease"),L=ms("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...z(),he,ue],ut=()=>["auto","hidden","clip","visible","scroll"],nt=()=>["auto","contain","none"],H=()=>[he,ue,h],Q=()=>[ah,"full","auto",...H()],ct=()=>[gc,"none","subgrid",he,ue],F=()=>["auto",{span:["full",gc,he,ue]},gc,he,ue],Y=()=>[gc,"auto",he,ue],ot=()=>["auto","min","max","fr",he,ue],tt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],yt=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...H()],at=()=>[ah,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],K=()=>[e,he,ue],dt=()=>[...z(),L5,k5,{position:[he,ue]}],Tt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",kk,Ek,{size:[he,ue]}],P=()=>[Qg,Bd,Zc],q=()=>["","none","full",d,he,ue],W=()=>["",cn,Bd,Zc],lt=()=>["solid","dashed","dotted","double"],ht=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ft=()=>[cn,Qg,L5,k5],Ct=()=>["","none",_,he,ue],_t=()=>["none",cn,he,ue],Dt=()=>["none",cn,he,ue],$t=()=>[cn,he,ue],Wt=()=>[ah,"full",...H()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ml],breakpoint:[Ml],color:[Nk],container:[Ml],"drop-shadow":[Ml],ease:["in","out","in-out"],font:[jk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ml],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ml],shadow:[Ml],spacing:["px",cn],text:[Ml],"text-shadow":[Ml],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ah,ue,he,j]}],container:["container"],columns:[{columns:[cn,ue,he,u]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:ut()}],"overflow-x":[{"overflow-x":ut()}],"overflow-y":[{"overflow-y":ut()}],overscroll:[{overscroll:nt()}],"overscroll-x":[{"overscroll-x":nt()}],"overscroll-y":[{"overscroll-y":nt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{start:Q()}],end:[{end:Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[gc,"auto",he,ue]}],basis:[{basis:[ah,"full","auto",u,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[cn,ah,"auto","initial","none",ue]}],grow:[{grow:["",cn,he,ue]}],shrink:[{shrink:["",cn,he,ue]}],order:[{order:[gc,"first","last","none",he,ue]}],"grid-cols":[{"grid-cols":ct()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":ct()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ot()}],"auto-rows":[{"auto-rows":ot()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...tt(),"normal"]}],"justify-items":[{"justify-items":[...yt(),"normal"]}],"justify-self":[{"justify-self":["auto",...yt()]}],"align-content":[{content:["normal",...tt()]}],"align-items":[{items:[...yt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...yt(),{baseline:["","last"]}]}],"place-content":[{"place-content":tt()}],"place-items":[{"place-items":[...yt(),"baseline"]}],"place-self":[{"place-self":["auto",...yt()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:at()}],w:[{w:[u,"screen",...at()]}],"min-w":[{"min-w":[u,"screen","none",...at()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...at()]}],h:[{h:["screen","lh",...at()]}],"min-h":[{"min-h":["screen","lh","none",...at()]}],"max-h":[{"max-h":["screen","lh",...at()]}],"font-size":[{text:["base",n,Bd,Zc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,he,Zg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qg,ue]}],"font-family":[{font:[Tk,ue,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,he,ue]}],"line-clamp":[{"line-clamp":[cn,"none",he,Zg]}],leading:[{leading:[o,...H()]}],"list-image":[{"list-image":["none",he,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...lt(),"wavy"]}],"text-decoration-thickness":[{decoration:[cn,"from-font","auto",he,Zc]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[cn,"auto",he,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:dt()}],"bg-repeat":[{bg:Tt()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gc,he,ue],radial:["",he,ue],conic:[gc,he,ue]},Lk,Mk]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...lt(),"hidden","none"]}],"divide-style":[{divide:[...lt(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...lt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[cn,he,ue]}],"outline-w":[{outline:["",cn,Bd,Zc]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",p,Rm,Pm]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",v,Rm,Pm]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[cn,Zc]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,Rm,Pm]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[cn,he,ue]}],"mix-blend":[{"mix-blend":[...ht(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ht()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[cn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ft()}],"mask-image-linear-to-pos":[{"mask-linear-to":ft()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":ft()}],"mask-image-t-to-pos":[{"mask-t-to":ft()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":ft()}],"mask-image-r-to-pos":[{"mask-r-to":ft()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":ft()}],"mask-image-b-to-pos":[{"mask-b-to":ft()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":ft()}],"mask-image-l-to-pos":[{"mask-l-to":ft()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":ft()}],"mask-image-x-to-pos":[{"mask-x-to":ft()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":ft()}],"mask-image-y-to-pos":[{"mask-y-to":ft()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[he,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ft()}],"mask-image-radial-to-pos":[{"mask-radial-to":ft()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":z()}],"mask-image-conic-pos":[{"mask-conic":[cn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ft()}],"mask-image-conic-to-pos":[{"mask-conic-to":ft()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:dt()}],"mask-repeat":[{mask:Tt()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,ue]}],filter:[{filter:["","none",he,ue]}],blur:[{blur:Ct()}],brightness:[{brightness:[cn,he,ue]}],contrast:[{contrast:[cn,he,ue]}],"drop-shadow":[{"drop-shadow":["","none",b,Rm,Pm]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",cn,he,ue]}],"hue-rotate":[{"hue-rotate":[cn,he,ue]}],invert:[{invert:["",cn,he,ue]}],saturate:[{saturate:[cn,he,ue]}],sepia:[{sepia:["",cn,he,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",he,ue]}],"backdrop-blur":[{"backdrop-blur":Ct()}],"backdrop-brightness":[{"backdrop-brightness":[cn,he,ue]}],"backdrop-contrast":[{"backdrop-contrast":[cn,he,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",cn,he,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[cn,he,ue]}],"backdrop-invert":[{"backdrop-invert":["",cn,he,ue]}],"backdrop-opacity":[{"backdrop-opacity":[cn,he,ue]}],"backdrop-saturate":[{"backdrop-saturate":[cn,he,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",cn,he,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[cn,"initial",he,ue]}],ease:[{ease:["linear","initial",E,he,ue]}],delay:[{delay:[cn,he,ue]}],animate:[{animate:["none",L,he,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,he,ue]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:_t()}],"rotate-x":[{"rotate-x":_t()}],"rotate-y":[{"rotate-y":_t()}],"rotate-z":[{"rotate-z":_t()}],scale:[{scale:Dt()}],"scale-x":[{"scale-x":Dt()}],"scale-y":[{"scale-y":Dt()}],"scale-z":[{"scale-z":Dt()}],"scale-3d":["scale-3d"],skew:[{skew:$t()}],"skew-x":[{"skew-x":$t()}],"skew-y":[{"skew-y":$t()}],transform:[{transform:[he,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Wt()}],"translate-x":[{"translate-x":Wt()}],"translate-y":[{"translate-y":Wt()}],"translate-z":[{"translate-z":Wt()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,ue]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[cn,Bd,Zc,Zg]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ok=gk(Dk);function ci(...e){return Ok(bN(e))}const zk=BT,ON=M.forwardRef(({className:e,...t},n)=>f.jsx(dN,{ref:n,className:ci("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ON.displayName=dN.displayName;const Bk=C2("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),zN=M.forwardRef(({className:e,variant:t,...n},i)=>f.jsx(fN,{ref:i,className:ci(Bk({variant:t}),e),...n}));zN.displayName=fN.displayName;const Fk=M.forwardRef(({className:e,...t},n)=>f.jsx(gN,{ref:n,className:ci("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Fk.displayName=gN.displayName;const BN=M.forwardRef(({className:e,...t},n)=>f.jsx(vN,{ref:n,className:ci("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:f.jsx(CN,{className:"h-4 w-4"})}));BN.displayName=vN.displayName;const FN=M.forwardRef(({className:e,...t},n)=>f.jsx(mN,{ref:n,className:ci("text-sm font-semibold",e),...t}));FN.displayName=mN.displayName;const IN=M.forwardRef(({className:e,...t},n)=>f.jsx(pN,{ref:n,className:ci("text-sm opacity-90",e),...t}));IN.displayName=pN.displayName;function Ik(){const{toasts:e}=QM();return f.jsxs(zk,{children:[e.map(function({id:t,title:n,description:i,action:r,...o}){return f.jsxs(zN,{...o,children:[f.jsxs("div",{className:"grid gap-1",children:[n&&f.jsx(FN,{children:n}),i&&f.jsx(IN,{children:i})]}),r,f.jsx(BN,{})]},t)}),f.jsx(ON,{})]})}function oh(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Jg(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Uk(e){const t=qk(e),n=M.forwardRef((i,r)=>{const{children:o,...c}=i,u=M.Children.toArray(o),h=u.find(Hk);if(h){const d=h.props.children,p=u.map(v=>v===h?M.Children.count(d)>1?M.Children.only(null):M.isValidElement(d)?d.props.children:null:v);return f.jsx(t,{...c,ref:r,children:M.isValidElement(d)?M.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function qk(e){const t=M.forwardRef((n,i)=>{const{children:r,...o}=n;if(M.isValidElement(r)){const c=Gk(r),u=$k(o,r.props);return r.type!==M.Fragment&&(u.ref=i?Lc(i,c):c),M.cloneElement(r,u)}return M.Children.count(r)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vk=Symbol("radix.slottable");function Hk(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vk}function $k(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...u)=>{const h=o(...u);return r(...u),h}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function Gk(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qs=Yk.reduce((e,t)=>{const n=Uk(`Primitive.${t}`),i=M.forwardRef((r,o)=>{const{asChild:c,...u}=r,h=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(h,{...u,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function UN(e,t){e&&Cf.flushSync(()=>e.dispatchEvent(t))}var Wk="DismissableLayer",Sv="dismissableLayer.update",Kk="dismissableLayer.pointerDownOutside",Xk="dismissableLayer.focusOutside",P5,qN=M.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),j2=M.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:c,onDismiss:u,...h}=e,d=M.useContext(qN),[p,v]=M.useState(null),S=p?.ownerDocument??globalThis?.document,[,b]=M.useState({}),_=Ti(t,nt=>v(nt)),A=Array.from(d.layers),[j]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),E=A.indexOf(j),L=p?A.indexOf(p):-1,D=d.layersWithOutsidePointerEventsDisabled.size>0,z=L>=E,$=Jk(nt=>{const H=nt.target,Q=[...d.branches].some(ct=>ct.contains(H));!z||Q||(r?.(nt),c?.(nt),nt.defaultPrevented||u?.())},S),ut=tL(nt=>{const H=nt.target;[...d.branches].some(ct=>ct.contains(H))||(o?.(nt),c?.(nt),nt.defaultPrevented||u?.())},S);return GS(nt=>{L===d.layers.size-1&&(i?.(nt),!nt.defaultPrevented&&u&&(nt.preventDefault(),u()))},S),M.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(P5=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),R5(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=P5)}},[p,S,n,d]),M.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),R5())},[p,d]),M.useEffect(()=>{const nt=()=>b({});return document.addEventListener(Sv,nt),()=>document.removeEventListener(Sv,nt)},[]),f.jsx(qs.div,{...h,ref:_,style:{pointerEvents:D?z?"auto":"none":void 0,...e.style},onFocusCapture:Jg(e.onFocusCapture,ut.onFocusCapture),onBlurCapture:Jg(e.onBlurCapture,ut.onBlurCapture),onPointerDownCapture:Jg(e.onPointerDownCapture,$.onPointerDownCapture)})});j2.displayName=Wk;var Qk="DismissableLayerBranch",Zk=M.forwardRef((e,t)=>{const n=M.useContext(qN),i=M.useRef(null),r=Ti(t,i);return M.useEffect(()=>{const o=i.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),f.jsx(qs.div,{...e,ref:r})});Zk.displayName=Qk;function Jk(e,t=globalThis?.document){const n=Us(e),i=M.useRef(!1),r=M.useRef(()=>{});return M.useEffect(()=>{const o=u=>{if(u.target&&!i.current){let h=function(){VN(Kk,n,d,{discrete:!0})};const d={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=h,t.addEventListener("click",r.current,{once:!0})):h()}else t.removeEventListener("click",r.current);i.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",o),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function tL(e,t=globalThis?.document){const n=Us(e),i=M.useRef(!1);return M.useEffect(()=>{const r=o=>{o.target&&!i.current&&VN(Xk,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function R5(){const e=new CustomEvent(Sv);document.dispatchEvent(e)}function VN(e,t,n,{discrete:i}){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),i?UN(r,o):r.dispatchEvent(o)}var eL=Af[" useId ".trim().toString()]||(()=>{}),nL=0;function Nv(e){const[t,n]=M.useState(eL());return ma(()=>{n(i=>i??String(nL++))},[e]),t?`radix-${t}`:""}const iL=["top","right","bottom","left"],jc=Math.min,ca=Math.max,jp=Math.round,Dm=Math.floor,Yo=e=>({x:e,y:e}),sL={left:"right",right:"left",bottom:"top",top:"bottom"},rL={start:"end",end:"start"};function Av(e,t,n){return ca(e,jc(t,n))}function Dl(e,t){return typeof e=="function"?e(t):e}function Ol(e){return e.split("-")[0]}function Wh(e){return e.split("-")[1]}function E2(e){return e==="x"?"y":"x"}function M2(e){return e==="y"?"height":"width"}const aL=new Set(["top","bottom"]);function $o(e){return aL.has(Ol(e))?"y":"x"}function T2(e){return E2($o(e))}function oL(e,t,n){n===void 0&&(n=!1);const i=Wh(e),r=T2(e),o=M2(r);let c=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(c=Ep(c)),[c,Ep(c)]}function lL(e){const t=Ep(e);return[Cv(e),t,Cv(t)]}function Cv(e){return e.replace(/start|end/g,t=>rL[t])}const D5=["left","right"],O5=["right","left"],cL=["top","bottom"],uL=["bottom","top"];function hL(e,t,n){switch(e){case"top":case"bottom":return n?t?O5:D5:t?D5:O5;case"left":case"right":return t?cL:uL;default:return[]}}function dL(e,t,n,i){const r=Wh(e);let o=hL(Ol(e),n==="start",i);return r&&(o=o.map(c=>c+"-"+r),t&&(o=o.concat(o.map(Cv)))),o}function Ep(e){return e.replace(/left|right|bottom|top/g,t=>sL[t])}function fL(e){return{top:0,right:0,bottom:0,left:0,...e}}function HN(e){return typeof e!="number"?fL(e):{top:e,right:e,bottom:e,left:e}}function Mp(e){const{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}}function z5(e,t,n){let{reference:i,floating:r}=e;const o=$o(t),c=T2(t),u=M2(c),h=Ol(t),d=o==="y",p=i.x+i.width/2-r.width/2,v=i.y+i.height/2-r.height/2,S=i[u]/2-r[u]/2;let b;switch(h){case"top":b={x:p,y:i.y-r.height};break;case"bottom":b={x:p,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:v};break;case"left":b={x:i.x-r.width,y:v};break;default:b={x:i.x,y:i.y}}switch(Wh(t)){case"start":b[c]-=S*(n&&d?-1:1);break;case"end":b[c]+=S*(n&&d?-1:1);break}return b}const mL=async(e,t,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:c}=n,u=o.filter(Boolean),h=await(c.isRTL==null?void 0:c.isRTL(t));let d=await c.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:v}=z5(d,i,h),S=i,b={},_=0;for(let A=0;A<u.length;A++){const{name:j,fn:E}=u[A],{x:L,y:D,data:z,reset:$}=await E({x:p,y:v,initialPlacement:i,placement:S,strategy:r,middlewareData:b,rects:d,platform:c,elements:{reference:e,floating:t}});p=L??p,v=D??v,b={...b,[j]:{...b[j],...z}},$&&_<=50&&(_++,typeof $=="object"&&($.placement&&(S=$.placement),$.rects&&(d=$.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:r}):$.rects),{x:p,y:v}=z5(d,S,h)),A=-1)}return{x:p,y:v,placement:S,strategy:r,middlewareData:b}};async function hf(e,t){var n;t===void 0&&(t={});const{x:i,y:r,platform:o,rects:c,elements:u,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:v="floating",altBoundary:S=!1,padding:b=0}=Dl(t,e),_=HN(b),j=u[S?v==="floating"?"reference":"floating":v],E=Mp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(j)))==null||n?j:j.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:d,rootBoundary:p,strategy:h})),L=v==="floating"?{x:i,y:r,width:c.floating.width,height:c.floating.height}:c.reference,D=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),z=await(o.isElement==null?void 0:o.isElement(D))?await(o.getScale==null?void 0:o.getScale(D))||{x:1,y:1}:{x:1,y:1},$=Mp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:L,offsetParent:D,strategy:h}):L);return{top:(E.top-$.top+_.top)/z.y,bottom:($.bottom-E.bottom+_.bottom)/z.y,left:(E.left-$.left+_.left)/z.x,right:($.right-E.right+_.right)/z.x}}const pL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:r,rects:o,platform:c,elements:u,middlewareData:h}=t,{element:d,padding:p=0}=Dl(e,t)||{};if(d==null)return{};const v=HN(p),S={x:n,y:i},b=T2(r),_=M2(b),A=await c.getDimensions(d),j=b==="y",E=j?"top":"left",L=j?"bottom":"right",D=j?"clientHeight":"clientWidth",z=o.reference[_]+o.reference[b]-S[b]-o.floating[_],$=S[b]-o.reference[b],ut=await(c.getOffsetParent==null?void 0:c.getOffsetParent(d));let nt=ut?ut[D]:0;(!nt||!await(c.isElement==null?void 0:c.isElement(ut)))&&(nt=u.floating[D]||o.floating[_]);const H=z/2-$/2,Q=nt/2-A[_]/2-1,ct=jc(v[E],Q),F=jc(v[L],Q),Y=ct,ot=nt-A[_]-F,tt=nt/2-A[_]/2+H,yt=Av(Y,tt,ot),J=!h.arrow&&Wh(r)!=null&&tt!==yt&&o.reference[_]/2-(tt<Y?ct:F)-A[_]/2<0,at=J?tt<Y?tt-Y:tt-ot:0;return{[b]:S[b]+at,data:{[b]:yt,centerOffset:tt-yt-at,...J&&{alignmentOffset:at}},reset:J}}}),gL=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:r,middlewareData:o,rects:c,initialPlacement:u,platform:h,elements:d}=t,{mainAxis:p=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:A=!0,...j}=Dl(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const E=Ol(r),L=$o(u),D=Ol(u)===u,z=await(h.isRTL==null?void 0:h.isRTL(d.floating)),$=S||(D||!A?[Ep(u)]:lL(u)),ut=_!=="none";!S&&ut&&$.push(...dL(u,A,_,z));const nt=[u,...$],H=await hf(t,j),Q=[];let ct=((i=o.flip)==null?void 0:i.overflows)||[];if(p&&Q.push(H[E]),v){const tt=oL(r,c,z);Q.push(H[tt[0]],H[tt[1]])}if(ct=[...ct,{placement:r,overflows:Q}],!Q.every(tt=>tt<=0)){var F,Y;const tt=(((F=o.flip)==null?void 0:F.index)||0)+1,yt=nt[tt];if(yt&&(!(v==="alignment"?L!==$o(yt):!1)||ct.every(K=>$o(K.placement)===L?K.overflows[0]>0:!0)))return{data:{index:tt,overflows:ct},reset:{placement:yt}};let J=(Y=ct.filter(at=>at.overflows[0]<=0).sort((at,K)=>at.overflows[1]-K.overflows[1])[0])==null?void 0:Y.placement;if(!J)switch(b){case"bestFit":{var ot;const at=(ot=ct.filter(K=>{if(ut){const dt=$o(K.placement);return dt===L||dt==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(dt=>dt>0).reduce((dt,Tt)=>dt+Tt,0)]).sort((K,dt)=>K[1]-dt[1])[0])==null?void 0:ot[0];at&&(J=at);break}case"initialPlacement":J=u;break}if(r!==J)return{reset:{placement:J}}}return{}}}};function B5(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function F5(e){return iL.some(t=>e[t]>=0)}const vL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...r}=Dl(e,t);switch(i){case"referenceHidden":{const o=await hf(t,{...r,elementContext:"reference"}),c=B5(o,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:F5(c)}}}case"escaped":{const o=await hf(t,{...r,altBoundary:!0}),c=B5(o,n.floating);return{data:{escapedOffsets:c,escaped:F5(c)}}}default:return{}}}}},$N=new Set(["left","top"]);async function yL(e,t){const{placement:n,platform:i,elements:r}=e,o=await(i.isRTL==null?void 0:i.isRTL(r.floating)),c=Ol(n),u=Wh(n),h=$o(n)==="y",d=$N.has(c)?-1:1,p=o&&h?-1:1,v=Dl(t,e);let{mainAxis:S,crossAxis:b,alignmentAxis:_}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return u&&typeof _=="number"&&(b=u==="end"?_*-1:_),h?{x:b*p,y:S*d}:{x:S*d,y:b*p}}const bL=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:r,y:o,placement:c,middlewareData:u}=t,h=await yL(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:r+h.x,y:o+h.y,data:{...h,placement:c}}}}},xL=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:r}=t,{mainAxis:o=!0,crossAxis:c=!1,limiter:u={fn:j=>{let{x:E,y:L}=j;return{x:E,y:L}}},...h}=Dl(e,t),d={x:n,y:i},p=await hf(t,h),v=$o(Ol(r)),S=E2(v);let b=d[S],_=d[v];if(o){const j=S==="y"?"top":"left",E=S==="y"?"bottom":"right",L=b+p[j],D=b-p[E];b=Av(L,b,D)}if(c){const j=v==="y"?"top":"left",E=v==="y"?"bottom":"right",L=_+p[j],D=_-p[E];_=Av(L,_,D)}const A=u.fn({...t,[S]:b,[v]:_});return{...A,data:{x:A.x-n,y:A.y-i,enabled:{[S]:o,[v]:c}}}}}},wL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:r,rects:o,middlewareData:c}=t,{offset:u=0,mainAxis:h=!0,crossAxis:d=!0}=Dl(e,t),p={x:n,y:i},v=$o(r),S=E2(v);let b=p[S],_=p[v];const A=Dl(u,t),j=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(h){const D=S==="y"?"height":"width",z=o.reference[S]-o.floating[D]+j.mainAxis,$=o.reference[S]+o.reference[D]-j.mainAxis;b<z?b=z:b>$&&(b=$)}if(d){var E,L;const D=S==="y"?"width":"height",z=$N.has(Ol(r)),$=o.reference[v]-o.floating[D]+(z&&((E=c.offset)==null?void 0:E[v])||0)+(z?0:j.crossAxis),ut=o.reference[v]+o.reference[D]+(z?0:((L=c.offset)==null?void 0:L[v])||0)-(z?j.crossAxis:0);_<$?_=$:_>ut&&(_=ut)}return{[S]:b,[v]:_}}}},SL=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:r,rects:o,platform:c,elements:u}=t,{apply:h=()=>{},...d}=Dl(e,t),p=await hf(t,d),v=Ol(r),S=Wh(r),b=$o(r)==="y",{width:_,height:A}=o.floating;let j,E;v==="top"||v==="bottom"?(j=v,E=S===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(E=v,j=S==="end"?"top":"bottom");const L=A-p.top-p.bottom,D=_-p.left-p.right,z=jc(A-p[j],L),$=jc(_-p[E],D),ut=!t.middlewareData.shift;let nt=z,H=$;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(H=D),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(nt=L),ut&&!S){const ct=ca(p.left,0),F=ca(p.right,0),Y=ca(p.top,0),ot=ca(p.bottom,0);b?H=_-2*(ct!==0||F!==0?ct+F:ca(p.left,p.right)):nt=A-2*(Y!==0||ot!==0?Y+ot:ca(p.top,p.bottom))}await h({...t,availableWidth:H,availableHeight:nt});const Q=await c.getDimensions(u.floating);return _!==Q.width||A!==Q.height?{reset:{rects:!0}}:{}}}};function i0(){return typeof window<"u"}function Kh(e){return GN(e)?(e.nodeName||"").toLowerCase():"#document"}function da(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zo(e){var t;return(t=(GN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GN(e){return i0()?e instanceof Node||e instanceof da(e).Node:!1}function uo(e){return i0()?e instanceof Element||e instanceof da(e).Element:!1}function Xo(e){return i0()?e instanceof HTMLElement||e instanceof da(e).HTMLElement:!1}function I5(e){return!i0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof da(e).ShadowRoot}const NL=new Set(["inline","contents"]);function _f(e){const{overflow:t,overflowX:n,overflowY:i,display:r}=ho(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!NL.has(r)}const AL=new Set(["table","td","th"]);function CL(e){return AL.has(Kh(e))}const _L=[":popover-open",":modal"];function s0(e){return _L.some(t=>{try{return e.matches(t)}catch{return!1}})}const jL=["transform","translate","scale","rotate","perspective"],EL=["transform","translate","scale","rotate","perspective","filter"],ML=["paint","layout","strict","content"];function k2(e){const t=L2(),n=uo(e)?ho(e):e;return jL.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||EL.some(i=>(n.willChange||"").includes(i))||ML.some(i=>(n.contain||"").includes(i))}function TL(e){let t=Ec(e);for(;Xo(t)&&!zh(t);){if(k2(t))return t;if(s0(t))return null;t=Ec(t)}return null}function L2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const kL=new Set(["html","body","#document"]);function zh(e){return kL.has(Kh(e))}function ho(e){return da(e).getComputedStyle(e)}function r0(e){return uo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ec(e){if(Kh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||I5(e)&&e.host||Zo(e);return I5(t)?t.host:t}function YN(e){const t=Ec(e);return zh(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xo(t)&&_f(t)?t:YN(t)}function df(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=YN(e),o=r===((i=e.ownerDocument)==null?void 0:i.body),c=da(r);if(o){const u=_v(c);return t.concat(c,c.visualViewport||[],_f(r)?r:[],u&&n?df(u):[])}return t.concat(r,df(r,[],n))}function _v(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function WN(e){const t=ho(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const r=Xo(e),o=r?e.offsetWidth:n,c=r?e.offsetHeight:i,u=jp(n)!==o||jp(i)!==c;return u&&(n=o,i=c),{width:n,height:i,$:u}}function P2(e){return uo(e)?e:e.contextElement}function Eh(e){const t=P2(e);if(!Xo(t))return Yo(1);const n=t.getBoundingClientRect(),{width:i,height:r,$:o}=WN(t);let c=(o?jp(n.width):n.width)/i,u=(o?jp(n.height):n.height)/r;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const LL=Yo(0);function KN(e){const t=da(e);return!L2()||!t.visualViewport?LL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function PL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==da(e)?!1:t}function pu(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=P2(e);let c=Yo(1);t&&(i?uo(i)&&(c=Eh(i)):c=Eh(e));const u=PL(o,n,i)?KN(o):Yo(0);let h=(r.left+u.x)/c.x,d=(r.top+u.y)/c.y,p=r.width/c.x,v=r.height/c.y;if(o){const S=da(o),b=i&&uo(i)?da(i):i;let _=S,A=_v(_);for(;A&&i&&b!==_;){const j=Eh(A),E=A.getBoundingClientRect(),L=ho(A),D=E.left+(A.clientLeft+parseFloat(L.paddingLeft))*j.x,z=E.top+(A.clientTop+parseFloat(L.paddingTop))*j.y;h*=j.x,d*=j.y,p*=j.x,v*=j.y,h+=D,d+=z,_=da(A),A=_v(_)}}return Mp({width:p,height:v,x:h,y:d})}function a0(e,t){const n=r0(e).scrollLeft;return t?t.left+n:pu(Zo(e)).left+n}function XN(e,t){const n=e.getBoundingClientRect(),i=n.left+t.scrollLeft-a0(e,n),r=n.top+t.scrollTop;return{x:i,y:r}}function RL(e){let{elements:t,rect:n,offsetParent:i,strategy:r}=e;const o=r==="fixed",c=Zo(i),u=t?s0(t.floating):!1;if(i===c||u&&o)return n;let h={scrollLeft:0,scrollTop:0},d=Yo(1);const p=Yo(0),v=Xo(i);if((v||!v&&!o)&&((Kh(i)!=="body"||_f(c))&&(h=r0(i)),Xo(i))){const b=pu(i);d=Eh(i),p.x=b.x+i.clientLeft,p.y=b.y+i.clientTop}const S=c&&!v&&!o?XN(c,h):Yo(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-h.scrollLeft*d.x+p.x+S.x,y:n.y*d.y-h.scrollTop*d.y+p.y+S.y}}function DL(e){return Array.from(e.getClientRects())}function OL(e){const t=Zo(e),n=r0(e),i=e.ownerDocument.body,r=ca(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=ca(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let c=-n.scrollLeft+a0(e);const u=-n.scrollTop;return ho(i).direction==="rtl"&&(c+=ca(t.clientWidth,i.clientWidth)-r),{width:r,height:o,x:c,y:u}}const U5=25;function zL(e,t){const n=da(e),i=Zo(e),r=n.visualViewport;let o=i.clientWidth,c=i.clientHeight,u=0,h=0;if(r){o=r.width,c=r.height;const p=L2();(!p||p&&t==="fixed")&&(u=r.offsetLeft,h=r.offsetTop)}const d=a0(i);if(d<=0){const p=i.ownerDocument,v=p.body,S=getComputedStyle(v),b=p.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,_=Math.abs(i.clientWidth-v.clientWidth-b);_<=U5&&(o-=_)}else d<=U5&&(o+=d);return{width:o,height:c,x:u,y:h}}const BL=new Set(["absolute","fixed"]);function FL(e,t){const n=pu(e,!0,t==="fixed"),i=n.top+e.clientTop,r=n.left+e.clientLeft,o=Xo(e)?Eh(e):Yo(1),c=e.clientWidth*o.x,u=e.clientHeight*o.y,h=r*o.x,d=i*o.y;return{width:c,height:u,x:h,y:d}}function q5(e,t,n){let i;if(t==="viewport")i=zL(e,n);else if(t==="document")i=OL(Zo(e));else if(uo(t))i=FL(t,n);else{const r=KN(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Mp(i)}function QN(e,t){const n=Ec(e);return n===t||!uo(n)||zh(n)?!1:ho(n).position==="fixed"||QN(n,t)}function IL(e,t){const n=t.get(e);if(n)return n;let i=df(e,[],!1).filter(u=>uo(u)&&Kh(u)!=="body"),r=null;const o=ho(e).position==="fixed";let c=o?Ec(e):e;for(;uo(c)&&!zh(c);){const u=ho(c),h=k2(c);!h&&u.position==="fixed"&&(r=null),(o?!h&&!r:!h&&u.position==="static"&&!!r&&BL.has(r.position)||_f(c)&&!h&&QN(e,c))?i=i.filter(p=>p!==c):r=u,c=Ec(c)}return t.set(e,i),i}function UL(e){let{element:t,boundary:n,rootBoundary:i,strategy:r}=e;const c=[...n==="clippingAncestors"?s0(t)?[]:IL(t,this._c):[].concat(n),i],u=c[0],h=c.reduce((d,p)=>{const v=q5(t,p,r);return d.top=ca(v.top,d.top),d.right=jc(v.right,d.right),d.bottom=jc(v.bottom,d.bottom),d.left=ca(v.left,d.left),d},q5(t,u,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function qL(e){const{width:t,height:n}=WN(e);return{width:t,height:n}}function VL(e,t,n){const i=Xo(t),r=Zo(t),o=n==="fixed",c=pu(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const h=Yo(0);function d(){h.x=a0(r)}if(i||!i&&!o)if((Kh(t)!=="body"||_f(r))&&(u=r0(t)),i){const b=pu(t,!0,o,t);h.x=b.x+t.clientLeft,h.y=b.y+t.clientTop}else r&&d();o&&!i&&r&&d();const p=r&&!i&&!o?XN(r,u):Yo(0),v=c.left+u.scrollLeft-h.x-p.x,S=c.top+u.scrollTop-h.y-p.y;return{x:v,y:S,width:c.width,height:c.height}}function t1(e){return ho(e).position==="static"}function V5(e,t){if(!Xo(e)||ho(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Zo(e)===n&&(n=n.ownerDocument.body),n}function ZN(e,t){const n=da(e);if(s0(e))return n;if(!Xo(e)){let r=Ec(e);for(;r&&!zh(r);){if(uo(r)&&!t1(r))return r;r=Ec(r)}return n}let i=V5(e,t);for(;i&&CL(i)&&t1(i);)i=V5(i,t);return i&&zh(i)&&t1(i)&&!k2(i)?n:i||TL(e)||n}const HL=async function(e){const t=this.getOffsetParent||ZN,n=this.getDimensions,i=await n(e.floating);return{reference:VL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function $L(e){return ho(e).direction==="rtl"}const GL={convertOffsetParentRelativeRectToViewportRelativeRect:RL,getDocumentElement:Zo,getClippingRect:UL,getOffsetParent:ZN,getElementRects:HL,getClientRects:DL,getDimensions:qL,getScale:Eh,isElement:uo,isRTL:$L};function JN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YL(e,t){let n=null,i;const r=Zo(e);function o(){var u;clearTimeout(i),(u=n)==null||u.disconnect(),n=null}function c(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),o();const d=e.getBoundingClientRect(),{left:p,top:v,width:S,height:b}=d;if(u||t(),!S||!b)return;const _=Dm(v),A=Dm(r.clientWidth-(p+S)),j=Dm(r.clientHeight-(v+b)),E=Dm(p),D={rootMargin:-_+"px "+-A+"px "+-j+"px "+-E+"px",threshold:ca(0,jc(1,h))||1};let z=!0;function $(ut){const nt=ut[0].intersectionRatio;if(nt!==h){if(!z)return c();nt?c(!1,nt):i=setTimeout(()=>{c(!1,1e-7)},1e3)}nt===1&&!JN(d,e.getBoundingClientRect())&&c(),z=!1}try{n=new IntersectionObserver($,{...D,root:r.ownerDocument})}catch{n=new IntersectionObserver($,D)}n.observe(e)}return c(!0),o}function WL(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,d=P2(e),p=r||o?[...d?df(d):[],...df(t)]:[];p.forEach(E=>{r&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const v=d&&u?YL(d,n):null;let S=-1,b=null;c&&(b=new ResizeObserver(E=>{let[L]=E;L&&L.target===d&&b&&(b.unobserve(t),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var D;(D=b)==null||D.observe(t)})),n()}),d&&!h&&b.observe(d),b.observe(t));let _,A=h?pu(e):null;h&&j();function j(){const E=pu(e);A&&!JN(A,E)&&n(),A=E,_=requestAnimationFrame(j)}return n(),()=>{var E;p.forEach(L=>{r&&L.removeEventListener("scroll",n),o&&L.removeEventListener("resize",n)}),v?.(),(E=b)==null||E.disconnect(),b=null,h&&cancelAnimationFrame(_)}}const KL=bL,XL=xL,QL=gL,ZL=SL,JL=vL,H5=pL,t7=wL,e7=(e,t,n)=>{const i=new Map,r={platform:GL,...n},o={...r.platform,_c:i};return mL(e,t,{...r,platform:o})};var n7=typeof document<"u",i7=function(){},hp=n7?M.useLayoutEffect:i7;function Tp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!Tp(e[i],t[i]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,r[i]))return!1;for(i=n;i--!==0;){const o=r[i];if(!(o==="_owner"&&e.$$typeof)&&!Tp(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function tA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $5(e,t){const n=tA(e);return Math.round(t*n)/n}function e1(e){const t=M.useRef(e);return hp(()=>{t.current=e}),t}function s7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:o,floating:c}={},transform:u=!0,whileElementsMounted:h,open:d}=e,[p,v]=M.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[S,b]=M.useState(i);Tp(S,i)||b(i);const[_,A]=M.useState(null),[j,E]=M.useState(null),L=M.useCallback(K=>{K!==ut.current&&(ut.current=K,A(K))},[]),D=M.useCallback(K=>{K!==nt.current&&(nt.current=K,E(K))},[]),z=o||_,$=c||j,ut=M.useRef(null),nt=M.useRef(null),H=M.useRef(p),Q=h!=null,ct=e1(h),F=e1(r),Y=e1(d),ot=M.useCallback(()=>{if(!ut.current||!nt.current)return;const K={placement:t,strategy:n,middleware:S};F.current&&(K.platform=F.current),e7(ut.current,nt.current,K).then(dt=>{const Tt={...dt,isPositioned:Y.current!==!1};tt.current&&!Tp(H.current,Tt)&&(H.current=Tt,Cf.flushSync(()=>{v(Tt)}))})},[S,t,n,F,Y]);hp(()=>{d===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,v(K=>({...K,isPositioned:!1})))},[d]);const tt=M.useRef(!1);hp(()=>(tt.current=!0,()=>{tt.current=!1}),[]),hp(()=>{if(z&&(ut.current=z),$&&(nt.current=$),z&&$){if(ct.current)return ct.current(z,$,ot);ot()}},[z,$,ot,ct,Q]);const yt=M.useMemo(()=>({reference:ut,floating:nt,setReference:L,setFloating:D}),[L,D]),J=M.useMemo(()=>({reference:z,floating:$}),[z,$]),at=M.useMemo(()=>{const K={position:n,left:0,top:0};if(!J.floating)return K;const dt=$5(J.floating,p.x),Tt=$5(J.floating,p.y);return u?{...K,transform:"translate("+dt+"px, "+Tt+"px)",...tA(J.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:dt,top:Tt}},[n,u,J.floating,p.x,p.y]);return M.useMemo(()=>({...p,update:ot,refs:yt,elements:J,floatingStyles:at}),[p,ot,yt,J,at])}const r7=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:r}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?H5({element:i.current,padding:r}).fn(n):{}:i?H5({element:i,padding:r}).fn(n):{}}}},a7=(e,t)=>({...KL(e),options:[e,t]}),o7=(e,t)=>({...XL(e),options:[e,t]}),l7=(e,t)=>({...t7(e),options:[e,t]}),c7=(e,t)=>({...QL(e),options:[e,t]}),u7=(e,t)=>({...ZL(e),options:[e,t]}),h7=(e,t)=>({...JL(e),options:[e,t]}),d7=(e,t)=>({...r7(e),options:[e,t]});var f7="Arrow",eA=M.forwardRef((e,t)=>{const{children:n,width:i=10,height:r=5,...o}=e;return f.jsx(qs.svg,{...o,ref:t,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});eA.displayName=f7;var m7=eA;function p7(e){const[t,n]=M.useState(void 0);return ma(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let c,u;if("borderBoxSize"in o){const h=o.borderBoxSize,d=Array.isArray(h)?h[0]:h;c=d.inlineSize,u=d.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var R2="Popper",[nA,o0]=Pc(R2),[g7,iA]=nA(R2),sA=e=>{const{__scopePopper:t,children:n}=e,[i,r]=M.useState(null);return f.jsx(g7,{scope:t,anchor:i,onAnchorChange:r,children:n})};sA.displayName=R2;var rA="PopperAnchor",aA=M.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...r}=e,o=iA(rA,n),c=M.useRef(null),u=Ti(t,c),h=M.useRef(null);return M.useEffect(()=>{const d=h.current;h.current=i?.current||c.current,d!==h.current&&o.onAnchorChange(h.current)}),i?null:f.jsx(qs.div,{...r,ref:u})});aA.displayName=rA;var D2="PopperContent",[v7,y7]=nA(D2),oA=M.forwardRef((e,t)=>{const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:o="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:p=0,sticky:v="partial",hideWhenDetached:S=!1,updatePositionStrategy:b="optimized",onPlaced:_,...A}=e,j=iA(D2,n),[E,L]=M.useState(null),D=Ti(t,ft=>L(ft)),[z,$]=M.useState(null),ut=p7(z),nt=ut?.width??0,H=ut?.height??0,Q=i+(o!=="center"?"-"+o:""),ct=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(d)?d:[d],Y=F.length>0,ot={padding:ct,boundary:F.filter(x7),altBoundary:Y},{refs:tt,floatingStyles:yt,placement:J,isPositioned:at,middlewareData:K}=s7({strategy:"fixed",placement:Q,whileElementsMounted:(...ft)=>WL(...ft,{animationFrame:b==="always"}),elements:{reference:j.anchor},middleware:[a7({mainAxis:r+H,alignmentAxis:c}),h&&o7({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?l7():void 0,...ot}),h&&c7({...ot}),u7({...ot,apply:({elements:ft,rects:Ct,availableWidth:_t,availableHeight:Dt})=>{const{width:$t,height:Wt}=Ct.reference,Xt=ft.floating.style;Xt.setProperty("--radix-popper-available-width",`${_t}px`),Xt.setProperty("--radix-popper-available-height",`${Dt}px`),Xt.setProperty("--radix-popper-anchor-width",`${$t}px`),Xt.setProperty("--radix-popper-anchor-height",`${Wt}px`)}}),z&&d7({element:z,padding:u}),w7({arrowWidth:nt,arrowHeight:H}),S&&h7({strategy:"referenceHidden",...ot})]}),[dt,Tt]=uA(J),X=Us(_);ma(()=>{at&&X?.()},[at,X]);const P=K.arrow?.x,q=K.arrow?.y,W=K.arrow?.centerOffset!==0,[lt,ht]=M.useState();return ma(()=>{E&&ht(window.getComputedStyle(E).zIndex)},[E]),f.jsx("div",{ref:tt.setFloating,"data-radix-popper-content-wrapper":"",style:{...yt,transform:at?yt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:lt,"--radix-popper-transform-origin":[K.transformOrigin?.x,K.transformOrigin?.y].join(" "),...K.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(v7,{scope:n,placedSide:dt,onArrowChange:$,arrowX:P,arrowY:q,shouldHideArrow:W,children:f.jsx(qs.div,{"data-side":dt,"data-align":Tt,...A,ref:D,style:{...A.style,animation:at?void 0:"none"}})})})});oA.displayName=D2;var lA="PopperArrow",b7={top:"bottom",right:"left",bottom:"top",left:"right"},cA=M.forwardRef(function(t,n){const{__scopePopper:i,...r}=t,o=y7(lA,i),c=b7[o.placedSide];return f.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:f.jsx(m7,{...r,ref:n,style:{...r.style,display:"block"}})})});cA.displayName=lA;function x7(e){return e!==null}var w7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:i,middlewareData:r}=t,c=r.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[d,p]=uA(n),v={start:"0%",center:"50%",end:"100%"}[p],S=(r.arrow?.x??0)+u/2,b=(r.arrow?.y??0)+h/2;let _="",A="";return d==="bottom"?(_=c?v:`${S}px`,A=`${-h}px`):d==="top"?(_=c?v:`${S}px`,A=`${i.floating.height+h}px`):d==="right"?(_=`${-h}px`,A=c?v:`${b}px`):d==="left"&&(_=`${i.floating.width+h}px`,A=c?v:`${b}px`),{data:{x:_,y:A}}}});function uA(e){const[t,n="center"]=e.split("-");return[t,n]}var S7=sA,hA=aA,dA=oA,fA=cA,N7="Portal",O2=M.forwardRef((e,t)=>{const{container:n,...i}=e,[r,o]=M.useState(!1);ma(()=>o(!0),[]);const c=n||r&&globalThis?.document?.body;return c?HS.createPortal(f.jsx(qs.div,{...i,ref:t}),c):null});O2.displayName=N7;function A7(e,t){return M.useReducer((n,i)=>t[n][i]??n,e)}var wu=e=>{const{present:t,children:n}=e,i=C7(t),r=typeof n=="function"?n({present:i.isPresent}):M.Children.only(n),o=Ti(i.ref,_7(r));return typeof n=="function"||i.isPresent?M.cloneElement(r,{ref:o}):null};wu.displayName="Presence";function C7(e){const[t,n]=M.useState(),i=M.useRef(null),r=M.useRef(e),o=M.useRef("none"),c=e?"mounted":"unmounted",[u,h]=A7(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const d=Om(i.current);o.current=u==="mounted"?d:"none"},[u]),ma(()=>{const d=i.current,p=r.current;if(p!==e){const S=o.current,b=Om(d);e?h("MOUNT"):b==="none"||d?.display==="none"?h("UNMOUNT"):h(p&&S!==b?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,h]),ma(()=>{if(t){let d;const p=t.ownerDocument.defaultView??window,v=b=>{const A=Om(i.current).includes(CSS.escape(b.animationName));if(b.target===t&&A&&(h("ANIMATION_END"),!r.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",d=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},S=b=>{b.target===t&&(o.current=Om(i.current))};return t.addEventListener("animationstart",S),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{p.clearTimeout(d),t.removeEventListener("animationstart",S),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:M.useCallback(d=>{i.current=d?getComputedStyle(d):null,n(d)},[])}}function Om(e){return e?.animationName||"none"}function _7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var j7=Symbol("radix.slottable");function E7(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=j7,t}var M7=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),T7="VisuallyHidden",mA=M.forwardRef((e,t)=>f.jsx(qs.span,{...e,ref:t,style:{...M7,...e.style}}));mA.displayName=T7;var k7=mA,[l0]=Pc("Tooltip",[o0]),z2=o0(),pA="TooltipProvider",L7=700,G5="tooltip.open",[P7,gA]=l0(pA),vA=e=>{const{__scopeTooltip:t,delayDuration:n=L7,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:o}=e,c=M.useRef(!0),u=M.useRef(!1),h=M.useRef(0);return M.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),f.jsx(P7,{scope:t,isOpenDelayedRef:c,delayDuration:n,onOpen:M.useCallback(()=>{window.clearTimeout(h.current),c.current=!1},[]),onClose:M.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:u,onPointerInTransitChange:M.useCallback(d=>{u.current=d},[]),disableHoverableContent:r,children:o})};vA.displayName=pA;var yA="Tooltip",[$H,jf]=l0(yA),jv="TooltipTrigger",R7=M.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=jf(jv,n),o=gA(jv,n),c=z2(n),u=M.useRef(null),h=Ti(t,u,r.onTriggerChange),d=M.useRef(!1),p=M.useRef(!1),v=M.useCallback(()=>d.current=!1,[]);return M.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),f.jsx(hA,{asChild:!0,...c,children:f.jsx(qs.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:h,onPointerMove:oh(e.onPointerMove,S=>{S.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(r.onTriggerEnter(),p.current=!0)}),onPointerLeave:oh(e.onPointerLeave,()=>{r.onTriggerLeave(),p.current=!1}),onPointerDown:oh(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:oh(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:oh(e.onBlur,r.onClose),onClick:oh(e.onClick,r.onClose)})})});R7.displayName=jv;var B2="TooltipPortal",[D7,O7]=l0(B2,{forceMount:void 0}),bA=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:r}=e,o=jf(B2,t);return f.jsx(D7,{scope:t,forceMount:n,children:f.jsx(wu,{present:n||o.open,children:f.jsx(O2,{asChild:!0,container:r,children:i})})})};bA.displayName=B2;var Bh="TooltipContent",xA=M.forwardRef((e,t)=>{const n=O7(Bh,e.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...o}=e,c=jf(Bh,e.__scopeTooltip);return f.jsx(wu,{present:i||c.open,children:c.disableHoverableContent?f.jsx(wA,{side:r,...o,ref:t}):f.jsx(z7,{side:r,...o,ref:t})})}),z7=M.forwardRef((e,t)=>{const n=jf(Bh,e.__scopeTooltip),i=gA(Bh,e.__scopeTooltip),r=M.useRef(null),o=Ti(t,r),[c,u]=M.useState(null),{trigger:h,onClose:d}=n,p=r.current,{onPointerInTransitChange:v}=i,S=M.useCallback(()=>{u(null),v(!1)},[v]),b=M.useCallback((_,A)=>{const j=_.currentTarget,E={x:_.clientX,y:_.clientY},L=q7(E,j.getBoundingClientRect()),D=V7(E,L),z=H7(A.getBoundingClientRect()),$=G7([...D,...z]);u($),v(!0)},[v]);return M.useEffect(()=>()=>S(),[S]),M.useEffect(()=>{if(h&&p){const _=j=>b(j,p),A=j=>b(j,h);return h.addEventListener("pointerleave",_),p.addEventListener("pointerleave",A),()=>{h.removeEventListener("pointerleave",_),p.removeEventListener("pointerleave",A)}}},[h,p,b,S]),M.useEffect(()=>{if(c){const _=A=>{const j=A.target,E={x:A.clientX,y:A.clientY},L=h?.contains(j)||p?.contains(j),D=!$7(E,c);L?S():D&&(S(),d())};return document.addEventListener("pointermove",_),()=>document.removeEventListener("pointermove",_)}},[h,p,c,d,S]),f.jsx(wA,{...e,ref:o})}),[B7,F7]=l0(yA,{isInside:!1}),I7=E7("TooltipContent"),wA=M.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:o,onPointerDownOutside:c,...u}=e,h=jf(Bh,n),d=z2(n),{onClose:p}=h;return M.useEffect(()=>(document.addEventListener(G5,p),()=>document.removeEventListener(G5,p)),[p]),M.useEffect(()=>{if(h.trigger){const v=S=>{S.target?.contains(h.trigger)&&p()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[h.trigger,p]),f.jsx(j2,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:v=>v.preventDefault(),onDismiss:p,children:f.jsxs(dA,{"data-state":h.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(I7,{children:i}),f.jsx(B7,{scope:n,isInside:!0,children:f.jsx(k7,{id:h.contentId,role:"tooltip",children:r||i})})]})})});xA.displayName=Bh;var SA="TooltipArrow",U7=M.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,r=z2(n);return F7(SA,n).isInside?null:f.jsx(fA,{...r,...i,ref:t})});U7.displayName=SA;function q7(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,i,r,o)){case o:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function V7(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function H7(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function $7(e,t){const{x:n,y:i}=e;let r=!1;for(let o=0,c=t.length-1;o<t.length;c=o++){const u=t[o],h=t[c],d=u.x,p=u.y,v=h.x,S=h.y;p>i!=S>i&&n<(v-d)*(i-p)/(S-p)+d&&(r=!r)}return r}function G7(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),Y7(t)}function Y7(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const r=e[i];for(;t.length>=2;){const o=t[t.length-1],c=t[t.length-2];if((o.x-c.x)*(r.y-c.y)>=(o.y-c.y)*(r.x-c.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const o=n[n.length-1],c=n[n.length-2];if((o.x-c.x)*(r.y-c.y)>=(o.y-c.y)*(r.x-c.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var W7=vA,K7=bA,NA=xA;const X7=W7,Q7=M.forwardRef(({className:e,sideOffset:t=4,...n},i)=>f.jsx(K7,{children:f.jsx(NA,{ref:i,sideOffset:t,className:ci("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));Q7.displayName=NA.displayName;const Z7={"nav.home":{en:"Home",zh:"首页",ar:"الرئيسية"},"nav.tools":{en:"Tools",zh:"工具",ar:"الأدوات"},"nav.tokenomics":{en:"Tokenomics",zh:"代币经济",ar:"اقتصاديات الرمز"},"nav.roadmap":{en:"Roadmap",zh:"路线图",ar:"خارطة الطريق"},"nav.community":{en:"Community",zh:"社区",ar:"المجتمع"},"nav.docs":{en:"Docs",zh:"文档",ar:"المستندات"},"nav.launchApp":{en:"Launch App",zh:"启动应用",ar:"تشغيل التطبيق"},"hero.badge":{en:"AI-Powered Blockchain Utilities",zh:"AI驱动的区块链工具",ar:"أدوات بلوكتشين مدعومة بالذكاء الاصطناعي"},"hero.badgeAlt":{en:"AI-Powered Decentralized Finance",zh:"AI驱动的去中心化金融",ar:"التمويل اللامركزي المدعوم بالذكاء الاصطناعي"},"hero.launchDashboard":{en:"Launch Dashboard",zh:"启动仪表板",ar:"تشغيل لوحة التحكم"},"hero.viewChart":{en:"View Chart",zh:"查看图表",ar:"عرض الرسم البياني"},"hero.searchBtn":{en:"Search",zh:"搜索",ar:"بحث"},"hero.tagline":{en:"AI-Powered On-Chain Alpha Engine",zh:"AI驱动的链上Alpha引擎",ar:"محرك ألفا على السلسلة مدعوم بالذكاء الاصطناعي"},"hero.title1":{en:"Your",zh:"您的",ar:"مستشارك"},"hero.title2":{en:"Crypto Companion",zh:"加密货币伙伴",ar:"المشفر الموثوق"},"hero.description":{en:"Astherafi here to help you navigate the crypto market by offering a suite of Sentiment, Technical, and On-Chain tools powered by AI.",zh:"Astherafi 在这里通过 AI 驱动的情绪分析、技术分析和链上工具帮助您驾驭加密货币市场。",ar:"Astherafi هنا لمساعدتك في التنقل في سوق العملات المشفرة من خلال تقديم مجموعة من أدوات التحليل العاطفي والتقني وعلى السلسلة المدعومة بالذكاء الاصطناعي."},"hero.search":{en:"Search tokens....",zh:"搜索代币....",ar:"البحث عن الرموز...."},"hero.contract":{en:"Contract Address",zh:"合约地址",ar:"عنوان العقد"},"hero.copied":{en:"Copied!",zh:"已复制!",ar:"تم النسخ!"},"tools.title":{en:"Our Tools",zh:"我们的工具",ar:"أدواتنا"},"tools.tokenAnalyzer":{en:"Token Analyzer",zh:"代币分析器",ar:"محلل الرموز"},"tools.tokenAnalyzerDesc":{en:"AI-powered token security analysis with sentiment, technical, and on-chain scores.",zh:"AI驱动的代币安全分析，包含情绪、技术和链上评分。",ar:"تحليل أمان الرموز المدعوم بالذكاء الاصطناعي مع درجات المشاعر والتقنية وعلى السلسلة."},"tools.tokenGenerator":{en:"Token Generator",zh:"代币生成器",ar:"مولد الرموز"},"tools.tokenGeneratorDesc":{en:"Create and deploy your own token on BSC with customizable parameters.",zh:"在BSC上创建和部署具有可定制参数的代币。",ar:"إنشاء ونشر الرمز الخاص بك على BSC مع معلمات قابلة للتخصيص."},"tools.websiteBuilder":{en:"Website Builder",zh:"网站构建器",ar:"منشئ المواقع"},"tools.websiteBuilderDesc":{en:"Generate professional token landing pages instantly with multiple themes.",zh:"立即生成具有多种主题的专业代币登陆页面。",ar:"إنشاء صفحات هبوط احترافية للرموز فورًا مع سمات متعددة."},"tools.bundleChecker":{en:"Bundle Checker",zh:"捆绑检查器",ar:"مدقق الحزم"},"tools.bundleCheckerDesc":{en:"Detect bundled transactions and identify potential rug pull patterns.",zh:"检测捆绑交易并识别潜在的拉地毯模式。",ar:"كشف المعاملات المجمعة وتحديد أنماط الاحتيال المحتملة."},"tools.passwordScore":{en:"Password Score",zh:"密码评分",ar:"درجة كلمة المرور"},"tools.passwordScoreDesc":{en:"Check the strength and security of your passwords with advanced scoring.",zh:"使用高级评分检查密码的强度和安全性。",ar:"تحقق من قوة وأمان كلمات المرور الخاصة بك مع تقييم متقدم."},"tools.staking":{en:"Staking",zh:"质押",ar:"التخزين"},"tools.stakingDesc":{en:"Stake your tokens to earn passive rewards with competitive APY.",zh:"质押代币以赚取具有竞争力APY的被动收益。",ar:"قم بتخزين رموزك لكسب مكافآت سلبية مع عائد سنوي تنافسي."},"tokenomics.title":{en:"Tokenomics",zh:"代币经济",ar:"اقتصاديات الرمز"},"tokenomics.totalSupply":{en:"Total Supply",zh:"总供应量",ar:"إجمالي العرض"},"tokenomics.tax":{en:"Tax",zh:"税率",ar:"الضريبة"},"tokenomics.chain":{en:"Chain",zh:"链",ar:"السلسلة"},"tokenomics.liquidity":{en:"Liquidity",zh:"流动性",ar:"السيولة"},"tokenomics.locked":{en:"Locked",zh:"已锁定",ar:"مقفل"},"roadmap.title":{en:"Roadmap",zh:"路线图",ar:"خارطة الطريق"},"roadmap.phase1":{en:"Phase 1",zh:"第一阶段",ar:"المرحلة الأولى"},"roadmap.foundation":{en:"Foundation",zh:"基础建设",ar:"الأساس"},"roadmap.phase1Item1":{en:"Launch Token Analyzer",zh:"启动代币分析器",ar:"إطلاق محلل الرموز"},"roadmap.phase1Item2":{en:"Deploy Token Generator",zh:"部署代币生成器",ar:"نشر مولد الرموز"},"roadmap.phase1Item3":{en:"Website Builder Release",zh:"网站构建器发布",ar:"إصدار منشئ المواقع"},"roadmap.phase1Item4":{en:"Community Building",zh:"社区建设",ar:"بناء المجتمع"},"roadmap.phase2":{en:"Phase 2",zh:"第二阶段",ar:"المرحلة الثانية"},"roadmap.expansion":{en:"Expansion",zh:"扩展",ar:"التوسع"},"roadmap.phase2Item1":{en:"Token Swap Integration",zh:"代币兑换集成",ar:"تكامل تبادل الرموز"},"roadmap.phase2Item2":{en:"Bundle Checker Launch",zh:"捆绑检查器启动",ar:"إطلاق مدقق الحزم"},"roadmap.phase2Item3":{en:"Multi-chain Support",zh:"多链支持",ar:"دعم متعدد السلاسل"},"roadmap.phase2Item4":{en:"Partnership Announcements",zh:"合作伙伴公告",ar:"إعلانات الشراكة"},"roadmap.phase3":{en:"Phase 3",zh:"第三阶段",ar:"المرحلة الثالثة"},"roadmap.growth":{en:"Growth",zh:"增长",ar:"النمو"},"roadmap.phase3Item1":{en:"Staking Platform Launch",zh:"质押平台启动",ar:"إطلاق منصة التخزين"},"roadmap.phase3Item2":{en:"Mobile App Development",zh:"移动应用开发",ar:"تطوير تطبيق الجوال"},"roadmap.phase3Item3":{en:"Advanced Analytics",zh:"高级分析",ar:"تحليلات متقدمة"},"roadmap.phase3Item4":{en:"CEX Listings",zh:"CEX上市",ar:"إدراج CEX"},"roadmap.phase4":{en:"Phase 4",zh:"第四阶段",ar:"المرحلة الرابعة"},"roadmap.innovation":{en:"Innovation",zh:"创新",ar:"الابتكار"},"roadmap.phase4Item1":{en:"AI Trading Signals",zh:"AI交易信号",ar:"إشارات التداول بالذكاء الاصطناعي"},"roadmap.phase4Item2":{en:"Cross-chain Bridge",zh:"跨链桥",ar:"جسر عبر السلاسل"},"roadmap.phase4Item3":{en:"API Access",zh:"API访问",ar:"الوصول إلى API"},"roadmap.phase4Item4":{en:"Global Expansion",zh:"全球扩展",ar:"التوسع العالمي"},"community.title":{en:"Join Our Community",zh:"加入我们的社区",ar:"انضم إلى مجتمعنا"},"community.description":{en:"Stay updated with the latest news and connect with fellow crypto enthusiasts.",zh:"获取最新消息并与加密货币爱好者建立联系。",ar:"ابق على اطلاع بأحدث الأخبار وتواصل مع عشاق العملات المشفرة."},"community.twitter":{en:"Twitter",zh:"推特",ar:"تويتر"},"community.telegram":{en:"Telegram",zh:"电报",ar:"تيليجرام"},"community.discord":{en:"Discord",zh:"Discord",ar:"ديسكورد"},"footer.rights":{en:"All rights reserved.",zh:"版权所有。",ar:"جميع الحقوق محفوظة."},"dashboard.title":{en:"Dashboard",zh:"仪表板",ar:"لوحة التحكم"},"dashboard.overview":{en:"Dashboard Overview",zh:"仪表板概览",ar:"نظرة عامة على لوحة التحكم"},"dashboard.version":{en:"Dashboard v1.0",zh:"仪表板 v1.0",ar:"لوحة التحكم v1.0"},"dashboard.tokenAnalyzer":{en:"Token Analyzer",zh:"代币分析器",ar:"محلل الرموز"},"dashboard.tokenGenerator":{en:"Token Generator",zh:"代币生成器",ar:"مولد الرموز"},"dashboard.websiteBuilder":{en:"Website Builder",zh:"网站构建器",ar:"منشئ المواقع"},"dashboard.bundleChecker":{en:"Bundle Checker",zh:"捆绑检查器",ar:"مدقق الحزم"},"dashboard.passwordScore":{en:"Password Score",zh:"密码评分",ar:"درجة كلمة المرور"},"dashboard.staking":{en:"Staking",zh:"质押",ar:"التخزين"},"dashboard.tokenSwap":{en:"Token Swap",zh:"代币兑换",ar:"تبادل الرموز"},"dashboard.freeAudit":{en:"Free Audit",zh:"免费审计",ar:"تدقيق مجاني"},"dashboard.freeAuditDesc":{en:"Enter contract address and get AI-powered security analysis - completely free!",zh:"输入合约地址，获取AI驱动的安全分析 - 完全免费！",ar:"أدخل عنوان العقد واحصل على تحليل أمني مدعوم بالذكاء الاصطناعي - مجاني تمامًا!"},"dashboard.blockExplorer":{en:"Block Explorer",zh:"区块浏览器",ar:"مستكشف الكتل"},"dashboard.startAudit":{en:"Start Audit",zh:"开始审计",ar:"بدء التدقيق"},"dashboard.auditInProgress":{en:"Auditing...",zh:"审计中...",ar:"جاري التدقيق..."},"dashboard.contractAddress":{en:"Contract Address (BSC Mainnet)",zh:"合约地址 (BSC主网)",ar:"عنوان العقد (شبكة BSC الرئيسية)"},"dashboard.contractVerified":{en:"Contract must be verified on BscScan",zh:"合约必须在BscScan上验证",ar:"يجب التحقق من العقد على BscScan"},"dashboard.auditComplete":{en:"Audit completed successfully!",zh:"审计成功完成！",ar:"تم التدقيق بنجاح!"},"dashboard.detailedFindings":{en:"Detailed Findings",zh:"详细发现",ar:"النتائج التفصيلية"},"dashboard.downloadReport":{en:"Download Full Report",zh:"下载完整报告",ar:"تحميل التقرير الكامل"},"dashboard.critical":{en:"Critical",zh:"严重",ar:"حرج"},"dashboard.major":{en:"Major",zh:"重要",ar:"رئيسي"},"dashboard.medium":{en:"Medium",zh:"中等",ar:"متوسط"},"dashboard.minor":{en:"Minor",zh:"次要",ar:"ثانوي"},"dashboard.info":{en:"Info",zh:"信息",ar:"معلومات"},"dashboard.confidenceHigh":{en:"Confidence: High",zh:"置信度: 高",ar:"الثقة: عالية"},"dashboard.confidenceMedium":{en:"Confidence: Medium",zh:"置信度: 中",ar:"الثقة: متوسطة"},"dashboard.confidenceLow":{en:"Confidence: Low",zh:"置信度: 低",ar:"الثقة: منخفضة"},"dashboard.search":{en:"Search tokens...",zh:"搜索代币...",ar:"البحث عن الرموز..."},"dashboard.analyze":{en:"Analyze",zh:"分析",ar:"تحليل"},"dashboard.analyzing":{en:"Analyzing...",zh:"分析中...",ar:"جاري التحليل..."},"dashboard.selectChain":{en:"Select Chain",zh:"选择链",ar:"اختر السلسلة"},"dashboard.marketData":{en:"Market Data",zh:"市场数据",ar:"بيانات السوق"},"dashboard.securityFlags":{en:"Security Flags",zh:"安全标志",ar:"علامات الأمان"},"dashboard.aiAnalysis":{en:"AI Analysis",zh:"AI分析",ar:"تحليل الذكاء الاصطناعي"},"dashboard.simulationResults":{en:"Simulation Results",zh:"模拟结果",ar:"نتائج المحاكاة"},"dashboard.holderAnalysis":{en:"Holder Analysis",zh:"持有者分析",ar:"تحليل المالكين"},"dashboard.tradingSentiment":{en:"Trading Sentiment",zh:"交易情绪",ar:"معنويات التداول"},"dashboard.socialLinks":{en:"Social Links",zh:"社交链接",ar:"روابط التواصل"},"dashboard.price":{en:"Price",zh:"价格",ar:"السعر"},"dashboard.marketCap":{en:"Market Cap",zh:"市值",ar:"القيمة السوقية"},"dashboard.volume24h":{en:"Volume 24h",zh:"24小时交易量",ar:"حجم 24 ساعة"},"dashboard.liquidity":{en:"Liquidity",zh:"流动性",ar:"السيولة"},"dashboard.holders":{en:"Holders",zh:"持有者",ar:"المالكين"},"dashboard.enterPassword":{en:"Enter password to check",zh:"输入密码进行检查",ar:"أدخل كلمة المرور للتحقق"},"dashboard.checkPassword":{en:"Check Password",zh:"检查密码",ar:"تحقق من كلمة المرور"},"dashboard.passwordStrength":{en:"Password Strength",zh:"密码强度",ar:"قوة كلمة المرور"},"dashboard.weak":{en:"Weak",zh:"弱",ar:"ضعيف"},"dashboard.fair":{en:"Fair",zh:"一般",ar:"مقبول"},"dashboard.good":{en:"Good",zh:"良好",ar:"جيد"},"dashboard.strong":{en:"Strong",zh:"强",ar:"قوي"},"dashboard.veryStrong":{en:"Very Strong",zh:"非常强",ar:"قوي جداً"},"dashboard.enterWalletAddress":{en:"Enter wallet address",zh:"输入钱包地址",ar:"أدخل عنوان المحفظة"},"dashboard.checkBundle":{en:"Check Bundle",zh:"检查捆绑",ar:"تحقق من الحزمة"},"dashboard.checking":{en:"Checking...",zh:"检查中...",ar:"جاري التحقق..."},"dashboard.createToken":{en:"Create Token",zh:"创建代币",ar:"إنشاء رمز"},"dashboard.tokenName":{en:"Token Name",zh:"代币名称",ar:"اسم الرمز"},"dashboard.tokenSymbol":{en:"Token Symbol",zh:"代币符号",ar:"رمز العملة"},"dashboard.totalSupply":{en:"Total Supply",zh:"总供应量",ar:"إجمالي العرض"},"dashboard.deploy":{en:"Deploy Token",zh:"部署代币",ar:"نشر الرمز"},"dashboard.connectWallet":{en:"Connect Wallet",zh:"连接钱包",ar:"ربط المحفظة"},"dashboard.stakeTokens":{en:"Stake Tokens",zh:"质押代币",ar:"تخزين الرموز"},"dashboard.unstake":{en:"Unstake",zh:"取消质押",ar:"إلغاء التخزين"},"dashboard.rewards":{en:"Rewards",zh:"奖励",ar:"المكافآت"},"dashboard.apy":{en:"APY",zh:"年化收益率",ar:"العائد السنوي"},"dashboard.swap":{en:"Swap",zh:"兑换",ar:"تبادل"},"dashboard.from":{en:"From",zh:"从",ar:"من"},"dashboard.to":{en:"To",zh:"到",ar:"إلى"},"dashboard.slippage":{en:"Slippage",zh:"滑点",ar:"الانزلاق"},"dashboard.generateWebsite":{en:"Generate Website",zh:"生成网站",ar:"إنشاء موقع"},"dashboard.projectName":{en:"Project Name",zh:"项目名称",ar:"اسم المشروع"},"dashboard.projectDescription":{en:"Project Description",zh:"项目描述",ar:"وصف المشروع"},"dashboard.theme":{en:"Theme",zh:"主题",ar:"السمة"},"dashboard.selectTool":{en:"Select a tool from the sidebar to begin",zh:"从侧边栏选择工具开始",ar:"اختر أداة من الشريط الجانبي للبدء"},"dashboard.analyzeDesc":{en:"Analyze any token contract for security risks and metrics",zh:"分析任何代币合约的安全风险和指标",ar:"تحليل أي عقد رمز للمخاطر الأمنية والمقاييس"},"dashboard.generateDesc":{en:"Create and deploy your own token on blockchain",zh:"在区块链上创建和部署您自己的代币",ar:"إنشاء ونشر الرمز الخاص بك على البلوكتشين"},"dashboard.websiteDesc":{en:"Build a professional website for your project",zh:"为您的项目构建专业网站",ar:"بناء موقع احترافي لمشروعك"},"dashboard.bundleDesc":{en:"Check bundled transactions and wallet activity",zh:"检查捆绑交易和钱包活动",ar:"التحقق من المعاملات المجمعة ونشاط المحفظة"},"dashboard.passwordDesc":{en:"Evaluate the strength of your passwords",zh:"评估密码强度",ar:"تقييم قوة كلمات المرور"},"dashboard.stakingDesc":{en:"Stake your tokens and earn rewards",zh:"质押代币并获得奖励",ar:"قم بتخزين الرموز واكسب المكافآت"},"dashboard.swapDesc":{en:"Exchange tokens across different chains",zh:"在不同链之间交换代币",ar:"تبادل الرموز عبر سلاسل مختلفة"},"dashboard.home":{en:"Home",zh:"首页",ar:"الرئيسية"},"docs.backToHome":{en:"Back to Home",zh:"返回首页",ar:"العودة للرئيسية"},"docs.whitepaper":{en:"Whitepaper v1.0",zh:"白皮书 v1.0",ar:"الورقة البيضاء v1.0"},"docs.officialDocs":{en:"Official Documentation",zh:"官方文档",ar:"الوثائق الرسمية"},"docs.subtitle":{en:"AI-Powered Blockchain Utilities Platform for Smart Crypto Investors",zh:"为智能加密投资者打造的AI驱动区块链工具平台",ar:"منصة أدوات البلوكتشين المدعومة بالذكاء الاصطناعي للمستثمرين الأذكياء"},"docs.introduction":{en:"Introduction",zh:"简介",ar:"المقدمة"},"docs.introText1":{en:"Astherafi is a comprehensive blockchain utilities platform designed to empower cryptocurrency investors with intelligent tools for token analysis, security verification, and portfolio management. Our platform combines advanced artificial intelligence with real-time blockchain data to provide actionable insights that help users make informed investment decisions.",zh:"Astherafi 是一个全面的区块链工具平台，旨在为加密货币投资者提供智能工具，用于代币分析、安全验证和投资组合管理。我们的平台将先进的人工智能与实时区块链数据相结合，提供可操作的见解，帮助用户做出明智的投资决策。",ar:"Astherafi هي منصة شاملة لأدوات البلوكتشين مصممة لتمكين مستثمري العملات المشفرة بأدوات ذكية لتحليل الرموز والتحقق من الأمان وإدارة المحافظ. تجمع منصتنا بين الذكاء الاصطناعي المتقدم وبيانات البلوكتشين في الوقت الفعلي لتوفير رؤى قابلة للتنفيذ تساعد المستخدمين على اتخاذ قرارات استثمارية مستنيرة."},"docs.introText2":{en:"In an ever-evolving crypto landscape filled with opportunities and risks, Astherafi serves as your trusted companion, offering sophisticated analysis tools that were once available only to institutional investors and professional traders.",zh:"在充满机遇和风险的不断发展的加密货币领域，Astherafi 是您值得信赖的伙伴，提供曾经只有机构投资者和专业交易员才能使用的复杂分析工具。",ar:"في مشهد التشفير المتطور باستمرار والمليء بالفرص والمخاطر، تعمل Astherafi كرفيقك الموثوق، حيث تقدم أدوات تحليل متطورة كانت متاحة فقط للمستثمرين المؤسسيين والمتداولين المحترفين."},"docs.ourVision":{en:"Our Vision",zh:"我们的愿景",ar:"رؤيتنا"},"docs.democratizeSecurity":{en:"Democratize Security",zh:"安全民主化",ar:"إضفاء الطابع الديمقراطي على الأمان"},"docs.democratizeSecurityDesc":{en:"Make professional-grade security analysis accessible to every crypto investor, regardless of technical expertise or portfolio size.",zh:"让每一位加密投资者都能获得专业级别的安全分析，无论技术专长或投资组合规模如何。",ar:"جعل تحليل الأمان الاحترافي متاحًا لكل مستثمر في العملات المشفرة، بغض النظر عن الخبرة التقنية أو حجم المحفظة."},"docs.aiFirstApproach":{en:"AI-First Approach",zh:"AI优先策略",ar:"نهج الذكاء الاصطناعي أولاً"},"docs.aiFirstApproachDesc":{en:"Leverage cutting-edge artificial intelligence to analyze complex blockchain data and provide clear, actionable recommendations.",zh:"利用尖端人工智能分析复杂的区块链数据，并提供清晰、可操作的建议。",ar:"الاستفادة من الذكاء الاصطناعي المتطور لتحليل بيانات البلوكتشين المعقدة وتقديم توصيات واضحة وقابلة للتنفيذ."},"docs.multiChainSupport":{en:"Multi-Chain Support",zh:"多链支持",ar:"دعم متعدد السلاسل"},"docs.multiChainSupportDesc":{en:"Support major blockchain networks including Ethereum, BNB Smart Chain, Solana, Polygon, Arbitrum, Base, and more.",zh:"支持主要区块链网络，包括以太坊、BNB智能链、Solana、Polygon、Arbitrum、Base等。",ar:"دعم شبكات البلوكتشين الرئيسية بما في ذلك إيثريوم و BNB Smart Chain و Solana و Polygon و Arbitrum و Base والمزيد."},"docs.communityDriven":{en:"Community Driven",zh:"社区驱动",ar:"مدفوع بالمجتمع"},"docs.communityDrivenDesc":{en:"Build tools based on real user needs and feedback, constantly evolving to address the challenges faced by the crypto community.",zh:"基于真实用户需求和反馈构建工具，不断发展以应对加密社区面临的挑战。",ar:"بناء أدوات بناءً على احتياجات المستخدمين الحقيقية وملاحظاتهم، والتطور المستمر لمعالجة التحديات التي يواجهها مجتمع التشفير."},"docs.platformFeatures":{en:"Platform Features",zh:"平台功能",ar:"ميزات المنصة"},"docs.securityPrivacy":{en:"Security & Privacy",zh:"安全与隐私",ar:"الأمان والخصوصية"},"docs.dataProtection":{en:"Data Protection",zh:"数据保护",ar:"حماية البيانات"},"docs.noPersonalData":{en:"No personal data collection required",zh:"无需收集个人数据",ar:"لا يلزم جمع بيانات شخصية"},"docs.walletReadOnly":{en:"Wallet connections are read-only by default",zh:"钱包连接默认为只读",ar:"اتصالات المحفظة للقراءة فقط افتراضياً"},"docs.explicitApproval":{en:"All sensitive operations require explicit approval",zh:"所有敏感操作需要明确批准",ar:"جميع العمليات الحساسة تتطلب موافقة صريحة"},"docs.platformSecurity":{en:"Platform Security",zh:"平台安全",ar:"أمان المنصة"},"docs.httpsEncryption":{en:"HTTPS encryption on all connections",zh:"所有连接均使用HTTPS加密",ar:"تشفير HTTPS على جميع الاتصالات"},"docs.noPrivateKeys":{en:"No private keys stored on servers",zh:"服务器上不存储私钥",ar:"لا يتم تخزين المفاتيح الخاصة على الخوادم"},"docs.regularAudits":{en:"Regular security audits and updates",zh:"定期安全审计和更新",ar:"عمليات تدقيق وتحديثات أمنية منتظمة"},"docs.roadmap":{en:"Roadmap",zh:"路线图",ar:"خارطة الطريق"},"docs.phase1":{en:"Phase 1",zh:"第一阶段",ar:"المرحلة 1"},"docs.foundation":{en:"Foundation",zh:"基础建设",ar:"الأساس"},"docs.phase2":{en:"Phase 2",zh:"第二阶段",ar:"المرحلة 2"},"docs.expansion":{en:"Expansion",zh:"扩展",ar:"التوسع"},"docs.phase3":{en:"Phase 3",zh:"第三阶段",ar:"المرحلة 3"},"docs.growth":{en:"Growth",zh:"增长",ar:"النمو"},"docs.phase4":{en:"Phase 4",zh:"第四阶段",ar:"المرحلة 4"},"docs.maturity":{en:"Maturity",zh:"成熟",ar:"النضج"},"docs.tokenomics":{en:"Tokenomics",zh:"代币经济学",ar:"اقتصاديات الرموز"},"docs.tokenomicsDesc":{en:"The ASTH token powers the Astherafi ecosystem, providing utility and governance capabilities.",zh:"ASTH代币为Astherafi生态系统提供动力，提供实用性和治理能力。",ar:"يعمل رمز ASTH على تشغيل نظام Astherafi البيئي، مما يوفر إمكانيات الاستخدام والحوكمة."},"docs.totalSupply":{en:"Total Supply",zh:"总供应量",ar:"إجمالي العرض"},"docs.tax":{en:"Tax",zh:"税率",ar:"الضريبة"},"docs.network":{en:"Network",zh:"网络",ar:"الشبكة"},"docs.liquidityStatus":{en:"Liquidity Status",zh:"流动性状态",ar:"حالة السيولة"},"docs.locked":{en:"Locked",zh:"已锁定",ar:"مقفل"},"docs.completed":{en:"Completed",zh:"已完成",ar:"مكتمل"},"docs.inProgress":{en:"In Progress",zh:"进行中",ar:"قيد التنفيذ"},"docs.upcoming":{en:"Upcoming",zh:"即将推出",ar:"قادم"},"docs.feature.tokenAnalyzer":{en:"Token Analyzer",zh:"代币分析器",ar:"محلل الرموز"},"docs.feature.tokenAnalyzerBadge":{en:"AI-Powered",zh:"AI驱动",ar:"مدعوم بالذكاء الاصطناعي"},"docs.feature.tokenAnalyzerDesc":{en:"Our flagship feature combines multiple analysis dimensions to give you a complete picture of any token.",zh:"我们的旗舰功能结合多个分析维度，为您提供任何代币的完整图景。",ar:"ميزتنا الرئيسية تجمع بين أبعاد تحليلية متعددة لتقديم صورة كاملة عن أي رمز."},"docs.feature.tokenAnalyzer1":{en:"Security risk assessment with 20+ vulnerability checks",zh:"包含20+漏洞检查的安全风险评估",ar:"تقييم المخاطر الأمنية مع أكثر من 20 فحص للثغرات"},"docs.feature.tokenAnalyzer2":{en:"AI-powered sentiment analysis using advanced language models",zh:"使用先进语言模型的AI情绪分析",ar:"تحليل المشاعر المدعوم بالذكاء الاصطناعي باستخدام نماذج لغوية متقدمة"},"docs.feature.tokenAnalyzer3":{en:"Technical analysis scores based on contract patterns",zh:"基于合约模式的技术分析评分",ar:"درجات التحليل الفني بناءً على أنماط العقود"},"docs.feature.tokenAnalyzer4":{en:"On-chain metrics including holder distribution and liquidity",zh:"包括持有者分布和流动性的链上指标",ar:"مقاييس على السلسلة بما في ذلك توزيع المالكين والسيولة"},"docs.feature.tokenAnalyzer5":{en:"Real-time market data with price change tracking",zh:"实时市场数据与价格变化跟踪",ar:"بيانات السوق في الوقت الفعلي مع تتبع تغير الأسعار"},"docs.feature.tokenAnalyzer6":{en:"Social presence verification (Twitter, Telegram, Discord)",zh:"社交存在验证（Twitter、Telegram、Discord）",ar:"التحقق من الوجود الاجتماعي (تويتر، تيليجرام، ديسكورد)"},"docs.feature.tokenGenerator":{en:"Token Generator",zh:"代币生成器",ar:"مولد الرموز"},"docs.feature.tokenGeneratorBadge":{en:"BSC",zh:"BSC",ar:"BSC"},"docs.feature.tokenGeneratorDesc":{en:"Create your own token on BNB Smart Chain with customizable parameters.",zh:"在BNB智能链上创建具有可定制参数的代币。",ar:"أنشئ الرمز الخاص بك على سلسلة BNB الذكية بمعلمات قابلة للتخصيص."},"docs.feature.tokenGenerator1":{en:"ERC-20 compliant token creation",zh:"符合ERC-20标准的代币创建",ar:"إنشاء رمز متوافق مع ERC-20"},"docs.feature.tokenGenerator2":{en:"Customizable name, symbol, and supply",zh:"可自定义名称、符号和供应量",ar:"اسم ورمز وعرض قابل للتخصيص"},"docs.feature.tokenGenerator3":{en:"Automatic liquidity pool setup",zh:"自动流动性池设置",ar:"إعداد مجمع السيولة التلقائي"},"docs.feature.tokenGenerator4":{en:"Trading fee configuration",zh:"交易费用配置",ar:"تكوين رسوم التداول"},"docs.feature.tokenGenerator5":{en:"Direct wallet integration",zh:"直接钱包集成",ar:"تكامل المحفظة المباشر"},"docs.feature.bundleChecker":{en:"Bundle Checker",zh:"捆绑检查器",ar:"مدقق الحزم"},"docs.feature.bundleCheckerBadge":{en:"Anti-Rug",zh:"防跑路",ar:"مضاد للاحتيال"},"docs.feature.bundleCheckerDesc":{en:"Detect suspicious wallet activity and potential rug pull patterns.",zh:"检测可疑钱包活动和潜在的跑路模式。",ar:"اكتشاف نشاط المحفظة المشبوه وأنماط الاحتيال المحتملة."},"docs.feature.bundleChecker1":{en:"Identify coordinated wallet groups",zh:"识别协调的钱包群组",ar:"تحديد مجموعات المحافظ المنسقة"},"docs.feature.bundleChecker2":{en:"Track bundled transaction patterns",zh:"跟踪捆绑交易模式",ar:"تتبع أنماط المعاملات المجمعة"},"docs.feature.bundleChecker3":{en:"Sniper bot detection",zh:"狙击机器人检测",ar:"اكتشاف روبوتات القناص"},"docs.feature.bundleChecker4":{en:"Whale wallet monitoring",zh:"巨鲸钱包监控",ar:"مراقبة محافظ الحيتان"},"docs.feature.bundleChecker5":{en:"Historical transaction analysis",zh:"历史交易分析",ar:"تحليل المعاملات التاريخية"},"docs.feature.websiteBuilder":{en:"Website Builder",zh:"网站构建器",ar:"منشئ المواقع"},"docs.feature.websiteBuilderBadge":{en:"No-Code",zh:"无代码",ar:"بدون كود"},"docs.feature.websiteBuilderDesc":{en:"Generate professional token landing pages instantly.",zh:"即时生成专业的代币登陆页面。",ar:"إنشاء صفحات هبوط احترافية للرموز على الفور."},"docs.feature.websiteBuilder1":{en:"Multiple theme options (Dark, Light, Cyber)",zh:"多种主题选项（深色、浅色、赛博）",ar:"خيارات سمات متعددة (داكن، فاتح، سايبر)"},"docs.feature.websiteBuilder2":{en:"Automatic content generation",zh:"自动内容生成",ar:"إنشاء المحتوى التلقائي"},"docs.feature.websiteBuilder3":{en:"Responsive design for all devices",zh:"适配所有设备的响应式设计",ar:"تصميم متجاوب لجميع الأجهزة"},"docs.feature.websiteBuilder4":{en:"Social links integration",zh:"社交链接集成",ar:"تكامل روابط التواصل الاجتماعي"},"docs.feature.websiteBuilder5":{en:"One-click export",zh:"一键导出",ar:"تصدير بنقرة واحدة"},"docs.feature.passwordSecurity":{en:"Password Security",zh:"密码安全",ar:"أمان كلمة المرور"},"docs.feature.passwordSecurityBadge":{en:"Privacy",zh:"隐私",ar:"الخصوصية"},"docs.feature.passwordSecurityDesc":{en:"Check the strength of your passwords with our advanced scoring system.",zh:"使用我们先进的评分系统检查密码强度。",ar:"تحقق من قوة كلمات المرور باستخدام نظام التقييم المتقدم."},"docs.feature.passwordSecurity1":{en:"Real-time strength analysis",zh:"实时强度分析",ar:"تحليل القوة في الوقت الفعلي"},"docs.feature.passwordSecurity2":{en:"Pattern detection",zh:"模式检测",ar:"اكتشاف الأنماط"},"docs.feature.passwordSecurity3":{en:"Entropy calculation",zh:"熵值计算",ar:"حساب الإنتروبيا"},"docs.feature.passwordSecurity4":{en:"Improvement suggestions",zh:"改进建议",ar:"اقتراحات التحسين"},"docs.feature.passwordSecurity5":{en:"100% client-side processing",zh:"100%客户端处理",ar:"معالجة 100% من جانب العميل"},"docs.feature.tokenStaking":{en:"Token Staking",zh:"代币质押",ar:"تخزين الرموز"},"docs.feature.tokenStakingBadge":{en:"Earn",zh:"赚取",ar:"اكسب"},"docs.feature.tokenStakingDesc":{en:"Stake your tokens to earn passive rewards.",zh:"质押代币以获得被动奖励。",ar:"قم بتخزين الرموز للحصول على مكافآت سلبية."},"docs.feature.tokenStaking1":{en:"Flexible staking periods",zh:"灵活的质押期限",ar:"فترات تخزين مرنة"},"docs.feature.tokenStaking2":{en:"Competitive APY rates",zh:"有竞争力的年化收益率",ar:"معدلات عائد سنوي تنافسية"},"docs.feature.tokenStaking3":{en:"Real-time reward tracking",zh:"实时奖励跟踪",ar:"تتبع المكافآت في الوقت الفعلي"},"docs.feature.tokenStaking4":{en:"Easy unstaking process",zh:"简单的解除质押流程",ar:"عملية إلغاء التخزين السهلة"},"docs.feature.tokenSwap":{en:"Token Swap",zh:"代币兑换",ar:"تبادل الرموز"},"docs.feature.tokenSwapBadge":{en:"DEX",zh:"DEX",ar:"DEX"},"docs.feature.tokenSwapDesc":{en:"Swap tokens directly within the platform.",zh:"在平台内直接兑换代币。",ar:"تبادل الرموز مباشرة داخل المنصة."},"docs.feature.tokenSwap1":{en:"Multi-chain support",zh:"多链支持",ar:"دعم متعدد السلاسل"},"docs.feature.tokenSwap2":{en:"Best rate aggregation",zh:"最佳汇率聚合",ar:"تجميع أفضل الأسعار"},"docs.feature.tokenSwap3":{en:"Slippage protection",zh:"滑点保护",ar:"حماية الانزلاق"},"docs.feature.tokenSwap4":{en:"Transaction tracking",zh:"交易跟踪",ar:"تتبع المعاملات"},"docs.tokenUtilities":{en:"Token Utilities",zh:"代币用途",ar:"استخدامات الرمز"},"docs.utility1":{en:"Access premium analysis features",zh:"访问高级分析功能",ar:"الوصول إلى ميزات التحليل المتميزة"},"docs.utility2":{en:"Reduced platform fees",zh:"降低平台费用",ar:"رسوم منصة مخفضة"},"docs.utility3":{en:"Staking rewards",zh:"质押奖励",ar:"مكافآت التخزين"},"docs.utility4":{en:"Governance voting rights",zh:"治理投票权",ar:"حقوق التصويت في الحوكمة"},"docs.utility5":{en:"Early access to new features",zh:"抢先体验新功能",ar:"الوصول المبكر للميزات الجديدة"},"docs.utility6":{en:"Priority customer support",zh:"优先客户支持",ar:"دعم العملاء ذو الأولوية"},"docs.disclaimer":{en:"Disclaimer",zh:"免责声明",ar:"إخلاء المسؤولية"},"docs.disclaimerNotice":{en:"Important Notice:",zh:"重要提示：",ar:"إشعار هام:"},"docs.disclaimerText1":{en:"The information provided by Astherafi is for educational and informational purposes only. It should not be considered as financial, investment, or trading advice.",zh:"Astherafi提供的信息仅用于教育和信息目的。不应将其视为财务、投资或交易建议。",ar:"المعلومات المقدمة من Astherafi هي لأغراض تعليمية وإعلامية فقط. لا ينبغي اعتبارها نصيحة مالية أو استثمارية أو تجارية."},"docs.disclaimerText2":{en:"Cryptocurrency investments carry significant risks, including the potential loss of all invested capital. Always conduct your own research (DYOR) and consult with qualified financial advisors before making any investment decisions.",zh:"加密货币投资存在重大风险，包括可能损失所有投资资本。在做出任何投资决定之前，请始终进行自己的研究（DYOR）并咨询合格的财务顾问。",ar:"تحمل استثمارات العملات المشفرة مخاطر كبيرة، بما في ذلك الخسارة المحتملة لجميع رأس المال المستثمر. قم دائمًا بإجراء البحث الخاص بك (DYOR) واستشر المستشارين الماليين المؤهلين قبل اتخاذ أي قرارات استثمارية."},"docs.disclaimerText3":{en:"Astherafi makes no guarantees regarding the accuracy, completeness, or timeliness of the information provided. Users are solely responsible for their investment decisions and should understand that past performance is not indicative of future results.",zh:"Astherafi不对所提供信息的准确性、完整性或及时性做出任何保证。用户对其投资决定负全部责任，并应了解过去的表现不代表未来的结果。",ar:"لا تقدم Astherafi أي ضمانات فيما يتعلق بدقة أو اكتمال أو توقيت المعلومات المقدمة. المستخدمون مسؤولون وحدهم عن قراراتهم الاستثمارية ويجب أن يفهموا أن الأداء السابق لا يدل على النتائج المستقبلية."},"docs.roadmap.phase1.item1":{en:"Core platform development",zh:"核心平台开发",ar:"تطوير المنصة الأساسية"},"docs.roadmap.phase1.item2":{en:"Token Analyzer with security checks",zh:"带安全检查的代币分析器",ar:"محلل الرموز مع فحوصات الأمان"},"docs.roadmap.phase1.item3":{en:"AI integration for sentiment analysis",zh:"情绪分析AI集成",ar:"تكامل الذكاء الاصطناعي لتحليل المشاعر"},"docs.roadmap.phase1.item4":{en:"Multi-chain support (ETH, BSC, SOL)",zh:"多链支持（ETH、BSC、SOL）",ar:"دعم متعدد السلاسل (ETH، BSC، SOL)"},"docs.roadmap.phase2.item1":{en:"Token Generator on BSC",zh:"BSC代币生成器",ar:"مولد الرموز على BSC"},"docs.roadmap.phase2.item2":{en:"Bundle Checker tool",zh:"捆绑检查工具",ar:"أداة فحص الحزم"},"docs.roadmap.phase2.item3":{en:"Website Builder",zh:"网站构建器",ar:"منشئ المواقع"},"docs.roadmap.phase2.item4":{en:"Mobile-responsive design",zh:"移动响应式设计",ar:"تصميم متجاوب للجوال"},"docs.roadmap.phase3.item1":{en:"Token Staking platform",zh:"代币质押平台",ar:"منصة تخزين الرموز"},"docs.roadmap.phase3.item2":{en:"DEX aggregator integration",zh:"DEX聚合器集成",ar:"تكامل مجمع DEX"},"docs.roadmap.phase3.item3":{en:"Portfolio tracking",zh:"投资组合跟踪",ar:"تتبع المحفظة"},"docs.roadmap.phase3.item4":{en:"Alert notifications system",zh:"警报通知系统",ar:"نظام إشعارات التنبيه"},"docs.roadmap.phase4.item1":{en:"Advanced AI trading signals",zh:"高级AI交易信号",ar:"إشارات تداول ذكاء اصطناعي متقدمة"},"docs.roadmap.phase4.item2":{en:"Cross-chain bridge integration",zh:"跨链桥集成",ar:"تكامل جسر عبر السلاسل"},"docs.roadmap.phase4.item3":{en:"Mobile application",zh:"移动应用程序",ar:"تطبيق الجوال"},"docs.roadmap.phase4.item4":{en:"API access for developers",zh:"开发者API访问",ar:"وصول API للمطورين"},"docs.innovation":{en:"Innovation",zh:"创新",ar:"الابتكار"},"docs.readyToStart":{en:"Ready to Get Started?",zh:"准备好开始了吗？",ar:"مستعد للبدء؟"},"docs.readyToStartDesc":{en:"Join thousands of crypto investors using Astherafi to make smarter decisions.",zh:"加入成千上万使用Astherafi做出更明智决策的加密投资者。",ar:"انضم إلى آلاف مستثمري العملات المشفرة الذين يستخدمون Astherafi لاتخاذ قرارات أذكى."},"docs.launchApp":{en:"Launch App",zh:"启动应用",ar:"تشغيل التطبيق"},"docs.backToHomeBtn":{en:"Back to Home",zh:"返回首页",ar:"العودة للرئيسية"},"lang.en":{en:"English",zh:"英语",ar:"الإنجليزية"},"lang.zh":{en:"中文",zh:"中文",ar:"الصينية"},"lang.ar":{en:"العربية",zh:"阿拉伯语",ar:"العربية"}},AA=M.createContext(void 0);function J7({children:e}){const[t,n]=M.useState(()=>{if(typeof window<"u"){const c=localStorage.getItem("astherafi-lang");if(c==="en"||c==="zh"||c==="ar")return c}return"en"}),i=c=>{n(c),localStorage.setItem("astherafi-lang",c)};M.useEffect(()=>{document.documentElement.dir=t==="ar"?"rtl":"ltr",document.documentElement.lang=t},[t]);const r=c=>{const u=Z7[c];return u&&(u[t]||u.en)||c},o=t==="ar"?"rtl":"ltr";return f.jsx(AA.Provider,{value:{language:t,setLanguage:i,t:r,dir:o},children:e})}function c0(){const e=M.useContext(AA);if(!e)throw new Error("useLanguage must be used within a LanguageProvider");return e}const CA=M.createContext({});function tP(e){const t=M.useRef(null);return t.current===null&&(t.current=e()),t.current}const F2=typeof window<"u",eP=F2?M.useLayoutEffect:M.useEffect,I2=M.createContext(null);function U2(e,t){e.indexOf(t)===-1&&e.push(t)}function q2(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const zl=(e,t,n)=>n>t?t:n<e?e:n;let V2=()=>{};const Bl={},_A=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jA(e){return typeof e=="object"&&e!==null}const EA=e=>/^0[^.\s]+$/u.test(e);function H2(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ba=e=>e,nP=(e,t)=>n=>t(e(n)),Ef=(...e)=>e.reduce(nP),ff=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class $2{constructor(){this.subscriptions=[]}add(t){return U2(this.subscriptions,t),()=>q2(this.subscriptions,t)}notify(t,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,i);else for(let o=0;o<r;o++){const c=this.subscriptions[o];c&&c(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wo=e=>e*1e3,za=e=>e/1e3;function MA(e,t){return t?e*(1e3/t):0}const TA=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,iP=1e-7,sP=12;function rP(e,t,n,i,r){let o,c,u=0;do c=t+(n-t)/2,o=TA(c,i,r)-e,o>0?n=c:t=c;while(Math.abs(o)>iP&&++u<sP);return c}function Mf(e,t,n,i){if(e===t&&n===i)return Ba;const r=o=>rP(o,0,1,e,n);return o=>o===0||o===1?o:TA(r(o),t,i)}const kA=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,LA=e=>t=>1-e(1-t),PA=Mf(.33,1.53,.69,.99),G2=LA(PA),RA=kA(G2),DA=e=>(e*=2)<1?.5*G2(e):.5*(2-Math.pow(2,-10*(e-1))),Y2=e=>1-Math.sin(Math.acos(e)),OA=LA(Y2),zA=kA(Y2),aP=Mf(.42,0,1,1),oP=Mf(0,0,.58,1),BA=Mf(.42,0,.58,1),lP=e=>Array.isArray(e)&&typeof e[0]!="number",FA=e=>Array.isArray(e)&&typeof e[0]=="number",cP={linear:Ba,easeIn:aP,easeInOut:BA,easeOut:oP,circIn:Y2,circInOut:zA,circOut:OA,backIn:G2,backInOut:RA,backOut:PA,anticipate:DA},uP=e=>typeof e=="string",Y5=e=>{if(FA(e)){V2(e.length===4);const[t,n,i,r]=e;return Mf(t,n,i,r)}else if(uP(e))return cP[e];return e},zm=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hP(e,t){let n=new Set,i=new Set,r=!1,o=!1;const c=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function h(p){c.has(p)&&(d.schedule(p),e()),p(u)}const d={schedule:(p,v=!1,S=!1)=>{const _=S&&r?n:i;return v&&c.add(p),_.has(p)||_.add(p),p},cancel:p=>{i.delete(p),c.delete(p)},process:p=>{if(u=p,r){o=!0;return}r=!0,[n,i]=[i,n],n.forEach(h),n.clear(),r=!1,o&&(o=!1,d.process(p))}};return d}const dP=40;function IA(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,c=zm.reduce((D,z)=>(D[z]=hP(o),D),{}),{setup:u,read:h,resolveKeyframes:d,preUpdate:p,update:v,preRender:S,render:b,postRender:_}=c,A=()=>{const D=Bl.useManualTiming?r.timestamp:performance.now();n=!1,Bl.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(D-r.timestamp,dP),1)),r.timestamp=D,r.isProcessing=!0,u.process(r),h.process(r),d.process(r),p.process(r),v.process(r),S.process(r),b.process(r),_.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(A))},j=()=>{n=!0,i=!0,r.isProcessing||e(A)};return{schedule:zm.reduce((D,z)=>{const $=c[z];return D[z]=(ut,nt=!1,H=!1)=>(n||j(),$.schedule(ut,nt,H)),D},{}),cancel:D=>{for(let z=0;z<zm.length;z++)c[zm[z]].cancel(D)},state:r,steps:c}}const{schedule:yi,cancel:Mc,state:Fs,steps:n1}=IA(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ba,!0);let dp;function fP(){dp=void 0}const qr={now:()=>(dp===void 0&&qr.set(Fs.isProcessing||Bl.useManualTiming?Fs.timestamp:performance.now()),dp),set:e=>{dp=e,queueMicrotask(fP)}},UA=e=>t=>typeof t=="string"&&t.startsWith(e),W2=UA("--"),mP=UA("var(--"),K2=e=>mP(e)?pP.test(e.split("/*")[0].trim()):!1,pP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},mf={...Xh,transform:e=>zl(0,1,e)},Bm={...Xh,default:1},Xd=e=>Math.round(e*1e5)/1e5,X2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gP(e){return e==null}const vP=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Q2=(e,t)=>n=>!!(typeof n=="string"&&vP.test(n)&&n.startsWith(e)||t&&!gP(n)&&Object.prototype.hasOwnProperty.call(n,t)),qA=(e,t,n)=>i=>{if(typeof i!="string")return i;const[r,o,c,u]=i.match(X2);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(c),alpha:u!==void 0?parseFloat(u):1}},yP=e=>zl(0,255,e),i1={...Xh,transform:e=>Math.round(yP(e))},cu={test:Q2("rgb","red"),parse:qA("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+i1.transform(e)+", "+i1.transform(t)+", "+i1.transform(n)+", "+Xd(mf.transform(i))+")"};function bP(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Ev={test:Q2("#"),parse:bP,transform:cu.transform},Tf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xc=Tf("deg"),Ko=Tf("%"),Ve=Tf("px"),xP=Tf("vh"),wP=Tf("vw"),W5={...Ko,parse:e=>Ko.parse(e)/100,transform:e=>Ko.transform(e*100)},yh={test:Q2("hsl","hue"),parse:qA("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ko.transform(Xd(t))+", "+Ko.transform(Xd(n))+", "+Xd(mf.transform(i))+")"},ss={test:e=>cu.test(e)||Ev.test(e)||yh.test(e),parse:e=>cu.test(e)?cu.parse(e):yh.test(e)?yh.parse(e):Ev.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?cu.transform(e):yh.transform(e),getAnimatableNone:e=>{const t=ss.parse(e);return t.alpha=0,ss.transform(t)}},SP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function NP(e){return isNaN(e)&&typeof e=="string"&&(e.match(X2)?.length||0)+(e.match(SP)?.length||0)>0}const VA="number",HA="color",AP="var",CP="var(",K5="${}",_P=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function pf(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const u=t.replace(_P,h=>(ss.test(h)?(i.color.push(o),r.push(HA),n.push(ss.parse(h))):h.startsWith(CP)?(i.var.push(o),r.push(AP),n.push(h)):(i.number.push(o),r.push(VA),n.push(parseFloat(h))),++o,K5)).split(K5);return{values:n,split:u,indexes:i,types:r}}function $A(e){return pf(e).values}function GA(e){const{split:t,types:n}=pf(e),i=t.length;return r=>{let o="";for(let c=0;c<i;c++)if(o+=t[c],r[c]!==void 0){const u=n[c];u===VA?o+=Xd(r[c]):u===HA?o+=ss.transform(r[c]):o+=r[c]}return o}}const jP=e=>typeof e=="number"?0:ss.test(e)?ss.getAnimatableNone(e):e;function EP(e){const t=$A(e);return GA(e)(t.map(jP))}const Tc={test:NP,parse:$A,createTransformer:GA,getAnimatableNone:EP};function s1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MP({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let r=0,o=0,c=0;if(!t)r=o=c=n;else{const u=n<.5?n*(1+t):n+t-n*t,h=2*n-u;r=s1(h,u,e+1/3),o=s1(h,u,e),c=s1(h,u,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(c*255),alpha:i}}function kp(e,t){return n=>n>0?t:e}const Mi=(e,t,n)=>e+(t-e)*n,r1=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},TP=[Ev,cu,yh],kP=e=>TP.find(t=>t.test(e));function X5(e){const t=kP(e);if(!t)return!1;let n=t.parse(e);return t===yh&&(n=MP(n)),n}const Q5=(e,t)=>{const n=X5(e),i=X5(t);if(!n||!i)return kp(e,t);const r={...n};return o=>(r.red=r1(n.red,i.red,o),r.green=r1(n.green,i.green,o),r.blue=r1(n.blue,i.blue,o),r.alpha=Mi(n.alpha,i.alpha,o),cu.transform(r))},Mv=new Set(["none","hidden"]);function LP(e,t){return Mv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function PP(e,t){return n=>Mi(e,t,n)}function Z2(e){return typeof e=="number"?PP:typeof e=="string"?K2(e)?kp:ss.test(e)?Q5:OP:Array.isArray(e)?YA:typeof e=="object"?ss.test(e)?Q5:RP:kp}function YA(e,t){const n=[...e],i=n.length,r=e.map((o,c)=>Z2(o)(o,t[c]));return o=>{for(let c=0;c<i;c++)n[c]=r[c](o);return n}}function RP(e,t){const n={...e,...t},i={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(i[r]=Z2(e[r])(e[r],t[r]));return r=>{for(const o in i)n[o]=i[o](r);return n}}function DP(e,t){const n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],c=e.indexes[o][i[o]],u=e.values[c]??0;n[r]=u,i[o]++}return n}const OP=(e,t)=>{const n=Tc.createTransformer(t),i=pf(e),r=pf(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Mv.has(e)&&!r.values.length||Mv.has(t)&&!i.values.length?LP(e,t):Ef(YA(DP(i,r),r.values),n):kp(e,t)};function WA(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Mi(e,t,n):Z2(e)(e,t)}const zP=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>yi.update(t,n),stop:()=>Mc(t),now:()=>Fs.isProcessing?Fs.timestamp:qr.now()}},KA=(e,t,n=10)=>{let i="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)i+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Lp=2e4;function J2(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Lp;)t+=n,i=e.next(t);return t>=Lp?1/0:t}function BP(e,t=100,n){const i=n({...e,keyframes:[0,t]}),r=Math.min(J2(i),Lp);return{type:"keyframes",ease:o=>i.next(r*o).value/t,duration:za(r)}}const FP=5;function XA(e,t,n){const i=Math.max(t-FP,0);return MA(n-e(i),t-i)}const Vi={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},a1=.001;function IP({duration:e=Vi.duration,bounce:t=Vi.bounce,velocity:n=Vi.velocity,mass:i=Vi.mass}){let r,o,c=1-t;c=zl(Vi.minDamping,Vi.maxDamping,c),e=zl(Vi.minDuration,Vi.maxDuration,za(e)),c<1?(r=d=>{const p=d*c,v=p*e,S=p-n,b=Tv(d,c),_=Math.exp(-v);return a1-S/b*_},o=d=>{const v=d*c*e,S=v*n+n,b=Math.pow(c,2)*Math.pow(d,2)*e,_=Math.exp(-v),A=Tv(Math.pow(d,2),c);return(-r(d)+a1>0?-1:1)*((S-b)*_)/A}):(r=d=>{const p=Math.exp(-d*e),v=(d-n)*e+1;return-a1+p*v},o=d=>{const p=Math.exp(-d*e),v=(n-d)*(e*e);return p*v});const u=5/e,h=qP(r,o,u);if(e=Wo(e),isNaN(h))return{stiffness:Vi.stiffness,damping:Vi.damping,duration:e};{const d=Math.pow(h,2)*i;return{stiffness:d,damping:c*2*Math.sqrt(i*d),duration:e}}}const UP=12;function qP(e,t,n){let i=n;for(let r=1;r<UP;r++)i=i-e(i)/t(i);return i}function Tv(e,t){return e*Math.sqrt(1-t*t)}const VP=["duration","bounce"],HP=["stiffness","damping","mass"];function Z5(e,t){return t.some(n=>e[n]!==void 0)}function $P(e){let t={velocity:Vi.velocity,stiffness:Vi.stiffness,damping:Vi.damping,mass:Vi.mass,isResolvedFromDuration:!1,...e};if(!Z5(e,HP)&&Z5(e,VP))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,o=2*zl(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:Vi.mass,stiffness:r,damping:o}}else{const n=IP(e);t={...t,...n,mass:Vi.mass},t.isResolvedFromDuration=!0}return t}function Pp(e=Vi.visualDuration,t=Vi.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:r}=n;const o=n.keyframes[0],c=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:h,damping:d,mass:p,duration:v,velocity:S,isResolvedFromDuration:b}=$P({...n,velocity:-za(n.velocity||0)}),_=S||0,A=d/(2*Math.sqrt(h*p)),j=c-o,E=za(Math.sqrt(h/p)),L=Math.abs(j)<5;i||(i=L?Vi.restSpeed.granular:Vi.restSpeed.default),r||(r=L?Vi.restDelta.granular:Vi.restDelta.default);let D;if(A<1){const $=Tv(E,A);D=ut=>{const nt=Math.exp(-A*E*ut);return c-nt*((_+A*E*j)/$*Math.sin($*ut)+j*Math.cos($*ut))}}else if(A===1)D=$=>c-Math.exp(-E*$)*(j+(_+E*j)*$);else{const $=E*Math.sqrt(A*A-1);D=ut=>{const nt=Math.exp(-A*E*ut),H=Math.min($*ut,300);return c-nt*((_+A*E*j)*Math.sinh(H)+$*j*Math.cosh(H))/$}}const z={calculatedDuration:b&&v||null,next:$=>{const ut=D($);if(b)u.done=$>=v;else{let nt=$===0?_:0;A<1&&(nt=$===0?Wo(_):XA(D,$,ut));const H=Math.abs(nt)<=i,Q=Math.abs(c-ut)<=r;u.done=H&&Q}return u.value=u.done?c:ut,u},toString:()=>{const $=Math.min(J2(z),Lp),ut=KA(nt=>z.next($*nt).value,$,30);return $+"ms "+ut},toTransition:()=>{}};return z}Pp.applyToOptions=e=>{const t=BP(e,100,Pp);return e.ease=t.ease,e.duration=Wo(t.duration),e.type="keyframes",e};function kv({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:c,min:u,max:h,restDelta:d=.5,restSpeed:p}){const v=e[0],S={done:!1,value:v},b=H=>u!==void 0&&H<u||h!==void 0&&H>h,_=H=>u===void 0?h:h===void 0||Math.abs(u-H)<Math.abs(h-H)?u:h;let A=n*t;const j=v+A,E=c===void 0?j:c(j);E!==j&&(A=E-v);const L=H=>-A*Math.exp(-H/i),D=H=>E+L(H),z=H=>{const Q=L(H),ct=D(H);S.done=Math.abs(Q)<=d,S.value=S.done?E:ct};let $,ut;const nt=H=>{b(S.value)&&($=H,ut=Pp({keyframes:[S.value,_(S.value)],velocity:XA(D,H,S.value),damping:r,stiffness:o,restDelta:d,restSpeed:p}))};return nt(0),{calculatedDuration:null,next:H=>{let Q=!1;return!ut&&$===void 0&&(Q=!0,z(H),nt(H)),$!==void 0&&H>=$?ut.next(H-$):(!Q&&z(H),S)}}}function GP(e,t,n){const i=[],r=n||Bl.mix||WA,o=e.length-1;for(let c=0;c<o;c++){let u=r(e[c],e[c+1]);if(t){const h=Array.isArray(t)?t[c]||Ba:t;u=Ef(h,u)}i.push(u)}return i}function YP(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(V2(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const c=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=GP(t,i,r),h=u.length,d=p=>{if(c&&p<e[0])return t[0];let v=0;if(h>1)for(;v<e.length-2&&!(p<e[v+1]);v++);const S=ff(e[v],e[v+1],p);return u[v](S)};return n?p=>d(zl(e[0],e[o-1],p)):d}function WP(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=ff(0,t,i);e.push(Mi(n,1,r))}}function KP(e){const t=[0];return WP(t,e.length-1),t}function XP(e,t){return e.map(n=>n*t)}function QP(e,t){return e.map(()=>t||BA).splice(0,e.length-1)}function Qd({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=lP(i)?i.map(Y5):Y5(i),o={done:!1,value:t[0]},c=XP(n&&n.length===t.length?n:KP(t),e),u=YP(c,t,{ease:Array.isArray(r)?r:QP(t,r)});return{calculatedDuration:e,next:h=>(o.value=u(h),o.done=h>=e,o)}}const ZP=e=>e!==null;function ty(e,{repeat:t,repeatType:n="loop"},i,r=1){const o=e.filter(ZP),u=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||i===void 0?o[u]:i}const JP={decay:kv,inertia:kv,tween:Qd,keyframes:Qd,spring:Pp};function QA(e){typeof e.type=="string"&&(e.type=JP[e.type])}class ey{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const tR=e=>e/100;class ny extends ey{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==qr.now()&&this.tick(qr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;QA(t);const{type:n=Qd,repeat:i=0,repeatDelay:r=0,repeatType:o,velocity:c=0}=t;let{keyframes:u}=t;const h=n||Qd;h!==Qd&&typeof u[0]!="number"&&(this.mixKeyframes=Ef(tR,WA(u[0],u[1])),u=[0,100]);const d=h({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...u].reverse(),velocity:-c})),d.calculatedDuration===null&&(d.calculatedDuration=J2(d));const{calculatedDuration:p}=d;this.calculatedDuration=p,this.resolvedDuration=p+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:r,mixKeyframes:o,mirroredGenerator:c,resolvedDuration:u,calculatedDuration:h}=this;if(this.startTime===null)return i.next(0);const{delay:d=0,keyframes:p,repeat:v,repeatType:S,repeatDelay:b,type:_,onUpdate:A,finalKeyframe:j}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-d*(this.playbackSpeed>=0?1:-1),L=this.playbackSpeed>=0?E<0:E>r;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let D=this.currentTime,z=i;if(v){const H=Math.min(this.currentTime,r)/u;let Q=Math.floor(H),ct=H%1;!ct&&H>=1&&(ct=1),ct===1&&Q--,Q=Math.min(Q,v+1),!!(Q%2)&&(S==="reverse"?(ct=1-ct,b&&(ct-=b/u)):S==="mirror"&&(z=c)),D=zl(0,1,ct)*u}const $=L?{done:!1,value:p[0]}:z.next(D);o&&($.value=o($.value));let{done:ut}=$;!L&&h!==null&&(ut=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const nt=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&ut);return nt&&_!==kv&&($.value=ty(p,this.options,j,this.speed)),A&&A($.value),nt&&this.finish(),$}then(t,n){return this.finished.then(t,n)}get duration(){return za(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+za(t)}get time(){return za(this.currentTime)}set time(t){t=Wo(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(qr.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=za(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=zP,startTime:n}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(qr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function eR(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const uu=e=>e*180/Math.PI,Lv=e=>{const t=uu(Math.atan2(e[1],e[0]));return Pv(t)},nR={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Lv,rotateZ:Lv,skewX:e=>uu(Math.atan(e[1])),skewY:e=>uu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Pv=e=>(e=e%360,e<0&&(e+=360),e),J5=Lv,tw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ew=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),iR={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tw,scaleY:ew,scale:e=>(tw(e)+ew(e))/2,rotateX:e=>Pv(uu(Math.atan2(e[6],e[5]))),rotateY:e=>Pv(uu(Math.atan2(-e[2],e[0]))),rotateZ:J5,rotate:J5,skewX:e=>uu(Math.atan(e[4])),skewY:e=>uu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Rv(e){return e.includes("scale")?1:0}function Dv(e,t){if(!e||e==="none")return Rv(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=iR,r=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=nR,r=u}if(!r)return Rv(t);const o=i[t],c=r[1].split(",").map(rR);return typeof o=="function"?o(c):c[o]}const sR=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Dv(n,t)};function rR(e){return parseFloat(e.trim())}const Qh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zh=new Set(Qh),nw=e=>e===Xh||e===Ve,aR=new Set(["x","y","z"]),oR=Qh.filter(e=>!aR.has(e));function lR(e){const t=[];return oR.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const hu={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Dv(t,"x"),y:(e,{transform:t})=>Dv(t,"y")};hu.translateX=hu.x;hu.translateY=hu.y;const du=new Set;let Ov=!1,zv=!1,Bv=!1;function ZA(){if(zv){const e=Array.from(du).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const r=lR(i);r.length&&(n.set(i,r),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([o,c])=>{i.getValue(o)?.set(c)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}zv=!1,Ov=!1,du.forEach(e=>e.complete(Bv)),du.clear()}function JA(){du.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(zv=!0)})}function cR(){Bv=!0,JA(),ZA(),Bv=!1}class iy{constructor(t,n,i,r,o,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=r,this.element=o,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(du.add(this),Ov||(Ov=!0,yi.read(JA),yi.resolveKeyframes(ZA))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:r}=this;if(t[0]===null){const o=r?.get(),c=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const u=i.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),r&&o===void 0&&r.set(t[0])}eR(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),du.delete(this)}cancel(){this.state==="scheduled"&&(du.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const uR=e=>e.startsWith("--");function hR(e,t,n){uR(t)?e.style.setProperty(t,n):e.style[t]=n}const dR=H2(()=>window.ScrollTimeline!==void 0),fR={};function mR(e,t){const n=H2(e);return()=>fR[t]??n()}const t6=mR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$d=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,iw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$d([0,.65,.55,1]),circOut:$d([.55,0,1,.45]),backIn:$d([.31,.01,.66,-.59]),backOut:$d([.33,1.53,.69,.99])};function e6(e,t){if(e)return typeof e=="function"?t6()?KA(e,t):"ease-out":FA(e)?$d(e):Array.isArray(e)?e.map(n=>e6(n,t)||iw.easeOut):iw[e]}function pR(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:c="loop",ease:u="easeOut",times:h}={},d=void 0){const p={[t]:n};h&&(p.offset=h);const v=e6(u,r);Array.isArray(v)&&(p.easing=v);const S={delay:i,duration:r,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:o+1,direction:c==="reverse"?"alternate":"normal"};return d&&(S.pseudoElement=d),e.animate(p,S)}function n6(e){return typeof e=="function"&&"applyToOptions"in e}function gR({type:e,...t}){return n6(e)&&t6()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vR extends ey{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:r,pseudoElement:o,allowFlatten:c=!1,finalKeyframe:u,onComplete:h}=t;this.isPseudoElement=!!o,this.allowFlatten=c,this.options=t,V2(typeof t.type!="string");const d=gR(t);this.animation=pR(n,i,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const p=ty(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(p):hR(n,i,p),this.animation.cancel()}h?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return za(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+za(t)}get time(){return za(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Wo(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&dR()?(this.animation.timeline=t,Ba):n(this)}}const i6={anticipate:DA,backInOut:RA,circInOut:zA};function yR(e){return e in i6}function bR(e){typeof e.ease=="string"&&yR(e.ease)&&(e.ease=i6[e.ease])}const sw=10;class xR extends vR{constructor(t){bR(t),QA(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:r,element:o,...c}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new ny({...c,autoplay:!1}),h=Wo(this.finishedTime??this.time);n.setWithVelocity(u.sample(h-sw).value,u.sample(h).value,sw),u.stop()}}const rw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Tc.test(e)||e==="0")&&!e.startsWith("url("));function wR(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function SR(e,t,n,i){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],c=rw(r,t),u=rw(o,t);return!c||!u?!1:wR(e)||(n==="spring"||n6(n))&&i}function Fv(e){e.duration=0,e.type="keyframes"}const NR=new Set(["opacity","clipPath","filter","transform"]),AR=H2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function CR(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:c}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:h,transformTemplate:d}=t.owner.getProps();return AR()&&n&&NR.has(n)&&(n!=="transform"||!d)&&!h&&!i&&r!=="mirror"&&o!==0&&c!=="inertia"}const _R=40;class jR extends ey{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:c="loop",keyframes:u,name:h,motionValue:d,element:p,...v}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=qr.now();const S={autoplay:t,delay:n,type:i,repeat:r,repeatDelay:o,repeatType:c,name:h,motionValue:d,element:p,...v},b=p?.KeyframeResolver||iy;this.keyframeResolver=new b(u,(_,A,j)=>this.onKeyframesResolved(_,A,S,!j),h,d,p),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,r){this.keyframeResolver=void 0;const{name:o,type:c,velocity:u,delay:h,isHandoff:d,onUpdate:p}=i;this.resolvedAt=qr.now(),SR(t,o,c,u)||((Bl.instantAnimations||!h)&&p?.(ty(t,i,n)),t[0]=t[t.length-1],Fv(i),i.repeat=0);const S={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>_R?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},b=!d&&CR(S)?new xR({...S,element:S.motionValue.owner.current}):new ny(S);b.finished.then(()=>this.notifyFinished()).catch(Ba),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),cR()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const ER=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function MR(e){const t=ER.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${n??i}`,r]}function s6(e,t,n=1){const[i,r]=MR(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const c=o.trim();return _A(c)?parseFloat(c):c}return K2(r)?s6(r,t,n+1):r}function sy(e,t){return e?.[t]??e?.default??e}const r6=new Set(["width","height","top","left","right","bottom",...Qh]),TR={test:e=>e==="auto",parse:e=>e},a6=e=>t=>t.test(e),o6=[Xh,Ve,Ko,xc,wP,xP,TR],aw=e=>o6.find(a6(e));function kR(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||EA(e):!0}const LR=new Set(["brightness","contrast","saturate","opacity"]);function PR(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(X2)||[];if(!i)return e;const r=n.replace(i,"");let o=LR.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const RR=/\b([a-z-]*)\(.*?\)/gu,Iv={...Tc,getAnimatableNone:e=>{const t=e.match(RR);return t?t.map(PR).join(" "):e}},ow={...Xh,transform:Math.round},DR={rotate:xc,rotateX:xc,rotateY:xc,rotateZ:xc,scale:Bm,scaleX:Bm,scaleY:Bm,scaleZ:Bm,skew:xc,skewX:xc,skewY:xc,distance:Ve,translateX:Ve,translateY:Ve,translateZ:Ve,x:Ve,y:Ve,z:Ve,perspective:Ve,transformPerspective:Ve,opacity:mf,originX:W5,originY:W5,originZ:Ve},ry={borderWidth:Ve,borderTopWidth:Ve,borderRightWidth:Ve,borderBottomWidth:Ve,borderLeftWidth:Ve,borderRadius:Ve,radius:Ve,borderTopLeftRadius:Ve,borderTopRightRadius:Ve,borderBottomRightRadius:Ve,borderBottomLeftRadius:Ve,width:Ve,maxWidth:Ve,height:Ve,maxHeight:Ve,top:Ve,right:Ve,bottom:Ve,left:Ve,padding:Ve,paddingTop:Ve,paddingRight:Ve,paddingBottom:Ve,paddingLeft:Ve,margin:Ve,marginTop:Ve,marginRight:Ve,marginBottom:Ve,marginLeft:Ve,backgroundPositionX:Ve,backgroundPositionY:Ve,...DR,zIndex:ow,fillOpacity:mf,strokeOpacity:mf,numOctaves:ow},OR={...ry,color:ss,backgroundColor:ss,outlineColor:ss,fill:ss,stroke:ss,borderColor:ss,borderTopColor:ss,borderRightColor:ss,borderBottomColor:ss,borderLeftColor:ss,filter:Iv,WebkitFilter:Iv},l6=e=>OR[e];function c6(e,t){let n=l6(e);return n!==Iv&&(n=Tc),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zR=new Set(["auto","none","0"]);function BR(e,t,n){let i=0,r;for(;i<e.length&&!r;){const o=e[i];typeof o=="string"&&!zR.has(o)&&pf(o).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=c6(n,r)}class FR extends iy{constructor(t,n,i,r,o){super(t,n,i,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let h=0;h<t.length;h++){let d=t[h];if(typeof d=="string"&&(d=d.trim(),K2(d))){const p=s6(d,n.current);p!==void 0&&(t[h]=p),h===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!r6.has(i)||t.length!==2)return;const[r,o]=t,c=aw(r),u=aw(o);if(c!==u)if(nw(c)&&nw(u))for(let h=0;h<t.length;h++){const d=t[h];typeof d=="string"&&(t[h]=parseFloat(d))}else hu[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let r=0;r<t.length;r++)(t[r]===null||kR(t[r]))&&i.push(r);i.length&&BR(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=hu[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(i,r).jump(r,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,c=i[o];i[o]=hu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,h])=>{t.getValue(u).set(h)}),this.resolveNoneKeyframes()}}function IR(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const r=n?.[e]??i.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}const u6=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function UR(e){return jA(e)&&"offsetHeight"in e}const lw=30,qR=e=>!isNaN(parseFloat(e));class VR{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const r=qr.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=qr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=qR(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new $2);const i=this.events[t].add(n);return t==="change"?()=>{i(),yi.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=qr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>lw)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,lw);return MA(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fh(e,t){return new VR(e,t)}const{schedule:ay}=IA(queueMicrotask,!1),lo={x:!1,y:!1};function h6(){return lo.x||lo.y}function HR(e){return e==="x"||e==="y"?lo[e]?null:(lo[e]=!0,()=>{lo[e]=!1}):lo.x||lo.y?null:(lo.x=lo.y=!0,()=>{lo.x=lo.y=!1})}function d6(e,t){const n=IR(e),i=new AbortController,r={passive:!0,...t,signal:i.signal};return[n,r,()=>i.abort()]}function cw(e){return!(e.pointerType==="touch"||h6())}function $R(e,t,n={}){const[i,r,o]=d6(e,n),c=u=>{if(!cw(u))return;const{target:h}=u,d=t(h,u);if(typeof d!="function"||!h)return;const p=v=>{cw(v)&&(d(v),h.removeEventListener("pointerleave",p))};h.addEventListener("pointerleave",p,r)};return i.forEach(u=>{u.addEventListener("pointerenter",c,r)}),o}const f6=(e,t)=>t?e===t?!0:f6(e,t.parentElement):!1,oy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,GR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function YR(e){return GR.has(e.tagName)||e.tabIndex!==-1}const fp=new WeakSet;function uw(e){return t=>{t.key==="Enter"&&e(t)}}function o1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const WR=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=uw(()=>{if(fp.has(n))return;o1(n,"down");const r=uw(()=>{o1(n,"up")}),o=()=>o1(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function hw(e){return oy(e)&&!h6()}function KR(e,t,n={}){const[i,r,o]=d6(e,n),c=u=>{const h=u.currentTarget;if(!hw(u))return;fp.add(h);const d=t(h,u),p=(b,_)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",S),fp.has(h)&&fp.delete(h),hw(b)&&typeof d=="function"&&d(b,{success:_})},v=b=>{p(b,h===window||h===document||n.useGlobalTarget||f6(h,b.target))},S=b=>{p(b,!1)};window.addEventListener("pointerup",v,r),window.addEventListener("pointercancel",S,r)};return i.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",c,r),UR(u)&&(u.addEventListener("focus",d=>WR(d,r)),!YR(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function m6(e){return jA(e)&&"ownerSVGElement"in e}function XR(e){return m6(e)&&e.tagName==="svg"}const er=e=>!!(e&&e.getVelocity),QR=[...o6,ss,Tc],ZR=e=>QR.find(a6(e)),p6=M.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function JR(e=!0){const t=M.useContext(I2);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=t,o=M.useId();M.useEffect(()=>{if(e)return r(o)},[e]);const c=M.useCallback(()=>e&&i&&i(o),[o,i,e]);return!n&&i?[!1,c]:[!0]}const g6=M.createContext({strict:!1}),dw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ih={};for(const e in dw)Ih[e]={isEnabled:t=>dw[e].some(n=>!!t[n])};function tD(e){for(const t in e)Ih[t]={...Ih[t],...e[t]}}const eD=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Rp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eD.has(e)}let v6=e=>!Rp(e);function nD(e){typeof e=="function"&&(v6=t=>t.startsWith("on")?!Rp(t):e(t))}try{nD(require("@emotion/is-prop-valid").default)}catch{}function iD(e,t,n){const i={};for(const r in e)r==="values"&&typeof e.values=="object"||(v6(r)||n===!0&&Rp(r)||!t&&!Rp(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}const u0=M.createContext({});function h0(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function gf(e){return typeof e=="string"||Array.isArray(e)}const ly=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cy=["initial",...ly];function d0(e){return h0(e.animate)||cy.some(t=>gf(e[t]))}function y6(e){return!!(d0(e)||e.variants)}function sD(e,t){if(d0(e)){const{initial:n,animate:i}=e;return{initial:n===!1||gf(n)?n:void 0,animate:gf(i)?i:void 0}}return e.inherit!==!1?t:{}}function rD(e){const{initial:t,animate:n}=sD(e,M.useContext(u0));return M.useMemo(()=>({initial:t,animate:n}),[fw(t),fw(n)])}function fw(e){return Array.isArray(e)?e.join(" "):e}const vf={};function aD(e){for(const t in e)vf[t]=e[t],W2(t)&&(vf[t].isCSSVariable=!0)}function b6(e,{layout:t,layoutId:n}){return Zh.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vf[e]||e==="opacity")}const oD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lD=Qh.length;function cD(e,t,n){let i="",r=!0;for(let o=0;o<lD;o++){const c=Qh[o],u=e[c];if(u===void 0)continue;let h=!0;if(typeof u=="number"?h=u===(c.startsWith("scale")?1:0):h=parseFloat(u)===0,!h||n){const d=u6(u,ry[c]);if(!h){r=!1;const p=oD[c]||c;i+=`${p}(${d}) `}n&&(t[c]=d)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}function uy(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let c=!1,u=!1;for(const h in t){const d=t[h];if(Zh.has(h)){c=!0;continue}else if(W2(h)){r[h]=d;continue}else{const p=u6(d,ry[h]);h.startsWith("origin")?(u=!0,o[h]=p):i[h]=p}}if(t.transform||(c||n?i.transform=cD(t,e.transform,n):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:d="50%",originZ:p=0}=o;i.transformOrigin=`${h} ${d} ${p}`}}const hy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function x6(e,t,n){for(const i in t)!er(t[i])&&!b6(i,n)&&(e[i]=t[i])}function uD({transformTemplate:e},t){return M.useMemo(()=>{const n=hy();return uy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hD(e,t){const n=e.style||{},i={};return x6(i,n,e),Object.assign(i,uD(e,t)),i}function dD(e,t){const n={},i=hD(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const fD={offset:"stroke-dashoffset",array:"stroke-dasharray"},mD={offset:"strokeDashoffset",array:"strokeDasharray"};function pD(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?fD:mD;e[o.offset]=Ve.transform(-i);const c=Ve.transform(t),u=Ve.transform(n);e[o.array]=`${c} ${u}`}function w6(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:o=1,pathOffset:c=0,...u},h,d,p){if(uy(e,u,d),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:S}=e;v.transform&&(S.transform=v.transform,delete v.transform),(S.transform||v.transformOrigin)&&(S.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),S.transform&&(S.transformBox=p?.transformBox??"fill-box",delete v.transformBox),t!==void 0&&(v.x=t),n!==void 0&&(v.y=n),i!==void 0&&(v.scale=i),r!==void 0&&pD(v,r,o,c,!1)}const S6=()=>({...hy(),attrs:{}}),N6=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gD(e,t,n,i){const r=M.useMemo(()=>{const o=S6();return w6(o,t,N6(i),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};x6(o,e.style,e),r.style={...o,...r.style}}return r}const vD=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dy(e){return typeof e!="string"||e.includes("-")?!1:!!(vD.indexOf(e)>-1||/[A-Z]/u.test(e))}function yD(e,t,n,{latestValues:i},r,o=!1){const u=(dy(e)?gD:dD)(t,i,r,e),h=iD(t,typeof e=="string",o),d=e!==M.Fragment?{...h,...u,ref:n}:{},{children:p}=t,v=M.useMemo(()=>er(p)?p.get():p,[p]);return M.createElement(e,{...d,children:v})}function mw(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function fy(e,t,n,i){if(typeof t=="function"){const[r,o]=mw(i);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=mw(i);t=t(n!==void 0?n:e.custom,r,o)}return t}function mp(e){return er(e)?e.get():e}function bD({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:xD(n,i,r,e),renderState:t()}}function xD(e,t,n,i){const r={},o=i(e,{});for(const S in o)r[S]=mp(o[S]);let{initial:c,animate:u}=e;const h=d0(e),d=y6(e);t&&d&&!h&&e.inherit!==!1&&(c===void 0&&(c=t.initial),u===void 0&&(u=t.animate));let p=n?n.initial===!1:!1;p=p||c===!1;const v=p?u:c;if(v&&typeof v!="boolean"&&!h0(v)){const S=Array.isArray(v)?v:[v];for(let b=0;b<S.length;b++){const _=fy(e,S[b]);if(_){const{transitionEnd:A,transition:j,...E}=_;for(const L in E){let D=E[L];if(Array.isArray(D)){const z=p?D.length-1:0;D=D[z]}D!==null&&(r[L]=D)}for(const L in A)r[L]=A[L]}}}return r}const A6=e=>(t,n)=>{const i=M.useContext(u0),r=M.useContext(I2),o=()=>bD(e,t,i,r);return n?o():tP(o)};function my(e,t,n){const{style:i}=e,r={};for(const o in i)(er(i[o])||t.style&&er(t.style[o])||b6(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}const wD=A6({scrapeMotionValuesFromProps:my,createRenderState:hy});function C6(e,t,n){const i=my(e,t,n);for(const r in e)if(er(e[r])||er(t[r])){const o=Qh.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[o]=e[r]}return i}const SD=A6({scrapeMotionValuesFromProps:C6,createRenderState:S6}),ND=Symbol.for("motionComponentSymbol");function bh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function AD(e,t,n){return M.useCallback(i=>{i&&e.onMount&&e.onMount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):bh(n)&&(n.current=i))},[t])}const py=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),CD="framerAppearId",_6="data-"+py(CD),j6=M.createContext({});function _D(e,t,n,i,r){const{visualElement:o}=M.useContext(u0),c=M.useContext(g6),u=M.useContext(I2),h=M.useContext(p6).reducedMotion,d=M.useRef(null);i=i||c.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:h}));const p=d.current,v=M.useContext(j6);p&&!p.projection&&r&&(p.type==="html"||p.type==="svg")&&jD(d.current,n,r,v);const S=M.useRef(!1);M.useInsertionEffect(()=>{p&&S.current&&p.update(n,u)});const b=n[_6],_=M.useRef(!!b&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return eP(()=>{p&&(S.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),p.scheduleRenderMicrotask(),_.current&&p.animationState&&p.animationState.animateChanges())}),M.useEffect(()=>{p&&(!_.current&&p.animationState&&p.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),_.current=!1),p.enteringChildren=void 0)}),p}function jD(e,t,n,i){const{layoutId:r,layout:o,drag:c,dragConstraints:u,layoutScroll:h,layoutRoot:d,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:E6(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!c||u&&bh(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:h,layoutRoot:d})}function E6(e){if(e)return e.options.allowProjection!==!1?e.projection:E6(e.parent)}function l1(e,{forwardMotionProps:t=!1}={},n,i){n&&tD(n);const r=dy(e)?SD:wD;function o(u,h){let d;const p={...M.useContext(p6),...u,layoutId:ED(u)},{isStatic:v}=p,S=rD(u),b=r(u,v);if(!v&&F2){MD();const _=TD(p);d=_.MeasureLayout,S.visualElement=_D(e,b,p,i,_.ProjectionNode)}return f.jsxs(u0.Provider,{value:S,children:[d&&S.visualElement?f.jsx(d,{visualElement:S.visualElement,...p}):null,yD(e,u,AD(b,S.visualElement,h),b,v,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=M.forwardRef(o);return c[ND]=e,c}function ED({layoutId:e}){const t=M.useContext(CA).id;return t&&e!==void 0?t+"-"+e:e}function MD(e,t){M.useContext(g6).strict}function TD(e){const{drag:t,layout:n}=Ih;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function kD(e,t){if(typeof Proxy>"u")return l1;const n=new Map,i=(o,c)=>l1(o,c,e,t),r=(o,c)=>i(o,c);return new Proxy(r,{get:(o,c)=>c==="create"?i:(n.has(c)||n.set(c,l1(c,void 0,e,t)),n.get(c))})}function M6({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function LD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function PD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function c1(e){return e===void 0||e===1}function Uv({scale:e,scaleX:t,scaleY:n}){return!c1(e)||!c1(t)||!c1(n)}function su(e){return Uv(e)||T6(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function T6(e){return pw(e.x)||pw(e.y)}function pw(e){return e&&e!=="0%"}function Dp(e,t,n){const i=e-n,r=t*i;return n+r}function gw(e,t,n,i,r){return r!==void 0&&(e=Dp(e,r,i)),Dp(e,n,i)+t}function qv(e,t=0,n=1,i,r){e.min=gw(e.min,t,n,i,r),e.max=gw(e.max,t,n,i,r)}function k6(e,{x:t,y:n}){qv(e.x,t.translate,t.scale,t.originPoint),qv(e.y,n.translate,n.scale,n.originPoint)}const vw=.999999999999,yw=1.0000000000001;function RD(e,t,n,i=!1){const r=n.length;if(!r)return;t.x=t.y=1;let o,c;for(let u=0;u<r;u++){o=n[u],c=o.projectionDelta;const{visualElement:h}=o.options;h&&h.props.style&&h.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&wh(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),c&&(t.x*=c.x.scale,t.y*=c.y.scale,k6(e,c)),i&&su(o.latestValues)&&wh(e,o.latestValues))}t.x<yw&&t.x>vw&&(t.x=1),t.y<yw&&t.y>vw&&(t.y=1)}function xh(e,t){e.min=e.min+t,e.max=e.max+t}function bw(e,t,n,i,r=.5){const o=Mi(e.min,e.max,r);qv(e,t,n,o,i)}function wh(e,t){bw(e.x,t.x,t.scaleX,t.scale,t.originX),bw(e.y,t.y,t.scaleY,t.scale,t.originY)}function L6(e,t){return M6(PD(e.getBoundingClientRect(),t))}function DD(e,t,n){const i=L6(e,n),{scroll:r}=t;return r&&(xh(i.x,r.offset.x),xh(i.y,r.offset.y)),i}const xw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sh=()=>({x:xw(),y:xw()}),ww=()=>({min:0,max:0}),Yi=()=>({x:ww(),y:ww()}),Vv={current:null},P6={current:!1};function OD(){if(P6.current=!0,!!F2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Vv.current=e.matches;e.addEventListener("change",t),t()}else Vv.current=!1}const zD=new WeakMap;function BD(e,t,n){for(const i in t){const r=t[i],o=n[i];if(er(r))e.addValue(i,r);else if(er(o))e.addValue(i,Fh(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(r):c.hasAnimated||c.set(r)}else{const c=e.getStaticValue(i);e.addValue(i,Fh(c!==void 0?c:r,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Sw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class FD{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:o,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=iy,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const S=qr.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,yi.render(this.render,!1,!0))};const{latestValues:h,renderState:d}=c;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=d0(n),this.isVariantNode=y6(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...v}=this.scrapeMotionValuesFromProps(n,{},this);for(const S in v){const b=v[S];h[S]!==void 0&&er(b)&&b.set(h[S])}}mount(t){this.current=t,zD.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),P6.current||OD(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Vv.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Mc(this.notifyUpdate),Mc(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=Zh.has(t);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&yi.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ih){const n=Ih[t];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[t]&&r&&i(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Yi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Sw.length;i++){const r=Sw[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,c=t[o];c&&(this.propEventSubscriptions[r]=this.on(r,c))}this.prevMotionValues=BD(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Fh(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(_A(i)||EA(i))?i=parseFloat(i):!ZR(i)&&Tc.test(n)&&(i=c6(t,n)),this.setBaseTarget(t,er(i)?i.get():i)),er(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=fy(this.props,n,this.presenceContext?.custom);o&&(i=o[t])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!er(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $2),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ay.render(this.render)}}class R6 extends FD{constructor(){super(...arguments),this.KeyframeResolver=FR}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;er(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function D6(e,{style:t,vars:n},i,r){const o=e.style;let c;for(c in t)o[c]=t[c];r?.applyProjectionStyles(o,i);for(c in n)o.setProperty(c,n[c])}function ID(e){return window.getComputedStyle(e)}class UD extends R6{constructor(){super(...arguments),this.type="html",this.renderInstance=D6}readValueFromInstance(t,n){if(Zh.has(n))return this.projection?.isProjecting?Rv(n):sR(t,n);{const i=ID(t),r=(W2(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return L6(t,n)}build(t,n,i){uy(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return my(t,n,i)}}const O6=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function qD(e,t,n,i){D6(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(O6.has(r)?r:py(r),t.attrs[r])}class VD extends R6{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Yi}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zh.has(n)){const i=l6(n);return i&&i.default||0}return n=O6.has(n)?n:py(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return C6(t,n,i)}build(t,n,i){w6(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,r){qD(t,n,i,r)}mount(t){this.isSVGTag=N6(t.tagName),super.mount(t)}}const HD=(e,t)=>dy(e)?new VD(t):new UD(t,{allowProjection:e!==M.Fragment});function Mh(e,t,n){const i=e.getProps();return fy(i,t,n!==void 0?n:i.custom,e)}const Hv=e=>Array.isArray(e);function $D(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fh(n))}function GD(e){return Hv(e)?e[e.length-1]||0:e}function YD(e,t){const n=Mh(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const c in o){const u=GD(o[c]);$D(e,c,u)}}function WD(e){return!!(er(e)&&e.add)}function $v(e,t){const n=e.getValue("willChange");if(WD(n))return n.add(t);if(!n&&Bl.WillChange){const i=new Bl.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function z6(e){return e.props[_6]}const KD=e=>e!==null;function XD(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(KD),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}const QD={type:"spring",stiffness:500,damping:25,restSpeed:10},ZD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),JD={type:"keyframes",duration:.8},tO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},eO=(e,{keyframes:t})=>t.length>2?JD:Zh.has(e)?e.startsWith("scale")?ZD(t[1]):QD:tO;function nO({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:c,repeatDelay:u,from:h,elapsed:d,...p}){return!!Object.keys(p).length}const gy=(e,t,n,i={},r,o)=>c=>{const u=sy(i,e)||{},h=u.delay||i.delay||0;let{elapsed:d=0}=i;d=d-Wo(h);const p={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:S=>{t.set(S),u.onUpdate&&u.onUpdate(S)},onComplete:()=>{c(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:r};nO(u)||Object.assign(p,eO(e,p)),p.duration&&(p.duration=Wo(p.duration)),p.repeatDelay&&(p.repeatDelay=Wo(p.repeatDelay)),p.from!==void 0&&(p.keyframes[0]=p.from);let v=!1;if((p.type===!1||p.duration===0&&!p.repeatDelay)&&(Fv(p),p.delay===0&&(v=!0)),(Bl.instantAnimations||Bl.skipAnimations)&&(v=!0,Fv(p),p.delay=0),p.allowFlatten=!u.type&&!u.ease,v&&!o&&t.get()!==void 0){const S=XD(p.keyframes,u);if(S!==void 0){yi.update(()=>{p.onUpdate(S),p.onComplete()});return}}return u.isSync?new ny(p):new jR(p)};function iO({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function B6(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:c,...u}=t;i&&(o=i);const h=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in u){const v=e.getValue(p,e.latestValues[p]??null),S=u[p];if(S===void 0||d&&iO(d,p))continue;const b={delay:n,...sy(o||{},p)},_=v.get();if(_!==void 0&&!v.isAnimating&&!Array.isArray(S)&&S===_&&!b.velocity)continue;let A=!1;if(window.MotionHandoffAnimation){const E=z6(e);if(E){const L=window.MotionHandoffAnimation(E,p,yi);L!==null&&(b.startTime=L,A=!0)}}$v(e,p),v.start(gy(p,v,S,e.shouldReduceMotion&&r6.has(p)?{type:!1}:b,e,A));const j=v.animation;j&&h.push(j)}return c&&Promise.all(h).then(()=>{yi.update(()=>{c&&YD(e,c)})}),h}function F6(e,t,n,i=0,r=1){const o=Array.from(e).sort((d,p)=>d.sortNodePosition(p)).indexOf(t),c=e.size,u=(c-1)*i;return typeof n=="function"?n(o,c):r===1?o*i:u-o*i}function Gv(e,t,n={}){const i=Mh(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(B6(e,i,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(h=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:v}=r;return sO(e,t,h,d,p,v,n)}:()=>Promise.resolve(),{when:u}=r;if(u){const[h,d]=u==="beforeChildren"?[o,c]:[c,o];return h().then(()=>d())}else return Promise.all([o(),c(n.delay)])}function sO(e,t,n=0,i=0,r=0,o=1,c){const u=[];for(const h of e.variantChildren)h.notify("AnimationStart",t),u.push(Gv(h,t,{...c,delay:n+(typeof i=="function"?0:i)+F6(e.variantChildren,h,i,r,o)}).then(()=>h.notify("AnimationComplete",t)));return Promise.all(u)}function rO(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const r=t.map(o=>Gv(e,o,n));i=Promise.all(r)}else if(typeof t=="string")i=Gv(e,t,n);else{const r=typeof t=="function"?Mh(e,t,n.custom):t;i=Promise.all(B6(e,r,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}function I6(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const aO=cy.length;function U6(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?U6(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<aO;n++){const i=cy[n],r=e.props[i];(gf(r)||r===!1)&&(t[i]=r)}return t}const oO=[...ly].reverse(),lO=ly.length;function cO(e){return t=>Promise.all(t.map(({animation:n,options:i})=>rO(e,n,i)))}function uO(e){let t=cO(e),n=Nw(),i=!0;const r=h=>(d,p)=>{const v=Mh(e,p,h==="exit"?e.presenceContext?.custom:void 0);if(v){const{transition:S,transitionEnd:b,..._}=v;d={...d,..._,...b}}return d};function o(h){t=h(e)}function c(h){const{props:d}=e,p=U6(e.parent)||{},v=[],S=new Set;let b={},_=1/0;for(let j=0;j<lO;j++){const E=oO[j],L=n[E],D=d[E]!==void 0?d[E]:p[E],z=gf(D),$=E===h?L.isActive:null;$===!1&&(_=j);let ut=D===p[E]&&D!==d[E]&&z;if(ut&&i&&e.manuallyAnimateOnMount&&(ut=!1),L.protectedKeys={...b},!L.isActive&&$===null||!D&&!L.prevProp||h0(D)||typeof D=="boolean")continue;const nt=hO(L.prevProp,D);let H=nt||E===h&&L.isActive&&!ut&&z||j>_&&z,Q=!1;const ct=Array.isArray(D)?D:[D];let F=ct.reduce(r(E),{});$===!1&&(F={});const{prevResolvedValues:Y={}}=L,ot={...Y,...F},tt=at=>{H=!0,S.has(at)&&(Q=!0,S.delete(at)),L.needsAnimating[at]=!0;const K=e.getValue(at);K&&(K.liveStyle=!1)};for(const at in ot){const K=F[at],dt=Y[at];if(b.hasOwnProperty(at))continue;let Tt=!1;Hv(K)&&Hv(dt)?Tt=!I6(K,dt):Tt=K!==dt,Tt?K!=null?tt(at):S.add(at):K!==void 0&&S.has(at)?tt(at):L.protectedKeys[at]=!0}L.prevProp=D,L.prevResolvedValues=F,L.isActive&&(b={...b,...F}),i&&e.blockInitialAnimation&&(H=!1);const yt=ut&&nt;H&&(!yt||Q)&&v.push(...ct.map(at=>{const K={type:E};if(typeof at=="string"&&i&&!yt&&e.manuallyAnimateOnMount&&e.parent){const{parent:dt}=e,Tt=Mh(dt,at);if(dt.enteringChildren&&Tt){const{delayChildren:X}=Tt.transition||{};K.delay=F6(dt.enteringChildren,e,X)}}return{animation:at,options:K}}))}if(S.size){const j={};if(typeof d.initial!="boolean"){const E=Mh(e,Array.isArray(d.initial)?d.initial[0]:d.initial);E&&E.transition&&(j.transition=E.transition)}S.forEach(E=>{const L=e.getBaseTarget(E),D=e.getValue(E);D&&(D.liveStyle=!0),j[E]=L??null}),v.push({animation:j})}let A=!!v.length;return i&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(A=!1),i=!1,A?t(v):Promise.resolve()}function u(h,d){if(n[h].isActive===d)return Promise.resolve();e.variantChildren?.forEach(v=>v.animationState?.setActive(h,d)),n[h].isActive=d;const p=c(h);for(const v in n)n[v].protectedKeys={};return p}return{animateChanges:c,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Nw()}}}function hO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!I6(t,e):!1}function Jc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nw(){return{animate:Jc(!0),whileInView:Jc(),whileHover:Jc(),whileTap:Jc(),whileDrag:Jc(),whileFocus:Jc(),exit:Jc()}}class Rc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class dO extends Rc{constructor(t){super(t),t.animationState||(t.animationState=uO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();h0(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let fO=0;class mO extends Rc{constructor(){super(...arguments),this.id=fO++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const pO={animation:{Feature:dO},exit:{Feature:mO}};function yf(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function kf(e){return{point:{x:e.pageX,y:e.pageY}}}const gO=e=>t=>oy(t)&&e(t,kf(t));function Zd(e,t,n,i){return yf(e,t,gO(n),i)}const q6=1e-4,vO=1-q6,yO=1+q6,V6=.01,bO=0-V6,xO=0+V6;function gr(e){return e.max-e.min}function wO(e,t,n){return Math.abs(e-t)<=n}function Aw(e,t,n,i=.5){e.origin=i,e.originPoint=Mi(t.min,t.max,e.origin),e.scale=gr(n)/gr(t),e.translate=Mi(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vO&&e.scale<=yO||isNaN(e.scale))&&(e.scale=1),(e.translate>=bO&&e.translate<=xO||isNaN(e.translate))&&(e.translate=0)}function Jd(e,t,n,i){Aw(e.x,t.x,n.x,i?i.originX:void 0),Aw(e.y,t.y,n.y,i?i.originY:void 0)}function Cw(e,t,n){e.min=n.min+t.min,e.max=e.min+gr(t)}function SO(e,t,n){Cw(e.x,t.x,n.x),Cw(e.y,t.y,n.y)}function _w(e,t,n){e.min=t.min-n.min,e.max=e.min+gr(t)}function tf(e,t,n){_w(e.x,t.x,n.x),_w(e.y,t.y,n.y)}function Oa(e){return[e("x"),e("y")]}const H6=({current:e})=>e?e.ownerDocument.defaultView:null,jw=(e,t)=>Math.abs(e-t);function NO(e,t){const n=jw(e.x,t.x),i=jw(e.y,t.y);return Math.sqrt(n**2+i**2)}class $6{constructor(t,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:c=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=h1(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,_=NO(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!_)return;const{point:A}=S,{timestamp:j}=Fs;this.history.push({...A,timestamp:j});const{onStart:E,onMove:L}=this.handlers;b||(E&&E(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,S)},this.handlePointerMove=(S,b)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=u1(b,this.transformPagePoint),yi.update(this.updatePoint,!0)},this.handlePointerUp=(S,b)=>{this.end();const{onEnd:_,onSessionEnd:A,resumeAnimation:j}=this.handlers;if(this.dragSnapToOrigin&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=h1(S.type==="pointercancel"?this.lastMoveEventInfo:u1(b,this.transformPagePoint),this.history);this.startEvent&&_&&_(S,E),A&&A(S,E)},!oy(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=r||window;const u=kf(t),h=u1(u,this.transformPagePoint),{point:d}=h,{timestamp:p}=Fs;this.history=[{...d,timestamp:p}];const{onSessionStart:v}=n;v&&v(t,h1(h,this.history)),this.removeListeners=Ef(Zd(this.contextWindow,"pointermove",this.handlePointerMove),Zd(this.contextWindow,"pointerup",this.handlePointerUp),Zd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Mc(this.updatePoint)}}function u1(e,t){return t?{point:t(e.point)}:e}function Ew(e,t){return{x:e.x-t.x,y:e.y-t.y}}function h1({point:e},t){return{point:e,delta:Ew(e,G6(t)),offset:Ew(e,AO(t)),velocity:CO(t,.1)}}function AO(e){return e[0]}function G6(e){return e[e.length-1]}function CO(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=G6(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Wo(t)));)n--;if(!i)return{x:0,y:0};const o=za(r.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const c={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function _O(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Mi(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Mi(n,e,i.max):Math.min(e,n)),e}function Mw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function jO(e,{top:t,left:n,bottom:i,right:r}){return{x:Mw(e.x,n,r),y:Mw(e.y,t,i)}}function Tw(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function EO(e,t){return{x:Tw(e.x,t.x),y:Tw(e.y,t.y)}}function MO(e,t){let n=.5;const i=gr(e),r=gr(t);return r>i?n=ff(t.min,t.max-i,e.min):i>r&&(n=ff(e.min,e.max-r,t.min)),zl(0,1,n)}function TO(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Yv=.35;function kO(e=Yv){return e===!1?e=0:e===!0&&(e=Yv),{x:kw(e,"left","right"),y:kw(e,"top","bottom")}}function kw(e,t,n){return{min:Lw(e,t),max:Lw(e,n)}}function Lw(e,t){return typeof e=="number"?e:e[t]||0}const LO=new WeakMap;class PO{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Yi(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=v=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(kf(v).point)},c=(v,S)=>{const{drag:b,dragPropagation:_,onDragStart:A}=this.getProps();if(b&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=HR(b),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Oa(E=>{let L=this.getAxisMotionValue(E).get()||0;if(Ko.test(L)){const{projection:D}=this.visualElement;if(D&&D.layout){const z=D.layout.layoutBox[E];z&&(L=gr(z)*(parseFloat(L)/100))}}this.originPoint[E]=L}),A&&yi.postRender(()=>A(v,S)),$v(this.visualElement,"transform");const{animationState:j}=this.visualElement;j&&j.setActive("whileDrag",!0)},u=(v,S)=>{this.latestPointerEvent=v,this.latestPanInfo=S;const{dragPropagation:b,dragDirectionLock:_,onDirectionLock:A,onDrag:j}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:E}=S;if(_&&this.currentDirection===null){this.currentDirection=RO(E),this.currentDirection!==null&&A&&A(this.currentDirection);return}this.updateAxis("x",S.point,E),this.updateAxis("y",S.point,E),this.visualElement.render(),j&&j(v,S)},h=(v,S)=>{this.latestPointerEvent=v,this.latestPanInfo=S,this.stop(v,S),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>Oa(v=>this.getAnimationState(v)==="paused"&&this.getAxisMotionValue(v).animation?.play()),{dragSnapToOrigin:p}=this.getProps();this.panSession=new $6(t,{onSessionStart:o,onStart:c,onMove:u,onSessionEnd:h,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,distanceThreshold:i,contextWindow:H6(this.visualElement)})}stop(t,n){const i=t||this.latestPointerEvent,r=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!i)return;const{velocity:c}=r;this.startAnimation(c);const{onDragEnd:u}=this.getProps();u&&yi.postRender(()=>u(i,r))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:r}=this.getProps();if(!i||!Fm(t,r,this.currentDirection))return;const o=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(c=_O(c,this.constraints[t],this.elastic[t])),o.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;t&&bh(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=jO(i.layoutBox,t):this.constraints=!1,this.elastic=kO(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Oa(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=TO(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!bh(t))return!1;const i=t.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=DD(i,r.root,this.visualElement.getTransformPagePoint());let c=EO(r.layout.layoutBox,o);if(n){const u=n(LD(c));this.hasMutatedConstraints=!!u,u&&(c=M6(u))}return c}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:o,dragSnapToOrigin:c,onDragTransitionEnd:u}=this.getProps(),h=this.constraints||{},d=Oa(p=>{if(!Fm(p,n,this.currentDirection))return;let v=h&&h[p]||{};c&&(v={min:0,max:0});const S=r?200:1e6,b=r?40:1e7,_={type:"inertia",velocity:i?t[p]:0,bounceStiffness:S,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...o,...v};return this.startAxisValueAnimation(p,_)});return Promise.all(d).then(u)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return $v(this.visualElement,t),i.start(gy(t,i,0,n,this.visualElement,!1))}stopAnimation(){Oa(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Oa(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){Oa(n=>{const{drag:i}=this.getProps();if(!Fm(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(n);if(r&&r.layout){const{min:c,max:u}=r.layout.layoutBox[n];o.set(t[n]-Mi(c,u,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!bh(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Oa(c=>{const u=this.getAxisMotionValue(c);if(u&&this.constraints!==!1){const h=u.get();r[c]=MO({min:h,max:h},this.constraints[c])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Oa(c=>{if(!Fm(c,t,null))return;const u=this.getAxisMotionValue(c),{min:h,max:d}=this.constraints[c];u.set(Mi(h,d,r[c]))})}addListeners(){if(!this.visualElement.current)return;LO.set(this.visualElement,this);const t=this.visualElement.current,n=Zd(t,"pointerdown",h=>{const{drag:d,dragListener:p=!0}=this.getProps();d&&p&&this.start(h)}),i=()=>{const{dragConstraints:h}=this.getProps();bh(h)&&h.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),yi.read(i);const c=yf(window,"resize",()=>this.scalePositionWithinConstraints()),u=r.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:d})=>{this.isDragging&&d&&(Oa(p=>{const v=this.getAxisMotionValue(p);v&&(this.originPoint[p]+=h[p].translate,v.set(v.get()+h[p].translate))}),this.visualElement.render())}));return()=>{c(),n(),o(),u&&u()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:c=Yv,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:o,dragElastic:c,dragMomentum:u}}}function Fm(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function RO(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class DO extends Rc{constructor(t){super(t),this.removeGroupControls=Ba,this.removeListeners=Ba,this.controls=new PO(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ba}unmount(){this.removeGroupControls(),this.removeListeners()}}const Pw=e=>(t,n)=>{e&&yi.postRender(()=>e(t,n))};class OO extends Rc{constructor(){super(...arguments),this.removePointerDownListener=Ba}onPointerDown(t){this.session=new $6(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:H6(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Pw(t),onStart:Pw(n),onMove:i,onEnd:(o,c)=>{delete this.session,r&&yi.postRender(()=>r(o,c))}}}mount(){this.removePointerDownListener=Zd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const pp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Rw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ve.test(e))e=parseFloat(e);else return e;const n=Rw(e,t.target.x),i=Rw(e,t.target.y);return`${n}% ${i}%`}},zO={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=Tc.parse(e);if(r.length>5)return i;const o=Tc.createTransformer(e),c=typeof r[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;r[0+c]/=u,r[1+c]/=h;const d=Mi(u,h,.5);return typeof r[2+c]=="number"&&(r[2+c]/=d),typeof r[3+c]=="number"&&(r[3+c]/=d),o(r)}};let d1=!1;class BO extends M.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:o}=t;aD(FO),o&&(n.group&&n.group.add(o),i&&i.register&&r&&i.register(o),d1&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),pp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:r,isPresent:o}=this.props,{projection:c}=i;return c&&(c.isPresent=o,d1=!0,r||t.layoutDependency!==n||n===void 0||t.isPresent!==o?c.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?c.promote():c.relegate()||yi.postRender(()=>{const u=c.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ay.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=t;d1=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Y6(e){const[t,n]=JR(),i=M.useContext(CA);return f.jsx(BO,{...e,layoutGroup:i,switchLayoutGroup:M.useContext(j6),isPresent:t,safeToRemove:n})}const FO={borderRadius:{...Fd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fd,borderTopRightRadius:Fd,borderBottomLeftRadius:Fd,borderBottomRightRadius:Fd,boxShadow:zO};function IO(e,t,n){const i=er(e)?e:Fh(e);return i.start(gy("",i,t,n)),i.animation}const UO=(e,t)=>e.depth-t.depth;class qO{constructor(){this.children=[],this.isDirty=!1}add(t){U2(this.children,t),this.isDirty=!0}remove(t){q2(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(UO),this.isDirty=!1,this.children.forEach(t)}}function VO(e,t){const n=qr.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(Mc(i),e(o-t))};return yi.setup(i,!0),()=>Mc(i)}const W6=["TopLeft","TopRight","BottomLeft","BottomRight"],HO=W6.length,Dw=e=>typeof e=="string"?parseFloat(e):e,Ow=e=>typeof e=="number"||Ve.test(e);function $O(e,t,n,i,r,o){r?(e.opacity=Mi(0,n.opacity??1,GO(i)),e.opacityExit=Mi(t.opacity??1,0,YO(i))):o&&(e.opacity=Mi(t.opacity??1,n.opacity??1,i));for(let c=0;c<HO;c++){const u=`border${W6[c]}Radius`;let h=zw(t,u),d=zw(n,u);if(h===void 0&&d===void 0)continue;h||(h=0),d||(d=0),h===0||d===0||Ow(h)===Ow(d)?(e[u]=Math.max(Mi(Dw(h),Dw(d),i),0),(Ko.test(d)||Ko.test(h))&&(e[u]+="%")):e[u]=d}(t.rotate||n.rotate)&&(e.rotate=Mi(t.rotate||0,n.rotate||0,i))}function zw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const GO=K6(0,.5,OA),YO=K6(.5,.95,Ba);function K6(e,t,n){return i=>i<e?0:i>t?1:n(ff(e,t,i))}function Bw(e,t){e.min=t.min,e.max=t.max}function Da(e,t){Bw(e.x,t.x),Bw(e.y,t.y)}function Fw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Iw(e,t,n,i,r){return e-=t,e=Dp(e,1/n,i),r!==void 0&&(e=Dp(e,1/r,i)),e}function WO(e,t=0,n=1,i=.5,r,o=e,c=e){if(Ko.test(t)&&(t=parseFloat(t),t=Mi(c.min,c.max,t/100)-c.min),typeof t!="number")return;let u=Mi(o.min,o.max,i);e===o&&(u-=t),e.min=Iw(e.min,t,n,u,r),e.max=Iw(e.max,t,n,u,r)}function Uw(e,t,[n,i,r],o,c){WO(e,t[n],t[i],t[r],t.scale,o,c)}const KO=["x","scaleX","originX"],XO=["y","scaleY","originY"];function qw(e,t,n,i){Uw(e.x,t,KO,n?n.x:void 0,i?i.x:void 0),Uw(e.y,t,XO,n?n.y:void 0,i?i.y:void 0)}function Vw(e){return e.translate===0&&e.scale===1}function X6(e){return Vw(e.x)&&Vw(e.y)}function Hw(e,t){return e.min===t.min&&e.max===t.max}function QO(e,t){return Hw(e.x,t.x)&&Hw(e.y,t.y)}function $w(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Q6(e,t){return $w(e.x,t.x)&&$w(e.y,t.y)}function Gw(e){return gr(e.x)/gr(e.y)}function Yw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ZO{constructor(){this.members=[]}add(t){U2(this.members,t),t.scheduleRender()}remove(t){if(q2(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const o=this.members[r];if(o.isPresent!==!1){i=o;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function JO(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,c=n?.z||0;if((r||o||c)&&(i=`translate3d(${r}px, ${o}px, ${c}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:p,rotateX:v,rotateY:S,skewX:b,skewY:_}=n;d&&(i=`perspective(${d}px) ${i}`),p&&(i+=`rotate(${p}deg) `),v&&(i+=`rotateX(${v}deg) `),S&&(i+=`rotateY(${S}deg) `),b&&(i+=`skewX(${b}deg) `),_&&(i+=`skewY(${_}deg) `)}const u=e.x.scale*t.x,h=e.y.scale*t.y;return(u!==1||h!==1)&&(i+=`scale(${u}, ${h})`),i||"none"}const f1=["","X","Y","Z"],tz=1e3;let ez=0;function m1(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Z6(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=z6(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",yi,!(r||o))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Z6(i)}function J6({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(c={},u=t?.()){this.id=ez++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(sz),this.nodes.forEach(lz),this.nodes.forEach(cz),this.nodes.forEach(rz)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new qO)}addEventListener(c,u){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new $2),this.eventHandlers.get(c).add(u)}notifyListeners(c,...u){const h=this.eventHandlers.get(c);h&&h.notify(...u)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=m6(c)&&!XR(c),this.instance=c;const{layoutId:u,layout:h,visualElement:d}=this.options;if(d&&!d.current&&d.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||u)&&(this.isLayoutDirty=!0),e){let p,v=0;const S=()=>this.root.updateBlockedByResize=!1;yi.read(()=>{v=window.innerWidth}),e(c,()=>{const b=window.innerWidth;b!==v&&(v=b,this.root.updateBlockedByResize=!0,p&&p(),p=VO(S,250),pp.hasAnimatedSinceResize&&(pp.hasAnimatedSinceResize=!1,this.nodes.forEach(Xw)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&d&&(u||h)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:v,hasRelativeLayoutChanged:S,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||d.getDefaultTransition()||mz,{onLayoutAnimationStart:A,onLayoutAnimationComplete:j}=d.getProps(),E=!this.targetLayout||!Q6(this.targetLayout,b),L=!v&&S;if(this.options.layoutRoot||this.resumeFrom||L||v&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const D={...sy(_,"layout"),onPlay:A,onComplete:j};(d.shouldReduceMotion||this.options.layoutRoot)&&(D.delay=0,D.type=!1),this.startAnimation(D),this.setAnimationOrigin(p,L)}else v||Xw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Mc(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(uz),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Z6(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const v=this.path[p];v.shouldResetTransform=!0,v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:u,layout:h}=this.options;if(u===void 0&&!h)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ww);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(oz),this.nodes.forEach(nz),this.nodes.forEach(iz)):this.nodes.forEach(Kw),this.clearAllSnapshots();const u=qr.now();Fs.delta=zl(0,1e3/60,u-Fs.timestamp),Fs.timestamp=u,Fs.isProcessing=!0,n1.update.process(Fs),n1.preRender.process(Fs),n1.render.process(Fs),Fs.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ay.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(az),this.sharedNodes.forEach(hz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,yi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){yi.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!gr(this.snapshot.measuredBox.x)&&!gr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let h=0;h<this.path.length;h++)this.path[h].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Yi(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(u=!1),u&&this.instance){const h=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:h,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!r)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!X6(this.projectionDelta),h=this.getTransformTemplate(),d=h?h(this.latestValues,""):void 0,p=d!==this.prevTransformTemplateValue;c&&this.instance&&(u||su(this.latestValues)||p)&&(r(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const u=this.measurePageBox();let h=this.removeElementScroll(u);return c&&(h=this.removeTransform(h)),pz(h),{animationId:this.root.animationId,measuredBox:u,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return Yi();const u=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(gz))){const{scroll:d}=this.root;d&&(xh(u.x,d.offset.x),xh(u.y,d.offset.y))}return u}removeElementScroll(c){const u=Yi();if(Da(u,c),this.scroll?.wasRoot)return u;for(let h=0;h<this.path.length;h++){const d=this.path[h],{scroll:p,options:v}=d;d!==this.root&&p&&v.layoutScroll&&(p.wasRoot&&Da(u,c),xh(u.x,p.offset.x),xh(u.y,p.offset.y))}return u}applyTransform(c,u=!1){const h=Yi();Da(h,c);for(let d=0;d<this.path.length;d++){const p=this.path[d];!u&&p.options.layoutScroll&&p.scroll&&p!==p.root&&wh(h,{x:-p.scroll.offset.x,y:-p.scroll.offset.y}),su(p.latestValues)&&wh(h,p.latestValues)}return su(this.latestValues)&&wh(h,this.latestValues),h}removeTransform(c){const u=Yi();Da(u,c);for(let h=0;h<this.path.length;h++){const d=this.path[h];if(!d.instance||!su(d.latestValues))continue;Uv(d.latestValues)&&d.updateSnapshot();const p=Yi(),v=d.measurePageBox();Da(p,v),qw(u,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,p)}return su(this.latestValues)&&qw(u,this.latestValues),u}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Fs.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==u;if(!(c||h&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:v}=this.options;if(!(!this.layout||!(p||v))){if(this.resolvedRelativeTargetAt=Fs.timestamp,!this.targetDelta&&!this.relativeTarget){const S=this.getClosestProjectingParent();S&&S.layout&&this.animationProgress!==1?(this.relativeParent=S,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Yi(),this.relativeTargetOrigin=Yi(),tf(this.relativeTargetOrigin,this.layout.layoutBox,S.layout.layoutBox),Da(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Yi(),this.targetWithTransforms=Yi()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),SO(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Da(this.target,this.layout.layoutBox),k6(this.target,this.targetDelta)):Da(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const S=this.getClosestProjectingParent();S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?(this.relativeParent=S,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Yi(),this.relativeTargetOrigin=Yi(),tf(this.relativeTargetOrigin,this.target,S.target),Da(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Uv(this.parent.latestValues)||T6(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const c=this.getLead(),u=!!this.resumingFrom||this!==c;let h=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(h=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Fs.timestamp&&(h=!1),h)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;Da(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,S=this.treeScale.y;RD(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Yi());const{target:b}=c;if(!b){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fw(this.prevProjectionDelta.x,this.projectionDelta.x),Fw(this.prevProjectionDelta.y,this.projectionDelta.y)),Jd(this.projectionDelta,this.layoutCorrected,b,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==S||!Yw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sh(),this.projectionDelta=Sh(),this.projectionDeltaWithTransform=Sh()}setAnimationOrigin(c,u=!1){const h=this.snapshot,d=h?h.latestValues:{},p={...this.latestValues},v=Sh();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const S=Yi(),b=h?h.source:void 0,_=this.layout?this.layout.source:void 0,A=b!==_,j=this.getStack(),E=!j||j.members.length<=1,L=!!(A&&!E&&this.options.crossfade===!0&&!this.path.some(fz));this.animationProgress=0;let D;this.mixTargetDelta=z=>{const $=z/1e3;Qw(v.x,c.x,$),Qw(v.y,c.y,$),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tf(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox),dz(this.relativeTarget,this.relativeTargetOrigin,S,$),D&&QO(this.relativeTarget,D)&&(this.isProjectionDirty=!1),D||(D=Yi()),Da(D,this.relativeTarget)),A&&(this.animationValues=p,$O(p,d,this.latestValues,$,L,E)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=$},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Mc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=yi.update(()=>{pp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Fh(0)),this.currentAnimation=IO(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),c.onUpdate&&c.onUpdate(u)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tz),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:u,target:h,layout:d,latestValues:p}=c;if(!(!u||!h||!d)){if(this!==c&&this.layout&&d&&tC(this.options.animationType,this.layout.layoutBox,d.layoutBox)){h=this.target||Yi();const v=gr(this.layout.layoutBox.x);h.x.min=c.target.x.min,h.x.max=h.x.min+v;const S=gr(this.layout.layoutBox.y);h.y.min=c.target.y.min,h.y.max=h.y.min+S}Da(u,h),wh(u,p),Jd(this.projectionDeltaWithTransform,this.layoutCorrected,u,p)}}registerSharedNode(c,u){this.sharedNodes.has(c)||this.sharedNodes.set(c,new ZO),this.sharedNodes.get(c).add(u);const d=u.options.initialPromotionConfig;u.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(u):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:u,preserveFollowOpacity:h}={}){const d=this.getStack();d&&d.promote(this,h),c&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let u=!1;const{latestValues:h}=c;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(u=!0),!u)return;const d={};h.z&&m1("z",c,d,this.animationValues);for(let p=0;p<f1.length;p++)m1(`rotate${f1[p]}`,c,d,this.animationValues),m1(`skew${f1[p]}`,c,d,this.animationValues);c.render();for(const p in d)c.setStaticValue(p,d[p]),this.animationValues&&(this.animationValues[p]=d[p]);c.scheduleRender()}applyProjectionStyles(c,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=mp(u?.pointerEvents)||"",c.transform=h?h(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=mp(u?.pointerEvents)||""),this.hasProjected&&!su(this.latestValues)&&(c.transform=h?h({},""):"none",this.hasProjected=!1);return}c.visibility="";const p=d.animationValues||d.latestValues;this.applyTransformsToTarget();let v=JO(this.projectionDeltaWithTransform,this.treeScale,p);h&&(v=h(p,v)),c.transform=v;const{x:S,y:b}=this.projectionDelta;c.transformOrigin=`${S.origin*100}% ${b.origin*100}% 0`,d.animationValues?c.opacity=d===this?p.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:c.opacity=d===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const _ in vf){if(p[_]===void 0)continue;const{correct:A,applyTo:j,isCSSVariable:E}=vf[_],L=v==="none"?p[_]:A(p[_],d);if(j){const D=j.length;for(let z=0;z<D;z++)c[j[z]]=L}else E?this.options.visualElement.renderState.vars[_]=L:c[_]=L}this.options.layoutId&&(c.pointerEvents=d===this?mp(u?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(Ww),this.root.sharedNodes.clear()}}}function nz(e){e.updateLayout()}function iz(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:r}=e.options,o=t.source!==e.layout.source;r==="size"?Oa(p=>{const v=o?t.measuredBox[p]:t.layoutBox[p],S=gr(v);v.min=n[p].min,v.max=v.min+S}):tC(r,t.layoutBox,n)&&Oa(p=>{const v=o?t.measuredBox[p]:t.layoutBox[p],S=gr(n[p]);v.max=v.min+S,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+S)});const c=Sh();Jd(c,n,t.layoutBox);const u=Sh();o?Jd(u,e.applyTransform(i,!0),t.measuredBox):Jd(u,n,t.layoutBox);const h=!X6(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:v,layout:S}=p;if(v&&S){const b=Yi();tf(b,t.layoutBox,v.layoutBox);const _=Yi();tf(_,n,S.layoutBox),Q6(b,_)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=_,e.relativeTargetOrigin=b,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:u,layoutDelta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function sz(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function rz(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function az(e){e.clearSnapshot()}function Ww(e){e.clearMeasurements()}function Kw(e){e.isLayoutDirty=!1}function oz(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lz(e){e.resolveTargetDelta()}function cz(e){e.calcProjection()}function uz(e){e.resetSkewAndRotation()}function hz(e){e.removeLeadSnapshot()}function Qw(e,t,n){e.translate=Mi(t.translate,0,n),e.scale=Mi(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zw(e,t,n,i){e.min=Mi(t.min,n.min,i),e.max=Mi(t.max,n.max,i)}function dz(e,t,n,i){Zw(e.x,t.x,n.x,i),Zw(e.y,t.y,n.y,i)}function fz(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const mz={duration:.45,ease:[.4,0,.1,1]},Jw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),t3=Jw("applewebkit/")&&!Jw("chrome/")?Math.round:Ba;function e3(e){e.min=t3(e.min),e.max=t3(e.max)}function pz(e){e3(e.x),e3(e.y)}function tC(e,t,n){return e==="position"||e==="preserve-aspect"&&!wO(Gw(t),Gw(n),.2)}function gz(e){return e!==e.root&&e.scroll?.wasRoot}const vz=J6({attachResizeListener:(e,t)=>yf(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),p1={current:void 0},eC=J6({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!p1.current){const e=new vz({});e.mount(window),e.setOptions({layoutScroll:!0}),p1.current=e}return p1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),yz={pan:{Feature:OO},drag:{Feature:DO,ProjectionNode:eC,MeasureLayout:Y6}};function n3(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=i[r];o&&yi.postRender(()=>o(t,kf(t)))}class bz extends Rc{mount(){const{current:t}=this.node;t&&(this.unmount=$R(t,(n,i)=>(n3(this.node,i,"Start"),r=>n3(this.node,r,"End"))))}unmount(){}}class xz extends Rc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ef(yf(this.node.current,"focus",()=>this.onFocus()),yf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function i3(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=i[r];o&&yi.postRender(()=>o(t,kf(t)))}class wz extends Rc{mount(){const{current:t}=this.node;t&&(this.unmount=KR(t,(n,i)=>(i3(this.node,i,"Start"),(r,{success:o})=>i3(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wv=new WeakMap,g1=new WeakMap,Sz=e=>{const t=Wv.get(e.target);t&&t(e)},Nz=e=>{e.forEach(Sz)};function Az({root:e,...t}){const n=e||document;g1.has(n)||g1.set(n,{});const i=g1.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(Nz,{root:e,...t})),i[r]}function Cz(e,t,n){const i=Az(t);return Wv.set(e,n),i.observe(e),()=>{Wv.delete(e),i.unobserve(e)}}const _z={some:0,all:1};class jz extends Rc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:o}=t,c={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:_z[r]},u=h=>{const{isIntersecting:d}=h;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:p,onViewportLeave:v}=this.node.getProps(),S=d?p:v;S&&S(h)};return Cz(this.node.current,c,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ez(t,n))&&this.startObserver()}unmount(){}}function Ez({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Mz={inView:{Feature:jz},tap:{Feature:wz},focus:{Feature:xz},hover:{Feature:bz}},Tz={layout:{ProjectionNode:eC,MeasureLayout:Y6}},kz={...pO,...Mz,...yz,...Tz},Ei=kD(kz,HD);var Lz=Symbol.for("react.lazy"),Op=Af[" use ".trim().toString()];function Pz(e){return typeof e=="object"&&e!==null&&"then"in e}function nC(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Lz&&"_payload"in e&&Pz(e._payload)}function Rz(e){const t=Oz(e),n=M.forwardRef((i,r)=>{let{children:o,...c}=i;nC(o)&&typeof Op=="function"&&(o=Op(o._payload));const u=M.Children.toArray(o),h=u.find(Bz);if(h){const d=h.props.children,p=u.map(v=>v===h?M.Children.count(d)>1?M.Children.only(null):M.isValidElement(d)?d.props.children:null:v);return f.jsx(t,{...c,ref:r,children:M.isValidElement(d)?M.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}var Dz=Rz("Slot");function Oz(e){const t=M.forwardRef((n,i)=>{let{children:r,...o}=n;if(nC(r)&&typeof Op=="function"&&(r=Op(r._payload)),M.isValidElement(r)){const c=Iz(r),u=Fz(o,r.props);return r.type!==M.Fragment&&(u.ref=i?Lc(i,c):c),M.cloneElement(r,u)}return M.Children.count(r)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zz=Symbol("radix.slottable");function Bz(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zz}function Fz(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...u)=>{const h=o(...u);return r(...u),h}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function Iz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Uz=C2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground shadow-sm border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent",link:"text-primary underline-offset-4 hover:underline"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),We=M.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...r},o)=>{const c=i?Dz:"button";return f.jsx(c,{className:ci(Uz({variant:t,size:n,className:e})),ref:o,...r})});We.displayName="Button";const ji=M.forwardRef(({className:e,type:t,...n},i)=>f.jsx("input",{type:t,className:ci("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:i,...n}));ji.displayName="Input";function zp(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var qz=Af[" useInsertionEffect ".trim().toString()]||ma;function Vz({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[r,o,c]=Hz({defaultProp:t,onChange:n}),u=e!==void 0,h=u?e:r;{const p=M.useRef(e!==void 0);M.useEffect(()=>{const v=p.current;v!==u&&console.warn(`${i} is changing from ${v?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=u},[u,i])}const d=M.useCallback(p=>{if(u){const v=$z(p)?p(e):p;v!==e&&c.current?.(v)}else o(p)},[u,e,o,c]);return[h,d]}function Hz({defaultProp:e,onChange:t}){const[n,i]=M.useState(e),r=M.useRef(n),o=M.useRef(t);return qz(()=>{o.current=t},[t]),M.useEffect(()=>{r.current!==n&&(o.current?.(n),r.current=n)},[n,r]),[n,i,o]}function $z(e){return typeof e=="function"}function Qi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function s3(e){const t=Gz(e),n=M.forwardRef((i,r)=>{const{children:o,...c}=i,u=M.Children.toArray(o),h=u.find(Wz);if(h){const d=h.props.children,p=u.map(v=>v===h?M.Children.count(d)>1?M.Children.only(null):M.isValidElement(d)?d.props.children:null:v);return f.jsx(t,{...c,ref:r,children:M.isValidElement(d)?M.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function Gz(e){const t=M.forwardRef((n,i)=>{const{children:r,...o}=n;if(M.isValidElement(r)){const c=Xz(r),u=Kz(o,r.props);return r.type!==M.Fragment&&(u.ref=i?Lc(i,c):c),M.cloneElement(r,u)}return M.Children.count(r)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yz=Symbol("radix.slottable");function Wz(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yz}function Kz(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...u)=>{const h=o(...u);return r(...u),h}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function Xz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function iC(e){const t=e+"CollectionProvider",[n,i]=Pc(t),[r,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=A=>{const{scope:j,children:E}=A,L=mr.useRef(null),D=mr.useRef(new Map).current;return f.jsx(r,{scope:j,itemMap:D,collectionRef:L,children:E})};c.displayName=t;const u=e+"CollectionSlot",h=s3(u),d=mr.forwardRef((A,j)=>{const{scope:E,children:L}=A,D=o(u,E),z=Ti(j,D.collectionRef);return f.jsx(h,{ref:z,children:L})});d.displayName=u;const p=e+"CollectionItemSlot",v="data-radix-collection-item",S=s3(p),b=mr.forwardRef((A,j)=>{const{scope:E,children:L,...D}=A,z=mr.useRef(null),$=Ti(j,z),ut=o(p,E);return mr.useEffect(()=>(ut.itemMap.set(z,{ref:z,...D}),()=>void ut.itemMap.delete(z))),f.jsx(S,{[v]:"",ref:$,children:L})});b.displayName=p;function _(A){const j=o(e+"CollectionConsumer",A);return mr.useCallback(()=>{const L=j.collectionRef.current;if(!L)return[];const D=Array.from(L.querySelectorAll(`[${v}]`));return Array.from(j.itemMap.values()).sort((ut,nt)=>D.indexOf(ut.ref.current)-D.indexOf(nt.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:c,Slot:d,ItemSlot:b},_,i]}var Qz=M.createContext(void 0);function sC(e){const t=M.useContext(Qz);return e||t||"ltr"}var v1=0;function Zz(){M.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??r3()),document.body.insertAdjacentElement("beforeend",e[1]??r3()),v1++,()=>{v1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),v1--}},[])}function r3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var y1="focusScope.autoFocusOnMount",b1="focusScope.autoFocusOnUnmount",a3={bubbles:!1,cancelable:!0},Jz="FocusScope",rC=M.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...c}=e,[u,h]=M.useState(null),d=Us(r),p=Us(o),v=M.useRef(null),S=Ti(t,A=>h(A)),b=M.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M.useEffect(()=>{if(i){let A=function(D){if(b.paused||!u)return;const z=D.target;u.contains(z)?v.current=z:wc(v.current,{select:!0})},j=function(D){if(b.paused||!u)return;const z=D.relatedTarget;z!==null&&(u.contains(z)||wc(v.current,{select:!0}))},E=function(D){if(document.activeElement===document.body)for(const $ of D)$.removedNodes.length>0&&wc(u)};document.addEventListener("focusin",A),document.addEventListener("focusout",j);const L=new MutationObserver(E);return u&&L.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",j),L.disconnect()}}},[i,u,b.paused]),M.useEffect(()=>{if(u){l3.add(b);const A=document.activeElement;if(!u.contains(A)){const E=new CustomEvent(y1,a3);u.addEventListener(y1,d),u.dispatchEvent(E),E.defaultPrevented||(tB(rB(aC(u)),{select:!0}),document.activeElement===A&&wc(u))}return()=>{u.removeEventListener(y1,d),setTimeout(()=>{const E=new CustomEvent(b1,a3);u.addEventListener(b1,p),u.dispatchEvent(E),E.defaultPrevented||wc(A??document.body,{select:!0}),u.removeEventListener(b1,p),l3.remove(b)},0)}}},[u,d,p,b]);const _=M.useCallback(A=>{if(!n&&!i||b.paused)return;const j=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,E=document.activeElement;if(j&&E){const L=A.currentTarget,[D,z]=eB(L);D&&z?!A.shiftKey&&E===z?(A.preventDefault(),n&&wc(D,{select:!0})):A.shiftKey&&E===D&&(A.preventDefault(),n&&wc(z,{select:!0})):E===L&&A.preventDefault()}},[n,i,b.paused]);return f.jsx(qs.div,{tabIndex:-1,...c,ref:S,onKeyDown:_})});rC.displayName=Jz;function tB(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(wc(i,{select:t}),document.activeElement!==n)return}function eB(e){const t=aC(e),n=o3(t,e),i=o3(t.reverse(),e);return[n,i]}function aC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function o3(e,t){for(const n of e)if(!nB(n,{upTo:t}))return n}function nB(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function iB(e){return e instanceof HTMLInputElement&&"select"in e}function wc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&iB(e)&&t&&e.select()}}var l3=sB();function sB(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=c3(e,t),e.unshift(t)},remove(t){e=c3(e,t),e[0]?.resume()}}}function c3(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function rB(e){return e.filter(t=>t.tagName!=="A")}function Th(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var aB=Af[" useInsertionEffect ".trim().toString()]||ma;function oB({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[r,o,c]=lB({defaultProp:t,onChange:n}),u=e!==void 0,h=u?e:r;{const p=M.useRef(e!==void 0);M.useEffect(()=>{const v=p.current;v!==u&&console.warn(`${i} is changing from ${v?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=u},[u,i])}const d=M.useCallback(p=>{if(u){const v=cB(p)?p(e):p;v!==e&&c.current?.(v)}else o(p)},[u,e,o,c]);return[h,d]}function lB({defaultProp:e,onChange:t}){const[n,i]=M.useState(e),r=M.useRef(n),o=M.useRef(t);return aB(()=>{o.current=t},[t]),M.useEffect(()=>{r.current!==n&&(o.current?.(n),r.current=n)},[n,r]),[n,i,o]}function cB(e){return typeof e=="function"}var x1="rovingFocusGroup.onEntryFocus",uB={bubbles:!1,cancelable:!0},Lf="RovingFocusGroup",[Kv,oC,hB]=iC(Lf),[dB,lC]=Pc(Lf,[hB]),[fB,mB]=dB(Lf),cC=M.forwardRef((e,t)=>f.jsx(Kv.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Kv.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(pB,{...e,ref:t})})}));cC.displayName=Lf;var pB=M.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:r=!1,dir:o,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:h,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...v}=e,S=M.useRef(null),b=Ti(t,S),_=sC(o),[A,j]=oB({prop:c,defaultProp:u??null,onChange:h,caller:Lf}),[E,L]=M.useState(!1),D=Us(d),z=oC(n),$=M.useRef(!1),[ut,nt]=M.useState(0);return M.useEffect(()=>{const H=S.current;if(H)return H.addEventListener(x1,D),()=>H.removeEventListener(x1,D)},[D]),f.jsx(fB,{scope:n,orientation:i,dir:_,loop:r,currentTabStopId:A,onItemFocus:M.useCallback(H=>j(H),[j]),onItemShiftTab:M.useCallback(()=>L(!0),[]),onFocusableItemAdd:M.useCallback(()=>nt(H=>H+1),[]),onFocusableItemRemove:M.useCallback(()=>nt(H=>H-1),[]),children:f.jsx(qs.div,{tabIndex:E||ut===0?-1:0,"data-orientation":i,...v,ref:b,style:{outline:"none",...e.style},onMouseDown:Th(e.onMouseDown,()=>{$.current=!0}),onFocus:Th(e.onFocus,H=>{const Q=!$.current;if(H.target===H.currentTarget&&Q&&!E){const ct=new CustomEvent(x1,uB);if(H.currentTarget.dispatchEvent(ct),!ct.defaultPrevented){const F=z().filter(J=>J.focusable),Y=F.find(J=>J.active),ot=F.find(J=>J.id===A),yt=[Y,ot,...F].filter(Boolean).map(J=>J.ref.current);dC(yt,p)}}$.current=!1}),onBlur:Th(e.onBlur,()=>L(!1))})})}),uC="RovingFocusGroupItem",hC=M.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:r=!1,tabStopId:o,children:c,...u}=e,h=Nv(),d=o||h,p=mB(uC,n),v=p.currentTabStopId===d,S=oC(n),{onFocusableItemAdd:b,onFocusableItemRemove:_,currentTabStopId:A}=p;return M.useEffect(()=>{if(i)return b(),()=>_()},[i,b,_]),f.jsx(Kv.ItemSlot,{scope:n,id:d,focusable:i,active:r,children:f.jsx(qs.span,{tabIndex:v?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:Th(e.onMouseDown,j=>{i?p.onItemFocus(d):j.preventDefault()}),onFocus:Th(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:Th(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){p.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const E=yB(j,p.orientation,p.dir);if(E!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let D=S().filter(z=>z.focusable).map(z=>z.ref.current);if(E==="last")D.reverse();else if(E==="prev"||E==="next"){E==="prev"&&D.reverse();const z=D.indexOf(j.currentTarget);D=p.loop?bB(D,z+1):D.slice(z+1)}setTimeout(()=>dC(D))}}),children:typeof c=="function"?c({isCurrentTabStop:v,hasTabStop:A!=null}):c})})});hC.displayName=uC;var gB={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vB(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yB(e,t,n){const i=vB(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return gB[i]}function dC(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function bB(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var xB=cC,wB=hC;function SB(e){const t=NB(e),n=M.forwardRef((i,r)=>{const{children:o,...c}=i,u=M.Children.toArray(o),h=u.find(CB);if(h){const d=h.props.children,p=u.map(v=>v===h?M.Children.count(d)>1?M.Children.only(null):M.isValidElement(d)?d.props.children:null:v);return f.jsx(t,{...c,ref:r,children:M.isValidElement(d)?M.cloneElement(d,void 0,p):null})}return f.jsx(t,{...c,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function NB(e){const t=M.forwardRef((n,i)=>{const{children:r,...o}=n;if(M.isValidElement(r)){const c=jB(r),u=_B(o,r.props);return r.type!==M.Fragment&&(u.ref=i?Lc(i,c):c),M.cloneElement(r,u)}return M.Children.count(r)>1?M.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AB=Symbol("radix.slottable");function CB(e){return M.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AB}function _B(e,t){const n={...t};for(const i in t){const r=e[i],o=t[i];/^on[A-Z]/.test(i)?r&&o?n[i]=(...u)=>{const h=o(...u);return r(...u),h}:r&&(n[i]=r):i==="style"?n[i]={...r,...o}:i==="className"&&(n[i]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function jB(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var EB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},lh=new WeakMap,Im=new WeakMap,Um={},w1=0,fC=function(e){return e&&(e.host||fC(e.parentNode))},MB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=fC(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},TB=function(e,t,n,i){var r=MB(t,Array.isArray(e)?e:[e]);Um[n]||(Um[n]=new WeakMap);var o=Um[n],c=[],u=new Set,h=new Set(r),d=function(v){!v||u.has(v)||(u.add(v),d(v.parentNode))};r.forEach(d);var p=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(S){if(u.has(S))p(S);else try{var b=S.getAttribute(i),_=b!==null&&b!=="false",A=(lh.get(S)||0)+1,j=(o.get(S)||0)+1;lh.set(S,A),o.set(S,j),c.push(S),A===1&&_&&Im.set(S,!0),j===1&&S.setAttribute(n,"true"),_||S.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",S,E)}})};return p(t),u.clear(),w1++,function(){c.forEach(function(v){var S=lh.get(v)-1,b=o.get(v)-1;lh.set(v,S),o.set(v,b),S||(Im.has(v)||v.removeAttribute(i),Im.delete(v)),b||v.removeAttribute(n)}),w1--,w1||(lh=new WeakMap,lh=new WeakMap,Im=new WeakMap,Um={})}},kB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=EB(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),TB(i,r,n,"aria-hidden")):function(){return null}},Ho=function(){return Ho=Object.assign||function(t){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ho.apply(this,arguments)};function mC(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function LB(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}var gp="right-scroll-bar-position",vp="width-before-scroll-bar",PB="with-scroll-bars-hidden",RB="--removed-body-scroll-bar-size";function S1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function DB(e,t){var n=M.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=t,n.facade}var OB=typeof window<"u"?M.useLayoutEffect:M.useEffect,u3=new WeakMap;function zB(e,t){var n=DB(null,function(i){return e.forEach(function(r){return S1(r,i)})});return OB(function(){var i=u3.get(n);if(i){var r=new Set(i),o=new Set(e),c=n.current;r.forEach(function(u){o.has(u)||S1(u,null)}),o.forEach(function(u){r.has(u)||S1(u,c)})}u3.set(n,e)},[e]),n}function BB(e){return e}function FB(e,t){t===void 0&&(t=BB);var n=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var c=t(o,i);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(o){for(i=!0;n.length;){var c=n;n=[],c.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){i=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(o),c=n}var h=function(){var p=c;c=[],p.forEach(o)},d=function(){return Promise.resolve().then(h)};d(),n={push:function(p){c.push(p),d()},filter:function(p){return c=c.filter(p),n}}}};return r}function IB(e){e===void 0&&(e={});var t=FB(null);return t.options=Ho({async:!0,ssr:!1},e),t}var pC=function(e){var t=e.sideCar,n=mC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return M.createElement(i,Ho({},n))};pC.isSideCarExport=!0;function UB(e,t){return e.useMedium(t),pC}var gC=IB(),N1=function(){},f0=M.forwardRef(function(e,t){var n=M.useRef(null),i=M.useState({onScrollCapture:N1,onWheelCapture:N1,onTouchMoveCapture:N1}),r=i[0],o=i[1],c=e.forwardProps,u=e.children,h=e.className,d=e.removeScrollBar,p=e.enabled,v=e.shards,S=e.sideCar,b=e.noIsolation,_=e.inert,A=e.allowPinchZoom,j=e.as,E=j===void 0?"div":j,L=e.gapMode,D=mC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=S,$=zB([n,t]),ut=Ho(Ho({},D),r);return M.createElement(M.Fragment,null,p&&M.createElement(z,{sideCar:gC,removeScrollBar:d,shards:v,noIsolation:b,inert:_,setCallbacks:o,allowPinchZoom:!!A,lockRef:n,gapMode:L}),c?M.cloneElement(M.Children.only(u),Ho(Ho({},ut),{ref:$})):M.createElement(E,Ho({},ut,{className:h,ref:$}),u))});f0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};f0.classNames={fullWidth:vp,zeroRight:gp};var qB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function VB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qB();return t&&e.setAttribute("nonce",t),e}function HB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $B(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=VB())&&(HB(t,n),$B(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},YB=function(){var e=GB();return function(t,n){M.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vC=function(){var e=YB(),t=function(n){var i=n.styles,r=n.dynamic;return e(i,r),null};return t},WB={left:0,top:0,right:0,gap:0},A1=function(e){return parseInt(e||"",10)||0},KB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[A1(n),A1(i),A1(r)]},XB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return WB;var t=KB(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},QB=vC(),kh="data-scroll-locked",ZB=function(e,t,n,i){var r=e.left,o=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(PB,` {
   overflow: hidden `).concat(i,`;
   padding-right: `).concat(u,"px ").concat(i,`;
  }
  body[`).concat(kh,`] {
    overflow: hidden `).concat(i,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
    padding-left: `.concat(r,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(c,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(u,"px ").concat(i,`;
    `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(i,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(gp,` {
    right: `).concat(u,"px ").concat(i,`;
  }
  
  .`).concat(vp,` {
    margin-right: `).concat(u,"px ").concat(i,`;
  }
  
  .`).concat(gp," .").concat(gp,` {
    right: 0 `).concat(i,`;
  }
  
  .`).concat(vp," .").concat(vp,` {
    margin-right: 0 `).concat(i,`;
  }
  
  body[`).concat(kh,`] {
    `).concat(RB,": ").concat(u,`px;
  }
`)},h3=function(){var e=parseInt(document.body.getAttribute(kh)||"0",10);return isFinite(e)?e:0},JB=function(){M.useEffect(function(){return document.body.setAttribute(kh,(h3()+1).toString()),function(){var e=h3()-1;e<=0?document.body.removeAttribute(kh):document.body.setAttribute(kh,e.toString())}},[])},t9=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,r=i===void 0?"margin":i;JB();var o=M.useMemo(function(){return XB(r)},[r]);return M.createElement(QB,{styles:ZB(o,!t,r,n?"":"!important")})},Xv=!1;if(typeof window<"u")try{var qm=Object.defineProperty({},"passive",{get:function(){return Xv=!0,!0}});window.addEventListener("test",qm,qm),window.removeEventListener("test",qm,qm)}catch{Xv=!1}var ch=Xv?{passive:!1}:!1,e9=function(e){return e.tagName==="TEXTAREA"},yC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!e9(e)&&n[t]==="visible")},n9=function(e){return yC(e,"overflowY")},i9=function(e){return yC(e,"overflowX")},d3=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=bC(e,i);if(r){var o=xC(e,i),c=o[1],u=o[2];if(c>u)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},s9=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},r9=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},bC=function(e,t){return e==="v"?n9(t):i9(t)},xC=function(e,t){return e==="v"?s9(t):r9(t)},a9=function(e,t){return e==="h"&&t==="rtl"?-1:1},o9=function(e,t,n,i,r){var o=a9(e,window.getComputedStyle(t).direction),c=o*i,u=n.target,h=t.contains(u),d=!1,p=c>0,v=0,S=0;do{var b=xC(e,u),_=b[0],A=b[1],j=b[2],E=A-j-o*_;(_||E)&&bC(e,u)&&(v+=E,S+=_),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!h&&u!==document.body||h&&(t.contains(u)||t===u));return(p&&Math.abs(v)<1||!p&&Math.abs(S)<1)&&(d=!0),d},Vm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},f3=function(e){return[e.deltaX,e.deltaY]},m3=function(e){return e&&"current"in e?e.current:e},l9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},c9=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},u9=0,uh=[];function h9(e){var t=M.useRef([]),n=M.useRef([0,0]),i=M.useRef(),r=M.useState(u9++)[0],o=M.useState(vC)[0],c=M.useRef(e);M.useEffect(function(){c.current=e},[e]),M.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var A=LB([e.lockRef.current],(e.shards||[]).map(m3),!0).filter(Boolean);return A.forEach(function(j){return j.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),A.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var u=M.useCallback(function(A,j){if("touches"in A&&A.touches.length===2||A.type==="wheel"&&A.ctrlKey)return!c.current.allowPinchZoom;var E=Vm(A),L=n.current,D="deltaX"in A?A.deltaX:L[0]-E[0],z="deltaY"in A?A.deltaY:L[1]-E[1],$,ut=A.target,nt=Math.abs(D)>Math.abs(z)?"h":"v";if("touches"in A&&nt==="h"&&ut.type==="range")return!1;var H=d3(nt,ut);if(!H)return!0;if(H?$=nt:($=nt==="v"?"h":"v",H=d3(nt,ut)),!H)return!1;if(!i.current&&"changedTouches"in A&&(D||z)&&(i.current=$),!$)return!0;var Q=i.current||$;return o9(Q,j,A,Q==="h"?D:z)},[]),h=M.useCallback(function(A){var j=A;if(!(!uh.length||uh[uh.length-1]!==o)){var E="deltaY"in j?f3(j):Vm(j),L=t.current.filter(function($){return $.name===j.type&&($.target===j.target||j.target===$.shadowParent)&&l9($.delta,E)})[0];if(L&&L.should){j.cancelable&&j.preventDefault();return}if(!L){var D=(c.current.shards||[]).map(m3).filter(Boolean).filter(function($){return $.contains(j.target)}),z=D.length>0?u(j,D[0]):!c.current.noIsolation;z&&j.cancelable&&j.preventDefault()}}},[]),d=M.useCallback(function(A,j,E,L){var D={name:A,delta:j,target:E,should:L,shadowParent:d9(E)};t.current.push(D),setTimeout(function(){t.current=t.current.filter(function(z){return z!==D})},1)},[]),p=M.useCallback(function(A){n.current=Vm(A),i.current=void 0},[]),v=M.useCallback(function(A){d(A.type,f3(A),A.target,u(A,e.lockRef.current))},[]),S=M.useCallback(function(A){d(A.type,Vm(A),A.target,u(A,e.lockRef.current))},[]);M.useEffect(function(){return uh.push(o),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:S}),document.addEventListener("wheel",h,ch),document.addEventListener("touchmove",h,ch),document.addEventListener("touchstart",p,ch),function(){uh=uh.filter(function(A){return A!==o}),document.removeEventListener("wheel",h,ch),document.removeEventListener("touchmove",h,ch),document.removeEventListener("touchstart",p,ch)}},[]);var b=e.removeScrollBar,_=e.inert;return M.createElement(M.Fragment,null,_?M.createElement(o,{styles:c9(r)}):null,b?M.createElement(t9,{gapMode:e.gapMode}):null)}function d9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const f9=UB(gC,h9);var wC=M.forwardRef(function(e,t){return M.createElement(f0,Ho({},e,{ref:t,sideCar:f9}))});wC.classNames=f0.classNames;var Qv=["Enter"," "],m9=["ArrowDown","PageUp","Home"],SC=["ArrowUp","PageDown","End"],p9=[...m9,...SC],g9={ltr:[...Qv,"ArrowRight"],rtl:[...Qv,"ArrowLeft"]},v9={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pf="Menu",[bf,y9,b9]=iC(Pf),[Su,NC]=Pc(Pf,[b9,o0,lC]),m0=o0(),AC=lC(),[x9,Nu]=Su(Pf),[w9,Rf]=Su(Pf),CC=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:r,onOpenChange:o,modal:c=!0}=e,u=m0(t),[h,d]=M.useState(null),p=M.useRef(!1),v=Us(o),S=sC(r);return M.useEffect(()=>{const b=()=>{p.current=!0,document.addEventListener("pointerdown",_,{capture:!0,once:!0}),document.addEventListener("pointermove",_,{capture:!0,once:!0})},_=()=>p.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",_,{capture:!0}),document.removeEventListener("pointermove",_,{capture:!0})}},[]),f.jsx(S7,{...u,children:f.jsx(x9,{scope:t,open:n,onOpenChange:v,content:h,onContentChange:d,children:f.jsx(w9,{scope:t,onClose:M.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:p,dir:S,modal:c,children:i})})})};CC.displayName=Pf;var S9="MenuAnchor",vy=M.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=m0(n);return f.jsx(hA,{...r,...i,ref:t})});vy.displayName=S9;var yy="MenuPortal",[N9,_C]=Su(yy,{forceMount:void 0}),jC=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:r}=e,o=Nu(yy,t);return f.jsx(N9,{scope:t,forceMount:n,children:f.jsx(wu,{present:n||o.open,children:f.jsx(O2,{asChild:!0,container:r,children:i})})})};jC.displayName=yy;var Fa="MenuContent",[A9,by]=Su(Fa),EC=M.forwardRef((e,t)=>{const n=_C(Fa,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,o=Nu(Fa,e.__scopeMenu),c=Rf(Fa,e.__scopeMenu);return f.jsx(bf.Provider,{scope:e.__scopeMenu,children:f.jsx(wu,{present:i||o.open,children:f.jsx(bf.Slot,{scope:e.__scopeMenu,children:c.modal?f.jsx(C9,{...r,ref:t}):f.jsx(_9,{...r,ref:t})})})})}),C9=M.forwardRef((e,t)=>{const n=Nu(Fa,e.__scopeMenu),i=M.useRef(null),r=Ti(t,i);return M.useEffect(()=>{const o=i.current;if(o)return kB(o)},[]),f.jsx(xy,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Qi(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),_9=M.forwardRef((e,t)=>{const n=Nu(Fa,e.__scopeMenu);return f.jsx(xy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),j9=SB("MenuContent.ScrollLock"),xy=M.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:h,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:v,onInteractOutside:S,onDismiss:b,disableOutsideScroll:_,...A}=e,j=Nu(Fa,n),E=Rf(Fa,n),L=m0(n),D=AC(n),z=y9(n),[$,ut]=M.useState(null),nt=M.useRef(null),H=Ti(t,nt,j.onContentChange),Q=M.useRef(0),ct=M.useRef(""),F=M.useRef(0),Y=M.useRef(null),ot=M.useRef("right"),tt=M.useRef(0),yt=_?wC:M.Fragment,J=_?{as:j9,allowPinchZoom:!0}:void 0,at=dt=>{const Tt=ct.current+dt,X=z().filter(ft=>!ft.disabled),P=document.activeElement,q=X.find(ft=>ft.ref.current===P)?.textValue,W=X.map(ft=>ft.textValue),lt=F9(W,Tt,q),ht=X.find(ft=>ft.textValue===lt)?.ref.current;(function ft(Ct){ct.current=Ct,window.clearTimeout(Q.current),Ct!==""&&(Q.current=window.setTimeout(()=>ft(""),1e3))})(Tt),ht&&setTimeout(()=>ht.focus())};M.useEffect(()=>()=>window.clearTimeout(Q.current),[]),Zz();const K=M.useCallback(dt=>ot.current===Y.current?.side&&U9(dt,Y.current?.area),[]);return f.jsx(A9,{scope:n,searchRef:ct,onItemEnter:M.useCallback(dt=>{K(dt)&&dt.preventDefault()},[K]),onItemLeave:M.useCallback(dt=>{K(dt)||(nt.current?.focus(),ut(null))},[K]),onTriggerLeave:M.useCallback(dt=>{K(dt)&&dt.preventDefault()},[K]),pointerGraceTimerRef:F,onPointerGraceIntentChange:M.useCallback(dt=>{Y.current=dt},[]),children:f.jsx(yt,{...J,children:f.jsx(rC,{asChild:!0,trapped:r,onMountAutoFocus:Qi(o,dt=>{dt.preventDefault(),nt.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:f.jsx(j2,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:v,onInteractOutside:S,onDismiss:b,children:f.jsx(xB,{asChild:!0,...D,dir:E.dir,orientation:"vertical",loop:i,currentTabStopId:$,onCurrentTabStopIdChange:ut,onEntryFocus:Qi(h,dt=>{E.isUsingKeyboardRef.current||dt.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(dA,{role:"menu","aria-orientation":"vertical","data-state":HC(j.open),"data-radix-menu-content":"",dir:E.dir,...L,...A,ref:H,style:{outline:"none",...A.style},onKeyDown:Qi(A.onKeyDown,dt=>{const X=dt.target.closest("[data-radix-menu-content]")===dt.currentTarget,P=dt.ctrlKey||dt.altKey||dt.metaKey,q=dt.key.length===1;X&&(dt.key==="Tab"&&dt.preventDefault(),!P&&q&&at(dt.key));const W=nt.current;if(dt.target!==W||!p9.includes(dt.key))return;dt.preventDefault();const ht=z().filter(ft=>!ft.disabled).map(ft=>ft.ref.current);SC.includes(dt.key)&&ht.reverse(),z9(ht)}),onBlur:Qi(e.onBlur,dt=>{dt.currentTarget.contains(dt.target)||(window.clearTimeout(Q.current),ct.current="")}),onPointerMove:Qi(e.onPointerMove,xf(dt=>{const Tt=dt.target,X=tt.current!==dt.clientX;if(dt.currentTarget.contains(Tt)&&X){const P=dt.clientX>tt.current?"right":"left";ot.current=P,tt.current=dt.clientX}}))})})})})})})});EC.displayName=Fa;var E9="MenuGroup",wy=M.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return f.jsx(qs.div,{role:"group",...i,ref:t})});wy.displayName=E9;var M9="MenuLabel",MC=M.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return f.jsx(qs.div,{...i,ref:t})});MC.displayName=M9;var Bp="MenuItem",p3="menu.itemSelect",p0=M.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...r}=e,o=M.useRef(null),c=Rf(Bp,e.__scopeMenu),u=by(Bp,e.__scopeMenu),h=Ti(t,o),d=M.useRef(!1),p=()=>{const v=o.current;if(!n&&v){const S=new CustomEvent(p3,{bubbles:!0,cancelable:!0});v.addEventListener(p3,b=>i?.(b),{once:!0}),UN(v,S),S.defaultPrevented?d.current=!1:c.onClose()}};return f.jsx(TC,{...r,ref:h,disabled:n,onClick:Qi(e.onClick,p),onPointerDown:v=>{e.onPointerDown?.(v),d.current=!0},onPointerUp:Qi(e.onPointerUp,v=>{d.current||v.currentTarget?.click()}),onKeyDown:Qi(e.onKeyDown,v=>{const S=u.searchRef.current!=="";n||S&&v.key===" "||Qv.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})});p0.displayName=Bp;var TC=M.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:r,...o}=e,c=by(Bp,n),u=AC(n),h=M.useRef(null),d=Ti(t,h),[p,v]=M.useState(!1),[S,b]=M.useState("");return M.useEffect(()=>{const _=h.current;_&&b((_.textContent??"").trim())},[o.children]),f.jsx(bf.ItemSlot,{scope:n,disabled:i,textValue:r??S,children:f.jsx(wB,{asChild:!0,...u,focusable:!i,children:f.jsx(qs.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...o,ref:d,onPointerMove:Qi(e.onPointerMove,xf(_=>{i?c.onItemLeave(_):(c.onItemEnter(_),_.defaultPrevented||_.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Qi(e.onPointerLeave,xf(_=>c.onItemLeave(_))),onFocus:Qi(e.onFocus,()=>v(!0)),onBlur:Qi(e.onBlur,()=>v(!1))})})})}),T9="MenuCheckboxItem",kC=M.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...r}=e;return f.jsx(OC,{scope:e.__scopeMenu,checked:n,children:f.jsx(p0,{role:"menuitemcheckbox","aria-checked":Fp(n)?"mixed":n,...r,ref:t,"data-state":Ny(n),onSelect:Qi(r.onSelect,()=>i?.(Fp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});kC.displayName=T9;var LC="MenuRadioGroup",[k9,L9]=Su(LC,{value:void 0,onValueChange:()=>{}}),PC=M.forwardRef((e,t)=>{const{value:n,onValueChange:i,...r}=e,o=Us(i);return f.jsx(k9,{scope:e.__scopeMenu,value:n,onValueChange:o,children:f.jsx(wy,{...r,ref:t})})});PC.displayName=LC;var RC="MenuRadioItem",DC=M.forwardRef((e,t)=>{const{value:n,...i}=e,r=L9(RC,e.__scopeMenu),o=n===r.value;return f.jsx(OC,{scope:e.__scopeMenu,checked:o,children:f.jsx(p0,{role:"menuitemradio","aria-checked":o,...i,ref:t,"data-state":Ny(o),onSelect:Qi(i.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});DC.displayName=RC;var Sy="MenuItemIndicator",[OC,P9]=Su(Sy,{checked:!1}),zC=M.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...r}=e,o=P9(Sy,n);return f.jsx(wu,{present:i||Fp(o.checked)||o.checked===!0,children:f.jsx(qs.span,{...r,ref:t,"data-state":Ny(o.checked)})})});zC.displayName=Sy;var R9="MenuSeparator",BC=M.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return f.jsx(qs.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});BC.displayName=R9;var D9="MenuArrow",FC=M.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,r=m0(n);return f.jsx(fA,{...r,...i,ref:t})});FC.displayName=D9;var O9="MenuSub",[YH,IC]=Su(O9),Gd="MenuSubTrigger",UC=M.forwardRef((e,t)=>{const n=Nu(Gd,e.__scopeMenu),i=Rf(Gd,e.__scopeMenu),r=IC(Gd,e.__scopeMenu),o=by(Gd,e.__scopeMenu),c=M.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:h}=o,d={__scopeMenu:e.__scopeMenu},p=M.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return M.useEffect(()=>p,[p]),M.useEffect(()=>{const v=u.current;return()=>{window.clearTimeout(v),h(null)}},[u,h]),f.jsx(vy,{asChild:!0,...d,children:f.jsx(TC,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":HC(n.open),...e,ref:Lc(t,r.onTriggerChange),onClick:v=>{e.onClick?.(v),!(e.disabled||v.defaultPrevented)&&(v.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Qi(e.onPointerMove,xf(v=>{o.onItemEnter(v),!v.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Qi(e.onPointerLeave,xf(v=>{p();const S=n.content?.getBoundingClientRect();if(S){const b=n.content?.dataset.side,_=b==="right",A=_?-5:5,j=S[_?"left":"right"],E=S[_?"right":"left"];o.onPointerGraceIntentChange({area:[{x:v.clientX+A,y:v.clientY},{x:j,y:S.top},{x:E,y:S.top},{x:E,y:S.bottom},{x:j,y:S.bottom}],side:b}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(v),v.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Qi(e.onKeyDown,v=>{const S=o.searchRef.current!=="";e.disabled||S&&v.key===" "||g9[i.dir].includes(v.key)&&(n.onOpenChange(!0),n.content?.focus(),v.preventDefault())})})})});UC.displayName=Gd;var qC="MenuSubContent",VC=M.forwardRef((e,t)=>{const n=_C(Fa,e.__scopeMenu),{forceMount:i=n.forceMount,...r}=e,o=Nu(Fa,e.__scopeMenu),c=Rf(Fa,e.__scopeMenu),u=IC(qC,e.__scopeMenu),h=M.useRef(null),d=Ti(t,h);return f.jsx(bf.Provider,{scope:e.__scopeMenu,children:f.jsx(wu,{present:i||o.open,children:f.jsx(bf.Slot,{scope:e.__scopeMenu,children:f.jsx(xy,{id:u.contentId,"aria-labelledby":u.triggerId,...r,ref:d,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{c.isUsingKeyboardRef.current&&h.current?.focus(),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Qi(e.onFocusOutside,p=>{p.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Qi(e.onEscapeKeyDown,p=>{c.onClose(),p.preventDefault()}),onKeyDown:Qi(e.onKeyDown,p=>{const v=p.currentTarget.contains(p.target),S=v9[c.dir].includes(p.key);v&&S&&(o.onOpenChange(!1),u.trigger?.focus(),p.preventDefault())})})})})})});VC.displayName=qC;function HC(e){return e?"open":"closed"}function Fp(e){return e==="indeterminate"}function Ny(e){return Fp(e)?"indeterminate":e?"checked":"unchecked"}function z9(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function B9(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function F9(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let c=B9(e,Math.max(o,0));r.length===1&&(c=c.filter(d=>d!==n));const h=c.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return h!==n?h:void 0}function I9(e,t){const{x:n,y:i}=e;let r=!1;for(let o=0,c=t.length-1;o<t.length;c=o++){const u=t[o],h=t[c],d=u.x,p=u.y,v=h.x,S=h.y;p>i!=S>i&&n<(v-d)*(i-p)/(S-p)+d&&(r=!r)}return r}function U9(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return I9(n,t)}function xf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var q9=CC,V9=vy,H9=jC,$9=EC,G9=wy,Y9=MC,W9=p0,K9=kC,X9=PC,Q9=DC,Z9=zC,J9=BC,tF=FC,eF=UC,nF=VC,g0="DropdownMenu",[iF]=Pc(g0,[NC]),yr=NC(),[sF,$C]=iF(g0),GC=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:r,defaultOpen:o,onOpenChange:c,modal:u=!0}=e,h=yr(t),d=M.useRef(null),[p,v]=Vz({prop:r,defaultProp:o??!1,onChange:c,caller:g0});return f.jsx(sF,{scope:t,triggerId:Nv(),triggerRef:d,contentId:Nv(),open:p,onOpenChange:v,onOpenToggle:M.useCallback(()=>v(S=>!S),[v]),modal:u,children:f.jsx(q9,{...h,open:p,onOpenChange:v,dir:i,modal:u,children:n})})};GC.displayName=g0;var YC="DropdownMenuTrigger",WC=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...r}=e,o=$C(YC,n),c=yr(n);return f.jsx(V9,{asChild:!0,...c,children:f.jsx(qs.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...r,ref:Lc(t,o.triggerRef),onPointerDown:zp(e.onPointerDown,u=>{!i&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:zp(e.onKeyDown,u=>{i||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});WC.displayName=YC;var rF="DropdownMenuPortal",KC=e=>{const{__scopeDropdownMenu:t,...n}=e,i=yr(t);return f.jsx(H9,{...i,...n})};KC.displayName=rF;var XC="DropdownMenuContent",QC=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=$C(XC,n),o=yr(n),c=M.useRef(!1);return f.jsx($9,{id:r.contentId,"aria-labelledby":r.triggerId,...o,...i,ref:t,onCloseAutoFocus:zp(e.onCloseAutoFocus,u=>{c.current||r.triggerRef.current?.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:zp(e.onInteractOutside,u=>{const h=u.detail.originalEvent,d=h.button===0&&h.ctrlKey===!0,p=h.button===2||d;(!r.modal||p)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});QC.displayName=XC;var aF="DropdownMenuGroup",oF=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(G9,{...r,...i,ref:t})});oF.displayName=aF;var lF="DropdownMenuLabel",ZC=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(Y9,{...r,...i,ref:t})});ZC.displayName=lF;var cF="DropdownMenuItem",JC=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(W9,{...r,...i,ref:t})});JC.displayName=cF;var uF="DropdownMenuCheckboxItem",t_=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(K9,{...r,...i,ref:t})});t_.displayName=uF;var hF="DropdownMenuRadioGroup",dF=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(X9,{...r,...i,ref:t})});dF.displayName=hF;var fF="DropdownMenuRadioItem",e_=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(Q9,{...r,...i,ref:t})});e_.displayName=fF;var mF="DropdownMenuItemIndicator",n_=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(Z9,{...r,...i,ref:t})});n_.displayName=mF;var pF="DropdownMenuSeparator",i_=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(J9,{...r,...i,ref:t})});i_.displayName=pF;var gF="DropdownMenuArrow",vF=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(tF,{...r,...i,ref:t})});vF.displayName=gF;var yF="DropdownMenuSubTrigger",s_=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(eF,{...r,...i,ref:t})});s_.displayName=yF;var bF="DropdownMenuSubContent",r_=M.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,r=yr(n);return f.jsx(nF,{...r,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});r_.displayName=bF;var xF=GC,wF=WC,SF=KC,a_=QC,o_=ZC,l_=JC,c_=t_,u_=e_,h_=n_,d_=i_,f_=s_,m_=r_;const NF=xF,AF=wF,CF=M.forwardRef(({className:e,inset:t,children:n,...i},r)=>f.jsxs(f_,{ref:r,className:ci("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[n,f.jsx(Vo,{className:"ml-auto"})]}));CF.displayName=f_.displayName;const _F=M.forwardRef(({className:e,...t},n)=>f.jsx(m_,{ref:n,className:ci("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));_F.displayName=m_.displayName;const p_=M.forwardRef(({className:e,sideOffset:t=4,...n},i)=>f.jsx(SF,{children:f.jsx(a_,{ref:i,sideOffset:t,className:ci("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));p_.displayName=a_.displayName;const g_=M.forwardRef(({className:e,inset:t,...n},i)=>f.jsx(l_,{ref:i,className:ci("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));g_.displayName=l_.displayName;const jF=M.forwardRef(({className:e,children:t,checked:n,...i},r)=>f.jsxs(c_,{ref:r,className:ci("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...i,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(h_,{children:f.jsx(wN,{className:"h-4 w-4"})})}),t]}));jF.displayName=c_.displayName;const EF=M.forwardRef(({className:e,children:t,...n},i)=>f.jsxs(u_,{ref:i,className:ci("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(h_,{children:f.jsx(r8,{className:"h-2 w-2 fill-current"})})}),t]}));EF.displayName=u_.displayName;const MF=M.forwardRef(({className:e,inset:t,...n},i)=>f.jsx(o_,{ref:i,className:ci("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));MF.displayName=o_.displayName;const TF=M.forwardRef(({className:e,...t},n)=>f.jsx(d_,{ref:n,className:ci("-mx-1 my-1 h-px bg-muted",e),...t}));TF.displayName=d_.displayName;const g3=[{code:"en",label:"English",flag:"🇺🇸"},{code:"zh",label:"中文",flag:"🇨🇳"},{code:"ar",label:"العربية",flag:"🇸🇦"}];function Ay({className:e}){const{language:t,setLanguage:n}=c0(),i=g3.find(r=>r.code===t);return f.jsxs(NF,{children:[f.jsx(AF,{asChild:!0,children:f.jsxs(We,{variant:"ghost",size:"sm",className:`gap-2 relative ${e}`,"data-testid":"button-language-switcher",children:[f.jsx("span",{className:"absolute inset-0 rounded-md bg-primary/20 animate-pulse"}),f.jsx(Sc,{className:"w-4 h-4 relative z-10"}),f.jsx("span",{className:"hidden sm:inline relative z-10",children:i?.label})]})}),f.jsx(p_,{align:"end",children:g3.map(r=>f.jsxs(g_,{onClick:()=>n(r.code),className:`gap-2 cursor-pointer ${t===r.code?"bg-primary/10":""}`,"data-testid":`lang-${r.code}`,children:[f.jsx("span",{children:r.flag}),f.jsx("span",{children:r.label})]},r.code))})]})}const Ip="/assets/image_1768380685328-CnPTMe63.png",v3="0x277204675524B49D417bD0B374A1FB09465F7777";function kF(){const[,e]=mM(),[t,n]=M.useState(""),[i,r]=M.useState(!1),[o,c]=M.useState(!1),u=M.useRef(null),{t:h,dir:d}=c0();M.useEffect(()=>{const A=u.current;if(!A)return;const j=A.getContext("2d");if(!j)return;const E=()=>{A.width=window.innerWidth,A.height=window.innerHeight};E(),window.addEventListener("resize",E);const L=[],D=80;for(let $=0;$<D;$++)L.push({x:Math.random()*A.width,y:Math.random()*A.height,size:Math.random()*2+.5,speedX:(Math.random()-.5)*.3,speedY:(Math.random()-.5)*.3,opacity:Math.random()*.5+.2});const z=()=>{j.clearRect(0,0,A.width,A.height),L.forEach($=>{$.x+=$.speedX,$.y+=$.speedY,$.x<0&&($.x=A.width),$.x>A.width&&($.x=0),$.y<0&&($.y=A.height),$.y>A.height&&($.y=0),j.beginPath(),j.arc($.x,$.y,$.size,0,Math.PI*2),j.fillStyle=`rgba(255, 255, 255, ${$.opacity})`,j.fill()}),L.forEach(($,ut)=>{L.slice(ut+1).forEach(nt=>{const H=$.x-nt.x,Q=$.y-nt.y,ct=Math.sqrt(H*H+Q*Q);ct<120&&(j.beginPath(),j.moveTo($.x,$.y),j.lineTo(nt.x,nt.y),j.strokeStyle=`rgba(48, 208, 242, ${.1*(1-ct/120)})`,j.lineWidth=.5,j.stroke())})}),requestAnimationFrame(z)};return z(),()=>{window.removeEventListener("resize",E)}},[]);const p=A=>{const j=document.getElementById(A);j&&j.scrollIntoView({behavior:"smooth"}),c(!1)},v=[{label:h("nav.home"),id:"hero"},{label:h("nav.tools"),id:"tools"},{label:h("nav.tokenomics"),id:"tokenomics"},{label:h("nav.roadmap"),id:"roadmap"},{label:h("nav.community"),id:"community"}],S=()=>{navigator.clipboard.writeText(v3),r(!0),setTimeout(()=>r(!1),2e3)},b=()=>{t.trim()&&e(`/dashboard?token=${encodeURIComponent(t.trim())}`)},_=[{icon:f.jsx(Hd,{className:"w-6 h-6"}),title:h("tools.tokenAnalyzer"),description:h("tools.tokenAnalyzerDesc")},{icon:f.jsx(lu,{className:"w-6 h-6"}),title:h("tools.tokenGenerator"),description:h("tools.tokenGeneratorDesc")},{icon:f.jsx(Sc,{className:"w-6 h-6"}),title:h("tools.websiteBuilder"),description:h("tools.websiteBuilderDesc")},{icon:f.jsx(Vd,{className:"w-6 h-6"}),title:h("tools.bundleChecker"),description:h("tools.bundleCheckerDesc")},{icon:f.jsx(uf,{className:"w-6 h-6"}),title:h("tools.passwordScore"),description:h("tools.passwordScoreDesc")},{icon:f.jsx(vv,{className:"w-6 h-6"}),title:h("tools.staking"),description:h("tools.stakingDesc")}];return f.jsxs("div",{className:"w-full min-h-screen flex flex-col items-center text-center relative overflow-x-hidden",style:{background:"linear-gradient(180deg, #0a0a0f 0%, #0d1117 30%, #0a0a0f 100%)"},children:[f.jsx("canvas",{ref:u,className:"fixed inset-0 pointer-events-none z-0"}),f.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none z-0",children:[f.jsx("div",{className:"absolute w-[800px] h-[800px] bg-gradient-to-br from-cyan-500/25 via-cyan-400/10 to-transparent rounded-full blur-3xl",style:{top:"-20%",left:"-10%",animation:"aurora1 20s ease-in-out infinite"}}),f.jsx("div",{className:"absolute w-[600px] h-[600px] bg-gradient-to-bl from-purple-600/20 via-purple-500/10 to-transparent rounded-full blur-3xl",style:{top:"10%",right:"-15%",animation:"aurora2 25s ease-in-out infinite"}}),f.jsx("div",{className:"absolute w-[700px] h-[700px] bg-gradient-to-tr from-blue-500/15 via-cyan-500/5 to-transparent rounded-full blur-3xl",style:{bottom:"0%",left:"-20%",animation:"aurora3 22s ease-in-out infinite"}}),f.jsx("div",{className:"absolute w-[500px] h-[500px] bg-gradient-to-tl from-purple-400/15 via-cyan-400/10 to-transparent rounded-full blur-3xl",style:{bottom:"20%",right:"-10%",animation:"aurora4 18s ease-in-out infinite"}})]}),f.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden",children:[f.jsxs("svg",{className:"absolute w-full h-full",viewBox:"0 0 1440 800",preserveAspectRatio:"xMidYMid slice",style:{animation:"waveFloat 15s ease-in-out infinite"},children:[f.jsxs("defs",{children:[f.jsxs("linearGradient",{id:"waveGradient1",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[f.jsx("stop",{offset:"0%",stopColor:"rgba(48, 208, 242, 0)"}),f.jsx("stop",{offset:"30%",stopColor:"rgba(48, 208, 242, 0.15)"}),f.jsx("stop",{offset:"70%",stopColor:"rgba(48, 208, 242, 0.15)"}),f.jsx("stop",{offset:"100%",stopColor:"rgba(48, 208, 242, 0)"})]}),f.jsxs("linearGradient",{id:"waveGradient2",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[f.jsx("stop",{offset:"0%",stopColor:"rgba(93, 92, 222, 0)"}),f.jsx("stop",{offset:"40%",stopColor:"rgba(93, 92, 222, 0.1)"}),f.jsx("stop",{offset:"60%",stopColor:"rgba(93, 92, 222, 0.1)"}),f.jsx("stop",{offset:"100%",stopColor:"rgba(93, 92, 222, 0)"})]})]}),[...Array(30)].map((A,j)=>f.jsx("path",{d:`M-100 ${350+j*2} C200 ${280+j*2+Math.sin(j*.2)*80}, 400 ${420+j*2-Math.cos(j*.3)*60}, 720 ${350+j*2} S1100 ${280+j*2+Math.sin(j*.4)*70}, 1540 ${350+j*2}`,fill:"none",stroke:"url(#waveGradient1)",strokeWidth:"0.8",opacity:.3+j*.02},`wave1-${j}`))]}),f.jsx("svg",{className:"absolute w-full h-full",viewBox:"0 0 1440 800",preserveAspectRatio:"xMidYMid slice",style:{animation:"waveFloat2 18s ease-in-out infinite reverse"},children:[...Array(25)].map((A,j)=>f.jsx("path",{d:`M-50 ${450+j*2.5} C300 ${380+j*2.5-Math.sin(j*.25)*90}, 600 ${520+j*2.5+Math.cos(j*.35)*70}, 900 ${450+j*2.5} S1200 ${380+j*2.5-Math.sin(j*.45)*80}, 1490 ${450+j*2.5}`,fill:"none",stroke:"url(#waveGradient2)",strokeWidth:"0.6",opacity:.25+j*.015},`wave2-${j}`))}),f.jsx("svg",{className:"absolute w-full h-full",viewBox:"0 0 1440 800",preserveAspectRatio:"xMidYMid slice",style:{animation:"waveFloat3 22s ease-in-out infinite"},children:[...Array(15)].map((A,j)=>f.jsx("path",{d:`M-200 ${300+j*3} C150 ${220+j*3+Math.sin(j*.3)*100}, 450 ${380+j*3-Math.cos(j*.4)*80}, 750 ${300+j*3} S1050 ${220+j*3+Math.sin(j*.5)*90}, 1640 ${300+j*3}`,fill:"none",stroke:"rgba(48, 208, 242, 0.08)",strokeWidth:"1",opacity:.4+j*.03},`wave3-${j}`))})]}),f.jsx("style",{children:`
        @keyframes aurora1 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
          25% { transform: translate(10%, 15%) scale(1.1); opacity: 0.8; }
          50% { transform: translate(5%, 25%) scale(1.05); opacity: 0.5; }
          75% { transform: translate(-5%, 10%) scale(0.95); opacity: 0.7; }
        }
        @keyframes aurora2 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
          25% { transform: translate(-15%, 10%) scale(1.05); opacity: 0.7; }
          50% { transform: translate(-20%, -5%) scale(1.1); opacity: 0.6; }
          75% { transform: translate(-5%, -10%) scale(0.95); opacity: 0.8; }
        }
        @keyframes aurora3 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
          25% { transform: translate(20%, -10%) scale(1.1); opacity: 0.7; }
          50% { transform: translate(15%, -20%) scale(1); opacity: 0.6; }
          75% { transform: translate(5%, -5%) scale(1.05); opacity: 0.8; }
        }
        @keyframes aurora4 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
          25% { transform: translate(-10%, -15%) scale(0.95); opacity: 0.8; }
          50% { transform: translate(-5%, 10%) scale(1.1); opacity: 0.5; }
          75% { transform: translate(10%, 5%) scale(1); opacity: 0.7; }
        }
        @keyframes waveFloat {
          0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
          25% { transform: translateX(2%) translateY(-15px) rotate(0.5deg); }
          50% { transform: translateX(0) translateY(5px) rotate(0deg); }
          75% { transform: translateX(-2%) translateY(-10px) rotate(-0.5deg); }
        }
        @keyframes waveFloat2 {
          0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
          25% { transform: translateX(-3%) translateY(10px) rotate(-0.3deg); }
          50% { transform: translateX(1%) translateY(-8px) rotate(0.2deg); }
          75% { transform: translateX(2%) translateY(5px) rotate(0deg); }
        }
        @keyframes waveFloat3 {
          0%, 100% { transform: translateX(0) translateY(0) scale(1); }
          33% { transform: translateX(3%) translateY(-20px) scale(1.02); }
          66% { transform: translateX(-2%) translateY(15px) scale(0.98); }
        }
      `}),f.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-primary/10",children:[f.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-16 flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-2 cursor-pointer",onClick:()=>p("hero"),children:[f.jsx("img",{src:Ip,alt:"Astherafi",className:"w-8 h-8 rounded-lg"}),f.jsx("span",{className:"font-display font-bold text-base text-foreground",children:"Astherafi"})]}),f.jsx("nav",{className:"hidden md:flex items-center gap-8 absolute left-1/2 transform -translate-x-1/2",children:v.map(A=>f.jsx("button",{onClick:()=>p(A.id),className:"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors","data-testid":`nav-${A.id}`,children:A.label},A.id))}),f.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[f.jsx(Ay,{}),f.jsx("a",{href:"https://x.com/astherafihq",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground transition-colors","data-testid":"nav-twitter",children:f.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",className:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})})}),f.jsx("button",{onClick:()=>e("/docs"),className:"text-sm font-medium text-muted-foreground hover:text-foreground transition-colors","data-testid":"nav-docs",children:h("nav.docs")}),f.jsx(We,{onClick:()=>e("/dashboard"),size:"sm",className:"hidden md:flex font-semibold text-white border-0",style:{background:"linear-gradient(135deg, rgb(48, 208, 242), rgb(93, 92, 222))"},"data-testid":"nav-launch-app",children:h("nav.launchApp")}),f.jsx(We,{variant:"ghost",size:"icon",className:"md:hidden",onClick:()=>c(!o),"data-testid":"button-mobile-nav",children:o?f.jsx(CN,{className:"w-5 h-5"}):f.jsx(AN,{className:"w-5 h-5"})})]})]}),o&&f.jsx(Ei.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"md:hidden bg-background border-b border-primary/10 px-4 py-4",children:f.jsxs("nav",{className:"flex flex-col gap-2",children:[v.map(A=>f.jsx("button",{onClick:()=>p(A.id),className:"text-left py-2 px-3 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-muted/50 rounded-lg transition-colors",children:A.label},A.id)),f.jsx("button",{onClick:()=>e("/docs"),className:"text-left py-2 px-3 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-muted/50 rounded-lg transition-colors",children:h("nav.docs")}),f.jsx(We,{onClick:()=>e("/dashboard"),className:"mt-2 font-semibold text-white border-0",style:{background:"linear-gradient(135deg, rgb(48, 208, 242), rgb(93, 92, 222))"},children:h("nav.launchApp")})]})})]}),f.jsx("div",{className:"h-24"}),f.jsxs(Ei.div,{id:"hero",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"relative z-10 max-w-4xl w-full space-y-8 p-6 pt-10",children:[f.jsx("div",{className:"flex justify-center mb-6",children:f.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-primary/10 border border-primary/30 rounded-full",children:[f.jsx(Kd,{className:"w-4 h-4 text-primary"}),f.jsx("span",{className:"text-sm font-medium text-primary",children:h("hero.badgeAlt")})]})}),f.jsx("div",{className:"flex justify-center mb-8",children:f.jsx("img",{src:Ip,alt:"Astherafi",className:"w-24 h-24 rounded-2xl animate-[spin_8s_linear_infinite]"})}),f.jsx("h1",{className:"font-display font-bold text-6xl text-foreground tracking-tighter",children:"Astherafi"}),f.jsx("h2",{className:"font-display font-bold text-4xl bg-clip-text text-transparent",style:{backgroundImage:"linear-gradient(135deg, rgb(44, 206, 240), rgb(48, 208, 242), rgb(93, 92, 222))"},children:h("hero.tagline")}),f.jsx("p",{className:"text-muted-foreground text-xl max-w-2xl mx-auto leading-relaxed",children:h("hero.description")}),f.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[f.jsx(We,{"data-testid":"button-launch-app",onClick:()=>e("/dashboard"),className:"px-10 h-14 font-semibold text-lg text-white border-0 rounded-xl shadow-xl hover:scale-105 transition-transform",style:{background:"linear-gradient(135deg, rgb(48, 208, 242), rgb(93, 92, 222))"},children:h("hero.launchDashboard")}),f.jsx(We,{variant:"outline",className:"px-10 h-14 font-semibold text-lg rounded-xl border-primary/20 hover:bg-primary/5 transition-all",children:h("hero.viewChart")})]}),f.jsxs("div",{className:"flex w-full max-w-2xl mx-auto mt-8 group",children:[f.jsx(ji,{"data-testid":"input-landing-search",placeholder:h("hero.search"),className:"flex-1 h-14 bg-card/50 backdrop-blur-sm rounded-l-2xl rounded-r-none text-foreground placeholder:text-muted-foreground px-8 border-2 border-primary/30 focus:border-primary transition-colors",value:t,onChange:A=>n(A.target.value),onKeyDown:A=>A.key==="Enter"&&b()}),f.jsx(We,{"data-testid":"button-landing-search",className:"h-14 px-10 rounded-l-none rounded-r-2xl font-semibold text-white border-0",style:{background:"linear-gradient(135deg, rgb(48, 208, 242), rgb(93, 92, 222))"},onClick:b,children:h("hero.searchBtn")})]})]}),f.jsx(Ei.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"relative z-10 w-full max-w-2xl mt-16 px-4",children:f.jsxs("div",{className:"flex flex-col items-center gap-3",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Contract Address (CA)"}),f.jsxs("div",{onClick:S,"data-testid":"button-copy-ca",className:"flex items-center gap-3 px-4 py-3 bg-card/80 backdrop-blur-sm border border-primary/20 rounded-xl cursor-pointer hover:border-primary/40 transition-all group max-w-full",children:[f.jsx("span",{className:"font-mono text-xs sm:text-sm text-foreground/80 group-hover:text-foreground transition-colors truncate",children:v3}),f.jsx(We,{size:"icon",variant:"ghost",className:"h-8 w-8 flex-shrink-0 text-muted-foreground group-hover:text-primary transition-colors",children:i?f.jsx(wN,{className:"w-4 h-4 text-green-400"}):f.jsx(SN,{className:"w-4 h-4"})})]}),i&&f.jsx(Ei.p,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"text-xs text-green-400",children:"Copied to clipboard!"})]})}),f.jsxs(Ei.div,{id:"tools",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"relative z-10 w-full max-w-6xl mt-16 mb-12 px-6",children:[f.jsx("h3",{className:"font-display font-bold text-3xl text-foreground mb-12",children:h("tools.title")}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:_.map((A,j)=>f.jsxs(Ei.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:.1*j},onClick:()=>e("/dashboard"),className:"p-6 bg-card/60 backdrop-blur-sm border border-primary/10 rounded-xl text-left cursor-pointer hover:border-primary/30 hover:bg-card/80 transition-all group",children:[f.jsx("div",{className:"w-12 h-12 rounded-lg bg-primary/10 text-primary flex items-center justify-center mb-4 group-hover:bg-primary/20 transition-colors",children:A.icon}),f.jsx("h4",{className:"font-display font-semibold text-lg text-foreground mb-2",children:A.title}),f.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:A.description})]},A.title))})]}),f.jsxs(Ei.div,{id:"tokenomics",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:.6,delay:.4},className:"relative z-10 w-full max-w-4xl mt-16 mb-12 px-6",children:[f.jsx("h3",{className:"font-display font-bold text-3xl text-foreground mb-12 text-center",children:h("tokenomics.title")}),f.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6",children:[f.jsxs(Ei.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4,delay:.5},className:"p-6 bg-card/60 backdrop-blur-sm border border-primary/20 rounded-xl text-center",children:[f.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:f.jsx(lu,{className:"w-6 h-6 text-primary"})}),f.jsx("div",{className:"text-2xl md:text-3xl font-bold text-foreground mb-1",children:"1B"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:h("tokenomics.totalSupply")})]}),f.jsxs(Ei.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4,delay:.6},className:"p-6 bg-card/60 backdrop-blur-sm border border-purple-500/20 rounded-xl text-center",children:[f.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-purple-500/10 flex items-center justify-center",children:f.jsx(vv,{className:"w-6 h-6 text-purple-400"})}),f.jsx("div",{className:"text-2xl md:text-3xl font-bold text-foreground mb-1",children:"3%"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:h("tokenomics.tax")})]}),f.jsxs(Ei.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4,delay:.7},className:"p-6 bg-card/60 backdrop-blur-sm border border-yellow-500/20 rounded-xl text-center",children:[f.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-yellow-500/10 flex items-center justify-center",children:f.jsx(N8,{className:"w-6 h-6 text-yellow-400"})}),f.jsx("div",{className:"text-2xl md:text-3xl font-bold text-foreground mb-1",children:"BSC"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:h("tokenomics.chain")})]}),f.jsxs(Ei.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.4,delay:.8},className:"p-6 bg-card/60 backdrop-blur-sm border border-green-500/20 rounded-xl text-center",children:[f.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-green-500/10 flex items-center justify-center",children:f.jsx(_8,{className:"w-6 h-6 text-green-400"})}),f.jsx("div",{className:"text-2xl md:text-3xl font-bold text-foreground mb-1",children:h("tokenomics.locked")}),f.jsx("div",{className:"text-sm text-muted-foreground",children:h("tokenomics.liquidity")})]})]})]}),f.jsxs(Ei.div,{id:"roadmap",initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:.6,delay:.5},className:"relative z-10 w-full max-w-4xl mt-16 mb-20 px-6",children:[f.jsx("h3",{className:"font-display font-bold text-3xl text-foreground mb-12",children:h("roadmap.title")}),f.jsxs("div",{className:"relative",children:[f.jsx("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-1 h-full bg-gradient-to-b from-primary/50 via-secondary/50 to-primary/20 rounded-full hidden md:block"}),f.jsxs(Ei.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.4,delay:.6},className:"relative flex flex-col md:flex-row items-center mb-12",children:[f.jsx("div",{className:"md:w-1/2 md:pr-12 md:text-right mb-4 md:mb-0",children:f.jsxs("div",{className:"p-6 bg-card/60 backdrop-blur-sm border border-primary/20 rounded-xl",children:[f.jsx("span",{className:"text-xs font-semibold text-primary uppercase tracking-wider",children:h("roadmap.phase1")}),f.jsx("h4",{className:"font-display font-bold text-xl text-foreground mt-2 mb-3",children:h("roadmap.foundation")}),f.jsxs("ul",{className:"text-sm text-muted-foreground space-y-2 text-left md:text-right",children:[f.jsx("li",{children:h("roadmap.phase1Item1")}),f.jsx("li",{children:h("roadmap.phase1Item2")}),f.jsx("li",{children:h("roadmap.phase1Item3")}),f.jsx("li",{children:h("roadmap.phase1Item4")})]})]})}),f.jsx("div",{className:"w-4 h-4 bg-primary rounded-full border-4 border-background shadow-lg shadow-primary/30 z-10 hidden md:block"}),f.jsx("div",{className:"md:w-1/2 md:pl-12 hidden md:block"})]}),f.jsxs(Ei.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.4,delay:.7},className:"relative flex flex-col md:flex-row items-center mb-12",children:[f.jsx("div",{className:"md:w-1/2 md:pr-12 hidden md:block"}),f.jsx("div",{className:"w-4 h-4 bg-secondary rounded-full border-4 border-background shadow-lg shadow-secondary/30 z-10 hidden md:block"}),f.jsx("div",{className:"md:w-1/2 md:pl-12 md:text-left mb-4 md:mb-0",children:f.jsxs("div",{className:"p-6 bg-card/60 backdrop-blur-sm border border-secondary/20 rounded-xl",children:[f.jsx("span",{className:"text-xs font-semibold text-secondary uppercase tracking-wider",children:h("roadmap.phase2")}),f.jsx("h4",{className:"font-display font-bold text-xl text-foreground mt-2 mb-3",children:h("roadmap.expansion")}),f.jsxs("ul",{className:"text-sm text-muted-foreground space-y-2 text-left",children:[f.jsx("li",{children:h("roadmap.phase2Item1")}),f.jsx("li",{children:h("roadmap.phase2Item2")}),f.jsx("li",{children:h("roadmap.phase2Item3")}),f.jsx("li",{children:h("roadmap.phase2Item4")})]})]})})]}),f.jsxs(Ei.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.4,delay:.8},className:"relative flex flex-col md:flex-row items-center mb-12",children:[f.jsx("div",{className:"md:w-1/2 md:pr-12 md:text-right mb-4 md:mb-0",children:f.jsxs("div",{className:"p-6 bg-card/60 backdrop-blur-sm border border-primary/20 rounded-xl",children:[f.jsx("span",{className:"text-xs font-semibold text-primary uppercase tracking-wider",children:h("roadmap.phase3")}),f.jsx("h4",{className:"font-display font-bold text-xl text-foreground mt-2 mb-3",children:h("roadmap.growth")}),f.jsxs("ul",{className:"text-sm text-muted-foreground space-y-2 text-left md:text-right",children:[f.jsx("li",{children:h("roadmap.phase3Item1")}),f.jsx("li",{children:h("roadmap.phase3Item2")}),f.jsx("li",{children:h("roadmap.phase3Item3")}),f.jsx("li",{children:h("roadmap.phase3Item4")})]})]})}),f.jsx("div",{className:"w-4 h-4 bg-primary rounded-full border-4 border-background shadow-lg shadow-primary/30 z-10 hidden md:block"}),f.jsx("div",{className:"md:w-1/2 md:pl-12 hidden md:block"})]}),f.jsxs(Ei.div,{initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.4,delay:.9},className:"relative flex flex-col md:flex-row items-center",children:[f.jsx("div",{className:"md:w-1/2 md:pr-12 hidden md:block"}),f.jsx("div",{className:"w-4 h-4 bg-secondary rounded-full border-4 border-background shadow-lg shadow-secondary/30 z-10 hidden md:block"}),f.jsx("div",{className:"md:w-1/2 md:pl-12 md:text-left",children:f.jsxs("div",{className:"p-6 bg-card/60 backdrop-blur-sm border border-secondary/20 rounded-xl",children:[f.jsx("span",{className:"text-xs font-semibold text-secondary uppercase tracking-wider",children:h("roadmap.phase4")}),f.jsx("h4",{className:"font-display font-bold text-xl text-foreground mt-2 mb-3",children:h("roadmap.innovation")}),f.jsxs("ul",{className:"text-sm text-muted-foreground space-y-2 text-left",children:[f.jsx("li",{children:h("roadmap.phase4Item1")}),f.jsx("li",{children:h("roadmap.phase4Item2")}),f.jsx("li",{children:h("roadmap.phase4Item3")}),f.jsx("li",{children:h("roadmap.phase4Item4")})]})]})})]})]})]}),f.jsxs(Ei.div,{id:"community",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6},className:"relative z-10 w-full max-w-2xl mt-16 mb-8 px-6",children:[f.jsx("h3",{className:"font-display font-bold text-2xl text-foreground mb-8",children:h("community.title")}),f.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[f.jsxs("a",{href:"https://x.com/astherafihq",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-6 py-4 bg-card/60 backdrop-blur-sm border border-primary/20 rounded-xl hover:border-primary/40 hover:bg-card/80 transition-all group","data-testid":"link-twitter",children:[f.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",className:"w-5 h-5 text-primary group-hover:scale-110 transition-transform",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"})}),f.jsx("span",{className:"font-medium text-foreground",children:"X"})]}),f.jsxs("a",{href:"https://t.me/AstheraFi_Official",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-6 py-4 bg-card/60 backdrop-blur-sm border border-primary/20 rounded-xl hover:border-primary/40 hover:bg-card/80 transition-all group","data-testid":"link-telegram",children:[f.jsx(I8,{className:"w-6 h-6 text-primary group-hover:scale-110 transition-transform"}),f.jsx("span",{className:"font-medium text-foreground",children:"Telegram"})]}),f.jsxs("a",{href:"https://discord.gg/astherafi",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 px-6 py-4 bg-card/60 backdrop-blur-sm border border-primary/20 rounded-xl hover:border-primary/40 hover:bg-card/80 transition-all group","data-testid":"link-discord",children:[f.jsx(up,{className:"w-6 h-6 text-primary group-hover:scale-110 transition-transform"}),f.jsx("span",{className:"font-medium text-foreground",children:"Discord"})]})]})]}),f.jsx("div",{className:"relative z-10 w-full mt-12 pt-8 border-t border-primary/10 text-center",children:f.jsx("p",{className:"text-sm text-muted-foreground",children:"2025 Astherafi. All rights reserved."})})]})}const Zv="/assets/image_1768373046822-Byvhrdr_.png",Jv=M.forwardRef(({className:e,...t},n)=>f.jsx("textarea",{className:ci("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Jv.displayName="Textarea";const LF="modulepreload",PF=function(e){return"/"+e},y3={},C1=function(t,n,i){let r=Promise.resolve();if(n&&n.length>0){let h=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");r=h(n.map(d=>{if(d=PF(d),d in y3)return;y3[d]=!0;const p=d.endsWith(".css"),v=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${v}`))return;const S=document.createElement("link");if(S.rel=p?"stylesheet":LF,p||(S.as="script"),S.crossOrigin="",S.href=d,u&&S.setAttribute("nonce",u),document.head.appendChild(S),p)return new Promise((b,_)=>{S.addEventListener("load",b),S.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${d}`)))})}))}function o(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return r.then(c=>{for(const u of c||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};function In(e){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(e)}var fo=Uint8Array,ha=Uint16Array,Cy=Int32Array,_y=new fo([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),jy=new fo([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),b3=new fo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),v_=function(e,t){for(var n=new ha(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];for(var r=new Cy(n[30]),i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return{b:n,r}},y_=v_(_y,2),RF=y_.b,t2=y_.r;RF[28]=258,t2[258]=28;var DF=v_(jy,0),x3=DF.r,e2=new ha(32768);for(var li=0;li<32768;++li){var vc=(li&43690)>>1|(li&21845)<<1;vc=(vc&52428)>>2|(vc&13107)<<2,vc=(vc&61680)>>4|(vc&3855)<<4,e2[li]=((vc&65280)>>8|(vc&255)<<8)>>1}var ef=(function(e,t,n){for(var i=e.length,r=0,o=new ha(t);r<i;++r)e[r]&&++o[e[r]-1];var c=new ha(t);for(r=1;r<t;++r)c[r]=c[r-1]+o[r-1]<<1;var u;if(n){u=new ha(1<<t);var h=15-t;for(r=0;r<i;++r)if(e[r])for(var d=r<<4|e[r],p=t-e[r],v=c[e[r]-1]++<<p,S=v|(1<<p)-1;v<=S;++v)u[e2[v]>>h]=d}else for(u=new ha(i),r=0;r<i;++r)e[r]&&(u[r]=e2[c[e[r]-1]++]>>15-e[r]);return u}),gu=new fo(288);for(var li=0;li<144;++li)gu[li]=8;for(var li=144;li<256;++li)gu[li]=9;for(var li=256;li<280;++li)gu[li]=7;for(var li=280;li<288;++li)gu[li]=8;var Up=new fo(32);for(var li=0;li<32;++li)Up[li]=5;var OF=ef(gu,9,0),zF=ef(Up,5,0),b_=function(e){return(e+7)/8|0},BF=function(e,t,n){return(n==null||n>e.length)&&(n=e.length),new fo(e.subarray(t,n))},Tl=function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8},Id=function(e,t,n){n<<=t&7;var i=t/8|0;e[i]|=n,e[i+1]|=n>>8,e[i+2]|=n>>16},_1=function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,o=n.slice();if(!r)return{t:w_,l:0};if(r==1){var c=new fo(n[0].s+1);return c[n[0].s]=1,{t:c,l:1}}n.sort(function($,ut){return $.f-ut.f}),n.push({s:-1,f:25001});var u=n[0],h=n[1],d=0,p=1,v=2;for(n[0]={s:-1,f:u.f+h.f,l:u,r:h};p!=r-1;)u=n[n[d].f<n[v].f?d++:v++],h=n[d!=p&&n[d].f<n[v].f?d++:v++],n[p++]={s:-1,f:u.f+h.f,l:u,r:h};for(var S=o[0].s,i=1;i<r;++i)o[i].s>S&&(S=o[i].s);var b=new ha(S+1),_=n2(n[p-1],b,0);if(_>t){var i=0,A=0,j=_-t,E=1<<j;for(o.sort(function(ut,nt){return b[nt.s]-b[ut.s]||ut.f-nt.f});i<r;++i){var L=o[i].s;if(b[L]>t)A+=E-(1<<_-b[L]),b[L]=t;else break}for(A>>=j;A>0;){var D=o[i].s;b[D]<t?A-=1<<t-b[D]++-1:++i}for(;i>=0&&A;--i){var z=o[i].s;b[z]==t&&(--b[z],++A)}_=t}return{t:new fo(b),l:_}},n2=function(e,t,n){return e.s==-1?Math.max(n2(e.l,t,n+1),n2(e.r,t,n+1)):t[e.s]=n},w3=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new ha(++t),i=0,r=e[0],o=1,c=function(h){n[i++]=h},u=1;u<=t;++u)if(e[u]==r&&u!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)c(32754);o>2&&(c(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(c(r),--o;o>6;o-=6)c(8304);o>2&&(c(o-3<<5|8208),o=0)}for(;o--;)c(r);o=1,r=e[u]}return{c:n.subarray(0,i),n:t}},Ud=function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},x_=function(e,t,n){var i=n.length,r=b_(t+2);e[r]=i&255,e[r+1]=i>>8,e[r+2]=e[r]^255,e[r+3]=e[r+1]^255;for(var o=0;o<i;++o)e[r+o+4]=n[o];return(r+4+i)*8},S3=function(e,t,n,i,r,o,c,u,h,d,p){Tl(t,p++,n),++r[256];for(var v=_1(r,15),S=v.t,b=v.l,_=_1(o,15),A=_.t,j=_.l,E=w3(S),L=E.c,D=E.n,z=w3(A),$=z.c,ut=z.n,nt=new ha(19),H=0;H<L.length;++H)++nt[L[H]&31];for(var H=0;H<$.length;++H)++nt[$[H]&31];for(var Q=_1(nt,7),ct=Q.t,F=Q.l,Y=19;Y>4&&!ct[b3[Y-1]];--Y);var ot=d+5<<3,tt=Ud(r,gu)+Ud(o,Up)+c,yt=Ud(r,S)+Ud(o,A)+c+14+3*Y+Ud(nt,ct)+2*nt[16]+3*nt[17]+7*nt[18];if(h>=0&&ot<=tt&&ot<=yt)return x_(t,p,e.subarray(h,h+d));var J,at,K,dt;if(Tl(t,p,1+(yt<tt)),p+=2,yt<tt){J=ef(S,b,0),at=S,K=ef(A,j,0),dt=A;var Tt=ef(ct,F,0);Tl(t,p,D-257),Tl(t,p+5,ut-1),Tl(t,p+10,Y-4),p+=14;for(var H=0;H<Y;++H)Tl(t,p+3*H,ct[b3[H]]);p+=3*Y;for(var X=[L,$],P=0;P<2;++P)for(var q=X[P],H=0;H<q.length;++H){var W=q[H]&31;Tl(t,p,Tt[W]),p+=ct[W],W>15&&(Tl(t,p,q[H]>>5&127),p+=q[H]>>12)}}else J=OF,at=gu,K=zF,dt=Up;for(var H=0;H<u;++H){var lt=i[H];if(lt>255){var W=lt>>18&31;Id(t,p,J[W+257]),p+=at[W+257],W>7&&(Tl(t,p,lt>>23&31),p+=_y[W]);var ht=lt&31;Id(t,p,K[ht]),p+=dt[ht],ht>3&&(Id(t,p,lt>>5&8191),p+=jy[ht])}else Id(t,p,J[lt]),p+=at[lt]}return Id(t,p,J[256]),p+at[256]},FF=new Cy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),w_=new fo(0),IF=function(e,t,n,i,r,o){var c=o.z||e.length,u=new fo(i+c+5*(1+Math.ceil(c/7e3))+r),h=u.subarray(i,u.length-r),d=o.l,p=(o.r||0)&7;if(t){p&&(h[0]=o.r>>3);for(var v=FF[t-1],S=v>>13,b=v&8191,_=(1<<n)-1,A=o.p||new ha(32768),j=o.h||new ha(_+1),E=Math.ceil(n/3),L=2*E,D=function(se){return(e[se]^e[se+1]<<E^e[se+2]<<L)&_},z=new Cy(25e3),$=new ha(288),ut=new ha(32),nt=0,H=0,Q=o.i||0,ct=0,F=o.w||0,Y=0;Q+2<c;++Q){var ot=D(Q),tt=Q&32767,yt=j[ot];if(A[tt]=yt,j[ot]=tt,F<=Q){var J=c-Q;if((nt>7e3||ct>24576)&&(J>423||!d)){p=S3(e,h,0,z,$,ut,H,ct,Y,Q-Y,p),ct=nt=H=0,Y=Q;for(var at=0;at<286;++at)$[at]=0;for(var at=0;at<30;++at)ut[at]=0}var K=2,dt=0,Tt=b,X=tt-yt&32767;if(J>2&&ot==D(Q-X))for(var P=Math.min(S,J)-1,q=Math.min(32767,Q),W=Math.min(258,J);X<=q&&--Tt&&tt!=yt;){if(e[Q+K]==e[Q+K-X]){for(var lt=0;lt<W&&e[Q+lt]==e[Q+lt-X];++lt);if(lt>K){if(K=lt,dt=X,lt>P)break;for(var ht=Math.min(X,lt-2),ft=0,at=0;at<ht;++at){var Ct=Q-X+at&32767,_t=A[Ct],Dt=Ct-_t&32767;Dt>ft&&(ft=Dt,yt=Ct)}}}tt=yt,yt=A[tt],X+=tt-yt&32767}if(dt){z[ct++]=268435456|t2[K]<<18|x3[dt];var $t=t2[K]&31,Wt=x3[dt]&31;H+=_y[$t]+jy[Wt],++$[257+$t],++ut[Wt],F=Q+K,++nt}else z[ct++]=e[Q],++$[e[Q]]}}for(Q=Math.max(Q,F);Q<c;++Q)z[ct++]=e[Q],++$[e[Q]];p=S3(e,h,d,z,$,ut,H,ct,Y,Q-Y,p),d||(o.r=p&7|h[p/8|0]<<3,p-=7,o.h=j,o.p=A,o.i=Q,o.w=F)}else{for(var Q=o.w||0;Q<c+d;Q+=65535){var Xt=Q+65535;Xt>=c&&(h[p/8|0]=d,Xt=c),p=x_(h,p+1,e.subarray(Q,Xt))}o.i=c}return BF(u,0,i+b_(p)+r)},S_=function(){var e=1,t=0;return{p:function(n){for(var i=e,r=t,o=n.length|0,c=0;c!=o;){for(var u=Math.min(c+2655,o);c<u;++c)r+=i+=n[c];i=(i&65535)+15*(i>>16),r=(r&65535)+15*(r>>16)}e=i,t=r},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},UF=function(e,t,n,i,r){if(!r&&(r={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),c=new fo(o.length+e.length);c.set(o),c.set(e,o.length),e=c,r.w=o.length}return IF(e,t.level==null?6:t.level,t.mem==null?r.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,i,r)},N_=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},qF=function(e,t){var n=t.level,i=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=i<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var r=S_();r.p(t.dictionary),N_(e,2,r.d())}};function i2(e,t){t||(t={});var n=S_();n.p(e);var i=UF(e,t,t.dictionary?6:2,4);return qF(i,t),N_(i,i.length-4,n.d()),i}var VF=typeof TextDecoder<"u"&&new TextDecoder,HF=0;try{VF.decode(w_,{stream:!0}),HF=1}catch{}function $F(e){if(Array.isArray(e))return e}function GF(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,r,o,c,u=[],h=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(h=(i=o.call(n)).done)&&(u.push(i.value),u.length!==t);h=!0);}catch(p){d=!0,r=p}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(d)throw r}}return u}}function N3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function YF(e,t){if(e){if(typeof e=="string")return N3(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N3(e,t):void 0}}function WF(){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 A3(e,t){return $F(e)||GF(e,t)||YF(e,t)||WF()}function C3(e,t="utf8"){return new TextDecoder(t).decode(e)}const KF=new TextEncoder;function XF(e){return KF.encode(e)}const QF=1024*8,ZF=(()=>{const e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),j1={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class Ey{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=QF,n={}){let i=!1;typeof t=="number"?t=new ArrayBuffer(t):(i=!0,this.lastWrittenByte=t.byteLength);const r=n.offset?n.offset>>>0:0,o=t.byteLength-r;let c=r;(ArrayBuffer.isView(t)||t instanceof Ey)&&(t.byteLength!==t.buffer.byteLength&&(c=t.byteOffset+r),t=t.buffer),i?this.lastWrittenByte=o:this.lastWrittenByte=0,this.buffer=t,this.length=o,this.byteLength=o,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,o),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(t===void 0)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const i=(this.offset+t)*2,r=new Uint8Array(i);r.set(new Uint8Array(this.buffer)),this.buffer=r.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,n){const i=j1[n].BYTES_PER_ELEMENT*t,r=this.byteOffset+this.offset,o=this.buffer.slice(r,r+i);if(this.littleEndian===ZF&&n!=="uint8"&&n!=="int8"){const u=new Uint8Array(this.buffer.slice(r,r+i));u.reverse();const h=new j1[n](u.buffer);return this.offset+=i,h.reverse(),h}const c=new j1[n](o);return this.offset+=i,c}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let n="";for(let i=0;i<t;i++)n+=this.readChar();return n}readUtf8(t=1){return C3(this.readBytes(t))}decodeText(t=1,n="utf8"){return C3(this.readBytes(t),n)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let n=0;n<t.length;n++)this._data.setUint8(this.offset++,t[n]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));return this}writeUtf8(t){return this.writeBytes(XF(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Jh(e){let t=e.length;for(;--t>=0;)e[t]=0}const JF=3,tI=258,A_=29,eI=256,nI=eI+1+A_,C_=30,iI=512,sI=new Array((nI+2)*2);Jh(sI);const rI=new Array(C_*2);Jh(rI);const aI=new Array(iI);Jh(aI);const oI=new Array(tI-JF+1);Jh(oI);const lI=new Array(A_);Jh(lI);const cI=new Array(C_);Jh(cI);const uI=(e,t,n,i)=>{let r=e&65535|0,o=e>>>16&65535|0,c=0;for(;n!==0;){c=n>2e3?2e3:n,n-=c;do r=r+t[i++]|0,o=o+r|0;while(--c);r%=65521,o%=65521}return r|o<<16|0};var s2=uI;const hI=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},dI=new Uint32Array(hI()),fI=(e,t,n,i)=>{const r=dI,o=i+n;e^=-1;for(let c=i;c<o;c++)e=e>>>8^r[(e^t[c])&255];return e^-1};var Io=fI,r2={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},__={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const mI=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var pI=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const i in n)mI(n,i)&&(e[i]=n[i])}}return e},gI=e=>{let t=0;for(let i=0,r=e.length;i<r;i++)t+=e[i].length;const n=new Uint8Array(t);for(let i=0,r=0,o=e.length;i<o;i++){let c=e[i];n.set(c,r),r+=c.length}return n},j_={assign:pI,flattenChunks:gI};let E_=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{E_=!1}const wf=new Uint8Array(256);for(let e=0;e<256;e++)wf[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;wf[254]=wf[254]=1;var vI=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,i,r,o,c=e.length,u=0;for(r=0;r<c;r++)n=e.charCodeAt(r),(n&64512)===55296&&r+1<c&&(i=e.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),u+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(u),o=0,r=0;o<u;r++)n=e.charCodeAt(r),(n&64512)===55296&&r+1<c&&(i=e.charCodeAt(r+1),(i&64512)===56320&&(n=65536+(n-55296<<10)+(i-56320),r++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t};const yI=(e,t)=>{if(t<65534&&e.subarray&&E_)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n};var bI=(e,t)=>{const n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let i,r;const o=new Array(n*2);for(r=0,i=0;i<n;){let c=e[i++];if(c<128){o[r++]=c;continue}let u=wf[c];if(u>4){o[r++]=65533,i+=u-1;continue}for(c&=u===2?31:u===3?15:7;u>1&&i<n;)c=c<<6|e[i++]&63,u--;if(u>1){o[r++]=65533;continue}c<65536?o[r++]=c:(c-=65536,o[r++]=55296|c>>10&1023,o[r++]=56320|c&1023)}return yI(o,r)},xI=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+wf[e[n]]>t?n:t},a2={string2buf:vI,buf2string:bI,utf8border:xI};function wI(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var SI=wI;const Hm=16209,NI=16191;var AI=function(t,n){let i,r,o,c,u,h,d,p,v,S,b,_,A,j,E,L,D,z,$,ut,nt,H,Q,ct;const F=t.state;i=t.next_in,Q=t.input,r=i+(t.avail_in-5),o=t.next_out,ct=t.output,c=o-(n-t.avail_out),u=o+(t.avail_out-257),h=F.dmax,d=F.wsize,p=F.whave,v=F.wnext,S=F.window,b=F.hold,_=F.bits,A=F.lencode,j=F.distcode,E=(1<<F.lenbits)-1,L=(1<<F.distbits)-1;t:do{_<15&&(b+=Q[i++]<<_,_+=8,b+=Q[i++]<<_,_+=8),D=A[b&E];e:for(;;){if(z=D>>>24,b>>>=z,_-=z,z=D>>>16&255,z===0)ct[o++]=D&65535;else if(z&16){$=D&65535,z&=15,z&&(_<z&&(b+=Q[i++]<<_,_+=8),$+=b&(1<<z)-1,b>>>=z,_-=z),_<15&&(b+=Q[i++]<<_,_+=8,b+=Q[i++]<<_,_+=8),D=j[b&L];n:for(;;){if(z=D>>>24,b>>>=z,_-=z,z=D>>>16&255,z&16){if(ut=D&65535,z&=15,_<z&&(b+=Q[i++]<<_,_+=8,_<z&&(b+=Q[i++]<<_,_+=8)),ut+=b&(1<<z)-1,ut>h){t.msg="invalid distance too far back",F.mode=Hm;break t}if(b>>>=z,_-=z,z=o-c,ut>z){if(z=ut-z,z>p&&F.sane){t.msg="invalid distance too far back",F.mode=Hm;break t}if(nt=0,H=S,v===0){if(nt+=d-z,z<$){$-=z;do ct[o++]=S[nt++];while(--z);nt=o-ut,H=ct}}else if(v<z){if(nt+=d+v-z,z-=v,z<$){$-=z;do ct[o++]=S[nt++];while(--z);if(nt=0,v<$){z=v,$-=z;do ct[o++]=S[nt++];while(--z);nt=o-ut,H=ct}}}else if(nt+=v-z,z<$){$-=z;do ct[o++]=S[nt++];while(--z);nt=o-ut,H=ct}for(;$>2;)ct[o++]=H[nt++],ct[o++]=H[nt++],ct[o++]=H[nt++],$-=3;$&&(ct[o++]=H[nt++],$>1&&(ct[o++]=H[nt++]))}else{nt=o-ut;do ct[o++]=ct[nt++],ct[o++]=ct[nt++],ct[o++]=ct[nt++],$-=3;while($>2);$&&(ct[o++]=ct[nt++],$>1&&(ct[o++]=ct[nt++]))}}else if((z&64)===0){D=j[(D&65535)+(b&(1<<z)-1)];continue n}else{t.msg="invalid distance code",F.mode=Hm;break t}break}}else if((z&64)===0){D=A[(D&65535)+(b&(1<<z)-1)];continue e}else if(z&32){F.mode=NI;break t}else{t.msg="invalid literal/length code",F.mode=Hm;break t}break}}while(i<r&&o<u);$=_>>3,i-=$,_-=$<<3,b&=(1<<_)-1,t.next_in=i,t.next_out=o,t.avail_in=i<r?5+(r-i):5-(i-r),t.avail_out=o<u?257+(u-o):257-(o-u),F.hold=b,F.bits=_};const hh=15,_3=852,j3=592,E3=0,E1=1,M3=2,CI=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),_I=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),jI=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),EI=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),MI=(e,t,n,i,r,o,c,u)=>{const h=u.bits;let d=0,p=0,v=0,S=0,b=0,_=0,A=0,j=0,E=0,L=0,D,z,$,ut,nt,H=null,Q;const ct=new Uint16Array(hh+1),F=new Uint16Array(hh+1);let Y=null,ot,tt,yt;for(d=0;d<=hh;d++)ct[d]=0;for(p=0;p<i;p++)ct[t[n+p]]++;for(b=h,S=hh;S>=1&&ct[S]===0;S--);if(b>S&&(b=S),S===0)return r[o++]=1<<24|64<<16|0,r[o++]=1<<24|64<<16|0,u.bits=1,0;for(v=1;v<S&&ct[v]===0;v++);for(b<v&&(b=v),j=1,d=1;d<=hh;d++)if(j<<=1,j-=ct[d],j<0)return-1;if(j>0&&(e===E3||S!==1))return-1;for(F[1]=0,d=1;d<hh;d++)F[d+1]=F[d]+ct[d];for(p=0;p<i;p++)t[n+p]!==0&&(c[F[t[n+p]]++]=p);if(e===E3?(H=Y=c,Q=20):e===E1?(H=CI,Y=_I,Q=257):(H=jI,Y=EI,Q=0),L=0,p=0,d=v,nt=o,_=b,A=0,$=-1,E=1<<b,ut=E-1,e===E1&&E>_3||e===M3&&E>j3)return 1;for(;;){ot=d-A,c[p]+1<Q?(tt=0,yt=c[p]):c[p]>=Q?(tt=Y[c[p]-Q],yt=H[c[p]-Q]):(tt=96,yt=0),D=1<<d-A,z=1<<_,v=z;do z-=D,r[nt+(L>>A)+z]=ot<<24|tt<<16|yt|0;while(z!==0);for(D=1<<d-1;L&D;)D>>=1;if(D!==0?(L&=D-1,L+=D):L=0,p++,--ct[d]===0){if(d===S)break;d=t[n+c[p]]}if(d>b&&(L&ut)!==$){for(A===0&&(A=b),nt+=v,_=d-A,j=1<<_;_+A<S&&(j-=ct[_+A],!(j<=0));)_++,j<<=1;if(E+=1<<_,e===E1&&E>_3||e===M3&&E>j3)return 1;$=L&ut,r[$]=b<<24|_<<16|nt-o|0}}return L!==0&&(r[nt+L]=d-A<<24|64<<16|0),u.bits=b,0};var nf=MI;const TI=0,M_=1,T_=2,{Z_FINISH:T3,Z_BLOCK:kI,Z_TREES:$m,Z_OK:vu,Z_STREAM_END:LI,Z_NEED_DICT:PI,Z_STREAM_ERROR:Ia,Z_DATA_ERROR:k_,Z_MEM_ERROR:L_,Z_BUF_ERROR:RI,Z_DEFLATED:k3}=__,v0=16180,L3=16181,P3=16182,R3=16183,D3=16184,O3=16185,z3=16186,B3=16187,F3=16188,I3=16189,qp=16190,kl=16191,M1=16192,U3=16193,T1=16194,q3=16195,V3=16196,H3=16197,$3=16198,Gm=16199,Ym=16200,G3=16201,Y3=16202,W3=16203,K3=16204,X3=16205,k1=16206,Q3=16207,Z3=16208,vi=16209,P_=16210,R_=16211,DI=852,OI=592,zI=15,BI=zI,J3=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function FI(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Au=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<v0||t.mode>R_?1:0},D_=e=>{if(Au(e))return Ia;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=v0,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(DI),t.distcode=t.distdyn=new Int32Array(OI),t.sane=1,t.back=-1,vu},O_=e=>{if(Au(e))return Ia;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,D_(e)},z_=(e,t)=>{let n;if(Au(e))return Ia;const i=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Ia:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,O_(e))},B_=(e,t)=>{if(!e)return Ia;const n=new FI;e.state=n,n.strm=e,n.window=null,n.mode=v0;const i=z_(e,t);return i!==vu&&(e.state=null),i},II=e=>B_(e,BI);let t4=!0,L1,P1;const UI=e=>{if(t4){L1=new Int32Array(512),P1=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(nf(M_,e.lens,0,288,L1,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;nf(T_,e.lens,0,32,P1,0,e.work,{bits:5}),t4=!1}e.lencode=L1,e.lenbits=9,e.distcode=P1,e.distbits=5},F_=(e,t,n,i)=>{let r;const o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),i>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>i&&(r=i),o.window.set(t.subarray(n-i,n-i+r),o.wnext),i-=r,i?(o.window.set(t.subarray(n-i,n),0),o.wnext=i,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0},qI=(e,t)=>{let n,i,r,o,c,u,h,d,p,v,S,b,_,A,j=0,E,L,D,z,$,ut,nt,H;const Q=new Uint8Array(4);let ct,F;const Y=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Au(e)||!e.output||!e.input&&e.avail_in!==0)return Ia;n=e.state,n.mode===kl&&(n.mode=M1),c=e.next_out,r=e.output,h=e.avail_out,o=e.next_in,i=e.input,u=e.avail_in,d=n.hold,p=n.bits,v=u,S=h,H=vu;t:for(;;)switch(n.mode){case v0:if(n.wrap===0){n.mode=M1;break}for(;p<16;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(n.wrap&2&&d===35615){n.wbits===0&&(n.wbits=15),n.check=0,Q[0]=d&255,Q[1]=d>>>8&255,n.check=Io(n.check,Q,2,0),d=0,p=0,n.mode=L3;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((d&255)<<8)+(d>>8))%31){e.msg="incorrect header check",n.mode=vi;break}if((d&15)!==k3){e.msg="unknown compression method",n.mode=vi;break}if(d>>>=4,p-=4,nt=(d&15)+8,n.wbits===0&&(n.wbits=nt),nt>15||nt>n.wbits){e.msg="invalid window size",n.mode=vi;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=d&512?I3:kl,d=0,p=0;break;case L3:for(;p<16;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(n.flags=d,(n.flags&255)!==k3){e.msg="unknown compression method",n.mode=vi;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=vi;break}n.head&&(n.head.text=d>>8&1),n.flags&512&&n.wrap&4&&(Q[0]=d&255,Q[1]=d>>>8&255,n.check=Io(n.check,Q,2,0)),d=0,p=0,n.mode=P3;case P3:for(;p<32;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}n.head&&(n.head.time=d),n.flags&512&&n.wrap&4&&(Q[0]=d&255,Q[1]=d>>>8&255,Q[2]=d>>>16&255,Q[3]=d>>>24&255,n.check=Io(n.check,Q,4,0)),d=0,p=0,n.mode=R3;case R3:for(;p<16;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}n.head&&(n.head.xflags=d&255,n.head.os=d>>8),n.flags&512&&n.wrap&4&&(Q[0]=d&255,Q[1]=d>>>8&255,n.check=Io(n.check,Q,2,0)),d=0,p=0,n.mode=D3;case D3:if(n.flags&1024){for(;p<16;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}n.length=d,n.head&&(n.head.extra_len=d),n.flags&512&&n.wrap&4&&(Q[0]=d&255,Q[1]=d>>>8&255,n.check=Io(n.check,Q,2,0)),d=0,p=0}else n.head&&(n.head.extra=null);n.mode=O3;case O3:if(n.flags&1024&&(b=n.length,b>u&&(b=u),b&&(n.head&&(nt=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(i.subarray(o,o+b),nt)),n.flags&512&&n.wrap&4&&(n.check=Io(n.check,i,b,o)),u-=b,o+=b,n.length-=b),n.length))break t;n.length=0,n.mode=z3;case z3:if(n.flags&2048){if(u===0)break t;b=0;do nt=i[o+b++],n.head&&nt&&n.length<65536&&(n.head.name+=String.fromCharCode(nt));while(nt&&b<u);if(n.flags&512&&n.wrap&4&&(n.check=Io(n.check,i,b,o)),u-=b,o+=b,nt)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=B3;case B3:if(n.flags&4096){if(u===0)break t;b=0;do nt=i[o+b++],n.head&&nt&&n.length<65536&&(n.head.comment+=String.fromCharCode(nt));while(nt&&b<u);if(n.flags&512&&n.wrap&4&&(n.check=Io(n.check,i,b,o)),u-=b,o+=b,nt)break t}else n.head&&(n.head.comment=null);n.mode=F3;case F3:if(n.flags&512){for(;p<16;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(n.wrap&4&&d!==(n.check&65535)){e.msg="header crc mismatch",n.mode=vi;break}d=0,p=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=kl;break;case I3:for(;p<32;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}e.adler=n.check=J3(d),d=0,p=0,n.mode=qp;case qp:if(n.havedict===0)return e.next_out=c,e.avail_out=h,e.next_in=o,e.avail_in=u,n.hold=d,n.bits=p,PI;e.adler=n.check=1,n.mode=kl;case kl:if(t===kI||t===$m)break t;case M1:if(n.last){d>>>=p&7,p-=p&7,n.mode=k1;break}for(;p<3;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}switch(n.last=d&1,d>>>=1,p-=1,d&3){case 0:n.mode=U3;break;case 1:if(UI(n),n.mode=Gm,t===$m){d>>>=2,p-=2;break t}break;case 2:n.mode=V3;break;case 3:e.msg="invalid block type",n.mode=vi}d>>>=2,p-=2;break;case U3:for(d>>>=p&7,p-=p&7;p<32;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if((d&65535)!==(d>>>16^65535)){e.msg="invalid stored block lengths",n.mode=vi;break}if(n.length=d&65535,d=0,p=0,n.mode=T1,t===$m)break t;case T1:n.mode=q3;case q3:if(b=n.length,b){if(b>u&&(b=u),b>h&&(b=h),b===0)break t;r.set(i.subarray(o,o+b),c),u-=b,o+=b,h-=b,c+=b,n.length-=b;break}n.mode=kl;break;case V3:for(;p<14;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(n.nlen=(d&31)+257,d>>>=5,p-=5,n.ndist=(d&31)+1,d>>>=5,p-=5,n.ncode=(d&15)+4,d>>>=4,p-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=vi;break}n.have=0,n.mode=H3;case H3:for(;n.have<n.ncode;){for(;p<3;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}n.lens[Y[n.have++]]=d&7,d>>>=3,p-=3}for(;n.have<19;)n.lens[Y[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,ct={bits:n.lenbits},H=nf(TI,n.lens,0,19,n.lencode,0,n.work,ct),n.lenbits=ct.bits,H){e.msg="invalid code lengths set",n.mode=vi;break}n.have=0,n.mode=$3;case $3:for(;n.have<n.nlen+n.ndist;){for(;j=n.lencode[d&(1<<n.lenbits)-1],E=j>>>24,L=j>>>16&255,D=j&65535,!(E<=p);){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(D<16)d>>>=E,p-=E,n.lens[n.have++]=D;else{if(D===16){for(F=E+2;p<F;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(d>>>=E,p-=E,n.have===0){e.msg="invalid bit length repeat",n.mode=vi;break}nt=n.lens[n.have-1],b=3+(d&3),d>>>=2,p-=2}else if(D===17){for(F=E+3;p<F;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}d>>>=E,p-=E,nt=0,b=3+(d&7),d>>>=3,p-=3}else{for(F=E+7;p<F;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}d>>>=E,p-=E,nt=0,b=11+(d&127),d>>>=7,p-=7}if(n.have+b>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=vi;break}for(;b--;)n.lens[n.have++]=nt}}if(n.mode===vi)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=vi;break}if(n.lenbits=9,ct={bits:n.lenbits},H=nf(M_,n.lens,0,n.nlen,n.lencode,0,n.work,ct),n.lenbits=ct.bits,H){e.msg="invalid literal/lengths set",n.mode=vi;break}if(n.distbits=6,n.distcode=n.distdyn,ct={bits:n.distbits},H=nf(T_,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,ct),n.distbits=ct.bits,H){e.msg="invalid distances set",n.mode=vi;break}if(n.mode=Gm,t===$m)break t;case Gm:n.mode=Ym;case Ym:if(u>=6&&h>=258){e.next_out=c,e.avail_out=h,e.next_in=o,e.avail_in=u,n.hold=d,n.bits=p,AI(e,S),c=e.next_out,r=e.output,h=e.avail_out,o=e.next_in,i=e.input,u=e.avail_in,d=n.hold,p=n.bits,n.mode===kl&&(n.back=-1);break}for(n.back=0;j=n.lencode[d&(1<<n.lenbits)-1],E=j>>>24,L=j>>>16&255,D=j&65535,!(E<=p);){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(L&&(L&240)===0){for(z=E,$=L,ut=D;j=n.lencode[ut+((d&(1<<z+$)-1)>>z)],E=j>>>24,L=j>>>16&255,D=j&65535,!(z+E<=p);){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}d>>>=z,p-=z,n.back+=z}if(d>>>=E,p-=E,n.back+=E,n.length=D,L===0){n.mode=X3;break}if(L&32){n.back=-1,n.mode=kl;break}if(L&64){e.msg="invalid literal/length code",n.mode=vi;break}n.extra=L&15,n.mode=G3;case G3:if(n.extra){for(F=n.extra;p<F;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}n.length+=d&(1<<n.extra)-1,d>>>=n.extra,p-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Y3;case Y3:for(;j=n.distcode[d&(1<<n.distbits)-1],E=j>>>24,L=j>>>16&255,D=j&65535,!(E<=p);){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if((L&240)===0){for(z=E,$=L,ut=D;j=n.distcode[ut+((d&(1<<z+$)-1)>>z)],E=j>>>24,L=j>>>16&255,D=j&65535,!(z+E<=p);){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}d>>>=z,p-=z,n.back+=z}if(d>>>=E,p-=E,n.back+=E,L&64){e.msg="invalid distance code",n.mode=vi;break}n.offset=D,n.extra=L&15,n.mode=W3;case W3:if(n.extra){for(F=n.extra;p<F;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}n.offset+=d&(1<<n.extra)-1,d>>>=n.extra,p-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=vi;break}n.mode=K3;case K3:if(h===0)break t;if(b=S-h,n.offset>b){if(b=n.offset-b,b>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=vi;break}b>n.wnext?(b-=n.wnext,_=n.wsize-b):_=n.wnext-b,b>n.length&&(b=n.length),A=n.window}else A=r,_=c-n.offset,b=n.length;b>h&&(b=h),h-=b,n.length-=b;do r[c++]=A[_++];while(--b);n.length===0&&(n.mode=Ym);break;case X3:if(h===0)break t;r[c++]=n.length,h--,n.mode=Ym;break;case k1:if(n.wrap){for(;p<32;){if(u===0)break t;u--,d|=i[o++]<<p,p+=8}if(S-=h,e.total_out+=S,n.total+=S,n.wrap&4&&S&&(e.adler=n.check=n.flags?Io(n.check,r,S,c-S):s2(n.check,r,S,c-S)),S=h,n.wrap&4&&(n.flags?d:J3(d))!==n.check){e.msg="incorrect data check",n.mode=vi;break}d=0,p=0}n.mode=Q3;case Q3:if(n.wrap&&n.flags){for(;p<32;){if(u===0)break t;u--,d+=i[o++]<<p,p+=8}if(n.wrap&4&&d!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=vi;break}d=0,p=0}n.mode=Z3;case Z3:H=LI;break t;case vi:H=k_;break t;case P_:return L_;case R_:default:return Ia}return e.next_out=c,e.avail_out=h,e.next_in=o,e.avail_in=u,n.hold=d,n.bits=p,(n.wsize||S!==e.avail_out&&n.mode<vi&&(n.mode<k1||t!==T3))&&F_(e,e.output,e.next_out,S-e.avail_out),v-=e.avail_in,S-=e.avail_out,e.total_in+=v,e.total_out+=S,n.total+=S,n.wrap&4&&S&&(e.adler=n.check=n.flags?Io(n.check,r,S,e.next_out-S):s2(n.check,r,S,e.next_out-S)),e.data_type=n.bits+(n.last?64:0)+(n.mode===kl?128:0)+(n.mode===Gm||n.mode===T1?256:0),(v===0&&S===0||t===T3)&&H===vu&&(H=RI),H},VI=e=>{if(Au(e))return Ia;let t=e.state;return t.window&&(t.window=null),e.state=null,vu},HI=(e,t)=>{if(Au(e))return Ia;const n=e.state;return(n.wrap&2)===0?Ia:(n.head=t,t.done=!1,vu)},$I=(e,t)=>{const n=t.length;let i,r,o;return Au(e)||(i=e.state,i.wrap!==0&&i.mode!==qp)?Ia:i.mode===qp&&(r=1,r=s2(r,t,n,0),r!==i.check)?k_:(o=F_(e,t,n,n),o?(i.mode=P_,L_):(i.havedict=1,vu))};var GI=O_,YI=z_,WI=D_,KI=II,XI=B_,QI=qI,ZI=VI,JI=HI,tU=$I,eU="pako inflate (from Nodeca project)",Ll={inflateReset:GI,inflateReset2:YI,inflateResetKeep:WI,inflateInit:KI,inflateInit2:XI,inflate:QI,inflateEnd:ZI,inflateGetHeader:JI,inflateSetDictionary:tU,inflateInfo:eU};function nU(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var iU=nU;const I_=Object.prototype.toString,{Z_NO_FLUSH:sU,Z_FINISH:rU,Z_OK:Sf,Z_STREAM_END:R1,Z_NEED_DICT:D1,Z_STREAM_ERROR:aU,Z_DATA_ERROR:e4,Z_MEM_ERROR:oU}=__;function Df(e){this.options=j_.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new SI,this.strm.avail_out=0;let n=Ll.inflateInit2(this.strm,t.windowBits);if(n!==Sf)throw new Error(r2[n]);if(this.header=new iU,Ll.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=a2.string2buf(t.dictionary):I_.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Ll.inflateSetDictionary(this.strm,t.dictionary),n!==Sf)))throw new Error(r2[n])}Df.prototype.push=function(e,t){const n=this.strm,i=this.options.chunkSize,r=this.options.dictionary;let o,c,u;if(this.ended)return!1;for(t===~~t?c=t:c=t===!0?rU:sU,I_.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),o=Ll.inflate(n,c),o===D1&&r&&(o=Ll.inflateSetDictionary(n,r),o===Sf?o=Ll.inflate(n,c):o===e4&&(o=D1));n.avail_in>0&&o===R1&&n.state.wrap>0&&e[n.next_in]!==0;)Ll.inflateReset(n),o=Ll.inflate(n,c);switch(o){case aU:case e4:case D1:case oU:return this.onEnd(o),this.ended=!0,!1}if(u=n.avail_out,n.next_out&&(n.avail_out===0||o===R1))if(this.options.to==="string"){let h=a2.utf8border(n.output,n.next_out),d=n.next_out-h,p=a2.buf2string(n.output,h);n.next_out=d,n.avail_out=i-d,d&&n.output.set(n.output.subarray(h,h+d),0),this.onData(p)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Sf&&u===0)){if(o===R1)return o=Ll.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};Df.prototype.onData=function(e){this.chunks.push(e)};Df.prototype.onEnd=function(e){e===Sf&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=j_.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function lU(e,t){const n=new Df(t);if(n.push(e),n.err)throw n.msg||r2[n.err];return n.result}var cU=Df,uU=lU,hU={Inflate:cU,inflate:uU};const{Inflate:dU,inflate:fU}=hU;var n4=dU,mU=fU;const U_=[];for(let e=0;e<256;e++){let t=e;for(let n=0;n<8;n++)t&1?t=3988292384^t>>>1:t=t>>>1;U_[e]=t}const i4=4294967295;function pU(e,t,n){let i=e;for(let r=0;r<n;r++)i=U_[(i^t[r])&255]^i>>>8;return i}function gU(e,t){return(pU(i4,e,t)^i4)>>>0}function s4(e,t,n){const i=e.readUint32(),r=gU(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(r!==i)throw new Error(`CRC mismatch for chunk ${n}. Expected ${i}, found ${r}`)}function q_(e,t,n){for(let i=0;i<n;i++)t[i]=e[i]}function V_(e,t,n,i){let r=0;for(;r<i;r++)t[r]=e[r];for(;r<n;r++)t[r]=e[r]+t[r-i]&255}function H_(e,t,n,i){let r=0;if(n.length===0)for(;r<i;r++)t[r]=e[r];else for(;r<i;r++)t[r]=e[r]+n[r]&255}function $_(e,t,n,i,r){let o=0;if(n.length===0){for(;o<r;o++)t[o]=e[o];for(;o<i;o++)t[o]=e[o]+(t[o-r]>>1)&255}else{for(;o<r;o++)t[o]=e[o]+(n[o]>>1)&255;for(;o<i;o++)t[o]=e[o]+(t[o-r]+n[o]>>1)&255}}function G_(e,t,n,i,r){let o=0;if(n.length===0){for(;o<r;o++)t[o]=e[o];for(;o<i;o++)t[o]=e[o]+t[o-r]&255}else{for(;o<r;o++)t[o]=e[o]+n[o]&255;for(;o<i;o++)t[o]=e[o]+vU(t[o-r],n[o],n[o-r])&255}}function vU(e,t,n){const i=e+t-n,r=Math.abs(i-e),o=Math.abs(i-t),c=Math.abs(i-n);return r<=o&&r<=c?e:o<=c?t:n}function yU(e,t,n,i,r,o){switch(e){case 0:q_(t,n,r);break;case 1:V_(t,n,r,o);break;case 2:H_(t,n,i,r);break;case 3:$_(t,n,i,r,o);break;case 4:G_(t,n,i,r,o);break;default:throw new Error(`Unsupported filter: ${e}`)}}const bU=new Uint16Array([255]),xU=new Uint8Array(bU.buffer),wU=xU[0]===255;function SU(e){const{data:t,width:n,height:i,channels:r,depth:o}=e,c=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],u=Math.ceil(o/8)*r,h=new Uint8Array(i*n*u);let d=0;for(let p=0;p<7;p++){const v=c[p],S=Math.ceil((n-v.x)/v.xStep),b=Math.ceil((i-v.y)/v.yStep);if(S<=0||b<=0)continue;const _=S*u,A=new Uint8Array(_);for(let j=0;j<b;j++){const E=t[d++],L=t.subarray(d,d+_);d+=_;const D=new Uint8Array(_);yU(E,L,D,A,_,u),A.set(D);for(let z=0;z<S;z++){const $=v.x+z*v.xStep,ut=v.y+j*v.yStep;if(!($>=n||ut>=i))for(let nt=0;nt<u;nt++)h[(ut*n+$)*u+nt]=D[z*u+nt]}}}if(o===16){const p=new Uint16Array(h.buffer);if(wU)for(let v=0;v<p.length;v++)p[v]=NU(p[v]);return p}else return h}function NU(e){return(e&255)<<8|e>>8&255}const AU=new Uint16Array([255]),CU=new Uint8Array(AU.buffer),_U=CU[0]===255,jU=new Uint8Array(0);function r4(e){const{data:t,width:n,height:i,channels:r,depth:o}=e,c=Math.ceil(o/8)*r,u=Math.ceil(o/8*r*n),h=new Uint8Array(i*u);let d=jU,p=0,v,S;for(let b=0;b<i;b++){switch(v=t.subarray(p+1,p+1+u),S=h.subarray(b*u,(b+1)*u),t[p]){case 0:q_(v,S,u);break;case 1:V_(v,S,u,c);break;case 2:H_(v,S,d,u);break;case 3:$_(v,S,d,u,c);break;case 4:G_(v,S,d,u,c);break;default:throw new Error(`Unsupported filter: ${t[p]}`)}d=S,p+=u+1}if(o===16){const b=new Uint16Array(h.buffer);if(_U)for(let _=0;_<b.length;_++)b[_]=EU(b[_]);return b}else return h}function EU(e){return(e&255)<<8|e>>8&255}const yp=Uint8Array.of(137,80,78,71,13,10,26,10);function a4(e){if(!MU(e.readBytes(yp.length)))throw new Error("wrong PNG signature")}function MU(e){if(e.length<yp.length)return!1;for(let t=0;t<yp.length;t++)if(e[t]!==yp[t])return!1;return!0}const TU="tEXt",kU=0,Y_=new TextDecoder("latin1");function LU(e){if(RU(e),e.length===0||e.length>79)throw new Error("keyword length must be between 1 and 79")}const PU=/^[\u0000-\u00FF]*$/;function RU(e){if(!PU.test(e))throw new Error("invalid latin1 text")}function DU(e,t,n){const i=W_(t);e[i]=OU(t,n-i.length-1)}function W_(e){for(e.mark();e.readByte()!==kU;);const t=e.offset;e.reset();const n=Y_.decode(e.readBytes(t-e.offset-1));return e.skip(1),LU(n),n}function OU(e,t){return Y_.decode(e.readBytes(t))}const la={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},O1={UNKNOWN:-1,DEFLATE:0},o4={UNKNOWN:-1,ADAPTIVE:0},z1={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Wm={NONE:0,BACKGROUND:1,PREVIOUS:2},B1={SOURCE:0,OVER:1};class zU extends Ey{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,n={}){super(t);const{checkCrc:i=!1}=n;this._checkCrc=i,this._inflator=new n4,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=O1.UNKNOWN,this._filterMethod=o4.UNKNOWN,this._interlaceMethod=z1.UNKNOWN,this._colorType=la.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(a4(this);!this._end;){const t=this.readUint32(),n=this.readChars(4);this.decodeChunk(t,n)}return this.decodeImage(),this._png}decodeApng(){for(a4(this);!this._end;){const t=this.readUint32(),n=this.readChars(4);this.decodeApngChunk(t,n)}return this.decodeApngImage(),this._apng}decodeChunk(t,n){const i=this.offset;switch(n){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case TU:DU(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-i!==t)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?s4(this,t+4,n):this.skip(4)}decodeApngChunk(t,n){const i=this.offset;switch(n!=="fdAT"&&n!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),n){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,n),this.offset=i+t;break}if(this.offset-i!==t)throw new Error(`Length mismatch while decoding chunk ${n}`);this._checkCrc?s4(this,t+4,n):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=BU(this.readUint8());const n=this.readUint8();this._colorType=n;let i;switch(n){case la.GREYSCALE:i=1;break;case la.TRUECOLOUR:i=3;break;case la.INDEXED_COLOUR:i=1;break;case la.GREYSCALE_ALPHA:i=2;break;case la.TRUECOLOUR_ALPHA:i=4;break;case la.UNKNOWN:default:throw new Error(`Unknown color type: ${n}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==O1.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const n=t/3;this._hasPalette=!0;const i=[];this._palette=i;for(let r=0;r<n;r++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const n=t,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,n)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let n=t,i=this.offset+this.byteOffset;if(i+=4,n-=4,this._inflator.push(new Uint8Array(this.buffer,i,n)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case la.GREYSCALE:case la.TRUECOLOUR:{if(t%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let n=0;n<t/2;n++)this._transparency[n]=this.readUint16();break}case la.INDEXED_COLOUR:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let n=0;for(;n<t;n++){const i=this.readByte();this._palette[n].push(i)}for(;n<this._palette.length;n++)this._palette[n].push(255);break}case la.UNKNOWN:case la.GREYSCALE_ALPHA:case la.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const n=W_(this),i=this.readUint8();if(i!==O1.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const r=this.readBytes(t-n.length-2);this._png.iccEmbeddedProfile={name:n,profile:mU(r)}}decodepHYs(){const t=this.readUint32(),n=this.readUint32(),i=this.readByte();this._png.resolution={x:t,y:n,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const n={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(t);if(i){if(i.data=r4({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),t===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)n.data=i.data;else{const r=this._apng.frames.at(t-1);this.disposeFrame(i,r,n),this.addFrameDataToCanvas(n,i)}this._apng.frames.push(n)}}return this._apng}disposeFrame(t,n,i){switch(t.disposeOp){case Wm.NONE:break;case Wm.BACKGROUND:for(let r=0;r<this._png.height;r++)for(let o=0;o<this._png.width;o++){const c=(r*t.width+o)*this._png.channels;for(let u=0;u<this._png.channels;u++)i.data[c+u]=0}break;case Wm.PREVIOUS:i.data.set(n.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,n){const i=1<<this._png.depth,r=(o,c)=>{const u=((o+n.yOffset)*this._png.width+n.xOffset+c)*this._png.channels,h=(o*n.width+c)*this._png.channels;return{index:u,frameIndex:h}};switch(n.blendOp){case B1.SOURCE:for(let o=0;o<n.height;o++)for(let c=0;c<n.width;c++){const{index:u,frameIndex:h}=r(o,c);for(let d=0;d<this._png.channels;d++)t.data[u+d]=n.data[h+d]}break;case B1.OVER:for(let o=0;o<n.height;o++)for(let c=0;c<n.width;c++){const{index:u,frameIndex:h}=r(o,c);for(let d=0;d<this._png.channels;d++){const p=n.data[h+this._png.channels-1]/i,v=d%(this._png.channels-1)===0?1:n.data[h+d],S=Math.floor(p*v+(1-p)*t.data[u+d]);t.data[u+d]+=S}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==o4.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===z1.NO_INTERLACE)this._png.data=r4({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===z1.ADAM7)this._png.data=SU({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,n=this._frames.at(-1);n?n.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:Wm.NONE,blendOp:B1.SOURCE,data:t}),this._inflator=new n4,this._writingDataChunks=!1}}function BU(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw new Error(`invalid bit depth: ${e}`);return e}var l4;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"})(l4||(l4={}));function FU(e,t){return new zU(e,t).decode()}var $e=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function F1(){$e.console&&typeof $e.console.log=="function"&&$e.console.log.apply($e.console,arguments)}var Zn={log:F1,warn:function(e){$e.console&&(typeof $e.console.warn=="function"?$e.console.warn.apply($e.console,arguments):F1.call(null,arguments))},error:function(e){$e.console&&(typeof $e.console.error=="function"?$e.console.error.apply($e.console,arguments):F1(e))}};function I1(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){ru(i.response,t,n)},i.onerror=function(){Zn.error("could not download file")},i.send()}function c4(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Km(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var ru=$e.saveAs||((typeof window>"u"?"undefined":In(window))!=="object"||window!==$e?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=$e.URL||$e.webkitURL,r=document.createElement("a");t=t||e.name||"download",r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?c4(r.href)?I1(e,t,n):Km(r,r.target="_blank"):Km(r)):(r.href=i.createObjectURL(e),setTimeout(function(){i.revokeObjectURL(r.href)},4e4),setTimeout(function(){Km(r)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e=="string")if(c4(e))I1(e,t,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){Km(i)})}else navigator.msSaveOrOpenBlob((function(r,o){return o===void 0?o={autoBom:!1}:In(o)!=="object"&&(Zn.warn("Deprecated: Expected third argument to be a object"),o={autoBom:!o}),o.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r})(e,n),t)}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return I1(e,t,n);var r=e.type==="application/octet-stream",o=/constructor/i.test($e.HTMLElement)||$e.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||r&&o)&&(typeof FileReader>"u"?"undefined":In(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var p=u.result;p=c?p:p.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=p:location=p,i=null},u.readAsDataURL(e)}else{var h=$e.URL||$e.webkitURL,d=h.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});/**
 * A class to parse color values
 * @author Stoyan Stefanov <sstoo@gmail.com>
 * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
 * @license Use it if you like it
 */function K_(e){var t;e=e||"",this.ok=!1,e.charAt(0)=="#"&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],i=0;i<n.length;i++){var r=n[i].re,o=n[i].process,c=r.exec(e);c&&(t=o(c),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),h=this.g.toString(16),d=this.b.toString(16);return u.length==1&&(u="0"+u),h.length==1&&(h="0"+h),d.length==1&&(d="0"+d),"#"+u+h+d}}var bp=$e.atob.bind($e),u4=$e.btoa.bind($e);/**
 * @license
 * Joseph Myers does not specify a particular license for his work.
 *
 * Author: Joseph Myers
 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
 *
 * Modified by: Owen Leong
 */function U1(e,t){var n=e[0],i=e[1],r=e[2],o=e[3];n=Qs(n,i,r,o,t[0],7,-680876936),o=Qs(o,n,i,r,t[1],12,-389564586),r=Qs(r,o,n,i,t[2],17,606105819),i=Qs(i,r,o,n,t[3],22,-1044525330),n=Qs(n,i,r,o,t[4],7,-176418897),o=Qs(o,n,i,r,t[5],12,1200080426),r=Qs(r,o,n,i,t[6],17,-1473231341),i=Qs(i,r,o,n,t[7],22,-45705983),n=Qs(n,i,r,o,t[8],7,1770035416),o=Qs(o,n,i,r,t[9],12,-1958414417),r=Qs(r,o,n,i,t[10],17,-42063),i=Qs(i,r,o,n,t[11],22,-1990404162),n=Qs(n,i,r,o,t[12],7,1804603682),o=Qs(o,n,i,r,t[13],12,-40341101),r=Qs(r,o,n,i,t[14],17,-1502002290),n=Zs(n,i=Qs(i,r,o,n,t[15],22,1236535329),r,o,t[1],5,-165796510),o=Zs(o,n,i,r,t[6],9,-1069501632),r=Zs(r,o,n,i,t[11],14,643717713),i=Zs(i,r,o,n,t[0],20,-373897302),n=Zs(n,i,r,o,t[5],5,-701558691),o=Zs(o,n,i,r,t[10],9,38016083),r=Zs(r,o,n,i,t[15],14,-660478335),i=Zs(i,r,o,n,t[4],20,-405537848),n=Zs(n,i,r,o,t[9],5,568446438),o=Zs(o,n,i,r,t[14],9,-1019803690),r=Zs(r,o,n,i,t[3],14,-187363961),i=Zs(i,r,o,n,t[8],20,1163531501),n=Zs(n,i,r,o,t[13],5,-1444681467),o=Zs(o,n,i,r,t[2],9,-51403784),r=Zs(r,o,n,i,t[7],14,1735328473),n=Js(n,i=Zs(i,r,o,n,t[12],20,-1926607734),r,o,t[5],4,-378558),o=Js(o,n,i,r,t[8],11,-2022574463),r=Js(r,o,n,i,t[11],16,1839030562),i=Js(i,r,o,n,t[14],23,-35309556),n=Js(n,i,r,o,t[1],4,-1530992060),o=Js(o,n,i,r,t[4],11,1272893353),r=Js(r,o,n,i,t[7],16,-155497632),i=Js(i,r,o,n,t[10],23,-1094730640),n=Js(n,i,r,o,t[13],4,681279174),o=Js(o,n,i,r,t[0],11,-358537222),r=Js(r,o,n,i,t[3],16,-722521979),i=Js(i,r,o,n,t[6],23,76029189),n=Js(n,i,r,o,t[9],4,-640364487),o=Js(o,n,i,r,t[12],11,-421815835),r=Js(r,o,n,i,t[15],16,530742520),n=tr(n,i=Js(i,r,o,n,t[2],23,-995338651),r,o,t[0],6,-198630844),o=tr(o,n,i,r,t[7],10,1126891415),r=tr(r,o,n,i,t[14],15,-1416354905),i=tr(i,r,o,n,t[5],21,-57434055),n=tr(n,i,r,o,t[12],6,1700485571),o=tr(o,n,i,r,t[3],10,-1894986606),r=tr(r,o,n,i,t[10],15,-1051523),i=tr(i,r,o,n,t[1],21,-2054922799),n=tr(n,i,r,o,t[8],6,1873313359),o=tr(o,n,i,r,t[15],10,-30611744),r=tr(r,o,n,i,t[6],15,-1560198380),i=tr(i,r,o,n,t[13],21,1309151649),n=tr(n,i,r,o,t[4],6,-145523070),o=tr(o,n,i,r,t[11],10,-1120210379),r=tr(r,o,n,i,t[2],15,718787259),i=tr(i,r,o,n,t[9],21,-343485551),e[0]=Cc(n,e[0]),e[1]=Cc(i,e[1]),e[2]=Cc(r,e[2]),e[3]=Cc(o,e[3])}function y0(e,t,n,i,r,o){return t=Cc(Cc(t,e),Cc(i,o)),Cc(t<<r|t>>>32-r,n)}function Qs(e,t,n,i,r,o,c){return y0(t&n|~t&i,e,t,r,o,c)}function Zs(e,t,n,i,r,o,c){return y0(t&i|n&~i,e,t,r,o,c)}function Js(e,t,n,i,r,o,c){return y0(t^n^i,e,t,r,o,c)}function tr(e,t,n,i,r,o,c){return y0(n^(t|~i),e,t,r,o,c)}function X_(e){var t,n=e.length,i=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)U1(i,IU(e.substring(t-64,t)));e=e.substring(t-64);var r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)r[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(U1(i,r),t=0;t<16;t++)r[t]=0;return r[14]=8*n,U1(i,r),i}function IU(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var h4="0123456789abcdef".split("");function UU(e){for(var t="",n=0;n<4;n++)t+=h4[e>>8*n+4&15]+h4[e>>8*n&15];return t}function qU(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function o2(e){return X_(e).map(qU).join("")}var VU=(function(e){for(var t=0;t<e.length;t++)e[t]=UU(e[t]);return e.join("")})(X_("hello"))!="5d41402abc4b2a76b9719d911017c592";function Cc(e,t){if(VU){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}/**
 * @license
 * FPDF is released under a permissive license: there is no usage restriction.
 * You may embed it freely in your application (commercial or not), with or
 * without modifications.
 *
 * Reference: http://www.fpdf.org/en/script/script37.php
 */function l2(e,t){var n,i,r,o;if(e!==n){for(var c=(r=e,o=1+(256/e.length|0),new Array(o+1).join(r)),u=[],h=0;h<256;h++)u[h]=h;var d=0;for(h=0;h<256;h++){var p=u[h];d=(d+p+c.charCodeAt(h))%256,u[h]=u[d],u[d]=p}n=e,i=u}else u=i;var v=t.length,S=0,b=0,_="";for(h=0;h<v;h++)b=(b+(p=u[S=(S+1)%256]))%256,u[S]=u[b],u[b]=p,c=u[(u[S]+u[b])%256],_+=String.fromCharCode(t.charCodeAt(h)^c);return _}/**
 * @license
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 * Author: Owen Leong (@owenl131)
 * Date: 15 Oct 2020
 * References:
 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
 * http://www.fpdf.org/en/script/script37.php
 */var d4={print:4,modify:8,copy:16,"annot-forms":32};function gh(e,t,n,i){this.v=1,this.r=2;var r=192;e.forEach(function(u){if(d4.perm!==void 0)throw new Error("Invalid permission: "+u);r+=d4[u]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var o=(t+this.padding).substr(0,32),c=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,c),this.P=-(1+(255^r)),this.encryptionKey=o2(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(i)).substr(0,5),this.U=l2(this.encryptionKey,this.padding)}function vh(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",n=e.length,i=0;i<n;i++){var r=e.charCodeAt(i);t+=r<33||r===35||r===37||r===40||r===41||r===47||r===60||r===62||r===91||r===93||r===123||r===125||r>126?"#"+("0"+r.toString(16)).slice(-2):e[i]}return t}function f4(e){if(In(e)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(n,i,r){if(r=r||!1,typeof n!="string"||typeof i!="function"||typeof r!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(n)||(t[n]={});var o=Math.random().toString(35);return t[n][o]=[i,!!r],o},this.unsubscribe=function(n){for(var i in t)if(t[i][n])return delete t[i][n],Object.keys(t[i]).length===0&&delete t[i],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var i=Array.prototype.slice.call(arguments,1),r=[];for(var o in t[n]){var c=t[n][o];try{c[0].apply(e,i)}catch(u){$e.console&&Zn.error("jsPDF PubSub Error",u.message,u)}c[1]&&r.push(o)}r.length&&r.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function Vp(e){if(!(this instanceof Vp))return new Vp(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function Q_(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function au(e,t,n,i,r){if(!(this instanceof au))return new au(e,t,n,i,r);this.type=e==="axial"?2:3,this.coords=t,this.colors=n,Q_.call(this,i,r)}function Nh(e,t,n,i,r){if(!(this instanceof Nh))return new Nh(e,t,n,i,r);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,Q_.call(this,i,r)}function Ae(e){var t,n=typeof arguments[0]=="string"?arguments[0]:"p",i=arguments[1],r=arguments[2],o=arguments[3],c=[],u=1,h=16,d="S",p=null;In(e=e||{})==="object"&&(n=e.orientation,i=e.unit||i,r=e.format||r,o=e.compress||e.compressPdf||o,(p=e.encryption||null)!==null&&(p.userPassword=p.userPassword||"",p.ownerPassword=p.ownerPassword||"",p.userPermissions=p.userPermissions||[]),u=typeof e.userUnit=="number"?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(h=e.floatPrecision),d=e.defaultPathOperation||"S"),c=e.filters||(o===!0?["FlateEncode"]:c),i=i||"mm",n=(""+(n||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,S={},b={internal:{},__private__:{}};b.__private__.PubSub=f4;var _="1.3",A=b.__private__.getPdfVersion=function(){return _};b.__private__.setPdfVersion=function(N){_=N};var j={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};b.__private__.getPageFormats=function(){return j};var E=b.__private__.getPageFormat=function(N){return j[N]};r=r||"a4";var L="compat",D="advanced",z=L;function $(){this.saveGraphicsState(),et(new Ne(qe,0,0,-qe,0,ks()*qe).toString()+" cm"),this.setFontSize(this.getFontSize()/qe),d="n",z=D}function ut(){this.restoreGraphicsState(),d="S",z=L}var nt=b.__private__.combineFontStyleAndFontWeight=function(N,O){if(N=="bold"&&O=="normal"||N=="bold"&&O==400||N=="normal"&&O=="italic"||N=="bold"&&O=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return O&&(N=O==400||O==="normal"?N==="italic"?"italic":"normal":O!=700&&O!=="bold"||N!=="normal"?(O==700?"bold":O)+""+N:"bold"),N};b.advancedAPI=function(N){var O=z===L;return O&&$.call(this),typeof N!="function"||(N(this),O&&ut.call(this)),this},b.compatAPI=function(N){var O=z===D;return O&&ut.call(this),typeof N!="function"||(N(this),O&&$.call(this)),this},b.isAdvancedAPI=function(){return z===D};var H,Q=function(N){if(z!==D)throw new Error(N+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},ct=b.roundToPrecision=b.__private__.roundToPrecision=function(N,O){var st=t||O;if(isNaN(N)||isNaN(st))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return N.toFixed(st).replace(/0+$/,"")};H=b.hpf=b.__private__.hpf=typeof h=="number"?function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.hpf");return ct(N,h)}:h==="smart"?function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.hpf");return ct(N,N>-1&&N<1?16:5)}:function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.hpf");return ct(N,16)};var F=b.f2=b.__private__.f2=function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.f2");return ct(N,2)},Y=b.__private__.f3=function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.f3");return ct(N,3)},ot=b.scale=b.__private__.scale=function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.scale");return z===L?N*qe:z===D?N:void 0},tt=function(N){return ot((function(O){return z===L?ks()-O:z===D?O:void 0})(N))};b.__private__.setPrecision=b.setPrecision=function(N){typeof parseInt(N,10)=="number"&&(t=parseInt(N,10))};var yt,J="00000000000000000000000000000000",at=b.__private__.getFileId=function(){return J},K=b.__private__.setFileId=function(N){return J=N!==void 0&&/^[a-fA-F0-9]{32}$/.test(N)?N.toUpperCase():J.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),p!==null&&(ni=new gh(p.userPermissions,p.userPassword,p.ownerPassword,J)),J};b.setFileId=function(N){return K(N),this},b.getFileId=function(){return at()};var dt=b.__private__.convertDateToPDFDate=function(N){var O=N.getTimezoneOffset(),st=O<0?"+":"-",pt=Math.floor(Math.abs(O/60)),xt=Math.abs(O%60),zt=[st,W(pt),"'",W(xt),"'"].join("");return["D:",N.getFullYear(),W(N.getMonth()+1),W(N.getDate()),W(N.getHours()),W(N.getMinutes()),W(N.getSeconds()),zt].join("")},Tt=b.__private__.convertPDFDateToDate=function(N){var O=parseInt(N.substr(2,4),10),st=parseInt(N.substr(6,2),10)-1,pt=parseInt(N.substr(8,2),10),xt=parseInt(N.substr(10,2),10),zt=parseInt(N.substr(12,2),10),Ht=parseInt(N.substr(14,2),10);return new Date(O,st,pt,xt,zt,Ht,0)},X=b.__private__.setCreationDate=function(N){var O;if(N===void 0&&(N=new Date),N instanceof Date)O=dt(N);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(N))throw new Error("Invalid argument passed to jsPDF.setCreationDate");O=N}return yt=O},P=b.__private__.getCreationDate=function(N){var O=yt;return N==="jsDate"&&(O=Tt(yt)),O};b.setCreationDate=function(N){return X(N),this},b.getCreationDate=function(N){return P(N)};var q,W=b.__private__.padd2=function(N){return("0"+parseInt(N)).slice(-2)},lt=b.__private__.padd2Hex=function(N){return("00"+(N=N.toString())).substr(N.length)},ht=0,ft=[],Ct=[],_t=0,Dt=[],$t=[],Wt=!1,Xt=Ct;b.__private__.setCustomOutputDestination=function(N){Wt=!0,Xt=N};var se=function(N){Wt||(Xt=N)};b.__private__.resetCustomOutputDestination=function(){Wt=!1,Xt=Ct};var et=b.__private__.out=function(N){return N=N.toString(),_t+=N.length+1,Xt.push(N),Xt},Qt=b.__private__.write=function(N){return et(arguments.length===1?N.toString():Array.prototype.join.call(arguments," "))},Ke=b.__private__.getArrayBuffer=function(N){for(var O=N.length,st=new ArrayBuffer(O),pt=new Uint8Array(st);O--;)pt[O]=N.charCodeAt(O);return st},Ce=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];b.__private__.getStandardFonts=function(){return Ce};var Ut=e.fontSize||16;b.__private__.setFontSize=b.setFontSize=function(N){return Ut=z===D?N/qe:N,this};var oe,Zt=b.__private__.getFontSize=b.getFontSize=function(){return z===L?Ut:Ut*qe},ie=e.R2L||!1;b.__private__.setR2L=b.setR2L=function(N){return ie=N,this},b.__private__.getR2L=b.getR2L=function(){return ie};var xe,ye=b.__private__.setZoomMode=function(N){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(N))oe=N;else if(isNaN(N)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(N)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+N+'" is not recognized.');oe=N}else oe=parseInt(N,10)};b.__private__.getZoomMode=function(){return oe};var nn,Ue=b.__private__.setPageMode=function(N){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(N)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+N+'" is not recognized.');xe=N};b.__private__.getPageMode=function(){return xe};var on=b.__private__.setLayoutMode=function(N){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(N)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+N+'" is not recognized.');nn=N};b.__private__.getLayoutMode=function(){return nn},b.__private__.setDisplayMode=b.setDisplayMode=function(N,O,st){return ye(N),on(O),Ue(st),this};var je={title:"",subject:"",author:"",keywords:"",creator:""};b.__private__.getDocumentProperty=function(N){if(Object.keys(je).indexOf(N)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return je[N]},b.__private__.getDocumentProperties=function(){return je},b.__private__.setDocumentProperties=b.setProperties=b.setDocumentProperties=function(N){for(var O in je)je.hasOwnProperty(O)&&N[O]&&(je[O]=N[O]);return this},b.__private__.setDocumentProperty=function(N,O){if(Object.keys(je).indexOf(N)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return je[N]=O};var le,qe,pe,Gn,sn,Jt={},Re={},rn=[],we={},Ln={},_e={},Ee={},_n=null,Se=0,be=[],un=new f4(b),nr=e.hotfixes||[],ki={},br={},Li=[],Ne=function N(O,st,pt,xt,zt,Ht){if(!(this instanceof N))return new N(O,st,pt,xt,zt,Ht);isNaN(O)&&(O=1),isNaN(st)&&(st=0),isNaN(pt)&&(pt=0),isNaN(xt)&&(xt=1),isNaN(zt)&&(zt=0),isNaN(Ht)&&(Ht=0),this._matrix=[O,st,pt,xt,zt,Ht]};Object.defineProperty(Ne.prototype,"sx",{get:function(){return this._matrix[0]},set:function(N){this._matrix[0]=N}}),Object.defineProperty(Ne.prototype,"shy",{get:function(){return this._matrix[1]},set:function(N){this._matrix[1]=N}}),Object.defineProperty(Ne.prototype,"shx",{get:function(){return this._matrix[2]},set:function(N){this._matrix[2]=N}}),Object.defineProperty(Ne.prototype,"sy",{get:function(){return this._matrix[3]},set:function(N){this._matrix[3]=N}}),Object.defineProperty(Ne.prototype,"tx",{get:function(){return this._matrix[4]},set:function(N){this._matrix[4]=N}}),Object.defineProperty(Ne.prototype,"ty",{get:function(){return this._matrix[5]},set:function(N){this._matrix[5]=N}}),Object.defineProperty(Ne.prototype,"a",{get:function(){return this._matrix[0]},set:function(N){this._matrix[0]=N}}),Object.defineProperty(Ne.prototype,"b",{get:function(){return this._matrix[1]},set:function(N){this._matrix[1]=N}}),Object.defineProperty(Ne.prototype,"c",{get:function(){return this._matrix[2]},set:function(N){this._matrix[2]=N}}),Object.defineProperty(Ne.prototype,"d",{get:function(){return this._matrix[3]},set:function(N){this._matrix[3]=N}}),Object.defineProperty(Ne.prototype,"e",{get:function(){return this._matrix[4]},set:function(N){this._matrix[4]=N}}),Object.defineProperty(Ne.prototype,"f",{get:function(){return this._matrix[5]},set:function(N){this._matrix[5]=N}}),Object.defineProperty(Ne.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ne.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ne.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ne.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ne.prototype.join=function(N){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(H).join(N)},Ne.prototype.multiply=function(N){var O=N.sx*this.sx+N.shy*this.shx,st=N.sx*this.shy+N.shy*this.sy,pt=N.shx*this.sx+N.sy*this.shx,xt=N.shx*this.shy+N.sy*this.sy,zt=N.tx*this.sx+N.ty*this.shx+this.tx,Ht=N.tx*this.shy+N.ty*this.sy+this.ty;return new Ne(O,st,pt,xt,zt,Ht)},Ne.prototype.decompose=function(){var N=this.sx,O=this.shy,st=this.shx,pt=this.sy,xt=this.tx,zt=this.ty,Ht=Math.sqrt(N*N+O*O),ne=(N/=Ht)*st+(O/=Ht)*pt;st-=N*ne,pt-=O*ne;var fe=Math.sqrt(st*st+pt*pt);return ne/=fe,N*(pt/=fe)<O*(st/=fe)&&(N=-N,O=-O,ne=-ne,Ht=-Ht),{scale:new Ne(Ht,0,0,fe,0,0),translate:new Ne(1,0,0,1,xt,zt),rotate:new Ne(N,O,-O,N,0,0),skew:new Ne(1,0,ne,1,0,0)}},Ne.prototype.toString=function(N){return this.join(" ")},Ne.prototype.inversed=function(){var N=this.sx,O=this.shy,st=this.shx,pt=this.sy,xt=this.tx,zt=this.ty,Ht=1/(N*pt-O*st),ne=pt*Ht,fe=-O*Ht,Oe=-st*Ht,R=N*Ht;return new Ne(ne,fe,Oe,R,-ne*xt-Oe*zt,-fe*xt-R*zt)},Ne.prototype.applyToPoint=function(N){var O=N.x*this.sx+N.y*this.shx+this.tx,st=N.x*this.shy+N.y*this.sy+this.ty;return new Ys(O,st)},Ne.prototype.applyToRectangle=function(N){var O=this.applyToPoint(N),st=this.applyToPoint(new Ys(N.x+N.w,N.y+N.h));return new Cr(O.x,O.y,st.x-O.x,st.y-O.y)},Ne.prototype.clone=function(){var N=this.sx,O=this.shy,st=this.shx,pt=this.sy,xt=this.tx,zt=this.ty;return new Ne(N,O,st,pt,xt,zt)},b.Matrix=Ne;var bi=b.matrixMult=function(N,O){return O.multiply(N)},xr=new Ne(1,0,0,1,0,0);b.unitMatrix=b.identityMatrix=xr;var Yn=function(N,O){if(!Ln[N]){var st=(O instanceof au?"Sh":"P")+(Object.keys(we).length+1).toString(10);O.id=st,Ln[N]=st,we[st]=O,un.publish("addPattern",O)}};b.ShadingPattern=au,b.TilingPattern=Nh,b.addShadingPattern=function(N,O){return Q("addShadingPattern()"),Yn(N,O),this},b.beginTilingPattern=function(N){Q("beginTilingPattern()"),Va(N.boundingBox[0],N.boundingBox[1],N.boundingBox[2]-N.boundingBox[0],N.boundingBox[3]-N.boundingBox[1],N.matrix)},b.endTilingPattern=function(N,O){Q("endTilingPattern()"),O.stream=$t[q].join(`
`),Yn(N,O),un.publish("endTilingPattern",O),Li.pop().restore()};var _s,On=b.__private__.newObject=function(){var N=ui();return ti(N,!0),N},ui=b.__private__.newObjectDeferred=function(){return ht++,ft[ht]=function(){return _t},ht},ti=function(N,O){return O=typeof O=="boolean"&&O,ft[N]=_t,O&&et(N+" 0 obj"),N},pa=b.__private__.newAdditionalObject=function(){var N={objId:ui(),content:""};return Dt.push(N),N},Wn=ui(),jn=ui(),En=b.__private__.decodeColorString=function(N){var O=N.split(" ");if(O.length!==2||O[1]!=="g"&&O[1]!=="G")O.length!==5||O[4]!=="k"&&O[4]!=="K"||(O=[(1-O[0])*(1-O[3]),(1-O[1])*(1-O[3]),(1-O[2])*(1-O[3]),"r"]);else{var st=parseFloat(O[0]);O=[st,st,st,"r"]}for(var pt="#",xt=0;xt<3;xt++)pt+=("0"+Math.floor(255*parseFloat(O[xt])).toString(16)).slice(-2);return pt},Ji=b.__private__.encodeColorString=function(N){var O;typeof N=="string"&&(N={ch1:N});var st=N.ch1,pt=N.ch2,xt=N.ch3,zt=N.ch4,Ht=N.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof st=="string"&&st.charAt(0)!=="#"){var ne=new K_(st);if(ne.ok)st=ne.toHex();else if(!/^\d*\.?\d*$/.test(st))throw new Error('Invalid color "'+st+'" passed to jsPDF.encodeColorString.')}if(typeof st=="string"&&/^#[0-9A-Fa-f]{3}$/.test(st)&&(st="#"+st[1]+st[1]+st[2]+st[2]+st[3]+st[3]),typeof st=="string"&&/^#[0-9A-Fa-f]{6}$/.test(st)){var fe=parseInt(st.substr(1),16);st=fe>>16&255,pt=fe>>8&255,xt=255&fe}if(pt===void 0||zt===void 0&&st===pt&&pt===xt)O=typeof st=="string"?st+" "+Ht[0]:N.precision===2?F(st/255)+" "+Ht[0]:Y(st/255)+" "+Ht[0];else if(zt===void 0||In(zt)==="object"){if(zt&&!isNaN(zt.a)&&zt.a===0)return["1.","1.","1.",Ht[1]].join(" ");O=typeof st=="string"?[st,pt,xt,Ht[1]].join(" "):N.precision===2?[F(st/255),F(pt/255),F(xt/255),Ht[1]].join(" "):[Y(st/255),Y(pt/255),Y(xt/255),Ht[1]].join(" ")}else O=typeof st=="string"?[st,pt,xt,zt,Ht[2]].join(" "):N.precision===2?[F(st),F(pt),F(xt),F(zt),Ht[2]].join(" "):[Y(st),Y(pt),Y(xt),Y(zt),Ht[2]].join(" ");return O},ps=b.__private__.getFilters=function(){return c},js=b.__private__.putStream=function(N){var O=(N=N||{}).data||"",st=N.filters||ps(),pt=N.alreadyAppliedFilters||[],xt=N.addLength1||!1,zt=O.length,Ht=N.objectId,ne=function(Pe){return Pe};if(p!==null&&Ht===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");p!==null&&(ne=ni.encryptor(Ht,0));var fe={};st===!0&&(st=["FlateEncode"]);var Oe=N.additionalKeyValues||[],R=(fe=Ae.API.processDataByFilters!==void 0?Ae.API.processDataByFilters(O,st):{data:O,reverseChain:[]}).reverseChain+(Array.isArray(pt)?pt.join(" "):pt.toString());if(fe.data.length!==0&&(Oe.push({key:"Length",value:fe.data.length}),xt===!0&&Oe.push({key:"Length1",value:zt})),R.length!=0)if(R.split("/").length-1==1)Oe.push({key:"Filter",value:R});else{Oe.push({key:"Filter",value:"["+R+"]"});for(var Nt=0;Nt<Oe.length;Nt+=1)if(Oe[Nt].key==="DecodeParms"){for(var Lt=[],Me=0;Me<fe.reverseChain.split("/").length-1;Me+=1)Lt.push("null");Lt.push(Oe[Nt].value),Oe[Nt].value="["+Lt.join(" ")+"]"}}et("<<");for(var me=0;me<Oe.length;me++)et("/"+Oe[me].key+" "+Oe[me].value);et(">>"),fe.data.length!==0&&(et("stream"),et(ne(fe.data)),et("endstream"))},Xe=b.__private__.putPage=function(N){var O=N.number,st=N.data,pt=N.objId,xt=N.contentsObjId;ti(pt,!0),et("<</Type /Page"),et("/Parent "+N.rootDictionaryObjId+" 0 R"),et("/Resources "+N.resourceDictionaryObjId+" 0 R"),et("/MediaBox ["+parseFloat(H(N.mediaBox.bottomLeftX))+" "+parseFloat(H(N.mediaBox.bottomLeftY))+" "+H(N.mediaBox.topRightX)+" "+H(N.mediaBox.topRightY)+"]"),N.cropBox!==null&&et("/CropBox ["+H(N.cropBox.bottomLeftX)+" "+H(N.cropBox.bottomLeftY)+" "+H(N.cropBox.topRightX)+" "+H(N.cropBox.topRightY)+"]"),N.bleedBox!==null&&et("/BleedBox ["+H(N.bleedBox.bottomLeftX)+" "+H(N.bleedBox.bottomLeftY)+" "+H(N.bleedBox.topRightX)+" "+H(N.bleedBox.topRightY)+"]"),N.trimBox!==null&&et("/TrimBox ["+H(N.trimBox.bottomLeftX)+" "+H(N.trimBox.bottomLeftY)+" "+H(N.trimBox.topRightX)+" "+H(N.trimBox.topRightY)+"]"),N.artBox!==null&&et("/ArtBox ["+H(N.artBox.bottomLeftX)+" "+H(N.artBox.bottomLeftY)+" "+H(N.artBox.topRightX)+" "+H(N.artBox.topRightY)+"]"),typeof N.userUnit=="number"&&N.userUnit!==1&&et("/UserUnit "+N.userUnit),un.publish("putPage",{objId:pt,pageContext:be[O],pageNumber:O,page:st}),et("/Contents "+xt+" 0 R"),et(">>"),et("endobj");var zt=st.join(`
`);return z===D&&(zt+=`
Q`),ti(xt,!0),js({data:zt,filters:ps(),objectId:xt}),et("endobj"),pt},Vs=b.__private__.putPages=function(){var N,O,st=[];for(N=1;N<=Se;N++)be[N].objId=ui(),be[N].contentsObjId=ui();for(N=1;N<=Se;N++)st.push(Xe({number:N,data:$t[N],objId:be[N].objId,contentsObjId:be[N].contentsObjId,mediaBox:be[N].mediaBox,cropBox:be[N].cropBox,bleedBox:be[N].bleedBox,trimBox:be[N].trimBox,artBox:be[N].artBox,userUnit:be[N].userUnit,rootDictionaryObjId:Wn,resourceDictionaryObjId:jn}));ti(Wn,!0),et("<</Type /Pages");var pt="/Kids [";for(O=0;O<Se;O++)pt+=st[O]+" 0 R ";et(pt+"]"),et("/Count "+Se),et(">>"),et("endobj"),un.publish("postPutPages")},Hs=function(N){un.publish("putFont",{font:N,out:et,newObject:On,putStream:js}),N.isAlreadyPutted!==!0&&(N.objectNumber=On(),et("<<"),et("/Type /Font"),et("/BaseFont /"+vh(N.postScriptName)),et("/Subtype /Type1"),typeof N.encoding=="string"&&et("/Encoding /"+N.encoding),et("/FirstChar 32"),et("/LastChar 255"),et(">>"),et("endobj"))},$r=function(N){N.objectNumber=On();var O=[];O.push({key:"Type",value:"/XObject"}),O.push({key:"Subtype",value:"/Form"}),O.push({key:"BBox",value:"["+[H(N.x),H(N.y),H(N.x+N.width),H(N.y+N.height)].join(" ")+"]"}),O.push({key:"Matrix",value:"["+N.matrix.toString()+"]"});var st=N.pages[1].join(`
`);js({data:st,additionalKeyValues:O,objectId:N.objectNumber}),et("endobj")},Es=function(N,O){O||(O=21);var st=On(),pt=(function(Ht,ne){var fe,Oe=[],R=1/(ne-1);for(fe=0;fe<1;fe+=R)Oe.push(fe);if(Oe.push(1),Ht[0].offset!=0){var Nt={offset:0,color:Ht[0].color};Ht.unshift(Nt)}if(Ht[Ht.length-1].offset!=1){var Lt={offset:1,color:Ht[Ht.length-1].color};Ht.push(Lt)}for(var Me="",me=0,Pe=0;Pe<Oe.length;Pe++){for(fe=Oe[Pe];fe>Ht[me+1].offset;)me++;var ge=Ht[me].offset,en=(fe-ge)/(Ht[me+1].offset-ge),ze=Ht[me].color,Nn=Ht[me+1].color;Me+=lt(Math.round((1-en)*ze[0]+en*Nn[0]).toString(16))+lt(Math.round((1-en)*ze[1]+en*Nn[1]).toString(16))+lt(Math.round((1-en)*ze[2]+en*Nn[2]).toString(16))}return Me.trim()})(N.colors,O),xt=[];xt.push({key:"FunctionType",value:"0"}),xt.push({key:"Domain",value:"[0.0 1.0]"}),xt.push({key:"Size",value:"["+O+"]"}),xt.push({key:"BitsPerSample",value:"8"}),xt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),js({data:pt,additionalKeyValues:xt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:st}),et("endobj"),N.objectNumber=On(),et("<< /ShadingType "+N.type),et("/ColorSpace /DeviceRGB");var zt="/Coords ["+H(parseFloat(N.coords[0]))+" "+H(parseFloat(N.coords[1]))+" ";N.type===2?zt+=H(parseFloat(N.coords[2]))+" "+H(parseFloat(N.coords[3])):zt+=H(parseFloat(N.coords[2]))+" "+H(parseFloat(N.coords[3]))+" "+H(parseFloat(N.coords[4]))+" "+H(parseFloat(N.coords[5])),et(zt+="]"),N.matrix&&et("/Matrix ["+N.matrix.toString()+"]"),et("/Function "+st+" 0 R"),et("/Extend [true true]"),et(">>"),et("endobj")},Ms=function(N,O){var st=ui(),pt=On();O.push({resourcesOid:st,objectOid:pt}),N.objectNumber=pt;var xt=[];xt.push({key:"Type",value:"/Pattern"}),xt.push({key:"PatternType",value:"1"}),xt.push({key:"PaintType",value:"1"}),xt.push({key:"TilingType",value:"1"}),xt.push({key:"BBox",value:"["+N.boundingBox.map(H).join(" ")+"]"}),xt.push({key:"XStep",value:H(N.xStep)}),xt.push({key:"YStep",value:H(N.yStep)}),xt.push({key:"Resources",value:st+" 0 R"}),N.matrix&&xt.push({key:"Matrix",value:"["+N.matrix.toString()+"]"}),js({data:N.stream,additionalKeyValues:xt,objectId:N.objectNumber}),et("endobj")},wr=function(N){for(var O in N.objectNumber=On(),et("<<"),N)switch(O){case"opacity":et("/ca "+F(N[O]));break;case"stroke-opacity":et("/CA "+F(N[O]))}et(">>"),et("endobj")},Sr=function(N){ti(N.resourcesOid,!0),et("<<"),et("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var O in et("/Font <<"),Jt)Jt.hasOwnProperty(O)&&(v===!1||v===!0&&S.hasOwnProperty(O))&&et("/"+O+" "+Jt[O].objectNumber+" 0 R");et(">>")})(),(function(){if(Object.keys(we).length>0){for(var O in et("/Shading <<"),we)we.hasOwnProperty(O)&&we[O]instanceof au&&we[O].objectNumber>=0&&et("/"+O+" "+we[O].objectNumber+" 0 R");un.publish("putShadingPatternDict"),et(">>")}})(),(function(O){if(Object.keys(we).length>0){for(var st in et("/Pattern <<"),we)we.hasOwnProperty(st)&&we[st]instanceof b.TilingPattern&&we[st].objectNumber>=0&&we[st].objectNumber<O&&et("/"+st+" "+we[st].objectNumber+" 0 R");un.publish("putTilingPatternDict"),et(">>")}})(N.objectOid),(function(){if(Object.keys(_e).length>0){var O;for(O in et("/ExtGState <<"),_e)_e.hasOwnProperty(O)&&_e[O].objectNumber>=0&&et("/"+O+" "+_e[O].objectNumber+" 0 R");un.publish("putGStateDict"),et(">>")}})(),(function(){for(var O in et("/XObject <<"),ki)ki.hasOwnProperty(O)&&ki[O].objectNumber>=0&&et("/"+O+" "+ki[O].objectNumber+" 0 R");un.publish("putXobjectDict"),et(">>")})(),et(">>"),et("endobj")},ei=function(N){Re[N.fontName]=Re[N.fontName]||{},Re[N.fontName][N.fontStyle]=N.id},go=function(N,O,st,pt,xt){var zt={id:"F"+(Object.keys(Jt).length+1).toString(10),postScriptName:N,fontName:O,fontStyle:st,encoding:pt,isStandardFont:xt||!1,metadata:{}};return un.publish("addFont",{font:zt,instance:this}),Jt[zt.id]=zt,ei(zt),zt.id},vn=b.__private__.pdfEscape=b.pdfEscape=function(N,O){return(function(st,pt){var xt,zt,Ht,ne,fe,Oe,R,Nt,Lt;if(Ht=(pt=pt||{}).sourceEncoding||"Unicode",fe=pt.outputEncoding,(pt.autoencode||fe)&&Jt[le].metadata&&Jt[le].metadata[Ht]&&Jt[le].metadata[Ht].encoding&&(ne=Jt[le].metadata[Ht].encoding,!fe&&Jt[le].encoding&&(fe=Jt[le].encoding),!fe&&ne.codePages&&(fe=ne.codePages[0]),typeof fe=="string"&&(fe=ne[fe]),fe)){for(R=!1,Oe=[],xt=0,zt=st.length;xt<zt;xt++)(Nt=fe[st.charCodeAt(xt)])?Oe.push(String.fromCharCode(Nt)):Oe.push(st[xt]),Oe[xt].charCodeAt(0)>>8&&(R=!0);st=Oe.join("")}for(xt=st.length;R===void 0&&xt!==0;)st.charCodeAt(xt-1)>>8&&(R=!0),xt--;if(!R)return st;for(Oe=pt.noBOM?[]:[254,255],xt=0,zt=st.length;xt<zt;xt++){if((Lt=(Nt=st.charCodeAt(xt))>>8)>>8)throw new Error("Character at position "+xt+" of string '"+st+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Oe.push(Lt),Oe.push(Nt-(Lt<<8))}return String.fromCharCode.apply(void 0,Oe)})(N,O).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ts=b.__private__.beginPage=function(N){$t[++Se]=[],be[Se]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(N[0]),topRightY:Number(N[1])}},ir(Se),se($t[q])},Nr=function(N,O){var st,pt,xt;switch(n=O||n,typeof N=="string"&&(st=E(N.toLowerCase()),Array.isArray(st)&&(pt=st[0],xt=st[1])),Array.isArray(N)&&(pt=N[0]*qe,xt=N[1]*qe),isNaN(pt)&&(pt=r[0],xt=r[1]),(pt>14400||xt>14400)&&(Zn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),pt=Math.min(14400,pt),xt=Math.min(14400,xt)),r=[pt,xt],n.substr(0,1)){case"l":xt>pt&&(r=[xt,pt]);break;case"p":pt>xt&&(r=[xt,pt])}Ts(r),De(qa),et(ys),wo!==0&&et(wo+" J"),Di!==0&&et(Di+" j"),un.publish("addPage",{pageNumber:Se})},vo=function(N){N>0&&N<=Se&&($t.splice(N,1),be.splice(N,1),Se--,q>Se&&(q=Se),this.setPage(q))},ir=function(N){N>0&&N<=Se&&(q=N)},tl=b.__private__.getNumberOfPages=b.getNumberOfPages=function(){return $t.length-1},yo=function(N,O,st){var pt,xt=void 0;return st=st||{},N=N!==void 0?N:Jt[le].fontName,O=O!==void 0?O:Jt[le].fontStyle,pt=N.toLowerCase(),Re[pt]!==void 0&&Re[pt][O]!==void 0?xt=Re[pt][O]:Re[N]!==void 0&&Re[N][O]!==void 0?xt=Re[N][O]:st.disableWarning===!1&&Zn.warn("Unable to look up font label for font '"+N+"', '"+O+"'. Refer to getFontList() for available fonts."),xt||st.noFallback||(xt=Re.times[O])==null&&(xt=Re.times.normal),xt},gs=b.__private__.putInfo=function(){var N=On(),O=function(pt){return pt};for(var st in p!==null&&(O=ni.encryptor(N,0)),et("<<"),et("/Producer ("+vn(O("jsPDF "+Ae.version))+")"),je)je.hasOwnProperty(st)&&je[st]&&et("/"+st.substr(0,1).toUpperCase()+st.substr(1)+" ("+vn(O(je[st]))+")");et("/CreationDate ("+vn(O(yt))+")"),et(">>"),et("endobj")},hi=b.__private__.putCatalog=function(N){var O=(N=N||{}).rootDictionaryObjId||Wn;switch(On(),et("<<"),et("/Type /Catalog"),et("/Pages "+O+" 0 R"),oe||(oe="fullwidth"),oe){case"fullwidth":et("/OpenAction [3 0 R /FitH null]");break;case"fullheight":et("/OpenAction [3 0 R /FitV null]");break;case"fullpage":et("/OpenAction [3 0 R /Fit]");break;case"original":et("/OpenAction [3 0 R /XYZ null null 1]");break;default:var st=""+oe;st.substr(st.length-1)==="%"&&(oe=parseInt(oe)/100),typeof oe=="number"&&et("/OpenAction [3 0 R /XYZ null null "+F(oe)+"]")}switch(nn||(nn="continuous"),nn){case"continuous":et("/PageLayout /OneColumn");break;case"single":et("/PageLayout /SinglePage");break;case"two":case"twoleft":et("/PageLayout /TwoColumnLeft");break;case"tworight":et("/PageLayout /TwoColumnRight")}xe&&et("/PageMode /"+xe),un.publish("putCatalog"),et(">>"),et("endobj")},sr=b.__private__.putTrailer=function(){et("trailer"),et("<<"),et("/Size "+(ht+1)),et("/Root "+ht+" 0 R"),et("/Info "+(ht-1)+" 0 R"),p!==null&&et("/Encrypt "+ni.oid+" 0 R"),et("/ID [ <"+J+"> <"+J+"> ]"),et(">>")},Ie=b.__private__.putHeader=function(){et("%PDF-"+_),et("%ºß¬à")},el=b.__private__.putXRef=function(){var N="0000000000";et("xref"),et("0 "+(ht+1)),et("0000000000 65535 f ");for(var O=1;O<=ht;O++)typeof ft[O]=="function"?et((N+ft[O]()).slice(-10)+" 00000 n "):ft[O]!==void 0?et((N+ft[O]).slice(-10)+" 00000 n "):et("0000000000 00000 n ")},rs=b.__private__.buildDocument=function(){var N;ht=0,_t=0,Ct=[],ft=[],Dt=[],Wn=ui(),jn=ui(),se(Ct),un.publish("buildDocument"),Ie(),Vs(),(function(){un.publish("putAdditionalObjects");for(var st=0;st<Dt.length;st++){var pt=Dt[st];ti(pt.objId,!0),et(pt.content),et("endobj")}un.publish("postPutAdditionalObjects")})(),N=[],(function(){for(var st in Jt)Jt.hasOwnProperty(st)&&(v===!1||v===!0&&S.hasOwnProperty(st))&&Hs(Jt[st])})(),(function(){var st;for(st in _e)_e.hasOwnProperty(st)&&wr(_e[st])})(),(function(){for(var st in ki)ki.hasOwnProperty(st)&&$r(ki[st])})(),(function(st){var pt;for(pt in we)we.hasOwnProperty(pt)&&(we[pt]instanceof au?Es(we[pt]):we[pt]instanceof Nh&&Ms(we[pt],st))})(N),un.publish("putResources"),N.forEach(Sr),Sr({resourcesOid:jn,objectOid:Number.MAX_SAFE_INTEGER}),un.publish("postPutResources"),p!==null&&(ni.oid=On(),et("<<"),et("/Filter /Standard"),et("/V "+ni.v),et("/R "+ni.r),et("/U <"+ni.toHexString(ni.U)+">"),et("/O <"+ni.toHexString(ni.O)+">"),et("/P "+ni.P),et(">>"),et("endobj")),gs(),hi();var O=_t;return el(),sr(),et("startxref"),et(""+O),et("%%EOF"),se($t[q]),Ct.join(`
`)},ga=b.__private__.getBlob=function(N){return new Blob([Ke(N)],{type:"application/pdf"})},va=b.output=b.__private__.output=(_s=function(N,O){switch(typeof(O=O||{})=="string"?O={filename:O}:O.filename=O.filename||"generated.pdf",N){case void 0:return rs();case"save":b.save(O.filename);break;case"arraybuffer":return Ke(rs());case"blob":return ga(rs());case"bloburi":case"bloburl":if($e.URL!==void 0&&typeof $e.URL.createObjectURL=="function")return $e.URL&&$e.URL.createObjectURL(ga(rs()))||void 0;Zn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var st="",pt=rs();try{st=u4(pt)}catch{st=u4(unescape(encodeURIComponent(pt)))}return"data:application/pdf;filename="+O.filename+";base64,"+st;case"pdfobjectnewwindow":if(Object.prototype.toString.call($e)==="[object Window]"){var xt="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",zt=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';O.pdfObjectUrl&&(xt=O.pdfObjectUrl,zt="");var Ht='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+xt+'"'+zt+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(O)+");<\/script></body></html>",ne=$e.open();return ne!==null&&ne.document.write(Ht),ne}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call($e)==="[object Window]"){var fe='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(O.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+O.filename+'" width="500px" height="400px" /></body></html>',Oe=$e.open();if(Oe!==null){Oe.document.write(fe);var R=this;Oe.document.documentElement.querySelector("#pdfViewer").onload=function(){Oe.document.title=O.filename,Oe.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(R.output("bloburl"))}}return Oe}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call($e)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Nt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",O)+'"></iframe></body></html>',Lt=$e.open();if(Lt!==null&&(Lt.document.write(Nt),Lt.document.title=O.filename),Lt||typeof safari>"u")return Lt;break;case"datauri":case"dataurl":return $e.document.location.href=this.output("datauristring",O);default:return null}},_s.foo=function(){try{return _s.apply(this,arguments)}catch(st){var N=st.stack||"";~N.indexOf(" at ")&&(N=N.split(" at ")[1]);var O="Error in function "+N.split(`
`)[0].split("<")[0]+": "+st.message;if(!$e.console)throw new Error(O);$e.console.error(O,st),$e.alert&&alert(O)}},_s.foo.bar=_s,_s.foo),as=function(N){return Array.isArray(nr)===!0&&nr.indexOf(N)>-1};switch(i){case"pt":qe=1;break;case"mm":qe=72/25.4;break;case"cm":qe=72/2.54;break;case"in":qe=72;break;case"px":qe=as("px_scaling")==1?.75:96/72;break;case"pc":case"em":qe=12;break;case"ex":qe=6;break;default:if(typeof i!="number")throw new Error("Invalid unit: "+i);qe=i}var ni=null;X(),K();var di=b.__private__.getPageInfo=b.getPageInfo=function(N){if(isNaN(N)||N%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:be[N].objId,pageNumber:N,pageContext:be[N]}},rr=b.__private__.getPageInfoByObjId=function(N){if(isNaN(N)||N%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var O in be)if(be[O].objId===N)break;return di(O)},vs=b.__private__.getCurrentPageInfo=b.getCurrentPageInfo=function(){return{objId:be[q].objId,pageNumber:q,pageContext:be[q]}};b.addPage=function(){return Nr.apply(this,arguments),this},b.setPage=function(){return ir.apply(this,arguments),se.call(this,$t[q]),this},b.insertPage=function(N){return this.addPage(),this.movePage(q,N),this},b.movePage=function(N,O){var st,pt;if(N>O){st=$t[N],pt=be[N];for(var xt=N;xt>O;xt--)$t[xt]=$t[xt-1],be[xt]=be[xt-1];$t[O]=st,be[O]=pt,this.setPage(O)}else if(N<O){st=$t[N],pt=be[N];for(var zt=N;zt<O;zt++)$t[zt]=$t[zt+1],be[zt]=be[zt+1];$t[O]=st,be[O]=pt,this.setPage(O)}return this},b.deletePage=function(){return vo.apply(this,arguments),this},b.__private__.text=b.text=function(N,O,st,pt,xt){var zt,Ht,ne,fe,Oe,R,Nt,Lt,Me,me=(pt=pt||{}).scope||this;if(typeof N=="number"&&typeof O=="number"&&(typeof st=="string"||Array.isArray(st))){var Pe=st;st=O,O=N,N=Pe}if(arguments[3]instanceof Ne==0?(ne=arguments[4],fe=arguments[5],In(Nt=arguments[3])==="object"&&Nt!==null||(typeof ne=="string"&&(fe=ne,ne=null),typeof Nt=="string"&&(fe=Nt,Nt=null),typeof Nt=="number"&&(ne=Nt,Nt=null),pt={flags:Nt,angle:ne,align:fe})):(Q("The transform parameter of text() with a Matrix value"),Me=xt),isNaN(O)||isNaN(st)||N==null)throw new Error("Invalid arguments passed to jsPDF.text");if(N.length===0)return me;var ge,en="",ze=typeof pt.lineHeightFactor=="number"?pt.lineHeightFactor:or,Nn=me.internal.scaleFactor;function Ye(An){return An=An.split("	").join(Array(pt.TabLen||9).join(" ")),vn(An,Nt)}function ii(An){for(var yn,Un=An.concat(),Ai=[],Ma=Un.length;Ma--;)typeof(yn=Un.shift())=="string"?Ai.push(yn):Array.isArray(An)&&(yn.length===1||yn[1]===void 0&&yn[2]===void 0)?Ai.push(yn[0]):Ai.push([yn[0],yn[1],yn[2]]);return Ai}function Jr(An,yn){var Un;if(typeof An=="string")Un=yn(An)[0];else if(Array.isArray(An)){for(var Ai,Ma,ia=An.concat(),ll=[],zc=ia.length;zc--;)typeof(Ai=ia.shift())=="string"?ll.push(yn(Ai)[0]):Array.isArray(Ai)&&typeof Ai[0]=="string"&&(Ma=yn(Ai[0],Ai[1],Ai[2]),ll.push([Ma[0],Ma[1],Ma[2]]));Un=ll}return Un}var cr=!1,ta=!0;if(typeof N=="string")cr=!0;else if(Array.isArray(N)){var al=N.concat();Ht=[];for(var $a,ts=al.length;ts--;)(typeof($a=al.shift())!="string"||Array.isArray($a)&&typeof $a[0]!="string")&&(ta=!1);cr=ta}if(cr===!1)throw new Error('Type of text must be string or Array. "'+N+'" is not recognized.');typeof N=="string"&&(N=N.match(/[\r?\n]/)?N.split(/\r\n|\r|\n/g):[N]);var Ao=Ut/me.internal.scaleFactor,Co=Ao*(ze-1);switch(pt.baseline){case"bottom":st-=Co;break;case"top":st+=Ao-Co;break;case"hanging":st+=Ao-2*Co;break;case"middle":st+=Ao/2-Co}if((R=pt.maxWidth||0)>0&&(typeof N=="string"?N=me.splitTextToSize(N,R):Object.prototype.toString.call(N)==="[object Array]"&&(N=N.reduce(function(An,yn){return An.concat(me.splitTextToSize(yn,R))},[]))),zt={text:N,x:O,y:st,options:pt,mutex:{pdfEscape:vn,activeFontKey:le,fonts:Jt,activeFontSize:Ut}},un.publish("preProcessText",zt),N=zt.text,ne=(pt=zt.options).angle,Me instanceof Ne==0&&ne&&typeof ne=="number"){ne*=Math.PI/180,pt.rotationDirection===0&&(ne=-ne),z===D&&(ne=-ne);var Il=Math.cos(ne),Na=Math.sin(ne);Me=new Ne(Il,Na,-Na,Il,0,0)}else ne&&ne instanceof Ne&&(Me=ne);z!==D||Me||(Me=xr),(Oe=pt.charSpace||Ri)!==void 0&&(en+=H(ot(Oe))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Lt=pt.horizontalScale)!==void 0&&(en+=H(100*Lt)+` Tz
`),pt.lang;var Ls=-1,Ga=pt.renderingMode!==void 0?pt.renderingMode:pt.stroke,Ul=me.internal.getCurrentPageInfo().pageContext;switch(Ga){case 0:case!1:case"fill":Ls=0;break;case 1:case!0:case"stroke":Ls=1;break;case 2:case"fillThenStroke":Ls=2;break;case 3:case"invisible":Ls=3;break;case 4:case"fillAndAddForClipping":Ls=4;break;case 5:case"strokeAndAddPathForClipping":Ls=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Ls=6;break;case 7:case"addToPathForClipping":Ls=7}var Dc=Ul.usedRenderingMode!==void 0?Ul.usedRenderingMode:-1;Ls!==-1?en+=Ls+` Tr
`:Dc!==-1&&(en+=`0 Tr
`),Ls!==-1&&(Ul.usedRenderingMode=Ls),fe=pt.align||"left";var ur,ea=Ut*ze,Ya=me.internal.pageSize.getWidth(),Oc=Jt[le];Oe=pt.charSpace||Ri,R=pt.maxWidth||0,Nt=Object.assign({autoencode:!0,noBOM:!0},pt.flags);var na=[],_o=function(An){return me.getStringUnitWidth(An,{font:Oc,charSpace:Oe,fontSize:Ut,doKerning:!1})*Ut/Nn};if(Object.prototype.toString.call(N)==="[object Array]"){var Ws;Ht=ii(N),fe!=="left"&&(ur=Ht.map(_o));var Ps,Aa=0;if(fe==="right"){O-=ur[0],N=[],ts=Ht.length;for(var Ca=0;Ca<ts;Ca++)Ca===0?(Ps=Mn(O),Ws=Si(st)):(Ps=ot(Aa-ur[Ca]),Ws=-ea),N.push([Ht[Ca],Ps,Ws]),Aa=ur[Ca]}else if(fe==="center"){O-=ur[0]/2,N=[],ts=Ht.length;for(var Wa=0;Wa<ts;Wa++)Wa===0?(Ps=Mn(O),Ws=Si(st)):(Ps=ot((Aa-ur[Wa])/2),Ws=-ea),N.push([Ht[Wa],Ps,Ws]),Aa=ur[Wa]}else if(fe==="left"){N=[],ts=Ht.length;for(var ql=0;ql<ts;ql++)N.push(Ht[ql])}else if(fe==="justify"&&Oc.encoding==="Identity-H"){N=[],ts=Ht.length,R=R!==0?R:Ya;for(var Vl=0,Ni=0;Ni<ts;Ni++)if(Ws=Ni===0?Si(st):-ea,Ps=Ni===0?Mn(O):Vl,Ni<ts-1){var _u=ot((R-ur[Ni])/(Ht[Ni].split(" ").length-1)),_a=Ht[Ni].split(" ");N.push([_a[0]+" ",Ps,Ws]),Vl=0;for(var ja=1;ja<_a.length;ja++){var os=(_o(_a[ja-1]+" "+_a[ja])-_o(_a[ja]))*Nn+_u;ja==_a.length-1?N.push([_a[ja],os,0]):N.push([_a[ja]+" ",os,0]),Vl-=os}}else N.push([Ht[Ni],Ps,Ws]);N.push(["",Vl,0])}else{if(fe!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(N=[],ts=Ht.length,R=R!==0?R:Ya,Ni=0;Ni<ts;Ni++){Ws=Ni===0?Si(st):-ea,Ps=Ni===0?Mn(O):0;var Ka=Ht[Ni].split(" ").length-1,Hl=Ka>0?(R-ur[Ni])/Ka:0;Ni<ts-1?na.push(H(ot(Hl))):na.push(0),N.push([Ht[Ni],Ps,Ws])}}}(typeof pt.R2L=="boolean"?pt.R2L:ie)===!0&&(N=Jr(N,function(An,yn,Un){return[An.split("").reverse().join(""),yn,Un]})),zt={text:N,x:O,y:st,options:pt,mutex:{pdfEscape:vn,activeFontKey:le,fonts:Jt,activeFontSize:Ut}},un.publish("postProcessText",zt),N=zt.text,ge=zt.mutex.isHex||!1;var $l=Jt[le].encoding;$l!=="WinAnsiEncoding"&&$l!=="StandardEncoding"||(N=Jr(N,function(An,yn,Un){return[Ye(An),yn,Un]})),Ht=ii(N),N=[];for(var Xa,Qa,Ea,ol=Array.isArray(Ht[0])?1:0,hr="",Za=function(An,yn,Un){var Ai="";return Un instanceof Ne?(Un=typeof pt.angle=="number"?bi(Un,new Ne(1,0,0,1,An,yn)):bi(new Ne(1,0,0,1,An,yn),Un),z===D&&(Un=bi(new Ne(1,0,0,-1,0,0),Un)),Ai=Un.join(" ")+` Tm
`):Ai=H(An)+" "+H(yn)+` Td
`,Ai},bs=0;bs<Ht.length;bs++){switch(hr="",ol){case 1:Ea=(ge?"<":"(")+Ht[bs][0]+(ge?">":")"),Xa=parseFloat(Ht[bs][1]),Qa=parseFloat(Ht[bs][2]);break;case 0:Ea=(ge?"<":"(")+Ht[bs]+(ge?">":")"),Xa=Mn(O),Qa=Si(st)}na!==void 0&&na[bs]!==void 0&&(hr=na[bs]+` Tw
`),bs===0?N.push(hr+Za(Xa,Qa,Me)+Ea):ol===0?N.push(hr+Ea):ol===1&&N.push(hr+Za(Xa,Qa,Me)+Ea)}N=ol===0?N.join(` Tj
T* `):N.join(` Tj
`),N+=` Tj
`;var jr=`BT
/`;return jr+=le+" "+Ut+` Tf
`,jr+=H(Ut*ze)+` TL
`,jr+=lr+`
`,jr+=en,jr+=N,et(jr+="ET"),S[le]=!0,me};var Gr=b.__private__.clip=b.clip=function(N){return et(N==="evenodd"?"W*":"W"),this};b.clipEvenOdd=function(){return Gr("evenodd")},b.__private__.discardPath=b.discardPath=function(){return et("n"),this};var Hi=b.__private__.isValidStyle=function(N){var O=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(N)!==-1&&(O=!0),O};b.__private__.setDefaultPathOperation=b.setDefaultPathOperation=function(N){return Hi(N)&&(d=N),this};var nl=b.__private__.getStyle=b.getStyle=function(N){var O=d;switch(N){case"D":case"S":O="S";break;case"F":O="f";break;case"FD":case"DF":O="B";break;case"f":case"f*":case"B":case"B*":O=N}return O},ar=b.close=function(){return et("h"),this};b.stroke=function(){return et("S"),this},b.fill=function(N){return $s("f",N),this},b.fillEvenOdd=function(N){return $s("f*",N),this},b.fillStroke=function(N){return $s("B",N),this},b.fillStrokeEvenOdd=function(N){return $s("B*",N),this};var $s=function(N,O){In(O)==="object"?Pi(O,N):et(N)},xi=function(N){N===null||z===D&&N===void 0||(N=nl(N),et(N))};function il(N,O,st,pt,xt){var zt=new Nh(O||this.boundingBox,st||this.xStep,pt||this.yStep,this.gState,xt||this.matrix);zt.stream=this.stream;var Ht=N+"$$"+this.cloneIndex+++"$$";return Yn(Ht,zt),zt}var Pi=function(N,O){var st=Ln[N.key],pt=we[st];if(pt instanceof au)et("q"),et(ya(O)),pt.gState&&b.setGState(pt.gState),et(N.matrix.toString()+" cm"),et("/"+st+" sh"),et("Q");else if(pt instanceof Nh){var xt=new Ne(1,0,0,-1,0,ks());N.matrix&&(xt=xt.multiply(N.matrix||xr),st=il.call(pt,N.key,N.boundingBox,N.xStep,N.yStep,xt).id),et("q"),et("/Pattern cs"),et("/"+st+" scn"),pt.gState&&b.setGState(pt.gState),et(O),et("Q")}},ya=function(N){switch(N){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Yr=b.moveTo=function(N,O){return et(H(ot(N))+" "+H(tt(O))+" m"),this},Ua=b.lineTo=function(N,O){return et(H(ot(N))+" "+H(tt(O))+" l"),this},wi=b.curveTo=function(N,O,st,pt,xt,zt){return et([H(ot(N)),H(tt(O)),H(ot(st)),H(tt(pt)),H(ot(xt)),H(tt(zt)),"c"].join(" ")),this};b.__private__.line=b.line=function(N,O,st,pt,xt){if(isNaN(N)||isNaN(O)||isNaN(st)||isNaN(pt)||!Hi(xt))throw new Error("Invalid arguments passed to jsPDF.line");return z===L?this.lines([[st-N,pt-O]],N,O,[1,1],xt||"S"):this.lines([[st-N,pt-O]],N,O,[1,1]).stroke()},b.__private__.lines=b.lines=function(N,O,st,pt,xt,zt){var Ht,ne,fe,Oe,R,Nt,Lt,Me,me,Pe,ge,en;if(typeof N=="number"&&(en=st,st=O,O=N,N=en),pt=pt||[1,1],zt=zt||!1,isNaN(O)||isNaN(st)||!Array.isArray(N)||!Array.isArray(pt)||!Hi(xt)||typeof zt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Yr(O,st),Ht=pt[0],ne=pt[1],Oe=N.length,Pe=O,ge=st,fe=0;fe<Oe;fe++)(R=N[fe]).length===2?(Pe=R[0]*Ht+Pe,ge=R[1]*ne+ge,Ua(Pe,ge)):(Nt=R[0]*Ht+Pe,Lt=R[1]*ne+ge,Me=R[2]*Ht+Pe,me=R[3]*ne+ge,Pe=R[4]*Ht+Pe,ge=R[5]*ne+ge,wi(Nt,Lt,Me,me,Pe,ge));return zt&&ar(),xi(xt),this},b.path=function(N){for(var O=0;O<N.length;O++){var st=N[O],pt=st.c;switch(st.op){case"m":Yr(pt[0],pt[1]);break;case"l":Ua(pt[0],pt[1]);break;case"c":wi.apply(this,pt);break;case"h":ar()}}return this},b.__private__.rect=b.rect=function(N,O,st,pt,xt){if(isNaN(N)||isNaN(O)||isNaN(st)||isNaN(pt)||!Hi(xt))throw new Error("Invalid arguments passed to jsPDF.rect");return z===L&&(pt=-pt),et([H(ot(N)),H(tt(O)),H(ot(st)),H(ot(pt)),"re"].join(" ")),xi(xt),this},b.__private__.triangle=b.triangle=function(N,O,st,pt,xt,zt,Ht){if(isNaN(N)||isNaN(O)||isNaN(st)||isNaN(pt)||isNaN(xt)||isNaN(zt)||!Hi(Ht))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[st-N,pt-O],[xt-st,zt-pt],[N-xt,O-zt]],N,O,[1,1],Ht,!0),this},b.__private__.roundedRect=b.roundedRect=function(N,O,st,pt,xt,zt,Ht){if(isNaN(N)||isNaN(O)||isNaN(st)||isNaN(pt)||isNaN(xt)||isNaN(zt)||!Hi(Ht))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ne=4/3*(Math.SQRT2-1);return xt=Math.min(xt,.5*st),zt=Math.min(zt,.5*pt),this.lines([[st-2*xt,0],[xt*ne,0,xt,zt-zt*ne,xt,zt],[0,pt-2*zt],[0,zt*ne,-xt*ne,zt,-xt,zt],[2*xt-st,0],[-xt*ne,0,-xt,-zt*ne,-xt,-zt],[0,2*zt-pt],[0,-zt*ne,xt*ne,-zt,xt,-zt]],N+xt,O,[1,1],Ht,!0),this},b.__private__.ellipse=b.ellipse=function(N,O,st,pt,xt){if(isNaN(N)||isNaN(O)||isNaN(st)||isNaN(pt)||!Hi(xt))throw new Error("Invalid arguments passed to jsPDF.ellipse");var zt=4/3*(Math.SQRT2-1)*st,Ht=4/3*(Math.SQRT2-1)*pt;return Yr(N+st,O),wi(N+st,O-Ht,N+zt,O-pt,N,O-pt),wi(N-zt,O-pt,N-st,O-Ht,N-st,O),wi(N-st,O+Ht,N-zt,O+pt,N,O+pt),wi(N+zt,O+pt,N+st,O+Ht,N+st,O),xi(xt),this},b.__private__.circle=b.circle=function(N,O,st,pt){if(isNaN(N)||isNaN(O)||isNaN(st)||!Hi(pt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(N,O,st,st,pt)},b.setFont=function(N,O,st){return st&&(O=nt(O,st)),le=yo(N,O,{disableWarning:!1}),this};var Gs=b.__private__.getFont=b.getFont=function(){return Jt[yo.apply(b,arguments)]};b.__private__.getFontList=b.getFontList=function(){var N,O,st={};for(N in Re)if(Re.hasOwnProperty(N))for(O in st[N]=[],Re[N])Re[N].hasOwnProperty(O)&&st[N].push(O);return st},b.addFont=function(N,O,st,pt,xt){var zt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&zt.indexOf(arguments[3])!==-1?xt=arguments[3]:arguments[3]&&zt.indexOf(arguments[3])==-1&&(st=nt(st,pt)),go.call(this,N,O,st,xt=xt||"Identity-H")};var or,qa=e.lineWidth||.200025,ba=b.__private__.getLineWidth=b.getLineWidth=function(){return qa},De=b.__private__.setLineWidth=b.setLineWidth=function(N){return qa=N,et(H(ot(N))+" w"),this};b.__private__.setLineDash=Ae.API.setLineDash=Ae.API.setLineDashPattern=function(N,O){if(N=N||[],O=O||0,isNaN(O)||!Array.isArray(N))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return N=N.map(function(st){return H(ot(st))}).join(" "),O=H(ot(O)),et("["+N+"] "+O+" d"),this};var sl=b.__private__.getLineHeight=b.getLineHeight=function(){return Ut*or};b.__private__.getLineHeight=b.getLineHeight=function(){return Ut*or};var bo=b.__private__.setLineHeightFactor=b.setLineHeightFactor=function(N){return typeof(N=N||1.15)=="number"&&(or=N),this},rl=b.__private__.getLineHeightFactor=b.getLineHeightFactor=function(){return or};bo(e.lineHeight);var Mn=b.__private__.getHorizontalCoordinate=function(N){return ot(N)},Si=b.__private__.getVerticalCoordinate=function(N){return z===D?N:be[q].mediaBox.topRightY-be[q].mediaBox.bottomLeftY-ot(N)},xo=b.__private__.getHorizontalCoordinateString=b.getHorizontalCoordinateString=function(N){return H(Mn(N))},xa=b.__private__.getVerticalCoordinateString=b.getVerticalCoordinateString=function(N){return H(Si(N))},ys=e.strokeColor||"0 G";b.__private__.getStrokeColor=b.getDrawColor=function(){return En(ys)},b.__private__.setStrokeColor=b.setDrawColor=function(N,O,st,pt){return ys=Ji({ch1:N,ch2:O,ch3:st,ch4:pt,pdfColorType:"draw",precision:2}),et(ys),this};var wa=e.fillColor||"0 g";b.__private__.getFillColor=b.getFillColor=function(){return En(wa)},b.__private__.setFillColor=b.setFillColor=function(N,O,st,pt){return wa=Ji({ch1:N,ch2:O,ch3:st,ch4:pt,pdfColorType:"fill",precision:2}),et(wa),this};var lr=e.textColor||"0 g",Wr=b.__private__.getTextColor=b.getTextColor=function(){return En(lr)};b.__private__.setTextColor=b.setTextColor=function(N,O,st,pt){return lr=Ji({ch1:N,ch2:O,ch3:st,ch4:pt,pdfColorType:"text",precision:3}),this};var Ri=e.charSpace,Sa=b.__private__.getCharSpace=b.getCharSpace=function(){return parseFloat(Ri||0)};b.__private__.setCharSpace=b.setCharSpace=function(N){if(isNaN(N))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ri=N,this};var wo=0;b.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},b.__private__.setLineCap=b.setLineCap=function(N){var O=b.CapJoinStyles[N];if(O===void 0)throw new Error("Line cap style of '"+N+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return wo=O,et(O+" J"),this};var Di=0;b.__private__.setLineJoin=b.setLineJoin=function(N){var O=b.CapJoinStyles[N];if(O===void 0)throw new Error("Line join style of '"+N+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Di=O,et(O+" j"),this},b.__private__.setLineMiterLimit=b.__private__.setMiterLimit=b.setLineMiterLimit=b.setMiterLimit=function(N){if(N=N||0,isNaN(N))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return et(H(ot(N))+" M"),this},b.GState=Vp,b.setGState=function(N){(N=typeof N=="string"?_e[Ee[N]]:Ar(null,N)).equals(_n)||(et("/"+N.id+" gs"),_n=N)};var Ar=function(N,O){if(!N||!Ee[N]){var st=!1;for(var pt in _e)if(_e.hasOwnProperty(pt)&&_e[pt].equals(O)){st=!0;break}if(st)O=_e[pt];else{var xt="GS"+(Object.keys(_e).length+1).toString(10);_e[xt]=O,O.id=xt}return N&&(Ee[N]=O.id),un.publish("addGState",O),O}};b.addGState=function(N,O){return Ar(N,O),this},b.saveGraphicsState=function(){return et("q"),rn.push({key:le,size:Ut,color:lr}),this},b.restoreGraphicsState=function(){et("Q");var N=rn.pop();return le=N.key,Ut=N.size,lr=N.color,_n=null,this},b.setCurrentTransformationMatrix=function(N){return et(N.toString()+" cm"),this},b.comment=function(N){return et("#"+N),this};var Ys=function(N,O){var st=N||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return st},set:function(zt){isNaN(zt)||(st=parseFloat(zt))}});var pt=O||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return pt},set:function(zt){isNaN(zt)||(pt=parseFloat(zt))}});var xt="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return xt},set:function(zt){xt=zt.toString()}}),this},Cr=function(N,O,st,pt){Ys.call(this,N,O),this.type="rect";var xt=st||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return xt},set:function(Ht){isNaN(Ht)||(xt=parseFloat(Ht))}});var zt=pt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return zt},set:function(Ht){isNaN(Ht)||(zt=parseFloat(Ht))}}),this},_r=function(){this.page=Se,this.currentPage=q,this.pages=$t.slice(0),this.pagesContext=be.slice(0),this.x=pe,this.y=Gn,this.matrix=sn,this.width=Xr(q),this.height=So(q),this.outputDestination=Xt,this.id="",this.objectNumber=-1};_r.prototype.restore=function(){Se=this.page,q=this.currentPage,be=this.pagesContext,$t=this.pages,pe=this.x,Gn=this.y,sn=this.matrix,Ha(q,this.width),Qr(q,this.height),Xt=this.outputDestination};var Va=function(N,O,st,pt,xt){Li.push(new _r),Se=q=0,$t=[],pe=N,Gn=O,sn=xt,Ts([st,pt])};for(var Kr in b.beginFormObject=function(N,O,st,pt,xt){return Va(N,O,st,pt,xt),this},b.endFormObject=function(N){return(function(O){if(br[O])Li.pop().restore();else{var st=new _r,pt="Xo"+(Object.keys(ki).length+1).toString(10);st.id=pt,br[O]=pt,ki[pt]=st,un.publish("addFormObject",st),Li.pop().restore()}})(N),this},b.doFormObject=function(N,O){var st=ki[br[N]];return et("q"),et(O.toString()+" cm"),et("/"+st.id+" Do"),et("Q"),this},b.getFormObject=function(N){var O=ki[br[N]];return{x:O.x,y:O.y,width:O.width,height:O.height,matrix:O.matrix}},b.save=function(N,O){return N=N||"generated.pdf",(O=O||{}).returnPromise=O.returnPromise||!1,O.returnPromise===!1?(ru(ga(rs()),N),typeof ru.unload=="function"&&$e.setTimeout&&setTimeout(ru.unload,911),this):new Promise(function(st,pt){try{var xt=ru(ga(rs()),N);typeof ru.unload=="function"&&$e.setTimeout&&setTimeout(ru.unload,911),st(xt)}catch(zt){pt(zt.message)}})},Ae.API)Ae.API.hasOwnProperty(Kr)&&(Kr==="events"&&Ae.API.events.length?(function(N,O){var st,pt,xt;for(xt=O.length-1;xt!==-1;xt--)st=O[xt][0],pt=O[xt][1],N.subscribe.apply(N,[st].concat(typeof pt=="function"?[pt]:pt))})(un,Ae.API.events):b[Kr]=Ae.API[Kr]);function Xr(N){return be[N].mediaBox.topRightX-be[N].mediaBox.bottomLeftX}function Ha(N,O){be[N].mediaBox.topRightX=O+be[N].mediaBox.bottomLeftX}function So(N){return be[N].mediaBox.topRightY-be[N].mediaBox.bottomLeftY}function Qr(N,O){be[N].mediaBox.topRightY=O+be[N].mediaBox.bottomLeftY}var Zr=b.getPageWidth=function(N){return Xr(N=N||q)/qe},Fl=b.setPageWidth=function(N,O){Ha(N,O*qe)},ks=b.getPageHeight=function(N){return So(N=N||q)/qe},No=b.setPageHeight=function(N,O){Qr(N,O*qe)};return b.internal={pdfEscape:vn,getStyle:nl,getFont:Gs,getFontSize:Zt,getCharSpace:Sa,getTextColor:Wr,getLineHeight:sl,getLineHeightFactor:rl,getLineWidth:ba,write:Qt,getHorizontalCoordinate:Mn,getVerticalCoordinate:Si,getCoordinateString:xo,getVerticalCoordinateString:xa,collections:{},newObject:On,newAdditionalObject:pa,newObjectDeferred:ui,newObjectDeferredBegin:ti,getFilters:ps,putStream:js,events:un,scaleFactor:qe,pageSize:{getWidth:function(){return Zr(q)},setWidth:function(N){Fl(q,N)},getHeight:function(){return ks(q)},setHeight:function(N){No(q,N)}},encryptionOptions:p,encryption:ni,getEncryptor:function(N){return p!==null?ni.encryptor(N,0):function(O){return O}},output:va,getNumberOfPages:tl,get pages(){return $t},out:et,f2:F,f3:Y,getPageInfo:di,getPageInfoByObjId:rr,getCurrentPageInfo:vs,getPDFVersion:A,Point:Ys,Rectangle:Cr,Matrix:Ne,hasHotfix:as},Object.defineProperty(b.internal.pageSize,"width",{get:function(){return Zr(q)},set:function(N){Fl(q,N)},enumerable:!0,configurable:!0}),Object.defineProperty(b.internal.pageSize,"height",{get:function(){return ks(q)},set:function(N){No(q,N)},enumerable:!0,configurable:!0}),(function(N){for(var O=0,st=Ce.length;O<st;O++){var pt=go.call(this,N[O][0],N[O][1],N[O][2],Ce[O][3],!0);v===!1&&(S[pt]=!0);var xt=N[O][0].split("-");ei({id:pt,fontName:xt[0],fontStyle:xt[1]||""})}un.publish("addFonts",{fonts:Jt,dictionary:Re})}).call(b,Ce),le="F1",Nr(r,n),un.publish("initialized"),b}gh.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},gh.prototype.toHexString=function(e){return e.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},gh.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},gh.prototype.processOwnerPassword=function(e,t){return l2(o2(t).substr(0,5),e)},gh.prototype.encryptor=function(e,t){var n=o2(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(i){return l2(n,i)}},Vp.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||In(e)!==In(this))return!1;var i=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;i++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&i--;return i===0},Ae.API={events:[]},Ae.version="4.0.0";var qi=Ae.API,My=1,Cu=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},dh=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},Je=function(e){return e.toFixed(2)},yc=function(e){return e.toFixed(5)};qi.__acroform__={};var Hr=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},m4=function(e){return e*My},qo=function(e){var t=new J_,n=de.internal.getHeight(e)||0,i=de.internal.getWidth(e)||0;return t.BBox=[0,0,Number(Je(i)),Number(Je(n))],t},HU=qi.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},$U=qi.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},GU=qi.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},Wi=qi.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return GU(e,t-1)},Ki=qi.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return HU(e,t-1)},Xi=qi.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return $U(e,t-1)},YU=qi.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,i=t.internal.getVerticalCoordinate,r=e[0],o=e[1],c=e[2],u=e[3],h={};return h.lowerLeft_X=n(r)||0,h.lowerLeft_Y=i(o+u)||0,h.upperRight_X=n(r+c)||0,h.upperRight_Y=i(o)||0,[Number(Je(h.lowerLeft_X)),Number(Je(h.lowerLeft_Y)),Number(Je(h.upperRight_X)),Number(Je(h.upperRight_Y))]},WU=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=e._V||e.DV,i=c2(e,n),r=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+r+" "+Je(i.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(i.text),t.push("ET"),t.push("Q"),t.push("EMC");var o=qo(e);return o.scope=e.scope,o.stream=t.join(`
`),o}},c2=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,i={text:"",fontSize:""},r=(t=(t=t.substr(0,1)=="("?t.substr(1):t).substr(t.length-1)==")"?t.substr(0,t.length-1):t).split(" ");r=e.multiline?r.map(function(F){return F.split(`
`)}):r.map(function(F){return[F]});var o=n,c=de.internal.getHeight(e)||0;c=c<0?-c:c;var u=de.internal.getWidth(e)||0;u=u<0?-u:u;var h=function(F,Y,ot){if(F+1<r.length){var tt=Y+" "+r[F+1][0];return Xm(tt,e,ot).width<=u-4}return!1};o++;t:for(;o>0;){t="",o--;var d,p,v=Xm("3",e,o).height,S=e.multiline?c-o:(c-v)/2,b=S+=2,_=0,A=0,j=0;if(o<=0){t=`(...) Tj
`,t+="% Width of Text: "+Xm(t,e,o=12).width+", FieldWidth:"+u+`
`;break}for(var E="",L=0,D=0;D<r.length;D++)if(r.hasOwnProperty(D)){var z=!1;if(r[D].length!==1&&j!==r[D].length-1){if((v+2)*(L+2)+2>c)continue t;E+=r[D][j],z=!0,A=D,D--}else{E=(E+=r[D][j]+" ").substr(E.length-1)==" "?E.substr(0,E.length-1):E;var $=parseInt(D),ut=h($,E,o),nt=D>=r.length-1;if(ut&&!nt){E+=" ",j=0;continue}if(ut||nt){if(nt)A=$;else if(e.multiline&&(v+2)*(L+2)+2>c)continue t}else{if(!e.multiline||(v+2)*(L+2)+2>c)continue t;A=$}}for(var H="",Q=_;Q<=A;Q++){var ct=r[Q];if(e.multiline){if(Q===A){H+=ct[j]+" ",j=(j+1)%ct.length;continue}if(Q===_){H+=ct[ct.length-1]+" ";continue}}H+=ct[0]+" "}switch(H=H.substr(H.length-1)==" "?H.substr(0,H.length-1):H,p=Xm(H,e,o).width,e.textAlign){case"right":d=u-p-2;break;case"center":d=(u-p)/2;break;default:d=2}t+=Je(d)+" "+Je(b)+` Td
`,t+="("+Cu(H)+`) Tj
`,t+=-Je(d)+` 0 Td
`,b=-(o+2),p=0,_=z?A:A+1,L++,E=""}break}return i.text=t,i.fontSize=o,i},Xm=function(e,t,n){var i=t.scope.internal.getFont(t.fontName,t.fontStyle),r=t.scope.getStringUnitWidth(e,{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:i,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:r}},KU={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},XU=function(e,t){var n={type:"reference",object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(i){return i.type===n.type&&i.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},QU=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||e.internal.acroformPlugin.isInitialized===!1)){if(mo.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(KU)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");My=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new tj,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var i=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var r in i)if(i.hasOwnProperty(r)){var o=i[r];o.objId=void 0,o.hasAnnotation&&XU(o,n)}})(e)}),e.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(e)}),e.internal.events.subscribe("postPutPages",function(n){(function(i,r){var o=!i;for(var c in i||(r.internal.newObjectDeferredBegin(r.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),r.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),i=i||r.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(i.hasOwnProperty(c)){var u=i[c],h=[],d=u.Rect;if(u.Rect&&(u.Rect=YU(u.Rect,r)),r.internal.newObjectDeferredBegin(u.objId,!0),u.DA=de.createDefaultAppearanceStream(u),In(u)==="object"&&typeof u.getKeyValueListForStream=="function"&&(h=u.getKeyValueListForStream()),u.Rect=d,u.hasAppearanceStream&&!u.appearanceStreamContent){var p=WU(u);h.push({key:"AP",value:"<</N "+p+">>"}),r.internal.acroformPlugin.xForms.push(p)}if(u.appearanceStreamContent){var v="";for(var S in u.appearanceStreamContent)if(u.appearanceStreamContent.hasOwnProperty(S)){var b=u.appearanceStreamContent[S];if(v+="/"+S+" ",v+="<<",Object.keys(b).length>=1||Array.isArray(b)){for(var c in b)if(b.hasOwnProperty(c)){var _=b[c];typeof _=="function"&&(_=_.call(r,u)),v+="/"+c+" "+_+" ",r.internal.acroformPlugin.xForms.indexOf(_)>=0||r.internal.acroformPlugin.xForms.push(_)}}else typeof(_=b)=="function"&&(_=_.call(r,u)),v+="/"+c+" "+_,r.internal.acroformPlugin.xForms.indexOf(_)>=0||r.internal.acroformPlugin.xForms.push(_);v+=">>"}h.push({key:"AP",value:`<<
`+v+">>"})}r.internal.putStream({additionalKeyValues:h,objectId:u.objId}),r.internal.out("endobj")}o&&(function(A,j){for(var E in A)if(A.hasOwnProperty(E)){var L=E,D=A[E];j.internal.newObjectDeferredBegin(D.objId,!0),In(D)==="object"&&typeof D.putStream=="function"&&D.putStream(),delete A[L]}})(r.internal.acroformPlugin.xForms,r)})(n,e)}),e.internal.acroformPlugin.isInitialized=!0}},Z_=qi.__acroform__.arrayToPdfArray=function(e,t,n){var i=function(c){return c};if(Array.isArray(e)){for(var r="[",o=0;o<e.length;o++)switch(o!==0&&(r+=" "),In(e[o])){case"boolean":case"number":case"object":r+=e[o].toString();break;case"string":e[o].substr(0,1)!=="/"?(t!==void 0&&n&&(i=n.internal.getEncryptor(t)),r+="("+Cu(i(e[o].toString()))+")"):r+=e[o].toString()}return r+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},q1=function(e,t,n){var i=function(r){return r};return t!==void 0&&n&&(i=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+Cu(i(e))+")"},Go=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Go.prototype.toString=function(){return this.objId+" 0 R"},Go.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Go.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(o){return o!="content"&&o!="appearanceStreamContent"&&o!="scope"&&o!="objId"&&o.substring(0,1)!="_"});for(var n in t)if(Object.getOwnPropertyDescriptor(this,t[n]).configurable===!1){var i=t[n],r=this[i];r&&(Array.isArray(r)?e.push({key:i,value:Z_(r,this.objId,this.scope)}):r instanceof Go?(r.scope=this.scope,e.push({key:i,value:r.objId+" 0 R"})):typeof r!="function"&&e.push({key:i,value:r}))}return e};var J_=function(){Go.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){e=n.trim()},get:function(){return e||null}})};Hr(J_,Go);var tj=function(){Go.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var n=function(i){return i};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+Cu(n(e))+")"}},set:function(n){e=n}})};Hr(tj,Go);var mo=function e(){Go.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(E){if(isNaN(E))throw new Error('Invalid value "'+E+'" for attribute F supplied.');t=E}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Wi(t,3)},set:function(E){E?this.F=Ki(t,3):this.F=Xi(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(E){if(isNaN(E))throw new Error('Invalid value "'+E+'" for attribute Ff supplied.');n=E}});var i=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(i.length!==0)return i},set:function(E){i=E!==void 0?E:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[0])?0:i[0]},set:function(E){i[0]=E}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[1])?0:i[1]},set:function(E){i[1]=E}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[2])?0:i[2]},set:function(E){i[2]=E}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!i||isNaN(i[3])?0:i[3]},set:function(E){i[3]=E}});var r="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return r},set:function(E){switch(E){case"/Btn":case"/Tx":case"/Ch":case"/Sig":r=E;break;default:throw new Error('Invalid value "'+E+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof Hp)return;o="FieldObject"+e.FieldNum++}var E=function(L){return L};return this.scope&&(E=this.scope.internal.getEncryptor(this.objId)),"("+Cu(E(o))+")"},set:function(E){o=E.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(E){o=E}});var c="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return c},set:function(E){c=E}});var u="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return u},set:function(E){u=E}});var h=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return h},set:function(E){h=E}});var d=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return d===void 0?50/My:d},set:function(E){d=E}});var p="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return p},set:function(E){p=E}});var v="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!v||this instanceof Hp||this instanceof fu))return q1(v,this.objId,this.scope)},set:function(E){E=E.toString(),v=E}});var S=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(S)return this instanceof Cs==0?q1(S,this.objId,this.scope):S},set:function(E){E=E.toString(),S=this instanceof Cs==0?E.substr(0,1)==="("?dh(E.substr(1,E.length-2)):dh(E):E}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Cs==1?dh(S.substr(1,S.length-1)):S},set:function(E){E=E.toString(),S=this instanceof Cs==1?"/"+E:E}});var b=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(b)return b},set:function(E){this.V=E}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(b)return this instanceof Cs==0?q1(b,this.objId,this.scope):b},set:function(E){E=E.toString(),b=this instanceof Cs==0?E.substr(0,1)==="("?dh(E.substr(1,E.length-2)):dh(E):E}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Cs==1?dh(b.substr(1,b.length-1)):b},set:function(E){E=E.toString(),b=this instanceof Cs==1?"/"+E:E}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var _,A=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return A},set:function(E){E=!!E,A=E}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(_)return _},set:function(E){_=E}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,1)},set:function(E){E?this.Ff=Ki(this.Ff,1):this.Ff=Xi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,2)},set:function(E){E?this.Ff=Ki(this.Ff,2):this.Ff=Xi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,3)},set:function(E){E?this.Ff=Ki(this.Ff,3):this.Ff=Xi(this.Ff,3)}});var j=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(j!==null)return j},set:function(E){if([0,1,2].indexOf(E)===-1)throw new Error('Invalid value "'+E+'" for attribute Q supplied.');j=E}}),Object.defineProperty(this,"textAlign",{get:function(){var E;switch(j){case 0:default:E="left";break;case 1:E="center";break;case 2:E="right"}return E},configurable:!0,enumerable:!0,set:function(E){switch(E){case"right":case 2:j=2;break;case"center":case 1:j=1;break;default:j=0}}})};Hr(mo,Go);var Lh=function(){mo.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(n){e=n}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Z_(t,this.objId,this.scope)},set:function(n){var i,r;r=[],typeof(i=n)=="string"&&(r=(function(o,c,u){u||(u=1);for(var h,d=[];h=c.exec(o);)d.push(h[u]);return d})(i,/\((.*?)\)/g)),t=r}}),this.getOptions=function(){return t},this.setOptions=function(n){t=n,this.sort&&t.sort()},this.addOption=function(n){n=(n=n||"").toString(),t.push(n),this.sort&&t.sort()},this.removeOption=function(n,i){for(i=i||!1,n=(n=n||"").toString();t.indexOf(n)!==-1&&(t.splice(t.indexOf(n),1),i!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,18)},set:function(n){n?this.Ff=Ki(this.Ff,18):this.Ff=Xi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=Ki(this.Ff,19):this.Ff=Xi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,20)},set:function(n){n?(this.Ff=Ki(this.Ff,20),t.sort()):this.Ff=Xi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,22)},set:function(n){n?this.Ff=Ki(this.Ff,22):this.Ff=Xi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,23)},set:function(n){n?this.Ff=Ki(this.Ff,23):this.Ff=Xi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,27)},set:function(n){n?this.Ff=Ki(this.Ff,27):this.Ff=Xi(this.Ff,27)}}),this.hasAppearanceStream=!1};Hr(Lh,mo);var Ph=function(){Lh.call(this),this.fontName="helvetica",this.combo=!1};Hr(Ph,Lh);var Rh=function(){Ph.call(this),this.combo=!0};Hr(Rh,Ph);var xp=function(){Rh.call(this),this.edit=!0};Hr(xp,Rh);var Cs=function(){mo.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,15)},set:function(n){n?this.Ff=Ki(this.Ff,15):this.Ff=Xi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,16)},set:function(n){n?this.Ff=Ki(this.Ff,16):this.Ff=Xi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,17)},set:function(n){n?this.Ff=Ki(this.Ff,17):this.Ff=Xi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,26)},set:function(n){n?this.Ff=Ki(this.Ff,26):this.Ff=Xi(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(o){return o};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var i,r=[];for(i in r.push("<<"),t)r.push("/"+i+" ("+Cu(n(t[i]))+")");return r.push(">>"),r.join(`
`)}},set:function(n){In(n)==="object"&&(t=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(n){typeof n=="string"&&(t.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(n){e="/"+n}})};Hr(Cs,mo);var wp=function(){Cs.call(this),this.pushButton=!0};Hr(wp,Cs);var Dh=function(){Cs.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t!==void 0?t:[]}})};Hr(Dh,Cs);var Hp=function(){var e,t;mo.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(r){e=r}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(r){t=r}});var n,i={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var r=function(u){return u};this.scope&&(r=this.scope.internal.getEncryptor(this.objId));var o,c=[];for(o in c.push("<<"),i)c.push("/"+o+" ("+Cu(r(i[o]))+")");return c.push(">>"),c.join(`
`)},set:function(r){In(r)==="object"&&(i=r)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return i.CA||""},set:function(r){typeof r=="string"&&(i.CA=r)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(r){n=r}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(r){n="/"+r}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=de.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Hr(Hp,mo),Dh.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},Dh.prototype.createOption=function(e){var t=new Hp;return t.Parent=this,t.optionName=e,this.Kids.push(t),ZU.call(this.scope,t),t};var Sp=function(){Cs.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=de.CheckBox.createAppearanceStream()};Hr(Sp,Cs);var fu=function(){mo.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,13)},set:function(t){t?this.Ff=Ki(this.Ff,13):this.Ff=Xi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,21)},set:function(t){t?this.Ff=Ki(this.Ff,21):this.Ff=Xi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,23)},set:function(t){t?this.Ff=Ki(this.Ff,23):this.Ff=Xi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,24)},set:function(t){t?this.Ff=Ki(this.Ff,24):this.Ff=Xi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,25)},set:function(t){t?this.Ff=Ki(this.Ff,25):this.Ff=Xi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,26)},set:function(t){t?this.Ff=Ki(this.Ff,26):this.Ff=Xi(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Hr(fu,mo);var Np=function(){fu.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Wi(this.Ff,14)},set:function(e){e?this.Ff=Ki(this.Ff,14):this.Ff=Xi(this.Ff,14)}}),this.password=!0};Hr(Np,fu);var de={CheckBox:{createAppearanceStream:function(){return{N:{On:de.CheckBox.YesNormal},D:{On:de.CheckBox.YesPushDown,Off:de.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=qo(e);t.scope=e.scope;var n=[],i=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),o=c2(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+Je(de.internal.getWidth(e))+" "+Je(de.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+i+" "+Je(o.fontSize)+" Tf "+r),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join(`
`),t},YesNormal:function(e){var t=qo(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),r=[],o=de.internal.getHeight(e),c=de.internal.getWidth(e),u=c2(e,e.caption);return r.push("1 g"),r.push("0 0 "+Je(c)+" "+Je(o)+" re"),r.push("f"),r.push("q"),r.push("0 0 1 rg"),r.push("0 0 "+Je(c-1)+" "+Je(o-1)+" re"),r.push("W"),r.push("n"),r.push("0 g"),r.push("BT"),r.push("/"+n+" "+Je(u.fontSize)+" Tf "+i),r.push(u.text),r.push("ET"),r.push("Q"),t.stream=r.join(`
`),t},OffPushDown:function(e){var t=qo(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Je(de.internal.getWidth(e))+" "+Je(de.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join(`
`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:de.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=de.RadioButton.Circle.YesNormal,t.D[e]=de.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=qo(e);t.scope=e.scope;var n=[],i=de.internal.getWidth(e)<=de.internal.getHeight(e)?de.internal.getWidth(e)/4:de.internal.getHeight(e)/4;i=Number((.9*i).toFixed(5));var r=de.internal.Bezier_C,o=Number((i*r).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+yc(de.internal.getWidth(e)/2)+" "+yc(de.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=qo(e);t.scope=e.scope;var n=[],i=de.internal.getWidth(e)<=de.internal.getHeight(e)?de.internal.getWidth(e)/4:de.internal.getHeight(e)/4;i=Number((.9*i).toFixed(5));var r=Number((2*i).toFixed(5)),o=Number((r*de.internal.Bezier_C).toFixed(5)),c=Number((i*de.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+yc(de.internal.getWidth(e)/2)+" "+yc(de.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+yc(de.internal.getWidth(e)/2)+" "+yc(de.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+c+" "+c+" "+i+" 0 "+i+" c"),n.push("-"+c+" "+i+" -"+i+" "+c+" -"+i+" 0 c"),n.push("-"+i+" -"+c+" -"+c+" -"+i+" 0 -"+i+" c"),n.push(c+" -"+i+" "+i+" -"+c+" "+i+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t},OffPushDown:function(e){var t=qo(e);t.scope=e.scope;var n=[],i=de.internal.getWidth(e)<=de.internal.getHeight(e)?de.internal.getWidth(e)/4:de.internal.getHeight(e)/4;i=Number((.9*i).toFixed(5));var r=Number((2*i).toFixed(5)),o=Number((r*de.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+yc(de.internal.getWidth(e)/2)+" "+yc(de.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+o+" "+o+" "+r+" 0 "+r+" c"),n.push("-"+o+" "+r+" -"+r+" "+o+" -"+r+" 0 c"),n.push("-"+r+" -"+o+" -"+o+" -"+r+" 0 -"+r+" c"),n.push(o+" -"+r+" "+r+" -"+o+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join(`
`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:de.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=de.RadioButton.Cross.YesNormal,t.D[e]=de.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=qo(e);t.scope=e.scope;var n=[],i=de.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+Je(de.internal.getWidth(e)-2)+" "+Je(de.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Je(i.x1.x)+" "+Je(i.x1.y)+" m"),n.push(Je(i.x2.x)+" "+Je(i.x2.y)+" l"),n.push(Je(i.x4.x)+" "+Je(i.x4.y)+" m"),n.push(Je(i.x3.x)+" "+Je(i.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join(`
`),t},YesPushDown:function(e){var t=qo(e);t.scope=e.scope;var n=de.internal.calculateCross(e),i=[];return i.push("0.749023 g"),i.push("0 0 "+Je(de.internal.getWidth(e))+" "+Je(de.internal.getHeight(e))+" re"),i.push("f"),i.push("q"),i.push("1 1 "+Je(de.internal.getWidth(e)-2)+" "+Je(de.internal.getHeight(e)-2)+" re"),i.push("W"),i.push("n"),i.push(Je(n.x1.x)+" "+Je(n.x1.y)+" m"),i.push(Je(n.x2.x)+" "+Je(n.x2.y)+" l"),i.push(Je(n.x4.x)+" "+Je(n.x4.y)+" m"),i.push(Je(n.x3.x)+" "+Je(n.x3.y)+" l"),i.push("s"),i.push("Q"),t.stream=i.join(`
`),t},OffPushDown:function(e){var t=qo(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+Je(de.internal.getWidth(e))+" "+Je(de.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join(`
`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};de.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=de.internal.getWidth(e),n=de.internal.getHeight(e),i=Math.min(t,n);return{x1:{x:(t-i)/2,y:(n-i)/2+i},x2:{x:(t-i)/2+i,y:(n-i)/2},x3:{x:(t-i)/2,y:(n-i)/2},x4:{x:(t-i)/2+i,y:(n-i)/2+i}}}},de.internal.getWidth=function(e){var t=0;return In(e)==="object"&&(t=m4(e.Rect[2])),t},de.internal.getHeight=function(e){var t=0;return In(e)==="object"&&(t=m4(e.Rect[3])),t};var ZU=qi.addField=function(e){if(QU(this,e),!(e instanceof mo))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};qi.AcroFormChoiceField=Lh,qi.AcroFormListBox=Ph,qi.AcroFormComboBox=Rh,qi.AcroFormEditBox=xp,qi.AcroFormButton=Cs,qi.AcroFormPushButton=wp,qi.AcroFormRadioButton=Dh,qi.AcroFormCheckBox=Sp,qi.AcroFormTextField=fu,qi.AcroFormPasswordField=Np,qi.AcroFormAppearance=de,qi.AcroForm={ChoiceField:Lh,ListBox:Ph,ComboBox:Rh,EditBox:xp,Button:Cs,PushButton:wp,RadioButton:Dh,CheckBox:Sp,TextField:fu,PasswordField:Np,Appearance:de},Ae.AcroForm={ChoiceField:Lh,ListBox:Ph,ComboBox:Rh,EditBox:xp,Button:Cs,PushButton:wp,RadioButton:Dh,CheckBox:Sp,TextField:fu,PasswordField:Np,Appearance:de};Ae.AcroForm;function ej(e){return e.reduce(function(t,n,i){return t[n]=i,t},{})}(function(e){var t="addImage_";e.__addimage__={};var n="UNKNOWN",i={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},r=e.__addimage__.getImageFileTypeByImageData=function(F,Y){var ot,tt,yt,J,at,K=n;if((Y=Y||n)==="RGBA"||F.data!==void 0&&F.data instanceof Uint8ClampedArray&&"height"in F&&"width"in F)return"RGBA";if(ut(F))for(at in i)for(yt=i[at],ot=0;ot<yt.length;ot+=1){for(J=!0,tt=0;tt<yt[ot].length;tt+=1)if(yt[ot][tt]!==void 0&&yt[ot][tt]!==F[tt]){J=!1;break}if(J===!0){K=at;break}}else for(at in i)for(yt=i[at],ot=0;ot<yt.length;ot+=1){for(J=!0,tt=0;tt<yt[ot].length;tt+=1)if(yt[ot][tt]!==void 0&&yt[ot][tt]!==F.charCodeAt(tt)){J=!1;break}if(J===!0){K=at;break}}return K===n&&Y!==n&&(K=Y),K},o=function F(Y){for(var ot=this.internal.write,tt=this.internal.putStream,yt=(0,this.internal.getFilters)();yt.indexOf("FlateEncode")!==-1;)yt.splice(yt.indexOf("FlateEncode"),1);Y.objectId=this.internal.newObject();var J=[];if(J.push({key:"Type",value:"/XObject"}),J.push({key:"Subtype",value:"/Image"}),J.push({key:"Width",value:Y.width}),J.push({key:"Height",value:Y.height}),Y.colorSpace===E.INDEXED?J.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(Y.palette.length/3-1)+" "+("sMask"in Y&&Y.sMask!==void 0?Y.objectId+2:Y.objectId+1)+" 0 R]"}):(J.push({key:"ColorSpace",value:"/"+Y.colorSpace}),Y.colorSpace===E.DEVICE_CMYK&&J.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),J.push({key:"BitsPerComponent",value:Y.bitsPerComponent}),"decodeParameters"in Y&&Y.decodeParameters!==void 0&&J.push({key:"DecodeParms",value:"<<"+Y.decodeParameters+">>"}),"transparency"in Y&&Array.isArray(Y.transparency)&&Y.transparency.length>0){for(var at="",K=0,dt=Y.transparency.length;K<dt;K++)at+=Y.transparency[K]+" "+Y.transparency[K]+" ";J.push({key:"Mask",value:"["+at+"]"})}Y.sMask!==void 0&&J.push({key:"SMask",value:Y.objectId+1+" 0 R"});var Tt=Y.filter!==void 0?["/"+Y.filter]:void 0;if(tt({data:Y.data,additionalKeyValues:J,alreadyAppliedFilters:Tt,objectId:Y.objectId}),ot("endobj"),"sMask"in Y&&Y.sMask!==void 0){var X,P=(X=Y.sMaskBitsPerComponent)!==null&&X!==void 0?X:Y.bitsPerComponent,q={width:Y.width,height:Y.height,colorSpace:"DeviceGray",bitsPerComponent:P,data:Y.sMask};"filter"in Y&&(q.decodeParameters="/Predictor ".concat(Y.predictor," /Colors 1 /BitsPerComponent ").concat(P," /Columns ").concat(Y.width),q.filter=Y.filter),F.call(this,q)}if(Y.colorSpace===E.INDEXED){var W=this.internal.newObject();tt({data:H(new Uint8Array(Y.palette)),objectId:W}),ot("endobj")}},c=function(){var F=this.internal.collections[t+"images"];for(var Y in F)o.call(this,F[Y])},u=function(){var F,Y=this.internal.collections[t+"images"],ot=this.internal.write;for(var tt in Y)ot("/I"+(F=Y[tt]).index,F.objectId,"0","R")},h=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",c),this.internal.events.subscribe("putXobjectDict",u))},d=function(){var F=this.internal.collections[t+"images"];return h.call(this),F},p=function(){return Object.keys(this.internal.collections[t+"images"]).length},v=function(F){return typeof e["process"+F.toUpperCase()]=="function"},S=function(F){return In(F)==="object"&&F.nodeType===1},b=function(F,Y){if(F.nodeName==="IMG"&&F.hasAttribute("src")){var ot=""+F.getAttribute("src");if(ot.indexOf("data:image/")===0)return bp(unescape(ot).split("base64,").pop());var tt=e.loadFile(ot,!0);if(tt!==void 0)return tt}if(F.nodeName==="CANVAS"){if(F.width===0||F.height===0)throw new Error("Given canvas must have data. Canvas width: "+F.width+", height: "+F.height);var yt;switch(Y){case"PNG":yt="image/png";break;case"WEBP":yt="image/webp";break;default:yt="image/jpeg"}return bp(F.toDataURL(yt,1).split("base64,").pop())}},_=function(F){var Y=this.internal.collections[t+"images"];if(Y){for(var ot in Y)if(F===Y[ot].alias)return Y[ot]}},A=function(F,Y,ot){return F||Y||(F=-96,Y=-96),F<0&&(F=-1*ot.width*72/F/this.internal.scaleFactor),Y<0&&(Y=-1*ot.height*72/Y/this.internal.scaleFactor),F===0&&(F=Y*ot.width/ot.height),Y===0&&(Y=F*ot.height/ot.width),[F,Y]},j=function(F,Y,ot,tt,yt,J){var at=A.call(this,ot,tt,yt),K=this.internal.getCoordinateString,dt=this.internal.getVerticalCoordinateString,Tt=d.call(this);if(ot=at[0],tt=at[1],Tt[yt.index]=yt,J){J*=Math.PI/180;var X=Math.cos(J),P=Math.sin(J),q=function(lt){return lt.toFixed(4)},W=[q(X),q(P),q(-1*P),q(X),0,0,"cm"]}this.internal.write("q"),J?(this.internal.write([1,"0","0",1,K(F),dt(Y+tt),"cm"].join(" ")),this.internal.write(W.join(" ")),this.internal.write([K(ot),"0","0",K(tt),"0","0","cm"].join(" "))):this.internal.write([K(ot),"0","0",K(tt),K(F),dt(Y+tt),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+yt.index+" Do"),this.internal.write("Q")},E=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var L=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},D=e.__addimage__.sHashCode=function(F){var Y,ot,tt=0;if(typeof F=="string")for(ot=F.length,Y=0;Y<ot;Y++)tt=(tt<<5)-tt+F.charCodeAt(Y),tt|=0;else if(ut(F))for(ot=F.byteLength/2,Y=0;Y<ot;Y++)tt=(tt<<5)-tt+F[Y],tt|=0;return tt},z=e.__addimage__.validateStringAsBase64=function(F){(F=F||"").toString().trim();var Y=!0;return F.length===0&&(Y=!1),F.length%4!=0&&(Y=!1),/^[A-Za-z0-9+/]+$/.test(F.substr(0,F.length-2))===!1&&(Y=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(F.substr(-2))===!1&&(Y=!1),Y},$=e.__addimage__.extractImageFromDataUrl=function(F){if(F==null||!(F=F.trim()).startsWith("data:"))return null;var Y=F.indexOf(",");return Y<0?null:F.substring(0,Y).trim().endsWith("base64")?F.substring(Y+1):null};e.__addimage__.isArrayBuffer=function(F){return F instanceof ArrayBuffer};var ut=e.__addimage__.isArrayBufferView=function(F){return F instanceof Int8Array||F instanceof Uint8Array||F instanceof Uint8ClampedArray||F instanceof Int16Array||F instanceof Uint16Array||F instanceof Int32Array||F instanceof Uint32Array||F instanceof Float32Array||F instanceof Float64Array},nt=e.__addimage__.binaryStringToUint8Array=function(F){for(var Y=F.length,ot=new Uint8Array(Y),tt=0;tt<Y;tt++)ot[tt]=F.charCodeAt(tt);return ot},H=e.__addimage__.arrayBufferToBinaryString=function(F){for(var Y="",ot=ut(F)?F:new Uint8Array(F),tt=0;tt<ot.length;tt+=8192)Y+=String.fromCharCode.apply(null,ot.subarray(tt,tt+8192));return Y};e.addImage=function(){var F,Y,ot,tt,yt,J,at,K,dt;if(typeof arguments[1]=="number"?(Y=n,ot=arguments[1],tt=arguments[2],yt=arguments[3],J=arguments[4],at=arguments[5],K=arguments[6],dt=arguments[7]):(Y=arguments[1],ot=arguments[2],tt=arguments[3],yt=arguments[4],J=arguments[5],at=arguments[6],K=arguments[7],dt=arguments[8]),In(F=arguments[0])==="object"&&!S(F)&&"imageData"in F){var Tt=F;F=Tt.imageData,Y=Tt.format||Y||n,ot=Tt.x||ot||0,tt=Tt.y||tt||0,yt=Tt.w||Tt.width||yt,J=Tt.h||Tt.height||J,at=Tt.alias||at,K=Tt.compression||K,dt=Tt.rotation||Tt.angle||dt}var X=this.internal.getFilters();if(K===void 0&&X.indexOf("FlateEncode")!==-1&&(K="SLOW"),isNaN(ot)||isNaN(tt))throw new Error("Invalid coordinates passed to jsPDF.addImage");h.call(this);var P=Q.call(this,F,Y,at,K);return j.call(this,ot,tt,yt,J,P,dt),this};var Q=function(F,Y,ot,tt){var yt,J,at;if(typeof F=="string"&&r(F)===n){F=unescape(F);var K=ct(F,!1);(K!==""||(K=e.loadFile(F,!0))!==void 0)&&(F=K)}if(S(F)&&(F=b(F,Y)),Y=r(F,Y),!v(Y))throw new Error("addImage does not support files of type '"+Y+"', please ensure that a plugin for '"+Y+"' support is added.");if(((at=ot)==null||at.length===0)&&(ot=(function(dt){return typeof dt=="string"||ut(dt)?D(dt):ut(dt.data)?D(dt.data):null})(F)),(yt=_.call(this,ot))||(F instanceof Uint8Array||Y==="RGBA"||(J=F,F=nt(F)),yt=this["process"+Y.toUpperCase()](F,p.call(this),ot,(function(dt){return dt&&typeof dt=="string"&&(dt=dt.toUpperCase()),dt in e.image_compression?dt:L.NONE})(tt),J)),!yt)throw new Error("An unknown error occurred whilst processing the image.");return yt},ct=e.__addimage__.convertBase64ToBinaryString=function(F,Y){Y=typeof Y!="boolean"||Y;var ot,tt="";if(typeof F=="string"){var yt;ot=(yt=$(F))!==null&&yt!==void 0?yt:F;try{tt=bp(ot)}catch(J){if(Y)throw z(ot)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+J.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return tt};e.getImageProperties=function(F){var Y,ot,tt="";if(S(F)&&(F=b(F)),typeof F=="string"&&r(F)===n&&((tt=ct(F,!1))===""&&(tt=e.loadFile(F)||""),F=tt),ot=r(F),!v(ot))throw new Error("addImage does not support files of type '"+ot+"', please ensure that a plugin for '"+ot+"' support is added.");if(F instanceof Uint8Array||(F=nt(F)),!(Y=this["process"+ot.toUpperCase()](F)))throw new Error("An unknown error occurred whilst processing the image");return Y.fileType=ot,Y}})(Ae.API),(function(e){var t=function(n){if(n!==void 0&&n!="")return!0};Ae.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(n){for(var i,r,o,c=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,h=this.internal.getPageInfoByObjId(n.objId),d=n.pageContext.annotations,p=!1,v=0;v<d.length&&!p;v++)switch((i=d[v]).type){case"link":(t(i.options.url)||t(i.options.pageNumber))&&(p=!0);break;case"reference":case"text":case"freetext":p=!0}if(p!=0){this.internal.write("/Annots [");for(var S=0;S<d.length;S++){i=d[S];var b=this.internal.pdfEscape,_=this.internal.getEncryptor(n.objId);switch(i.type){case"reference":this.internal.write(" "+i.object.objId+" 0 R ");break;case"text":var A=this.internal.newAdditionalObject(),j=this.internal.newAdditionalObject(),E=this.internal.getEncryptor(A.objId),L=i.title||"Note";o="<</Type /Annot /Subtype /Text "+(r="/Rect ["+c(i.bounds.x)+" "+u(i.bounds.y+i.bounds.h)+" "+c(i.bounds.x+i.bounds.w)+" "+u(i.bounds.y)+"] ")+"/Contents ("+b(E(i.contents))+")",o+=" /Popup "+j.objId+" 0 R",o+=" /P "+h.objId+" 0 R",o+=" /T ("+b(E(L))+") >>",A.content=o;var D=A.objId+" 0 R";o="<</Type /Annot /Subtype /Popup "+(r="/Rect ["+c(i.bounds.x+30)+" "+u(i.bounds.y+i.bounds.h)+" "+c(i.bounds.x+i.bounds.w+30)+" "+u(i.bounds.y)+"] ")+" /Parent "+D,i.open&&(o+=" /Open true"),o+=" >>",j.content=o,this.internal.write(A.objId,"0 R",j.objId,"0 R");break;case"freetext":r="/Rect ["+c(i.bounds.x)+" "+u(i.bounds.y)+" "+c(i.bounds.x+i.bounds.w)+" "+u(i.bounds.y+i.bounds.h)+"] ";var z=i.color||"#000000";o="<</Type /Annot /Subtype /FreeText "+r+"/Contents ("+b(_(i.contents))+")",o+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+z+")",o+=" /Border [0 0 0]",o+=" >>",this.internal.write(o);break;case"link":if(i.options.name){var $=this.annotations._nameMap[i.options.name];i.options.pageNumber=$.page,i.options.top=$.y}else i.options.top||(i.options.top=0);if(r="/Rect ["+i.finalBounds.x+" "+i.finalBounds.y+" "+i.finalBounds.w+" "+i.finalBounds.h+"] ",o="",i.options.url)o="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /A <</S /URI /URI ("+b(_(i.options.url))+") >>";else if(i.options.pageNumber)switch(o="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(i.options.pageNumber).objId+" 0 R",i.options.magFactor=i.options.magFactor||"XYZ",i.options.magFactor){case"Fit":o+=" /Fit]";break;case"FitH":o+=" /FitH "+i.options.top+"]";break;case"FitV":i.options.left=i.options.left||0,o+=" /FitV "+i.options.left+"]";break;default:var ut=u(i.options.top);i.options.left=i.options.left||0,i.options.zoom===void 0&&(i.options.zoom=0),o+=" /XYZ "+i.options.left+" "+ut+" "+i.options.zoom+"]"}o!=""&&(o+=" >>",this.internal.write(o))}}this.internal.write("]")}}]),e.createAnnotation=function(n){var i=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":i.pageContext.annotations.push(n)}},e.link=function(n,i,r,o,c){var u=this.internal.getCurrentPageInfo(),h=this.internal.getCoordinateString,d=this.internal.getVerticalCoordinateString;u.pageContext.annotations.push({finalBounds:{x:h(n),y:d(i),w:h(n+r),h:d(i+o)},options:c,type:"link"})},e.textWithLink=function(n,i,r,o){var c,u,h=this.getTextWidth(n),d=this.internal.getLineHeight()/this.internal.scaleFactor;if(o.maxWidth!==void 0){u=o.maxWidth;var p=this.splitTextToSize(n,u).length;c=Math.ceil(d*p)}else u=h,c=d;return this.text(n,i,r,o),r+=.2*d,o.align==="center"&&(i-=h/2),o.align==="right"&&(i-=h),this.link(i,r-d,u,c,o),h},e.getTextWidth=function(n){var i=this.internal.getFontSize();return this.getStringUnitWidth(n)*i/this.internal.scaleFactor}})(Ae.API),(function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},i={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},r=[1570,1571,1573,1575];e.__arabicParser__={};var o=e.__arabicParser__.isInArabicSubstitutionA=function(A){return t[A.charCodeAt(0)]!==void 0},c=e.__arabicParser__.isArabicLetter=function(A){return typeof A=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(A)},u=e.__arabicParser__.isArabicEndLetter=function(A){return c(A)&&o(A)&&t[A.charCodeAt(0)].length<=2},h=e.__arabicParser__.isArabicAlfLetter=function(A){return c(A)&&r.indexOf(A.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(A){return c(A)&&o(A)&&t[A.charCodeAt(0)].length>=1};var d=e.__arabicParser__.arabicLetterHasFinalForm=function(A){return c(A)&&o(A)&&t[A.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(A){return c(A)&&o(A)&&t[A.charCodeAt(0)].length>=3};var p=e.__arabicParser__.arabicLetterHasMedialForm=function(A){return c(A)&&o(A)&&t[A.charCodeAt(0)].length==4},v=e.__arabicParser__.resolveLigatures=function(A){var j=0,E=n,L="",D=0;for(j=0;j<A.length;j+=1)E[A.charCodeAt(j)]!==void 0?(D++,typeof(E=E[A.charCodeAt(j)])=="number"&&(L+=String.fromCharCode(E),E=n,D=0),j===A.length-1&&(E=n,L+=A.charAt(j-(D-1)),j-=D-1,D=0)):(E=n,L+=A.charAt(j-D),j-=D,D=0);return L};e.__arabicParser__.isArabicDiacritic=function(A){return A!==void 0&&i[A.charCodeAt(0)]!==void 0};var S=e.__arabicParser__.getCorrectForm=function(A,j,E){return c(A)?o(A)===!1?-1:!d(A)||!c(j)&&!c(E)||!c(E)&&u(j)||u(A)&&!c(j)||u(A)&&h(j)||u(A)&&u(j)?0:p(A)&&c(j)&&!u(j)&&c(E)&&d(E)?3:u(A)||!c(E)?1:2:-1},b=function(A){var j=0,E=0,L=0,D="",z="",$="",ut=(A=A||"").split("\\s+"),nt=[];for(j=0;j<ut.length;j+=1){for(nt.push(""),E=0;E<ut[j].length;E+=1)D=ut[j][E],z=ut[j][E-1],$=ut[j][E+1],c(D)?(L=S(D,z,$),nt[j]+=L!==-1?String.fromCharCode(t[D.charCodeAt(0)][L]):D):nt[j]+=D;nt[j]=v(nt[j])}return nt.join(" ")},_=e.__arabicParser__.processArabic=e.processArabic=function(){var A,j=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,E=[];if(Array.isArray(j)){var L=0;for(E=[],L=0;L<j.length;L+=1)Array.isArray(j[L])?E.push([b(j[L][0]),j[L][1],j[L][2]]):E.push([b(j[L])]);A=E}else A=b(j);return typeof arguments[0]=="string"?A:(arguments[0].text=A,arguments[0])};e.events.push(["preProcessText",_])})(Ae.API),Ae.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform",e.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},(function(e){var t=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(u){n=u}});var i=150;Object.defineProperty(this,"width",{get:function(){return i},set:function(u){i=isNaN(u)||Number.isInteger(u)===!1||u<0?150:u,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=i+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(u){r=isNaN(u)||Number.isInteger(u)===!1||u<0?300:u,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var o=[];Object.defineProperty(this,"childNodes",{get:function(){return o},set:function(u){o=u}});var c={};Object.defineProperty(this,"style",{get:function(){return c},set:function(u){c=u}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(n,i){var r;if((n=n||"2d")!=="2d")return null;for(r in i)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=i[r]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])})(Ae.API),(function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,i=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),r.call(this))},r=function(){this.internal.__cell__.lastCell=new o,this.internal.__cell__.pages=1},o=function(){var h=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return h},set:function(A){h=A}});var d=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return d},set:function(A){d=A}});var p=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return p},set:function(A){p=A}});var v=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return v},set:function(A){v=A}});var S=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return S},set:function(A){S=A}});var b=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return b},set:function(A){b=A}});var _=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return _},set:function(A){_=A}}),this};o.prototype.clone=function(){return new o(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},o.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(h){return i.call(this),this.internal.__cell__.headerFunction=typeof h=="function"?h:void 0,this},e.getTextDimensions=function(h,d){i.call(this);var p=(d=d||{}).fontSize||this.getFontSize(),v=d.font||this.getFont(),S=d.scaleFactor||this.internal.scaleFactor,b=0,_=0,A=0,j=this;if(!Array.isArray(h)&&typeof h!="string"){if(typeof h!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");h=String(h)}var E=d.maxWidth;E>0?typeof h=="string"?h=this.splitTextToSize(h,E):Object.prototype.toString.call(h)==="[object Array]"&&(h=h.reduce(function(D,z){return D.concat(j.splitTextToSize(z,E))},[])):h=Array.isArray(h)?h:[h];for(var L=0;L<h.length;L++)b<(A=this.getStringUnitWidth(h[L],{font:v})*p)&&(b=A);return b!==0&&(_=h.length),{w:b/=S,h:Math.max((_*p*this.getLineHeightFactor()-p*(this.getLineHeightFactor()-1))/S,0)}},e.cellAddPage=function(){i.call(this),this.addPage();var h=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new o(h.left,h.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var c=e.cell=function(){var h;h=arguments[0]instanceof o?arguments[0]:new o(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),i.call(this);var d=this.internal.__cell__.lastCell,p=this.internal.__cell__.padding,v=this.internal.__cell__.margins||t,S=this.internal.__cell__.tableHeaderRow,b=this.internal.__cell__.printHeaders;return d.lineNumber!==void 0&&(d.lineNumber===h.lineNumber?(h.x=(d.x||0)+(d.width||0),h.y=d.y||0):d.y+d.height+h.height+v.bottom>this.getPageHeight()?(this.cellAddPage(),h.y=v.top,b&&S&&(this.printHeaderRow(h.lineNumber,!0),h.y+=S[0].height)):h.y=d.y+d.height||h.y),h.text[0]!==void 0&&(this.rect(h.x,h.y,h.width,h.height,n===!0?"FD":void 0),h.align==="right"?this.text(h.text,h.x+h.width-p,h.y+p,{align:"right",baseline:"top"}):h.align==="center"?this.text(h.text,h.x+h.width/2,h.y+p,{align:"center",baseline:"top",maxWidth:h.width-p-p}):this.text(h.text,h.x+p,h.y+p,{align:"left",baseline:"top",maxWidth:h.width-p-p})),this.internal.__cell__.lastCell=h,this};e.table=function(h,d,p,v,S){if(i.call(this),!p)throw new Error("No data for PDF table.");var b,_,A,j,E=[],L=[],D=[],z={},$={},ut=[],nt=[],H=(S=S||{}).autoSize||!1,Q=S.printHeaders!==!1,ct=S.css&&S.css["font-size"]!==void 0?16*S.css["font-size"]:S.fontSize||12,F=S.margins||Object.assign({width:this.getPageWidth()},t),Y=typeof S.padding=="number"?S.padding:3,ot=S.headerBackgroundColor||"#c8c8c8",tt=S.headerTextColor||"#000";if(r.call(this),this.internal.__cell__.printHeaders=Q,this.internal.__cell__.margins=F,this.internal.__cell__.table_font_size=ct,this.internal.__cell__.padding=Y,this.internal.__cell__.headerBackgroundColor=ot,this.internal.__cell__.headerTextColor=tt,this.setFontSize(ct),v==null)L=E=Object.keys(p[0]),D=E.map(function(){return"left"});else if(Array.isArray(v)&&In(v[0])==="object")for(E=v.map(function(Tt){return Tt.name}),L=v.map(function(Tt){return Tt.prompt||Tt.name||""}),D=v.map(function(Tt){return Tt.align||"left"}),b=0;b<v.length;b+=1)$[v[b].name]=.7499990551181103*v[b].width;else Array.isArray(v)&&typeof v[0]=="string"&&(L=E=v,D=E.map(function(){return"left"}));if(H||Array.isArray(v)&&typeof v[0]=="string")for(b=0;b<E.length;b+=1){for(z[j=E[b]]=p.map(function(Tt){return Tt[j]}),this.setFont(void 0,"bold"),ut.push(this.getTextDimensions(L[b],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),_=z[j],this.setFont(void 0,"normal"),A=0;A<_.length;A+=1)ut.push(this.getTextDimensions(_[A],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);$[j]=Math.max.apply(null,ut)+Y+Y,ut=[]}if(Q){var yt={};for(b=0;b<E.length;b+=1)yt[E[b]]={},yt[E[b]].text=L[b],yt[E[b]].align=D[b];var J=u.call(this,yt,$);nt=E.map(function(Tt){return new o(h,d,$[Tt],J,yt[Tt].text,void 0,yt[Tt].align)}),this.setTableHeaderRow(nt),this.printHeaderRow(1,!1)}var at=v.reduce(function(Tt,X){return Tt[X.name]=X.align,Tt},{});for(b=0;b<p.length;b+=1){"rowStart"in S&&S.rowStart instanceof Function&&S.rowStart({row:b,data:p[b]},this);var K=u.call(this,p[b],$);for(A=0;A<E.length;A+=1){var dt=p[b][E[A]];"cellStart"in S&&S.cellStart instanceof Function&&S.cellStart({row:b,col:A,data:dt},this),c.call(this,new o(h,d,$[E[A]],K,dt,b+2,at[E[A]]))}}return this.internal.__cell__.table_x=h,this.internal.__cell__.table_y=d,this};var u=function(h,d){var p=this.internal.__cell__.padding,v=this.internal.__cell__.table_font_size,S=this.internal.scaleFactor;return Object.keys(h).map(function(b){var _=h[b];return this.splitTextToSize(_.hasOwnProperty("text")?_.text:_,d[b]-p-p)},this).map(function(b){return this.getLineHeightFactor()*b.length*v/S+p+p},this).reduce(function(b,_){return Math.max(b,_)},0)};e.setTableHeaderRow=function(h){i.call(this),this.internal.__cell__.tableHeaderRow=h},e.printHeaderRow=function(h,d){if(i.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var p;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var v=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new o(v[0],v[1],v[2],v[3],void 0,-1)}this.setFont(void 0,"bold");for(var S=[],b=0;b<this.internal.__cell__.tableHeaderRow.length;b+=1){p=this.internal.__cell__.tableHeaderRow[b].clone(),d&&(p.y=this.internal.__cell__.margins.top||0,S.push(p)),p.lineNumber=h;var _=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),c.call(this,p),this.setTextColor(_)}S.length>0&&this.setTableHeaderRow(S),this.setFont(void 0,"normal"),n=!1}})(Ae.API);var nj={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ij=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],u2=ej(ij),sj=[100,200,300,400,500,600,700,800,900],JU=ej(sj);function V1(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=(function(o){return nj[o=o||"normal"]?o:"normal"})(e.style),i=(function(o){return o?typeof o=="number"?o>=100&&o<=900&&o%100==0?o:400:/^\d00$/.test(o)?parseInt(o):o==="bold"?700:400:400})(e.weight),r=(function(o){return typeof u2[o=o||"normal"]=="number"?o:"normal"})(e.stretch);return{family:t,style:n,weight:i,stretch:r,src:e.src||[],ref:e.ref||{name:t,style:[r,n,i].join(" ")}}}function p4(e,t,n,i){var r;for(r=n;r>=0&&r<t.length;r+=i)if(e[t[r]])return e[t[r]];for(r=n;r>=0&&r<t.length;r-=i)if(e[t[r]])return e[t[r]]}var tq={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},g4={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function v4(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function y4(e){return e.trimLeft()}function eq(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function nq(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var Qm,b4,x4,fh,Zm,w4,S4,N4,H1=["times"];function A4(e,t,n,i,r){var o=4,c=_4;switch(r){case Ae.API.image_compression.FAST:o=1,c=C4;break;case Ae.API.image_compression.MEDIUM:o=6,c=j4;break;case Ae.API.image_compression.SLOW:o=9,c=E4}e=(function(h,d,p,v){for(var S,b=h.length/d,_=new Uint8Array(h.length+b),A=[iq,C4,_4,j4,E4],j=0;j<b;j+=1){var E=j*d,L=h.subarray(E,E+d);if(v)_.set(v(L,p,S),E+j);else{for(var D=A.length,z=[],$=0;$<D;$+=1)z[$]=A[$](L,p,S);var ut=rq(z.concat());_.set(z[ut],E+j)}S=L}return _})(e,t,Math.ceil(n*i/8),c);var u=i2(e,{level:o});return Ae.API.__addimage__.arrayBufferToBinaryString(u)}function iq(e){var t=Array.apply([],e);return t.unshift(0),t}function C4(e,t){var n=e.length,i=[];i[0]=1;for(var r=0;r<n;r+=1){var o=e[r-t]||0;i[r+1]=e[r]-o+256&255}return i}function _4(e,t,n){var i=e.length,r=[];r[0]=2;for(var o=0;o<i;o+=1){var c=n&&n[o]||0;r[o+1]=e[o]-c+256&255}return r}function j4(e,t,n){var i=e.length,r=[];r[0]=3;for(var o=0;o<i;o+=1){var c=e[o-t]||0,u=n&&n[o]||0;r[o+1]=e[o]+256-(c+u>>>1)&255}return r}function E4(e,t,n){var i=e.length,r=[];r[0]=4;for(var o=0;o<i;o+=1){var c=sq(e[o-t]||0,n&&n[o]||0,n&&n[o-t]||0);r[o+1]=e[o]-c+256&255}return r}function sq(e,t,n){if(e===t&&t===n)return e;var i=Math.abs(t-n),r=Math.abs(e-n),o=Math.abs(e+t-n-n);return i<=r&&i<=o?e:r<=o?t:n}function rq(e){var t=e.map(function(n){return n.reduce(function(i,r){return i+Math.abs(r)},0)});return t.indexOf(Math.min.apply(null,t))}function $1(e,t,n){var i=t*n,r=Math.floor(i/8),o=16-(i-8*r+n),c=(1<<n)-1;return rj(e,r)>>o&c}function M4(e,t,n,i){var r=n*i,o=Math.floor(r/8),c=16-(r-8*o+i),u=(1<<i)-1,h=(t&u)<<c;(function(d,p,v){if(p+1<d.byteLength)d.setUint16(p,v,!1);else{var S=v>>8&255;d.setUint8(p,S)}})(e,o,rj(e,o)&~(u<<c)&65535|h)}function rj(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function aq(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,i=e[t++]|e[t++]<<8,r=e[t++],o=r>>7,c=1<<1+(7&r);e[t++],e[t++];var u=null,h=null;o&&(u=t,h=c,t+=3*c);var d=!0,p=[],v=0,S=null,b=0,_=null;for(this.width=n,this.height=i;d&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,_=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((F=e[t++])>=0))throw Error("Invalid block size");if(F===0)break;t+=F}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw new Error("Invalid graphics extension block.");var A=e[t++];v=e[t++]|e[t++]<<8,S=e[t++],1&A||(S=null),b=A>>2&7,t++;break;case 254:for(;;){if(!((F=e[t++])>=0))throw Error("Invalid block size");if(F===0)break;t+=F}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var j=e[t++]|e[t++]<<8,E=e[t++]|e[t++]<<8,L=e[t++]|e[t++]<<8,D=e[t++]|e[t++]<<8,z=e[t++],$=z>>6&1,ut=1<<1+(7&z),nt=u,H=h,Q=!1;z>>7&&(Q=!0,nt=t,H=ut,t+=3*ut);var ct=t;for(t++;;){var F;if(!((F=e[t++])>=0))throw Error("Invalid block size");if(F===0)break;t+=F}p.push({x:j,y:E,width:L,height:D,has_local_palette:Q,palette_offset:nt,palette_size:H,data_offset:ct,data_length:t-ct,transparent_index:S,interlaced:!!$,delay:v,disposal:b});break;case 59:d=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return p.length},this.loopCount=function(){return _},this.frameInfo=function(Y){if(Y<0||Y>=p.length)throw new Error("Frame index out of range.");return p[Y]},this.decodeAndBlitFrameBGRA=function(Y,ot){var tt=this.frameInfo(Y),yt=tt.width*tt.height,J=new Uint8Array(yt);T4(e,tt.data_offset,J,yt);var at=tt.palette_offset,K=tt.transparent_index;K===null&&(K=256);var dt=tt.width,Tt=n-dt,X=dt,P=4*(tt.y*n+tt.x),q=4*((tt.y+tt.height)*n+tt.x),W=P,lt=4*Tt;tt.interlaced===!0&&(lt+=4*n*7);for(var ht=8,ft=0,Ct=J.length;ft<Ct;++ft){var _t=J[ft];if(X===0&&(X=dt,(W+=lt)>=q&&(lt=4*Tt+4*n*(ht-1),W=P+(dt+Tt)*(ht<<1),ht>>=1)),_t===K)W+=4;else{var Dt=e[at+3*_t],$t=e[at+3*_t+1],Wt=e[at+3*_t+2];ot[W++]=Wt,ot[W++]=$t,ot[W++]=Dt,ot[W++]=255}--X}},this.decodeAndBlitFrameRGBA=function(Y,ot){var tt=this.frameInfo(Y),yt=tt.width*tt.height,J=new Uint8Array(yt);T4(e,tt.data_offset,J,yt);var at=tt.palette_offset,K=tt.transparent_index;K===null&&(K=256);var dt=tt.width,Tt=n-dt,X=dt,P=4*(tt.y*n+tt.x),q=4*((tt.y+tt.height)*n+tt.x),W=P,lt=4*Tt;tt.interlaced===!0&&(lt+=4*n*7);for(var ht=8,ft=0,Ct=J.length;ft<Ct;++ft){var _t=J[ft];if(X===0&&(X=dt,(W+=lt)>=q&&(lt=4*Tt+4*n*(ht-1),W=P+(dt+Tt)*(ht<<1),ht>>=1)),_t===K)W+=4;else{var Dt=e[at+3*_t],$t=e[at+3*_t+1],Wt=e[at+3*_t+2];ot[W++]=Dt,ot[W++]=$t,ot[W++]=Wt,ot[W++]=255}--X}}}function T4(e,t,n,i){for(var r=e[t++],o=1<<r,c=o+1,u=c+1,h=r+1,d=(1<<h)-1,p=0,v=0,S=0,b=e[t++],_=new Int32Array(4096),A=null;;){for(;p<16&&b!==0;)v|=e[t++]<<p,p+=8,b===1?b=e[t++]:--b;if(p<h)break;var j=v&d;if(v>>=h,p-=h,j!==o){if(j===c)break;for(var E=j<u?j:A,L=0,D=E;D>o;)D=_[D]>>8,++L;var z=D;if(S+L+(E!==j?1:0)>i)return void Zn.log("Warning, gif stream longer than expected.");n[S++]=z;var $=S+=L;for(E!==j&&(n[S++]=z),D=E;L--;)D=_[D],n[--$]=255&D,D>>=8;A!==null&&u<4096&&(_[u++]=A<<8|z,u>=d+1&&h<12&&(++h,d=d<<1|1)),A=j}else u=c+1,d=(1<<(h=r+1))-1,A=null}return S!==i&&Zn.log("Warning, gif stream shorter than expected."),n}/**
 * @license
  Copyright (c) 2008, Adobe Systems Incorporated
  All rights reserved.

  Redistribution and use in source and binary forms, with or without 
  modification, are permitted provided that the following conditions are
  met:

  * Redistributions of source code must retain the above copyright notice, 
    this list of conditions and the following disclaimer.
  
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the 
    documentation and/or other materials provided with the distribution.
  
  * Neither the name of Adobe Systems Incorporated nor the names of its 
    contributors may be used to endorse or promote products derived from 
    this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/function G1(e){var t,n,i,r,o,c=Math.floor,u=new Array(64),h=new Array(64),d=new Array(64),p=new Array(64),v=new Array(65535),S=new Array(65535),b=new Array(64),_=new Array(64),A=[],j=0,E=7,L=new Array(64),D=new Array(64),z=new Array(64),$=new Array(256),ut=new Array(2048),nt=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],H=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],Q=[0,1,2,3,4,5,6,7,8,9,10,11],ct=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],F=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],Y=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],ot=[0,1,2,3,4,5,6,7,8,9,10,11],tt=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],yt=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function J(P,q){for(var W=0,lt=0,ht=new Array,ft=1;ft<=16;ft++){for(var Ct=1;Ct<=P[ft];Ct++)ht[q[lt]]=[],ht[q[lt]][0]=W,ht[q[lt]][1]=ft,lt++,W++;W*=2}return ht}function at(P){for(var q=P[0],W=P[1]-1;W>=0;)q&1<<W&&(j|=1<<E),W--,--E<0&&(j==255?(K(255),K(0)):K(j),E=7,j=0)}function K(P){A.push(P)}function dt(P){K(P>>8&255),K(255&P)}function Tt(P,q,W,lt,ht){for(var ft,Ct=ht[0],_t=ht[240],Dt=(function(Ut,oe){var Zt,ie,xe,ye,nn,Ue,on,je,le,qe,pe=0;for(le=0;le<8;++le){Zt=Ut[pe],ie=Ut[pe+1],xe=Ut[pe+2],ye=Ut[pe+3],nn=Ut[pe+4],Ue=Ut[pe+5],on=Ut[pe+6];var Gn=Zt+(je=Ut[pe+7]),sn=Zt-je,Jt=ie+on,Re=ie-on,rn=xe+Ue,we=xe-Ue,Ln=ye+nn,_e=ye-nn,Ee=Gn+Ln,_n=Gn-Ln,Se=Jt+rn,be=Jt-rn;Ut[pe]=Ee+Se,Ut[pe+4]=Ee-Se;var un=.707106781*(be+_n);Ut[pe+2]=_n+un,Ut[pe+6]=_n-un;var nr=.382683433*((Ee=_e+we)-(be=Re+sn)),ki=.5411961*Ee+nr,br=1.306562965*be+nr,Li=.707106781*(Se=we+Re),Ne=sn+Li,bi=sn-Li;Ut[pe+5]=bi+ki,Ut[pe+3]=bi-ki,Ut[pe+1]=Ne+br,Ut[pe+7]=Ne-br,pe+=8}for(pe=0,le=0;le<8;++le){Zt=Ut[pe],ie=Ut[pe+8],xe=Ut[pe+16],ye=Ut[pe+24],nn=Ut[pe+32],Ue=Ut[pe+40],on=Ut[pe+48];var xr=Zt+(je=Ut[pe+56]),Yn=Zt-je,_s=ie+on,On=ie-on,ui=xe+Ue,ti=xe-Ue,pa=ye+nn,Wn=ye-nn,jn=xr+pa,En=xr-pa,Ji=_s+ui,ps=_s-ui;Ut[pe]=jn+Ji,Ut[pe+32]=jn-Ji;var js=.707106781*(ps+En);Ut[pe+16]=En+js,Ut[pe+48]=En-js;var Xe=.382683433*((jn=Wn+ti)-(ps=On+Yn)),Vs=.5411961*jn+Xe,Hs=1.306562965*ps+Xe,$r=.707106781*(Ji=ti+On),Es=Yn+$r,Ms=Yn-$r;Ut[pe+40]=Ms+Vs,Ut[pe+24]=Ms-Vs,Ut[pe+8]=Es+Hs,Ut[pe+56]=Es-Hs,pe++}for(le=0;le<64;++le)qe=Ut[le]*oe[le],b[le]=qe>0?qe+.5|0:qe-.5|0;return b})(P,q),$t=0;$t<64;++$t)_[nt[$t]]=Dt[$t];var Wt=_[0]-W;W=_[0],Wt==0?at(lt[0]):(at(lt[S[ft=32767+Wt]]),at(v[ft]));for(var Xt=63;Xt>0&&_[Xt]==0;)Xt--;if(Xt==0)return at(Ct),W;for(var se,et=1;et<=Xt;){for(var Qt=et;_[et]==0&&et<=Xt;)++et;var Ke=et-Qt;if(Ke>=16){se=Ke>>4;for(var Ce=1;Ce<=se;++Ce)at(_t);Ke&=15}ft=32767+_[et],at(ht[(Ke<<4)+S[ft]]),at(v[ft]),et++}return Xt!=63&&at(Ct),W}function X(P){P=Math.min(Math.max(P,1),100),o!=P&&((function(q){for(var W=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],lt=0;lt<64;lt++){var ht=c((W[lt]*q+50)/100);ht=Math.min(Math.max(ht,1),255),u[nt[lt]]=ht}for(var ft=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],Ct=0;Ct<64;Ct++){var _t=c((ft[Ct]*q+50)/100);_t=Math.min(Math.max(_t,1),255),h[nt[Ct]]=_t}for(var Dt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],$t=0,Wt=0;Wt<8;Wt++)for(var Xt=0;Xt<8;Xt++)d[$t]=1/(u[nt[$t]]*Dt[Wt]*Dt[Xt]*8),p[$t]=1/(h[nt[$t]]*Dt[Wt]*Dt[Xt]*8),$t++})(P<50?Math.floor(5e3/P):Math.floor(200-2*P)),o=P)}this.encode=function(P,q){q&&X(q),A=new Array,j=0,E=7,dt(65496),dt(65504),dt(16),K(74),K(70),K(73),K(70),K(0),K(1),K(1),K(0),dt(1),dt(1),K(0),K(0),(function(){dt(65499),dt(132),K(0);for(var ie=0;ie<64;ie++)K(u[ie]);K(1);for(var xe=0;xe<64;xe++)K(h[xe])})(),(function(ie,xe){dt(65472),dt(17),K(8),dt(xe),dt(ie),K(3),K(1),K(17),K(0),K(2),K(17),K(1),K(3),K(17),K(1)})(P.width,P.height),(function(){dt(65476),dt(418),K(0);for(var ie=0;ie<16;ie++)K(H[ie+1]);for(var xe=0;xe<=11;xe++)K(Q[xe]);K(16);for(var ye=0;ye<16;ye++)K(ct[ye+1]);for(var nn=0;nn<=161;nn++)K(F[nn]);K(1);for(var Ue=0;Ue<16;Ue++)K(Y[Ue+1]);for(var on=0;on<=11;on++)K(ot[on]);K(17);for(var je=0;je<16;je++)K(tt[je+1]);for(var le=0;le<=161;le++)K(yt[le])})(),dt(65498),dt(12),K(3),K(1),K(0),K(2),K(17),K(3),K(17),K(0),K(63),K(0);var W=0,lt=0,ht=0;j=0,E=7,this.encode.displayName="_encode_";for(var ft,Ct,_t,Dt,$t,Wt,Xt,se,et,Qt=P.data,Ke=P.width,Ce=P.height,Ut=4*Ke,oe=0;oe<Ce;){for(ft=0;ft<Ut;){for($t=Ut*oe+ft,Xt=-1,se=0,et=0;et<64;et++)Wt=$t+(se=et>>3)*Ut+(Xt=4*(7&et)),oe+se>=Ce&&(Wt-=Ut*(oe+1+se-Ce)),ft+Xt>=Ut&&(Wt-=ft+Xt-Ut+4),Ct=Qt[Wt++],_t=Qt[Wt++],Dt=Qt[Wt++],L[et]=(ut[Ct]+ut[_t+256|0]+ut[Dt+512|0]>>16)-128,D[et]=(ut[Ct+768|0]+ut[_t+1024|0]+ut[Dt+1280|0]>>16)-128,z[et]=(ut[Ct+1280|0]+ut[_t+1536|0]+ut[Dt+1792|0]>>16)-128;W=Tt(L,d,W,t,i),lt=Tt(D,p,lt,n,r),ht=Tt(z,p,ht,n,r),ft+=32}oe+=8}if(E>=0){var Zt=[];Zt[1]=E+1,Zt[0]=(1<<E+1)-1,at(Zt)}return dt(65497),new Uint8Array(A)},e=e||50,(function(){for(var P=String.fromCharCode,q=0;q<256;q++)$[q]=P(q)})(),t=J(H,Q),n=J(Y,ot),i=J(ct,F),r=J(tt,yt),(function(){for(var P=1,q=2,W=1;W<=15;W++){for(var lt=P;lt<q;lt++)S[32767+lt]=W,v[32767+lt]=[],v[32767+lt][1]=W,v[32767+lt][0]=lt;for(var ht=-(q-1);ht<=-P;ht++)S[32767+ht]=W,v[32767+ht]=[],v[32767+ht][1]=W,v[32767+ht][0]=q-1+ht;P<<=1,q<<=1}})(),(function(){for(var P=0;P<256;P++)ut[P]=19595*P,ut[P+256|0]=38470*P,ut[P+512|0]=7471*P+32768,ut[P+768|0]=-11059*P,ut[P+1024|0]=-21709*P,ut[P+1280|0]=32768*P+8421375,ut[P+1536|0]=-27439*P,ut[P+1792|0]=-5329*P})(),X(e)}/**
 * @license
 * Copyright (c) 2017 Aras Abbasi
 *
 * Licensed under the MIT License.
 * http://opensource.org/licenses/mit-license
 */function oo(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function k4(e){function t(Q){if(!Q)throw Error("assert :P")}function n(Q,ct,F){for(var Y=0;4>Y;Y++)if(Q[ct+Y]!=F.charCodeAt(Y))return!0;return!1}function i(Q,ct,F,Y,ot){for(var tt=0;tt<ot;tt++)Q[ct+tt]=F[Y+tt]}function r(Q,ct,F,Y){for(var ot=0;ot<Y;ot++)Q[ct+ot]=F}function o(Q){return new Int32Array(Q)}function c(Q,ct){for(var F=[],Y=0;Y<Q;Y++)F.push(new ct);return F}function u(Q,ct){var F=[];return(function Y(ot,tt,yt){for(var J=yt[tt],at=0;at<J&&(ot.push(yt.length>tt+1?[]:new ct),!(yt.length<tt+1));at++)Y(ot[at],tt+1,yt)})(F,0,Q),F}var h=function(){var Q=this;function ct(g,x){for(var C=1<<x-1>>>0;g&C;)C>>>=1;return C?(g&C-1)+C:g}function F(g,x,C,T,B){t(!(T%C));do g[x+(T-=C)]=B;while(0<T)}function Y(g,x,C,T,B){if(t(2328>=B),512>=B)var I=o(512);else if((I=o(B))==null)return 0;return(function(U,G,Z,rt,gt,jt){var it,bt,St=G,Ot=1<<Z,At=o(16),Rt=o(16);for(t(gt!=0),t(rt!=null),t(U!=null),t(0<Z),bt=0;bt<gt;++bt){if(15<rt[bt])return 0;++At[rt[bt]]}if(At[0]==gt)return 0;for(Rt[1]=0,it=1;15>it;++it){if(At[it]>1<<it)return 0;Rt[it+1]=Rt[it]+At[it]}for(bt=0;bt<gt;++bt)it=rt[bt],0<rt[bt]&&(jt[Rt[it]++]=bt);if(Rt[15]==1)return(rt=new ot).g=0,rt.value=jt[0],F(U,St,1,Ot,rt),Ot;var Ft,Gt=-1,Vt=Ot-1,ce=0,te=1,He=1,re=1<<Z;for(bt=0,it=1,gt=2;it<=Z;++it,gt<<=1){if(te+=He<<=1,0>(He-=At[it]))return 0;for(;0<At[it];--At[it])(rt=new ot).g=it,rt.value=jt[bt++],F(U,St+ce,gt,re,rt),ce=ct(ce,it)}for(it=Z+1,gt=2;15>=it;++it,gt<<=1){if(te+=He<<=1,0>(He-=At[it]))return 0;for(;0<At[it];--At[it]){if(rt=new ot,(ce&Vt)!=Gt){for(St+=re,Ft=1<<(Gt=it)-Z;15>Gt&&!(0>=(Ft-=At[Gt]));)++Gt,Ft<<=1;Ot+=re=1<<(Ft=Gt-Z),U[G+(Gt=ce&Vt)].g=Ft+Z,U[G+Gt].value=St-G-Gt}rt.g=it-Z,rt.value=jt[bt++],F(U,St+(ce>>Z),gt,re,rt),ce=ct(ce,it)}}return te!=2*Rt[15]-1?0:Ot})(g,x,C,T,B,I)}function ot(){this.value=this.g=0}function tt(){this.value=this.g=0}function yt(){this.G=c(5,ot),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=c(_o,tt)}function J(g,x,C,T){t(g!=null),t(x!=null),t(2147483648>T),g.Ca=254,g.I=0,g.b=-8,g.Ka=0,g.oa=x,g.pa=C,g.Jd=x,g.Yc=C+T,g.Zc=4<=T?C+T-4+1:C,Ct(g)}function at(g,x){for(var C=0;0<x--;)C|=Dt(g,128)<<x;return C}function K(g,x){var C=at(g,x);return _t(g)?-C:C}function dt(g,x,C,T){var B,I=0;for(t(g!=null),t(x!=null),t(4294967288>T),g.Sb=T,g.Ra=0,g.u=0,g.h=0,4<T&&(T=4),B=0;B<T;++B)I+=x[C+B]<<8*B;g.Ra=I,g.bb=T,g.oa=x,g.pa=C}function Tt(g){for(;8<=g.u&&g.bb<g.Sb;)g.Ra>>>=8,g.Ra+=g.oa[g.pa+g.bb]<<Aa-8>>>0,++g.bb,g.u-=8;lt(g)&&(g.h=1,g.u=0)}function X(g,x){if(t(0<=x),!g.h&&x<=Ps){var C=W(g)&Ws[x];return g.u+=x,Tt(g),C}return g.h=1,g.u=0}function P(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function q(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function W(g){return g.Ra>>>(g.u&Aa-1)>>>0}function lt(g){return t(g.bb<=g.Sb),g.h||g.bb==g.Sb&&g.u>Aa}function ht(g,x){g.u=x,g.h=lt(g)}function ft(g){g.u>=Ca&&(t(g.u>=Ca),Tt(g))}function Ct(g){t(g!=null&&g.oa!=null),g.pa<g.Zc?(g.I=(g.oa[g.pa++]|g.I<<8)>>>0,g.b+=8):(t(g!=null&&g.oa!=null),g.pa<g.Yc?(g.b+=8,g.I=g.oa[g.pa++]|g.I<<8):g.Ka?g.b=0:(g.I<<=8,g.b+=8,g.Ka=1))}function _t(g){return at(g,1)}function Dt(g,x){var C=g.Ca;0>g.b&&Ct(g);var T=g.b,B=C*x>>>8,I=(g.I>>>T>B)+0;for(I?(C-=B,g.I-=B+1<<T>>>0):C=B+1,T=C,B=0;256<=T;)B+=8,T>>=8;return T=7^B+Wa[T],g.b-=T,g.Ca=(C<<T)-1,I}function $t(g,x,C){g[x+0]=C>>24&255,g[x+1]=C>>16&255,g[x+2]=C>>8&255,g[x+3]=255&C}function Wt(g,x){return g[x+0]|g[x+1]<<8}function Xt(g,x){return Wt(g,x)|g[x+2]<<16}function se(g,x){return Wt(g,x)|Wt(g,x+2)<<16}function et(g,x){var C=1<<x;return t(g!=null),t(0<x),g.X=o(C),g.X==null?0:(g.Mb=32-x,g.Xa=x,1)}function Qt(g,x){t(g!=null),t(x!=null),t(g.Xa==x.Xa),i(x.X,0,g.X,0,1<<x.Xa)}function Ke(){this.X=[],this.Xa=this.Mb=0}function Ce(g,x,C,T){t(C!=null),t(T!=null);var B=C[0],I=T[0];return B==0&&(B=(g*I+x/2)/x),I==0&&(I=(x*B+g/2)/g),0>=B||0>=I?0:(C[0]=B,T[0]=I,1)}function Ut(g,x){return g+(1<<x)-1>>>x}function oe(g,x){return((4278255360&g)+(4278255360&x)>>>0&4278255360)+((16711935&g)+(16711935&x)>>>0&16711935)>>>0}function Zt(g,x){Q[x]=function(C,T,B,I,U,G,Z){var rt;for(rt=0;rt<U;++rt){var gt=Q[g](G[Z+rt-1],B,I+rt);G[Z+rt]=oe(C[T+rt],gt)}}}function ie(){this.ud=this.hd=this.jd=0}function xe(g,x){return((4278124286&(g^x))>>>1)+(g&x)>>>0}function ye(g){return 0<=g&&256>g?g:0>g?0:255<g?255:void 0}function nn(g,x){return ye(g+(g-x+.5>>1))}function Ue(g,x,C){return Math.abs(x-C)-Math.abs(g-C)}function on(g,x,C,T,B,I,U){for(T=I[U-1],C=0;C<B;++C)I[U+C]=T=oe(g[x+C],T)}function je(g,x,C,T,B){var I;for(I=0;I<C;++I){var U=g[x+I],G=U>>8&255,Z=16711935&(Z=(Z=16711935&U)+((G<<16)+G));T[B+I]=(4278255360&U)+Z>>>0}}function le(g,x){x.jd=255&g,x.hd=g>>8&255,x.ud=g>>16&255}function qe(g,x,C,T,B,I){var U;for(U=0;U<T;++U){var G=x[C+U],Z=G>>>8,rt=G,gt=255&(gt=(gt=G>>>16)+((g.jd<<24>>24)*(Z<<24>>24)>>>5));rt=255&(rt=(rt+=(g.hd<<24>>24)*(Z<<24>>24)>>>5)+((g.ud<<24>>24)*(gt<<24>>24)>>>5)),B[I+U]=(4278255360&G)+(gt<<16)+rt}}function pe(g,x,C,T,B){Q[x]=function(I,U,G,Z,rt,gt,jt,it,bt){for(Z=jt;Z<it;++Z)for(jt=0;jt<bt;++jt)rt[gt++]=B(G[T(I[U++])])},Q[g]=function(I,U,G,Z,rt,gt,jt){var it=8>>I.b,bt=I.Ea,St=I.K[0],Ot=I.w;if(8>it)for(I=(1<<I.b)-1,Ot=(1<<it)-1;U<G;++U){var At,Rt=0;for(At=0;At<bt;++At)At&I||(Rt=T(Z[rt++])),gt[jt++]=B(St[Rt&Ot]),Rt>>=it}else Q["VP8LMapColor"+C](Z,rt,St,Ot,gt,jt,U,G,bt)}}function Gn(g,x,C,T,B){for(C=x+C;x<C;){var I=g[x++];T[B++]=I>>16&255,T[B++]=I>>8&255,T[B++]=255&I}}function sn(g,x,C,T,B){for(C=x+C;x<C;){var I=g[x++];T[B++]=I>>16&255,T[B++]=I>>8&255,T[B++]=255&I,T[B++]=I>>24&255}}function Jt(g,x,C,T,B){for(C=x+C;x<C;){var I=(U=g[x++])>>16&240|U>>12&15,U=240&U|U>>28&15;T[B++]=I,T[B++]=U}}function Re(g,x,C,T,B){for(C=x+C;x<C;){var I=(U=g[x++])>>16&248|U>>13&7,U=U>>5&224|U>>3&31;T[B++]=I,T[B++]=U}}function rn(g,x,C,T,B){for(C=x+C;x<C;){var I=g[x++];T[B++]=255&I,T[B++]=I>>8&255,T[B++]=I>>16&255}}function we(g,x,C,T,B,I){if(I==0)for(C=x+C;x<C;)$t(T,((I=g[x++])[0]>>24|I[1]>>8&65280|I[2]<<8&16711680|I[3]<<24)>>>0),B+=32;else i(T,B,g,x,C)}function Ln(g,x){Q[x][0]=Q[g+"0"],Q[x][1]=Q[g+"1"],Q[x][2]=Q[g+"2"],Q[x][3]=Q[g+"3"],Q[x][4]=Q[g+"4"],Q[x][5]=Q[g+"5"],Q[x][6]=Q[g+"6"],Q[x][7]=Q[g+"7"],Q[x][8]=Q[g+"8"],Q[x][9]=Q[g+"9"],Q[x][10]=Q[g+"10"],Q[x][11]=Q[g+"11"],Q[x][12]=Q[g+"12"],Q[x][13]=Q[g+"13"],Q[x][14]=Q[g+"0"],Q[x][15]=Q[g+"0"]}function _e(g){return g==Vc||g==ku||g==Yl||g==Lu}function Ee(){this.eb=[],this.size=this.A=this.fb=0}function _n(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function Se(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Ee,this.f.kb=new _n,this.sd=null}function be(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function un(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function nr(g){return alert("todo:WebPSamplerProcessPlane"),g.T}function ki(g,x){var C=g.T,T=x.ba.f.RGBA,B=T.eb,I=T.fb+g.ka*T.A,U=us[x.ba.S],G=g.y,Z=g.O,rt=g.f,gt=g.N,jt=g.ea,it=g.W,bt=x.cc,St=x.dc,Ot=x.Mc,At=x.Nc,Rt=g.ka,Ft=g.ka+g.T,Gt=g.U,Vt=Gt+1>>1;for(Rt==0?U(G,Z,null,null,rt,gt,jt,it,rt,gt,jt,it,B,I,null,null,Gt):(U(x.ec,x.fc,G,Z,bt,St,Ot,At,rt,gt,jt,it,B,I-T.A,B,I,Gt),++C);Rt+2<Ft;Rt+=2)bt=rt,St=gt,Ot=jt,At=it,gt+=g.Rc,it+=g.Rc,I+=2*T.A,U(G,(Z+=2*g.fa)-g.fa,G,Z,bt,St,Ot,At,rt,gt,jt,it,B,I-T.A,B,I,Gt);return Z+=g.fa,g.j+Ft<g.o?(i(x.ec,x.fc,G,Z,Gt),i(x.cc,x.dc,rt,gt,Vt),i(x.Mc,x.Nc,jt,it,Vt),C--):1&Ft||U(G,Z,null,null,rt,gt,jt,it,rt,gt,jt,it,B,I+T.A,null,null,Gt),C}function br(g,x,C){var T=g.F,B=[g.J];if(T!=null){var I=g.U,U=x.ba.S,G=U==qc||U==Yl;x=x.ba.f.RGBA;var Z=[0],rt=g.ka;Z[0]=g.T,g.Kb&&(rt==0?--Z[0]:(--rt,B[0]-=g.width),g.j+g.ka+g.T==g.o&&(Z[0]=g.o-g.j-rt));var gt=x.eb;rt=x.fb+rt*x.A,g=Bc(T,B[0],g.width,I,Z,gt,rt+(G?0:3),x.A),t(C==Z),g&&_e(U)&&cl(gt,rt,G,I,Z,x.A)}return 0}function Li(g){var x=g.ma,C=x.ba.S,T=11>C,B=C==ws||C==Mr||C==qc||C==Gl||C==12||_e(C);if(x.memory=null,x.Ib=null,x.Jb=null,x.Nd=null,!Ya(x.Oa,g,B?11:12))return 0;if(B&&_e(C)&&ii(),g.da)alert("todo:use_scaling");else{if(T){if(x.Ib=nr,g.Kb){if(C=g.U+1>>1,x.memory=o(g.U+2*C),x.memory==null)return 0;x.ec=x.memory,x.fc=0,x.cc=x.ec,x.dc=x.fc+g.U,x.Mc=x.cc,x.Nc=x.dc+C,x.Ib=ki,ii()}}else alert("todo:EmitYUV");B&&(x.Jb=br,T&&Nn())}if(T&&!Po){for(g=0;256>g;++g)hs[g]=89858*(g-128)+Xl>>Dr,C0[g]=-22014*(g-128)+Xl,qf[g]=-45773*(g-128),zu[g]=113618*(g-128)+Xl>>Dr;for(g=fl;g<Lo;++g)x=76283*(g-16)+Xl>>Dr,_0[g-fl]=gs(x,255),j0[g-fl]=gs(x+8>>4,15);Po=1}return 1}function Ne(g){var x=g.ma,C=g.U,T=g.T;return t(!(1&g.ka)),0>=C||0>=T?0:(C=x.Ib(g,x),x.Jb!=null&&x.Jb(g,x,C),x.Dc+=C,1)}function bi(g){g.ma.memory=null}function xr(g,x,C,T){return X(g,8)!=47?0:(x[0]=X(g,14)+1,C[0]=X(g,14)+1,T[0]=X(g,1),X(g,3)!=0?0:!g.h)}function Yn(g,x){if(4>g)return g+1;var C=g-2>>1;return(2+(1&g)<<C)+X(x,C)+1}function _s(g,x){return 120<x?x-120:1<=(C=((C=kr[x-1])>>4)*g+(8-(15&C)))?C:1;var C}function On(g,x,C){var T=W(C),B=g[x+=255&T].g-8;return 0<B&&(ht(C,C.u+8),T=W(C),x+=g[x].value,x+=T&(1<<B)-1),ht(C,C.u+g[x].g),g[x].value}function ui(g,x,C){return C.g+=g.g,C.value+=g.value<<x>>>0,t(8>=C.g),g.g}function ti(g,x,C){var T=g.xc;return t((x=T==0?0:g.vc[g.md*(C>>T)+(x>>T)])<g.Wb),g.Ya[x]}function pa(g,x,C,T){var B=g.ab,I=g.c*x,U=g.C;x=U+x;var G=C,Z=T;for(T=g.Ta,C=g.Ua;0<B--;){var rt=g.gc[B],gt=U,jt=x,it=G,bt=Z,St=(Z=T,G=C,rt.Ea);switch(t(gt<jt),t(jt<=rt.nc),rt.hc){case 2:Ni(it,bt,(jt-gt)*St,Z,G);break;case 0:var Ot=gt,At=jt,Rt=Z,Ft=G,Gt=(re=rt).Ea;Ot==0&&(ql(it,bt,null,null,1,Rt,Ft),on(it,bt+1,0,0,Gt-1,Rt,Ft+1),bt+=Gt,Ft+=Gt,++Ot);for(var Vt=1<<re.b,ce=Vt-1,te=Ut(Gt,re.b),He=re.K,re=re.w+(Ot>>re.b)*te;Ot<At;){var hn=He,Xn=re,Qe=1;for(Vl(it,bt,Rt,Ft-Gt,1,Rt,Ft);Qe<Gt;){var ee=(Qe&~ce)+Vt;ee>Gt&&(ee=Gt),(0,Ka[hn[Xn++]>>8&15])(it,bt+ +Qe,Rt,Ft+Qe-Gt,ee-Qe,Rt,Ft+Qe),Qe=ee}bt+=Gt,Ft+=Gt,++Ot&ce||(re+=te)}jt!=rt.nc&&i(Z,G-St,Z,G+(jt-gt-1)*St,St);break;case 1:for(St=it,At=bt,Gt=(it=rt.Ea)-(Ft=it&~(Rt=(bt=1<<rt.b)-1)),Ot=Ut(it,rt.b),Vt=rt.K,rt=rt.w+(gt>>rt.b)*Ot;gt<jt;){for(ce=Vt,te=rt,He=new ie,re=At+Ft,hn=At+it;At<re;)le(ce[te++],He),Hl(He,St,At,bt,Z,G),At+=bt,G+=bt;At<hn&&(le(ce[te++],He),Hl(He,St,At,Gt,Z,G),At+=Gt,G+=Gt),++gt&Rt||(rt+=Ot)}break;case 3:if(it==Z&&bt==G&&0<rt.b){for(At=Z,it=St=G+(jt-gt)*St-(Ft=(jt-gt)*Ut(rt.Ea,rt.b)),bt=Z,Rt=G,Ot=[],Ft=(Gt=Ft)-1;0<=Ft;--Ft)Ot[Ft]=bt[Rt+Ft];for(Ft=Gt-1;0<=Ft;--Ft)At[it+Ft]=Ot[Ft];_u(rt,gt,jt,Z,St,Z,G)}else _u(rt,gt,jt,it,bt,Z,G)}G=T,Z=C}Z!=C&&i(T,C,G,Z,I)}function Wn(g,x){var C=g.V,T=g.Ba+g.c*g.C,B=x-g.C;if(t(x<=g.l.o),t(16>=B),0<B){var I=g.l,U=g.Ta,G=g.Ua,Z=I.width;if(pa(g,B,C,T),B=G=[G],t((C=g.C)<(T=x)),t(I.v<I.va),T>I.o&&(T=I.o),C<I.j){var rt=I.j-C;C=I.j,B[0]+=rt*Z}if(C>=T?C=0:(B[0]+=4*I.v,I.ka=C-I.j,I.U=I.va-I.v,I.T=T-C,C=1),C){if(G=G[0],11>(C=g.ca).S){var gt=C.f.RGBA,jt=(T=C.S,B=I.U,I=I.T,rt=gt.eb,gt.A),it=I;for(gt=gt.fb+g.Ma*gt.A;0<it--;){var bt=U,St=G,Ot=B,At=rt,Rt=gt;switch(T){case Mu:$l(bt,St,Ot,At,Rt);break;case ws:Xa(bt,St,Ot,At,Rt);break;case Vc:Xa(bt,St,Ot,At,Rt),cl(At,Rt,0,Ot,1,0);break;case Tu:ol(bt,St,Ot,At,Rt);break;case Mr:we(bt,St,Ot,At,Rt,1);break;case ku:we(bt,St,Ot,At,Rt,1),cl(At,Rt,0,Ot,1,0);break;case qc:we(bt,St,Ot,At,Rt,0);break;case Yl:we(bt,St,Ot,At,Rt,0),cl(At,Rt,1,Ot,1,0);break;case Gl:Qa(bt,St,Ot,At,Rt);break;case Lu:Qa(bt,St,Ot,At,Rt),Er(At,Rt,Ot,1,0);break;case jo:Ea(bt,St,Ot,At,Rt);break;default:t(0)}G+=Z,gt+=jt}g.Ma+=I}else alert("todo:EmitRescaledRowsYUVA");t(g.Ma<=C.height)}}g.C=x,t(g.C<=g.i)}function jn(g){var x;if(0<g.ua)return 0;for(x=0;x<g.Wb;++x){var C=g.Ya[x].G,T=g.Ya[x].H;if(0<C[1][T[1]+0].g||0<C[2][T[2]+0].g||0<C[3][T[3]+0].g)return 0}return 1}function En(g,x,C,T,B,I){if(g.Z!=0){var U=g.qd,G=g.rd;for(t(to[g.Z]!=null);x<C;++x)to[g.Z](U,G,T,B,T,B,I),U=T,G=B,B+=I;g.qd=U,g.rd=G}}function Ji(g,x){var C=g.l.ma,T=C.Z==0||C.Z==1?g.l.j:g.C;if(T=g.C<T?T:g.C,t(x<=g.l.o),x>T){var B=g.l.width,I=C.ca,U=C.tb+B*T,G=g.V,Z=g.Ba+g.c*T,rt=g.gc;t(g.ab==1),t(rt[0].hc==3),ja(rt[0],T,x,G,Z,I,U),En(C,T,x,I,U,B)}g.C=g.Ma=x}function ps(g,x,C,T,B,I,U){var G=g.$/T,Z=g.$%T,rt=g.m,gt=g.s,jt=C+g.$,it=jt;B=C+T*B;var bt=C+T*I,St=280+gt.ua,Ot=g.Pb?G:16777216,At=0<gt.ua?gt.Wa:null,Rt=gt.wc,Ft=jt<bt?ti(gt,Z,G):null;t(g.C<I),t(bt<=B);var Gt=!1;t:for(;;){for(;Gt||jt<bt;){var Vt=0;if(G>=Ot){var ce=jt-C;t((Ot=g).Pb),Ot.wd=Ot.m,Ot.xd=ce,0<Ot.s.ua&&Qt(Ot.s.Wa,Ot.s.vb),Ot=G+Eo}if(Z&Rt||(Ft=ti(gt,Z,G)),t(Ft!=null),Ft.Qb&&(x[jt]=Ft.qb,Gt=!0),!Gt)if(ft(rt),Ft.jc){Vt=rt,ce=x;var te=jt,He=Ft.pd[W(Vt)&_o-1];t(Ft.jc),256>He.g?(ht(Vt,Vt.u+He.g),ce[te]=He.value,Vt=0):(ht(Vt,Vt.u+He.g-256),t(256<=He.value),Vt=He.value),Vt==0&&(Gt=!0)}else Vt=On(Ft.G[0],Ft.H[0],rt);if(rt.h)break;if(Gt||256>Vt){if(!Gt)if(Ft.nd)x[jt]=(Ft.qb|Vt<<8)>>>0;else{if(ft(rt),Gt=On(Ft.G[1],Ft.H[1],rt),ft(rt),ce=On(Ft.G[2],Ft.H[2],rt),te=On(Ft.G[3],Ft.H[3],rt),rt.h)break;x[jt]=(te<<24|Gt<<16|Vt<<8|ce)>>>0}if(Gt=!1,++jt,++Z>=T&&(Z=0,++G,U!=null&&G<=I&&!(G%16)&&U(g,G),At!=null))for(;it<jt;)Vt=x[it++],At.X[(506832829*Vt&4294967295)>>>At.Mb]=Vt}else if(280>Vt){if(Vt=Yn(Vt-256,rt),ce=On(Ft.G[4],Ft.H[4],rt),ft(rt),ce=_s(T,ce=Yn(ce,rt)),rt.h)break;if(jt-C<ce||B-jt<Vt)break t;for(te=0;te<Vt;++te)x[jt+te]=x[jt+te-ce];for(jt+=Vt,Z+=Vt;Z>=T;)Z-=T,++G,U!=null&&G<=I&&!(G%16)&&U(g,G);if(t(jt<=B),Z&Rt&&(Ft=ti(gt,Z,G)),At!=null)for(;it<jt;)Vt=x[it++],At.X[(506832829*Vt&4294967295)>>>At.Mb]=Vt}else{if(!(Vt<St))break t;for(Gt=Vt-280,t(At!=null);it<jt;)Vt=x[it++],At.X[(506832829*Vt&4294967295)>>>At.Mb]=Vt;Vt=jt,t(!(Gt>>>(ce=At).Xa)),x[Vt]=ce.X[Gt],Gt=!0}Gt||t(rt.h==lt(rt))}if(g.Pb&&rt.h&&jt<B)t(g.m.h),g.a=5,g.m=g.wd,g.$=g.xd,0<g.s.ua&&Qt(g.s.vb,g.s.Wa);else{if(rt.h)break t;U?.(g,G>I?I:G),g.a=0,g.$=jt-C}return 1}return g.a=3,0}function js(g){t(g!=null),g.vc=null,g.yc=null,g.Ya=null;var x=g.Wa;x!=null&&(x.X=null),g.vb=null,t(g!=null)}function Xe(){var g=new Oe;return g==null?null:(g.a=0,g.xb=rd,Ln("Predictor","VP8LPredictors"),Ln("Predictor","VP8LPredictors_C"),Ln("PredictorAdd","VP8LPredictorsAdd"),Ln("PredictorAdd","VP8LPredictorsAdd_C"),Ni=je,Hl=qe,$l=Gn,Xa=sn,Qa=Jt,Ea=Re,ol=rn,Q.VP8LMapColor32b=_a,Q.VP8LMapColor8b=os,g)}function Vs(g,x,C,T,B){var I=1,U=[g],G=[x],Z=T.m,rt=T.s,gt=null,jt=0;t:for(;;){if(C)for(;I&&X(Z,1);){var it=U,bt=G,St=T,Ot=1,At=St.m,Rt=St.gc[St.ab],Ft=X(At,2);if(St.Oc&1<<Ft)I=0;else{switch(St.Oc|=1<<Ft,Rt.hc=Ft,Rt.Ea=it[0],Rt.nc=bt[0],Rt.K=[null],++St.ab,t(4>=St.ab),Ft){case 0:case 1:Rt.b=X(At,3)+2,Ot=Vs(Ut(Rt.Ea,Rt.b),Ut(Rt.nc,Rt.b),0,St,Rt.K),Rt.K=Rt.K[0];break;case 3:var Gt,Vt=X(At,8)+1,ce=16<Vt?0:4<Vt?1:2<Vt?2:3;if(it[0]=Ut(Rt.Ea,ce),Rt.b=ce,Gt=Ot=Vs(Vt,1,0,St,Rt.K)){var te,He=Vt,re=Rt,hn=1<<(8>>re.b),Xn=o(hn);if(Xn==null)Gt=0;else{var Qe=re.K[0],ee=re.w;for(Xn[0]=re.K[0][0],te=1;te<1*He;++te)Xn[te]=oe(Qe[ee+te],Xn[te-1]);for(;te<4*hn;++te)Xn[te]=0;re.K[0]=null,re.K[0]=Xn,Gt=1}}Ot=Gt;break;case 2:break;default:t(0)}I=Ot}}if(U=U[0],G=G[0],I&&X(Z,1)&&!(I=1<=(jt=X(Z,4))&&11>=jt)){T.a=3;break t}var Kt;if(Kt=I)e:{var si,Be,tn,Pn=T,$i=U,ds=G,qn=jt,Oi=C,Ss=Pn.m,zi=Pn.s,ln=[null],xn=1,ri=0,Cn=Lr[qn];n:for(;;){if(Oi&&X(Ss,1)){var Gi=X(Ss,3)+2,ai=Ut($i,Gi),wn=Ut(ds,Gi),_i=ai*wn;if(!Vs(ai,wn,0,Pn,ln))break n;for(ln=ln[0],zi.xc=Gi,si=0;si<_i;++si){var Rn=ln[si]>>8&65535;ln[si]=Rn,Rn>=xn&&(xn=Rn+1)}}if(Ss.h)break n;for(Be=0;5>Be;++Be){var Bi=hl[Be];!Be&&0<qn&&(Bi+=1<<qn),ri<Bi&&(ri=Bi)}var Fi=c(xn*Cn,ot),zn=xn,bn=c(zn,yt);if(bn==null)var Ns=null;else t(65536>=zn),Ns=bn;var mi=o(ri);if(Ns==null||mi==null||Fi==null){Pn.a=1;break n}var Te=Fi;for(si=tn=0;si<xn;++si){var ke=Ns[si],Sn=ke.G,Ks=ke.H,Or=0,Ds=1,Ii=0;for(Be=0;5>Be;++Be){Bi=hl[Be],Sn[Be]=Te,Ks[Be]=tn,!Be&&0<qn&&(Bi+=1<<qn);s:{var Ro,Do=Bi,Fu=Pn,Vn=mi,od=Te,ld=tn,Iu=0,eo=Fu.m,E0=X(eo,1);if(r(Vn,0,0,Do),E0){var cd=X(eo,1)+1,ud=X(eo,1),Uu=X(eo,ud==0?1:8);Vn[Uu]=1,cd==2&&(Vn[Uu=X(eo,8)]=1);var es=1}else{var pi=o(19),Yc=X(eo,4)+4;if(19<Yc){Fu.a=3;var Oo=0;break s}for(Ro=0;Ro<Yc;++Ro)pi[Hc[Ro]]=X(eo,3);var Zl=void 0,ml=void 0,ka=Fu,qu=pi,Jl=Do,Vu=Vn,Hu=0,no=ka.m,hd=8,dd=c(128,ot);i:for(;Y(dd,0,7,qu,19);){if(X(no,1)){var Vf=2+2*X(no,3);if((Zl=2+X(no,Vf))>Jl)break i}else Zl=Jl;for(ml=0;ml<Jl&&Zl--;){ft(no);var fd=dd[0+(127&W(no))];ht(no,no.u+fd.g);var zo=fd.value;if(16>zo)Vu[ml++]=zo,zo!=0&&(hd=zo);else{var Hf=zo==16,$f=zo-16,Gf=Wl[$f],md=X(no,Tr[$f])+Gf;if(ml+md>Jl)break i;for(var Yf=Hf?hd:0;0<md--;)Vu[ml++]=Yf}}Hu=1;break i}Hu||(ka.a=3),es=Hu}(es=es&&!eo.h)&&(Iu=Y(od,ld,8,Vn,Do)),es&&Iu!=0?Oo=Iu:(Fu.a=3,Oo=0)}if(Oo==0)break n;if(Ds&&Pu[Be]==1&&(Ds=Te[tn].g==0),Or+=Te[tn].g,tn+=Oo,3>=Be){var pl,$u=mi[0];for(pl=1;pl<Bi;++pl)mi[pl]>$u&&($u=mi[pl]);Ii+=$u}}if(ke.nd=Ds,ke.Qb=0,Ds&&(ke.qb=(Sn[3][Ks[3]+0].value<<24|Sn[1][Ks[1]+0].value<<16|Sn[2][Ks[2]+0].value)>>>0,Or==0&&256>Sn[0][Ks[0]+0].value&&(ke.Qb=1,ke.qb+=Sn[0][Ks[0]+0].value<<8)),ke.jc=!ke.Qb&&6>Ii,ke.jc){var Wc,La=ke;for(Wc=0;Wc<_o;++Wc){var io=Wc,so=La.pd[io],Gu=La.G[0][La.H[0]+io];256<=Gu.value?(so.g=Gu.g+256,so.value=Gu.value):(so.g=0,so.value=0,io>>=ui(Gu,8,so),io>>=ui(La.G[1][La.H[1]+io],16,so),io>>=ui(La.G[2][La.H[2]+io],0,so),ui(La.G[3][La.H[3]+io],24,so))}}}zi.vc=ln,zi.Wb=xn,zi.Ya=Ns,zi.yc=Fi,Kt=1;break e}Kt=0}if(!(I=Kt)){T.a=3;break t}if(0<jt){if(rt.ua=1<<jt,!et(rt.Wa,jt)){T.a=1,I=0;break t}}else rt.ua=0;var Yu=T,gl=U,Wf=G,tc=Yu.s,ec=tc.xc;if(Yu.c=gl,Yu.i=Wf,tc.md=Ut(gl,ec),tc.wc=ec==0?-1:(1<<ec)-1,C){T.xb=Mo;break t}if((gt=o(U*G))==null){T.a=1,I=0;break t}I=(I=ps(T,gt,0,U,G,G,null))&&!Z.h;break t}return I?(B!=null?B[0]=gt:(t(gt==null),t(C)),T.$=0,C||js(rt)):js(rt),I}function Hs(g,x){var C=g.c*g.i,T=C+x+16*x;return t(g.c<=x),g.V=o(T),g.V==null?(g.Ta=null,g.Ua=0,g.a=1,0):(g.Ta=g.V,g.Ua=g.Ba+C+x,1)}function $r(g,x){var C=g.C,T=x-C,B=g.V,I=g.Ba+g.c*C;for(t(x<=g.l.o);0<T;){var U=16<T?16:T,G=g.l.ma,Z=g.l.width,rt=Z*U,gt=G.ca,jt=G.tb+Z*C,it=g.Ta,bt=g.Ua;pa(g,U,B,I),dr(it,bt,gt,jt,rt),En(G,C,C+U,gt,jt,Z),T-=U,B+=U*g.c,C+=U}t(C==x),g.C=g.Ma=x}function Es(){this.ub=this.yd=this.td=this.Rb=0}function Ms(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function wr(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Sr(){this.Yb=(function(){var g=[];return(function x(C,T,B){for(var I=B[T],U=0;U<I&&(C.push(B.length>T+1?[]:0),!(B.length<T+1));U++)x(C[U],T+1,B)})(g,0,[3,11]),g})()}function ei(){this.jb=o(3),this.Wc=u([4,8],Sr),this.Xc=u([4,17],Sr)}function go(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function vn(){this.ld=this.La=this.dd=this.tc=0}function Ts(){this.Na=this.la=0}function Nr(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function vo(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ir(){this.uc=this.M=this.Nb=0,this.wa=Array(new vn),this.Y=0,this.ya=Array(new vo),this.aa=0,this.l=new hi}function tl(){this.y=o(16),this.f=o(8),this.ea=o(8)}function yo(){this.cb=this.a=0,this.sc="",this.m=new P,this.Od=new Es,this.Kc=new Ms,this.ed=new go,this.Qa=new wr,this.Ic=this.$c=this.Aa=0,this.D=new ir,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=c(8,P),this.ia=0,this.pb=c(4,Nr),this.Pa=new ei,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new tl),this.Hd=0,this.rb=Array(new Ts),this.sb=0,this.wa=Array(new vn),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new vo),this.L=this.aa=0,this.gd=u([4,2],vn),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function gs(g,x){return 0>g?0:g>x?x:g}function hi(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function sr(){var g=new yo;return g!=null&&(g.a=0,g.sc="OK",g.cb=0,g.Xb=0,fr||(fr=ga)),g}function Ie(g,x,C){return g.a==0&&(g.a=x,g.sc=C,g.cb=0),0}function el(g,x,C){return 3<=C&&g[x+0]==157&&g[x+1]==1&&g[x+2]==42}function rs(g,x){if(g==null)return 0;if(g.a=0,g.sc="OK",x==null)return Ie(g,2,"null VP8Io passed to VP8GetHeaders()");var C=x.data,T=x.w,B=x.ha;if(4>B)return Ie(g,7,"Truncated header.");var I=C[T+0]|C[T+1]<<8|C[T+2]<<16,U=g.Od;if(U.Rb=!(1&I),U.td=I>>1&7,U.yd=I>>4&1,U.ub=I>>5,3<U.td)return Ie(g,3,"Incorrect keyframe parameters.");if(!U.yd)return Ie(g,4,"Frame not displayable.");T+=3,B-=3;var G=g.Kc;if(U.Rb){if(7>B)return Ie(g,7,"cannot parse picture header");if(!el(C,T,B))return Ie(g,3,"Bad code word");G.c=16383&(C[T+4]<<8|C[T+3]),G.Td=C[T+4]>>6,G.i=16383&(C[T+6]<<8|C[T+5]),G.Ud=C[T+6]>>6,T+=7,B-=7,g.za=G.c+15>>4,g.Ub=G.i+15>>4,x.width=G.c,x.height=G.i,x.Da=0,x.j=0,x.v=0,x.va=x.width,x.o=x.height,x.da=0,x.ib=x.width,x.hb=x.height,x.U=x.width,x.T=x.height,r((I=g.Pa).jb,0,255,I.jb.length),t((I=g.Qa)!=null),I.Cb=0,I.Bb=0,I.Fb=1,r(I.Zb,0,0,I.Zb.length),r(I.Lb,0,0,I.Lb)}if(U.ub>B)return Ie(g,7,"bad partition length");J(I=g.m,C,T,U.ub),T+=U.ub,B-=U.ub,U.Rb&&(G.Ld=_t(I),G.Kd=_t(I)),G=g.Qa;var Z,rt=g.Pa;if(t(I!=null),t(G!=null),G.Cb=_t(I),G.Cb){if(G.Bb=_t(I),_t(I)){for(G.Fb=_t(I),Z=0;4>Z;++Z)G.Zb[Z]=_t(I)?K(I,7):0;for(Z=0;4>Z;++Z)G.Lb[Z]=_t(I)?K(I,6):0}if(G.Bb)for(Z=0;3>Z;++Z)rt.jb[Z]=_t(I)?at(I,8):255}else G.Bb=0;if(I.Ka)return Ie(g,3,"cannot parse segment header");if((G=g.ed).zd=_t(I),G.Tb=at(I,6),G.wb=at(I,3),G.Pc=_t(I),G.Pc&&_t(I)){for(rt=0;4>rt;++rt)_t(I)&&(G.vd[rt]=K(I,6));for(rt=0;4>rt;++rt)_t(I)&&(G.od[rt]=K(I,6))}if(g.L=G.Tb==0?0:G.zd?1:2,I.Ka)return Ie(g,3,"cannot parse filter header");var gt=B;if(B=Z=T,T=Z+gt,G=gt,g.Xb=(1<<at(g.m,2))-1,gt<3*(rt=g.Xb))C=7;else{for(Z+=3*rt,G-=3*rt,gt=0;gt<rt;++gt){var jt=C[B+0]|C[B+1]<<8|C[B+2]<<16;jt>G&&(jt=G),J(g.Jc[+gt],C,Z,jt),Z+=jt,G-=jt,B+=3}J(g.Jc[+rt],C,Z,G),C=Z<T?0:5}if(C!=0)return Ie(g,C,"cannot parse partitions");for(C=at(Z=g.m,7),B=_t(Z)?K(Z,4):0,T=_t(Z)?K(Z,4):0,G=_t(Z)?K(Z,4):0,rt=_t(Z)?K(Z,4):0,Z=_t(Z)?K(Z,4):0,gt=g.Qa,jt=0;4>jt;++jt){if(gt.Cb){var it=gt.Zb[jt];gt.Fb||(it+=C)}else{if(0<jt){g.pb[jt]=g.pb[0];continue}it=C}var bt=g.pb[jt];bt.Sc[0]=Pr[gs(it+B,127)],bt.Sc[1]=Rr[gs(it+0,127)],bt.Eb[0]=2*Pr[gs(it+T,127)],bt.Eb[1]=101581*Rr[gs(it+G,127)]>>16,8>bt.Eb[1]&&(bt.Eb[1]=8),bt.Qc[0]=Pr[gs(it+rt,117)],bt.Qc[1]=Rr[gs(it+Z,127)],bt.lc=it+Z}if(!U.Rb)return Ie(g,4,"Not a key frame.");for(_t(I),U=g.Pa,C=0;4>C;++C){for(B=0;8>B;++B)for(T=0;3>T;++T)for(G=0;11>G;++G)rt=Dt(I,Kn[C][B][T][G])?at(I,8):Uf[C][B][T][G],U.Wc[C][B].Yb[T][G]=rt;for(B=0;17>B;++B)U.Xc[C][B]=U.Wc[C][dn[B]]}return g.kc=_t(I),g.kc&&(g.Bd=at(I,8)),g.cb=1}function ga(g,x,C,T,B,I,U){var G=x[B].Yb[C];for(C=0;16>B;++B){if(!Dt(g,G[C+0]))return B;for(;!Dt(g,G[C+1]);)if(G=x[++B].Yb[0],C=0,B==16)return 16;var Z=x[B+1].Yb;if(Dt(g,G[C+2])){var rt=g,gt=0;if(Dt(rt,(it=G)[(jt=C)+3]))if(Dt(rt,it[jt+6])){for(G=0,jt=2*(gt=Dt(rt,it[jt+8]))+(it=Dt(rt,it[jt+9+gt])),gt=0,it=If[jt];it[G];++G)gt+=gt+Dt(rt,it[G]);gt+=3+(8<<jt)}else Dt(rt,it[jt+7])?(gt=7+2*Dt(rt,165),gt+=Dt(rt,145)):gt=5+Dt(rt,159);else gt=Dt(rt,it[jt+4])?3+Dt(rt,it[jt+5]):2;G=Z[2]}else gt=1,G=Z[1];Z=U+sd[B],0>(rt=g).b&&Ct(rt);var jt,it=rt.b,bt=(jt=rt.Ca>>1)-(rt.I>>it)>>31;--rt.b,rt.Ca+=bt,rt.Ca|=1,rt.I-=(jt+1&bt)<<it,I[Z]=((gt^bt)-bt)*T[(0<B)+0]}return 16}function va(g){var x=g.rb[g.sb-1];x.la=0,x.Na=0,r(g.zc,0,0,g.zc.length),g.ja=0}function as(g,x,C,T,B){B=g[x+C+32*T]+(B>>3),g[x+C+32*T]=-256&B?0>B?0:255:B}function ni(g,x,C,T,B,I){as(g,x,0,C,T+B),as(g,x,1,C,T+I),as(g,x,2,C,T-I),as(g,x,3,C,T-B)}function di(g){return(20091*g>>16)+g}function rr(g,x,C,T){var B,I=0,U=o(16);for(B=0;4>B;++B){var G=g[x+0]+g[x+8],Z=g[x+0]-g[x+8],rt=(35468*g[x+4]>>16)-di(g[x+12]),gt=di(g[x+4])+(35468*g[x+12]>>16);U[I+0]=G+gt,U[I+1]=Z+rt,U[I+2]=Z-rt,U[I+3]=G-gt,I+=4,x++}for(B=I=0;4>B;++B)G=(g=U[I+0]+4)+U[I+8],Z=g-U[I+8],rt=(35468*U[I+4]>>16)-di(U[I+12]),as(C,T,0,0,G+(gt=di(U[I+4])+(35468*U[I+12]>>16))),as(C,T,1,0,Z+rt),as(C,T,2,0,Z-rt),as(C,T,3,0,G-gt),I++,T+=32}function vs(g,x,C,T){var B=g[x+0]+4,I=35468*g[x+4]>>16,U=di(g[x+4]),G=35468*g[x+1]>>16;ni(C,T,0,B+U,g=di(g[x+1]),G),ni(C,T,1,B+I,g,G),ni(C,T,2,B-I,g,G),ni(C,T,3,B-U,g,G)}function Gr(g,x,C,T,B){rr(g,x,C,T),B&&rr(g,x+16,C,T+4)}function Hi(g,x,C,T){Za(g,x+0,C,T,1),Za(g,x+32,C,T+128,1)}function nl(g,x,C,T){var B;for(g=g[x+0]+4,B=0;4>B;++B)for(x=0;4>x;++x)as(C,T,x,B,g)}function ar(g,x,C,T){g[x+0]&&An(g,x+0,C,T),g[x+16]&&An(g,x+16,C,T+4),g[x+32]&&An(g,x+32,C,T+128),g[x+48]&&An(g,x+48,C,T+128+4)}function $s(g,x,C,T){var B,I=o(16);for(B=0;4>B;++B){var U=g[x+0+B]+g[x+12+B],G=g[x+4+B]+g[x+8+B],Z=g[x+4+B]-g[x+8+B],rt=g[x+0+B]-g[x+12+B];I[0+B]=U+G,I[8+B]=U-G,I[4+B]=rt+Z,I[12+B]=rt-Z}for(B=0;4>B;++B)U=(g=I[0+4*B]+3)+I[3+4*B],G=I[1+4*B]+I[2+4*B],Z=I[1+4*B]-I[2+4*B],rt=g-I[3+4*B],C[T+0]=U+G>>3,C[T+16]=rt+Z>>3,C[T+32]=U-G>>3,C[T+48]=rt-Z>>3,T+=64}function xi(g,x,C){var T,B=x-32,I=xs,U=255-g[B-1];for(T=0;T<C;++T){var G,Z=I,rt=U+g[x-1];for(G=0;G<C;++G)g[x+G]=Z[rt+g[B+G]];x+=32}}function il(g,x){xi(g,x,4)}function Pi(g,x){xi(g,x,8)}function ya(g,x){xi(g,x,16)}function Yr(g,x){var C;for(C=0;16>C;++C)i(g,x+32*C,g,x-32,16)}function Ua(g,x){var C;for(C=16;0<C;--C)r(g,x,g[x-1],16),x+=32}function wi(g,x,C){var T;for(T=0;16>T;++T)r(x,C+32*T,g,16)}function Gs(g,x){var C,T=16;for(C=0;16>C;++C)T+=g[x-1+32*C]+g[x+C-32];wi(T>>5,g,x)}function or(g,x){var C,T=8;for(C=0;16>C;++C)T+=g[x-1+32*C];wi(T>>4,g,x)}function qa(g,x){var C,T=8;for(C=0;16>C;++C)T+=g[x+C-32];wi(T>>4,g,x)}function ba(g,x){wi(128,g,x)}function De(g,x,C){return g+2*x+C+2>>2}function sl(g,x){var C,T=x-32;for(T=new Uint8Array([De(g[T-1],g[T+0],g[T+1]),De(g[T+0],g[T+1],g[T+2]),De(g[T+1],g[T+2],g[T+3]),De(g[T+2],g[T+3],g[T+4])]),C=0;4>C;++C)i(g,x+32*C,T,0,T.length)}function bo(g,x){var C=g[x-1],T=g[x-1+32],B=g[x-1+64],I=g[x-1+96];$t(g,x+0,16843009*De(g[x-1-32],C,T)),$t(g,x+32,16843009*De(C,T,B)),$t(g,x+64,16843009*De(T,B,I)),$t(g,x+96,16843009*De(B,I,I))}function rl(g,x){var C,T=4;for(C=0;4>C;++C)T+=g[x+C-32]+g[x-1+32*C];for(T>>=3,C=0;4>C;++C)r(g,x+32*C,T,4)}function Mn(g,x){var C=g[x-1+0],T=g[x-1+32],B=g[x-1+64],I=g[x-1-32],U=g[x+0-32],G=g[x+1-32],Z=g[x+2-32],rt=g[x+3-32];g[x+0+96]=De(T,B,g[x-1+96]),g[x+1+96]=g[x+0+64]=De(C,T,B),g[x+2+96]=g[x+1+64]=g[x+0+32]=De(I,C,T),g[x+3+96]=g[x+2+64]=g[x+1+32]=g[x+0+0]=De(U,I,C),g[x+3+64]=g[x+2+32]=g[x+1+0]=De(G,U,I),g[x+3+32]=g[x+2+0]=De(Z,G,U),g[x+3+0]=De(rt,Z,G)}function Si(g,x){var C=g[x+1-32],T=g[x+2-32],B=g[x+3-32],I=g[x+4-32],U=g[x+5-32],G=g[x+6-32],Z=g[x+7-32];g[x+0+0]=De(g[x+0-32],C,T),g[x+1+0]=g[x+0+32]=De(C,T,B),g[x+2+0]=g[x+1+32]=g[x+0+64]=De(T,B,I),g[x+3+0]=g[x+2+32]=g[x+1+64]=g[x+0+96]=De(B,I,U),g[x+3+32]=g[x+2+64]=g[x+1+96]=De(I,U,G),g[x+3+64]=g[x+2+96]=De(U,G,Z),g[x+3+96]=De(G,Z,Z)}function xo(g,x){var C=g[x-1+0],T=g[x-1+32],B=g[x-1+64],I=g[x-1-32],U=g[x+0-32],G=g[x+1-32],Z=g[x+2-32],rt=g[x+3-32];g[x+0+0]=g[x+1+64]=I+U+1>>1,g[x+1+0]=g[x+2+64]=U+G+1>>1,g[x+2+0]=g[x+3+64]=G+Z+1>>1,g[x+3+0]=Z+rt+1>>1,g[x+0+96]=De(B,T,C),g[x+0+64]=De(T,C,I),g[x+0+32]=g[x+1+96]=De(C,I,U),g[x+1+32]=g[x+2+96]=De(I,U,G),g[x+2+32]=g[x+3+96]=De(U,G,Z),g[x+3+32]=De(G,Z,rt)}function xa(g,x){var C=g[x+0-32],T=g[x+1-32],B=g[x+2-32],I=g[x+3-32],U=g[x+4-32],G=g[x+5-32],Z=g[x+6-32],rt=g[x+7-32];g[x+0+0]=C+T+1>>1,g[x+1+0]=g[x+0+64]=T+B+1>>1,g[x+2+0]=g[x+1+64]=B+I+1>>1,g[x+3+0]=g[x+2+64]=I+U+1>>1,g[x+0+32]=De(C,T,B),g[x+1+32]=g[x+0+96]=De(T,B,I),g[x+2+32]=g[x+1+96]=De(B,I,U),g[x+3+32]=g[x+2+96]=De(I,U,G),g[x+3+64]=De(U,G,Z),g[x+3+96]=De(G,Z,rt)}function ys(g,x){var C=g[x-1+0],T=g[x-1+32],B=g[x-1+64],I=g[x-1+96];g[x+0+0]=C+T+1>>1,g[x+2+0]=g[x+0+32]=T+B+1>>1,g[x+2+32]=g[x+0+64]=B+I+1>>1,g[x+1+0]=De(C,T,B),g[x+3+0]=g[x+1+32]=De(T,B,I),g[x+3+32]=g[x+1+64]=De(B,I,I),g[x+3+64]=g[x+2+64]=g[x+0+96]=g[x+1+96]=g[x+2+96]=g[x+3+96]=I}function wa(g,x){var C=g[x-1+0],T=g[x-1+32],B=g[x-1+64],I=g[x-1+96],U=g[x-1-32],G=g[x+0-32],Z=g[x+1-32],rt=g[x+2-32];g[x+0+0]=g[x+2+32]=C+U+1>>1,g[x+0+32]=g[x+2+64]=T+C+1>>1,g[x+0+64]=g[x+2+96]=B+T+1>>1,g[x+0+96]=I+B+1>>1,g[x+3+0]=De(G,Z,rt),g[x+2+0]=De(U,G,Z),g[x+1+0]=g[x+3+32]=De(C,U,G),g[x+1+32]=g[x+3+64]=De(T,C,U),g[x+1+64]=g[x+3+96]=De(B,T,C),g[x+1+96]=De(I,B,T)}function lr(g,x){var C;for(C=0;8>C;++C)i(g,x+32*C,g,x-32,8)}function Wr(g,x){var C;for(C=0;8>C;++C)r(g,x,g[x-1],8),x+=32}function Ri(g,x,C){var T;for(T=0;8>T;++T)r(x,C+32*T,g,8)}function Sa(g,x){var C,T=8;for(C=0;8>C;++C)T+=g[x+C-32]+g[x-1+32*C];Ri(T>>4,g,x)}function wo(g,x){var C,T=4;for(C=0;8>C;++C)T+=g[x+C-32];Ri(T>>3,g,x)}function Di(g,x){var C,T=4;for(C=0;8>C;++C)T+=g[x-1+32*C];Ri(T>>3,g,x)}function Ar(g,x){Ri(128,g,x)}function Ys(g,x,C){var T=g[x-C],B=g[x+0],I=3*(B-T)+Ja[1020+g[x-2*C]-g[x+C]],U=Uc[112+(I+4>>3)];g[x-C]=xs[255+T+Uc[112+(I+3>>3)]],g[x+0]=xs[255+B-U]}function Cr(g,x,C,T){var B=g[x+0],I=g[x+C];return ls[255+g[x-2*C]-g[x-C]]>T||ls[255+I-B]>T}function _r(g,x,C,T){return 4*ls[255+g[x-C]-g[x+0]]+ls[255+g[x-2*C]-g[x+C]]<=T}function Va(g,x,C,T,B){var I=g[x-3*C],U=g[x-2*C],G=g[x-C],Z=g[x+0],rt=g[x+C],gt=g[x+2*C],jt=g[x+3*C];return 4*ls[255+G-Z]+ls[255+U-rt]>T?0:ls[255+g[x-4*C]-I]<=B&&ls[255+I-U]<=B&&ls[255+U-G]<=B&&ls[255+jt-gt]<=B&&ls[255+gt-rt]<=B&&ls[255+rt-Z]<=B}function Kr(g,x,C,T){var B=2*T+1;for(T=0;16>T;++T)_r(g,x+T,C,B)&&Ys(g,x+T,C)}function Xr(g,x,C,T){var B=2*T+1;for(T=0;16>T;++T)_r(g,x+T*C,1,B)&&Ys(g,x+T*C,1)}function Ha(g,x,C,T){var B;for(B=3;0<B;--B)Kr(g,x+=4*C,C,T)}function So(g,x,C,T){var B;for(B=3;0<B;--B)Xr(g,x+=4,C,T)}function Qr(g,x,C,T,B,I,U,G){for(I=2*I+1;0<B--;){if(Va(g,x,C,I,U))if(Cr(g,x,C,G))Ys(g,x,C);else{var Z=g,rt=x,gt=C,jt=Z[rt-2*gt],it=Z[rt-gt],bt=Z[rt+0],St=Z[rt+gt],Ot=Z[rt+2*gt],At=27*(Ft=Ja[1020+3*(bt-it)+Ja[1020+jt-St]])+63>>7,Rt=18*Ft+63>>7,Ft=9*Ft+63>>7;Z[rt-3*gt]=xs[255+Z[rt-3*gt]+Ft],Z[rt-2*gt]=xs[255+jt+Rt],Z[rt-gt]=xs[255+it+At],Z[rt+0]=xs[255+bt-At],Z[rt+gt]=xs[255+St-Rt],Z[rt+2*gt]=xs[255+Ot-Ft]}x+=T}}function Zr(g,x,C,T,B,I,U,G){for(I=2*I+1;0<B--;){if(Va(g,x,C,I,U))if(Cr(g,x,C,G))Ys(g,x,C);else{var Z=g,rt=x,gt=C,jt=Z[rt-gt],it=Z[rt+0],bt=Z[rt+gt],St=Uc[112+(4+(Ot=3*(it-jt))>>3)],Ot=Uc[112+(Ot+3>>3)],At=St+1>>1;Z[rt-2*gt]=xs[255+Z[rt-2*gt]+At],Z[rt-gt]=xs[255+jt+Ot],Z[rt+0]=xs[255+it-St],Z[rt+gt]=xs[255+bt-At]}x+=T}}function Fl(g,x,C,T,B,I){Qr(g,x,C,1,16,T,B,I)}function ks(g,x,C,T,B,I){Qr(g,x,1,C,16,T,B,I)}function No(g,x,C,T,B,I){var U;for(U=3;0<U;--U)Zr(g,x+=4*C,C,1,16,T,B,I)}function N(g,x,C,T,B,I){var U;for(U=3;0<U;--U)Zr(g,x+=4,1,C,16,T,B,I)}function O(g,x,C,T,B,I,U,G){Qr(g,x,B,1,8,I,U,G),Qr(C,T,B,1,8,I,U,G)}function st(g,x,C,T,B,I,U,G){Qr(g,x,1,B,8,I,U,G),Qr(C,T,1,B,8,I,U,G)}function pt(g,x,C,T,B,I,U,G){Zr(g,x+4*B,B,1,8,I,U,G),Zr(C,T+4*B,B,1,8,I,U,G)}function xt(g,x,C,T,B,I,U,G){Zr(g,x+4,1,B,8,I,U,G),Zr(C,T+4,1,B,8,I,U,G)}function zt(){this.ba=new Se,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new un,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Ht(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ne(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function fe(){this.ua=0,this.Wa=new Ke,this.vb=new Ke,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new yt,this.yc=new ot}function Oe(){this.xb=this.a=0,this.l=new hi,this.ca=new Se,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new q,this.Pb=0,this.wd=new q,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new fe,this.ab=0,this.gc=c(4,ne),this.Oc=0}function R(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new hi,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Nt(g,x,C,T,B,I,U){for(g=g==null?0:g[x+0],x=0;x<U;++x)B[I+x]=g+C[T+x]&255,g=B[I+x]}function Lt(g,x,C,T,B,I,U){var G;if(g==null)Nt(null,null,C,T,B,I,U);else for(G=0;G<U;++G)B[I+G]=g[x+G]+C[T+G]&255}function Me(g,x,C,T,B,I,U){if(g==null)Nt(null,null,C,T,B,I,U);else{var G,Z=g[x+0],rt=Z,gt=Z;for(G=0;G<U;++G)rt=gt+(Z=g[x+G])-rt,gt=C[T+G]+(-256&rt?0>rt?0:255:rt)&255,rt=Z,B[I+G]=gt}}function me(g,x,C,T){var B=x.width,I=x.o;if(t(g!=null&&x!=null),0>C||0>=T||C+T>I)return null;if(!g.Cc){if(g.ga==null){var U;if(g.ga=new R,(U=g.ga==null)||(U=x.width*x.o,t(g.Gb.length==0),g.Gb=o(U),g.Uc=0,g.Gb==null?U=0:(g.mb=g.Gb,g.nb=g.Uc,g.rc=null,U=1),U=!U),!U){U=g.ga;var G=g.Fa,Z=g.P,rt=g.qc,gt=g.mb,jt=g.nb,it=Z+1,bt=rt-1,St=U.l;if(t(G!=null&&gt!=null&&x!=null),to[0]=null,to[1]=Nt,to[2]=Lt,to[3]=Me,U.ca=gt,U.tb=jt,U.c=x.width,U.i=x.height,t(0<U.c&&0<U.i),1>=rt)x=0;else if(U.$a=3&G[Z+0],U.Z=G[Z+0]>>2&3,U.Lc=G[Z+0]>>4&3,Z=G[Z+0]>>6&3,0>U.$a||1<U.$a||4<=U.Z||1<U.Lc||Z)x=0;else if(St.put=Ne,St.ac=Li,St.bc=bi,St.ma=U,St.width=x.width,St.height=x.height,St.Da=x.Da,St.v=x.v,St.va=x.va,St.j=x.j,St.o=x.o,U.$a)t:{t(U.$a==1),x=Xe();e:for(;;){if(x==null){x=0;break t}if(t(U!=null),U.mc=x,x.c=U.c,x.i=U.i,x.l=U.l,x.l.ma=U,x.l.width=U.c,x.l.height=U.i,x.a=0,dt(x.m,G,it,bt),!Vs(U.c,U.i,1,x,null)||(x.ab==1&&x.gc[0].hc==3&&jn(x.s)?(U.ic=1,G=x.c*x.i,x.Ta=null,x.Ua=0,x.V=o(G),x.Ba=0,x.V==null?(x.a=1,x=0):x=1):(U.ic=0,x=Hs(x,U.c)),!x))break e;x=1;break t}U.mc=null,x=0}else x=bt>=U.c*U.i;U=!x}if(U)return null;g.ga.Lc!=1?g.Ga=0:T=I-C}t(g.ga!=null),t(C+T<=I);t:{if(x=(G=g.ga).c,I=G.l.o,G.$a==0){if(it=g.rc,bt=g.Vc,St=g.Fa,Z=g.P+1+C*x,rt=g.mb,gt=g.nb+C*x,t(Z<=g.P+g.qc),G.Z!=0)for(t(to[G.Z]!=null),U=0;U<T;++U)to[G.Z](it,bt,St,Z,rt,gt,x),it=rt,bt=gt,gt+=x,Z+=x;else for(U=0;U<T;++U)i(rt,gt,St,Z,x),it=rt,bt=gt,gt+=x,Z+=x;g.rc=it,g.Vc=bt}else{if(t(G.mc!=null),x=C+T,t((U=G.mc)!=null),t(x<=U.i),U.C>=x)x=1;else if(G.ic||Nn(),G.ic){G=U.V,it=U.Ba,bt=U.c;var Ot=U.i,At=(St=1,Z=U.$/bt,rt=U.$%bt,gt=U.m,jt=U.s,U.$),Rt=bt*Ot,Ft=bt*x,Gt=jt.wc,Vt=At<Ft?ti(jt,rt,Z):null;t(At<=Rt),t(x<=Ot),t(jn(jt));e:for(;;){for(;!gt.h&&At<Ft;){if(rt&Gt||(Vt=ti(jt,rt,Z)),t(Vt!=null),ft(gt),256>(Ot=On(Vt.G[0],Vt.H[0],gt)))G[it+At]=Ot,++At,++rt>=bt&&(rt=0,++Z<=x&&!(Z%16)&&Ji(U,Z));else{if(!(280>Ot)){St=0;break e}Ot=Yn(Ot-256,gt);var ce,te=On(Vt.G[4],Vt.H[4],gt);if(ft(gt),!(At>=(te=_s(bt,te=Yn(te,gt)))&&Rt-At>=Ot)){St=0;break e}for(ce=0;ce<Ot;++ce)G[it+At+ce]=G[it+At+ce-te];for(At+=Ot,rt+=Ot;rt>=bt;)rt-=bt,++Z<=x&&!(Z%16)&&Ji(U,Z);At<Ft&&rt&Gt&&(Vt=ti(jt,rt,Z))}t(gt.h==lt(gt))}Ji(U,Z>x?x:Z);break e}!St||gt.h&&At<Rt?(St=0,U.a=gt.h?5:3):U.$=At,x=St}else x=ps(U,U.V,U.Ba,U.c,U.i,x,$r);if(!x){T=0;break t}}C+T>=I&&(g.Cc=1),T=1}if(!T)return null;if(g.Cc&&((T=g.ga)!=null&&(T.mc=null),g.ga=null,0<g.Ga))return alert("todo:WebPDequantizeLevels"),null}return g.nb+C*B}function Pe(g,x,C,T,B,I){for(;0<B--;){var U,G=g,Z=x+(C?1:0),rt=g,gt=x+(C?0:3);for(U=0;U<T;++U){var jt=rt[gt+4*U];jt!=255&&(jt*=32897,G[Z+4*U+0]=G[Z+4*U+0]*jt>>23,G[Z+4*U+1]=G[Z+4*U+1]*jt>>23,G[Z+4*U+2]=G[Z+4*U+2]*jt>>23)}x+=I}}function ge(g,x,C,T,B){for(;0<T--;){var I;for(I=0;I<C;++I){var U=g[x+2*I+0],G=15&(rt=g[x+2*I+1]),Z=4369*G,rt=(240&rt|rt>>4)*Z>>16;g[x+2*I+0]=(240&U|U>>4)*Z>>16&240|(15&U|U<<4)*Z>>16>>4&15,g[x+2*I+1]=240&rt|G}x+=B}}function en(g,x,C,T,B,I,U,G){var Z,rt,gt=255;for(rt=0;rt<B;++rt){for(Z=0;Z<T;++Z){var jt=g[x+Z];I[U+4*Z]=jt,gt&=jt}x+=C,U+=G}return gt!=255}function ze(g,x,C,T,B){var I;for(I=0;I<B;++I)C[T+I]=g[x+I]>>8}function Nn(){cl=Pe,Er=ge,Bc=en,dr=ze}function Ye(g,x,C){Q[g]=function(T,B,I,U,G,Z,rt,gt,jt,it,bt,St,Ot,At,Rt,Ft,Gt){var Vt,ce=Gt-1>>1,te=G[Z+0]|rt[gt+0]<<16,He=jt[it+0]|bt[St+0]<<16;t(T!=null);var re=3*te+He+131074>>2;for(x(T[B+0],255&re,re>>16,Ot,At),I!=null&&(re=3*He+te+131074>>2,x(I[U+0],255&re,re>>16,Rt,Ft)),Vt=1;Vt<=ce;++Vt){var hn=G[Z+Vt]|rt[gt+Vt]<<16,Xn=jt[it+Vt]|bt[St+Vt]<<16,Qe=te+hn+He+Xn+524296,ee=Qe+2*(hn+He)>>3;re=ee+te>>1,te=(Qe=Qe+2*(te+Xn)>>3)+hn>>1,x(T[B+2*Vt-1],255&re,re>>16,Ot,At+(2*Vt-1)*C),x(T[B+2*Vt-0],255&te,te>>16,Ot,At+(2*Vt-0)*C),I!=null&&(re=Qe+He>>1,te=ee+Xn>>1,x(I[U+2*Vt-1],255&re,re>>16,Rt,Ft+(2*Vt-1)*C),x(I[U+2*Vt+0],255&te,te>>16,Rt,Ft+(2*Vt+0)*C)),te=hn,He=Xn}1&Gt||(re=3*te+He+131074>>2,x(T[B+Gt-1],255&re,re>>16,Ot,At+(Gt-1)*C),I!=null&&(re=3*He+te+131074>>2,x(I[U+Gt-1],255&re,re>>16,Rt,Ft+(Gt-1)*C)))}}function ii(){us[Mu]=dl,us[ws]=Kl,us[Tu]=ad,us[Mr]=Du,us[qc]=To,us[Gl]=Ta,us[jo]=ko,us[Vc]=Kl,us[ku]=Du,us[Yl]=To,us[Lu]=Ta}function Jr(g){return g&-16384?0>g?0:255:g>>Ou}function cr(g,x){return Jr((19077*g>>8)+(26149*x>>8)-14234)}function ta(g,x,C){return Jr((19077*g>>8)-(6419*x>>8)-(13320*C>>8)+8708)}function al(g,x){return Jr((19077*g>>8)+(33050*x>>8)-17685)}function $a(g,x,C,T,B){T[B+0]=cr(g,C),T[B+1]=ta(g,x,C),T[B+2]=al(g,x)}function ts(g,x,C,T,B){T[B+0]=al(g,x),T[B+1]=ta(g,x,C),T[B+2]=cr(g,C)}function Ao(g,x,C,T,B){var I=ta(g,x,C);x=I<<3&224|al(g,x)>>3,T[B+0]=248&cr(g,C)|I>>5,T[B+1]=x}function Co(g,x,C,T,B){var I=240&al(g,x)|15;T[B+0]=240&cr(g,C)|ta(g,x,C)>>4,T[B+1]=I}function Il(g,x,C,T,B){T[B+0]=255,$a(g,x,C,T,B+1)}function Na(g,x,C,T,B){ts(g,x,C,T,B),T[B+3]=255}function Ls(g,x,C,T,B){$a(g,x,C,T,B),T[B+3]=255}function Ga(g,x,C){Q[g]=function(T,B,I,U,G,Z,rt,gt,jt){for(var it=gt+(-2&jt)*C;gt!=it;)x(T[B+0],I[U+0],G[Z+0],rt,gt),x(T[B+1],I[U+0],G[Z+0],rt,gt+C),B+=2,++U,++Z,gt+=2*C;1&jt&&x(T[B+0],I[U+0],G[Z+0],rt,gt)}}function Ul(g,x,C){return C==0?g==0?x==0?6:5:x==0?4:0:C}function Dc(g,x,C,T,B){switch(g>>>30){case 3:Za(x,C,T,B,0);break;case 2:bs(x,C,T,B);break;case 1:An(x,C,T,B)}}function ur(g,x){var C,T,B=x.M,I=x.Nb,U=g.oc,G=g.pc+40,Z=g.oc,rt=g.pc+584,gt=g.oc,jt=g.pc+600;for(C=0;16>C;++C)U[G+32*C-1]=129;for(C=0;8>C;++C)Z[rt+32*C-1]=129,gt[jt+32*C-1]=129;for(0<B?U[G-1-32]=Z[rt-1-32]=gt[jt-1-32]=129:(r(U,G-32-1,127,21),r(Z,rt-32-1,127,9),r(gt,jt-32-1,127,9)),T=0;T<g.za;++T){var it=x.ya[x.aa+T];if(0<T){for(C=-1;16>C;++C)i(U,G+32*C-4,U,G+32*C+12,4);for(C=-1;8>C;++C)i(Z,rt+32*C-4,Z,rt+32*C+4,4),i(gt,jt+32*C-4,gt,jt+32*C+4,4)}var bt=g.Gd,St=g.Hd+T,Ot=it.ad,At=it.Hc;if(0<B&&(i(U,G-32,bt[St].y,0,16),i(Z,rt-32,bt[St].f,0,8),i(gt,jt-32,bt[St].ea,0,8)),it.Za){var Rt=U,Ft=G-32+16;for(0<B&&(T>=g.za-1?r(Rt,Ft,bt[St].y[15],4):i(Rt,Ft,bt[St+1].y,0,4)),C=0;4>C;C++)Rt[Ft+128+C]=Rt[Ft+256+C]=Rt[Ft+384+C]=Rt[Ft+0+C];for(C=0;16>C;++C,At<<=2)Rt=U,Ft=G+Ci[C],fi[it.Ob[C]](Rt,Ft),Dc(At,Ot,16*+C,Rt,Ft)}else if(Rt=Ul(T,B,it.Ob[0]),Rs[Rt](U,G),At!=0)for(C=0;16>C;++C,At<<=2)Dc(At,Ot,16*+C,U,G+Ci[C]);for(C=it.Gc,Rt=Ul(T,B,it.Dd),sa[Rt](Z,rt),sa[Rt](gt,jt),At=Ot,Rt=Z,Ft=rt,255&(it=0|C)&&(170&it?jr(At,256,Rt,Ft):yn(At,256,Rt,Ft)),it=gt,At=jt,255&(C>>=8)&&(170&C?jr(Ot,320,it,At):yn(Ot,320,it,At)),B<g.Ub-1&&(i(bt[St].y,0,U,G+480,16),i(bt[St].f,0,Z,rt+224,8),i(bt[St].ea,0,gt,jt+224,8)),C=8*I*g.B,bt=g.sa,St=g.ta+16*T+16*I*g.R,Ot=g.qa,it=g.ra+8*T+C,At=g.Ha,Rt=g.Ia+8*T+C,C=0;16>C;++C)i(bt,St+C*g.R,U,G+32*C,16);for(C=0;8>C;++C)i(Ot,it+C*g.B,Z,rt+32*C,8),i(At,Rt+C*g.B,gt,jt+32*C,8)}}function ea(g,x,C,T,B,I,U,G,Z){var rt=[0],gt=[0],jt=0,it=Z!=null?Z.kd:0,bt=Z??new Ht;if(g==null||12>C)return 7;bt.data=g,bt.w=x,bt.ha=C,x=[x],C=[C],bt.gb=[bt.gb];t:{var St=x,Ot=C,At=bt.gb;if(t(g!=null),t(Ot!=null),t(At!=null),At[0]=0,12<=Ot[0]&&!n(g,St[0],"RIFF")){if(n(g,St[0]+8,"WEBP")){At=3;break t}var Rt=se(g,St[0]+4);if(12>Rt||4294967286<Rt){At=3;break t}if(it&&Rt>Ot[0]-8){At=7;break t}At[0]=Rt,St[0]+=12,Ot[0]-=12}At=0}if(At!=0)return At;for(Rt=0<bt.gb[0],C=C[0];;){t:{var Ft=g;Ot=x,At=C;var Gt=rt,Vt=gt,ce=St=[0];if((re=jt=[jt])[0]=0,8>At[0])At=7;else{if(!n(Ft,Ot[0],"VP8X")){if(se(Ft,Ot[0]+4)!=10){At=3;break t}if(18>At[0]){At=7;break t}var te=se(Ft,Ot[0]+8),He=1+Xt(Ft,Ot[0]+12);if(2147483648<=He*(Ft=1+Xt(Ft,Ot[0]+15))){At=3;break t}ce!=null&&(ce[0]=te),Gt!=null&&(Gt[0]=He),Vt!=null&&(Vt[0]=Ft),Ot[0]+=18,At[0]-=18,re[0]=1}At=0}}if(jt=jt[0],St=St[0],At!=0)return At;if(Ot=!!(2&St),!Rt&&jt)return 3;if(I!=null&&(I[0]=!!(16&St)),U!=null&&(U[0]=Ot),G!=null&&(G[0]=0),U=rt[0],St=gt[0],jt&&Ot&&Z==null){At=0;break}if(4>C){At=7;break}if(Rt&&jt||!Rt&&!jt&&!n(g,x[0],"ALPH")){C=[C],bt.na=[bt.na],bt.P=[bt.P],bt.Sa=[bt.Sa];t:{te=g,At=x,Rt=C;var re=bt.gb;Gt=bt.na,Vt=bt.P,ce=bt.Sa,He=22,t(te!=null),t(Rt!=null),Ft=At[0];var hn=Rt[0];for(t(Gt!=null),t(ce!=null),Gt[0]=null,Vt[0]=null,ce[0]=0;;){if(At[0]=Ft,Rt[0]=hn,8>hn){At=7;break t}var Xn=se(te,Ft+4);if(4294967286<Xn){At=3;break t}var Qe=8+Xn+1&-2;if(He+=Qe,0<re&&He>re){At=3;break t}if(!n(te,Ft,"VP8 ")||!n(te,Ft,"VP8L")){At=0;break t}if(hn[0]<Qe){At=7;break t}n(te,Ft,"ALPH")||(Gt[0]=te,Vt[0]=Ft+8,ce[0]=Xn),Ft+=Qe,hn-=Qe}}if(C=C[0],bt.na=bt.na[0],bt.P=bt.P[0],bt.Sa=bt.Sa[0],At!=0)break}C=[C],bt.Ja=[bt.Ja],bt.xa=[bt.xa];t:if(re=g,At=x,Rt=C,Gt=bt.gb[0],Vt=bt.Ja,ce=bt.xa,te=At[0],Ft=!n(re,te,"VP8 "),He=!n(re,te,"VP8L"),t(re!=null),t(Rt!=null),t(Vt!=null),t(ce!=null),8>Rt[0])At=7;else{if(Ft||He){if(re=se(re,te+4),12<=Gt&&re>Gt-12){At=3;break t}if(it&&re>Rt[0]-8){At=7;break t}Vt[0]=re,At[0]+=8,Rt[0]-=8,ce[0]=He}else ce[0]=5<=Rt[0]&&re[te+0]==47&&!(re[te+4]>>5),Vt[0]=Rt[0];At=0}if(C=C[0],bt.Ja=bt.Ja[0],bt.xa=bt.xa[0],x=x[0],At!=0)break;if(4294967286<bt.Ja)return 3;if(G==null||Ot||(G[0]=bt.xa?2:1),U=[U],St=[St],bt.xa){if(5>C){At=7;break}G=U,it=St,Ot=I,g==null||5>C?g=0:5<=C&&g[x+0]==47&&!(g[x+4]>>5)?(Rt=[0],re=[0],Gt=[0],dt(Vt=new q,g,x,C),xr(Vt,Rt,re,Gt)?(G!=null&&(G[0]=Rt[0]),it!=null&&(it[0]=re[0]),Ot!=null&&(Ot[0]=Gt[0]),g=1):g=0):g=0}else{if(10>C){At=7;break}G=St,g==null||10>C||!el(g,x+3,C-3)?g=0:(it=g[x+0]|g[x+1]<<8|g[x+2]<<16,Ot=16383&(g[x+7]<<8|g[x+6]),g=16383&(g[x+9]<<8|g[x+8]),1&it||3<(it>>1&7)||!(it>>4&1)||it>>5>=bt.Ja||!Ot||!g?g=0:(U&&(U[0]=Ot),G&&(G[0]=g),g=1))}if(!g||(U=U[0],St=St[0],jt&&(rt[0]!=U||gt[0]!=St)))return 3;Z!=null&&(Z[0]=bt,Z.offset=x-Z.w,t(4294967286>x-Z.w),t(Z.offset==Z.ha-C));break}return At==0||At==7&&jt&&Z==null?(I!=null&&(I[0]|=bt.na!=null&&0<bt.na.length),T!=null&&(T[0]=U),B!=null&&(B[0]=St),0):At}function Ya(g,x,C){var T=x.width,B=x.height,I=0,U=0,G=T,Z=B;if(x.Da=g!=null&&0<g.Da,x.Da&&(G=g.cd,Z=g.bd,I=g.v,U=g.j,11>C||(I&=-2,U&=-2),0>I||0>U||0>=G||0>=Z||I+G>T||U+Z>B))return 0;if(x.v=I,x.j=U,x.va=I+G,x.o=U+Z,x.U=G,x.T=Z,x.da=g!=null&&0<g.da,x.da){if(!Ce(G,Z,C=[g.ib],I=[g.hb]))return 0;x.ib=C[0],x.hb=I[0]}return x.ob=g!=null&&g.ob,x.Kb=g==null||!g.Sd,x.da&&(x.ob=x.ib<3*T/4&&x.hb<3*B/4,x.Kb=0),1}function Oc(g){if(g==null)return 2;if(11>g.S){var x=g.f.RGBA;x.fb+=(g.height-1)*x.A,x.A=-x.A}else x=g.f.kb,g=g.height,x.O+=(g-1)*x.fa,x.fa=-x.fa,x.N+=(g-1>>1)*x.Ab,x.Ab=-x.Ab,x.W+=(g-1>>1)*x.Db,x.Db=-x.Db,x.F!=null&&(x.J+=(g-1)*x.lb,x.lb=-x.lb);return 0}function na(g,x,C,T){if(T==null||0>=g||0>=x)return 2;if(C!=null){if(C.Da){var B=C.cd,I=C.bd,U=-2&C.v,G=-2&C.j;if(0>U||0>G||0>=B||0>=I||U+B>g||G+I>x)return 2;g=B,x=I}if(C.da){if(!Ce(g,x,B=[C.ib],I=[C.hb]))return 2;g=B[0],x=I[0]}}T.width=g,T.height=x;t:{var Z=T.width,rt=T.height;if(g=T.S,0>=Z||0>=rt||!(g>=Mu&&13>g))g=2;else{if(0>=T.Rd&&T.sd==null){U=I=B=x=0;var gt=(G=Z*Bu[g])*rt;if(11>g||(I=(rt+1)/2*(x=(Z+1)/2),g==12&&(U=(B=Z)*rt)),(rt=o(gt+2*I+U))==null){g=1;break t}T.sd=rt,11>g?((Z=T.f.RGBA).eb=rt,Z.fb=0,Z.A=G,Z.size=gt):((Z=T.f.kb).y=rt,Z.O=0,Z.fa=G,Z.Fd=gt,Z.f=rt,Z.N=0+gt,Z.Ab=x,Z.Cd=I,Z.ea=rt,Z.W=0+gt+I,Z.Db=x,Z.Ed=I,g==12&&(Z.F=rt,Z.J=0+gt+2*I),Z.Tc=U,Z.lb=B)}if(x=1,B=T.S,I=T.width,U=T.height,B>=Mu&&13>B)if(11>B)g=T.f.RGBA,x&=(G=Math.abs(g.A))*(U-1)+I<=g.size,x&=G>=I*Bu[B],x&=g.eb!=null;else{g=T.f.kb,G=(I+1)/2,gt=(U+1)/2,Z=Math.abs(g.fa),rt=Math.abs(g.Ab);var jt=Math.abs(g.Db),it=Math.abs(g.lb),bt=it*(U-1)+I;x&=Z*(U-1)+I<=g.Fd,x&=rt*(gt-1)+G<=g.Cd,x=(x&=jt*(gt-1)+G<=g.Ed)&Z>=I&rt>=G&jt>=G,x&=g.y!=null,x&=g.f!=null,x&=g.ea!=null,B==12&&(x&=it>=I,x&=bt<=g.Tc,x&=g.F!=null)}else x=0;g=x?0:2}}return g!=0||C!=null&&C.fd&&(g=Oc(T)),g}var _o=64,Ws=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Ps=24,Aa=32,Ca=8,Wa=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Zt("Predictor0","PredictorAdd0"),Q.Predictor0=function(){return 4278190080},Q.Predictor1=function(g){return g},Q.Predictor2=function(g,x,C){return x[C+0]},Q.Predictor3=function(g,x,C){return x[C+1]},Q.Predictor4=function(g,x,C){return x[C-1]},Q.Predictor5=function(g,x,C){return xe(xe(g,x[C+1]),x[C+0])},Q.Predictor6=function(g,x,C){return xe(g,x[C-1])},Q.Predictor7=function(g,x,C){return xe(g,x[C+0])},Q.Predictor8=function(g,x,C){return xe(x[C-1],x[C+0])},Q.Predictor9=function(g,x,C){return xe(x[C+0],x[C+1])},Q.Predictor10=function(g,x,C){return xe(xe(g,x[C-1]),xe(x[C+0],x[C+1]))},Q.Predictor11=function(g,x,C){var T=x[C+0];return 0>=Ue(T>>24&255,g>>24&255,(x=x[C-1])>>24&255)+Ue(T>>16&255,g>>16&255,x>>16&255)+Ue(T>>8&255,g>>8&255,x>>8&255)+Ue(255&T,255&g,255&x)?T:g},Q.Predictor12=function(g,x,C){var T=x[C+0];return(ye((g>>24&255)+(T>>24&255)-((x=x[C-1])>>24&255))<<24|ye((g>>16&255)+(T>>16&255)-(x>>16&255))<<16|ye((g>>8&255)+(T>>8&255)-(x>>8&255))<<8|ye((255&g)+(255&T)-(255&x)))>>>0},Q.Predictor13=function(g,x,C){var T=x[C-1];return(nn((g=xe(g,x[C+0]))>>24&255,T>>24&255)<<24|nn(g>>16&255,T>>16&255)<<16|nn(g>>8&255,T>>8&255)<<8|nn(255&g,255&T))>>>0};var ql=Q.PredictorAdd0;Q.PredictorAdd1=on,Zt("Predictor2","PredictorAdd2"),Zt("Predictor3","PredictorAdd3"),Zt("Predictor4","PredictorAdd4"),Zt("Predictor5","PredictorAdd5"),Zt("Predictor6","PredictorAdd6"),Zt("Predictor7","PredictorAdd7"),Zt("Predictor8","PredictorAdd8"),Zt("Predictor9","PredictorAdd9"),Zt("Predictor10","PredictorAdd10"),Zt("Predictor11","PredictorAdd11"),Zt("Predictor12","PredictorAdd12"),Zt("Predictor13","PredictorAdd13");var Vl=Q.PredictorAdd2;pe("ColorIndexInverseTransform","MapARGB","32b",function(g){return g>>8&255},function(g){return g}),pe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(g){return g},function(g){return g>>8&255});var Ni,_u=Q.ColorIndexInverseTransform,_a=Q.MapARGB,ja=Q.VP8LColorIndexInverseTransformAlpha,os=Q.MapAlpha,Ka=Q.VP8LPredictorsAdd=[];Ka.length=16,(Q.VP8LPredictors=[]).length=16,(Q.VP8LPredictorsAdd_C=[]).length=16,(Q.VP8LPredictors_C=[]).length=16;var Hl,$l,Xa,Qa,Ea,ol,hr,Za,bs,jr,An,yn,Un,Ai,Ma,ia,ll,zc,ed,zf,Bf,Ff,nd,id,cl,Er,Bc,dr,ul=o(511),ju=o(2041),Fc=o(225),Ic=o(767),Eu=0,Ja=ju,Uc=Fc,xs=Ic,ls=ul,Mu=0,ws=1,Tu=2,Mr=3,qc=4,Gl=5,jo=6,Vc=7,ku=8,Yl=9,Lu=10,Tr=[2,3,7],Wl=[3,3,11],hl=[280,256,256,256,40],Pu=[0,1,1,1,0],Hc=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],kr=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Lr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Eo=8,Pr=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Rr=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],fr=null,If=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],sd=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Ru=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Uf=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],cs=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Kn=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],dn=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Rs=[],fi=[],sa=[],Mo=1,rd=2,to=[],us=[];Ye("UpsampleRgbLinePair",$a,3),Ye("UpsampleBgrLinePair",ts,3),Ye("UpsampleRgbaLinePair",Ls,4),Ye("UpsampleBgraLinePair",Na,4),Ye("UpsampleArgbLinePair",Il,4),Ye("UpsampleRgba4444LinePair",Co,2),Ye("UpsampleRgb565LinePair",Ao,2);var dl=Q.UpsampleRgbLinePair,ad=Q.UpsampleBgrLinePair,Kl=Q.UpsampleRgbaLinePair,Du=Q.UpsampleBgraLinePair,To=Q.UpsampleArgbLinePair,Ta=Q.UpsampleRgba4444LinePair,ko=Q.UpsampleRgb565LinePair,Dr=16,Xl=1<<Dr-1,fl=-227,Lo=482,Ou=6,Po=0,hs=o(256),zu=o(256),qf=o(256),C0=o(256),_0=o(Lo-fl),j0=o(Lo-fl);Ga("YuvToRgbRow",$a,3),Ga("YuvToBgrRow",ts,3),Ga("YuvToRgbaRow",Ls,4),Ga("YuvToBgraRow",Na,4),Ga("YuvToArgbRow",Il,4),Ga("YuvToRgba4444Row",Co,2),Ga("YuvToRgb565Row",Ao,2);var Ci=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ql=[0,2,8],$c=[8,7,6,4,4,2,2,2,1,1,1,1],Gc=1;this.WebPDecodeRGBA=function(g,x,C,T,B){var I=ws,U=new zt,G=new Se;U.ba=G,G.S=I,G.width=[G.width],G.height=[G.height];var Z=G.width,rt=G.height,gt=new be;if(gt==null||g==null)var jt=2;else t(gt!=null),jt=ea(g,x,C,gt.width,gt.height,gt.Pd,gt.Qd,gt.format,null);if(jt!=0?Z=0:(Z!=null&&(Z[0]=gt.width[0]),rt!=null&&(rt[0]=gt.height[0]),Z=1),Z){G.width=G.width[0],G.height=G.height[0],T!=null&&(T[0]=G.width),B!=null&&(B[0]=G.height);t:{if(T=new hi,(B=new Ht).data=g,B.w=x,B.ha=C,B.kd=1,x=[0],t(B!=null),((g=ea(B.data,B.w,B.ha,null,null,null,x,null,B))==0||g==7)&&x[0]&&(g=4),(x=g)==0){if(t(U!=null),T.data=B.data,T.w=B.w+B.offset,T.ha=B.ha-B.offset,T.put=Ne,T.ac=Li,T.bc=bi,T.ma=U,B.xa){if((g=Xe())==null){U=1;break t}if((function(it,bt){var St=[0],Ot=[0],At=[0];e:for(;;){if(it==null)return 0;if(bt==null)return it.a=2,0;if(it.l=bt,it.a=0,dt(it.m,bt.data,bt.w,bt.ha),!xr(it.m,St,Ot,At)){it.a=3;break e}if(it.xb=rd,bt.width=St[0],bt.height=Ot[0],!Vs(St[0],Ot[0],1,it,null))break e;return 1}return t(it.a!=0),0})(g,T)){if(T=(x=na(T.width,T.height,U.Oa,U.ba))==0){e:{T=g;n:for(;;){if(T==null){T=0;break e}if(t(T.s.yc!=null),t(T.s.Ya!=null),t(0<T.s.Wb),t((C=T.l)!=null),t((B=C.ma)!=null),T.xb!=0){if(T.ca=B.ba,T.tb=B.tb,t(T.ca!=null),!Ya(B.Oa,C,Mr)){T.a=2;break n}if(!Hs(T,C.width)||C.da)break n;if((C.da||_e(T.ca.S))&&Nn(),11>T.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),T.ca.f.kb.F!=null&&Nn()),T.Pb&&0<T.s.ua&&T.s.vb.X==null&&!et(T.s.vb,T.s.Wa.Xa)){T.a=1;break n}T.xb=0}if(!ps(T,T.V,T.Ba,T.c,T.i,C.o,Wn))break n;B.Dc=T.Ma,T=1;break e}t(T.a!=0),T=0}T=!T}T&&(x=g.a)}else x=g.a}else{if((g=new sr)==null){U=1;break t}if(g.Fa=B.na,g.P=B.P,g.qc=B.Sa,rs(g,T)){if((x=na(T.width,T.height,U.Oa,U.ba))==0){if(g.Aa=0,C=U.Oa,t((B=g)!=null),C!=null){if(0<(Z=0>(Z=C.Md)?0:100<Z?255:255*Z/100)){for(rt=gt=0;4>rt;++rt)12>(jt=B.pb[rt]).lc&&(jt.ia=Z*$c[0>jt.lc?0:jt.lc]>>3),gt|=jt.ia;gt&&(alert("todo:VP8InitRandom"),B.ia=1)}B.Ga=C.Id,100<B.Ga?B.Ga=100:0>B.Ga&&(B.Ga=0)}(function(it,bt){if(it==null)return 0;if(bt==null)return Ie(it,2,"NULL VP8Io parameter in VP8Decode().");if(!it.cb&&!rs(it,bt))return 0;if(t(it.cb),bt.ac==null||bt.ac(bt)){bt.ob&&(it.L=0);var St=Ql[it.L];if(it.L==2?(it.yb=0,it.zb=0):(it.yb=bt.v-St>>4,it.zb=bt.j-St>>4,0>it.yb&&(it.yb=0),0>it.zb&&(it.zb=0)),it.Va=bt.o+15+St>>4,it.Hb=bt.va+15+St>>4,it.Hb>it.za&&(it.Hb=it.za),it.Va>it.Ub&&(it.Va=it.Ub),0<it.L){var Ot=it.ed;for(St=0;4>St;++St){var At;if(it.Qa.Cb){var Rt=it.Qa.Lb[St];it.Qa.Fb||(Rt+=Ot.Tb)}else Rt=Ot.Tb;for(At=0;1>=At;++At){var Ft=it.gd[St][At],Gt=Rt;if(Ot.Pc&&(Gt+=Ot.vd[0],At&&(Gt+=Ot.od[0])),0<(Gt=0>Gt?0:63<Gt?63:Gt)){var Vt=Gt;0<Ot.wb&&(Vt=4<Ot.wb?Vt>>2:Vt>>1)>9-Ot.wb&&(Vt=9-Ot.wb),1>Vt&&(Vt=1),Ft.dd=Vt,Ft.tc=2*Gt+Vt,Ft.ld=40<=Gt?2:15<=Gt?1:0}else Ft.tc=0;Ft.La=At}}}St=0}else Ie(it,6,"Frame setup failed"),St=it.a;if(St=St==0){if(St){it.$c=0,0<it.Aa||(it.Ic=Gc);e:{St=it.Ic,Ot=4*(Vt=it.za);var ce=32*Vt,te=Vt+1,He=0<it.L?Vt*(0<it.Aa?2:1):0,re=(it.Aa==2?2:1)*Vt;if((Ft=Ot+832+(At=3*(16*St+Ql[it.L])/2*ce)+(Rt=it.Fa!=null&&0<it.Fa.length?it.Kc.c*it.Kc.i:0))!=Ft)St=0;else{if(Ft>it.Vb){if(it.Vb=0,it.Ec=o(Ft),it.Fc=0,it.Ec==null){St=Ie(it,1,"no memory during frame initialization.");break e}it.Vb=Ft}Ft=it.Ec,Gt=it.Fc,it.Ac=Ft,it.Bc=Gt,Gt+=Ot,it.Gd=c(ce,tl),it.Hd=0,it.rb=c(te+1,Ts),it.sb=1,it.wa=He?c(He,vn):null,it.Y=0,it.D.Nb=0,it.D.wa=it.wa,it.D.Y=it.Y,0<it.Aa&&(it.D.Y+=Vt),t(!0),it.oc=Ft,it.pc=Gt,Gt+=832,it.ya=c(re,vo),it.aa=0,it.D.ya=it.ya,it.D.aa=it.aa,it.Aa==2&&(it.D.aa+=Vt),it.R=16*Vt,it.B=8*Vt,Vt=(ce=Ql[it.L])*it.R,ce=ce/2*it.B,it.sa=Ft,it.ta=Gt+Vt,it.qa=it.sa,it.ra=it.ta+16*St*it.R+ce,it.Ha=it.qa,it.Ia=it.ra+8*St*it.B+ce,it.$c=0,Gt+=At,it.mb=Rt?Ft:null,it.nb=Rt?Gt:null,t(Gt+Rt<=it.Fc+it.Vb),va(it),r(it.Ac,it.Bc,0,Ot),St=1}}if(St){if(bt.ka=0,bt.y=it.sa,bt.O=it.ta,bt.f=it.qa,bt.N=it.ra,bt.ea=it.Ha,bt.Vd=it.Ia,bt.fa=it.R,bt.Rc=it.B,bt.F=null,bt.J=0,!Eu){for(St=-255;255>=St;++St)ul[255+St]=0>St?-St:St;for(St=-1020;1020>=St;++St)ju[1020+St]=-128>St?-128:127<St?127:St;for(St=-112;112>=St;++St)Fc[112+St]=-16>St?-16:15<St?15:St;for(St=-255;510>=St;++St)Ic[255+St]=0>St?0:255<St?255:St;Eu=1}hr=$s,Za=Gr,jr=Hi,An=nl,yn=ar,bs=vs,Un=Fl,Ai=ks,Ma=O,ia=st,ll=No,zc=N,ed=pt,zf=xt,Bf=Kr,Ff=Xr,nd=Ha,id=So,fi[0]=rl,fi[1]=il,fi[2]=sl,fi[3]=bo,fi[4]=Mn,fi[5]=xo,fi[6]=Si,fi[7]=xa,fi[8]=wa,fi[9]=ys,Rs[0]=Gs,Rs[1]=ya,Rs[2]=Yr,Rs[3]=Ua,Rs[4]=or,Rs[5]=qa,Rs[6]=ba,sa[0]=Sa,sa[1]=Pi,sa[2]=lr,sa[3]=Wr,sa[4]=Di,sa[5]=wo,sa[6]=Ar,St=1}else St=0}St&&(St=(function(hn,Xn){for(hn.M=0;hn.M<hn.Va;++hn.M){var Qe,ee=hn.Jc[hn.M&hn.Xb],Kt=hn.m,si=hn;for(Qe=0;Qe<si.za;++Qe){var Be=Kt,tn=si,Pn=tn.Ac,$i=tn.Bc+4*Qe,ds=tn.zc,qn=tn.ya[tn.aa+Qe];if(tn.Qa.Bb?qn.$b=Dt(Be,tn.Pa.jb[0])?2+Dt(Be,tn.Pa.jb[2]):Dt(Be,tn.Pa.jb[1]):qn.$b=0,tn.kc&&(qn.Ad=Dt(Be,tn.Bd)),qn.Za=!Dt(Be,145)+0,qn.Za){var Oi=qn.Ob,Ss=0;for(tn=0;4>tn;++tn){var zi,ln=ds[0+tn];for(zi=0;4>zi;++zi){ln=cs[Pn[$i+zi]][ln];for(var xn=Ru[Dt(Be,ln[0])];0<xn;)xn=Ru[2*xn+Dt(Be,ln[xn])];ln=-xn,Pn[$i+zi]=ln}i(Oi,Ss,Pn,$i,4),Ss+=4,ds[0+tn]=ln}}else ln=Dt(Be,156)?Dt(Be,128)?1:3:Dt(Be,163)?2:0,qn.Ob[0]=ln,r(Pn,$i,ln,4),r(ds,0,ln,4);qn.Dd=Dt(Be,142)?Dt(Be,114)?Dt(Be,183)?1:3:2:0}if(si.m.Ka)return Ie(hn,7,"Premature end-of-partition0 encountered.");for(;hn.ja<hn.za;++hn.ja){if(si=ee,Be=(Kt=hn).rb[Kt.sb-1],Pn=Kt.rb[Kt.sb+Kt.ja],Qe=Kt.ya[Kt.aa+Kt.ja],$i=Kt.kc?Qe.Ad:0)Be.la=Pn.la=0,Qe.Za||(Be.Na=Pn.Na=0),Qe.Hc=0,Qe.Gc=0,Qe.ia=0;else{var ri,Cn;if(Be=Pn,Pn=si,$i=Kt.Pa.Xc,ds=Kt.ya[Kt.aa+Kt.ja],qn=Kt.pb[ds.$b],tn=ds.ad,Oi=0,Ss=Kt.rb[Kt.sb-1],ln=zi=0,r(tn,Oi,0,384),ds.Za)var Gi=0,ai=$i[3];else{xn=o(16);var wn=Be.Na+Ss.Na;if(wn=fr(Pn,$i[1],wn,qn.Eb,0,xn,0),Be.Na=Ss.Na=(0<wn)+0,1<wn)hr(xn,0,tn,Oi);else{var _i=xn[0]+3>>3;for(xn=0;256>xn;xn+=16)tn[Oi+xn]=_i}Gi=1,ai=$i[0]}var Rn=15&Be.la,Bi=15&Ss.la;for(xn=0;4>xn;++xn){var Fi=1&Bi;for(_i=Cn=0;4>_i;++_i)Rn=Rn>>1|(Fi=(wn=fr(Pn,ai,wn=Fi+(1&Rn),qn.Sc,Gi,tn,Oi))>Gi)<<7,Cn=Cn<<2|(3<wn?3:1<wn?2:tn[Oi+0]!=0),Oi+=16;Rn>>=4,Bi=Bi>>1|Fi<<7,zi=(zi<<8|Cn)>>>0}for(ai=Rn,Gi=Bi>>4,ri=0;4>ri;ri+=2){for(Cn=0,Rn=Be.la>>4+ri,Bi=Ss.la>>4+ri,xn=0;2>xn;++xn){for(Fi=1&Bi,_i=0;2>_i;++_i)wn=Fi+(1&Rn),Rn=Rn>>1|(Fi=0<(wn=fr(Pn,$i[2],wn,qn.Qc,0,tn,Oi)))<<3,Cn=Cn<<2|(3<wn?3:1<wn?2:tn[Oi+0]!=0),Oi+=16;Rn>>=2,Bi=Bi>>1|Fi<<5}ln|=Cn<<4*ri,ai|=Rn<<4<<ri,Gi|=(240&Bi)<<ri}Be.la=ai,Ss.la=Gi,ds.Hc=zi,ds.Gc=ln,ds.ia=43690&ln?0:qn.ia,$i=!(zi|ln)}if(0<Kt.L&&(Kt.wa[Kt.Y+Kt.ja]=Kt.gd[Qe.$b][Qe.Za],Kt.wa[Kt.Y+Kt.ja].La|=!$i),si.Ka)return Ie(hn,7,"Premature end-of-file encountered.")}if(va(hn),Kt=Xn,si=1,Qe=(ee=hn).D,Be=0<ee.L&&ee.M>=ee.zb&&ee.M<=ee.Va,ee.Aa==0)e:{if(Qe.M=ee.M,Qe.uc=Be,ur(ee,Qe),si=1,Qe=(Cn=ee.D).Nb,Be=(ln=Ql[ee.L])*ee.R,Pn=ln/2*ee.B,xn=16*Qe*ee.R,_i=8*Qe*ee.B,$i=ee.sa,ds=ee.ta-Be+xn,qn=ee.qa,tn=ee.ra-Pn+_i,Oi=ee.Ha,Ss=ee.Ia-Pn+_i,Bi=(Rn=Cn.M)==0,zi=Rn>=ee.Va-1,ee.Aa==2&&ur(ee,Cn),Cn.uc)for(Fi=(wn=ee).D.M,t(wn.D.uc),Cn=wn.yb;Cn<wn.Hb;++Cn){Gi=Cn,ai=Fi;var zn=(bn=(Ii=wn).D).Nb;ri=Ii.R;var bn=bn.wa[bn.Y+Gi],Ns=Ii.sa,mi=Ii.ta+16*zn*ri+16*Gi,Te=bn.dd,ke=bn.tc;if(ke!=0)if(t(3<=ke),Ii.L==1)0<Gi&&Ff(Ns,mi,ri,ke+4),bn.La&&id(Ns,mi,ri,ke),0<ai&&Bf(Ns,mi,ri,ke+4),bn.La&&nd(Ns,mi,ri,ke);else{var Sn=Ii.B,Ks=Ii.qa,Or=Ii.ra+8*zn*Sn+8*Gi,Ds=Ii.Ha,Ii=Ii.Ia+8*zn*Sn+8*Gi;zn=bn.ld,0<Gi&&(Ai(Ns,mi,ri,ke+4,Te,zn),ia(Ks,Or,Ds,Ii,Sn,ke+4,Te,zn)),bn.La&&(zc(Ns,mi,ri,ke,Te,zn),zf(Ks,Or,Ds,Ii,Sn,ke,Te,zn)),0<ai&&(Un(Ns,mi,ri,ke+4,Te,zn),Ma(Ks,Or,Ds,Ii,Sn,ke+4,Te,zn)),bn.La&&(ll(Ns,mi,ri,ke,Te,zn),ed(Ks,Or,Ds,Ii,Sn,ke,Te,zn))}}if(ee.ia&&alert("todo:DitherRow"),Kt.put!=null){if(Cn=16*Rn,Rn=16*(Rn+1),Bi?(Kt.y=ee.sa,Kt.O=ee.ta+xn,Kt.f=ee.qa,Kt.N=ee.ra+_i,Kt.ea=ee.Ha,Kt.W=ee.Ia+_i):(Cn-=ln,Kt.y=$i,Kt.O=ds,Kt.f=qn,Kt.N=tn,Kt.ea=Oi,Kt.W=Ss),zi||(Rn-=ln),Rn>Kt.o&&(Rn=Kt.o),Kt.F=null,Kt.J=null,ee.Fa!=null&&0<ee.Fa.length&&Cn<Rn&&(Kt.J=me(ee,Kt,Cn,Rn-Cn),Kt.F=ee.mb,Kt.F==null&&Kt.F.length==0)){si=Ie(ee,3,"Could not decode alpha data.");break e}Cn<Kt.j&&(ln=Kt.j-Cn,Cn=Kt.j,t(!(1&ln)),Kt.O+=ee.R*ln,Kt.N+=ee.B*(ln>>1),Kt.W+=ee.B*(ln>>1),Kt.F!=null&&(Kt.J+=Kt.width*ln)),Cn<Rn&&(Kt.O+=Kt.v,Kt.N+=Kt.v>>1,Kt.W+=Kt.v>>1,Kt.F!=null&&(Kt.J+=Kt.v),Kt.ka=Cn-Kt.j,Kt.U=Kt.va-Kt.v,Kt.T=Rn-Cn,si=Kt.put(Kt))}Qe+1!=ee.Ic||zi||(i(ee.sa,ee.ta-Be,$i,ds+16*ee.R,Be),i(ee.qa,ee.ra-Pn,qn,tn+8*ee.B,Pn),i(ee.Ha,ee.Ia-Pn,Oi,Ss+8*ee.B,Pn))}if(!si)return Ie(hn,6,"Output aborted.")}return 1})(it,bt)),bt.bc!=null&&bt.bc(bt),St&=1}return St?(it.cb=0,St):0})(g,T)||(x=g.a)}}else x=g.a}x==0&&U.Oa!=null&&U.Oa.fd&&(x=Oc(U.ba))}U=x}I=U!=0?null:11>I?G.f.RGBA.eb:G.f.kb.y}else I=null;return I};var Bu=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function d(Q,ct){for(var F="",Y=0;Y<4;Y++)F+=String.fromCharCode(Q[ct++]);return F}function p(Q,ct){return Q[ct+0]|Q[ct+1]<<8}function v(Q,ct){return(Q[ct+0]|Q[ct+1]<<8|Q[ct+2]<<16)>>>0}function S(Q,ct){return(Q[ct+0]|Q[ct+1]<<8|Q[ct+2]<<16|Q[ct+3]<<24)>>>0}new h;var b=[0],_=[0],A=[],j=new h,E=e,L=(function(Q,ct){var F={},Y=0,ot=!1,tt=0,yt=0;if(F.frames=[],!(function(P,q){for(var W=0;W<4;W++)if(P[q+W]!="RIFF".charCodeAt(W))return!0;return!1})(Q,ct)){for(S(Q,ct+=4),ct+=8;ct<Q.length;){var J=d(Q,ct),at=S(Q,ct+=4);ct+=4;var K=at+(1&at);switch(J){case"VP8 ":case"VP8L":F.frames[Y]===void 0&&(F.frames[Y]={}),(X=F.frames[Y]).src_off=ot?yt:ct-8,X.src_size=tt+at+8,Y++,ot&&(ot=!1,tt=0,yt=0);break;case"VP8X":(X=F.header={}).feature_flags=Q[ct];var dt=ct+4;X.canvas_width=1+v(Q,dt),dt+=3,X.canvas_height=1+v(Q,dt),dt+=3;break;case"ALPH":ot=!0,tt=K+8,yt=ct-8;break;case"ANIM":(X=F.header).bgcolor=S(Q,ct),dt=ct+4,X.loop_count=p(Q,dt),dt+=2;break;case"ANMF":var Tt,X;(X=F.frames[Y]={}).offset_x=2*v(Q,ct),ct+=3,X.offset_y=2*v(Q,ct),ct+=3,X.width=1+v(Q,ct),ct+=3,X.height=1+v(Q,ct),ct+=3,X.duration=v(Q,ct),ct+=3,Tt=Q[ct++],X.dispose=1&Tt,X.blend=Tt>>1&1}J!="ANMF"&&(ct+=K)}return F}})(E,0);L.response=E,L.rgbaoutput=!0,L.dataurl=!1;var D=L.header?L.header:null,z=L.frames?L.frames:null;if(D){D.loop_counter=D.loop_count,b=[D.canvas_height],_=[D.canvas_width];for(var $=0;$<z.length&&z[$].blend!=0;$++);}var ut=z[0],nt=j.WebPDecodeRGBA(E,ut.src_off,ut.src_size,_,b);ut.rgba=nt,ut.imgwidth=_[0],ut.imgheight=b[0];for(var H=0;H<_[0]*b[0]*4;H++)A[H]=nt[H];return this.width=_,this.height=b,this.data=A,this}(function(e){var t,n,i,r,o,c,u,h,d,p=function(P){return P=P||{},this.isStrokeTransparent=P.isStrokeTransparent||!1,this.strokeOpacity=P.strokeOpacity||1,this.strokeStyle=P.strokeStyle||"#000000",this.fillStyle=P.fillStyle||"#000000",this.isFillTransparent=P.isFillTransparent||!1,this.fillOpacity=P.fillOpacity||1,this.font=P.font||"10px sans-serif",this.textBaseline=P.textBaseline||"alphabetic",this.textAlign=P.textAlign||"left",this.lineWidth=P.lineWidth||1,this.lineJoin=P.lineJoin||"miter",this.lineCap=P.lineCap||"butt",this.path=P.path||[],this.transform=P.transform!==void 0?P.transform.clone():new h,this.globalCompositeOperation=P.globalCompositeOperation||"normal",this.globalAlpha=P.globalAlpha||1,this.clip_path=P.clip_path||[],this.currentPoint=P.currentPoint||new c,this.miterLimit=P.miterLimit||10,this.lastPoint=P.lastPoint||new c,this.lineDashOffset=P.lineDashOffset||0,this.lineDash=P.lineDash||[],this.margin=P.margin||[0,0,0,0],this.prevPageLastElemOffset=P.prevPageLastElemOffset||0,this.ignoreClearRect=typeof P.ignoreClearRect!="boolean"||P.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new v(this),t=this.internal.f2,n=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,r=this.internal.getHorizontalCoordinate,o=this.internal.getVerticalCoordinate,c=this.internal.Point,u=this.internal.Rectangle,h=this.internal.Matrix,d=new p}]);var v=function(P){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var q=P;Object.defineProperty(this,"pdf",{get:function(){return q}});var W=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return W},set:function(et){W=!!et}});var lt=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return lt},set:function(et){lt=!!et}});var ht=0;Object.defineProperty(this,"posX",{get:function(){return ht},set:function(et){isNaN(et)||(ht=et)}});var ft=0;Object.defineProperty(this,"posY",{get:function(){return ft},set:function(et){isNaN(et)||(ft=et)}}),Object.defineProperty(this,"margin",{get:function(){return d.margin},set:function(et){var Qt;typeof et=="number"?Qt=[et,et,et,et]:((Qt=new Array(4))[0]=et[0],Qt[1]=et.length>=2?et[1]:Qt[0],Qt[2]=et.length>=3?et[2]:Qt[0],Qt[3]=et.length>=4?et[3]:Qt[1]),d.margin=Qt}});var Ct=!1;Object.defineProperty(this,"autoPaging",{get:function(){return Ct},set:function(et){Ct=et}});var _t=0;Object.defineProperty(this,"lastBreak",{get:function(){return _t},set:function(et){_t=et}});var Dt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Dt},set:function(et){Dt=et}}),Object.defineProperty(this,"ctx",{get:function(){return d},set:function(et){et instanceof p&&(d=et)}}),Object.defineProperty(this,"path",{get:function(){return d.path},set:function(et){d.path=et}});var $t=[];Object.defineProperty(this,"ctxStack",{get:function(){return $t},set:function(et){$t=et}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(et){var Qt;Qt=S(et),this.ctx.fillStyle=Qt.style,this.ctx.isFillTransparent=Qt.a===0,this.ctx.fillOpacity=Qt.a,this.pdf.setFillColor(Qt.r,Qt.g,Qt.b,{a:Qt.a}),this.pdf.setTextColor(Qt.r,Qt.g,Qt.b,{a:Qt.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(et){var Qt=S(et);this.ctx.strokeStyle=Qt.style,this.ctx.isStrokeTransparent=Qt.a===0,this.ctx.strokeOpacity=Qt.a,Qt.a===0?this.pdf.setDrawColor(255,255,255):(Qt.a,this.pdf.setDrawColor(Qt.r,Qt.g,Qt.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(et){["butt","round","square"].indexOf(et)!==-1&&(this.ctx.lineCap=et,this.pdf.setLineCap(et))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(et){isNaN(et)||(this.ctx.lineWidth=et,this.pdf.setLineWidth(et))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(et){["bevel","round","miter"].indexOf(et)!==-1&&(this.ctx.lineJoin=et,this.pdf.setLineJoin(et))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(et){isNaN(et)||(this.ctx.miterLimit=et,this.pdf.setMiterLimit(et))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(et){this.ctx.textBaseline=et}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(et){["right","end","center","left","start"].indexOf(et)!==-1&&(this.ctx.textAlign=et)}});var Wt=null,Xt=null,se=null;Object.defineProperty(this,"fontFaces",{get:function(){return se},set:function(et){Wt=null,Xt=null,se=et}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(et){var Qt;if(this.ctx.font=et,(Qt=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(et))!==null){var Ke=Qt[1];Qt[2];var Ce=Qt[3],Ut=Qt[4];Qt[5];var oe=Qt[6],Zt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Ut)[2];Ut=Math.floor(Zt==="px"?parseFloat(Ut)*this.pdf.internal.scaleFactor:Zt==="em"?parseFloat(Ut)*this.pdf.getFontSize():parseFloat(Ut)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Ut);var ie=(function(pe){var Gn,sn,Jt=[],Re=pe.trim();if(Re==="")return H1;if(Re in g4)return[g4[Re]];for(;Re!=="";){switch(sn=null,Gn=(Re=y4(Re)).charAt(0)){case'"':case"'":sn=eq(Re.substring(1),Gn);break;default:sn=nq(Re)}if(sn===null||(Jt.push(sn[0]),(Re=y4(sn[1]))!==""&&Re.charAt(0)!==","))return H1;Re=Re.replace(/^,/,"")}return Jt})(oe);if(this.fontFaces){var xe=(function(pe,Gn){var sn=pe.getFontList(),Jt=JSON.stringify(sn);if(Wt===null||Xt!==Jt){var Re=(function(rn){var we=[];return Object.keys(rn).forEach(function(Ln){rn[Ln].forEach(function(_e){var Ee=null;switch(_e){case"bold":Ee={family:Ln,weight:"bold"};break;case"italic":Ee={family:Ln,style:"italic"};break;case"bolditalic":Ee={family:Ln,weight:"bold",style:"italic"};break;case"":case"normal":Ee={family:Ln}}Ee!==null&&(Ee.ref={name:Ln,style:_e},we.push(Ee))})}),we})(sn);Wt=(function(rn){for(var we={},Ln=0;Ln<rn.length;++Ln){var _e=V1(rn[Ln]),Ee=_e.family,_n=_e.stretch,Se=_e.style,be=_e.weight;we[Ee]=we[Ee]||{},we[Ee][_n]=we[Ee][_n]||{},we[Ee][_n][Se]=we[Ee][_n][Se]||{},we[Ee][_n][Se][be]=_e}return we})(Re.concat(Gn)),Xt=Jt}return Wt})(this.pdf,this.fontFaces),ye=ie.map(function(pe){return{family:pe,stretch:"normal",weight:Ce,style:Ke}}),nn=(function(pe,Gn,sn){for(var Jt=(sn=sn||{}).defaultFontFamily||"times",Re=Object.assign({},tq,sn.genericFontFamilies||{}),rn=null,we=null,Ln=0;Ln<Gn.length;++Ln)if(Re[(rn=V1(Gn[Ln])).family]&&(rn.family=Re[rn.family]),pe.hasOwnProperty(rn.family)){we=pe[rn.family];break}if(!(we=we||pe[Jt]))throw new Error("Could not find a font-family for the rule '"+v4(rn)+"' and default family '"+Jt+"'.");if(we=(function(_e,Ee){if(Ee[_e])return Ee[_e];var _n=u2[_e],Se=_n<=u2.normal?-1:1,be=p4(Ee,ij,_n,Se);if(!be)throw new Error("Could not find a matching font-stretch value for "+_e);return be})(rn.stretch,we),we=(function(_e,Ee){if(Ee[_e])return Ee[_e];for(var _n=nj[_e],Se=0;Se<_n.length;++Se)if(Ee[_n[Se]])return Ee[_n[Se]];throw new Error("Could not find a matching font-style for "+_e)})(rn.style,we),!(we=(function(_e,Ee){if(Ee[_e])return Ee[_e];if(_e===400&&Ee[500])return Ee[500];if(_e===500&&Ee[400])return Ee[400];var _n=JU[_e],Se=p4(Ee,sj,_n,_e<400?-1:1);if(!Se)throw new Error("Could not find a matching font-weight for value "+_e);return Se})(rn.weight,we)))throw new Error("Failed to resolve a font for the rule '"+v4(rn)+"'.");return we})(xe,ye);this.pdf.setFont(nn.ref.name,nn.ref.style)}else{var Ue="";(Ce==="bold"||parseInt(Ce,10)>=700||Ke==="bold")&&(Ue="bold"),Ke==="italic"&&(Ue+="italic"),Ue.length===0&&(Ue="normal");for(var on="",je={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},le=0;le<ie.length;le++){if(this.pdf.internal.getFont(ie[le],Ue,{noFallback:!0,disableWarning:!0})!==void 0){on=ie[le];break}if(Ue==="bolditalic"&&this.pdf.internal.getFont(ie[le],"bold",{noFallback:!0,disableWarning:!0})!==void 0)on=ie[le],Ue="bold";else if(this.pdf.internal.getFont(ie[le],"normal",{noFallback:!0,disableWarning:!0})!==void 0){on=ie[le],Ue="normal";break}}if(on===""){for(var qe=0;qe<ie.length;qe++)if(je[ie[qe]]){on=je[ie[qe]];break}}on=on===""?"Times":on,this.pdf.setFont(on,Ue)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(et){this.ctx.globalCompositeOperation=et}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(et){this.ctx.globalAlpha=et}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(et){this.ctx.lineDashOffset=et,X.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(et){this.ctx.lineDash=et,X.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(et){this.ctx.ignoreClearRect=!!et}})};v.prototype.setLineDash=function(P){this.lineDash=P},v.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},v.prototype.fill=function(){z.call(this,"fill",!1)},v.prototype.stroke=function(){z.call(this,"stroke",!1)},v.prototype.beginPath=function(){this.path=[{type:"begin"}]},v.prototype.moveTo=function(P,q){if(isNaN(P)||isNaN(q))throw Zn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var W=this.ctx.transform.applyToPoint(new c(P,q));this.path.push({type:"mt",x:W.x,y:W.y}),this.ctx.lastPoint=new c(P,q)},v.prototype.closePath=function(){var P=new c(0,0),q=0;for(q=this.path.length-1;q!==-1;q--)if(this.path[q].type==="begin"&&In(this.path[q+1])==="object"&&typeof this.path[q+1].x=="number"){P=new c(this.path[q+1].x,this.path[q+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new c(P.x,P.y)},v.prototype.lineTo=function(P,q){if(isNaN(P)||isNaN(q))throw Zn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var W=this.ctx.transform.applyToPoint(new c(P,q));this.path.push({type:"lt",x:W.x,y:W.y}),this.ctx.lastPoint=new c(W.x,W.y)},v.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),z.call(this,null,!0)},v.prototype.quadraticCurveTo=function(P,q,W,lt){if(isNaN(W)||isNaN(lt)||isNaN(P)||isNaN(q))throw Zn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ht=this.ctx.transform.applyToPoint(new c(W,lt)),ft=this.ctx.transform.applyToPoint(new c(P,q));this.path.push({type:"qct",x1:ft.x,y1:ft.y,x:ht.x,y:ht.y}),this.ctx.lastPoint=new c(ht.x,ht.y)},v.prototype.bezierCurveTo=function(P,q,W,lt,ht,ft){if(isNaN(ht)||isNaN(ft)||isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt))throw Zn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var Ct=this.ctx.transform.applyToPoint(new c(ht,ft)),_t=this.ctx.transform.applyToPoint(new c(P,q)),Dt=this.ctx.transform.applyToPoint(new c(W,lt));this.path.push({type:"bct",x1:_t.x,y1:_t.y,x2:Dt.x,y2:Dt.y,x:Ct.x,y:Ct.y}),this.ctx.lastPoint=new c(Ct.x,Ct.y)},v.prototype.arc=function(P,q,W,lt,ht,ft){if(isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt)||isNaN(ht))throw Zn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ft=!!ft,!this.ctx.transform.isIdentity){var Ct=this.ctx.transform.applyToPoint(new c(P,q));P=Ct.x,q=Ct.y;var _t=this.ctx.transform.applyToPoint(new c(0,W)),Dt=this.ctx.transform.applyToPoint(new c(0,0));W=Math.sqrt(Math.pow(_t.x-Dt.x,2)+Math.pow(_t.y-Dt.y,2))}Math.abs(ht-lt)>=2*Math.PI&&(lt=0,ht=2*Math.PI),this.path.push({type:"arc",x:P,y:q,radius:W,startAngle:lt,endAngle:ht,counterclockwise:ft})},v.prototype.arcTo=function(P,q,W,lt,ht){throw new Error("arcTo not implemented.")},v.prototype.rect=function(P,q,W,lt){if(isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt))throw Zn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(P,q),this.lineTo(P+W,q),this.lineTo(P+W,q+lt),this.lineTo(P,q+lt),this.lineTo(P,q),this.lineTo(P+W,q),this.lineTo(P,q)},v.prototype.fillRect=function(P,q,W,lt){if(isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt))throw Zn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!b.call(this)){var ht={};this.lineCap!=="butt"&&(ht.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ht.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(P,q,W,lt),this.fill(),ht.hasOwnProperty("lineCap")&&(this.lineCap=ht.lineCap),ht.hasOwnProperty("lineJoin")&&(this.lineJoin=ht.lineJoin)}},v.prototype.strokeRect=function(P,q,W,lt){if(isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt))throw Zn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");_.call(this)||(this.beginPath(),this.rect(P,q,W,lt),this.stroke())},v.prototype.clearRect=function(P,q,W,lt){if(isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt))throw Zn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(P,q,W,lt))},v.prototype.save=function(P){P=typeof P!="boolean"||P;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,W=0;W<this.pdf.internal.getNumberOfPages();W++)this.pdf.setPage(W+1),this.pdf.internal.out("q");if(this.pdf.setPage(q),P){this.ctx.fontSize=this.pdf.internal.getFontSize();var lt=new p(this.ctx);this.ctxStack.push(this.ctx),this.ctx=lt}},v.prototype.restore=function(P){P=typeof P!="boolean"||P;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,W=0;W<this.pdf.internal.getNumberOfPages();W++)this.pdf.setPage(W+1),this.pdf.internal.out("Q");this.pdf.setPage(q),P&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},v.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var S=function(P){var q,W,lt,ht;if(P.isCanvasGradient===!0&&(P=P.getColor()),!P)return{r:0,g:0,b:0,a:0,style:P};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(P))q=0,W=0,lt=0,ht=0;else{var ft=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(P);if(ft!==null)q=parseInt(ft[1]),W=parseInt(ft[2]),lt=parseInt(ft[3]),ht=1;else if((ft=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(P))!==null)q=parseInt(ft[1]),W=parseInt(ft[2]),lt=parseInt(ft[3]),ht=parseFloat(ft[4]);else{if(ht=1,typeof P=="string"&&P.charAt(0)!=="#"){var Ct=new K_(P);P=Ct.ok?Ct.toHex():"#000000"}P.length===4?(q=P.substring(1,2),q+=q,W=P.substring(2,3),W+=W,lt=P.substring(3,4),lt+=lt):(q=P.substring(1,3),W=P.substring(3,5),lt=P.substring(5,7)),q=parseInt(q,16),W=parseInt(W,16),lt=parseInt(lt,16)}}return{r:q,g:W,b:lt,a:ht,style:P}},b=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},_=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};v.prototype.fillText=function(P,q,W,lt){if(isNaN(q)||isNaN(W)||typeof P!="string")throw Zn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(lt=isNaN(lt)?void 0:lt,!b.call(this)){var ht=K(this.ctx.transform.rotation),ft=this.ctx.transform.scaleX;Y.call(this,{text:P,x:q,y:W,scale:ft,angle:ht,align:this.textAlign,maxWidth:lt})}},v.prototype.strokeText=function(P,q,W,lt){if(isNaN(q)||isNaN(W)||typeof P!="string")throw Zn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!_.call(this)){lt=isNaN(lt)?void 0:lt;var ht=K(this.ctx.transform.rotation),ft=this.ctx.transform.scaleX;Y.call(this,{text:P,x:q,y:W,scale:ft,renderingMode:"stroke",angle:ht,align:this.textAlign,maxWidth:lt})}},v.prototype.measureText=function(P){if(typeof P!="string")throw Zn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var q=this.pdf,W=this.pdf.internal.scaleFactor,lt=q.internal.getFontSize(),ht=q.getStringUnitWidth(P)*lt/q.internal.scaleFactor;return new function(ft){var Ct=(ft=ft||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return Ct}}),this}({width:ht*=Math.round(96*W/72*1e4)/1e4})},v.prototype.scale=function(P,q){if(isNaN(P)||isNaN(q))throw Zn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var W=new h(P,0,0,q,0,0);this.ctx.transform=this.ctx.transform.multiply(W)},v.prototype.rotate=function(P){if(isNaN(P))throw Zn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var q=new h(Math.cos(P),Math.sin(P),-Math.sin(P),Math.cos(P),0,0);this.ctx.transform=this.ctx.transform.multiply(q)},v.prototype.translate=function(P,q){if(isNaN(P)||isNaN(q))throw Zn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var W=new h(1,0,0,1,P,q);this.ctx.transform=this.ctx.transform.multiply(W)},v.prototype.transform=function(P,q,W,lt,ht,ft){if(isNaN(P)||isNaN(q)||isNaN(W)||isNaN(lt)||isNaN(ht)||isNaN(ft))throw Zn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var Ct=new h(P,q,W,lt,ht,ft);this.ctx.transform=this.ctx.transform.multiply(Ct)},v.prototype.setTransform=function(P,q,W,lt,ht,ft){P=isNaN(P)?1:P,q=isNaN(q)?0:q,W=isNaN(W)?0:W,lt=isNaN(lt)?1:lt,ht=isNaN(ht)?0:ht,ft=isNaN(ft)?0:ft,this.ctx.transform=new h(P,q,W,lt,ht,ft)};var A=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};v.prototype.drawImage=function(P,q,W,lt,ht,ft,Ct,_t,Dt){var $t=this.pdf.getImageProperties(P),Wt=1,Xt=1,se=1,et=1;lt!==void 0&&_t!==void 0&&(se=_t/lt,et=Dt/ht,Wt=$t.width/lt*_t/lt,Xt=$t.height/ht*Dt/ht),ft===void 0&&(ft=q,Ct=W,q=0,W=0),lt!==void 0&&_t===void 0&&(_t=lt,Dt=ht),lt===void 0&&_t===void 0&&(_t=$t.width,Dt=$t.height);var Qt=this.ctx.transform.decompose(),Ke=K(Qt.rotate.shx),Ce=new h,Ut=(Ce=(Ce=(Ce=Ce.multiply(Qt.translate)).multiply(Qt.skew)).multiply(Qt.scale)).applyToRectangle(new u(ft-q*se,Ct-W*et,lt*Wt,ht*Xt));if(this.autoPaging){for(var oe,Zt=j.call(this,Ut),ie=[],xe=0;xe<Zt.length;xe+=1)ie.indexOf(Zt[xe])===-1&&ie.push(Zt[xe]);D(ie);for(var ye=ie[0],nn=ie[ie.length-1],Ue=ye;Ue<nn+1;Ue++){this.pdf.setPage(Ue);var on=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],je=Ue===1?this.posY+this.margin[0]:this.margin[0],le=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],qe=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],pe=Ue===1?0:le+(Ue-2)*qe;if(this.ctx.clip_path.length!==0){var Gn=this.path;oe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=L(oe,this.posX+this.margin[3],-pe+je+this.ctx.prevPageLastElemOffset),$.call(this,"fill",!0),this.path=Gn}var sn=JSON.parse(JSON.stringify(Ut));sn=L([sn],this.posX+this.margin[3],-pe+je+this.ctx.prevPageLastElemOffset)[0];var Jt=(Ue>ye||Ue<nn)&&A.call(this);Jt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],on,qe,null).clip().discardPath()),this.pdf.addImage(P,"JPEG",sn.x,sn.y,sn.w,sn.h,null,null,Ke),Jt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(P,"JPEG",Ut.x,Ut.y,Ut.w,Ut.h,null,null,Ke)};var j=function(P,q,W){var lt=[];q=q||this.pdf.internal.pageSize.width,W=W||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ht=this.posY+this.ctx.prevPageLastElemOffset;switch(P.type){default:case"mt":case"lt":lt.push(Math.floor((P.y+ht)/W)+1);break;case"arc":lt.push(Math.floor((P.y+ht-P.radius)/W)+1),lt.push(Math.floor((P.y+ht+P.radius)/W)+1);break;case"qct":var ft=dt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,P.x1,P.y1,P.x,P.y);lt.push(Math.floor((ft.y+ht)/W)+1),lt.push(Math.floor((ft.y+ft.h+ht)/W)+1);break;case"bct":var Ct=Tt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,P.x1,P.y1,P.x2,P.y2,P.x,P.y);lt.push(Math.floor((Ct.y+ht)/W)+1),lt.push(Math.floor((Ct.y+Ct.h+ht)/W)+1);break;case"rect":lt.push(Math.floor((P.y+ht)/W)+1),lt.push(Math.floor((P.y+P.h+ht)/W)+1)}for(var _t=0;_t<lt.length;_t+=1)for(;this.pdf.internal.getNumberOfPages()<lt[_t];)E.call(this);return lt},E=function(){var P=this.fillStyle,q=this.strokeStyle,W=this.font,lt=this.lineCap,ht=this.lineWidth,ft=this.lineJoin;this.pdf.addPage(),this.fillStyle=P,this.strokeStyle=q,this.font=W,this.lineCap=lt,this.lineWidth=ht,this.lineJoin=ft},L=function(P,q,W){for(var lt=0;lt<P.length;lt++)switch(P[lt].type){case"bct":P[lt].x2+=q,P[lt].y2+=W;case"qct":P[lt].x1+=q,P[lt].y1+=W;default:P[lt].x+=q,P[lt].y+=W}return P},D=function(P){return P.sort(function(q,W){return q-W})},z=function(P,q){var W=this.fillStyle,lt=this.strokeStyle,ht=this.lineCap,ft=this.lineWidth,Ct=Math.abs(ft*this.ctx.transform.scaleX),_t=this.lineJoin;if(this.autoPaging){for(var Dt,$t,Wt=JSON.parse(JSON.stringify(this.path)),Xt=JSON.parse(JSON.stringify(this.path)),se=[],et=0;et<Xt.length;et++)if(Xt[et].x!==void 0)for(var Qt=j.call(this,Xt[et]),Ke=0;Ke<Qt.length;Ke+=1)se.indexOf(Qt[Ke])===-1&&se.push(Qt[Ke]);for(var Ce=0;Ce<se.length;Ce++)for(;this.pdf.internal.getNumberOfPages()<se[Ce];)E.call(this);D(se);for(var Ut=se[0],oe=se[se.length-1],Zt=Ut;Zt<oe+1;Zt++){this.pdf.setPage(Zt),this.fillStyle=W,this.strokeStyle=lt,this.lineCap=ht,this.lineWidth=Ct,this.lineJoin=_t;var ie=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],xe=Zt===1?this.posY+this.margin[0]:this.margin[0],ye=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],nn=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Ue=Zt===1?0:ye+(Zt-2)*nn;if(this.ctx.clip_path.length!==0){var on=this.path;Dt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=L(Dt,this.posX+this.margin[3],-Ue+xe+this.ctx.prevPageLastElemOffset),$.call(this,P,!0),this.path=on}if($t=JSON.parse(JSON.stringify(Wt)),this.path=L($t,this.posX+this.margin[3],-Ue+xe+this.ctx.prevPageLastElemOffset),q===!1||Zt===0){var je=(Zt>Ut||Zt<oe)&&A.call(this);je&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ie,nn,null).clip().discardPath()),$.call(this,P,q),je&&this.pdf.restoreGraphicsState()}this.lineWidth=ft}this.path=Wt}else this.lineWidth=Ct,$.call(this,P,q),this.lineWidth=ft},$=function(P,q){if((P!=="stroke"||q||!_.call(this))&&(P==="stroke"||q||!b.call(this))){for(var W,lt,ht=[],ft=this.path,Ct=0;Ct<ft.length;Ct++){var _t=ft[Ct];switch(_t.type){case"begin":ht.push({begin:!0});break;case"close":ht.push({close:!0});break;case"mt":ht.push({start:_t,deltas:[],abs:[]});break;case"lt":var Dt=ht.length;if(ft[Ct-1]&&!isNaN(ft[Ct-1].x)&&(W=[_t.x-ft[Ct-1].x,_t.y-ft[Ct-1].y],Dt>0)){for(;Dt>=0;Dt--)if(ht[Dt-1].close!==!0&&ht[Dt-1].begin!==!0){ht[Dt-1].deltas.push(W),ht[Dt-1].abs.push(_t);break}}break;case"bct":W=[_t.x1-ft[Ct-1].x,_t.y1-ft[Ct-1].y,_t.x2-ft[Ct-1].x,_t.y2-ft[Ct-1].y,_t.x-ft[Ct-1].x,_t.y-ft[Ct-1].y],ht[ht.length-1].deltas.push(W);break;case"qct":var $t=ft[Ct-1].x+2/3*(_t.x1-ft[Ct-1].x),Wt=ft[Ct-1].y+2/3*(_t.y1-ft[Ct-1].y),Xt=_t.x+2/3*(_t.x1-_t.x),se=_t.y+2/3*(_t.y1-_t.y),et=_t.x,Qt=_t.y;W=[$t-ft[Ct-1].x,Wt-ft[Ct-1].y,Xt-ft[Ct-1].x,se-ft[Ct-1].y,et-ft[Ct-1].x,Qt-ft[Ct-1].y],ht[ht.length-1].deltas.push(W);break;case"arc":ht.push({deltas:[],abs:[],arc:!0}),Array.isArray(ht[ht.length-1].abs)&&ht[ht.length-1].abs.push(_t)}}lt=q?null:P==="stroke"?"stroke":"fill";for(var Ke=!1,Ce=0;Ce<ht.length;Ce++)if(ht[Ce].arc)for(var Ut=ht[Ce].abs,oe=0;oe<Ut.length;oe++){var Zt=Ut[oe];Zt.type==="arc"?H.call(this,Zt.x,Zt.y,Zt.radius,Zt.startAngle,Zt.endAngle,Zt.counterclockwise,void 0,q,!Ke):ot.call(this,Zt.x,Zt.y),Ke=!0}else if(ht[Ce].close===!0)this.pdf.internal.out("h"),Ke=!1;else if(ht[Ce].begin!==!0){var ie=ht[Ce].start.x,xe=ht[Ce].start.y;tt.call(this,ht[Ce].deltas,ie,xe),Ke=!0}lt&&Q.call(this,lt),q&&ct.call(this)}},ut=function(P){var q=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,W=q*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return P-W;case"top":return P+q-W;case"hanging":return P+q-2*W;case"middle":return P+q/2-W;default:return P}},nt=function(P){return P+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};v.prototype.createLinearGradient=function(){var P=function(){};return P.colorStops=[],P.addColorStop=function(q,W){this.colorStops.push([q,W])},P.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},P.isCanvasGradient=!0,P},v.prototype.createPattern=function(){return this.createLinearGradient()},v.prototype.createRadialGradient=function(){return this.createLinearGradient()};var H=function(P,q,W,lt,ht,ft,Ct,_t,Dt){for(var $t=J.call(this,W,lt,ht,ft),Wt=0;Wt<$t.length;Wt++){var Xt=$t[Wt];Wt===0&&(Dt?F.call(this,Xt.x1+P,Xt.y1+q):ot.call(this,Xt.x1+P,Xt.y1+q)),yt.call(this,P,q,Xt.x2,Xt.y2,Xt.x3,Xt.y3,Xt.x4,Xt.y4)}_t?ct.call(this):Q.call(this,Ct)},Q=function(P){switch(P){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},ct=function(){this.pdf.clip(),this.pdf.discardPath()},F=function(P,q){this.pdf.internal.out(n(P)+" "+i(q)+" m")},Y=function(P){var q;switch(P.align){case"right":case"end":q="right";break;case"center":q="center";break;default:q="left"}var W,lt,ht,ft=this.pdf.getTextDimensions(P.text),Ct=ut.call(this,P.y),_t=nt.call(this,Ct)-ft.h,Dt=this.ctx.transform.applyToPoint(new c(P.x,Ct));if(this.autoPaging){var $t=this.ctx.transform.decompose(),Wt=new h;Wt=(Wt=(Wt=Wt.multiply($t.translate)).multiply($t.skew)).multiply($t.scale);for(var Xt=this.ctx.transform.applyToRectangle(new u(P.x,Ct,ft.w,ft.h)),se=Wt.applyToRectangle(new u(P.x,_t,ft.w,ft.h)),et=j.call(this,se),Qt=[],Ke=0;Ke<et.length;Ke+=1)Qt.indexOf(et[Ke])===-1&&Qt.push(et[Ke]);D(Qt);for(var Ce=Qt[0],Ut=Qt[Qt.length-1],oe=Ce;oe<Ut+1;oe++){this.pdf.setPage(oe);var Zt=oe===1?this.posY+this.margin[0]:this.margin[0],ie=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],xe=this.pdf.internal.pageSize.height-this.margin[2],ye=xe-this.margin[0],nn=this.pdf.internal.pageSize.width-this.margin[1],Ue=nn-this.margin[3],on=oe===1?0:ie+(oe-2)*ye;if(this.ctx.clip_path.length!==0){var je=this.path;W=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=L(W,this.posX+this.margin[3],-1*on+Zt),$.call(this,"fill",!0),this.path=je}var le=L([JSON.parse(JSON.stringify(se))],this.posX+this.margin[3],-on+Zt+this.ctx.prevPageLastElemOffset)[0];P.scale>=.01&&(lt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(lt*P.scale),ht=this.lineWidth,this.lineWidth=ht*P.scale);var qe=this.autoPaging!=="text";if(qe||le.y+le.h<=xe){if(qe||le.y>=Zt&&le.x<=nn){var pe=qe?P.text:this.pdf.splitTextToSize(P.text,P.maxWidth||nn-le.x)[0],Gn=L([JSON.parse(JSON.stringify(Xt))],this.posX+this.margin[3],-on+Zt+this.ctx.prevPageLastElemOffset)[0],sn=qe&&(oe>Ce||oe<Ut)&&A.call(this);sn&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ue,ye,null).clip().discardPath()),this.pdf.text(pe,Gn.x,Gn.y,{angle:P.angle,align:q,renderingMode:P.renderingMode}),sn&&this.pdf.restoreGraphicsState()}}else le.y<xe&&(this.ctx.prevPageLastElemOffset+=xe-le.y);P.scale>=.01&&(this.pdf.setFontSize(lt),this.lineWidth=ht)}}else P.scale>=.01&&(lt=this.pdf.internal.getFontSize(),this.pdf.setFontSize(lt*P.scale),ht=this.lineWidth,this.lineWidth=ht*P.scale),this.pdf.text(P.text,Dt.x+this.posX,Dt.y+this.posY,{angle:P.angle,align:q,renderingMode:P.renderingMode,maxWidth:P.maxWidth}),P.scale>=.01&&(this.pdf.setFontSize(lt),this.lineWidth=ht)},ot=function(P,q,W,lt){W=W||0,lt=lt||0,this.pdf.internal.out(n(P+W)+" "+i(q+lt)+" l")},tt=function(P,q,W){return this.pdf.lines(P,q,W,null,null)},yt=function(P,q,W,lt,ht,ft,Ct,_t){this.pdf.internal.out([t(r(W+P)),t(o(lt+q)),t(r(ht+P)),t(o(ft+q)),t(r(Ct+P)),t(o(_t+q)),"c"].join(" "))},J=function(P,q,W,lt){for(var ht=2*Math.PI,ft=Math.PI/2;q>W;)q-=ht;var Ct=Math.abs(W-q);Ct<ht&&lt&&(Ct=ht-Ct);for(var _t=[],Dt=lt?-1:1,$t=q;Ct>1e-5;){var Wt=$t+Dt*Math.min(Ct,ft);_t.push(at.call(this,P,$t,Wt)),Ct-=Math.abs(Wt-$t),$t=Wt}return _t},at=function(P,q,W){var lt=(W-q)/2,ht=P*Math.cos(lt),ft=P*Math.sin(lt),Ct=ht,_t=-ft,Dt=Ct*Ct+_t*_t,$t=Dt+Ct*ht+_t*ft,Wt=4/3*(Math.sqrt(2*Dt*$t)-$t)/(Ct*ft-_t*ht),Xt=Ct-Wt*_t,se=_t+Wt*Ct,et=Xt,Qt=-se,Ke=lt+q,Ce=Math.cos(Ke),Ut=Math.sin(Ke);return{x1:P*Math.cos(q),y1:P*Math.sin(q),x2:Xt*Ce-se*Ut,y2:Xt*Ut+se*Ce,x3:et*Ce-Qt*Ut,y3:et*Ut+Qt*Ce,x4:P*Math.cos(W),y4:P*Math.sin(W)}},K=function(P){return 180*P/Math.PI},dt=function(P,q,W,lt,ht,ft){var Ct=P+.5*(W-P),_t=q+.5*(lt-q),Dt=ht+.5*(W-ht),$t=ft+.5*(lt-ft),Wt=Math.min(P,ht,Ct,Dt),Xt=Math.max(P,ht,Ct,Dt),se=Math.min(q,ft,_t,$t),et=Math.max(q,ft,_t,$t);return new u(Wt,se,Xt-Wt,et-se)},Tt=function(P,q,W,lt,ht,ft,Ct,_t){var Dt,$t,Wt,Xt,se,et,Qt,Ke,Ce,Ut,oe,Zt,ie,xe,ye=W-P,nn=lt-q,Ue=ht-W,on=ft-lt,je=Ct-ht,le=_t-ft;for($t=0;$t<41;$t++)Ce=(Qt=(Wt=P+(Dt=$t/40)*ye)+Dt*((se=W+Dt*Ue)-Wt))+Dt*(se+Dt*(ht+Dt*je-se)-Qt),Ut=(Ke=(Xt=q+Dt*nn)+Dt*((et=lt+Dt*on)-Xt))+Dt*(et+Dt*(ft+Dt*le-et)-Ke),$t==0?(oe=Ce,Zt=Ut,ie=Ce,xe=Ut):(oe=Math.min(oe,Ce),Zt=Math.min(Zt,Ut),ie=Math.max(ie,Ce),xe=Math.max(xe,Ut));return new u(Math.round(oe),Math.round(Zt),Math.round(ie-oe),Math.round(xe-Zt))},X=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var P,q,W=(P=this.ctx.lineDash,q=this.ctx.lineDashOffset,JSON.stringify({lineDash:P,lineDashOffset:q}));this.prevLineDash!==W&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=W)}}})(Ae.API),(function(e){var t=function(c){var u,h,d,p,v,S,b,_,A,j;for(h=[],d=0,p=(c+=u="\0\0\0\0".slice(c.length%4||4)).length;p>d;d+=4)(v=(c.charCodeAt(d)<<24)+(c.charCodeAt(d+1)<<16)+(c.charCodeAt(d+2)<<8)+c.charCodeAt(d+3))!==0?(S=(v=((v=((v=((v=(v-(j=v%85))/85)-(A=v%85))/85)-(_=v%85))/85)-(b=v%85))/85)%85,h.push(S+33,b+33,_+33,A+33,j+33)):h.push(122);return(function(E,L){for(var D=L;D>0;D--)E.pop()})(h,u.length),String.fromCharCode.apply(String,h)+"~>"},n=function(c){var u,h,d,p,v,S=String,b="length",_=255,A="charCodeAt",j="slice",E="replace";for(c[j](-2),c=c[j](0,-2)[E](/\s/g,"")[E]("z","!!!!!"),d=[],p=0,v=(c+=u="uuuuu"[j](c[b]%5||5))[b];v>p;p+=5)h=52200625*(c[A](p)-33)+614125*(c[A](p+1)-33)+7225*(c[A](p+2)-33)+85*(c[A](p+3)-33)+(c[A](p+4)-33),d.push(_&h>>24,_&h>>16,_&h>>8,_&h);return(function(L,D){for(var z=D;z>0;z--)L.pop()})(d,u[b]),S.fromCharCode.apply(S,d)},i=function(c){return c.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">"},r=function(c){var u=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((c=c.replace(/\s/g,"")).indexOf(">")!==-1&&(c=c.substr(0,c.indexOf(">"))),c.length%2&&(c+="0"),u.test(c)===!1)return"";for(var h="",d=0;d<c.length;d+=2)h+=String.fromCharCode("0x"+(c[d]+c[d+1]));return h},o=function(c){for(var u=new Uint8Array(c.length),h=c.length;h--;)u[h]=c.charCodeAt(h);return(u=i2(u)).reduce(function(d,p){return d+String.fromCharCode(p)},"")};e.processDataByFilters=function(c,u){var h=0,d=c||"",p=[];for(typeof(u=u||[])=="string"&&(u=[u]),h=0;h<u.length;h+=1)switch(u[h]){case"ASCII85Decode":case"/ASCII85Decode":d=n(d),p.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":d=t(d),p.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":d=r(d),p.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":d=i(d),p.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":d=o(d),p.push("/FlateDecode");break;default:throw new Error('The filter: "'+u[h]+'" is not implemented')}return{data:d,reverseChain:p.reverse().join(" ")}}})(Ae.API),(function(e){e.loadFile=function(t,n,i){return(function(r,o,c){o=o!==!1,c=typeof c=="function"?c:function(){};var u=void 0;try{u=(function(h,d,p){var v=new XMLHttpRequest,S=0,b=function(_){var A=_.length,j=[],E=String.fromCharCode;for(S=0;S<A;S+=1)j.push(E(255&_.charCodeAt(S)));return j.join("")};if(v.open("GET",h,!d),v.overrideMimeType("text/plain; charset=x-user-defined"),d===!1&&(v.onload=function(){v.status===200?p(b(this.responseText)):p(void 0)}),v.send(null),d&&v.status===200)return b(v.responseText)})(r,o,c)}catch{}return u})(t,n,i)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile})(Ae.API),(function(e){function t(){return($e.html2canvas?Promise.resolve($e.html2canvas):C1(()=>import("./html2canvas.esm-B0tyYwQk.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load html2canvas: "+u))}).then(function(u){return u.default?u.default:u})}function n(){return($e.DOMPurify?Promise.resolve($e.DOMPurify):C1(()=>import("./purify.es-B9ZVCkUG.js"),[])).catch(function(u){return Promise.reject(new Error("Could not load dompurify: "+u))}).then(function(u){return u.default?u.default:u})}var i=function(u){var h=In(u);return h==="undefined"?"undefined":h==="string"||u instanceof String?"string":h==="number"||u instanceof Number?"number":h==="function"||u instanceof Function?"function":u&&u.constructor===Array?"array":u&&u.nodeType===1?"element":h==="object"?"object":"unknown"},r=function(u,h){var d=document.createElement(u);for(var p in h.className&&(d.className=h.className),h.innerHTML&&h.dompurify&&(d.innerHTML=h.dompurify.sanitize(h.innerHTML)),h.style)d.style[p]=h.style[p];return d},o=function u(h,d){for(var p=h.nodeType===3?document.createTextNode(h.nodeValue):h.cloneNode(!1),v=h.firstChild;v;v=v.nextSibling)d!==!0&&v.nodeType===1&&v.nodeName==="SCRIPT"||p.appendChild(u(v,d));return h.nodeType===1&&(h.nodeName==="CANVAS"?(p.width=h.width,p.height=h.height,p.getContext("2d").drawImage(h,0,0)):h.nodeName!=="TEXTAREA"&&h.nodeName!=="SELECT"||(p.value=h.value),p.addEventListener("load",function(){p.scrollTop=h.scrollTop,p.scrollLeft=h.scrollLeft},!0)),p},c=function u(h){var d=Object.assign(u.convert(Promise.resolve()),JSON.parse(JSON.stringify(u.template))),p=u.convert(Promise.resolve(),d);return(p=p.setProgress(1,u,1,[u])).set(h)};(c.prototype=Object.create(Promise.prototype)).constructor=c,c.convert=function(u,h){return u.__proto__=h||c.prototype,u},c.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},c.prototype.from=function(u,h){return this.then(function(){switch(h=h||(function(d){switch(i(d)){case"string":return"string";case"element":return d.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(u),h){case"string":return this.then(n).then(function(d){return this.set({src:r("div",{innerHTML:u,dompurify:d})})});case"element":return this.set({src:u});case"canvas":return this.set({canvas:u});case"img":return this.set({img:u});default:return this.error("Unknown source type.")}})},c.prototype.to=function(u){switch(u){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},c.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var u={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},h=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);h.tagName==="BODY"&&(u.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=r("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=r("div",{className:"html2pdf__container",style:u}),this.prop.container.appendChild(h),this.prop.container.firstChild.appendChild(r("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},c.prototype.toCanvas=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var d=Object.assign({},this.opt.html2canvas);return delete d.onrendered,h(this.prop.container,d)}).then(function(h){(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},c.prototype.toContext2d=function(){var u=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(u).then(t).then(function(h){var d=this.opt.jsPDF,p=this.opt.fontFaces,v=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,S=Object.assign({async:!0,allowTaint:!0,scale:v,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete S.onrendered,d.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,d.context2d.posX=this.opt.x,d.context2d.posY=this.opt.y,d.context2d.margin=this.opt.margin,d.context2d.fontFaces=p,p)for(var b=0;b<p.length;++b){var _=p[b],A=_.src.find(function(j){return j.format==="truetype"});A&&d.addFont(A.url,_.ref.name,_.ref.style)}return S.windowHeight=S.windowHeight||0,S.windowHeight=S.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):S.windowHeight,d.context2d.save(!0),h(this.prop.container,S)}).then(function(h){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(h),this.prop.canvas=h,document.body.removeChild(this.prop.overlay)})},c.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var u=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=u})},c.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},c.prototype.output=function(u,h,d){return(d=d||"pdf").toLowerCase()==="img"||d.toLowerCase()==="image"?this.outputImg(u,h):this.outputPdf(u,h)},c.prototype.outputPdf=function(u,h){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(u,h)})},c.prototype.outputImg=function(u){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(u){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+u+'" is not supported.'}})},c.prototype.save=function(u){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(u?{filename:u}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},c.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},c.prototype.set=function(u){if(i(u)!=="object")return this;var h=Object.keys(u||{}).map(function(d){if(d in c.template.prop)return function(){this.prop[d]=u[d]};switch(d){case"margin":return this.setMargin.bind(this,u.margin);case"jsPDF":return function(){return this.opt.jsPDF=u.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,u.pageSize);default:return function(){this.opt[d]=u[d]}}},this);return this.then(function(){return this.thenList(h)})},c.prototype.get=function(u,h){return this.then(function(){var d=u in c.template.prop?this.prop[u]:this.opt[u];return h?h(d):d})},c.prototype.setMargin=function(u){return this.then(function(){switch(i(u)){case"number":u=[u,u,u,u];case"array":if(u.length===2&&(u=[u[0],u[1],u[0],u[1]]),u.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=u}).then(this.setPageSize)},c.prototype.setPageSize=function(u){function h(d,p){return Math.floor(d*p/72*96)}return this.then(function(){(u=u||Ae.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(u.inner={width:u.width-this.opt.margin[1]-this.opt.margin[3],height:u.height-this.opt.margin[0]-this.opt.margin[2]},u.inner.px={width:h(u.inner.width,u.k),height:h(u.inner.height,u.k)},u.inner.ratio=u.inner.height/u.inner.width),this.prop.pageSize=u})},c.prototype.setProgress=function(u,h,d,p){return u!=null&&(this.progress.val=u),h!=null&&(this.progress.state=h),d!=null&&(this.progress.n=d),p!=null&&(this.progress.stack=p),this.progress.ratio=this.progress.val/this.progress.state,this},c.prototype.updateProgress=function(u,h,d,p){return this.setProgress(u?this.progress.val+u:null,h||null,d?this.progress.n+d:null,p?this.progress.stack.concat(p):null)},c.prototype.then=function(u,h){var d=this;return this.thenCore(u,h,function(p,v){return d.updateProgress(null,null,1,[p]),Promise.prototype.then.call(this,function(S){return d.updateProgress(null,p),S}).then(p,v).then(function(S){return d.updateProgress(1),S})})},c.prototype.thenCore=function(u,h,d){d=d||Promise.prototype.then;var p=this;u&&(u=u.bind(p)),h&&(h=h.bind(p));var v=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?p:c.convert(Object.assign({},p),Promise.prototype),S=d.call(v,u,h);return c.convert(S,p.__proto__)},c.prototype.thenExternal=function(u,h){return Promise.prototype.then.call(this,u,h)},c.prototype.thenList=function(u){var h=this;return u.forEach(function(d){h=h.thenCore(d)}),h},c.prototype.catch=function(u){u&&(u=u.bind(this));var h=Promise.prototype.catch.call(this,u);return c.convert(h,this)},c.prototype.catchExternal=function(u){return Promise.prototype.catch.call(this,u)},c.prototype.error=function(u){return this.then(function(){throw new Error(u)})},c.prototype.using=c.prototype.set,c.prototype.saveAs=c.prototype.save,c.prototype.export=c.prototype.output,c.prototype.run=c.prototype.then,Ae.getPageSize=function(u,h,d){if(In(u)==="object"){var p=u;u=p.orientation,h=p.unit||h,d=p.format||d}h=h||"mm",d=d||"a4",u=(""+(u||"P")).toLowerCase();var v,S=(""+d).toLowerCase(),b={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(h){case"pt":v=1;break;case"mm":v=72/25.4;break;case"cm":v=72/2.54;break;case"in":v=72;break;case"px":v=.75;break;case"pc":case"em":v=12;break;case"ex":v=6;break;default:throw"Invalid unit: "+h}var _,A=0,j=0;if(b.hasOwnProperty(S))A=b[S][1]/v,j=b[S][0]/v;else try{A=d[1],j=d[0]}catch{throw new Error("Invalid format: "+d)}if(u==="p"||u==="portrait")u="p",j>A&&(_=j,j=A,A=_);else{if(u!=="l"&&u!=="landscape")throw"Invalid orientation: "+u;u="l",A>j&&(_=j,j=A,A=_)}return{width:j,height:A,unit:h,k:v,orientation:u}},e.html=function(u,h){(h=h||{}).callback=h.callback||function(){},h.html2canvas=h.html2canvas||{},h.html2canvas.canvas=h.html2canvas.canvas||this.canvas,h.jsPDF=h.jsPDF||this,h.fontFaces=h.fontFaces?h.fontFaces.map(V1):null;var d=new c(h);return h.worker?d:d.from(u).doCallback()}})(Ae.API),Ae.API.addJS=function(e){return x4=e,this.internal.events.subscribe("postPutResources",function(){Qm=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Qm+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),b4=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+x4+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Qm!==void 0&&b4!==void 0&&this.internal.out("/Names <</JavaScript "+Qm+" 0 R>>")}),this},(function(e){var t;e.events.push(["postPutResources",function(){var n=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=n.outline.render().split(/\r\n/),o=0;o<r.length;o++){var c=r[o],u=i.exec(c);if(u!=null){var h=u[1];n.internal.newObjectDeferredBegin(h,!1)}n.internal.write(c)}if(this.outline.createNamedDestinations){var d=this.internal.pages.length,p=[];for(o=0;o<d;o++){var v=n.internal.newObject();p.push(v);var S=n.internal.getPageInfo(o+1);n.internal.write("<< /D["+S.objId+" 0 R /XYZ null null null]>> endobj")}var b=n.internal.newObject();for(n.internal.write("<< /Names [ "),o=0;o<p.length;o++)n.internal.write("(page_"+(o+1)+")"+p[o]+" 0 R");n.internal.write(" ] >>","endobj"),t=n.internal.newObject(),n.internal.write("<< /Dests "+b+" 0 R"),n.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var n=this;n.outline.root.children.length>0&&(n.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&n.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(i,r,o){var c={title:r,options:o,children:[]};return i==null&&(i=this.root),i.children.push(c),c},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(i){i.id=n.internal.newObjectDeferred();for(var r=0;r<i.children.length;r++)this.genIds_r(i.children[r])},n.outline.renderRoot=function(i){this.objStart(i),this.line("/Type /Outlines"),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.line("/Count "+this.count_r({count:0},i)),this.objEnd()},n.outline.renderItems=function(i){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,o=0;o<i.children.length;o++){var c=i.children[o];this.objStart(c),this.line("/Title "+this.makeString(c.title)),this.line("/Parent "+this.makeRef(i)),o>0&&this.line("/Prev "+this.makeRef(i.children[o-1])),o<i.children.length-1&&this.line("/Next "+this.makeRef(i.children[o+1])),c.children.length>0&&(this.line("/First "+this.makeRef(c.children[0])),this.line("/Last "+this.makeRef(c.children[c.children.length-1])));var u=this.count=this.count_r({count:0},c);if(u>0&&this.line("/Count "+u),c.options&&c.options.pageNumber){var h=n.internal.getPageInfo(c.options.pageNumber);this.line("/Dest ["+h.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var d=0;d<i.children.length;d++)this.renderItems(i.children[d])},n.outline.line=function(i){this.ctx.val+=i+`\r
`},n.outline.makeRef=function(i){return i.id+" 0 R"},n.outline.makeString=function(i){return"("+n.internal.pdfEscape(i)+")"},n.outline.objStart=function(i){this.ctx.val+=`\r
`+i.id+` 0 obj\r
<<\r
`},n.outline.objEnd=function(){this.ctx.val+=`>> \r
endobj\r
`},n.outline.count_r=function(i,r){for(var o=0;o<r.children.length;o++)i.count++,this.count_r(i,r.children[o]);return i.count}}])})(Ae.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,i,r,o,c,u){var h,d=this.decode.DCT_DECODE,p=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=c||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,h=(function(v){for(var S,b=256*v.charCodeAt(4)+v.charCodeAt(5),_=v.length,A={width:0,height:0,numcomponents:1},j=4;j<_;j+=2){if(j+=b,t.indexOf(v.charCodeAt(j+1))!==-1){S=256*v.charCodeAt(j+5)+v.charCodeAt(j+6),A={width:256*v.charCodeAt(j+7)+v.charCodeAt(j+8),height:S,numcomponents:v.charCodeAt(j+9)};break}b=256*v.charCodeAt(j+2)+v.charCodeAt(j+3)}return A})(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),h.numcomponents){case 1:u=this.color_spaces.DEVICE_GRAY;break;case 4:u=this.color_spaces.DEVICE_CMYK;break;case 3:u=this.color_spaces.DEVICE_RGB}p={data:n,width:h.width,height:h.height,colorSpace:u,bitsPerComponent:8,filter:d,index:i,alias:r}}return p}})(Ae.API),Ae.API.processPNG=function(e,t,n,i){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var r,o=FU(e,{checkCrc:!0}),c=o.width,u=o.height,h=o.channels,d=o.palette,p=o.depth;r=d&&h===1?(function(H){for(var Q=H.width,ct=H.height,F=H.data,Y=H.palette,ot=H.depth,tt=!1,yt=[],J=[],at=void 0,K=!1,dt=0,Tt=0;Tt<Y.length;Tt++){var X=A3(Y[Tt],4),P=X[0],q=X[1],W=X[2],lt=X[3];yt.push(P,q,W),lt!=null&&(lt===0?(dt++,J.length<1&&J.push(Tt)):lt<255&&(K=!0))}if(K||dt>1){tt=!0,J=void 0;var ht=Q*ct;at=new Uint8Array(ht);for(var ft=new DataView(F.buffer),Ct=0;Ct<ht;Ct++){var _t=$1(ft,Ct,ot),Dt=A3(Y[_t],4)[3];at[Ct]=Dt}}else dt===0&&(J=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:tt?8:void 0,colorBytes:F,alphaBytes:at,needSMask:tt,palette:yt,mask:J}})(o):h===2||h===4?(function(H){for(var Q=H.data,ct=H.width,F=H.height,Y=H.channels,ot=H.depth,tt=Y===2?"DeviceGray":"DeviceRGB",yt=Y-1,J=ct*F,at=yt,K=J*at,dt=1*J,Tt=Math.ceil(K*ot/8),X=Math.ceil(dt*ot/8),P=new Uint8Array(Tt),q=new Uint8Array(X),W=new DataView(Q.buffer),lt=new DataView(P.buffer),ht=new DataView(q.buffer),ft=!1,Ct=0;Ct<J;Ct++){for(var _t=Ct*Y,Dt=0;Dt<at;Dt++)M4(lt,$1(W,_t+Dt,ot),Ct*at+Dt,ot);var $t=$1(W,_t+at,ot);$t<(1<<ot)-1&&(ft=!0),M4(ht,$t,1*Ct,ot)}return{colorSpace:tt,colorsPerPixel:yt,sMaskBitsPerComponent:ft?ot:void 0,colorBytes:P,alphaBytes:q,needSMask:ft}})(o):(function(H){var Q=H.data,ct=H.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:ct,colorsPerPixel:ct==="DeviceGray"?1:3,colorBytes:Q instanceof Uint16Array?(function(F){for(var Y=F.length,ot=new Uint8Array(2*Y),tt=new DataView(ot.buffer,ot.byteOffset,ot.byteLength),yt=0;yt<Y;yt++)tt.setUint16(2*yt,F[yt],!1);return ot})(Q):Q,needSMask:!1}})(o);var v,S,b,_=r,A=_.colorSpace,j=_.colorsPerPixel,E=_.sMaskBitsPerComponent,L=_.colorBytes,D=_.alphaBytes,z=_.needSMask,$=_.palette,ut=_.mask,nt=null;return i!==Ae.API.image_compression.NONE&&typeof i2=="function"?(nt=(function(H){var Q;switch(H){case Ae.API.image_compression.FAST:Q=11;break;case Ae.API.image_compression.MEDIUM:Q=13;break;case Ae.API.image_compression.SLOW:Q=14;break;default:Q=12}return Q})(i),v=this.decode.FLATE_DECODE,S="/Predictor ".concat(nt," /Colors ").concat(j," /BitsPerComponent ").concat(p," /Columns ").concat(c),e=A4(L,Math.ceil(c*j*p/8),j,p,i),z&&(b=A4(D,Math.ceil(c*E/8),1,E,i))):(v=void 0,S=void 0,e=L,z&&(b=D)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(b&&this.__addimage__.isArrayBuffer(b)||this.__addimage__.isArrayBufferView(b))&&(b=this.__addimage__.arrayBufferToBinaryString(b)),{alias:n,data:e,index:t,filter:v,decodeParameters:S,transparency:ut,palette:$,sMask:b,predictor:nt,width:c,height:u,bitsPerComponent:p,sMaskBitsPerComponent:E,colorSpace:A}}},(function(e){e.processGIF89A=function(t,n,i,r){var o=new aq(t),c=o.width,u=o.height,h=[];o.decodeAndBlitFrameRGBA(0,h);var d={data:h,width:c,height:u},p=new G1(100).encode(d,100);return e.processJPEG.call(this,p,n,i,r)},e.processGIF87A=e.processGIF89A})(Ae.API),oo.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:r,green:i,blue:n,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},oo.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(n){Zn.log("bit decode error:"+n)}},oo.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,r=0;r<t;r++)for(var o=this.datav.getUint8(this.pos++,!0),c=i*this.width*4+8*r*4,u=0;u<8&&8*r+u<this.width;u++){var h=this.palette[o>>7-u&1];this.data[c+4*u]=h.blue,this.data[c+4*u+1]=h.green,this.data[c+4*u+2]=h.red,this.data[c+4*u+3]=255}n!==0&&(this.pos+=4-n)}},oo.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,r=0;r<e;r++){var o=this.datav.getUint8(this.pos++,!0),c=i*this.width*4+2*r*4,u=o>>4,h=15&o,d=this.palette[u];if(this.data[c]=d.blue,this.data[c+1]=d.green,this.data[c+2]=d.red,this.data[c+3]=255,2*r+1>=this.width)break;d=this.palette[h],this.data[c+4]=d.blue,this.data[c+4+1]=d.green,this.data[c+4+2]=d.red,this.data[c+4+3]=255}t!==0&&(this.pos+=4-t)}},oo.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var r=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+4*i;if(r<this.palette.length){var c=this.palette[r];this.data[o]=c.red,this.data[o+1]=c.green,this.data[o+2]=c.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}e!==0&&(this.pos+=4-e)}},oo.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,r=0;r<this.width;r++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var c=(o&t)/t*255|0,u=(o>>5&t)/t*255|0,h=(o>>10&t)/t*255|0,d=o>>15?255:0,p=i*this.width*4+4*r;this.data[p]=h,this.data[p+1]=u,this.data[p+2]=c,this.data[p+3]=d}this.pos+=e}},oo.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var r=this.bottom_up?i:this.height-1-i,o=0;o<this.width;o++){var c=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(c&t)/t*255|0,h=(c>>5&n)/n*255|0,d=(c>>11)/t*255|0,p=r*this.width*4+4*o;this.data[p]=d,this.data[p+1]=h,this.data[p+2]=u,this.data[p+3]=255}this.pos+=e}},oo.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),c=t*this.width*4+4*n;this.data[c]=o,this.data[c+1]=r,this.data[c+2]=i,this.data[c+3]=255}this.pos+=this.width%4}},oo.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),c=this.datav.getUint8(this.pos++,!0),u=t*this.width*4+4*n;this.data[u]=o,this.data[u+1]=r,this.data[u+2]=i,this.data[u+3]=c}},oo.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,n,i,r){var o=new oo(t,!1),c=o.width,u=o.height,h={data:o.getData(),width:c,height:u},d=new G1(100).encode(h,100);return e.processJPEG.call(this,d,n,i,r)}})(Ae.API),k4.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,n,i,r){var o=new k4(t),c=o.width,u=o.height,h={data:o.getData(),width:c,height:u},d=new G1(100).encode(h,100);return e.processJPEG.call(this,d,n,i,r)}})(Ae.API),Ae.API.processRGBA=function(e,t,n){for(var i=e.data,r=i.length,o=new Uint8Array(r/4*3),c=new Uint8Array(r/4),u=0,h=0,d=0;d<r;d+=4){var p=i[d],v=i[d+1],S=i[d+2],b=i[d+3];o[u++]=p,o[u++]=v,o[u++]=S,c[h++]=b}var _=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(c),data:_,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Ae.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},fh=Ae.API,Zm=fh.getCharWidthsArray=function(e,t){var n,i,r=(t=t||{}).font||this.internal.getFont(),o=t.fontSize||this.internal.getFontSize(),c=t.charSpace||this.internal.getCharSpace(),u=t.widths?t.widths:r.metadata.Unicode.widths,h=u.fof?u.fof:1,d=t.kerning?t.kerning:r.metadata.Unicode.kerning,p=d.fof?d.fof:1,v=t.doKerning!==!1,S=0,b=e.length,_=0,A=u[0]||h,j=[];for(n=0;n<b;n++)i=e.charCodeAt(n),typeof r.metadata.widthOfString=="function"?j.push((r.metadata.widthOfGlyph(r.metadata.characterToGlyph(i))+c*(1e3/o)||0)/1e3):(S=v&&In(d[i])==="object"&&!isNaN(parseInt(d[i][_],10))?d[i][_]/p:0,j.push((u[i]||A)/h+S)),_=i;return j},w4=fh.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),i=t.font||this.internal.getFont(),r=t.charSpace||this.internal.getCharSpace();return fh.processArabic&&(e=fh.processArabic(e)),typeof i.metadata.widthOfString=="function"?i.metadata.widthOfString(e,n,r)/n:Zm.apply(this,arguments).reduce(function(o,c){return o+c},0)},S4=function(e,t,n,i){for(var r=[],o=0,c=e.length,u=0;o!==c&&u+t[o]<n;)u+=t[o],o++;r.push(e.slice(0,o));var h=o;for(u=0;o!==c;)u+t[o]>i&&(r.push(e.slice(h,o)),u=0,h=o),u+=t[o],o++;return h!==o&&r.push(e.slice(h,o)),r},N4=function(e,t,n){n||(n={});var i,r,o,c,u,h,d,p=[],v=[p],S=n.textIndent||0,b=0,_=0,A=e.split(" "),j=Zm.apply(this,[" ",n])[0];if(h=n.lineIndent===-1?A[0].length+2:n.lineIndent||0){var E=Array(h).join(" "),L=[];A.map(function(z){(z=z.split(/\s*\n/)).length>1?L=L.concat(z.map(function($,ut){return(ut&&$.length?`
`:"")+$})):L.push(z[0])}),A=L,h=w4.apply(this,[E,n])}for(o=0,c=A.length;o<c;o++){var D=0;if(i=A[o],h&&i[0]==`
`&&(i=i.substr(1),D=1),S+b+(_=(r=Zm.apply(this,[i,n])).reduce(function(z,$){return z+$},0))>t||D){if(_>t){for(u=S4.apply(this,[i,r,t-(S+b),t]),p.push(u.shift()),p=[u.pop()];u.length;)v.push([u.shift()]);_=r.slice(i.length-(p[0]?p[0].length:0)).reduce(function(z,$){return z+$},0)}else p=[i];v.push(p),S=_+h,b=j}else p.push(i),S+=b+_,b=j}return d=h?function(z,$){return($?E:"")+z.join(" ")}:function(z){return z.join(" ")},v.map(d)},fh.splitTextToSize=function(e,t,n){var i,r=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(p){if(p.widths&&p.kerning)return{widths:p.widths,kerning:p.kerning};var v=this.internal.getFont(p.fontName,p.fontStyle),S="Unicode";return v.metadata[S]?{widths:v.metadata[S].widths||{0:1},kerning:v.metadata[S].kerning||{}}:{font:v.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);i=Array.isArray(e)?e:String(e).split(/\r?\n/);var c=1*this.internal.scaleFactor*t/r;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/r:0,o.lineIndent=n.lineIndent;var u,h,d=[];for(u=0,h=i.length;u<h;u++)d=d.concat(N4.apply(this,[i[u],c,o]));return d},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",i={},r={},o=0;o<16;o++)i[n[o]]=t[o],r[t[o]]=n[o];var c=function(S){return"0x"+parseInt(S,10).toString(16)},u=e.__fontmetrics__.compress=function(S){var b,_,A,j,E=["{"];for(var L in S){if(b=S[L],isNaN(parseInt(L,10))?_="'"+L+"'":(L=parseInt(L,10),_=(_=c(L).slice(2)).slice(0,-1)+r[_.slice(-1)]),typeof b=="number")b<0?(A=c(b).slice(3),j="-"):(A=c(b).slice(2),j=""),A=j+A.slice(0,-1)+r[A.slice(-1)];else{if(In(b)!=="object")throw new Error("Don't know what to do with value type "+In(b)+".");A=u(b)}E.push(_+A)}return E.push("}"),E.join("")},h=e.__fontmetrics__.uncompress=function(S){if(typeof S!="string")throw new Error("Invalid argument passed to uncompress.");for(var b,_,A,j,E={},L=1,D=E,z=[],$="",ut="",nt=S.length-1,H=1;H<nt;H+=1)(j=S[H])=="'"?b?(A=b.join(""),b=void 0):b=[]:b?b.push(j):j=="{"?(z.push([D,A]),D={},A=void 0):j=="}"?((_=z.pop())[0][_[1]]=D,A=void 0,D=_[0]):j=="-"?L=-1:A===void 0?i.hasOwnProperty(j)?($+=i[j],A=parseInt($,16)*L,L=1,$=""):$+=j:i.hasOwnProperty(j)?(ut+=i[j],D[A]=parseInt(ut,16)*L,L=1,A=void 0,ut=""):ut+=j;return E},d={codePages:["WinAnsiEncoding"],WinAnsiEncoding:h("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},p={Unicode:{Courier:d,"Courier-Bold":d,"Courier-BoldOblique":d,"Courier-Oblique":d,Helvetica:d,"Helvetica-Bold":d,"Helvetica-BoldOblique":d,"Helvetica-Oblique":d,"Times-Roman":d,"Times-Bold":d,"Times-BoldItalic":d,"Times-Italic":d}},v={Unicode:{"Courier-Oblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":h("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":h("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:h("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:h("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":h("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":h("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(S){var b=S.font,_=v.Unicode[b.postScriptName];_&&(b.metadata.Unicode={},b.metadata.Unicode.widths=_.widths,b.metadata.Unicode.kerning=_.kerning);var A=p.Unicode[b.postScriptName];A&&(b.metadata.Unicode.encoding=A,b.encoding=A.codePages[0])}])})(Ae.API),(function(e){var t=function(n){for(var i=n.length,r=new Uint8Array(i),o=0;o<i;o++)r[o]=n.charCodeAt(o);return r};e.API.events.push(["addFont",function(n){var i=void 0,r=n.font,o=n.instance;if(!r.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(i=o.existsFileInVFS(r.postScriptName)===!1?o.loadFile(r.postScriptName):o.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(c,u){u=/^\x00\x01\x00\x00/.test(u)?t(u):t(bp(u)),c.metadata=e.API.TTFFont.open(u),c.metadata.Unicode=c.metadata.Unicode||{encoding:{},kerning:{},widths:[]},c.metadata.glyIdsUsed=[0]})(r,i)}}])})(Ae),Ae.API.addSvgAsImage=function(e,t,n,i,r,o,c,u){if(isNaN(t)||isNaN(n))throw Zn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(r))throw Zn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=r;var d=h.getContext("2d");d.fillStyle="#fff",d.fillRect(0,0,h.width,h.height);var p={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},v=this;return($e.canvg?Promise.resolve($e.canvg):C1(()=>import("./index.es-D1m5H8xO.js"),[])).catch(function(S){return Promise.reject(new Error("Could not load canvg: "+S))}).then(function(S){return S.default?S.default:S}).then(function(S){return S.fromString(d,e,p)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(S){return S.render(p)}).then(function(){v.addImage(h.toDataURL("image/jpeg",1),t,n,i,r,c,u)})},Ae.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var r=0;r<this.internal.pages[i].length;r++)this.internal.pages[i][r]=this.internal.pages[i][r].replace(t,n);return this},Ae.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var i,r,o,c={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(c),h=[],d=0,p=0,v=0;function S(_,A){var j,E=!1;for(j=0;j<_.length;j+=1)_[j]===A&&(E=!0);return E}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(c)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var b=u.length;for(v=0;v<b;v+=1)n[u[v]].value=n[u[v]].defaultValue,n[u[v]].explicitSet=!1}if(In(e)==="object"){for(r in e)if(o=e[r],S(u,r)&&o!==void 0){if(n[r].type==="boolean"&&typeof o=="boolean")n[r].value=o;else if(n[r].type==="name"&&S(n[r].valueSet,o))n[r].value=o;else if(n[r].type==="integer"&&Number.isInteger(o))n[r].value=o;else if(n[r].type==="array"){for(d=0;d<o.length;d+=1)if(i=!0,o[d].length===1&&typeof o[d][0]=="number")h.push(String(o[d]-1));else if(o[d].length>1){for(p=0;p<o[d].length;p+=1)typeof o[d][p]!="number"&&(i=!1);i===!0&&h.push([o[d][0]-1,o[d][1]-1].join(" "))}n[r].value="["+h.join(" ")+"]"}else n[r].value=n[r].defaultValue;n[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var _,A=[];for(_ in n)n[_].explicitSet===!0&&(n[_].type==="name"?A.push("/"+_+" /"+n[_].value):A.push("/"+_+" "+n[_].value));A.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+A.join(`
`)+`
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},(function(e){var t=function(){var i='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',r=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),o=unescape(encodeURIComponent(i)),c=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),u=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),h=unescape(encodeURIComponent("</x:xmpmeta>")),d=o.length+c.length+u.length+r.length+h.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+d+" >>"),this.internal.write("stream"),this.internal.write(r+o+c+u+h),this.internal.write("endstream"),this.internal.write("endobj")},n=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};e.addMetadata=function(i,r){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:i,namespaceuri:r||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",t)),this}})(Ae.API),(function(e){var t=e.API,n=t.pdfEscape16=function(o,c){for(var u,h=c.metadata.Unicode.widths,d=["","0","00","000","0000"],p=[""],v=0,S=o.length;v<S;++v){if(u=c.metadata.characterToGlyph(o.charCodeAt(v)),c.metadata.glyIdsUsed.push(u),c.metadata.toUnicode[u]=o.charCodeAt(v),h.indexOf(u)==-1&&(h.push(u),h.push([parseInt(c.metadata.widthOfGlyph(u),10)])),u=="0")return p.join("");u=u.toString(16),p.push(d[4-u.length],u)}return p.join("")},i=function(o){var c,u,h,d,p,v,S;for(p=`/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo <<
  /Registry (Adobe)
  /Ordering (UCS)
  /Supplement 0
>> def
/CMapName /Adobe-Identity-UCS def
/CMapType 2 def
1 begincodespacerange
<0000><ffff>
endcodespacerange`,h=[],v=0,S=(u=Object.keys(o).sort(function(b,_){return b-_})).length;v<S;v++)c=u[v],h.length>=100&&(p+=`
`+h.length+` beginbfchar
`+h.join(`
`)+`
endbfchar`,h=[]),o[c]!==void 0&&o[c]!==null&&typeof o[c].toString=="function"&&(d=("0000"+o[c].toString(16)).slice(-4),c=("0000"+(+c).toString(16)).slice(-4),h.push("<"+c+"><"+d+">"));return h.length&&(p+=`
`+h.length+` beginbfchar
`+h.join(`
`)+`
endbfchar
`),p+`endcmap
CMapName currentdict /CMap defineresource pop
end
end`};t.events.push(["putFont",function(o){(function(c){var u=c.font,h=c.out,d=c.newObject,p=c.putStream;if(u.metadata instanceof e.API.TTFFont&&u.encoding==="Identity-H"){for(var v=u.metadata.Unicode.widths,S=u.metadata.subset.encode(u.metadata.glyIdsUsed,1),b="",_=0;_<S.length;_++)b+=String.fromCharCode(S[_]);var A=d();p({data:b,addLength1:!0,objectId:A}),h("endobj");var j=d();p({data:i(u.metadata.toUnicode),addLength1:!0,objectId:j}),h("endobj");var E=d();h("<<"),h("/Type /FontDescriptor"),h("/FontName /"+vh(u.fontName)),h("/FontFile2 "+A+" 0 R"),h("/FontBBox "+e.API.PDFObject.convert(u.metadata.bbox)),h("/Flags "+u.metadata.flags),h("/StemV "+u.metadata.stemV),h("/ItalicAngle "+u.metadata.italicAngle),h("/Ascent "+u.metadata.ascender),h("/Descent "+u.metadata.decender),h("/CapHeight "+u.metadata.capHeight),h(">>"),h("endobj");var L=d();h("<<"),h("/Type /Font"),h("/BaseFont /"+vh(u.fontName)),h("/FontDescriptor "+E+" 0 R"),h("/W "+e.API.PDFObject.convert(v)),h("/CIDToGIDMap /Identity"),h("/DW 1000"),h("/Subtype /CIDFontType2"),h("/CIDSystemInfo"),h("<<"),h("/Supplement 0"),h("/Registry (Adobe)"),h("/Ordering ("+u.encoding+")"),h(">>"),h(">>"),h("endobj"),u.objectNumber=d(),h("<<"),h("/Type /Font"),h("/Subtype /Type0"),h("/ToUnicode "+j+" 0 R"),h("/BaseFont /"+vh(u.fontName)),h("/Encoding /"+u.encoding),h("/DescendantFonts ["+L+" 0 R]"),h(">>"),h("endobj"),u.isAlreadyPutted=!0}})(o)}]),t.events.push(["putFont",function(o){(function(c){var u=c.font,h=c.out,d=c.newObject,p=c.putStream;if(u.metadata instanceof e.API.TTFFont&&u.encoding==="WinAnsiEncoding"){for(var v=u.metadata.rawData,S="",b=0;b<v.length;b++)S+=String.fromCharCode(v[b]);var _=d();p({data:S,addLength1:!0,objectId:_}),h("endobj");var A=d();p({data:i(u.metadata.toUnicode),addLength1:!0,objectId:A}),h("endobj");var j=d();h("<<"),h("/Descent "+u.metadata.decender),h("/CapHeight "+u.metadata.capHeight),h("/StemV "+u.metadata.stemV),h("/Type /FontDescriptor"),h("/FontFile2 "+_+" 0 R"),h("/Flags 96"),h("/FontBBox "+e.API.PDFObject.convert(u.metadata.bbox)),h("/FontName /"+vh(u.fontName)),h("/ItalicAngle "+u.metadata.italicAngle),h("/Ascent "+u.metadata.ascender),h(">>"),h("endobj"),u.objectNumber=d();for(var E=0;E<u.metadata.hmtx.widths.length;E++)u.metadata.hmtx.widths[E]=parseInt(u.metadata.hmtx.widths[E]*(1e3/u.metadata.head.unitsPerEm));h("<</Subtype/TrueType/Type/Font/ToUnicode "+A+" 0 R/BaseFont/"+vh(u.fontName)+"/FontDescriptor "+j+" 0 R/Encoding/"+u.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(u.metadata.hmtx.widths)+">>"),h("endobj"),u.isAlreadyPutted=!0}})(o)}]);var r=function(o){var c,u=o.text||"",h=o.x,d=o.y,p=o.options||{},v=o.mutex||{},S=v.pdfEscape,b=v.activeFontKey,_=v.fonts,A=b,j="",E=0,L="",D=_[A].encoding;if(_[A].encoding!=="Identity-H")return{text:u,x:h,y:d,options:p,mutex:v};for(L=u,A=b,Array.isArray(u)&&(L=u[0]),E=0;E<L.length;E+=1)_[A].metadata.hasOwnProperty("cmap")&&(c=_[A].metadata.cmap.unicode.codeMap[L[E].charCodeAt(0)]),c||L[E].charCodeAt(0)<256&&_[A].metadata.hasOwnProperty("Unicode")?j+=L[E]:j+="";var z="";return parseInt(A.slice(1))<14||D==="WinAnsiEncoding"?z=S(j,A).split("").map(function($){return $.charCodeAt(0).toString(16)}).join(""):D==="Identity-H"&&(z=n(j,_[A])),v.isHex=!0,{text:z,x:h,y:d,options:p,mutex:v}};t.events.push(["postProcessText",function(o){var c=o.text||"",u=[],h={text:c,x:o.x,y:o.y,options:o.options,mutex:o.mutex};if(Array.isArray(c)){var d=0;for(d=0;d<c.length;d+=1)Array.isArray(c[d])&&c[d].length===3?u.push([r(Object.assign({},h,{text:c[d][0]})).text,c[d][1],c[d][2]]):u.push(r(Object.assign({},h,{text:c[d]})).text);o.text=u}else o.text=r(Object.assign({},h,{text:c})).text}])})(Ae),(function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0},e.addFileToVFS=function(n,i){return t.call(this),this.internal.vFS[n]=i,this},e.getFileFromVFS=function(n){return t.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}})(Ae.API),(function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(i){var r,o,c,u,h,d,p,v=t,S=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],b=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},A={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},j=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],E=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),L=!1,D=0;this.__bidiEngine__={};var z=function(F){var Y=F.charCodeAt(),ot=Y>>8,tt=A[ot];return tt!==void 0?v[256*tt+(255&Y)]:ot===252||ot===253?"AL":E.test(ot)?"L":ot===8?"R":"N"},$=function(F){for(var Y,ot=0;ot<F.length;ot++){if((Y=z(F.charAt(ot)))==="L")return!1;if(Y==="R")return!0}return!1},ut=function(F,Y,ot,tt){var yt,J,at,K,dt=Y[tt];switch(dt){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":L=!1;break;case"N":case"AN":break;case"EN":L&&(dt="AN");break;case"AL":L=!0,dt="R";break;case"WS":case"BN":dt="N";break;case"CS":tt<1||tt+1>=Y.length||(yt=ot[tt-1])!=="EN"&&yt!=="AN"||(J=Y[tt+1])!=="EN"&&J!=="AN"?dt="N":L&&(J="AN"),dt=J===yt?J:"N";break;case"ES":dt=(yt=tt>0?ot[tt-1]:"B")==="EN"&&tt+1<Y.length&&Y[tt+1]==="EN"?"EN":"N";break;case"ET":if(tt>0&&ot[tt-1]==="EN"){dt="EN";break}if(L){dt="N";break}for(at=tt+1,K=Y.length;at<K&&Y[at]==="ET";)at++;dt=at<K&&Y[at]==="EN"?"EN":"N";break;case"NSM":if(c&&!u){for(K=Y.length,at=tt+1;at<K&&Y[at]==="NSM";)at++;if(at<K){var Tt=F[tt],X=Tt>=1425&&Tt<=2303||Tt===64286;if(yt=Y[at],X&&(yt==="R"||yt==="AL")){dt="R";break}}}dt=tt<1||(yt=Y[tt-1])==="B"?"N":ot[tt-1];break;case"B":L=!1,r=!0,dt=D;break;case"S":o=!0,dt="N"}return dt},nt=function(F,Y,ot){var tt=F.split("");return ot&&H(tt,ot,{hiLevel:D}),tt.reverse(),Y&&Y.reverse(),tt.join("")},H=function(F,Y,ot){var tt,yt,J,at,K,dt=-1,Tt=F.length,X=0,P=[],q=D?b:S,W=[];for(L=!1,r=!1,o=!1,yt=0;yt<Tt;yt++)W[yt]=z(F[yt]);for(J=0;J<Tt;J++){if(K=X,P[J]=ut(F,W,P,J),tt=240&(X=q[K][_[P[J]]]),X&=15,Y[J]=at=q[X][5],tt>0)if(tt===16){for(yt=dt;yt<J;yt++)Y[yt]=1;dt=-1}else dt=-1;if(q[X][6])dt===-1&&(dt=J);else if(dt>-1){for(yt=dt;yt<J;yt++)Y[yt]=at;dt=-1}W[J]==="B"&&(Y[J]=0),ot.hiLevel|=at}o&&(function(lt,ht,ft){for(var Ct=0;Ct<ft;Ct++)if(lt[Ct]==="S"){ht[Ct]=D;for(var _t=Ct-1;_t>=0&&lt[_t]==="WS";_t--)ht[_t]=D}})(W,Y,Tt)},Q=function(F,Y,ot,tt,yt){if(!(yt.hiLevel<F)){if(F===1&&D===1&&!r)return Y.reverse(),void(ot&&ot.reverse());for(var J,at,K,dt,Tt=Y.length,X=0;X<Tt;){if(tt[X]>=F){for(K=X+1;K<Tt&&tt[K]>=F;)K++;for(dt=X,at=K-1;dt<at;dt++,at--)J=Y[dt],Y[dt]=Y[at],Y[at]=J,ot&&(J=ot[dt],ot[dt]=ot[at],ot[at]=J);X=K}X++}}},ct=function(F,Y,ot){var tt=F.split(""),yt={hiLevel:D};return ot||(ot=[]),H(tt,ot,yt),(function(J,at,K){if(K.hiLevel!==0&&p)for(var dt,Tt=0;Tt<J.length;Tt++)at[Tt]===1&&(dt=j.indexOf(J[Tt]))>=0&&(J[Tt]=j[dt+1])})(tt,ot,yt),Q(2,tt,Y,ot,yt),Q(1,tt,Y,ot,yt),tt.join("")};return this.__bidiEngine__.doBidiReorder=function(F,Y,ot){if((function(yt,J){if(J)for(var at=0;at<yt.length;at++)J[at]=at;u===void 0&&(u=$(yt)),d===void 0&&(d=$(yt))})(F,Y),c||!h||d)if(c&&h&&u^d)D=u?1:0,F=nt(F,Y,ot);else if(!c&&h&&d)D=u?1:0,F=ct(F,Y,ot),F=nt(F,Y);else if(!c||u||h||d){if(c&&!h&&u^d)F=nt(F,Y),u?(D=0,F=ct(F,Y,ot)):(D=1,F=ct(F,Y,ot),F=nt(F,Y));else if(c&&u&&!h&&d)D=1,F=ct(F,Y,ot),F=nt(F,Y);else if(!c&&!h&&u^d){var tt=p;u?(D=1,F=ct(F,Y,ot),D=0,p=!1,F=ct(F,Y,ot),p=tt):(D=0,F=ct(F,Y,ot),F=nt(F,Y),D=1,p=!1,F=ct(F,Y,ot),p=tt,F=nt(F,Y))}}else D=0,F=ct(F,Y,ot);else D=u?1:0,F=ct(F,Y,ot);return F},this.__bidiEngine__.setOptions=function(F){F&&(c=F.isInputVisual,h=F.isOutputVisual,u=F.isInputRtl,d=F.isOutputRtl,p=F.isSymmetricSwapping)},this.__bidiEngine__.setOptions(i),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(i){var r=i.text;i.x,i.y;var o=i.options||{};i.mutex,o.lang;var c=[];if(o.isInputVisual=typeof o.isInputVisual!="boolean"||o.isInputVisual,n.setOptions(o),Object.prototype.toString.call(r)==="[object Array]"){var u=0;for(c=[],u=0;u<r.length;u+=1)Object.prototype.toString.call(r[u])==="[object Array]"?c.push([n.doBidiReorder(r[u][0]),r[u][1],r[u][2]]):c.push([n.doBidiReorder(r[u])]);i.text=c}else i.text=n.doBidiReorder(r);n.setOptions({isInputVisual:!0})}])})(Ae),Ae.API.TTFFont=(function(){function e(t){var n;if(this.rawData=t,n=this.contents=new kc(t),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new wq(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new oq(this.contents),this.head=new cq(this),this.name=new mq(this),this.cmap=new aj(this),this.toUnicode={},this.hhea=new uq(this),this.maxp=new pq(this),this.hmtx=new gq(this),this.post=new dq(this),this.os2=new hq(this),this.loca=new xq(this),this.glyf=new vq(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var t,n,i,r,o;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var c,u,h,d;for(d=[],c=0,u=(h=this.bbox).length;c<u;c++)t=h[c],d.push(Math.round(t*this.scaleFactor));return d}).call(this),this.stemV=0,this.post.exists?(i=255&(r=this.post.italic_angle),32768&(n=r>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(o=this.familyClass)===1||o===2||o===3||o===4||o===5||o===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(t){var n;return((n=this.cmap.unicode)!=null?n.codeMap[t]:void 0)||0},e.prototype.widthOfGlyph=function(t){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*n},e.prototype.widthOfString=function(t,n,i){var r,o,c,u;for(c=0,o=0,u=(t=""+t).length;0<=u?o<u:o>u;o=0<=u?++o:--o)r=t.charCodeAt(o),c+=this.widthOfGlyph(this.characterToGlyph(r))+i*(1e3/n)||0;return c*(n/1e3)},e.prototype.lineHeight=function(t,n){var i;return n==null&&(n=!1),i=n?this.lineGap:0,(this.ascender+i-this.decender)/1e3*t},e})();var po,kc=(function(){function e(t){this.data=t??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(t){return this.data[this.pos++]=t},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},e.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},e.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},e.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},e.prototype.readString=function(t){var n,i;for(i=[],n=0;0<=t?n<t:n>t;n=0<=t?++n:--n)i[n]=String.fromCharCode(this.readByte());return i.join("")},e.prototype.writeString=function(t){var n,i,r;for(r=[],n=0,i=t.length;0<=i?n<i:n>i;n=0<=i?++n:--n)r.push(this.writeByte(t.charCodeAt(n)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(t){return this.writeInt16(t)},e.prototype.readLongLong=function(){var t,n,i,r,o,c,u,h;return t=this.readByte(),n=this.readByte(),i=this.readByte(),r=this.readByte(),o=this.readByte(),c=this.readByte(),u=this.readByte(),h=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^n)+1099511627776*(255^i)+4294967296*(255^r)+16777216*(255^o)+65536*(255^c)+256*(255^u)+(255^h)+1):72057594037927940*t+281474976710656*n+1099511627776*i+4294967296*r+16777216*o+65536*c+256*u+h},e.prototype.writeLongLong=function(t){var n,i;return n=Math.floor(t/4294967296),i=4294967295&t,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(t){return this.writeInt32(t)},e.prototype.read=function(t){var n,i;for(n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push(this.readByte());return n},e.prototype.write=function(t){var n,i,r,o;for(o=[],i=0,r=t.length;i<r;i++)n=t[i],o.push(this.writeByte(n));return o},e})(),oq=(function(){var e;function t(n){var i,r,o;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},r=0,o=this.tableCount;0<=o?r<o:r>o;r=0<=o?++r:--r)i={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[i.tag]=i}return t.prototype.encode=function(n){var i,r,o,c,u,h,d,p,v,S,b,_,A;for(A in b=Object.keys(n).length,h=Math.log(2),v=16*Math.floor(Math.log(b)/h),c=Math.floor(v/h),p=16*b-v,(r=new kc).writeInt(this.scalarType),r.writeShort(b),r.writeShort(v),r.writeShort(c),r.writeShort(p),o=16*b,d=r.pos+o,u=null,_=[],n)for(S=n[A],r.writeString(A),r.writeInt(e(S)),r.writeInt(d),r.writeInt(S.length),_=_.concat(S),A==="head"&&(u=d),d+=S.length;d%4;)_.push(0),d++;return r.write(_),i=2981146554-e(r.data),r.pos=u+8,r.writeUInt32(i),r.data},e=function(n){var i,r,o,c;for(n=oj.call(n);n.length%4;)n.push(0);for(o=new kc(n),r=0,i=0,c=n.length;i<c;i=i+=4)r+=o.readUInt32();return 4294967295&r},t})(),lq={}.hasOwnProperty,Jo=function(e,t){for(var n in t)lq.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};po=(function(){function e(t){var n;this.file=t,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e})();var cq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var n;return(n=new kc).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},e})(),L4=(function(){function e(t,n){var i,r,o,c,u,h,d,p,v,S,b,_,A,j,E,L,D;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=n+t.readInt(),v=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(h=0;h<256;++h)this.codeMap[h]=t.readByte();break;case 4:for(b=t.readUInt16(),S=b/2,t.pos+=6,o=(function(){var z,$;for($=[],h=z=0;0<=S?z<S:z>S;h=0<=S?++z:--z)$.push(t.readUInt16());return $})(),t.pos+=2,A=(function(){var z,$;for($=[],h=z=0;0<=S?z<S:z>S;h=0<=S?++z:--z)$.push(t.readUInt16());return $})(),d=(function(){var z,$;for($=[],h=z=0;0<=S?z<S:z>S;h=0<=S?++z:--z)$.push(t.readUInt16());return $})(),p=(function(){var z,$;for($=[],h=z=0;0<=S?z<S:z>S;h=0<=S?++z:--z)$.push(t.readUInt16());return $})(),r=(this.length-t.pos+this.offset)/2,u=(function(){var z,$;for($=[],h=z=0;0<=r?z<r:z>r;h=0<=r?++z:--z)$.push(t.readUInt16());return $})(),h=E=0,D=o.length;E<D;h=++E)for(j=o[h],i=L=_=A[h];_<=j?L<=j:L>=j;i=_<=j?++L:--L)p[h]===0?c=i+d[h]:(c=u[p[h]/2+(i-_)-(S-h)]||0)!==0&&(c+=d[h]),this.codeMap[i]=65535&c}t.pos=v}return e.encode=function(t,n){var i,r,o,c,u,h,d,p,v,S,b,_,A,j,E,L,D,z,$,ut,nt,H,Q,ct,F,Y,ot,tt,yt,J,at,K,dt,Tt,X,P,q,W,lt,ht,ft,Ct,_t,Dt,$t,Wt;switch(tt=new kc,c=Object.keys(t).sort(function(Xt,se){return Xt-se}),n){case"macroman":for(A=0,j=(function(){var Xt=[];for(_=0;_<256;++_)Xt.push(0);return Xt})(),L={0:0},o={},yt=0,dt=c.length;yt<dt;yt++)L[_t=t[r=c[yt]]]==null&&(L[_t]=++A),o[r]={old:t[r],new:L[t[r]]},j[r]=L[t[r]];return tt.writeUInt16(1),tt.writeUInt16(0),tt.writeUInt32(12),tt.writeUInt16(0),tt.writeUInt16(262),tt.writeUInt16(0),tt.write(j),{charMap:o,subtable:tt.data,maxGlyphID:A+1};case"unicode":for(Y=[],v=[],D=0,L={},i={},E=d=null,J=0,Tt=c.length;J<Tt;J++)L[$=t[r=c[J]]]==null&&(L[$]=++D),i[r]={old:$,new:L[$]},u=L[$]-r,E!=null&&u===d||(E&&v.push(E),Y.push(r),d=u),E=r;for(E&&v.push(E),v.push(65535),Y.push(65535),ct=2*(Q=Y.length),H=2*Math.pow(Math.log(Q)/Math.LN2,2),S=Math.log(H/2)/Math.LN2,nt=2*Q-H,h=[],ut=[],b=[],_=at=0,X=Y.length;at<X;_=++at){if(F=Y[_],p=v[_],F===65535){h.push(0),ut.push(0);break}if(F-(ot=i[F].new)>=32768)for(h.push(0),ut.push(2*(b.length+Q-_)),r=K=F;F<=p?K<=p:K>=p;r=F<=p?++K:--K)b.push(i[r].new);else h.push(ot-F),ut.push(0)}for(tt.writeUInt16(3),tt.writeUInt16(1),tt.writeUInt32(12),tt.writeUInt16(4),tt.writeUInt16(16+8*Q+2*b.length),tt.writeUInt16(0),tt.writeUInt16(ct),tt.writeUInt16(H),tt.writeUInt16(S),tt.writeUInt16(nt),ft=0,P=v.length;ft<P;ft++)r=v[ft],tt.writeUInt16(r);for(tt.writeUInt16(0),Ct=0,q=Y.length;Ct<q;Ct++)r=Y[Ct],tt.writeUInt16(r);for(Dt=0,W=h.length;Dt<W;Dt++)u=h[Dt],tt.writeUInt16(u);for($t=0,lt=ut.length;$t<lt;$t++)z=ut[$t],tt.writeUInt16(z);for(Wt=0,ht=b.length;Wt<ht;Wt++)A=b[Wt],tt.writeUInt16(A);return{charMap:i,subtable:tt.data,maxGlyphID:D+1}}},e})(),aj=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="cmap",e.prototype.parse=function(t){var n,i,r;for(t.pos=this.offset,this.version=t.readUInt16(),r=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)n=new L4(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(t,n){var i,r;return n==null&&(n="macroman"),i=L4.encode(t,n),(r=new kc).writeUInt16(0),r.writeUInt16(1),i.table=r.data.concat(i.subtable),i},e})(),uq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e})(),hq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=(function(){var n,i;for(i=[],n=0;n<10;++n)i.push(t.readByte());return i})(),this.charRange=(function(){var n,i;for(i=[],n=0;n<4;++n)i.push(t.readInt());return i})(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=(function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(t.readInt());return i})(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e})(),dq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="post",e.prototype.parse=function(t){var n,i,r;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var o;for(i=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=i?o<i:o>i;o=0<=i?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],r=[];t.pos<this.offset+this.length;)n=t.readByte(),r.push(this.names.push(t.readString(n)));return r;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 262144:return this.map=(function(){var c,u,h;for(h=[],o=c=0,u=this.file.maxp.numGlyphs;0<=u?c<u:c>u;o=0<=u?++c:--c)h.push(t.readUInt32());return h}).call(this)}},e})(),fq=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},mq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="name",e.prototype.parse=function(t){var n,i,r,o,c,u,h,d,p,v,S;for(t.pos=this.offset,t.readShort(),n=t.readShort(),u=t.readShort(),i=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+u+t.readShort()});for(h={},o=p=0,v=i.length;p<v;o=++p)r=i[o],t.pos=r.offset,d=t.readString(r.length),c=new fq(d,r),h[S=r.nameID]==null&&(h[S]=[]),h[r.nameID].push(c);this.strings=h,this.copyright=h[0],this.fontFamily=h[1],this.fontSubfamily=h[2],this.uniqueSubfamily=h[3],this.fontName=h[4],this.version=h[5];try{this.postscriptName=h[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=h[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=h[7],this.manufacturer=h[8],this.designer=h[9],this.description=h[10],this.vendorUrl=h[11],this.designerUrl=h[12],this.license=h[13],this.licenseUrl=h[14],this.preferredFamily=h[15],this.preferredSubfamily=h[17],this.compatibleFull=h[18],this.sampleText=h[19]},e})(),pq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e})(),gq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="hmtx",e.prototype.parse=function(t){var n,i,r,o,c,u,h;for(t.pos=this.offset,this.metrics=[],n=0,u=this.file.hhea.numberOfMetrics;0<=u?n<u:n>u;n=0<=u?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var d,p;for(p=[],n=d=0;0<=r?d<r:d>r;n=0<=r?++d:--d)p.push(t.readInt16());return p})(),this.widths=(function(){var d,p,v,S;for(S=[],d=0,p=(v=this.metrics).length;d<p;d++)o=v[d],S.push(o.advance);return S}).call(this),i=this.widths[this.widths.length-1],h=[],n=c=0;0<=r?c<r:c>r;n=0<=r?++c:--c)h.push(this.widths.push(i));return h},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e})(),oj=[].slice,vq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var n,i,r,o,c,u,h,d,p,v;return t in this.cache?this.cache[t]:(o=this.file.loca,n=this.file.contents,i=o.indexOf(t),(r=o.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+i,c=(u=new kc(n.read(r))).readShort(),d=u.readShort(),v=u.readShort(),h=u.readShort(),p=u.readShort(),this.cache[t]=c===-1?new bq(u,d,v,h,p):new yq(u,c,d,v,h,p),this.cache[t]))},e.prototype.encode=function(t,n,i){var r,o,c,u,h;for(c=[],o=[],u=0,h=n.length;u<h;u++)r=t[n[u]],o.push(c.length),r&&(c=c.concat(r.encode(i)));return o.push(c.length),{table:c,offsets:o}},e})(),yq=(function(){function e(t,n,i,r,o,c){this.raw=t,this.numberOfContours=n,this.xMin=i,this.yMin=r,this.xMax=o,this.yMax=c,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e})(),bq=(function(){function e(t,n,i,r,o){var c,u;for(this.raw=t,this.xMin=n,this.yMin=i,this.xMax=r,this.yMax=o,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],c=this.raw;u=c.readShort(),this.glyphOffsets.push(c.pos),this.glyphIDs.push(c.readUInt16()),32&u;)c.pos+=1&u?4:2,128&u?c.pos+=8:64&u?c.pos+=4:8&u&&(c.pos+=2)}return e.prototype.encode=function(){var t,n,i;for(n=new kc(oj.call(this.raw.data)),t=0,i=this.glyphIDs.length;t<i;++t)n.pos=this.glyphOffsets[t];return n.data},e})(),xq=(function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Jo(e,po),e.prototype.tag="loca",e.prototype.parse=function(t){var n,i;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var r,o;for(o=[],i=0,r=this.length;i<r;i+=2)o.push(2*t.readUInt16());return o}).call(this):(function(){var r,o;for(o=[],i=0,r=this.length;i<r;i+=4)o.push(t.readUInt32());return o}).call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,n){for(var i=new Uint32Array(this.offsets.length),r=0,o=0,c=0;c<i.length;++c)if(i[c]=r,o<n.length&&n[o]==c){++o,i[c]=r;var u=this.offsets[c],h=this.offsets[c+1]-u;h>0&&(r+=h)}for(var d=new Array(4*i.length),p=0;p<i.length;++p)d[4*p+3]=255&i[p],d[4*p+2]=(65280&i[p])>>8,d[4*p+1]=(16711680&i[p])>>16,d[4*p]=(4278190080&i[p])>>24;return d},e})(),wq=(function(){function e(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var t,n,i,r,o;for(n in r=this.font.cmap.tables[0].codeMap,t={},o=this.subset)i=o[n],t[n]=r[i];return t},e.prototype.glyphsFor=function(t){var n,i,r,o,c,u,h;for(r={},c=0,u=t.length;c<u;c++)r[o=t[c]]=this.font.glyf.glyphFor(o);for(o in n=[],r)(i=r[o])!=null&&i.compound&&n.push.apply(n,i.glyphIDs);if(n.length>0)for(o in h=this.glyphsFor(n))i=h[o],r[o]=i;return r},e.prototype.encode=function(t,n){var i,r,o,c,u,h,d,p,v,S,b,_,A,j,E;for(r in i=aj.encode(this.generateCmap(),"unicode"),c=this.glyphsFor(t),b={0:0},E=i.charMap)b[(h=E[r]).old]=h.new;for(_ in S=i.maxGlyphID,c)_ in b||(b[_]=S++);return p=(function(L){var D,z;for(D in z={},L)z[L[D]]=D;return z})(b),v=Object.keys(p).sort(function(L,D){return L-D}),A=(function(){var L,D,z;for(z=[],L=0,D=v.length;L<D;L++)u=v[L],z.push(p[u]);return z})(),o=this.font.glyf.encode(c,A,b),d=this.font.loca.encode(o.offsets,A),j={cmap:this.font.cmap.raw(),glyf:o.table,loca:d,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(j["OS/2"]=this.font.os2.raw()),this.font.directory.encode(j)},e})();Ae.API.PDFObject=(function(){var e;function t(){}return e=function(n,i){return(Array(i+1).join("0")+n).slice(-i)},t.convert=function(n){var i,r,o,c;if(Array.isArray(n))return"["+(function(){var u,h,d;for(d=[],u=0,h=n.length;u<h;u++)i=n[u],d.push(t.convert(i));return d})().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n?.isString)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(r in o=["<<"],n)c=n[r],o.push("/"+r+" "+t.convert(c));return o.push(">>"),o.join(`
`)}return""+n},t})();function Jn(e){var t=e.width,n=e.height;if(t<0)throw new Error("Negative width is not allowed for Size");if(n<0)throw new Error("Negative height is not allowed for Size");return{width:t,height:n}}function mu(e,t){return e.width===t.width&&e.height===t.height}var Sq=(function(){function e(t){var n=this;this._resolutionListener=function(){return n._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=t,this._installResolutionListener()}return e.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(e.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),e.prototype.subscribe=function(t){var n=this,i={next:t};return this._observers.push(i),{unsubscribe:function(){n._observers=n._observers.filter(function(r){return r!==i})}}},e.prototype._installResolutionListener=function(){if(this._resolutionMediaQueryList!==null)throw new Error("Resolution listener is already installed");var t=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia("all and (resolution: ".concat(t,"dppx)")),this._resolutionMediaQueryList.addListener(this._resolutionListener)},e.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},e.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},e.prototype._onResolutionChanged=function(){var t=this;this._observers.forEach(function(n){return n.next(t._window.devicePixelRatio)}),this._reinstallResolutionListener()},e})();function Nq(e){return new Sq(e)}var Aq=(function(){function e(t,n,i){var r;this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=t,this._canvasElementClientSize=Jn({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=n??(function(o){return o}),this._allowResizeObserver=(r=i?.allowResizeObserver)!==null&&r!==void 0?r:!0,this._chooseAndInitObserver()}return e.prototype.dispose=function(){var t,n;if(this._canvasElement===null)throw new Error("Object is disposed");(t=this._canvasElementResizeObserver)===null||t===void 0||t.disconnect(),this._canvasElementResizeObserver=null,(n=this._devicePixelRatioObservable)===null||n===void 0||n.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(e.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw new Error("Object is disposed");return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bitmapSize",{get:function(){return Jn({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),e.prototype.resizeCanvasElement=function(t){this._canvasElementClientSize=Jn(t),this.canvasElement.style.width="".concat(this._canvasElementClientSize.width,"px"),this.canvasElement.style.height="".concat(this._canvasElementClientSize.height,"px"),this._invalidateBitmapSize()},e.prototype.subscribeBitmapSizeChanged=function(t){this._bitmapSizeChangedListeners.push(t)},e.prototype.unsubscribeBitmapSizeChanged=function(t){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(n){return n!==t})},Object.defineProperty(e.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),e.prototype.subscribeSuggestedBitmapSizeChanged=function(t){this._suggestedBitmapSizeChangedListeners.push(t)},e.prototype.unsubscribeSuggestedBitmapSizeChanged=function(t){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(n){return n!==t})},e.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var t=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(t),this._emitSuggestedBitmapSizeChanged(t,this._suggestedBitmapSize)}},e.prototype._resizeBitmap=function(t){var n=this.bitmapSize;mu(n,t)||(this.canvasElement.width=t.width,this.canvasElement.height=t.height,this._emitBitmapSizeChanged(n,t))},e.prototype._emitBitmapSizeChanged=function(t,n){var i=this;this._bitmapSizeChangedListeners.forEach(function(r){return r.call(i,t,n)})},e.prototype._suggestNewBitmapSize=function(t){var n=this._suggestedBitmapSize,i=Jn(this._transformBitmapSize(t,this._canvasElementClientSize)),r=mu(this.bitmapSize,i)?null:i;n===null&&r===null||n!==null&&r!==null&&mu(n,r)||(this._suggestedBitmapSize=r,this._emitSuggestedBitmapSizeChanged(n,r))},e.prototype._emitSuggestedBitmapSizeChanged=function(t,n){var i=this;this._suggestedBitmapSizeChangedListeners.forEach(function(r){return r.call(i,t,n)})},e.prototype._chooseAndInitObserver=function(){var t=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}_q().then(function(n){return n?t._initResizeObserver():t._initDevicePixelRatioObservable()})},e.prototype._initDevicePixelRatioObservable=function(){var t=this;if(this._canvasElement!==null){var n=P4(this._canvasElement);if(n===null)throw new Error("No window is associated with the canvas");this._devicePixelRatioObservable=Nq(n),this._devicePixelRatioObservable.subscribe(function(){return t._invalidateBitmapSize()}),this._invalidateBitmapSize()}},e.prototype._invalidateBitmapSize=function(){var t,n;if(this._canvasElement!==null){var i=P4(this._canvasElement);if(i!==null){var r=(n=(t=this._devicePixelRatioObservable)===null||t===void 0?void 0:t.value)!==null&&n!==void 0?n:i.devicePixelRatio,o=this._canvasElement.getClientRects(),c=o[0]!==void 0?jq(o[0],r):Jn({width:this._canvasElementClientSize.width*r,height:this._canvasElementClientSize.height*r});this._suggestNewBitmapSize(c)}}},e.prototype._initResizeObserver=function(){var t=this;this._canvasElement!==null&&(this._canvasElementResizeObserver=new ResizeObserver(function(n){var i=n.find(function(c){return c.target===t._canvasElement});if(!(!i||!i.devicePixelContentBoxSize||!i.devicePixelContentBoxSize[0])){var r=i.devicePixelContentBoxSize[0],o=Jn({width:r.inlineSize,height:r.blockSize});t._suggestNewBitmapSize(o)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:"device-pixel-content-box"}))},e})();function Cq(e,t){return new Aq(e,t.transform,t.options)}function P4(e){return e.ownerDocument.defaultView}function _q(){return new Promise(function(e){var t=new ResizeObserver(function(n){e(n.every(function(i){return"devicePixelContentBoxSize"in i})),t.disconnect()});t.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})}function jq(e,t){return Jn({width:Math.round(e.left*t+e.width*t)-Math.round(e.left*t),height:Math.round(e.top*t+e.height*t)-Math.round(e.top*t)})}var Eq=(function(){function e(t,n,i){if(n.width===0||n.height===0)throw new TypeError("Rendering target could only be created on a media with positive width and height");if(this._mediaSize=n,i.width===0||i.height===0)throw new TypeError("Rendering target could only be created using a bitmap with positive integer width and height");this._bitmapSize=i,this._context=t}return e.prototype.useMediaCoordinateSpace=function(t){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),this._context.scale(this._horizontalPixelRatio,this._verticalPixelRatio),t({context:this._context,mediaSize:this._mediaSize})}finally{this._context.restore()}},e.prototype.useBitmapCoordinateSpace=function(t){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),t({context:this._context,mediaSize:this._mediaSize,bitmapSize:this._bitmapSize,horizontalPixelRatio:this._horizontalPixelRatio,verticalPixelRatio:this._verticalPixelRatio})}finally{this._context.restore()}},Object.defineProperty(e.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),e})();function yu(e,t){var n=e.canvasElementClientSize;if(n.width===0||n.height===0)return null;var i=e.bitmapSize;if(i.width===0||i.height===0)return null;var r=e.canvasElement.getContext("2d",t);return r===null?null:new Eq(r,n,i)}/*!
 * @license
 * TradingView Lightweight Charts™ v5.1.0
 * Copyright (c) 2025 TradingView, Inc.
 * Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
 */const lj={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}};var R4,D4;function Uh(e,t){const n={0:[],1:[e.lineWidth,e.lineWidth],2:[2*e.lineWidth,2*e.lineWidth],3:[6*e.lineWidth,6*e.lineWidth],4:[e.lineWidth,4*e.lineWidth]}[t];e.setLineDash(n)}function cj(e,t,n,i){e.beginPath();const r=e.lineWidth%2?.5:0;e.moveTo(n,t+r),e.lineTo(i,t+r),e.stroke()}function Is(e,t){if(!e)throw new Error("Assertion failed"+(t?": "+t:""))}function Vr(e){if(e===void 0)throw new Error("Value is undefined");return e}function Yt(e){if(e===null)throw new Error("Value is null");return e}function _c(e){return Yt(Vr(e))}(function(e){e[e.Simple=0]="Simple",e[e.WithSteps=1]="WithSteps",e[e.Curved=2]="Curved"})(R4||(R4={})),(function(e){e[e.Solid=0]="Solid",e[e.Dotted=1]="Dotted",e[e.Dashed=2]="Dashed",e[e.LargeDashed=3]="LargeDashed",e[e.SparseDotted=4]="SparseDotted"})(D4||(D4={}));class Zi{constructor(){this.t=[]}i(t,n,i){const r={h:t,l:n,o:i===!0};this.t.push(r)}_(t){const n=this.t.findIndex((i=>t===i.h));n>-1&&this.t.splice(n,1)}u(t){this.t=this.t.filter((n=>n.l!==t))}p(t,n,i){const r=[...this.t];this.t=this.t.filter((o=>!o.o)),r.forEach((o=>o.h(t,n,i)))}v(){return this.t.length>0}m(){this.t=[]}}function fa(e,...t){for(const n of t)for(const i in n)n[i]!==void 0&&Object.prototype.hasOwnProperty.call(n,i)&&!["__proto__","constructor","prototype"].includes(i)&&(typeof n[i]!="object"||e[i]===void 0||Array.isArray(n[i])?e[i]=n[i]:fa(e[i],n[i]));return e}function qh(e){return typeof e=="number"&&isFinite(e)}function Nf(e){return typeof e=="number"&&e%1==0}function Of(e){return typeof e=="string"}function Jm(e){return typeof e=="boolean"}function Pl(e){const t=e;if(!t||typeof t!="object")return t;let n,i,r;for(i in n=Array.isArray(t)?[]:{},t)t.hasOwnProperty(i)&&(r=t[i],n[i]=r&&typeof r=="object"?Pl(r):r);return n}function O4(e){return e!==null}function h2(e){return e===null?void 0:e}const uj="-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif";function $p(e,t,n){return t===void 0&&(t=uj),`${n=n!==void 0?`${n} `:""}${e}px ${t}`}class Mq{constructor(t){this.M={S:1,C:5,k:NaN,P:"",T:"",R:"",D:"",I:0,V:0,B:0,A:0,L:0},this.O=t}N(){const t=this.M,n=this.F(),i=this.W();return t.k===n&&t.T===i||(t.k=n,t.T=i,t.P=$p(n,i),t.A=2.5/12*n,t.I=t.A,t.V=n/12*t.C,t.B=n/12*t.C,t.L=0),t.R=this.H(),t.D=this.U(),this.M}H(){return this.O.N().layout.textColor}U(){return this.O.$()}F(){return this.O.N().layout.fontSize}W(){return this.O.N().layout.fontFamily}}function Y1(e){return e<0?0:e>255?255:Math.round(e)||0}function z4(e){return .199*e[0]+.687*e[1]+.114*e[2]}class Tq{constructor(t,n){this.q=new Map,this.j=t,n&&(this.q=n)}Y(t,n){if(t==="transparent")return t;const i=this.K(t),r=i[3];return`rgba(${i[0]}, ${i[1]}, ${i[2]}, ${n*r})`}Z(t){const n=this.K(t);return{G:`rgb(${n[0]}, ${n[1]}, ${n[2]})`,X:z4(n)>160?"black":"white"}}J(t){return z4(this.K(t))}tt(t,n,i){const[r,o,c,u]=this.K(t),[h,d,p,v]=this.K(n),S=[Y1(r+i*(h-r)),Y1(o+i*(d-o)),Y1(c+i*(p-c)),(b=u+i*(v-u),b<=0||b>1?Math.min(Math.max(b,0),1):Math.round(1e4*b)/1e4)];var b;return`rgba(${S[0]}, ${S[1]}, ${S[2]}, ${S[3]})`}K(t){const n=this.q.get(t);if(n)return n;const i=(function(c){const u=document.createElement("div");u.style.display="none",document.body.appendChild(u),u.style.color=c;const h=window.getComputedStyle(u).color;return document.body.removeChild(u),h})(t),r=i.match(/^rgba?\s*\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)$/);if(!r){if(this.j.length)for(const c of this.j){const u=c(t);if(u)return this.q.set(t,u),u}throw new Error(`Failed to parse color: ${t}`)}const o=[parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),r[4]?parseFloat(r[4]):1];return this.q.set(t,o),o}}class kq{constructor(){this.it=[]}st(t){this.it=t}nt(t,n,i){this.it.forEach((r=>{r.nt(t,n,i)}))}}class td{nt(t,n,i){t.useBitmapCoordinateSpace((r=>this.et(r,n,i)))}}class Lq extends td{constructor(){super(...arguments),this.rt=null}ht(t){this.rt=t}et({context:t,horizontalPixelRatio:n,verticalPixelRatio:i}){if(this.rt===null||this.rt.lt===null)return;const r=this.rt.lt,o=this.rt,c=Math.max(1,Math.floor(n))%2/2,u=h=>{t.beginPath();for(let d=r.to-1;d>=r.from;--d){const p=o.ot[d],v=Math.round(p._t*n)+c,S=p.ut*i,b=h*i+c;t.moveTo(v,S),t.arc(v,S,b,0,2*Math.PI)}t.fill()};o.ct>0&&(t.fillStyle=o.dt,u(o.ft+o.ct)),t.fillStyle=o.vt,u(o.ft)}}function Pq(){return{ot:[{_t:0,ut:0,wt:0,gt:0}],vt:"",dt:"",ft:0,ct:0,lt:null}}const Rq={from:0,to:1};class Dq{constructor(t,n,i){this.Mt=new kq,this.bt=[],this.St=[],this.xt=!0,this.O=t,this.Ct=n,this.yt=i,this.Mt.st(this.bt)}kt(t){this.Pt(),this.xt=!0}Tt(){return this.xt&&(this.Rt(),this.xt=!1),this.Mt}Pt(){const t=this.yt.Dt();t.length!==this.bt.length&&(this.St=t.map(Pq),this.bt=this.St.map((n=>{const i=new Lq;return i.ht(n),i})),this.Mt.st(this.bt))}Rt(){const t=this.Ct.N().mode===2||!this.Ct.It(),n=this.yt.Vt(),i=this.Ct.Bt(),r=this.O.Et();this.Pt(),n.forEach(((o,c)=>{const u=this.St[c],h=o.At(i),d=o.Lt();!t&&h!==null&&o.It()&&d!==null?(u.vt=h.zt,u.ft=h.ft,u.ct=h.Ot,u.ot[0].gt=h.gt,u.ot[0].ut=o.Ft().Nt(h.gt,d.Wt),u.dt=h.Ht??this.O.Ut(u.ot[0].ut/o.Ft().$t()),u.ot[0].wt=i,u.ot[0]._t=r.qt(i),u.lt=Rq):u.lt=null}))}}class Oq extends td{constructor(t){super(),this.jt=t}et({context:t,bitmapSize:n,horizontalPixelRatio:i,verticalPixelRatio:r}){if(this.jt===null)return;const o=this.jt.Yt.It,c=this.jt.Kt.It;if(!o&&!c)return;const u=Math.round(this.jt._t*i),h=Math.round(this.jt.ut*r);t.lineCap="butt",o&&u>=0&&(t.lineWidth=Math.floor(this.jt.Yt.ct*i),t.strokeStyle=this.jt.Yt.R,t.fillStyle=this.jt.Yt.R,Uh(t,this.jt.Yt.Zt),(function(d,p,v,S){d.beginPath();const b=d.lineWidth%2?.5:0;d.moveTo(p+b,v),d.lineTo(p+b,S),d.stroke()})(t,u,0,n.height)),c&&h>=0&&(t.lineWidth=Math.floor(this.jt.Kt.ct*r),t.strokeStyle=this.jt.Kt.R,t.fillStyle=this.jt.Kt.R,Uh(t,this.jt.Kt.Zt),cj(t,h,0,n.width))}}class zq{constructor(t,n){this.xt=!0,this.Gt={Yt:{ct:1,Zt:0,R:"",It:!1},Kt:{ct:1,Zt:0,R:"",It:!1},_t:0,ut:0},this.Xt=new Oq(this.Gt),this.Jt=t,this.yt=n}kt(){this.xt=!0}Tt(t){return this.xt&&(this.Rt(),this.xt=!1),this.Xt}Rt(){const t=this.Jt.It(),n=this.yt.Qt().N().crosshair,i=this.Gt;if(n.mode===2)return i.Kt.It=!1,void(i.Yt.It=!1);i.Kt.It=t&&this.Jt.ti(this.yt),i.Yt.It=t&&this.Jt.ii(),i.Kt.ct=n.horzLine.width,i.Kt.Zt=n.horzLine.style,i.Kt.R=n.horzLine.color,i.Yt.ct=n.vertLine.width,i.Yt.Zt=n.vertLine.style,i.Yt.R=n.vertLine.color,i._t=this.Jt.si(),i.ut=this.Jt.ni()}}function Bq(e,t,n,i,r,o){e.fillRect(t+o,n,i-2*o,o),e.fillRect(t+o,n+r-o,i-2*o,o),e.fillRect(t,n,o,r),e.fillRect(t+i-o,n,o,r)}function b0(e,t,n,i,r,o){e.save(),e.globalCompositeOperation="copy",e.fillStyle=o,e.fillRect(t,n,i,r),e.restore()}function B4(e,t,n,i,r,o){e.beginPath(),e.roundRect?e.roundRect(t,n,i,r,o):(e.lineTo(t+i-o[1],n),o[1]!==0&&e.arcTo(t+i,n,t+i,n+o[1],o[1]),e.lineTo(t+i,n+r-o[2]),o[2]!==0&&e.arcTo(t+i,n+r,t+i-o[2],n+r,o[2]),e.lineTo(t+o[3],n+r),o[3]!==0&&e.arcTo(t,n+r,t,n+r-o[3],o[3]),e.lineTo(t,n+o[0]),o[0]!==0&&e.arcTo(t,n,t+o[0],n,o[0]))}function F4(e,t,n,i,r,o,c=0,u=[0,0,0,0],h=""){if(e.save(),!c||!h||h===o)return B4(e,t,n,i,r,u),e.fillStyle=o,e.fill(),void e.restore();const d=c/2;var p;B4(e,t+d,n+d,i-c,r-c,(p=-d,u.map((v=>v===0?v:v+p)))),o!=="transparent"&&(e.fillStyle=o,e.fill()),h!=="transparent"&&(e.lineWidth=c,e.strokeStyle=h,e.closePath(),e.stroke()),e.restore()}function hj(e,t,n,i,r,o,c){e.save(),e.globalCompositeOperation="copy";const u=e.createLinearGradient(0,0,0,r);u.addColorStop(0,o),u.addColorStop(1,c),e.fillStyle=u,e.fillRect(t,n,i,r),e.restore()}class I4{constructor(t,n){this.ht(t,n)}ht(t,n){this.jt=t,this.ei=n}$t(t,n){return this.jt.It?t.k+t.A+t.I:0}nt(t,n,i,r){if(!this.jt.It||this.jt.ri.length===0)return;const o=this.jt.R,c=this.ei.G,u=t.useBitmapCoordinateSpace((h=>{const d=h.context;d.font=n.P;const p=this.hi(h,n,i,r),v=p.ai;return p.li?F4(d,v.oi,v._i,v.ui,v.ci,c,v.di,[v.ft,0,0,v.ft],c):F4(d,v.fi,v._i,v.ui,v.ci,c,v.di,[0,v.ft,v.ft,0],c),this.jt.pi&&(d.fillStyle=o,d.fillRect(v.fi,v.mi,v.wi-v.fi,v.gi)),this.jt.Mi&&(d.fillStyle=n.D,d.fillRect(p.li?v.bi-v.di:0,v._i,v.di,v.Si-v._i)),p}));t.useMediaCoordinateSpace((({context:h})=>{const d=u.xi;h.font=n.P,h.textAlign=u.li?"right":"left",h.textBaseline="middle",h.fillStyle=o,h.fillText(this.jt.ri,d.Ci,(d._i+d.Si)/2+d.yi)}))}hi(t,n,i,r){const{context:o,bitmapSize:c,mediaSize:u,horizontalPixelRatio:h,verticalPixelRatio:d}=t,p=this.jt.pi||!this.jt.ki?n.C:0,v=this.jt.Pi?n.S:0,S=n.A+this.ei.Ti,b=n.I+this.ei.Ri,_=n.V,A=n.B,j=this.jt.ri,E=n.k,L=i.Di(o,j),D=Math.ceil(i.Ii(o,j)),z=E+S+b,$=n.S+_+A+D+p,ut=Math.max(1,Math.floor(d));let nt=Math.round(z*d);nt%2!=ut%2&&(nt+=1);const H=v>0?Math.max(1,Math.floor(v*h)):0,Q=Math.round($*h),ct=Math.round(p*h),F=this.ei.Vi??this.ei.Bi??this.ei.Ei,Y=Math.round(F*d)-Math.floor(.5*d),ot=Math.floor(Y+ut/2-nt/2),tt=ot+nt,yt=r==="right",J=yt?u.width-v:v,at=yt?c.width-H:H;let K,dt,Tt;return yt?(K=at-Q,dt=at-ct,Tt=J-p-_-v):(K=at+Q,dt=at+ct,Tt=J+p+_),{li:yt,ai:{_i:ot,mi:Y,Si:tt,ui:Q,ci:nt,ft:2*h,di:H,oi:K,fi:at,wi:dt,gi:ut,bi:c.width},xi:{_i:ot/d,Si:tt/d,Ci:Tt,yi:L}}}}class x0{constructor(t){this.Ai={Ei:0,G:"#000",Ri:0,Ti:0},this.Li={ri:"",It:!1,pi:!0,ki:!1,Ht:"",R:"#FFF",Mi:!1,Pi:!1},this.zi={ri:"",It:!1,pi:!1,ki:!0,Ht:"",R:"#FFF",Mi:!0,Pi:!0},this.xt=!0,this.Oi=new(t||I4)(this.Li,this.Ai),this.Ni=new(t||I4)(this.zi,this.Ai)}ri(){return this.Fi(),this.Li.ri}Ei(){return this.Fi(),this.Ai.Ei}kt(){this.xt=!0}$t(t,n=!1){return Math.max(this.Oi.$t(t,n),this.Ni.$t(t,n))}Wi(){return this.Ai.Vi??null}Hi(){return this.Ai.Vi??this.Ai.Bi??this.Ei()}Ui(t){this.Ai.Bi=t??void 0}$i(){return this.Fi(),this.Li.It||this.zi.It}qi(){return this.Fi(),this.Li.It}Tt(t){return this.Fi(),this.Li.pi=this.Li.pi&&t.N().ticksVisible,this.zi.pi=this.zi.pi&&t.N().ticksVisible,this.Oi.ht(this.Li,this.Ai),this.Ni.ht(this.zi,this.Ai),this.Oi}ji(){return this.Fi(),this.Oi.ht(this.Li,this.Ai),this.Ni.ht(this.zi,this.Ai),this.Ni}Fi(){this.xt&&(this.Li.pi=!0,this.zi.pi=!1,this.Yi(this.Li,this.zi,this.Ai))}}class Fq extends x0{constructor(t,n,i){super(),this.Jt=t,this.Ki=n,this.Zi=i}Yi(t,n,i){if(t.It=!1,this.Jt.N().mode===2)return;const r=this.Jt.N().horzLine;if(!r.labelVisible)return;const o=this.Ki.Lt();if(!this.Jt.It()||this.Ki.Gi()||o===null)return;const c=this.Ki.Xi().Z(r.labelBackgroundColor);i.G=c.G,t.R=c.X;const u=2/12*this.Ki.k();i.Ti=u,i.Ri=u;const h=this.Zi(this.Ki);i.Ei=h.Ei,t.ri=this.Ki.Ji(h.gt,o),t.It=!0}}const Iq=/[1-9]/g;class dj{constructor(){this.jt=null}ht(t){this.jt=t}nt(t,n){if(this.jt===null||this.jt.It===!1||this.jt.ri.length===0)return;const i=t.useMediaCoordinateSpace((({context:S})=>(S.font=n.P,Math.round(n.Qi.Ii(S,Yt(this.jt).ri,Iq)))));if(i<=0)return;const r=n.ts,o=i+2*r,c=o/2,u=this.jt.ss;let h=this.jt.Ei,d=Math.floor(h-c)+.5;d<0?(h+=Math.abs(0-d),d=Math.floor(h-c)+.5):d+o>u&&(h-=Math.abs(u-(d+o)),d=Math.floor(h-c)+.5);const p=d+o,v=Math.ceil(0+n.S+n.C+n.A+n.k+n.I);t.useBitmapCoordinateSpace((({context:S,horizontalPixelRatio:b,verticalPixelRatio:_})=>{const A=Yt(this.jt);S.fillStyle=A.G;const j=Math.round(d*b),E=Math.round(0*_),L=Math.round(p*b),D=Math.round(v*_),z=Math.round(2*b);if(S.beginPath(),S.moveTo(j,E),S.lineTo(j,D-z),S.arcTo(j,D,j+z,D,z),S.lineTo(L-z,D),S.arcTo(L,D,L,D-z,z),S.lineTo(L,E),S.fill(),A.pi){const $=Math.round(A.Ei*b),ut=E,nt=Math.round((ut+n.C)*_);S.fillStyle=A.R;const H=Math.max(1,Math.floor(b)),Q=Math.floor(.5*b);S.fillRect($-Q,ut,H,nt-ut)}})),t.useMediaCoordinateSpace((({context:S})=>{const b=Yt(this.jt),_=0+n.S+n.C+n.A+n.k/2;S.font=n.P,S.textAlign="left",S.textBaseline="middle",S.fillStyle=b.R;const A=n.Qi.Di(S,"Apr0");S.translate(d+r,_+A),S.fillText(b.ri,0,0)}))}}class Uq{constructor(t,n,i){this.xt=!0,this.Xt=new dj,this.Gt={It:!1,G:"#4c525e",R:"white",ri:"",ss:0,Ei:NaN,pi:!0},this.Ct=t,this.ns=n,this.Zi=i}kt(){this.xt=!0}Tt(){return this.xt&&(this.Rt(),this.xt=!1),this.Xt.ht(this.Gt),this.Xt}Rt(){const t=this.Gt;if(t.It=!1,this.Ct.N().mode===2)return;const n=this.Ct.N().vertLine;if(!n.labelVisible)return;const i=this.ns.Et();if(i.Gi())return;t.ss=i.ss();const r=this.Zi();if(r===null)return;t.Ei=r.Ei;const o=i.es(this.Ct.Bt());t.ri=i.rs(Yt(o)),t.It=!0;const c=this.ns.Xi().Z(n.labelBackgroundColor);t.G=c.G,t.R=c.X,t.pi=i.N().ticksVisible}}class fj{constructor(){this.hs=null,this.ls=0}_s(){return this.ls}us(t){this.ls=t}Ft(){return this.hs}cs(t){this.hs=t}ds(t){return[]}fs(){return[]}It(){return!0}}var U4;(function(e){e[e.Normal=0]="Normal",e[e.Magnet=1]="Magnet",e[e.Hidden=2]="Hidden",e[e.MagnetOHLC=3]="MagnetOHLC"})(U4||(U4={}));class qq extends fj{constructor(t,n){super(),this.yt=null,this.ps=NaN,this.vs=0,this.ws=!1,this.gs=new Map,this.Ms=!1,this.bs=new WeakMap,this.Ss=new WeakMap,this.xs=NaN,this.Cs=NaN,this.ys=NaN,this.ks=NaN,this.ns=t,this.Ps=n,this.Ts=((r,o)=>c=>{const u=o(),h=r();if(c===Yt(this.yt).Rs())return{gt:h,Ei:u};{const d=Yt(c.Lt());return{gt:c.Ds(u,d),Ei:u}}})((()=>this.ps),(()=>this.Cs));const i=((r,o)=>()=>{const c=this.ns.Et().Is(r()),u=o();return c&&Number.isFinite(u)?{wt:c,Ei:u}:null})((()=>this.vs),(()=>this.si()));this.Vs=new Uq(this,t,i)}N(){return this.Ps}Bs(t,n){this.ys=t,this.ks=n}Es(){this.ys=NaN,this.ks=NaN}As(){return this.ys}Ls(){return this.ks}zs(t,n,i){this.Ms||(this.Ms=!0),this.ws=!0,this.Os(t,n,i)}Bt(){return this.vs}si(){return this.xs}ni(){return this.Cs}It(){return this.ws}Ns(){this.ws=!1,this.Fs(),this.ps=NaN,this.xs=NaN,this.Cs=NaN,this.yt=null,this.Es(),this.Ws()}Hs(t){if(!this.Ps.doNotSnapToHiddenSeriesIndices)return t;const n=this.ns,i=n.Et();let r=null,o=null;for(const d of n.Us()){const p=d.qs().$s(t,-1);if(p){if(p.js===t)return t;(r===null||p.js>r)&&(r=p.js)}const v=d.qs().$s(t,1);if(v){if(v.js===t)return t;(o===null||v.js<o)&&(o=v.js)}}const c=[r,o].filter(O4);if(c.length===0)return t;const u=i.qt(t),h=c.map((d=>Math.abs(u-i.qt(d))));return c[h.indexOf(Math.min(...h))]}Ys(t){let n=this.bs.get(t);n||(n=new zq(this,t),this.bs.set(t,n));let i=this.Ss.get(t);return i||(i=new Dq(this.ns,this,t),this.Ss.set(t,i)),[n,i]}ti(t){return t===this.yt&&this.Ps.horzLine.visible}ii(){return this.Ps.vertLine.visible}Ks(t,n){this.ws&&this.yt===t||this.gs.clear();const i=[];return this.yt===t&&i.push(this.Zs(this.gs,n,this.Ts)),i}fs(){return this.ws?[this.Vs]:[]}Gs(){return this.yt}Ws(){this.ns.Xs().forEach((t=>{this.bs.get(t)?.kt(),this.Ss.get(t)?.kt()})),this.gs.forEach((t=>t.kt())),this.Vs.kt()}Js(t){return t&&!t.Rs().Gi()?t.Rs():null}Os(t,n,i){this.Qs(t,n,i)&&this.Ws()}Qs(t,n,i){const r=this.xs,o=this.Cs,c=this.ps,u=this.vs,h=this.yt,d=this.Js(i);this.vs=t,this.xs=isNaN(t)?NaN:this.ns.Et().qt(t),this.yt=i;const p=d!==null?d.Lt():null;return d!==null&&p!==null?(this.ps=n,this.Cs=d.Nt(n,p)):(this.ps=NaN,this.Cs=NaN),r!==this.xs||o!==this.Cs||u!==this.vs||c!==this.ps||h!==this.yt}Fs(){const t=this.ns.tn().map((i=>i.qs().sn())).filter(O4),n=t.length===0?null:Math.max(...t);this.vs=n!==null?n:NaN}Zs(t,n,i){let r=t.get(n);return r===void 0&&(r=new Fq(this,n,i),t.set(n,r)),r}}function w0(e){return e==="left"||e==="right"}class Bs{constructor(t){this.nn=new Map,this.en=[],this.rn=t}hn(t,n){const i=(function(r,o){return r===void 0?o:{an:Math.max(r.an,o.an),ln:r.ln||o.ln}})(this.nn.get(t),n);this.nn.set(t,i)}_n(){return this.rn}un(t){const n=this.nn.get(t);return n===void 0?{an:this.rn}:{an:Math.max(this.rn,n.an),ln:n.ln}}cn(){this.dn(),this.en=[{fn:0}]}pn(t){this.dn(),this.en=[{fn:1,Wt:t}]}vn(t){this.mn(),this.en.push({fn:5,Wt:t})}dn(){this.mn(),this.en.push({fn:6})}wn(){this.dn(),this.en=[{fn:4}]}gn(t){this.dn(),this.en.push({fn:2,Wt:t})}Mn(t){this.dn(),this.en.push({fn:3,Wt:t})}bn(){return this.en}Sn(t){for(const n of t.en)this.xn(n);this.rn=Math.max(this.rn,t.rn),t.nn.forEach(((n,i)=>{this.hn(i,n)}))}static Cn(){return new Bs(2)}static yn(){return new Bs(3)}xn(t){switch(t.fn){case 0:this.cn();break;case 1:this.pn(t.Wt);break;case 2:this.gn(t.Wt);break;case 3:this.Mn(t.Wt);break;case 4:this.wn();break;case 5:this.vn(t.Wt);break;case 6:this.mn()}}mn(){const t=this.en.findIndex((n=>n.fn===5));t!==-1&&this.en.splice(t,1)}}class mj{formatTickmarks(t){return t.map((n=>this.format(n)))}}const q4=".";function Rl(e,t){if(!qh(e))return"n/a";if(!Nf(t))throw new TypeError("invalid length");if(t<0||t>16)throw new TypeError("invalid length");return t===0?e.toString():("0000000000000000"+e.toString()).slice(-t)}class S0 extends mj{constructor(t,n){if(super(),n||(n=1),qh(t)&&Nf(t)||(t=100),t<0)throw new TypeError("invalid base");this.Ki=t,this.kn=n,this.Pn()}format(t){const n=t<0?"−":"";return t=Math.abs(t),n+this.Tn(t)}Pn(){if(this.Rn=0,this.Ki>0&&this.kn>0){let t=this.Ki;for(;t>1;)t/=10,this.Rn++}}Tn(t){const n=this.Ki/this.kn;let i=Math.floor(t),r="";const o=this.Rn!==void 0?this.Rn:NaN;if(n>1){let c=+(Math.round(t*n)-i*n).toFixed(this.Rn);c>=n&&(c-=n,i+=1),r=q4+Rl(+c.toFixed(this.Rn)*this.kn,o)}else i=Math.round(i*n)/n,o>0&&(r=q4+Rl(0,o));return i.toFixed(0)+r}}class pj extends S0{constructor(t=100){super(t)}format(t){return`${super.format(t)}%`}}class Vq extends mj{constructor(t){super(),this.Dn=t}format(t){let n="";return t<0&&(n="-",t=-t),t<995?n+this.In(t):t<999995?n+this.In(t/1e3)+"K":t<999999995?(t=1e3*Math.round(t/1e3),n+this.In(t/1e6)+"M"):(t=1e6*Math.round(t/1e6),n+this.In(t/1e9)+"B")}In(t){let n;const i=Math.pow(10,this.Dn);return n=(t=Math.round(t*i)/i)>=1e-15&&t<1?t.toFixed(this.Dn).replace(/\.?0+$/,""):String(t),n.replace(/(\.[1-9]*)0+$/,((r,o)=>o))}}const Hq=/[2-9]/g;class Gp{constructor(t=50){this.Vn=0,this.Bn=1,this.En=1,this.An={},this.Ln=new Map,this.zn=t}On(){this.Vn=0,this.Ln.clear(),this.Bn=1,this.En=1,this.An={}}Ii(t,n,i){return this.Nn(t,n,i).width}Di(t,n,i){const r=this.Nn(t,n,i);return((r.actualBoundingBoxAscent||0)-(r.actualBoundingBoxDescent||0))/2}Nn(t,n,i){const r=i||Hq,o=String(n).replace(r,"0");if(this.Ln.has(o))return Vr(this.Ln.get(o)).Fn;if(this.Vn===this.zn){const u=this.An[this.En];delete this.An[this.En],this.Ln.delete(u),this.En++,this.Vn--}t.save(),t.textBaseline="middle";const c=t.measureText(o);return t.restore(),c.width===0&&n.length||(this.Ln.set(o,{Fn:c,Wn:this.Bn}),this.An[this.Bn]=o,this.Vn++,this.Bn++),c}}class $q{constructor(t){this.Hn=null,this.M=null,this.Un="right",this.$n=t}qn(t,n,i){this.Hn=t,this.M=n,this.Un=i}nt(t){this.M!==null&&this.Hn!==null&&this.Hn.nt(t,this.M,this.$n,this.Un)}}class gj{constructor(t,n,i){this.jn=t,this.$n=new Gp(50),this.Yn=n,this.O=i,this.F=-1,this.Xt=new $q(this.$n)}Tt(){const t=this.O.Kn(this.Yn);if(t===null)return null;const n=t.Zn(this.Yn)?t.Gn():this.Yn.Ft();if(n===null)return null;const i=t.Xn(n);if(i==="overlay")return null;const r=this.O.Jn();return r.k!==this.F&&(this.F=r.k,this.$n.On()),this.Xt.qn(this.jn.ji(),r,i),this.Xt}}class Gq extends td{constructor(){super(...arguments),this.jt=null}ht(t){this.jt=t}Qn(t,n){if(!this.jt?.It)return null;const{ut:i,ct:r,te:o}=this.jt;return n>=i-r-7&&n<=i+r+7?{ie:this.jt,te:o}:null}et({context:t,bitmapSize:n,horizontalPixelRatio:i,verticalPixelRatio:r}){if(this.jt===null||this.jt.It===!1)return;const o=Math.round(this.jt.ut*r);o<0||o>n.height||(t.lineCap="butt",t.strokeStyle=this.jt.R,t.lineWidth=Math.floor(this.jt.ct*i),Uh(t,this.jt.Zt),cj(t,o,0,n.width))}}class Ty{constructor(t){this.se={ut:0,R:"rgba(0, 0, 0, 0)",ct:1,Zt:0,It:!1},this.ne=new Gq,this.xt=!0,this.ee=t,this.re=t.Qt(),this.ne.ht(this.se)}kt(){this.xt=!0}Tt(){return this.ee.It()?(this.xt&&(this.he(),this.xt=!1),this.ne):null}}class Yq extends Ty{constructor(t){super(t)}he(){this.se.It=!1;const t=this.ee.Ft(),n=t.ae().ae;if(n!==2&&n!==3)return;const i=this.ee.N();if(!i.baseLineVisible||!this.ee.It())return;const r=this.ee.Lt();r!==null&&(this.se.It=!0,this.se.ut=t.Nt(r.Wt,r.Wt),this.se.R=i.baseLineColor,this.se.ct=i.baseLineWidth,this.se.Zt=i.baseLineStyle)}}class Wq extends td{constructor(){super(...arguments),this.jt=null}ht(t){this.jt=t}le(){return this.jt}et({context:t,horizontalPixelRatio:n,verticalPixelRatio:i}){const r=this.jt;if(r===null)return;const o=Math.max(1,Math.floor(n)),c=o%2/2,u=Math.round(r.oe.x*n)+c,h=r.oe.y*i;t.fillStyle=r._e,t.beginPath();const d=Math.max(2,1.5*r.ue)*n;t.arc(u,h,d,0,2*Math.PI,!1),t.fill(),t.fillStyle=r.ce,t.beginPath(),t.arc(u,h,r.ft*n,0,2*Math.PI,!1),t.fill(),t.lineWidth=o,t.strokeStyle=r.de,t.beginPath(),t.arc(u,h,r.ft*n+o/2,0,2*Math.PI,!1),t.stroke()}}const Kq=[{fe:0,pe:.25,ve:4,me:10,we:.25,ge:0,Me:.4,be:.8},{fe:.25,pe:.525,ve:10,me:14,we:0,ge:0,Me:.8,be:0},{fe:.525,pe:1,ve:14,me:14,we:0,ge:0,Me:0,be:0}];class Xq{constructor(t){this.Xt=new Wq,this.xt=!0,this.Se=!0,this.xe=performance.now(),this.Ce=this.xe-1,this.ye=t}ke(){this.Ce=this.xe-1,this.kt()}Pe(){if(this.kt(),this.ye.N().lastPriceAnimation===2){const t=performance.now(),n=this.Ce-t;if(n>0)return void(n<650&&(this.Ce+=2600));this.xe=t,this.Ce=t+2600}}kt(){this.xt=!0}Te(){this.Se=!0}It(){return this.ye.N().lastPriceAnimation!==0}Re(){switch(this.ye.N().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Ce}}Tt(){return this.xt?(this.Rt(),this.xt=!1,this.Se=!1):this.Se&&(this.De(),this.Se=!1),this.Xt}Rt(){this.Xt.ht(null);const t=this.ye.Qt().Et(),n=t.Ie(),i=this.ye.Lt();if(n===null||i===null)return;const r=this.ye.Ve(!0);if(r.Be||!n.Ee(r.js))return;const o={x:t.qt(r.js),y:this.ye.Ft().Nt(r.gt,i.Wt)},c=r.R,u=this.ye.N().lineWidth,h=this.Ae(this.Le(),c);this.Xt.ht({_e:c,ue:u,ce:h.ce,de:h.de,ft:h.ft,oe:o})}De(){const t=this.Xt.le();if(t!==null){const n=this.Ae(this.Le(),t._e);t.ce=n.ce,t.de=n.de,t.ft=n.ft}}Le(){return this.Re()?performance.now()-this.xe:2599}ze(t,n,i,r){const o=i+(r-i)*n;return this.ye.Qt().Xi().Y(t,o)}Ae(t,n){const i=t%2600/2600;let r;for(const d of Kq)if(i>=d.fe&&i<=d.pe){r=d;break}Is(r!==void 0,"Last price animation internal logic error");const o=(i-r.fe)/(r.pe-r.fe);return{ce:this.ze(n,o,r.we,r.ge),de:this.ze(n,o,r.Me,r.be),ft:(c=o,u=r.ve,h=r.me,u+(h-u)*c)};var c,u,h}}class Qq extends Ty{constructor(t){super(t)}he(){const t=this.se;t.It=!1;const n=this.ee.N();if(!n.priceLineVisible||!this.ee.It())return;const i=this.ee.Ve(n.priceLineSource===0);i.Be||(t.It=!0,t.ut=i.Ei,t.R=this.ee.Oe(i.R),t.ct=n.priceLineWidth,t.Zt=n.priceLineStyle)}}class Zq extends x0{constructor(t){super(),this.Jt=t}Yi(t,n,i){t.It=!1,n.It=!1;const r=this.Jt;if(!r.It())return;const o=r.N(),c=o.lastValueVisible,u=r.Ne()!=="",h=o.seriesLastValueMode===0,d=r.Ve(!1);if(d.Be)return;c&&(t.ri=this.Fe(d,c,h),t.It=t.ri.length!==0),(u||h)&&(n.ri=this.We(d,c,u,h),n.It=n.ri.length>0);const p=r.Oe(d.R),v=this.Jt.Qt().Xi().Z(p);i.G=v.G,i.Ei=d.Ei,n.Ht=r.Qt().Ut(d.Ei/r.Ft().$t()),t.Ht=p,t.R=v.X,n.R=v.X}We(t,n,i,r){let o="";const c=this.Jt.Ne();return i&&c.length!==0&&(o+=`${c} `),n&&r&&(o+=this.Jt.Ft().He()?t.Ue:t.$e),o.trim()}Fe(t,n,i){return n?i?this.Jt.Ft().He()?t.$e:t.Ue:t.ri:""}}function V4(e,t,n,i){const r=Number.isFinite(t),o=Number.isFinite(n);return r&&o?e(t,n):r||o?r?t:n:i}class vr{constructor(t,n){this.qe=t,this.je=n}Ye(t){return t!==null&&this.qe===t.qe&&this.je===t.je}Ke(){return new vr(this.qe,this.je)}Ze(){return this.qe}Ge(){return this.je}Xe(){return this.je-this.qe}Gi(){return this.je===this.qe||Number.isNaN(this.je)||Number.isNaN(this.qe)}Sn(t){return t===null?this:new vr(V4(Math.min,this.Ze(),t.Ze(),-1/0),V4(Math.max,this.Ge(),t.Ge(),1/0))}Je(t){if(!qh(t)||this.je-this.qe===0)return;const n=.5*(this.je+this.qe);let i=this.je-n,r=this.qe-n;i*=t,r*=t,this.je=n+i,this.qe=n+r}Qe(t){qh(t)&&(this.je+=t,this.qe+=t)}tr(){return{minValue:this.qe,maxValue:this.je}}static ir(t){return t===null?null:new vr(t.minValue,t.maxValue)}}class Yp{constructor(t,n){this.sr=t,this.nr=n||null}er(){return this.sr}rr(){return this.nr}tr(){return{priceRange:this.sr===null?null:this.sr.tr(),margins:this.nr||void 0}}static ir(t){return t===null?null:new Yp(vr.ir(t.priceRange),t.margins)}}const Jq=[2,4,8,16,32,64,128,256,512],tV="Custom series with conflation reducer must have a priceValueBuilder method";class eV extends Ty{constructor(t,n){super(t),this.hr=n}he(){const t=this.se;t.It=!1;const n=this.hr.N();if(!this.ee.It()||!n.lineVisible)return;const i=this.hr.ar();i!==null&&(t.It=!0,t.ut=i,t.R=n.color,t.ct=n.lineWidth,t.Zt=n.lineStyle,t.te=this.hr.N().id)}}class nV extends x0{constructor(t,n){super(),this.ye=t,this.hr=n}Yi(t,n,i){t.It=!1,n.It=!1;const r=this.hr.N(),o=r.axisLabelVisible,c=r.title!=="",u=this.ye;if(!o||!u.It())return;const h=this.hr.ar();if(h===null)return;c&&(n.ri=r.title,n.It=!0),n.Ht=u.Qt().Ut(h/u.Ft().$t()),t.ri=this.lr(r.price),t.It=!0;const d=this.ye.Qt().Xi().Z(r.axisLabelColor||r.color);i.G=d.G;const p=r.axisLabelTextColor||d.X;t.R=p,n.R=p,i.Ei=h}lr(t){const n=this.ye.Lt();return n===null?"":this.ye.Ft().Ji(t,n.Wt)}}class iV{constructor(t,n){this.ye=t,this.Ps=n,this._r=new eV(t,this),this.jn=new nV(t,this),this.ur=new gj(this.jn,t,t.Qt())}cr(t){fa(this.Ps,t),this.kt(),this.ye.Qt().dr()}N(){return this.Ps}pr(){return this._r}vr(){return this.ur}mr(){return this.jn}kt(){this._r.kt(),this.jn.kt()}ar(){const t=this.ye,n=t.Ft();if(t.Qt().Et().Gi()||n.Gi())return null;const i=t.Lt();return i===null?null:n.Nt(this.Ps.price,i.Wt)}}class sV{constructor(){this.wr=new WeakMap}gr(t,n,i){const r=1/n*i;if(t>=r)return 1;const o=r/t,c=Math.pow(2,Math.floor(Math.log2(o)));return Math.min(c,512)}Mr(t,n,i,r=!1,o){if(t.length===0||n<=1)return t;const c=this.br(n);if(c<=1)return t;const u=this.Sr(t);let h=u.Cr.get(c);return h!==void 0||(h=this.yr(t,c,i,r,o,u.Cr),u.Cr.set(c,h)),h}kr(t,n,i,r,o=!1,c){if(i<1||t.length===0)return t;const u=this.Sr(t),h=u.Cr.get(i);if(!h)return this.Mr(t,i,r,o,c);const d=this.Pr(t,n,i,h,o,r,c);return u.Cr.set(i,d),d}br(t){if(t<=2)return 2;for(const n of Jq)if(t<=n)return n;return 512}Tr(t){if(t.length===0)return 0;const n=t[0],i=t[t.length-1];return 31*t.length+17*n.js+13*i.js}yr(t,n,i,r=!1,o,c=new Map){if(n===2)return this.Rr(t,2,i,r,o);const u=n/2;let h=c.get(u);return h||(h=this.yr(t,u,i,r,o,c),c.set(u,h)),this.Dr(h,i,r,o)}Rr(t,n,i,r=!1,o){const c=this.Ir(t,n,i,r,o);return this.Vr(c,r)}Dr(t,n,i=!1,r){const o=this.Ir(t,2,n,i,r);return this.Vr(o,i)}Ir(t,n,i,r=!1,o){const c=[];for(let u=0;u<t.length;u+=n)if(t.length-u>=n){const h=this.Br(t[u],t[u+1],i,r,o);h.Er=!1,c.push(h)}else if(c.length===0)c.push(this.Ar(t[u],!0));else{const h=c[c.length-1];c[c.length-1]=this.Lr(h,t[u],i,r,o)}return c}zr(t,n){return(t??1)+(n??1)}Br(t,n,i,r=!1,o){if(!r||!i||!o){const d=t.Wt[1]>n.Wt[1]?t.Wt[1]:n.Wt[1],p=t.Wt[2]<n.Wt[2]?t.Wt[2]:n.Wt[2];return{Or:t.js,Nr:n.js,Fr:t.wt,Wr:n.wt,Hr:t.Wt[0],Ur:d,$r:p,qr:n.Wt[3],jr:this.zr(t.jr,n.jr),Yr:void 0,Er:!1}}const c=i(this.Kr(t,o),this.Kr(n,o)),u=o(c),h=u.length?u[u.length-1]:0;return{Or:t.js,Nr:n.js,Fr:t.wt,Wr:n.wt,Hr:t.Wt[0],Ur:Math.max(t.Wt[1],h),$r:Math.min(t.Wt[2],h),qr:h,jr:this.zr(t.jr,n.jr),Yr:c,Er:!1}}Lr(t,n,i,r=!1,o){if(!r||!i||!o)return{Or:t.Or,Nr:n.js,Fr:t.Fr,Wr:n.wt,Hr:t.Hr,Ur:t.Ur>n.Wt[1]?t.Ur:n.Wt[1],$r:t.$r<n.Wt[2]?t.$r:n.Wt[2],qr:n.Wt[3],jr:t.jr+(n.jr??1),Yr:t.Yr,Er:!1};const c=t.Yr,u=this.Kr(n,o),h=c?{data:c,index:t.Or,originalTime:t.Fr,time:t.Fr,priceValues:o(c)}:null,d=h?i(h,u):u.data,p=h?o(d):u.priceValues,v=p.length?p[p.length-1]:0;return{Or:t.Or,Nr:n.js,Fr:t.Fr,Wr:n.wt,Hr:t.Hr,Ur:Math.max(t.Ur,v),$r:Math.min(t.$r,v),qr:v,jr:t.jr+(n.jr??1),Yr:d,Er:!1}}Zr(t,n,i,r,o,c,u=!1,h){const d=n===r?o:t[n];if(i-n==1)return this.Ar(d,!0);const p=n+1===r?o:t[n+1];let v=this.Br(d,p,c,u,h);for(let S=n+2;S<i;S++){const b=S===r?o:t[S];v=this.Lr(v,b,c,u,h)}return v}Kr(t,n){const i=t.le??{};return{data:t.le,index:t.js,originalTime:t.Gr,time:t.wt,priceValues:n(i)}}Xr(t,n=!1){const i=n===!0,r=!!t.Yr;return{js:t.Or,wt:t.Fr,Gr:t.Fr,Wt:[i?t.qr:t.Hr,t.Ur,t.$r,t.qr],jr:t.jr,le:i?r?t.Yr:{wt:t.Fr}:void 0}}Vr(t,n=!1){return t.map((i=>this.Xr(i,n)))}Pr(t,n,i,r,o=!1,c,u){if(r.length===0)return r;const h=t.length-1,d=Math.floor(h/i)*i;if(Math.min(d+i,t.length)-d<i&&t.length>i){const p=t.slice();return p[p.length-1]=n,this.Mr(p,i,c,o,u)}if(Math.floor((h-1)/i)===Math.floor(h/i)||r.length===1){const p=Math.min(d+i,t.length),v=p-d;if(v<=0)return r;const S=v===1?this.Ar(d===h?n:t[d],!0):this.Zr(t,d,p,h,n,c,o,u);return r[r.length-1]=this.Xr(S,o),r}{const p=t.slice();return p[p.length-1]=n,this.Mr(p,i,c,o,u)}}Ar(t,n=!1){return{Or:t.js,Nr:t.js,Fr:t.wt,Wr:t.wt,Hr:t.Wt[0],Ur:t.Wt[1],$r:t.Wt[2],qr:t.Wt[3],jr:t.jr??1,Yr:t.le,Er:n}}Sr(t){const n=this.Jr(t),i=this.Tr(t);return n.Qr!==i&&(n.Cr.clear(),n.Qr=i),n}Jr(t){let n=this.wr.get(t);return n===void 0&&(n={Qr:this.Tr(t),Cr:new Map},this.wr.set(t,n)),n}}class rV extends fj{constructor(t){super(),this.ns=t}Qt(){return this.ns}}const aV={Bar:(e,t,n,i)=>{const r=t.upColor,o=t.downColor,c=Yt(e(n,i)),u=_c(c.Wt[0])<=_c(c.Wt[3]);return{th:c.R??(u?r:o)}},Candlestick:(e,t,n,i)=>{const r=t.upColor,o=t.downColor,c=t.borderUpColor,u=t.borderDownColor,h=t.wickUpColor,d=t.wickDownColor,p=Yt(e(n,i)),v=_c(p.Wt[0])<=_c(p.Wt[3]);return{th:p.R??(v?r:o),ih:p.Ht??(v?c:u),sh:p.nh??(v?h:d)}},Custom:(e,t,n,i)=>({th:Yt(e(n,i)).R??t.color}),Area:(e,t,n,i)=>{const r=Yt(e(n,i));return{th:r.vt??t.lineColor,vt:r.vt??t.lineColor,eh:r.eh??t.topColor,rh:r.rh??t.bottomColor}},Baseline:(e,t,n,i)=>{const r=Yt(e(n,i));return{th:r.Wt[3]>=t.baseValue.price?t.topLineColor:t.bottomLineColor,hh:r.hh??t.topLineColor,ah:r.ah??t.bottomLineColor,oh:r.oh??t.topFillColor1,_h:r._h??t.topFillColor2,uh:r.uh??t.bottomFillColor1,dh:r.dh??t.bottomFillColor2}},Line:(e,t,n,i)=>{const r=Yt(e(n,i));return{th:r.R??t.color,vt:r.R??t.color}},Histogram:(e,t,n,i)=>({th:Yt(e(n,i)).R??t.color})};class oV{constructor(t){this.fh=(n,i)=>i!==void 0?i.Wt:this.ye.qs().ph(n),this.ye=t,this.mh=aV[t.wh()]}gh(t,n){return this.mh(this.fh,this.ye.N(),t,n)}}function vj(e,t,n,i,r=0,o=t.length){let c=o-r;for(;0<c;){const u=c>>1,h=r+u;i(t[h],n)===e?(r=h+1,c-=u+1):c=u}return r}const Vh=vj.bind(null,!0),yj=vj.bind(null,!1);var H4;(function(e){e[e.NearestLeft=-1]="NearestLeft",e[e.None=0]="None",e[e.NearestRight=1]="NearestRight"})(H4||(H4={}));const bc=30;class lV{constructor(){this.Mh=[],this.bh=new Map,this.Sh=new Map,this.xh=[]}Ch(){return this.yh()>0?this.Mh[this.Mh.length-1]:null}kh(){return this.yh()>0?this.Ph(0):null}sn(){return this.yh()>0?this.Ph(this.Mh.length-1):null}yh(){return this.Mh.length}Gi(){return this.yh()===0}Ee(t){return this.Th(t,0)!==null}ph(t){return this.$s(t)}$s(t,n=0){const i=this.Th(t,n);return i===null?null:{...this.Rh(i),js:this.Ph(i)}}Dh(){return this.Mh}Ih(t,n,i){if(this.Gi())return null;let r=null;for(const o of i)r=tp(r,this.Vh(t,n,o));return r}ht(t){this.Sh.clear(),this.bh.clear(),this.Mh=t,this.xh=t.map((n=>n.js))}Bh(){return this.xh}Ph(t){return this.Mh[t].js}Rh(t){return this.Mh[t]}Th(t,n){const i=this.Eh(t);if(i===null&&n!==0)switch(n){case-1:return this.Ah(t);case 1:return this.Lh(t);default:throw new TypeError("Unknown search mode")}return i}Ah(t){let n=this.zh(t);return n>0&&(n-=1),n!==this.Mh.length&&this.Ph(n)<t?n:null}Lh(t){const n=this.Oh(t);return n!==this.Mh.length&&t<this.Ph(n)?n:null}Eh(t){const n=this.zh(t);return n===this.Mh.length||t<this.Mh[n].js?null:n}zh(t){return Vh(this.Mh,t,((n,i)=>n.js<i))}Oh(t){return yj(this.Mh,t,((n,i)=>n.js>i))}Nh(t,n,i){let r=null;for(let o=t;o<n;o++){const c=this.Mh[o].Wt[i];Number.isNaN(c)||(r===null?r={Fh:c,Wh:c}:(c<r.Fh&&(r.Fh=c),c>r.Wh&&(r.Wh=c)))}return r}Vh(t,n,i){if(this.Gi())return null;let r=null;const o=Yt(this.kh()),c=Yt(this.sn()),u=Math.max(t,o),h=Math.min(n,c),d=Math.ceil(u/bc)*bc,p=Math.max(d,Math.floor(h/bc)*bc);{const S=this.zh(u),b=this.Oh(Math.min(h,d,n));r=tp(r,this.Nh(S,b,i))}let v=this.bh.get(i);v===void 0&&(v=new Map,this.bh.set(i,v));for(let S=Math.max(d+1,u);S<p;S+=bc){const b=Math.floor(S/bc);let _=v.get(b);if(_===void 0){const A=this.zh(b*bc),j=this.Oh((b+1)*bc-1);_=this.Nh(A,j,i),v.set(b,_)}r=tp(r,_)}{const S=this.zh(p),b=this.Oh(h);r=tp(r,this.Nh(S,b,i))}return r}}function tp(e,t){return e===null?t:t===null?e:{Fh:Math.min(e.Fh,t.Fh),Wh:Math.max(e.Wh,t.Wh)}}function W1(){return new lV}const Wp={setLineStyle:Uh};class cV{constructor(t){this.Hh=t}nt(t,n,i){this.Hh.draw(t,Wp)}Uh(t,n,i){this.Hh.drawBackground?.(t,Wp)}}class uV{constructor(t){this.Ln=null,this.$h=t}Tt(){const t=this.$h.renderer();if(t===null)return null;if(this.Ln?.qh===t)return this.Ln.jh;const n=new cV(t);return this.Ln={qh:t,jh:n},n}Yh(){return this.$h.zOrder?.()??"normal"}}class bj{constructor(t){this.Kh=null,this.Zh=t}Gh(){return this.Zh}Ws(){this.Zh.updateAllViews?.()}Ys(){const t=this.Zh.paneViews?.()??[];if(this.Kh?.qh===t)return this.Kh.jh;const n=t.map((i=>new uV(i)));return this.Kh={qh:t,jh:n},n}Qn(t,n){return this.Zh.hitTest?.(t,n)??null}}let hV=class extends bj{ds(){return[]}};class dV{constructor(t){this.Hh=t}nt(t,n,i){this.Hh.draw(t,Wp)}Uh(t,n,i){this.Hh.drawBackground?.(t,Wp)}}class $4{constructor(t){this.Ln=null,this.$h=t}Tt(){const t=this.$h.renderer();if(t===null)return null;if(this.Ln?.qh===t)return this.Ln.jh;const n=new dV(t);return this.Ln={qh:t,jh:n},n}Yh(){return this.$h.zOrder?.()??"normal"}}function xj(e){return{ri:e.text(),Ei:e.coordinate(),Vi:e.fixedCoordinate?.(),R:e.textColor(),G:e.backColor(),It:e.visible?.()??!0,pi:e.tickVisible?.()??!0}}class fV{constructor(t,n){this.Xt=new dj,this.Xh=t,this.Jh=n}Tt(){return this.Xt.ht({ss:this.Jh.ss(),...xj(this.Xh)}),this.Xt}}class mV extends x0{constructor(t,n){super(),this.Xh=t,this.Ki=n}Yi(t,n,i){const r=xj(this.Xh);i.G=r.G,t.R=r.R;const o=2/12*this.Ki.k();i.Ti=o,i.Ri=o,i.Ei=r.Ei,i.Vi=r.Vi,t.ri=r.ri,t.It=r.It,t.pi=r.pi}}class pV extends bj{constructor(t,n){super(t),this.Qh=null,this.ta=null,this.ia=null,this.sa=null,this.ye=n}fs(){const t=this.Zh.timeAxisViews?.()??[];if(this.Qh?.qh===t)return this.Qh.jh;const n=this.ye.Qt().Et(),i=t.map((r=>new fV(r,n)));return this.Qh={qh:t,jh:i},i}Ks(){const t=this.Zh.priceAxisViews?.()??[];if(this.ta?.qh===t)return this.ta.jh;const n=this.ye.Ft(),i=t.map((r=>new mV(r,n)));return this.ta={qh:t,jh:i},i}na(){const t=this.Zh.priceAxisPaneViews?.()??[];if(this.ia?.qh===t)return this.ia.jh;const n=t.map((i=>new $4(i)));return this.ia={qh:t,jh:n},n}ea(){const t=this.Zh.timeAxisPaneViews?.()??[];if(this.sa?.qh===t)return this.sa.jh;const n=t.map((i=>new $4(i)));return this.sa={qh:t,jh:n},n}ra(t,n){return this.Zh.autoscaleInfo?.(t,n)??null}}function K1(e,t,n,i){e.forEach((r=>{t(r).forEach((o=>{o.Yh()===n&&i.push(o)}))}))}function X1(e){return e.Ys()}function gV(e){return e.na()}function vV(e){return e.ea()}const yV=["Area","Line","Baseline"];class N0 extends rV{constructor(t,n,i,r,o){super(t),this.jt=W1(),this._r=new Qq(this),this.ha=[],this.aa=new Yq(this),this.la=null,this.oa=null,this._a=null,this.ua=[],this.ca=new sV,this.da=new Map,this.fa=null,this.Ps=i,this.pa=n;const c=new Zq(this);if(this.gs=[c],this.ur=new gj(c,this,t),yV.includes(this.pa)&&(this.la=new Xq(this)),this.va(),this.$h=r(this,this.Qt(),o),this.pa==="Custom"){const u=this.$h;u.ma&&this.wa(u.ma)}}m(){this._a!==null&&clearTimeout(this._a)}Oe(t){return this.Ps.priceLineColor||t}Ve(t){const n={Be:!0},i=this.Ft();if(this.Qt().Et().Gi()||i.Gi()||this.jt.Gi())return n;const r=this.Qt().Et().Ie(),o=this.Lt();if(r===null||o===null)return n;let c,u;if(t){const v=this.jt.Ch();if(v===null)return n;c=v,u=v.js}else{const v=this.jt.$s(r.bi(),-1);if(v===null||(c=this.jt.ph(v.js),c===null))return n;u=v.js}const h=c.Wt[3],d=this.ga().gh(u,{Wt:c}),p=i.Nt(h,o.Wt);return{Be:!1,gt:h,ri:i.Ji(h,o.Wt),Ue:i.Ma(h),$e:i.ba(h,o.Wt),R:d.th,Ei:p,js:u}}ga(){return this.oa!==null||(this.oa=new oV(this)),this.oa}N(){return this.Ps}cr(t){const n=this.Qt(),{priceScaleId:i,visible:r,priceFormat:o}=t;i!==void 0&&i!==this.Ps.priceScaleId&&n.Sa(this,i),r!==void 0&&r!==this.Ps.visible&&n.xa();const c=t.conflationThresholdFactor!==void 0;fa(this.Ps,t),c&&(this.da.clear(),this.Qt().dr()),o!==void 0&&(this.va(),n.Ca()),n.ya(this),n.ka(),this.$h.kt("options")}ht(t,n){this.jt.ht(t),this.da.clear();const i=this.Qt().Et().N();i.enableConflation&&i.precomputeConflationOnInit&&this.Pa(i.precomputeConflationPriority),this.$h.kt("data"),this.la!==null&&(n&&n.Ta?this.la.Pe():t.length===0&&this.la.ke());const r=this.Qt().Kn(this);this.Qt().Ra(r),this.Qt().ya(this),this.Qt().ka(),this.Qt().dr()}Da(t){const n=new iV(this,t);return this.ha.push(n),this.Qt().ya(this),n}Ia(t){const n=this.ha.indexOf(t);n!==-1&&this.ha.splice(n,1),this.Qt().ya(this)}Va(){return this.ha}wh(){return this.pa}Lt(){const t=this.Ba();return t===null?null:{Wt:t.Wt[3],Ea:t.wt}}Ba(){const t=this.Qt().Et().Ie();if(t===null)return null;const n=t.Aa();return this.jt.$s(n,1)}qs(){return this.jt}wa(t){this.fa=t,this.da.clear()}La(){return!!this.Qt().Et().N().enableConflation&&this.za()>1}kr(t){if(!this.La())return;const n=this.za();if(!this.da.has(n))return;const i=this.pa==="Custom",r=i&&this.fa||void 0,o=i&&this.$h.Oa?h=>{const d=h,p=this.$h.Oa(d);return Array.isArray(p)?p:[typeof p=="number"?p:0]}:void 0,c=this.ca.kr(this.jt.Dh(),t,n,r,i,o),u=W1();u.ht(c),this.da.set(n,u)}Na(){const t=this.Qt().Et().N().enableConflation;if(this.pa==="Custom"&&this.fa===null)return this.jt;if(!t)return this.jt;const n=this.za(),i=this.da.get(n);return i||(this.Fa(n),this.da.get(n)??this.jt)}Wa(t){const n=this.jt.ph(t);return n===null?null:this.pa==="Bar"||this.pa==="Candlestick"||this.pa==="Custom"?{Hr:n.Wt[0],Ur:n.Wt[1],$r:n.Wt[2],qr:n.Wt[3]}:n.Wt[3]}Ha(t){const n=[];K1(this.ua,X1,"top",n);const i=this.la;return i!==null&&i.It()&&(this._a===null&&i.Re()&&(this._a=setTimeout((()=>{this._a=null,this.Qt().Ua()}),0)),i.Te(),n.unshift(i)),n}Ys(){const t=[];this.$a()||t.push(this.aa),t.push(this.$h,this._r);const n=this.ha.map((i=>i.pr()));return t.push(...n),K1(this.ua,X1,"normal",t),t}qa(){return this.ja(X1,"bottom")}Ya(t){return this.ja(gV,t)}Ka(t){return this.ja(vV,t)}Za(t,n){return this.ua.map((i=>i.Qn(t,n))).filter((i=>i!==null))}ds(){return[this.ur,...this.ha.map((t=>t.vr()))]}Ks(t,n){if(n!==this.hs&&!this.$a())return[];const i=[...this.gs];for(const r of this.ha)i.push(r.mr());return this.ua.forEach((r=>{i.push(...r.Ks())})),i}fs(){const t=[];return this.ua.forEach((n=>{t.push(...n.fs())})),t}ra(t,n){if(this.Ps.autoscaleInfoProvider!==void 0){const i=this.Ps.autoscaleInfoProvider((()=>{const r=this.Ga(t,n);return r===null?null:r.tr()}));return Yp.ir(i)}return this.Ga(t,n)}qh(){const t=this.Ps.priceFormat;return t.base??1/t.minMove}Xa(){return this.Ja}Ws(){this.$h.kt();for(const t of this.gs)t.kt();for(const t of this.ha)t.kt();this._r.kt(),this.aa.kt(),this.la?.kt(),this.ua.forEach((t=>t.Ws()))}Ft(){return Yt(super.Ft())}At(t){if(!((this.pa==="Line"||this.pa==="Area"||this.pa==="Baseline")&&this.Ps.crosshairMarkerVisible))return null;const n=this.jt.ph(t);return n===null?null:{gt:n.Wt[3],ft:this.Qa(),Ht:this.tl(),Ot:this.il(),zt:this.sl(t)}}Ne(){return this.Ps.title}It(){return this.Ps.visible}nl(t){this.ua.push(new pV(t,this))}el(t){this.ua=this.ua.filter((n=>n.Gh()!==t))}rl(){if(this.pa==="Custom")return t=>this.$h.Oa(t)}hl(){if(this.pa==="Custom")return t=>this.$h.al(t)}ll(){return this.jt.Bh()}$a(){return!w0(this.Ft().ol())}Ga(t,n){if(!Nf(t)||!Nf(n)||this.jt.Gi())return null;const i=this.pa==="Line"||this.pa==="Area"||this.pa==="Baseline"||this.pa==="Histogram"?[3]:[2,1],r=this.jt.Ih(t,n,i);let o=r!==null?new vr(r.Fh,r.Wh):null,c=null;if(this.wh()==="Histogram"){const u=this.Ps.base,h=new vr(u,u);o=o!==null?o.Sn(h):h}return this.ua.forEach((u=>{const h=u.ra(t,n);if(h?.priceRange){const d=new vr(h.priceRange.minValue,h.priceRange.maxValue);o=o!==null?o.Sn(d):d}h?.margins&&(c=h.margins)})),new Yp(o,c)}Qa(){switch(this.pa){case"Line":case"Area":case"Baseline":return this.Ps.crosshairMarkerRadius}return 0}tl(){switch(this.pa){case"Line":case"Area":case"Baseline":{const t=this.Ps.crosshairMarkerBorderColor;if(t.length!==0)return t}}return null}il(){switch(this.pa){case"Line":case"Area":case"Baseline":return this.Ps.crosshairMarkerBorderWidth}return 0}sl(t){switch(this.pa){case"Line":case"Area":case"Baseline":{const n=this.Ps.crosshairMarkerBackgroundColor;if(n.length!==0)return n}}return this.ga().gh(t).th}va(){switch(this.Ps.priceFormat.type){case"custom":{const t=this.Ps.priceFormat.formatter;this.Ja={format:t,formatTickmarks:this.Ps.priceFormat.tickmarksFormatter??(n=>n.map(t))};break}case"volume":this.Ja=new Vq(this.Ps.priceFormat.precision);break;case"percent":this.Ja=new pj(this.Ps.priceFormat.precision);break;default:{const t=Math.pow(10,this.Ps.priceFormat.precision);this.Ja=new S0(t,this.Ps.priceFormat.minMove*t)}}this.hs!==null&&this.hs._l()}ja(t,n){const i=[];return K1(this.ua,t,n,i),i}za(){const{ul:t,cl:n,dl:i}=this.fl();return this.ca.gr(t,n,i)}fl(){const t=this.Qt().Et(),n=t.ul(),i=window.devicePixelRatio||1,r=t.N().conflationThresholdFactor;return{ul:n,cl:i,dl:this.Ps.conflationThresholdFactor??r??1}}pl(t){const n=this.jt.Dh();let i;if(this.pa==="Custom"&&this.fa!==null){const o=this.rl();if(!o)throw new Error(tV);i=this.ca.Mr(n,t,this.fa,!0,(c=>o(c)))}else i=this.ca.Mr(n,t);const r=W1();return r.ht(i),r}Fa(t){const n=this.pl(t);this.da.set(t,n)}Pa(t){if(this.pa==="Custom"&&(this.fa===null||!this.rl()))return;this.da.clear();const n=this.Qt().Et().vl();for(const i of n){const r=()=>{this.ml(i)},o=typeof window=="object"&&window||typeof self=="object"&&self;o?.gl?.wl?o.gl.wl((()=>{r()}),{Ml:t}):Promise.resolve().then((()=>r()))}}ml(t){if(this.da.has(t)||this.jt.Dh().length===0)return;const n=this.pl(t);this.da.set(t,n)}}const bV=[3],xV=[0,1,2,3];class wV{constructor(t){this.Ps=t}bl(t,n,i){let r=t;if(this.Ps.mode===0)return r;const o=i.Rs(),c=o.Lt();if(c===null)return r;const u=o.Nt(t,c),h=i.Sl().filter((p=>p instanceof N0)).reduce(((p,v)=>{if(i.Zn(v)||!v.It())return p;const S=v.Ft(),b=v.qs();if(S.Gi()||!b.Ee(n))return p;const _=b.ph(n);if(_===null)return p;const A=_c(v.Lt()),j=this.Ps.mode===3?xV:bV;return p.concat(j.map((E=>S.Nt(_.Wt[E],A.Wt))))}),[]);if(h.length===0)return r;h.sort(((p,v)=>Math.abs(p-u)-Math.abs(v-u)));const d=h[0];return r=o.Ds(d,c),r}}function sf(e,t,n){return Math.min(Math.max(e,t),n)}function ep(e,t,n){return t-e<=n}class SV extends td{constructor(){super(...arguments),this.jt=null}ht(t){this.jt=t}et({context:t,bitmapSize:n,horizontalPixelRatio:i,verticalPixelRatio:r}){if(this.jt===null)return;const o=Math.max(1,Math.floor(i));t.lineWidth=o,(function(c,u){c.save(),c.lineWidth%2&&c.translate(.5,.5),u(),c.restore()})(t,(()=>{const c=Yt(this.jt);if(c.xl){t.strokeStyle=c.Cl,Uh(t,c.yl),t.beginPath();for(const u of c.kl){const h=Math.round(u.Pl*i);t.moveTo(h,-o),t.lineTo(h,n.height+o)}t.stroke()}if(c.Tl){t.strokeStyle=c.Rl,Uh(t,c.Dl),t.beginPath();for(const u of c.Il){const h=Math.round(u.Pl*r);t.moveTo(-o,h),t.lineTo(n.width+o,h)}t.stroke()}}))}}class NV{constructor(t){this.Xt=new SV,this.xt=!0,this.yt=t}kt(){this.xt=!0}Tt(){if(this.xt){const t=this.yt.Qt().N().grid,n={Tl:t.horzLines.visible,xl:t.vertLines.visible,Rl:t.horzLines.color,Cl:t.vertLines.color,Dl:t.horzLines.style,yl:t.vertLines.style,Il:this.yt.Rs().Vl(),kl:(this.yt.Qt().Et().Vl()||[]).map((i=>({Pl:i.coord})))};this.Xt.ht(n),this.xt=!1}return this.Xt}}class AV{constructor(t){this.$h=new NV(t)}pr(){return this.$h}}const Q1={Bl:4,El:1e-4};function Ah(e,t){const n=100*(e-t)/t;return t<0?-n:n}function CV(e,t){const n=Ah(e.Ze(),t),i=Ah(e.Ge(),t);return new vr(n,i)}function rf(e,t){const n=100*(e-t)/t+100;return t<0?-n:n}function _V(e,t){const n=rf(e.Ze(),t),i=rf(e.Ge(),t);return new vr(n,i)}function Kp(e,t){const n=Math.abs(e);if(n<1e-15)return 0;const i=Math.log10(n+t.El)+t.Bl;return e<0?-i:i}function af(e,t){const n=Math.abs(e);if(n<1e-15)return 0;const i=Math.pow(10,n-t.Bl)-t.El;return e<0?-i:i}function qd(e,t){if(e===null)return null;const n=Kp(e.Ze(),t),i=Kp(e.Ge(),t);return new vr(n,i)}function Ch(e,t){if(e===null)return null;const n=af(e.Ze(),t),i=af(e.Ge(),t);return new vr(n,i)}function Z1(e){if(e===null)return Q1;const t=Math.abs(e.Ge()-e.Ze());if(t>=1||t<1e-15)return Q1;const n=Math.ceil(Math.abs(Math.log10(t))),i=Q1.Bl+n;return{Bl:i,El:1/Math.pow(10,i)}}class J1{constructor(t,n){if(this.Al=t,this.Ll=n,(function(i){if(i<0)return!1;if(i>1e18)return!0;for(let r=i;r>1;r/=10)if(r%10!=0)return!1;return!0})(this.Al))this.zl=[2,2.5,2];else{this.zl=[];for(let i=this.Al;i!==1;){if(i%2==0)this.zl.push(2),i/=2;else{if(i%5!=0)throw new Error("unexpected base");this.zl.push(2,2.5),i/=5}if(this.zl.length>100)throw new Error("something wrong with base")}}}Ol(t,n,i){const r=this.Al===0?0:1/this.Al;let o=Math.pow(10,Math.max(0,Math.ceil(Math.log10(t-n)))),c=0,u=this.Ll[0];for(;;){const v=ep(o,r,1e-14)&&o>r+1e-14,S=ep(o,i*u,1e-14),b=ep(o,1,1e-14);if(!(v&&S&&b))break;o/=u,u=this.Ll[++c%this.Ll.length]}if(o<=r+1e-14&&(o=r),o=Math.max(1,o),this.zl.length>0&&(h=o,d=1,p=1e-14,Math.abs(h-d)<p))for(c=0,u=this.zl[0];ep(o,i*u,1e-14)&&o>r+1e-14;)o/=u,u=this.zl[++c%this.zl.length];var h,d,p;return o}}class G4{constructor(t,n,i,r){this.Nl=[],this.Ki=t,this.Al=n,this.Fl=i,this.Wl=r}Ol(t,n){if(t<n)throw new Error("high < low");const i=this.Ki.$t(),r=(t-n)*this.Hl()/i,o=new J1(this.Al,[2,2.5,2]),c=new J1(this.Al,[2,2,2.5]),u=new J1(this.Al,[2.5,2,2]),h=[];return h.push(o.Ol(t,n,r),c.Ol(t,n,r),u.Ol(t,n,r)),(function(d){if(d.length<1)throw Error("array is empty");let p=d[0];for(let v=1;v<d.length;++v)d[v]<p&&(p=d[v]);return p})(h)}Ul(){const t=this.Ki,n=t.Lt();if(n===null)return void(this.Nl=[]);const i=t.$t(),r=this.Fl(i-1,n),o=this.Fl(0,n),c=this.Ki.N().entireTextOnly?this.$l()/2:0,u=c,h=i-1-c,d=Math.max(r,o),p=Math.min(r,o);if(d===p)return void(this.Nl=[]);const v=this.Ol(d,p);if(this.ql(n,v,d,p,u,h),t.jl()&&this.Yl(v,p,d)){const _=this.Ki.Kl();this.Zl(n,v,u,h,_,2*_)}const S=this.Nl.map((_=>_.Gl)),b=this.Ki.Xl(S);for(let _=0;_<this.Nl.length;_++)this.Nl[_].Jl=b[_]}Vl(){return this.Nl}$l(){return this.Ki.k()}Hl(){return Math.ceil(2.5*this.$l())}ql(t,n,i,r,o,c){const u=this.Nl,h=this.Ki;let d=i%n;d+=d<0?n:0;const p=i>=r?1:-1;let v=null,S=0;for(let b=i-d;b>r;b-=n){const _=this.Wl(b,t,!0);v!==null&&Math.abs(_-v)<this.Hl()||_<o||_>c||(S<u.length?(u[S].Pl=_,u[S].Jl=h.Ql(b),u[S].Gl=b):u.push({Pl:_,Jl:h.Ql(b),Gl:b}),S++,v=_,h.io()&&(n=this.Ol(b*p,r)))}u.length=S}Zl(t,n,i,r,o,c){const u=this.Nl,h=this.so(t,i,o,c),d=this.so(t,r,-c,-o),p=this.Wl(0,t,!0)-this.Wl(n,t,!0);u.length>0&&u[0].Pl-h.Pl<p/2&&u.shift(),u.length>0&&d.Pl-u[u.length-1].Pl<p/2&&u.pop(),u.unshift(h),u.push(d)}so(t,n,i,r){const o=(i+r)/2,c=this.Fl(n+i,t),u=this.Fl(n+r,t),h=Math.min(c,u),d=Math.max(c,u),p=Math.max(.1,this.Ol(d,h)),v=this.Fl(n+o,t),S=v-v%p,b=this.Wl(S,t,!0);return{Jl:this.Ki.Ql(S),Pl:b,Gl:S}}Yl(t,n,i){let r=_c(this.Ki.er());return this.Ki.io()&&(r=Ch(r,this.Ki.no())),r.Ze()-n<t&&i-r.Ge()<t}}function wj(e){return e.slice().sort(((t,n)=>Yt(t._s())-Yt(n._s())))}var Y4;(function(e){e[e.Normal=0]="Normal",e[e.Logarithmic=1]="Logarithmic",e[e.Percentage=2]="Percentage",e[e.IndexedTo100=3]="IndexedTo100"})(Y4||(Y4={}));const W4=new pj,K4=new S0(100,1);class jV{constructor(t,n,i,r,o){this.eo=0,this.ro=null,this.sr=null,this.ho=null,this.ao={lo:!1,oo:null},this._o=!1,this.uo=0,this.co=0,this.do=new Zi,this.fo=new Zi,this.po=[],this.vo=null,this.mo=null,this.wo=null,this.Mo=null,this.bo=null,this.Ja=K4,this.So=Z1(null),this.xo=t,this.Ps=n,this.Co=i,this.yo=r,this.ko=o,this.Po=new G4(this,100,this.To.bind(this),this.Ro.bind(this))}ol(){return this.xo}N(){return this.Ps}cr(t){if(fa(this.Ps,t),this._l(),t.mode!==void 0&&this.Do({ae:t.mode}),t.scaleMargins!==void 0){const n=Vr(t.scaleMargins.top),i=Vr(t.scaleMargins.bottom);if(n<0||n>1)throw new Error(`Invalid top margin - expect value between 0 and 1, given=${n}`);if(i<0||i>1)throw new Error(`Invalid bottom margin - expect value between 0 and 1, given=${i}`);if(n+i>1)throw new Error(`Invalid margins - sum of margins must be less than 1, given=${n+i}`);this.Io(),this.wo=null}}Vo(){return this.Ps.autoScale}Bo(){return this._o}io(){return this.Ps.mode===1}He(){return this.Ps.mode===2}Eo(){return this.Ps.mode===3}no(){return this.So}ae(){return{ln:this.Ps.autoScale,Ao:this.Ps.invertScale,ae:this.Ps.mode}}Do(t){const n=this.ae();let i=null;t.ln!==void 0&&(this.Ps.autoScale=t.ln),t.ae!==void 0&&(this.Ps.mode=t.ae,t.ae!==2&&t.ae!==3||(this.Ps.autoScale=!0),this.ao.lo=!1),n.ae===1&&t.ae!==n.ae&&((function(o,c){if(o===null)return!1;const u=af(o.Ze(),c),h=af(o.Ge(),c);return isFinite(u)&&isFinite(h)})(this.sr,this.So)?(i=Ch(this.sr,this.So),i!==null&&this.Lo(i)):this.Ps.autoScale=!0),t.ae===1&&t.ae!==n.ae&&(i=qd(this.sr,this.So),i!==null&&this.Lo(i));const r=n.ae!==this.Ps.mode;r&&(n.ae===2||this.He())&&this._l(),r&&(n.ae===3||this.Eo())&&this._l(),t.Ao!==void 0&&n.Ao!==t.Ao&&(this.Ps.invertScale=t.Ao,this.zo()),this.fo.p(n,this.ae())}Oo(){return this.fo}k(){return this.Co.fontSize}$t(){return this.eo}No(t){this.eo!==t&&(this.eo=t,this.Io(),this.wo=null)}Fo(){if(this.ro)return this.ro;const t=this.$t()-this.Wo()-this.Ho();return this.ro=t,t}er(){return this.Uo(),this.sr}Lo(t,n){const i=this.sr;(n||i===null&&t!==null||i!==null&&!i.Ye(t))&&(this.wo=null,this.sr=t)}$o(t){this.Lo(t),this.qo(t!==null)}Gi(){return this.Uo(),this.eo===0||!this.sr||this.sr.Gi()}jo(t){return this.Ao()?t:this.$t()-1-t}Nt(t,n){return this.He()?t=Ah(t,n):this.Eo()&&(t=rf(t,n)),this.Ro(t,n)}Yo(t,n,i){this.Uo();const r=this.Ho(),o=Yt(this.er()),c=o.Ze(),u=o.Ge(),h=this.Fo()-1,d=this.Ao(),p=h/(u-c),v=i===void 0?0:i.from,S=i===void 0?t.length:i.to,b=this.Ko();for(let _=v;_<S;_++){const A=t[_],j=A.gt;if(isNaN(j))continue;let E=j;b!==null&&(E=b(A.gt,n));const L=r+p*(E-c),D=d?L:this.eo-1-L;A.ut=D}}Zo(t,n,i){this.Uo();const r=this.Ho(),o=Yt(this.er()),c=o.Ze(),u=o.Ge(),h=this.Fo()-1,d=this.Ao(),p=h/(u-c),v=i===void 0?0:i.from,S=i===void 0?t.length:i.to,b=this.Ko();for(let _=v;_<S;_++){const A=t[_];let j=A.Hr,E=A.Ur,L=A.$r,D=A.qr;b!==null&&(j=b(A.Hr,n),E=b(A.Ur,n),L=b(A.$r,n),D=b(A.qr,n));let z=r+p*(j-c),$=d?z:this.eo-1-z;A.Go=$,z=r+p*(E-c),$=d?z:this.eo-1-z,A.Xo=$,z=r+p*(L-c),$=d?z:this.eo-1-z,A.Jo=$,z=r+p*(D-c),$=d?z:this.eo-1-z,A.Qo=$}}Ds(t,n){const i=this.To(t,n);return this.t_(i,n)}t_(t,n){let i=t;return this.He()?i=(function(r,o){return o<0&&(r=-r),r/100*o+o})(i,n):this.Eo()&&(i=(function(r,o){return r-=100,o<0&&(r=-r),r/100*o+o})(i,n)),i}Sl(){return this.po}Dt(){return this.mo||(this.mo=wj(this.po)),this.mo}i_(t){this.po.indexOf(t)===-1&&(this.po.push(t),this._l(),this.s_())}n_(t){const n=this.po.indexOf(t);if(n===-1)throw new Error("source is not attached to scale");this.po.splice(n,1),this.po.length===0&&(this.Do({ln:!0}),this.Lo(null)),this._l(),this.s_()}Lt(){let t=null;for(const n of this.po){const i=n.Lt();i!==null&&(t===null||i.Ea<t.Ea)&&(t=i)}return t===null?null:t.Wt}Ao(){return this.Ps.invertScale}Vl(){const t=this.Lt()===null;if(this.wo!==null&&(t||this.wo.e_===t))return this.wo.Vl;this.Po.Ul();const n=this.Po.Vl();return this.wo={Vl:n,e_:t},this.do.p(),n}r_(){return this.do}h_(t){this.He()||this.Eo()||this.Mo===null&&this.ho===null&&(this.Gi()||(this.Mo=this.eo-t,this.ho=Yt(this.er()).Ke()))}a_(t){if(this.He()||this.Eo()||this.Mo===null)return;this.Do({ln:!1}),(t=this.eo-t)<0&&(t=0);let n=(this.Mo+.2*(this.eo-1))/(t+.2*(this.eo-1));const i=Yt(this.ho).Ke();n=Math.max(n,.1),i.Je(n),this.Lo(i)}l_(){this.He()||this.Eo()||(this.Mo=null,this.ho=null)}o_(t){this.Vo()||this.bo===null&&this.ho===null&&(this.Gi()||(this.bo=t,this.ho=Yt(this.er()).Ke()))}__(t){if(this.Vo()||this.bo===null)return;const n=Yt(this.er()).Xe()/(this.Fo()-1);let i=t-this.bo;this.Ao()&&(i*=-1);const r=i*n,o=Yt(this.ho).Ke();o.Qe(r),this.Lo(o,!0),this.wo=null}u_(){this.Vo()||this.bo!==null&&(this.bo=null,this.ho=null)}Xa(){return this.Ja||this._l(),this.Ja}Ji(t,n){switch(this.Ps.mode){case 2:return this.c_(Ah(t,n));case 3:return this.Xa().format(rf(t,n));default:return this.lr(t)}}Ql(t){switch(this.Ps.mode){case 2:return this.c_(t);case 3:return this.Xa().format(t);default:return this.lr(t)}}Xl(t){switch(this.Ps.mode){case 2:return this.d_(t);case 3:return this.Xa().formatTickmarks(t);default:return this.f_(t)}}Ma(t){return this.lr(t,Yt(this.vo).Xa())}ba(t,n){return t=Ah(t,n),this.c_(t,W4)}p_(){return this.po}v_(t){this.ao={oo:t,lo:!1}}Ws(){this.po.forEach((t=>t.Ws()))}jl(){return this.Ps.ensureEdgeTickMarksVisible&&this.Vo()}Kl(){return this.k()/2}_l(){this.wo=null;let t=1/0;this.vo=null;for(const i of this.po)i._s()<t&&(t=i._s(),this.vo=i);let n=100;this.vo!==null&&(n=Math.round(this.vo.qh())),this.Ja=K4,this.He()?(this.Ja=W4,n=100):this.Eo()?(this.Ja=new S0(100,1),n=100):this.vo!==null&&(this.Ja=this.vo.Xa()),this.Po=new G4(this,n,this.To.bind(this),this.Ro.bind(this)),this.Po.Ul()}s_(){this.mo=null}m_(){return this.vo===null||this.He()||this.Eo()?1:1/this.vo.qh()}Xi(){return this.ko}qo(t){this._o=t}Wo(){return this.Ao()?this.Ps.scaleMargins.bottom*this.$t()+this.co:this.Ps.scaleMargins.top*this.$t()+this.uo}Ho(){return this.Ao()?this.Ps.scaleMargins.top*this.$t()+this.uo:this.Ps.scaleMargins.bottom*this.$t()+this.co}Uo(){this.ao.lo||(this.ao.lo=!0,this.w_())}Io(){this.ro=null}Ro(t,n){if(this.Uo(),this.Gi())return 0;t=this.io()&&t?Kp(t,this.So):t;const i=Yt(this.er()),r=this.Ho()+(this.Fo()-1)*(t-i.Ze())/i.Xe();return this.jo(r)}To(t,n){if(this.Uo(),this.Gi())return 0;const i=this.jo(t),r=Yt(this.er()),o=r.Ze()+r.Xe()*((i-this.Ho())/(this.Fo()-1));return this.io()?af(o,this.So):o}zo(){this.wo=null,this.Po.Ul()}w_(){if(this.Bo()&&!this.Vo())return;const t=this.ao.oo;if(t===null)return;let n=null;const i=this.p_();let r=0,o=0;for(const h of i){if(!h.It())continue;const d=h.Lt();if(d===null)continue;const p=h.ra(t.Aa(),t.bi());let v=p&&p.er();if(v!==null){switch(this.Ps.mode){case 1:v=qd(v,this.So);break;case 2:v=CV(v,d.Wt);break;case 3:v=_V(v,d.Wt)}if(n=n===null?v:n.Sn(Yt(v)),p!==null){const S=p.rr();S!==null&&(r=Math.max(r,S.above),o=Math.max(o,S.below))}}}if(this.jl()&&(r=Math.max(r,this.Kl()),o=Math.max(o,this.Kl())),r===this.uo&&o===this.co||(this.uo=r,this.co=o,this.wo=null,this.Io()),n!==null){if(n.Ze()===n.Ge()){const h=5*this.m_();this.io()&&(n=Ch(n,this.So)),n=new vr(n.Ze()-h,n.Ge()+h),this.io()&&(n=qd(n,this.So))}if(this.io()){const h=Ch(n,this.So),d=Z1(h);if(c=d,u=this.So,c.Bl!==u.Bl||c.El!==u.El){const p=this.ho!==null?Ch(this.ho,this.So):null;this.So=d,n=qd(h,d),p!==null&&(this.ho=qd(p,d))}}this.Lo(n)}else this.sr===null&&(this.Lo(new vr(-.5,.5)),this.So=Z1(null));var c,u}Ko(){return this.He()?Ah:this.Eo()?rf:this.io()?t=>Kp(t,this.So):null}g_(t,n,i){return n===void 0?(i===void 0&&(i=this.Xa()),i.format(t)):n(t)}M_(t,n,i){return n===void 0?(i===void 0&&(i=this.Xa()),i.formatTickmarks(t)):n(t)}lr(t,n){return this.g_(t,this.yo.priceFormatter,n)}f_(t,n){const i=this.yo.priceFormatter;return this.M_(t,this.yo.tickmarksPriceFormatter??(i?r=>r.map(i):void 0),n)}c_(t,n){return this.g_(t,this.yo.percentageFormatter,n)}d_(t,n){const i=this.yo.percentageFormatter;return this.M_(t,this.yo.tickmarksPercentageFormatter??(i?r=>r.map(i):void 0),n)}}function X4(e){return e instanceof N0}class Q4{constructor(t,n){this.po=[],this.b_=new Map,this.eo=0,this.S_=0,this.x_=1,this.mo=null,this.C_=!1,this.y_=new Zi,this.ua=[],this.Jh=t,this.ns=n,this.k_=new AV(this);const i=n.N();this.P_=this.T_("left",i.leftPriceScale),this.R_=this.T_("right",i.rightPriceScale),this.P_.Oo().i(this.D_.bind(this,this.P_),this),this.R_.Oo().i(this.D_.bind(this,this.R_),this),this.I_(i)}I_(t){if(t.leftPriceScale&&this.P_.cr(t.leftPriceScale),t.rightPriceScale&&this.R_.cr(t.rightPriceScale),t.localization&&(this.P_._l(),this.R_._l()),t.overlayPriceScales){const n=Array.from(this.b_.values());for(const i of n){const r=Yt(i[0].Ft());r.cr(t.overlayPriceScales),t.localization&&r._l()}}}V_(t){switch(t){case"left":return this.P_;case"right":return this.R_}return this.b_.has(t)?Vr(this.b_.get(t))[0].Ft():null}m(){this.Qt().B_().u(this),this.P_.Oo().u(this),this.R_.Oo().u(this),this.po.forEach((t=>{t.m&&t.m()})),this.ua=this.ua.filter((t=>{const n=t.Gh();return n.detached&&n.detached(),!1})),this.y_.p()}E_(){return this.x_}A_(t){this.x_=t}Qt(){return this.ns}ss(){return this.S_}$t(){return this.eo}L_(t){this.S_=t,this.z_()}No(t){this.eo=t,this.P_.No(t),this.R_.No(t),this.po.forEach((n=>{if(this.Zn(n)){const i=n.Ft();i!==null&&i.No(t)}})),this.z_()}O_(t){this.C_=t}N_(){return this.C_}F_(){return this.po.filter(X4)}Sl(){return this.po}Zn(t){const n=t.Ft();return n===null||this.P_!==n&&this.R_!==n}i_(t,n,i){this.W_(t,n,i?t._s():this.po.length)}n_(t,n){const i=this.po.indexOf(t);Is(i!==-1,"removeDataSource: invalid data source"),this.po.splice(i,1),n||this.po.forEach(((c,u)=>c.us(u)));const r=Yt(t.Ft()).ol();if(this.b_.has(r)){const c=Vr(this.b_.get(r)),u=c.indexOf(t);u!==-1&&(c.splice(u,1),c.length===0&&this.b_.delete(r))}const o=t.Ft();o&&o.Sl().indexOf(t)>=0&&(o.n_(t),this.H_(o)),this.mo=null}Xn(t){return t===this.P_?"left":t===this.R_?"right":"overlay"}U_(){return this.P_}q_(){return this.R_}j_(t,n){t.h_(n)}Y_(t,n){t.a_(n),this.z_()}K_(t){t.l_()}Z_(t,n){t.o_(n)}G_(t,n){t.__(n),this.z_()}X_(t){t.u_()}z_(){this.po.forEach((t=>{t.Ws()}))}Rs(){let t=null;return this.ns.N().rightPriceScale.visible&&this.R_.Sl().length!==0?t=this.R_:this.ns.N().leftPriceScale.visible&&this.P_.Sl().length!==0?t=this.P_:this.po.length!==0&&(t=this.po[0].Ft()),t===null&&(t=this.R_),t}Gn(){let t=null;return this.ns.N().rightPriceScale.visible?t=this.R_:this.ns.N().leftPriceScale.visible&&(t=this.P_),t}H_(t){t!==null&&t.Vo()&&this.J_(t)}Q_(t){const n=this.Jh.Ie();t.Do({ln:!0}),n!==null&&t.v_(n),this.z_()}tu(){this.J_(this.P_),this.J_(this.R_)}iu(){this.H_(this.P_),this.H_(this.R_),this.po.forEach((t=>{this.Zn(t)&&this.H_(t.Ft())})),this.z_(),this.ns.dr()}Dt(){return this.mo===null&&(this.mo=wj(this.po)),this.mo}su(t,n){n=sf(n,0,this.po.length-1);const i=this.po.indexOf(t);Is(i!==-1,"setSeriesOrder: invalid data source"),this.po.splice(i,1),this.po.splice(n,0,t),this.po.forEach(((r,o)=>r.us(o))),this.mo=null;for(const r of[this.P_,this.R_])r.s_(),r._l();this.ns.dr()}Vt(){return this.Dt().filter(X4)}nu(){return this.y_}eu(){return this.k_}nl(t){this.ua.push(new hV(t))}el(t){this.ua=this.ua.filter((n=>n.Gh()!==t)),t.detached&&t.detached(),this.ns.dr()}ru(){return this.ua}Za(t,n){return this.ua.map((i=>i.Qn(t,n))).filter((i=>i!==null))}J_(t){const n=t.p_();if(n&&n.length>0&&!this.Jh.Gi()){const i=this.Jh.Ie();i!==null&&t.v_(i)}t.Ws()}W_(t,n,i){let r=this.V_(n);if(r===null&&(r=this.T_(n,this.ns.N().overlayPriceScales)),this.po.splice(i,0,t),!w0(n)){const o=this.b_.get(n)||[];o.push(t),this.b_.set(n,o)}t.us(i),r.i_(t),t.cs(r),this.H_(r),this.mo=null}D_(t,n,i){n.ae!==i.ae&&this.J_(t)}T_(t,n){const i={visible:!0,autoScale:!0,...Pl(n)},r=new jV(t,i,this.ns.N().layout,this.ns.N().localization,this.ns.Xi());return r.No(this.$t()),r}}function np(e){return{hu:e.hu,au:{te:e.lu.externalId},ou:e.lu.cursorStyle}}function EV(e,t,n,i){for(const r of e){const o=r.Tt(i);if(o!==null&&o.Qn){const c=o.Qn(t,n);if(c!==null)return{_u:r,au:c}}}return null}function MV(e){return e.Ys!==void 0}function Sj(e,t,n){const i=[e,...e.Dt()],r=(function(o,c,u){let h,d;for(const S of o){const b=S.Za?.(c,u)??[];for(const _ of b)p=_.zOrder,v=h?.zOrder,(!v||p==="top"&&v!=="top"||p==="normal"&&v==="bottom")&&(h=_,d=S)}var p,v;return h&&d?{lu:h,hu:d}:null})(i,t,n);if(r?.lu.zOrder==="top")return np(r);for(const o of i){if(r&&r.hu===o&&r.lu.zOrder!=="bottom"&&!r.lu.isBackground)return np(r);if(MV(o)){const c=EV(o.Ys(e),t,n,e);if(c!==null)return{hu:o,_u:c._u,au:c.au}}if(r&&r.hu===o&&r.lu.zOrder!=="bottom"&&r.lu.isBackground)return np(r)}return r?.lu?np(r):null}class TV{constructor(t,n,i=50){this.Vn=0,this.Bn=1,this.En=1,this.Ln=new Map,this.An=new Map,this.uu=t,this.cu=n,this.zn=i}du(t){const n=t.time,i=this.cu.cacheKey(n),r=this.Ln.get(i);if(r!==void 0)return r.fu;if(this.Vn===this.zn){const c=this.An.get(this.En);this.An.delete(this.En),this.Ln.delete(Vr(c)),this.En++,this.Vn--}const o=this.uu(t);return this.Ln.set(i,{fu:o,Wn:this.Bn}),this.An.set(this.Bn,i),this.Vn++,this.Bn++,o}}class of{constructor(t,n){Is(t<=n,"right should be >= left"),this.pu=t,this.vu=n}Aa(){return this.pu}bi(){return this.vu}mu(){return this.vu-this.pu+1}Ee(t){return this.pu<=t&&t<=this.vu}Ye(t){return this.pu===t.Aa()&&this.vu===t.bi()}}function Z4(e,t){return e===null||t===null?e===t:e.Ye(t)}class kV{constructor(){this.wu=new Map,this.Ln=null,this.gu=!1}Mu(t){this.gu=t,this.Ln=null}bu(t,n){this.Su(n),this.Ln=null;for(let i=n;i<t.length;++i){const r=t[i];let o=this.wu.get(r.timeWeight);o===void 0&&(o=[],this.wu.set(r.timeWeight,o)),o.push({index:i,time:r.time,weight:r.timeWeight,originalTime:r.originalTime})}}xu(t,n,i,r,o){const c=Math.ceil(n/t);return this.Ln!==null&&this.Ln.Cu===c&&o===this.Ln.yu&&i===this.Ln.ku||(this.Ln={yu:o,ku:i,Vl:this.Pu(c,i,r),Cu:c}),this.Ln.Vl}Su(t){if(t===0)return void this.wu.clear();const n=[];this.wu.forEach(((i,r)=>{t<=i[0].index?n.push(r):i.splice(Vh(i,t,(o=>o.index<t)),1/0)}));for(const i of n)this.wu.delete(i)}Pu(t,n,i){let r=[];const o=c=>!n||i.has(c.index);for(const c of Array.from(this.wu.keys()).sort(((u,h)=>h-u))){if(!this.wu.get(c))continue;const u=r;r=[];const h=u.length;let d=0;const p=Vr(this.wu.get(c)),v=p.length;let S=1/0,b=-1/0;for(let _=0;_<v;_++){const A=p[_],j=A.index;for(;d<h;){const E=u[d],L=E.index;if(!(L<j&&o(E))){S=L;break}d++,r.push(E),b=L,S=1/0}if(S-j>=t&&j-b>=t&&o(A))r.push(A),b=j;else if(this.gu)return u}for(;d<h;d++)o(u[d])&&r.push(u[d])}return r}}class Oh{constructor(t){this.Tu=t}Ru(){return this.Tu===null?null:new of(Math.floor(this.Tu.Aa()),Math.ceil(this.Tu.bi()))}Du(){return this.Tu}static Iu(){return new Oh(null)}}function LV(e,t){return e.weight>t.weight?e:t}class PV{constructor(t,n,i,r){this.S_=0,this.Vu=null,this.Bu=[],this.bo=null,this.Mo=null,this.Eu=new kV,this.Au=new Map,this.Lu=Oh.Iu(),this.zu=!0,this.Ou=new Zi,this.Nu=new Zi,this.Fu=new Zi,this.Wu=null,this.Hu=null,this.Uu=new Map,this.$u=-1,this.qu=[],this.ju=1,this.Ps=n,this.yo=i,this.Yu=n.rightOffset,this.Ku=n.barSpacing,this.ns=t,this.Zu(n),this.cu=r,this.Gu(),this.Eu.Mu(n.uniformDistribution),this.Xu(),this.Ju()}N(){return this.Ps}Qu(t){fa(this.yo,t),this.tc(),this.Gu()}cr(t,n){fa(this.Ps,t),this.Ps.fixLeftEdge&&this.sc(),this.Ps.fixRightEdge&&this.nc(),t.barSpacing!==void 0&&this.ns.gn(t.barSpacing),t.rightOffset!==void 0&&this.ns.Mn(t.rightOffset),this.Zu(t),t.minBarSpacing===void 0&&t.maxBarSpacing===void 0||this.ns.gn(t.barSpacing??this.Ku),t.ignoreWhitespaceIndices!==void 0&&t.ignoreWhitespaceIndices!==this.Ps.ignoreWhitespaceIndices&&this.Ju(),this.tc(),this.Gu(),t.enableConflation===void 0&&t.conflationThresholdFactor===void 0||this.Xu(),this.Fu.p()}Is(t){return this.Bu[t]?.time??null}es(t){return this.Bu[t]??null}ec(t,n){if(this.Bu.length<1)return null;if(this.cu.key(t)>this.cu.key(this.Bu[this.Bu.length-1].time))return n?this.Bu.length-1:null;const i=Vh(this.Bu,this.cu.key(t),((r,o)=>this.cu.key(r.time)<o));return this.cu.key(t)<this.cu.key(this.Bu[i].time)?n?i:null:i}Gi(){return this.S_===0||this.Bu.length===0||this.Vu===null}rc(){return this.Bu.length>0}Ie(){return this.hc(),this.Lu.Ru()}ac(){return this.hc(),this.Lu.Du()}lc(){const t=this.Ie();if(t===null)return null;const n={from:t.Aa(),to:t.bi()};return this.oc(n)}oc(t){const n=Math.round(t.from),i=Math.round(t.to),r=Yt(this._c()),o=Yt(this.uc());return{from:Yt(this.es(Math.max(r,n))),to:Yt(this.es(Math.min(o,i)))}}cc(t){return{from:Yt(this.ec(t.from,!0)),to:Yt(this.ec(t.to,!0))}}ss(){return this.S_}L_(t){if(!isFinite(t)||t<=0||this.S_===t)return;const n=this.ac(),i=this.S_;if(this.S_=t,this.zu=!0,this.Ps.lockVisibleTimeRangeOnResize&&i!==0){const r=this.Ku*t/i;this.Ku=r}if(this.Ps.fixLeftEdge&&n!==null&&n.Aa()<=0){const r=i-t;this.Yu-=Math.round(r/this.Ku)+1,this.zu=!0}this.dc(),this.fc()}qt(t){if(this.Gi()||!Nf(t))return 0;const n=this.vc()+this.Yu-t;return this.S_-(n+.5)*this.Ku-1}mc(t,n){const i=this.vc(),r=n===void 0?0:n.from,o=n===void 0?t.length:n.to;for(let c=r;c<o;c++){const u=t[c].wt,h=i+this.Yu-u,d=this.S_-(h+.5)*this.Ku-1;t[c]._t=d}}wc(t,n){const i=Math.ceil(this.gc(t));return n&&this.Ps.ignoreWhitespaceIndices&&!this.Mc(i)?this.bc(i):i}Mn(t){this.zu=!0,this.Yu=t,this.fc(),this.ns.Sc(),this.ns.dr()}ul(){return this.Ku}gn(t){const n=this.Ku;if(this.xc(t),this.Ps.rightOffsetPixels!==void 0&&n!==0){const i=this.Yu*n/this.Ku;this.Yu=i}this.fc(),this.ns.Sc(),this.ns.dr()}Cc(){return this.Yu}Vl(){if(this.Gi())return null;if(this.Hu!==null)return this.Hu;const t=this.Ku,n=5*(this.ns.N().layout.fontSize+4)/8*(this.Ps.tickMarkMaxCharacterLength||8),i=Math.round(n/t),r=Yt(this.Ie()),o=Math.max(r.Aa(),r.Aa()-i),c=Math.max(r.bi(),r.bi()-i),u=this.Eu.xu(t,n,this.Ps.ignoreWhitespaceIndices,this.Uu,this.$u),h=this._c()+i,d=this.uc()-i,p=this.yc(),v=this.Ps.fixLeftEdge||p,S=this.Ps.fixRightEdge||p;let b=0;for(const _ of u){if(!(o<=_.index&&_.index<=c))continue;let A;b<this.qu.length?(A=this.qu[b],A.coord=this.qt(_.index),A.label=this.kc(_),A.weight=_.weight):(A={needAlignCoordinate:!1,coord:this.qt(_.index),label:this.kc(_),weight:_.weight},this.qu.push(A)),this.Ku>n/2&&!p?A.needAlignCoordinate=!1:A.needAlignCoordinate=v&&_.index<=h||S&&_.index>=d,b++}return this.qu.length=b,this.Hu=this.qu,this.qu}Pc(){let t;this.zu=!0,this.gn(this.Ps.barSpacing),t=this.Ps.rightOffsetPixels!==void 0?this.Ps.rightOffsetPixels/this.ul():this.Ps.rightOffset,this.Mn(t)}Tc(t){this.zu=!0,this.Vu=t,this.fc(),this.sc()}Rc(t,n){const i=this.gc(t),r=this.ul(),o=r+n*(r/10);this.gn(o),this.Ps.rightBarStaysOnScroll||this.Mn(this.Cc()+(i-this.gc(t)))}h_(t){this.bo&&this.u_(),this.Mo===null&&this.Wu===null&&(this.Gi()||(this.Mo=t,this.Dc()))}a_(t){if(this.Wu===null)return;const n=sf(this.S_-t,0,this.S_),i=sf(this.S_-Yt(this.Mo),0,this.S_);n!==0&&i!==0&&this.gn(this.Wu.ul*n/i)}l_(){this.Mo!==null&&(this.Mo=null,this.Ic())}o_(t){this.bo===null&&this.Wu===null&&(this.Gi()||(this.bo=t,this.Dc()))}__(t){if(this.bo===null)return;const n=(this.bo-t)/this.ul();this.Yu=Yt(this.Wu).Cc+n,this.zu=!0,this.fc()}u_(){this.bo!==null&&(this.bo=null,this.Ic())}Vc(){this.Bc(this.Ps.rightOffset)}Bc(t,n=400){if(!isFinite(t))throw new RangeError("offset is required and must be finite number");if(!isFinite(n)||n<=0)throw new RangeError("animationDuration (optional) must be finite positive number");const i=this.Yu,r=performance.now();this.ns.vn({Ec:o=>(o-r)/n>=1,Ac:o=>{const c=(o-r)/n;return c>=1?t:i+(t-i)*c}})}kt(t,n){this.zu=!0,this.Bu=t,this.Eu.bu(t,n),this.fc()}Lc(){return this.Ou}zc(){return this.Nu}Oc(){return this.Fu}vc(){return this.Vu||0}Nc(t,n){const i=t.mu(),r=n&&this.Ps.rightOffsetPixels||0;this.xc((this.S_-r)/i),this.Yu=t.bi()-this.vc(),n&&(this.Yu=r?r/this.ul():this.Ps.rightOffset),this.fc(),this.zu=!0,this.ns.Sc(),this.ns.dr()}Fc(){const t=this._c(),n=this.uc();if(t===null||n===null)return;const i=!this.Ps.rightOffsetPixels&&this.Ps.rightOffset||0;this.Nc(new of(t,n+i),!0)}Wc(t){const n=new of(t.from,t.to);this.Nc(n)}rs(t){return this.yo.timeFormatter!==void 0?this.yo.timeFormatter(t.originalTime):this.cu.formatHorzItem(t.time)}Ju(){if(!this.Ps.ignoreWhitespaceIndices)return;this.Uu.clear();const t=this.ns.tn();for(const n of t)for(const i of n.ll())this.Uu.set(i,!0);this.$u++}Hc(){return this.ju}vl(){const t=1/(window.devicePixelRatio||1),n=this.Ps.minBarSpacing;if(n>=t)return[1];const i=[1];let r=2;for(;r<=512;)n<t/r&&i.push(r),r*=2;return i}yc(){const t=this.ns.N().handleScroll,n=this.ns.N().handleScale;return!(t.horzTouchDrag||t.mouseWheel||t.pressedMouseMove||t.vertTouchDrag||n.axisDoubleClickReset.time||n.axisPressedMouseMove.time||n.mouseWheel||n.pinch)}_c(){return this.Bu.length===0?null:0}uc(){return this.Bu.length===0?null:this.Bu.length-1}Uc(t){return(this.S_-1-t)/this.Ku}gc(t){const n=this.Uc(t),i=this.vc()+this.Yu-n;return Math.round(1e6*i)/1e6}xc(t){const n=this.Ku;this.Ku=t,this.dc(),n!==this.Ku&&(this.zu=!0,this.$c(),this.Xu())}hc(){if(!this.zu)return;if(this.zu=!1,this.Gi())return void this.qc(Oh.Iu());const t=this.vc(),n=this.S_/this.Ku,i=this.Yu+t,r=new of(i-n+1,i);this.qc(new Oh(r))}dc(){const t=sf(this.Ku,this.jc(),this.Yc());this.Ku!==t&&(this.Ku=t,this.zu=!0)}Yc(){return this.Ps.maxBarSpacing>0?this.Ps.maxBarSpacing:.5*this.S_}jc(){return this.Ps.fixLeftEdge&&this.Ps.fixRightEdge&&this.Bu.length!==0?this.S_/this.Bu.length:this.Ps.minBarSpacing}Xu(){if(!this.Ps.enableConflation)return void(this.ju=1);const t=1/(window.devicePixelRatio||1)*(this.Ps.conflationThresholdFactor??1);if(this.Ku>=t)return void(this.ju=1);const n=t/this.Ku,i=Math.pow(2,Math.floor(Math.log2(n)));this.ju=Math.min(i,512)}fc(){const t=this.Kc();t!==null&&this.Yu<t&&(this.Yu=t,this.zu=!0);const n=this.Zc();this.Yu>n&&(this.Yu=n,this.zu=!0)}Kc(){const t=this._c(),n=this.Vu;return t===null||n===null?null:t-n-1+(this.Ps.fixLeftEdge?this.S_/this.Ku:Math.min(2,this.Bu.length))}Zc(){return this.Ps.fixRightEdge?0:this.S_/this.Ku-Math.min(2,this.Bu.length)}Dc(){this.Wu={ul:this.ul(),Cc:this.Cc()}}Ic(){this.Wu=null}kc(t){let n=this.Au.get(t.weight);return n===void 0&&(n=new TV((i=>this.Gc(i)),this.cu),this.Au.set(t.weight,n)),n.du(t)}Gc(t){return this.cu.formatTickmark(t,this.yo)}qc(t){const n=this.Lu;this.Lu=t,Z4(n.Ru(),this.Lu.Ru())||this.Ou.p(),Z4(n.Du(),this.Lu.Du())||this.Nu.p(),this.$c()}$c(){this.Hu=null}tc(){this.$c(),this.Au.clear()}Gu(){this.cu.updateFormatter(this.yo)}sc(){if(!this.Ps.fixLeftEdge)return;const t=this._c();if(t===null)return;const n=this.Ie();if(n===null)return;const i=n.Aa()-t;if(i<0){const r=this.Yu-i-1;this.Mn(r)}this.dc()}nc(){this.fc(),this.dc()}Mc(t){return!this.Ps.ignoreWhitespaceIndices||this.Uu.get(t)||!1}bc(t){const n=(function*(r){const o=Math.round(r),c=o<r;let u=1;for(;;)c?(yield o+u,yield o-u):(yield o-u,yield o+u),u++})(t),i=this.uc();for(;i;){const r=n.next().value;if(this.Uu.get(r))return r;if(r<0||r>i)break}return t}Zu(t){if(t.rightOffsetPixels!==void 0){const n=t.rightOffsetPixels/(t.barSpacing||this.Ku);this.ns.Mn(n)}}}var J4,tS,eS,d2,nS;(function(e){e[e.OnTouchEnd=0]="OnTouchEnd",e[e.OnNextTap=1]="OnNextTap"})(J4||(J4={}));class RV{constructor(t,n,i){this.Xc=[],this.Jc=[],this.Qc=null,this.S_=0,this.td=null,this.sd=new Zi,this.nd=new Zi,this.ed=null,this.rd=t,this.Ps=n,this.cu=i,this.ko=new Tq(this.Ps.layout.colorParsers),this.hd=new Mq(this),this.Jh=new PV(this,n.timeScale,this.Ps.localization,i),this.Ct=new qq(this,n.crosshair),this.ad=new wV(n.crosshair),n.addDefaultPane&&(this.ld(0),this.Xc[0].A_(2)),this.od=this._d(0),this.ud=this._d(1)}Ca(){this.dd(Bs.yn())}dr(){this.dd(Bs.Cn())}Ua(){this.dd(new Bs(1))}ya(t){const n=this.fd(t);this.dd(n)}pd(){return this.td}vd(t){if(this.td?.hu===t?.hu&&this.td?.au?.te===t?.au?.te)return;const n=this.td;this.td=t,n!==null&&this.ya(n.hu),t!==null&&t.hu!==n?.hu&&this.ya(t.hu)}N(){return this.Ps}cr(t){fa(this.Ps,t),this.Xc.forEach((n=>n.I_(t))),t.timeScale!==void 0&&this.Jh.cr(t.timeScale),t.localization!==void 0&&this.Jh.Qu(t.localization),(t.leftPriceScale||t.rightPriceScale)&&this.sd.p(),this.od=this._d(0),this.ud=this._d(1),this.Ca()}md(t,n,i=0){const r=this.Xc[i];if(r===void 0)return;if(t==="left")return fa(this.Ps,{leftPriceScale:n}),r.I_({leftPriceScale:n}),this.sd.p(),void this.Ca();if(t==="right")return fa(this.Ps,{rightPriceScale:n}),r.I_({rightPriceScale:n}),this.sd.p(),void this.Ca();const o=this.wd(t,i);o!==null&&(o.Ft.cr(n),this.sd.p())}wd(t,n){const i=this.Xc[n];if(i===void 0)return null;const r=i.V_(t);return r!==null?{Gs:i,Ft:r}:null}Et(){return this.Jh}Xs(){return this.Xc}gd(){return this.Ct}Md(){return this.nd}bd(t,n){t.No(n),this.Sc()}L_(t){this.S_=t,this.Jh.L_(this.S_),this.Xc.forEach((n=>n.L_(t))),this.Sc()}Sd(t){this.Xc.length!==1&&(Is(t>=0&&t<this.Xc.length,"Invalid pane index"),this.Xc.splice(t,1),this.Ca())}xd(t,n){if(this.Xc.length<2)return;Is(t>=0&&t<this.Xc.length,"Invalid pane index");const i=this.Xc[t],r=this.Xc.reduce(((v,S)=>v+S.E_()),0),o=this.Xc.reduce(((v,S)=>v+S.$t()),0),c=o-30*(this.Xc.length-1);n=Math.min(c,Math.max(30,n));const u=r/o,h=i.$t();i.A_(n*u);let d=n-h,p=this.Xc.length-1;for(const v of this.Xc)if(v!==i){const S=Math.min(c,Math.max(30,v.$t()-d/p));d-=v.$t()-S,p-=1;const b=S*u;v.A_(b)}this.Ca()}Cd(t,n){Is(t>=0&&t<this.Xc.length&&n>=0&&n<this.Xc.length,"Invalid pane index");const i=this.Xc[t],r=this.Xc[n];this.Xc[t]=r,this.Xc[n]=i,this.Ca()}yd(t,n){if(Is(t>=0&&t<this.Xc.length&&n>=0&&n<this.Xc.length,"Invalid pane index"),t===n)return;const[i]=this.Xc.splice(t,1);this.Xc.splice(n,0,i),this.Ca()}j_(t,n,i){t.j_(n,i)}Y_(t,n,i){t.Y_(n,i),this.ka(),this.dd(this.kd(t,2))}K_(t,n){t.K_(n),this.dd(this.kd(t,2))}Z_(t,n,i){n.Vo()||t.Z_(n,i)}G_(t,n,i){n.Vo()||(t.G_(n,i),this.ka(),this.dd(this.kd(t,2)))}X_(t,n){n.Vo()||(t.X_(n),this.dd(this.kd(t,2)))}Q_(t,n){t.Q_(n),this.dd(this.kd(t,2))}Pd(t){this.Jh.h_(t)}Td(t,n){const i=this.Et();if(i.Gi()||n===0)return;const r=i.ss();t=Math.max(1,Math.min(t,r)),i.Rc(t,n),this.Sc()}Rd(t){this.Dd(0),this.Id(t),this.Vd()}Bd(t){this.Jh.a_(t),this.Sc()}Ed(){this.Jh.l_(),this.dr()}Dd(t){this.Jh.o_(t)}Id(t){this.Jh.__(t),this.Sc()}Vd(){this.Jh.u_(),this.dr()}tn(){return this.Jc}Us(){return this.Qc===null&&(this.Qc=this.Jc.filter((t=>t.It()))),this.Qc}xa(){this.Qc=null}Ad(t,n,i,r,o){this.Ct.Bs(t,n);let c=NaN,u=this.Jh.wc(t,!0);const h=this.Jh.Ie();h!==null&&(u=Math.min(Math.max(h.Aa(),u),h.bi())),u=this.Ct.Hs(u);const d=r.Rs(),p=d.Lt();if(p!==null&&(c=d.Ds(n,p)),c=this.ad.bl(c,u,r),this.Ct.zs(u,c,r),this.Ua(),!o){const v=Sj(r,t,n);this.vd(v&&{hu:v.hu,au:v.au,ou:v.ou||null}),this.nd.p(this.Ct.Bt(),{x:t,y:n},i)}}Ld(t,n,i){const r=i.Rs(),o=r.Lt(),c=r.Nt(t,Yt(o)),u=this.Jh.ec(n,!0),h=this.Jh.qt(Yt(u));this.Ad(h,c,null,i,!0)}zd(t){this.gd().Ns(),this.Ua(),t||this.nd.p(null,null,null)}ka(){const t=this.Ct.Gs();if(t!==null){const n=this.Ct.As(),i=this.Ct.Ls();this.Ad(n,i,null,t)}this.Ct.Ws()}Od(t,n,i){const r=this.Jh.Is(0);n!==void 0&&i!==void 0&&this.Jh.kt(n,i);const o=this.Jh.Is(0),c=this.Jh.vc(),u=this.Jh.Ie();if(u!==null&&r!==null&&o!==null){const h=u.Ee(c),d=this.cu.key(r)>this.cu.key(o),p=t!==null&&t>c&&!d,v=this.Jh.N().allowShiftVisibleRangeOnWhitespaceReplacement,S=h&&(i!==void 0||v)&&this.Jh.N().shiftVisibleRangeOnNewBar;if(p&&!S){const b=t-c;this.Jh.Mn(this.Jh.Cc()-b)}}this.Jh.Tc(t)}Ra(t){t!==null&&t.iu()}Kn(t){if((function(i){return i instanceof Q4})(t))return t;const n=this.Xc.find((i=>i.Dt().includes(t)));return n===void 0?null:n}Sc(){this.Xc.forEach((t=>t.iu())),this.ka()}m(){this.Xc.forEach((t=>t.m())),this.Xc.length=0,this.Ps.localization.priceFormatter=void 0,this.Ps.localization.percentageFormatter=void 0,this.Ps.localization.timeFormatter=void 0}Nd(){return this.hd}Jn(){return this.hd.N()}B_(){return this.sd}Fd(t,n){const i=this.ld(n);this.Wd(t,i),this.Jc.push(t),this.xa(),this.Jc.length===1?this.Ca():this.dr()}Hd(t){const n=this.Kn(t),i=this.Jc.indexOf(t);Is(i!==-1,"Series not found");const r=Yt(n);this.Jc.splice(i,1),r.n_(t),t.m&&t.m(),this.xa(),this.Jh.Ju(),this.Ud(r)}Sa(t,n){const i=Yt(this.Kn(t));i.n_(t,!0),i.i_(t,n,!0)}Fc(){const t=Bs.Cn();t.cn(),this.dd(t)}$d(t){const n=Bs.Cn();n.pn(t),this.dd(n)}wn(){const t=Bs.Cn();t.wn(),this.dd(t)}gn(t){const n=Bs.Cn();n.gn(t),this.dd(n)}Mn(t){const n=Bs.Cn();n.Mn(t),this.dd(n)}vn(t){const n=Bs.Cn();n.vn(t),this.dd(n)}dn(){const t=Bs.Cn();t.dn(),this.dd(t)}qd(){return this.Ps.rightPriceScale.visible?"right":"left"}jd(t,n){if(Is(n>=0,"Index should be greater or equal to 0"),n===this.Yd(t))return;const i=Yt(this.Kn(t));i.n_(t);const r=this.ld(n);this.Wd(t,r),i.Sl().length===0&&this.Ud(i),this.Ca()}Kd(){return this.ud}$(){return this.od}Ut(t){const n=this.ud,i=this.od;if(n===i)return n;if(t=Math.max(0,Math.min(100,Math.round(100*t))),this.ed===null||this.ed.eh!==i||this.ed.rh!==n)this.ed={eh:i,rh:n,Zd:new Map};else{const o=this.ed.Zd.get(t);if(o!==void 0)return o}const r=this.ko.tt(i,n,t/100);return this.ed.Zd.set(t,r),r}Gd(t){return this.Xc.indexOf(t)}Xi(){return this.ko}Xd(){return this.Jd()}Jd(t){const n=new Q4(this.Jh,this);this.Xc.push(n);const i=t??this.Xc.length-1,r=Bs.yn();return r.hn(i,{an:0,ln:!0}),this.dd(r),n}ld(t){return Is(t>=0,"Index should be greater or equal to 0"),(t=Math.min(this.Xc.length,t))<this.Xc.length?this.Xc[t]:this.Jd(t)}Yd(t){return this.Xc.findIndex((n=>n.F_().includes(t)))}kd(t,n){const i=new Bs(n);if(t!==null){const r=this.Xc.indexOf(t);i.hn(r,{an:n})}return i}fd(t,n){return n===void 0&&(n=2),this.kd(this.Kn(t),n)}dd(t){this.rd&&this.rd(t),this.Xc.forEach((n=>n.eu().pr().kt()))}Wd(t,n){const i=t.N().priceScaleId,r=i!==void 0?i:this.qd();n.i_(t,r),w0(r)||t.cr(t.N())}_d(t){const n=this.Ps.layout;return n.background.type==="gradient"?t===0?n.background.topColor:n.background.bottomColor:n.background.color}Ud(t){!t.N_()&&t.Sl().length===0&&this.Xc.length>1&&this.Xc.splice(this.Gd(t),1)}}function Nj(e){if(e>=1)return 0;let t=0;for(;t<8;t++){const n=Math.round(e);if(Math.abs(n-e)<1e-8)return t;e*=10}return t}function f2(e){return!qh(e)&&!Of(e)}function Aj(e){return qh(e)}(function(e){e[e.Disabled=0]="Disabled",e[e.Continuous=1]="Continuous",e[e.OnDataUpdate=2]="OnDataUpdate"})(tS||(tS={})),(function(e){e[e.LastBar=0]="LastBar",e[e.LastVisible=1]="LastVisible"})(eS||(eS={})),(function(e){e.Solid="solid",e.VerticalGradient="gradient"})(d2||(d2={})),(function(e){e[e.Year=0]="Year",e[e.Month=1]="Month",e[e.DayOfMonth=2]="DayOfMonth",e[e.Time=3]="Time",e[e.TimeWithSeconds=4]="TimeWithSeconds"})(nS||(nS={}));const iS=e=>e.getUTCFullYear();function DV(e,t,n){return t.replace(/yyyy/g,(i=>Rl(iS(i),4))(e)).replace(/yy/g,(i=>Rl(iS(i)%100,2))(e)).replace(/MMMM/g,((i,r)=>new Date(i.getUTCFullYear(),i.getUTCMonth(),1).toLocaleString(r,{month:"long"}))(e,n)).replace(/MMM/g,((i,r)=>new Date(i.getUTCFullYear(),i.getUTCMonth(),1).toLocaleString(r,{month:"short"}))(e,n)).replace(/MM/g,(i=>Rl((r=>r.getUTCMonth()+1)(i),2))(e)).replace(/dd/g,(i=>Rl((r=>r.getUTCDate())(i),2))(e))}class Cj{constructor(t="yyyy-MM-dd",n="default"){this.Qd=t,this.tf=n}du(t){return DV(t,this.Qd,this.tf)}}class OV{constructor(t){this.if=t||"%h:%m:%s"}du(t){return this.if.replace("%h",Rl(t.getUTCHours(),2)).replace("%m",Rl(t.getUTCMinutes(),2)).replace("%s",Rl(t.getUTCSeconds(),2))}}const zV={sf:"yyyy-MM-dd",nf:"%h:%m:%s",ef:" ",rf:"default"};class BV{constructor(t={}){const n={...zV,...t};this.hf=new Cj(n.sf,n.rf),this.af=new OV(n.nf),this.lf=n.ef}du(t){return`${this.hf.du(t)}${this.lf}${this.af.du(t)}`}}function ip(e){return 60*e*60*1e3}function tv(e){return 60*e*1e3}const sp=[{_f:(sS=1,1e3*sS),uf:10},{_f:tv(1),uf:20},{_f:tv(5),uf:21},{_f:tv(30),uf:22},{_f:ip(1),uf:30},{_f:ip(3),uf:31},{_f:ip(6),uf:32},{_f:ip(12),uf:33}];var sS;function rS(e,t){if(e.getUTCFullYear()!==t.getUTCFullYear())return 70;if(e.getUTCMonth()!==t.getUTCMonth())return 60;if(e.getUTCDate()!==t.getUTCDate())return 50;for(let n=sp.length-1;n>=0;--n)if(Math.floor(t.getTime()/sp[n]._f)!==Math.floor(e.getTime()/sp[n]._f))return sp[n].uf;return 0}function ev(e){let t=e;if(Of(e)&&(t=ky(e)),!f2(t))throw new Error("time must be of type BusinessDay");const n=new Date(Date.UTC(t.year,t.month-1,t.day,0,0,0,0));return{cf:Math.round(n.getTime()/1e3),df:t}}function aS(e){if(!Aj(e))throw new Error("time must be of type isUTCTimestamp");return{cf:e}}function ky(e){const t=new Date(e);if(isNaN(t.getTime()))throw new Error(`Invalid date string=${e}, expected format=yyyy-mm-dd`);return{day:t.getUTCDate(),month:t.getUTCMonth()+1,year:t.getUTCFullYear()}}function oS(e){Of(e.time)&&(e.time=ky(e.time))}class lS{options(){return this.Ps}setOptions(t){this.Ps=t,this.updateFormatter(t.localization)}preprocessData(t){Array.isArray(t)?(function(n){n.forEach(oS)})(t):oS(t)}createConverterToInternalObj(t){return Yt((function(n){return n.length===0?null:f2(n[0].time)||Of(n[0].time)?ev:aS})(t))}key(t){return typeof t=="object"&&"cf"in t?t.cf:this.key(this.convertHorzItemToInternal(t))}cacheKey(t){const n=t;return n.df===void 0?new Date(1e3*n.cf).getTime():new Date(Date.UTC(n.df.year,n.df.month-1,n.df.day)).getTime()}convertHorzItemToInternal(t){return Aj(n=t)?aS(n):f2(n)?ev(n):ev(ky(n));var n}updateFormatter(t){if(!this.Ps)return;const n=t.dateFormat;this.Ps.timeScale.timeVisible?this.ff=new BV({sf:n,nf:this.Ps.timeScale.secondsVisible?"%h:%m:%s":"%h:%m",ef:"   ",rf:t.locale}):this.ff=new Cj(n,t.locale)}formatHorzItem(t){const n=t;return this.ff.du(new Date(1e3*n.cf))}formatTickmark(t,n){const i=(function(o,c,u){switch(o){case 0:case 10:return c?u?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return c?3:2;case 50:return 2;case 60:return 1;case 70:return 0}})(t.weight,this.Ps.timeScale.timeVisible,this.Ps.timeScale.secondsVisible),r=this.Ps.timeScale;if(r.tickMarkFormatter!==void 0){const o=r.tickMarkFormatter(t.originalTime,i,n.locale);if(o!==null)return o}return(function(o,c,u){const h={};switch(c){case 0:h.year="numeric";break;case 1:h.month="short";break;case 2:h.day="numeric";break;case 3:h.hour12=!1,h.hour="2-digit",h.minute="2-digit";break;case 4:h.hour12=!1,h.hour="2-digit",h.minute="2-digit",h.second="2-digit"}const d=o.df===void 0?new Date(1e3*o.cf):new Date(Date.UTC(o.df.year,o.df.month-1,o.df.day));return new Date(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate(),d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()).toLocaleString(u,h)})(t.time,i,n.locale)}maxTickMarkWeight(t){let n=t.reduce(LV,t[0]).weight;return n>30&&n<50&&(n=30),n}fillWeightsForPoints(t,n){(function(i,r=0){if(i.length===0)return;let o=r===0?null:i[r-1].time.cf,c=o!==null?new Date(1e3*o):null,u=0;for(let h=r;h<i.length;++h){const d=i[h],p=new Date(1e3*d.time.cf);c!==null&&(d.timeWeight=rS(p,c)),u+=d.time.cf-(o||d.time.cf),o=d.time.cf,c=p}if(r===0&&i.length>1){const h=Math.ceil(u/(i.length-1)),d=new Date(1e3*(i[0].time.cf-h));i[0].timeWeight=rS(new Date(1e3*i[0].time.cf),d)}})(t,n)}static pf(t){return fa({localization:{dateFormat:"dd MMM 'yy"}},t??{})}}const Hh=typeof window<"u";function cS(){return!!Hh&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function nv(){return!!Hh&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function m2(e){return e+e%2}function FV(e){Hh&&window.chrome!==void 0&&e.addEventListener("mousedown",(t=>{if(t.button===1)return t.preventDefault(),!1}))}class A0{constructor(t,n,i){this.vf=0,this.mf=null,this.wf={_t:Number.NEGATIVE_INFINITY,ut:Number.POSITIVE_INFINITY},this.gf=0,this.Mf=null,this.bf={_t:Number.NEGATIVE_INFINITY,ut:Number.POSITIVE_INFINITY},this.Sf=null,this.xf=!1,this.Cf=null,this.yf=null,this.kf=!1,this.Pf=!1,this.Tf=!1,this.Rf=null,this.Df=null,this.If=null,this.Vf=null,this.Bf=null,this.Ef=null,this.Af=null,this.Lf=0,this.zf=!1,this.Of=!1,this.Nf=!1,this.Ff=0,this.Wf=null,this.Hf=!nv(),this.Uf=r=>{this.$f(r)},this.qf=r=>{if(this.jf(r)){const o=this.Yf(r);if(++this.gf,this.Mf&&this.gf>1){const{Kf:c}=this.Zf(Uo(r),this.bf);c<30&&!this.Tf&&this.Gf(o,this.Jf.Xf),this.Qf()}}else{const o=this.Yf(r);if(++this.vf,this.mf&&this.vf>1){const{Kf:c}=this.Zf(Uo(r),this.wf);c<5&&!this.Pf&&this.tp(o,this.Jf.ip),this.sp()}}},this.np=t,this.Jf=n,this.Ps=i,this.ep()}m(){this.Rf!==null&&(this.Rf(),this.Rf=null),this.Df!==null&&(this.Df(),this.Df=null),this.Vf!==null&&(this.Vf(),this.Vf=null),this.Bf!==null&&(this.Bf(),this.Bf=null),this.Ef!==null&&(this.Ef(),this.Ef=null),this.If!==null&&(this.If(),this.If=null),this.rp(),this.sp()}hp(t){this.Vf&&this.Vf();const n=this.ap.bind(this);if(this.Vf=()=>{this.np.removeEventListener("mousemove",n)},this.np.addEventListener("mousemove",n),this.jf(t))return;const i=this.Yf(t);this.tp(i,this.Jf.lp),this.Hf=!0}sp(){this.mf!==null&&clearTimeout(this.mf),this.vf=0,this.mf=null,this.wf={_t:Number.NEGATIVE_INFINITY,ut:Number.POSITIVE_INFINITY}}Qf(){this.Mf!==null&&clearTimeout(this.Mf),this.gf=0,this.Mf=null,this.bf={_t:Number.NEGATIVE_INFINITY,ut:Number.POSITIVE_INFINITY}}ap(t){if(this.Nf||this.yf!==null||this.jf(t))return;const n=this.Yf(t);this.tp(n,this.Jf.op),this.Hf=!0}_p(t){const n=iv(t.changedTouches,Yt(this.Wf));if(n===null||(this.Ff=rp(t),this.Af!==null)||this.Of)return;this.zf=!0;const i=this.Zf(Uo(n),Yt(this.yf)),{up:r,cp:o,Kf:c}=i;if(this.kf||!(c<5)){if(!this.kf){const u=.5*r,h=o>=u&&!this.Ps.dp(),d=u>o&&!this.Ps.fp();h||d||(this.Of=!0),this.kf=!0,this.Tf=!0,this.rp(),this.Qf()}if(!this.Of){const u=this.Yf(t,n);this.Gf(u,this.Jf.pp),mh(t)}}}vp(t){if(t.button!==0)return;const n=this.Zf(Uo(t),Yt(this.Cf)),{Kf:i}=n;if(i>=5&&(this.Pf=!0,this.sp()),this.Pf){const r=this.Yf(t);this.tp(r,this.Jf.mp)}}Zf(t,n){const i=Math.abs(n._t-t._t),r=Math.abs(n.ut-t.ut);return{up:i,cp:r,Kf:i+r}}wp(t){let n=iv(t.changedTouches,Yt(this.Wf));if(n===null&&t.touches.length===0&&(n=t.changedTouches[0]),n===null)return;this.Wf=null,this.Ff=rp(t),this.rp(),this.yf=null,this.Ef&&(this.Ef(),this.Ef=null);const i=this.Yf(t,n);if(this.Gf(i,this.Jf.gp),++this.gf,this.Mf&&this.gf>1){const{Kf:r}=this.Zf(Uo(n),this.bf);r<30&&!this.Tf&&this.Gf(i,this.Jf.Xf),this.Qf()}else this.Tf||(this.Gf(i,this.Jf.Mp),this.Jf.Mp&&mh(t));this.gf===0&&mh(t),t.touches.length===0&&this.xf&&(this.xf=!1,mh(t))}$f(t){if(t.button!==0)return;const n=this.Yf(t);if(this.Cf=null,this.Nf=!1,this.Bf&&(this.Bf(),this.Bf=null),cS()&&this.np.ownerDocument.documentElement.removeEventListener("mouseleave",this.Uf),!this.jf(t))if(this.tp(n,this.Jf.bp),++this.vf,this.mf&&this.vf>1){const{Kf:i}=this.Zf(Uo(t),this.wf);i<5&&!this.Pf&&this.tp(n,this.Jf.ip),this.sp()}else this.Pf||this.tp(n,this.Jf.Sp)}rp(){this.Sf!==null&&(clearTimeout(this.Sf),this.Sf=null)}xp(t){if(this.Wf!==null)return;const n=t.changedTouches[0];this.Wf=n.identifier,this.Ff=rp(t);const i=this.np.ownerDocument.documentElement;this.Tf=!1,this.kf=!1,this.Of=!1,this.yf=Uo(n),this.Ef&&(this.Ef(),this.Ef=null);{const o=this._p.bind(this),c=this.wp.bind(this);this.Ef=()=>{i.removeEventListener("touchmove",o),i.removeEventListener("touchend",c)},i.addEventListener("touchmove",o,{passive:!1}),i.addEventListener("touchend",c,{passive:!1}),this.rp(),this.Sf=setTimeout(this.Cp.bind(this,t),240)}const r=this.Yf(t,n);this.Gf(r,this.Jf.yp),this.Mf||(this.gf=0,this.Mf=setTimeout(this.Qf.bind(this),500),this.bf=Uo(n))}kp(t){if(t.button!==0)return;const n=this.np.ownerDocument.documentElement;cS()&&n.addEventListener("mouseleave",this.Uf),this.Pf=!1,this.Cf=Uo(t),this.Bf&&(this.Bf(),this.Bf=null);{const r=this.vp.bind(this),o=this.$f.bind(this);this.Bf=()=>{n.removeEventListener("mousemove",r),n.removeEventListener("mouseup",o)},n.addEventListener("mousemove",r),n.addEventListener("mouseup",o)}if(this.Nf=!0,this.jf(t))return;const i=this.Yf(t);this.tp(i,this.Jf.Pp),this.mf||(this.vf=0,this.mf=setTimeout(this.sp.bind(this),500),this.wf=Uo(t))}ep(){this.np.addEventListener("mouseenter",this.hp.bind(this)),this.np.addEventListener("touchcancel",this.rp.bind(this));{const t=this.np.ownerDocument,n=i=>{this.Jf.Tp&&(i.composed&&this.np.contains(i.composedPath()[0])||i.target&&this.np.contains(i.target)||this.Jf.Tp())};this.Df=()=>{t.removeEventListener("touchstart",n)},this.Rf=()=>{t.removeEventListener("mousedown",n)},t.addEventListener("mousedown",n),t.addEventListener("touchstart",n,{passive:!0})}nv()&&(this.If=()=>{this.np.removeEventListener("dblclick",this.qf)},this.np.addEventListener("dblclick",this.qf)),this.np.addEventListener("mouseleave",this.Rp.bind(this)),this.np.addEventListener("touchstart",this.xp.bind(this),{passive:!0}),FV(this.np),this.np.addEventListener("mousedown",this.kp.bind(this)),this.Dp(),this.np.addEventListener("touchmove",(()=>{}),{passive:!1})}Dp(){this.Jf.Ip===void 0&&this.Jf.Vp===void 0&&this.Jf.Bp===void 0||(this.np.addEventListener("touchstart",(t=>this.Ep(t.touches)),{passive:!0}),this.np.addEventListener("touchmove",(t=>{if(t.touches.length===2&&this.Af!==null&&this.Jf.Vp!==void 0){const n=uS(t.touches[0],t.touches[1])/this.Lf;this.Jf.Vp(this.Af,n),mh(t)}}),{passive:!1}),this.np.addEventListener("touchend",(t=>{this.Ep(t.touches)})))}Ep(t){t.length===1&&(this.zf=!1),t.length!==2||this.zf||this.xf?this.Ap():this.Lp(t)}Lp(t){const n=this.np.getBoundingClientRect()||{left:0,top:0};this.Af={_t:(t[0].clientX-n.left+(t[1].clientX-n.left))/2,ut:(t[0].clientY-n.top+(t[1].clientY-n.top))/2},this.Lf=uS(t[0],t[1]),this.Jf.Ip!==void 0&&this.Jf.Ip(),this.rp()}Ap(){this.Af!==null&&(this.Af=null,this.Jf.Bp!==void 0&&this.Jf.Bp())}Rp(t){if(this.Vf&&this.Vf(),this.jf(t)||!this.Hf)return;const n=this.Yf(t);this.tp(n,this.Jf.zp),this.Hf=!nv()}Cp(t){const n=iv(t.touches,Yt(this.Wf));if(n===null)return;const i=this.Yf(t,n);this.Gf(i,this.Jf.Op),this.Tf=!0,this.xf=!0}jf(t){return t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents!==void 0?t.sourceCapabilities.firesTouchEvents:rp(t)<this.Ff+500}Gf(t,n){n&&n.call(this.Jf,t)}tp(t,n){n&&n.call(this.Jf,t)}Yf(t,n){const i=n||t,r=this.np.getBoundingClientRect()||{left:0,top:0};return{clientX:i.clientX,clientY:i.clientY,pageX:i.pageX,pageY:i.pageY,screenX:i.screenX,screenY:i.screenY,localX:i.clientX-r.left,localY:i.clientY-r.top,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,Np:!t.type.startsWith("mouse")&&t.type!=="contextmenu"&&t.type!=="click",Fp:t.type,Wp:i.target,_u:t.view,Hp:()=>{t.type!=="touchstart"&&mh(t)}}}}function uS(e,t){const n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)}function mh(e){e.cancelable&&e.preventDefault()}function Uo(e){return{_t:e.pageX,ut:e.pageY}}function rp(e){return e.timeStamp||performance.now()}function iv(e,t){for(let n=0;n<e.length;++n)if(e[n].identifier===t)return e[n];return null}class IV{constructor(t,n,i){this.Up=null,this.$p=null,this.qp=!0,this.jp=null,this.Yp=t,this.Kp=t.Zp()[n],this.Gp=t.Zp()[i],this.Xp=document.createElement("tr"),this.Xp.style.height="1px",this.Jp=document.createElement("td"),this.Jp.style.position="relative",this.Jp.style.padding="0",this.Jp.style.margin="0",this.Jp.setAttribute("colspan","3"),this.Qp(),this.Xp.appendChild(this.Jp),this.qp=this.Yp.N().layout.panes.enableResize,this.qp?this.tv():(this.Up=null,this.$p=null)}m(){this.$p!==null&&this.$p.m()}iv(){return this.Xp}sv(){return Jn({width:this.Kp.sv().width,height:1})}nv(){return Jn({width:this.Kp.nv().width,height:1*window.devicePixelRatio})}ev(t,n,i){const r=this.nv();t.fillStyle=this.Yp.N().layout.panes.separatorColor,t.fillRect(n,i,r.width,r.height)}kt(){this.Qp(),this.Yp.N().layout.panes.enableResize!==this.qp&&(this.qp=this.Yp.N().layout.panes.enableResize,this.qp?this.tv():(this.Up!==null&&(this.Jp.removeChild(this.Up.rv),this.Jp.removeChild(this.Up.hv),this.Up=null),this.$p!==null&&(this.$p.m(),this.$p=null)))}tv(){const t=document.createElement("div"),n=t.style;n.position="fixed",n.display="none",n.zIndex="49",n.top="0",n.left="0",n.width="100%",n.height="100%",n.cursor="row-resize",this.Jp.appendChild(t);const i=document.createElement("div"),r=i.style;r.position="absolute",r.zIndex="50",r.top="-4px",r.height="9px",r.width="100%",r.backgroundColor="",r.cursor="row-resize",this.Jp.appendChild(i);const o={lp:this.av.bind(this),zp:this.lv.bind(this),Pp:this.ov.bind(this),yp:this.ov.bind(this),mp:this._v.bind(this),pp:this._v.bind(this),bp:this.uv.bind(this),gp:this.uv.bind(this)};this.$p=new A0(i,o,{dp:()=>!1,fp:()=>!0}),this.Up={hv:i,rv:t}}Qp(){this.Jp.style.background=this.Yp.N().layout.panes.separatorColor}av(t){this.Up!==null&&(this.Up.hv.style.backgroundColor=this.Yp.N().layout.panes.separatorHoverColor)}lv(t){this.Up!==null&&this.jp===null&&(this.Up.hv.style.backgroundColor="")}ov(t){if(this.Up===null)return;const n=this.Kp.cv().E_()+this.Gp.cv().E_(),i=n/(this.Kp.sv().height+this.Gp.sv().height),r=30*i;n<=2*r||(this.jp={dv:t.pageY,fv:this.Kp.cv().E_(),pv:n-r,vv:n,mv:i,wv:r},this.Up.rv.style.display="block")}_v(t){const n=this.jp;if(n===null)return;const i=(t.pageY-n.dv)*n.mv,r=sf(n.fv+i,n.wv,n.pv);this.Kp.cv().A_(r),this.Gp.cv().A_(n.vv-r),this.Yp.Qt().Ca()}uv(t){this.jp!==null&&this.Up!==null&&(this.jp=null,this.Up.rv.style.display="none")}}function sv(e,t){return e.gv-t.gv}function rv(e,t,n){const i=(e.gv-t.gv)/(e.wt-t.wt);return Math.sign(i)*Math.min(Math.abs(i),n)}class UV{constructor(t,n,i,r){this.Mv=null,this.bv=null,this.Sv=null,this.xv=null,this.Cv=null,this.yv=0,this.kv=0,this.Pv=t,this.Tv=n,this.Rv=i,this.kn=r}Dv(t,n){if(this.Mv!==null){if(this.Mv.wt===n)return void(this.Mv.gv=t);if(Math.abs(this.Mv.gv-t)<this.kn)return}this.xv=this.Sv,this.Sv=this.bv,this.bv=this.Mv,this.Mv={wt:n,gv:t}}fe(t,n){if(this.Mv===null||this.bv===null||n-this.Mv.wt>50)return;let i=0;const r=rv(this.Mv,this.bv,this.Tv),o=sv(this.Mv,this.bv),c=[r],u=[o];if(i+=o,this.Sv!==null){const d=rv(this.bv,this.Sv,this.Tv);if(Math.sign(d)===Math.sign(r)){const p=sv(this.bv,this.Sv);if(c.push(d),u.push(p),i+=p,this.xv!==null){const v=rv(this.Sv,this.xv,this.Tv);if(Math.sign(v)===Math.sign(r)){const S=sv(this.Sv,this.xv);c.push(v),u.push(S),i+=S}}}}let h=0;for(let d=0;d<c.length;++d)h+=u[d]/i*c[d];Math.abs(h)<this.Pv||(this.Cv={gv:t,wt:n},this.kv=h,this.yv=(function(d,p){const v=Math.log(p);return Math.log(1*v/-d)/v})(Math.abs(h),this.Rv))}Ac(t){const n=Yt(this.Cv),i=t-n.wt;return n.gv+this.kv*(Math.pow(this.Rv,i)-1)/Math.log(this.Rv)}Ec(t){return this.Cv===null||this.Iv(t)===this.yv}Iv(t){const n=t-Yt(this.Cv).wt;return Math.min(n,this.yv)}}class qV{constructor(t,n){this.Vv=void 0,this.Bv=void 0,this.Ev=void 0,this.ws=!1,this.Av=t,this.Lv=n,this.zv()}kt(){this.zv()}Ov(){this.Vv&&this.Av.removeChild(this.Vv),this.Bv&&this.Av.removeChild(this.Bv),this.Vv=void 0,this.Bv=void 0}Nv(){return this.ws!==this.Fv()||this.Ev!==this.Wv()}Wv(){return this.Lv.Qt().Xi().J(this.Lv.N().layout.textColor)>160?"dark":"light"}Fv(){return this.Lv.N().layout.attributionLogo}Hv(){const t=new URL(location.href);return t.hostname?"&utm_source="+t.hostname+t.pathname:""}zv(){this.Nv()&&(this.Ov(),this.ws=this.Fv(),this.ws&&(this.Ev=this.Wv(),this.Bv=document.createElement("style"),this.Bv.innerText="a#tv-attr-logo{--fill:#131722;--stroke:#fff;position:absolute;left:10px;bottom:10px;height:19px;width:35px;margin:0;padding:0;border:0;z-index:3;}a#tv-attr-logo[data-dark]{--fill:#D1D4DC;--stroke:#131722;}",this.Vv=document.createElement("a"),this.Vv.href=`https://www.tradingview.com/?utm_medium=lwc-link&utm_campaign=lwc-chart${this.Hv()}`,this.Vv.title="Charting by TradingView",this.Vv.id="tv-attr-logo",this.Vv.target="_blank",this.Vv.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="35" height="19" fill="none"><g fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path fill="var(--stroke)" d="M2 0H0v10h6v9h21.4l.5-1.3 6-15 1-2.7H23.7l-.5 1.3-.2.6a5 5 0 0 0-7-.9V0H2Zm20 17h4l5.2-13 .8-2h-7l-1 2.5-.2.5-1.5 3.8-.3.7V17Zm-.8-10a3 3 0 0 0 .7-2.7A3 3 0 1 0 16.8 7h4.4ZM14 7V2H2v6h6v9h4V7h2Z"/><path fill="var(--fill)" d="M14 2H2v6h6v9h6V2Zm12 15h-7l6-15h7l-6 15Zm-7-9a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></g><defs><clipPath id="a"><path fill="var(--stroke)" d="M0 0h35v19H0z"/></clipPath></defs></svg>',this.Vv.toggleAttribute("data-dark",this.Ev==="dark"),this.Av.appendChild(this.Bv),this.Av.appendChild(this.Vv)))}}function bu(e,t){const n=Yt(e.ownerDocument).createElement("canvas");e.appendChild(n);const i=Cq(n,{options:{allowResizeObserver:!0},transform:(r,o)=>({width:Math.max(r.width,o.width),height:Math.max(r.height,o.height)})});return i.resizeCanvasElement(t),i}function xu(e){e.width=1,e.height=1,e.getContext("2d")?.clearRect(0,0,1,1)}function p2(e,t,n,i){e.Uh&&e.Uh(t,n,i)}function Ap(e,t,n,i){e.nt(t,n,i)}function g2(e,t,n,i){const r=e(n,i);for(const o of r){const c=o.Tt(i);c!==null&&t(c)}}function av(e,t){return n=>(function(i){return i.Ft!==void 0})(n)?(n.Ft()?.ol()??"")!==t?[]:n.Ya?.(e)??[]:[]}function hS(e,t,n,i){if(!e.length)return;let r=0;const o=e[0].$t(i,!0);let c=t===1?n/2-(e[0].Hi()-o/2):e[0].Hi()-o/2-n/2;c=Math.max(0,c);for(let u=1;u<e.length;u++){const h=e[u],d=e[u-1],p=d.$t(i,!1),v=h.Hi(),S=d.Hi();if(t===1?v>S-p:v<S+p){const b=S-p*t;h.Ui(b);const _=b-t*p/2;if((t===1?_<0:_>n)&&c>0){const A=t===1?-1-_:_-n,j=Math.min(A,c);for(let E=r;E<e.length;E++)e[E].Ui(e[E].Hi()+t*j);c-=j}}else r=u,c=t===1?S-p-v:v-(S+p)}}class dS{constructor(t,n,i,r){this.Ki=null,this.Uv=null,this.$v=!1,this.qv=new Gp(200),this.jv=null,this.Yv=0,this.Kv=!1,this.Zv=()=>{this.Kv||this.yt.Gv().Qt().dr()},this.Xv=()=>{this.Kv||this.yt.Gv().Qt().dr()},this.yt=t,this.Ps=n,this.Co=n.layout,this.hd=i,this.Jv=r==="left",this.Qv=av("normal",r),this.tm=av("top",r),this.im=av("bottom",r),this.Jp=document.createElement("div"),this.Jp.style.height="100%",this.Jp.style.overflow="hidden",this.Jp.style.width="25px",this.Jp.style.left="0",this.Jp.style.position="relative",this.sm=bu(this.Jp,Jn({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);const o=this.sm.canvasElement;o.style.position="absolute",o.style.zIndex="1",o.style.left="0",o.style.top="0",this.nm=bu(this.Jp,Jn({width:16,height:16})),this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);const c=this.nm.canvasElement;c.style.position="absolute",c.style.zIndex="2",c.style.left="0",c.style.top="0";const u={Pp:this.ov.bind(this),yp:this.ov.bind(this),mp:this._v.bind(this),pp:this._v.bind(this),Tp:this.rm.bind(this),bp:this.uv.bind(this),gp:this.uv.bind(this),ip:this.hm.bind(this),Xf:this.hm.bind(this),lp:this.am.bind(this),zp:this.lv.bind(this)};this.$p=new A0(this.nm.canvasElement,u,{dp:()=>!this.Ps.handleScroll.vertTouchDrag,fp:()=>!0})}m(){this.$p.m(),this.nm.unsubscribeSuggestedBitmapSizeChanged(this.Xv),xu(this.nm.canvasElement),this.nm.dispose(),this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),xu(this.sm.canvasElement),this.sm.dispose(),this.Ki!==null&&this.Ki.r_().u(this),this.Ki=null}iv(){return this.Jp}k(){return this.Co.fontSize}lm(){const t=this.hd.N();return this.jv!==t.P&&(this.qv.On(),this.jv=t.P),t}om(){if(this.Ki===null)return 0;let t=0;const n=this.lm(),i=Yt(this.sm.canvasElement.getContext("2d",{colorSpace:this.yt.Gv().N().layout.colorSpace}));i.save();const r=this.Ki.Vl();i.font=this._m(),r.length>0&&(t=Math.max(this.qv.Ii(i,r[0].Jl),this.qv.Ii(i,r[r.length-1].Jl)));const o=this.um();for(let d=o.length;d--;){const p=this.qv.Ii(i,o[d].ri());p>t&&(t=p)}const c=this.Ki.Lt();if(c!==null&&this.Uv!==null&&(u=this.Ps.crosshair).mode!==2&&u.horzLine.visible&&u.horzLine.labelVisible){const d=this.Ki.Ds(1,c),p=this.Ki.Ds(this.Uv.height-2,c);t=Math.max(t,this.qv.Ii(i,this.Ki.Ji(Math.floor(Math.min(d,p))+.11111111111111,c)),this.qv.Ii(i,this.Ki.Ji(Math.ceil(Math.max(d,p))-.11111111111111,c)))}var u;i.restore();const h=t||34;return m2(Math.ceil(n.S+n.C+n.V+n.B+5+h))}dm(t){this.Uv!==null&&mu(this.Uv,t)||(this.Uv=t,this.Kv=!0,this.sm.resizeCanvasElement(t),this.nm.resizeCanvasElement(t),this.Kv=!1,this.Jp.style.width=`${t.width}px`,this.Jp.style.height=`${t.height}px`)}fm(){return Yt(this.Uv).width}cs(t){this.Ki!==t&&(this.Ki!==null&&this.Ki.r_().u(this),this.Ki=t,t.r_().i(this.do.bind(this),this))}Ft(){return this.Ki}On(){const t=this.yt.cv();this.yt.Gv().Qt().Q_(t,Yt(this.Ft()))}pm(t){if(this.Uv===null)return;const n={colorSpace:this.yt.Gv().N().layout.colorSpace};if(t!==1){this.vm(),this.sm.applySuggestedBitmapSize();const r=yu(this.sm,n);r!==null&&(r.useBitmapCoordinateSpace((o=>{this.wm(o),this.gm(o)})),this.yt.Mm(r,this.im),this.bm(r),this.yt.Mm(r,this.Qv),this.Sm(r))}this.nm.applySuggestedBitmapSize();const i=yu(this.nm,n);i!==null&&(i.useBitmapCoordinateSpace((({context:r,bitmapSize:o})=>{r.clearRect(0,0,o.width,o.height)})),this.xm(i),this.yt.Mm(i,this.tm))}nv(){return this.sm.bitmapSize}ev(t,n,i,r){const o=this.nv();if(o.width>0&&o.height>0&&(t.drawImage(this.sm.canvasElement,n,i),r)){const c=this.nm.canvasElement;t.drawImage(c,n,i)}}kt(){this.Ki?.Vl()}ov(t){if(this.Ki===null||this.Ki.Gi()||!this.Ps.handleScale.axisPressedMouseMove.price)return;const n=this.yt.Gv().Qt(),i=this.yt.cv();this.$v=!0,n.j_(i,this.Ki,t.localY)}_v(t){if(this.Ki===null||!this.Ps.handleScale.axisPressedMouseMove.price)return;const n=this.yt.Gv().Qt(),i=this.yt.cv(),r=this.Ki;n.Y_(i,r,t.localY)}rm(){if(this.Ki===null||!this.Ps.handleScale.axisPressedMouseMove.price)return;const t=this.yt.Gv().Qt(),n=this.yt.cv(),i=this.Ki;this.$v&&(this.$v=!1,t.K_(n,i))}uv(t){if(this.Ki===null||!this.Ps.handleScale.axisPressedMouseMove.price)return;const n=this.yt.Gv().Qt(),i=this.yt.cv();this.$v=!1,n.K_(i,this.Ki)}hm(t){this.Ps.handleScale.axisDoubleClickReset.price&&this.On()}am(t){this.Ki!==null&&(!this.yt.Gv().Qt().N().handleScale.axisPressedMouseMove.price||this.Ki.He()||this.Ki.Eo()||this.Cm(1))}lv(t){this.Cm(0)}um(){const t=[],n=this.Ki===null?void 0:this.Ki;return(i=>{for(let r=0;r<i.length;++r){const o=i[r].Ks(this.yt.cv(),n);for(let c=0;c<o.length;c++)t.push(o[c])}})(this.yt.cv().Dt()),t}wm({context:t,bitmapSize:n}){const{width:i,height:r}=n,o=this.yt.cv().Qt(),c=o.$(),u=o.Kd();c===u?b0(t,0,0,i,r,c):hj(t,0,0,i,r,c,u)}gm({context:t,bitmapSize:n,horizontalPixelRatio:i}){if(this.Uv===null||this.Ki===null||!this.Ki.N().borderVisible)return;t.fillStyle=this.Ki.N().borderColor;const r=Math.max(1,Math.floor(this.lm().S*i));let o;o=this.Jv?n.width-r:0,t.fillRect(o,0,r,n.height)}bm(t){if(this.Uv===null||this.Ki===null)return;const n=this.Ki.Vl(),i=this.Ki.N(),r=this.lm(),o=this.Jv?this.Uv.width-r.C:0;i.borderVisible&&i.ticksVisible&&t.useBitmapCoordinateSpace((({context:c,horizontalPixelRatio:u,verticalPixelRatio:h})=>{c.fillStyle=i.borderColor;const d=Math.max(1,Math.floor(h)),p=Math.floor(.5*h),v=Math.round(r.C*u);c.beginPath();for(const S of n)c.rect(Math.floor(o*u),Math.round(S.Pl*h)-p,v,d);c.fill()})),t.useMediaCoordinateSpace((({context:c})=>{c.font=this._m(),c.fillStyle=i.textColor??this.Co.textColor,c.textAlign=this.Jv?"right":"left",c.textBaseline="middle";const u=this.Jv?Math.round(o-r.V):Math.round(o+r.C+r.V),h=n.map((d=>this.qv.Di(c,d.Jl)));for(let d=n.length;d--;){const p=n[d];c.fillText(p.Jl,u,p.Pl+h[d])}}))}vm(){if(this.Uv===null||this.Ki===null)return;let t=this.Uv.height/2;const n=[],i=this.Ki.Dt().slice(),r=this.yt.cv(),o=this.lm();this.Ki===r.Gn()&&this.yt.cv().Dt().forEach((h=>{r.Zn(h)&&i.push(h)}));const c=this.Ki.Sl()[0],u=this.Ki;i.forEach((h=>{const d=h.Ks(r,u);d.forEach((p=>{p.$i()&&p.Wi()===null&&(p.Ui(null),n.push(p))})),c===h&&d.length>0&&(t=d[0].Ei())})),this.Ki.N().alignLabels&&this.ym(n,o,t)}ym(t,n,i){if(this.Uv===null)return;const r=t.filter((c=>c.Ei()<=i)),o=t.filter((c=>c.Ei()>i));r.sort(((c,u)=>u.Ei()-c.Ei())),r.length&&o.length&&o.push(r[0]),o.sort(((c,u)=>c.Ei()-u.Ei()));for(const c of t){const u=Math.floor(c.$t(n)/2),h=c.Ei();h>-u&&h<u&&c.Ui(u),h>this.Uv.height-u&&h<this.Uv.height+u&&c.Ui(this.Uv.height-u)}hS(r,1,this.Uv.height,n),hS(o,-1,this.Uv.height,n)}Sm(t){if(this.Uv===null)return;const n=this.um(),i=this.lm(),r=this.Jv?"right":"left";n.forEach((o=>{o.qi()&&o.Tt(Yt(this.Ki)).nt(t,i,this.qv,r)}))}xm(t){if(this.Uv===null||this.Ki===null)return;const n=this.yt.Gv().Qt(),i=[],r=this.yt.cv(),o=n.gd().Ks(r,this.Ki);o.length&&i.push(o);const c=this.lm(),u=this.Jv?"right":"left";i.forEach((h=>{h.forEach((d=>{d.Tt(Yt(this.Ki)).nt(t,c,this.qv,u)}))}))}Cm(t){this.Jp.style.cursor=t===1?"ns-resize":"default"}do(){const t=this.om();this.Yv<t&&this.yt.Gv().Qt().Ca(),this.Yv=t}_m(){return $p(this.Co.fontSize,this.Co.fontFamily)}}function VV(e,t){return e.qa?.(t)??[]}function fS(e,t){return e.Ys?.(t)??[]}function mS(e,t){return e.ds?.(t)??[]}function HV(e,t){return e.Ha?.(t)??[]}class Ly{constructor(t,n){this.Uv=Jn({width:0,height:0}),this.km=null,this.Pm=null,this.Tm=null,this.Rm=null,this.Dm=!1,this.Im=new Zi,this.Vm=new Zi,this.Bm=0,this.Em=!1,this.Am=null,this.Lm=!1,this.zm=null,this.Om=null,this.Kv=!1,this.Zv=()=>{this.Kv||this.Nm===null||this.ns().dr()},this.Xv=()=>{this.Kv||this.Nm===null||this.ns().dr()},this.Lv=t,this.Nm=n,this.Nm.nu().i(this.Fm.bind(this),this,!0),this.Wm=document.createElement("td"),this.Wm.style.padding="0",this.Wm.style.position="relative";const i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.position="relative",i.style.overflow="hidden",this.Hm=document.createElement("td"),this.Hm.style.padding="0",this.Um=document.createElement("td"),this.Um.style.padding="0",this.Wm.appendChild(i),this.sm=bu(i,Jn({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);const r=this.sm.canvasElement;r.style.position="absolute",r.style.zIndex="1",r.style.left="0",r.style.top="0",this.nm=bu(i,Jn({width:16,height:16})),this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);const o=this.nm.canvasElement;o.style.position="absolute",o.style.zIndex="2",o.style.left="0",o.style.top="0",this.Xp=document.createElement("tr"),this.Xp.appendChild(this.Hm),this.Xp.appendChild(this.Wm),this.Xp.appendChild(this.Um),this.$m(),this.$p=new A0(this.nm.canvasElement,this,{dp:()=>this.Am===null&&!this.Lv.N().handleScroll.vertTouchDrag,fp:()=>this.Am===null&&!this.Lv.N().handleScroll.horzTouchDrag})}m(){this.km!==null&&this.km.m(),this.Pm!==null&&this.Pm.m(),this.Tm=null,this.nm.unsubscribeSuggestedBitmapSizeChanged(this.Xv),xu(this.nm.canvasElement),this.nm.dispose(),this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),xu(this.sm.canvasElement),this.sm.dispose(),this.Nm!==null&&(this.Nm.nu().u(this),this.Nm.m()),this.$p.m()}cv(){return Yt(this.Nm)}qm(t){this.Nm!==null&&this.Nm.nu().u(this),this.Nm=t,this.Nm!==null&&this.Nm.nu().i(Ly.prototype.Fm.bind(this),this,!0),this.$m(),this.Lv.Zp().indexOf(this)===this.Lv.Zp().length-1?(this.Tm=this.Tm??new qV(this.Wm,this.Lv),this.Tm.kt()):(this.Tm?.Ov(),this.Tm=null)}Gv(){return this.Lv}iv(){return this.Xp}$m(){if(this.Nm!==null&&(this.jm(),this.ns().tn().length!==0)){if(this.km!==null){const t=this.Nm.U_();this.km.cs(Yt(t))}if(this.Pm!==null){const t=this.Nm.q_();this.Pm.cs(Yt(t))}}}Ym(){this.km!==null&&this.km.kt(),this.Pm!==null&&this.Pm.kt()}E_(){return this.Nm!==null?this.Nm.E_():0}A_(t){this.Nm&&this.Nm.A_(t)}lp(t){if(!this.Nm)return;this.Km();const n=t.localX,i=t.localY;this.Zm(n,i,t)}Pp(t){this.Km(),this.Gm(),this.Zm(t.localX,t.localY,t)}op(t){if(!this.Nm)return;this.Km();const n=t.localX,i=t.localY;this.Zm(n,i,t)}Sp(t){this.Nm!==null&&(this.Km(),this.Xm(t))}ip(t){this.Nm!==null&&this.Jm(this.Vm,t)}Xf(t){this.ip(t)}mp(t){this.Km(),this.Qm(t),this.Zm(t.localX,t.localY,t)}bp(t){this.Nm!==null&&(this.Km(),this.Em=!1,this.tw(t))}Mp(t){this.Nm!==null&&this.Xm(t)}Op(t){if(this.Em=!0,this.Am===null){const n={x:t.localX,y:t.localY};this.iw(n,n,t)}}zp(t){this.Nm!==null&&(this.Km(),this.Nm.Qt().vd(null),this.sw())}nw(){return this.Im}ew(){return this.Vm}Ip(){this.Bm=1,this.ns().dn()}Vp(t,n){if(!this.Lv.N().handleScale.pinch)return;const i=5*(n-this.Bm);this.Bm=n,this.ns().Td(t._t,i)}yp(t){this.Em=!1,this.Lm=this.Am!==null,this.Gm();const n=this.ns().gd();this.Am!==null&&n.It()&&(this.zm={x:n.si(),y:n.ni()},this.Am={x:t.localX,y:t.localY})}pp(t){if(this.Nm===null)return;const n=t.localX,i=t.localY;if(this.Am===null)this.Qm(t);else{this.Lm=!1;const r=Yt(this.zm),o=r.x+(n-this.Am.x),c=r.y+(i-this.Am.y);this.Zm(o,c,t)}}gp(t){this.Gv().N().trackingMode.exitMode===0&&(this.Lm=!0),this.rw(),this.tw(t)}Qn(t,n){const i=this.Nm;return i===null?null:Sj(i,t,n)}hw(t,n){Yt(n==="left"?this.km:this.Pm).dm(Jn({width:t,height:this.Uv.height}))}sv(){return this.Uv}dm(t){mu(this.Uv,t)||(this.Uv=t,this.Kv=!0,this.sm.resizeCanvasElement(t),this.nm.resizeCanvasElement(t),this.Kv=!1,this.Wm.style.width=t.width+"px",this.Wm.style.height=t.height+"px")}aw(){const t=Yt(this.Nm);t.H_(t.U_()),t.H_(t.q_());for(const n of t.Sl())if(t.Zn(n)){const i=n.Ft();i!==null&&t.H_(i),n.Ws()}for(const n of t.ru())n.Ws()}nv(){return this.sm.bitmapSize}ev(t,n,i,r){const o=this.nv();if(o.width>0&&o.height>0&&(t.drawImage(this.sm.canvasElement,n,i),r)){const c=this.nm.canvasElement;t!==null&&t.drawImage(c,n,i)}}pm(t){if(t===0||this.Nm===null)return;t>1&&this.aw(),this.km!==null&&this.km.pm(t),this.Pm!==null&&this.Pm.pm(t);const n={colorSpace:this.Lv.N().layout.colorSpace};if(t!==1){this.sm.applySuggestedBitmapSize();const r=yu(this.sm,n);r!==null&&(r.useBitmapCoordinateSpace((o=>{this.wm(o)})),this.Nm&&(this.lw(r,VV),this.ow(r),this.lw(r,fS),this.lw(r,mS)))}this.nm.applySuggestedBitmapSize();const i=yu(this.nm,n);i!==null&&(i.useBitmapCoordinateSpace((({context:r,bitmapSize:o})=>{r.clearRect(0,0,o.width,o.height)})),this._w(i),this.lw(i,HV),this.lw(i,mS))}uw(){return this.km}cw(){return this.Pm}Mm(t,n){this.lw(t,n)}Fm(){this.Nm!==null&&this.Nm.nu().u(this),this.Nm=null}Xm(t){this.Jm(this.Im,t)}Jm(t,n){const i=n.localX,r=n.localY;t.v()&&t.p(this.ns().Et().wc(i),{x:i,y:r},n)}wm({context:t,bitmapSize:n}){const{width:i,height:r}=n,o=this.ns(),c=o.$(),u=o.Kd();c===u?b0(t,0,0,i,r,u):hj(t,0,0,i,r,c,u)}ow(t){const n=Yt(this.Nm),i=n.eu().pr().Tt(n);i!==null&&i.nt(t,!1)}_w(t){this.dw(t,fS,Ap,this.ns().gd())}lw(t,n){const i=Yt(this.Nm),r=i.Dt(),o=i.ru();for(const c of o)this.dw(t,n,p2,c);for(const c of r)this.dw(t,n,p2,c);for(const c of o)this.dw(t,n,Ap,c);for(const c of r)this.dw(t,n,Ap,c)}dw(t,n,i,r){const o=Yt(this.Nm),c=o.Qt().pd(),u=c!==null&&c.hu===r,h=c!==null&&u&&c.au!==void 0?c.au.ie:void 0;g2(n,(d=>i(d,t,u,h)),r,o)}jm(){if(this.Nm===null)return;const t=this.Lv,n=this.Nm.U_().N().visible,i=this.Nm.q_().N().visible;n||this.km===null||(this.Hm.removeChild(this.km.iv()),this.km.m(),this.km=null),i||this.Pm===null||(this.Um.removeChild(this.Pm.iv()),this.Pm.m(),this.Pm=null);const r=t.Qt().Nd();n&&this.km===null&&(this.km=new dS(this,t.N(),r,"left"),this.Hm.appendChild(this.km.iv())),i&&this.Pm===null&&(this.Pm=new dS(this,t.N(),r,"right"),this.Um.appendChild(this.Pm.iv()))}fw(t){return t.Np&&this.Em||this.Am!==null}Zm(t,n,i){t=Math.max(0,Math.min(t,this.Uv.width-1)),n=Math.max(0,Math.min(n,this.Uv.height-1)),this.ns().Ad(t,n,i,Yt(this.Nm))}sw(){this.ns().zd()}rw(){this.Lm&&(this.Am=null,this.sw())}iw(t,n,i){this.Am=t,this.Lm=!1,this.Zm(n.x,n.y,i);const r=this.ns().gd();this.zm={x:r.si(),y:r.ni()}}ns(){return this.Lv.Qt()}tw(t){if(!this.Dm)return;const n=this.ns(),i=this.cv();if(n.X_(i,i.Rs()),this.Rm=null,this.Dm=!1,n.Vd(),this.Om!==null){const r=performance.now(),o=n.Et();this.Om.fe(o.Cc(),r),this.Om.Ec(r)||n.vn(this.Om)}}Km(){this.Am=null}Gm(){if(this.Nm){if(this.ns().dn(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)Yt(document.activeElement).blur();else{const t=document.getSelection();t!==null&&t.removeAllRanges()}!this.Nm.Rs().Gi()&&this.ns().Et().Gi()}}Qm(t){if(this.Nm===null)return;const n=this.ns(),i=n.Et();if(i.Gi())return;const r=this.Lv.N(),o=r.handleScroll,c=r.kineticScroll;if((!o.pressedMouseMove||t.Np)&&(!o.horzTouchDrag&&!o.vertTouchDrag||!t.Np))return;const u=this.Nm.Rs(),h=performance.now();if(this.Rm!==null||this.fw(t)||(this.Rm={x:t.clientX,y:t.clientY,cf:h,pw:t.localX,mw:t.localY}),this.Rm!==null&&!this.Dm&&(this.Rm.x!==t.clientX||this.Rm.y!==t.clientY)){if(t.Np&&c.touch||!t.Np&&c.mouse){const d=i.ul();this.Om=new UV(.2/d,7/d,.997,15/d),this.Om.Dv(i.Cc(),this.Rm.cf)}else this.Om=null;u.Gi()||n.Z_(this.Nm,u,t.localY),n.Dd(t.localX),this.Dm=!0}this.Dm&&(u.Gi()||n.G_(this.Nm,u,t.localY),n.Id(t.localX),this.Om!==null&&this.Om.Dv(i.Cc(),h))}}class pS{constructor(t,n,i,r,o){this.xt=!0,this.Uv=Jn({width:0,height:0}),this.Zv=()=>this.pm(3),this.Jv=t==="left",this.hd=i.Nd,this.Ps=n,this.ww=r,this.gw=o,this.Jp=document.createElement("div"),this.Jp.style.width="25px",this.Jp.style.height="100%",this.Jp.style.overflow="hidden",this.sm=bu(this.Jp,Jn({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv)}m(){this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),xu(this.sm.canvasElement),this.sm.dispose()}iv(){return this.Jp}sv(){return this.Uv}dm(t){mu(this.Uv,t)||(this.Uv=t,this.sm.resizeCanvasElement(t),this.Jp.style.width=`${t.width}px`,this.Jp.style.height=`${t.height}px`,this.xt=!0)}pm(t){if(t<3&&!this.xt||this.Uv.width===0||this.Uv.height===0)return;this.xt=!1,this.sm.applySuggestedBitmapSize();const n=yu(this.sm,{colorSpace:this.Ps.layout.colorSpace});n!==null&&n.useBitmapCoordinateSpace((i=>{this.wm(i),this.gm(i)}))}nv(){return this.sm.bitmapSize}ev(t,n,i){const r=this.nv();r.width>0&&r.height>0&&t.drawImage(this.sm.canvasElement,n,i)}gm({context:t,bitmapSize:n,horizontalPixelRatio:i,verticalPixelRatio:r}){if(!this.ww())return;t.fillStyle=this.Ps.timeScale.borderColor;const o=Math.floor(this.hd.N().S*i),c=Math.floor(this.hd.N().S*r),u=this.Jv?n.width-o:0;t.fillRect(u,0,o,c)}wm({context:t,bitmapSize:n}){b0(t,0,0,n.width,n.height,this.gw())}}function Py(e){return t=>t.Ka?.(e)??[]}const $V=Py("normal"),GV=Py("top"),YV=Py("bottom");class WV{constructor(t,n){this.Mw=null,this.bw=null,this.M=null,this.Sw=!1,this.Uv=Jn({width:0,height:0}),this.xw=new Zi,this.qv=new Gp(5),this.Kv=!1,this.Zv=()=>{this.Kv||this.Lv.Qt().dr()},this.Xv=()=>{this.Kv||this.Lv.Qt().dr()},this.Lv=t,this.cu=n,this.Ps=t.N().layout,this.Vv=document.createElement("tr"),this.Cw=document.createElement("td"),this.Cw.style.padding="0",this.yw=document.createElement("td"),this.yw.style.padding="0",this.Jp=document.createElement("td"),this.Jp.style.height="25px",this.Jp.style.padding="0",this.kw=document.createElement("div"),this.kw.style.width="100%",this.kw.style.height="100%",this.kw.style.position="relative",this.kw.style.overflow="hidden",this.Jp.appendChild(this.kw),this.sm=bu(this.kw,Jn({width:16,height:16})),this.sm.subscribeSuggestedBitmapSizeChanged(this.Zv);const i=this.sm.canvasElement;i.style.position="absolute",i.style.zIndex="1",i.style.left="0",i.style.top="0",this.nm=bu(this.kw,Jn({width:16,height:16})),this.nm.subscribeSuggestedBitmapSizeChanged(this.Xv);const r=this.nm.canvasElement;r.style.position="absolute",r.style.zIndex="2",r.style.left="0",r.style.top="0",this.Vv.appendChild(this.Cw),this.Vv.appendChild(this.Jp),this.Vv.appendChild(this.yw),this.Pw(),this.Lv.Qt().B_().i(this.Pw.bind(this),this),this.$p=new A0(this.nm.canvasElement,this,{dp:()=>!0,fp:()=>!this.Lv.N().handleScroll.horzTouchDrag})}m(){this.$p.m(),this.Mw!==null&&this.Mw.m(),this.bw!==null&&this.bw.m(),this.nm.unsubscribeSuggestedBitmapSizeChanged(this.Xv),xu(this.nm.canvasElement),this.nm.dispose(),this.sm.unsubscribeSuggestedBitmapSizeChanged(this.Zv),xu(this.sm.canvasElement),this.sm.dispose()}iv(){return this.Vv}Tw(){return this.Mw}Rw(){return this.bw}Pp(t){if(this.Sw)return;this.Sw=!0;const n=this.Lv.Qt();!n.Et().Gi()&&this.Lv.N().handleScale.axisPressedMouseMove.time&&n.Pd(t.localX)}yp(t){this.Pp(t)}Tp(){const t=this.Lv.Qt();!t.Et().Gi()&&this.Sw&&(this.Sw=!1,this.Lv.N().handleScale.axisPressedMouseMove.time&&t.Ed())}mp(t){const n=this.Lv.Qt();!n.Et().Gi()&&this.Lv.N().handleScale.axisPressedMouseMove.time&&n.Bd(t.localX)}pp(t){this.mp(t)}bp(){this.Sw=!1;const t=this.Lv.Qt();t.Et().Gi()&&!this.Lv.N().handleScale.axisPressedMouseMove.time||t.Ed()}gp(){this.bp()}ip(){this.Lv.N().handleScale.axisDoubleClickReset.time&&this.Lv.Qt().wn()}Xf(){this.ip()}lp(){this.Lv.Qt().N().handleScale.axisPressedMouseMove.time&&this.Cm(1)}zp(){this.Cm(0)}sv(){return this.Uv}Dw(){return this.xw}Iw(t,n,i){mu(this.Uv,t)||(this.Uv=t,this.Kv=!0,this.sm.resizeCanvasElement(t),this.nm.resizeCanvasElement(t),this.Kv=!1,this.Jp.style.width=`${t.width}px`,this.Jp.style.height=`${t.height}px`,this.xw.p(t)),this.Mw!==null&&this.Mw.dm(Jn({width:n,height:t.height})),this.bw!==null&&this.bw.dm(Jn({width:i,height:t.height}))}Vw(){const t=this.Bw();return Math.ceil(t.S+t.C+t.k+t.A+t.I+t.Ew)}kt(){this.Lv.Qt().Et().Vl()}nv(){return this.sm.bitmapSize}ev(t,n,i,r){const o=this.nv();if(o.width>0&&o.height>0&&(t.drawImage(this.sm.canvasElement,n,i),r)){const c=this.nm.canvasElement;t.drawImage(c,n,i)}}pm(t){if(t===0)return;const n={colorSpace:this.Ps.colorSpace};if(t!==1){this.sm.applySuggestedBitmapSize();const r=yu(this.sm,n);r!==null&&(r.useBitmapCoordinateSpace((o=>{this.wm(o),this.gm(o),this.Aw(r,YV)})),this.bm(r),this.Aw(r,$V)),this.Mw!==null&&this.Mw.pm(t),this.bw!==null&&this.bw.pm(t)}this.nm.applySuggestedBitmapSize();const i=yu(this.nm,n);i!==null&&(i.useBitmapCoordinateSpace((({context:r,bitmapSize:o})=>{r.clearRect(0,0,o.width,o.height)})),this.Lw([...this.Lv.Qt().tn(),this.Lv.Qt().gd()],i),this.Aw(i,GV))}Aw(t,n){const i=this.Lv.Qt().tn();for(const r of i)g2(n,(o=>p2(o,t,!1,void 0)),r,void 0);for(const r of i)g2(n,(o=>Ap(o,t,!1,void 0)),r,void 0)}wm({context:t,bitmapSize:n}){b0(t,0,0,n.width,n.height,this.Lv.Qt().Kd())}gm({context:t,bitmapSize:n,verticalPixelRatio:i}){if(this.Lv.N().timeScale.borderVisible){t.fillStyle=this.zw();const r=Math.max(1,Math.floor(this.Bw().S*i));t.fillRect(0,0,n.width,r)}}bm(t){const n=this.Lv.Qt().Et(),i=n.Vl();if(!i||i.length===0)return;const r=this.cu.maxTickMarkWeight(i),o=this.Bw(),c=n.N();c.borderVisible&&c.ticksVisible&&t.useBitmapCoordinateSpace((({context:u,horizontalPixelRatio:h,verticalPixelRatio:d})=>{u.strokeStyle=this.zw(),u.fillStyle=this.zw();const p=Math.max(1,Math.floor(h)),v=Math.floor(.5*h);u.beginPath();const S=Math.round(o.C*d);for(let b=i.length;b--;){const _=Math.round(i[b].coord*h);u.rect(_-v,0,p,S)}u.fill()})),t.useMediaCoordinateSpace((({context:u})=>{const h=o.S+o.C+o.A+o.k/2;u.textAlign="center",u.textBaseline="middle",u.fillStyle=this.H(),u.font=this._m();for(const d of i)if(d.weight<r){const p=d.needAlignCoordinate?this.Ow(u,d.coord,d.label):d.coord;u.fillText(d.label,p,h)}this.Lv.N().timeScale.allowBoldLabels&&(u.font=this.Nw());for(const d of i)if(d.weight>=r){const p=d.needAlignCoordinate?this.Ow(u,d.coord,d.label):d.coord;u.fillText(d.label,p,h)}}))}Ow(t,n,i){const r=this.qv.Ii(t,i),o=r/2,c=Math.floor(n-o)+.5;return c<0?n+=Math.abs(0-c):c+r>this.Uv.width&&(n-=Math.abs(this.Uv.width-(c+r))),n}Lw(t,n){const i=this.Bw();for(const r of t)for(const o of r.fs())o.Tt().nt(n,i)}zw(){return this.Lv.N().timeScale.borderColor}H(){return this.Ps.textColor}F(){return this.Ps.fontSize}_m(){return $p(this.F(),this.Ps.fontFamily)}Nw(){return $p(this.F(),this.Ps.fontFamily,"bold")}Bw(){this.M===null&&(this.M={S:1,L:NaN,A:NaN,I:NaN,ts:NaN,C:5,k:NaN,P:"",Qi:new Gp,Ew:0});const t=this.M,n=this._m();if(t.P!==n){const i=this.F();t.k=i,t.P=n,t.A=3*i/12,t.I=3*i/12,t.ts=9*i/12,t.L=0,t.Ew=4*i/12,t.Qi.On()}return this.M}Cm(t){this.Jp.style.cursor=t===1?"ew-resize":"default"}Pw(){const t=this.Lv.Qt(),n=t.N();n.leftPriceScale.visible||this.Mw===null||(this.Cw.removeChild(this.Mw.iv()),this.Mw.m(),this.Mw=null),n.rightPriceScale.visible||this.bw===null||(this.yw.removeChild(this.bw.iv()),this.bw.m(),this.bw=null);const i={Nd:this.Lv.Qt().Nd()},r=()=>n.leftPriceScale.borderVisible&&t.Et().N().borderVisible,o=()=>t.Kd();n.leftPriceScale.visible&&this.Mw===null&&(this.Mw=new pS("left",n,i,r,o),this.Cw.appendChild(this.Mw.iv())),n.rightPriceScale.visible&&this.bw===null&&(this.bw=new pS("right",n,i,r,o),this.yw.appendChild(this.bw.iv()))}}const KV=!!Hh&&!!navigator.userAgentData&&navigator.userAgentData.brands.some((e=>e.brand.includes("Chromium")))&&!!Hh&&(navigator?.userAgentData?.platform?navigator.userAgentData.platform==="Windows":navigator.userAgent.toLowerCase().indexOf("win")>=0);class XV{constructor(t,n,i){var r;this.Fw=[],this.Ww=[],this.Hw=0,this.eo=0,this.S_=0,this.Uw=0,this.$w=0,this.qw=null,this.jw=!1,this.Im=new Zi,this.Vm=new Zi,this.nd=new Zi,this.Yw=null,this.Kw=null,this.Av=t,this.Ps=n,this.cu=i,this.Vv=document.createElement("div"),this.Vv.classList.add("tv-lightweight-charts"),this.Vv.style.overflow="hidden",this.Vv.style.direction="ltr",this.Vv.style.width="100%",this.Vv.style.height="100%",(r=this.Vv).style.userSelect="none",r.style.webkitUserSelect="none",r.style.msUserSelect="none",r.style.MozUserSelect="none",r.style.webkitTapHighlightColor="transparent",this.Zw=document.createElement("table"),this.Zw.setAttribute("cellspacing","0"),this.Vv.appendChild(this.Zw),this.Gw=this.Xw.bind(this),ov(this.Ps)&&this.Jw(!0),this.ns=new RV(this.rd.bind(this),this.Ps,i),this.Qt().Md().i(this.Qw.bind(this),this),this.tg=new WV(this,this.cu),this.Zw.appendChild(this.tg.iv());const o=n.autoSize&&this.ig();let c=this.Ps.width,u=this.Ps.height;if(o||c===0||u===0){const h=t.getBoundingClientRect();c=c||h.width,u=u||h.height}this.sg(c,u),this.ng(),t.appendChild(this.Vv),this.eg(),this.ns.Et().Oc().i(this.ns.Ca.bind(this.ns),this),this.ns.B_().i(this.ns.Ca.bind(this.ns),this)}Qt(){return this.ns}N(){return this.Ps}Zp(){return this.Fw}rg(){return this.tg}m(){this.Jw(!1),this.Hw!==0&&window.cancelAnimationFrame(this.Hw),this.ns.Md().u(this),this.ns.Et().Oc().u(this),this.ns.B_().u(this),this.ns.m();for(const t of this.Fw)this.Zw.removeChild(t.iv()),t.nw().u(this),t.ew().u(this),t.m();this.Fw=[];for(const t of this.Ww)this.hg(t);this.Ww=[],Yt(this.tg).m(),this.Vv.parentElement!==null&&this.Vv.parentElement.removeChild(this.Vv),this.nd.m(),this.Im.m(),this.Vm.m(),this.ag()}sg(t,n,i=!1){if(this.eo===n&&this.S_===t)return;const r=(function(u){const h=Math.floor(u.width),d=Math.floor(u.height);return Jn({width:h-h%2,height:d-d%2})})(Jn({width:t,height:n}));this.eo=r.height,this.S_=r.width;const o=this.eo+"px",c=this.S_+"px";Yt(this.Vv).style.height=o,Yt(this.Vv).style.width=c,this.Zw.style.height=o,this.Zw.style.width=c,i?this.lg(Bs.yn(),performance.now()):this.ns.Ca()}pm(t){t===void 0&&(t=Bs.yn());for(let n=0;n<this.Fw.length;n++)this.Fw[n].pm(t.un(n).an);this.Ps.timeScale.visible&&this.tg.pm(t._n())}cr(t){const n=ov(this.Ps);this.ns.cr(t);const i=ov(this.Ps);i!==n&&this.Jw(i),t.layout?.panes&&this.og(),this.eg(),this._g(t)}nw(){return this.Im}ew(){return this.Vm}Md(){return this.nd}ug(t=!1){this.qw!==null&&(this.lg(this.qw,performance.now()),this.qw=null);const n=this.cg(null),i=document.createElement("canvas");i.width=n.width,i.height=n.height;const r=Yt(i.getContext("2d"));return this.cg(r,t),i}dg(t){return t==="left"&&!this.fg()||t==="right"&&!this.pg()||this.Fw.length===0?0:Yt(t==="left"?this.Fw[0].uw():this.Fw[0].cw()).fm()}vg(){return this.Ps.autoSize&&this.Yw!==null}hv(){return this.Vv}mg(t){this.Kw=t,this.Kw?this.hv().style.setProperty("cursor",t):this.hv().style.removeProperty("cursor")}wg(){return this.Kw}gg(t){return Vr(this.Fw[t]).sv()}og(){this.Ww.forEach((t=>{t.kt()}))}_g(t){(t.autoSize!==void 0||!this.Yw||t.width===void 0&&t.height===void 0)&&(t.autoSize&&!this.Yw&&this.ig(),t.autoSize===!1&&this.Yw!==null&&this.ag(),t.autoSize||t.width===void 0&&t.height===void 0||this.sg(t.width||this.S_,t.height||this.eo))}cg(t,n){let i=0,r=0;const o=this.Fw[0],c=(h,d)=>{let p=0;for(let v=0;v<this.Fw.length;v++){const S=this.Fw[v],b=Yt(h==="left"?S.uw():S.cw()),_=b.nv();if(t!==null&&b.ev(t,d,p,n),p+=_.height,v<this.Fw.length-1){const A=this.Ww[v],j=A.nv();t!==null&&A.ev(t,d,p),p+=j.height}}};this.fg()&&(c("left",0),i+=Yt(o.uw()).nv().width);for(let h=0;h<this.Fw.length;h++){const d=this.Fw[h],p=d.nv();if(t!==null&&d.ev(t,i,r,n),r+=p.height,h<this.Fw.length-1){const v=this.Ww[h],S=v.nv();t!==null&&v.ev(t,i,r),r+=S.height}}i+=o.nv().width,this.pg()&&(c("right",i),i+=Yt(o.cw()).nv().width);const u=(h,d,p)=>{Yt(h==="left"?this.tg.Tw():this.tg.Rw()).ev(Yt(t),d,p)};if(this.Ps.timeScale.visible){const h=this.tg.nv();if(t!==null){let d=0;this.fg()&&(u("left",d,r),d=Yt(o.uw()).nv().width),this.tg.ev(t,d,r,n),d+=h.width,this.pg()&&u("right",d,r)}r+=h.height}return Jn({width:i,height:r})}Mg(){let t=0,n=0,i=0;for(const j of this.Fw)this.fg()&&(n=Math.max(n,Yt(j.uw()).om(),this.Ps.leftPriceScale.minimumWidth)),this.pg()&&(i=Math.max(i,Yt(j.cw()).om(),this.Ps.rightPriceScale.minimumWidth)),t+=j.E_();n=m2(n),i=m2(i);const r=this.S_,o=this.eo,c=Math.max(r-n-i,0),u=1*this.Ww.length,h=this.Ps.timeScale.visible;let d=h?Math.max(this.tg.Vw(),this.Ps.timeScale.minimumHeight):0;var p;d=(p=d)+p%2;const v=u+d,S=o<v?0:o-v,b=S/t;let _=0;const A=window.devicePixelRatio||1;for(let j=0;j<this.Fw.length;++j){const E=this.Fw[j];E.qm(this.ns.Xs()[j]);let L=0,D=0;D=j===this.Fw.length-1?Math.ceil((S-_)*A)/A:Math.round(E.E_()*b*A)/A,L=Math.max(D,2),_+=L,E.dm(Jn({width:c,height:L})),this.fg()&&E.hw(n,"left"),this.pg()&&E.hw(i,"right"),E.cv()&&this.ns.bd(E.cv(),L)}this.tg.Iw(Jn({width:h?c:0,height:d}),h?n:0,h?i:0),this.ns.L_(c),this.Uw!==n&&(this.Uw=n),this.$w!==i&&(this.$w=i)}Jw(t){t?this.Vv.addEventListener("wheel",this.Gw,{passive:!1}):this.Vv.removeEventListener("wheel",this.Gw)}bg(t){switch(t.deltaMode){case t.DOM_DELTA_PAGE:return 120;case t.DOM_DELTA_LINE:return 32}return KV?1/window.devicePixelRatio:1}Xw(t){if(!(t.deltaX!==0&&this.Ps.handleScroll.mouseWheel||t.deltaY!==0&&this.Ps.handleScale.mouseWheel))return;const n=this.bg(t),i=n*t.deltaX/100,r=-n*t.deltaY/100;if(t.cancelable&&t.preventDefault(),r!==0&&this.Ps.handleScale.mouseWheel){const o=Math.sign(r)*Math.min(1,Math.abs(r)),c=t.clientX-this.Vv.getBoundingClientRect().left;this.Qt().Td(c,o)}i!==0&&this.Ps.handleScroll.mouseWheel&&this.Qt().Rd(-80*i)}lg(t,n){const i=t._n();i===3&&this.Sg(),i!==3&&i!==2||(this.xg(t),this.Cg(t,n),this.tg.kt(),this.Fw.forEach((r=>{r.Ym()})),this.qw?._n()===3&&(this.qw.Sn(t),this.Sg(),this.xg(this.qw),this.Cg(this.qw,n),t=this.qw,this.qw=null)),this.pm(t)}Cg(t,n){for(const i of t.bn())this.xn(i,n)}xg(t){const n=this.ns.Xs();for(let i=0;i<n.length;i++)t.un(i).ln&&n[i].tu()}xn(t,n){const i=this.ns.Et();switch(t.fn){case 0:i.Fc();break;case 1:i.Wc(t.Wt);break;case 2:i.gn(t.Wt);break;case 3:i.Mn(t.Wt);break;case 4:i.Pc();break;case 5:t.Wt.Ec(n)||i.Mn(t.Wt.Ac(n))}}rd(t){this.qw!==null?this.qw.Sn(t):this.qw=t,this.jw||(this.jw=!0,this.Hw=window.requestAnimationFrame((n=>{if(this.jw=!1,this.Hw=0,this.qw!==null){const i=this.qw;this.qw=null,this.lg(i,n);for(const r of i.bn())if(r.fn===5&&!r.Wt.Ec(n)){this.Qt().vn(r.Wt);break}}})))}Sg(){this.ng()}hg(t){this.Zw.removeChild(t.iv()),t.m()}ng(){const t=this.ns.Xs(),n=t.length,i=this.Fw.length;for(let r=n;r<i;r++){const o=Vr(this.Fw.pop());this.Zw.removeChild(o.iv()),o.nw().u(this),o.ew().u(this),o.m();const c=this.Ww.pop();c!==void 0&&this.hg(c)}for(let r=i;r<n;r++){const o=new Ly(this,t[r]);if(o.nw().i(this.yg.bind(this,o),this),o.ew().i(this.kg.bind(this,o),this),this.Fw.push(o),r>0){const c=new IV(this,r-1,r);this.Ww.push(c),this.Zw.insertBefore(c.iv(),this.tg.iv())}this.Zw.insertBefore(o.iv(),this.tg.iv())}for(let r=0;r<n;r++){const o=t[r],c=this.Fw[r];c.cv()!==o?c.qm(o):c.$m()}this.eg(),this.Mg()}Pg(t,n,i,r){const o=new Map;t!==null&&this.ns.tn().forEach((v=>{const S=v.qs().$s(t);S!==null&&o.set(v,S)}));let c;if(t!==null){const v=this.ns.Et().es(t)?.originalTime;v!==void 0&&(c=v)}const u=this.Qt().pd(),h=u!==null&&u.hu instanceof N0?u.hu:void 0,d=u!==null&&u.au!==void 0?u.au.te:void 0,p=this.Tg(r);return{Gr:c,js:t??void 0,Rg:n??void 0,Dg:p!==-1?p:void 0,Ig:h,Vg:o,Bg:d,Eg:i??void 0}}Tg(t){let n=-1;if(t)n=this.Fw.indexOf(t);else{const i=this.Qt().gd().Gs();i!==null&&(n=this.Qt().Xs().indexOf(i))}return n}yg(t,n,i,r){this.Im.p((()=>this.Pg(n,i,r,t)))}kg(t,n,i,r){this.Vm.p((()=>this.Pg(n,i,r,t)))}Qw(t,n,i){this.mg(this.Qt().pd()?.ou??null),this.nd.p((()=>this.Pg(t,n,i)))}eg(){const t=this.Ps.timeScale.visible?"":"none";this.tg.iv().style.display=t}fg(){return this.Fw[0].cv().U_().N().visible}pg(){return this.Fw[0].cv().q_().N().visible}ig(){return"ResizeObserver"in window&&(this.Yw=new ResizeObserver((t=>{const n=t[t.length-1];n&&this.sg(n.contentRect.width,n.contentRect.height)})),this.Yw.observe(this.Av,{box:"border-box"}),!0)}ag(){this.Yw!==null&&this.Yw.disconnect(),this.Yw=null}}function ov(e){return!!(e.handleScroll.mouseWheel||e.handleScale.mouseWheel)}function QV(e){return e.open===void 0&&e.value===void 0}function ZV(e){return(function(t){return t.open!==void 0})(e)||(function(t){return t.value!==void 0})(e)}function gS(e,t,n,i){const r=n.value,o={js:t,wt:e,Wt:[r,r,r,r],Gr:i};return n.color!==void 0&&(o.R=n.color),o}function JV(e,t,n,i){const r=n.value,o={js:t,wt:e,Wt:[r,r,r,r],Gr:i};return n.lineColor!==void 0&&(o.vt=n.lineColor),n.topColor!==void 0&&(o.eh=n.topColor),n.bottomColor!==void 0&&(o.rh=n.bottomColor),o}function tH(e,t,n,i){const r=n.value,o={js:t,wt:e,Wt:[r,r,r,r],Gr:i};return n.topLineColor!==void 0&&(o.hh=n.topLineColor),n.bottomLineColor!==void 0&&(o.ah=n.bottomLineColor),n.topFillColor1!==void 0&&(o.oh=n.topFillColor1),n.topFillColor2!==void 0&&(o._h=n.topFillColor2),n.bottomFillColor1!==void 0&&(o.uh=n.bottomFillColor1),n.bottomFillColor2!==void 0&&(o.dh=n.bottomFillColor2),o}function eH(e,t,n,i){const r={js:t,wt:e,Wt:[n.open,n.high,n.low,n.close],Gr:i};return n.color!==void 0&&(r.R=n.color),r}function nH(e,t,n,i){const r={js:t,wt:e,Wt:[n.open,n.high,n.low,n.close],Gr:i};return n.color!==void 0&&(r.R=n.color),n.borderColor!==void 0&&(r.Ht=n.borderColor),n.wickColor!==void 0&&(r.nh=n.wickColor),r}function iH(e,t,n,i,r){const o=Vr(r)(n),c=Math.max(...o),u=Math.min(...o),h=o[o.length-1],d=[h,c,u,h],{time:p,color:v,...S}=n;return{js:t,wt:e,Wt:d,Gr:i,le:S,R:v}}function ph(e){return e.Wt!==void 0}function vS(e,t){return t.customValues!==void 0&&(e.Ag=t.customValues),e}function tu(e){return(t,n,i,r,o,c)=>(function(u,h){return h?h(u):QV(u)})(i,c)?vS({wt:t,js:n,Gr:r},i):vS(e(t,n,i,r,o),i)}function yS(e){return{Candlestick:tu(nH),Bar:tu(eH),Area:tu(JV),Baseline:tu(tH),Histogram:tu(gS),Line:tu(gS),Custom:tu(iH)}[e]}function bS(e){return{js:0,Lg:new Map,Ea:e}}function xS(e,t){if(e!==void 0&&e.length!==0)return{zg:t.key(e[0].wt),Og:t.key(e[e.length-1].wt)}}function wS(e){let t;return e.forEach((n=>{t===void 0&&(t=n.Gr)})),Vr(t)}class sH{constructor(t){this.Ng=new Map,this.Fg=new Map,this.Wg=new Map,this.Hg=[],this.cu=t}m(){this.Ng.clear(),this.Fg.clear(),this.Wg.clear(),this.Hg=[]}Ug(t,n){let i=this.Ng.size!==0,r=!1;const o=this.Fg.get(t);if(o!==void 0)if(this.Fg.size===1)i=!1,r=!0,this.Ng.clear();else for(const h of this.Hg)h.pointData.Lg.delete(t)&&(r=!0);let c=[];if(n.length!==0){const h=n.map((b=>b.time)),d=this.cu.createConverterToInternalObj(n),p=yS(t.wh()),v=t.rl(),S=t.hl();c=n.map(((b,_)=>{const A=d(b.time),j=this.cu.key(A);let E=this.Ng.get(j);E===void 0&&(E=bS(A),this.Ng.set(j,E),r=!0);const L=p(A,E.js,b,h[_],v,S);return E.Lg.set(t,L),L}))}i&&this.$g(),this.qg(t,c);let u=-1;if(r){const h=[];this.Ng.forEach((d=>{h.push({timeWeight:0,time:d.Ea,pointData:d,originalTime:wS(d.Lg)})})),h.sort(((d,p)=>this.cu.key(d.time)-this.cu.key(p.time))),u=this.jg(h)}return this.Yg(t,u,(function(h,d,p){const v=xS(h,p),S=xS(d,p);if(v!==void 0&&S!==void 0)return{Kg:!1,Ta:v.Og>=S.Og&&v.zg>=S.zg}})(this.Fg.get(t),o,this.cu))}Hd(t){return this.Ug(t,[])}Zg(t,n,i){if(i&&t.La())throw new Error("Historical updates are not supported when conflation is enabled. Conflation requires data to be processed in order.");const r=n;(function(E){E.Gr===void 0&&(E.Gr=E.time)})(r),this.cu.preprocessData(n);const o=this.cu.createConverterToInternalObj([n])(n.time),c=this.Wg.get(t);if(!i&&c!==void 0&&this.cu.key(o)<this.cu.key(c))throw new Error(`Cannot update oldest data, last time=${c}, new time=${o}`);let u=this.Ng.get(this.cu.key(o));if(i&&u===void 0)throw new Error("Cannot update non-existing data point when historicalUpdate is true");const h=u===void 0;u===void 0&&(u=bS(o),this.Ng.set(this.cu.key(o),u));const d=yS(t.wh()),p=t.rl(),v=t.hl(),S=d(o,u.js,n,r.Gr,p,v),b=!i&&!h&&c!==void 0&&this.cu.key(o)===this.cu.key(c);u.Lg.set(t,S),i?this.Gg(t,S,u.js):b&&t.La()&&ph(S)?(t.kr(S),this.Xg(t,S)):this.Xg(t,S);const _={Ta:ph(S),Kg:i};if(!h)return this.Yg(t,-1,_);const A={timeWeight:0,time:u.Ea,pointData:u,originalTime:wS(u.Lg)},j=Vh(this.Hg,this.cu.key(A.time),((E,L)=>this.cu.key(E.time)<L));this.Hg.splice(j,0,A);for(let E=j;E<this.Hg.length;++E)ap(this.Hg[E].pointData,E);return this.cu.fillWeightsForPoints(this.Hg,j),this.Yg(t,j,_)}Jg(t,n){const i=this.Fg.get(t);if(i===void 0||n<=0)return[[],this.Qg()];n=Math.min(n,i.length);const r=i.splice(-n).reverse();i.length===0?this.Wg.delete(t):this.Wg.set(t,i[i.length-1].wt);for(const o of r){const c=this.Ng.get(this.cu.key(o.wt));if(c&&(c.Lg.delete(t),c.Lg.size===0)){this.Ng.delete(this.cu.key(c.Ea)),this.Hg.splice(c.js,1);for(let u=c.js;u<this.Hg.length;++u)ap(this.Hg[u].pointData,u)}}return[r,this.Yg(t,this.Hg.length-1,{Kg:!1,Ta:!1})]}Xg(t,n){let i=this.Fg.get(t);i===void 0&&(i=[],this.Fg.set(t,i));const r=i.length!==0?i[i.length-1]:null;r===null||this.cu.key(n.wt)>this.cu.key(r.wt)?ph(n)&&i.push(n):ph(n)?i[i.length-1]=n:i.splice(-1,1),this.Wg.set(t,n.wt)}Gg(t,n,i){const r=this.Fg.get(t);if(r===void 0)return;const o=Vh(r,i,((c,u)=>c.js<u));ph(n)?r[o]=n:r.splice(o,1)}qg(t,n){n.length!==0?(this.Fg.set(t,n.filter(ph)),this.Wg.set(t,n[n.length-1].wt)):(this.Fg.delete(t),this.Wg.delete(t))}$g(){for(const t of this.Hg)t.pointData.Lg.size===0&&this.Ng.delete(this.cu.key(t.time))}jg(t){let n=-1;for(let i=0;i<this.Hg.length&&i<t.length;++i){const r=this.Hg[i],o=t[i];if(this.cu.key(r.time)!==this.cu.key(o.time)){n=i;break}o.timeWeight=r.timeWeight,ap(o.pointData,i)}if(n===-1&&this.Hg.length!==t.length&&(n=Math.min(this.Hg.length,t.length)),n===-1)return-1;for(let i=n;i<t.length;++i)ap(t[i].pointData,i);return this.cu.fillWeightsForPoints(t,n),this.Hg=t,n}tM(){if(this.Fg.size===0)return null;let t=0;return this.Fg.forEach((n=>{n.length!==0&&(t=Math.max(t,n[n.length-1].js))})),t}Yg(t,n,i){const r=this.Qg();if(n!==-1)this.Fg.forEach(((o,c)=>{r.F_.set(c,{le:o,iM:c===t?i:void 0})})),this.Fg.has(t)||r.F_.set(t,{le:[],iM:i}),r.Et.sM=this.Hg,r.Et.nM=n;else{const o=this.Fg.get(t);r.F_.set(t,{le:o||[],iM:i})}return r}Qg(){return{F_:new Map,Et:{vc:this.tM()}}}}function ap(e,t){e.js=t,e.Lg.forEach((n=>{n.js=t}))}function rH(e,t){return e.wt<t}function aH(e,t){return t<e.wt}function oH(e,t,n){const i=t.Aa(),r=t.bi(),o=Vh(e,i,rH),c=yj(e,r,aH);if(!n)return{from:o,to:c};let u=o,h=c;return o>0&&o<e.length&&e[o].wt>=i&&(u=o-1),c>0&&c<e.length&&e[c-1].wt<=r&&(h=c+1),{from:u,to:h}}class _j{constructor(t,n,i){this.eM=!0,this.rM=!0,this.hM=!0,this.aM=[],this.lM=null,this.oM=-1,this.ee=t,this.re=n,this._M=i}kt(t){this.eM=!0,t==="data"&&(this.rM=!0),t==="options"&&(this.hM=!0)}Tt(){return this.ee.It()?(this.uM(),this.lM===null?null:this.cM):null}dM(){this.aM=this.aM.map((t=>({...t,...this.ee.ga().gh(t.wt)})))}fM(){this.lM=null}uM(){const t=this.re.Et(),n=t.N().enableConflation?t.Hc():0;n!==this.oM&&(this.rM=!0,this.oM=n),this.rM&&(this.pM(),this.rM=!1),this.hM&&(this.dM(),this.hM=!1),this.eM&&(this.vM(),this.eM=!1)}vM(){const t=this.ee.Ft(),n=this.re.Et();if(this.fM(),n.Gi()||t.Gi())return;const i=n.Ie();if(i===null||this.ee.qs().yh()===0)return;const r=this.ee.Lt();r!==null&&(this.lM=oH(this.aM,i,this._M),this.mM(t,n,r.Wt),this.wM())}}class lH{constructor(t,n){this.gM=t,this.Ki=n}nt(t,n,i){this.gM.draw(t,this.Ki,n,i)}}class cH extends _j{constructor(t,n,i){super(t,n,!1),this.$h=i,this.cM=new lH(this.$h.renderer(),(r=>{const o=t.Lt();return o===null?null:t.Ft().Nt(r,o.Wt)}))}get ma(){return this.$h.conflationReducer}Oa(t){return this.$h.priceValueBuilder(t)}al(t){return this.$h.isWhitespace(t)}pM(){const t=this.ee.ga();this.aM=this.ee.Na().Dh().map((n=>({wt:n.js,_t:NaN,...t.gh(n.js),MM:n.le})))}mM(t,n){n.mc(this.aM,h2(this.lM))}wM(){this.$h.update({bars:this.aM.map(uH),barSpacing:this.re.Et().ul(),visibleRange:this.lM,conflationFactor:this.re.Et().Hc()},this.ee.N())}}function uH(e){return{x:e._t,time:e.wt,originalData:e.MM,barColor:e.th}}const hH={color:"#2196f3"},dH=(e,t,n)=>{const i=_c(n);return new cH(e,t,i)};function Ry(e){const t={value:e.Wt[3],time:e.Gr};return e.Ag!==void 0&&(t.customValues=e.Ag),t}function SS(e){const t=Ry(e);return e.R!==void 0&&(t.color=e.R),t}function fH(e){const t=Ry(e);return e.vt!==void 0&&(t.lineColor=e.vt),e.eh!==void 0&&(t.topColor=e.eh),e.rh!==void 0&&(t.bottomColor=e.rh),t}function mH(e){const t=Ry(e);return e.hh!==void 0&&(t.topLineColor=e.hh),e.ah!==void 0&&(t.bottomLineColor=e.ah),e.oh!==void 0&&(t.topFillColor1=e.oh),e._h!==void 0&&(t.topFillColor2=e._h),e.uh!==void 0&&(t.bottomFillColor1=e.uh),e.dh!==void 0&&(t.bottomFillColor2=e.dh),t}function jj(e){const t={open:e.Wt[0],high:e.Wt[1],low:e.Wt[2],close:e.Wt[3],time:e.Gr};return e.Ag!==void 0&&(t.customValues=e.Ag),t}function pH(e){const t=jj(e);return e.R!==void 0&&(t.color=e.R),t}function gH(e){const t=jj(e),{R:n,Ht:i,nh:r}=e;return n!==void 0&&(t.color=n),i!==void 0&&(t.borderColor=i),r!==void 0&&(t.wickColor=r),t}function Cp(e){return{Area:fH,Line:SS,Baseline:mH,Histogram:SS,Bar:pH,Candlestick:gH,Custom:vH}[e]}function vH(e){const t=e.Gr;return{...e.le,time:t}}const yH={vertLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},horzLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},mode:1,doNotSnapToHiddenSeriesIndices:!1},bH={vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},xH={background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:12,fontFamily:uj,panes:{enableResize:!0,separatorColor:"#E0E3EB",separatorHoverColor:"rgba(178, 181, 189, 0.2)"},attributionLogo:!0,colorSpace:"srgb",colorParsers:[]},lv={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,ticksVisible:!1,scaleMargins:{bottom:.1,top:.2},minimumWidth:0,ensureEdgeTickMarksVisible:!1},wH={rightOffset:0,barSpacing:6,minBarSpacing:.5,maxBarSpacing:0,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0,allowShiftVisibleRangeOnWhitespaceReplacement:!1,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0,allowBoldLabels:!0,ignoreWhitespaceIndices:!1,enableConflation:!1,conflationThresholdFactor:1,precomputeConflationOnInit:!1,precomputeConflationPriority:"background"};function NS(){return{addDefaultPane:!0,width:0,height:0,autoSize:!1,layout:xH,crosshair:yH,grid:bH,overlayPriceScales:{...lv},leftPriceScale:{...lv,visible:!1},rightPriceScale:{...lv,visible:!0},timeScale:wH,localization:{locale:Hh?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}}}class Ej{constructor(t,n,i){this.Yp=t,this.bM=n,this.SM=i??0}applyOptions(t){this.Yp.Qt().md(this.bM,t,this.SM)}options(){return this.Ki().N()}width(){return w0(this.bM)?this.Yp.dg(this.bM):0}setVisibleRange(t){this.setAutoScale(!1),this.Ki().$o(new vr(t.from,t.to))}getVisibleRange(){let t,n,i=this.Ki().er();if(i===null)return null;if(this.Ki().io()){const r=this.Ki().m_(),o=Nj(r);i=Ch(i,this.Ki().no()),t=Number((Math.round(i.Ze()/r)*r).toFixed(o)),n=Number((Math.round(i.Ge()/r)*r).toFixed(o))}else t=i.Ze(),n=i.Ge();return{from:t,to:n}}setAutoScale(t){this.applyOptions({autoScale:t})}Ki(){return Yt(this.Yp.Qt().wd(this.bM,this.SM)).Ft}}class SH{constructor(t,n,i,r){this.Yp=t,this.yt=i,this.xM=n,this.CM=r}getHeight(){return this.yt.$t()}setHeight(t){const n=this.Yp.Qt(),i=n.Gd(this.yt);n.xd(i,t)}getStretchFactor(){return this.yt.E_()}setStretchFactor(t){this.yt.A_(t),this.Yp.Qt().Ca()}paneIndex(){return this.Yp.Qt().Gd(this.yt)}moveTo(t){const n=this.paneIndex();n!==t&&(Is(t>=0&&t<this.Yp.Zp().length,"Invalid pane index"),this.Yp.Qt().yd(n,t))}getSeries(){return this.yt.F_().map((t=>this.xM(t)))??[]}getHTMLElement(){const t=this.Yp.Zp();return t&&t.length!==0&&t[this.paneIndex()]?t[this.paneIndex()].iv():null}attachPrimitive(t){this.yt.nl(t),t.attached&&t.attached({chart:this.CM,requestUpdate:()=>this.yt.Qt().Ca()})}detachPrimitive(t){this.yt.el(t)}priceScale(t){if(this.yt.V_(t)===null)throw new Error(`Cannot find price scale with id: ${t}`);return new Ej(this.Yp,t,this.paneIndex())}setPreserveEmptyPane(t){this.yt.O_(t)}preserveEmptyPane(){return this.yt.N_()}addCustomSeries(t,n={},i=0){return this.CM.addCustomSeries(t,n,i)}addSeries(t,n={}){return this.CM.addSeries(t,n,this.paneIndex())}}const NH={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:"",axisLabelColor:"",axisLabelTextColor:""};class AS{constructor(t){this.hr=t}applyOptions(t){this.hr.cr(t)}options(){return this.hr.N()}yM(){return this.hr}}class AH{constructor(t,n,i,r,o,c){this.kM=new Zi,this.ee=t,this.PM=n,this.TM=i,this.cu=o,this.CM=r,this.RM=c}m(){this.kM.m()}priceFormatter(){return this.ee.Xa()}priceToCoordinate(t){const n=this.ee.Lt();return n===null?null:this.ee.Ft().Nt(t,n.Wt)}coordinateToPrice(t){const n=this.ee.Lt();return n===null?null:this.ee.Ft().Ds(t,n.Wt)}barsInLogicalRange(t){if(t===null)return null;const n=new Oh(new of(t.from,t.to)).Ru(),i=this.ee.qs();if(i.Gi())return null;const r=i.$s(n.Aa(),1),o=i.$s(n.bi(),-1),c=Yt(i.kh()),u=Yt(i.sn());if(r!==null&&o!==null&&r.js>o.js)return{barsBefore:t.from-c,barsAfter:u-t.to};const h={barsBefore:r===null||r.js===c?t.from-c:r.js-c,barsAfter:o===null||o.js===u?u-t.to:u-o.js};return r!==null&&o!==null&&(h.from=r.Gr,h.to=o.Gr),h}setData(t){this.cu,this.ee.wh(),this.PM.DM(this.ee,t),this.IM("full")}update(t,n=!1){this.ee.wh(),this.PM.VM(this.ee,t,n),this.IM("update")}pop(t=1){const n=this.PM.BM(this.ee,t);n.length!==0&&this.IM("update");const i=Cp(this.seriesType());return n.map((r=>i(r)))}dataByIndex(t,n){const i=this.ee.qs().$s(t,n);return i===null?null:Cp(this.seriesType())(i)}data(){const t=Cp(this.seriesType());return this.ee.qs().Dh().map((n=>t(n)))}subscribeDataChanged(t){this.kM.i(t)}unsubscribeDataChanged(t){this.kM._(t)}applyOptions(t){this.ee.cr(t)}options(){return Pl(this.ee.N())}priceScale(){return this.TM.priceScale(this.ee.Ft().ol(),this.getPane().paneIndex())}createPriceLine(t){const n=fa(Pl(NH),t),i=this.ee.Da(n);return new AS(i)}removePriceLine(t){this.ee.Ia(t.yM())}priceLines(){return this.ee.Va().map((t=>new AS(t)))}seriesType(){return this.ee.wh()}lastValueData(t){const n=this.ee.Ve(t);return n.Be?{noData:!0}:{noData:!1,price:n.gt,color:n.R}}attachPrimitive(t){this.ee.nl(t),t.attached&&t.attached({chart:this.CM,series:this,requestUpdate:()=>this.ee.Qt().Ca(),horzScaleBehavior:this.cu})}detachPrimitive(t){this.ee.el(t),t.detached&&t.detached(),this.ee.Qt().Ca()}getPane(){const t=this.ee,n=Yt(this.ee.Qt().Kn(t));return this.RM(n)}moveToPane(t){this.ee.Qt().jd(this.ee,t)}seriesOrder(){const t=this.ee.Qt().Kn(this.ee);return t===null?-1:t.F_().indexOf(this.ee)}setSeriesOrder(t){const n=this.ee.Qt().Kn(this.ee);n!==null&&n.su(this.ee,t)}IM(t){this.kM.v()&&this.kM.p(t)}}class CH{constructor(t,n,i){this.EM=new Zi,this.Nu=new Zi,this.xw=new Zi,this.ns=t,this.Jh=t.Et(),this.tg=n,this.Jh.Lc().i(this.AM.bind(this)),this.Jh.zc().i(this.LM.bind(this)),this.tg.Dw().i(this.zM.bind(this)),this.cu=i}m(){this.Jh.Lc().u(this),this.Jh.zc().u(this),this.tg.Dw().u(this),this.EM.m(),this.Nu.m(),this.xw.m()}scrollPosition(){return this.Jh.Cc()}scrollToPosition(t,n){n?this.Jh.Bc(t,1e3):this.ns.Mn(t)}scrollToRealTime(){this.Jh.Vc()}getVisibleRange(){const t=this.Jh.lc();return t===null?null:{from:t.from.originalTime,to:t.to.originalTime}}setVisibleRange(t){const n={from:this.cu.convertHorzItemToInternal(t.from),to:this.cu.convertHorzItemToInternal(t.to)},i=this.Jh.cc(n);this.ns.$d(i)}getVisibleLogicalRange(){const t=this.Jh.ac();return t===null?null:{from:t.Aa(),to:t.bi()}}setVisibleLogicalRange(t){Is(t.from<=t.to,"The from index cannot be after the to index."),this.ns.$d(t)}resetTimeScale(){this.ns.wn()}fitContent(){this.ns.Fc()}logicalToCoordinate(t){const n=this.ns.Et();return n.Gi()?null:n.qt(t)}coordinateToLogical(t){return this.Jh.Gi()?null:this.Jh.wc(t)}timeToIndex(t,n){const i=this.cu.convertHorzItemToInternal(t);return this.Jh.ec(i,n)}timeToCoordinate(t){const n=this.timeToIndex(t,!1);return n===null?null:this.Jh.qt(n)}coordinateToTime(t){const n=this.ns.Et(),i=n.wc(t),r=n.es(i);return r===null?null:r.originalTime}width(){return this.tg.sv().width}height(){return this.tg.sv().height}subscribeVisibleTimeRangeChange(t){this.EM.i(t)}unsubscribeVisibleTimeRangeChange(t){this.EM._(t)}subscribeVisibleLogicalRangeChange(t){this.Nu.i(t)}unsubscribeVisibleLogicalRangeChange(t){this.Nu._(t)}subscribeSizeChange(t){this.xw.i(t)}unsubscribeSizeChange(t){this.xw._(t)}applyOptions(t){this.Jh.cr(t)}options(){return{...Pl(this.Jh.N()),barSpacing:this.Jh.ul()}}AM(){this.EM.v()&&this.EM.p(this.getVisibleRange())}LM(){this.Nu.v()&&this.Nu.p(this.getVisibleLogicalRange())}zM(t){this.xw.p(t.width,t.height)}}function CS(e){return(function(t){if(Jm(t.handleScale)){const i=t.handleScale;t.handleScale={axisDoubleClickReset:{time:i,price:i},axisPressedMouseMove:{time:i,price:i},mouseWheel:i,pinch:i}}else if(t.handleScale!==void 0){const{axisPressedMouseMove:i,axisDoubleClickReset:r}=t.handleScale;Jm(i)&&(t.handleScale.axisPressedMouseMove={time:i,price:i}),Jm(r)&&(t.handleScale.axisDoubleClickReset={time:r,price:r})}const n=t.handleScroll;Jm(n)&&(t.handleScroll={horzTouchDrag:n,vertTouchDrag:n,mouseWheel:n,pressedMouseMove:n})})(e),e}class _H{constructor(t,n,i){this.OM=new Map,this.NM=new Map,this.FM=new Zi,this.WM=new Zi,this.HM=new Zi,this.Xc=new WeakMap,this.UM=new sH(n);const r=i===void 0?Pl(NS()):fa(Pl(NS()),CS(i));this.$M=n,this.Yp=new XV(t,r,n),this.Yp.nw().i((c=>{this.FM.v()&&this.FM.p(this.qM(c()))}),this),this.Yp.ew().i((c=>{this.WM.v()&&this.WM.p(this.qM(c()))}),this),this.Yp.Md().i((c=>{this.HM.v()&&this.HM.p(this.qM(c()))}),this);const o=this.Yp.Qt();this.jM=new CH(o,this.Yp.rg(),this.$M)}remove(){this.Yp.nw().u(this),this.Yp.ew().u(this),this.Yp.Md().u(this),this.jM.m(),this.Yp.m(),this.OM.clear(),this.NM.clear(),this.FM.m(),this.WM.m(),this.HM.m(),this.UM.m()}resize(t,n,i){this.autoSizeActive()||this.Yp.sg(t,n,i)}addCustomSeries(t,n={},i=0){const r=(o=>({type:"Custom",isBuiltIn:!1,defaultOptions:{...hH,...o.defaultOptions()},YM:dH,KM:o}))(_c(t));return this.ZM(r,n,i)}addSeries(t,n={},i=0){return this.ZM(t,n,i)}removeSeries(t){const n=Vr(this.OM.get(t)),i=this.UM.Hd(n);this.Yp.Qt().Hd(n),this.GM(i),this.OM.delete(t),this.NM.delete(n)}DM(t,n){this.GM(this.UM.Ug(t,n))}VM(t,n,i){this.GM(this.UM.Zg(t,n,i))}BM(t,n){const[i,r]=this.UM.Jg(t,n);return i.length!==0&&this.GM(r),i}subscribeClick(t){this.FM.i(t)}unsubscribeClick(t){this.FM._(t)}subscribeCrosshairMove(t){this.HM.i(t)}unsubscribeCrosshairMove(t){this.HM._(t)}subscribeDblClick(t){this.WM.i(t)}unsubscribeDblClick(t){this.WM._(t)}priceScale(t,n=0){return new Ej(this.Yp,t,n)}timeScale(){return this.jM}applyOptions(t){this.Yp.cr(CS(t))}options(){return this.Yp.N()}takeScreenshot(t=!1,n=!1){let i,r;try{n||(i=this.Yp.Qt().N().crosshair.mode,this.Yp.cr({crosshair:{mode:2}})),r=this.Yp.ug(t)}finally{n||i===void 0||this.Yp.Qt().cr({crosshair:{mode:i}})}return r}addPane(t=!1){const n=this.Yp.Qt().Xd();return n.O_(t),this.XM(n)}removePane(t){this.Yp.Qt().Sd(t)}swapPanes(t,n){this.Yp.Qt().Cd(t,n)}autoSizeActive(){return this.Yp.vg()}chartElement(){return this.Yp.hv()}panes(){return this.Yp.Qt().Xs().map((t=>this.XM(t)))}paneSize(t=0){const n=this.Yp.gg(t);return{height:n.height,width:n.width}}setCrosshairPosition(t,n,i){const r=this.OM.get(i);if(r===void 0)return;const o=this.Yp.Qt().Kn(r);o!==null&&this.Yp.Qt().Ld(t,n,o)}clearCrosshairPosition(){this.Yp.Qt().zd(!0)}horzBehaviour(){return this.$M}ZM(t,n={},i=0){Is(t.YM!==void 0),(function(h){if(h===void 0||h.type==="custom")return;const d=h;d.minMove!==void 0&&d.precision===void 0&&(d.precision=Nj(d.minMove))})(n.priceFormat),t.type==="Candlestick"&&(function(h){h.borderColor!==void 0&&(h.borderUpColor=h.borderColor,h.borderDownColor=h.borderColor),h.wickColor!==void 0&&(h.wickUpColor=h.wickColor,h.wickDownColor=h.wickColor)})(n);const r=fa(Pl(lj),Pl(t.defaultOptions),n),o=t.YM,c=new N0(this.Yp.Qt(),t.type,r,o,t.KM);this.Yp.Qt().Fd(c,i);const u=new AH(c,this,this,this,this.$M,(h=>this.XM(h)));return this.OM.set(u,c),this.NM.set(c,u),u}GM(t){const n=this.Yp.Qt();n.Od(t.Et.vc,t.Et.sM,t.Et.nM),t.F_.forEach(((i,r)=>r.ht(i.le,i.iM))),n.Et().Ju(),n.Sc()}JM(t){return Vr(this.NM.get(t))}qM(t){const n=new Map;t.Vg.forEach(((r,o)=>{const c=o.wh(),u=Cp(c)(r);if(c!=="Custom")Is(ZV(u));else{const h=o.hl();Is(!h||h(u)===!1)}n.set(this.JM(o),u)}));const i=t.Ig!==void 0&&this.NM.has(t.Ig)?this.JM(t.Ig):void 0;return{time:t.Gr,logical:t.js,point:t.Rg,paneIndex:t.Dg,hoveredSeries:i,hoveredObjectId:t.Bg,seriesData:n,sourceEvent:t.Eg}}XM(t){let n=this.Xc.get(t);return n||(n=new SH(this.Yp,(i=>this.JM(i)),t,this),this.Xc.set(t,n)),n}}function jH(e){if(Of(e)){const t=document.getElementById(e);return Is(t!==null,`Cannot find element in DOM with id=${e}`),t}return e}function EH(e,t,n){const i=jH(e),r=new _H(i,t,n);return t.setOptions(r.options()),r}function MH(e,t){return EH(e,new lS,lS.pf(t))}class TH extends _j{constructor(t,n){super(t,n,!1)}mM(t,n,i){n.mc(this.aM,h2(this.lM)),t.Zo(this.aM,i,h2(this.lM))}Lb(t,n,i){return{wt:t,Hr:n.Wt[0],Ur:n.Wt[1],$r:n.Wt[2],qr:n.Wt[3],_t:NaN,Go:NaN,Xo:NaN,Jo:NaN,Qo:NaN}}pM(){const t=this.ee.ga();this.aM=this.ee.Na().Dh().map((n=>this.tb(n.js,n,t)))}}class kH extends td{constructor(){super(...arguments),this.jt=null,this.Ib=0}ht(t){this.jt=t}et(t){if(this.jt===null||this.jt.qs.length===0||this.jt.lt===null)return;const{horizontalPixelRatio:n}=t;this.Ib=(function(o,c){if(o>=2.5&&o<=4)return Math.floor(3*c);const u=1-.2*Math.atan(Math.max(4,o)-4)/(.5*Math.PI),h=Math.floor(o*u*c),d=Math.floor(o*c),p=Math.min(h,d);return Math.max(Math.floor(c),p)})(this.jt.ul,n),this.Ib>=2&&Math.floor(n)%2!=this.Ib%2&&this.Ib--;const i=this.jt.qs;this.jt.zb&&this.Ob(t,i,this.jt.lt),this.jt.Mi&&this.gm(t,i,this.jt.lt);const r=this.Nb(n);(!this.jt.Mi||this.Ib>2*r)&&this.Fb(t,i,this.jt.lt)}Ob(t,n,i){if(this.jt===null)return;const{context:r,horizontalPixelRatio:o,verticalPixelRatio:c}=t;let u="",h=Math.min(Math.floor(o),Math.floor(this.jt.ul*o));h=Math.max(Math.floor(o),Math.min(h,this.Ib));const d=Math.floor(.5*h);let p=null;for(let v=i.from;v<i.to;v++){const S=n[v];S.sh!==u&&(r.fillStyle=S.sh,u=S.sh);const b=Math.round(Math.min(S.Go,S.Qo)*c),_=Math.round(Math.max(S.Go,S.Qo)*c),A=Math.round(S.Xo*c),j=Math.round(S.Jo*c);let E=Math.round(o*S._t)-d;const L=E+h-1;p!==null&&(E=Math.max(p+1,E),E=Math.min(E,L));const D=L-E+1;r.fillRect(E,A,D,b-A),r.fillRect(E,_+1,D,j-_),p=L}}Nb(t){let n=Math.floor(1*t);this.Ib<=2*n&&(n=Math.floor(.5*(this.Ib-1)));const i=Math.max(Math.floor(t),n);return this.Ib<=2*i?Math.max(Math.floor(t),Math.floor(1*t)):i}gm(t,n,i){if(this.jt===null)return;const{context:r,horizontalPixelRatio:o,verticalPixelRatio:c}=t;let u="";const h=this.Nb(o);let d=null;for(let p=i.from;p<i.to;p++){const v=n[p];v.ih!==u&&(r.fillStyle=v.ih,u=v.ih);let S=Math.round(v._t*o)-Math.floor(.5*this.Ib);const b=S+this.Ib-1,_=Math.round(Math.min(v.Go,v.Qo)*c),A=Math.round(Math.max(v.Go,v.Qo)*c);if(d!==null&&(S=Math.max(d+1,S),S=Math.min(S,b)),this.jt.ul*o>2*h)Bq(r,S,_,b-S+1,A-_+1,h);else{const j=b-S+1;r.fillRect(S,_,j,A-_+1)}d=b}}Fb(t,n,i){if(this.jt===null)return;const{context:r,horizontalPixelRatio:o,verticalPixelRatio:c}=t;let u="";const h=this.Nb(o);for(let d=i.from;d<i.to;d++){const p=n[d];let v=Math.round(Math.min(p.Go,p.Qo)*c),S=Math.round(Math.max(p.Go,p.Qo)*c),b=Math.round(p._t*o)-Math.floor(.5*this.Ib),_=b+this.Ib-1;if(p.th!==u){const A=p.th;r.fillStyle=A,u=A}this.jt.Mi&&(b+=h,v+=h,_-=h,S-=h),v>S||r.fillRect(b,v,_-b+1,S-v+1)}}}class LH extends TH{constructor(){super(...arguments),this.cM=new kH}tb(t,n,i){return{...this.Lb(t,n,i),...i.gh(t)}}wM(){const t=this.ee.N();this.cM.ht({qs:this.aM,ul:this.re.Et().ul(),zb:t.wickVisible,Mi:t.borderVisible,lt:this.lM})}}const PH={type:"Candlestick",isBuiltIn:!0,defaultOptions:{upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},YM:(e,t)=>new LH(e,t)};({...lj});const RH=["Meme","AI","DeFi","Games","Infra","De-Sci","Social","DePIN","Charity","Others"],DH=[{id:"bsc",name:"BSC",icon:"",image:Zv},{id:"ethereum",name:"Ethereum",icon:"",image:"https://cryptologos.cc/logos/ethereum-eth-logo.svg"},{id:"solana",name:"Solana",icon:"",image:"https://cryptologos.cc/logos/solana-sol-logo.svg"}];function OH(){const e=pM(),[t,n]=M.useState("dashboard"),[i,r]=M.useState(!1),[o,c]=M.useState(!1),[u,h]=M.useState(!1),[d,p]=M.useState(""),[v,S]=M.useState(!1),b=M.useRef(null),{t:_}=c0(),A=[{id:"dashboard",label:_("dashboard.title"),icon:f.jsx(y8,{className:"w-5 h-5"})},{id:"token-analyzer",label:_("dashboard.tokenAnalyzer"),icon:f.jsx(Hd,{className:"w-5 h-5"})},{id:"token-generator",label:_("dashboard.tokenGenerator"),icon:f.jsx(lu,{className:"w-5 h-5"})},{id:"website-builder",label:_("dashboard.websiteBuilder"),icon:f.jsx(Sc,{className:"w-5 h-5"})},{id:"bundle-checker",label:_("dashboard.bundleChecker"),icon:f.jsx(Vd,{className:"w-5 h-5"})},{id:"password-score",label:_("dashboard.passwordScore"),icon:f.jsx(uf,{className:"w-5 h-5"})},{id:"staking",label:_("dashboard.staking"),icon:f.jsx(vv,{className:"w-5 h-5"}),badge:"Soon"},{id:"token-swap",label:_("dashboard.tokenSwap"),icon:f.jsx(Wg,{className:"w-5 h-5"})},{id:"futures",label:"Futures",icon:f.jsx(yv,{className:"w-5 h-5"}),badge:"Soon"},{id:"free-audit",label:_("dashboard.freeAudit"),icon:f.jsx(m8,{className:"w-5 h-5"})},{id:"block-explorer",label:_("dashboard.blockExplorer"),icon:f.jsx(l8,{className:"w-5 h-5"}),badge:"Soon"}];M.useEffect(()=>{const R=()=>{h(window.innerWidth>=1024)};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]),M.useEffect(()=>{if(v)return;const Nt=new URLSearchParams(e).get("token");Nt&&(p(Nt),n("token-analyzer"),S(!0),setTimeout(()=>{const Lt=document.querySelector('[data-testid="button-analyze-token"]');Lt&&Lt.click()},100))},[e,v]),M.useEffect(()=>{const R=b.current;if(!R)return;const Nt=R.getContext("2d");if(!Nt)return;const Lt=()=>{R.width=window.innerWidth,R.height=window.innerHeight};Lt(),window.addEventListener("resize",Lt);const Me=[],me=60;for(let ge=0;ge<me;ge++)Me.push({x:Math.random()*R.width,y:Math.random()*R.height,size:Math.random()*1.5+.5,speedX:(Math.random()-.5)*.2,speedY:(Math.random()-.5)*.2,opacity:Math.random()*.4+.1});const Pe=()=>{Nt.clearRect(0,0,R.width,R.height),Me.forEach(ge=>{ge.x+=ge.speedX,ge.y+=ge.speedY,ge.x<0&&(ge.x=R.width),ge.x>R.width&&(ge.x=0),ge.y<0&&(ge.y=R.height),ge.y>R.height&&(ge.y=0),Nt.beginPath(),Nt.arc(ge.x,ge.y,ge.size,0,Math.PI*2),Nt.fillStyle=`rgba(255, 255, 255, ${ge.opacity})`,Nt.fill()}),Me.forEach((ge,en)=>{Me.slice(en+1).forEach(ze=>{const Nn=ge.x-ze.x,Ye=ge.y-ze.y,ii=Math.sqrt(Nn*Nn+Ye*Ye);ii<100&&(Nt.beginPath(),Nt.moveTo(ge.x,ge.y),Nt.lineTo(ze.x,ze.y),Nt.strokeStyle=`rgba(48, 208, 242, ${.08*(1-ii/100)})`,Nt.lineWidth=.5,Nt.stroke())})}),requestAnimationFrame(Pe)};return Pe(),()=>{window.removeEventListener("resize",Lt)}},[]);const[j,E]=M.useState("bsc"),[L,D]=M.useState(null),[z,$]=M.useState(!1),[ut,nt]=M.useState(null),[H,Q]=M.useState(""),[ct,F]=M.useState(null),[Y,ot]=M.useState(!1),[tt,yt]=M.useState(null),[J,at]=M.useState(""),[K,dt]=M.useState(""),[Tt,X]=M.useState(""),[P,q]=M.useState("Meme"),[W,lt]=M.useState(""),[ht,ft]=M.useState(""),[Ct,_t]=M.useState(""),[Dt,$t]=M.useState(null),[Wt,Xt]=M.useState(null),[se,et]=M.useState(""),[Qt,Ke]=M.useState(!1),[Ce,Ut]=M.useState(null),[oe,Zt]=M.useState(null),[ie,xe]=M.useState(!1),[ye,nn]=M.useState(""),[Ue,on]=M.useState(""),[je,le]=M.useState(0),[qe,pe]=M.useState([]),[Gn,sn]=M.useState(""),[Jt,Re]=M.useState(null),[rn,we]=M.useState(!1),[Ln,_e]=M.useState(null),[Ee,_n]=M.useState("solana"),[Se,be]=M.useState(""),[un,nr]=M.useState(""),[ki,br]=M.useState(""),[Li,Ne]=M.useState(""),[bi,xr]=M.useState(""),[Yn,_s]=M.useState(""),[On,ui]=M.useState("cyber"),[ti,pa]=M.useState(null),[Wn,jn]=M.useState(null),[En,Ji]=M.useState(""),[ps,js]=M.useState(!1),[Xe,Vs]=M.useState(null),[Hs,$r]=M.useState(null),[Es,Ms]=M.useState([]),[wr,Sr]=M.useState(""),[ei,go]=M.useState(!1),[vn,Ts]=M.useState(null),[Nr,vo]=M.useState(null),[ir,tl]=M.useState(null),[yo,gs]=M.useState(!1),[hi,sr]=M.useState("BTCUSDT"),[Ie,el]=M.useState({price:0,markPrice:0,indexPrice:0,fundingRate:0,volume24h:0,openInterest:0,priceChange:0,priceChangePercent:0}),[rs,ga]=M.useState({bids:[],asks:[]}),[va,as]=M.useState([]),[ni,di]=M.useState("1h"),rr=M.useRef(null),vs=M.useRef(null),Gr=M.useRef(null),[Hi,nl]=M.useState([]);M.useEffect(()=>{const R=async()=>{try{const Lt=await fetch("https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10&page=1&sparkline=false&price_change_percentage=24h");if(Lt.ok){const Me=await Lt.json();nl(Me)}}catch{console.log("Failed to fetch crypto prices")}};R();const Nt=setInterval(R,6e4);return()=>clearInterval(Nt)},[]),M.useEffect(()=>{if(t!=="futures")return;const R=async()=>{try{const Me=await(await fetch(`https://fapi.binance.com/fapi/v1/ticker/24hr?symbol=${hi}`)).json(),Pe=await(await fetch(`https://fapi.binance.com/fapi/v1/premiumIndex?symbol=${hi}`)).json(),en=await(await fetch(`https://fapi.binance.com/fapi/v1/depth?symbol=${hi}&limit=10`)).json(),Nn=await(await fetch(`https://fapi.binance.com/fapi/v1/klines?symbol=${hi}&interval=${ni}&limit=100`)).json();el({price:parseFloat(Me.lastPrice||0),markPrice:parseFloat(Pe.markPrice||0),indexPrice:parseFloat(Pe.indexPrice||0),fundingRate:parseFloat(Pe.lastFundingRate||0)*100,volume24h:parseFloat(Me.quoteVolume||0),openInterest:parseFloat(Me.openInterest||0)*parseFloat(Me.lastPrice||0),priceChange:parseFloat(Me.priceChange||0),priceChangePercent:parseFloat(Me.priceChangePercent||0)}),en.bids&&en.asks&&ga({bids:en.bids.slice(0,8).map(Ye=>({price:parseFloat(Ye[0]),size:parseFloat(Ye[1])})),asks:en.asks.slice(0,8).reverse().map(Ye=>({price:parseFloat(Ye[0]),size:parseFloat(Ye[1])}))}),Array.isArray(Nn)&&as(Nn.map(Ye=>({time:Ye[0],open:parseFloat(Ye[1]),high:parseFloat(Ye[2]),low:parseFloat(Ye[3]),close:parseFloat(Ye[4]),volume:parseFloat(Ye[5])})))}catch{console.log("Failed to fetch futures data")}};R();const Nt=setInterval(R,2e3);return()=>clearInterval(Nt)},[t,hi,ni]),M.useEffect(()=>{if(t!=="futures"||!rr.current)return;vs.current&&(vs.current.remove(),vs.current=null,Gr.current=null);const R=MH(rr.current,{layout:{background:{type:d2.Solid,color:"transparent"},textColor:"#9ca3af"},grid:{vertLines:{color:"rgba(42, 46, 57, 0.3)"},horzLines:{color:"rgba(42, 46, 57, 0.3)"}},width:rr.current.clientWidth,height:300,timeScale:{timeVisible:!0,secondsVisible:!1,borderColor:"rgba(42, 46, 57, 0.5)"},rightPriceScale:{borderColor:"rgba(42, 46, 57, 0.5)"},crosshair:{mode:1,vertLine:{width:1,color:"rgba(0, 212, 170, 0.3)",style:2},horzLine:{width:1,color:"rgba(0, 212, 170, 0.3)",style:2}}}),Nt=R.addSeries(PH,{upColor:"#22c55e",downColor:"#ef4444",borderUpColor:"#22c55e",borderDownColor:"#ef4444",wickUpColor:"#22c55e",wickDownColor:"#ef4444"});vs.current=R,Gr.current=Nt;const Lt=()=>{rr.current&&vs.current&&vs.current.applyOptions({width:rr.current.clientWidth})};return window.addEventListener("resize",Lt),()=>{window.removeEventListener("resize",Lt),vs.current&&(vs.current.remove(),vs.current=null,Gr.current=null)}},[t,hi,ni]),M.useEffect(()=>{if(!Gr.current||va.length===0)return;const R=va.map(Nt=>({time:Nt.time/1e3,open:Nt.open,high:Nt.high,low:Nt.low,close:Nt.close}));Gr.current.setData(R),vs.current&&vs.current.timeScale().fitContent()},[va]);const[ar,$s]=M.useState("BNB"),[xi,il]=M.useState(""),[Pi,ya]=M.useState(""),[Yr,Ua]=M.useState(""),[wi,Gs]=M.useState("0.5"),[or,qa]=M.useState("0"),[ba,De]=M.useState("0"),[sl,bo]=M.useState(!1),[rl,Mn]=M.useState(null),[Si,xo]=M.useState(null),[xa,ys]=M.useState(null),[wa,lr]=M.useState(!1),Wr="0x10ED43C718714eb63d5aA57B78B54704E256024E",Ri="0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",Sa=[{symbol:"BNB",name:"BNB",address:"native",decimals:18,logo:Zv},{symbol:"WBNB",name:"Wrapped BNB",address:Ri,decimals:18,logo:Zv},{symbol:"USDT",name:"Tether USD",address:"0x55d398326f99059fF775485246999027B3197955",decimals:18,logo:"https://cryptologos.cc/logos/tether-usdt-logo.svg"},{symbol:"USDC",name:"USD Coin",address:"0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",decimals:18,logo:"https://cryptologos.cc/logos/usd-coin-usdc-logo.svg"},{symbol:"BUSD",name:"Binance USD",address:"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",decimals:18,logo:"https://cryptologos.cc/logos/binance-usd-busd-logo.svg"},{symbol:"CAKE",name:"PancakeSwap",address:"0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82",decimals:18,logo:"https://cryptologos.cc/logos/pancakeswap-cake-logo.svg"}],wo=R=>{const Nt=R.target.files?.[0];if(Nt){const Lt=new FileReader;Lt.onloadend=()=>{jn(Lt.result)},Lt.readAsDataURL(Nt)}},Di=async()=>{if(En.trim()){js(!0),$r(null),Vs(null),Ms([_("dashboard.auditInProgress")]);try{setTimeout(()=>Ms(Lt=>[...Lt,"Address Queued. Analyzing..."]),1e3);const R=await fetch(`/api/audit/${En}`),Nt=await R.json();if(!R.ok)throw new Error(Nt.error||"Failed to audit contract");Ms(Lt=>[...Lt,_("dashboard.auditComplete")]),Vs(Nt)}catch(R){$r(R.message||"Failed to audit contract")}finally{js(!1)}}},Ar=()=>{if(!Xe)return;const R=new Ae,Nt=R.internal.pageSize.getWidth();let Lt=20;R.setFontSize(20),R.setTextColor(0,200,255),R.text("ASTHERAFI",Nt/2,Lt,{align:"center"}),Lt+=8,R.setFontSize(14),R.setTextColor(100,100,100),R.text("Free Smart Contract Audit Report",Nt/2,Lt,{align:"center"}),Lt+=15;const Me=Xe.auditScore>=80?[0,180,0]:Xe.auditScore>=60?[255,193,7]:Xe.auditScore>=40?[255,152,0]:[220,53,69];R.setFillColor(Me[0],Me[1],Me[2]),R.roundedRect(20,Lt,50,25,3,3,"F"),R.setFontSize(24),R.setTextColor(255,255,255),R.text(`${Xe.auditScore}`,45,Lt+14,{align:"center"}),R.setFontSize(8),R.text("SCORE",45,Lt+21,{align:"center"});const me=Xe.grade?.startsWith("A")?[0,180,0]:Xe.grade?.startsWith("B")?[0,180,180]:Xe.grade?.startsWith("C")?[255,193,7]:[220,53,69];R.setFillColor(me[0],me[1],me[2]),R.roundedRect(75,Lt,35,25,3,3,"F"),R.setFontSize(20),R.setTextColor(255,255,255),R.text(`${Xe.grade||"N/A"}`,92.5,Lt+14,{align:"center"}),R.setFontSize(8),R.text("GRADE",92.5,Lt+21,{align:"center"}),R.setFontSize(9),R.setTextColor(60,60,60),R.text(`Token: ${Xe.tokenName||"Unknown"} (${Xe.tokenSymbol||"???"})`,120,Lt+6),R.text("Chain: BSC (BEP-20)",120,Lt+12),R.text(`Holders: ${Xe.rawData?.holderCount?.toLocaleString()||"N/A"}`,120,Lt+18),Lt+=32,R.setFontSize(8),R.setTextColor(100,100,100),R.text(`Contract: ${En}`,20,Lt),Lt+=5,R.text(`Date: ${new Date().toLocaleDateString()}`,20,Lt),Lt+=10,R.setFontSize(14),R.setTextColor(0,0,0),R.text("Security Summary",20,Lt),Lt+=8;const Pe=Xe.summary||{},ge=[{label:"Critical",value:Pe.critical||0,color:[220,53,69]},{label:"Major",value:Pe.major||0,color:[255,152,0]},{label:"Medium",value:Pe.medium||0,color:[255,193,7]},{label:"Minor",value:Pe.minor||0,color:[33,150,243]},{label:"Info",value:Pe.info||0,color:[158,158,158]}];R.setFontSize(10);let en=20;ge.forEach(ze=>{R.setTextColor(ze.color[0],ze.color[1],ze.color[2]),R.text(`${ze.label}: ${ze.value}`,en,Lt),en+=35}),Lt+=15,R.setFontSize(14),R.setTextColor(0,0,0),R.text("Detailed Findings",20,Lt),Lt+=10,R.setFontSize(9),Xe.findings&&Xe.findings.length>0?Xe.findings.forEach(ze=>{Lt>270&&(R.addPage(),Lt=20);const Ye={critical:[220,53,69],major:[255,152,0],medium:[255,193,7],minor:[33,150,243],info:[158,158,158]}[ze.severity]||[100,100,100];R.setTextColor(Ye[0],Ye[1],Ye[2]),R.text(`[${ze.severity.toUpperCase()}]`,20,Lt),R.setTextColor(0,0,0),R.text(ze.title,45,Lt),Lt+=5,R.setTextColor(100,100,100);const ii=R.splitTextToSize(ze.description,Nt-50);R.text(ii,25,Lt),Lt+=ii.length*4+2,R.setTextColor(80,80,80),R.text(`Type: ${ze.type} | Confidence: ${ze.confidence}`,25,Lt),Lt+=8}):(R.setTextColor(0,150,0),R.text("No security issues found! This contract passed all security checks.",20,Lt),Lt+=10),Lt=285,R.setFontSize(8),R.setTextColor(150,150,150),R.text("Report generated by Astherafi Smart Contract Audit Tool",Nt/2,Lt,{align:"center"}),Lt+=4,R.text("https://astherafi.com",Nt/2,Lt,{align:"center"}),R.save(`audit-report-${En.slice(0,8)}.pdf`)},Ys=async()=>{gs(!0);try{const R=await fetch("/api/explorer"),Nt=await R.json();R.ok&&tl(Nt)}catch(R){console.error("Failed to load explorer data:",R)}finally{gs(!1)}};M.useEffect(()=>{t==="block-explorer"&&!ir&&!yo&&Ys()},[t]);const Cr=async()=>{if(wr.trim()){go(!0),vo(null),Ts(null);try{const R=await fetch(`/api/explorer/${wr}`),Nt=await R.json();if(!R.ok)throw new Error(Nt.error||"Failed to fetch address data");Ts(Nt)}catch(R){vo(R.message||"Failed to fetch address data")}finally{go(!1)}}},_r=A.find(R=>R.id===t),Va=()=>{if(!Se.trim())return;const R=[{primary:"#6366f1",secondary:"#8b5cf6",accent:"#ec4899",bg:"#0f0f23",cardBg:"#1a1a2e",text:"#ffffff"},{primary:"#00d4ff",secondary:"#00ff88",accent:"#ff00ff",bg:"#0a0a0f",cardBg:"#111122",text:"#ffffff"},{primary:"#f59e0b",secondary:"#ef4444",accent:"#f97316",bg:"#1c1917",cardBg:"#292524",text:"#fafaf9"},{primary:"#10b981",secondary:"#06b6d4",accent:"#14b8a6",bg:"#0f172a",cardBg:"#1e293b",text:"#f8fafc"},{primary:"#e11d48",secondary:"#be123c",accent:"#fb7185",bg:"#18181b",cardBg:"#27272a",text:"#fafafa"},{primary:"#8b5cf6",secondary:"#a855f7",accent:"#d946ef",bg:"#0c0a09",cardBg:"#1c1917",text:"#fafaf9"},{primary:"#0ea5e9",secondary:"#38bdf8",accent:"#7dd3fc",bg:"#020617",cardBg:"#0f172a",text:"#f8fafc"}],Nt=["135deg","45deg","180deg","90deg","225deg","315deg"],Lt=["fadeInUp","fadeInDown","slideIn","scaleIn","bounceIn"],Me=["radial-gradient(circle at 20% 80%, PRIMARY 0%, transparent 50%), radial-gradient(circle at 80% 20%, SECONDARY 0%, transparent 50%)","linear-gradient(GRADDIR, PRIMARY 0%, transparent 60%), radial-gradient(ellipse at bottom, SECONDARY 0%, transparent 70%)","conic-gradient(from 180deg at 50% 50%, PRIMARY, SECONDARY, PRIMARY)","radial-gradient(ellipse at top left, PRIMARY 0%, transparent 50%), radial-gradient(ellipse at bottom right, SECONDARY 0%, transparent 50%)"],me=R[Math.floor(Math.random()*R.length)],Pe=Nt[Math.floor(Math.random()*Nt.length)],ge=Lt[Math.floor(Math.random()*Lt.length)],ze=Me[Math.floor(Math.random()*Me.length)].replace(/PRIMARY/g,me.primary+"20").replace(/SECONDARY/g,me.secondary+"15").replace(/GRADDIR/g,Pe),Ye=["⚡","🚀","💎","🔒","🌟","💫","🎯","✨","🔥","💰"].sort(()=>Math.random()-.5).slice(0,4),ii=[{value:Math.floor(Math.random()*5e4)+1e4,label:"Holders"},{value:"$"+(Math.random()*10).toFixed(1)+"M",label:"Market Cap"},{value:Math.floor(Math.random()*100)+1+"K",label:"Transactions"},{value:"24/7",label:"Support"}],Jr=`<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>${Se}</title>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
  <style>
    * { margin: 0; padding: 0; box-sizing: border-box; }
    :root {
      --primary: ${me.primary};
      --secondary: ${me.secondary};
      --accent: ${me.accent};
      --bg: ${me.bg};
      --card-bg: ${me.cardBg};
      --text: ${me.text};
    }
    body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
    
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes slideIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
    @keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
    @keyframes bounceIn { 0% { opacity: 0; transform: scale(0.3); } 50% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
    @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
    @keyframes glow { 0%, 100% { box-shadow: 0 0 20px var(--primary); } 50% { box-shadow: 0 0 40px var(--primary), 0 0 60px var(--secondary); } }
    
    .animate { animation: ${ge} 0.8s ease-out forwards; }
    .delay-1 { animation-delay: 0.1s; opacity: 0; }
    .delay-2 { animation-delay: 0.2s; opacity: 0; }
    .delay-3 { animation-delay: 0.3s; opacity: 0; }
    .delay-4 { animation-delay: 0.4s; opacity: 0; }
    
    .container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
    
    /* Navigation */
    nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1rem 0; background: ${me.bg}ee; backdrop-filter: blur(10px); border-bottom: 1px solid ${me.primary}20; }
    nav .container { display: flex; justify-content: space-between; align-items: center; }
    .logo { font-size: 1.5rem; font-weight: 800; background: linear-gradient(${Pe}, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 0.75rem; }
    .logo-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
    .nav-links { display: flex; gap: 2rem; align-items: center; }
    .nav-links a { color: var(--text); text-decoration: none; opacity: 0.8; transition: all 0.3s; }
    .nav-links a:hover { opacity: 1; color: var(--primary); }
    
    /* Hero */
    .hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; padding: 8rem 2rem 4rem; background: ${ze}; }
    .hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E"); opacity: 0.03; pointer-events: none; }
    .hero-content { position: relative; z-index: 1; max-width: 800px; }
    .hero-badge { display: inline-block; padding: 0.5rem 1rem; background: var(--primary); background: linear-gradient(${Pe}, var(--primary)20, var(--secondary)20); border: 1px solid var(--primary)40; border-radius: 100px; font-size: 0.875rem; margin-bottom: 2rem; }
    .hero h1 { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; background: linear-gradient(${Pe}, var(--text), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .hero p { font-size: 1.25rem; opacity: 0.8; max-width: 600px; margin: 0 auto 2.5rem; line-height: 1.7; }
    .hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
    
    .btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 1rem 2rem; border-radius: 12px; font-weight: 600; text-decoration: none; transition: all 0.3s; cursor: pointer; border: none; font-size: 1rem; }
    .btn-primary { background: linear-gradient(${Pe}, var(--primary), var(--secondary)); color: white; box-shadow: 0 4px 20px ${me.primary}40; }
    .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 30px ${me.primary}60; }
    .btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
    .btn-outline:hover { background: var(--primary)10; transform: translateY(-2px); }
    
    /* Stats */
    .stats { padding: 4rem 0; border-top: 1px solid ${me.primary}15; border-bottom: 1px solid ${me.primary}15; }
    .stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
    .stat-item h3 { font-size: 2.5rem; font-weight: 800; background: linear-gradient(${Pe}, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .stat-item p { opacity: 0.6; margin-top: 0.5rem; }
    
    /* Features */
    .features { padding: 6rem 0; }
    .section-header { text-align: center; max-width: 600px; margin: 0 auto 4rem; }
    .section-badge { display: inline-block; padding: 0.5rem 1rem; background: var(--primary)15; border-radius: 100px; font-size: 0.875rem; color: var(--primary); margin-bottom: 1rem; }
    .section-header h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
    .section-header p { opacity: 0.7; }
    .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
    .feature-card { background: var(--card-bg); border: 1px solid ${me.primary}20; border-radius: 20px; padding: 2rem; transition: all 0.3s; }
    .feature-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 20px 40px ${me.primary}20; }
    .feature-icon { width: 60px; height: 60px; background: linear-gradient(${Pe}, var(--primary)20, var(--secondary)20); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.5rem; }
    .feature-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
    .feature-card p { opacity: 0.7; font-size: 0.95rem; line-height: 1.6; }
    
    /* About */
    .about { padding: 6rem 0; }
    .about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
    .about-text h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; }
    .about-text p { opacity: 0.8; line-height: 1.8; margin-bottom: 1.5rem; }
    .about-visual { background: linear-gradient(${Pe}, var(--primary)10, var(--secondary)10); border: 1px solid var(--primary)20; border-radius: 24px; padding: 3rem; display: flex; align-items: center; justify-content: center; min-height: 300px; animation: float 6s ease-in-out infinite; }
    .about-visual .logo-big { font-size: 4rem; font-weight: 900; background: linear-gradient(${Pe}, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .about-visual .about-logo { width: 150px; height: 150px; border-radius: 24px; object-fit: cover; box-shadow: 0 20px 40px ${me.primary}30; }
    
    /* Contract */
    .contract-section { padding: 6rem 0; }
    .contract-box { background: var(--card-bg); border: 1px solid var(--primary)30; border-radius: 20px; padding: 3rem; text-align: center; max-width: 700px; margin: 0 auto; }
    .contract-box h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
    .contract-address { background: var(--bg); border: 1px solid var(--primary)20; border-radius: 12px; padding: 1.5rem; font-family: monospace; word-break: break-all; font-size: 0.9rem; margin-bottom: 1.5rem; }
    .copy-btn { background: var(--primary)20; border: 1px solid var(--primary)40; color: var(--primary); padding: 0.75rem 1.5rem; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
    .copy-btn:hover { background: var(--primary)30; }
    
    /* CTA */
    .cta { padding: 6rem 0; text-align: center; background: linear-gradient(${Pe}, var(--primary)10, var(--secondary)05); border-radius: 32px; margin: 4rem 2rem; }
    .cta h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
    .cta p { opacity: 0.8; margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }
    .cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
    
    /* Footer */
    footer { padding: 4rem 0 2rem; border-top: 1px solid ${me.primary}15; }
    .footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; }
    .footer-links { display: flex; gap: 2rem; }
    .footer-links a { color: var(--text); opacity: 0.6; text-decoration: none; transition: all 0.3s; }
    .footer-links a:hover { opacity: 1; color: var(--primary); }
    .footer-bottom { text-align: center; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid ${me.primary}10; opacity: 0.5; font-size: 0.875rem; }
    
    @media (max-width: 768px) {
      .stats-grid { grid-template-columns: repeat(2, 1fr); }
      .about-content { grid-template-columns: 1fr; }
      .nav-links { display: none; }
    }
  </style>
</head>
<body>
  <nav>
    <div class="container">
      <div class="logo">${Wn?`<img src="${Wn}" alt="${Se}" class="logo-img">`:""}${Se}</div>
      <div class="nav-links">
        <a href="#features">Features</a>
        <a href="#about">About</a>
        ${Li?'<a href="#contract">Contract</a>':""}
        ${bi?`<a href="${bi}" target="_blank">Twitter</a>`:""}
        ${Yn?`<a href="${Yn}" target="_blank">Telegram</a>`:""}
      </div>
    </div>
  </nav>

  <section class="hero">
    <div class="hero-content">
      <div class="hero-badge animate delay-1">${Ye[0]} New Token Launch</div>
      <h1 class="animate delay-2">${Se}</h1>
      <p class="animate delay-3">${un||"The next generation decentralized token built for the future of finance."}</p>
      <div class="hero-buttons animate delay-4">
        ${bi?`<a href="${bi}" class="btn btn-primary" target="_blank">${Ye[1]} Join Community</a>`:'<a href="#about" class="btn btn-primary">Learn More</a>'}
        ${Yn?`<a href="${Yn}" class="btn btn-outline" target="_blank">Telegram</a>`:""}
        ${Li?'<a href="#contract" class="btn btn-outline">View Contract</a>':""}
      </div>
    </div>
  </section>

  <section class="stats">
    <div class="container">
      <div class="stats-grid">
        ${ii.map(cr=>`<div class="stat-item"><h3>${cr.value}</h3><p>${cr.label}</p></div>`).join("")}
      </div>
    </div>
  </section>

  <section class="features" id="features">
    <div class="container">
      <div class="section-header">
        <div class="section-badge">Why Choose Us</div>
        <h2>Built Different</h2>
        <p>Experience the next level of decentralized finance with cutting-edge technology.</p>
      </div>
      <div class="features-grid">
        <div class="feature-card">
          <div class="feature-icon">${Ye[0]}</div>
          <h3>Lightning Fast</h3>
          <p>Experience instant transactions with our optimized smart contract architecture.</p>
        </div>
        <div class="feature-card">
          <div class="feature-icon">${Ye[1]}</div>
          <h3>Ultra Secure</h3>
          <p>Audited and verified contracts ensure your assets are always protected.</p>
        </div>
        <div class="feature-card">
          <div class="feature-icon">${Ye[2]}</div>
          <h3>Community Driven</h3>
          <p>Join thousands of holders in shaping the future of this project.</p>
        </div>
        <div class="feature-card">
          <div class="feature-icon">${Ye[3]}</div>
          <h3>Fair Launch</h3>
          <p>No presale, no team tokens. Everyone has an equal opportunity.</p>
        </div>
      </div>
    </div>
  </section>

  ${ki?`
  <section class="about" id="about">
    <div class="container">
      <div class="about-content">
        <div class="about-text">
          <h2>About ${Se}</h2>
          <p>${ki}</p>
          <div class="hero-buttons">
            ${bi?`<a href="${bi}" class="btn btn-primary" target="_blank">Follow Us</a>`:""}
            ${Yn?`<a href="${Yn}" class="btn btn-outline" target="_blank">Join Telegram</a>`:""}
          </div>
        </div>
        <div class="about-visual">
          ${Wn?`<img src="${Wn}" alt="${Se}" class="about-logo">`:`<div class="logo-big">${Se.charAt(0)}</div>`}
        </div>
      </div>
    </div>
  </section>`:""}

  ${Li?`
  <section class="contract-section" id="contract">
    <div class="container">
      <div class="contract-box">
        <h2>Contract Address</h2>
        <div class="contract-address" id="contractAddr">${Li}</div>
        <button class="copy-btn" onclick="navigator.clipboard.writeText('${Li}');this.textContent='Copied!'">Copy Address</button>
      </div>
    </div>
  </section>`:""}

  <section class="cta">
    <div class="container">
      <h2>Ready to Join?</h2>
      <p>Be part of the ${Se} community and help shape the future of decentralized finance.</p>
      <div class="cta-buttons">
        ${bi?`<a href="${bi}" class="btn btn-primary" target="_blank">Twitter</a>`:""}
        ${Yn?`<a href="${Yn}" class="btn btn-outline" target="_blank">Telegram</a>`:""}
      </div>
    </div>
  </section>

  <footer>
    <div class="container">
      <div class="footer-content">
        <div class="logo">${Wn?`<img src="${Wn}" alt="${Se}" class="logo-img">`:""}${Se}</div>
        <div class="footer-links">
          ${bi?`<a href="${bi}" target="_blank">Twitter</a>`:""}
          ${Yn?`<a href="${Yn}" target="_blank">Telegram</a>`:""}
          ${Li?'<a href="#contract">Contract</a>':""}
        </div>
      </div>
      <div class="footer-bottom">Built with Astherafi</div>
    </div>
  </footer>
</body>
</html>`;pa(Jr)},Kr=()=>{if(!ti)return;const R=new Blob([ti],{type:"text/html"}),Nt=URL.createObjectURL(R),Lt=document.createElement("a");Lt.href=Nt,Lt.download=`${Se.toLowerCase().replace(/\s+/g,"-")}-landing.html`,Lt.click(),URL.revokeObjectURL(Nt)},Xr=async()=>{if(!Gn.trim()){_e("Please enter a mint address");return}we(!0),_e(null),Re(null);try{const R=await fetch("/api/bundle-checker",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mintAddress:Gn.trim(),chain:Ee})}),Nt=await R.json();if(!R.ok)throw new Error(Nt.error||"Failed to check bundle");Re(Nt)}catch(R){_e(R.message||"Failed to check bundle")}finally{we(!1)}},Ha=R=>{let Nt=0;const Lt=[];if(R.length===0){le(0),pe([]);return}R.length>=8?Nt+=20:Lt.push("Use at least 8 characters"),R.length>=12&&(Nt+=10),R.length>=16&&(Nt+=10),/[a-z]/.test(R)?Nt+=10:Lt.push("Add lowercase letters"),/[A-Z]/.test(R)?Nt+=15:Lt.push("Add uppercase letters"),/[0-9]/.test(R)?Nt+=15:Lt.push("Add numbers"),/[^a-zA-Z0-9]/.test(R)?Nt+=20:Lt.push("Add special characters (!@#$%^&*)"),/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9])/.test(R)&&(Nt=Math.min(100,Nt)),le(Math.min(100,Nt)),pe(Lt)},So=()=>je>=80?"text-green-400":je>=60?"text-yellow-400":je>=40?"text-orange-400":"text-red-400",Qr=()=>je>=80?"Strong":je>=60?"Good":je>=40?"Fair":je>0?"Weak":"Enter password",Zr=()=>je>=80?"bg-green-500":je>=60?"bg-yellow-500":je>=40?"bg-orange-500":"bg-red-500",Fl=R=>{const Nt=R.target.files?.[0];if(Nt){if(Nt.size>5*1024*1024){Ut("Image must be less than 5MB");return}$t(Nt);const Lt=new FileReader;Lt.onloadend=()=>{Xt(Lt.result)},Lt.readAsDataURL(Nt)}},ks="0x38",No=async()=>{try{return await window.ethereum.request({method:"wallet_switchEthereumChain",params:[{chainId:ks}]}),!0}catch(R){if(R.code===4902)try{return await window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:ks,chainName:"BNB Smart Chain",nativeCurrency:{name:"BNB",symbol:"BNB",decimals:18},rpcUrls:["https://bsc-dataseed.binance.org/"],blockExplorerUrls:["https://bscscan.com"]}]}),!0}catch{return!1}return!1}},N=async()=>{if(typeof window<"u"&&window.ethereum)try{const R=await window.ethereum.request({method:"eth_requestAccounts"});if(R&&R.length>0){if(await window.ethereum.request({method:"eth_chainId"})!==ks){if(Ut("Switching to BSC network..."),!await No()){Ut("Please switch to BSC (BNB Smart Chain) network in your wallet");return}Ut(null)}nn(R[0]),xe(!0)}}catch(R){Ut(R.message||"Failed to connect wallet")}else Ut("Please install MetaMask or another Web3 wallet")},O=async()=>{if(!J||!K||!Tt){Ut("Please fill in all required fields");return}if(!ie){Ut("Please connect your wallet first");return}if(!(await window.ethereum.request({method:"eth_chainId"})!==ks&&(Ut("Please switch to BSC (BNB Smart Chain) network"),!await No()))){Ke(!0),Ut(null),Zt(null);try{const Nt=await fetch("/api/token-generator/nonce",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({walletAddress:ye})});if(!Nt.ok){const Nn=await Nt.json();throw new Error(Nn.error||"Failed to generate authentication nonce")}const{nonce:Lt}=await Nt.json(),Me=`You are sign in Meme ${Lt}`,me=await window.ethereum.request({method:"personal_sign",params:[Me,ye]}),Pe=await fetch("/api/token-generator/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({walletAddress:ye,signature:me,nonce:Lt})});if(!Pe.ok){const Nn=await Pe.json();throw new Error(Nn.error||"Authentication failed")}const{accessToken:ge}=await Pe.json(),en=await fetch("/api/token-generator/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:ge,tokenData:{name:J,symbol:K,description:Tt,label:P,website:W,twitter:ht,telegram:Ct,preSale:se||"0",imageUrl:Wt||""}})}),ze=await en.json();if(!en.ok)throw new Error(ze.error||"Token creation failed");if(ze.createArg&&ze.signature){const Nn="0x5c952063c7fc8610FFDB798152D69F0B9550762b",Ye="0x2386F26FC10000",ii=ze.createArg,Jr=await window.ethereum.request({method:"eth_sendTransaction",params:[{from:ye,to:Nn,value:Ye,data:ii}]});Zt({message:"Token deployed to BSC mainnet!",txHash:Jr,contractAddress:ze.contractAddress||"Pending confirmation...",explorerUrl:`https://bscscan.com/tx/${Jr}`})}else if(ze.txHash)Zt({message:"Token created successfully!",txHash:ze.txHash,contractAddress:ze.contractAddress,explorerUrl:`https://bscscan.com/tx/${ze.txHash}`});else throw new Error("No transaction data received from API")}catch(Nt){Nt.code===4001?Ut("Transaction cancelled by user"):Nt.code===-32e3||Nt.message?.includes("insufficient funds")?Ut("Insufficient BNB balance. You need at least 0.01 BNB plus gas fees."):Ut(Nt.message||"Token creation failed")}finally{Ke(!1)}}},st=async()=>{if(!d.trim()){nt("Please enter a token address");return}$(!0),nt(null),D(null);try{const R=await fetch("/api/analyze-token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokenAddress:d.trim(),chain:j})});if(!R.ok){const Lt=await R.json();throw new Error(Lt.error||"Failed to analyze token")}const Nt=await R.json();D(Nt),F(null)}catch(R){nt(R instanceof Error?R.message:"An error occurred")}finally{$(!1)}},pt=async()=>{if(!L){yt("Please analyze a token first");return}ot(!0),yt(null);try{const R=await fetch("/api/ai-analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tokenAddress:d.trim(),chain:j,tokenData:L})});if(!R.ok){const Lt=await R.json();throw new Error(Lt.error||"AI analysis failed")}const Nt=await R.json();F(Nt.analysis)}catch(R){yt(R instanceof Error?R.message:"AI analysis failed")}finally{ot(!1)}},xt=R=>Sa.find(Nt=>Nt.symbol===R),zt=async()=>{if(Mn(null),typeof window>"u"||!window.ethereum){Mn("Please install MetaMask or another Web3 wallet to swap tokens");return}try{const R=await window.ethereum.request({method:"eth_requestAccounts"});if(!R||R.length===0){Mn("No accounts found. Please unlock your wallet.");return}if(await window.ethereum.request({method:"eth_chainId"})!==ks){if(Mn("Switching to BSC network..."),!await No()){Mn("Please switch to BSC (BNB Smart Chain) network in your wallet");return}Mn(null)}nn(R[0]),xe(!0),await Ht(R[0])}catch(R){R.code===4001?Mn("Connection rejected. Please approve the connection in your wallet."):R.code===-32002?Mn("Connection pending. Please check your wallet for a pending request."):Mn(R.message||"Failed to connect wallet. Please try again.")}},Ht=async R=>{try{const Nt=await window.ethereum.request({method:"eth_getBalance",params:[R,"latest"]}),Lt=parseInt(Nt,16)/1e18;qa(Lt.toFixed(4))}catch(Nt){console.error("Failed to fetch balances:",Nt)}},ne=async()=>{if(!(!Pi||parseFloat(Pi)<=0||!xi)){lr(!0);try{const R=xt(ar),Nt=xt(xi);if(!R||!Nt)return;const Lt=BigInt(Math.floor(parseFloat(Pi)*10**R.decimals)),Me=R.address==="native"?[Ri,Nt.address]:Nt.address==="native"?[R.address,Ri]:[R.address,Ri,Nt.address],me="0xd06ca61f"+Lt.toString(16).padStart(64,"0")+"0000000000000000000000000000000000000000000000000000000000000040"+Me.length.toString(16).padStart(64,"0")+Me.map(Nn=>Nn.toLowerCase().replace("0x","").padStart(64,"0")).join(""),en=(await window.ethereum.request({method:"eth_call",params:[{to:Wr,data:me},"latest"]})).slice(2).slice(-64),ze=parseInt(en,16)/10**Nt.decimals;Ua(ze.toFixed(6)),ys({amountIn:Pi,amountOut:ze.toFixed(6),path:Me,priceImpact:"< 0.1%"})}catch(R){console.error("Failed to get quote:",R),Ua("0")}finally{lr(!1)}}},fe=async()=>{if(!ie){Mn("Please connect your wallet first");return}if(!Pi||parseFloat(Pi)<=0){Mn("Please enter an amount to swap");return}if(!xi){Mn("Please select a token to swap to");return}bo(!0),Mn(null),xo(null);try{const R=xt(ar),Nt=xt(xi);if(!R||!Nt)throw new Error("Invalid token selection");const Lt=BigInt(Math.floor(parseFloat(Pi)*10**R.decimals)),Me=1-parseFloat(wi)/100,me=BigInt(Math.floor(parseFloat(Yr)*Me*10**Nt.decimals)),Pe=Math.floor(Date.now()/1e3)+1200;let ge;if(R.address==="native"){const en=[Ri,Nt.address],Nn="0x7ff36ab5"+me.toString(16).padStart(64,"0")+"0000000000000000000000000000000000000000000000000000000000000080"+ye.toLowerCase().replace("0x","").padStart(64,"0")+Pe.toString(16).padStart(64,"0")+en.length.toString(16).padStart(64,"0")+en.map(Ye=>Ye.toLowerCase().replace("0x","").padStart(64,"0")).join("");ge=await window.ethereum.request({method:"eth_sendTransaction",params:[{from:ye,to:Wr,value:"0x"+Lt.toString(16),data:Nn}]})}else if(Nt.address==="native"){const en="0x095ea7b3"+Wr.toLowerCase().replace("0x","").padStart(64,"0")+"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";await window.ethereum.request({method:"eth_sendTransaction",params:[{from:ye,to:R.address,data:en}]}),await new Promise(ii=>setTimeout(ii,3e3));const ze=[R.address,Ri],Ye="0x18cbafe5"+Lt.toString(16).padStart(64,"0")+me.toString(16).padStart(64,"0")+"00000000000000000000000000000000000000000000000000000000000000a0"+ye.toLowerCase().replace("0x","").padStart(64,"0")+Pe.toString(16).padStart(64,"0")+ze.length.toString(16).padStart(64,"0")+ze.map(ii=>ii.toLowerCase().replace("0x","").padStart(64,"0")).join("");ge=await window.ethereum.request({method:"eth_sendTransaction",params:[{from:ye,to:Wr,data:Ye}]})}else{const en="0x095ea7b3"+Wr.toLowerCase().replace("0x","").padStart(64,"0")+"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";await window.ethereum.request({method:"eth_sendTransaction",params:[{from:ye,to:R.address,data:en}]}),await new Promise(ii=>setTimeout(ii,3e3));const ze=[R.address,Ri,Nt.address],Ye="0x38ed1739"+Lt.toString(16).padStart(64,"0")+me.toString(16).padStart(64,"0")+"00000000000000000000000000000000000000000000000000000000000000a0"+ye.toLowerCase().replace("0x","").padStart(64,"0")+Pe.toString(16).padStart(64,"0")+ze.length.toString(16).padStart(64,"0")+ze.map(ii=>ii.toLowerCase().replace("0x","").padStart(64,"0")).join("");ge=await window.ethereum.request({method:"eth_sendTransaction",params:[{from:ye,to:Wr,data:Ye}]})}xo({message:"Swap executed successfully!",txHash:ge,explorerUrl:`https://bscscan.com/tx/${ge}`}),await Ht(ye),ya(""),Ua(""),ys(null)}catch(R){R.code===4001?Mn("Transaction cancelled by user"):R.code===-32e3||R.message?.includes("insufficient funds")?Mn("Insufficient balance for this swap"):Mn(R.message||"Swap failed")}finally{bo(!1)}},Oe=()=>{const R=ar,Nt=Pi;$s(xi),il(R),ya(Yr),Ua(Nt)};return f.jsxs("div",{className:"h-screen w-full flex overflow-hidden relative",style:{background:"linear-gradient(180deg, #0a0a0f 0%, #0d1117 30%, #0a0a0f 100%)"},children:[f.jsx("canvas",{ref:b,className:"fixed inset-0 pointer-events-none z-0"}),f.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none z-0",children:[f.jsx("div",{className:"absolute w-[600px] h-[600px] bg-gradient-to-br from-cyan-500/15 via-cyan-400/5 to-transparent rounded-full blur-3xl",style:{top:"-10%",left:"-5%",animation:"dashAurora1 20s ease-in-out infinite"}}),f.jsx("div",{className:"absolute w-[500px] h-[500px] bg-gradient-to-bl from-purple-600/10 via-purple-500/5 to-transparent rounded-full blur-3xl",style:{top:"20%",right:"-10%",animation:"dashAurora2 25s ease-in-out infinite"}}),f.jsx("div",{className:"absolute w-[400px] h-[400px] bg-gradient-to-tl from-cyan-400/10 via-purple-500/5 to-transparent rounded-full blur-3xl",style:{bottom:"10%",right:"20%",animation:"dashAurora3 18s ease-in-out infinite"}})]}),f.jsx("style",{children:`
        @keyframes dashAurora1 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
          50% { transform: translate(5%, 10%) scale(1.1); opacity: 0.7; }
        }
        @keyframes dashAurora2 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
          50% { transform: translate(-10%, -5%) scale(1.05); opacity: 0.6; }
        }
        @keyframes dashAurora3 {
          0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
          50% { transform: translate(5%, -10%) scale(0.95); opacity: 0.7; }
        }
      `}),!u&&i&&f.jsx("div",{className:"fixed inset-0 bg-black/60 z-[1040]",onClick:()=>r(!1)}),!u&&f.jsxs("aside",{className:`
            fixed left-0 top-0 h-full w-72 border-r border-primary/10 bg-card/80 backdrop-blur-md flex-col z-[1045]
            transition-transform duration-300 ease-in-out flex
            ${i?"translate-x-0 shadow-2xl":"-translate-x-full"}
          `,children:[f.jsxs("div",{className:"h-16 px-4 flex items-center justify-between border-b border-primary/10 shrink-0",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(ou,{href:"/",children:f.jsx("img",{src:Ip,alt:"Astherafi",className:"w-10 h-10 rounded-xl shrink-0 cursor-pointer hover:opacity-80 transition-opacity"})}),f.jsxs("div",{children:[f.jsx("h1",{className:"font-display font-bold text-lg text-foreground",children:"Astherafi"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:_("dashboard.version")})]})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx(ou,{href:"/",children:f.jsx(We,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground","data-testid":"button-back-home-mobile",children:f.jsx(Wd,{className:"w-5 h-5"})})}),f.jsx(We,{variant:"ghost",size:"icon",onClick:()=>r(!1),className:"text-muted-foreground hover:text-foreground","data-testid":"button-close-mobile-menu",children:f.jsx(ZT,{className:"w-5 h-5"})})]})]}),f.jsx("nav",{className:"flex-1 p-3 space-y-1 overflow-y-auto",children:A.map(R=>f.jsxs("button",{onClick:()=>{n(R.id),r(!1)},"data-testid":`nav-mobile-${R.id}`,className:`
                  w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left transition-all
                  ${t===R.id?"bg-primary/15 text-primary border border-primary/30":"text-foreground/70 hover:text-foreground hover:bg-muted/50 border border-transparent"}
                `,children:[f.jsx("span",{className:t===R.id?"text-primary":"text-foreground/60",children:R.icon}),f.jsx("span",{className:"font-medium text-sm",children:R.label}),R.badge&&f.jsx("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] font-semibold rounded bg-primary/20 text-primary border border-primary/30",children:R.badge}),t===R.id&&!R.badge&&f.jsx(Vo,{className:"w-4 h-4 ml-auto text-primary"})]},R.id))})]}),u&&f.jsxs("aside",{className:`
            relative h-full border-r border-primary/10 bg-card/80 backdrop-blur-md flex flex-col shrink-0
            transition-all duration-300 ease-in-out
            ${o?"w-[70px]":"w-64"}
          `,children:[f.jsxs("div",{className:`h-16 flex items-center justify-between border-b border-primary/10 shrink-0 ${o?"px-3":"px-4"}`,children:[f.jsxs("div",{className:`flex items-center ${o?"":"gap-3"}`,children:[f.jsx(ou,{href:"/",children:f.jsx("img",{src:Ip,alt:"Astherafi",className:"w-10 h-10 rounded-xl shrink-0 cursor-pointer hover:opacity-80 transition-opacity"})}),!o&&f.jsxs("div",{children:[f.jsx("h1",{className:"font-display font-bold text-lg text-foreground",children:"Astherafi"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:_("dashboard.version")})]})]}),!o&&f.jsx(ou,{href:"/",children:f.jsx(We,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground","data-testid":"button-back-home-desktop",title:"Back to Home",children:f.jsx(Wd,{className:"w-5 h-5"})})})]}),f.jsx("nav",{className:`flex-1 space-y-1 overflow-y-auto ${o?"p-2":"p-3"}`,children:A.map(R=>f.jsxs("button",{onClick:()=>n(R.id),"data-testid":`nav-${R.id}`,title:o?R.label:void 0,className:`
                  w-full flex items-center rounded-lg text-left transition-all
                  ${o?"justify-center p-3":"gap-3 px-4 py-3"}
                  ${t===R.id?"bg-primary/15 text-primary border border-primary/30":"text-foreground/70 hover:text-foreground hover:bg-muted/50 border border-transparent"}
                `,children:[f.jsx("span",{className:t===R.id?"text-primary":"text-foreground/60",children:R.icon}),!o&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"font-medium text-sm",children:R.label}),R.badge&&f.jsx("span",{className:"ml-auto px-1.5 py-0.5 text-[10px] font-semibold rounded bg-primary/20 text-primary border border-primary/30",children:R.badge}),t===R.id&&!R.badge&&f.jsx(Vo,{className:"w-4 h-4 ml-auto text-primary"})]})]},R.id))})]}),f.jsxs("div",{className:"flex-1 flex flex-col h-full w-full min-w-0 overflow-hidden",children:[f.jsxs("header",{className:`border-b border-primary/10 flex items-center justify-between bg-card/70 backdrop-blur-md shrink-0 ${u?"h-16":"h-14"}`,children:[f.jsxs("div",{className:"flex items-center gap-3 px-4 shrink-0",children:[!u&&f.jsx(We,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground",onClick:()=>r(!0),"data-testid":"button-mobile-menu",children:f.jsx(AN,{className:"w-5 h-5"})}),u&&f.jsx(We,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground",onClick:()=>c(!o),"data-testid":"button-toggle-sidebar",children:o?f.jsx(P8,{className:"w-5 h-5"}):f.jsx(k8,{className:"w-5 h-5"})}),!u&&f.jsx("h1",{className:"font-display font-bold text-lg",children:"Astherafi"})]}),Hi.length>0&&f.jsx("div",{className:"flex-1 overflow-hidden mx-4",children:f.jsx("div",{className:"flex animate-marquee whitespace-nowrap h-full items-center",children:[...Hi,...Hi].map((R,Nt)=>f.jsxs("div",{className:"inline-flex items-center gap-2 mx-4",children:[f.jsx("img",{src:R.image,alt:R.name,className:"w-4 h-4 rounded-full"}),f.jsx("span",{className:"text-xs font-medium text-foreground/80",children:R.symbol.toUpperCase()}),f.jsxs("span",{className:"text-xs text-foreground",children:["$",R.current_price.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:R.current_price<1?6:2})]}),f.jsxs("span",{className:`text-xs font-medium ${R.price_change_percentage_24h>=0?"text-green-400":"text-red-400"}`,children:[R.price_change_percentage_24h>=0?"+":"",R.price_change_percentage_24h.toFixed(2),"%"]})]},`${R.id}-${Nt}`))})}),f.jsx("div",{className:"px-4 shrink-0",children:f.jsx(Ay,{})})]}),f.jsxs("main",{className:"flex-1 p-3 sm:p-4 md:p-6 overflow-y-auto",children:[t!=="dashboard"&&f.jsxs(Ei.div,{initial:{y:10,opacity:0},animate:{y:0,opacity:1},className:"mb-4 sm:mb-8",children:[f.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl font-display font-bold text-glow-cyan",children:_r?.label}),f.jsx("p",{className:"text-muted-foreground mt-1 text-sm sm:text-base",children:_r?.description})]}),f.jsxs(Ei.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:"rounded-xl sm:rounded-2xl bg-card/60 backdrop-blur-sm border border-border/50 p-4 sm:p-6 md:p-8 min-h-[300px] sm:min-h-[400px] relative overflow-hidden shadow-sm",children:[f.jsx("div",{className:"absolute top-0 right-0 w-48 sm:w-96 h-48 sm:h-96 bg-gradient-to-bl from-primary/5 to-transparent rounded-full blur-3xl pointer-events-none"}),f.jsxs("div",{className:"relative z-10",children:[t==="dashboard"&&f.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3 sm:gap-4",children:[f.jsx("div",{className:"w-12 h-12 sm:w-16 sm:h-16 rounded-xl sm:rounded-2xl cyber-gradient flex items-center justify-center glow-cyan shrink-0",children:f.jsx(yv,{className:"w-6 h-6 sm:w-8 sm:h-8 text-background"})}),f.jsxs("div",{children:[f.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl font-display font-bold",children:_("dashboard.overview")}),f.jsx("p",{className:"text-muted-foreground text-sm sm:text-base",children:_("dashboard.selectTool")})]})]}),f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4 md:gap-6",children:A.filter(R=>R.id!=="dashboard").map(R=>f.jsxs(Ei.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>n(R.id),className:"p-4 sm:p-6 rounded-lg sm:rounded-xl bg-muted/20 border border-border/50 text-left hover:bg-muted/30 transition-all group",children:[f.jsx("div",{className:"w-10 h-10 sm:w-12 sm:h-12 rounded-lg bg-primary/10 text-primary flex items-center justify-center mb-3 sm:mb-4 group-hover:bg-primary/20 transition-colors",children:R.icon}),f.jsx("h4",{className:"font-display font-semibold text-base sm:text-lg mb-1 sm:mb-2",children:R.label}),f.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground line-clamp-2",children:R.description})]},R.id))})]}),t==="token-analyzer"&&f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:DH.map(R=>f.jsxs(We,{variant:j===R.id?"default":"outline",onClick:()=>E(R.id),className:`${j===R.id?"cyber-gradient text-background":""} flex items-center gap-2`,"data-testid":`button-chain-${R.id}`,children:[R.image?f.jsx("img",{src:R.image,alt:R.name,className:"w-5 h-5"}):f.jsx("span",{children:R.icon}),R.name]},R.id))}),f.jsx("div",{className:"flex flex-col sm:flex-row gap-3",children:f.jsxs("div",{className:"flex-1 flex gap-2",children:[f.jsx(ji,{placeholder:"Search for tokens, pairs, or addresses...",className:"flex-1 bg-muted/30 border-border/50 h-12 font-mono text-sm",value:d,onChange:R=>p(R.target.value),onKeyDown:R=>R.key==="Enter"&&st()}),f.jsx(We,{className:"cyber-gradient text-background font-semibold px-6 h-12 glow-cyan shrink-0",onClick:st,disabled:z,"data-testid":"button-analyze-token",children:z?f.jsx(El,{className:"w-4 h-4 animate-spin"}):_("dashboard.analyze")})]})}),ut&&f.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 flex items-center gap-3",children:[f.jsx(pc,{className:"w-5 h-5 text-red-400"}),f.jsx("p",{className:"text-sm text-red-300",children:ut})]}),L&&f.jsxs("div",{className:"space-y-6 mt-6",children:[f.jsxs("div",{className:"p-4 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[L.logo?f.jsx("img",{src:L.logo,alt:L.name,className:"w-12 h-12 rounded-full object-cover bg-muted",onError:R=>{R.target.style.display="none",R.target.nextElementSibling?.classList.remove("hidden")}}):null,f.jsx("div",{className:`w-12 h-12 rounded-full cyber-gradient flex items-center justify-center text-background font-bold ${L.logo?"hidden":""}`,children:L.symbol?.[0]||"?"}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display font-semibold text-lg",children:L.name}),f.jsxs("p",{className:"text-xs text-muted-foreground",children:[L.symbol," • ",L.chain]}),f.jsx("p",{className:"text-xs text-muted-foreground font-mono mt-1 break-all",children:L.address})]})]}),f.jsx("div",{className:"flex items-center gap-2",children:f.jsx("div",{className:`px-3 py-1 rounded-full text-xs font-medium ${L.simulation?.isHoneypot?"bg-red-500/20 text-red-400":"bg-green-500/20 text-green-400"}`,children:L.simulation?.isHoneypot?"HONEYPOT":"SAFE"})})]}),L.socials&&Object.keys(L.socials).length>0&&f.jsxs("div",{className:"flex flex-wrap items-center gap-2 mt-4 pt-4 border-t border-border/30",children:[f.jsx("span",{className:"text-xs text-muted-foreground mr-2",children:"Links:"}),L.socials.website&&f.jsxs("a",{href:L.socials.website,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted/30 hover:bg-muted/50 text-xs transition-colors",children:[f.jsx(Sc,{className:"w-3 h-3"}),"Website",f.jsx(jl,{className:"w-3 h-3 opacity-50"})]}),L.socials.twitter&&f.jsxs("a",{href:L.socials.twitter,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted/30 hover:bg-muted/50 text-xs transition-colors",children:[f.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:f.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}),"Twitter",f.jsx(jl,{className:"w-3 h-3 opacity-50"})]}),L.socials.telegram&&f.jsxs("a",{href:L.socials.telegram,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted/30 hover:bg-muted/50 text-xs transition-colors",children:[f.jsx(up,{className:"w-3 h-3"}),"Telegram",f.jsx(jl,{className:"w-3 h-3 opacity-50"})]}),L.socials.discord&&f.jsxs("a",{href:L.socials.discord,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-3 py-1.5 rounded-full bg-muted/30 hover:bg-muted/50 text-xs transition-colors",children:[f.jsx(up,{className:"w-3 h-3"}),"Discord",f.jsx(jl,{className:"w-3 h-3 opacity-50"})]})]})]}),f.jsxs("div",{className:"p-5 rounded-lg bg-muted/20 border border-border/50",children:[f.jsx("h5",{className:"text-primary font-display font-semibold text-sm uppercase tracking-wider mb-4",children:"Market Data"}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Price"}),f.jsxs("p",{className:"text-primary font-semibold",children:["$",L.technical?.priceUsd||"0.00"]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Market Cap"}),f.jsxs("p",{className:"text-primary font-semibold",children:["$",Number(L.technical?.marketCap||0).toLocaleString()]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"24h Volume"}),f.jsxs("p",{className:"text-primary font-semibold",children:["$",Number(L.technical?.volume24h||0).toLocaleString()]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Liquidity"}),f.jsxs("p",{className:"text-primary font-semibold",children:["$",Number(L.technical?.liquidity||0).toLocaleString()]})]})]}),L.technical&&f.jsxs("div",{className:"grid grid-cols-4 gap-4 mt-4 pt-4 border-t border-border/30",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"5m"}),f.jsxs("p",{className:`text-sm font-medium ${(L.technical.priceChange5m||0)>=0?"text-green-400":"text-red-400"}`,children:[(L.technical.priceChange5m||0)>=0?"+":"",L.technical.priceChange5m||0,"%"]})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"1h"}),f.jsxs("p",{className:`text-sm font-medium ${(L.technical.priceChange1h||0)>=0?"text-green-400":"text-red-400"}`,children:[(L.technical.priceChange1h||0)>=0?"+":"",L.technical.priceChange1h||0,"%"]})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"6h"}),f.jsxs("p",{className:`text-sm font-medium ${(L.technical.priceChange6h||0)>=0?"text-green-400":"text-red-400"}`,children:[(L.technical.priceChange6h||0)>=0?"+":"",L.technical.priceChange6h||0,"%"]})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"24h"}),f.jsxs("p",{className:`text-sm font-medium ${(L.technical.priceChange24h||0)>=0?"text-green-400":"text-red-400"}`,children:[(L.technical.priceChange24h||0)>=0?"+":"",L.technical.priceChange24h||0,"%"]})]})]})]}),f.jsxs("div",{className:"p-5 rounded-lg bg-muted/20 border border-border/50",children:[f.jsx("h5",{className:"text-primary font-display font-semibold text-sm uppercase tracking-wider mb-4",children:"Simulation Results"}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Buy Tax"}),f.jsx("p",{className:"text-primary font-semibold",children:L.simulation?.buyTax||"0.0%"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Buy Gas"}),f.jsx("p",{className:"text-primary font-semibold",children:Number(L.simulation?.buyGas||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Buy Limit"}),f.jsx("p",{className:`font-semibold ${L.simulation?.buyLimit==="BLOCKED"?"text-red-400":"text-green-400"}`,children:L.simulation?.buyLimit||"NONE DETECTED"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Sell Tax"}),f.jsx("p",{className:"text-primary font-semibold",children:L.simulation?.sellTax||"0.0%"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Sell Gas"}),f.jsx("p",{className:"text-primary font-semibold",children:Number(L.simulation?.sellGas||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Sell Limit"}),f.jsx("p",{className:`font-semibold ${L.simulation?.sellLimit==="RESTRICTED"?"text-red-400":"text-green-400"}`,children:L.simulation?.sellLimit||"NONE DETECTED"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Transfer Tax"}),f.jsx("p",{className:"text-primary font-semibold",children:L.simulation?.transferTax||"0.0%"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Source Code"}),f.jsxs("p",{className:`font-semibold flex items-center gap-1 ${L.simulation?.sourceCode==="OPEN SOURCE"?"text-green-400":"text-yellow-400"}`,children:[L.simulation?.sourceCode==="OPEN SOURCE"?f.jsx(_l,{className:"w-4 h-4"}):f.jsx(gv,{className:"w-4 h-4"}),L.simulation?.sourceCode||"NOT VERIFIED"]})]})]})]}),f.jsxs("div",{className:"p-5 rounded-lg bg-muted/20 border border-border/50",children:[f.jsx("h5",{className:"text-primary font-display font-semibold text-sm uppercase tracking-wider mb-4",children:"Recent Holder Analysis"}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Holders Analysed"}),f.jsx("p",{className:"text-primary font-semibold",children:Number(L.holders?.total||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Can Sell"}),f.jsx("p",{className:"text-green-400 font-semibold",children:Number(L.holders?.canSell||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Can't Sell"}),f.jsx("p",{className:`font-semibold ${(L.holders?.cantSell||0)>0?"text-red-400":"text-green-400"}`,children:Number(L.holders?.cantSell||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Siphoned"}),f.jsx("p",{className:`font-semibold ${(L.holders?.siphoned||0)>0?"text-red-400":"text-primary"}`,children:Number(L.holders?.siphoned||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Average Tax"}),f.jsx("p",{className:"text-primary font-semibold",children:L.holders?.averageTax||"0.0%"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Highest Tax"}),f.jsx("p",{className:"text-primary font-semibold",children:L.holders?.highestTax||"0.0%"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Average Gas"}),f.jsx("p",{className:"text-primary font-semibold",children:Number(L.holders?.averageGas||0).toLocaleString()})]})]})]}),f.jsxs("div",{className:"p-5 rounded-lg bg-muted/20 border border-border/50",children:[f.jsx("h5",{className:"text-primary font-display font-semibold text-sm uppercase tracking-wider mb-4",children:"Security Flags"}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.isProxy?"bg-yellow-500/10 border border-yellow-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Proxy Contract"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.isProxy?"text-yellow-400":"text-green-400"}`,children:L.security?.isProxy?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.isMintable?"bg-yellow-500/10 border border-yellow-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Mintable"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.isMintable?"text-yellow-400":"text-green-400"}`,children:L.security?.isMintable?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.hiddenOwner?"bg-red-500/10 border border-red-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Hidden Owner"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.hiddenOwner?"text-red-400":"text-green-400"}`,children:L.security?.hiddenOwner?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.canTakeBackOwnership?"bg-red-500/10 border border-red-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Take Back Ownership"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.canTakeBackOwnership?"text-red-400":"text-green-400"}`,children:L.security?.canTakeBackOwnership?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.ownerCanChangeBalance?"bg-red-500/10 border border-red-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Owner Change Balance"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.ownerCanChangeBalance?"text-red-400":"text-green-400"}`,children:L.security?.ownerCanChangeBalance?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.isBlacklisted?"bg-yellow-500/10 border border-yellow-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Blacklist"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.isBlacklisted?"text-yellow-400":"text-green-400"}`,children:L.security?.isBlacklisted?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.hasTradingCooldown?"bg-yellow-500/10 border border-yellow-500/30":"bg-green-500/10 border border-green-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Trading Cooldown"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.hasTradingCooldown?"text-yellow-400":"text-green-400"}`,children:L.security?.hasTradingCooldown?"YES":"NO"})]}),f.jsxs("div",{className:`p-3 rounded-lg ${L.security?.lpLocked?"bg-green-500/10 border border-green-500/30":"bg-yellow-500/10 border border-yellow-500/30"}`,children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"LP Locked"}),f.jsx("p",{className:`font-semibold text-sm ${L.security?.lpLocked?"text-green-400":"text-yellow-400"}`,children:L.security?.lpLocked?"YES":"NO"})]})]})]}),L.sentiment&&f.jsxs("div",{className:"p-5 rounded-lg bg-muted/20 border border-border/50",children:[f.jsx("h5",{className:"text-primary font-display font-semibold text-sm uppercase tracking-wider mb-4",children:"Trading Sentiment (24h)"}),f.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Overall"}),f.jsx("p",{className:`font-semibold ${L.sentiment.overall==="Bullish"?"text-green-400":L.sentiment.overall==="Bearish"?"text-red-400":"text-yellow-400"}`,children:L.sentiment.overall})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Buy Pressure"}),f.jsx("p",{className:"text-green-400 font-semibold",children:L.sentiment.buyPressure})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Buys (24h)"}),f.jsx("p",{className:"text-green-400 font-semibold",children:Number(L.sentiment.buys24h||0).toLocaleString()})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Sells (24h)"}),f.jsx("p",{className:"text-red-400 font-semibold",children:Number(L.sentiment.sells24h||0).toLocaleString()})]})]})]}),f.jsx("div",{className:"mt-6",children:f.jsx(We,{onClick:pt,disabled:Y,className:"w-full bg-gradient-to-r from-purple-600 to-cyan-500 text-white font-semibold h-12","data-testid":"button-ai-analyze",children:Y?f.jsxs(f.Fragment,{children:[f.jsx(El,{className:"w-4 h-4 animate-spin mr-2"}),"Analyzing with AI..."]}):f.jsxs(f.Fragment,{children:[f.jsx(Kd,{className:"w-4 h-4 mr-2"}),"Get AI-Powered Analysis"]})})}),tt&&f.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 flex items-center gap-3 mt-4",children:[f.jsx(pc,{className:"w-5 h-5 text-red-400"}),f.jsx("p",{className:"text-sm text-red-300",children:tt})]}),ct&&f.jsxs("div",{className:"mt-6 space-y-4",children:[f.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[f.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-r from-purple-600 to-cyan-500 flex items-center justify-center",children:f.jsx(Kd,{className:"w-4 h-4 text-white"})}),f.jsx("h4",{className:"font-display font-semibold text-lg",children:"AI Analysis"}),f.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs bg-purple-500/20 text-purple-300",children:"DeepSeek"})]}),f.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[f.jsxs("div",{className:"p-4 rounded-lg bg-gradient-to-br from-green-500/10 to-green-600/5 border border-green-500/20",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Sentiment"}),f.jsxs("span",{className:`text-lg font-bold ${ct.sentiment?.score>=70?"text-green-400":ct.sentiment?.score>=40?"text-yellow-400":"text-red-400"}`,children:[ct.sentiment?.score||0,"/100"]})]}),f.jsx("p",{className:"text-xs text-muted-foreground line-clamp-3",children:ct.sentiment?.analysis||"N/A"})]}),f.jsxs("div",{className:"p-4 rounded-lg bg-gradient-to-br from-blue-500/10 to-blue-600/5 border border-blue-500/20",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Technical"}),f.jsxs("span",{className:`text-lg font-bold ${ct.technical?.score>=70?"text-green-400":ct.technical?.score>=40?"text-yellow-400":"text-red-400"}`,children:[ct.technical?.score||0,"/100"]})]}),f.jsx("p",{className:"text-xs text-muted-foreground line-clamp-3",children:ct.technical?.analysis||"N/A"})]}),f.jsxs("div",{className:"p-4 rounded-lg bg-gradient-to-br from-purple-500/10 to-purple-600/5 border border-purple-500/20",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"On-Chain"}),f.jsxs("span",{className:`text-lg font-bold ${ct.onChain?.score>=70?"text-green-400":ct.onChain?.score>=40?"text-yellow-400":"text-red-400"}`,children:[ct.onChain?.score||0,"/100"]})]}),f.jsx("p",{className:"text-xs text-muted-foreground line-clamp-3",children:ct.onChain?.analysis||"N/A"})]})]}),f.jsxs("div",{className:"p-5 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("span",{className:"text-sm font-medium",children:"Overall Score"}),f.jsx("div",{className:"flex items-center gap-2",children:f.jsxs("span",{className:`text-2xl font-bold ${ct.overall?.score>=70?"text-green-400":ct.overall?.score>=40?"text-yellow-400":"text-red-400"}`,children:[ct.overall?.score||0,"/100"]})})]}),f.jsx("div",{className:"p-3 rounded-lg bg-background/50",children:f.jsx("p",{className:"text-sm",children:ct.overall?.recommendation||"No recommendation available"})})]})]})]})]}),t==="token-generator"&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl cyber-gradient flex items-center justify-center glow-cyan",children:f.jsx(lu,{className:"w-6 h-6 text-background"})}),f.jsx("div",{className:"flex-1",children:f.jsx("h3",{className:"font-display font-semibold",children:"Launch Your Token on BSC"})}),f.jsxs("div",{className:"text-right",children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:"Deploy Cost"}),f.jsx("p",{className:"font-display font-bold text-primary",children:"0.01 BNB"})]})]}),!ie&&f.jsxs(We,{onClick:N,className:"w-full cyber-gradient text-background font-semibold h-12 glow-cyan",children:[f.jsx(Xg,{className:"w-5 h-5 mr-2"}),"Connect Wallet"]}),f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Token Image"}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsxs("label",{className:"w-24 h-24 rounded-xl border-2 border-dashed border-border/50 flex items-center justify-center cursor-pointer hover:border-primary/50 transition-colors overflow-hidden",children:[Wt?f.jsx("img",{src:Wt,alt:"Token",className:"w-full h-full object-cover"}):f.jsxs("div",{className:"text-center",children:[f.jsx(E5,{className:"w-6 h-6 text-muted-foreground mx-auto mb-1"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Upload"})]}),f.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:Fl})]}),f.jsxs("div",{className:"text-xs text-muted-foreground",children:[f.jsx("p",{children:"PNG, JPEG, WEBP, GIF"}),f.jsx("p",{children:"Max Size: 5MB"})]})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Token Name *"}),f.jsx(ji,{placeholder:"e.g. My Awesome Token",className:"bg-muted/30 border-border/50 h-12",value:J,onChange:R=>at(R.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Ticker Symbol *"}),f.jsx(ji,{placeholder:"e.g. MAT",className:"bg-muted/30 border-border/50 h-12",value:K,onChange:R=>dt(R.target.value.toUpperCase()),maxLength:10})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Description *"}),f.jsx(Jv,{placeholder:"Describe your token...",className:"bg-muted/30 border-border/50 min-h-[100px] resize-none",value:Tt,onChange:R=>X(R.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Category"}),f.jsx("select",{value:P,onChange:R=>q(R.target.value),className:"w-full bg-muted/30 border border-border/50 rounded-lg px-4 h-12 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-primary/50",children:RH.map(R=>f.jsx("option",{value:R,className:"bg-card text-foreground",children:R},R))})]})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Website (Optional)"}),f.jsxs("div",{className:"relative",children:[f.jsx(Sc,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(ji,{placeholder:"https://yourwebsite.com",className:"bg-muted/30 border-border/50 h-12 pl-10",value:W,onChange:R=>lt(R.target.value)})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Twitter (Optional)"}),f.jsxs("div",{className:"relative",children:[f.jsx(X8,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(ji,{placeholder:"https://twitter.com/yourtoken",className:"bg-muted/30 border-border/50 h-12 pl-10",value:ht,onChange:R=>ft(R.target.value)})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Telegram (Optional)"}),f.jsxs("div",{className:"relative",children:[f.jsx(up,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),f.jsx(ji,{placeholder:"https://t.me/yourgroup",className:"bg-muted/30 border-border/50 h-12 pl-10",value:Ct,onChange:R=>_t(R.target.value)})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Pre-buy Amount (Optional)"}),f.jsxs("div",{className:"relative",children:[f.jsx(ji,{type:"number",placeholder:"0",className:"bg-muted/30 border-border/50 h-12 pr-16",value:se,onChange:R=>et(R.target.value),step:"0.1",min:"0"}),f.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"BNB"})]}),f.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Amount of BNB to pre-purchase your token"})]})]})]}),Ce&&f.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 flex items-center gap-3",children:[f.jsx(pc,{className:"w-5 h-5 text-red-400 flex-shrink-0"}),f.jsx("p",{className:"text-sm text-red-300",children:Ce})]}),oe&&f.jsxs("div",{className:"p-4 rounded-lg bg-green-500/10 border border-green-500/30 space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(_l,{className:"w-5 h-5 text-green-400"}),f.jsx("p",{className:"text-sm text-green-300",children:oe.message})]}),f.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[oe.contractAddress&&f.jsxs("p",{children:["Contract: ",f.jsx("span",{className:"font-mono",children:oe.contractAddress})]}),oe.txHash&&f.jsxs("p",{children:["Tx Hash: ",f.jsxs("span",{className:"font-mono",children:[oe.txHash.slice(0,20),"..."]})]}),oe.explorerUrl&&f.jsxs("a",{href:oe.explorerUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-primary hover:underline mt-2","data-testid":"link-bscscan",children:[f.jsx(jl,{className:"w-3 h-3"}),"View on BSCScan"]})]})]}),f.jsx(We,{onClick:O,disabled:Qt||!ie,className:"w-full cyber-gradient text-background font-bold h-14 text-lg glow-cyan",children:Qt?f.jsxs(f.Fragment,{children:[f.jsx(El,{className:"w-5 h-5 mr-2 animate-spin"}),"Creating Token..."]}):f.jsxs(f.Fragment,{children:[f.jsx(lu,{className:"w-5 h-5 mr-2"}),"Create Token (0.01 BNB)"]})})]}),t==="password-score"&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl cyber-gradient flex items-center justify-center glow-cyan",children:f.jsx(NN,{className:"w-6 h-6 text-background"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"font-display font-semibold",children:"Password Strength Checker"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Test how secure your password is"})]})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Enter Password"}),f.jsx(ji,{type:"password",placeholder:"Type your password to check strength...",className:"bg-muted/30 border-border/50 h-12",value:Ue,onChange:R=>{on(R.target.value),Ha(R.target.value)},"data-testid":"input-password-check"})]}),f.jsxs("div",{className:"p-6 rounded-lg bg-muted/20 border border-border/50 space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"text-sm text-muted-foreground",children:"Password Strength"}),f.jsxs("span",{className:`text-2xl font-bold font-display ${So()}`,children:[je,"%"]})]}),f.jsx("div",{className:"h-3 bg-muted rounded-full overflow-hidden",children:f.jsx("div",{className:`h-full transition-all duration-300 ${Zr()}`,style:{width:`${je}%`}})}),f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:`text-lg font-semibold ${So()}`,children:Qr()}),je>=80&&f.jsx(_l,{className:"w-5 h-5 text-green-400"})]})]}),qe.length>0&&f.jsxs("div",{className:"p-4 rounded-lg bg-muted/10 border border-border/30 space-y-2",children:[f.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Tips to improve:"}),f.jsx("ul",{className:"space-y-1",children:qe.map((R,Nt)=>f.jsxs("li",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[f.jsx(pc,{className:"w-4 h-4 text-orange-400 flex-shrink-0"}),R]},Nt))})]}),je>=80&&f.jsxs("div",{className:"p-4 rounded-lg bg-green-500/10 border border-green-500/30 flex items-center gap-3",children:[f.jsx(_l,{className:"w-5 h-5 text-green-400"}),f.jsx("p",{className:"text-sm text-green-300",children:"Great job! This is a strong password."})]})]})]}),t==="bundle-checker"&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl cyber-gradient flex items-center justify-center glow-cyan",children:f.jsx(Vd,{className:"w-6 h-6 text-background"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"font-display font-semibold",children:"Bundle Checker"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Detect bundle signals in Solana and BSC token launches"})]})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex gap-2",children:[f.jsx(We,{variant:Ee==="solana"?"default":"outline",onClick:()=>{_n("solana"),Re(null),_e(null)},className:Ee==="solana"?"cyber-gradient text-background":"","data-testid":"button-chain-solana",children:"Solana"}),f.jsx(We,{variant:Ee==="bsc"?"default":"outline",onClick:()=>{_n("bsc"),Re(null),_e(null)},className:Ee==="bsc"?"cyber-gradient text-background":"","data-testid":"button-chain-bsc",children:"BSC"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:Ee==="solana"?"Solana Mint Address":"BSC Token Contract Address"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(ji,{placeholder:Ee==="solana"?"Enter Solana token mint address...":"Enter BSC token contract address...",className:"bg-muted/30 border-border/50 h-12 flex-1",value:Gn,onChange:R=>sn(R.target.value),"data-testid":"input-bundle-mint"}),f.jsx(We,{onClick:Xr,disabled:rn,className:"cyber-gradient text-background font-bold h-12 px-6","data-testid":"button-check-bundle",children:rn?f.jsx(El,{className:"w-5 h-5 animate-spin"}):f.jsx(Hd,{className:"w-5 h-5"})})]})]}),Ln&&f.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 flex items-center gap-3",children:[f.jsx(pc,{className:"w-5 h-5 text-red-400"}),f.jsx("p",{className:"text-sm text-red-300",children:Ln})]}),Jt&&f.jsxs("div",{className:"space-y-4",children:[Jt.tokenInfo&&f.jsx("div",{className:"p-4 rounded-lg bg-muted/20 border border-border/50",children:f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold",children:Jt.tokenInfo.name}),f.jsx("p",{className:"text-sm text-muted-foreground",children:Jt.tokenInfo.symbol})]}),f.jsx("div",{className:"text-right text-xs text-muted-foreground",children:f.jsxs("p",{children:[Jt.transactionCount," transactions analyzed"]})})]})}),f.jsxs("div",{className:`p-6 rounded-lg border ${Jt.bundleAnalysis.isBundled?"bg-red-500/10 border-red-500/30":"bg-green-500/10 border-green-500/30"}`,children:[f.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[Jt.bundleAnalysis.isBundled?f.jsx(gv,{className:"w-6 h-6 text-red-400"}):f.jsx(_l,{className:"w-6 h-6 text-green-400"}),f.jsxs("div",{children:[f.jsx("p",{className:`font-semibold ${Jt.bundleAnalysis.isBundled?"text-red-300":"text-green-300"}`,children:Jt.bundleAnalysis.isBundled?"Bundle Detected":"No Bundle Detected"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Confidence: ",Jt.bundleAnalysis.confidence,"% | Risk: ",Jt.bundleAnalysis.riskLevel]})]})]}),f.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:Jt.bundleAnalysis.details}),Jt.bundleAnalysis.signals&&Jt.bundleAnalysis.signals.length>0&&f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Detected Signals:"}),f.jsx("ul",{className:"space-y-1",children:Jt.bundleAnalysis.signals.map((R,Nt)=>f.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[f.jsx(Kd,{className:"w-3 h-3 text-yellow-400"}),R]},Nt))})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-4 pt-4 border-t border-border/30",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:"Unique Wallets"}),f.jsx("p",{className:"font-semibold",children:Jt.bundleAnalysis.uniqueWallets||0})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:"Bundle Slots"}),f.jsx("p",{className:"font-semibold",children:Jt.bundleAnalysis.bundleCount||0})]})]})]})]})]})]}),t==="website-builder"&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl cyber-gradient flex items-center justify-center glow-cyan",children:f.jsx(Sc,{className:"w-6 h-6 text-background"})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h3",{className:"font-display font-semibold",children:"Create Landing Page"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Build a simple website for your crypto project"})]})]}),f.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Project Logo"}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsxs("label",{className:"w-20 h-20 rounded-xl border-2 border-dashed border-border/50 flex items-center justify-center cursor-pointer hover:border-primary/50 transition-colors overflow-hidden",children:[Wn?f.jsx("img",{src:Wn,alt:"Logo",className:"w-full h-full object-cover"}):f.jsxs("div",{className:"text-center",children:[f.jsx(E5,{className:"w-5 h-5 text-muted-foreground mx-auto mb-1"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Upload"})]}),f.jsx("input",{type:"file",className:"hidden",accept:"image/*",onChange:wo,"data-testid":"input-website-logo"})]}),f.jsxs("div",{className:"text-xs text-muted-foreground",children:[f.jsx("p",{children:"PNG, JPEG, SVG"}),f.jsx("p",{children:"Recommended: 200x200px"}),Wn&&f.jsx("button",{onClick:()=>jn(null),className:"text-red-400 hover:text-red-300 mt-1",children:"Remove"})]})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Project Name *"}),f.jsx(ji,{placeholder:"e.g. MoonCoin",className:"bg-muted/30 border-border/50 h-12",value:Se,onChange:R=>be(R.target.value),"data-testid":"input-website-name"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Tagline"}),f.jsx(ji,{placeholder:"e.g. To the moon and beyond",className:"bg-muted/30 border-border/50 h-12",value:un,onChange:R=>nr(R.target.value),"data-testid":"input-website-tagline"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Description"}),f.jsx(Jv,{placeholder:"Describe your project...",className:"bg-muted/30 border-border/50 min-h-[100px]",value:ki,onChange:R=>br(R.target.value),"data-testid":"input-website-description"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Contract Address"}),f.jsx(ji,{placeholder:"0x...",className:"bg-muted/30 border-border/50 h-12",value:Li,onChange:R=>Ne(R.target.value),"data-testid":"input-website-contract"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Twitter URL"}),f.jsx(ji,{placeholder:"https://twitter.com/...",className:"bg-muted/30 border-border/50 h-12",value:bi,onChange:R=>xr(R.target.value),"data-testid":"input-website-twitter"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Telegram URL"}),f.jsx(ji,{placeholder:"https://t.me/...",className:"bg-muted/30 border-border/50 h-12",value:Yn,onChange:R=>_s(R.target.value),"data-testid":"input-website-telegram"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground mb-2 block",children:"Theme"}),f.jsx("div",{className:"flex gap-2",children:["cyber","dark","light"].map(R=>f.jsx(We,{variant:On===R?"default":"outline",onClick:()=>ui(R),className:On===R?"cyber-gradient text-background":"","data-testid":`button-theme-${R}`,children:R.charAt(0).toUpperCase()+R.slice(1)},R))})]}),f.jsx(We,{onClick:Va,disabled:!Se.trim(),className:"w-full cyber-gradient text-background font-semibold h-12 glow-cyan","data-testid":"button-generate-website",children:"Generate Website"})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("label",{className:"text-sm font-medium text-muted-foreground",children:"Preview"}),ti&&f.jsxs(We,{onClick:Kr,variant:"outline",size:"sm","data-testid":"button-download-website",children:[f.jsx(jl,{className:"w-4 h-4 mr-2"}),"Download HTML"]})]}),f.jsx("div",{className:"rounded-lg border border-border/50 overflow-hidden bg-muted/20 min-h-[400px]",children:ti?f.jsx("iframe",{srcDoc:ti,className:"w-full h-[500px] border-0",title:"Website Preview","data-testid":"iframe-website-preview"}):f.jsxs("div",{className:"flex flex-col items-center justify-center h-[400px] text-muted-foreground",children:[f.jsx(Sc,{className:"w-12 h-12 mb-4 opacity-30"}),f.jsx("p",{className:"text-sm",children:"Fill in the form and click Generate to preview"})]})}),f.jsxs("p",{className:"text-sm text-muted-foreground text-center",children:["Get domain and hosting ",f.jsx("a",{href:"https://t.me/CryptoSafeDev",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"here"})]})]})]})]}),t==="staking"&&f.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[f.jsx("div",{className:"w-20 h-20 rounded-2xl bg-primary/10 flex items-center justify-center",children:_r?.icon}),f.jsx("h3",{className:"text-2xl font-display font-bold",children:_r?.label}),f.jsx("p",{className:"text-muted-foreground max-w-md",children:_r?.description}),f.jsx(We,{className:"cyber-gradient text-background font-bold px-8 h-12 mt-4",children:"Coming Soon"})]}),t==="block-explorer"&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"text-center space-y-2",children:[f.jsx("h2",{className:"text-3xl font-display font-bold text-glow-cyan",children:"BNB Smart Chain Explorer"}),f.jsx("p",{className:"text-muted-foreground",children:"A blockchain explorer and analytics platform for BNB Smart Chain"})]}),f.jsx("div",{className:"max-w-2xl mx-auto",children:f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("div",{className:"relative flex-1",children:[f.jsx(Hd,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),f.jsx(ji,{placeholder:"Search by Block / Txn / Address / Token",value:wr,onChange:R=>Sr(R.target.value),onKeyDown:R=>R.key==="Enter"&&Cr(),className:"pl-12 h-12 bg-card border-border text-sm","data-testid":"input-explorer-address"})]}),f.jsx(We,{onClick:Cr,disabled:ei||!wr.trim(),className:"h-12 px-6 cyber-gradient text-background font-semibold","data-testid":"button-explore-address",children:ei?f.jsx(El,{className:"w-5 h-5 animate-spin"}):f.jsx(Hd,{className:"w-5 h-5"})})]})}),f.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[f.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Latest Block"}),f.jsxs("p",{className:"text-2xl font-bold text-primary font-mono",children:[yo?"...":ir?.latestBlock?.toLocaleString()||"---",f.jsx("span",{className:"text-xs text-muted-foreground ml-1",children:"(0.4s)"})]})]}),f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[f.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Active Validators"}),f.jsx("p",{className:"text-2xl font-bold",children:ir?.activeValidators||45})]}),f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[f.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"BNB Price"}),f.jsxs("p",{className:"text-2xl font-bold text-green-400",children:["$",ir?.bnbPrice?.toFixed(2)||"---"]})]})]}),yo&&f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx(El,{className:"w-8 h-8 animate-spin text-primary"})}),ir&&!vn&&f.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[f.jsxs("h3",{className:"font-display font-semibold text-lg mb-4 flex items-center gap-2",children:[f.jsx(Vd,{className:"w-5 h-5 text-primary"}),"Latest 10 Blocks"]}),f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-muted-foreground text-xs",children:[f.jsx("th",{className:"text-left py-2",children:"Block"}),f.jsx("th",{className:"text-left py-2",children:"Validated"}),f.jsx("th",{className:"text-right py-2",children:"Block Reward"})]})}),f.jsx("tbody",{className:"divide-y divide-border/30",children:ir.blocks?.map((R,Nt)=>f.jsxs("tr",{className:"hover:bg-muted/20",children:[f.jsx("td",{className:"py-2",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-6 h-6 rounded bg-primary/20 flex items-center justify-center",children:f.jsx(Vd,{className:"w-3 h-3 text-primary"})}),f.jsxs("div",{children:[f.jsx("a",{href:`https://bscscan.com/block/${R.number}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono text-xs",children:R.number}),f.jsx("p",{className:"text-xs text-muted-foreground",children:R.timeAgo})]})]})}),f.jsxs("td",{className:"py-2",children:[f.jsx("p",{className:"text-xs text-primary",children:"Validator"}),f.jsxs("p",{className:"text-xs text-muted-foreground",children:[R.txCount," transactions"]})]}),f.jsxs("td",{className:"py-2 text-right font-mono text-xs",children:[R.reward," BNB"]})]},Nt))})]})})]}),f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[f.jsxs("h3",{className:"font-display font-semibold text-lg mb-4 flex items-center gap-2",children:[f.jsx($T,{className:"w-5 h-5 text-primary"}),"Latest 10 Transactions"]}),f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-muted-foreground text-xs",children:[f.jsx("th",{className:"text-left py-2",children:"Txn Hash"}),f.jsx("th",{className:"text-left py-2",children:"From / To"}),f.jsx("th",{className:"text-right py-2",children:"Value"})]})}),f.jsx("tbody",{className:"divide-y divide-border/30",children:ir.transactions?.map((R,Nt)=>f.jsxs("tr",{className:"hover:bg-muted/20",children:[f.jsx("td",{className:"py-2",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:"w-6 h-6 rounded bg-cyan-500/20 flex items-center justify-center",children:f.jsx(Kg,{className:"w-3 h-3 text-cyan-400"})}),f.jsxs("div",{children:[f.jsxs("a",{href:`https://bscscan.com/tx/${R.hash}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono text-xs",children:[R.hash?.slice(0,10),"...",R.hash?.slice(-4)]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:R.timeAgo})]})]})}),f.jsxs("td",{className:"py-2",children:[f.jsxs("p",{className:"text-xs",children:[f.jsx("span",{className:"text-muted-foreground",children:"From "}),f.jsxs("a",{href:`https://bscscan.com/address/${R.from}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono",children:[R.from?.slice(0,6),"...",R.from?.slice(-4)]})]}),f.jsxs("p",{className:"text-xs",children:[f.jsx("span",{className:"text-muted-foreground",children:"To "}),f.jsxs("a",{href:`https://bscscan.com/address/${R.to}`,target:"_blank",rel:"noopener noreferrer",className:"text-green-400 hover:underline font-mono",children:[R.to?.slice(0,6),"...",R.to?.slice(-4)]})]})]}),f.jsxs("td",{className:"py-2 text-right font-mono text-xs",children:[R.value," BNB"]})]},Nt))})]})})]})]}),Nr&&f.jsx("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30",children:f.jsxs("div",{className:"flex items-center gap-2 text-red-400",children:[f.jsx(pc,{className:"w-5 h-5"}),f.jsx("p",{className:"text-sm",children:Nr})]})}),vn&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs(We,{variant:"ghost",size:"sm",onClick:()=>Ts(null),className:"text-muted-foreground",children:[f.jsx(Wd,{className:"w-4 h-4 mr-2"})," Back to Explorer"]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsx("h2",{className:"text-2xl font-display font-bold",children:"Address"}),f.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium border ${vn.isContract?"bg-purple-500/10 text-purple-400 border-purple-500/30":"bg-cyan-500/10 text-cyan-400 border-cyan-500/30"}`,children:vn.isContract?"Contract":"Wallet"}),f.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[f.jsx("p",{className:"font-mono text-sm text-muted-foreground truncate",children:vn.address}),f.jsx("button",{onClick:()=>navigator.clipboard.writeText(vn.address),className:"text-muted-foreground hover:text-primary",children:f.jsx(SN,{className:"w-4 h-4"})})]})]}),f.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 p-4 rounded-xl bg-card border border-border",children:[f.jsxs("div",{className:"border-r border-border pr-4",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Balance"}),f.jsxs("p",{className:"font-bold text-primary",children:[vn.bnbBalance," BNB"]})]}),f.jsxs("div",{className:"border-r border-border pr-4",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Token"}),f.jsxs("p",{className:"font-bold",children:[vn.tokenHoldings?.length||0," Token & 0 NFT"]})]}),f.jsxs("div",{className:"border-r border-border pr-4",children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Contract Creator"}),vn.contractCreator?f.jsxs("a",{href:`https://bscscan.com/address/${vn.contractCreator}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm font-mono",children:[vn.contractCreator?.slice(0,6),"...",vn.contractCreator?.slice(-4)]}):f.jsx("p",{className:"text-muted-foreground text-sm",children:"-"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Token Tracker"}),f.jsxs("a",{href:vn.bscscanUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm flex items-center gap-1",children:["View on BscScan ",f.jsx(jl,{className:"w-3 h-3"})]})]})]}),f.jsxs("div",{className:"rounded-xl bg-card border border-border overflow-hidden",children:[f.jsxs("div",{className:"border-b border-border px-4 py-3 flex items-center gap-4 overflow-x-auto",children:[f.jsx("button",{className:"text-sm font-medium text-primary border-b-2 border-primary pb-2 whitespace-nowrap",children:"Transactions"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground pb-2 whitespace-nowrap",children:"Internal Txns"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground pb-2 whitespace-nowrap",children:"BEP-20 Token Txns"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground pb-2 whitespace-nowrap",children:"BEP-721 Token Txns"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground pb-2 whitespace-nowrap",children:"Contract"})]}),f.jsx("div",{className:"overflow-x-auto",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"border-b border-border text-muted-foreground text-xs bg-muted/20",children:[f.jsx("th",{className:"text-left py-3 px-4",children:"Txn Hash"}),f.jsx("th",{className:"text-left py-3 px-2",children:"Method"}),f.jsx("th",{className:"text-left py-3 px-2",children:"Block"}),f.jsx("th",{className:"text-left py-3 px-2",children:"Age"}),f.jsx("th",{className:"text-left py-3 px-2",children:"From"}),f.jsx("th",{className:"text-left py-3 px-2"}),f.jsx("th",{className:"text-left py-3 px-2",children:"To"}),f.jsx("th",{className:"text-right py-3 px-2",children:"Value"}),f.jsx("th",{className:"text-right py-3 px-4",children:"Txn Fee"})]})}),f.jsx("tbody",{className:"divide-y divide-border/30",children:vn.transactions?.length>0?vn.transactions.map((R,Nt)=>f.jsxs("tr",{className:"hover:bg-muted/20",children:[f.jsx("td",{className:"py-3 px-4",children:f.jsxs("a",{href:`https://bscscan.com/tx/${R.hash}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono text-xs",children:[R.hash?.slice(0,8),"...",R.hash?.slice(-6)]})}),f.jsx("td",{className:"py-3 px-2",children:f.jsx("span",{className:"px-2 py-1 rounded bg-muted text-xs font-mono",children:R.method||"Transfer"})}),f.jsx("td",{className:"py-3 px-2",children:f.jsx("a",{href:`https://bscscan.com/block/${R.blockNumber}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono text-xs",children:R.blockNumber})}),f.jsx("td",{className:"py-3 px-2 text-xs text-muted-foreground whitespace-nowrap",children:R.timeAgo||R.age||"Recent"}),f.jsx("td",{className:"py-3 px-2",children:f.jsxs("a",{href:`https://bscscan.com/address/${R.from}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono text-xs",children:[R.from?.slice(0,6),"...",R.from?.slice(-4)]})}),f.jsx("td",{className:"py-3 px-2",children:f.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-medium ${R.type==="in"?"bg-green-500/20 text-green-400":"bg-yellow-500/20 text-yellow-400"}`,children:R.type==="in"?"IN":"OUT"})}),f.jsx("td",{className:"py-3 px-2",children:f.jsxs("a",{href:`https://bscscan.com/address/${R.to}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline font-mono text-xs",children:[R.to?.slice(0,6),"...",R.to?.slice(-4)]})}),f.jsxs("td",{className:"py-3 px-2 text-right font-mono text-xs whitespace-nowrap",children:[R.value," BNB"]}),f.jsxs("td",{className:"py-3 px-4 text-right font-mono text-xs text-muted-foreground whitespace-nowrap",children:[R.txnFee||"0.00000000"," BNB"]})]},Nt)):f.jsx("tr",{children:f.jsx("td",{colSpan:9,className:"py-8 text-center",children:f.jsxs("div",{className:"space-y-2",children:[f.jsx("p",{className:"text-muted-foreground",children:"No recent transactions found"}),f.jsxs("a",{href:`https://bscscan.com/txs?a=${vn.address}`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline text-sm inline-flex items-center gap-1",children:["View full history on BscScan ",f.jsx(jl,{className:"w-3 h-3"})]})]})})})})]})})]}),vn.tokenHoldings?.length>0&&f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border",children:[f.jsxs("h3",{className:"font-display font-semibold text-sm mb-3 flex items-center gap-2",children:[f.jsx(lu,{className:"w-4 h-4 text-primary"})," Token Holdings (",vn.tokenHoldings.length,")"]}),f.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:vn.tokenHoldings.slice(0,8).map((R,Nt)=>f.jsxs("a",{href:`https://bscscan.com/token/${R.contract}`,target:"_blank",rel:"noopener noreferrer",className:"p-2 rounded bg-muted/30 hover:bg-muted/50 text-xs",children:[f.jsx("p",{className:"font-medium truncate",children:R.symbol}),f.jsx("p",{className:"text-muted-foreground font-mono truncate",children:R.balance})]},Nt))})]})]})]}),t==="token-swap"&&f.jsxs("div",{className:"space-y-6 max-w-lg mx-auto",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-12 h-12 rounded-xl cyber-gradient flex items-center justify-center glow-cyan",children:f.jsx(Wg,{className:"w-6 h-6 text-background"})}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-display font-semibold text-lg",children:"Swap Tokens"}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"Trade tokens on BSC"})]})]}),f.jsx("div",{className:"flex items-center gap-2",children:f.jsx(We,{variant:"ghost",size:"icon",onClick:()=>ne(),disabled:wa,"data-testid":"button-refresh-quote",children:f.jsx(O8,{className:`w-4 h-4 ${wa?"animate-spin":""}`})})})]}),ie?f.jsxs("div",{className:"p-3 rounded-lg bg-green-500/10 border border-green-500/30 flex items-center gap-3",children:[f.jsx(_l,{className:"w-5 h-5 text-green-400"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("p",{className:"text-sm text-green-400 font-medium",children:"Wallet Connected"}),f.jsxs("p",{className:"text-xs text-muted-foreground font-mono",children:[ye.slice(0,6),"...",ye.slice(-4)]})]}),f.jsxs("p",{className:"text-sm font-medium",children:[or," BNB"]})]}):f.jsxs("div",{className:"p-3 rounded-lg bg-muted/30 border border-border/50 flex items-center gap-3",children:[f.jsx(Xg,{className:"w-5 h-5 text-muted-foreground"}),f.jsx("p",{className:"text-sm text-muted-foreground flex-1",children:"Connect wallet to swap"}),f.jsx(We,{onClick:zt,size:"sm",className:"cyber-gradient text-background font-semibold","data-testid":"button-connect-swap-wallet",children:"Connect"})]}),f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border/50",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"text-sm text-muted-foreground",children:"From"}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:["Balance: ",ie?or:"0.0000"]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(ji,{type:"number",placeholder:"0.0",className:"flex-1 bg-transparent border-0 text-2xl font-bold h-12 p-0 focus-visible:ring-0",value:Pi,onChange:R=>{ya(R.target.value),R.target.value&&xi&&ie&&setTimeout(ne,500)},"data-testid":"input-swap-from-amount"}),f.jsx("select",{value:ar,onChange:R=>$s(R.target.value),className:"bg-muted/50 border border-border/50 rounded-lg px-3 py-2 text-sm font-medium","data-testid":"select-swap-from-token",children:Sa.map(R=>f.jsx("option",{value:R.symbol,disabled:R.symbol===xi,children:R.symbol},R.symbol))})]}),f.jsx(We,{variant:"ghost",size:"sm",onClick:()=>ya(or),className:"text-xs text-primary mt-2",disabled:!ie,"data-testid":"button-max-amount",children:"MAX"})]}),f.jsx("div",{className:"flex justify-center -my-2 relative z-10",children:f.jsx(We,{variant:"outline",size:"icon",onClick:Oe,className:"rounded-full bg-background border-2 border-primary/30 hover:border-primary","data-testid":"button-switch-tokens",children:f.jsx(Wg,{className:"w-4 h-4"})})}),f.jsxs("div",{className:"p-4 rounded-xl bg-card border border-border/50",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"text-sm text-muted-foreground",children:"To"}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:["Balance: ",ba]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(ji,{type:"number",placeholder:"0.0",className:"flex-1 bg-transparent border-0 text-2xl font-bold h-12 p-0 focus-visible:ring-0",value:Yr,readOnly:!0,"data-testid":"input-swap-to-amount"}),f.jsxs("select",{value:xi,onChange:R=>{il(R.target.value),Pi&&R.target.value&&ie&&setTimeout(ne,500)},className:"bg-muted/50 border border-border/50 rounded-lg px-3 py-2 text-sm font-medium","data-testid":"select-swap-to-token",children:[f.jsx("option",{value:"",children:"Select token"}),Sa.map(R=>f.jsx("option",{value:R.symbol,disabled:R.symbol===ar,children:R.symbol},R.symbol))]})]})]}),f.jsx("div",{className:"p-4 rounded-xl bg-muted/20 border border-border/30",children:f.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(q8,{className:"w-4 h-4 text-muted-foreground"}),f.jsx("span",{className:"text-sm text-muted-foreground",children:"Slippage Tolerance"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[["0.5","1","3"].map(R=>f.jsxs(We,{variant:wi===R?"default":"ghost",size:"sm",onClick:()=>Gs(R),className:wi===R?"cyber-gradient text-background":"","data-testid":`button-slippage-${R}`,children:[R,"%"]},R)),f.jsx(ji,{type:"number",placeholder:"Custom",className:"w-16 h-8 text-sm text-center",value:["0.5","1","3"].includes(wi)?"":wi,onChange:R=>Gs(R.target.value),"data-testid":"input-custom-slippage"})]})]})}),xa&&f.jsxs("div",{className:"p-4 rounded-xl bg-primary/5 border border-primary/20 space-y-2",children:[f.jsxs("div",{className:"flex justify-between text-sm",children:[f.jsx("span",{className:"text-muted-foreground",children:"Rate"}),f.jsxs("span",{children:["1 ",ar," = ",(parseFloat(Yr)/parseFloat(Pi)).toFixed(6)," ",xi]})]}),f.jsxs("div",{className:"flex justify-between text-sm",children:[f.jsx("span",{className:"text-muted-foreground",children:"Min. Received"}),f.jsxs("span",{children:[(parseFloat(Yr)*(1-parseFloat(wi)/100)).toFixed(6)," ",xi]})]}),f.jsxs("div",{className:"flex justify-between text-sm",children:[f.jsx("span",{className:"text-muted-foreground",children:"Price Impact"}),f.jsx("span",{className:"text-green-400",children:xa.priceImpact})]})]}),rl&&f.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 flex items-center gap-3",children:[f.jsx(pc,{className:"w-5 h-5 text-red-400"}),f.jsx("p",{className:"text-sm text-red-300",children:rl})]}),Si&&f.jsxs("div",{className:"p-4 rounded-lg bg-green-500/10 border border-green-500/30",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[f.jsx(_l,{className:"w-5 h-5 text-green-400"}),f.jsx("p",{className:"text-sm text-green-400 font-medium",children:Si.message})]}),f.jsxs("a",{href:Si.explorerUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline flex items-center gap-1",children:["View on BscScan ",f.jsx(jl,{className:"w-3 h-3"})]})]}),f.jsx(We,{onClick:()=>{ie?fe():zt()},disabled:sl||ie&&(!Pi||!xi||parseFloat(Pi)<=0),className:"w-full cyber-gradient text-background font-semibold h-14 text-lg glow-cyan","data-testid":"button-execute-swap",children:sl?f.jsxs(f.Fragment,{children:[f.jsx(El,{className:"w-5 h-5 mr-2 animate-spin"}),"Swapping..."]}):ie?xi?!Pi||parseFloat(Pi)<=0?"Enter an amount":`Swap ${ar} for ${xi}`:"Select a token":"Connect Wallet to Swap"})]}),t==="futures"&&f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4 p-3 rounded-xl bg-card border border-border",children:[f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold text-black ${hi==="BTCUSDT"?"bg-yellow-500":hi==="ETHUSDT"?"bg-blue-500":hi==="BNBUSDT"?"bg-yellow-400":hi==="SOLUSDT"?"bg-purple-500":"bg-gray-500"}`,children:hi.replace("USDT","").slice(0,3)}),f.jsxs("div",{children:[f.jsxs("select",{value:hi,onChange:R=>sr(R.target.value),className:"bg-transparent text-lg font-bold border-none focus:outline-none cursor-pointer","data-testid":"select-trading-pair",children:[f.jsx("option",{value:"BTCUSDT",children:"BTC/USDT Perp"}),f.jsx("option",{value:"ETHUSDT",children:"ETH/USDT Perp"}),f.jsx("option",{value:"BNBUSDT",children:"BNB/USDT Perp"}),f.jsx("option",{value:"SOLUSDT",children:"SOL/USDT Perp"}),f.jsx("option",{value:"XRPUSDT",children:"XRP/USDT Perp"})]}),f.jsxs("p",{className:`text-xs ${Ie.priceChangePercent>=0?"text-green-400":"text-red-400"}`,children:[Ie.priceChangePercent>=0?"+":"",Ie.priceChangePercent.toFixed(2),"%"]})]})]}),f.jsxs("div",{className:"hidden md:flex items-center gap-6 text-sm",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground text-xs",children:"Mark"}),f.jsx("p",{className:"font-mono text-primary",children:Ie.markPrice.toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground text-xs",children:"Index"}),f.jsx("p",{className:"font-mono",children:Ie.indexPrice.toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground text-xs",children:"Funding"}),f.jsxs("p",{className:`font-mono ${Ie.fundingRate>=0?"text-green-400":"text-red-400"}`,children:[Ie.fundingRate.toFixed(4),"%"]})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground text-xs",children:"24h Volume"}),f.jsx("p",{className:"font-mono",children:Ie.volume24h.toLocaleString(void 0,{maximumFractionDigits:0})})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground text-xs",children:"Open Interest"}),f.jsx("p",{className:"font-mono",children:Ie.openInterest.toLocaleString(void 0,{maximumFractionDigits:0})})]})]})]}),f.jsxs(We,{variant:"outline",size:"sm",className:"gap-2",children:[f.jsx(uf,{className:"w-4 h-4"})," Shield"]})]}),f.jsxs("div",{className:"grid lg:grid-cols-4 gap-4",children:[f.jsxs("div",{className:"lg:col-span-2 rounded-xl bg-card border border-border p-4 min-h-[400px]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-4 flex-wrap gap-2",children:[f.jsx("div",{className:"flex items-center gap-1 text-xs",children:[{label:"5m",value:"5m"},{label:"15m",value:"15m"},{label:"1H",value:"1h"},{label:"4H",value:"4h"},{label:"1D",value:"1d"},{label:"1W",value:"1w"}].map(R=>f.jsx("button",{onClick:()=>di(R.value),className:`px-2 py-1 rounded transition-colors ${ni===R.value?"bg-primary/20 text-primary":"bg-muted hover:bg-muted/80"}`,"data-testid":`btn-interval-${R.value}`,children:R.label},R.value))}),f.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[f.jsxs("span",{className:`font-bold text-lg ${Ie.priceChangePercent>=0?"text-green-400":"text-red-400"}`,children:["$",Ie.price.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})]}),f.jsxs("span",{className:"text-muted-foreground",children:["Vol: ",(Ie.volume24h/1e9).toFixed(2),"B"]})]})]}),f.jsx("div",{ref:rr,className:"w-full h-[300px] rounded-lg","data-testid":"futures-chart-container",children:va.length===0&&f.jsx("div",{className:"flex items-center justify-center h-full",children:f.jsx(El,{className:"w-8 h-8 animate-spin text-primary"})})})]}),f.jsxs("div",{className:"rounded-xl bg-card border border-border p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h4",{className:"font-semibold text-sm",children:"Order book"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Trades"})]}),f.jsxs("div",{className:"text-xs space-y-1",children:[f.jsxs("div",{className:"grid grid-cols-3 text-muted-foreground mb-2",children:[f.jsx("span",{children:"Price (USDT)"}),f.jsx("span",{className:"text-right",children:"Size"}),f.jsx("span",{className:"text-right",children:"Total"})]}),rs.asks.length>0?(()=>{const R=Math.max(...rs.asks.map(Lt=>Lt.size));let Nt=0;return rs.asks.map((Lt,Me)=>(Nt+=Lt.size*Lt.price,f.jsxs("div",{className:"grid grid-cols-3 text-red-400 relative",children:[f.jsx("div",{className:"absolute right-0 top-0 bottom-0 bg-red-500/10",style:{width:`${Lt.size/R*100}%`}}),f.jsx("span",{className:"font-mono relative z-10",children:Lt.price.toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})}),f.jsx("span",{className:"text-right font-mono relative z-10",children:Lt.size.toFixed(3)}),f.jsxs("span",{className:"text-right font-mono relative z-10",children:[(Nt/1e3).toFixed(1),"K"]})]},Me)))})():f.jsx("div",{className:"py-2 text-center text-muted-foreground",children:"Loading..."}),f.jsxs("div",{className:"py-2 text-center",children:[f.jsx("span",{className:`text-lg font-bold ${Ie.priceChangePercent>=0?"text-green-400":"text-red-400"}`,children:Ie.price.toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})}),f.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:Ie.markPrice.toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})})]}),rs.bids.length>0?(()=>{const R=Math.max(...rs.bids.map(Lt=>Lt.size));let Nt=0;return rs.bids.map((Lt,Me)=>(Nt+=Lt.size*Lt.price,f.jsxs("div",{className:"grid grid-cols-3 text-green-400 relative",children:[f.jsx("div",{className:"absolute right-0 top-0 bottom-0 bg-green-500/10",style:{width:`${Lt.size/R*100}%`}}),f.jsx("span",{className:"font-mono relative z-10",children:Lt.price.toLocaleString(void 0,{minimumFractionDigits:1,maximumFractionDigits:1})}),f.jsx("span",{className:"text-right font-mono relative z-10",children:Lt.size.toFixed(3)}),f.jsxs("span",{className:"text-right font-mono relative z-10",children:[(Nt/1e3).toFixed(1),"K"]})]},Me)))})():f.jsx("div",{className:"py-2 text-center text-muted-foreground",children:"Loading..."})]})]}),f.jsxs("div",{className:"rounded-xl bg-card border border-border p-4 space-y-4",children:[f.jsx("div",{className:"flex items-center justify-between",children:f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("span",{className:"text-xs text-muted-foreground",children:"Cross"}),f.jsxs("select",{className:"bg-muted text-xs rounded px-2 py-1 border-none",children:[f.jsx("option",{children:"20x"}),f.jsx("option",{children:"10x"}),f.jsx("option",{children:"5x"}),f.jsx("option",{children:"50x"}),f.jsx("option",{children:"100x"})]}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"M"})]})}),f.jsxs("div",{className:"flex gap-2 text-xs border-b border-border pb-2",children:[f.jsx("button",{className:"text-primary border-b-2 border-primary pb-1",children:"Market"}),f.jsx("button",{className:"text-muted-foreground hover:text-foreground pb-1",children:"Limit"}),f.jsx("button",{className:"text-muted-foreground hover:text-foreground pb-1",children:"Stop Limit"})]}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsx("label",{className:"text-xs text-muted-foreground",children:"Avbl"}),f.jsx("div",{className:"flex items-center justify-between text-sm",children:f.jsx("span",{children:"0.00 USDT"})})]}),f.jsxs("div",{className:"relative",children:[f.jsx(ji,{placeholder:"89257.7",className:"pr-16 text-right font-mono","data-testid":"input-futures-price"}),f.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-muted-foreground",children:"USDT"})]}),f.jsxs("div",{className:"relative",children:[f.jsx(ji,{placeholder:"Size",className:"pr-16 text-right font-mono","data-testid":"input-futures-size"}),f.jsxs("select",{className:"absolute right-2 top-1/2 -translate-y-1/2 bg-transparent text-xs border-none",children:[f.jsx("option",{children:"USDT"}),f.jsx("option",{children:"BTC"})]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("input",{type:"range",min:"0",max:"100",defaultValue:"0",className:"flex-1 h-1 bg-muted rounded-lg appearance-none cursor-pointer"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"0%"})]}),f.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[f.jsx("input",{type:"checkbox",id:"tp-sl",className:"rounded"}),f.jsx("label",{htmlFor:"tp-sl",className:"text-muted-foreground",children:"TP/SL"}),f.jsx("input",{type:"checkbox",id:"hidden",className:"rounded ml-2"}),f.jsx("label",{htmlFor:"hidden",className:"text-muted-foreground",children:"Hidden Order"})]}),f.jsxs("div",{className:"text-xs space-y-1 text-muted-foreground",children:[f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{children:"Liq. Price"}),f.jsx("span",{children:"--"})]}),f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{children:"Margin"}),f.jsx("span",{children:"0.00 USDT"})]}),f.jsxs("div",{className:"flex justify-between",children:[f.jsx("span",{children:"Max"}),f.jsx("span",{children:"0.00 USDT"})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[f.jsx(We,{className:"bg-green-600 hover:bg-green-700 text-white font-semibold","data-testid":"button-buy-long",children:"Buy / Long"}),f.jsx(We,{className:"bg-red-600 hover:bg-red-700 text-white font-semibold","data-testid":"button-sell-short",children:"Sell / Short"})]}),f.jsx(We,{className:"w-full cyber-gradient text-background font-semibold","data-testid":"button-enable-trading",children:"Enable Trading"})]})]})]}),f.jsxs("div",{className:"grid lg:grid-cols-3 gap-4",children:[f.jsxs("div",{className:"lg:col-span-2 rounded-xl bg-card border border-border p-4",children:[f.jsxs("div",{className:"flex items-center gap-4 border-b border-border pb-3 mb-4 overflow-x-auto",children:[f.jsx("button",{className:"text-sm font-medium text-primary whitespace-nowrap",children:"Open orders"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"Positions"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"Assets"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"TWAP"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"Order history"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"Position History"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"Trade history"}),f.jsx("button",{className:"text-sm text-muted-foreground hover:text-foreground whitespace-nowrap",children:"Transaction history"})]}),f.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[f.jsx(Xg,{className:"w-12 h-12 mb-4 opacity-50"}),f.jsx("p",{children:"Please connect a wallet first"})]})]}),f.jsxs("div",{className:"rounded-xl bg-card border border-border p-4 space-y-4",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h4",{className:"font-semibold",children:"Account"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(We,{size:"sm",className:"bg-yellow-500 hover:bg-yellow-600 text-black text-xs",children:"Deposit"}),f.jsx(We,{size:"sm",variant:"outline",className:"text-xs",children:"Withdraw"}),f.jsx(We,{size:"sm",variant:"outline",className:"text-xs",children:"Transfer"})]})]}),f.jsxs("div",{className:"space-y-3 text-sm",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground text-xs",children:"Account Equity"}),f.jsx("p",{className:"font-bold",children:"-- USDT"})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Spot total value"}),f.jsx("p",{children:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Perp total value"}),f.jsx("p",{children:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Perpetuals unrealized Pnl"}),f.jsx("p",{children:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Shield unrealized Pnl"}),f.jsx("p",{children:"--"})]})]}),f.jsxs("div",{className:"pt-2 border-t border-border",children:[f.jsx("p",{className:"text-muted-foreground text-xs mb-2",children:"Margin"}),f.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Account Margin Ratio"}),f.jsx("p",{children:"--"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Account Maintenance Margin"}),f.jsx("p",{className:"text-primary",children:"0.00%"})]}),f.jsxs("div",{children:[f.jsx("p",{className:"text-muted-foreground",children:"Account Equity"}),f.jsx("p",{children:"--"})]})]})]})]})]})]}),f.jsxs("div",{className:"p-4 rounded-xl bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20 text-center",children:[f.jsx("p",{className:"text-lg font-semibold mb-2",children:"Futures Trading Coming Soon"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Trade perpetual contracts with up to 100x leverage. Stay tuned for the launch!"})]})]}),t==="free-audit"&&f.jsxs("div",{className:"space-y-6 max-w-3xl mx-auto",children:[f.jsxs("div",{className:"text-center space-y-4",children:[f.jsx("h2",{className:"text-3xl font-display font-bold text-glow-cyan",children:"Free Smart Contract Audit"}),f.jsx("p",{className:"text-muted-foreground",children:_("dashboard.freeAuditDesc")})]}),f.jsxs("div",{className:"p-6 rounded-xl border-2 border-dashed border-primary/30 bg-primary/5 space-y-4",children:[f.jsx("div",{className:"flex justify-center",children:f.jsx("div",{className:"w-16 h-16 rounded-xl cyber-gradient flex items-center justify-center glow-cyan",children:f.jsx(Kg,{className:"w-8 h-8 text-background"})})}),f.jsx("div",{className:"text-center",children:f.jsx("p",{className:"font-medium mb-2",children:_("dashboard.contractAddress")})}),f.jsx(ji,{placeholder:"0x...",value:En,onChange:R=>Ji(R.target.value),className:"text-center text-sm h-12 bg-background/50 border-primary/30","data-testid":"input-audit-contract"}),f.jsxs("div",{className:"flex items-center justify-center gap-2 text-yellow-500 text-sm",children:[f.jsx(W8,{className:"w-4 h-4"}),f.jsx("span",{children:_("dashboard.contractVerified")})]})]}),f.jsx(We,{onClick:Di,disabled:ps||!En.trim(),className:"w-full h-14 text-lg font-semibold",style:{backgroundColor:"#c6ff00",color:"#000"},"data-testid":"button-start-audit",children:ps?f.jsxs(f.Fragment,{children:[f.jsx(El,{className:"w-5 h-5 mr-2 animate-spin"}),_("dashboard.auditInProgress")]}):_("dashboard.startAudit")}),Es.length>0&&f.jsx("div",{className:"space-y-2",children:Es.map((R,Nt)=>f.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-lg ${Nt===Es.length-1&&R.includes("success")?"bg-green-500/10 border border-green-500/30":"bg-primary/5 border border-primary/20"}`,children:[R.includes("success")||R.includes("完成")||R.includes("بنجاح")?f.jsx(_l,{className:"w-5 h-5 text-green-400"}):f.jsx(x8,{className:"w-5 h-5 text-primary"}),f.jsx("span",{className:"text-sm",children:R})]},Nt))}),Hs&&f.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 flex items-center gap-3",children:[f.jsx(pc,{className:"w-5 h-5 text-red-400"}),f.jsx("p",{className:"text-sm text-red-300",children:Hs})]}),Xe&&f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-center gap-8 p-6 rounded-xl bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20",children:[f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:`text-6xl font-bold font-display ${Xe.auditScore>=80?"text-green-400":Xe.auditScore>=60?"text-yellow-400":Xe.auditScore>=40?"text-orange-400":"text-red-400"}`,children:Xe.auditScore}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Audit Score"})]}),f.jsxs("div",{className:"text-center",children:[f.jsx("div",{className:`text-6xl font-bold font-display ${Xe.grade?.startsWith("A")?"text-green-400":Xe.grade?.startsWith("B")?"text-cyan-400":Xe.grade?.startsWith("C")?"text-yellow-400":"text-red-400"}`,children:Xe.grade}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Grade"})]}),f.jsxs("div",{className:"text-left space-y-1 text-sm text-muted-foreground",children:[f.jsxs("p",{children:[f.jsx("span",{className:"text-foreground font-medium",children:Xe.tokenName})," (",Xe.tokenSymbol,")"]}),f.jsx("p",{children:"Chain: BSC (BEP-20)"}),f.jsxs("p",{children:["Holders: ",Xe.rawData?.holderCount?.toLocaleString()||"N/A"]})]})]}),f.jsx("div",{className:"grid grid-cols-5 gap-4",children:[{label:_("dashboard.critical"),value:Xe.summary?.critical||0,color:"text-red-500"},{label:_("dashboard.major"),value:Xe.summary?.major||0,color:"text-orange-500"},{label:_("dashboard.medium"),value:Xe.summary?.medium||0,color:"text-yellow-500"},{label:_("dashboard.minor"),value:Xe.summary?.minor||0,color:"text-blue-400"},{label:_("dashboard.info"),value:Xe.summary?.info||0,color:"text-gray-400"}].map(R=>f.jsxs("div",{className:"text-center p-4 rounded-lg bg-card border border-border",children:[f.jsx("p",{className:`text-3xl font-bold ${R.color}`,children:R.value}),f.jsx("p",{className:"text-sm text-muted-foreground",children:R.label})]},R.label))}),f.jsxs("div",{className:"space-y-4",children:[f.jsx("h3",{className:"text-xl font-display font-semibold text-primary",children:_("dashboard.detailedFindings")}),Xe.findings?.length>0?Xe.findings.map((R,Nt)=>f.jsxs("div",{className:"p-4 rounded-lg bg-card border border-border space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:`px-3 py-1 rounded text-xs font-semibold uppercase ${R.severity==="critical"?"bg-red-500/20 text-red-400":R.severity==="major"?"bg-orange-500/20 text-orange-400":R.severity==="medium"?"bg-yellow-500/20 text-yellow-400":R.severity==="minor"?"bg-blue-500/20 text-blue-400":"bg-gray-500/20 text-gray-400"}`,children:R.severity}),f.jsx("span",{className:"text-sm text-muted-foreground",children:R.confidence==="high"?_("dashboard.confidenceHigh"):R.confidence==="medium"?_("dashboard.confidenceMedium"):_("dashboard.confidenceLow")})]}),f.jsx("div",{className:"p-3 rounded bg-primary/5 border-l-4 border-primary",children:f.jsx("p",{className:"text-sm font-medium",children:R.title})}),f.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[f.jsxs("p",{className:"flex items-center gap-2",children:[f.jsx(Kg,{className:"w-4 h-4"}),R.file||"contract.sol"]}),R.lines&&f.jsxs("p",{className:"flex items-center gap-2",children:["# Lines: ",R.lines]})]}),f.jsx("div",{className:"pt-2",children:f.jsxs("span",{className:"px-2 py-1 rounded bg-primary/10 text-primary text-xs",children:["Type: ",R.type]})})]},Nt)):f.jsxs("div",{className:"p-6 rounded-lg bg-green-500/10 border border-green-500/30 text-center",children:[f.jsx(_l,{className:"w-12 h-12 text-green-400 mx-auto mb-3"}),f.jsx("p",{className:"text-green-400 font-medium",children:"No security issues found!"}),f.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"This contract passed all security checks."})]})]}),f.jsxs(We,{onClick:Ar,variant:"outline",className:"w-full h-12 border-primary/30 text-primary","data-testid":"button-download-audit-report",children:[f.jsx(h8,{className:"w-5 h-5 mr-2"}),_("dashboard.downloadReport")]})]})]})]})]},`content-${t}`)]})]})]})}const Nc=M.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ci("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Nc.displayName="Card";const _h=M.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ci("flex flex-col space-y-1.5 p-6",e),...t}));_h.displayName="CardHeader";const jh=M.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ci("font-semibold leading-none tracking-tight",e),...t}));jh.displayName="CardTitle";const zH=M.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ci("text-sm text-muted-foreground",e),...t}));zH.displayName="CardDescription";const Ac=M.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ci("p-6 pt-0",e),...t}));Ac.displayName="CardContent";const BH=M.forwardRef(({className:e,...t},n)=>f.jsx("div",{ref:n,className:ci("flex items-center p-6 pt-0",e),...t}));BH.displayName="CardFooter";const FH=C2("whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover-elevate ",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-xs",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-xs",outline:"text-foreground border [border-color:var(--badge-outline)]"}},defaultVariants:{variant:"default"}});function Xp({className:e,variant:t,...n}){return f.jsx("div",{className:ci(FH({variant:t}),e),...n})}function IH(){const{t:e}=c0();return f.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[f.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[f.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 bg-primary/5 rounded-full blur-3xl"}),f.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-80 h-80 bg-purple-500/5 rounded-full blur-3xl"})]}),f.jsx("header",{className:"sticky top-0 z-50 border-b border-primary/10 bg-background/80 backdrop-blur-xl",children:f.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[f.jsx(ou,{href:"/",children:f.jsxs(We,{variant:"ghost",className:"gap-2","data-testid":"button-back-home",children:[f.jsx(Wd,{className:"w-4 h-4"}),e("docs.backToHome")]})}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Ay,{}),f.jsx(Xp,{variant:"outline",className:"text-primary border-primary/30",children:e("docs.whitepaper")})]})]})}),f.jsxs("main",{className:"relative z-10 max-w-6xl mx-auto px-4 py-12",children:[f.jsxs(Ei.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center mb-16",children:[f.jsx(Xp,{className:"mb-4 bg-primary/10 text-primary border-primary/20",children:e("docs.officialDocs")}),f.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-display font-bold mb-6",children:f.jsx("span",{className:"bg-gradient-to-r from-primary via-purple-400 to-pink-400 bg-clip-text text-transparent",children:"Astherafi"})}),f.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:e("docs.subtitle")})]}),f.jsxs("div",{className:"space-y-16",children:[f.jsxs(eu,{id:"introduction",title:e("docs.introduction"),icon:f.jsx(j5,{className:"w-6 h-6"}),children:[f.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:e("docs.introText1")}),f.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e("docs.introText2")})]}),f.jsx(eu,{id:"vision",title:e("docs.ourVision"),icon:f.jsx($8,{className:"w-6 h-6"}),children:f.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[f.jsxs(Nc,{className:"bg-card/50 border-primary/10",children:[f.jsx(_h,{children:f.jsxs(jh,{className:"flex items-center gap-2 text-lg",children:[f.jsx(uf,{className:"w-5 h-5 text-primary"}),e("docs.democratizeSecurity")]})}),f.jsx(Ac,{className:"text-muted-foreground",children:e("docs.democratizeSecurityDesc")})]}),f.jsxs(Nc,{className:"bg-card/50 border-primary/10",children:[f.jsx(_h,{children:f.jsxs(jh,{className:"flex items-center gap-2 text-lg",children:[f.jsx(KT,{className:"w-5 h-5 text-purple-400"}),e("docs.aiFirstApproach")]})}),f.jsx(Ac,{className:"text-muted-foreground",children:e("docs.aiFirstApproachDesc")})]}),f.jsxs(Nc,{className:"bg-card/50 border-primary/10",children:[f.jsx(_h,{children:f.jsxs(jh,{className:"flex items-center gap-2 text-lg",children:[f.jsx(Sc,{className:"w-5 h-5 text-pink-400"}),e("docs.multiChainSupport")]})}),f.jsx(Ac,{className:"text-muted-foreground",children:e("docs.multiChainSupportDesc")})]}),f.jsxs(Nc,{className:"bg-card/50 border-primary/10",children:[f.jsx(_h,{children:f.jsxs(jh,{className:"flex items-center gap-2 text-lg",children:[f.jsx(J8,{className:"w-5 h-5 text-green-400"}),e("docs.communityDriven")]})}),f.jsx(Ac,{className:"text-muted-foreground",children:e("docs.communityDrivenDesc")})]})]})}),f.jsx(eu,{id:"features",title:e("docs.platformFeatures"),icon:f.jsx(Kd,{className:"w-6 h-6"}),children:f.jsxs("div",{className:"space-y-8",children:[f.jsx(nu,{title:e("docs.feature.tokenAnalyzer"),badge:e("docs.feature.tokenAnalyzerBadge"),badgeColor:"bg-purple-500/20 text-purple-400",description:e("docs.feature.tokenAnalyzerDesc"),features:[e("docs.feature.tokenAnalyzer1"),e("docs.feature.tokenAnalyzer2"),e("docs.feature.tokenAnalyzer3"),e("docs.feature.tokenAnalyzer4"),e("docs.feature.tokenAnalyzer5"),e("docs.feature.tokenAnalyzer6")]}),f.jsx(nu,{title:e("docs.feature.tokenGenerator"),badge:e("docs.feature.tokenGeneratorBadge"),badgeColor:"bg-yellow-500/20 text-yellow-400",description:e("docs.feature.tokenGeneratorDesc"),features:[e("docs.feature.tokenGenerator1"),e("docs.feature.tokenGenerator2"),e("docs.feature.tokenGenerator3"),e("docs.feature.tokenGenerator4"),e("docs.feature.tokenGenerator5")]}),f.jsx(nu,{title:e("docs.feature.bundleChecker"),badge:e("docs.feature.bundleCheckerBadge"),badgeColor:"bg-red-500/20 text-red-400",description:e("docs.feature.bundleCheckerDesc"),features:[e("docs.feature.bundleChecker1"),e("docs.feature.bundleChecker2"),e("docs.feature.bundleChecker3"),e("docs.feature.bundleChecker4"),e("docs.feature.bundleChecker5")]}),f.jsx(nu,{title:e("docs.feature.websiteBuilder"),badge:e("docs.feature.websiteBuilderBadge"),badgeColor:"bg-blue-500/20 text-blue-400",description:e("docs.feature.websiteBuilderDesc"),features:[e("docs.feature.websiteBuilder1"),e("docs.feature.websiteBuilder2"),e("docs.feature.websiteBuilder3"),e("docs.feature.websiteBuilder4"),e("docs.feature.websiteBuilder5")]}),f.jsx(nu,{title:e("docs.feature.passwordSecurity"),badge:e("docs.feature.passwordSecurityBadge"),badgeColor:"bg-green-500/20 text-green-400",description:e("docs.feature.passwordSecurityDesc"),features:[e("docs.feature.passwordSecurity1"),e("docs.feature.passwordSecurity2"),e("docs.feature.passwordSecurity3"),e("docs.feature.passwordSecurity4"),e("docs.feature.passwordSecurity5")]}),f.jsx(nu,{title:e("docs.feature.tokenStaking"),badge:e("docs.feature.tokenStakingBadge"),badgeColor:"bg-primary/20 text-primary",description:e("docs.feature.tokenStakingDesc"),features:[e("docs.feature.tokenStaking1"),e("docs.feature.tokenStaking2"),e("docs.feature.tokenStaking3"),e("docs.feature.tokenStaking4")]}),f.jsx(nu,{title:e("docs.feature.tokenSwap"),badge:e("docs.feature.tokenSwapBadge"),badgeColor:"bg-orange-500/20 text-orange-400",description:e("docs.feature.tokenSwapDesc"),features:[e("docs.feature.tokenSwap1"),e("docs.feature.tokenSwap2"),e("docs.feature.tokenSwap3"),e("docs.feature.tokenSwap4")]})]})}),f.jsx(eu,{id:"security",title:e("docs.securityPrivacy"),icon:f.jsx(NN,{className:"w-6 h-6"}),children:f.jsx("div",{className:"bg-card/50 border border-primary/10 rounded-lg p-6",children:f.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[f.jsxs("div",{children:[f.jsx("h4",{className:"font-semibold mb-3 text-foreground",children:e("docs.dataProtection")}),f.jsxs("ul",{className:"space-y-2 text-muted-foreground",children:[f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx(iu,{className:"w-4 h-4 text-green-400 mt-1 shrink-0"}),e("docs.noPersonalData")]}),f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx(iu,{className:"w-4 h-4 text-green-400 mt-1 shrink-0"}),e("docs.walletReadOnly")]}),f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx(iu,{className:"w-4 h-4 text-green-400 mt-1 shrink-0"}),e("docs.explicitApproval")]})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-semibold mb-3 text-foreground",children:e("docs.platformSecurity")}),f.jsxs("ul",{className:"space-y-2 text-muted-foreground",children:[f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx(iu,{className:"w-4 h-4 text-green-400 mt-1 shrink-0"}),e("docs.httpsEncryption")]}),f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx(iu,{className:"w-4 h-4 text-green-400 mt-1 shrink-0"}),e("docs.noPrivateKeys")]}),f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx(iu,{className:"w-4 h-4 text-green-400 mt-1 shrink-0"}),e("docs.regularAudits")]})]})]})]})})}),f.jsx(eu,{id:"roadmap",title:e("docs.roadmap"),icon:f.jsx(yv,{className:"w-6 h-6"}),children:f.jsxs("div",{className:"space-y-6",children:[f.jsx(op,{phase:e("docs.phase1"),title:e("docs.foundation"),status:"completed",statusLabel:e("docs.completed"),items:[e("docs.roadmap.phase1.item1"),e("docs.roadmap.phase1.item2"),e("docs.roadmap.phase1.item3"),e("docs.roadmap.phase1.item4")]}),f.jsx(op,{phase:e("docs.phase2"),title:e("docs.expansion"),status:"in-progress",statusLabel:e("docs.inProgress"),items:[e("docs.roadmap.phase2.item1"),e("docs.roadmap.phase2.item2"),e("docs.roadmap.phase2.item3"),e("docs.roadmap.phase2.item4")]}),f.jsx(op,{phase:e("docs.phase3"),title:e("docs.growth"),status:"upcoming",statusLabel:e("docs.upcoming"),items:[e("docs.roadmap.phase3.item1"),e("docs.roadmap.phase3.item2"),e("docs.roadmap.phase3.item3"),e("docs.roadmap.phase3.item4")]}),f.jsx(op,{phase:e("docs.phase4"),title:e("docs.innovation"),status:"upcoming",statusLabel:e("docs.upcoming"),items:[e("docs.roadmap.phase4.item1"),e("docs.roadmap.phase4.item2"),e("docs.roadmap.phase4.item3"),e("docs.roadmap.phase4.item4")]})]})}),f.jsx(eu,{id:"tokenomics",title:e("docs.tokenomics"),icon:f.jsx(lu,{className:"w-6 h-6"}),children:f.jsx(Nc,{className:"bg-card/50 border-primary/10",children:f.jsxs(Ac,{className:"pt-6",children:[f.jsxs("div",{className:"text-center mb-8",children:[f.jsx("h3",{className:"text-2xl font-bold text-foreground mb-2",children:"$ASTH Token"}),f.jsx("p",{className:"text-muted-foreground",children:e("docs.tokenomicsDesc")})]}),f.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[f.jsxs("div",{className:"text-center p-4 bg-background/50 rounded-lg border border-primary/20",children:[f.jsx("div",{className:"text-2xl font-bold text-primary",children:"1B"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:e("docs.totalSupply")})]}),f.jsxs("div",{className:"text-center p-4 bg-background/50 rounded-lg border border-purple-500/20",children:[f.jsx("div",{className:"text-2xl font-bold text-purple-400",children:"3%"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:e("docs.tax")})]}),f.jsxs("div",{className:"text-center p-4 bg-background/50 rounded-lg border border-yellow-500/20",children:[f.jsx("div",{className:"text-2xl font-bold text-yellow-400",children:"BSC"}),f.jsx("div",{className:"text-sm text-muted-foreground",children:e("docs.network")})]}),f.jsxs("div",{className:"text-center p-4 bg-background/50 rounded-lg border border-green-500/20",children:[f.jsx("div",{className:"text-2xl font-bold text-green-400",children:e("docs.locked")}),f.jsx("div",{className:"text-sm text-muted-foreground",children:e("docs.liquidityStatus")})]})]}),f.jsxs("div",{className:"mt-8 pt-6 border-t border-primary/10",children:[f.jsx("h4",{className:"font-semibold mb-4 text-foreground",children:e("docs.tokenUtilities")}),f.jsxs("div",{className:"grid md:grid-cols-2 gap-4 text-muted-foreground",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:e("docs.utility1")})]}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:e("docs.utility2")})]}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:e("docs.utility3")})]}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:e("docs.utility4")})]}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:e("docs.utility5")})]}),f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:e("docs.utility6")})]})]})]})]})})}),f.jsx(eu,{id:"disclaimer",title:e("docs.disclaimer"),icon:f.jsx(uf,{className:"w-6 h-6"}),children:f.jsxs("div",{className:"bg-yellow-500/10 border border-yellow-500/20 rounded-lg p-6 text-muted-foreground",children:[f.jsxs("p",{className:"mb-4",children:[f.jsx("strong",{className:"text-yellow-400",children:e("docs.disclaimerNotice")})," ",e("docs.disclaimerText1")]}),f.jsx("p",{className:"mb-4",children:e("docs.disclaimerText2")}),f.jsx("p",{children:e("docs.disclaimerText3")})]})}),f.jsxs(Ei.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},className:"text-center pt-12 border-t border-primary/10",children:[f.jsx("h3",{className:"text-2xl font-bold mb-4",children:e("docs.readyToStart")}),f.jsx("p",{className:"text-muted-foreground mb-6",children:e("docs.readyToStartDesc")}),f.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[f.jsx(ou,{href:"/dashboard",children:f.jsxs(We,{size:"lg",className:"gap-2","data-testid":"button-launch-app",children:[f.jsx(j5,{className:"w-4 h-4"}),e("docs.launchApp")]})}),f.jsx(ou,{href:"/",children:f.jsxs(We,{size:"lg",variant:"outline",className:"gap-2","data-testid":"button-back-home-bottom",children:[f.jsx(Wd,{className:"w-4 h-4"}),e("docs.backToHomeBtn")]})})]})]})]})]}),f.jsx("footer",{className:"relative z-10 border-t border-primary/10 mt-16 py-8",children:f.jsx("div",{className:"max-w-6xl mx-auto px-4 text-center text-muted-foreground",children:f.jsxs("p",{children:["© ",new Date().getFullYear()," Astherafi. All rights reserved."]})})})]})}function eu({id:e,title:t,icon:n,children:i}){return f.jsxs(Ei.section,{id:e,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},className:"scroll-mt-24",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[f.jsx("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:n}),f.jsx("h2",{className:"text-2xl md:text-3xl font-display font-bold",children:t})]}),i]})}function nu({title:e,badge:t,badgeColor:n,description:i,features:r}){return f.jsxs(Nc,{className:"bg-card/50 border-primary/10",children:[f.jsxs(_h,{children:[f.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[f.jsx(jh,{className:"text-xl",children:e}),f.jsx(Xp,{className:n,children:t})]}),f.jsx("p",{className:"text-muted-foreground",children:i})]}),f.jsx(Ac,{children:f.jsx("ul",{className:"grid sm:grid-cols-2 gap-2",children:r.map((o,c)=>f.jsxs("li",{className:"flex items-start gap-2 text-muted-foreground",children:[f.jsx(iu,{className:"w-4 h-4 text-primary mt-1 shrink-0"}),f.jsx("span",{children:o})]},c))})})]})}function op({phase:e,title:t,status:n,statusLabel:i,items:r}){const o={completed:"bg-green-500/20 text-green-400 border-green-500/30","in-progress":"bg-primary/20 text-primary border-primary/30",upcoming:"bg-muted text-muted-foreground border-muted"};return f.jsxs("div",{className:"flex gap-4",children:[f.jsxs("div",{className:"flex flex-col items-center",children:[f.jsx("div",{className:`w-4 h-4 rounded-full ${n==="completed"?"bg-green-500":n==="in-progress"?"bg-primary":"bg-muted-foreground/30"}`}),f.jsx("div",{className:"flex-1 w-0.5 bg-primary/20 mt-2"})]}),f.jsxs("div",{className:"flex-1 pb-8",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-wrap",children:[f.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:e}),f.jsx("h4",{className:"font-bold text-lg",children:t}),f.jsx(Xp,{variant:"outline",className:o[n],children:i})]}),f.jsx("ul",{className:"space-y-2",children:r.map((c,u)=>f.jsxs("li",{className:"flex items-center gap-2 text-muted-foreground",children:[f.jsx(Vo,{className:"w-4 h-4 text-primary"}),f.jsx("span",{children:c})]},u))})]})]})}function UH(){return f.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:f.jsx(Nc,{className:"w-full max-w-md mx-4",children:f.jsxs(Ac,{className:"pt-6",children:[f.jsxs("div",{className:"flex mb-4 gap-2",children:[f.jsx(gv,{className:"h-8 w-8 text-red-500"}),f.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),f.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}function qH(){return f.jsxs(yM,{children:[f.jsx(Mm,{path:"/",component:kF}),f.jsx(Mm,{path:"/dashboard",component:OH}),f.jsx(Mm,{path:"/docs",component:IH}),f.jsx(Mm,{component:UH})]})}function VH(){return f.jsx(qM,{client:$M,children:f.jsx(J7,{children:f.jsxs(X7,{children:[f.jsx(Ik,{}),f.jsx(qH,{})]})})})}$E.createRoot(document.getElementById("root")).render(f.jsx(VH,{}));export{In as _,HH as c,_S as g};
