@maincode-ai/matilda-code 0.21.12 → 0.21.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/mainy/docs/configuration/model-providers.md +0 -82
- package/bundled/mainy/docs/configuration/settings.md +30 -2
- package/bundled/mainy/docs/features/auto-mode.md +1 -1
- package/bundled/mainy/docs/features/channels/_meta.ts +0 -3
- package/bundled/mainy/docs/features/channels/overview.md +8 -16
- package/bundled/mainy/docs/features/commands.md +4 -4
- package/bundled/mainy/docs/features/hooks.md +9 -7
- package/bundled/mainy/docs/features/language.md +2 -29
- package/bundled/mainy/docs/features/worktree.md +0 -2
- package/bundled/mainy/docs/integration-github-action.md +3 -3
- package/bundled/mainy/docs/quickstart.md +2 -2
- package/bundled/mainy/docs/support/troubleshooting.md +1 -1
- package/chunks/agent-SRAIVZEE.js +3 -0
- package/chunks/agent-headless-XRDOZESG.js +3 -0
- package/chunks/{anthropicContentGenerator-VKFTAIU3.js → anthropicContentGenerator-LLDIKDMQ.js} +3 -3
- package/chunks/{askUserQuestion-2QI4NSFJ.js → askUserQuestion-BNSWGD26.js} +1 -1
- package/chunks/{ca-I2HEEIL7.js → ca-NPYL24ME.js} +2 -2
- package/chunks/{chunk-YJAKOETP.js → chunk-27HUYW23.js} +2 -2
- package/chunks/{chunk-EQGA7LH7.js → chunk-3B2HABK7.js} +1 -1
- package/chunks/{chunk-CSJTA7NE.js → chunk-3MTZTNAU.js} +18 -18
- package/chunks/{chunk-YRQP3SLC.js → chunk-5OHGYMKP.js} +1 -1
- package/chunks/chunk-6I6VGTKD.js +8 -0
- package/chunks/{chunk-MCQUPLRE.js → chunk-6M5G5FBH.js} +1 -1
- package/chunks/chunk-7ZODGQO6.js +4 -0
- package/chunks/chunk-AOOZREGV.js +9 -0
- package/chunks/chunk-DHDD5YJC.js +207 -0
- package/chunks/{chunk-WV3IUPZS.js → chunk-EZDV7A76.js} +1 -1
- package/chunks/{chunk-QVCGLQCI.js → chunk-IJEGHQ7Z.js} +3 -3
- package/chunks/{chunk-5C2RJ5RR.js → chunk-LWARA7JY.js} +1 -1
- package/chunks/{chunk-VTGICC67.js → chunk-MEV5XQI2.js} +1 -1
- package/chunks/{chunk-DOOFGSRV.js → chunk-P5TG5CON.js} +1 -1
- package/chunks/{chunk-JRECUFB3.js → chunk-PEKAUGYV.js} +552 -561
- package/chunks/chunk-PGUG43HG.js +24 -0
- package/chunks/{chunk-CZGZ3KK7.js → chunk-QZI2ZGZY.js} +1 -1
- package/chunks/chunk-RI54U73U.js +56 -0
- package/chunks/chunk-RPFSFS7Z.js +39 -0
- package/chunks/chunk-SOEIVSM5.js +113 -0
- package/chunks/{chunk-4J6DC24J.js → chunk-SVSY6AWS.js} +1 -1
- package/chunks/{chunk-6E766NPX.js → chunk-TWJLOEAI.js} +1 -1
- package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
- package/chunks/chunk-W4QSMIWO.js +9 -0
- package/chunks/chunk-ZX34M2GF.js +14 -0
- package/chunks/{computer-use-WKDNUTLD.js → computer-use-J4GAM4M6.js} +1 -1
- package/chunks/contextCommand-5F5M7NA4.js +3 -0
- package/chunks/{cron-create-F2LXM2OA.js → cron-create-IDWSZENI.js} +1 -1
- package/chunks/{cron-delete-DE6Q2S2L.js → cron-delete-NQCDZDUI.js} +1 -1
- package/chunks/{cron-list-IAQEJVV7.js → cron-list-Z4XMC3TO.js} +1 -1
- package/chunks/{de-AQXFJYZI.js → de-34YZHGC6.js} +2 -2
- package/chunks/{devtools-5JRKK3E7.js → devtools-XRQ4YJ5S.js} +1 -1
- package/chunks/{dist-P6SLWL5V.js → dist-PH6JW7XD.js} +1 -1
- package/chunks/{edit-QQNJZ55P.js → edit-X2S2ZXRN.js} +1 -1
- package/chunks/{en-EJLDYIBM.js → en-QLGMD6OS.js} +3 -3
- package/chunks/{enter-worktree-5X5SAMBJ.js → enter-worktree-TUCGNCLO.js} +1 -1
- package/chunks/{enterPlanMode-HP35SPLN.js → enterPlanMode-SQEZAAIR.js} +1 -1
- package/chunks/{exit-worktree-SRKZBEYF.js → exit-worktree-7FLITFZI.js} +1 -1
- package/chunks/{exitPlanMode-WSPTGGVN.js → exitPlanMode-O5UUJ3GM.js} +1 -1
- package/chunks/{fr-6TDHK7F2.js → fr-EDNBQACJ.js} +3 -3
- package/chunks/geminiContentGenerator-FIZFLPU3.js +8 -0
- package/chunks/glob-GSFTYAS2.js +22 -0
- package/chunks/{goal-tools-C6BSBHCF.js → goal-tools-YQOA6OKU.js} +1 -1
- package/chunks/{grep-MVCOBUYW.js → grep-VAB2VSXM.js} +1 -1
- package/chunks/{ja-GGNJR7AR.js → ja-LV4RLM3M.js} +2 -2
- package/chunks/{ls-JYJXFSXN.js → ls-IZJ3CKZY.js} +1 -1
- package/chunks/{lsp-DYDK6XCS.js → lsp-NGLDRHZU.js} +1 -1
- package/chunks/matildaAgentContentGenerator-QQHPCFJ5.js +8 -0
- package/chunks/matildaContentGenerator-W7Z33ONU.js +8 -0
- package/chunks/mcp-client-DXUNIEIB.js +3 -0
- package/chunks/monitor-4PFIGAGG.js +32 -0
- package/chunks/notebook-edit-MWJYAATJ.js +17 -0
- package/chunks/{openaiContentGenerator-2EALAM3U.js → openaiContentGenerator-NDVJL6QL.js} +1 -1
- package/chunks/{pt-D6L2QTDM.js → pt-5SQ4DGL7.js} +2 -2
- package/chunks/read-file-WPZKPXWA.js +3 -0
- package/chunks/ripGrep-7LZDZFTX.js +3 -0
- package/chunks/{ru-BNJCHDYO.js → ru-7K24S53N.js} +2 -2
- package/chunks/scheduler-DK2MVKXX.js +8 -0
- package/chunks/{send-message-P3SMWNEE.js → send-message-TCPX5UDU.js} +1 -1
- package/chunks/{serve-FXH6EBQ6.js → serve-GSZPJI2O.js} +59 -48
- package/chunks/shell-PRS47PDP.js +3 -0
- package/chunks/{skill-HZPFEAPF.js → skill-ETQM5NI3.js} +1 -1
- package/chunks/src-UB7DZRYK.js +3 -0
- package/chunks/{symbol-search-EAIZPWN7.js → symbol-search-HARHZ5AH.js} +1 -1
- package/chunks/{syntheticOutput-432LXITX.js → syntheticOutput-WZDPECYS.js} +1 -1
- package/chunks/task-create-XRNIDT4T.js +3 -0
- package/chunks/{task-detach-XMSJ3HBM.js → task-detach-TBAVUOTC.js} +1 -1
- package/chunks/task-list-Z6BDZZID.js +9 -0
- package/chunks/{task-stop-NTS62FLG.js → task-stop-HDSARSJ6.js} +1 -1
- package/chunks/{task-update-AR26UFYZ.js → task-update-MW2VT2XV.js} +1 -1
- package/chunks/{team-create-PYXFVIR5.js → team-create-VMYNLZCC.js} +1 -1
- package/chunks/team-delete-F7QDC2TE.js +8 -0
- package/chunks/{todoWrite-5NZ7CHTC.js → todoWrite-SCF5M24M.js} +1 -1
- package/chunks/{tool-search-RKZDSRYS.js → tool-search-WX6FOE35.js} +1 -1
- package/chunks/{web-fetch-VW3SVDQ6.js → web-fetch-CKYBHGLF.js} +1 -1
- package/chunks/{web-search-XQUIZARL.js → web-search-67DFNS5V.js} +1 -1
- package/chunks/{workflow-YXNXDRWZ.js → workflow-WBSRQG3N.js} +2 -2
- package/chunks/write-file-S5FAX4JJ.js +15 -0
- package/cli.js +436 -439
- package/locales/ca.js +0 -3
- package/locales/de.js +0 -3
- package/locales/en.js +0 -3
- package/locales/fr.js +0 -3
- package/locales/ja.js +0 -3
- package/locales/pt.js +0 -3
- package/locales/ru.js +0 -3
- package/package.json +2 -2
- package/sandbox-macos-permissive-closed.sb +0 -1
- package/sandbox-macos-permissive-open.sb +0 -1
- package/sandbox-macos-permissive-proxied.sb +0 -1
- package/sandbox-macos-restrictive-closed.sb +0 -1
- package/sandbox-macos-restrictive-open.sb +0 -1
- package/sandbox-macos-restrictive-proxied.sb +0 -1
- package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
- package/bundled/mainy/docs/features/channels/feishu.md +0 -186
- package/bundled/mainy/docs/features/channels/weixin.md +0 -106
- package/chunks/agent-WM63A6NK.js +0 -3
- package/chunks/agent-headless-QIUBDKPW.js +0 -3
- package/chunks/chunk-2MOGYHWM.js +0 -8
- package/chunks/chunk-3IRGBRSP.js +0 -113
- package/chunks/chunk-6GBNB5Z2.js +0 -3
- package/chunks/chunk-6Z2MV7ZY.js +0 -186
- package/chunks/chunk-BVOCFLC4.js +0 -56
- package/chunks/chunk-FPO57O66.js +0 -39
- package/chunks/chunk-LJR4RZZ2.js +0 -3
- package/chunks/chunk-MO2HXJG5.js +0 -9
- package/chunks/chunk-PA6532AY.js +0 -6
- package/chunks/chunk-S3CWEVTS.js +0 -15
- package/chunks/chunk-U347OO7S.js +0 -9
- package/chunks/chunk-UIRBHC5X.js +0 -3
- package/chunks/chunk-WVY2P6WH.js +0 -26
- package/chunks/chunk-WZ75OGYY.js +0 -14
- package/chunks/chunk-XMZIY7XX.js +0 -13
- package/chunks/contextCommand-DAB3HOHY.js +0 -3
- package/chunks/dist-ME6647DQ.js +0 -195
- package/chunks/dist-VG3ZDJ2A.js +0 -28
- package/chunks/dist-YTCHM57U.js +0 -23
- package/chunks/geminiContentGenerator-RJ73DQAP.js +0 -8
- package/chunks/glob-QQ6LGKDX.js +0 -22
- package/chunks/matildaAgentContentGenerator-YUYS4336.js +0 -8
- package/chunks/matildaContentGenerator-O4Z2QPCP.js +0 -8
- package/chunks/mcp-client-RXVQU5VI.js +0 -3
- package/chunks/monitor-77KXDXPR.js +0 -32
- package/chunks/notebook-edit-TKJD2EQZ.js +0 -17
- package/chunks/read-file-3KUAH6ND.js +0 -3
- package/chunks/ripGrep-U2PLKXMY.js +0 -3
- package/chunks/scheduler-J7VU2V5Y.js +0 -8
- package/chunks/shell-PXR2AXDD.js +0 -3
- package/chunks/src-RFAEPLY7.js +0 -3
- package/chunks/task-create-Z3QRCMX4.js +0 -3
- package/chunks/task-list-GXAJW3JP.js +0 -9
- package/chunks/team-delete-OMYVUAQU.js +0 -8
- package/chunks/write-file-XDDLTGSG.js +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{c as No}from"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{b as gn}from"./chunk-GZPNIYVZ.js";import{d as sp,f as cp}from"./chunk-OWGSC52X.js";var Pu=sp((ko,qa)=>{gn();(function(vr,bt){typeof ko=="object"&&typeof qa=="object"?qa.exports=bt():typeof define=="function"&&define.amd?define([],bt):typeof ko=="object"?ko.ReactDevToolsBackend=bt():vr.ReactDevToolsBackend=bt()})(self,()=>(()=>{var Wr={786:(ke,k,be)=>{"use strict";var X;function Ce(P){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(S){return typeof S}:Ce=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},Ce(P)}var Ue=be(206),Ot=be(189),Pe=Object.assign,g=Ot.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=Symbol.for("react.context"),T=Symbol.for("react.memo_cache_sentinel"),N=Object.prototype.hasOwnProperty,B=[],fe=null;function ue(){if(fe===null){var P=new Map;try{if(se.useContext({_currentValue:null}),se.useState(null),se.useReducer(function(le){return le},null),se.useRef(null),typeof se.useCacheRefresh=="function"&&se.useCacheRefresh(),se.useLayoutEffect(function(){}),se.useInsertionEffect(function(){}),se.useEffect(function(){}),se.useImperativeHandle(void 0,function(){return null}),se.useDebugValue(null),se.useCallback(function(){}),se.useTransition(),se.useSyncExternalStore(function(){return function(){}},function(){return null},function(){return null}),se.useDeferredValue(null),se.useMemo(function(){return null}),se.useOptimistic(null,function(le){return le}),se.useFormState(function(le){return le},null),se.useActionState(function(le){return le},null),se.useHostTransitionStatus(),typeof se.useMemoCache=="function"&&se.useMemoCache(0),typeof se.use=="function"){se.use({$$typeof:_,_currentValue:null}),se.use({then:function(){},status:"fulfilled",value:null});try{se.use({then:function(){}})}catch{}}se.useId(),typeof se.useEffectEvent=="function"&&se.useEffectEvent(function(){})}finally{var b=B;B=[]}for(var S=0;S<b.length;S++){var ce=b[S];P.set(ce.primitive,Ue.parse(ce.stackError))}fe=P}return fe}var V=null,ae=null,ie=null;function K(){var P=ae;return P!==null&&(ae=P.next),P}function re(P){if(V===null)return P._currentValue;if(ie===null)throw Error("Context reads do not line up with context dependencies. This is a bug in React Debug Tools.");return N.call(ie,"memoizedValue")?(P=ie.memoizedValue,ie=ie.next):P=P._currentValue,P}var tt=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),se={readContext:re,use:function(b){if(b!==null&&Ce(b)==="object"){if(typeof b.then=="function"){switch(b.status){case"fulfilled":var S=b.value;return B.push({displayName:null,primitive:"Promise",stackError:Error(),value:S,debugInfo:b._debugInfo===void 0?null:b._debugInfo,dispatcherHookName:"Use"}),S;case"rejected":throw b.reason}throw B.push({displayName:null,primitive:"Unresolved",stackError:Error(),value:b,debugInfo:b._debugInfo===void 0?null:b._debugInfo,dispatcherHookName:"Use"}),tt}if(b.$$typeof===_)return S=re(b),B.push({displayName:b.displayName||"Context",primitive:"Context (use)",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"Use"}),S}throw Error("An unsupported type was passed to use(): "+String(b))},useCallback:function(b){var S=K();return B.push({displayName:null,primitive:"Callback",stackError:Error(),value:S!==null?S.memoizedState[0]:b,debugInfo:null,dispatcherHookName:"Callback"}),b},useContext:function(b){var S=re(b);return B.push({displayName:b.displayName||null,primitive:"Context",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"Context"}),S},useEffect:function(b){K(),B.push({displayName:null,primitive:"Effect",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Effect"})},useImperativeHandle:function(b){K();var S=void 0;b!==null&&Ce(b)==="object"&&(S=b.current),B.push({displayName:null,primitive:"ImperativeHandle",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"ImperativeHandle"})},useLayoutEffect:function(b){K(),B.push({displayName:null,primitive:"LayoutEffect",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"LayoutEffect"})},useInsertionEffect:function(b){K(),B.push({displayName:null,primitive:"InsertionEffect",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"InsertionEffect"})},useMemo:function(b){var S=K();return b=S!==null?S.memoizedState[0]:b(),B.push({displayName:null,primitive:"Memo",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Memo"}),b},useReducer:function(b,S,ce){return b=K(),S=b!==null?b.memoizedState:ce!==void 0?ce(S):S,B.push({displayName:null,primitive:"Reducer",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"Reducer"}),[S,function(){}]},useRef:function(b){var S=K();return b=S!==null?S.memoizedState:{current:b},B.push({displayName:null,primitive:"Ref",stackError:Error(),value:b.current,debugInfo:null,dispatcherHookName:"Ref"}),b},useState:function(b){var S=K();return b=S!==null?S.memoizedState:typeof b=="function"?b():b,B.push({displayName:null,primitive:"State",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"State"}),[b,function(){}]},useDebugValue:function(b,S){B.push({displayName:null,primitive:"DebugValue",stackError:Error(),value:typeof S=="function"?S(b):b,debugInfo:null,dispatcherHookName:"DebugValue"})},useDeferredValue:function(b){var S=K();return b=S!==null?S.memoizedState:b,B.push({displayName:null,primitive:"DeferredValue",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"DeferredValue"}),b},useTransition:function(){var b=K();return K(),b=b!==null?b.memoizedState:!1,B.push({displayName:null,primitive:"Transition",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Transition"}),[b,function(){}]},useSyncExternalStore:function(b,S){return K(),K(),b=S(),B.push({displayName:null,primitive:"SyncExternalStore",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"SyncExternalStore"}),b},useId:function(){var b=K();return b=b!==null?b.memoizedState:"",B.push({displayName:null,primitive:"Id",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Id"}),b},useHostTransitionStatus:function(){var b=re({_currentValue:null});return B.push({displayName:null,primitive:"HostTransitionStatus",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"HostTransitionStatus"}),b},useFormState:function(b,S){var ce=K();K(),K(),b=Error();var le=null,Ve=null;if(ce!==null)if(S=ce.memoizedState,Ce(S)==="object"&&S!==null&&typeof S.then=="function")switch(S.status){case"fulfilled":var je=S.value;le=S._debugInfo===void 0?null:S._debugInfo;break;case"rejected":Ve=S.reason;break;default:Ve=tt,le=S._debugInfo===void 0?null:S._debugInfo,je=S}else je=S;else je=S;if(B.push({displayName:null,primitive:"FormState",stackError:b,value:je,debugInfo:le,dispatcherHookName:"FormState"}),Ve!==null)throw Ve;return[je,function(){},!1]},useActionState:function(b,S){var ce=K();K(),K(),b=Error();var le=null,Ve=null;if(ce!==null)if(S=ce.memoizedState,Ce(S)==="object"&&S!==null&&typeof S.then=="function")switch(S.status){case"fulfilled":var je=S.value;le=S._debugInfo===void 0?null:S._debugInfo;break;case"rejected":Ve=S.reason;break;default:Ve=tt,le=S._debugInfo===void 0?null:S._debugInfo,je=S}else je=S;else je=S;if(B.push({displayName:null,primitive:"ActionState",stackError:b,value:je,debugInfo:le,dispatcherHookName:"ActionState"}),Ve!==null)throw Ve;return[je,function(){},!1]},useOptimistic:function(b){var S=K();return b=S!==null?S.memoizedState:b,B.push({displayName:null,primitive:"Optimistic",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Optimistic"}),[b,function(){}]},useMemoCache:function(b){var S=V;if(S==null)return[];if(S=S.updateQueue!=null?S.updateQueue.memoCache:null,S==null)return[];var ce=S.data[S.index];if(ce===void 0){ce=S.data[S.index]=Array(b);for(var le=0;le<b;le++)ce[le]=T}return S.index++,ce},useCacheRefresh:function(){var b=K();return B.push({displayName:null,primitive:"CacheRefresh",stackError:Error(),value:b!==null?b.memoizedState:function(){},debugInfo:null,dispatcherHookName:"CacheRefresh"}),function(){}},useEffectEvent:function(b){return K(),B.push({displayName:null,primitive:"EffectEvent",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"EffectEvent"}),b}},Ut={get:function(b,S){if(b.hasOwnProperty(S))return b[S];throw b=Error("Missing method in Dispatcher: "+S),b.name="ReactDebugToolsUnsupportedHookError",b}},mr=typeof Proxy>"u"?se:new Proxy(se,Ut),ir=0;function Be(P,b,S){var ce=b[S].source,le=0;e:for(;le<P.length;le++)if(P[le].source===ce){for(var Ve=S+1,je=le+1;Ve<b.length&&je<P.length;Ve++,je++)if(P[je].source!==b[Ve].source)continue e;return le}return-1}function H(P,b){return P=x(P),b==="HostTransitionStatus"?P===b||P==="FormStatus":P===b}function x(P){if(!P)return"";var b=P.lastIndexOf("[as ");if(b!==-1)return x(P.slice(b+4,-1));if(b=P.lastIndexOf("."),b=b===-1?0:b+1,P.slice(b).startsWith("unstable_")&&(b+=9),P.slice(b).startsWith("experimental_")&&(b+=13),P.slice(b,b+3)==="use"){if(P.length-b===3)return"Use";b+=3}return P.slice(b)}function q(P,b){for(var S=[],ce=null,le=S,Ve=0,je=[],Xt=0;Xt<b.length;Xt++){var _t=b[Xt],nt=P,Ye=Ue.parse(_t.stackError);e:{var pe=Ye,mt=Be(pe,nt,ir);if(mt!==-1)nt=mt;else{for(var lt=0;lt<nt.length&&5>lt;lt++)if(mt=Be(pe,nt,lt),mt!==-1){ir=lt,nt=mt;break e}nt=-1}}e:{if(pe=Ye,mt=ue().get(_t.primitive),mt!==void 0){for(lt=0;lt<mt.length&<<pe.length;lt++)if(mt[lt].source!==pe[lt].source){lt<pe.length-1&&H(pe[lt].functionName,_t.dispatcherHookName)&<++,lt<pe.length-1&&H(pe[lt].functionName,_t.dispatcherHookName)&<++,pe=lt;break e}}pe=-1}if(Ye=nt===-1||pe===-1||2>nt-pe?pe===-1?[null,null]:[Ye[pe-1],null]:[Ye[pe-1],Ye.slice(pe,nt-1)],pe=Ye[0],Ye=Ye[1],nt=_t.displayName,nt===null&&pe!==null&&(nt=x(pe.functionName)||x(_t.dispatcherHookName)),Ye!==null){if(pe=0,ce!==null){for(;pe<Ye.length&&pe<ce.length&&Ye[Ye.length-pe-1].source===ce[ce.length-pe-1].source;)pe++;for(ce=ce.length-1;ce>pe;ce--)le=je.pop()}for(ce=Ye.length-pe-1;1<=ce;ce--)pe=[],mt=Ye[ce],mt={id:null,isStateEditable:!1,name:x(Ye[ce-1].functionName),value:void 0,subHooks:pe,debugInfo:null,hookSource:{lineNumber:mt.lineNumber,columnNumber:mt.columnNumber,functionName:mt.functionName,fileName:mt.fileName}},le.push(mt),je.push(le),le=pe;ce=Ye}pe=_t.primitive,mt=_t.debugInfo,_t={id:pe==="Context"||pe==="Context (use)"||pe==="DebugValue"||pe==="Promise"||pe==="Unresolved"||pe==="HostTransitionStatus"?null:Ve++,isStateEditable:pe==="Reducer"||pe==="State",name:nt||pe,value:_t.value,subHooks:[],debugInfo:mt,hookSource:null},nt={lineNumber:null,functionName:null,fileName:null,columnNumber:null},Ye&&1<=Ye.length&&(Ye=Ye[0],nt.lineNumber=Ye.lineNumber,nt.functionName=Ye.functionName,nt.fileName=Ye.fileName,nt.columnNumber=Ye.columnNumber),_t.hookSource=nt,le.push(_t)}return ge(S,null),S}function ge(P,b){for(var S=[],ce=0;ce<P.length;ce++){var le=P[ce];le.name==="DebugValue"&&le.subHooks.length===0?(P.splice(ce,1),ce--,S.push(le)):ge(le.subHooks,le)}b!==null&&(S.length===1?b.value=S[0].value:1<S.length&&(b.value=S.map(function(Ve){return Ve.value})))}function We(P){if(P!==tt){if(P instanceof Error&&P.name==="ReactDebugToolsUnsupportedHookError")throw P;var b=Error("Error rendering inspected component",{cause:P});throw b.name="ReactDebugToolsRenderError",b.cause=P,b}}function Ee(P,b,S){S==null&&(S=g);var ce=S.H;S.H=mr;try{var le=Error();P(b)}catch(Ve){We(Ve)}finally{P=B,B=[],S.H=ce}return S=Ue.parse(le),q(S,P)}function hr(P){P.forEach(function(b,S){return S._currentValue=b})}X=Ee,k.inspectHooksOfFiber=function(P,b){if(b==null&&(b=g),P.tag!==0&&P.tag!==15&&P.tag!==11)throw Error("Unknown Fiber. Needs to be a function component to inspect hooks.");if(ue(),ae=P.memoizedState,V=P,N.call(V,"dependencies")){var S=V.dependencies;ie=S!==null?S.firstContext:null}else if(N.call(V,"dependencies_old"))S=V.dependencies_old,ie=S!==null?S.firstContext:null;else if(N.call(V,"dependencies_new"))S=V.dependencies_new,ie=S!==null?S.firstContext:null;else if(N.call(V,"contextDependencies"))S=V.contextDependencies,ie=S!==null?S.first:null;else throw Error("Unsupported React version. This is a bug in React Debug Tools.");S=P.type;var ce=P.memoizedProps;if(S!==P.elementType&&S&&S.defaultProps){ce=Pe({},ce);var le=S.defaultProps;for(Ve in le)ce[Ve]===void 0&&(ce[Ve]=le[Ve])}var Ve=new Map;try{if(ie!==null&&!N.call(ie,"memoizedValue"))for(le=P;le;){if(le.tag===10){var je=le.type;je._context!==void 0&&(je=je._context),Ve.has(je)||(Ve.set(je,je._currentValue),je._currentValue=le.memoizedProps.value)}le=le.return}if(P.tag===11){var Xt=S.render;je=ce;var _t=P.ref;P=b;var nt=P.H;P.H=mr;try{var Ye=Error();Xt(je,_t)}catch(lt){We(lt)}finally{var pe=B;B=[],P.H=nt}var mt=Ue.parse(Ye);return q(mt,pe)}return Ee(S,ce,b)}finally{ie=ae=V=null,hr(Ve)}}},987:(ke,k,be)=>{"use strict";ke.exports=be(786)},126:(ke,k,be)=>{"use strict";var X=be(169);function Ce(m){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(J){return typeof J}:Ce=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},Ce(m)}var Ue=Symbol.for("react.transitional.element"),Ot=Symbol.for("react.portal"),Pe=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),K=Symbol.for("react.postpone"),re=Symbol.for("react.view_transition"),tt=Symbol.iterator;function se(m){return m===null||Ce(m)!=="object"?null:(m=tt&&m[tt]||m["@@iterator"],typeof m=="function"?m:null)}var Ut={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mr=Object.assign,ir={};function Be(m,I,J){this.props=m,this.context=I,this.refs=ir,this.updater=J||Ut}Be.prototype.isReactComponent={},Be.prototype.setState=function(m,I){if(Ce(m)!=="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,I,"setState")},Be.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function H(){}H.prototype=Be.prototype;function x(m,I,J){this.props=m,this.context=I,this.refs=ir,this.updater=J||Ut}var q=x.prototype=new H;q.constructor=x,mr(q,Be.prototype),q.isPureReactComponent=!0;var ge=Array.isArray;function We(){}var Ee={H:null,A:null,T:null,S:null,G:null},hr=Object.prototype.hasOwnProperty;function P(m,I,J,ve,Ae,Ke){return J=Ke.ref,{$$typeof:Ue,type:m,key:I,ref:J!==void 0?J:null,props:Ke}}function b(m,I){return P(m.type,I,void 0,void 0,void 0,m.props)}function S(m){return Ce(m)==="object"&&m!==null&&m.$$typeof===Ue}function ce(m){var I={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(J){return I[J]})}var le=/\/+/g;function Ve(m,I){return Ce(m)==="object"&&m!==null&&m.key!=null?ce(""+m.key):I.toString(36)}function je(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(We,We):(m.status="pending",m.then(function(I){m.status==="pending"&&(m.status="fulfilled",m.value=I)},function(I){m.status==="pending"&&(m.status="rejected",m.reason=I)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function Xt(m,I,J,ve,Ae){var Ke=Ce(m);(Ke==="undefined"||Ke==="boolean")&&(m=null);var Oe=!1;if(m===null)Oe=!0;else switch(Ke){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(m.$$typeof){case Ue:case Ot:Oe=!0;break;case ae:return Oe=m._init,Xt(Oe(m._payload),I,J,ve,Ae)}}if(Oe)return Ae=Ae(m),Oe=ve===""?"."+Ve(m,0):ve,ge(Ae)?(J="",Oe!=null&&(J=Oe.replace(le,"$&/")+"/"),Xt(Ae,I,J,"",function(Mo){return Mo})):Ae!=null&&(S(Ae)&&(Ae=b(Ae,J+(Ae.key==null||m&&m.key===Ae.key?"":(""+Ae.key).replace(le,"$&/")+"/")+Oe)),I.push(Ae)),1;Oe=0;var cr=ve===""?".":ve+":";if(ge(m))for(var wt=0;wt<m.length;wt++)ve=m[wt],Ke=cr+Ve(ve,wt),Oe+=Xt(ve,I,J,Ke,Ae);else if(wt=se(m),typeof wt=="function")for(m=wt.call(m),wt=0;!(ve=m.next()).done;)ve=ve.value,Ke=cr+Ve(ve,wt++),Oe+=Xt(ve,I,J,Ke,Ae);else if(Ke==="object"){if(typeof m.then=="function")return Xt(je(m),I,J,ve,Ae);throw I=String(m),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function _t(m,I,J){if(m==null)return m;var ve=[],Ae=0;return Xt(m,ve,"","",function(Ke){return I.call(J,Ke,Ae++)}),ve}function nt(m){if(m._status===-1){var I=m._result;I=I(),I.then(function(J){(m._status===0||m._status===-1)&&(m._status=1,m._result=J)},function(J){(m._status===0||m._status===-1)&&(m._status=2,m._result=J)}),m._status===-1&&(m._status=0,m._result=I)}if(m._status===1)return m._result.default;throw m._result}function Ye(m,I){return Ee.H.useOptimistic(m,I)}var pe=typeof reportError=="function"?reportError:function(m){if((typeof window>"u"?"undefined":Ce(window))==="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:Ce(m)==="object"&&m!==null&&typeof m.message=="string"?String(m.message):String(m),error:m});if(!window.dispatchEvent(I))return}else if((typeof X>"u"?"undefined":Ce(X))==="object"&&typeof X.emit=="function"){X.emit("uncaughtException",m);return}console.error(m)};function mt(m){var I=Ee.T,J={};J.types=I!==null?I.types:null,J.gesture=null,Ee.T=J;try{var ve=m(),Ae=Ee.S;Ae!==null&&Ae(J,ve),Ce(ve)==="object"&&ve!==null&&typeof ve.then=="function"&&ve.then(We,pe)}catch(Ke){pe(Ke)}finally{I!==null&&J.types!==null&&(I.types=J.types),Ee.T=I}}function lt(m){var I=Ee.T;if(I!==null){var J=I.types;J===null?I.types=[m]:J.indexOf(m)===-1&&J.push(m)}else mt(lt.bind(null,m))}k.Children={map:_t,forEach:function(I,J,ve){_t(I,function(){J.apply(this,arguments)},ve)},count:function(I){var J=0;return _t(I,function(){J++}),J},toArray:function(I){return _t(I,function(J){return J})||[]},only:function(I){if(!S(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},k.Component=Be,k.Fragment=Pe,k.Profiler=_,k.PureComponent=x,k.StrictMode=g,k.Suspense=fe,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ee,k.__COMPILER_RUNTIME={__proto__:null,c:function(I){return Ee.H.useMemoCache(I)}},k.cache=function(m){return function(){return m.apply(null,arguments)}},k.cacheSignal=function(){return null},k.cloneElement=function(m,I,J){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var ve=mr({},m.props),Ae=m.key,Ke=void 0;if(I!=null)for(Oe in I.ref!==void 0&&(Ke=void 0),I.key!==void 0&&(Ae=""+I.key),I)!hr.call(I,Oe)||Oe==="key"||Oe==="__self"||Oe==="__source"||Oe==="ref"&&I.ref===void 0||(ve[Oe]=I[Oe]);var Oe=arguments.length-2;if(Oe===1)ve.children=J;else if(1<Oe){for(var cr=Array(Oe),wt=0;wt<Oe;wt++)cr[wt]=arguments[wt+2];ve.children=cr}return P(m.type,Ae,void 0,void 0,Ke,ve)},k.createContext=function(m){return m={$$typeof:N,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:T,_context:m},m},k.createElement=function(m,I,J){var ve,Ae={},Ke=null;if(I!=null)for(ve in I.key!==void 0&&(Ke=""+I.key),I)hr.call(I,ve)&&ve!=="key"&&ve!=="__self"&&ve!=="__source"&&(Ae[ve]=I[ve]);var Oe=arguments.length-2;if(Oe===1)Ae.children=J;else if(1<Oe){for(var cr=Array(Oe),wt=0;wt<Oe;wt++)cr[wt]=arguments[wt+2];Ae.children=cr}if(m&&m.defaultProps)for(ve in Oe=m.defaultProps,Oe)Ae[ve]===void 0&&(Ae[ve]=Oe[ve]);return P(m,Ke,void 0,void 0,null,Ae)},k.createRef=function(){return{current:null}},k.experimental_useEffectEvent=function(m){return Ee.H.useEffectEvent(m)},k.experimental_useOptimistic=function(m,I){return Ye(m,I)},k.forwardRef=function(m){return{$$typeof:B,render:m}},k.isValidElement=S,k.lazy=function(m){return{$$typeof:ae,_payload:{_status:-1,_result:m},_init:nt}},k.memo=function(m,I){return{$$typeof:V,type:m,compare:I===void 0?null:I}},k.startTransition=mt,k.unstable_Activity=ie,k.unstable_SuspenseList=ue,k.unstable_ViewTransition=re,k.unstable_addTransitionType=lt,k.unstable_getCacheForType=function(m){var I=Ee.A;return I?I.getCacheForType(m):m()},k.unstable_postpone=function(m){throw m=Error(m),m.$$typeof=K,m},k.unstable_startGestureTransition=function(m,I,J){if(m==null)throw Error("A Timeline is required as the first argument to startGestureTransition.");var ve=Ee.T,Ae={types:null};Ae.gesture=m,Ee.T=Ae;try{I();var Ke=Ee.G;if(Ke!==null)return Ke(Ae,m,J)}catch(Oe){pe(Oe)}finally{Ee.T=ve}return We},k.unstable_useCacheRefresh=function(){return Ee.H.useCacheRefresh()},k.use=function(m){return Ee.H.use(m)},k.useActionState=function(m,I,J){return Ee.H.useActionState(m,I,J)},k.useCallback=function(m,I){return Ee.H.useCallback(m,I)},k.useContext=function(m){return Ee.H.useContext(m)},k.useDebugValue=function(){},k.useDeferredValue=function(m,I){return Ee.H.useDeferredValue(m,I)},k.useEffect=function(m,I){return Ee.H.useEffect(m,I)},k.useId=function(){return Ee.H.useId()},k.useImperativeHandle=function(m,I,J){return Ee.H.useImperativeHandle(m,I,J)},k.useInsertionEffect=function(m,I){return Ee.H.useInsertionEffect(m,I)},k.useLayoutEffect=function(m,I){return Ee.H.useLayoutEffect(m,I)},k.useMemo=function(m,I){return Ee.H.useMemo(m,I)},k.useOptimistic=Ye,k.useReducer=function(m,I,J){return Ee.H.useReducer(m,I,J)},k.useRef=function(m){return Ee.H.useRef(m)},k.useState=function(m){return Ee.H.useState(m)},k.useSyncExternalStore=function(m,I,J){return Ee.H.useSyncExternalStore(m,I,J)},k.useTransition=function(){return Ee.H.useTransition()},k.version="19.2.0-experimental-5d87cd22-20250704"},189:(ke,k,be)=>{"use strict";ke.exports=be(126)},206:function(ke,k,be){var X,Ce,Ue;function Ot(Pe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ot=function(_){return typeof _}:Ot=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},Ot(Pe)}(function(Pe,g){"use strict";Ce=[be(430)],X=g,Ue=typeof X=="function"?X.apply(k,Ce):X,Ue!==void 0&&(ke.exports=Ue)})(this,function(g){"use strict";var _=/(^|@)\S+:\d+/,T=/^\s*at .*(\S+:\d+|\(native\))/m,N=/^(eval@)?(\[native code])?$/;return{parse:function(fe){if(typeof fe.stacktrace<"u"||typeof fe["opera#sourceloc"]<"u")return this.parseOpera(fe);if(fe.stack&&fe.stack.match(T))return this.parseV8OrIE(fe);if(fe.stack)return this.parseFFOrSafari(fe);throw new Error("Cannot parse given Error object")},extractLocation:function(fe){if(fe.indexOf(":")===-1)return[fe];var ue=/(.+?)(?::(\d+))?(?::(\d+))?$/,V=ue.exec(fe.replace(/[()]/g,""));return[V[1],V[2]||void 0,V[3]||void 0]},parseV8OrIE:function(fe){var ue=fe.stack.split(`
|
|
3
|
+
import{c as No}from"./chunk-AOOZREGV.js";import{b as gn}from"./chunk-GZPNIYVZ.js";import{d as sp,f as cp}from"./chunk-OWGSC52X.js";var Pu=sp((ko,qa)=>{gn();(function(vr,bt){typeof ko=="object"&&typeof qa=="object"?qa.exports=bt():typeof define=="function"&&define.amd?define([],bt):typeof ko=="object"?ko.ReactDevToolsBackend=bt():vr.ReactDevToolsBackend=bt()})(self,()=>(()=>{var Wr={786:(ke,k,be)=>{"use strict";var X;function Ce(P){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(S){return typeof S}:Ce=function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},Ce(P)}var Ue=be(206),Ot=be(189),Pe=Object.assign,g=Ot.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=Symbol.for("react.context"),T=Symbol.for("react.memo_cache_sentinel"),N=Object.prototype.hasOwnProperty,B=[],fe=null;function ue(){if(fe===null){var P=new Map;try{if(se.useContext({_currentValue:null}),se.useState(null),se.useReducer(function(le){return le},null),se.useRef(null),typeof se.useCacheRefresh=="function"&&se.useCacheRefresh(),se.useLayoutEffect(function(){}),se.useInsertionEffect(function(){}),se.useEffect(function(){}),se.useImperativeHandle(void 0,function(){return null}),se.useDebugValue(null),se.useCallback(function(){}),se.useTransition(),se.useSyncExternalStore(function(){return function(){}},function(){return null},function(){return null}),se.useDeferredValue(null),se.useMemo(function(){return null}),se.useOptimistic(null,function(le){return le}),se.useFormState(function(le){return le},null),se.useActionState(function(le){return le},null),se.useHostTransitionStatus(),typeof se.useMemoCache=="function"&&se.useMemoCache(0),typeof se.use=="function"){se.use({$$typeof:_,_currentValue:null}),se.use({then:function(){},status:"fulfilled",value:null});try{se.use({then:function(){}})}catch{}}se.useId(),typeof se.useEffectEvent=="function"&&se.useEffectEvent(function(){})}finally{var b=B;B=[]}for(var S=0;S<b.length;S++){var ce=b[S];P.set(ce.primitive,Ue.parse(ce.stackError))}fe=P}return fe}var V=null,ae=null,ie=null;function K(){var P=ae;return P!==null&&(ae=P.next),P}function re(P){if(V===null)return P._currentValue;if(ie===null)throw Error("Context reads do not line up with context dependencies. This is a bug in React Debug Tools.");return N.call(ie,"memoizedValue")?(P=ie.memoizedValue,ie=ie.next):P=P._currentValue,P}var tt=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),se={readContext:re,use:function(b){if(b!==null&&Ce(b)==="object"){if(typeof b.then=="function"){switch(b.status){case"fulfilled":var S=b.value;return B.push({displayName:null,primitive:"Promise",stackError:Error(),value:S,debugInfo:b._debugInfo===void 0?null:b._debugInfo,dispatcherHookName:"Use"}),S;case"rejected":throw b.reason}throw B.push({displayName:null,primitive:"Unresolved",stackError:Error(),value:b,debugInfo:b._debugInfo===void 0?null:b._debugInfo,dispatcherHookName:"Use"}),tt}if(b.$$typeof===_)return S=re(b),B.push({displayName:b.displayName||"Context",primitive:"Context (use)",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"Use"}),S}throw Error("An unsupported type was passed to use(): "+String(b))},useCallback:function(b){var S=K();return B.push({displayName:null,primitive:"Callback",stackError:Error(),value:S!==null?S.memoizedState[0]:b,debugInfo:null,dispatcherHookName:"Callback"}),b},useContext:function(b){var S=re(b);return B.push({displayName:b.displayName||null,primitive:"Context",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"Context"}),S},useEffect:function(b){K(),B.push({displayName:null,primitive:"Effect",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Effect"})},useImperativeHandle:function(b){K();var S=void 0;b!==null&&Ce(b)==="object"&&(S=b.current),B.push({displayName:null,primitive:"ImperativeHandle",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"ImperativeHandle"})},useLayoutEffect:function(b){K(),B.push({displayName:null,primitive:"LayoutEffect",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"LayoutEffect"})},useInsertionEffect:function(b){K(),B.push({displayName:null,primitive:"InsertionEffect",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"InsertionEffect"})},useMemo:function(b){var S=K();return b=S!==null?S.memoizedState[0]:b(),B.push({displayName:null,primitive:"Memo",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Memo"}),b},useReducer:function(b,S,ce){return b=K(),S=b!==null?b.memoizedState:ce!==void 0?ce(S):S,B.push({displayName:null,primitive:"Reducer",stackError:Error(),value:S,debugInfo:null,dispatcherHookName:"Reducer"}),[S,function(){}]},useRef:function(b){var S=K();return b=S!==null?S.memoizedState:{current:b},B.push({displayName:null,primitive:"Ref",stackError:Error(),value:b.current,debugInfo:null,dispatcherHookName:"Ref"}),b},useState:function(b){var S=K();return b=S!==null?S.memoizedState:typeof b=="function"?b():b,B.push({displayName:null,primitive:"State",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"State"}),[b,function(){}]},useDebugValue:function(b,S){B.push({displayName:null,primitive:"DebugValue",stackError:Error(),value:typeof S=="function"?S(b):b,debugInfo:null,dispatcherHookName:"DebugValue"})},useDeferredValue:function(b){var S=K();return b=S!==null?S.memoizedState:b,B.push({displayName:null,primitive:"DeferredValue",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"DeferredValue"}),b},useTransition:function(){var b=K();return K(),b=b!==null?b.memoizedState:!1,B.push({displayName:null,primitive:"Transition",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Transition"}),[b,function(){}]},useSyncExternalStore:function(b,S){return K(),K(),b=S(),B.push({displayName:null,primitive:"SyncExternalStore",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"SyncExternalStore"}),b},useId:function(){var b=K();return b=b!==null?b.memoizedState:"",B.push({displayName:null,primitive:"Id",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Id"}),b},useHostTransitionStatus:function(){var b=re({_currentValue:null});return B.push({displayName:null,primitive:"HostTransitionStatus",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"HostTransitionStatus"}),b},useFormState:function(b,S){var ce=K();K(),K(),b=Error();var le=null,Ve=null;if(ce!==null)if(S=ce.memoizedState,Ce(S)==="object"&&S!==null&&typeof S.then=="function")switch(S.status){case"fulfilled":var je=S.value;le=S._debugInfo===void 0?null:S._debugInfo;break;case"rejected":Ve=S.reason;break;default:Ve=tt,le=S._debugInfo===void 0?null:S._debugInfo,je=S}else je=S;else je=S;if(B.push({displayName:null,primitive:"FormState",stackError:b,value:je,debugInfo:le,dispatcherHookName:"FormState"}),Ve!==null)throw Ve;return[je,function(){},!1]},useActionState:function(b,S){var ce=K();K(),K(),b=Error();var le=null,Ve=null;if(ce!==null)if(S=ce.memoizedState,Ce(S)==="object"&&S!==null&&typeof S.then=="function")switch(S.status){case"fulfilled":var je=S.value;le=S._debugInfo===void 0?null:S._debugInfo;break;case"rejected":Ve=S.reason;break;default:Ve=tt,le=S._debugInfo===void 0?null:S._debugInfo,je=S}else je=S;else je=S;if(B.push({displayName:null,primitive:"ActionState",stackError:b,value:je,debugInfo:le,dispatcherHookName:"ActionState"}),Ve!==null)throw Ve;return[je,function(){},!1]},useOptimistic:function(b){var S=K();return b=S!==null?S.memoizedState:b,B.push({displayName:null,primitive:"Optimistic",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"Optimistic"}),[b,function(){}]},useMemoCache:function(b){var S=V;if(S==null)return[];if(S=S.updateQueue!=null?S.updateQueue.memoCache:null,S==null)return[];var ce=S.data[S.index];if(ce===void 0){ce=S.data[S.index]=Array(b);for(var le=0;le<b;le++)ce[le]=T}return S.index++,ce},useCacheRefresh:function(){var b=K();return B.push({displayName:null,primitive:"CacheRefresh",stackError:Error(),value:b!==null?b.memoizedState:function(){},debugInfo:null,dispatcherHookName:"CacheRefresh"}),function(){}},useEffectEvent:function(b){return K(),B.push({displayName:null,primitive:"EffectEvent",stackError:Error(),value:b,debugInfo:null,dispatcherHookName:"EffectEvent"}),b}},Ut={get:function(b,S){if(b.hasOwnProperty(S))return b[S];throw b=Error("Missing method in Dispatcher: "+S),b.name="ReactDebugToolsUnsupportedHookError",b}},mr=typeof Proxy>"u"?se:new Proxy(se,Ut),ir=0;function Be(P,b,S){var ce=b[S].source,le=0;e:for(;le<P.length;le++)if(P[le].source===ce){for(var Ve=S+1,je=le+1;Ve<b.length&&je<P.length;Ve++,je++)if(P[je].source!==b[Ve].source)continue e;return le}return-1}function H(P,b){return P=x(P),b==="HostTransitionStatus"?P===b||P==="FormStatus":P===b}function x(P){if(!P)return"";var b=P.lastIndexOf("[as ");if(b!==-1)return x(P.slice(b+4,-1));if(b=P.lastIndexOf("."),b=b===-1?0:b+1,P.slice(b).startsWith("unstable_")&&(b+=9),P.slice(b).startsWith("experimental_")&&(b+=13),P.slice(b,b+3)==="use"){if(P.length-b===3)return"Use";b+=3}return P.slice(b)}function q(P,b){for(var S=[],ce=null,le=S,Ve=0,je=[],Xt=0;Xt<b.length;Xt++){var _t=b[Xt],nt=P,Ye=Ue.parse(_t.stackError);e:{var pe=Ye,mt=Be(pe,nt,ir);if(mt!==-1)nt=mt;else{for(var lt=0;lt<nt.length&&5>lt;lt++)if(mt=Be(pe,nt,lt),mt!==-1){ir=lt,nt=mt;break e}nt=-1}}e:{if(pe=Ye,mt=ue().get(_t.primitive),mt!==void 0){for(lt=0;lt<mt.length&<<pe.length;lt++)if(mt[lt].source!==pe[lt].source){lt<pe.length-1&&H(pe[lt].functionName,_t.dispatcherHookName)&<++,lt<pe.length-1&&H(pe[lt].functionName,_t.dispatcherHookName)&<++,pe=lt;break e}}pe=-1}if(Ye=nt===-1||pe===-1||2>nt-pe?pe===-1?[null,null]:[Ye[pe-1],null]:[Ye[pe-1],Ye.slice(pe,nt-1)],pe=Ye[0],Ye=Ye[1],nt=_t.displayName,nt===null&&pe!==null&&(nt=x(pe.functionName)||x(_t.dispatcherHookName)),Ye!==null){if(pe=0,ce!==null){for(;pe<Ye.length&&pe<ce.length&&Ye[Ye.length-pe-1].source===ce[ce.length-pe-1].source;)pe++;for(ce=ce.length-1;ce>pe;ce--)le=je.pop()}for(ce=Ye.length-pe-1;1<=ce;ce--)pe=[],mt=Ye[ce],mt={id:null,isStateEditable:!1,name:x(Ye[ce-1].functionName),value:void 0,subHooks:pe,debugInfo:null,hookSource:{lineNumber:mt.lineNumber,columnNumber:mt.columnNumber,functionName:mt.functionName,fileName:mt.fileName}},le.push(mt),je.push(le),le=pe;ce=Ye}pe=_t.primitive,mt=_t.debugInfo,_t={id:pe==="Context"||pe==="Context (use)"||pe==="DebugValue"||pe==="Promise"||pe==="Unresolved"||pe==="HostTransitionStatus"?null:Ve++,isStateEditable:pe==="Reducer"||pe==="State",name:nt||pe,value:_t.value,subHooks:[],debugInfo:mt,hookSource:null},nt={lineNumber:null,functionName:null,fileName:null,columnNumber:null},Ye&&1<=Ye.length&&(Ye=Ye[0],nt.lineNumber=Ye.lineNumber,nt.functionName=Ye.functionName,nt.fileName=Ye.fileName,nt.columnNumber=Ye.columnNumber),_t.hookSource=nt,le.push(_t)}return ge(S,null),S}function ge(P,b){for(var S=[],ce=0;ce<P.length;ce++){var le=P[ce];le.name==="DebugValue"&&le.subHooks.length===0?(P.splice(ce,1),ce--,S.push(le)):ge(le.subHooks,le)}b!==null&&(S.length===1?b.value=S[0].value:1<S.length&&(b.value=S.map(function(Ve){return Ve.value})))}function We(P){if(P!==tt){if(P instanceof Error&&P.name==="ReactDebugToolsUnsupportedHookError")throw P;var b=Error("Error rendering inspected component",{cause:P});throw b.name="ReactDebugToolsRenderError",b.cause=P,b}}function Ee(P,b,S){S==null&&(S=g);var ce=S.H;S.H=mr;try{var le=Error();P(b)}catch(Ve){We(Ve)}finally{P=B,B=[],S.H=ce}return S=Ue.parse(le),q(S,P)}function hr(P){P.forEach(function(b,S){return S._currentValue=b})}X=Ee,k.inspectHooksOfFiber=function(P,b){if(b==null&&(b=g),P.tag!==0&&P.tag!==15&&P.tag!==11)throw Error("Unknown Fiber. Needs to be a function component to inspect hooks.");if(ue(),ae=P.memoizedState,V=P,N.call(V,"dependencies")){var S=V.dependencies;ie=S!==null?S.firstContext:null}else if(N.call(V,"dependencies_old"))S=V.dependencies_old,ie=S!==null?S.firstContext:null;else if(N.call(V,"dependencies_new"))S=V.dependencies_new,ie=S!==null?S.firstContext:null;else if(N.call(V,"contextDependencies"))S=V.contextDependencies,ie=S!==null?S.first:null;else throw Error("Unsupported React version. This is a bug in React Debug Tools.");S=P.type;var ce=P.memoizedProps;if(S!==P.elementType&&S&&S.defaultProps){ce=Pe({},ce);var le=S.defaultProps;for(Ve in le)ce[Ve]===void 0&&(ce[Ve]=le[Ve])}var Ve=new Map;try{if(ie!==null&&!N.call(ie,"memoizedValue"))for(le=P;le;){if(le.tag===10){var je=le.type;je._context!==void 0&&(je=je._context),Ve.has(je)||(Ve.set(je,je._currentValue),je._currentValue=le.memoizedProps.value)}le=le.return}if(P.tag===11){var Xt=S.render;je=ce;var _t=P.ref;P=b;var nt=P.H;P.H=mr;try{var Ye=Error();Xt(je,_t)}catch(lt){We(lt)}finally{var pe=B;B=[],P.H=nt}var mt=Ue.parse(Ye);return q(mt,pe)}return Ee(S,ce,b)}finally{ie=ae=V=null,hr(Ve)}}},987:(ke,k,be)=>{"use strict";ke.exports=be(786)},126:(ke,k,be)=>{"use strict";var X=be(169);function Ce(m){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(J){return typeof J}:Ce=function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},Ce(m)}var Ue=Symbol.for("react.transitional.element"),Ot=Symbol.for("react.portal"),Pe=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),K=Symbol.for("react.postpone"),re=Symbol.for("react.view_transition"),tt=Symbol.iterator;function se(m){return m===null||Ce(m)!=="object"?null:(m=tt&&m[tt]||m["@@iterator"],typeof m=="function"?m:null)}var Ut={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},mr=Object.assign,ir={};function Be(m,I,J){this.props=m,this.context=I,this.refs=ir,this.updater=J||Ut}Be.prototype.isReactComponent={},Be.prototype.setState=function(m,I){if(Ce(m)!=="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,I,"setState")},Be.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function H(){}H.prototype=Be.prototype;function x(m,I,J){this.props=m,this.context=I,this.refs=ir,this.updater=J||Ut}var q=x.prototype=new H;q.constructor=x,mr(q,Be.prototype),q.isPureReactComponent=!0;var ge=Array.isArray;function We(){}var Ee={H:null,A:null,T:null,S:null,G:null},hr=Object.prototype.hasOwnProperty;function P(m,I,J,ve,Ae,Ke){return J=Ke.ref,{$$typeof:Ue,type:m,key:I,ref:J!==void 0?J:null,props:Ke}}function b(m,I){return P(m.type,I,void 0,void 0,void 0,m.props)}function S(m){return Ce(m)==="object"&&m!==null&&m.$$typeof===Ue}function ce(m){var I={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(J){return I[J]})}var le=/\/+/g;function Ve(m,I){return Ce(m)==="object"&&m!==null&&m.key!=null?ce(""+m.key):I.toString(36)}function je(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(We,We):(m.status="pending",m.then(function(I){m.status==="pending"&&(m.status="fulfilled",m.value=I)},function(I){m.status==="pending"&&(m.status="rejected",m.reason=I)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function Xt(m,I,J,ve,Ae){var Ke=Ce(m);(Ke==="undefined"||Ke==="boolean")&&(m=null);var Oe=!1;if(m===null)Oe=!0;else switch(Ke){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(m.$$typeof){case Ue:case Ot:Oe=!0;break;case ae:return Oe=m._init,Xt(Oe(m._payload),I,J,ve,Ae)}}if(Oe)return Ae=Ae(m),Oe=ve===""?"."+Ve(m,0):ve,ge(Ae)?(J="",Oe!=null&&(J=Oe.replace(le,"$&/")+"/"),Xt(Ae,I,J,"",function(Mo){return Mo})):Ae!=null&&(S(Ae)&&(Ae=b(Ae,J+(Ae.key==null||m&&m.key===Ae.key?"":(""+Ae.key).replace(le,"$&/")+"/")+Oe)),I.push(Ae)),1;Oe=0;var cr=ve===""?".":ve+":";if(ge(m))for(var wt=0;wt<m.length;wt++)ve=m[wt],Ke=cr+Ve(ve,wt),Oe+=Xt(ve,I,J,Ke,Ae);else if(wt=se(m),typeof wt=="function")for(m=wt.call(m),wt=0;!(ve=m.next()).done;)ve=ve.value,Ke=cr+Ve(ve,wt++),Oe+=Xt(ve,I,J,Ke,Ae);else if(Ke==="object"){if(typeof m.then=="function")return Xt(je(m),I,J,ve,Ae);throw I=String(m),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function _t(m,I,J){if(m==null)return m;var ve=[],Ae=0;return Xt(m,ve,"","",function(Ke){return I.call(J,Ke,Ae++)}),ve}function nt(m){if(m._status===-1){var I=m._result;I=I(),I.then(function(J){(m._status===0||m._status===-1)&&(m._status=1,m._result=J)},function(J){(m._status===0||m._status===-1)&&(m._status=2,m._result=J)}),m._status===-1&&(m._status=0,m._result=I)}if(m._status===1)return m._result.default;throw m._result}function Ye(m,I){return Ee.H.useOptimistic(m,I)}var pe=typeof reportError=="function"?reportError:function(m){if((typeof window>"u"?"undefined":Ce(window))==="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:Ce(m)==="object"&&m!==null&&typeof m.message=="string"?String(m.message):String(m),error:m});if(!window.dispatchEvent(I))return}else if((typeof X>"u"?"undefined":Ce(X))==="object"&&typeof X.emit=="function"){X.emit("uncaughtException",m);return}console.error(m)};function mt(m){var I=Ee.T,J={};J.types=I!==null?I.types:null,J.gesture=null,Ee.T=J;try{var ve=m(),Ae=Ee.S;Ae!==null&&Ae(J,ve),Ce(ve)==="object"&&ve!==null&&typeof ve.then=="function"&&ve.then(We,pe)}catch(Ke){pe(Ke)}finally{I!==null&&J.types!==null&&(I.types=J.types),Ee.T=I}}function lt(m){var I=Ee.T;if(I!==null){var J=I.types;J===null?I.types=[m]:J.indexOf(m)===-1&&J.push(m)}else mt(lt.bind(null,m))}k.Children={map:_t,forEach:function(I,J,ve){_t(I,function(){J.apply(this,arguments)},ve)},count:function(I){var J=0;return _t(I,function(){J++}),J},toArray:function(I){return _t(I,function(J){return J})||[]},only:function(I){if(!S(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},k.Component=Be,k.Fragment=Pe,k.Profiler=_,k.PureComponent=x,k.StrictMode=g,k.Suspense=fe,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ee,k.__COMPILER_RUNTIME={__proto__:null,c:function(I){return Ee.H.useMemoCache(I)}},k.cache=function(m){return function(){return m.apply(null,arguments)}},k.cacheSignal=function(){return null},k.cloneElement=function(m,I,J){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var ve=mr({},m.props),Ae=m.key,Ke=void 0;if(I!=null)for(Oe in I.ref!==void 0&&(Ke=void 0),I.key!==void 0&&(Ae=""+I.key),I)!hr.call(I,Oe)||Oe==="key"||Oe==="__self"||Oe==="__source"||Oe==="ref"&&I.ref===void 0||(ve[Oe]=I[Oe]);var Oe=arguments.length-2;if(Oe===1)ve.children=J;else if(1<Oe){for(var cr=Array(Oe),wt=0;wt<Oe;wt++)cr[wt]=arguments[wt+2];ve.children=cr}return P(m.type,Ae,void 0,void 0,Ke,ve)},k.createContext=function(m){return m={$$typeof:N,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:T,_context:m},m},k.createElement=function(m,I,J){var ve,Ae={},Ke=null;if(I!=null)for(ve in I.key!==void 0&&(Ke=""+I.key),I)hr.call(I,ve)&&ve!=="key"&&ve!=="__self"&&ve!=="__source"&&(Ae[ve]=I[ve]);var Oe=arguments.length-2;if(Oe===1)Ae.children=J;else if(1<Oe){for(var cr=Array(Oe),wt=0;wt<Oe;wt++)cr[wt]=arguments[wt+2];Ae.children=cr}if(m&&m.defaultProps)for(ve in Oe=m.defaultProps,Oe)Ae[ve]===void 0&&(Ae[ve]=Oe[ve]);return P(m,Ke,void 0,void 0,null,Ae)},k.createRef=function(){return{current:null}},k.experimental_useEffectEvent=function(m){return Ee.H.useEffectEvent(m)},k.experimental_useOptimistic=function(m,I){return Ye(m,I)},k.forwardRef=function(m){return{$$typeof:B,render:m}},k.isValidElement=S,k.lazy=function(m){return{$$typeof:ae,_payload:{_status:-1,_result:m},_init:nt}},k.memo=function(m,I){return{$$typeof:V,type:m,compare:I===void 0?null:I}},k.startTransition=mt,k.unstable_Activity=ie,k.unstable_SuspenseList=ue,k.unstable_ViewTransition=re,k.unstable_addTransitionType=lt,k.unstable_getCacheForType=function(m){var I=Ee.A;return I?I.getCacheForType(m):m()},k.unstable_postpone=function(m){throw m=Error(m),m.$$typeof=K,m},k.unstable_startGestureTransition=function(m,I,J){if(m==null)throw Error("A Timeline is required as the first argument to startGestureTransition.");var ve=Ee.T,Ae={types:null};Ae.gesture=m,Ee.T=Ae;try{I();var Ke=Ee.G;if(Ke!==null)return Ke(Ae,m,J)}catch(Oe){pe(Oe)}finally{Ee.T=ve}return We},k.unstable_useCacheRefresh=function(){return Ee.H.useCacheRefresh()},k.use=function(m){return Ee.H.use(m)},k.useActionState=function(m,I,J){return Ee.H.useActionState(m,I,J)},k.useCallback=function(m,I){return Ee.H.useCallback(m,I)},k.useContext=function(m){return Ee.H.useContext(m)},k.useDebugValue=function(){},k.useDeferredValue=function(m,I){return Ee.H.useDeferredValue(m,I)},k.useEffect=function(m,I){return Ee.H.useEffect(m,I)},k.useId=function(){return Ee.H.useId()},k.useImperativeHandle=function(m,I,J){return Ee.H.useImperativeHandle(m,I,J)},k.useInsertionEffect=function(m,I){return Ee.H.useInsertionEffect(m,I)},k.useLayoutEffect=function(m,I){return Ee.H.useLayoutEffect(m,I)},k.useMemo=function(m,I){return Ee.H.useMemo(m,I)},k.useOptimistic=Ye,k.useReducer=function(m,I,J){return Ee.H.useReducer(m,I,J)},k.useRef=function(m){return Ee.H.useRef(m)},k.useState=function(m){return Ee.H.useState(m)},k.useSyncExternalStore=function(m,I,J){return Ee.H.useSyncExternalStore(m,I,J)},k.useTransition=function(){return Ee.H.useTransition()},k.version="19.2.0-experimental-5d87cd22-20250704"},189:(ke,k,be)=>{"use strict";ke.exports=be(126)},206:function(ke,k,be){var X,Ce,Ue;function Ot(Pe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ot=function(_){return typeof _}:Ot=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},Ot(Pe)}(function(Pe,g){"use strict";Ce=[be(430)],X=g,Ue=typeof X=="function"?X.apply(k,Ce):X,Ue!==void 0&&(ke.exports=Ue)})(this,function(g){"use strict";var _=/(^|@)\S+:\d+/,T=/^\s*at .*(\S+:\d+|\(native\))/m,N=/^(eval@)?(\[native code])?$/;return{parse:function(fe){if(typeof fe.stacktrace<"u"||typeof fe["opera#sourceloc"]<"u")return this.parseOpera(fe);if(fe.stack&&fe.stack.match(T))return this.parseV8OrIE(fe);if(fe.stack)return this.parseFFOrSafari(fe);throw new Error("Cannot parse given Error object")},extractLocation:function(fe){if(fe.indexOf(":")===-1)return[fe];var ue=/(.+?)(?::(\d+))?(?::(\d+))?$/,V=ue.exec(fe.replace(/[()]/g,""));return[V[1],V[2]||void 0,V[3]||void 0]},parseV8OrIE:function(fe){var ue=fe.stack.split(`
|
|
4
4
|
`).filter(function(V){return!!V.match(T)},this);return ue.map(function(V){V.indexOf("(eval ")>-1&&(V=V.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var ae=V.replace(/^\s+/,"").replace(/\(eval code/g,"("),ie=ae.match(/ (\((.+):(\d+):(\d+)\)$)/);ae=ie?ae.replace(ie[0],""):ae;var K=ae.split(/\s+/).slice(1),re=this.extractLocation(ie?ie[1]:K.pop()),tt=K.join(" ")||void 0,se=["eval","<anonymous>"].indexOf(re[0])>-1?void 0:re[0];return new g({functionName:tt,fileName:se,lineNumber:re[1],columnNumber:re[2],source:V})},this)},parseFFOrSafari:function(fe){var ue=fe.stack.split(`
|
|
5
5
|
`).filter(function(V){return!V.match(N)},this);return ue.map(function(V){if(V.indexOf(" > eval")>-1&&(V=V.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),V.indexOf("@")===-1&&V.indexOf(":")===-1)return new g({functionName:V});var ae=/((.*".+"[^@]*)?[^@]*)(?:@)/,ie=V.match(ae),K=ie&&ie[1]?ie[1]:void 0,re=this.extractLocation(V.replace(ae,""));return new g({functionName:K,fileName:re[0],lineNumber:re[1],columnNumber:re[2],source:V})},this)},parseOpera:function(fe){return!fe.stacktrace||fe.message.indexOf(`
|
|
6
6
|
`)>-1&&fe.message.split(`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as rt,b as Ms}from"./chunk-QN6Y6NPA.js";import{f as ot}from"./chunk-EQGA7LH7.js";import"./chunk-T2T2UEPY.js";import"./chunk-M53RP3YP.js";import{a as Cs}from"./chunk-OOEH6ZSV.js";import{a as ws}from"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{b as h}from"./chunk-GZPNIYVZ.js";import{a as K,d as y,f as nt}from"./chunk-OWGSC52X.js";var re=y(Y=>{"use strict";h();Object.defineProperty(Y,"__esModule",{value:!0});Y.matchFilter=Is;Y.parse=ft;Y.preprocess=_t;var at=new Map;function Is(n){var e;let t=Array.isArray(n)?n:[n],s=t.join(","),i=(e=at.get(s))!==null&&e!==void 0?e:(()=>{let r=ft(t),o=Ss(r);return at.set(s,o),o})();return r=>i(r)}function ft(n){return Array.isArray(n)?n.map(e=>e.split(":")):[n.split(":")]}function Ss(n){let e=n.flatMap(i=>ks(i,_t(i))),t=Ts(e),s=Ps(t);return i=>!!s(i.update,i)}function _t(n){let e=ne,t=[n].flatMap(s=>{let[i,r,o]=s;if(!(i in mt))return[s];if(!i&&!r&&!o)return[s];let d=mt[i].map(c=>[c,r,o]);return r===void 0||r in Ae&&(r||o)?d:d.filter(([c])=>{var l;return!!(!((l=e[c])===null||l===void 0)&&l[r])})}).flatMap(s=>{let[i,r,o]=s;if(!(r in Ae))return[s];if(!r&&!o)return[s];let d=Ae[r].map(c=>[i,c,o]);return o===void 0?d:d.filter(([,c])=>{var l,p;return!!(!((p=(l=e[i])===null||l===void 0?void 0:l[c])===null||p===void 0)&&p[o])})});if(t.length===0)throw new Error(`Shortcuts in '${n.join(":")}' do not expand to any valid filter query`);return t}function ks(n,e){if(e.length===0)throw new Error("Empty filter query given");let t=e.map(As).filter(s=>s!==!0);if(t.length===0)return e;throw t.length===1?new Error(t[0]):new Error(`Invalid filter query '${n.join(":")}'. There are ${t.length} errors after expanding the contained shortcuts: ${t.join("; ")}`)}function As(n){let[e,t,s,...i]=n;if(e===void 0)return"Empty filter query given";if(!(e in ne)){let a=Object.keys(ne);return`Invalid L1 filter '${e}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(t===void 0)return!0;let r=ne[e];if(!(t in r)){let a=Object.keys(r);return`Invalid L2 filter '${t}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(s===void 0)return!0;let o=r[t];if(!(s in o)){let a=Object.keys(o);return`Invalid L3 filter '${s}' given in '${n.join(":")}'. ${a.length===0?`No further filtering is possible after '${e}:${t}'.`:`Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}`}return i.length===0?!0:`Cannot filter further than three levels, ':${i.join(":")}' is invalid!`}function Ts(n){var e,t;let s={};for(let[i,r,o]of n){let a=(e=s[i])!==null&&e!==void 0?e:s[i]={};if(r!==void 0){let d=(t=a[r])!==null&&t!==void 0?t:a[r]=new Set;o!==void 0&&d.add(o)}}return s}function ke(n,e){return(t,s)=>n(t,s)||e(t,s)}function ut(n,e){return(t,s)=>{let i=n(t,s);return i&&e(i,s)}}function dt(n){return(e,t)=>n(e,t)!=null}function Ps(n){let e=Object.entries(n).map(([t,s])=>{let i=o=>o[t],r=Object.entries(s).map(([o,a])=>{let d=l=>l[o],c=Array.from(a).map(l=>l==="me"?(m,_)=>{let g=_.me.id;return ct(m,w=>w.id===g)}:m=>ct(m,_=>_[l]||_.type===l));return c.length===0?dt(d):ut(d,c.reduce(ke))});return r.length===0?dt(i):ut(i,r.reduce(ke))});if(e.length===0)throw new Error("Cannot create filter function for empty query");return e.reduce(ke)}function ct(n,e){let t=s=>s!=null&&e(s);return Array.isArray(n)?n.some(t):t(n)}var lt={mention:{},hashtag:{},cashtag:{},bot_command:{},url:{},email:{},phone_number:{},bold:{},italic:{},underline:{},strikethrough:{},spoiler:{},blockquote:{},expandable_blockquote:{},code:{},pre:{},text_link:{},text_mention:{},custom_emoji:{}},Te={me:{},is_bot:{},is_premium:{},added_to_attachment_menu:{}},Es={user:{},hidden_user:{},chat:{},channel:{}},js={is_video:{},is_animated:{},premium_animation:{}},Pe={emoji:{},custom_emoji:{},paid:{}},ht={can_be_upgraded:{},is_upgrade_separate:{},is_private:{}},yt={forward_origin:Es,is_topic_message:{},is_automatic_forward:{},business_connection_id:{},text:{},animation:{},audio:{},document:{},paid_media:{},photo:{},sticker:js,story:{},video:{},video_note:{},voice:{},contact:{},dice:{},game:{},poll:{},venue:{},location:{},entities:lt,caption_entities:lt,caption:{},link_preview_options:{url:{},prefer_small_media:{},prefer_large_media:{},show_above_text:{}},effect_id:{},paid_star_count:{},has_media_spoiler:{},new_chat_title:{},new_chat_photo:{},delete_chat_photo:{},message_auto_delete_timer_changed:{},pinned_message:{},invoice:{},proximity_alert_triggered:{},chat_background_set:{},giveaway_created:{},giveaway:{only_new_members:{},has_public_winners:{}},giveaway_winners:{only_new_members:{},was_refunded:{}},giveaway_completed:{},gift:ht,gift_upgrade_sent:ht,unique_gift:{transfer_star_count:{}},paid_message_price_changed:{},video_chat_scheduled:{},video_chat_started:{},video_chat_ended:{},video_chat_participants_invited:{},web_app_data:{}},ie={...yt,direct_messages_topic:{},chat_owner_left:{new_owner:{}},chat_owner_changd:{},new_chat_members:Te,left_chat_member:Te,group_chat_created:{},supergroup_chat_created:{},migrate_to_chat_id:{},migrate_from_chat_id:{},successful_payment:{},refunded_payment:{},users_shared:{},chat_shared:{},connected_website:{},write_access_allowed:{},passport_data:{},boost_added:{},forum_topic_created:{is_name_implicit:{}},forum_topic_edited:{name:{},icon_custom_emoji_id:{}},forum_topic_closed:{},forum_topic_reopened:{},general_forum_topic_hidden:{},general_forum_topic_unhidden:{},checklist:{others_can_add_tasks:{},others_can_mark_tasks_as_done:{}},checklist_tasks_done:{},checklist_tasks_added:{},suggested_post_info:{},suggested_post_approved:{},suggested_post_approval_failed:{},suggested_post_declined:{},suggested_post_paid:{},suggested_post_refunded:{},sender_boost_count:{}},pt={...yt,channel_chat_created:{},direct_message_price_changed:{},is_paid_post:{}},Rs={can_reply:{},is_enabled:{}},Bs={old_reaction:Pe,new_reaction:Pe},Fs={reactions:Pe},$s={data:{},game_short_name:{}},gt={from:Te},ne={message:ie,edited_message:ie,channel_post:pt,edited_channel_post:pt,business_connection:Rs,business_message:ie,edited_business_message:ie,deleted_business_messages:{},inline_query:{},chosen_inline_result:{},callback_query:$s,shipping_query:{},pre_checkout_query:{},poll:{},poll_answer:{},my_chat_member:gt,chat_member:gt,chat_join_request:{},message_reaction:Bs,message_reaction_count:Fs,chat_boost:{},removed_chat_boost:{},purchased_paid_media:{}},mt={"":["message","channel_post"],msg:["message","channel_post"],edit:["edited_message","edited_channel_post"]},Ae={"":["entities","caption_entities"],media:["photo","video"],file:["photo","animation","audio","document","video","video_note","voice","sticker"]}});var de=y(ue=>{"use strict";h();Object.defineProperty(ue,"__esModule",{value:!0});ue.Context=void 0;var Ls=re(),S={filterQuery(n){let e=(0,Ls.matchFilter)(n);return t=>e(t)},text(n){let e=S.filterQuery([":text",":caption"]),t=$(n);return s=>{var i,r;if(!e(s))return!1;let o=(i=s.message)!==null&&i!==void 0?i:s.channelPost,a=(r=o.text)!==null&&r!==void 0?r:o.caption;return L(s,a,t)}},command(n){let e=S.filterQuery(":entities:bot_command"),t=new Set,s=new Set;return ae(n).forEach(i=>{if(i.startsWith("/"))throw new Error(`Do not include '/' when registering command handlers (use '${i.substring(1)}' not '${i}')`);(i.includes("@")?t:s).add(i)}),i=>{var r,o;if(!e(i))return!1;let a=(r=i.message)!==null&&r!==void 0?r:i.channelPost,d=(o=a.text)!==null&&o!==void 0?o:a.caption;return a.entities.some(c=>{if(c.type!=="bot_command"||c.offset!==0)return!1;let l=d.substring(1,c.length);if(s.has(l)||t.has(l))return i.match=d.substring(l.length+1).trimStart(),!0;let p=l.indexOf("@");if(p===-1)return!1;let m=l.substring(p+1).toLowerCase(),_=i.me.username.toLowerCase();if(m!==_)return!1;let g=l.substring(0,p);return s.has(g)?(i.match=d.substring(l.length+1).trimStart(),!0):!1})}},reaction(n){let e=S.filterQuery("message_reaction"),t=typeof n=="string"?[{type:"emoji",emoji:n}]:(Array.isArray(n)?n:[n]).map(o=>typeof o=="string"?{type:"emoji",emoji:o}:o),s=new Set(t.filter(o=>o.type==="emoji").map(o=>o.emoji)),i=new Set(t.filter(o=>o.type==="custom_emoji").map(o=>o.custom_emoji_id)),r=t.some(o=>o.type==="paid");return o=>{if(!e(o))return!1;let{old_reaction:a,new_reaction:d}=o.messageReaction;for(let c of d){let l=!1;if(c.type==="emoji"){for(let p of a)if(p.type==="emoji"&&p.emoji===c.emoji){l=!0;break}}else if(c.type==="custom_emoji"){for(let p of a)if(p.type==="custom_emoji"&&p.custom_emoji_id===c.custom_emoji_id){l=!0;break}}else if(c.type==="paid"){for(let p of a)if(p.type==="paid"){l=!0;break}}if(!l)if(c.type==="emoji"){if(s.has(c.emoji))return!0}else if(c.type==="custom_emoji"){if(i.has(c.custom_emoji_id))return!0}else if(c.type==="paid"){if(r)return!0}else return!0}return!1}},chatType(n){let e=new Set(ae(n));return t=>{var s;return((s=t.chat)===null||s===void 0?void 0:s.type)!==void 0&&e.has(t.chat.type)}},callbackQuery(n){let e=S.filterQuery("callback_query:data"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.data,t)},gameQuery(n){let e=S.filterQuery("callback_query:game_short_name"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.game_short_name,t)},inlineQuery(n){let e=S.filterQuery("inline_query"),t=$(n);return s=>e(s)&&L(s,s.inlineQuery.query,t)},chosenInlineResult(n){let e=S.filterQuery("chosen_inline_result"),t=$(n);return s=>e(s)&&L(s,s.chosenInlineResult.result_id,t)},preCheckoutQuery(n){let e=S.filterQuery("pre_checkout_query"),t=$(n);return s=>e(s)&&L(s,s.preCheckoutQuery.invoice_payload,t)},shippingQuery(n){let e=S.filterQuery("shipping_query"),t=$(n);return s=>e(s)&&L(s,s.shippingQuery.invoice_payload,t)}},oe=class n{constructor(e,t,s){this.update=e,this.api=t,this.me=s}get message(){return this.update.message}get editedMessage(){return this.update.edited_message}get channelPost(){return this.update.channel_post}get editedChannelPost(){return this.update.edited_channel_post}get businessConnection(){return this.update.business_connection}get businessMessage(){return this.update.business_message}get editedBusinessMessage(){return this.update.edited_business_message}get deletedBusinessMessages(){return this.update.deleted_business_messages}get messageReaction(){return this.update.message_reaction}get messageReactionCount(){return this.update.message_reaction_count}get inlineQuery(){return this.update.inline_query}get chosenInlineResult(){return this.update.chosen_inline_result}get callbackQuery(){return this.update.callback_query}get shippingQuery(){return this.update.shipping_query}get preCheckoutQuery(){return this.update.pre_checkout_query}get poll(){return this.update.poll}get pollAnswer(){return this.update.poll_answer}get myChatMember(){return this.update.my_chat_member}get chatMember(){return this.update.chat_member}get chatJoinRequest(){return this.update.chat_join_request}get chatBoost(){return this.update.chat_boost}get removedChatBoost(){return this.update.removed_chat_boost}get purchasedPaidMedia(){return this.update.purchased_paid_media}get msg(){var e,t,s,i,r,o,a;return(o=(r=(i=(s=(t=(e=this.message)!==null&&e!==void 0?e:this.editedMessage)!==null&&t!==void 0?t:this.channelPost)!==null&&s!==void 0?s:this.editedChannelPost)!==null&&i!==void 0?i:this.businessMessage)!==null&&r!==void 0?r:this.editedBusinessMessage)!==null&&o!==void 0?o:(a=this.callbackQuery)===null||a===void 0?void 0:a.message}get chat(){var e,t,s,i,r,o,a,d,c;return(c=(d=(a=(o=(r=(i=(s=(t=(e=this.msg)!==null&&e!==void 0?e:this.deletedBusinessMessages)!==null&&t!==void 0?t:this.messageReaction)!==null&&s!==void 0?s:this.messageReactionCount)!==null&&i!==void 0?i:this.myChatMember)!==null&&r!==void 0?r:this.chatMember)!==null&&o!==void 0?o:this.chatJoinRequest)!==null&&a!==void 0?a:this.chatBoost)!==null&&d!==void 0?d:this.removedChatBoost)===null||c===void 0?void 0:c.chat}get senderChat(){var e;return(e=this.msg)===null||e===void 0?void 0:e.sender_chat}get from(){var e,t,s,i,r,o,a,d,c,l,p,m,_,g,w,M,v;return(a=(o=(t=(e=this.businessConnection)!==null&&e!==void 0?e:this.messageReaction)!==null&&t!==void 0?t:(r=(i=(s=this.chatBoost)===null||s===void 0?void 0:s.boost)!==null&&i!==void 0?i:this.removedChatBoost)===null||r===void 0?void 0:r.source)===null||o===void 0?void 0:o.user)!==null&&a!==void 0?a:(v=(M=(w=(g=(_=(m=(p=(l=(c=(d=this.callbackQuery)!==null&&d!==void 0?d:this.msg)!==null&&c!==void 0?c:this.inlineQuery)!==null&&l!==void 0?l:this.chosenInlineResult)!==null&&p!==void 0?p:this.shippingQuery)!==null&&m!==void 0?m:this.preCheckoutQuery)!==null&&_!==void 0?_:this.myChatMember)!==null&&g!==void 0?g:this.chatMember)!==null&&w!==void 0?w:this.chatJoinRequest)!==null&&M!==void 0?M:this.purchasedPaidMedia)===null||v===void 0?void 0:v.from}get msgId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.message_id)!==null&&t!==void 0?t:(s=this.messageReaction)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReactionCount)===null||r===void 0?void 0:r.message_id}get chatId(){var e,t,s;return(t=(e=this.chat)===null||e===void 0?void 0:e.id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.user_chat_id}get inlineMessageId(){var e,t,s;return(t=(e=this.callbackQuery)===null||e===void 0?void 0:e.inline_message_id)!==null&&t!==void 0?t:(s=this.chosenInlineResult)===null||s===void 0?void 0:s.inline_message_id}get businessConnectionId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.business_connection_id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:(r=this.deletedBusinessMessages)===null||r===void 0?void 0:r.business_connection_id}entities(e){var t,s;let i=this.msg;if(i===void 0)return[];let r=(t=i.text)!==null&&t!==void 0?t:i.caption;if(r===void 0)return[];let o=(s=i.entities)!==null&&s!==void 0?s:i.caption_entities;if(o===void 0)return[];if(e!==void 0){let a=new Set(ae(e));o=o.filter(d=>a.has(d.type))}return o.map(a=>({...a,text:r.substring(a.offset,a.offset+a.length)}))}reactions(){let e=[],t=[],s=[],i=[],r=[],o=[],a=[],d=[],c=!1,l=!1,p=this.messageReaction;if(p!==void 0){let{old_reaction:m,new_reaction:_}=p;for(let g of _)g.type==="emoji"?e.push(g.emoji):g.type==="custom_emoji"?r.push(g.custom_emoji_id):g.type==="paid"&&(c=l=!0);for(let g of m)g.type==="emoji"?i.push(g.emoji):g.type==="custom_emoji"?d.push(g.custom_emoji_id):g.type==="paid"&&(l=!1);t.push(...e),o.push(...r);for(let g=0;g<i.length;g++){let w=t.length;if(w===0)break;let M=i[g];for(let v=0;v<w;v++)if(M===t[v]){s.push(M),i.splice(g,1),t.splice(v,1),g--;break}}for(let g=0;g<d.length;g++){let w=o.length;if(w===0)break;let M=d[g];for(let v=0;v<w;v++)if(M===o[v]){a.push(M),d.splice(g,1),o.splice(v,1),g--;break}}}return{emoji:e,emojiAdded:t,emojiKept:s,emojiRemoved:i,customEmoji:r,customEmojiAdded:o,customEmojiKept:a,customEmojiRemoved:d,paid:c,paidAdded:l}}has(e){return n.has.filterQuery(e)(this)}hasText(e){return n.has.text(e)(this)}hasCommand(e){return n.has.command(e)(this)}hasReaction(e){return n.has.reaction(e)(this)}hasChatType(e){return n.has.chatType(e)(this)}hasCallbackQuery(e){return n.has.callbackQuery(e)(this)}hasGameQuery(e){return n.has.gameQuery(e)(this)}hasInlineQuery(e){return n.has.inlineQuery(e)(this)}hasChosenInlineResult(e){return n.has.chosenInlineResult(e)(this)}hasPreCheckoutQuery(e){return n.has.preCheckoutQuery(e)(this)}hasShippingQuery(e){return n.has.shippingQuery(e)(this)}reply(e,t,s){var i;let r=this.msg;return this.api.sendMessage(u(this.chatId,"sendMessage"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDraft(e,t,s){let i=this.msg;return this.api.sendMessageDraft(u(this.chatId,"sendMessageDraft"),this.update.update_id,e,{...i?.is_topic_message?{message_thread_id:i?.message_thread_id}:{},...t},s)}forwardMessage(e,t,s){var i;let r=this.msg;return this.api.forwardMessage(e,u(this.chatId,"forwardMessage"),u(this.msgId,"forwardMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}forwardMessages(e,t,s,i){var r;let o=this.msg;return this.api.forwardMessages(e,u(this.chatId,"forwardMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}copyMessage(e,t,s){var i;let r=this.msg;return this.api.copyMessage(e,u(this.chatId,"copyMessage"),u(this.msgId,"copyMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}copyMessages(e,t,s,i){var r;let o=this.msg;return this.api.copyMessages(e,u(this.chatId,"copyMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPhoto(e,t,s){var i;let r=this.msg;return this.api.sendPhoto(u(this.chatId,"sendPhoto"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAudio(e,t,s){var i;let r=this.msg;return this.api.sendAudio(u(this.chatId,"sendAudio"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDocument(e,t,s){var i;let r=this.msg;return this.api.sendDocument(u(this.chatId,"sendDocument"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideo(e,t,s){var i;let r=this.msg;return this.api.sendVideo(u(this.chatId,"sendVideo"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAnimation(e,t,s){var i;let r=this.msg;return this.api.sendAnimation(u(this.chatId,"sendAnimation"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVoice(e,t,s){var i;let r=this.msg;return this.api.sendVoice(u(this.chatId,"sendVoice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideoNote(e,t,s){var i;let r=this.msg;return this.api.sendVideoNote(u(this.chatId,"sendVideoNote"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithMediaGroup(e,t,s){var i;let r=this.msg;return this.api.sendMediaGroup(u(this.chatId,"sendMediaGroup"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithLocation(e,t,s,i){var r;let o=this.msg;return this.api.sendLocation(u(this.chatId,"sendLocation"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}editMessageLiveLocation(e,t,s,i){let r=this.inlineMessageId;return r!==void 0?this.api.editMessageLiveLocationInline(r,e,t,{business_connection_id:this.businessConnectionId,...s},i):this.api.editMessageLiveLocation(u(this.chatId,"editMessageLiveLocation"),u(this.msgId,"editMessageLiveLocation"),e,t,{business_connection_id:this.businessConnectionId,...s},i)}stopMessageLiveLocation(e,t){let s=this.inlineMessageId;return s!==void 0?this.api.stopMessageLiveLocationInline(s,{business_connection_id:this.businessConnectionId,...e},t):this.api.stopMessageLiveLocation(u(this.chatId,"stopMessageLiveLocation"),u(this.msgId,"stopMessageLiveLocation"),{business_connection_id:this.businessConnectionId,...e},t)}sendPaidMedia(e,t,s,i){var r,o;let a=this.msg;return this.api.sendPaidMedia(u(this.chatId,"sendPaidMedia"),e,t,{business_connection_id:this.businessConnectionId,...a?.is_topic_message?{message_thread_id:a.message_thread_id}:{},direct_messages_topic_id:(o=(r=this.msg)===null||r===void 0?void 0:r.direct_messages_topic)===null||o===void 0?void 0:o.topic_id,...s},i)}replyWithVenue(e,t,s,i,r,o){var a;let d=this.msg;return this.api.sendVenue(u(this.chatId,"sendVenue"),e,t,s,i,{business_connection_id:this.businessConnectionId,...d?.is_topic_message?{message_thread_id:d.message_thread_id}:{},direct_messages_topic_id:(a=d?.direct_messages_topic)===null||a===void 0?void 0:a.topic_id,...r},o)}replyWithContact(e,t,s,i){var r;let o=this.msg;return this.api.sendContact(u(this.chatId,"sendContact"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPoll(e,t,s,i){let r=this.msg;return this.api.sendPoll(u(this.chatId,"sendPoll"),e,t,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},...s},i)}replyWithChecklist(e,t,s){return this.api.sendChecklist(u(this.businessConnectionId,"sendChecklist"),u(this.chatId,"sendChecklist"),e,t,s)}editMessageChecklist(e,t,s){var i,r,o,a;let d=u(this.msg,"editMessageChecklist"),c=(a=(r=(i=d.checklist_tasks_done)===null||i===void 0?void 0:i.checklist_message)!==null&&r!==void 0?r:(o=d.checklist_tasks_added)===null||o===void 0?void 0:o.checklist_message)!==null&&a!==void 0?a:d;return this.api.editMessageChecklist(u(this.businessConnectionId,"editMessageChecklist"),u(c.chat.id,"editMessageChecklist"),u(c.message_id,"editMessageChecklist"),e,t,s)}replyWithDice(e,t,s){var i;let r=this.msg;return this.api.sendDice(u(this.chatId,"sendDice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithChatAction(e,t,s){let i=this.msg;return this.api.sendChatAction(u(this.chatId,"sendChatAction"),e,{business_connection_id:this.businessConnectionId,message_thread_id:i?.message_thread_id,...t},s)}react(e,t,s){return this.api.setMessageReaction(u(this.chatId,"setMessageReaction"),u(this.msgId,"setMessageReaction"),typeof e=="string"?[{type:"emoji",emoji:e}]:(Array.isArray(e)?e:[e]).map(i=>typeof i=="string"?{type:"emoji",emoji:i}:i),t,s)}getUserProfilePhotos(e,t){return this.api.getUserProfilePhotos(u(this.from,"getUserProfilePhotos").id,e,t)}getUserProfileAudios(e,t){return this.api.getUserProfileAudios(u(this.from,"getUserProfileAudios").id,e,t)}setUserEmojiStatus(e,t){return this.api.setUserEmojiStatus(u(this.from,"setUserEmojiStatus").id,e,t)}getUserChatBoosts(e,t){return this.api.getUserChatBoosts(e??u(this.chatId,"getUserChatBoosts"),u(this.from,"getUserChatBoosts").id,t)}getUserGifts(e,t){return this.api.getUserGifts(u(this.from,"getUserGifts").id,e,t)}getChatGifts(e,t){return this.api.getChatGifts(u(this.chatId,"getChatGifts"),e,t)}getBusinessConnection(e){return this.api.getBusinessConnection(u(this.businessConnectionId,"getBusinessConnection"),e)}getFile(e){var t,s,i,r,o,a;let d=u(this.msg,"getFile"),c=d.photo!==void 0?d.photo[d.photo.length-1]:(a=(o=(r=(i=(s=(t=d.animation)!==null&&t!==void 0?t:d.audio)!==null&&s!==void 0?s:d.document)!==null&&i!==void 0?i:d.video)!==null&&r!==void 0?r:d.video_note)!==null&&o!==void 0?o:d.voice)!==null&&a!==void 0?a:d.sticker;return this.api.getFile(u(c,"getFile").file_id,e)}kickAuthor(...e){return this.banAuthor(...e)}banAuthor(e,t){return this.api.banChatMember(u(this.chatId,"banAuthor"),u(this.from,"banAuthor").id,e,t)}kickChatMember(...e){return this.banChatMember(...e)}banChatMember(e,t,s){return this.api.banChatMember(u(this.chatId,"banChatMember"),e,t,s)}unbanChatMember(e,t,s){return this.api.unbanChatMember(u(this.chatId,"unbanChatMember"),e,t,s)}restrictAuthor(e,t,s){return this.api.restrictChatMember(u(this.chatId,"restrictAuthor"),u(this.from,"restrictAuthor").id,e,t,s)}restrictChatMember(e,t,s,i){return this.api.restrictChatMember(u(this.chatId,"restrictChatMember"),e,t,s,i)}promoteAuthor(e,t){return this.api.promoteChatMember(u(this.chatId,"promoteAuthor"),u(this.from,"promoteAuthor").id,e,t)}promoteChatMember(e,t,s){return this.api.promoteChatMember(u(this.chatId,"promoteChatMember"),e,t,s)}setChatAdministratorAuthorCustomTitle(e,t){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorAuthorCustomTitle"),u(this.from,"setChatAdministratorAuthorCustomTitle").id,e,t)}setChatAdministratorCustomTitle(e,t,s){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorCustomTitle"),e,t,s)}setAuthorTag(e,t){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),u(this.from,"setChatMemberTag").id,e,t)}setChatMemberTag(e,t,s){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),e,t,s)}banChatSenderChat(e,t){return this.api.banChatSenderChat(u(this.chatId,"banChatSenderChat"),e,t)}unbanChatSenderChat(e,t){return this.api.unbanChatSenderChat(u(this.chatId,"unbanChatSenderChat"),e,t)}setChatPermissions(e,t,s){return this.api.setChatPermissions(u(this.chatId,"setChatPermissions"),e,t,s)}exportChatInviteLink(e){return this.api.exportChatInviteLink(u(this.chatId,"exportChatInviteLink"),e)}createChatInviteLink(e,t){return this.api.createChatInviteLink(u(this.chatId,"createChatInviteLink"),e,t)}editChatInviteLink(e,t,s){return this.api.editChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t,s)}createChatSubscriptionInviteLink(e,t,s,i){return this.api.createChatSubscriptionInviteLink(u(this.chatId,"createChatSubscriptionInviteLink"),e,t,s,i)}editChatSubscriptionInviteLink(e,t,s){return this.api.editChatSubscriptionInviteLink(u(this.chatId,"editChatSubscriptionInviteLink"),e,t,s)}revokeChatInviteLink(e,t){return this.api.revokeChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t)}approveChatJoinRequest(e,t){return this.api.approveChatJoinRequest(u(this.chatId,"approveChatJoinRequest"),e,t)}declineChatJoinRequest(e,t){return this.api.declineChatJoinRequest(u(this.chatId,"declineChatJoinRequest"),e,t)}approveSuggestedPost(e,t){return this.api.approveSuggestedPost(u(this.chatId,"approveSuggestedPost"),u(this.msgId,"approveSuggestedPost"),e,t)}declineSuggestedPost(e,t){return this.api.declineSuggestedPost(u(this.chatId,"declineSuggestedPost"),u(this.msgId,"declineSuggestedPost"),e,t)}setChatPhoto(e,t){return this.api.setChatPhoto(u(this.chatId,"setChatPhoto"),e,t)}deleteChatPhoto(e){return this.api.deleteChatPhoto(u(this.chatId,"deleteChatPhoto"),e)}setChatTitle(e,t){return this.api.setChatTitle(u(this.chatId,"setChatTitle"),e,t)}setChatDescription(e,t){return this.api.setChatDescription(u(this.chatId,"setChatDescription"),e,t)}pinChatMessage(e,t,s){return this.api.pinChatMessage(u(this.chatId,"pinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinChatMessage(e,t,s){return this.api.unpinChatMessage(u(this.chatId,"unpinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinAllChatMessages(e){return this.api.unpinAllChatMessages(u(this.chatId,"unpinAllChatMessages"),e)}leaveChat(e){return this.api.leaveChat(u(this.chatId,"leaveChat"),e)}getChat(e){return this.api.getChat(u(this.chatId,"getChat"),e)}getChatAdministrators(e){return this.api.getChatAdministrators(u(this.chatId,"getChatAdministrators"),e)}getChatMembersCount(...e){return this.getChatMemberCount(...e)}getChatMemberCount(e){return this.api.getChatMemberCount(u(this.chatId,"getChatMemberCount"),e)}getAuthor(e){return this.api.getChatMember(u(this.chatId,"getAuthor"),u(this.from,"getAuthor").id,e)}getChatMember(e,t){return this.api.getChatMember(u(this.chatId,"getChatMember"),e,t)}setChatStickerSet(e,t){return this.api.setChatStickerSet(u(this.chatId,"setChatStickerSet"),e,t)}deleteChatStickerSet(e){return this.api.deleteChatStickerSet(u(this.chatId,"deleteChatStickerSet"),e)}createForumTopic(e,t,s){return this.api.createForumTopic(u(this.chatId,"createForumTopic"),e,t,s)}editForumTopic(e,t){let s=u(this.msg,"editForumTopic"),i=u(s.message_thread_id,"editForumTopic");return this.api.editForumTopic(s.chat.id,i,e,t)}closeForumTopic(e){let t=u(this.msg,"closeForumTopic"),s=u(t.message_thread_id,"closeForumTopic");return this.api.closeForumTopic(t.chat.id,s,e)}reopenForumTopic(e){let t=u(this.msg,"reopenForumTopic"),s=u(t.message_thread_id,"reopenForumTopic");return this.api.reopenForumTopic(t.chat.id,s,e)}deleteForumTopic(e){let t=u(this.msg,"deleteForumTopic"),s=u(t.message_thread_id,"deleteForumTopic");return this.api.deleteForumTopic(t.chat.id,s,e)}unpinAllForumTopicMessages(e){let t=u(this.msg,"unpinAllForumTopicMessages"),s=u(t.message_thread_id,"unpinAllForumTopicMessages");return this.api.unpinAllForumTopicMessages(t.chat.id,s,e)}editGeneralForumTopic(e,t){return this.api.editGeneralForumTopic(u(this.chatId,"editGeneralForumTopic"),e,t)}closeGeneralForumTopic(e){return this.api.closeGeneralForumTopic(u(this.chatId,"closeGeneralForumTopic"),e)}reopenGeneralForumTopic(e){return this.api.reopenGeneralForumTopic(u(this.chatId,"reopenGeneralForumTopic"),e)}hideGeneralForumTopic(e){return this.api.hideGeneralForumTopic(u(this.chatId,"hideGeneralForumTopic"),e)}unhideGeneralForumTopic(e){return this.api.unhideGeneralForumTopic(u(this.chatId,"unhideGeneralForumTopic"),e)}unpinAllGeneralForumTopicMessages(e){return this.api.unpinAllGeneralForumTopicMessages(u(this.chatId,"unpinAllGeneralForumTopicMessages"),e)}answerCallbackQuery(e,t){return this.api.answerCallbackQuery(u(this.callbackQuery,"answerCallbackQuery").id,typeof e=="string"?{text:e}:e,t)}setChatMenuButton(e,t){return this.api.setChatMenuButton(e,t)}getChatMenuButton(e,t){return this.api.getChatMenuButton(e,t)}setMyDefaultAdministratorRights(e,t){return this.api.setMyDefaultAdministratorRights(e,t)}getMyDefaultAdministratorRights(e,t){return this.api.getMyDefaultAdministratorRights(e,t)}editMessageText(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageTextInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageText(u(this.chatId,"editMessageText"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageText"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageCaption(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageCaptionInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageCaption(u(this.chatId,"editMessageCaption"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageCaption"),{business_connection_id:this.businessConnectionId,...e},t)}editMessageMedia(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageMediaInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageMedia(u(this.chatId,"editMessageMedia"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageMedia"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageReplyMarkup(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageReplyMarkupInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageReplyMarkup(u(this.chatId,"editMessageReplyMarkup"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageReplyMarkup"),{business_connection_id:this.businessConnectionId,...e},t)}stopPoll(e,t){var s,i,r,o,a;return this.api.stopPoll(u(this.chatId,"stopPoll"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"stopPoll"),{business_connection_id:this.businessConnectionId,...e},t)}deleteMessage(e){var t,s,i,r,o;return this.api.deleteMessage(u(this.chatId,"deleteMessage"),u((r=(s=(t=this.msg)===null||t===void 0?void 0:t.message_id)!==null&&s!==void 0?s:(i=this.messageReaction)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReactionCount)===null||o===void 0?void 0:o.message_id,"deleteMessage"),e)}deleteMessages(e,t){return this.api.deleteMessages(u(this.chatId,"deleteMessages"),e,t)}deleteBusinessMessages(e,t){return this.api.deleteBusinessMessages(u(this.businessConnectionId,"deleteBusinessMessages"),e,t)}setBusinessAccountName(e,t,s){return this.api.setBusinessAccountName(u(this.businessConnectionId,"setBusinessAccountName"),e,t,s)}setBusinessAccountUsername(e,t){return this.api.setBusinessAccountUsername(u(this.businessConnectionId,"setBusinessAccountUsername"),e,t)}setBusinessAccountBio(e,t){return this.api.setBusinessAccountBio(u(this.businessConnectionId,"setBusinessAccountBio"),e,t)}setBusinessAccountProfilePhoto(e,t,s){return this.api.setBusinessAccountProfilePhoto(u(this.businessConnectionId,"setBusinessAccountProfilePhoto"),e,t,s)}removeBusinessAccountProfilePhoto(e,t){return this.api.removeBusinessAccountProfilePhoto(u(this.businessConnectionId,"removeBusinessAccountProfilePhoto"),e,t)}setBusinessAccountGiftSettings(e,t,s){return this.api.setBusinessAccountGiftSettings(u(this.businessConnectionId,"setBusinessAccountGiftSettings"),e,t,s)}getBusinessAccountStarBalance(e){return this.api.getBusinessAccountStarBalance(u(this.businessConnectionId,"getBusinessAccountStarBalance"),e)}transferBusinessAccountStars(e,t){return this.api.transferBusinessAccountStars(u(this.businessConnectionId,"transferBusinessAccountStars"),e,t)}getBusinessAccountGifts(e,t){return this.api.getBusinessAccountGifts(u(this.businessConnectionId,"getBusinessAccountGifts"),e,t)}convertGiftToStars(e,t){return this.api.convertGiftToStars(u(this.businessConnectionId,"convertGiftToStars"),e,t)}upgradeGift(e,t,s){return this.api.upgradeGift(u(this.businessConnectionId,"upgradeGift"),e,t,s)}transferGift(e,t,s,i){return this.api.transferGift(u(this.businessConnectionId,"transferGift"),e,t,s,i)}postStory(e,t,s,i){return this.api.postStory(u(this.businessConnectionId,"postStory"),e,t,s,i)}repostStory(e,t,s){var i;let r=u((i=this.msg)===null||i===void 0?void 0:i.story,"repostStory");return this.api.repostStory(u(this.businessConnectionId,"repostStory"),r.chat.id,r.id,e,t,s)}editStory(e,t,s,i){return this.api.editStory(u(this.businessConnectionId,"editStory"),e,t,s,i)}deleteStory(e,t){return this.api.deleteStory(u(this.businessConnectionId,"deleteStory"),e,t)}replyWithSticker(e,t,s){var i;let r=this.msg;return this.api.sendSticker(u(this.chatId,"sendSticker"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}getCustomEmojiStickers(e){var t,s;return this.api.getCustomEmojiStickers(((s=(t=this.msg)===null||t===void 0?void 0:t.entities)!==null&&s!==void 0?s:[]).filter(i=>i.type==="custom_emoji").map(i=>i.custom_emoji_id),e)}replyWithGift(e,t,s){return this.api.sendGift(u(this.from,"sendGift").id,e,t,s)}giftPremiumSubscription(e,t,s,i){return this.api.giftPremiumSubscription(u(this.from,"giftPremiumSubscription").id,e,t,s,i)}replyWithGiftToChannel(e,t,s){return this.api.sendGiftToChannel(u(this.chat,"sendGift").id,e,t,s)}answerInlineQuery(e,t,s){return this.api.answerInlineQuery(u(this.inlineQuery,"answerInlineQuery").id,e,t,s)}savePreparedInlineMessage(e,t,s){return this.api.savePreparedInlineMessage(u(this.from,"savePreparedInlineMessage").id,e,t,s)}replyWithInvoice(e,t,s,i,r,o,a){var d;let c=this.msg;return this.api.sendInvoice(u(this.chatId,"sendInvoice"),e,t,s,i,r,{...c?.is_topic_message?{message_thread_id:c.message_thread_id}:{},direct_messages_topic_id:(d=c?.direct_messages_topic)===null||d===void 0?void 0:d.topic_id,...o},a)}answerShippingQuery(e,t,s){return this.api.answerShippingQuery(u(this.shippingQuery,"answerShippingQuery").id,e,t,s)}answerPreCheckoutQuery(e,t,s){return this.api.answerPreCheckoutQuery(u(this.preCheckoutQuery,"answerPreCheckoutQuery").id,e,typeof t=="string"?{error_message:t}:t,s)}refundStarPayment(e){var t;return this.api.refundStarPayment(u(this.from,"refundStarPayment").id,u((t=this.msg)===null||t===void 0?void 0:t.successful_payment,"refundStarPayment").telegram_payment_charge_id,e)}editUserStarSubscription(e,t,s){return this.api.editUserStarSubscription(u(this.from,"editUserStarSubscription").id,e,t,s)}verifyUser(e,t){return this.api.verifyUser(u(this.from,"verifyUser").id,e,t)}verifyChat(e,t){return this.api.verifyChat(u(this.chatId,"verifyChat"),e,t)}removeUserVerification(e){return this.api.removeUserVerification(u(this.from,"removeUserVerification").id,e)}removeChatVerification(e){return this.api.removeChatVerification(u(this.chatId,"removeChatVerification"),e)}readBusinessMessage(e){return this.api.readBusinessMessage(u(this.businessConnectionId,"readBusinessMessage"),u(this.chatId,"readBusinessMessage"),u(this.msgId,"readBusinessMessage"),e)}setPassportDataErrors(e,t){return this.api.setPassportDataErrors(u(this.from,"setPassportDataErrors").id,e,t)}replyWithGame(e,t,s){let i=this.msg;return this.api.sendGame(u(this.chatId,"sendGame"),e,{business_connection_id:this.businessConnectionId,...i?.is_topic_message?{message_thread_id:i.message_thread_id}:{},...t},s)}};ue.Context=oe;oe.has=S;function u(n,e){if(n===void 0)throw new Error(`Missing information for API call to ${e}`);return n}function $(n){return ae(n).map(e=>typeof e=="string"?t=>t===e?e:null:t=>t.match(e))}function L(n,e,t){for(let s of t){let i=s(e);if(i)return n.match=i,!0}return!1}function ae(n){return Array.isArray(n)?n:[n]}});var Re=y(q=>{"use strict";h();Object.defineProperty(q,"__esModule",{value:!0});q.Composer=q.BotError=void 0;q.run=bt;var I=de(),ce=class extends Error{constructor(e,t){super(qs(e)),this.error=e,this.ctx=t,this.name="BotError",e instanceof Error&&(this.stack=e.stack)}};q.BotError=ce;function qs(n){let e;if(n instanceof Error)e=`${n.name} in middleware: ${n.message}`;else{let t=typeof n;switch(e=`Non-error value of type ${t} thrown in middleware`,t){case"bigint":case"boolean":case"number":case"symbol":e+=`: ${n}`;break;case"string":e+=`: ${String(n).substring(0,50)}`;break;default:e+="!";break}}return e}function V(n){return typeof n=="function"?n:(e,t)=>n.middleware()(e,t)}function vt(n,e){return async(t,s)=>{let i=!1;await n(t,async()=>{if(i)throw new Error("`next` already called before!");i=!0,await e(t,s)})}}function Ee(n,e){return e()}var Us=()=>Promise.resolve();async function bt(n,e){await n(e,Us)}var je=class n{constructor(...e){this.handler=e.length===0?Ee:e.map(V).reduce(vt)}middleware(){return this.handler}use(...e){let t=new n(...e);return this.handler=vt(this.handler,V(t)),t}on(e,...t){return this.filter(I.Context.has.filterQuery(e),...t)}hears(e,...t){return this.filter(I.Context.has.text(e),...t)}command(e,...t){return this.filter(I.Context.has.command(e),...t)}reaction(e,...t){return this.filter(I.Context.has.reaction(e),...t)}chatType(e,...t){return this.filter(I.Context.has.chatType(e),...t)}callbackQuery(e,...t){return this.filter(I.Context.has.callbackQuery(e),...t)}gameQuery(e,...t){return this.filter(I.Context.has.gameQuery(e),...t)}inlineQuery(e,...t){return this.filter(I.Context.has.inlineQuery(e),...t)}chosenInlineResult(e,...t){return this.filter(I.Context.has.chosenInlineResult(e),...t)}preCheckoutQuery(e,...t){return this.filter(I.Context.has.preCheckoutQuery(e),...t)}shippingQuery(e,...t){return this.filter(I.Context.has.shippingQuery(e),...t)}filter(e,...t){let s=new n(...t);return this.branch(e,s,Ee),s}drop(e,...t){return this.filter(async s=>!await e(s),...t)}fork(...e){let t=new n(...e),s=V(t);return this.use((i,r)=>Promise.all([r(),bt(s,i)])),t}lazy(e){return this.use(async(t,s)=>{let i=await e(t),r=Array.isArray(i)?i:[i];await V(new n(...r))(t,s)})}route(e,t,s=Ee){return this.lazy(async i=>{var r;let o=await e(i);return(r=o===void 0||!t[o]?s:t[o])!==null&&r!==void 0?r:[]})}branch(e,t,s){return this.lazy(async i=>await e(i)?t:s)}errorBoundary(e,...t){let s=new n(...t),i=V(s);return this.use(async(r,o)=>{let a=!1,d=()=>(a=!0,Promise.resolve());try{await i(r,d)}catch(c){a=!1,await e(new ce(c,r),d)}a&&await o()}),s}};q.Composer=je});var j=y(A=>{"use strict";h();Object.defineProperty(A,"__esModule",{value:!0});A.defaultAdapter=A.itrToStream=A.debug=void 0;A.baseFetchConfig=zs;var Gs=K("http"),Os=K("https"),Ds=K("stream"),Qs=ws();Object.defineProperty(A,"debug",{enumerable:!0,get:function(){return Qs.debug}});var Ns=n=>Ds.Readable.from(n,{objectMode:!1});A.itrToStream=Ns;var xs=new Map,Ws=new Map;function wt(n,e,t){let s=n.get(e);return s===void 0&&(s=t(),n.set(e,s)),s}function zs(n){return n.startsWith("https:")?{compress:!0,agent:wt(Ws,n,()=>new Os.Agent({keepAlive:!0}))}:n.startsWith("http:")?{agent:wt(xs,n,()=>new Gs.Agent({keepAlive:!0}))}:{}}A.defaultAdapter="express"});var pe=y(R=>{"use strict";h();Object.defineProperty(R,"__esModule",{value:!0});R.HttpError=R.GrammyError=void 0;R.toGrammyError=Ks;R.toHttpError=Vs;var Hs=j(),Ct=(0,Hs.debug)("grammy:warn"),le=class extends Error{constructor(e,t,s,i){var r;super(`${e} (${t.error_code}: ${t.description})`),this.method=s,this.payload=i,this.ok=!1,this.name="GrammyError",this.error_code=t.error_code,this.description=t.description,this.parameters=(r=t.parameters)!==null&&r!==void 0?r:{}}};R.GrammyError=le;function Ks(n,e,t){switch(n.error_code){case 401:Ct("Error 401 means that your bot token is wrong, talk to https://t.me/BotFather to check it.");break;case 409:Ct("Error 409 means that you are running your bot several times on long polling. Consider revoking the bot token if you believe that no other instance is running.");break}return new le(`Call to '${e}' failed!`,n,e,t)}var he=class extends Error{constructor(e,t){super(e),this.error=t,this.name="HttpError"}};R.HttpError=he;function Ys(n){return typeof n=="object"&&n!==null&&"status"in n&&"statusText"in n}function Vs(n,e,t){let s=`Network request for '${n}' failed!`;return Ys(t)&&(s+=` (${t.status}: ${t.statusText})`),e&&t instanceof Error&&(s+=` ${t.message}`),new he(s,t)}});var Mt=y(()=>{h()});var kt=y(T=>{"use strict";h();var Js=T&&T.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),Xs=T&&T.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Js(e,n,t)};Object.defineProperty(T,"__esModule",{value:!0});T.InputFile=void 0;var It=K("fs"),Zs=rt(),ge=K("path"),ei=j(),ti=(0,ei.debug)("grammy:warn");Xs(Mt(),T);var Be=class n{constructor(e,t){this.consumed=!1,this.fileData=e,t??(t=this.guessFilename(e)),this.filename=t,typeof e=="string"&&(e.startsWith("http:")||e.startsWith("https:"))&&ti(`InputFile received the local file path '${e}' that looks like a URL. Is this a mistake?`)}guessFilename(e){if(typeof e=="string")return(0,ge.basename)(e);if("url"in e)return(0,ge.basename)(e.url);if(e instanceof URL){if(e.pathname!=="/"){let t=(0,ge.basename)(e.pathname);if(t)return t}return(0,ge.basename)(e.hostname)}}async toRaw(){if(this.consumed)throw new Error("Cannot reuse InputFile data source!");let e=this.fileData;return typeof e=="string"?(0,It.createReadStream)(e):e instanceof URL?e.protocol==="file"?(0,It.createReadStream)(e.pathname):St(e):"url"in e?St(e.url):e instanceof Uint8Array?e:typeof e=="function"?new n(await e()).toRaw():(this.consumed=!0,e)}toJSON(){throw new Error("InputFile instances must be sent via grammY")}};T.InputFile=Be;async function*St(n){let{body:e}=await(0,Zs.default)(n);for await(let t of e){if(typeof t=="string")throw new Error(`Could not transfer file, received string data instead of bytes from '${n}'`);yield t}}});var Fe=y(U=>{"use strict";h();var si=U&&U.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),ii=U&&U.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&si(e,n,t)};Object.defineProperty(U,"__esModule",{value:!0});ii(kt(),U)});var Pt=y(X=>{"use strict";h();Object.defineProperty(X,"__esModule",{value:!0});X.requiresFormDataUpload=$e;X.createJsonPayload=ri;X.createFormDataPayload=ai;var ni=j(),me=Fe();function $e(n){return n instanceof me.InputFile||typeof n=="object"&&n!==null&&Object.values(n).some(e=>Array.isArray(e)?e.some($e):e instanceof me.InputFile||$e(e))}function At(n){return JSON.stringify(n,(e,t)=>t??void 0)}function ri(n){return{method:"POST",headers:{"content-type":"application/json",connection:"keep-alive"},body:At(n)}}async function*oi(n,e){try{yield*n}catch(t){e(t)}}function ai(n,e){let t=ui(),s=di(n,t),i=oi(s,e),r=(0,ni.itrToStream)(i);return{method:"POST",headers:{"content-type":`multipart/form-data; boundary=${t}`,connection:"keep-alive"},body:r}}function ui(){return"----------"+Tt(32)}function Tt(n=16){return Array.from(Array(n)).map(()=>Math.random().toString(36)[2]||0).join("")}var J=new TextEncoder;async function*di(n,e){let t=Le(n);yield J.encode(`--${e}\r
|
|
3
|
+
import{a as rt,b as Ms}from"./chunk-QN6Y6NPA.js";import{e as ot}from"./chunk-3B2HABK7.js";import"./chunk-T2T2UEPY.js";import"./chunk-M53RP3YP.js";import{a as Cs}from"./chunk-OOEH6ZSV.js";import{a as ws}from"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{b as h}from"./chunk-GZPNIYVZ.js";import{a as K,d as y,f as nt}from"./chunk-OWGSC52X.js";var re=y(Y=>{"use strict";h();Object.defineProperty(Y,"__esModule",{value:!0});Y.matchFilter=Is;Y.parse=ft;Y.preprocess=_t;var at=new Map;function Is(n){var e;let t=Array.isArray(n)?n:[n],s=t.join(","),i=(e=at.get(s))!==null&&e!==void 0?e:(()=>{let r=ft(t),o=Ss(r);return at.set(s,o),o})();return r=>i(r)}function ft(n){return Array.isArray(n)?n.map(e=>e.split(":")):[n.split(":")]}function Ss(n){let e=n.flatMap(i=>ks(i,_t(i))),t=Ts(e),s=Ps(t);return i=>!!s(i.update,i)}function _t(n){let e=ne,t=[n].flatMap(s=>{let[i,r,o]=s;if(!(i in mt))return[s];if(!i&&!r&&!o)return[s];let d=mt[i].map(c=>[c,r,o]);return r===void 0||r in Ae&&(r||o)?d:d.filter(([c])=>{var l;return!!(!((l=e[c])===null||l===void 0)&&l[r])})}).flatMap(s=>{let[i,r,o]=s;if(!(r in Ae))return[s];if(!r&&!o)return[s];let d=Ae[r].map(c=>[i,c,o]);return o===void 0?d:d.filter(([,c])=>{var l,p;return!!(!((p=(l=e[i])===null||l===void 0?void 0:l[c])===null||p===void 0)&&p[o])})});if(t.length===0)throw new Error(`Shortcuts in '${n.join(":")}' do not expand to any valid filter query`);return t}function ks(n,e){if(e.length===0)throw new Error("Empty filter query given");let t=e.map(As).filter(s=>s!==!0);if(t.length===0)return e;throw t.length===1?new Error(t[0]):new Error(`Invalid filter query '${n.join(":")}'. There are ${t.length} errors after expanding the contained shortcuts: ${t.join("; ")}`)}function As(n){let[e,t,s,...i]=n;if(e===void 0)return"Empty filter query given";if(!(e in ne)){let a=Object.keys(ne);return`Invalid L1 filter '${e}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(t===void 0)return!0;let r=ne[e];if(!(t in r)){let a=Object.keys(r);return`Invalid L2 filter '${t}' given in '${n.join(":")}'. Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}if(s===void 0)return!0;let o=r[t];if(!(s in o)){let a=Object.keys(o);return`Invalid L3 filter '${s}' given in '${n.join(":")}'. ${a.length===0?`No further filtering is possible after '${e}:${t}'.`:`Permitted values are: ${a.map(d=>`'${d}'`).join(", ")}.`}`}return i.length===0?!0:`Cannot filter further than three levels, ':${i.join(":")}' is invalid!`}function Ts(n){var e,t;let s={};for(let[i,r,o]of n){let a=(e=s[i])!==null&&e!==void 0?e:s[i]={};if(r!==void 0){let d=(t=a[r])!==null&&t!==void 0?t:a[r]=new Set;o!==void 0&&d.add(o)}}return s}function ke(n,e){return(t,s)=>n(t,s)||e(t,s)}function ut(n,e){return(t,s)=>{let i=n(t,s);return i&&e(i,s)}}function dt(n){return(e,t)=>n(e,t)!=null}function Ps(n){let e=Object.entries(n).map(([t,s])=>{let i=o=>o[t],r=Object.entries(s).map(([o,a])=>{let d=l=>l[o],c=Array.from(a).map(l=>l==="me"?(m,_)=>{let g=_.me.id;return ct(m,w=>w.id===g)}:m=>ct(m,_=>_[l]||_.type===l));return c.length===0?dt(d):ut(d,c.reduce(ke))});return r.length===0?dt(i):ut(i,r.reduce(ke))});if(e.length===0)throw new Error("Cannot create filter function for empty query");return e.reduce(ke)}function ct(n,e){let t=s=>s!=null&&e(s);return Array.isArray(n)?n.some(t):t(n)}var lt={mention:{},hashtag:{},cashtag:{},bot_command:{},url:{},email:{},phone_number:{},bold:{},italic:{},underline:{},strikethrough:{},spoiler:{},blockquote:{},expandable_blockquote:{},code:{},pre:{},text_link:{},text_mention:{},custom_emoji:{}},Te={me:{},is_bot:{},is_premium:{},added_to_attachment_menu:{}},Es={user:{},hidden_user:{},chat:{},channel:{}},js={is_video:{},is_animated:{},premium_animation:{}},Pe={emoji:{},custom_emoji:{},paid:{}},ht={can_be_upgraded:{},is_upgrade_separate:{},is_private:{}},yt={forward_origin:Es,is_topic_message:{},is_automatic_forward:{},business_connection_id:{},text:{},animation:{},audio:{},document:{},paid_media:{},photo:{},sticker:js,story:{},video:{},video_note:{},voice:{},contact:{},dice:{},game:{},poll:{},venue:{},location:{},entities:lt,caption_entities:lt,caption:{},link_preview_options:{url:{},prefer_small_media:{},prefer_large_media:{},show_above_text:{}},effect_id:{},paid_star_count:{},has_media_spoiler:{},new_chat_title:{},new_chat_photo:{},delete_chat_photo:{},message_auto_delete_timer_changed:{},pinned_message:{},invoice:{},proximity_alert_triggered:{},chat_background_set:{},giveaway_created:{},giveaway:{only_new_members:{},has_public_winners:{}},giveaway_winners:{only_new_members:{},was_refunded:{}},giveaway_completed:{},gift:ht,gift_upgrade_sent:ht,unique_gift:{transfer_star_count:{}},paid_message_price_changed:{},video_chat_scheduled:{},video_chat_started:{},video_chat_ended:{},video_chat_participants_invited:{},web_app_data:{}},ie={...yt,direct_messages_topic:{},chat_owner_left:{new_owner:{}},chat_owner_changd:{},new_chat_members:Te,left_chat_member:Te,group_chat_created:{},supergroup_chat_created:{},migrate_to_chat_id:{},migrate_from_chat_id:{},successful_payment:{},refunded_payment:{},users_shared:{},chat_shared:{},connected_website:{},write_access_allowed:{},passport_data:{},boost_added:{},forum_topic_created:{is_name_implicit:{}},forum_topic_edited:{name:{},icon_custom_emoji_id:{}},forum_topic_closed:{},forum_topic_reopened:{},general_forum_topic_hidden:{},general_forum_topic_unhidden:{},checklist:{others_can_add_tasks:{},others_can_mark_tasks_as_done:{}},checklist_tasks_done:{},checklist_tasks_added:{},suggested_post_info:{},suggested_post_approved:{},suggested_post_approval_failed:{},suggested_post_declined:{},suggested_post_paid:{},suggested_post_refunded:{},sender_boost_count:{}},pt={...yt,channel_chat_created:{},direct_message_price_changed:{},is_paid_post:{}},Rs={can_reply:{},is_enabled:{}},Bs={old_reaction:Pe,new_reaction:Pe},Fs={reactions:Pe},$s={data:{},game_short_name:{}},gt={from:Te},ne={message:ie,edited_message:ie,channel_post:pt,edited_channel_post:pt,business_connection:Rs,business_message:ie,edited_business_message:ie,deleted_business_messages:{},inline_query:{},chosen_inline_result:{},callback_query:$s,shipping_query:{},pre_checkout_query:{},poll:{},poll_answer:{},my_chat_member:gt,chat_member:gt,chat_join_request:{},message_reaction:Bs,message_reaction_count:Fs,chat_boost:{},removed_chat_boost:{},purchased_paid_media:{}},mt={"":["message","channel_post"],msg:["message","channel_post"],edit:["edited_message","edited_channel_post"]},Ae={"":["entities","caption_entities"],media:["photo","video"],file:["photo","animation","audio","document","video","video_note","voice","sticker"]}});var de=y(ue=>{"use strict";h();Object.defineProperty(ue,"__esModule",{value:!0});ue.Context=void 0;var Ls=re(),S={filterQuery(n){let e=(0,Ls.matchFilter)(n);return t=>e(t)},text(n){let e=S.filterQuery([":text",":caption"]),t=$(n);return s=>{var i,r;if(!e(s))return!1;let o=(i=s.message)!==null&&i!==void 0?i:s.channelPost,a=(r=o.text)!==null&&r!==void 0?r:o.caption;return L(s,a,t)}},command(n){let e=S.filterQuery(":entities:bot_command"),t=new Set,s=new Set;return ae(n).forEach(i=>{if(i.startsWith("/"))throw new Error(`Do not include '/' when registering command handlers (use '${i.substring(1)}' not '${i}')`);(i.includes("@")?t:s).add(i)}),i=>{var r,o;if(!e(i))return!1;let a=(r=i.message)!==null&&r!==void 0?r:i.channelPost,d=(o=a.text)!==null&&o!==void 0?o:a.caption;return a.entities.some(c=>{if(c.type!=="bot_command"||c.offset!==0)return!1;let l=d.substring(1,c.length);if(s.has(l)||t.has(l))return i.match=d.substring(l.length+1).trimStart(),!0;let p=l.indexOf("@");if(p===-1)return!1;let m=l.substring(p+1).toLowerCase(),_=i.me.username.toLowerCase();if(m!==_)return!1;let g=l.substring(0,p);return s.has(g)?(i.match=d.substring(l.length+1).trimStart(),!0):!1})}},reaction(n){let e=S.filterQuery("message_reaction"),t=typeof n=="string"?[{type:"emoji",emoji:n}]:(Array.isArray(n)?n:[n]).map(o=>typeof o=="string"?{type:"emoji",emoji:o}:o),s=new Set(t.filter(o=>o.type==="emoji").map(o=>o.emoji)),i=new Set(t.filter(o=>o.type==="custom_emoji").map(o=>o.custom_emoji_id)),r=t.some(o=>o.type==="paid");return o=>{if(!e(o))return!1;let{old_reaction:a,new_reaction:d}=o.messageReaction;for(let c of d){let l=!1;if(c.type==="emoji"){for(let p of a)if(p.type==="emoji"&&p.emoji===c.emoji){l=!0;break}}else if(c.type==="custom_emoji"){for(let p of a)if(p.type==="custom_emoji"&&p.custom_emoji_id===c.custom_emoji_id){l=!0;break}}else if(c.type==="paid"){for(let p of a)if(p.type==="paid"){l=!0;break}}if(!l)if(c.type==="emoji"){if(s.has(c.emoji))return!0}else if(c.type==="custom_emoji"){if(i.has(c.custom_emoji_id))return!0}else if(c.type==="paid"){if(r)return!0}else return!0}return!1}},chatType(n){let e=new Set(ae(n));return t=>{var s;return((s=t.chat)===null||s===void 0?void 0:s.type)!==void 0&&e.has(t.chat.type)}},callbackQuery(n){let e=S.filterQuery("callback_query:data"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.data,t)},gameQuery(n){let e=S.filterQuery("callback_query:game_short_name"),t=$(n);return s=>e(s)&&L(s,s.callbackQuery.game_short_name,t)},inlineQuery(n){let e=S.filterQuery("inline_query"),t=$(n);return s=>e(s)&&L(s,s.inlineQuery.query,t)},chosenInlineResult(n){let e=S.filterQuery("chosen_inline_result"),t=$(n);return s=>e(s)&&L(s,s.chosenInlineResult.result_id,t)},preCheckoutQuery(n){let e=S.filterQuery("pre_checkout_query"),t=$(n);return s=>e(s)&&L(s,s.preCheckoutQuery.invoice_payload,t)},shippingQuery(n){let e=S.filterQuery("shipping_query"),t=$(n);return s=>e(s)&&L(s,s.shippingQuery.invoice_payload,t)}},oe=class n{constructor(e,t,s){this.update=e,this.api=t,this.me=s}get message(){return this.update.message}get editedMessage(){return this.update.edited_message}get channelPost(){return this.update.channel_post}get editedChannelPost(){return this.update.edited_channel_post}get businessConnection(){return this.update.business_connection}get businessMessage(){return this.update.business_message}get editedBusinessMessage(){return this.update.edited_business_message}get deletedBusinessMessages(){return this.update.deleted_business_messages}get messageReaction(){return this.update.message_reaction}get messageReactionCount(){return this.update.message_reaction_count}get inlineQuery(){return this.update.inline_query}get chosenInlineResult(){return this.update.chosen_inline_result}get callbackQuery(){return this.update.callback_query}get shippingQuery(){return this.update.shipping_query}get preCheckoutQuery(){return this.update.pre_checkout_query}get poll(){return this.update.poll}get pollAnswer(){return this.update.poll_answer}get myChatMember(){return this.update.my_chat_member}get chatMember(){return this.update.chat_member}get chatJoinRequest(){return this.update.chat_join_request}get chatBoost(){return this.update.chat_boost}get removedChatBoost(){return this.update.removed_chat_boost}get purchasedPaidMedia(){return this.update.purchased_paid_media}get msg(){var e,t,s,i,r,o,a;return(o=(r=(i=(s=(t=(e=this.message)!==null&&e!==void 0?e:this.editedMessage)!==null&&t!==void 0?t:this.channelPost)!==null&&s!==void 0?s:this.editedChannelPost)!==null&&i!==void 0?i:this.businessMessage)!==null&&r!==void 0?r:this.editedBusinessMessage)!==null&&o!==void 0?o:(a=this.callbackQuery)===null||a===void 0?void 0:a.message}get chat(){var e,t,s,i,r,o,a,d,c;return(c=(d=(a=(o=(r=(i=(s=(t=(e=this.msg)!==null&&e!==void 0?e:this.deletedBusinessMessages)!==null&&t!==void 0?t:this.messageReaction)!==null&&s!==void 0?s:this.messageReactionCount)!==null&&i!==void 0?i:this.myChatMember)!==null&&r!==void 0?r:this.chatMember)!==null&&o!==void 0?o:this.chatJoinRequest)!==null&&a!==void 0?a:this.chatBoost)!==null&&d!==void 0?d:this.removedChatBoost)===null||c===void 0?void 0:c.chat}get senderChat(){var e;return(e=this.msg)===null||e===void 0?void 0:e.sender_chat}get from(){var e,t,s,i,r,o,a,d,c,l,p,m,_,g,w,M,v;return(a=(o=(t=(e=this.businessConnection)!==null&&e!==void 0?e:this.messageReaction)!==null&&t!==void 0?t:(r=(i=(s=this.chatBoost)===null||s===void 0?void 0:s.boost)!==null&&i!==void 0?i:this.removedChatBoost)===null||r===void 0?void 0:r.source)===null||o===void 0?void 0:o.user)!==null&&a!==void 0?a:(v=(M=(w=(g=(_=(m=(p=(l=(c=(d=this.callbackQuery)!==null&&d!==void 0?d:this.msg)!==null&&c!==void 0?c:this.inlineQuery)!==null&&l!==void 0?l:this.chosenInlineResult)!==null&&p!==void 0?p:this.shippingQuery)!==null&&m!==void 0?m:this.preCheckoutQuery)!==null&&_!==void 0?_:this.myChatMember)!==null&&g!==void 0?g:this.chatMember)!==null&&w!==void 0?w:this.chatJoinRequest)!==null&&M!==void 0?M:this.purchasedPaidMedia)===null||v===void 0?void 0:v.from}get msgId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.message_id)!==null&&t!==void 0?t:(s=this.messageReaction)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReactionCount)===null||r===void 0?void 0:r.message_id}get chatId(){var e,t,s;return(t=(e=this.chat)===null||e===void 0?void 0:e.id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.user_chat_id}get inlineMessageId(){var e,t,s;return(t=(e=this.callbackQuery)===null||e===void 0?void 0:e.inline_message_id)!==null&&t!==void 0?t:(s=this.chosenInlineResult)===null||s===void 0?void 0:s.inline_message_id}get businessConnectionId(){var e,t,s,i,r;return(i=(t=(e=this.msg)===null||e===void 0?void 0:e.business_connection_id)!==null&&t!==void 0?t:(s=this.businessConnection)===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:(r=this.deletedBusinessMessages)===null||r===void 0?void 0:r.business_connection_id}entities(e){var t,s;let i=this.msg;if(i===void 0)return[];let r=(t=i.text)!==null&&t!==void 0?t:i.caption;if(r===void 0)return[];let o=(s=i.entities)!==null&&s!==void 0?s:i.caption_entities;if(o===void 0)return[];if(e!==void 0){let a=new Set(ae(e));o=o.filter(d=>a.has(d.type))}return o.map(a=>({...a,text:r.substring(a.offset,a.offset+a.length)}))}reactions(){let e=[],t=[],s=[],i=[],r=[],o=[],a=[],d=[],c=!1,l=!1,p=this.messageReaction;if(p!==void 0){let{old_reaction:m,new_reaction:_}=p;for(let g of _)g.type==="emoji"?e.push(g.emoji):g.type==="custom_emoji"?r.push(g.custom_emoji_id):g.type==="paid"&&(c=l=!0);for(let g of m)g.type==="emoji"?i.push(g.emoji):g.type==="custom_emoji"?d.push(g.custom_emoji_id):g.type==="paid"&&(l=!1);t.push(...e),o.push(...r);for(let g=0;g<i.length;g++){let w=t.length;if(w===0)break;let M=i[g];for(let v=0;v<w;v++)if(M===t[v]){s.push(M),i.splice(g,1),t.splice(v,1),g--;break}}for(let g=0;g<d.length;g++){let w=o.length;if(w===0)break;let M=d[g];for(let v=0;v<w;v++)if(M===o[v]){a.push(M),d.splice(g,1),o.splice(v,1),g--;break}}}return{emoji:e,emojiAdded:t,emojiKept:s,emojiRemoved:i,customEmoji:r,customEmojiAdded:o,customEmojiKept:a,customEmojiRemoved:d,paid:c,paidAdded:l}}has(e){return n.has.filterQuery(e)(this)}hasText(e){return n.has.text(e)(this)}hasCommand(e){return n.has.command(e)(this)}hasReaction(e){return n.has.reaction(e)(this)}hasChatType(e){return n.has.chatType(e)(this)}hasCallbackQuery(e){return n.has.callbackQuery(e)(this)}hasGameQuery(e){return n.has.gameQuery(e)(this)}hasInlineQuery(e){return n.has.inlineQuery(e)(this)}hasChosenInlineResult(e){return n.has.chosenInlineResult(e)(this)}hasPreCheckoutQuery(e){return n.has.preCheckoutQuery(e)(this)}hasShippingQuery(e){return n.has.shippingQuery(e)(this)}reply(e,t,s){var i;let r=this.msg;return this.api.sendMessage(u(this.chatId,"sendMessage"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDraft(e,t,s){let i=this.msg;return this.api.sendMessageDraft(u(this.chatId,"sendMessageDraft"),this.update.update_id,e,{...i?.is_topic_message?{message_thread_id:i?.message_thread_id}:{},...t},s)}forwardMessage(e,t,s){var i;let r=this.msg;return this.api.forwardMessage(e,u(this.chatId,"forwardMessage"),u(this.msgId,"forwardMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}forwardMessages(e,t,s,i){var r;let o=this.msg;return this.api.forwardMessages(e,u(this.chatId,"forwardMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}copyMessage(e,t,s){var i;let r=this.msg;return this.api.copyMessage(e,u(this.chatId,"copyMessage"),u(this.msgId,"copyMessage"),{direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}copyMessages(e,t,s,i){var r;let o=this.msg;return this.api.copyMessages(e,u(this.chatId,"copyMessages"),t,{direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPhoto(e,t,s){var i;let r=this.msg;return this.api.sendPhoto(u(this.chatId,"sendPhoto"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAudio(e,t,s){var i;let r=this.msg;return this.api.sendAudio(u(this.chatId,"sendAudio"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithDocument(e,t,s){var i;let r=this.msg;return this.api.sendDocument(u(this.chatId,"sendDocument"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideo(e,t,s){var i;let r=this.msg;return this.api.sendVideo(u(this.chatId,"sendVideo"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithAnimation(e,t,s){var i;let r=this.msg;return this.api.sendAnimation(u(this.chatId,"sendAnimation"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVoice(e,t,s){var i;let r=this.msg;return this.api.sendVoice(u(this.chatId,"sendVoice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithVideoNote(e,t,s){var i;let r=this.msg;return this.api.sendVideoNote(u(this.chatId,"sendVideoNote"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithMediaGroup(e,t,s){var i;let r=this.msg;return this.api.sendMediaGroup(u(this.chatId,"sendMediaGroup"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithLocation(e,t,s,i){var r;let o=this.msg;return this.api.sendLocation(u(this.chatId,"sendLocation"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}editMessageLiveLocation(e,t,s,i){let r=this.inlineMessageId;return r!==void 0?this.api.editMessageLiveLocationInline(r,e,t,{business_connection_id:this.businessConnectionId,...s},i):this.api.editMessageLiveLocation(u(this.chatId,"editMessageLiveLocation"),u(this.msgId,"editMessageLiveLocation"),e,t,{business_connection_id:this.businessConnectionId,...s},i)}stopMessageLiveLocation(e,t){let s=this.inlineMessageId;return s!==void 0?this.api.stopMessageLiveLocationInline(s,{business_connection_id:this.businessConnectionId,...e},t):this.api.stopMessageLiveLocation(u(this.chatId,"stopMessageLiveLocation"),u(this.msgId,"stopMessageLiveLocation"),{business_connection_id:this.businessConnectionId,...e},t)}sendPaidMedia(e,t,s,i){var r,o;let a=this.msg;return this.api.sendPaidMedia(u(this.chatId,"sendPaidMedia"),e,t,{business_connection_id:this.businessConnectionId,...a?.is_topic_message?{message_thread_id:a.message_thread_id}:{},direct_messages_topic_id:(o=(r=this.msg)===null||r===void 0?void 0:r.direct_messages_topic)===null||o===void 0?void 0:o.topic_id,...s},i)}replyWithVenue(e,t,s,i,r,o){var a;let d=this.msg;return this.api.sendVenue(u(this.chatId,"sendVenue"),e,t,s,i,{business_connection_id:this.businessConnectionId,...d?.is_topic_message?{message_thread_id:d.message_thread_id}:{},direct_messages_topic_id:(a=d?.direct_messages_topic)===null||a===void 0?void 0:a.topic_id,...r},o)}replyWithContact(e,t,s,i){var r;let o=this.msg;return this.api.sendContact(u(this.chatId,"sendContact"),e,t,{business_connection_id:this.businessConnectionId,...o?.is_topic_message?{message_thread_id:o.message_thread_id}:{},direct_messages_topic_id:(r=o?.direct_messages_topic)===null||r===void 0?void 0:r.topic_id,...s},i)}replyWithPoll(e,t,s,i){let r=this.msg;return this.api.sendPoll(u(this.chatId,"sendPoll"),e,t,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},...s},i)}replyWithChecklist(e,t,s){return this.api.sendChecklist(u(this.businessConnectionId,"sendChecklist"),u(this.chatId,"sendChecklist"),e,t,s)}editMessageChecklist(e,t,s){var i,r,o,a;let d=u(this.msg,"editMessageChecklist"),c=(a=(r=(i=d.checklist_tasks_done)===null||i===void 0?void 0:i.checklist_message)!==null&&r!==void 0?r:(o=d.checklist_tasks_added)===null||o===void 0?void 0:o.checklist_message)!==null&&a!==void 0?a:d;return this.api.editMessageChecklist(u(this.businessConnectionId,"editMessageChecklist"),u(c.chat.id,"editMessageChecklist"),u(c.message_id,"editMessageChecklist"),e,t,s)}replyWithDice(e,t,s){var i;let r=this.msg;return this.api.sendDice(u(this.chatId,"sendDice"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}replyWithChatAction(e,t,s){let i=this.msg;return this.api.sendChatAction(u(this.chatId,"sendChatAction"),e,{business_connection_id:this.businessConnectionId,message_thread_id:i?.message_thread_id,...t},s)}react(e,t,s){return this.api.setMessageReaction(u(this.chatId,"setMessageReaction"),u(this.msgId,"setMessageReaction"),typeof e=="string"?[{type:"emoji",emoji:e}]:(Array.isArray(e)?e:[e]).map(i=>typeof i=="string"?{type:"emoji",emoji:i}:i),t,s)}getUserProfilePhotos(e,t){return this.api.getUserProfilePhotos(u(this.from,"getUserProfilePhotos").id,e,t)}getUserProfileAudios(e,t){return this.api.getUserProfileAudios(u(this.from,"getUserProfileAudios").id,e,t)}setUserEmojiStatus(e,t){return this.api.setUserEmojiStatus(u(this.from,"setUserEmojiStatus").id,e,t)}getUserChatBoosts(e,t){return this.api.getUserChatBoosts(e??u(this.chatId,"getUserChatBoosts"),u(this.from,"getUserChatBoosts").id,t)}getUserGifts(e,t){return this.api.getUserGifts(u(this.from,"getUserGifts").id,e,t)}getChatGifts(e,t){return this.api.getChatGifts(u(this.chatId,"getChatGifts"),e,t)}getBusinessConnection(e){return this.api.getBusinessConnection(u(this.businessConnectionId,"getBusinessConnection"),e)}getFile(e){var t,s,i,r,o,a;let d=u(this.msg,"getFile"),c=d.photo!==void 0?d.photo[d.photo.length-1]:(a=(o=(r=(i=(s=(t=d.animation)!==null&&t!==void 0?t:d.audio)!==null&&s!==void 0?s:d.document)!==null&&i!==void 0?i:d.video)!==null&&r!==void 0?r:d.video_note)!==null&&o!==void 0?o:d.voice)!==null&&a!==void 0?a:d.sticker;return this.api.getFile(u(c,"getFile").file_id,e)}kickAuthor(...e){return this.banAuthor(...e)}banAuthor(e,t){return this.api.banChatMember(u(this.chatId,"banAuthor"),u(this.from,"banAuthor").id,e,t)}kickChatMember(...e){return this.banChatMember(...e)}banChatMember(e,t,s){return this.api.banChatMember(u(this.chatId,"banChatMember"),e,t,s)}unbanChatMember(e,t,s){return this.api.unbanChatMember(u(this.chatId,"unbanChatMember"),e,t,s)}restrictAuthor(e,t,s){return this.api.restrictChatMember(u(this.chatId,"restrictAuthor"),u(this.from,"restrictAuthor").id,e,t,s)}restrictChatMember(e,t,s,i){return this.api.restrictChatMember(u(this.chatId,"restrictChatMember"),e,t,s,i)}promoteAuthor(e,t){return this.api.promoteChatMember(u(this.chatId,"promoteAuthor"),u(this.from,"promoteAuthor").id,e,t)}promoteChatMember(e,t,s){return this.api.promoteChatMember(u(this.chatId,"promoteChatMember"),e,t,s)}setChatAdministratorAuthorCustomTitle(e,t){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorAuthorCustomTitle"),u(this.from,"setChatAdministratorAuthorCustomTitle").id,e,t)}setChatAdministratorCustomTitle(e,t,s){return this.api.setChatAdministratorCustomTitle(u(this.chatId,"setChatAdministratorCustomTitle"),e,t,s)}setAuthorTag(e,t){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),u(this.from,"setChatMemberTag").id,e,t)}setChatMemberTag(e,t,s){return this.api.setChatMemberTag(u(this.chatId,"setChatMemberTag"),e,t,s)}banChatSenderChat(e,t){return this.api.banChatSenderChat(u(this.chatId,"banChatSenderChat"),e,t)}unbanChatSenderChat(e,t){return this.api.unbanChatSenderChat(u(this.chatId,"unbanChatSenderChat"),e,t)}setChatPermissions(e,t,s){return this.api.setChatPermissions(u(this.chatId,"setChatPermissions"),e,t,s)}exportChatInviteLink(e){return this.api.exportChatInviteLink(u(this.chatId,"exportChatInviteLink"),e)}createChatInviteLink(e,t){return this.api.createChatInviteLink(u(this.chatId,"createChatInviteLink"),e,t)}editChatInviteLink(e,t,s){return this.api.editChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t,s)}createChatSubscriptionInviteLink(e,t,s,i){return this.api.createChatSubscriptionInviteLink(u(this.chatId,"createChatSubscriptionInviteLink"),e,t,s,i)}editChatSubscriptionInviteLink(e,t,s){return this.api.editChatSubscriptionInviteLink(u(this.chatId,"editChatSubscriptionInviteLink"),e,t,s)}revokeChatInviteLink(e,t){return this.api.revokeChatInviteLink(u(this.chatId,"editChatInviteLink"),e,t)}approveChatJoinRequest(e,t){return this.api.approveChatJoinRequest(u(this.chatId,"approveChatJoinRequest"),e,t)}declineChatJoinRequest(e,t){return this.api.declineChatJoinRequest(u(this.chatId,"declineChatJoinRequest"),e,t)}approveSuggestedPost(e,t){return this.api.approveSuggestedPost(u(this.chatId,"approveSuggestedPost"),u(this.msgId,"approveSuggestedPost"),e,t)}declineSuggestedPost(e,t){return this.api.declineSuggestedPost(u(this.chatId,"declineSuggestedPost"),u(this.msgId,"declineSuggestedPost"),e,t)}setChatPhoto(e,t){return this.api.setChatPhoto(u(this.chatId,"setChatPhoto"),e,t)}deleteChatPhoto(e){return this.api.deleteChatPhoto(u(this.chatId,"deleteChatPhoto"),e)}setChatTitle(e,t){return this.api.setChatTitle(u(this.chatId,"setChatTitle"),e,t)}setChatDescription(e,t){return this.api.setChatDescription(u(this.chatId,"setChatDescription"),e,t)}pinChatMessage(e,t,s){return this.api.pinChatMessage(u(this.chatId,"pinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinChatMessage(e,t,s){return this.api.unpinChatMessage(u(this.chatId,"unpinChatMessage"),e,{business_connection_id:this.businessConnectionId,...t},s)}unpinAllChatMessages(e){return this.api.unpinAllChatMessages(u(this.chatId,"unpinAllChatMessages"),e)}leaveChat(e){return this.api.leaveChat(u(this.chatId,"leaveChat"),e)}getChat(e){return this.api.getChat(u(this.chatId,"getChat"),e)}getChatAdministrators(e){return this.api.getChatAdministrators(u(this.chatId,"getChatAdministrators"),e)}getChatMembersCount(...e){return this.getChatMemberCount(...e)}getChatMemberCount(e){return this.api.getChatMemberCount(u(this.chatId,"getChatMemberCount"),e)}getAuthor(e){return this.api.getChatMember(u(this.chatId,"getAuthor"),u(this.from,"getAuthor").id,e)}getChatMember(e,t){return this.api.getChatMember(u(this.chatId,"getChatMember"),e,t)}setChatStickerSet(e,t){return this.api.setChatStickerSet(u(this.chatId,"setChatStickerSet"),e,t)}deleteChatStickerSet(e){return this.api.deleteChatStickerSet(u(this.chatId,"deleteChatStickerSet"),e)}createForumTopic(e,t,s){return this.api.createForumTopic(u(this.chatId,"createForumTopic"),e,t,s)}editForumTopic(e,t){let s=u(this.msg,"editForumTopic"),i=u(s.message_thread_id,"editForumTopic");return this.api.editForumTopic(s.chat.id,i,e,t)}closeForumTopic(e){let t=u(this.msg,"closeForumTopic"),s=u(t.message_thread_id,"closeForumTopic");return this.api.closeForumTopic(t.chat.id,s,e)}reopenForumTopic(e){let t=u(this.msg,"reopenForumTopic"),s=u(t.message_thread_id,"reopenForumTopic");return this.api.reopenForumTopic(t.chat.id,s,e)}deleteForumTopic(e){let t=u(this.msg,"deleteForumTopic"),s=u(t.message_thread_id,"deleteForumTopic");return this.api.deleteForumTopic(t.chat.id,s,e)}unpinAllForumTopicMessages(e){let t=u(this.msg,"unpinAllForumTopicMessages"),s=u(t.message_thread_id,"unpinAllForumTopicMessages");return this.api.unpinAllForumTopicMessages(t.chat.id,s,e)}editGeneralForumTopic(e,t){return this.api.editGeneralForumTopic(u(this.chatId,"editGeneralForumTopic"),e,t)}closeGeneralForumTopic(e){return this.api.closeGeneralForumTopic(u(this.chatId,"closeGeneralForumTopic"),e)}reopenGeneralForumTopic(e){return this.api.reopenGeneralForumTopic(u(this.chatId,"reopenGeneralForumTopic"),e)}hideGeneralForumTopic(e){return this.api.hideGeneralForumTopic(u(this.chatId,"hideGeneralForumTopic"),e)}unhideGeneralForumTopic(e){return this.api.unhideGeneralForumTopic(u(this.chatId,"unhideGeneralForumTopic"),e)}unpinAllGeneralForumTopicMessages(e){return this.api.unpinAllGeneralForumTopicMessages(u(this.chatId,"unpinAllGeneralForumTopicMessages"),e)}answerCallbackQuery(e,t){return this.api.answerCallbackQuery(u(this.callbackQuery,"answerCallbackQuery").id,typeof e=="string"?{text:e}:e,t)}setChatMenuButton(e,t){return this.api.setChatMenuButton(e,t)}getChatMenuButton(e,t){return this.api.getChatMenuButton(e,t)}setMyDefaultAdministratorRights(e,t){return this.api.setMyDefaultAdministratorRights(e,t)}getMyDefaultAdministratorRights(e,t){return this.api.getMyDefaultAdministratorRights(e,t)}editMessageText(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageTextInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageText(u(this.chatId,"editMessageText"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageText"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageCaption(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageCaptionInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageCaption(u(this.chatId,"editMessageCaption"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageCaption"),{business_connection_id:this.businessConnectionId,...e},t)}editMessageMedia(e,t,s){var i,r,o,a,d;let c=this.inlineMessageId;return c!==void 0?this.api.editMessageMediaInline(c,e,{business_connection_id:this.businessConnectionId,...t},s):this.api.editMessageMedia(u(this.chatId,"editMessageMedia"),u((a=(r=(i=this.msg)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReaction)===null||o===void 0?void 0:o.message_id)!==null&&a!==void 0?a:(d=this.messageReactionCount)===null||d===void 0?void 0:d.message_id,"editMessageMedia"),e,{business_connection_id:this.businessConnectionId,...t},s)}editMessageReplyMarkup(e,t){var s,i,r,o,a;let d=this.inlineMessageId;return d!==void 0?this.api.editMessageReplyMarkupInline(d,{business_connection_id:this.businessConnectionId,...e},t):this.api.editMessageReplyMarkup(u(this.chatId,"editMessageReplyMarkup"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"editMessageReplyMarkup"),{business_connection_id:this.businessConnectionId,...e},t)}stopPoll(e,t){var s,i,r,o,a;return this.api.stopPoll(u(this.chatId,"stopPoll"),u((o=(i=(s=this.msg)===null||s===void 0?void 0:s.message_id)!==null&&i!==void 0?i:(r=this.messageReaction)===null||r===void 0?void 0:r.message_id)!==null&&o!==void 0?o:(a=this.messageReactionCount)===null||a===void 0?void 0:a.message_id,"stopPoll"),{business_connection_id:this.businessConnectionId,...e},t)}deleteMessage(e){var t,s,i,r,o;return this.api.deleteMessage(u(this.chatId,"deleteMessage"),u((r=(s=(t=this.msg)===null||t===void 0?void 0:t.message_id)!==null&&s!==void 0?s:(i=this.messageReaction)===null||i===void 0?void 0:i.message_id)!==null&&r!==void 0?r:(o=this.messageReactionCount)===null||o===void 0?void 0:o.message_id,"deleteMessage"),e)}deleteMessages(e,t){return this.api.deleteMessages(u(this.chatId,"deleteMessages"),e,t)}deleteBusinessMessages(e,t){return this.api.deleteBusinessMessages(u(this.businessConnectionId,"deleteBusinessMessages"),e,t)}setBusinessAccountName(e,t,s){return this.api.setBusinessAccountName(u(this.businessConnectionId,"setBusinessAccountName"),e,t,s)}setBusinessAccountUsername(e,t){return this.api.setBusinessAccountUsername(u(this.businessConnectionId,"setBusinessAccountUsername"),e,t)}setBusinessAccountBio(e,t){return this.api.setBusinessAccountBio(u(this.businessConnectionId,"setBusinessAccountBio"),e,t)}setBusinessAccountProfilePhoto(e,t,s){return this.api.setBusinessAccountProfilePhoto(u(this.businessConnectionId,"setBusinessAccountProfilePhoto"),e,t,s)}removeBusinessAccountProfilePhoto(e,t){return this.api.removeBusinessAccountProfilePhoto(u(this.businessConnectionId,"removeBusinessAccountProfilePhoto"),e,t)}setBusinessAccountGiftSettings(e,t,s){return this.api.setBusinessAccountGiftSettings(u(this.businessConnectionId,"setBusinessAccountGiftSettings"),e,t,s)}getBusinessAccountStarBalance(e){return this.api.getBusinessAccountStarBalance(u(this.businessConnectionId,"getBusinessAccountStarBalance"),e)}transferBusinessAccountStars(e,t){return this.api.transferBusinessAccountStars(u(this.businessConnectionId,"transferBusinessAccountStars"),e,t)}getBusinessAccountGifts(e,t){return this.api.getBusinessAccountGifts(u(this.businessConnectionId,"getBusinessAccountGifts"),e,t)}convertGiftToStars(e,t){return this.api.convertGiftToStars(u(this.businessConnectionId,"convertGiftToStars"),e,t)}upgradeGift(e,t,s){return this.api.upgradeGift(u(this.businessConnectionId,"upgradeGift"),e,t,s)}transferGift(e,t,s,i){return this.api.transferGift(u(this.businessConnectionId,"transferGift"),e,t,s,i)}postStory(e,t,s,i){return this.api.postStory(u(this.businessConnectionId,"postStory"),e,t,s,i)}repostStory(e,t,s){var i;let r=u((i=this.msg)===null||i===void 0?void 0:i.story,"repostStory");return this.api.repostStory(u(this.businessConnectionId,"repostStory"),r.chat.id,r.id,e,t,s)}editStory(e,t,s,i){return this.api.editStory(u(this.businessConnectionId,"editStory"),e,t,s,i)}deleteStory(e,t){return this.api.deleteStory(u(this.businessConnectionId,"deleteStory"),e,t)}replyWithSticker(e,t,s){var i;let r=this.msg;return this.api.sendSticker(u(this.chatId,"sendSticker"),e,{business_connection_id:this.businessConnectionId,...r?.is_topic_message?{message_thread_id:r.message_thread_id}:{},direct_messages_topic_id:(i=r?.direct_messages_topic)===null||i===void 0?void 0:i.topic_id,...t},s)}getCustomEmojiStickers(e){var t,s;return this.api.getCustomEmojiStickers(((s=(t=this.msg)===null||t===void 0?void 0:t.entities)!==null&&s!==void 0?s:[]).filter(i=>i.type==="custom_emoji").map(i=>i.custom_emoji_id),e)}replyWithGift(e,t,s){return this.api.sendGift(u(this.from,"sendGift").id,e,t,s)}giftPremiumSubscription(e,t,s,i){return this.api.giftPremiumSubscription(u(this.from,"giftPremiumSubscription").id,e,t,s,i)}replyWithGiftToChannel(e,t,s){return this.api.sendGiftToChannel(u(this.chat,"sendGift").id,e,t,s)}answerInlineQuery(e,t,s){return this.api.answerInlineQuery(u(this.inlineQuery,"answerInlineQuery").id,e,t,s)}savePreparedInlineMessage(e,t,s){return this.api.savePreparedInlineMessage(u(this.from,"savePreparedInlineMessage").id,e,t,s)}replyWithInvoice(e,t,s,i,r,o,a){var d;let c=this.msg;return this.api.sendInvoice(u(this.chatId,"sendInvoice"),e,t,s,i,r,{...c?.is_topic_message?{message_thread_id:c.message_thread_id}:{},direct_messages_topic_id:(d=c?.direct_messages_topic)===null||d===void 0?void 0:d.topic_id,...o},a)}answerShippingQuery(e,t,s){return this.api.answerShippingQuery(u(this.shippingQuery,"answerShippingQuery").id,e,t,s)}answerPreCheckoutQuery(e,t,s){return this.api.answerPreCheckoutQuery(u(this.preCheckoutQuery,"answerPreCheckoutQuery").id,e,typeof t=="string"?{error_message:t}:t,s)}refundStarPayment(e){var t;return this.api.refundStarPayment(u(this.from,"refundStarPayment").id,u((t=this.msg)===null||t===void 0?void 0:t.successful_payment,"refundStarPayment").telegram_payment_charge_id,e)}editUserStarSubscription(e,t,s){return this.api.editUserStarSubscription(u(this.from,"editUserStarSubscription").id,e,t,s)}verifyUser(e,t){return this.api.verifyUser(u(this.from,"verifyUser").id,e,t)}verifyChat(e,t){return this.api.verifyChat(u(this.chatId,"verifyChat"),e,t)}removeUserVerification(e){return this.api.removeUserVerification(u(this.from,"removeUserVerification").id,e)}removeChatVerification(e){return this.api.removeChatVerification(u(this.chatId,"removeChatVerification"),e)}readBusinessMessage(e){return this.api.readBusinessMessage(u(this.businessConnectionId,"readBusinessMessage"),u(this.chatId,"readBusinessMessage"),u(this.msgId,"readBusinessMessage"),e)}setPassportDataErrors(e,t){return this.api.setPassportDataErrors(u(this.from,"setPassportDataErrors").id,e,t)}replyWithGame(e,t,s){let i=this.msg;return this.api.sendGame(u(this.chatId,"sendGame"),e,{business_connection_id:this.businessConnectionId,...i?.is_topic_message?{message_thread_id:i.message_thread_id}:{},...t},s)}};ue.Context=oe;oe.has=S;function u(n,e){if(n===void 0)throw new Error(`Missing information for API call to ${e}`);return n}function $(n){return ae(n).map(e=>typeof e=="string"?t=>t===e?e:null:t=>t.match(e))}function L(n,e,t){for(let s of t){let i=s(e);if(i)return n.match=i,!0}return!1}function ae(n){return Array.isArray(n)?n:[n]}});var Re=y(q=>{"use strict";h();Object.defineProperty(q,"__esModule",{value:!0});q.Composer=q.BotError=void 0;q.run=bt;var I=de(),ce=class extends Error{constructor(e,t){super(qs(e)),this.error=e,this.ctx=t,this.name="BotError",e instanceof Error&&(this.stack=e.stack)}};q.BotError=ce;function qs(n){let e;if(n instanceof Error)e=`${n.name} in middleware: ${n.message}`;else{let t=typeof n;switch(e=`Non-error value of type ${t} thrown in middleware`,t){case"bigint":case"boolean":case"number":case"symbol":e+=`: ${n}`;break;case"string":e+=`: ${String(n).substring(0,50)}`;break;default:e+="!";break}}return e}function V(n){return typeof n=="function"?n:(e,t)=>n.middleware()(e,t)}function vt(n,e){return async(t,s)=>{let i=!1;await n(t,async()=>{if(i)throw new Error("`next` already called before!");i=!0,await e(t,s)})}}function Ee(n,e){return e()}var Us=()=>Promise.resolve();async function bt(n,e){await n(e,Us)}var je=class n{constructor(...e){this.handler=e.length===0?Ee:e.map(V).reduce(vt)}middleware(){return this.handler}use(...e){let t=new n(...e);return this.handler=vt(this.handler,V(t)),t}on(e,...t){return this.filter(I.Context.has.filterQuery(e),...t)}hears(e,...t){return this.filter(I.Context.has.text(e),...t)}command(e,...t){return this.filter(I.Context.has.command(e),...t)}reaction(e,...t){return this.filter(I.Context.has.reaction(e),...t)}chatType(e,...t){return this.filter(I.Context.has.chatType(e),...t)}callbackQuery(e,...t){return this.filter(I.Context.has.callbackQuery(e),...t)}gameQuery(e,...t){return this.filter(I.Context.has.gameQuery(e),...t)}inlineQuery(e,...t){return this.filter(I.Context.has.inlineQuery(e),...t)}chosenInlineResult(e,...t){return this.filter(I.Context.has.chosenInlineResult(e),...t)}preCheckoutQuery(e,...t){return this.filter(I.Context.has.preCheckoutQuery(e),...t)}shippingQuery(e,...t){return this.filter(I.Context.has.shippingQuery(e),...t)}filter(e,...t){let s=new n(...t);return this.branch(e,s,Ee),s}drop(e,...t){return this.filter(async s=>!await e(s),...t)}fork(...e){let t=new n(...e),s=V(t);return this.use((i,r)=>Promise.all([r(),bt(s,i)])),t}lazy(e){return this.use(async(t,s)=>{let i=await e(t),r=Array.isArray(i)?i:[i];await V(new n(...r))(t,s)})}route(e,t,s=Ee){return this.lazy(async i=>{var r;let o=await e(i);return(r=o===void 0||!t[o]?s:t[o])!==null&&r!==void 0?r:[]})}branch(e,t,s){return this.lazy(async i=>await e(i)?t:s)}errorBoundary(e,...t){let s=new n(...t),i=V(s);return this.use(async(r,o)=>{let a=!1,d=()=>(a=!0,Promise.resolve());try{await i(r,d)}catch(c){a=!1,await e(new ce(c,r),d)}a&&await o()}),s}};q.Composer=je});var j=y(A=>{"use strict";h();Object.defineProperty(A,"__esModule",{value:!0});A.defaultAdapter=A.itrToStream=A.debug=void 0;A.baseFetchConfig=zs;var Gs=K("http"),Os=K("https"),Ds=K("stream"),Qs=ws();Object.defineProperty(A,"debug",{enumerable:!0,get:function(){return Qs.debug}});var Ns=n=>Ds.Readable.from(n,{objectMode:!1});A.itrToStream=Ns;var xs=new Map,Ws=new Map;function wt(n,e,t){let s=n.get(e);return s===void 0&&(s=t(),n.set(e,s)),s}function zs(n){return n.startsWith("https:")?{compress:!0,agent:wt(Ws,n,()=>new Os.Agent({keepAlive:!0}))}:n.startsWith("http:")?{agent:wt(xs,n,()=>new Gs.Agent({keepAlive:!0}))}:{}}A.defaultAdapter="express"});var pe=y(R=>{"use strict";h();Object.defineProperty(R,"__esModule",{value:!0});R.HttpError=R.GrammyError=void 0;R.toGrammyError=Ks;R.toHttpError=Vs;var Hs=j(),Ct=(0,Hs.debug)("grammy:warn"),le=class extends Error{constructor(e,t,s,i){var r;super(`${e} (${t.error_code}: ${t.description})`),this.method=s,this.payload=i,this.ok=!1,this.name="GrammyError",this.error_code=t.error_code,this.description=t.description,this.parameters=(r=t.parameters)!==null&&r!==void 0?r:{}}};R.GrammyError=le;function Ks(n,e,t){switch(n.error_code){case 401:Ct("Error 401 means that your bot token is wrong, talk to https://t.me/BotFather to check it.");break;case 409:Ct("Error 409 means that you are running your bot several times on long polling. Consider revoking the bot token if you believe that no other instance is running.");break}return new le(`Call to '${e}' failed!`,n,e,t)}var he=class extends Error{constructor(e,t){super(e),this.error=t,this.name="HttpError"}};R.HttpError=he;function Ys(n){return typeof n=="object"&&n!==null&&"status"in n&&"statusText"in n}function Vs(n,e,t){let s=`Network request for '${n}' failed!`;return Ys(t)&&(s+=` (${t.status}: ${t.statusText})`),e&&t instanceof Error&&(s+=` ${t.message}`),new he(s,t)}});var Mt=y(()=>{h()});var kt=y(T=>{"use strict";h();var Js=T&&T.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),Xs=T&&T.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Js(e,n,t)};Object.defineProperty(T,"__esModule",{value:!0});T.InputFile=void 0;var It=K("fs"),Zs=rt(),ge=K("path"),ei=j(),ti=(0,ei.debug)("grammy:warn");Xs(Mt(),T);var Be=class n{constructor(e,t){this.consumed=!1,this.fileData=e,t??(t=this.guessFilename(e)),this.filename=t,typeof e=="string"&&(e.startsWith("http:")||e.startsWith("https:"))&&ti(`InputFile received the local file path '${e}' that looks like a URL. Is this a mistake?`)}guessFilename(e){if(typeof e=="string")return(0,ge.basename)(e);if("url"in e)return(0,ge.basename)(e.url);if(e instanceof URL){if(e.pathname!=="/"){let t=(0,ge.basename)(e.pathname);if(t)return t}return(0,ge.basename)(e.hostname)}}async toRaw(){if(this.consumed)throw new Error("Cannot reuse InputFile data source!");let e=this.fileData;return typeof e=="string"?(0,It.createReadStream)(e):e instanceof URL?e.protocol==="file"?(0,It.createReadStream)(e.pathname):St(e):"url"in e?St(e.url):e instanceof Uint8Array?e:typeof e=="function"?new n(await e()).toRaw():(this.consumed=!0,e)}toJSON(){throw new Error("InputFile instances must be sent via grammY")}};T.InputFile=Be;async function*St(n){let{body:e}=await(0,Zs.default)(n);for await(let t of e){if(typeof t=="string")throw new Error(`Could not transfer file, received string data instead of bytes from '${n}'`);yield t}}});var Fe=y(U=>{"use strict";h();var si=U&&U.__createBinding||(Object.create?function(n,e,t,s){s===void 0&&(s=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(n,s,i)}:function(n,e,t,s){s===void 0&&(s=t),n[s]=e[t]}),ii=U&&U.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&si(e,n,t)};Object.defineProperty(U,"__esModule",{value:!0});ii(kt(),U)});var Pt=y(X=>{"use strict";h();Object.defineProperty(X,"__esModule",{value:!0});X.requiresFormDataUpload=$e;X.createJsonPayload=ri;X.createFormDataPayload=ai;var ni=j(),me=Fe();function $e(n){return n instanceof me.InputFile||typeof n=="object"&&n!==null&&Object.values(n).some(e=>Array.isArray(e)?e.some($e):e instanceof me.InputFile||$e(e))}function At(n){return JSON.stringify(n,(e,t)=>t??void 0)}function ri(n){return{method:"POST",headers:{"content-type":"application/json",connection:"keep-alive"},body:At(n)}}async function*oi(n,e){try{yield*n}catch(t){e(t)}}function ai(n,e){let t=ui(),s=di(n,t),i=oi(s,e),r=(0,ni.itrToStream)(i);return{method:"POST",headers:{"content-type":`multipart/form-data; boundary=${t}`,connection:"keep-alive"},body:r}}function ui(){return"----------"+Tt(32)}function Tt(n=16){return Array.from(Array(n)).map(()=>Math.random().toString(36)[2]||0).join("")}var J=new TextEncoder;async function*di(n,e){let t=Le(n);yield J.encode(`--${e}\r
|
|
4
4
|
`);let s=J.encode(`\r
|
|
5
5
|
--${e}\r
|
|
6
6
|
`),i=!0;for(let[r,o]of Object.entries(n))o!=null&&(i||(yield s),yield ci(r,o instanceof me.InputFile?o.toJSON():typeof o=="object"?At(o):o),i=!1);for(let{id:r,origin:o,file:a}of t)i||(yield s),yield*li(r,o,a),i=!1;yield J.encode(`\r
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as C}from"./chunk-6T2GIM76.js";import{
|
|
3
|
+
import{a as C}from"./chunk-6T2GIM76.js";import{$e as L,Af as K,Bf as V,Ef as Q,Hf as Y,Ia as D,af as q,dd as X,hf as G,vf as R,wf as S}from"./chunk-PEKAUGYV.js";import"./chunk-M53RP3YP.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-2HTPVSGT.js";import"./chunk-W4QSMIWO.js";import"./chunk-6I6VGTKD.js";import"./chunk-ZX34M2GF.js";import"./chunk-47XR7IMP.js";import"./chunk-MTMU7JYZ.js";import"./chunk-QKYGQLWC.js";import"./chunk-EZDV7A76.js";import"./chunk-RNKDFE2S.js";import"./chunk-RI54U73U.js";import"./chunk-6M5G5FBH.js";import"./chunk-QZI2ZGZY.js";import"./chunk-V6UPUMP3.js";import"./chunk-WC2VTVCE.js";import"./chunk-KHHJYBR5.js";import"./chunk-6EQMZNIY.js";import"./chunk-P5TG5CON.js";import"./chunk-DE3HKC2W.js";import"./chunk-GTVCJCHR.js";import"./chunk-IJEGHQ7Z.js";import"./chunk-PGUG43HG.js";import"./chunk-7ZODGQO6.js";import"./chunk-TISQNFB5.js";import"./chunk-VI74YQQO.js";import"./chunk-YV3PUOBU.js";import"./chunk-SOEIVSM5.js";import"./chunk-DC7LAFZZ.js";import"./chunk-4F4DA5UI.js";import"./chunk-3YLXGE6T.js";import"./chunk-JCE3JAVC.js";import"./chunk-SVSY6AWS.js";import"./chunk-AOOZREGV.js";import"./chunk-SDTWBD62.js";import{Ob as j,Pa as H,ca as U,ed as B,ia as P,yc as A}from"./chunk-DHDD5YJC.js";import{w as z}from"./chunk-PGXQZVLX.js";import"./chunk-LUNDTQ3G.js";import"./chunk-5OHGYMKP.js";import{i as k,p as F,q as W}from"./chunk-TWJLOEAI.js";import{D as T,E as I,G as v,b as x,ba as $}from"./chunk-27Q5KW3A.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";b();import*as _ from"node:fs";import*as p from"node:path";b();var re={"\u2010":"-","\u2011":"-","\u2012":"-","\u2013":"-","\u2014":"-","\u2015":"-","\u2212":"-","\u2018":"'","\u2019":"'","\u201A":"'","\u201B":"'","\u201C":'"',"\u201D":'"',"\u201E":'"',"\u201F":'"',"\xA0":" ","\u2002":" ","\u2003":" ","\u2004":" ","\u2005":" ","\u2006":" ","\u2007":" ","\u2008":" ","\u2009":" ","\u200A":" ","\u202F":" ","\u205F":" ","\u3000":" "},ue=new RegExp(`[${Object.keys(re).join("")}]`,"g");function w(n){return n.replace(ue,t=>re[t])}var he=[n=>n,n=>n.trimEnd()];function pe(n){return w(n).trimEnd()}function J(n,t,i){if(t.length===0)return 0;if(t.length>n.length)return null;e:for(let e=0;e<=n.length-t.length;e++){for(let r=0;r<t.length;r++)if(i(n[e+r])!==i(t[r]))continue e;return e}return null}function me(n){let t=n.split(`
|
|
4
4
|
`),i=new Array(t.length+1),e=0;for(let r=0;r<t.length;r++)i[r]=e,e+=t[r].length,r<t.length-1&&(e+=1);return i[t.length]=n.length,{lines:t,offsets:i}}function Z(n,t,i,e,r,o){if(r===0)return o?`
|
|
5
5
|
`:"";let l=t[e]??0,s=e+r-1,f=(t[s]??0)+(i[s]?.length??0);if(o){let g=t[e+r];g!==void 0?f=g:n.endsWith(`
|
|
6
6
|
`)&&(f=n.length)}return n.slice(l,f)}function _e(n,t){let{lines:i,offsets:e}=me(n),r=t.split(`
|