function Ch(e,t){for(var n=0;nr[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ph(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hc={exports:{}},Ni={},Vc={exports:{}},X={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var yo=Symbol.for("react.element"),Ah=Symbol.for("react.portal"),Th=Symbol.for("react.fragment"),Rh=Symbol.for("react.strict_mode"),Oh=Symbol.for("react.profiler"),jh=Symbol.for("react.provider"),Nh=Symbol.for("react.context"),Lh=Symbol.for("react.forward_ref"),Bh=Symbol.for("react.suspense"),Wh=Symbol.for("react.memo"),Ih=Symbol.for("react.lazy"),aa=Symbol.iterator;function Mh(e){return e===null||typeof e!="object"?null:(e=aa&&e[aa]||e["@@iterator"],typeof e=="function"?e:null)}var $c={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qc=Object.assign,Qc={};function mr(e,t,n){this.props=e,this.context=t,this.refs=Qc,this.updater=n||$c}mr.prototype.isReactComponent={};mr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};mr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Kc(){}Kc.prototype=mr.prototype;function $s(e,t,n){this.props=e,this.context=t,this.refs=Qc,this.updater=n||$c}var qs=$s.prototype=new Kc;qs.constructor=$s;qc(qs,mr.prototype);qs.isPureReactComponent=!0;var ca=Array.isArray,Jc=Object.prototype.hasOwnProperty,Qs={current:null},Gc={key:!0,ref:!0,__self:!0,__source:!0};function Xc(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Jc.call(t,r)&&!Gc.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,re=L[Z];if(0>>1;Zo(Rt,O))hto(yn,Rt)?(L[Z]=yn,L[ht]=O,Z=ht):(L[Z]=Rt,L[Ae]=O,Z=Ae);else if(hto(yn,O))L[Z]=yn,L[ht]=O,Z=ht;else break e}}return $}function o(L,$){var O=L.sortIndex-$.sortIndex;return O!==0?O:L.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var u=[],a=[],p=1,m=null,y=3,P=!1,w=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(L){for(var $=n(a);$!==null;){if($.callback===null)r(a);else if($.startTime<=L)r(a),$.sortIndex=$.expirationTime,t(u,$);else break;$=n(a)}}function S(L){if(_=!1,h(L),!w)if(n(u)!==null)w=!0,we(A);else{var $=n(a);$!==null&&qt(S,$.startTime-L)}}function A(L,$){w=!1,_&&(_=!1,g(U),U=-1),P=!0;var O=y;try{for(h($),m=n(u);m!==null&&(!(m.expirationTime>$)||L&&!je());){var Z=m.callback;if(typeof Z=="function"){m.callback=null,y=m.priorityLevel;var re=Z(m.expirationTime<=$);$=e.unstable_now(),typeof re=="function"?m.callback=re:m===n(u)&&r(u),h($)}else r(u);m=n(u)}if(m!==null)var me=!0;else{var Ae=n(a);Ae!==null&&qt(S,Ae.startTime-$),me=!1}return me}finally{m=null,y=O,P=!1}}var j=!1,N=null,U=-1,oe=5,J=-1;function je(){return!(e.unstable_now()-JL||125Z?(L.sortIndex=O,t(a,L),n(u)===null&&L===n(a)&&(_?(g(U),U=-1):_=!0,qt(S,O-Z))):(L.sortIndex=re,t(u,L),w||P||(w=!0,we(A))),L},e.unstable_shouldYield=je,e.unstable_wrapCallback=function(L){var $=y;return function(){var O=y;y=$;try{return L.apply(this,arguments)}finally{y=O}}}})(rf);nf.exports=rf;var Gh=nf.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xh=R,rt=Gh;function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ql=Object.prototype.hasOwnProperty,Yh=/^[: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]*$/,da={},pa={};function Zh(e){return ql.call(pa,e)?!0:ql.call(da,e)?!1:Yh.test(e)?pa[e]=!0:(da[e]=!0,!1)}function em(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tm(e,t,n,r){if(t===null||typeof t>"u"||em(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ue(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Ue(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oe[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var Js=/[\-:]([a-z])/g;function Gs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Js,Gs);Oe[t]=new Ue(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Js,Gs);Oe[t]=new Ue(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Js,Gs);Oe[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xs(e,t,n,r){var o=Oe.hasOwnProperty(t)?Oe[t]:null;(o!==null?o.type!==0:r||!(2s||o[l]!==i[s]){var u=` `+o[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{gl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zr(e):""}function nm(e){switch(e.tag){case 5:return zr(e.type);case 16:return zr("Lazy");case 13:return zr("Suspense");case 19:return zr("SuspenseList");case 0:case 2:case 15:return e=vl(e.type,!1),e;case 11:return e=vl(e.type.render,!1),e;case 1:return e=vl(e.type,!0),e;default:return""}}function Gl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vn:return"Fragment";case Hn:return"Portal";case Ql:return"Profiler";case Ys:return"StrictMode";case Kl:return"Suspense";case Jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sf:return(e.displayName||"Context")+".Consumer";case lf:return(e._context.displayName||"Context")+".Provider";case Zs:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eu:return t=e.displayName||null,t!==null?t:Gl(e.type)||"Memo";case Xt:t=e._payload,e=e._init;try{return Gl(e(t))}catch{}}return null}function rm(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gl(t);case 8:return t===Ys?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function pn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function af(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function om(e){var t=af(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Oo(e){e._valueTracker||(e._valueTracker=om(e))}function cf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=af(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ui(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xl(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ma(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ff(e,t){t=t.checked,t!=null&&Xs(e,"checked",t,!1)}function Yl(e,t){ff(e,t);var n=pn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zl(e,t.type,pn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ga(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Zl(e,t,n){(t!=="number"||ui(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Fr=Array.isArray;function tr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=jo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Zr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Hr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},im=["Webkit","ms","Moz","O"];Object.keys(Hr).forEach(function(e){im.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Hr[t]=Hr[e]})});function mf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Hr.hasOwnProperty(e)&&Hr[e]?(""+t).trim():t+"px"}function gf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var lm=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ns(e,t){if(t){if(lm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function rs(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 os=null;function tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var is=null,nr=null,rr=null;function wa(e){if(e=So(e)){if(typeof is!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Mi(t),is(e.stateNode,e.type,t))}}function vf(e){nr?rr?rr.push(e):rr=[e]:nr=e}function yf(){if(nr){var e=nr,t=rr;if(rr=nr=null,wa(e),t)for(e=0;e>>=0,e===0?32:31-(vm(e)/ym|0)|0}var No=64,Lo=4194304;function Ur(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function di(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ur(s):(i&=l,i!==0&&(r=Ur(i)))}else l=n&~o,l!==0?r=Ur(l):i!==0&&(r=Ur(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function wo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function xm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=$r),Aa=" ",Ta=!1;function Mf(e,t){switch(e){case"keyup":return Gm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $n=!1;function Ym(e,t){switch(e){case"compositionend":return zf(t);case"keypress":return t.which!==32?null:(Ta=!0,Aa);case"textInput":return e=t.data,e===Aa&&Ta?null:e;default:return null}}function Zm(e,t){if($n)return e==="compositionend"||!au&&Mf(e,t)?(e=Wf(),Go=lu=tn=null,$n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Na(n)}}function Hf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vf(){for(var e=window,t=ui();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ui(e.document)}return t}function cu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ug(e){var t=Vf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hf(n.ownerDocument.documentElement,n)){if(r!==null&&cu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=La(n,i);var l=La(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,qn=null,fs=null,Qr=null,ds=!1;function Ba(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ds||qn==null||qn!==ui(r)||(r=qn,"selectionStart"in r&&cu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Qr&&io(Qr,r)||(Qr=r,r=mi(fs,"onSelect"),0Jn||(e.current=ys[Jn],ys[Jn]=null,Jn--)}function se(e,t){Jn++,ys[Jn]=e.current,e.current=t}var hn={},Ie=gn(hn),Ve=gn(!1),Rn=hn;function ur(e,t){var n=e.type.contextTypes;if(!n)return hn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function $e(e){return e=e.childContextTypes,e!=null}function vi(){ae(Ve),ae(Ie)}function Da(e,t,n){if(Ie.current!==hn)throw Error(T(168));se(Ie,t),se(Ve,n)}function Zf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(T(108,rm(e)||"Unknown",o));return pe({},n,r)}function yi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hn,Rn=Ie.current,se(Ie,e),se(Ve,Ve.current),!0}function Ha(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=Zf(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ae(Ve),ae(Ie),se(Ie,e)):ae(Ve),se(Ve,n)}var It=null,zi=!1,Ol=!1;function ed(e){It===null?It=[e]:It.push(e)}function _g(e){zi=!0,ed(e)}function vn(){if(!Ol&&It!==null){Ol=!0;var e=0,t=ie;try{var n=It;for(ie=1;e>=l,o-=l,Mt=1<<32-wt(t)+o|n<U?(oe=N,N=null):oe=N.sibling;var J=y(g,N,h[U],S);if(J===null){N===null&&(N=oe);break}e&&N&&J.alternate===null&&t(g,N),f=i(J,f,U),j===null?A=J:j.sibling=J,j=J,N=oe}if(U===h.length)return n(g,N),ce&&_n(g,U),A;if(N===null){for(;UU?(oe=N,N=null):oe=N.sibling;var je=y(g,N,J.value,S);if(je===null){N===null&&(N=oe);break}e&&N&&je.alternate===null&&t(g,N),f=i(je,f,U),j===null?A=je:j.sibling=je,j=je,N=oe}if(J.done)return n(g,N),ce&&_n(g,U),A;if(N===null){for(;!J.done;U++,J=h.next())J=m(g,J.value,S),J!==null&&(f=i(J,f,U),j===null?A=J:j.sibling=J,j=J);return ce&&_n(g,U),A}for(N=r(g,N);!J.done;U++,J=h.next())J=P(N,g,U,J.value,S),J!==null&&(e&&J.alternate!==null&&N.delete(J.key===null?U:J.key),f=i(J,f,U),j===null?A=J:j.sibling=J,j=J);return e&&N.forEach(function(Je){return t(g,Je)}),ce&&_n(g,U),A}function x(g,f,h,S){if(typeof h=="object"&&h!==null&&h.type===Vn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ro:e:{for(var A=h.key,j=f;j!==null;){if(j.key===A){if(A=h.type,A===Vn){if(j.tag===7){n(g,j.sibling),f=o(j,h.props.children),f.return=g,g=f;break e}}else if(j.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Xt&&qa(A)===j.type){n(g,j.sibling),f=o(j,h.props),f.ref=Br(g,j,h),f.return=g,g=f;break e}n(g,j);break}else t(g,j);j=j.sibling}h.type===Vn?(f=Pn(h.props.children,g.mode,S,h.key),f.return=g,g=f):(S=oi(h.type,h.key,h.props,null,g.mode,S),S.ref=Br(g,f,h),S.return=g,g=S)}return l(g);case Hn:e:{for(j=h.key;f!==null;){if(f.key===j)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(g,f.sibling),f=o(f,h.children||[]),f.return=g,g=f;break e}else{n(g,f);break}else t(g,f);f=f.sibling}f=zl(h,g.mode,S),f.return=g,g=f}return l(g);case Xt:return j=h._init,x(g,f,j(h._payload),S)}if(Fr(h))return w(g,f,h,S);if(Rr(h))return _(g,f,h,S);Uo(g,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(n(g,f.sibling),f=o(f,h),f.return=g,g=f):(n(g,f),f=Ml(h,g.mode,S),f.return=g,g=f),l(g)):n(g,f)}return x}var cr=od(!0),id=od(!1),Si=gn(null),xi=null,Yn=null,hu=null;function mu(){hu=Yn=xi=null}function gu(e){var t=Si.current;ae(Si),e._currentValue=t}function Ss(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ir(e,t){xi=e,hu=Yn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function dt(e){var t=e._currentValue;if(hu!==e)if(e={context:e,memoizedValue:t,next:null},Yn===null){if(xi===null)throw Error(T(308));Yn=e,xi.dependencies={lanes:0,firstContext:e}}else Yn=Yn.next=e;return t}var En=null;function vu(e){En===null?En=[e]:En.push(e)}function ld(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,vu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ht(e,r)}function Ht(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Yt=!1;function yu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ft(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function an(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ht(e,n)}return o=r.interleaved,o===null?(t.next=t,vu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ht(e,n)}function Yo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ru(e,n)}}function Qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ei(e,t,n,r){var o=e.updateQueue;Yt=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var u=s,a=u.next;u.next=null,l===null?i=a:l.next=a,l=u;var p=e.alternate;p!==null&&(p=p.updateQueue,s=p.lastBaseUpdate,s!==l&&(s===null?p.firstBaseUpdate=a:s.next=a,p.lastBaseUpdate=u))}if(i!==null){var m=o.baseState;l=0,p=a=u=null,s=i;do{var y=s.lane,P=s.eventTime;if((r&y)===y){p!==null&&(p=p.next={eventTime:P,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var w=e,_=s;switch(y=t,P=n,_.tag){case 1:if(w=_.payload,typeof w=="function"){m=w.call(P,m,y);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=_.payload,y=typeof w=="function"?w.call(P,m,y):w,y==null)break e;m=pe({},m,y);break e;case 2:Yt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,y=o.effects,y===null?o.effects=[s]:y.push(s))}else P={eventTime:P,lane:y,tag:s.tag,payload:s.payload,callback:s.callback,next:null},p===null?(a=p=P,u=m):p=p.next=P,l|=y;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;y=s,s=y.next,y.next=null,o.lastBaseUpdate=y,o.shared.pending=null}}while(!0);if(p===null&&(u=m),o.baseState=u,o.firstBaseUpdate=a,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Nn|=l,e.lanes=l,e.memoizedState=m}}function Ka(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Nl.transition;Nl.transition={};try{e(!1),t()}finally{ie=n,Nl.transition=r}}function kd(){return pt().memoizedState}function kg(e,t,n){var r=fn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bd(e))Cd(t,n);else if(n=ld(e,t,n,r),n!==null){var o=ze();_t(n,e,r,o),Pd(n,t,r)}}function bg(e,t,n){var r=fn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bd(e))Cd(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,xt(s,l)){var u=t.interleaved;u===null?(o.next=o,vu(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=ld(e,t,o,r),n!==null&&(o=ze(),_t(n,e,r,o),Pd(n,t,r))}}function bd(e){var t=e.alternate;return e===de||t!==null&&t===de}function Cd(e,t){Kr=bi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ru(e,n)}}var Ci={readContext:dt,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},Cg={readContext:dt,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:dt,useEffect:Ga,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ei(4194308,4,wd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ei(4194308,4,e,t)},useInsertionEffect:function(e,t){return ei(4,2,e,t)},useMemo:function(e,t){var n=Ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ct();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=kg.bind(null,de,e),[r.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:Ja,useDebugValue:Cu,useDeferredValue:function(e){return Ct().memoizedState=e},useTransition:function(){var e=Ja(!1),t=e[0];return e=Eg.bind(null,e[1]),Ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=de,o=Ct();if(ce){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),Pe===null)throw Error(T(349));jn&30||fd(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ga(pd.bind(null,r,i,e),[e]),r.flags|=2048,ho(9,dd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ct(),t=Pe.identifierPrefix;if(ce){var n=zt,r=Mt;n=(r&~(1<<32-wt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=fo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Pt]=t,e[uo]=r,Id(e,t,!1,!1),t.stateNode=e;e:{switch(l=rs(n,r),n){case"dialog":ue("cancel",e),ue("close",e),o=r;break;case"iframe":case"object":case"embed":ue("load",e),o=r;break;case"video":case"audio":for(o=0;opr&&(t.flags|=128,r=!0,Wr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ki(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Wr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!ce)return Le(t),null}else 2*ve()-i.renderingStartTime>pr&&n!==1073741824&&(t.flags|=128,r=!0,Wr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ve(),t.sibling=null,n=fe.current,se(fe,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Lg(e,t){switch(du(t),t.tag){case 1:return $e(t.type)&&vi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fr(),ae(Ve),ae(Ie),Su(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _u(t),null;case 13:if(ae(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(fe),null;case 4:return fr(),null;case 10:return gu(t.type._context),null;case 22:case 23:return ju(),null;case 24:return null;default:return null}}var Ho=!1,Be=!1,Bg=typeof WeakSet=="function"?WeakSet:Set,M=null;function Zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function Rs(e,t,n){try{n()}catch(r){he(e,t,r)}}var sc=!1;function Wg(e,t){if(ps=pi,e=Vf(),cu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,u=-1,a=0,p=0,m=e,y=null;t:for(;;){for(var P;m!==n||o!==0&&m.nodeType!==3||(s=l+o),m!==i||r!==0&&m.nodeType!==3||(u=l+r),m.nodeType===3&&(l+=m.nodeValue.length),(P=m.firstChild)!==null;)y=m,m=P;for(;;){if(m===e)break t;if(y===n&&++a===o&&(s=l),y===i&&++p===r&&(u=l),(P=m.nextSibling)!==null)break;m=y,y=m.parentNode}m=P}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(hs={focusedElem:e,selectionRange:n},pi=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var _=w.memoizedProps,x=w.memoizedState,g=t.stateNode,f=g.getSnapshotBeforeUpdate(t.elementType===t.type?_:gt(t.type,_),x);g.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){he(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=sc,sc=!1,w}function Jr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Rs(t,n,i)}o=o.next}while(o!==r)}}function Di(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Os(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fd(e){var t=e.alternate;t!==null&&(e.alternate=null,Fd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pt],delete t[uo],delete t[vs],delete t[yg],delete t[wg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ud(e){return e.tag===5||e.tag===3||e.tag===4}function uc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ud(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function js(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gi));else if(r!==4&&(e=e.child,e!==null))for(js(e,t,n),e=e.sibling;e!==null;)js(e,t,n),e=e.sibling}function Ns(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ns(e,t,n),e=e.sibling;e!==null;)Ns(e,t,n),e=e.sibling}var Te=null,vt=!1;function Gt(e,t,n){for(n=n.child;n!==null;)Dd(e,t,n),n=n.sibling}function Dd(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Li,n)}catch{}switch(n.tag){case 5:Be||Zn(n,t);case 6:var r=Te,o=vt;Te=null,Gt(e,t,n),Te=r,vt=o,Te!==null&&(vt?(e=Te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Te.removeChild(n.stateNode));break;case 18:Te!==null&&(vt?(e=Te,n=n.stateNode,e.nodeType===8?Rl(e.parentNode,n):e.nodeType===1&&Rl(e,n),ro(e)):Rl(Te,n.stateNode));break;case 4:r=Te,o=vt,Te=n.stateNode.containerInfo,vt=!0,Gt(e,t,n),Te=r,vt=o;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Rs(n,t,l),o=o.next}while(o!==r)}Gt(e,t,n);break;case 1:if(!Be&&(Zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){he(n,t,s)}Gt(e,t,n);break;case 21:Gt(e,t,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,Gt(e,t,n),Be=r):Gt(e,t,n);break;default:Gt(e,t,n)}}function ac(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Bg),t.forEach(function(r){var o=$g.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=l),r&=~i}if(r=o,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Mg(r/1960))-r,10e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Ti=0,ne&6)throw Error(T(331));var o=ne;for(ne|=4,M=e.current;M!==null;){var i=M,l=i.child;if(M.flags&16){var s=i.deletions;if(s!==null){for(var u=0;uve()-Ru?Cn(e,0):Tu|=n),qe(e,t)}function Gd(e,t){t===0&&(e.mode&1?(t=Lo,Lo<<=1,!(Lo&130023424)&&(Lo=4194304)):t=1);var n=ze();e=Ht(e,t),e!==null&&(wo(e,t,n),qe(e,n))}function Vg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gd(e,n)}function $g(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Gd(e,n)}var Xd;Xd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ve.current)He=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return He=!1,jg(e,t,n);He=!!(e.flags&131072)}else He=!1,ce&&t.flags&1048576&&td(t,_i,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ti(e,t),e=t.pendingProps;var o=ur(t,Ie.current);ir(t,n),o=Eu(null,t,r,e,o,n);var i=ku();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$e(r)?(i=!0,yi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,yu(t),o.updater=Ui,t.stateNode=o,o._reactInternals=t,Es(t,r,e,n),t=Cs(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&fu(t),Me(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ti(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Qg(r),e=gt(r,e),o){case 0:t=bs(null,t,r,e,n);break e;case 1:t=oc(null,t,r,e,n);break e;case 11:t=nc(null,t,r,e,n);break e;case 14:t=rc(null,t,r,gt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),bs(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),oc(e,t,r,o,n);case 3:e:{if(Ld(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,o=i.element,sd(e,t),Ei(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=dr(Error(T(423)),t),t=ic(e,t,r,n,o);break e}else if(r!==o){o=dr(Error(T(424)),t),t=ic(e,t,r,n,o);break e}else for(et=un(t.stateNode.containerInfo.firstChild),tt=t,ce=!0,yt=null,n=id(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ar(),r===o){t=Vt(e,t,n);break e}Me(e,t,r,n)}t=t.child}return t;case 5:return ud(t),e===null&&_s(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,ms(r,o)?l=null:i!==null&&ms(r,i)&&(t.flags|=32),Nd(e,t),Me(e,t,l,n),t.child;case 6:return e===null&&_s(t),null;case 13:return Bd(e,t,n);case 4:return wu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=cr(t,null,r,n):Me(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),nc(e,t,r,o,n);case 7:return Me(e,t,t.pendingProps,n),t.child;case 8:return Me(e,t,t.pendingProps.children,n),t.child;case 12:return Me(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,se(Si,r._currentValue),r._currentValue=l,i!==null)if(xt(i.value,l)){if(i.children===o.children&&!Ve.current){t=Vt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Ft(-1,n&-n),u.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var p=a.pending;p===null?u.next=u:(u.next=p.next,p.next=u),a.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ss(i.return,n,t),s.lanes|=n;break}u=u.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(T(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Ss(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Me(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ir(t,n),o=dt(o),r=r(o),t.flags|=1,Me(e,t,r,n),t.child;case 14:return r=t.type,o=gt(r,t.pendingProps),o=gt(r.type,o),rc(e,t,r,o,n);case 15:return Od(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gt(r,o),ti(e,t),t.tag=1,$e(r)?(e=!0,yi(t)):e=!1,ir(t,n),Ad(t,r,o),Es(t,r,o,n),Cs(null,t,r,!0,e,n);case 19:return Wd(e,t,n);case 22:return jd(e,t,n)}throw Error(T(156,t.tag))};function Yd(e,t){return bf(e,t)}function qg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new qg(e,t,n,r)}function Lu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qg(e){if(typeof e=="function")return Lu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zs)return 11;if(e===eu)return 14}return 2}function dn(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function oi(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")Lu(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Vn:return Pn(n.children,o,i,t);case Ys:l=8,o|=8;break;case Ql:return e=ct(12,n,t,o|2),e.elementType=Ql,e.lanes=i,e;case Kl:return e=ct(13,n,t,o),e.elementType=Kl,e.lanes=i,e;case Jl:return e=ct(19,n,t,o),e.elementType=Jl,e.lanes=i,e;case uf:return Vi(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lf:l=10;break e;case sf:l=9;break e;case Zs:l=11;break e;case eu:l=14;break e;case Xt:l=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=ct(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Pn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Vi(e,t,n,r){return e=ct(22,e,r,t),e.elementType=uf,e.lanes=n,e.stateNode={isHidden:!1},e}function Ml(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function zl(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kg(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wl(0),this.expirationTimes=wl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bu(e,t,n,r,o,i,l,s,u){return e=new Kg(e,t,n,s,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yu(i),e}function Jg(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(np)}catch(e){console.error(e)}}np(),tf.exports=ot;var ev=tf.exports,vc=ev;$l.createRoot=vc.createRoot,$l.hydrateRoot=vc.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nv(){return Math.random().toString(36).substr(2,8)}function wc(e,t){return{usr:e.state,key:e.key,idx:t}}function Ms(e,t,n,r){return n===void 0&&(n=null),go({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?yr(t):t,{state:n,key:t&&t.key||r||nv()})}function rp(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function yr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function rv(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s=rn.Pop,u=null,a=p();a==null&&(a=0,l.replaceState(go({},l.state,{idx:a}),""));function p(){return(l.state||{idx:null}).idx}function m(){s=rn.Pop;let x=p(),g=x==null?null:x-a;a=x,u&&u({action:s,location:_.location,delta:g})}function y(x,g){s=rn.Push;let f=Ms(_.location,x,g);a=p()+1;let h=wc(f,a),S=_.createHref(f);try{l.pushState(h,"",S)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;o.location.assign(S)}i&&u&&u({action:s,location:_.location,delta:1})}function P(x,g){s=rn.Replace;let f=Ms(_.location,x,g);a=p();let h=wc(f,a),S=_.createHref(f);l.replaceState(h,"",S),i&&u&&u({action:s,location:_.location,delta:0})}function w(x){let g=o.location.origin!=="null"?o.location.origin:o.location.href,f=typeof x=="string"?x:rp(x);return f=f.replace(/ $/,"%20"),be(g,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,g)}let _={get action(){return s},get location(){return e(o,l)},listen(x){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(yc,m),u=x,()=>{o.removeEventListener(yc,m),u=null}},createHref(x){return t(o,x)},createURL:w,encodeLocation(x){let g=w(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:y,replace:P,go(x){return l.go(x)}};return _}var _c;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(_c||(_c={}));function ov(e,t,n){return n===void 0&&(n="/"),iv(e,t,n)}function iv(e,t,n,r){let o=typeof t=="string"?yr(t):t,i=lp(o.pathname||"/",n);if(i==null)return null;let l=op(e);lv(l);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};u.relativePath.startsWith("/")&&(be(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=An([r,u.relativePath]),p=n.concat(u);i.children&&i.children.length>0&&(be(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),op(i.children,t,p,a)),!(i.path==null&&!i.index)&&t.push({path:a,score:pv(a,i.index),routesMeta:p})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let u of ip(i.path))o(i,l,u)}),t}function ip(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=ip(r.join("/")),s=[];return s.push(...l.map(u=>u===""?i:[i,u].join("/"))),o&&s.push(...l),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function lv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sv=/^:[\w-]+$/,uv=3,av=2,cv=1,fv=10,dv=-2,Sc=e=>e==="*";function pv(e,t){let n=e.split("/"),r=n.length;return n.some(Sc)&&(r+=dv),t&&(r+=av),n.filter(o=>!Sc(o)).reduce((o,i)=>o+(sv.test(i)?uv:i===""?cv:fv),r)}function hv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function mv(e,t,n){let{routesMeta:r}=e,o={},i="/",l=[];for(let s=0;s{let{paramName:y,isOptional:P}=p;if(y==="*"){let _=s[m]||"";l=i.slice(0,i.length-_.length).replace(/(.)\/+$/,"$1")}const w=s[m];return P&&!w?a[y]=void 0:a[y]=(w||"").replace(/%2F/g,"/"),a},{}),pathname:i,pathnameBase:l,pattern:e}}function vv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function yv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function lp(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const wv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_v=e=>wv.test(e);function Sv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?yr(e):e,i;if(n)if(_v(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),zu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?i=xc(n.substring(1),"/"):i=xc(n,t)}else i=t;return{pathname:i,search:Cv(r),hash:Pv(o)}}function xc(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Fl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function xv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ev(e,t){let n=xv(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function kv(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=yr(e):(o=go({},e),be(!o.pathname||!o.pathname.includes("?"),Fl("?","pathname","search",o)),be(!o.pathname||!o.pathname.includes("#"),Fl("#","pathname","hash",o)),be(!o.search||!o.search.includes("#"),Fl("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(l==null)s=n;else{let m=t.length-1;if(!r&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),m-=1;o.pathname=y.join("/")}s=m>=0?t[m]:"/"}let u=Sv(o,s),a=l&&l!=="/"&&l.endsWith("/"),p=(i||l===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||p)&&(u.pathname+="/"),u}const An=e=>e.join("/").replace(/\/\/+/g,"/"),bv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Pv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Av(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const sp=["post","put","patch","delete"];new Set(sp);const Tv=["get",...sp];new Set(Tv);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),R.useCallback(function(a,p){if(p===void 0&&(p={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let m=kv(a,JSON.parse(l),i,p.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:An([t,m.pathname])),(p.replace?r.replace:r.push)(m,p.state,p)},[t,r,l,i,e])}function jv(){let{matches:e}=R.useContext(Mn),t=e[e.length-1];return t?t.params:{}}function Nv(e,t){return Lv(e,t)}function Lv(e,t,n,r){Xi()||be(!1);let{navigator:o}=R.useContext(Ji),{matches:i}=R.useContext(Mn),l=i[i.length-1],s=l?l.params:{};l&&l.pathname;let u=l?l.pathnameBase:"/";l&&l.route;let a=Uu(),p;if(t){var m;let x=typeof t=="string"?yr(t):t;u==="/"||(m=x.pathname)!=null&&m.startsWith(u)||be(!1),p=x}else p=a;let y=p.pathname||"/",P=y;if(u!=="/"){let x=u.replace(/^\//,"").split("/");P="/"+y.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=ov(e,{pathname:P}),_=zv(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:An([u,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:An([u,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&_?R.createElement(Gi.Provider,{value:{location:vo({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:rn.Pop}},_):_}function Bv(){let e=Hv(),t=Av(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:o},n):null,null)}const Wv=R.createElement(Bv,null);class Iv extends R.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?R.createElement(Mn.Provider,{value:this.props.routeContext},R.createElement(up.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Mv(e){let{routeContext:t,match:n,children:r}=e,o=R.useContext(Fu);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(Mn.Provider,{value:t},r)}function zv(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let p=l.findIndex(m=>m.route.id&&(s==null?void 0:s[m.route.id])!==void 0);p>=0||be(!1),l=l.slice(0,Math.min(l.length,p+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p=0?l=l.slice(0,a+1):l=[l[0]];break}}}return l.reduceRight((p,m,y)=>{let P,w=!1,_=null,x=null;n&&(P=s&&m.route.id?s[m.route.id]:void 0,_=m.route.errorElement||Wv,u&&(a<0&&y===0?($v("route-fallback"),w=!0,x=null):a===y&&(w=!0,x=m.route.hydrateFallbackElement||null)));let g=t.concat(l.slice(0,y+1)),f=()=>{let h;return P?h=_:w?h=x:m.route.Component?h=R.createElement(m.route.Component,null):m.route.element?h=m.route.element:h=p,R.createElement(Mv,{match:m,routeContext:{outlet:p,matches:g,isDataRoute:n!=null},children:h})};return n&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?R.createElement(Iv,{location:n.location,revalidation:n.revalidation,component:_,error:P,children:f(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):f()},null)}var cp=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(cp||{}),fp=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fp||{});function Fv(e){let t=R.useContext(Fu);return t||be(!1),t}function Uv(e){let t=R.useContext(Rv);return t||be(!1),t}function Dv(e){let t=R.useContext(Mn);return t||be(!1),t}function dp(e){let t=Dv(),n=t.matches[t.matches.length-1];return n.route.id||be(!1),n.route.id}function Hv(){var e;let t=R.useContext(up),n=Uv(),r=dp();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Vv(){let{router:e}=Fv(cp.UseNavigateStable),t=dp(fp.UseNavigateStable),n=R.useRef(!1);return ap(()=>{n.current=!0}),R.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,vo({fromRouteId:t},i)))},[e,t])}const Ec={};function $v(e,t,n){Ec[e]||(Ec[e]=!0)}function qv(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Bt(e){be(!1)}function Qv(e){let{basename:t="/",children:n=null,location:r,navigationType:o=rn.Pop,navigator:i,static:l=!1,future:s}=e;Xi()&&be(!1);let u=t.replace(/^\/*/,"/"),a=R.useMemo(()=>({basename:u,navigator:i,static:l,future:vo({v7_relativeSplatPath:!1},s)}),[u,s,i,l]);typeof r=="string"&&(r=yr(r));let{pathname:p="/",search:m="",hash:y="",state:P=null,key:w="default"}=r,_=R.useMemo(()=>{let x=lp(p,u);return x==null?null:{location:{pathname:x,search:m,hash:y,state:P,key:w},navigationType:o}},[u,p,m,y,P,w,o]);return _==null?null:R.createElement(Ji.Provider,{value:a},R.createElement(Gi.Provider,{children:n,value:_}))}function Kv(e){let{children:t,location:n}=e;return Nv(zs(t),n)}new Promise(()=>{});function zs(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,o)=>{if(!R.isValidElement(r))return;let i=[...t,o];if(r.type===R.Fragment){n.push.apply(n,zs(r.props.children,i));return}r.type!==Bt&&be(!1),!r.props.index||!r.props.children||be(!1);let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=zs(r.props.children,i)),n.push(l)}),n}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Fs(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function Jv(e,t){let n=Fs(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}const Gv="6";try{window.__reactRouterVersion=Gv}catch{}const Xv="startTransition",kc=Hh[Xv];function Yv(e){let{basename:t,children:n,future:r,window:o}=e,i=R.useRef();i.current==null&&(i.current=tv({window:o,v5Compat:!0}));let l=i.current,[s,u]=R.useState({action:l.action,location:l.location}),{v7_startTransition:a}=r||{},p=R.useCallback(m=>{a&&kc?kc(()=>u(m)):u(m)},[u,a]);return R.useLayoutEffect(()=>l.listen(p),[l,p]),R.useEffect(()=>qv(r),[r]),R.createElement(Qv,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:l,future:r})}var bc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(bc||(bc={}));var Cc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Cc||(Cc={}));function Zv(e){let t=R.useRef(Fs(e)),n=R.useRef(!1),r=Uu(),o=R.useMemo(()=>Jv(r.search,n.current?null:t.current),[r.search]),i=Eo(),l=R.useCallback((s,u)=>{const a=Fs(typeof s=="function"?s(o):s);n.current=!0,i("?"+a,u)},[i,o]);return[o,l]}function pp(){var t;const e=window;return((t=e==null?void 0:e.Telegram)==null?void 0:t.WebApp)??null}function ey(){var t;const e=pp();(t=e==null?void 0:e.ready)==null||t.call(e)}function ty(){var t;const e=pp();(t=e==null?void 0:e.expand)==null||t.call(e)}var hp={},Yi={};(function(){var e={},t="";try{t=location.hash.toString()}catch{}var n=u(t),r=g("initParams");if(r)for(var o in r)typeof n[o]>"u"&&(n[o]=r[o]);x("initParams",n);var i=!1,l;try{if(i=window.parent!=null&&window!=window.parent,i){window.addEventListener("message",function(f){if(f.source===window.parent){try{var h=JSON.parse(f.data)}catch{return}if(!(!h||!h.eventType))if(h.eventType=="set_custom_style")f.origin==="https://web.telegram.org"&&(l.innerHTML=h.eventData);else if(h.eventType=="reload_iframe"){try{window.parent.postMessage(JSON.stringify({eventType:"iframe_will_reload"}),"*")}catch{}location.reload()}else y(h.eventType,h.eventData)}}),l=document.createElement("style"),document.head.appendChild(l);try{window.parent.postMessage(JSON.stringify({eventType:"iframe_ready",eventData:{reload_supported:!0}}),"*")}catch{}}}catch{}function s(f){try{return f=f.replace(/\+/g,"%20"),decodeURIComponent(f)}catch{return f}}function u(f){f=f.replace(/^#/,"");var h={};if(!f.length)return h;if(f.indexOf("=")<0&&f.indexOf("?")<0)return h._path=s(f),h;var S=f.indexOf("?");if(S>=0){var A=f.substr(0,S);h._path=s(A),f=f.substr(S+1)}var j=a(f);for(var N in j)h[N]=j[N];return h}function a(f){var h={};if(!f.length)return h;var S=f.split("&"),A,j,N,U;for(A=0;A=0?f+"&"+h:A.length>0?f+"?"+h:f+h}function m(f,h,S){if(h||(h=function(){}),S===void 0&&(S=""),console.log("[Telegram.WebView] > postEvent",f,S),window.TelegramWebviewProxy!==void 0)TelegramWebviewProxy.postEvent(f,JSON.stringify(S)),h();else if(window.external&&"notify"in window.external)window.external.notify(JSON.stringify({eventType:f,eventData:S})),h();else if(i)try{var A="https://web.telegram.org";A="*",window.parent.postMessage(JSON.stringify({eventType:f,eventData:S}),A),h()}catch(j){h(j)}else h({notAvailable:!0})}function y(f,h){console.log("[Telegram.WebView] < receiveEvent",f,h),P(f,function(S){S(f,h)})}function P(f,h){var S=e[f];if(!(S===void 0||!S.length))for(var A=0;A0){for(var E=0;EB?1:-1;return 0}function K(c){return nh(a,c)>=0}function rh(c){if(window.Blob)try{return new Blob([c]).size}catch{}for(var d=c.length,v=c.length-1;v>=0;v--){var E=c.charCodeAt(v);E>127&&E<=2047?d++:E>2047&&E<=65535&&(d+=2),E>=56320&&E<=57343&&v--}return d}var oh=function(){var c=!1,d={};Object.defineProperty(d,"isVisible",{set:function(V){ee({is_visible:V})},get:function(){return c},enumerable:!0});var v=null;t.onEvent("back_button_pressed",E);function E(){O("backButtonClicked")}function C(){return{is_visible:c}}function B(V){return typeof V>"u"&&(V=C()),JSON.stringify(V)}function D(){return K("6.1")?!0:(console.warn("[Telegram.WebApp] BackButton is not supported in version "+a),!1)}function z(){var V=C(),Y=B(V);v!==Y&&(v=Y,t.postEvent("web_app_setup_back_button",!1,V))}function ee(V){return D()&&(typeof V.is_visible<"u"&&(c=!!V.is_visible),z()),d}return d.onClick=function(V){return D()&&Z("backButtonClicked",V),d},d.offClick=function(V){return D()&&re("backButtonClicked",V),d},d.show=function(){return ee({is_visible:!0})},d.hide=function(){return ee({is_visible:!1})},d}(),lt=null,fl={},Ye=0;if(n.tgWebAppDebug){lt=document.createElement("tg-bottom-bar");var Zu={display:"flex",gap:"7px",font:"600 14px/18px sans-serif",width:"100%",background:br(),position:"fixed",left:"0",right:"0",bottom:"0",margin:"0",padding:"7px",textAlign:"center",boxSizing:"border-box",zIndex:"10000"};for(var ea in Zu)lt.style[ea]=Zu[ea];document.addEventListener("DOMContentLoaded",function c(d){document.removeEventListener("DOMContentLoaded",c),document.body.appendChild(lt)});var ta=document.createElement("style");ta.innerHTML='tg-bottom-button.shine { position: relative; overflow: hidden; } tg-bottom-button.shine:before { content:""; position: absolute; top: 0; width: 100%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .2), transparent); animation: tg-bottom-button-shine 5s ease-in-out infinite; } @-webkit-keyframes tg-bottom-button-shine { 0% {left: -100%;} 12%,100% {left: 100%}} @keyframes tg-bottom-button-shine { 0% {left: -100%;} 12%,100% {left: 100%}}',lt.appendChild(ta)}function na(){var c=fl.main._bottomButton,d=fl.secondary._bottomButton;c.isVisible||d.isVisible?(lt.style.display="flex",Ye=58,c.isVisible&&d.isVisible&&(d.position=="top"?(lt.style.flexDirection="column-reverse",Ye+=51):d.position=="bottom"?(lt.style.flexDirection="column",Ye+=51):d.position=="left"?lt.style.flexDirection="row-reverse":d.position=="right"&&(lt.style.flexDirection="row"))):(lt.style.display="none",Ye=0),lt.style.background=br(),document.documentElement&&(document.documentElement.style.boxSizing="border-box",document.documentElement.style.paddingBottom=Ye+"px"),ol()}var ra=function(c){var d=c=="main";if(d)var v="web_app_setup_main_button",E="main_button_pressed",C="mainButtonClicked",B="Continue",D=function(){return s.button_color||"#2481cc"},z=function(){return s.button_text_color||"#ffffff"};else var v="web_app_setup_secondary_button",E="secondary_button_pressed",C="secondaryButtonClicked",B="Cancel",D=function(){return br()},z=function(){return s.button_color||"#2481cc"};var ee=!1,V=!0,Y=!1,le=!1,G=c,W=B,F=!1,q=!1,_e="left",H={};Object.defineProperty(H,"type",{get:function(){return G},enumerable:!0}),Object.defineProperty(H,"text",{set:function(I){H.setParams({text:I})},get:function(){return W},enumerable:!0}),Object.defineProperty(H,"color",{set:function(I){H.setParams({color:I})},get:function(){return F||D()},enumerable:!0}),Object.defineProperty(H,"textColor",{set:function(I){H.setParams({text_color:I})},get:function(){return q||z()},enumerable:!0}),Object.defineProperty(H,"isVisible",{set:function(I){H.setParams({is_visible:I})},get:function(){return ee},enumerable:!0}),Object.defineProperty(H,"isProgressVisible",{get:function(){return le},enumerable:!0}),Object.defineProperty(H,"isActive",{set:function(I){H.setParams({is_active:I})},get:function(){return V},enumerable:!0}),Object.defineProperty(H,"hasShineEffect",{set:function(I){H.setParams({has_shine_effect:I})},get:function(){return Y},enumerable:!0}),d||Object.defineProperty(H,"position",{set:function(I){H.setParams({position:I})},get:function(){return _e},enumerable:!0});var ge=null;t.onEvent(E,la);var te=null;if(n.tgWebAppDebug){te=document.createElement("tg-bottom-button");var Se={display:"none",width:"100%",height:"44px",borderRadius:"0",background:"no-repeat right center",padding:"13px 15px",textAlign:"center",boxSizing:"border-box"};for(var Jt in Se)te.style[Jt]=Se[Jt];lt.appendChild(te),te.addEventListener("click",la,!1),te._bottomButton=H,fl[c]=te}function la(){V&&O(C)}function sa(){var I=H.color,Lt=H.textColor;if(ee){var Un={is_visible:!0,is_active:V,is_progress_visible:le,text:W,color:I,text_color:Lt,has_shine_effect:Y&&V&&!le};d||(Un.position=_e)}else var Un={is_visible:!1};return Un}function Eh(I){return typeof I>"u"&&(I=sa()),JSON.stringify(I)}function pl(){var I=sa(),Lt=Eh(I);ge!==Lt&&(ge=Lt,t.postEvent(v,!1,I),n.tgWebAppDebug&&kh(I))}function kh(I){I.is_visible?(te.style.display="block",te.style.opacity=I.is_active?"1":"0.8",te.style.cursor=I.is_active?"pointer":"auto",te.disabled=!I.is_active,te.innerText=I.text,te.className=I.has_shine_effect?"shine":"",te.style.backgroundImage=I.is_progress_visible?"url('data:image/svg+xml,"+encodeURIComponent('')+"')":"none",te.style.backgroundColor=I.color,te.style.color=I.text_color):te.style.display="none",na()}function bh(I){if(typeof I.text<"u"){var Lt=$(I.text);if(!Lt.length)throw console.error("[Telegram.WebApp] Bottom button text is required",I.text),Error("WebAppBottomButtonParamInvalid");if(Lt.length>64)throw console.error("[Telegram.WebApp] Bottom button text is too long",Lt),Error("WebAppBottomButtonParamInvalid");W=Lt}if(typeof I.color<"u")if(I.color===!1||I.color===null)F=!1;else{var Un=Fn(I.color);if(!Un)throw console.error("[Telegram.WebApp] Bottom button color format is invalid",I.color),Error("WebAppBottomButtonParamInvalid");F=Un}if(typeof I.text_color<"u")if(I.text_color===!1||I.text_color===null)q=!1;else{var ua=Fn(I.text_color);if(!ua)throw console.error("[Telegram.WebApp] Bottom button text color format is invalid",I.text_color),Error("WebAppBottomButtonParamInvalid");q=ua}if(typeof I.is_visible<"u"){if(I.is_visible&&!H.text.length)throw console.error("[Telegram.WebApp] Bottom button text is required"),Error("WebAppBottomButtonParamInvalid");ee=!!I.is_visible}if(typeof I.has_shine_effect<"u"&&(Y=!!I.has_shine_effect),!d&&typeof I.position<"u"){if(I.position!="left"&&I.position!="right"&&I.position!="top"&&I.position!="bottom")throw console.error("[Telegram.WebApp] Bottom button posiition is invalid",I.position),Error("WebAppBottomButtonParamInvalid");_e=I.position}return typeof I.is_active<"u"&&(V=!!I.is_active),pl(),H}return H.setText=function(I){return H.setParams({text:I})},H.onClick=function(I){return Z(C,I),H},H.offClick=function(I){return re(C,I),H},H.show=function(){return H.setParams({is_visible:!0})},H.hide=function(){return H.setParams({is_visible:!1})},H.enable=function(){return H.setParams({is_active:!0})},H.disable=function(){return H.setParams({is_active:!1})},H.showProgress=function(I){return V=!!I,le=!0,pl(),H},H.hideProgress=function(){return H.isActive||(V=!0),le=!1,pl(),H},H.setParams=bh,H},ih=ra("main"),lh=ra("secondary"),oa=function(){var c=!1,d={};Object.defineProperty(d,"isVisible",{set:function(V){ee({is_visible:V})},get:function(){return c},enumerable:!0});var v=null;t.onEvent("settings_button_pressed",E);function E(){O("settingsButtonClicked")}function C(){return{is_visible:c}}function B(V){return typeof V>"u"&&(V=C()),JSON.stringify(V)}function D(){return K("6.10")?!0:(console.warn("[Telegram.WebApp] SettingsButton is not supported in version "+a),!1)}function z(){var V=C(),Y=B(V);v!==Y&&(v=Y,t.postEvent("web_app_setup_settings_button",!1,V))}function ee(V){return D()&&(typeof V.is_visible<"u"&&(c=!!V.is_visible),z()),d}return d.onClick=function(V){return D()&&Z("settingsButtonClicked",V),d},d.offClick=function(V){return D()&&re("settingsButtonClicked",V),d},d.show=function(){return ee({is_visible:!0})},d.hide=function(){return ee({is_visible:!1})},d}(),sh=function(){var c={};function d(v){if(!K("6.1"))return console.warn("[Telegram.WebApp] HapticFeedback is not supported in version "+a),c;if(v.type=="impact"){if(v.impact_style!="light"&&v.impact_style!="medium"&&v.impact_style!="heavy"&&v.impact_style!="rigid"&&v.impact_style!="soft")throw console.error("[Telegram.WebApp] Haptic impact style is invalid",v.impact_style),Error("WebAppHapticImpactStyleInvalid")}else if(v.type=="notification"){if(v.notification_type!="error"&&v.notification_type!="success"&&v.notification_type!="warning")throw console.error("[Telegram.WebApp] Haptic notification type is invalid",v.notification_type),Error("WebAppHapticNotificationTypeInvalid")}else if(v.type!="selection_change")throw console.error("[Telegram.WebApp] Haptic feedback type is invalid",v.type),Error("WebAppHapticFeedbackTypeInvalid");return t.postEvent("web_app_trigger_haptic_feedback",!1,v),c}return c.impactOccurred=function(v){return d({type:"impact",impact_style:v})},c.notificationOccurred=function(v){return d({type:"notification",notification_type:v})},c.selectionChanged=function(){return d({type:"selection_change"})},c}(),uh=function(){var c={};function d(v,E,C){if(!K("6.9"))throw console.error("[Telegram.WebApp] CloudStorage is not supported in version "+a),Error("WebAppMethodUnsupported");return dl(v,E,C),c}return c.setItem=function(v,E,C){return d("saveStorageValue",{key:v,value:E},C)},c.getItem=function(v,E){return c.getItems([v],E?function(C,B){C?E(C):E(null,B[v])}:null)},c.getItems=function(v,E){return d("getStorageValues",{keys:v},E)},c.removeItem=function(v,E){return c.removeItems([v],E)},c.removeItems=function(v,E){return d("deleteStorageValues",{keys:v},E)},c.getKeys=function(v){return d("getStorageKeys",{},v)},c}(),ah=function(){var c=!1,d=!1,v="unknown",E=!1,C=!1,B=!1,D="",z={};Object.defineProperty(z,"isInited",{get:function(){return c},enumerable:!0}),Object.defineProperty(z,"isBiometricAvailable",{get:function(){return c&&d},enumerable:!0}),Object.defineProperty(z,"biometricType",{get:function(){return v||"unknown"},enumerable:!0}),Object.defineProperty(z,"isAccessRequested",{get:function(){return E},enumerable:!0}),Object.defineProperty(z,"isAccessGranted",{get:function(){return E&&C},enumerable:!0}),Object.defineProperty(z,"isBiometricTokenSaved",{get:function(){return B},enumerable:!0}),Object.defineProperty(z,"deviceId",{get:function(){return D||""},enumerable:!0});var ee={callbacks:[]},V=!1,Y=!1,le=!1;t.onEvent("biometry_info_received",G),t.onEvent("biometry_auth_requested",W),t.onEvent("biometry_token_updated",F);function G(H,ge){if(c=!0,ge.available?(d=!0,v=ge.type||"unknown",ge.access_requested?(E=!0,C=!!ge.access_granted,B=!!ge.token_saved):(E=!1,C=!1,B=!1)):(d=!1,v="unknown",E=!1,C=!1,B=!1),D=ge.device_id||"",ee.callbacks.length>0){for(var te=0;te128)throw console.error("[Telegram.WebApp] Biometric reason is too long",Se),Error("WebAppBiometricRequestAccessParamInvalid");Se.length>0&&(te.reason=Se)}return V={callback:ge},t.postEvent("web_app_biometry_request_access",!1,te),z},z.authenticate=function(H,ge){if(!q())return z;if(_e(),!d)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!C)throw console.error("[Telegram.WebApp] Biometric access was not granted by the user."),Error("WebAppBiometricManagerBiometricAccessNotGranted");if(Y)throw console.error("[Telegram.WebApp] Authentication request is already in progress."),Error("WebAppBiometricManagerAuthenticationRequested");var te={};if(typeof H.reason<"u"){var Se=$(H.reason);if(Se.length>128)throw console.error("[Telegram.WebApp] Biometric reason is too long",Se),Error("WebAppBiometricRequestAccessParamInvalid");Se.length>0&&(te.reason=Se)}return Y={callback:ge},t.postEvent("web_app_biometry_request_auth",!1,te),z},z.updateBiometricToken=function(H,ge){if(!q())return z;if(H=H||"",H.length>1024)throw console.error("[Telegram.WebApp] Token is too long",H),Error("WebAppBiometricManagerTokenInvalid");if(_e(),!d)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!C)throw console.error("[Telegram.WebApp] Biometric access was not granted by the user."),Error("WebAppBiometricManagerBiometricAccessNotGranted");if(le)throw console.error("[Telegram.WebApp] Token request is already in progress."),Error("WebAppBiometricManagerTokenUpdateRequested");return le={callback:ge},t.postEvent("web_app_biometry_update_token",!1,{token:H}),z},z.openSettings=function(){if(!q())return z;if(_e(),!d)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!E)throw console.error("[Telegram.WebApp] Biometric access was not requested yet."),Error("WebAppBiometricManagerBiometricsAccessNotRequested");return C?(console.warn("[Telegram.WebApp] Biometric access was granted by the user, no need to go to settings."),z):(t.postEvent("web_app_biometry_open_settings",!1),z)},z}(),ch=function(){var c=!1,d=!1,v=!1,E=!1,C={};Object.defineProperty(C,"isInited",{get:function(){return c},enumerable:!0}),Object.defineProperty(C,"isLocationAvailable",{get:function(){return c&&d},enumerable:!0}),Object.defineProperty(C,"isAccessRequested",{get:function(){return v},enumerable:!0}),Object.defineProperty(C,"isAccessGranted",{get:function(){return v&&E},enumerable:!0});var B={callbacks:[]},D={callbacks:[]};t.onEvent("location_checked",z),t.onEvent("location_requested",ee);function z(G,W){if(c=!0,W.available?(d=!0,W.access_requested?(v=!0,E=!!W.access_granted):(v=!1,E=!1)):(d=!1,v=!1,E=!1),B.callbacks.length>0){for(var F=0;F0){for(var W=0;W0){for(var F=0;F0){for(var F=0;F0){for(var F=0;F1e3?console.warn("[Telegram.WebApp] Accelerometer refresh_rate is invalid",q):F.refresh_rate=q,W&&C.push(W),t.postEvent("web_app_start_accelerometer",!1,F),D},D.stop=function(G){return le()&&(G&&B.push(G),t.postEvent("web_app_stop_accelerometer")),D},D}(),dh=function(){var c=!1,d=null,v=null,E=null,C=!1,B=[],D=[],z={};Object.defineProperty(z,"isStarted",{get:function(){return c},enumerable:!0}),Object.defineProperty(z,"absolute",{get:function(){return C},enumerable:!0}),Object.defineProperty(z,"alpha",{get:function(){return d},enumerable:!0}),Object.defineProperty(z,"beta",{get:function(){return v},enumerable:!0}),Object.defineProperty(z,"gamma",{get:function(){return E},enumerable:!0}),t.onEvent("device_orientation_started",ee),t.onEvent("device_orientation_stopped",V),t.onEvent("device_orientation_changed",Y),t.onEvent("device_orientation_failed",le);function ee(W,F){if(c=!0,B.length>0){for(var q=0;q0){for(var q=0;q0){for(var q=0;q1e3?console.warn("[Telegram.WebApp] DeviceOrientation refresh_rate is invalid",_e):q.refresh_rate=_e,q.need_absolute=!!W.need_absolute,F&&B.push(F),t.postEvent("web_app_start_device_orientation",!1,q),z},z.stop=function(W){return G()&&(W&&D.push(W),t.postEvent("web_app_stop_device_orientation")),z},z}(),ph=function(){var c=!1,d=null,v=null,E=null,C=[],B=[],D={};Object.defineProperty(D,"isStarted",{get:function(){return c},enumerable:!0}),Object.defineProperty(D,"x",{get:function(){return d},enumerable:!0}),Object.defineProperty(D,"y",{get:function(){return v},enumerable:!0}),Object.defineProperty(D,"z",{get:function(){return E},enumerable:!0}),t.onEvent("gyroscope_started",z),t.onEvent("gyroscope_stopped",ee),t.onEvent("gyroscope_changed",V),t.onEvent("gyroscope_failed",Y);function z(G,W){if(c=!0,C.length>0){for(var F=0;F0){for(var F=0;F0){for(var F=0;F1e3?console.warn("[Telegram.WebApp] Gyroscope refresh_rate is invalid",q):F.refresh_rate=q,W&&C.push(W),t.postEvent("web_app_start_gyroscope",!1,F),D},D.stop=function(G){return le()&&(G&&B.push(G),t.postEvent("web_app_stop_gyroscope")),D},D}(),Cr={};function hh(c,d){if(d.slug&&Cr[d.slug]){var v=Cr[d.slug];delete Cr[d.slug],v.callback&&v.callback(d.status),O("invoiceClosed",{url:v.url,status:d.status})}}var Nt=!1;function ia(c,d){if(Nt){var v=Nt;Nt=!1;var E=null;typeof d.button_id<"u"&&(E=d.button_id),v.callback&&v.callback(E),O("popupClosed",{button_id:E})}}var wn=!1;function mh(c,d){if(wn){var v=wn,E=null;typeof d.data<"u"&&(E=d.data),v.callback&&v.callback(E)&&(wn=!1,t.postEvent("web_app_close_scan_qr_popup",!1)),O("qrTextReceived",{data:E})}}function gh(c,d){wn=!1,O("scanQrPopupClosed")}function vh(c,d){if(d.req_id&&kt[d.req_id]){var v=kt[d.req_id];delete kt[d.req_id];var E=null;typeof d.data<"u"&&(E=d.data),v.callback&&v.callback(E),O("clipboardTextReceived",{data:E})}}var Pr=!1;function yh(c,d){if(Pr){var v=Pr;Pr=!1,v.callback&&v.callback(d.status=="allowed"),O("writeAccessRequested",{status:d.status})}}function wh(c,d){var v,E,C=0,B=function(){dl("getRequestedContact",{},function(z,ee){ee&&ee.length?(clearTimeout(E),c(ee)):(C+=50,v=setTimeout(B,C))})},D=function(){clearTimeout(v),c("")};E=setTimeout(D,d),B()}var Ar=!1;function _h(c,d){if(Ar){var v=Ar;Ar=!1;var E=d.status=="sent",C={status:d.status};E?wh(function(B){if(B&&B.length){C.response=B,C.responseUnsafe=e.urlParseQueryString(B);for(var D in C.responseUnsafe){var z=C.responseUnsafe[D];try{(z.substr(0,1)=="{"&&z.substr(-1)=="}"||z.substr(0,1)=="["&&z.substr(-1)=="]")&&(C.responseUnsafe[D]=JSON.parse(z))}catch{}}}v.callback&&v.callback(E,C),O("contactRequested",C)},3e3):(v.callback&&v.callback(E,C),O("contactRequested",C))}}var Tr=!1;function Sh(c,d){if(Tr){var v=Tr;Tr=!1;var E=d.status=="downloading";v.callback&&v.callback(E),O("fileDownloadRequested",{status:E?"downloading":"cancelled"})}}function xh(c,d){if(d.req_id&&kt[d.req_id]){var v=kt[d.req_id];delete kt[d.req_id];var E=null,C=null;typeof d.result<"u"&&(E=d.result),typeof d.error<"u"&&(C=d.error),v.callback&&v.callback(C,E)}}function dl(c,d,v){if(!K("6.9"))throw console.error("[Telegram.WebApp] Method invokeCustomMethod is not supported in version "+a),Error("WebAppMethodUnsupported");var E=Qu(16),C={req_id:E,method:c,params:d||{}};kt[E]={callback:v},t.postEvent("web_app_invoke_custom_method",!1,C)}window.Telegram||(window.Telegram={}),Object.defineProperty(o,"initData",{get:function(){return i},enumerable:!0}),Object.defineProperty(o,"initDataUnsafe",{get:function(){return l},enumerable:!0}),Object.defineProperty(o,"version",{get:function(){return a},enumerable:!0}),Object.defineProperty(o,"platform",{get:function(){return p},enumerable:!0}),Object.defineProperty(o,"colorScheme",{get:function(){return u},enumerable:!0}),Object.defineProperty(o,"themeParams",{get:function(){return s},enumerable:!0}),Object.defineProperty(o,"isExpanded",{get:function(){return Ku},enumerable:!0}),Object.defineProperty(o,"viewportHeight",{get:function(){return(_r===!1?window.innerHeight:_r)-Ye},enumerable:!0}),Object.defineProperty(o,"viewportStableHeight",{get:function(){return(Sr===!1?window.innerHeight:Sr)-Ye},enumerable:!0}),Object.defineProperty(o,"safeAreaInset",{get:function(){return Ot},enumerable:!0}),Object.defineProperty(o,"contentSafeAreaInset",{get:function(){return jt},enumerable:!0}),Object.defineProperty(o,"isClosingConfirmationEnabled",{set:function(c){zp(c)},get:function(){return il},enumerable:!0}),Object.defineProperty(o,"isVerticalSwipesEnabled",{set:function(c){Fp(c)},get:function(){return ll},enumerable:!0}),Object.defineProperty(o,"isFullscreen",{get:function(){return y},enumerable:!0}),Object.defineProperty(o,"isOrientationLocked",{set:function(c){Hp(c)},get:function(){return P},enumerable:!0}),Object.defineProperty(o,"isActive",{get:function(){return m},enumerable:!0}),Object.defineProperty(o,"headerColor",{set:function(c){Yp(c)},get:function(){return Xp()},enumerable:!0}),Object.defineProperty(o,"backgroundColor",{set:function(c){Zp(c)},get:function(){return Gu()},enumerable:!0}),Object.defineProperty(o,"bottomBarColor",{set:function(c){eh(c)},get:function(){return br()},enumerable:!0}),Object.defineProperty(o,"BackButton",{value:oh,enumerable:!0}),Object.defineProperty(o,"MainButton",{value:ih,enumerable:!0}),Object.defineProperty(o,"SecondaryButton",{value:lh,enumerable:!0}),Object.defineProperty(o,"SettingsButton",{value:oa,enumerable:!0}),Object.defineProperty(o,"HapticFeedback",{value:sh,enumerable:!0}),Object.defineProperty(o,"CloudStorage",{value:uh,enumerable:!0}),Object.defineProperty(o,"BiometricManager",{value:ah,enumerable:!0}),Object.defineProperty(o,"Accelerometer",{value:fh,enumerable:!0}),Object.defineProperty(o,"DeviceOrientation",{value:dh,enumerable:!0}),Object.defineProperty(o,"Gyroscope",{value:ph,enumerable:!0}),Object.defineProperty(o,"LocationManager",{value:ch,enumerable:!0}),o.isVersionAtLeast=function(c){return K(c)},o.setHeaderColor=function(c){o.headerColor=c},o.setBackgroundColor=function(c){o.backgroundColor=c},o.setBottomBarColor=function(c){o.bottomBarColor=c},o.enableClosingConfirmation=function(){o.isClosingConfirmationEnabled=!0},o.disableClosingConfirmation=function(){o.isClosingConfirmationEnabled=!1},o.enableVerticalSwipes=function(){o.isVerticalSwipesEnabled=!0},o.disableVerticalSwipes=function(){o.isVerticalSwipesEnabled=!1},o.lockOrientation=function(){o.isOrientationLocked=!0},o.unlockOrientation=function(){o.isOrientationLocked=!1},o.requestFullscreen=function(){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method requestFullscreen is not supported in version "+a),Error("WebAppMethodUnsupported");t.postEvent("web_app_request_fullscreen")},o.exitFullscreen=function(){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method exitFullscreen is not supported in version "+a),Error("WebAppMethodUnsupported");t.postEvent("web_app_exit_fullscreen")},o.addToHomeScreen=function(){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method addToHomeScreen is not supported in version "+a),Error("WebAppMethodUnsupported");t.postEvent("web_app_add_to_home_screen")},o.checkHomeScreenStatus=function(c){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method checkHomeScreenStatus is not supported in version "+a),Error("WebAppMethodUnsupported");c&&xr.push(c),t.postEvent("web_app_check_home_screen")},o.onEvent=function(c,d){Z(c,d)},o.offEvent=function(c,d){re(c,d)},o.sendData=function(c){if(!c||!c.length)throw console.error("[Telegram.WebApp] Data is required",c),Error("WebAppDataInvalid");if(rh(c)>4096)throw console.error("[Telegram.WebApp] Data is too long",c),Error("WebAppDataInvalid");t.postEvent("web_app_data_send",!1,{data:c})},o.switchInlineQuery=function(c,d){if(!K("6.6"))throw console.error("[Telegram.WebApp] Method switchInlineQuery is not supported in version "+a),Error("WebAppMethodUnsupported");if(!n.tgWebAppBotInline)throw console.error("[Telegram.WebApp] Inline mode is disabled for this bot. Read more about inline mode: https://core.telegram.org/bots/inline"),Error("WebAppInlineModeDisabled");if(c=c||"",c.length>256)throw console.error("[Telegram.WebApp] Inline query is too long",c),Error("WebAppInlineQueryInvalid");var v=[];if(d){if(!Array.isArray(d))throw console.error("[Telegram.WebApp] Choose chat types should be an array",d),Error("WebAppInlineChooseChatTypesInvalid");for(var E={users:1,bots:1,groups:1,channels:1},C=0;C64)throw console.error("[Telegram.WebApp] Popup title is too long",v),Error("WebAppPopupParamInvalid");v.length>0&&(B.title=v)}if(typeof c.message<"u"&&(E=$(c.message)),!E.length)throw console.error("[Telegram.WebApp] Popup message is required",c.message),Error("WebAppPopupParamInvalid");if(E.length>256)throw console.error("[Telegram.WebApp] Popup message is too long",E),Error("WebAppPopupParamInvalid");if(B.message=E,typeof c.buttons<"u"){if(!Array.isArray(c.buttons))throw console.error("[Telegram.WebApp] Popup buttons should be an array",c.buttons),Error("WebAppPopupParamInvalid");for(var D=0;D64))throw console.error("[Telegram.WebApp] Popup button id is too long",V),Error("WebAppPopupParamInvalid");ee.id=V;var Y=z.type;if(typeof Y>"u"&&(Y="default"),ee.type=Y,!(Y=="ok"||Y=="close"||Y=="cancel"))if(Y=="default"||Y=="destructive"){var le="";if(typeof z.text<"u"&&(le=$(z.text)),!le.length)throw console.error("[Telegram.WebApp] Popup button text is required for type "+Y,z.text),Error("WebAppPopupParamInvalid");if(le.length>64)throw console.error("[Telegram.WebApp] Popup button text is too long",le),Error("WebAppPopupParamInvalid");ee.text=le}else throw console.error("[Telegram.WebApp] Popup button type is invalid",Y),Error("WebAppPopupParamInvalid");C.push(ee)}}else C.push({id:"",type:"close"});if(C.length<1)throw console.error("[Telegram.WebApp] Popup should have at least one button"),Error("WebAppPopupParamInvalid");if(C.length>3)throw console.error("[Telegram.WebApp] Popup should not have more than 3 buttons"),Error("WebAppPopupParamInvalid");B.buttons=C,Nt={callback:d},t.postEvent("web_app_open_popup",!1,B)},o.showAlert=function(c,d){o.showPopup({message:c},d?function(){d()}:null)},o.showConfirm=function(c,d){o.showPopup({message:c,buttons:[{type:"ok",id:"ok"},{type:"cancel"}]},d?function(v){d(v=="ok")}:null)},o.showScanQrPopup=function(c,d){if(!K("6.4"))throw console.error("[Telegram.WebApp] Method showScanQrPopup is not supported in version "+a),Error("WebAppMethodUnsupported");if(wn)throw console.error("[Telegram.WebApp] Popup is already opened"),Error("WebAppScanQrPopupOpened");var v="",E={};if(typeof c.text<"u"){if(v=$(c.text),v.length>64)throw console.error("[Telegram.WebApp] Scan QR popup text is too long",v),Error("WebAppScanQrPopupParamInvalid");v.length>0&&(E.text=v)}wn={callback:d},t.postEvent("web_app_open_scan_qr_popup",!1,E)},o.closeScanQrPopup=function(){if(!K("6.4"))throw console.error("[Telegram.WebApp] Method closeScanQrPopup is not supported in version "+a),Error("WebAppMethodUnsupported");wn=!1,t.postEvent("web_app_close_scan_qr_popup",!1)},o.readTextFromClipboard=function(c){if(!K("6.4"))throw console.error("[Telegram.WebApp] Method readTextFromClipboard is not supported in version "+a),Error("WebAppMethodUnsupported");var d=Qu(16),v={req_id:d};kt[d]={callback:c},t.postEvent("web_app_read_text_from_clipboard",!1,v)},o.requestWriteAccess=function(c){if(!K("6.9"))throw console.error("[Telegram.WebApp] Method requestWriteAccess is not supported in version "+a),Error("WebAppMethodUnsupported");if(Pr)throw console.error("[Telegram.WebApp] Write access is already requested"),Error("WebAppWriteAccessRequested");Pr={callback:c},t.postEvent("web_app_request_write_access")},o.requestContact=function(c){if(!K("6.9"))throw console.error("[Telegram.WebApp] Method requestContact is not supported in version "+a),Error("WebAppMethodUnsupported");if(Ar)throw console.error("[Telegram.WebApp] Contact is already requested"),Error("WebAppContactRequested");Ar={callback:c},t.postEvent("web_app_request_phone")},o.downloadFile=function(c,d){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method downloadFile is not supported in version "+a),Error("WebAppMethodUnsupported");if(Tr)throw console.error("[Telegram.WebApp] Popup is already opened"),Error("WebAppDownloadFilePopupOpened");var v=document.createElement("A"),E={};if(!c||!c.url||!c.url.length)throw console.error("[Telegram.WebApp] Url is required"),Error("WebAppDownloadFileParamInvalid");if(v.href=c.url,v.protocol!="https:")throw console.error("[Telegram.WebApp] Url protocol is not supported",url),Error("WebAppDownloadFileParamInvalid");if(E.url=v.href,!c||!c.file_name||!c.file_name.length)throw console.error("[Telegram.WebApp] File name is required"),Error("WebAppDownloadFileParamInvalid");E.file_name=c.file_name,Tr={callback:d},t.postEvent("web_app_request_file_download",!1,E)},o.shareToStory=function(c,d){if(d=d||{},!K("7.8"))throw console.error("[Telegram.WebApp] Method shareToStory is not supported in version "+a),Error("WebAppMethodUnsupported");var v=document.createElement("A");if(v.href=c,v.protocol!="http:"&&v.protocol!="https:")throw console.error("[Telegram.WebApp] Media url protocol is not supported",url),Error("WebAppMediaUrlInvalid");var E={};if(E.media_url=v.href,typeof d.text<"u"){var C=$(d.text);if(C.length>2048)throw console.error("[Telegram.WebApp] Text is too long",C),Error("WebAppShareToStoryParamInvalid");C.length>0&&(E.text=C)}if(typeof d.widget_link<"u"){if(d.widget_link=d.widget_link||{},v.href=d.widget_link.url,v.protocol!="http:"&&v.protocol!="https:")throw console.error("[Telegram.WebApp] Link protocol is not supported",url),Error("WebAppShareToStoryParamInvalid");var B={url:v.href};if(typeof d.widget_link.name<"u"){var D=$(d.widget_link.name);if(D.length>48)throw console.error("[Telegram.WebApp] Link name is too long",D),Error("WebAppShareToStoryParamInvalid");D.length>0&&(B.name=D)}E.widget_link=B}t.postEvent("web_app_share_to_story",!1,E)},o.shareMessage=function(c,d){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method shareMessage is not supported in version "+a),Error("WebAppMethodUnsupported");if(Qt)throw console.error("[Telegram.WebApp] Share message is already opened"),Error("WebAppShareMessageOpened");Qt={callback:d},t.postEvent("web_app_send_prepared_message",!1,{id:c})},o.setEmojiStatus=function(c,d,v){if(d=d||{},!K("8.0"))throw console.error("[Telegram.WebApp] Method setEmojiStatus is not supported in version "+a),Error("WebAppMethodUnsupported");var E={};if(E.custom_emoji_id=c,typeof d.duration<"u"&&(E.duration=d.duration),Kt)throw console.error("[Telegram.WebApp] Emoji status is already requested"),Error("WebAppEmojiStatusRequested");Kt={callback:v},t.postEvent("web_app_set_emoji_status",!1,E)},o.requestEmojiStatusAccess=function(c){if(!K("8.0"))throw console.error("[Telegram.WebApp] Method requestEmojiStatusAccess is not supported in version "+a),Error("WebAppMethodUnsupported");if(Er)throw console.error("[Telegram.WebApp] Emoji status permission is already requested"),Error("WebAppEmojiStatusAccessRequested");Er={callback:c},t.postEvent("web_app_request_emoji_status_access")},o.invokeCustomMethod=function(c,d,v){dl(c,d,v)},o.ready=function(){t.postEvent("web_app_ready")},o.expand=function(){t.postEvent("web_app_expand")},o.close=function(c){c=c||{};var d={};K("7.6")&&c.return_back&&(d.return_back=!0),t.postEvent("web_app_close",!1,d)},window.Telegram.WebApp=o,ul(),al(),cl(),ol(),n.tgWebAppShowSettings&&oa.show(),window.addEventListener("resize",Xe),r&&document.addEventListener("click",L),t.onEvent("theme_changed",je),t.onEvent("viewport_changed",Ge),t.onEvent("safe_area_changed",zn),t.onEvent("content_safe_area_changed",we),t.onEvent("visibility_changed",qt),t.onEvent("invoice_closed",hh),t.onEvent("popup_closed",ia),t.onEvent("qr_text_received",mh),t.onEvent("scan_qr_popup_closed",gh),t.onEvent("clipboard_text_received",vh),t.onEvent("write_access_requested",yh),t.onEvent("phone_requested",_h),t.onEvent("file_download_requested",Sh),t.onEvent("custom_method_invoked",xh),t.onEvent("fullscreen_changed",Up),t.onEvent("fullscreen_failed",Dp),t.onEvent("home_screen_added",Vp),t.onEvent("home_screen_checked",$p),t.onEvent("prepared_message_sent",qp),t.onEvent("prepared_message_failed",Qp),t.onEvent("emoji_status_set",Kp),t.onEvent("emoji_status_failed",Jp),t.onEvent("emoji_status_access_requested",Gp),t.postEvent("web_app_request_theme"),t.postEvent("web_app_request_viewport"),t.postEvent("web_app_request_safe_area"),t.postEvent("web_app_request_content_safe_area")})();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.WebApp=void 0;var ny=window;Yi.WebApp=ny.Telegram.WebApp;Object.defineProperty(hp,"__esModule",{value:!0});var ry=Yi,St=hp.default=ry.WebApp;function mp(e,t){return function(){return e.apply(t,arguments)}}const{toString:oy}=Object.prototype,{getPrototypeOf:Du}=Object,{iterator:Zi,toStringTag:gp}=Symbol,el=(e=>t=>{const n=oy.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Et=e=>(e=e.toLowerCase(),t=>el(t)===e),tl=e=>t=>typeof t===e,{isArray:wr}=Array,hr=tl("undefined");function ko(e){return e!==null&&!hr(e)&&e.constructor!==null&&!hr(e.constructor)&&Qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vp=Et("ArrayBuffer");function iy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vp(e.buffer),t}const ly=tl("string"),Qe=tl("function"),yp=tl("number"),bo=e=>e!==null&&typeof e=="object",sy=e=>e===!0||e===!1,ii=e=>{if(el(e)!=="object")return!1;const t=Du(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(gp in e)&&!(Zi in e)},uy=e=>{if(!bo(e)||ko(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ay=Et("Date"),cy=Et("File"),fy=Et("Blob"),dy=Et("FileList"),py=e=>bo(e)&&Qe(e.pipe),hy=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qe(e.append)&&((t=el(e))==="formdata"||t==="object"&&Qe(e.toString)&&e.toString()==="[object FormData]"))},my=Et("URLSearchParams"),[gy,vy,yy,wy]=["ReadableStream","Request","Response","Headers"].map(Et),_y=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Co(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),wr(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const bn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_p=e=>!hr(e)&&e!==bn;function Us(){const{caseless:e,skipUndefined:t}=_p(this)&&this||{},n={},r=(o,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const l=e&&wp(n,i)||i;ii(n[l])&&ii(o)?n[l]=Us(n[l],o):ii(o)?n[l]=Us({},o):wr(o)?n[l]=o.slice():(!t||!hr(o))&&(n[l]=o)};for(let o=0,i=arguments.length;o(Co(t,(o,i)=>{n&&Qe(o)?Object.defineProperty(e,i,{value:mp(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),xy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ey=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ky=(e,t,n,r)=>{let o,i,l;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)l=o[i],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&Du(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},by=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Cy=e=>{if(!e)return null;if(wr(e))return e;let t=e.length;if(!yp(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Py=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Du(Uint8Array)),Ay=(e,t)=>{const r=(e&&e[Zi]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Ty=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ry=Et("HTMLFormElement"),Oy=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Pc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jy=Et("RegExp"),Sp=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Co(n,(o,i)=>{let l;(l=t(o,i,e))!==!1&&(r[i]=l||o)}),Object.defineProperties(e,r)},Ny=e=>{Sp(e,(t,n)=>{if(Qe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Qe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ly=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return wr(e)?r(e):r(String(e).split(t)),n},By=()=>{},Wy=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Iy(e){return!!(e&&Qe(e.append)&&e[gp]==="FormData"&&e[Zi])}const My=e=>{const t=new Array(10),n=(r,o)=>{if(bo(r)){if(t.indexOf(r)>=0)return;if(ko(r))return r;if(!("toJSON"in r)){t[o]=r;const i=wr(r)?[]:{};return Co(r,(l,s)=>{const u=n(l,o+1);!hr(u)&&(i[s]=u)}),t[o]=void 0,i}}return r};return n(e,0)},zy=Et("AsyncFunction"),Fy=e=>e&&(bo(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),xp=((e,t)=>e?setImmediate:t?((n,r)=>(bn.addEventListener("message",({source:o,data:i})=>{o===bn&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),bn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qe(bn.postMessage)),Uy=typeof queueMicrotask<"u"?queueMicrotask.bind(bn):typeof process<"u"&&process.nextTick||xp,Dy=e=>e!=null&&Qe(e[Zi]),b={isArray:wr,isArrayBuffer:vp,isBuffer:ko,isFormData:hy,isArrayBufferView:iy,isString:ly,isNumber:yp,isBoolean:sy,isObject:bo,isPlainObject:ii,isEmptyObject:uy,isReadableStream:gy,isRequest:vy,isResponse:yy,isHeaders:wy,isUndefined:hr,isDate:ay,isFile:cy,isBlob:fy,isRegExp:jy,isFunction:Qe,isStream:py,isURLSearchParams:my,isTypedArray:Py,isFileList:dy,forEach:Co,merge:Us,extend:Sy,trim:_y,stripBOM:xy,inherits:Ey,toFlatObject:ky,kindOf:el,kindOfTest:Et,endsWith:by,toArray:Cy,forEachEntry:Ay,matchAll:Ty,isHTMLForm:Ry,hasOwnProperty:Pc,hasOwnProp:Pc,reduceDescriptors:Sp,freezeMethods:Ny,toObjectSet:Ly,toCamelCase:Oy,noop:By,toFiniteNumber:Wy,findKey:wp,global:bn,isContextDefined:_p,isSpecCompliantForm:Iy,toJSONObject:My,isAsyncFn:zy,isThenable:Fy,setImmediate:xp,asap:Uy,isIterable:Dy};let Q=class Ep extends Error{static from(t,n,r,o,i,l){const s=new Ep(t.message,n||t.code,r,o,i);return s.cause=t,s.name=t.name,l&&Object.assign(s,l),s}constructor(t,n,r,o,i){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.status}}};Q.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Q.ERR_BAD_OPTION="ERR_BAD_OPTION";Q.ECONNABORTED="ECONNABORTED";Q.ETIMEDOUT="ETIMEDOUT";Q.ERR_NETWORK="ERR_NETWORK";Q.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Q.ERR_DEPRECATED="ERR_DEPRECATED";Q.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Q.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Q.ERR_CANCELED="ERR_CANCELED";Q.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Q.ERR_INVALID_URL="ERR_INVALID_URL";const Hy=null;function Ds(e){return b.isPlainObject(e)||b.isArray(e)}function kp(e){return b.endsWith(e,"[]")?e.slice(0,-2):e}function Ac(e,t,n){return e?e.concat(t).map(function(o,i){return o=kp(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Vy(e){return b.isArray(e)&&!e.some(Ds)}const $y=b.toFlatObject(b,{},null,function(t){return/^is[A-Z]/.test(t)});function nl(e,t,n){if(!b.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=b.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,x){return!b.isUndefined(x[_])});const r=n.metaTokens,o=n.visitor||p,i=n.dots,l=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(t);if(!b.isFunction(o))throw new TypeError("visitor must be a function");function a(w){if(w===null)return"";if(b.isDate(w))return w.toISOString();if(b.isBoolean(w))return w.toString();if(!u&&b.isBlob(w))throw new Q("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(w)||b.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,_,x){let g=w;if(w&&!x&&typeof w=="object"){if(b.endsWith(_,"{}"))_=r?_:_.slice(0,-2),w=JSON.stringify(w);else if(b.isArray(w)&&Vy(w)||(b.isFileList(w)||b.endsWith(_,"[]"))&&(g=b.toArray(w)))return _=kp(_),g.forEach(function(h,S){!(b.isUndefined(h)||h===null)&&t.append(l===!0?Ac([_],S,i):l===null?_:_+"[]",a(h))}),!1}return Ds(w)?!0:(t.append(Ac(x,_,i),a(w)),!1)}const m=[],y=Object.assign($y,{defaultVisitor:p,convertValue:a,isVisitable:Ds});function P(w,_){if(!b.isUndefined(w)){if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+_.join("."));m.push(w),b.forEach(w,function(g,f){(!(b.isUndefined(g)||g===null)&&o.call(t,g,b.isString(f)?f.trim():f,_,y))===!0&&P(g,_?_.concat(f):[f])}),m.pop()}}if(!b.isObject(e))throw new TypeError("data must be an object");return P(e),t}function Tc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hu(e,t){this._pairs=[],e&&nl(e,this,t)}const bp=Hu.prototype;bp.append=function(t,n){this._pairs.push([t,n])};bp.toString=function(t){const n=t?function(r){return t.call(this,r,Tc)}:Tc;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function qy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Cp(e,t,n){if(!t)return e;const r=n&&n.encode||qy,o=b.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let l;if(i?l=i(t,o):l=b.isURLSearchParams(t)?t.toString():new Hu(t,o).toString(r),l){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Rc{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){b.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Vu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Qy=typeof URLSearchParams<"u"?URLSearchParams:Hu,Ky=typeof FormData<"u"?FormData:null,Jy=typeof Blob<"u"?Blob:null,Gy={isBrowser:!0,classes:{URLSearchParams:Qy,FormData:Ky,Blob:Jy},protocols:["http","https","file","blob","url","data"]},$u=typeof window<"u"&&typeof document<"u",Hs=typeof navigator=="object"&&navigator||void 0,Xy=$u&&(!Hs||["ReactNative","NativeScript","NS"].indexOf(Hs.product)<0),Yy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zy=$u&&window.location.href||"http://localhost",e0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$u,hasStandardBrowserEnv:Xy,hasStandardBrowserWebWorkerEnv:Yy,navigator:Hs,origin:Zy},Symbol.toStringTag,{value:"Module"})),We={...e0,...Gy};function t0(e,t){return nl(e,new We.classes.URLSearchParams,{visitor:function(n,r,o,i){return We.isNode&&b.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function n0(e){return b.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function r0(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return l=!l&&b.isArray(o)?o.length:l,u?(b.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!s):((!o[l]||!b.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],i)&&b.isArray(o[l])&&(o[l]=r0(o[l])),!s)}if(b.isFormData(e)&&b.isFunction(e.entries)){const n={};return b.forEachEntry(e,(r,o)=>{t(n0(r),o,n,0)}),n}return null}function o0(e,t,n){if(b.isString(e))try{return(t||JSON.parse)(e),b.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Po={transitional:Vu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=b.isObject(t);if(i&&b.isHTMLForm(t)&&(t=new FormData(t)),b.isFormData(t))return o?JSON.stringify(Pp(t)):t;if(b.isArrayBuffer(t)||b.isBuffer(t)||b.isStream(t)||b.isFile(t)||b.isBlob(t)||b.isReadableStream(t))return t;if(b.isArrayBufferView(t))return t.buffer;if(b.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return t0(t,this.formSerializer).toString();if((s=b.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return nl(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),o0(t)):t}],transformResponse:[function(t){const n=this.transitional||Po.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(b.isResponse(t)||b.isReadableStream(t))return t;if(t&&b.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(s){if(l)throw s.name==="SyntaxError"?Q.from(s,Q.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],e=>{Po.headers[e]={}});const i0=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),l0=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&i0[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Oc=Symbol("internals");function Mr(e){return e&&String(e).trim().toLowerCase()}function li(e){return e===!1||e==null?e:b.isArray(e)?e.map(li):String(e)}function s0(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const u0=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ul(e,t,n,r,o){if(b.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!b.isString(t)){if(b.isString(r))return t.indexOf(r)!==-1;if(b.isRegExp(r))return r.test(t)}}function a0(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function c0(e,t){const n=b.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,l){return this[r].call(this,t,o,i,l)},configurable:!0})})}let Ke=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,u,a){const p=Mr(u);if(!p)throw new Error("header name must be a non-empty string");const m=b.findKey(o,p);(!m||o[m]===void 0||a===!0||a===void 0&&o[m]!==!1)&&(o[m||u]=li(s))}const l=(s,u)=>b.forEach(s,(a,p)=>i(a,p,u));if(b.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(b.isString(t)&&(t=t.trim())&&!u0(t))l(l0(t),n);else if(b.isObject(t)&&b.isIterable(t)){let s={},u,a;for(const p of t){if(!b.isArray(p))throw TypeError("Object iterator must return a key-value pair");s[a=p[0]]=(u=s[a])?b.isArray(u)?[...u,p[1]]:[u,p[1]]:p[1]}l(s,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Mr(t),t){const r=b.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return s0(o);if(b.isFunction(n))return n.call(this,o,r);if(b.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Mr(t),t){const r=b.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ul(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(l){if(l=Mr(l),l){const s=b.findKey(r,l);s&&(!n||Ul(r,r[s],s,n))&&(delete r[s],o=!0)}}return b.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Ul(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return b.forEach(this,(o,i)=>{const l=b.findKey(r,i);if(l){n[l]=li(o),delete n[i];return}const s=t?a0(i):String(i).trim();s!==i&&delete n[i],n[s]=li(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return b.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&b.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Oc]=this[Oc]={accessors:{}}).accessors,o=this.prototype;function i(l){const s=Mr(l);r[s]||(c0(o,l),r[s]=!0)}return b.isArray(t)?t.forEach(i):i(t),this}};Ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(Ke.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});b.freezeMethods(Ke);function Dl(e,t){const n=this||Po,r=t||n,o=Ke.from(r.headers);let i=r.data;return b.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Ap(e){return!!(e&&e.__CANCEL__)}let Ao=class extends Q{constructor(t,n,r){super(t??"canceled",Q.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Tp(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function f0(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function d0(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,l;return t=t!==void 0?t:1e3,function(u){const a=Date.now(),p=r[i];l||(l=a),n[o]=u,r[o]=a;let m=i,y=0;for(;m!==o;)y+=n[m++],m=m%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),a-l{n=p,o=null,i&&(clearTimeout(i),i=null),e(...a)};return[(...a)=>{const p=Date.now(),m=p-n;m>=r?l(a,p):(o=a,i||(i=setTimeout(()=>{i=null,l(o)},r-m)))},()=>o&&l(o)]}const ji=(e,t,n=3)=>{let r=0;const o=d0(50,250);return p0(i=>{const l=i.loaded,s=i.lengthComputable?i.total:void 0,u=l-r,a=o(u),p=l<=s;r=l;const m={loaded:l,total:s,progress:s?l/s:void 0,bytes:u,rate:a||void 0,estimated:a&&s&&p?(s-l)/a:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(m)},n)},jc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Nc=e=>(...t)=>b.asap(()=>e(...t)),h0=We.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,We.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(We.origin),We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent)):()=>!0,m0=We.hasStandardBrowserEnv?{write(e,t,n,r,o,i,l){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];b.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),b.isString(r)&&s.push(`path=${r}`),b.isString(o)&&s.push(`domain=${o}`),i===!0&&s.push("secure"),b.isString(l)&&s.push(`SameSite=${l}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function g0(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function v0(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Rp(e,t,n){let r=!g0(t);return e&&(r||n==!1)?v0(e,t):t}const Lc=e=>e instanceof Ke?{...e}:e;function Bn(e,t){t=t||{};const n={};function r(a,p,m,y){return b.isPlainObject(a)&&b.isPlainObject(p)?b.merge.call({caseless:y},a,p):b.isPlainObject(p)?b.merge({},p):b.isArray(p)?p.slice():p}function o(a,p,m,y){if(b.isUndefined(p)){if(!b.isUndefined(a))return r(void 0,a,m,y)}else return r(a,p,m,y)}function i(a,p){if(!b.isUndefined(p))return r(void 0,p)}function l(a,p){if(b.isUndefined(p)){if(!b.isUndefined(a))return r(void 0,a)}else return r(void 0,p)}function s(a,p,m){if(m in t)return r(a,p);if(m in e)return r(void 0,a)}const u={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(a,p,m)=>o(Lc(a),Lc(p),m,!0)};return b.forEach(Object.keys({...e,...t}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const m=b.hasOwnProp(u,p)?u[p]:o,y=m(e[p],t[p],p);b.isUndefined(y)&&m!==s||(n[p]=y)}),n}const Op=e=>{const t=Bn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:l,auth:s}=t;if(t.headers=l=Ke.from(l),t.url=Cp(Rp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&l.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),b.isFormData(n)){if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(b.isFunction(n.getHeaders)){const u=n.getHeaders(),a=["content-type","content-length"];Object.entries(u).forEach(([p,m])=>{a.includes(p.toLowerCase())&&l.set(p,m)})}}if(We.hasStandardBrowserEnv&&(r&&b.isFunction(r)&&(r=r(t)),r||r!==!1&&h0(t.url))){const u=o&&i&&m0.read(i);u&&l.set(o,u)}return t},y0=typeof XMLHttpRequest<"u",w0=y0&&function(e){return new Promise(function(n,r){const o=Op(e);let i=o.data;const l=Ke.from(o.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:a}=o,p,m,y,P,w;function _(){P&&P(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function g(){if(!x)return;const h=Ke.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:h,config:e,request:x};Tp(function(N){n(N),_()},function(N){r(N),_()},A),x=null}"onloadend"in x?x.onloadend=g:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(g)},x.onabort=function(){x&&(r(new Q("Request aborted",Q.ECONNABORTED,e,x)),x=null)},x.onerror=function(S){const A=S&&S.message?S.message:"Network Error",j=new Q(A,Q.ERR_NETWORK,e,x);j.event=S||null,r(j),x=null},x.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||Vu;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new Q(S,A.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,x)),x=null},i===void 0&&l.setContentType(null),"setRequestHeader"in x&&b.forEach(l.toJSON(),function(S,A){x.setRequestHeader(A,S)}),b.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),s&&s!=="json"&&(x.responseType=o.responseType),a&&([y,w]=ji(a,!0),x.addEventListener("progress",y)),u&&x.upload&&([m,P]=ji(u),x.upload.addEventListener("progress",m),x.upload.addEventListener("loadend",P)),(o.cancelToken||o.signal)&&(p=h=>{x&&(r(!h||h.type?new Ao(null,e,x):h),x.abort(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const f=f0(o.url);if(f&&We.protocols.indexOf(f)===-1){r(new Q("Unsupported protocol "+f+":",Q.ERR_BAD_REQUEST,e));return}x.send(i||null)})},_0=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(a){if(!o){o=!0,s();const p=a instanceof Error?a:this.reason;r.abort(p instanceof Q?p:new Ao(p instanceof Error?p.message:p))}};let l=t&&setTimeout(()=>{l=null,i(new Q(`timeout of ${t}ms exceeded`,Q.ETIMEDOUT))},t);const s=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(a=>{a.unsubscribe?a.unsubscribe(i):a.removeEventListener("abort",i)}),e=null)};e.forEach(a=>a.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>b.asap(s),u}},S0=function*(e,t){let n=e.byteLength;if(n{const o=x0(e,t);let i=0,l,s=u=>{l||(l=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:a,value:p}=await o.next();if(a){s(),u.close();return}let m=p.byteLength;if(n){let y=i+=m;n(y)}u.enqueue(new Uint8Array(p))}catch(a){throw s(a),a}},cancel(u){return s(u),o.return()}},{highWaterMark:2})},Wc=64*1024,{isFunction:qo}=b,k0=(({Request:e,Response:t})=>({Request:e,Response:t}))(b.global),{ReadableStream:Ic,TextEncoder:Mc}=b.global,zc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},b0=e=>{e=b.merge.call({skipUndefined:!0},k0,e);const{fetch:t,Request:n,Response:r}=e,o=t?qo(t):typeof fetch=="function",i=qo(n),l=qo(r);if(!o)return!1;const s=o&&qo(Ic),u=o&&(typeof Mc=="function"?(w=>_=>w.encode(_))(new Mc):async w=>new Uint8Array(await new n(w).arrayBuffer())),a=i&&s&&zc(()=>{let w=!1;const _=new n(We.origin,{body:new Ic,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!_}),p=l&&s&&zc(()=>b.isReadableStream(new r("").body)),m={stream:p&&(w=>w.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!m[w]&&(m[w]=(_,x)=>{let g=_&&_[w];if(g)return g.call(_);throw new Q(`Response type '${w}' is not supported`,Q.ERR_NOT_SUPPORT,x)})});const y=async w=>{if(w==null)return 0;if(b.isBlob(w))return w.size;if(b.isSpecCompliantForm(w))return(await new n(We.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(b.isArrayBufferView(w)||b.isArrayBuffer(w))return w.byteLength;if(b.isURLSearchParams(w)&&(w=w+""),b.isString(w))return(await u(w)).byteLength},P=async(w,_)=>{const x=b.toFiniteNumber(w.getContentLength());return x??y(_)};return async w=>{let{url:_,method:x,data:g,signal:f,cancelToken:h,timeout:S,onDownloadProgress:A,onUploadProgress:j,responseType:N,headers:U,withCredentials:oe="same-origin",fetchOptions:J}=Op(w),je=t||fetch;N=N?(N+"").toLowerCase():"text";let Je=_0([f,h&&h.toAbortSignal()],S),Ge=null;const Xe=Je&&Je.unsubscribe&&(()=>{Je.unsubscribe()});let zn;try{if(j&&a&&x!=="get"&&x!=="head"&&(zn=await P(U,g))!==0){let Z=new n(_,{method:"POST",body:g,duplex:"half"}),re;if(b.isFormData(g)&&(re=Z.headers.get("content-type"))&&U.setContentType(re),Z.body){const[me,Ae]=jc(zn,ji(Nc(j)));g=Bc(Z.body,Wc,me,Ae)}}b.isString(oe)||(oe=oe?"include":"omit");const we=i&&"credentials"in n.prototype,qt={...J,signal:Je,method:x.toUpperCase(),headers:U.normalize().toJSON(),body:g,duplex:"half",credentials:we?oe:void 0};Ge=i&&new n(_,qt);let L=await(i?je(Ge,J):je(_,qt));const $=p&&(N==="stream"||N==="response");if(p&&(A||$&&Xe)){const Z={};["status","statusText","headers"].forEach(Rt=>{Z[Rt]=L[Rt]});const re=b.toFiniteNumber(L.headers.get("content-length")),[me,Ae]=A&&jc(re,ji(Nc(A),!0))||[];L=new r(Bc(L.body,Wc,me,()=>{Ae&&Ae(),Xe&&Xe()}),Z)}N=N||"text";let O=await m[b.findKey(m,N)||"text"](L,w);return!$&&Xe&&Xe(),await new Promise((Z,re)=>{Tp(Z,re,{data:O,headers:Ke.from(L.headers),status:L.status,statusText:L.statusText,config:w,request:Ge})})}catch(we){throw Xe&&Xe(),we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)?Object.assign(new Q("Network Error",Q.ERR_NETWORK,w,Ge,we&&we.response),{cause:we.cause||we}):Q.from(we,we&&we.code,w,Ge,we&&we.response)}}},C0=new Map,jp=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let l=i.length,s=l,u,a,p=C0;for(;s--;)u=i[s],a=p.get(u),a===void 0&&p.set(u,a=s?new Map:b0(t)),p=a;return a};jp();const qu={http:Hy,xhr:w0,fetch:{get:jp}};b.forEach(qu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Fc=e=>`- ${e}`,P0=e=>b.isFunction(e)||e===null||e===!1;function A0(e,t){e=b.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let l=0;l`adapter ${u} `+(a===!1?"is not supported by the environment":"is not available in the build"));let s=n?l.length>1?`since : `+l.map(Fc).join(` `):" "+Fc(l[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o}const Np={getAdapter:A0,adapters:qu};function Hl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ao(null,e)}function Uc(e){return Hl(e),e.headers=Ke.from(e.headers),e.data=Dl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Np.getAdapter(e.adapter||Po.adapter,e)(e).then(function(r){return Hl(e),r.data=Dl.call(e,e.transformResponse,r),r.headers=Ke.from(r.headers),r},function(r){return Ap(r)||(Hl(e),r&&r.response&&(r.response.data=Dl.call(e,e.transformResponse,r.response),r.response.headers=Ke.from(r.response.headers))),Promise.reject(r)})}const Lp="1.13.5",rl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Dc={};rl.transitional=function(t,n,r){function o(i,l){return"[Axios v"+Lp+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,s)=>{if(t===!1)throw new Q(o(l," has been removed"+(n?" in "+n:"")),Q.ERR_DEPRECATED);return n&&!Dc[l]&&(Dc[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,s):!0}};rl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function T0(e,t,n){if(typeof e!="object")throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],l=t[i];if(l){const s=e[i],u=s===void 0||l(s,i,e);if(u!==!0)throw new Q("option "+i+" must be "+u,Q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Q("Unknown option "+i,Q.ERR_BAD_OPTION)}}const si={assertOptions:T0,validators:rl},st=si.validators;let Tn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Rc,response:new Rc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Bn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&si.assertOptions(r,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean),legacyInterceptorReqResOrdering:st.transitional(st.boolean)},!1),o!=null&&(b.isFunction(o)?n.paramsSerializer={serialize:o}:si.assertOptions(o,{encode:st.function,serialize:st.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),si.assertOptions(n,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&b.merge(i.common,i[n.method]);i&&b.forEach(["delete","get","head","post","put","patch","common"],w=>{delete i[w]}),n.headers=Ke.concat(l,i);const s=[];let u=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;u=u&&_.synchronous;const x=n.transitional||Vu;x&&x.legacyInterceptorReqResOrdering?s.unshift(_.fulfilled,_.rejected):s.push(_.fulfilled,_.rejected)});const a=[];this.interceptors.response.forEach(function(_){a.push(_.fulfilled,_.rejected)});let p,m=0,y;if(!u){const w=[Uc.bind(this),void 0];for(w.unshift(...s),w.push(...a),y=w.length,p=Promise.resolve(n);m{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const l=new Promise(s=>{r.subscribe(s),i=s}).then(o);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,s){r.reason||(r.reason=new Ao(i,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Bp(function(o){t=o}),cancel:t}}};function O0(e){return function(n){return e.apply(null,n)}}function j0(e){return b.isObject(e)&&e.isAxiosError===!0}const Vs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Vs).forEach(([e,t])=>{Vs[t]=e});function Wp(e){const t=new Tn(e),n=mp(Tn.prototype.request,t);return b.extend(n,Tn.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Wp(Bn(e,o))},n}const ye=Wp(Po);ye.Axios=Tn;ye.CanceledError=Ao;ye.CancelToken=R0;ye.isCancel=Ap;ye.VERSION=Lp;ye.toFormData=nl;ye.AxiosError=Q;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=O0;ye.isAxiosError=j0;ye.mergeConfig=Bn;ye.AxiosHeaders=Ke;ye.formToJSON=e=>Pp(b.isHTMLForm(e)?new FormData(e):e);ye.getAdapter=Np.getAdapter;ye.HttpStatusCode=Vs;ye.default=ye;const{Axios:q0,AxiosError:Q0,CanceledError:K0,isCancel:J0,CancelToken:G0,VERSION:X0,all:Y0,Cancel:Z0,isAxiosError:ew,spread:tw,toFormData:nw,AxiosHeaders:rw,HttpStatusCode:ow,formToJSON:iw,getAdapter:lw,mergeConfig:sw}=ye,Vl={},N0=(Vl==null?void 0:Vl.VITE_API_URL)||"http://localhost:3000",nt=ye.create({baseURL:N0,withCredentials:!0});nt.interceptors.request.use(e=>{const t=localStorage.getItem("auth_token");return t&&(e.headers=e.headers||{},e.headers.Authorization=`Bearer ${t}`),e});function L0(){const e=Eo(),[t,n]=R.useState(null),[r,o]=R.useState(!0);R.useEffect(()=>{i()},[]);const i=async()=>{try{const l=St.initData;l&&await nt.post("/auth/telegram",{initData:l});const s=await nt.get("/commissions/balance");n(s.data)}catch(l){console.error("Error loading data:",l),St.showAlert("Ошибка загрузки данных")}finally{o(!1)}};return r?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:"Здоровая Нация"}),t&&k.jsxs("div",{style:{marginBottom:"30px",padding:"15px",background:"#f5f5f5",borderRadius:"10px"},children:[k.jsxs("div",{style:{marginBottom:"10px"},children:[k.jsx("strong",{children:"Доступно:"})," ",t.available.toFixed(2)," ₽"]}),k.jsxs("div",{children:[k.jsx("strong",{children:"В ожидании:"})," ",t.pending.toFixed(2)," ₽"]})]}),k.jsx("button",{onClick:()=>e("/shop"),style:{width:"100%",padding:"15px",marginBottom:"15px",fontSize:"16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"🛒 Купить подписку"}),k.jsx("button",{onClick:()=>e("/referral"),style:{width:"100%",padding:"15px",marginBottom:"15px",fontSize:"16px",backgroundColor:"#28a745",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"👥 Реферальная программа"}),k.jsx("button",{onClick:()=>e("/commissions"),style:{width:"100%",padding:"15px",marginBottom:"15px",fontSize:"16px",backgroundColor:"#6c757d",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"💰 Комиссии"}),k.jsx("button",{onClick:()=>e("/settings"),style:{width:"100%",padding:"15px",fontSize:"16px",backgroundColor:"#6c757d",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"⚙️ Настройки"})]})}function B0(){const e=Eo(),[t,n]=R.useState([]),[r,o]=R.useState(!0);R.useEffect(()=>{i()},[]);const i=async()=>{try{const l=await nt.get("/products");n(l.data)}catch(l){console.error("Error loading products:",l)}finally{o(!1)}};return r?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:"Магазин"}),t.length===0?k.jsx("div",{style:{textAlign:"center",padding:"40px"},children:"Нет доступных продуктов"}):k.jsx("div",{children:t.map(l=>k.jsxs("div",{onClick:()=>e(`/product/${l.id}`),style:{padding:"15px",marginBottom:"15px",border:"1px solid #ddd",borderRadius:"10px",cursor:"pointer"},children:[k.jsx("h3",{style:{marginBottom:"10px"},children:l.name}),k.jsx("p",{style:{marginBottom:"10px",color:"#666"},children:l.description}),k.jsxs("div",{style:{fontSize:"18px",fontWeight:"bold",color:"#007bff"},children:[l.price," ",l.currency]})]},l.id))})]})}function W0(){const{id:e}=jv(),[t,n]=R.useState(null),[r,o]=R.useState(!0),[i,l]=R.useState(!1);R.useEffect(()=>{s()},[e]);const s=async()=>{try{const a=await nt.get(`/products/${e}`);n(a.data)}catch(a){console.error("Error loading product:",a),St.showAlert("Ошибка загрузки продукта")}finally{o(!1)}},u=async()=>{var a,p;if(t){l(!0);try{const m=await nt.post("/orders/create",{product_id:t.id}),y=await nt.post("/payments/create",{order_id:m.data.order_id});y.data.payment_url?window.location.href=y.data.payment_url:St.showAlert("Ошибка создания платежа")}catch(m){console.error("Error creating order:",m),St.showAlert(((p=(a=m.response)==null?void 0:a.data)==null?void 0:p.message)||"Ошибка создания заказа")}finally{l(!1)}}};return r?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):t?k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:t.name}),k.jsx("p",{style:{marginBottom:"20px",color:"#666"},children:t.description}),k.jsxs("div",{style:{fontSize:"24px",fontWeight:"bold",marginBottom:"30px",color:"#007bff"},children:[t.price," ",t.currency]}),k.jsx("button",{onClick:u,disabled:i,style:{width:"100%",padding:"15px",fontSize:"18px",backgroundColor:i?"#ccc":"#28a745",color:"white",border:"none",borderRadius:"8px",cursor:i?"not-allowed":"pointer"},children:i?"Обработка...":"Оплатить"})]}):k.jsx("div",{style:{padding:"20px"},children:"Продукт не найден"})}function I0(){const e=Eo(),[t]=Zv(),[n,r]=R.useState(null);return R.useEffect(()=>{const o=t.get("status")||"success";r(o==="success"?"success":"fail")},[t]),n===null?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):k.jsxs("div",{style:{padding:"20px",textAlign:"center"},children:[n==="success"?k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{fontSize:"64px",marginBottom:"20px"},children:"✅"}),k.jsx("h1",{style:{marginBottom:"20px"},children:"Оплата успешна!"}),k.jsx("p",{style:{marginBottom:"30px",color:"#666"},children:"Ваша подписка активирована. Комиссии будут начислены после проверки."})]}):k.jsxs(k.Fragment,{children:[k.jsx("div",{style:{fontSize:"64px",marginBottom:"20px"},children:"❌"}),k.jsx("h1",{style:{marginBottom:"20px"},children:"Оплата не прошла"}),k.jsx("p",{style:{marginBottom:"30px",color:"#666"},children:"Произошла ошибка при обработке платежа. Попробуйте ещё раз."})]}),k.jsx("button",{onClick:()=>e("/"),style:{width:"100%",padding:"15px",fontSize:"16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Вернуться на главную"})]})}function M0(){const[e,t]=R.useState(null),[n,r]=R.useState(""),[o,i]=R.useState(!0);R.useEffect(()=>{l()},[]);const l=async()=>{try{const[a,p]=await Promise.all([nt.get("/referral/stats"),nt.get("/referral/link")]);t(a.data),r(p.data.referral_link)}catch(a){console.error("Error loading referral data:",a),St.showAlert("Ошибка загрузки данных")}finally{i(!1)}},s=()=>{navigator.clipboard.writeText(n),St.showAlert("Ссылка скопирована!")},u=()=>{navigator.clipboard.writeText(n),St.showAlert("Ссылка скопирована!")};return o?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:"Реферальная программа"}),e&&k.jsx("div",{style:{marginBottom:"30px"},children:k.jsxs("div",{style:{padding:"15px",background:"#f5f5f5",borderRadius:"10px",marginBottom:"15px"},children:[k.jsxs("div",{style:{marginBottom:"10px"},children:[k.jsx("strong",{children:"Приглашено партнёров:"})," ",e.invited_count]}),k.jsxs("div",{style:{marginBottom:"10px"},children:[k.jsx("strong",{children:"Оплаченных заказов:"})," ",e.paid_count]}),k.jsxs("div",{style:{marginBottom:"10px"},children:[k.jsx("strong",{children:"Оборот:"})," ",e.turnover_sum.toFixed(2)," ₽"]}),k.jsxs("div",{children:[k.jsx("strong",{children:"Заработано комиссий:"})," ",e.commissions_sum.toFixed(2)," ₽"]})]})}),k.jsxs("div",{style:{marginBottom:"30px"},children:[k.jsx("h2",{style:{marginBottom:"15px"},children:"Моя реферальная ссылка"}),k.jsx("div",{style:{padding:"15px",background:"#f5f5f5",borderRadius:"10px",marginBottom:"15px",wordBreak:"break-all",fontSize:"14px"},children:n}),k.jsxs("div",{style:{display:"flex",gap:"10px"},children:[k.jsx("button",{onClick:s,style:{flex:1,padding:"12px",fontSize:"16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Копировать"}),k.jsx("button",{onClick:u,style:{flex:1,padding:"12px",fontSize:"16px",backgroundColor:"#28a745",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Поделиться"})]})]})]})}function z0(){const[e,t]=R.useState([]),[n,r]=R.useState("all"),[o,i]=R.useState(!0);R.useEffect(()=>{l()},[n]);const l=async()=>{try{const u=n==="all"?"/commissions":`/commissions?status=${n}`,a=await nt.get(u);t(a.data)}catch(u){console.error("Error loading commissions:",u)}finally{i(!1)}},s=u=>({pending:"В ожидании",available:"Доступно",paid:"Выплачено",void:"Аннулировано"})[u]||u;return o?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:"Комиссии"}),k.jsx("div",{style:{marginBottom:"20px",display:"flex",gap:"10px",flexWrap:"wrap"},children:["all","pending","available","paid"].map(u=>k.jsx("button",{onClick:()=>r(u),style:{padding:"8px 16px",fontSize:"14px",backgroundColor:n===u?"#007bff":"#f5f5f5",color:n===u?"white":"#000",border:"none",borderRadius:"6px",cursor:"pointer"},children:u==="all"?"Все":s(u)},u))}),e.length===0?k.jsx("div",{style:{textAlign:"center",padding:"40px"},children:"Нет комиссий"}):k.jsx("div",{children:e.map(u=>k.jsxs("div",{style:{padding:"15px",marginBottom:"15px",border:"1px solid #ddd",borderRadius:"10px"},children:[k.jsx("div",{style:{marginBottom:"10px"},children:k.jsx("strong",{children:u.order.product.name})}),k.jsxs("div",{style:{marginBottom:"5px"},children:["Уровень ",u.level," (",u.rate_percent,"%)"]}),k.jsxs("div",{style:{marginBottom:"5px",fontSize:"18px",fontWeight:"bold",color:"#28a745"},children:["+",u.amount.toFixed(2)," ₽"]}),k.jsxs("div",{style:{fontSize:"14px",color:"#666"},children:["Статус: ",s(u.status)]}),k.jsx("div",{style:{fontSize:"12px",color:"#999",marginTop:"5px"},children:new Date(u.created_at).toLocaleDateString("ru-RU")})]},u.id))})]})}function F0(){const[e,t]=R.useState([]),[n,r]=R.useState(null),[o,i]=R.useState(!1),[l,s]=R.useState({amount:"",method:"card",account:"",card:"",bank:""}),[u,a]=R.useState(!0),[p,m]=R.useState(!1);R.useEffect(()=>{y()},[]);const y=async()=>{try{const[_,x]=await Promise.all([nt.get("/commissions/balance"),nt.get("/payouts")]);r(_.data),t(x.data)}catch(_){console.error("Error loading payout data:",_)}finally{a(!1)}},P=async _=>{var x,g;if(_.preventDefault(),!n||parseFloat(l.amount)>n.available){St.showAlert("Недостаточно средств");return}m(!0);try{await nt.post("/payouts/request",{amount:parseFloat(l.amount),payment_details:{method:l.method,account:l.account||void 0,card:l.card||void 0,bank:l.bank||void 0}}),St.showAlert("Запрос на вывод создан"),i(!1),s({amount:"",method:"card",account:"",card:"",bank:""}),y()}catch(f){console.error("Error creating payout:",f),St.showAlert(((g=(x=f.response)==null?void 0:x.data)==null?void 0:g.message)||"Ошибка создания запроса")}finally{m(!1)}},w=_=>({requested:"На рассмотрении",approved:"Одобрено",rejected:"Отклонено",paid:"Выплачено"})[_]||_;return u?k.jsx("div",{style:{padding:"20px",textAlign:"center"},children:"Загрузка..."}):k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:"Вывод средств"}),n&&k.jsx("div",{style:{padding:"15px",background:"#f5f5f5",borderRadius:"10px",marginBottom:"20px"},children:k.jsxs("div",{children:[k.jsx("strong",{children:"Доступно для вывода:"})," ",n.available.toFixed(2)," ₽"]})}),o?k.jsxs("form",{onSubmit:P,style:{marginBottom:"30px"},children:[k.jsxs("div",{style:{marginBottom:"15px"},children:[k.jsx("label",{style:{display:"block",marginBottom:"5px"},children:"Сумма"}),k.jsx("input",{type:"number",step:"0.01",value:l.amount,onChange:_=>s({...l,amount:_.target.value}),required:!0,style:{width:"100%",padding:"10px",border:"1px solid #ddd",borderRadius:"6px"}})]}),k.jsxs("div",{style:{marginBottom:"15px"},children:[k.jsx("label",{style:{display:"block",marginBottom:"5px"},children:"Способ вывода"}),k.jsxs("select",{value:l.method,onChange:_=>s({...l,method:_.target.value}),style:{width:"100%",padding:"10px",border:"1px solid #ddd",borderRadius:"6px"},children:[k.jsx("option",{value:"card",children:"Банковская карта"}),k.jsx("option",{value:"account",children:"Расчётный счёт"})]})]}),l.method==="card"&&k.jsxs("div",{style:{marginBottom:"15px"},children:[k.jsx("label",{style:{display:"block",marginBottom:"5px"},children:"Номер карты"}),k.jsx("input",{type:"text",value:l.card,onChange:_=>s({...l,card:_.target.value}),required:!0,placeholder:"0000 0000 0000 0000",style:{width:"100%",padding:"10px",border:"1px solid #ddd",borderRadius:"6px"}})]}),l.method==="account"&&k.jsxs(k.Fragment,{children:[k.jsxs("div",{style:{marginBottom:"15px"},children:[k.jsx("label",{style:{display:"block",marginBottom:"5px"},children:"Расчётный счёт"}),k.jsx("input",{type:"text",value:l.account,onChange:_=>s({...l,account:_.target.value}),required:!0,style:{width:"100%",padding:"10px",border:"1px solid #ddd",borderRadius:"6px"}})]}),k.jsxs("div",{style:{marginBottom:"15px"},children:[k.jsx("label",{style:{display:"block",marginBottom:"5px"},children:"Банк"}),k.jsx("input",{type:"text",value:l.bank,onChange:_=>s({...l,bank:_.target.value}),required:!0,style:{width:"100%",padding:"10px",border:"1px solid #ddd",borderRadius:"6px"}})]})]}),k.jsxs("div",{style:{display:"flex",gap:"10px"},children:[k.jsx("button",{type:"submit",disabled:p,style:{flex:1,padding:"12px",fontSize:"16px",backgroundColor:p?"#ccc":"#28a745",color:"white",border:"none",borderRadius:"8px",cursor:p?"not-allowed":"pointer"},children:p?"Отправка...":"Отправить"}),k.jsx("button",{type:"button",onClick:()=>{i(!1),s({amount:"",method:"card",account:"",card:"",bank:""})},style:{flex:1,padding:"12px",fontSize:"16px",backgroundColor:"#6c757d",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Отмена"})]})]}):k.jsx("button",{onClick:()=>i(!0),style:{width:"100%",padding:"15px",marginBottom:"30px",fontSize:"16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"Запросить вывод"}),k.jsx("h2",{style:{marginBottom:"15px"},children:"История выводов"}),e.length===0?k.jsx("div",{style:{textAlign:"center",padding:"40px"},children:"Нет запросов на вывод"}):k.jsx("div",{children:e.map(_=>k.jsxs("div",{style:{padding:"15px",marginBottom:"15px",border:"1px solid #ddd",borderRadius:"10px"},children:[k.jsxs("div",{style:{marginBottom:"10px",fontSize:"18px",fontWeight:"bold"},children:[_.amount.toFixed(2)," ₽"]}),k.jsxs("div",{style:{marginBottom:"5px"},children:["Статус: ",w(_.status)]}),_.admin_comment&&k.jsxs("div",{style:{fontSize:"14px",color:"#666",marginTop:"10px"},children:["Комментарий: ",_.admin_comment]}),k.jsx("div",{style:{fontSize:"12px",color:"#999",marginTop:"5px"},children:new Date(_.created_at).toLocaleDateString("ru-RU")})]},_.id))})]})}function U0(){const e=Eo();return k.jsxs("div",{style:{padding:"20px"},children:[k.jsx("h1",{style:{marginBottom:"20px"},children:"Настройки"}),k.jsx("button",{onClick:()=>e("/payout"),style:{width:"100%",padding:"15px",marginBottom:"15px",fontSize:"16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"8px",cursor:"pointer"},children:"💰 Вывод средств"}),k.jsxs("div",{style:{padding:"20px",background:"#f5f5f5",borderRadius:"10px",marginBottom:"20px"},children:[k.jsx("h3",{style:{marginBottom:"15px"},children:"О проекте"}),k.jsx("p",{style:{marginBottom:"10px",color:"#666"},children:"Здоровая Нация — платформа для здорового образа жизни с реферальной программой."}),k.jsx("p",{style:{color:"#666"},children:"Приглашайте друзей и получайте комиссию с их покупок!"})]}),k.jsxs("div",{style:{padding:"20px",background:"#f5f5f5",borderRadius:"10px"},children:[k.jsx("h3",{style:{marginBottom:"15px"},children:"Поддержка"}),k.jsx("p",{style:{color:"#666"},children:"По вопросам обращайтесь в поддержку через Telegram бота."})]})]})}function D0(){return R.useEffect(()=>{ey(),ty()},[]),k.jsx(Yv,{children:k.jsxs(Kv,{children:[k.jsx(Bt,{path:"/",element:k.jsx(L0,{})}),k.jsx(Bt,{path:"/shop",element:k.jsx(B0,{})}),k.jsx(Bt,{path:"/product/:id",element:k.jsx(W0,{})}),k.jsx(Bt,{path:"/payment/result",element:k.jsx(I0,{})}),k.jsx(Bt,{path:"/referral",element:k.jsx(M0,{})}),k.jsx(Bt,{path:"/commissions",element:k.jsx(z0,{})}),k.jsx(Bt,{path:"/payout",element:k.jsx(F0,{})}),k.jsx(Bt,{path:"/settings",element:k.jsx(U0,{})})]})})}$l.createRoot(document.getElementById("root")).render(k.jsx(Zc.StrictMode,{children:k.jsx(D0,{})}));