@visulima/task-runner 1.0.0-alpha.1 → 1.0.0-alpha.10
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/CHANGELOG.md +201 -0
- package/README.md +196 -52
- package/dist/index.d.ts +3166 -34
- package/dist/index.js +1 -20
- package/dist/packem_chunks/index.js +11 -0
- package/dist/packem_shared/Cache-C540ZPYk.js +2 -0
- package/dist/packem_shared/CompositeLifeCycle-D0zWvAXJ.js +1 -0
- package/dist/packem_shared/FileAccessTracker-DSNf03JW.js +47 -0
- package/dist/packem_shared/FingerprintManager-CYW2EwLc.js +2 -0
- package/dist/packem_shared/HttpRemoteCache-Ch-_9ejF.js +1 -0
- package/dist/packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js +1 -0
- package/dist/packem_shared/IncrementalFileHasher-jtLxMBKy.js +1 -0
- package/dist/packem_shared/LogReporter-BUPWiXAq.js +13 -0
- package/dist/packem_shared/ReapiRemoteCache-B3uQuVqP.js +251 -0
- package/dist/packem_shared/TaskOrchestrator-BgfOpjuB.js +2 -0
- package/dist/packem_shared/TerminalBuffer-BtZy7TpT.js +3 -0
- package/dist/packem_shared/TrackedTaskExecutor-D3-LNT_d.js +2 -0
- package/dist/packem_shared/V2_ROOT-injxWBrl.js +1 -0
- package/dist/packem_shared/actionDigestForTaskHash-BOL4fZ9v.js +1 -0
- package/dist/packem_shared/archive-CDfGy5Lm.js +1 -0
- package/dist/packem_shared/buildForwardDependencyMap-w1FVPFdv.js +3 -0
- package/dist/packem_shared/collectFiles-W4bnBRpb.js +1 -0
- package/dist/packem_shared/computeTaskHash-C2Iua2DL.js +1 -0
- package/dist/packem_shared/containsBlob-DBWgvkM_.js +1 -0
- package/dist/packem_shared/createInputHandler-CkDCpPYy.js +1 -0
- package/dist/packem_shared/createTaskGraph-CEYYI-DL.js +1 -0
- package/dist/packem_shared/defaultTaskRunner-CGbD4ahu.js +2 -0
- package/dist/packem_shared/detectFrameworks-WVZJOPgN.js +1 -0
- package/dist/packem_shared/detectScriptShell-CaTDk5cW.js +1 -0
- package/dist/packem_shared/digestBuffer-g11aCaDx.js +1 -0
- package/dist/packem_shared/enforceProjectConstraints-X49n3bVL.js +1 -0
- package/dist/packem_shared/expandArguments-4mab7-Ds.js +1 -0
- package/dist/packem_shared/expandShortcut-BErNHNXZ.js +1 -0
- package/dist/packem_shared/expandTokensInString-Cyx0qSFA.js +1 -0
- package/dist/packem_shared/expandWildcard-DE0dOOZF.js +1 -0
- package/dist/packem_shared/extractPackageName-BeL6Gc3a.js +1 -0
- package/dist/packem_shared/findCycle-BY8-jmzB.js +1 -0
- package/dist/packem_shared/formatTimingTable-CP3rsDwf.js +7 -0
- package/dist/packem_shared/generateRunSummary-ep21OCUT.js +1 -0
- package/dist/packem_shared/getCurrentBranch-D-qoZByx.js +1 -0
- package/dist/packem_shared/getMainWorktreeRoot-DRN_i8jA.js +1 -0
- package/dist/packem_shared/isNativeAvailable-BOavFPX1.js +1 -0
- package/dist/packem_shared/parseCommands-b1K2vIxj.js +1 -0
- package/dist/packem_shared/parsePartition-uzPNgtPp.js +1 -0
- package/dist/packem_shared/projectGraphToDot-K5A_CRoW.js +250 -0
- package/dist/packem_shared/resolveCacheMode-XhD7mg7G.js +1 -0
- package/dist/packem_shared/resolveOutputs-BBjdaraf.js +1 -0
- package/dist/packem_shared/runConcurrentFallback-CShJ7HUp.js +3 -0
- package/dist/packem_shared/runConcurrently-B471CUHO.js +1 -0
- package/dist/packem_shared/runTeardown-DBBpBAyb.js +1 -0
- package/dist/packem_shared/shell-quote-CksLqyXK.js +1 -0
- package/dist/packem_shared/stripQuotes-jkZb0CL9.js +1 -0
- package/dist/packem_shared/toChromeTrace-DxN5NQIU.js +1 -0
- package/dist/packem_shared/utils-BH2W5Wml.js +1 -0
- package/dist/packem_shared/withRestart-CWO6BKv_.js +1 -0
- package/index.js +775 -0
- package/package.json +30 -18
- package/binding.js +0 -204
- package/dist/affected.d.ts +0 -48
- package/dist/cache.d.ts +0 -103
- package/dist/default-task-runner.d.ts +0 -44
- package/dist/file-access-tracker.d.ts +0 -53
- package/dist/fingerprint.d.ts +0 -45
- package/dist/framework-inference.d.ts +0 -35
- package/dist/graph-visualizer.d.ts +0 -74
- package/dist/incremental-hasher.d.ts +0 -58
- package/dist/life-cycle.d.ts +0 -36
- package/dist/lockfile-hasher.d.ts +0 -73
- package/dist/native-binding.d.ts +0 -64
- package/dist/packem_shared/Cache-IYpTYVUC.js +0 -298
- package/dist/packem_shared/CompositeLifeCycle-7AtYw1dv.js +0 -112
- package/dist/packem_shared/FileAccessTracker-CrtBAt5D.js +0 -239
- package/dist/packem_shared/FingerprintManager-D6Y0erg-.js +0 -227
- package/dist/packem_shared/IncrementalFileHasher-Ds3J6dgb.js +0 -151
- package/dist/packem_shared/RemoteCache-BDqrnDEi.js +0 -179
- package/dist/packem_shared/TaskOrchestrator-BvYs3ONw.js +0 -342
- package/dist/packem_shared/TaskScheduler-CJilHDta.js +0 -111
- package/dist/packem_shared/TrackedTaskExecutor-BGUKFE-7.js +0 -164
- package/dist/packem_shared/collectFiles-ClXHnHhg.js +0 -22
- package/dist/packem_shared/computeTaskHash-BoCnnvIJ.js +0 -356
- package/dist/packem_shared/createTaskGraph-CcsFaSrz.js +0 -164
- package/dist/packem_shared/defaultTaskRunner-CrW4v5Ye.js +0 -79
- package/dist/packem_shared/detectFrameworks-CeFzKE6J.js +0 -101
- package/dist/packem_shared/extractPackageName-CbVNW-dr.js +0 -189
- package/dist/packem_shared/filterAffectedTasks-I-18zPg6.js +0 -135
- package/dist/packem_shared/findCycle-DF4_BRdO.js +0 -212
- package/dist/packem_shared/generateRunSummary-qn-_jKwt.js +0 -134
- package/dist/packem_shared/isNativeAvailable-BWhnZ4ES.js +0 -19
- package/dist/packem_shared/projectGraphToDot-VdTjHcVp.js +0 -202
- package/dist/packem_shared/utils-zO0ZRgtf.js +0 -390
- package/dist/remote-cache.d.ts +0 -55
- package/dist/run-summary.d.ts +0 -89
- package/dist/task-graph-utils.d.ts +0 -39
- package/dist/task-graph.d.ts +0 -22
- package/dist/task-hasher.d.ts +0 -67
- package/dist/task-orchestrator.d.ts +0 -38
- package/dist/task-scheduler.d.ts +0 -18
- package/dist/tracked-executor.d.ts +0 -46
- package/dist/types.d.ts +0 -385
- package/dist/utils.d.ts +0 -39
- package/npm/darwin-arm64/LICENSE.md +0 -21
- package/npm/darwin-arm64/node_modules/.bin/semantic-release +0 -21
- package/npm/darwin-arm64/package.json +0 -39
- package/npm/darwin-arm64/task-runner-native.darwin-arm64.node +0 -0
- package/npm/darwin-x64/LICENSE.md +0 -21
- package/npm/darwin-x64/node_modules/.bin/semantic-release +0 -21
- package/npm/darwin-x64/package.json +0 -39
- package/npm/darwin-x64/task-runner-native.darwin-x64.node +0 -0
- package/npm/linux-arm64-gnu/LICENSE.md +0 -21
- package/npm/linux-arm64-gnu/node_modules/.bin/semantic-release +0 -21
- package/npm/linux-arm64-gnu/package.json +0 -42
- package/npm/linux-arm64-gnu/task-runner-native.linux-arm64-gnu.node +0 -0
- package/npm/linux-arm64-musl/LICENSE.md +0 -21
- package/npm/linux-arm64-musl/node_modules/.bin/semantic-release +0 -21
- package/npm/linux-arm64-musl/package.json +0 -42
- package/npm/linux-arm64-musl/task-runner-native.linux-arm64-musl.node +0 -0
- package/npm/linux-x64-gnu/LICENSE.md +0 -21
- package/npm/linux-x64-gnu/node_modules/.bin/semantic-release +0 -21
- package/npm/linux-x64-gnu/package.json +0 -42
- package/npm/linux-x64-gnu/task-runner-native.linux-x64-gnu.node +0 -0
- package/npm/linux-x64-musl/LICENSE.md +0 -21
- package/npm/linux-x64-musl/node_modules/.bin/semantic-release +0 -21
- package/npm/linux-x64-musl/package.json +0 -42
- package/npm/linux-x64-musl/task-runner-native.linux-x64-musl.node +0 -0
- package/npm/win32-arm64-msvc/LICENSE.md +0 -21
- package/npm/win32-arm64-msvc/node_modules/.bin/semantic-release +0 -21
- package/npm/win32-arm64-msvc/package.json +0 -39
- package/npm/win32-arm64-msvc/task-runner-native.win32-arm64-msvc.node +0 -0
- package/npm/win32-x64-msvc/LICENSE.md +0 -21
- package/npm/win32-x64-msvc/node_modules/.bin/semantic-release +0 -21
- package/npm/win32-x64-msvc/package.json +0 -39
- package/npm/win32-x64-msvc/task-runner-native.win32-x64-msvc.node +0 -0
- package/task-runner-native.darwin-arm64.node +0 -0
- package/task-runner-native.darwin-x64.node +0 -0
- package/task-runner-native.linux-arm64-gnu.node +0 -0
- package/task-runner-native.linux-arm64-musl.node +0 -0
- package/task-runner-native.linux-x64-gnu.node +0 -0
- package/task-runner-native.linux-x64-musl.node +0 -0
- package/task-runner-native.win32-arm64-msvc.node +0 -0
- package/task-runner-native.win32-x64-msvc.node +0 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Cache, formatCacheSize, parseCacheSize } from './packem_shared/Cache-IYpTYVUC.js';
|
|
3
|
-
export { defaultTaskRunner } from './packem_shared/defaultTaskRunner-CrW4v5Ye.js';
|
|
4
|
-
export { FileAccessTracker, generatePreloadScript } from './packem_shared/FileAccessTracker-CrtBAt5D.js';
|
|
5
|
-
export { FingerprintManager } from './packem_shared/FingerprintManager-D6Y0erg-.js';
|
|
6
|
-
export { detectFrameworks, getFrameworkEnvVariables, inferFrameworkEnvPatterns } from './packem_shared/detectFrameworks-CeFzKE6J.js';
|
|
7
|
-
export { projectGraphToDot, toGraphAscii, toGraphHtml, toGraphJson, toGraphvizDot } from './packem_shared/projectGraphToDot-VdTjHcVp.js';
|
|
8
|
-
export { IncrementalFileHasher } from './packem_shared/IncrementalFileHasher-Ds3J6dgb.js';
|
|
9
|
-
export { CompositeLifeCycle, ConsoleLifeCycle, EmptyLifeCycle } from './packem_shared/CompositeLifeCycle-7AtYw1dv.js';
|
|
10
|
-
export { LockfileHasher, extractPackageName, parseNpmLockfile, parsePnpmLockfile, parseYarnLockfile } from './packem_shared/extractPackageName-CbVNW-dr.js';
|
|
11
|
-
export { isNativeAvailable, loadNativeBindings } from './packem_shared/isNativeAvailable-BWhnZ4ES.js';
|
|
12
|
-
export { RemoteCache } from './packem_shared/RemoteCache-BDqrnDEi.js';
|
|
13
|
-
export { generateRunSummary, writeRunSummary } from './packem_shared/generateRunSummary-qn-_jKwt.js';
|
|
14
|
-
export { createTaskGraph, getTaskId, parseTaskId } from './packem_shared/createTaskGraph-CcsFaSrz.js';
|
|
15
|
-
export { findCycle, findCycles, getDependentTasks, getLeafTasks, getTransitiveDependencies, makeAcyclic, reverseTaskGraph, walkTaskGraph } from './packem_shared/findCycle-DF4_BRdO.js';
|
|
16
|
-
export { InProcessTaskHasher, computeTaskHash } from './packem_shared/computeTaskHash-BoCnnvIJ.js';
|
|
17
|
-
export { TaskOrchestrator } from './packem_shared/TaskOrchestrator-BvYs3ONw.js';
|
|
18
|
-
export { TaskScheduler } from './packem_shared/TaskScheduler-CJilHDta.js';
|
|
19
|
-
export { TrackedTaskExecutor } from './packem_shared/TrackedTaskExecutor-BGUKFE-7.js';
|
|
20
|
-
export { c as collectFiles, a as createFailureResult, h as hashFile, b as hashStrings, r as readPackageDeps, d as resolveTaskCwd, s as sortObjectKeys, u as uniqueId } from './packem_shared/utils-zO0ZRgtf.js';
|
|
1
|
+
import{buildForwardDependencyMap as o,buildReverseDependencyMap as t,expandAffected as a,filterAffectedTasks as s,getAffectedProjects as p,getChangedFiles as n}from"./packem_shared/buildForwardDependencyMap-w1FVPFdv.js";import{createRemoteCacheBackend as i,resolveCacheMode as f}from"./packem_shared/resolveCacheMode-XhD7mg7G.js";import{actionDigestForTaskHash as l,containsByTaskHash as x,retrieveByTaskHash as h,storeByTaskHash as d}from"./packem_shared/actionDigestForTaskHash-BOL4fZ9v.js";import{HttpRemoteCache as u}from"./packem_shared/HttpRemoteCache-Ch-_9ejF.js";import{ReapiRemoteCache as C}from"./packem_shared/ReapiRemoteCache-B3uQuVqP.js";import{Cache as y,DEFAULT_CACHE_DIRECTORY_NAME as R,formatCacheSize as F,parseCacheSize as v}from"./packem_shared/Cache-C540ZPYk.js";import{digestBuffer as S,digestFile as I}from"./packem_shared/digestBuffer-g11aCaDx.js";import{V2_AC as b,V2_CAS as P,V2_INDEX as E,V2_ROOT as H,V2_TMP as A,acEntryPath as w,casBlobPath as D,taskHashIndexPath as _}from"./packem_shared/V2_ROOT-injxWBrl.js";import{containsBlob as M,fetchBlobToFile as N,putBlobFromBytes as O,putBlobFromFile as U,touchBlob as V,verifyBlob as W}from"./packem_shared/containsBlob-DBWgvkM_.js";import{toChromeTrace as z,writeChromeTrace as Y}from"./packem_shared/toChromeTrace-DxN5NQIU.js";import{parseCommands as J}from"./packem_shared/parseCommands-b1K2vIxj.js";import{runConcurrently as Q}from"./packem_shared/runConcurrently-B471CUHO.js";import{runConcurrentFallback as Z}from"./packem_shared/runConcurrentFallback-CShJ7HUp.js";import{defaultTaskRunner as ee}from"./packem_shared/defaultTaskRunner-CGbD4ahu.js";import{detectScriptShell as oe}from"./packem_shared/detectScriptShell-CaTDk5cW.js";import{FileAccessTracker as ae,generatePreloadScript as se}from"./packem_shared/FileAccessTracker-DSNf03JW.js";import{FingerprintManager as ne}from"./packem_shared/FingerprintManager-CYW2EwLc.js";import{detectFrameworks as ie,getFrameworkEnvVariables as fe,inferFrameworkEnvPatterns as ce}from"./packem_shared/detectFrameworks-WVZJOPgN.js";import{projectGraphToDot as xe,toGraphAscii as he,toGraphHtml as de,toGraphJson as ke,toGraphvizDot as ue}from"./packem_shared/projectGraphToDot-K5A_CRoW.js";import{IncrementalFileHasher as Ce}from"./packem_shared/IncrementalFileHasher-jtLxMBKy.js";import{CompositeLifeCycle as ye,ConsoleLifeCycle as Re,EmptyLifeCycle as Fe}from"./packem_shared/CompositeLifeCycle-D0zWvAXJ.js";import{LockfileHasher as Be,extractPackageName as Se,parseNpmLockfile as Ie,parsePnpmLockfile as Le,parseYarnLockfile as be}from"./packem_shared/extractPackageName-BeL6Gc3a.js";import{LogReporter as Ee,createLogReporter as He}from"./packem_shared/LogReporter-BUPWiXAq.js";import{isNativeAvailable as we,loadNativeBindings as De}from"./packem_shared/isNativeAvailable-BOavFPX1.js";import{resolveOutputs as Ge}from"./packem_shared/resolveOutputs-BBjdaraf.js";import{INPUT_URI_SCHEMES as Ne,InvalidInputUriError as Oe,looksLikeInputUri as Ue,parseInputUri as Ve}from"./packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js";import{enforceProjectConstraints as je}from"./packem_shared/enforceProjectConstraints-X49n3bVL.js";import{generateRunSummary as Ye,getLastRunSummaryPath as qe,readLastRunSummary as Je,writeLastRunSummary as Ke,writeRunSummary as Qe}from"./packem_shared/generateRunSummary-ep21OCUT.js";import{createTaskGraph as Ze,getTaskId as $e,parseTaskId as er}from"./packem_shared/createTaskGraph-CEYYI-DL.js";import{findCycle as or,findCycles as tr,getDependentTasks as ar,getLeafTasks as sr,getTransitiveDependencies as pr,makeAcyclic as nr,reverseTaskGraph as mr,walkTaskGraph as ir}from"./packem_shared/findCycle-BY8-jmzB.js";import{InProcessTaskHasher as cr,computeTaskHash as lr}from"./packem_shared/computeTaskHash-C2Iua2DL.js";import{TaskOrchestrator as hr}from"./packem_shared/TaskOrchestrator-BgfOpjuB.js";import{TaskScheduler as kr,parsePartition as ur}from"./packem_shared/parsePartition-uzPNgtPp.js";import{TerminalBuffer as Cr}from"./packem_shared/TerminalBuffer-BtZy7TpT.js";import{TrackedTaskExecutor as yr}from"./packem_shared/TrackedTaskExecutor-D3-LNT_d.js";import{d as Fr,j as vr,T as Br,b as Sr,E as Ir,v as Lr,h as br,O as Pr}from"./packem_shared/utils-BH2W5Wml.js";import{evaluateWhen as Hr,explainWhen as Ar,getCurrentBranch as wr,resetBranchCache as Dr}from"./packem_shared/getCurrentBranch-D-qoZByx.js";import{getMainWorktreeRoot as Gr,isLinkedWorktree as Mr,resetWorktreeCache as Nr}from"./packem_shared/getMainWorktreeRoot-DRN_i8jA.js";import{createInputHandler as Ur}from"./packem_shared/createInputHandler-CkDCpPYy.js";import{expandArguments as Wr}from"./packem_shared/expandArguments-4mab7-Ds.js";import{expandShortcut as zr}from"./packem_shared/expandShortcut-BErNHNXZ.js";import{expandTokens as qr,expandTokensInString as Jr}from"./packem_shared/expandTokensInString-Cyx0qSFA.js";import{expandWildcard as Qr}from"./packem_shared/expandWildcard-DE0dOOZF.js";import{formatTimingTable as Zr,logTimings as $r}from"./packem_shared/formatTimingTable-CP3rsDwf.js";import{runTeardown as ro}from"./packem_shared/runTeardown-DBBpBAyb.js";import{stripQuotes as to}from"./packem_shared/stripQuotes-jkZb0CL9.js";import{withRestart as so}from"./packem_shared/withRestart-CWO6BKv_.js";export{y as Cache,ye as CompositeLifeCycle,Re as ConsoleLifeCycle,R as DEFAULT_CACHE_DIRECTORY_NAME,Fe as EmptyLifeCycle,ae as FileAccessTracker,ne as FingerprintManager,u as HttpRemoteCache,Ne as INPUT_URI_SCHEMES,cr as InProcessTaskHasher,Ce as IncrementalFileHasher,Oe as InvalidInputUriError,Be as LockfileHasher,Ee as LogReporter,C as ReapiRemoteCache,hr as TaskOrchestrator,kr as TaskScheduler,Cr as TerminalBuffer,yr as TrackedTaskExecutor,b as V2_AC,P as V2_CAS,E as V2_INDEX,H as V2_ROOT,A as V2_TMP,w as acEntryPath,l as actionDigestForTaskHash,o as buildForwardDependencyMap,t as buildReverseDependencyMap,D as casBlobPath,Fr as collectFiles,lr as computeTaskHash,M as containsBlob,x as containsByTaskHash,vr as createFailureResult,Ur as createInputHandler,He as createLogReporter,i as createRemoteCacheBackend,Ze as createTaskGraph,ee as defaultTaskRunner,ie as detectFrameworks,oe as detectScriptShell,S as digestBuffer,I as digestFile,je as enforceProjectConstraints,Hr as evaluateWhen,a as expandAffected,Wr as expandArguments,zr as expandShortcut,qr as expandTokens,Jr as expandTokensInString,Qr as expandWildcard,Ar as explainWhen,Se as extractPackageName,N as fetchBlobToFile,s as filterAffectedTasks,or as findCycle,tr as findCycles,F as formatCacheSize,Zr as formatTimingTable,se as generatePreloadScript,Ye as generateRunSummary,p as getAffectedProjects,n as getChangedFiles,wr as getCurrentBranch,ar as getDependentTasks,fe as getFrameworkEnvVariables,qe as getLastRunSummaryPath,sr as getLeafTasks,Gr as getMainWorktreeRoot,$e as getTaskId,pr as getTransitiveDependencies,Br as hashFile,Sr as hashStrings,ce as inferFrameworkEnvPatterns,Mr as isLinkedWorktree,we as isNativeAvailable,De as loadNativeBindings,$r as logTimings,Ue as looksLikeInputUri,nr as makeAcyclic,v as parseCacheSize,J as parseCommands,Ve as parseInputUri,Ie as parseNpmLockfile,ur as parsePartition,Le as parsePnpmLockfile,er as parseTaskId,be as parseYarnLockfile,xe as projectGraphToDot,O as putBlobFromBytes,U as putBlobFromFile,Je as readLastRunSummary,Ir as readPackageDeps,Dr as resetBranchCache,Nr as resetWorktreeCache,f as resolveCacheMode,Ge as resolveOutputs,Lr as resolveTaskCwd,h as retrieveByTaskHash,mr as reverseTaskGraph,Z as runConcurrentFallback,Q as runConcurrently,ro as runTeardown,br as sortObjectKeys,d as storeByTaskHash,to as stripQuotes,_ as taskHashIndexPath,z as toChromeTrace,he as toGraphAscii,de as toGraphHtml,ke as toGraphJson,ue as toGraphvizDot,V as touchBlob,Pr as uniqueId,W as verifyBlob,ir as walkTaskGraph,so as withRestart,Y as writeChromeTrace,Ke as writeLastRunSummary,Qe as writeRunSummary};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var Fe=Object.defineProperty;var g=(w,n)=>Fe(w,"name",{value:n,configurable:!0});function _mergeNamespaces(w,n){for(var y=0;y<n.length;y++){const p=n[y];if(typeof p!="string"&&!Array.isArray(p))for(const m in p)m!=="default"&&!(m in w)&&(w[m]=p[m])}return Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}g(_mergeNamespaces,"_mergeNamespaces");var u=Object.defineProperty,t=g((w,n)=>u(w,"name",{value:n,configurable:!0}),"t"),commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(w){return w&&w.__esModule&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}g(getDefaultExportFromCjs,"getDefaultExportFromCjs");t(getDefaultExportFromCjs,"getDefaultExportFromCjs");function getDefaultExportFromNamespaceIfPresent(w){return w&&Object.prototype.hasOwnProperty.call(w,"default")?w.default:w}g(getDefaultExportFromNamespaceIfPresent,"getDefaultExportFromNamespaceIfPresent");t(getDefaultExportFromNamespaceIfPresent,"getDefaultExportFromNamespaceIfPresent");function getDefaultExportFromNamespaceIfNotNamed(w){return w&&Object.prototype.hasOwnProperty.call(w,"default")&&Object.keys(w).length===1?w.default:w}g(getDefaultExportFromNamespaceIfNotNamed,"getDefaultExportFromNamespaceIfNotNamed");t(getDefaultExportFromNamespaceIfNotNamed,"getDefaultExportFromNamespaceIfNotNamed");function getAugmentedNamespace(w){if(Object.prototype.hasOwnProperty.call(w,"__esModule"))return w;var n=w.default;if(typeof n=="function"){var y=t(g(function p(){var m=!1;try{m=this instanceof p}catch{}return m?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)},"a"),"a");y.prototype=n.prototype}else y={};return Object.defineProperty(y,"__esModule",{value:!0}),Object.keys(w).forEach(function(p){var m=Object.getOwnPropertyDescriptor(w,p);Object.defineProperty(y,p,m.get?m:{enumerable:!0,get:t(function(){return w[p]},"get")})}),y}g(getAugmentedNamespace,"getAugmentedNamespace");t(getAugmentedNamespace,"getAugmentedNamespace");var src={exports:{}},indexLight={exports:{}},indexMinimal={},minimal={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1;var w=Object.defineProperty,n=g((p,m)=>w(p,"name",{value:m,configurable:!0}),"n");aspromise=y;function y(p,m){for(var h=new Array(arguments.length-1),a=0,s=2,i=!0;s<arguments.length;)h[a++]=arguments[s++];return new Promise(n(function(o,e){h[a]=n(function(c){if(i)if(i=!1,c)e(c);else{for(var l=new Array(arguments.length-1),f=0;f<l.length;)l[f++]=arguments[f];o.apply(null,l)}},"callback");try{p.apply(m||null,h)}catch(c){i&&(i=!1,e(c))}},"executor"))}return g(y,"asPromise"),n(y,"asPromise"),aspromise}g(requireAspromise,"requireAspromise");var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,(function(w){var n=Object.defineProperty,y=g((i,o)=>n(i,"name",{value:o,configurable:!0}),"v"),p=w;p.length=y(function(i){var o=i.length;if(!o)return 0;for(var e=0;--o%4>1&&i.charAt(o)==="=";)++e;return Math.ceil(i.length*3)/4-e},"length");for(var m=new Array(64),h=new Array(123),a=0;a<64;)h[m[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;p.encode=y(function(i,o,e){for(var c=null,l=[],f=0,d=0,v;o<e;){var _=i[o++];switch(d){case 0:l[f++]=m[_>>2],v=(_&3)<<4,d=1;break;case 1:l[f++]=m[v|_>>4],v=(_&15)<<2,d=2;break;case 2:l[f++]=m[v|_>>6],l[f++]=m[_&63],d=0;break}f>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,l)),f=0)}return d&&(l[f++]=m[v],l[f++]=61,d===1&&(l[f++]=61)),c?(f&&c.push(String.fromCharCode.apply(String,l.slice(0,f))),c.join("")):String.fromCharCode.apply(String,l.slice(0,f))},"encode");var s="invalid encoding";p.decode=y(function(i,o,e){for(var c=e,l=0,f,d=0;d<i.length;){var v=i.charCodeAt(d++);if(v===61&&l>1)break;if((v=h[v])===void 0)throw Error(s);switch(l){case 0:f=v,l=1;break;case 1:o[e++]=f<<2|(v&48)>>4,f=v,l=2;break;case 2:o[e++]=(f&15)<<4|(v&60)>>2,f=v,l=3;break;case 3:o[e++]=(f&3)<<6|v,l=0;break}}if(l===1)throw Error(s);return e-c},"decode"),p.test=y(function(i){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(i)},"test")})(base64)),base64}g(requireBase64,"requireBase64");var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1;var w=Object.defineProperty,n=g((p,m)=>w(p,"name",{value:m,configurable:!0}),"r");eventemitter=y;function y(){this._listeners={}}return g(y,"EventEmitter"),n(y,"EventEmitter"),y.prototype.on=n(function(p,m,h){return(this._listeners[p]||(this._listeners[p]=[])).push({fn:m,ctx:h||this}),this},"on"),y.prototype.off=n(function(p,m){if(p===void 0)this._listeners={};else if(m===void 0)this._listeners[p]=[];else for(var h=this._listeners[p],a=0;a<h.length;)h[a].fn===m?h.splice(a,1):++a;return this},"off"),y.prototype.emit=n(function(p){var m=this._listeners[p];if(m){for(var h=[],a=1;a<arguments.length;)h.push(arguments[a++]);for(a=0;a<m.length;)m[a].fn.apply(m[a++].ctx,h)}return this},"emit"),eventemitter}g(requireEventemitter,"requireEventemitter");var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1;var w=Object.defineProperty,n=g((s,i)=>w(s,"name",{value:i,configurable:!0}),"F");float=y(y);function y(s){return typeof Float32Array<"u"?(function(){var i=new Float32Array([-0]),o=new Uint8Array(i.buffer),e=o[3]===128;function c(v,_,j){i[0]=v,_[j]=o[0],_[j+1]=o[1],_[j+2]=o[2],_[j+3]=o[3]}g(c,"E"),n(c,"writeFloat_f32_cpy");function l(v,_,j){i[0]=v,_[j]=o[3],_[j+1]=o[2],_[j+2]=o[1],_[j+3]=o[0]}g(l,"_"),n(l,"writeFloat_f32_rev"),s.writeFloatLE=e?c:l,s.writeFloatBE=e?l:c;function f(v,_){return o[0]=v[_],o[1]=v[_+1],o[2]=v[_+2],o[3]=v[_+3],i[0]}g(f,"d"),n(f,"readFloat_f32_cpy");function d(v,_){return o[3]=v[_],o[2]=v[_+1],o[1]=v[_+2],o[0]=v[_+3],i[0]}g(d,"c"),n(d,"readFloat_f32_rev"),s.readFloatLE=e?f:d,s.readFloatBE=e?d:f})():(function(){function i(e,c,l,f){var d=c<0?1:0;if(d&&(c=-c),c===0)e(1/c>0?0:2147483648,l,f);else if(isNaN(c))e(2143289344,l,f);else if(c>34028234663852886e22)e((d<<31|2139095040)>>>0,l,f);else if(c<11754943508222875e-54)e((d<<31|Math.round(c/1401298464324817e-60))>>>0,l,f);else{var v=Math.floor(Math.log(c)/Math.LN2),_=Math.round(c*Math.pow(2,-v)*8388608)&8388607;e((d<<31|v+127<<23|_)>>>0,l,f)}}g(i,"t"),n(i,"writeFloat_ieee754"),s.writeFloatLE=i.bind(null,p),s.writeFloatBE=i.bind(null,m);function o(e,c,l){var f=e(c,l),d=(f>>31)*2+1,v=f>>>23&255,_=f&8388607;return v===255?_?NaN:d*(1/0):v===0?d*1401298464324817e-60*_:d*Math.pow(2,v-150)*(_+8388608)}g(o,"n"),n(o,"readFloat_ieee754"),s.readFloatLE=o.bind(null,h),s.readFloatBE=o.bind(null,a)})(),typeof Float64Array<"u"?(function(){var i=new Float64Array([-0]),o=new Uint8Array(i.buffer),e=o[7]===128;function c(v,_,j){i[0]=v,_[j]=o[0],_[j+1]=o[1],_[j+2]=o[2],_[j+3]=o[3],_[j+4]=o[4],_[j+5]=o[5],_[j+6]=o[6],_[j+7]=o[7]}g(c,"E"),n(c,"writeDouble_f64_cpy");function l(v,_,j){i[0]=v,_[j]=o[7],_[j+1]=o[6],_[j+2]=o[5],_[j+3]=o[4],_[j+4]=o[3],_[j+5]=o[2],_[j+6]=o[1],_[j+7]=o[0]}g(l,"_"),n(l,"writeDouble_f64_rev"),s.writeDoubleLE=e?c:l,s.writeDoubleBE=e?l:c;function f(v,_){return o[0]=v[_],o[1]=v[_+1],o[2]=v[_+2],o[3]=v[_+3],o[4]=v[_+4],o[5]=v[_+5],o[6]=v[_+6],o[7]=v[_+7],i[0]}g(f,"d"),n(f,"readDouble_f64_cpy");function d(v,_){return o[7]=v[_],o[6]=v[_+1],o[5]=v[_+2],o[4]=v[_+3],o[3]=v[_+4],o[2]=v[_+5],o[1]=v[_+6],o[0]=v[_+7],i[0]}g(d,"c"),n(d,"readDouble_f64_rev"),s.readDoubleLE=e?f:d,s.readDoubleBE=e?d:f})():(function(){function i(e,c,l,f,d,v){var _=f<0?1:0;if(_&&(f=-f),f===0)e(0,d,v+c),e(1/f>0?0:2147483648,d,v+l);else if(isNaN(f))e(0,d,v+c),e(2146959360,d,v+l);else if(f>17976931348623157e292)e(0,d,v+c),e((_<<31|2146435072)>>>0,d,v+l);else{var j;if(f<22250738585072014e-324)j=f/5e-324,e(j>>>0,d,v+c),e((_<<31|j/4294967296)>>>0,d,v+l);else{var O=Math.floor(Math.log(f)/Math.LN2);O===1024&&(O=1023),j=f*Math.pow(2,-O),e(j*4503599627370496>>>0,d,v+c),e((_<<31|O+1023<<20|j*1048576&1048575)>>>0,d,v+l)}}}g(i,"t"),n(i,"writeDouble_ieee754"),s.writeDoubleLE=i.bind(null,p,0,4),s.writeDoubleBE=i.bind(null,m,4,0);function o(e,c,l,f,d){var v=e(f,d+c),_=e(f,d+l),j=(_>>31)*2+1,O=_>>>20&2047,b=4294967296*(_&1048575)+v;return O===2047?b?NaN:j*(1/0):O===0?j*5e-324*b:j*Math.pow(2,O-1075)*(b+4503599627370496)}g(o,"n"),n(o,"readDouble_ieee754"),s.readDoubleLE=o.bind(null,h,0,4),s.readDoubleBE=o.bind(null,a,4,0)})(),s}g(y,"factory"),n(y,"factory");function p(s,i,o){i[o]=s&255,i[o+1]=s>>>8&255,i[o+2]=s>>>16&255,i[o+3]=s>>>24}g(p,"writeUintLE"),n(p,"writeUintLE");function m(s,i,o){i[o]=s>>>24,i[o+1]=s>>>16&255,i[o+2]=s>>>8&255,i[o+3]=s&255}g(m,"writeUintBE"),n(m,"writeUintBE");function h(s,i){return(s[i]|s[i+1]<<8|s[i+2]<<16|s[i+3]<<24)>>>0}g(h,"readUintLE"),n(h,"readUintLE");function a(s,i){return(s[i]<<24|s[i+1]<<16|s[i+2]<<8|s[i+3])>>>0}return g(a,"readUintBE"),n(a,"readUintBE"),float}g(requireFloat,"requireFloat");var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1;var u=Object.defineProperty,r=g((w,n)=>u(w,"name",{value:n,configurable:!0}),"r");inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(w){}return null}return g(inquire,"inquire"),r(inquire,"inquire"),inquire_1}g(requireInquire,"requireInquire");var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,(function(w){var n=Object.defineProperty,y=g((m,h)=>n(m,"name",{value:h,configurable:!0}),"a"),p=w;p.length=y(function(m){for(var h=0,a=0,s=0;s<m.length;++s)a=m.charCodeAt(s),a<128?h+=1:a<2048?h+=2:(a&64512)===55296&&(m.charCodeAt(s+1)&64512)===56320?(++s,h+=4):h+=3;return h},"utf8_length"),p.read=y(function(m,h,a){var s=a-h;if(s<1)return"";for(var i=null,o=[],e=0,c;h<a;)c=m[h++],c<128?o[e++]=c:c>191&&c<224?o[e++]=(c&31)<<6|m[h++]&63:c>239&&c<365?(c=((c&7)<<18|(m[h++]&63)<<12|(m[h++]&63)<<6|m[h++]&63)-65536,o[e++]=55296+(c>>10),o[e++]=56320+(c&1023)):o[e++]=(c&15)<<12|(m[h++]&63)<<6|m[h++]&63,e>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),e=0);return i?(e&&i.push(String.fromCharCode.apply(String,o.slice(0,e))),i.join("")):String.fromCharCode.apply(String,o.slice(0,e))},"utf8_read"),p.write=y(function(m,h,a){for(var s=a,i,o,e=0;e<m.length;++e)i=m.charCodeAt(e),i<128?h[a++]=i:i<2048?(h[a++]=i>>6|192,h[a++]=i&63|128):(i&64512)===55296&&((o=m.charCodeAt(e+1))&64512)===56320?(i=65536+((i&1023)<<10)+(o&1023),++e,h[a++]=i>>18|240,h[a++]=i>>12&63|128,h[a++]=i>>6&63|128,h[a++]=i&63|128):(h[a++]=i>>12|224,h[a++]=i>>6&63|128,h[a++]=i&63|128);return a-s},"utf8_write")})(utf8)),utf8}g(requireUtf8,"requireUtf8");var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1;var w=Object.defineProperty,n=g((p,m)=>w(p,"name",{value:m,configurable:!0}),"l");pool_1=y;function y(p,m,h){var a=h||8192,s=a>>>1,i=null,o=a;return n(function(e){if(e<1||e>s)return p(e);o+e>a&&(i=p(a),o=0);var c=m.call(i,o,o+=e);return o&7&&(o=(o|7)+1),c},"pool_alloc")}return g(y,"pool"),n(y,"pool"),pool_1}g(requirePool,"requirePool");var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1;var w=Object.defineProperty,n=g((s,i)=>w(s,"name",{value:i,configurable:!0}),"r");longbits=p;var y=requireMinimal();function p(s,i){this.lo=s>>>0,this.hi=i>>>0}g(p,"LongBits"),n(p,"LongBits");var m=p.zero=new p(0,0);m.toNumber=function(){return 0},m.zzEncode=m.zzDecode=function(){return this},m.length=function(){return 1};var h=p.zeroHash="\0\0\0\0\0\0\0\0";p.fromNumber=n(function(s){if(s===0)return m;var i=s<0;i&&(s=-s);var o=s>>>0,e=(s-o)/4294967296>>>0;return i&&(e=~e>>>0,o=~o>>>0,++o>4294967295&&(o=0,++e>4294967295&&(e=0))),new p(o,e)},"fromNumber"),p.from=n(function(s){if(typeof s=="number")return p.fromNumber(s);if(y.isString(s))if(y.Long)s=y.Long.fromString(s);else return p.fromNumber(parseInt(s,10));return s.low||s.high?new p(s.low>>>0,s.high>>>0):m},"from"),p.prototype.toNumber=n(function(s){if(!s&&this.hi>>>31){var i=~this.lo+1>>>0,o=~this.hi>>>0;return i||(o=o+1>>>0),-(i+o*4294967296)}return this.lo+this.hi*4294967296},"toNumber"),p.prototype.toLong=n(function(s){return y.Long?new y.Long(this.lo|0,this.hi|0,!!s):{low:this.lo|0,high:this.hi|0,unsigned:!!s}},"toLong");var a=String.prototype.charCodeAt;return p.fromHash=n(function(s){return s===h?m:new p((a.call(s,0)|a.call(s,1)<<8|a.call(s,2)<<16|a.call(s,3)<<24)>>>0,(a.call(s,4)|a.call(s,5)<<8|a.call(s,6)<<16|a.call(s,7)<<24)>>>0)},"fromHash"),p.prototype.toHash=n(function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},"toHash"),p.prototype.zzEncode=n(function(){var s=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^s)>>>0,this.lo=(this.lo<<1^s)>>>0,this},"zzEncode"),p.prototype.zzDecode=n(function(){var s=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^s)>>>0,this.hi=(this.hi>>>1^s)>>>0,this},"zzDecode"),p.prototype.length=n(function(){var s=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return o===0?i===0?s<16384?s<128?1:2:s<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:o<128?9:10},"length"),longbits}g(requireLongbits,"requireLongbits");var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,(function(w){var n=Object.defineProperty,y=g((a,s)=>n(a,"name",{value:s,configurable:!0}),"o"),p=w;p.asPromise=requireAspromise(),p.base64=requireBase64(),p.EventEmitter=requireEventemitter(),p.float=requireFloat(),p.inquire=requireInquire(),p.utf8=requireUtf8(),p.pool=requirePool(),p.LongBits=requireLongbits(),p.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),p.global=p.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal,p.emptyArray=Object.freeze?Object.freeze([]):[],p.emptyObject=Object.freeze?Object.freeze({}):{},p.isInteger=Number.isInteger||y(function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},"isInteger"),p.isString=y(function(a){return typeof a=="string"||a instanceof String},"isString"),p.isObject=y(function(a){return a&&typeof a=="object"},"isObject"),p.isset=p.isSet=y(function(a,s){var i=a[s];return i!=null&&a.hasOwnProperty(s)?typeof i!="object"||(Array.isArray(i)?i.length:Object.keys(i).length)>0:!1},"isSet"),p.Buffer=(function(){try{var a=p.inquire("buffer").Buffer;return a.prototype.utf8Write?a:null}catch{return null}})(),p._Buffer_from=null,p._Buffer_allocUnsafe=null,p.newBuffer=y(function(a){return typeof a=="number"?p.Buffer?p._Buffer_allocUnsafe(a):new p.Array(a):p.Buffer?p._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},"newBuffer"),p.Array=typeof Uint8Array<"u"?Uint8Array:Array,p.Long=p.global.dcodeIO&&p.global.dcodeIO.Long||p.global.Long||p.inquire("long"),p.key2Re=/^true|false|0|1$/,p.key32Re=/^-?(?:0|[1-9][0-9]*)$/,p.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,p.longToHash=y(function(a){return a?p.LongBits.from(a).toHash():p.LongBits.zeroHash},"longToHash"),p.longFromHash=y(function(a,s){var i=p.LongBits.fromHash(a);return p.Long?p.Long.fromBits(i.lo,i.hi,s):i.toNumber(!!s)},"longFromHash");function m(a,s,i){for(var o=Object.keys(s),e=0;e<o.length;++e)(a[o[e]]===void 0||!i)&&(a[o[e]]=s[o[e]]);return a}g(m,"merge"),y(m,"merge"),p.merge=m,p.lcFirst=y(function(a){return a.charAt(0).toLowerCase()+a.substring(1)},"lcFirst");function h(a){function s(i,o){if(!(this instanceof s))return new s(i,o);Object.defineProperty(this,"message",{get:y(function(){return i},"get")}),Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:new Error().stack||""}),o&&m(this,o)}return g(s,"e"),y(s,"CustomError"),s.prototype=Object.create(Error.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0},name:{get:y(function(){return a},"get"),set:void 0,enumerable:!1,configurable:!0},toString:{value:y(function(){return this.name+": "+this.message},"value"),writable:!0,enumerable:!1,configurable:!0}}),s}g(h,"newError"),y(h,"newError"),p.newError=h,p.ProtocolError=h("ProtocolError"),p.oneOfGetter=y(function(a){for(var s={},i=0;i<a.length;++i)s[a[i]]=1;return function(){for(var o=Object.keys(this),e=o.length-1;e>-1;--e)if(s[o[e]]===1&&this[o[e]]!==void 0&&this[o[e]]!==null)return o[e]}},"getOneOf"),p.oneOfSetter=y(function(a){return function(s){for(var i=0;i<a.length;++i)a[i]!==s&&delete this[a[i]]}},"setOneOf"),p.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},p._configure=function(){var a=p.Buffer;if(!a){p._Buffer_from=p._Buffer_allocUnsafe=null;return}p._Buffer_from=a.from!==Uint8Array.from&&a.from||y(function(s,i){return new a(s,i)},"Buffer_from"),p._Buffer_allocUnsafe=a.allocUnsafe||y(function(s){return new a(s)},"Buffer_allocUnsafe")}})(minimal)),minimal}g(requireMinimal,"requireMinimal");var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1;var w=Object.defineProperty,n=g((O,b)=>w(O,"name",{value:b,configurable:!0}),"n");writer=e;var y=requireMinimal(),p,m=y.LongBits,h=y.base64,a=y.utf8;function s(O,b,q){this.fn=O,this.len=b,this.next=void 0,this.val=q}g(s,"Op"),n(s,"Op");function i(){}g(i,"noop"),n(i,"noop");function o(O){this.head=O.head,this.tail=O.tail,this.len=O.len,this.next=O.states}g(o,"State"),n(o,"State");function e(){this.len=0,this.head=new s(i,0,0),this.tail=this.head,this.states=null}g(e,"Writer"),n(e,"Writer");var c=n(function(){return y.Buffer?n(function(){return(e.create=n(function(){return new p},"create_buffer"))()},"create_buffer_setup"):n(function(){return new e},"create_array")},"create");e.create=c(),e.alloc=n(function(O){return new y.Array(O)},"alloc"),y.Array!==Array&&(e.alloc=y.pool(e.alloc,y.Array.prototype.subarray)),e.prototype._push=n(function(O,b,q){return this.tail=this.tail.next=new s(O,b,q),this.len+=b,this},"push");function l(O,b,q){b[q]=O&255}g(l,"writeByte"),n(l,"writeByte");function f(O,b,q){for(;O>127;)b[q++]=O&127|128,O>>>=7;b[q]=O}g(f,"writeVarint32"),n(f,"writeVarint32");function d(O,b){this.len=O,this.next=void 0,this.val=b}g(d,"VarintOp"),n(d,"VarintOp"),d.prototype=Object.create(s.prototype),d.prototype.fn=f,e.prototype.uint32=n(function(O){return this.len+=(this.tail=this.tail.next=new d((O=O>>>0)<128?1:O<16384?2:O<2097152?3:O<268435456?4:5,O)).len,this},"write_uint32"),e.prototype.int32=n(function(O){return O<0?this._push(v,10,m.fromNumber(O)):this.uint32(O)},"write_int32"),e.prototype.sint32=n(function(O){return this.uint32((O<<1^O>>31)>>>0)},"write_sint32");function v(O,b,q){for(;O.hi;)b[q++]=O.lo&127|128,O.lo=(O.lo>>>7|O.hi<<25)>>>0,O.hi>>>=7;for(;O.lo>127;)b[q++]=O.lo&127|128,O.lo=O.lo>>>7;b[q++]=O.lo}g(v,"writeVarint64"),n(v,"writeVarint64"),e.prototype.uint64=n(function(O){var b=m.from(O);return this._push(v,b.length(),b)},"write_uint64"),e.prototype.int64=e.prototype.uint64,e.prototype.sint64=n(function(O){var b=m.from(O).zzEncode();return this._push(v,b.length(),b)},"write_sint64"),e.prototype.bool=n(function(O){return this._push(l,1,O?1:0)},"write_bool");function _(O,b,q){b[q]=O&255,b[q+1]=O>>>8&255,b[q+2]=O>>>16&255,b[q+3]=O>>>24}g(_,"writeFixed32"),n(_,"writeFixed32"),e.prototype.fixed32=n(function(O){return this._push(_,4,O>>>0)},"write_fixed32"),e.prototype.sfixed32=e.prototype.fixed32,e.prototype.fixed64=n(function(O){var b=m.from(O);return this._push(_,4,b.lo)._push(_,4,b.hi)},"write_fixed64"),e.prototype.sfixed64=e.prototype.fixed64,e.prototype.float=n(function(O){return this._push(y.float.writeFloatLE,4,O)},"write_float"),e.prototype.double=n(function(O){return this._push(y.float.writeDoubleLE,8,O)},"write_double");var j=y.Array.prototype.set?n(function(O,b,q){b.set(O,q)},"writeBytes_set"):n(function(O,b,q){for(var S=0;S<O.length;++S)b[q+S]=O[S]},"writeBytes_for");return e.prototype.bytes=n(function(O){var b=O.length>>>0;if(!b)return this._push(l,1,0);if(y.isString(O)){var q=e.alloc(b=h.length(O));h.decode(O,q,0),O=q}return this.uint32(b)._push(j,b,O)},"write_bytes"),e.prototype.string=n(function(O){var b=a.length(O);return b?this.uint32(b)._push(a.write,b,O):this._push(l,1,0)},"write_string"),e.prototype.fork=n(function(){return this.states=new o(this),this.head=this.tail=new s(i,0,0),this.len=0,this},"fork"),e.prototype.reset=n(function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new s(i,0,0),this.len=0),this},"reset"),e.prototype.ldelim=n(function(){var O=this.head,b=this.tail,q=this.len;return this.reset().uint32(q),q&&(this.tail.next=O.next,this.tail=b,this.len+=q),this},"ldelim"),e.prototype.finish=n(function(){for(var O=this.head.next,b=this.constructor.alloc(this.len),q=0;O;)O.fn(O.val,b,q),q+=O.len,O=O.next;return b},"finish"),e._configure=function(O){p=O,e.create=c(),p._configure()},writer}g(requireWriter,"requireWriter");var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1;var w=Object.defineProperty,n=g((a,s)=>w(a,"name",{value:s,configurable:!0}),"i");writer_buffer=m;var y=requireWriter();(m.prototype=Object.create(y.prototype)).constructor=m;var p=requireMinimal();function m(){y.call(this)}g(m,"BufferWriter"),n(m,"BufferWriter"),m._configure=function(){m.alloc=p._Buffer_allocUnsafe,m.writeBytesBuffer=p.Buffer&&p.Buffer.prototype instanceof Uint8Array&&p.Buffer.prototype.set.name==="set"?n(function(a,s,i){s.set(a,i)},"writeBytesBuffer_set"):n(function(a,s,i){if(a.copy)a.copy(s,i,0,a.length);else for(var o=0;o<a.length;)s[i++]=a[o++]},"writeBytesBuffer_copy")},m.prototype.bytes=n(function(a){p.isString(a)&&(a=p._Buffer_from(a,"base64"));var s=a.length>>>0;return this.uint32(s),s&&this._push(m.writeBytesBuffer,s,a),this},"write_bytes_buffer");function h(a,s,i){a.length<40?p.utf8.write(a,s,i):s.utf8Write?s.utf8Write(a,i):s.write(a,i)}return g(h,"writeStringBuffer"),n(h,"writeStringBuffer"),m.prototype.string=n(function(a){var s=p.Buffer.byteLength(a);return this.uint32(s),s&&this._push(h,s,a),this},"write_string_buffer"),m._configure(),writer_buffer}g(requireWriter_buffer,"requireWriter_buffer");var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1;var w=Object.defineProperty,n=g((f,d)=>w(f,"name",{value:d,configurable:!0}),"s");reader=s;var y=requireMinimal(),p,m=y.LongBits,h=y.utf8;function a(f,d){return RangeError("index out of range: "+f.pos+" + "+(d||1)+" > "+f.len)}g(a,"indexOutOfRange"),n(a,"indexOutOfRange");function s(f){this.buf=f,this.pos=0,this.len=f.length}g(s,"Reader"),n(s,"Reader");var i=typeof Uint8Array<"u"?n(function(f){if(f instanceof Uint8Array||Array.isArray(f))return new s(f);throw Error("illegal buffer")},"create_typed_array"):n(function(f){if(Array.isArray(f))return new s(f);throw Error("illegal buffer")},"create_array"),o=n(function(){return y.Buffer?n(function(f){return(s.create=n(function(d){return y.Buffer.isBuffer(d)?new p(d):i(d)},"create_buffer"))(f)},"create_buffer_setup"):i},"create");s.create=o(),s.prototype._slice=y.Array.prototype.subarray||y.Array.prototype.slice,s.prototype.uint32=n((function(){var f=4294967295;return n(function(){if(f=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(f=(f|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return f;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return f},"read_uint32")}),"read_uint32_setup")(),s.prototype.int32=n(function(){return this.uint32()|0},"read_int32"),s.prototype.sint32=n(function(){var f=this.uint32();return f>>>1^-(f&1)|0},"read_sint32");function e(){var f=new m(0,0),d=0;if(this.len-this.pos>4){for(;d<4;++d)if(f.lo=(f.lo|(this.buf[this.pos]&127)<<d*7)>>>0,this.buf[this.pos++]<128)return f;if(f.lo=(f.lo|(this.buf[this.pos]&127)<<28)>>>0,f.hi=(f.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return f;d=0}else{for(;d<3;++d){if(this.pos>=this.len)throw a(this);if(f.lo=(f.lo|(this.buf[this.pos]&127)<<d*7)>>>0,this.buf[this.pos++]<128)return f}return f.lo=(f.lo|(this.buf[this.pos++]&127)<<d*7)>>>0,f}if(this.len-this.pos>4){for(;d<5;++d)if(f.hi=(f.hi|(this.buf[this.pos]&127)<<d*7+3)>>>0,this.buf[this.pos++]<128)return f}else for(;d<5;++d){if(this.pos>=this.len)throw a(this);if(f.hi=(f.hi|(this.buf[this.pos]&127)<<d*7+3)>>>0,this.buf[this.pos++]<128)return f}throw Error("invalid varint encoding")}g(e,"readLongVarint"),n(e,"readLongVarint"),s.prototype.bool=n(function(){return this.uint32()!==0},"read_bool");function c(f,d){return(f[d-4]|f[d-3]<<8|f[d-2]<<16|f[d-1]<<24)>>>0}g(c,"readFixed32_end"),n(c,"readFixed32_end"),s.prototype.fixed32=n(function(){if(this.pos+4>this.len)throw a(this,4);return c(this.buf,this.pos+=4)},"read_fixed32"),s.prototype.sfixed32=n(function(){if(this.pos+4>this.len)throw a(this,4);return c(this.buf,this.pos+=4)|0},"read_sfixed32");function l(){if(this.pos+8>this.len)throw a(this,8);return new m(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}return g(l,"readFixed64"),n(l,"readFixed64"),s.prototype.float=n(function(){if(this.pos+4>this.len)throw a(this,4);var f=y.float.readFloatLE(this.buf,this.pos);return this.pos+=4,f},"read_float"),s.prototype.double=n(function(){if(this.pos+8>this.len)throw a(this,4);var f=y.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,f},"read_double"),s.prototype.bytes=n(function(){var f=this.uint32(),d=this.pos,v=this.pos+f;if(v>this.len)throw a(this,f);if(this.pos+=f,Array.isArray(this.buf))return this.buf.slice(d,v);if(d===v){var _=y.Buffer;return _?_.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,d,v)},"read_bytes"),s.prototype.string=n(function(){var f=this.bytes();return h.read(f,0,f.length)},"read_string"),s.prototype.skip=n(function(f){if(typeof f=="number"){if(this.pos+f>this.len)throw a(this,f);this.pos+=f}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},"skip"),s.prototype.skipType=function(f){switch(f){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(f=this.uint32()&7)!==4;)this.skipType(f);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+f+" at offset "+this.pos)}return this},s._configure=function(f){p=f,s.create=o(),p._configure();var d=y.Long?"toLong":"toNumber";y.merge(s.prototype,{int64:n(function(){return e.call(this)[d](!1)},"read_int64"),uint64:n(function(){return e.call(this)[d](!0)},"read_uint64"),sint64:n(function(){return e.call(this).zzDecode()[d](!1)},"read_sint64"),fixed64:n(function(){return l.call(this)[d](!0)},"read_fixed64"),sfixed64:n(function(){return l.call(this)[d](!1)},"read_sfixed64")})},reader}g(requireReader,"requireReader");var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1;var w=Object.defineProperty,n=g((h,a)=>w(h,"name",{value:a,configurable:!0}),"i");reader_buffer=m;var y=requireReader();(m.prototype=Object.create(y.prototype)).constructor=m;var p=requireMinimal();function m(h){y.call(this,h)}return g(m,"BufferReader"),n(m,"BufferReader"),m._configure=function(){p.Buffer&&(m.prototype._slice=p.Buffer.prototype.slice)},m.prototype.string=n(function(){var h=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+h,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+h,this.len))},"read_string_buffer"),m._configure(),reader_buffer}g(requireReader_buffer,"requireReader_buffer");var rpc={},service$1,hasRequiredService$1;function requireService$1(){if(hasRequiredService$1)return service$1;hasRequiredService$1=1;var w=Object.defineProperty,n=g((m,h)=>w(m,"name",{value:h,configurable:!0}),"u");service$1=p;var y=requireMinimal();(p.prototype=Object.create(y.EventEmitter.prototype)).constructor=p;function p(m,h,a){if(typeof m!="function")throw TypeError("rpcImpl must be a function");y.EventEmitter.call(this),this.rpcImpl=m,this.requestDelimited=!!h,this.responseDelimited=!!a}return g(p,"Service"),n(p,"Service"),p.prototype.rpcCall=n(g(function m(h,a,s,i,o){if(!i)throw TypeError("request must be specified");var e=this;if(!o)return y.asPromise(m,e,h,a,s,i);if(!e.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return e.rpcImpl(h,a[e.requestDelimited?"encodeDelimited":"encode"](i).finish(),n(function(c,l){if(c)return e.emit("error",c,h),o(c);if(l===null){e.end(!0);return}if(!(l instanceof s))try{l=s[e.responseDelimited?"decodeDelimited":"decode"](l)}catch(f){return e.emit("error",f,h),o(f)}return e.emit("data",l,h),o(null,l)},"rpcCallback"))}catch(c){e.emit("error",c,h),setTimeout(function(){o(c)},0);return}},"i"),"rpcCall"),p.prototype.end=n(function(m){return this.rpcImpl&&(m||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},"end"),service$1}g(requireService$1,"requireService$1");var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,(function(w){var n=w;n.Service=requireService$1()})(rpc)),rpc}g(requireRpc,"requireRpc");var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}g(requireRoots,"requireRoots");var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,(function(w){var n=Object.defineProperty,y=g((h,a)=>n(h,"name",{value:a,configurable:!0}),"r"),p=w;p.build="minimal",p.Writer=requireWriter(),p.BufferWriter=requireWriter_buffer(),p.Reader=requireReader(),p.BufferReader=requireReader_buffer(),p.util=requireMinimal(),p.rpc=requireRpc(),p.roots=requireRoots(),p.configure=m;function m(){p.util._configure(),p.Writer._configure(p.BufferWriter),p.Reader._configure(p.BufferReader)}g(m,"configure"),y(m,"configure"),m()})(indexMinimal)),indexMinimal}g(requireIndexMinimal,"requireIndexMinimal");var types={},util={exports:{}},codegen_1,hasRequiredCodegen;function requireCodegen(){if(hasRequiredCodegen)return codegen_1;hasRequiredCodegen=1;var w=Object.defineProperty,n=g((p,m)=>w(p,"name",{value:m,configurable:!0}),"u");codegen_1=y;function y(p,m){typeof p=="string"&&(m=p,p=void 0);var h=[];function a(i){if(typeof i!="string"){var o=s();if(y.verbose&&console.log("codegen: "+o),o="return "+o,i){for(var e=Object.keys(i),c=new Array(e.length+1),l=new Array(e.length),f=0;f<e.length;)c[f]=e[f],l[f]=i[e[f++]];return c[f]=o,Function.apply(null,c).apply(null,l)}return Function(o)()}for(var d=new Array(arguments.length-1),v=0;v<d.length;)d[v]=arguments[++v];if(v=0,i=i.replace(/%([%dfijs])/g,n(function(_,j){var O=d[v++];switch(j){case"d":case"f":return String(Number(O));case"i":return String(Math.floor(O));case"j":return JSON.stringify(O);case"s":return String(O)}return"%"},"replace")),v!==d.length)throw Error("parameter count mismatch");return h.push(i),a}g(a,"d"),n(a,"Codegen");function s(i){return"function "+(i||m||"")+"("+(p&&p.join(",")||"")+`){
|
|
2
|
+
`+h.join(`
|
|
3
|
+
`)+`
|
|
4
|
+
}`}return g(s,"y"),n(s,"toString"),a.toString=s,a}return g(y,"codegen"),n(y,"codegen"),y.verbose=!1,codegen_1}g(requireCodegen,"requireCodegen");var fetch_1,hasRequiredFetch;function requireFetch(){if(hasRequiredFetch)return fetch_1;hasRequiredFetch=1;var w=Object.defineProperty,n=g((a,s)=>w(a,"name",{value:s,configurable:!0}),"i");fetch_1=h;var y=requireAspromise(),p=requireInquire(),m=p("fs");function h(a,s,i){return typeof s=="function"?(i=s,s={}):s||(s={}),i?!s.xhr&&m&&m.readFile?m.readFile(a,n(function(o,e){return o&&typeof XMLHttpRequest<"u"?h.xhr(a,s,i):o?i(o):i(null,s.binary?e:e.toString("utf8"))},"fetchReadFileCallback")):h.xhr(a,s,i):y(h,this,a,s)}return g(h,"fetch"),n(h,"fetch"),h.xhr=n(function(a,s,i){var o=new XMLHttpRequest;o.onreadystatechange=n(function(){if(o.readyState===4){if(o.status!==0&&o.status!==200)return i(Error("status "+o.status));if(s.binary){var e=o.response;if(!e){e=[];for(var c=0;c<o.responseText.length;++c)e.push(o.responseText.charCodeAt(c)&255)}return i(null,typeof Uint8Array<"u"?new Uint8Array(e):e)}return i(null,o.responseText)}},"fetchOnReadyStateChange"),s.binary&&("overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.responseType="arraybuffer"),o.open("GET",a),o.send()},"fetch_xhr"),fetch_1}g(requireFetch,"requireFetch");var path={},hasRequiredPath;function requirePath(){return hasRequiredPath||(hasRequiredPath=1,(function(w){var n=Object.defineProperty,y=g((a,s)=>n(a,"name",{value:s,configurable:!0}),"o"),p=w,m=p.isAbsolute=y(function(a){return/^(?:\/|\w+:)/.test(a)},"isAbsolute"),h=p.normalize=y(function(a){a=a.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var s=a.split("/"),i=m(a),o="";i&&(o=s.shift()+"/");for(var e=0;e<s.length;)s[e]===".."?e>0&&s[e-1]!==".."?s.splice(--e,2):i?s.splice(e,1):++e:s[e]==="."?s.splice(e,1):++e;return o+s.join("/")},"normalize");p.resolve=y(function(a,s,i){return i||(s=h(s)),m(s)?s:(i||(a=h(a)),(a=a.replace(/(?:\/|^)[^/]+$/,"")).length?h(a+"/"+s):s)},"resolve")})(path)),path}g(requirePath,"requirePath");var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1;var w=Object.defineProperty,n=g((l,f)=>w(l,"name",{value:f,configurable:!0}),"i");namespace=e;var y=requireObject();((e.prototype=Object.create(y.prototype)).constructor=e).className="Namespace";var p=requireField(),m=requireUtil(),h=requireOneof(),a,s,i;e.fromJSON=n(function(l,f){return new e(l,f.options).addJSON(f.nested)},"fromJSON");function o(l,f){if(l&&l.length){for(var d={},v=0;v<l.length;++v)d[l[v].name]=l[v].toJSON(f);return d}}g(o,"arrayToJSON"),n(o,"arrayToJSON"),e.arrayToJSON=o,e.isReservedId=n(function(l,f){if(l){for(var d=0;d<l.length;++d)if(typeof l[d]!="string"&&l[d][0]<=f&&l[d][1]>f)return!0}return!1},"isReservedId"),e.isReservedName=n(function(l,f){if(l){for(var d=0;d<l.length;++d)if(l[d]===f)return!0}return!1},"isReservedName");function e(l,f){y.call(this,l,f),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}g(e,"Namespace"),n(e,"Namespace");function c(l){l._nestedArray=null,l._lookupCache={};for(var f=l;f=f.parent;)f._lookupCache={};return l}return g(c,"clearCache"),n(c,"clearCache"),Object.defineProperty(e.prototype,"nestedArray",{get:n(function(){return this._nestedArray||(this._nestedArray=m.toArray(this.nested))},"get")}),e.prototype.toJSON=n(function(l){return m.toObject(["options",this.options,"nested",o(this.nestedArray,l)])},"toJSON"),e.prototype.addJSON=n(function(l){var f=this;if(l)for(var d=Object.keys(l),v=0,_;v<d.length;++v)_=l[d[v]],f.add((_.fields!==void 0?a.fromJSON:_.values!==void 0?i.fromJSON:_.methods!==void 0?s.fromJSON:_.id!==void 0?p.fromJSON:e.fromJSON)(d[v],_));return this},"addJSON"),e.prototype.get=n(function(l){return this.nested&&this.nested[l]||null},"get"),e.prototype.getEnum=n(function(l){if(this.nested&&this.nested[l]instanceof i)return this.nested[l].values;throw Error("no such enum: "+l)},"getEnum"),e.prototype.add=n(function(l){if(!(l instanceof p&&l.extend!==void 0||l instanceof a||l instanceof h||l instanceof i||l instanceof s||l instanceof e))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var f=this.get(l.name);if(f)if(f instanceof e&&l instanceof e&&!(f instanceof a||f instanceof s)){for(var d=f.nestedArray,v=0;v<d.length;++v)l.add(d[v]);this.remove(f),this.nested||(this.nested={}),l.setOptions(f.options,!0)}else throw Error("duplicate name '"+l.name+"' in "+this)}this.nested[l.name]=l,this instanceof a||this instanceof s||this instanceof i||this instanceof p||l._edition||(l._edition=l._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var _=this;_=_.parent;)_._needsRecursiveFeatureResolution=!0,_._needsRecursiveResolve=!0;return l.onAdd(this),c(this)},"add"),e.prototype.remove=n(function(l){if(!(l instanceof y))throw TypeError("object must be a ReflectionObject");if(l.parent!==this)throw Error(l+" is not a member of "+this);return delete this.nested[l.name],Object.keys(this.nested).length||(this.nested=void 0),l.onRemove(this),c(this)},"remove"),e.prototype.define=n(function(l,f){if(m.isString(l))l=l.split(".");else if(!Array.isArray(l))throw TypeError("illegal path");if(l&&l.length&&l[0]==="")throw Error("path must be relative");for(var d=this;l.length>0;){var v=l.shift();if(d.nested&&d.nested[v]){if(d=d.nested[v],!(d instanceof e))throw Error("path conflicts with non-namespace objects")}else d.add(d=new e(v))}return f&&d.addJSON(f),d},"define"),e.prototype.resolveAll=n(function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var l=this.nestedArray,f=0;for(this.resolve();f<l.length;)l[f]instanceof e?l[f++].resolveAll():l[f++].resolve();return this._needsRecursiveResolve=!1,this},"resolveAll"),e.prototype._resolveFeaturesRecursive=n(function(l){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,l=this._edition||l,y.prototype._resolveFeaturesRecursive.call(this,l),this.nestedArray.forEach(f=>{f._resolveFeaturesRecursive(l)}),this):this},"_resolveFeaturesRecursive"),e.prototype.lookup=n(function(l,f,d){if(typeof f=="boolean"?(d=f,f=void 0):f&&!Array.isArray(f)&&(f=[f]),m.isString(l)&&l.length){if(l===".")return this.root;l=l.split(".")}else if(!l.length)return this;var v=l.join(".");if(l[0]==="")return this.root.lookup(l.slice(1),f);var _=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+v];if(_&&(!f||f.indexOf(_.constructor)>-1)||(_=this._lookupImpl(l,v),_&&(!f||f.indexOf(_.constructor)>-1)))return _;if(d)return null;for(var j=this;j.parent;){if(_=j.parent._lookupImpl(l,v),_&&(!f||f.indexOf(_.constructor)>-1))return _;j=j.parent}return null},"lookup"),e.prototype._lookupImpl=n(function(l,f){if(Object.prototype.hasOwnProperty.call(this._lookupCache,f))return this._lookupCache[f];var d=this.get(l[0]),v=null;if(d)l.length===1?v=d:d instanceof e&&(l=l.slice(1),v=d._lookupImpl(l,l.join(".")));else for(var _=0;_<this.nestedArray.length;++_)this._nestedArray[_]instanceof e&&(d=this._nestedArray[_]._lookupImpl(l,f))&&(v=d);return this._lookupCache[f]=v,v},"lookup"),e.prototype.lookupType=n(function(l){var f=this.lookup(l,[a]);if(!f)throw Error("no such type: "+l);return f},"lookupType"),e.prototype.lookupEnum=n(function(l){var f=this.lookup(l,[i]);if(!f)throw Error("no such Enum '"+l+"' in "+this);return f},"lookupEnum"),e.prototype.lookupTypeOrEnum=n(function(l){var f=this.lookup(l,[a,i]);if(!f)throw Error("no such Type or Enum '"+l+"' in "+this);return f},"lookupTypeOrEnum"),e.prototype.lookupService=n(function(l){var f=this.lookup(l,[s]);if(!f)throw Error("no such Service '"+l+"' in "+this);return f},"lookupService"),e._configure=function(l,f,d){a=l,s=f,i=d},namespace}g(requireNamespace,"requireNamespace");var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1;var w=Object.defineProperty,n=g((a,s)=>w(a,"name",{value:s,configurable:!0}),"i");mapfield=h;var y=requireField();((h.prototype=Object.create(y.prototype)).constructor=h).className="MapField";var p=requireTypes(),m=requireUtil();function h(a,s,i,o,e,c){if(y.call(this,a,s,o,void 0,void 0,e,c),!m.isString(i))throw TypeError("keyType must be a string");this.keyType=i,this.resolvedKeyType=null,this.map=!0}return g(h,"MapField"),n(h,"MapField"),h.fromJSON=n(function(a,s){return new h(a,s.id,s.keyType,s.type,s.options,s.comment)},"fromJSON"),h.prototype.toJSON=n(function(a){var s=a?!!a.keepComments:!1;return m.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",s?this.comment:void 0])},"toJSON"),h.prototype.resolve=n(function(){if(this.resolved)return this;if(p.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return y.prototype.resolve.call(this)},"resolve"),h.d=n(function(a,s,i){return typeof i=="function"?i=m.decorateType(i).name:i&&typeof i=="object"&&(i=m.decorateEnum(i).name),n(function(o,e){m.decorateType(o.constructor).add(new h(e,a,s,i))},"mapFieldDecorator")},"decorateMapField"),mapfield}g(requireMapfield,"requireMapfield");var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1;var w=Object.defineProperty,n=g((h,a)=>w(h,"name",{value:a,configurable:!0}),"i");method=m;var y=requireObject();((m.prototype=Object.create(y.prototype)).constructor=m).className="Method";var p=requireUtil();function m(h,a,s,i,o,e,c,l,f){if(p.isObject(o)?(c=o,o=e=void 0):p.isObject(e)&&(c=e,e=void 0),!(a===void 0||p.isString(a)))throw TypeError("type must be a string");if(!p.isString(s))throw TypeError("requestType must be a string");if(!p.isString(i))throw TypeError("responseType must be a string");y.call(this,h,c),this.type=a||"rpc",this.requestType=s,this.requestStream=o?!0:void 0,this.responseType=i,this.responseStream=e?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=f}return g(m,"Method"),n(m,"Method"),m.fromJSON=n(function(h,a){return new m(h,a.type,a.requestType,a.responseType,a.requestStream,a.responseStream,a.options,a.comment,a.parsedOptions)},"fromJSON"),m.prototype.toJSON=n(function(h){var a=h?!!h.keepComments:!1;return p.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",a?this.comment:void 0,"parsedOptions",this.parsedOptions])},"toJSON"),m.prototype.resolve=n(function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),y.prototype.resolve.call(this))},"resolve"),method}g(requireMethod,"requireMethod");var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1;var w=Object.defineProperty,n=g((i,o)=>w(i,"name",{value:o,configurable:!0}),"o");service=a;var y=requireNamespace();((a.prototype=Object.create(y.prototype)).constructor=a).className="Service";var p=requireMethod(),m=requireUtil(),h=requireRpc();function a(i,o){y.call(this,i,o),this.methods={},this._methodsArray=null}g(a,"Service"),n(a,"Service"),a.fromJSON=n(function(i,o){var e=new a(i,o.options);if(o.methods)for(var c=Object.keys(o.methods),l=0;l<c.length;++l)e.add(p.fromJSON(c[l],o.methods[c[l]]));return o.nested&&e.addJSON(o.nested),o.edition&&(e._edition=o.edition),e.comment=o.comment,e._defaultEdition="proto3",e},"fromJSON"),a.prototype.toJSON=n(function(i){var o=y.prototype.toJSON.call(this,i),e=i?!!i.keepComments:!1;return m.toObject(["edition",this._editionToJSON(),"options",o&&o.options||void 0,"methods",y.arrayToJSON(this.methodsArray,i)||{},"nested",o&&o.nested||void 0,"comment",e?this.comment:void 0])},"toJSON"),Object.defineProperty(a.prototype,"methodsArray",{get:n(function(){return this._methodsArray||(this._methodsArray=m.toArray(this.methods))},"get")});function s(i){return i._methodsArray=null,i}return g(s,"clearCache"),n(s,"clearCache"),a.prototype.get=n(function(i){return this.methods[i]||y.prototype.get.call(this,i)},"get"),a.prototype.resolveAll=n(function(){if(!this._needsRecursiveResolve)return this;y.prototype.resolve.call(this);for(var i=this.methodsArray,o=0;o<i.length;++o)i[o].resolve();return this},"resolveAll"),a.prototype._resolveFeaturesRecursive=n(function(i){return this._needsRecursiveFeatureResolution?(i=this._edition||i,y.prototype._resolveFeaturesRecursive.call(this,i),this.methodsArray.forEach(o=>{o._resolveFeaturesRecursive(i)}),this):this},"_resolveFeaturesRecursive"),a.prototype.add=n(function(i){if(this.get(i.name))throw Error("duplicate name '"+i.name+"' in "+this);return i instanceof p?(this.methods[i.name]=i,i.parent=this,s(this)):y.prototype.add.call(this,i)},"add"),a.prototype.remove=n(function(i){if(i instanceof p){if(this.methods[i.name]!==i)throw Error(i+" is not a member of "+this);return delete this.methods[i.name],i.parent=null,s(this)}return y.prototype.remove.call(this,i)},"remove"),a.prototype.create=n(function(i,o,e){for(var c=new h.Service(i,o,e),l=0,f;l<this.methodsArray.length;++l){var d=m.lcFirst((f=this._methodsArray[l]).resolve().name).replace(/[^$\w_]/g,"");c[d]=m.codegen(["r","c"],m.isReserved(d)?d+"_":d)("return this.rpcCall(m,q,s,r,c)")({m:f,q:f.resolvedRequestType.ctor,s:f.resolvedResponseType.ctor})}return c},"create"),service}g(requireService,"requireService");var message,hasRequiredMessage;function requireMessage(){if(hasRequiredMessage)return message;hasRequiredMessage=1;var w=Object.defineProperty,n=g((m,h)=>w(m,"name",{value:h,configurable:!0}),"i");message=p;var y=requireMinimal();function p(m){if(m)for(var h=Object.keys(m),a=0;a<h.length;++a){var s=h[a];s!=="__proto__"&&(this[s]=m[s])}}return g(p,"Message"),n(p,"Message"),p.create=n(function(m){return this.$type.create(m)},"create"),p.encode=n(function(m,h){return this.$type.encode(m,h)},"encode"),p.encodeDelimited=n(function(m,h){return this.$type.encodeDelimited(m,h)},"encodeDelimited"),p.decode=n(function(m){return this.$type.decode(m)},"decode"),p.decodeDelimited=n(function(m){return this.$type.decodeDelimited(m)},"decodeDelimited"),p.verify=n(function(m){return this.$type.verify(m)},"verify"),p.fromObject=n(function(m){return this.$type.fromObject(m)},"fromObject"),p.toObject=n(function(m,h){return this.$type.toObject(m,h)},"toObject"),p.prototype.toJSON=n(function(){return this.$type.toObject(this,y.toJSONOptions)},"toJSON"),message}g(requireMessage,"requireMessage");var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1;var w=Object.defineProperty,n=g((s,i)=>w(s,"name",{value:i,configurable:!0}),"t");decoder_1=a;var y=require_enum(),p=requireTypes(),m=requireUtil();function h(s){return"missing required '"+s.name+"'"}g(h,"missing"),n(h,"missing");function a(s){for(var i=m.codegen(["r","l","e"],s.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(s.fieldsArray.filter(function(d){return d.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),o=0;o<s.fieldsArray.length;++o){var e=s._fieldsArray[o].resolve(),c=e.resolvedType instanceof y?"int32":e.type,l="m"+m.safeProp(e.name);i("case %i: {",e.id),e.map?(i("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),p.defaults[e.keyType]!==void 0?i("k=%j",p.defaults[e.keyType]):i("k=null"),p.defaults[c]!==void 0?i("value=%j",p.defaults[c]):i("value=null"),i("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",e.keyType)("case 2:"),p.basic[c]===void 0?i("value=types[%i].decode(r,r.uint32())",o):i("value=r.%s()",c),i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),p.long[e.keyType]!==void 0?i('%s[typeof k==="object"?util.longToHash(k):k]=value',l):i("%s[k]=value",l)):e.repeated?(i("if(!(%s&&%s.length))",l,l)("%s=[]",l),p.packed[c]!==void 0&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,c)("}else"),p.basic[c]===void 0?i(e.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",l,o):i("%s.push(r.%s())",l,c)):p.basic[c]===void 0?i(e.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",l,o):i("%s=r.%s()",l,c),i("break")("}")}for(i("default:")("r.skipType(t&7)")("break")("}")("}"),o=0;o<s._fieldsArray.length;++o){var f=s._fieldsArray[o];f.required&&i("if(!m.hasOwnProperty(%j))",f.name)("throw util.ProtocolError(%j,{instance:m})",h(f))}return i("return m")}return g(a,"decoder"),n(a,"decoder"),decoder_1}g(requireDecoder,"requireDecoder");var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1;var w=Object.defineProperty,n=g((i,o)=>w(i,"name",{value:o,configurable:!0}),"u");verifier_1=s;var y=require_enum(),p=requireUtil();function m(i,o){return i.name+": "+o+(i.repeated&&o!=="array"?"[]":i.map&&o!=="object"?"{k:"+i.keyType+"}":"")+" expected"}g(m,"invalid"),n(m,"invalid");function h(i,o,e,c){if(o.resolvedType)if(o.resolvedType instanceof y){i("switch(%s){",c)("default:")("return%j",m(o,"enum value"));for(var l=Object.keys(o.resolvedType.values),f=0;f<l.length;++f)i("case %i:",o.resolvedType.values[l[f]]);i("break")("}")}else i("{")("var e=types[%i].verify(%s);",e,c)("if(e)")("return%j+e",o.name+".")("}");else switch(o.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":i("if(!util.isInteger(%s))",c)("return%j",m(o,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":i("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",c,c,c,c)("return%j",m(o,"integer|Long"));break;case"float":case"double":i('if(typeof %s!=="number")',c)("return%j",m(o,"number"));break;case"bool":i('if(typeof %s!=="boolean")',c)("return%j",m(o,"boolean"));break;case"string":i("if(!util.isString(%s))",c)("return%j",m(o,"string"));break;case"bytes":i('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',c,c,c)("return%j",m(o,"buffer"));break}return i}g(h,"genVerifyValue"),n(h,"genVerifyValue");function a(i,o,e){switch(o.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":i("if(!util.key32Re.test(%s))",e)("return%j",m(o,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":i("if(!util.key64Re.test(%s))",e)("return%j",m(o,"integer|Long key"));break;case"bool":i("if(!util.key2Re.test(%s))",e)("return%j",m(o,"boolean key"));break}return i}g(a,"genVerifyKey"),n(a,"genVerifyKey");function s(i){var o=p.codegen(["m"],i.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),e=i.oneofsArray,c={};e.length&&o("var p={}");for(var l=0;l<i.fieldsArray.length;++l){var f=i._fieldsArray[l].resolve(),d="m"+p.safeProp(f.name);if(f.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",d,f.name),f.map)o("if(!util.isObject(%s))",d)("return%j",m(f,"object"))("var k=Object.keys(%s)",d)("for(var i=0;i<k.length;++i){"),a(o,f,"k[i]"),h(o,f,l,d+"[k[i]]")("}");else if(f.repeated)o("if(!Array.isArray(%s))",d)("return%j",m(f,"array"))("for(var i=0;i<%s.length;++i){",d),h(o,f,l,d+"[i]")("}");else{if(f.partOf){var v=p.safeProp(f.partOf.name);c[f.partOf.name]===1&&o("if(p%s===1)",v)("return%j",f.partOf.name+": multiple values"),c[f.partOf.name]=1,o("p%s=1",v)}h(o,f,l,d)}f.optional&&o("}")}return o("return null")}return g(s,"verifier"),n(s,"verifier"),verifier_1}g(requireVerifier,"requireVerifier");var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,(function(w){var n=Object.defineProperty,y=g((i,o)=>n(i,"name",{value:o,configurable:!0}),"m"),p=w,m=require_enum(),h=requireUtil();function a(i,o,e,c){var l=!1;if(o.resolvedType)if(o.resolvedType instanceof m){i("switch(d%s){",c);for(var f=o.resolvedType.values,d=Object.keys(f),v=0;v<d.length;++v)f[d[v]]===o.typeDefault&&!l&&(i("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',c,c,c),o.repeated||i("break"),l=!0),i("case%j:",d[v])("case %i:",f[d[v]])("m%s=%j",c,f[d[v]])("break");i("}")}else i('if(typeof d%s!=="object")',c)("throw TypeError(%j)",o.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",c,e,c);else{var _=!1;switch(o.type){case"double":case"float":i("m%s=Number(d%s)",c,c);break;case"uint32":case"fixed32":i("m%s=d%s>>>0",c,c);break;case"int32":case"sint32":case"sfixed32":i("m%s=d%s|0",c,c);break;case"uint64":_=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":i("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",c,c,_)('else if(typeof d%s==="string")',c)("m%s=parseInt(d%s,10)",c,c)('else if(typeof d%s==="number")',c)("m%s=d%s",c,c)('else if(typeof d%s==="object")',c)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",c,c,c,_?"true":"");break;case"bytes":i('if(typeof d%s==="string")',c)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",c,c,c)("else if(d%s.length >= 0)",c)("m%s=d%s",c,c);break;case"string":i("m%s=String(d%s)",c,c);break;case"bool":i("m%s=Boolean(d%s)",c,c);break}}return i}g(a,"genValuePartial_fromObject"),y(a,"genValuePartial_fromObject"),p.fromObject=y(function(i){var o=i.fieldsArray,e=h.codegen(["d"],i.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!o.length)return e("return new this.ctor");e("var m=new this.ctor");for(var c=0;c<o.length;++c){var l=o[c].resolve(),f=h.safeProp(l.name);l.map?(e("if(d%s){",f)('if(typeof d%s!=="object")',f)("throw TypeError(%j)",l.fullName+": object expected")("m%s={}",f)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",f),a(e,l,c,f+"[ks[i]]")("}")("}")):l.repeated?(e("if(d%s){",f)("if(!Array.isArray(d%s))",f)("throw TypeError(%j)",l.fullName+": array expected")("m%s=[]",f)("for(var i=0;i<d%s.length;++i){",f),a(e,l,c,f+"[i]")("}")("}")):(l.resolvedType instanceof m||e("if(d%s!=null){",f),a(e,l,c,f),l.resolvedType instanceof m||e("}"))}return e("return m")},"fromObject");function s(i,o,e,c){if(o.resolvedType)o.resolvedType instanceof m?i("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",c,e,c,c,e,c,c):i("d%s=types[%i].toObject(m%s,o)",c,e,c);else{var l=!1;switch(o.type){case"double":case"float":i("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",c,c,c,c);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":i('if(typeof m%s==="number")',c)("d%s=o.longs===String?String(m%s):m%s",c,c,c)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",c,c,c,c,l?"true":"",c);break;case"bytes":i("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",c,c,c,c,c);break;default:i("d%s=m%s",c,c);break}}return i}g(s,"genValuePartial_toObject"),y(s,"genValuePartial_toObject"),p.toObject=y(function(i){var o=i.fieldsArray.slice().sort(h.compareFieldsById);if(!o.length)return h.codegen()("return {}");for(var e=h.codegen(["m","o"],i.name+"$toObject")("if(!o)")("o={}")("var d={}"),c=[],l=[],f=[],d=0;d<o.length;++d)o[d].partOf||(o[d].resolve().repeated?c:o[d].map?l:f).push(o[d]);if(c.length){for(e("if(o.arrays||o.defaults){"),d=0;d<c.length;++d)e("d%s=[]",h.safeProp(c[d].name));e("}")}if(l.length){for(e("if(o.objects||o.defaults){"),d=0;d<l.length;++d)e("d%s={}",h.safeProp(l[d].name));e("}")}if(f.length){for(e("if(o.defaults){"),d=0;d<f.length;++d){var v=f[d],_=h.safeProp(v.name);if(v.resolvedType instanceof m)e("d%s=o.enums===String?%j:%j",_,v.resolvedType.valuesById[v.typeDefault],v.typeDefault);else if(v.long)e("if(util.Long){")("var n=new util.Long(%i,%i,%j)",v.typeDefault.low,v.typeDefault.high,v.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",_)("}else")("d%s=o.longs===String?%j:%i",_,v.typeDefault.toString(),v.typeDefault.toNumber());else if(v.bytes){var j="["+Array.prototype.slice.call(v.typeDefault).join(",")+"]";e("if(o.bytes===String)d%s=%j",_,String.fromCharCode.apply(String,v.typeDefault))("else{")("d%s=%s",_,j)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",_,_)("}")}else e("d%s=%j",_,v.typeDefault)}e("}")}var O=!1;for(d=0;d<o.length;++d){var v=o[d],b=i._fieldsArray.indexOf(v),_=h.safeProp(v.name);v.map?(O||(O=!0,e("var ks2")),e("if(m%s&&(ks2=Object.keys(m%s)).length){",_,_)("d%s={}",_)("for(var j=0;j<ks2.length;++j){"),s(e,v,b,_+"[ks2[j]]")("}")):v.repeated?(e("if(m%s&&m%s.length){",_,_)("d%s=[]",_)("for(var j=0;j<m%s.length;++j){",_),s(e,v,b,_+"[j]")("}")):(e("if(m%s!=null&&m.hasOwnProperty(%j)){",_,v.name),s(e,v,b,_),v.partOf&&e("if(o.oneofs)")("d%s=%j",h.safeProp(v.partOf.name),v.name)),e("}")}return e("return d")},"toObject")})(converter)),converter}g(requireConverter,"requireConverter");var wrappers={},hasRequiredWrappers;function requireWrappers(){return hasRequiredWrappers||(hasRequiredWrappers=1,(function(w){var n=Object.defineProperty,y=g((h,a)=>n(h,"name",{value:a,configurable:!0}),"l"),p=w,m=requireMessage();p[".google.protobuf.Any"]={fromObject:y(function(h){if(h&&h["@type"]){var a=h["@type"].substring(h["@type"].lastIndexOf("/")+1),s=this.lookup(a);if(s){var i=h["@type"].charAt(0)==="."?h["@type"].slice(1):h["@type"];return i.indexOf("/")===-1&&(i="/"+i),this.create({type_url:i,value:s.encode(s.fromObject(h)).finish()})}}return this.fromObject(h)},"fromObject"),toObject:y(function(h,a){var s="type.googleapis.com/",i="",o="";if(a&&a.json&&h.type_url&&h.value){o=h.type_url.substring(h.type_url.lastIndexOf("/")+1),i=h.type_url.substring(0,h.type_url.lastIndexOf("/")+1);var e=this.lookup(o);e&&(h=e.decode(h.value))}if(!(h instanceof this.ctor)&&h instanceof m){var c=h.$type.toObject(h,a),l=h.$type.fullName[0]==="."?h.$type.fullName.slice(1):h.$type.fullName;return i===""&&(i=s),o=i+l,c["@type"]=o,c}return this.toObject(h,a)},"toObject")}})(wrappers)),wrappers}g(requireWrappers,"requireWrappers");var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1;var w=Object.defineProperty,n=g((b,q)=>w(b,"name",{value:q,configurable:!0}),"s");type=j;var y=requireNamespace();((j.prototype=Object.create(y.prototype)).constructor=j).className="Type";var p=require_enum(),m=requireOneof(),h=requireField(),a=requireMapfield(),s=requireService(),i=requireMessage(),o=requireReader(),e=requireWriter(),c=requireUtil(),l=requireEncoder(),f=requireDecoder(),d=requireVerifier(),v=requireConverter(),_=requireWrappers();function j(b,q){b=b.replace(/\W/g,""),y.call(this,b,q),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}g(j,"Type"),n(j,"Type"),Object.defineProperties(j.prototype,{fieldsById:{get:n(function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var b=Object.keys(this.fields),q=0;q<b.length;++q){var S=this.fields[b[q]],x=S.id;if(this._fieldsById[x])throw Error("duplicate id "+x+" in "+this);this._fieldsById[x]=S}return this._fieldsById},"get")},fieldsArray:{get:n(function(){return this._fieldsArray||(this._fieldsArray=c.toArray(this.fields))},"get")},oneofsArray:{get:n(function(){return this._oneofsArray||(this._oneofsArray=c.toArray(this.oneofs))},"get")},ctor:{get:n(function(){return this._ctor||(this.ctor=j.generateConstructor(this)())},"get"),set:n(function(b){var q=b.prototype;q instanceof i||((b.prototype=new i).constructor=b,c.merge(b.prototype,q)),b.$type=b.prototype.$type=this,c.merge(b,i,!0),this._ctor=b;for(var S=0;S<this.fieldsArray.length;++S)this._fieldsArray[S].resolve();var x={};for(S=0;S<this.oneofsArray.length;++S)x[this._oneofsArray[S].resolve().name]={get:c.oneOfGetter(this._oneofsArray[S].oneof),set:c.oneOfSetter(this._oneofsArray[S].oneof)};S&&Object.defineProperties(b.prototype,x)},"set")}}),j.generateConstructor=n(function(b){for(var q=c.codegen(["p"],b.name),S=0,x;S<b.fieldsArray.length;++S)(x=b._fieldsArray[S]).map?q("this%s={}",c.safeProp(x.name)):x.repeated&&q("this%s=[]",c.safeProp(x.name));return q("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},"generateConstructor");function O(b){return b._fieldsById=b._fieldsArray=b._oneofsArray=null,delete b.encode,delete b.decode,delete b.verify,b}return g(O,"clearCache"),n(O,"clearCache"),j.fromJSON=n(function(b,q){var S=new j(b,q.options);S.extensions=q.extensions,S.reserved=q.reserved;for(var x=Object.keys(q.fields),I=0;I<x.length;++I)S.add((typeof q.fields[x[I]].keyType<"u"?a.fromJSON:h.fromJSON)(x[I],q.fields[x[I]]));if(q.oneofs)for(x=Object.keys(q.oneofs),I=0;I<x.length;++I)S.add(m.fromJSON(x[I],q.oneofs[x[I]]));if(q.nested)for(x=Object.keys(q.nested),I=0;I<x.length;++I){var V=q.nested[x[I]];S.add((V.id!==void 0?h.fromJSON:V.fields!==void 0?j.fromJSON:V.values!==void 0?p.fromJSON:V.methods!==void 0?s.fromJSON:y.fromJSON)(x[I],V))}return q.extensions&&q.extensions.length&&(S.extensions=q.extensions),q.reserved&&q.reserved.length&&(S.reserved=q.reserved),q.group&&(S.group=!0),q.comment&&(S.comment=q.comment),q.edition&&(S._edition=q.edition),S._defaultEdition="proto3",S},"fromJSON"),j.prototype.toJSON=n(function(b){var q=y.prototype.toJSON.call(this,b),S=b?!!b.keepComments:!1;return c.toObject(["edition",this._editionToJSON(),"options",q&&q.options||void 0,"oneofs",y.arrayToJSON(this.oneofsArray,b),"fields",y.arrayToJSON(this.fieldsArray.filter(function(x){return!x.declaringField}),b)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",q&&q.nested||void 0,"comment",S?this.comment:void 0])},"toJSON"),j.prototype.resolveAll=n(function(){if(!this._needsRecursiveResolve)return this;y.prototype.resolveAll.call(this);var b=this.oneofsArray;for(S=0;S<b.length;)b[S++].resolve();for(var q=this.fieldsArray,S=0;S<q.length;)q[S++].resolve();return this},"resolveAll"),j.prototype._resolveFeaturesRecursive=n(function(b){return this._needsRecursiveFeatureResolution?(b=this._edition||b,y.prototype._resolveFeaturesRecursive.call(this,b),this.oneofsArray.forEach(q=>{q._resolveFeatures(b)}),this.fieldsArray.forEach(q=>{q._resolveFeatures(b)}),this):this},"_resolveFeaturesRecursive"),j.prototype.get=n(function(b){return this.fields[b]||this.oneofs&&this.oneofs[b]||this.nested&&this.nested[b]||null},"get"),j.prototype.add=n(function(b){if(this.get(b.name))throw Error("duplicate name '"+b.name+"' in "+this);if(b instanceof h&&b.extend===void 0){if(this._fieldsById?this._fieldsById[b.id]:this.fieldsById[b.id])throw Error("duplicate id "+b.id+" in "+this);if(this.isReservedId(b.id))throw Error("id "+b.id+" is reserved in "+this);if(this.isReservedName(b.name))throw Error("name '"+b.name+"' is reserved in "+this);return b.parent&&b.parent.remove(b),this.fields[b.name]=b,b.message=this,b.onAdd(this),O(this)}return b instanceof m?(this.oneofs||(this.oneofs={}),this.oneofs[b.name]=b,b.onAdd(this),O(this)):y.prototype.add.call(this,b)},"add"),j.prototype.remove=n(function(b){if(b instanceof h&&b.extend===void 0){if(!this.fields||this.fields[b.name]!==b)throw Error(b+" is not a member of "+this);return delete this.fields[b.name],b.parent=null,b.onRemove(this),O(this)}if(b instanceof m){if(!this.oneofs||this.oneofs[b.name]!==b)throw Error(b+" is not a member of "+this);return delete this.oneofs[b.name],b.parent=null,b.onRemove(this),O(this)}return y.prototype.remove.call(this,b)},"remove"),j.prototype.isReservedId=n(function(b){return y.isReservedId(this.reserved,b)},"isReservedId"),j.prototype.isReservedName=n(function(b){return y.isReservedName(this.reserved,b)},"isReservedName"),j.prototype.create=n(function(b){return new this.ctor(b)},"create"),j.prototype.setup=n(function(){for(var b=this.fullName,q=[],S=0;S<this.fieldsArray.length;++S)q.push(this._fieldsArray[S].resolve().resolvedType);this.encode=l(this)({Writer:e,types:q,util:c}),this.decode=f(this)({Reader:o,types:q,util:c}),this.verify=d(this)({types:q,util:c}),this.fromObject=v.fromObject(this)({types:q,util:c}),this.toObject=v.toObject(this)({types:q,util:c});var x=_[b];if(x){var I=Object.create(this);I.fromObject=this.fromObject,this.fromObject=x.fromObject.bind(I),I.toObject=this.toObject,this.toObject=x.toObject.bind(I)}return this},"setup"),j.prototype.encode=n(function(b,q){return this.setup().encode(b,q)},"encode_setup"),j.prototype.encodeDelimited=n(function(b,q){return this.encode(b,q&&q.len?q.fork():q).ldelim()},"encodeDelimited"),j.prototype.decode=n(function(b,q){return this.setup().decode(b,q)},"decode_setup"),j.prototype.decodeDelimited=n(function(b){return b instanceof o||(b=o.create(b)),this.decode(b,b.uint32())},"decodeDelimited"),j.prototype.verify=n(function(b){return this.setup().verify(b)},"verify_setup"),j.prototype.fromObject=n(function(b){return this.setup().fromObject(b)},"fromObject"),j.prototype.toObject=n(function(b,q){return this.setup().toObject(b,q)},"toObject"),j.d=n(function(b){return n(function(q){c.decorateType(q,b)},"typeDecorator")},"decorateType"),type}g(requireType,"requireType");var root,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root;hasRequiredRoot=1;var w=Object.defineProperty,n=g((d,v)=>w(d,"name",{value:v,configurable:!0}),"u");root=e;var y=requireNamespace();((e.prototype=Object.create(y.prototype)).constructor=e).className="Root";var p=requireField(),m=require_enum(),h=requireOneof(),a=requireUtil(),s,i,o;function e(d){y.call(this,"",d),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}g(e,"Root"),n(e,"Root"),e.fromJSON=n(function(d,v){return v||(v=new e),d.options&&v.setOptions(d.options),v.addJSON(d.nested).resolveAll()},"fromJSON"),e.prototype.resolvePath=a.path.resolve,e.prototype.fetch=a.fetch;function c(){}g(c,"SYNC"),n(c,"SYNC"),e.prototype.load=n(g(function d(v,_,j){typeof _=="function"&&(j=_,_=void 0);var O=this;if(!j)return a.asPromise(d,O,v,_);var b=j===c;function q(C,J){if(j){if(b)throw C;J&&J.resolveAll();var N=j;j=null,N(C,J)}}g(q,"h"),n(q,"finish");function S(C){var J=C.lastIndexOf("google/protobuf/");if(J>-1){var N=C.substring(J);if(N in o)return N}return null}g(S,"y"),n(S,"getBundledFileName");function x(C,J){try{if(a.isString(J)&&J.charAt(0)==="{"&&(J=JSON.parse(J)),!a.isString(J))O.setOptions(J.options).addJSON(J.nested);else{i.filename=C;var N=i(J,O,_),G,W=0;if(N.imports)for(;W<N.imports.length;++W)(G=S(N.imports[W])||O.resolvePath(C,N.imports[W]))&&I(G);if(N.weakImports)for(W=0;W<N.weakImports.length;++W)(G=S(N.weakImports[W])||O.resolvePath(C,N.weakImports[W]))&&I(G,!0)}}catch(T){q(T)}!b&&!V&&q(null,O)}g(x,"v"),n(x,"process");function I(C,J){if(C=S(C)||C,!(O.files.indexOf(C)>-1)){if(O.files.push(C),C in o){b?x(C,o[C]):(++V,setTimeout(function(){--V,x(C,o[C])}));return}if(b){var N;try{N=a.fs.readFileSync(C).toString("utf8")}catch(G){J||q(G);return}x(C,N)}else++V,O.fetch(C,function(G,W){if(--V,!!j){if(G){J?V||q(null,O):q(G);return}x(C,W)}})}}g(I,"x"),n(I,"fetch");var V=0;a.isString(v)&&(v=[v]);for(var K=0,Q;K<v.length;++K)(Q=O.resolvePath("",v[K]))&&I(Q);return b?(O.resolveAll(),O):(V||q(null,O),O)},"o"),"load"),e.prototype.loadSync=n(function(d,v){if(!a.isNode)throw Error("not supported");return this.load(d,v,c)},"loadSync"),e.prototype.resolveAll=n(function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(d){return"'extend "+d.extend+"' in "+d.parent.fullName}).join(", "));return y.prototype.resolveAll.call(this)},"resolveAll");var l=/^[A-Z]/;function f(d,v){var _=v.parent.lookup(v.extend);if(_){var j=new p(v.fullName,v.id,v.type,v.rule,void 0,v.options);return _.get(j.name)||(j.declaringField=v,v.extensionField=j,_.add(j)),!0}return!1}return g(f,"tryHandleExtension"),n(f,"tryHandleExtension"),e.prototype._handleAdd=n(function(d){if(d instanceof p)d.extend!==void 0&&!d.extensionField&&(f(this,d)||this.deferred.push(d));else if(d instanceof m)l.test(d.name)&&(d.parent[d.name]=d.values);else if(!(d instanceof h)){if(d instanceof s)for(var v=0;v<this.deferred.length;)f(this,this.deferred[v])?this.deferred.splice(v,1):++v;for(var _=0;_<d.nestedArray.length;++_)this._handleAdd(d._nestedArray[_]);l.test(d.name)&&(d.parent[d.name]=d)}(d instanceof s||d instanceof m||d instanceof p)&&(this._fullyQualifiedObjects[d.fullName]=d)},"_handleAdd"),e.prototype._handleRemove=n(function(d){if(d instanceof p){if(d.extend!==void 0)if(d.extensionField)d.extensionField.parent.remove(d.extensionField),d.extensionField=null;else{var v=this.deferred.indexOf(d);v>-1&&this.deferred.splice(v,1)}}else if(d instanceof m)l.test(d.name)&&delete d.parent[d.name];else if(d instanceof y){for(var _=0;_<d.nestedArray.length;++_)this._handleRemove(d._nestedArray[_]);l.test(d.name)&&delete d.parent[d.name]}delete this._fullyQualifiedObjects[d.fullName]},"_handleRemove"),e._configure=function(d,v,_){s=d,i=v,o=_},root}g(requireRoot,"requireRoot");var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util.exports;hasRequiredUtil=1;var w=Object.defineProperty,n=g((e,c)=>w(e,"name",{value:c,configurable:!0}),"n"),y=util.exports=requireMinimal(),p=requireRoots(),m,h;y.codegen=requireCodegen(),y.fetch=requireFetch(),y.path=requirePath(),y.fs=y.inquire("fs"),y.toArray=n(function(e){if(e){for(var c=Object.keys(e),l=new Array(c.length),f=0;f<c.length;)l[f]=e[c[f++]];return l}return[]},"toArray"),y.toObject=n(function(e){for(var c={},l=0;l<e.length;){var f=e[l++],d=e[l++];d!==void 0&&(c[f]=d)}return c},"toObject");var a=/\\/g,s=/"/g;y.isReserved=n(function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},"isReserved"),y.safeProp=n(function(e){return!/^[$\w_]+$/.test(e)||y.isReserved(e)?'["'+e.replace(a,"\\\\").replace(s,'\\"')+'"]':"."+e},"safeProp"),y.ucFirst=n(function(e){return e.charAt(0).toUpperCase()+e.substring(1)},"ucFirst");var i=/_([a-z])/g;y.camelCase=n(function(e){return e.substring(0,1)+e.substring(1).replace(i,function(c,l){return l.toUpperCase()})},"camelCase"),y.compareFieldsById=n(function(e,c){return e.id-c.id},"compareFieldsById"),y.decorateType=n(function(e,c){if(e.$type)return c&&e.$type.name!==c&&(y.decorateRoot.remove(e.$type),e.$type.name=c,y.decorateRoot.add(e.$type)),e.$type;m||(m=requireType());var l=new m(c||e.name);return y.decorateRoot.add(l),l.ctor=e,Object.defineProperty(e,"$type",{value:l,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:l,enumerable:!1}),l},"decorateType");var o=0;return y.decorateEnum=n(function(e){if(e.$type)return e.$type;h||(h=require_enum());var c=new h("Enum"+o++,e);return y.decorateRoot.add(c),Object.defineProperty(e,"$type",{value:c,enumerable:!1}),c},"decorateEnum"),y.setProperty=n(function(e,c,l,f){function d(v,_,j){var O=_.shift();if(O==="__proto__"||O==="prototype")return v;if(_.length>0)v[O]=d(v[O]||{},_,j);else{var b=v[O];if(b&&f)return v;b&&(j=[].concat(b).concat(j)),v[O]=j}return v}if(g(d,"c"),n(d,"setProp"),typeof e!="object")throw TypeError("dst must be an object");if(!c)throw TypeError("path must be specified");return c=c.split("."),d(e,c,l)},"setProperty"),Object.defineProperty(y,"decorateRoot",{get:n(function(){return p.decorated||(p.decorated=new(requireRoot()))},"get")}),util.exports}g(requireUtil,"requireUtil");var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(w){var n=Object.defineProperty,y=g((s,i)=>n(s,"name",{value:i,configurable:!0}),"r"),p=w,m=requireUtil(),h=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(s,i){var o=0,e={};for(i|=0;o<s.length;)e[h[o+i]]=s[o++];return e}g(a,"bake"),y(a,"bake"),p.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),p.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",m.emptyArray,null]),p.long=a([0,0,0,1,1],7),p.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),p.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])})(types)),types}g(requireTypes,"requireTypes");var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1;var w=Object.defineProperty,n=g((o,e)=>w(o,"name",{value:e,configurable:!0}),"s");field=i;var y=requireObject();((i.prototype=Object.create(y.prototype)).constructor=i).className="Field";var p=require_enum(),m=requireTypes(),h=requireUtil(),a,s=/^required|optional|repeated$/;i.fromJSON=n(function(o,e){var c=new i(o,e.id,e.type,e.rule,e.extend,e.options,e.comment);return e.edition&&(c._edition=e.edition),c._defaultEdition="proto3",c},"fromJSON");function i(o,e,c,l,f,d,v){if(h.isObject(l)?(v=f,d=l,l=f=void 0):h.isObject(f)&&(v=d,d=f,f=void 0),y.call(this,o,d),!h.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!h.isString(c))throw TypeError("type must be a string");if(l!==void 0&&!s.test(l=l.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(f!==void 0&&!h.isString(f))throw TypeError("extend must be a string");l==="proto3_optional"&&(l="optional"),this.rule=l&&l!=="optional"?l:void 0,this.type=c,this.id=e,this.extend=f||void 0,this.repeated=l==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=h.Long?m.long[c]!==void 0:!1,this.bytes=c==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=v}return g(i,"Field"),n(i,"Field"),Object.defineProperty(i.prototype,"required",{get:n(function(){return this._features.field_presence==="LEGACY_REQUIRED"},"get")}),Object.defineProperty(i.prototype,"optional",{get:n(function(){return!this.required},"get")}),Object.defineProperty(i.prototype,"delimited",{get:n(function(){return this.resolvedType instanceof a&&this._features.message_encoding==="DELIMITED"},"get")}),Object.defineProperty(i.prototype,"packed",{get:n(function(){return this._features.repeated_field_encoding==="PACKED"},"get")}),Object.defineProperty(i.prototype,"hasPresence",{get:n(function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"},"get")}),i.prototype.setOption=n(function(o,e,c){return y.prototype.setOption.call(this,o,e,c)},"setOption"),i.prototype.toJSON=n(function(o){var e=o?!!o.keepComments:!1;return h.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},"toJSON"),i.prototype.resolve=n(function(){if(this.resolved)return this;if((this.typeDefault=m.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof a?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof p&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof p)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=h.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var o;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,o=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,o=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=o}return this.map?this.defaultValue=h.emptyObject:this.repeated?this.defaultValue=h.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof a&&(this.parent.ctor.prototype[this.name]=this.defaultValue),y.prototype.resolve.call(this)},"resolve"),i.prototype._inferLegacyProtoFeatures=n(function(o){if(o!=="proto2"&&o!=="proto3")return{};var e={};if(this.rule==="required"&&(e.field_presence="LEGACY_REQUIRED"),this.parent&&m.defaults[this.type]===void 0){var c=this.parent.get(this.type.split(".").pop());c&&c instanceof a&&c.group&&(e.message_encoding="DELIMITED")}return this.getOption("packed")===!0?e.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(e.repeated_field_encoding="EXPANDED"),e},"_inferLegacyProtoFeatures"),i.prototype._resolveFeatures=n(function(o){return y.prototype._resolveFeatures.call(this,this._edition||o)},"_resolveFeatures"),i.d=n(function(o,e,c,l){return typeof e=="function"?e=h.decorateType(e).name:e&&typeof e=="object"&&(e=h.decorateEnum(e).name),n(function(f,d){h.decorateType(f.constructor).add(new i(d,o,e,c,{default:l}))},"fieldDecorator")},"decorateField"),i._configure=n(function(o){a=o},"configure"),field}g(requireField,"requireField");var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1;var w=Object.defineProperty,n=g((s,i)=>w(s,"name",{value:i,configurable:!0}),"o");oneof=h;var y=requireObject();((h.prototype=Object.create(y.prototype)).constructor=h).className="OneOf";var p=requireField(),m=requireUtil();function h(s,i,o,e){if(Array.isArray(i)||(o=i,i=void 0),y.call(this,s,o),!(i===void 0||Array.isArray(i)))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=e}g(h,"OneOf"),n(h,"OneOf"),h.fromJSON=n(function(s,i){return new h(s,i.oneof,i.options,i.comment)},"fromJSON"),h.prototype.toJSON=n(function(s){var i=s?!!s.keepComments:!1;return m.toObject(["options",this.options,"oneof",this.oneof,"comment",i?this.comment:void 0])},"toJSON");function a(s){if(s.parent)for(var i=0;i<s.fieldsArray.length;++i)s.fieldsArray[i].parent||s.parent.add(s.fieldsArray[i])}return g(a,"addFieldsToParent"),n(a,"addFieldsToParent"),h.prototype.add=n(function(s){if(!(s instanceof p))throw TypeError("field must be a Field");return s.parent&&s.parent!==this.parent&&s.parent.remove(s),this.oneof.push(s.name),this.fieldsArray.push(s),s.partOf=this,a(this),this},"add"),h.prototype.remove=n(function(s){if(!(s instanceof p))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(s);if(i<0)throw Error(s+" is not a member of "+this);return this.fieldsArray.splice(i,1),i=this.oneof.indexOf(s.name),i>-1&&this.oneof.splice(i,1),s.partOf=null,this},"remove"),h.prototype.onAdd=n(function(s){y.prototype.onAdd.call(this,s);for(var i=this,o=0;o<this.oneof.length;++o){var e=s.get(this.oneof[o]);e&&!e.partOf&&(e.partOf=i,i.fieldsArray.push(e))}a(this)},"onAdd"),h.prototype.onRemove=n(function(s){for(var i=0,o;i<this.fieldsArray.length;++i)(o=this.fieldsArray[i]).parent&&o.parent.remove(o);y.prototype.onRemove.call(this,s)},"onRemove"),Object.defineProperty(h.prototype,"isProto3Optional",{get:n(function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var s=this.fieldsArray[0];return s.options!=null&&s.options.proto3_optional===!0},"get")}),h.d=n(function(){for(var s=new Array(arguments.length),i=0;i<arguments.length;)s[i]=arguments[i++];return n(function(o,e){m.decorateType(o.constructor).add(new h(e,s)),Object.defineProperty(o,e,{get:m.oneOfGetter(s),set:m.oneOfSetter(s)})},"oneOfDecorator")},"decorateOneOf"),oneof}g(requireOneof,"requireOneof");var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1;var w=Object.defineProperty,n=g((e,c)=>w(e,"name",{value:c,configurable:!0}),"s");object=o,o.className="ReflectionObject";const y=requireOneof();var p=requireUtil(),m,h={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},a={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},s={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},i={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"};function o(e,c){if(!p.isString(e))throw TypeError("name must be a string");if(c&&!p.isObject(c))throw TypeError("options must be an object");this.options=c,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return g(o,"ReflectionObject"),n(o,"ReflectionObject"),Object.defineProperties(o.prototype,{root:{get:n(function(){for(var e=this;e.parent!==null;)e=e.parent;return e},"get")},fullName:{get:n(function(){for(var e=[this.name],c=this.parent;c;)e.unshift(c.name),c=c.parent;return e.join(".")},"get")}}),o.prototype.toJSON=n(function(){throw Error()},"toJSON"),o.prototype.onAdd=n(function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var c=e.root;c instanceof m&&c._handleAdd(this)},"onAdd"),o.prototype.onRemove=n(function(e){var c=e.root;c instanceof m&&c._handleRemove(this),this.parent=null,this.resolved=!1},"onRemove"),o.prototype.resolve=n(function(){return this.resolved?this:(this.root instanceof m&&(this.resolved=!0),this)},"resolve"),o.prototype._resolveFeaturesRecursive=n(function(e){return this._resolveFeatures(this._edition||e)},"_resolveFeaturesRecursive"),o.prototype._resolveFeatures=n(function(e){if(!this._featuresResolved){var c={};if(!e)throw new Error("Unknown edition for "+this.fullName);var l=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(e));if(this._edition){if(e==="proto2")c=Object.assign({},s);else if(e==="proto3")c=Object.assign({},i);else if(e==="2023")c=Object.assign({},a);else if(e==="2024")c=Object.assign({},h);else throw new Error("Unknown edition: "+e);this._features=Object.assign(c,l||{}),this._featuresResolved=!0;return}if(this.partOf instanceof y){var f=Object.assign({},this.partOf._features);this._features=Object.assign(f,l||{})}else if(!this.declaringField)if(this.parent){var d=Object.assign({},this.parent._features);this._features=Object.assign(d,l||{})}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},"_resolveFeatures"),o.prototype._inferLegacyProtoFeatures=n(function(){return{}},"_inferLegacyProtoFeatures"),o.prototype.getOption=n(function(e){if(this.options)return this.options[e]},"getOption"),o.prototype.setOption=n(function(e,c,l){return this.options||(this.options={}),/^features\./.test(e)?p.setProperty(this.options,e,c,l):(!l||this.options[e]===void 0)&&(this.getOption(e)!==c&&(this.resolved=!1),this.options[e]=c),this},"setOption"),o.prototype.setParsedOption=n(function(e,c,l){this.parsedOptions||(this.parsedOptions=[]);var f=this.parsedOptions;if(l){var d=f.find(function(j){return Object.prototype.hasOwnProperty.call(j,e)});if(d){var v=d[e];p.setProperty(v,l,c)}else d={},d[e]=p.setProperty({},l,c),f.push(d)}else{var _={};_[e]=c,f.push(_)}return this},"setParsedOption"),o.prototype.setOptions=n(function(e,c){if(e)for(var l=Object.keys(e),f=0;f<l.length;++f)this.setOption(l[f],e[l[f]],c);return this},"setOptions"),o.prototype.toString=n(function(){var e=this.constructor.className,c=this.fullName;return c.length?e+" "+c:e},"toString"),o.prototype._editionToJSON=n(function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},"_editionToJSON"),o._configure=function(e){m=e},object}g(requireObject,"requireObject");var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1;var w=Object.defineProperty,n=g((a,s)=>w(a,"name",{value:s,configurable:!0}),"r");_enum=h;var y=requireObject();((h.prototype=Object.create(y.prototype)).constructor=h).className="Enum";var p=requireNamespace(),m=requireUtil();function h(a,s,i,o,e,c){if(y.call(this,a,i),s&&typeof s!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=e||{},this.valuesOptions=c,this._valuesFeatures={},this.reserved=void 0,s)for(var l=Object.keys(s),f=0;f<l.length;++f)typeof s[l[f]]=="number"&&(this.valuesById[this.values[l[f]]=s[l[f]]]=l[f])}return g(h,"Enum"),n(h,"Enum"),h.prototype._resolveFeatures=n(function(a){return a=this._edition||a,y.prototype._resolveFeatures.call(this,a),Object.keys(this.values).forEach(s=>{var i=Object.assign({},this._features);this._valuesFeatures[s]=Object.assign(i,this.valuesOptions&&this.valuesOptions[s]&&this.valuesOptions[s].features)}),this},"_resolveFeatures"),h.fromJSON=n(function(a,s){var i=new h(a,s.values,s.options,s.comment,s.comments);return i.reserved=s.reserved,s.edition&&(i._edition=s.edition),i._defaultEdition="proto3",i},"fromJSON"),h.prototype.toJSON=n(function(a){var s=a?!!a.keepComments:!1;return m.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",s?this.comment:void 0,"comments",s?this.comments:void 0])},"toJSON"),h.prototype.add=n(function(a,s,i,o){if(!m.isString(a))throw TypeError("name must be a string");if(!m.isInteger(s))throw TypeError("id must be an integer");if(this.values[a]!==void 0)throw Error("duplicate name '"+a+"' in "+this);if(this.isReservedId(s))throw Error("id "+s+" is reserved in "+this);if(this.isReservedName(a))throw Error("name '"+a+"' is reserved in "+this);if(this.valuesById[s]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+s+" in "+this);this.values[a]=s}else this.valuesById[this.values[a]=s]=a;return o&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[a]=o||null),this.comments[a]=i||null,this},"add"),h.prototype.remove=n(function(a){if(!m.isString(a))throw TypeError("name must be a string");var s=this.values[a];if(s==null)throw Error("name '"+a+"' does not exist in "+this);return delete this.valuesById[s],delete this.values[a],delete this.comments[a],this.valuesOptions&&delete this.valuesOptions[a],this},"remove"),h.prototype.isReservedId=n(function(a){return p.isReservedId(this.reserved,a)},"isReservedId"),h.prototype.isReservedName=n(function(a){return p.isReservedName(this.reserved,a)},"isReservedName"),_enum}g(require_enum,"require_enum");var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1;var w=Object.defineProperty,n=g((s,i)=>w(s,"name",{value:i,configurable:!0}),"o");encoder_1=a;var y=require_enum(),p=requireTypes(),m=requireUtil();function h(s,i,o,e){return i.delimited?s("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",o,e,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):s("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",o,e,(i.id<<3|2)>>>0)}g(h,"genTypePartial"),n(h,"genTypePartial");function a(s){for(var i=m.codegen(["m","w"],s.name+"$encode")("if(!w)")("w=Writer.create()"),c,o,e=s.fieldsArray.slice().sort(m.compareFieldsById),c=0;c<e.length;++c){var l=e[c].resolve(),f=s._fieldsArray.indexOf(l),d=l.resolvedType instanceof y?"int32":l.type,v=p.basic[d];o="m"+m.safeProp(l.name),l.map?(i("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|p.mapKey[l.keyType],l.keyType),v===void 0?i("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",f,o):i(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|v,d,o),i("}")("}")):l.repeated?(i("if(%s!=null&&%s.length){",o,o),l.packed&&p.packed[d]!==void 0?i("w.uint32(%i).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",d,o)("w.ldelim()"):(i("for(var i=0;i<%s.length;++i)",o),v===void 0?h(i,l,f,o+"[i]"):i("w.uint32(%i).%s(%s[i])",(l.id<<3|v)>>>0,d,o)),i("}")):(l.optional&&i("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,l.name),v===void 0?h(i,l,f,o):i("w.uint32(%i).%s(%s)",(l.id<<3|v)>>>0,d,o))}return i("return w")}return g(a,"encoder"),n(a,"encoder"),encoder_1}g(requireEncoder,"requireEncoder");var hasRequiredIndexLight;function requireIndexLight(){if(hasRequiredIndexLight)return indexLight.exports;hasRequiredIndexLight=1;var w=Object.defineProperty,n=g((h,a)=>w(h,"name",{value:a,configurable:!0}),"i"),y=indexLight.exports=requireIndexMinimal();y.build="light";function p(h,a,s){return typeof a=="function"?(s=a,a=new y.Root):a||(a=new y.Root),a.load(h,s)}g(p,"load"),n(p,"load"),y.load=p;function m(h,a){return a||(a=new y.Root),a.loadSync(h)}return g(m,"loadSync"),n(m,"loadSync"),y.loadSync=m,y.encoder=requireEncoder(),y.decoder=requireDecoder(),y.verifier=requireVerifier(),y.converter=requireConverter(),y.ReflectionObject=requireObject(),y.Namespace=requireNamespace(),y.Root=requireRoot(),y.Enum=require_enum(),y.Type=requireType(),y.Field=requireField(),y.OneOf=requireOneof(),y.MapField=requireMapfield(),y.Service=requireService(),y.Method=requireMethod(),y.Message=requireMessage(),y.wrappers=requireWrappers(),y.types=requireTypes(),y.util=requireUtil(),y.ReflectionObject._configure(y.Root),y.Namespace._configure(y.Type,y.Service,y.Enum),y.Root._configure(y.Type),y.Field._configure(y.Type),indexLight.exports}g(requireIndexLight,"requireIndexLight");var tokenize_1,hasRequiredTokenize;function requireTokenize(){if(hasRequiredTokenize)return tokenize_1;hasRequiredTokenize=1;var w=Object.defineProperty,n=g((f,d)=>w(f,"name",{value:d,configurable:!0}),"l");tokenize_1=l;var y=/[\s{}=;:[\],'"()<>]/g,p=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,m=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,h=/^ *[*/]+ */,a=/^\s*\*?\/*/,s=/\n/g,i=/\s/,o=/\\(.?)/g,e={0:"\0",r:"\r",n:`
|
|
5
|
+
`,t:" "};function c(f){return f.replace(o,function(d,v){switch(v){case"\\":case"":return v;default:return e[v]||""}})}g(c,"unescape"),n(c,"unescape"),l.unescape=c;function l(f,d){f=f.toString();var v=0,_=f.length,j=1,O=0,b={},q=[],S=null;function x(L){return Error("illegal "+L+" (line "+j+")")}g(x,"k"),n(x,"illegal");function I(){var L=S==="'"?m:p;L.lastIndex=v-1;var U=L.exec(f);if(!U)throw x("string");return v=L.lastIndex,N(S),S=null,c(U[1])}g(I,"D"),n(I,"readString");function V(L){return f.charAt(L)}g(V,"f"),n(V,"charAt");function K(L,U,D){var H={type:f.charAt(L++),lineEmpty:!1,leading:D},Z;d?Z=2:Z=3;var M=L-Z,X;do if(--M<0||(X=f.charAt(M))===`
|
|
6
|
+
`){H.lineEmpty=!0;break}while(X===" "||X===" ");for(var re=f.substring(L,U).split(s),ee=0;ee<re.length;++ee)re[ee]=re[ee].replace(d?a:h,"").trim();H.text=re.join(`
|
|
7
|
+
`).trim(),b[j]=H,O=j}g(K,"x"),n(K,"setComment");function Q(L){var U=C(L),D=f.substring(L,U),H=/^\s*\/\//.test(D);return H}g(Q,"S"),n(Q,"isDoubleSlashCommentLine");function C(L){for(var U=L;U<_&&V(U)!==`
|
|
8
|
+
`;)U++;return U}g(C,"b"),n(C,"findEndOfLine");function J(){if(q.length>0)return q.shift();if(S)return I();var L,U,D,H,Z,M=v===0;do{if(v===_)return null;for(L=!1;i.test(D=V(v));)if(D===`
|
|
9
|
+
`&&(M=!0,++j),++v===_)return null;if(V(v)==="/"){if(++v===_)throw x("comment");if(V(v)==="/")if(d){if(H=v,Z=!1,Q(v-1)){Z=!0;do if(v=C(v),v===_||(v++,!M))break;while(Q(v))}else v=Math.min(_,C(v)+1);Z&&(K(H,v,M),M=!0),j++,L=!0}else{for(Z=V(H=v+1)==="/";V(++v)!==`
|
|
10
|
+
`;)if(v===_)return null;++v,Z&&(K(H,v-1,M),M=!0),++j,L=!0}else if((D=V(v))==="*"){H=v+1,Z=d||V(H)==="*";do{if(D===`
|
|
11
|
+
`&&++j,++v===_)throw x("comment");U=D,D=V(v)}while(U!=="*"||D!=="/");++v,Z&&(K(H,v-2,M),M=!0),L=!0}else return"/"}}while(L);var X=v;y.lastIndex=0;var re=y.test(V(X++));if(!re)for(;X<_&&!y.test(V(X));)++X;var ee=f.substring(v,v=X);return(ee==='"'||ee==="'")&&(S=ee),ee}g(J,"y"),n(J,"next");function N(L){q.push(L)}g(N,"R"),n(N,"push");function G(){if(!q.length){var L=J();if(L===null)return null;N(L)}return q[0]}g(G,"E"),n(G,"peek");function W(L,U){var D=G(),H=D===L;if(H)return J(),!0;if(!U)throw x("token '"+D+"', '"+L+"' expected");return!1}g(W,"O"),n(W,"skip");function T(L){var U=null,D;return L===void 0?(D=b[j-1],delete b[j-1],D&&(d||D.type==="*"||D.lineEmpty)&&(U=D.leading?D.text:null)):(O<L&&G(),D=b[L],delete b[L],D&&!D.lineEmpty&&(d||D.type==="/")&&(U=D.leading?null:D.text)),U}return g(T,"C"),n(T,"cmnt"),Object.defineProperty({next:J,peek:G,push:N,skip:W,cmnt:T},"line",{get:n(function(){return j},"get")})}return g(l,"tokenize"),n(l,"tokenize"),tokenize_1}g(requireTokenize,"requireTokenize");var parse_1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1;var w=Object.defineProperty,n=g((V,K)=>w(V,"name",{value:K,configurable:!0}),"u");parse_1=I,I.filename=null,I.defaults={keepCase:!1};var y=requireTokenize(),p=requireRoot(),m=requireType(),h=requireField(),a=requireMapfield(),s=requireOneof(),i=require_enum(),o=requireService(),e=requireMethod(),c=requireObject(),l=requireTypes(),f=requireUtil(),d=/^[1-9][0-9]*$/,v=/^-?[1-9][0-9]*$/,_=/^0[x][0-9a-fA-F]+$/,j=/^-?0[x][0-9a-fA-F]+$/,O=/^0[0-7]+$/,b=/^-?0[0-7]+$/,q=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,S=/^[a-zA-Z_][a-zA-Z_0-9]*$/,x=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function I(V,K,Q){K instanceof p||(Q=K,K=new p),Q||(Q=I.defaults);var C=Q.preferTrailingComment||!1,J=y(V,Q.alternateCommentMode||!1),N=J.next,G=J.push,W=J.peek,T=J.skip,L=J.cmnt,U=!0,D,H,Z,M="proto2",X=K,re=[],ee={},ve=Q.keepCase?function(k){return k}:f.camelCase;function be(){re.forEach(k=>{k._edition=M,Object.keys(ee).forEach(R=>{k.getOption(R)===void 0&&k.setOption(R,ee[R],!0)})})}g(be,"X"),n(be,"resolveFileFeatures");function F(k,R,E){var A=I.filename;return E||(I.filename=null),Error("illegal "+(R||"token")+" '"+k+"' ("+(A?A+", ":"")+"line "+J.line+")")}g(F,"n"),n(F,"illegal");function oe(){var k=[],R;do{if((R=N())!=='"'&&R!=="'")throw F(R);k.push(N()),T(R),R=W()}while(R==='"'||R==="'");return k.join("")}g(oe,"q"),n(oe,"readString");function ce(k){var R=N();switch(R){case"'":case'"':return G(R),oe();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return _e(R,!0)}catch{if(k&&x.test(R))return R;throw F(R,"value")}}g(ce,"V"),n(ce,"readValue");function ae(k,R){var E,A;do if(R&&((E=W())==='"'||E==="'")){var B=oe();if(k.push(B),M>=2023)throw F(B,"id")}else try{k.push([A=se(N()),T("to",!0)?se(N()):A])}catch(z){if(R&&x.test(E)&&M>=2023)k.push(E);else throw z}while(T(",",!0));var P={options:void 0};P.setOption=function(z,$){this.options===void 0&&(this.options={}),this.options[z]=$},ie(P,n(function(z){if(z==="option")ne(P,z),T(";");else throw F(z)},"parseRange_block"),n(function(){le(P)},"parseRange_line"))}g(ae,"A"),n(ae,"readRanges");function _e(k,R){var E=1;switch(k.charAt(0)==="-"&&(E=-1,k=k.substring(1)),k){case"inf":case"INF":case"Inf":return E*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(d.test(k))return E*parseInt(k,10);if(_.test(k))return E*parseInt(k,16);if(O.test(k))return E*parseInt(k,8);if(q.test(k))return E*parseFloat(k);throw F(k,"number",R)}g(_e,"D"),n(_e,"parseNumber");function se(k,R){switch(k){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!R&&k.charAt(0)==="-")throw F(k,"id");if(v.test(k))return parseInt(k,10);if(j.test(k))return parseInt(k,16);if(b.test(k))return parseInt(k,8);throw F(k,"id")}g(se,"E"),n(se,"parseId");function Oe(){if(D!==void 0)throw F("package");if(D=N(),!x.test(D))throw F(D,"name");X=X.define(D),T(";")}g(Oe,"H"),n(Oe,"parsePackage");function we(){var k=W(),R;switch(k){case"option":if(M<"2024")throw F("option");N(),oe(),T(";");return;case"weak":R=Z||(Z=[]),N();break;case"public":N();default:R=H||(H=[]);break}k=oe(),T(";"),R.push(k)}g(we,"J"),n(we,"parseImport");function qe(){if(T("="),M=oe(),M<2023)throw F(M,"syntax");T(";")}g(qe,"Q"),n(qe,"parseSyntax");function Re(){if(T("="),M=oe(),!["2023","2024"].includes(M))throw F(M,"edition");T(";")}g(Re,"Y"),n(Re,"parseEdition");function ue(k,R){switch(R){case"option":return ne(k,R),T(";"),!0;case"message":return fe(k,R),!0;case"enum":return ye(k,R),!0;case"export":case"local":return M<"2024"||(R=N(),R==="export"||R==="local")||R!=="message"&&R!=="enum"?!1:ue(k,R);case"service":return Ne(k,R),!0;case"extend":return xe(k,R),!0}return!1}g(ue,"N"),n(ue,"parseCommon");function ie(k,R,E){var A=J.line;if(k&&(typeof k.comment!="string"&&(k.comment=L()),k.filename=I.filename),T("{",!0)){for(var B;(B=N())!=="}";)R(B);T(";",!0)}else E&&E(),T(";"),k&&(typeof k.comment!="string"||C)&&(k.comment=L(A)||k.comment)}g(ie,"w"),n(ie,"ifBlock");function fe(k,R){if(!S.test(R=N()))throw F(R,"type name");var E=new m(R);ie(E,n(function(A){if(!ue(E,A))switch(A){case"map":ke(E);break;case"required":if(M!=="proto2")throw F(A);case"repeated":te(E,A);break;case"optional":if(M==="proto3")te(E,"proto3_optional");else{if(M!=="proto2")throw F(A);te(E,"optional")}break;case"oneof":Ee(E,A);break;case"extensions":ae(E.extensions||(E.extensions=[]));break;case"reserved":ae(E.reserved||(E.reserved=[]),!0);break;default:if(M==="proto2"||!x.test(A))throw F(A);G(A),te(E,"optional");break}},"parseType_block")),k.add(E),k===X&&re.push(E)}g(fe,"T"),n(fe,"parseType");function te(k,R,E){var A=N();if(A==="group"){je(k,R);return}for(;A.endsWith(".")||W().startsWith(".");)A+=N();if(!x.test(A))throw F(A,"type");var B=N();if(!S.test(B))throw F(B,"name");B=ve(B),T("=");var P=new h(B,se(N()),A,R,E);if(ie(P,n(function($){if($==="option")ne(P,$),T(";");else throw F($)},"parseField_block"),n(function(){le(P)},"parseField_line")),R==="proto3_optional"){var z=new s("_"+B);P.setOption("proto3_optional",!0),z.add(P),k.add(z)}else k.add(P);k===X&&re.push(P)}g(te,"m"),n(te,"parseField");function je(k,R){if(M>=2023)throw F("group");var E=N();if(!S.test(E))throw F(E,"name");var A=f.lcFirst(E);E===A&&(E=f.ucFirst(E)),T("=");var B=se(N()),P=new m(E);P.group=!0;var z=new h(A,B,E,R);z.filename=I.filename,ie(P,n(function($){switch($){case"option":ne(P,$),T(";");break;case"required":case"repeated":te(P,$);break;case"optional":M==="proto3"?te(P,"proto3_optional"):te(P,"optional");break;case"message":fe(P,$);break;case"enum":ye(P,$);break;case"reserved":ae(P.reserved||(P.reserved=[]),!0);break;case"export":case"local":if(M<"2024")throw F($);switch($=N(),$){case"message":fe(P,$);break;case"enum":fe(P,$);break;default:throw F($)}break;default:throw F($)}},"parseGroup_block")),k.add(P).add(z)}g(je,"j"),n(je,"parseGroup");function ke(k){T("<");var R=N();if(l.mapKey[R]===void 0)throw F(R,"type");T(",");var E=N();if(!x.test(E))throw F(E,"type");T(">");var A=N();if(!S.test(A))throw F(A,"name");T("=");var B=new a(ve(A),se(N()),R,E);ie(B,n(function(P){if(P==="option")ne(B,P),T(";");else throw F(P)},"parseMapField_block"),n(function(){le(B)},"parseMapField_line")),k.add(B)}g(ke,"k"),n(ke,"parseMapField");function Ee(k,R){if(!S.test(R=N()))throw F(R,"name");var E=new s(ve(R));ie(E,n(function(A){A==="option"?(ne(E,A),T(";")):(G(A),te(E,"optional"))},"parseOneOf_block")),k.add(E)}g(Ee,"ee"),n(Ee,"parseOneOf");function ye(k,R){if(!S.test(R=N()))throw F(R,"name");var E=new i(R);ie(E,n(function(A){switch(A){case"option":ne(E,A),T(";");break;case"reserved":ae(E.reserved||(E.reserved=[]),!0),E.reserved===void 0&&(E.reserved=[]);break;default:Ae(E,A)}},"parseEnum_block")),k.add(E),k===X&&re.push(E)}g(ye,"B"),n(ye,"parseEnum");function Ae(k,R){if(!S.test(R))throw F(R,"name");T("=");var E=se(N(),!0),A={options:void 0};A.getOption=function(B){return this.options[B]},A.setOption=function(B,P){c.prototype.setOption.call(A,B,P)},A.setParsedOption=function(){},ie(A,n(function(B){if(B==="option")ne(A,B),T(";");else throw F(B)},"parseEnumValue_block"),n(function(){le(A)},"parseEnumValue_line")),k.add(R,E,A.comment,A.parsedOptions||A.options)}g(Ae,"re"),n(Ae,"parseEnumValue");function ne(k,R){var E,A,B=!0;for(R==="option"&&(R=N());R!=="=";){if(R==="("){var P=N();T(")"),R="("+P+")"}if(B){if(B=!1,R.includes(".")&&!R.includes("(")){var z=R.split(".");E=z[0]+".",R=z[1];continue}E=R}else A=A?A+=R:R;R=N()}var $=A?E.concat(A):E,de=me(k,$);A=A&&A[0]==="."?A.slice(1):A,E=E&&E[E.length-1]==="."?E.slice(0,-1):E,Se(k,E,de,A)}g(ne,"v"),n(ne,"parseOption");function me(k,R){if(T("{",!0)){for(var E={};!T("}",!0);){if(!S.test(Y=N()))throw F(Y,"name");if(Y===null)throw F(Y,"end of input");var A,B=Y;if(T(":",!0),W()==="{")A=me(k,R+"."+Y);else if(W()==="["){A=[];var P;if(T("[",!0)){do P=ce(!0),A.push(P);while(T(",",!0));T("]"),typeof P<"u"&&pe(k,R+"."+Y,P)}}else A=ce(!0),pe(k,R+"."+Y,A);var z=E[B];z&&(A=[].concat(z).concat(A)),E[B]=A,T(",",!0),T(";",!0)}return E}var $=ce(!0);return pe(k,R,$),$}g(me,"K"),n(me,"parseOptionValue");function pe(k,R,E){if(X===k&&/^features\./.test(R)){ee[R]=E;return}k.setOption&&k.setOption(R,E)}g(pe,"G"),n(pe,"setOption");function Se(k,R,E,A){k.setParsedOption&&k.setParsedOption(R,E,A)}g(Se,"ie"),n(Se,"setParsedOption");function le(k){if(T("[",!0)){do ne(k,"option");while(T(",",!0));T("]")}return k}g(le,"M"),n(le,"parseInlineOptions");function Ne(k,R){if(!S.test(R=N()))throw F(R,"service name");var E=new o(R);ie(E,n(function(A){if(!ue(E,A))if(A==="rpc")Te(E,A);else throw F(A)},"parseService_block")),k.add(E),k===X&&re.push(E)}g(Ne,"te"),n(Ne,"parseService");function Te(k,R){var E=L(),A=R;if(!S.test(R=N()))throw F(R,"name");var B=R,P,z,$,de;if(T("("),T("stream",!0)&&(z=!0),!x.test(R=N())||(P=R,T(")"),T("returns"),T("("),T("stream",!0)&&(de=!0),!x.test(R=N())))throw F(R);$=R,T(")");var he=new e(B,A,P,$,z,de);he.comment=E,ie(he,n(function(ge){if(ge==="option")ne(he,ge),T(";");else throw F(ge)},"parseMethod_block")),k.add(he)}g(Te,"ae"),n(Te,"parseMethod");function xe(k,R){if(!x.test(R=N()))throw F(R,"reference");var E=R;ie(null,n(function(A){switch(A){case"required":case"repeated":te(k,A,E);break;case"optional":M==="proto3"?te(k,"proto3_optional",E):te(k,"optional",E);break;default:if(M==="proto2"||!x.test(A))throw F(A);G(A),te(k,"optional",E);break}},"parseExtension_block"))}g(xe,"se"),n(xe,"parseExtension");for(var Y;(Y=N())!==null;)switch(Y){case"package":if(!U)throw F(Y);Oe();break;case"import":if(!U)throw F(Y);we();break;case"syntax":if(!U)throw F(Y);qe();break;case"edition":if(!U)throw F(Y);Re();break;case"option":ne(X,Y),T(";",!0);break;default:if(ue(X,Y)){U=!1;continue}throw F(Y)}return be(),I.filename=null,{package:D,imports:H,weakImports:Z,root:K}}return g(I,"parse"),n(I,"parse"),parse_1}g(requireParse,"requireParse");var common_1,hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common_1;hasRequiredCommon=1;var w=Object.defineProperty,n=g((h,a)=>w(h,"name",{value:a,configurable:!0}),"t");common_1=p;var y=/\/|\./;function p(h,a){y.test(h)||(h="google/protobuf/"+h+".proto",a={nested:{google:{nested:{protobuf:{nested:a}}}}}),p[h]=a}g(p,"common"),n(p,"common"),p("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var m;return p("duration",{Duration:m={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),p("timestamp",{Timestamp:m}),p("empty",{Empty:{fields:{}}}),p("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),p("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),p("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),p.get=n(function(h){return p[h]||null},"get"),common_1}g(requireCommon,"requireCommon");var hasRequiredSrc;function requireSrc(){if(hasRequiredSrc)return src.exports;hasRequiredSrc=1;var w=src.exports=requireIndexLight();return w.build="full",w.tokenize=requireTokenize(),w.parse=requireParse(),w.common=requireCommon(),w.Root._configure(w.Type,w.parse,w.common),src.exports}g(requireSrc,"requireSrc");var protobufjs,hasRequiredProtobufjs;function requireProtobufjs(){return hasRequiredProtobufjs||(hasRequiredProtobufjs=1,protobufjs=requireSrc()),protobufjs}g(requireProtobufjs,"requireProtobufjs");var protobufjsExports=requireProtobufjs();const index=getDefaultExportFromCjs(protobufjsExports),index$1=_mergeNamespaces({__proto__:null,default:index},[protobufjsExports]);export{index$1 as i};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var M=Object.defineProperty;var v=(s,t)=>M(s,"name",{value:t,configurable:!0});import{createRequire as I}from"node:module";import{parseBytes as q,formatBytes as W}from"@visulima/humanizer";import{dirname as N,join as n,resolve as E}from"@visulima/path";import{a as G,b as K}from"./archive-CDfGy5Lm.js";import{O as y}from"./utils-BH2W5Wml.js";import{acEntryPath as x,tmpDirectory as A,taskHashIndexPath as B,V2_ROOT as L}from"./V2_ROOT-injxWBrl.js";import{fetchBlobToFile as Q,containsBlob as U,putBlobFromFile as V}from"./containsBlob-DBWgvkM_.js";import{resolveOutputs as X}from"./resolveOutputs-BBjdaraf.js";const P=I(import.meta.url),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,S=v(s=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[t,e]=g.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return g.getBuiltinModule(s)}return P(s)},"__cjs_getBuiltinModule"),{createWriteStream:R}=S("node:fs"),{mkdir:m,writeFile:f,rename:d,rm:w,readFile:p,utimes:J,readdir:T,stat:b,cp:$}=S("node:fs/promises"),{pipeline:H}=S("node:stream/promises");var Y=Object.defineProperty,k=v((s,t)=>Y(s,"name",{value:t,configurable:!0}),"s");const Z=k(async(s,t,e)=>{const a=x(s,t),r=A(s),i=`${r}/${y()}`;await m(r,{recursive:!0}),await m(N(a),{recursive:!0});const c=`${JSON.stringify(e,null,2)}
|
|
2
|
+
`;await f(i,c);try{await d(i,a)}catch(o){throw await w(i,{force:!0}).catch(()=>{}),o}},"writeActionEntry"),tt=k(async(s,t)=>{const e=x(s,t);try{const a=await p(e,"utf8"),r=JSON.parse(a),i=new Date;return await J(e,i,i).catch(()=>{}),r}catch{return null}},"readActionEntry"),et=k(async(s,t,e)=>{const a=B(s,t),r=A(s),i=`${r}/${y()}`;await m(r,{recursive:!0}),await m(N(a),{recursive:!0}),await f(i,e);try{await d(i,a)}catch(c){throw await w(i,{force:!0}).catch(()=>{}),c}},"writeTaskHashIndex"),rt=k(async(s,t)=>{try{const e=(await p(B(s,t),"utf8")).trim();return e.length>0?e:null}catch{return null}},"readTaskHashIndex");var at=Object.defineProperty,l=v((s,t)=>at(s,"name",{value:t,configurable:!0}),"h");const st=10080*60*1e3,it=".task-runner-cache",ct=l(s=>{if(s.includes("\0"))throw new Error("cacheNamespace: null bytes are not allowed.");if(s.includes("/")||s.includes("\\"))throw new Error(`cacheNamespace: path separators are not allowed (received ${JSON.stringify(s)}).`);if(s==="."||s==="..")throw new Error(`cacheNamespace: "${s}" would escape the cache subtree.`)},"assertSafeNamespace"),O=l(async s=>{try{await w(s,{force:!0,recursive:!0})}catch{}},"removeEntry"),C=l(async s=>{let t=0;try{const e=await T(s,{withFileTypes:!0});for(const a of e){const r=n(s,a.name);if(a.isDirectory())t+=await C(r);else if(a.isFile()){const i=await b(r);t+=i.size}}}catch{}return t},"getDirectorySize"),nt=l(s=>{const t=q(s.trim());if(Number.isNaN(t))throw new TypeError(`Invalid cache size format: "${s}". Expected format like "500MB" or "1GB".`);return t},"parseCacheSize"),gt=l(s=>W(s,{decimals:1,space:!1}),"formatCacheSize");class Nt{static{v(this,"K")}static{l(this,"Cache")}#e;#t;#s;#r;#a=Promise.resolve();constructor(t){this.#e=t.workspaceRoot;const e=t.cacheDirectory??n(t.workspaceRoot,it);t.cacheNamespace!==void 0&&t.cacheNamespace.length>0&&ct(t.cacheNamespace),this.#t=t.cacheNamespace&&t.cacheNamespace.length>0?n(e,"ns",t.cacheNamespace):e,this.#s=t.maxCacheAge??st,this.#r=t.maxCacheSize?nt(t.maxCacheSize):void 0}get cacheDirectory(){return this.#t}get casRoot(){return this.#t}async getActionResult(t){return tt(this.#t,t.hash)}async resolveActionDigestForTaskHash(t){return rt(this.#t,t)}async putActionResult(t,e,a,r){await this.#i(r),await Z(this.#t,e.hash,a),await et(this.#t,t,e.hash)}async materializeOutputs(t,e){for(const a of t.outputFiles){const r=E(e,a.path);if(!await Q(this.#t,a.digest,r))return!1}return!0}async#i(t){for(const e of t){if(await U(this.#t,e.digest))continue;const a=n(this.#t,L,"tmp",`.put-${y()}`);await m(N(a),{recursive:!0});const r=await e.open();await H(r,R(a)),await V(this.#t,e.digest,a),await w(a,{force:!0}).catch(()=>{})}}async get(t){const e=n(this.#t,t);try{await p(n(e,".commit"));const a=await p(n(e,"code"),"utf8"),r=Number.parseInt(a.trim(),10);if(Number.isNaN(r))return;let i="";try{i=await p(n(e,"terminalOutput"),"utf8")}catch{}let c;try{const o=await p(n(e,"fingerprint.json"),"utf8");c=JSON.parse(o)}catch{}return{code:r,fingerprint:c,hash:t,terminalOutput:i}}catch{return}}async put(t,e,a,r,i,c){const o=n(this.#t,t),u=n(this.#t,`.tmp-${t}-${y()}`);try{await m(u,{recursive:!0});const h=[f(n(u,"code"),String(r)),f(n(u,"terminalOutput"),e),this.#n(u,a,c)];i&&h.push(f(n(u,"fingerprint.json"),JSON.stringify(i))),await Promise.all(h),await f(n(u,".commit"),""),await O(o),await d(u,o)}catch{await O(u)}}async restoreOutputs(t,e,a){const r=n(this.#t,t);return ut(r,this.#e,a)}async getByTaskId(t){const e=n(this.#t,".task-index.json");try{const a=await p(e,"utf8"),r=JSON.parse(a)[t];return r?this.get(r):void 0}catch{return}}async setTaskIndex(t,e){return this.#a=this.#a.then(()=>this.#c(t,e)).catch(()=>{}),this.#a}async#c(t,e){const a=n(this.#t,".task-index.json"),r=n(this.#t,`.task-index-${y()}.tmp`);let i={};try{const c=await p(a,"utf8");i=JSON.parse(c)}catch{}i[t]=e,await m(this.#t,{recursive:!0}),await f(r,JSON.stringify(i));try{await d(r,a)}catch{await f(a,JSON.stringify(i)),await w(r,{force:!0})}}async removeOldEntries(){try{const t=await T(this.#t),e=Date.now(),a=[];for(const r of t){if(r.startsWith("."))continue;const i=n(this.#t,r);try{const c=await b(i);if(e-c.mtimeMs>this.#s)await O(i);else{const o=await C(i);a.push({mtimeMs:c.mtimeMs,name:r,path:i,size:o})}}catch{}}if(this.#r!==void 0){const r=a.toSorted((c,o)=>c.mtimeMs-o.mtimeMs);let i=0;for(const c of r)i+=c.size;for(const c of r){if(i<=this.#r)break;await O(c.path),i-=c.size}}}catch{}}async clear(){try{await w(this.#t,{force:!0,recursive:!0})}catch{}}async#n(t,e,a){await ot(this.#e,t,e,a)}}const z="outputs.tar.br",ot=l(async(s,t,e,a)=>{if(e.length===0)return;const r=await X(s,e,a);if(r.length===0)return;const i=n(t,`.outputs-stage-${y()}`),c=n(t,z);try{if(await m(i,{recursive:!0}),(await D(j,r,async o=>{const u=E(s,o),h=n(i,o);try{return await m(N(h),{recursive:!0}),await $(u,h,{preserveTimestamps:!0,recursive:!0}),!0}catch{return!1}})).filter(Boolean).length===0)return;await K(i,c)}finally{await w(i,{force:!0,recursive:!0}).catch(()=>{})}},"archiveOutputsCompressed"),j=16,D=l(async(s,t,e)=>{const a=Array.from({length:t.length});let r=0;const i=l(async()=>{for(;r<t.length;){const o=r;r+=1,a[o]=await e(t[o],o)}},"worker"),c=Array.from({length:Math.min(s,t.length)},()=>i());return await Promise.all(c),a},"runBounded"),ut=l(async(s,t,e)=>{const a=n(s,z);try{await b(a)}catch{return!0}const r=n(s,`.restore-${y()}`),i=[],c=e?.preserveMtime??!0;try{await m(r,{recursive:!0}),await G(a,r,e);const o=(await T(r)).sort();return await D(j,o,async u=>{const h=E(t,u),F=n(r,u);await m(N(h),{recursive:!0});try{await b(h);const _=`${h}.pre-restore-${y()}`;await d(h,_),i.push({backup:_,original:h})}catch{}await $(F,h,{preserveTimestamps:c,recursive:!0})}),await Promise.all(i.map(({backup:u})=>w(u,{force:!0,recursive:!0}).catch(()=>{}))),!0}catch{for(const{backup:o,original:u}of i)await w(u,{force:!0,recursive:!0}).catch(()=>{}),await d(o,u).catch(()=>{});return!1}finally{await w(r,{force:!0,recursive:!0}).catch(()=>{})}},"restoreOutputsCompressed");export{Nt as Cache,it as DEFAULT_CACHE_DIRECTORY_NAME,gt as formatCacheSize,nt as parseCacheSize};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r=Object.defineProperty;var n=(o,s)=>r(o,"name",{value:s,configurable:!0});var i=Object.defineProperty,a=n((o,s)=>i(o,"name",{value:s,configurable:!0}),"i");const l=a(o=>{switch(o){case"failure":return"[failure]";case"local-cache":case"local-cache-kept-existing":case"remote-cache":return"[cache]";case"skipped":return"[skipped]";case"success":return"[success]";default:return"[unknown]"}},"getStatusIcon");class f{static{n(this,"l")}static{a(this,"CompositeLifeCycle")}#s;constructor(s){this.#s=s}startCommand(){for(const s of this.#s)s.startCommand?.()}endCommand(){for(const s of this.#s)s.endCommand?.()}scheduleTask(s){for(const t of this.#s)t.scheduleTask?.(s)}startTasks(s){for(const t of this.#s)t.startTasks?.(s)}endTasks(s){for(const t of this.#s)t.endTasks?.(s)}printTaskTerminalOutput(s,t,e){for(const c of this.#s)c.printTaskTerminalOutput?.(s,t,e)}printCacheMiss(s,t){for(const e of this.#s)e.printCacheMiss?.(s,t)}onTaskStdout(s,t){for(const e of this.#s)e.onTaskStdout?.(s,t)}onTaskStderr(s,t){for(const e of this.#s)e.onTaskStderr?.(s,t)}}class d{static{n(this,"r")}static{a(this,"ConsoleLifeCycle")}#s;constructor(s=!1){this.#s=s}startCommand(){this.#s&&console.log("[task-runner] Starting command execution")}endCommand(){this.#s&&console.log("[task-runner] Command execution complete")}scheduleTask(s){this.#s&&console.log(`[task-runner] Scheduled: ${s.id}`)}startTasks(s){for(const t of s)console.log(`> ${t.id}`)}endTasks(s){for(const t of s){const e=t.startTime&&t.endTime?` (${t.endTime-t.startTime}ms)`:"",c=l(t.status);console.log(`${c} ${t.task.id}${e}`)}}printTaskTerminalOutput(s,t,e){e.trim()&&console.log(e)}printCacheMiss(s,t){this.#s&&console.log(`[task-runner] ${s.id}: ${t}`)}}class m{static{n(this,"u")}static{a(this,"EmptyLifeCycle")}}export{f as CompositeLifeCycle,d as ConsoleLifeCycle,m as EmptyLifeCycle};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var _=Object.defineProperty;var d=(a,t)=>_(a,"name",{value:t,configurable:!0});import{createRequire as v}from"node:module";import{resolve as m,join as S}from"@visulima/path";import{O as x}from"./utils-BH2W5Wml.js";import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
+
const F=v(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=d(a=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[t,e]=p.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return p.getBuiltinModule(a)}return F(a)},"__cjs_getBuiltinModule"),{exec:y,execFileSync:T}=g("node:child_process"),{mkdir:b,readFile:O,rm:W}=g("node:fs/promises"),{platform:j}=g("node:os");var A=Object.defineProperty,f=d((a,t)=>A(a,"name",{value:t,configurable:!0}),"d");let l;const P=f(()=>{if(l===void 0)try{T("strace",["-V"],{stdio:"ignore"}),l=!0}catch{l=!1}return l},"isStraceAvailable"),R=[{kind:"open",pattern:/openat\(AT_FDCWD,\s*"([^"]+)"/},{kind:"open",pattern:/^(?:\d+\s+)?open\("([^"]+)"/},{kind:"creat",pattern:/(?:^|\s)creat\("([^"]+)"/},{kind:"stat",pattern:/(?:stat|lstat|newfstatat)\((?:AT_FDCWD,\s*)?"([^"]+)"/},{kind:"stat",pattern:/access\("([^"]+)"/},{kind:"getdents",pattern:/getdents(?:64)?\(\d+/}],D=f(a=>/O_WRONLY|O_RDWR|O_CREAT|O_TRUNC|O_APPEND/.test(a)?"write":"read","parseOpenAccessType");class E{static{d(this,"FileAccessTracker")}static{f(this,"FileAccessTracker")}#t;#s;#e=new Set;constructor(t,e){this.#t=m(t),this.#s=e??[/\/proc\//,/\/sys\//,/\/dev\//,/\/tmp\//,/\/etc\//,/\.so(\.\d+)*$/,/node_modules\/.package-lock\.json$/]}isSupported(){return j()==="linux"&&P()}async track(t,e={}){return this.isSupported()?this.#a(t,e):this.#c(t,e)}async#a(t,e){const c=S(this.#t,"node_modules",".cache","task-runner");await b(c,{recursive:!0});const r=S(c,`strace-${x()}.log`),s=`strace -f -qq -e trace=open,openat,creat,stat,lstat,newfstatat,access,getdents,getdents64,unlink,unlinkat,rename,renameat,renameat2 -o ${r} -- ${t}`;return new Promise(i=>{const n=y(s,{cwd:e.cwd??this.#t,env:{...process.env,...e.env},maxBuffer:52428800},async(h,o,u)=>{this.#e.delete(n);let w=[];try{const k=await O(r,"utf8");w=this.#n(k,e.cwd??this.#t)}catch{}await W(r,{force:!0}).catch(()=>{}),i({accesses:w,code:n.exitCode??1,output:o+u})});this.#e.add(n)})}#n(t,e){const c=[],r=new Set;for(const s of t.split(`
|
|
4
|
+
`)){const i=this.#i(s,e);if(!i)continue;const n=`${i.type}:${i.path}`;r.has(n)||(r.add(n),c.push(i))}return c}#i(t,e){const c=t.includes("ENOENT");for(const{kind:s,pattern:i}of R){const n=i.exec(t);if(!n)continue;if(s==="getdents")return;const h=n[1];if(!h)continue;let o=h;if(o.startsWith("/")||(o=m(e,o)),this.#r(o)||!o.startsWith(this.#t))return;if(c)return{path:o,type:"missing"};const u=s==="open"?D(t):s==="creat"?"write":"stat";return{path:o,type:u}}const r=/(?:^|\s)(?:unlink|unlinkat|rename|renameat|renameat2)\((?:AT_FDCWD,\s*)?"([^"]+)"/.exec(t);if(r?.[1]){let s=r[1];return s.startsWith("/")||(s=m(e,s)),this.#r(s)||!s.startsWith(this.#t)?void 0:{path:s,type:"write"}}}#r(t){return this.#s.some(e=>e.test(t))}killAll(){for(const t of this.#e)try{t.kill("SIGTERM")}catch{}this.#e.clear()}async#c(t,e){return new Promise(c=>{const r=y(t,{cwd:e.cwd??this.#t,env:{...process.env,...e.env},maxBuffer:52428800},(s,i,n)=>{this.#e.delete(r),c({accesses:[],code:r.exitCode??1,output:i+n})});this.#e.add(r)})}}const B=f(a=>String.raw`
|
|
5
|
+
import { createWriteStream } from "node:fs";
|
|
6
|
+
|
|
7
|
+
const fs = require("node:fs");
|
|
8
|
+
const fsp = require("node:fs/promises");
|
|
9
|
+
const logStream = createWriteStream(${JSON.stringify(a)}, { flags: "a" });
|
|
10
|
+
const log = (type, path) => { logStream.write(JSON.stringify({ type, path }) + "\n"); };
|
|
11
|
+
|
|
12
|
+
// Patch each fs method: save original, replace with logged wrapper
|
|
13
|
+
const patch = (obj, method, type) => {
|
|
14
|
+
const orig = obj[method];
|
|
15
|
+
obj[method] = function(...args) {
|
|
16
|
+
log(type, args[0]?.toString());
|
|
17
|
+
return orig.apply(this, args);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Reads / stats / directory listing
|
|
22
|
+
patch(fs, "readFileSync", "read");
|
|
23
|
+
patch(fs, "statSync", "stat");
|
|
24
|
+
patch(fs, "readdirSync", "readdir");
|
|
25
|
+
patch(fs, "readFile", "read");
|
|
26
|
+
patch(fs, "stat", "stat");
|
|
27
|
+
patch(fs, "readdir", "readdir");
|
|
28
|
+
patch(fsp, "readFile", "read");
|
|
29
|
+
patch(fsp, "stat", "stat");
|
|
30
|
+
patch(fsp, "readdir", "readdir");
|
|
31
|
+
|
|
32
|
+
// Writes and path-mutating ops — needed for self-modifying task detection
|
|
33
|
+
patch(fs, "writeFileSync", "write");
|
|
34
|
+
patch(fs, "appendFileSync", "write");
|
|
35
|
+
patch(fs, "unlinkSync", "write");
|
|
36
|
+
patch(fs, "renameSync", "write");
|
|
37
|
+
patch(fs, "writeFile", "write");
|
|
38
|
+
patch(fs, "appendFile", "write");
|
|
39
|
+
patch(fs, "unlink", "write");
|
|
40
|
+
patch(fs, "rename", "write");
|
|
41
|
+
patch(fsp, "writeFile", "write");
|
|
42
|
+
patch(fsp, "appendFile", "write");
|
|
43
|
+
patch(fsp, "unlink", "write");
|
|
44
|
+
patch(fsp, "rename", "write");
|
|
45
|
+
|
|
46
|
+
process.on("beforeExit", () => { logStream.end(); });
|
|
47
|
+
`,"generatePreloadScript");export{E as FileAccessTracker,B as generatePreloadScript};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var N=Object.defineProperty;var y=(l,e)=>N(l,"name",{value:e,configurable:!0});import{createRequire as J}from"node:module";import{resolve as v,relative as T}from"@visulima/path";import{b,h as $,T as S}from"./utils-BH2W5Wml.js";const P=J(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=y(l=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[e,t]=p.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return p.getBuiltinModule(l)}return P(l)},"__cjs_getBuiltinModule"),{readdir:H,stat:C}=M("node:fs/promises");var q=Object.defineProperty,R=y((l,e)=>q(l,"name",{value:e,configurable:!0}),"k");class j{static{y(this,"FingerprintManager")}static{R(this,"FingerprintManager")}#e;#t=new Map;constructor(e){this.#e=v(e)}async createFingerprint(e,t,r,i,u=[],f=[]){const h={},g=new Set,s={},a=new Set,d=new Set;for(const o of e){const c=T(this.#e,o.path);switch(o.type){case"missing":{g.add(c);break}case"read":case"stat":{if(a.add(c),!h[c]){const m=await this.#r(o.path);m&&(h[c]=m)}break}case"readdir":{if(!s[c])try{const m=await H(o.path);s[c]=m.toSorted()}catch{s[c]=[]}break}case"write":{d.add(c);break}}}const n=[];for(const o of d)a.has(o)&&n.push(o);n.sort();const k=b(`${t}:${JSON.stringify($(r))}`),w={},O=j.#s(u,i),_=new Set(f);for(const[o,c]of Object.entries(O))_.has(o)||(w[o]=b(`${o}=${c??""}`));const F=[...g].toSorted();return{commandHash:k,directoryListings:s,envHashes:w,fileHashes:h,missingFiles:F,...n.length>0?{modifiedInputs:n}:{}}}async validate(e){const t=[],r=Object.entries(e.fileHashes).map(async([s,a])=>{const d=v(this.#e,s),n=await S(d);if(!n)return{detail:s,previousHash:a,type:"file-deleted"};if(n!==a)return{currentHash:n,detail:s,previousHash:a,type:"file-changed"}}),i=e.missingFiles.map(async s=>{const a=v(this.#e,s);try{return await C(a),{detail:s,type:"file-created"}}catch{return}}),u=Object.entries(e.directoryListings).map(async([s,a])=>{const d=v(this.#e,s);try{const n=(await H(d)).toSorted();if(JSON.stringify(a)!==JSON.stringify(n))return{currentHash:JSON.stringify(n),detail:s,previousHash:JSON.stringify(a),type:"directory-changed"}}catch{return{detail:s,type:"directory-changed"}}}),[f,h,g]=await Promise.all([Promise.all(r),Promise.all(i),Promise.all(u)]);for(const s of[...f,...h,...g])s&&t.push(s);for(const[s,a]of Object.entries(e.envHashes)){const d=b(`${s}=${process.env[s]??""}`);d!==a&&t.push({currentHash:d,detail:s,previousHash:a,type:"env-changed"})}return t.length>0?t:void 0}validateCommand(e,t,r){const i=b(`${t}:${JSON.stringify($(r))}`);if(i!==e.commandHash)return{currentHash:i,detail:"command arguments",previousHash:e.commandHash,type:"args-changed"}}formatMissReasons(e){const t=["Cache miss reasons:"];for(const r of e)switch(r.type){case"args-changed":{t.push(" - Command arguments changed");break}case"directory-changed":{t.push(` - Directory contents changed: ${r.detail}`);break}case"env-changed":{t.push(` - Environment variable changed: ${r.detail}`);break}case"file-changed":{t.push(` - File modified: ${r.detail}`);break}case"file-created":{t.push(` - File created (was missing): ${r.detail}`);break}case"file-deleted":{t.push(` - File deleted: ${r.detail}`);break}case"no-fingerprint":{t.push(" - No previous fingerprint found (first run)");break}}return t.join(`
|
|
2
|
+
`)}static#s(e,t){const r={};for(const i of e)if(i.includes("*")){const u=i.replace("*","");for(const[f,h]of Object.entries(t))f.startsWith(u)&&(r[f]=h)}else r[i]=t[i];return r}async#r(e){const t=this.#t.get(e);if(t!==void 0)return t;const r=await S(e)??void 0;return this.#t.set(e,r),r}}export{j as FingerprintManager};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A=Object.defineProperty;var f=(r,t)=>A(r,"name",{value:t,configurable:!0});import{createRequire as S}from"node:module";import{join as u}from"@visulima/path";import{fetchBlobToFile as T,putBlobFromFile as k}from"./containsBlob-DBWgvkM_.js";import{O as v}from"./utils-BH2W5Wml.js";const C=S(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=f(r=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,e]=c.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return c.getBuiltinModule(r)}return C(r)},"__cjs_getBuiltinModule"),{createHmac:x,timingSafeEqual:B,createHash:R}=l("node:crypto"),{createWriteStream:g,createReadStream:p}=l("node:fs"),{mkdir:y,rm:w,stat:j}=l("node:fs/promises"),{tmpdir:F}=l("node:os"),{pipeline:b}=l("node:stream/promises");var E=Object.defineProperty,d=f((r,t)=>E(r,"name",{value:t,configurable:!0}),"c");const m="X-Artifact-Signature",$=16,z="vis-entry.tar.gz",H=d(async r=>{const t=R("sha256");let e=0;for await(const s of p(r)){const i=s;t.update(i),e+=i.byteLength}return{hash:t.digest("hex"),sizeBytes:e}},"digestFile"),_=d(async(r,t,e)=>{const s=x("sha256",r);s.update(t);const i=p(e);for await(const a of i)s.update(a);return s.digest("hex")},"computeArtifactSignatureStream"),q=d((r,t)=>{if(r.length!==t.length)return!1;try{return B(Buffer.from(r,"hex"),Buffer.from(t,"hex"))}catch{return!1}},"signaturesMatch");class L{static{f(this,"x")}static{d(this,"HttpRemoteCache")}#u;#i;#r;#s;#a;#l;#f;#d;#t;#n;#e;#o=new Map;constructor(t){this.#u=t.url.replace(/\/$/,""),this.#i=t.token,this.#r=t.teamId,this.#s=t.timeout??3e4;const e=t.mode??"readwrite";if(this.#a=e==="read"||e==="readwrite",this.#l=e==="write"||e==="readwrite",this.#f=t.onUploadError,this.#d=t.compression??"gzip",this.#e=t.localCasRoot,t.signing){if(t.signing.secret.length<$)throw new Error(`Remote cache signing secret must be at least ${String($)} characters.`);this.#t=t.signing.secret,this.#n=t.signing.verifyOnDownload??!1}else this.#t=void 0,this.#n=!1}async close(){}async containsAction(t){if(!this.#a)return!1;try{const e=this.#h(`/v8/artifacts/${t.hash}`);return(await fetch(e,{headers:this.#c(),method:"HEAD",signal:AbortSignal.timeout(this.#s)})).ok}catch{return!1}}async fetchBlob(t,e){return this.#e?T(this.#e,t,e):!1}async retrieveAction(t){if(!this.#a||!this.#e)return null;const e=u(this.#e,"v2","tmp"),s=u(e,`.remote-${t.hash}-${v()}`);try{await y(e,{recursive:!0});const i=this.#h(`/v8/artifacts/${t.hash}`),a=await fetch(i,{headers:this.#c(),method:"GET",signal:AbortSignal.timeout(this.#s)});if(!a.ok||!a.body)return null;const n=this.#t?a.headers.get(m.toLowerCase())??a.headers.get(m):null;if(this.#t&&!n&&this.#n)return null;if(await b(a.body,g(s)),this.#t&&n){const h=await _(this.#t,t.hash,s);if(!q(n,h))return null}const o=await H(s);return await k(this.#e,o,s),{exitCode:0,outputDirectories:[],outputFiles:[{digest:o,isExecutable:!1,path:z}]}}catch{return null}finally{await w(s,{force:!0}).catch(()=>{})}}async storeAction(t,e,s){if(!this.#l||e.outputFiles.length!==1||s.length===0)return!1;const i=e.outputFiles[0];if(!i)return!1;const a=s.find(h=>h.digest.hash===i.digest.hash);if(!a)return!1;const n=this.#o.get(t.hash);if(n)return n;const o=this.#m(t,a).finally(()=>{this.#o.delete(t.hash)});return this.#o.set(t.hash,o),o}async#m(t,e){const s=this.#e?u(this.#e,"v2","tmp"):u(F(),"visulima-task-runner-uploads"),i=u(s,`.upload-${t.hash}-${v()}`);try{await y(s,{recursive:!0});const a=await e.open();await b(a,g(i));const n=this.#h(`/v8/artifacts/${t.hash}`),{size:o}=await j(i),h={...this.#c(),"Content-Length":String(o),"Content-Type":"application/octet-stream","X-Artifact-Compression":this.#d};return this.#t&&(h[m]=await _(this.#t,t.hash,i)),(await fetch(n,{body:p(i),duplex:"half",headers:h,method:"PUT",signal:AbortSignal.timeout(this.#s)})).ok}catch(a){return this.#f?.(t.hash,a),!1}finally{await w(i,{force:!0}).catch(()=>{})}}#h(t){const e=`${this.#u}${t}`;return this.#r?`${e}?teamId=${encodeURIComponent(this.#r)}`:e}#c(){const t={};return this.#i&&(t.Authorization=`Bearer ${this.#i}`),t}}export{L as HttpRemoteCache};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var p=(e,t)=>d(e,"name",{value:t,configurable:!0});var h=Object.defineProperty,u=p((e,t)=>h(e,"name",{value:t,configurable:!0}),"o");const f=["file","glob","env","func","dep"],l=/^([a-z][a-z0-9+.-]*):\/\//i;class r extends Error{static{p(this,"InvalidInputUriError")}static{u(this,"InvalidInputUriError")}constructor(t){super(t),this.name="InvalidInputUriError"}}const w=u(e=>{const t=e.startsWith("!"),c=t?e.slice(1):e,o=l.exec(c);if(!o)return;const s=o[1].toLowerCase(),n=c.slice(o[0].length);switch(s){case"dep":{if(t)throw new r(`Negation is not supported for dep:// inputs (got "${e}").`);if(n.length===0)throw new r(`dep:// input requires at least one dependency name (got "${e}").`);const i=n.split(",").map(a=>a.trim());if(i.some(a=>a.length===0))throw new r(`dep:// input contains an empty dependency segment (got "${e}"). Remove trailing or repeated commas.`);return{externalDependencies:i}}case"env":{if(t)throw new r(`Negation is not supported for env:// inputs (got "${e}"). Drop env vars from the named-input set instead.`);if(n.length===0)throw new r(`env:// input requires a variable name (got "${e}").`);return{env:n}}case"file":case"glob":{if(n.length===0)throw new r(`${s}:// input requires a path or pattern (got "${e}").`);return{fileset:t?`!${n}`:n}}case"func":{if(t)throw new r(`Negation is not supported for func:// inputs (got "${e}").`);if(n.length===0)throw new r(`func:// input requires a command (got "${e}").`);return{runtime:n}}default:throw new r(`Unknown input URI scheme "${s}://" in "${e}". Recognized schemes: ${f.map(i=>`${i}://`).join(", ")}.`)}},"parseInputUri"),m=u(e=>{const t=e.startsWith("!")?e.slice(1):e;return l.test(t)},"looksLikeInputUri");export{f as INPUT_URI_SCHEMES,r as InvalidInputUriError,m as looksLikeInputUri,w as parseInputUri};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=Object.defineProperty;var h=(r,e)=>d(r,"name",{value:e,configurable:!0});import{createRequire as p}from"node:module";import{d as j,X as M}from"./utils-BH2W5Wml.js";import{join as z,dirname as b,relative as P}from"@visulima/path";const g=p(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=h(r=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[e,s]=c.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return c.getBuiltinModule(r)}return g(r)},"__cjs_getBuiltinModule"),{readFile:u,mkdir:w,writeFile:_,stat:y}=v("node:fs/promises");var S=Object.defineProperty,k=h((r,e)=>S(r,"name",{value:e,configurable:!0}),"h");const F=new Set([".cache",".git",".task-runner-cache","coverage","dist","node_modules"]);class N{static{h(this,"v")}static{k(this,"IncrementalFileHasher")}#t;#i;#s;#e=new Map;#r=!1;constructor(e){this.#t=e.workspaceRoot,this.#i=e.ignoredDirs??F,this.#s=e.snapshotPath??z(e.workspaceRoot,"node_modules",".cache","task-runner","file-snapshot.json")}async load(){if(!this.#r&&(this.#r=!0,!!this.#s))try{const e=await u(this.#s,"utf8"),s=JSON.parse(e);for(const[i,t]of Object.entries(s))this.#e.set(i,t)}catch{}}async save(){if(!this.#s)return;const e=b(this.#s);await w(e,{recursive:!0});const s={};for(const[i,t]of this.#e)s[i]=t;await _(this.#s,JSON.stringify(s))}async hashDirectory(e){await this.load();const s={},i=await j(e,this.#i),t=64,a=[];for(let o=0;o<i.length;o+=t)a.push(i.slice(o,o+t));for(const o of a){const m=await Promise.all(o.map(async n=>{const l=await this.#o(n),f=P(this.#t,n);return{hash:l,relativePath:f}}));for(const{hash:n,relativePath:l}of m)n&&(s[l]=n)}return s}async#o(e){try{const s=await y(e);if(!s.isFile())return;const i=this.#e.get(e);if(i?.mtimeMs===s.mtimeMs&&i.size===s.size)return i.hash;const t=await u(e),a=M(t);return this.#e.set(e,{hash:a,mtimeMs:s.mtimeMs,size:s.size}),a}catch{this.#e.delete(e);return}}get snapshotSize(){return this.#e.size}clear(){this.#e.clear()}getSnapshotHash(e,s,i){const t=this.#e.get(e);if(t)return t.mtimeMs===s&&t.size===i?t.hash:void 0}recordSnapshot(e,s,i,t){this.#e.set(e,{hash:s,mtimeMs:i,size:t})}}export{N as IncrementalFileHasher};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var c=Object.defineProperty;var o=(e,r)=>c(e,"name",{value:r,configurable:!0});var h=Object.defineProperty,n=o((e,r)=>h(e,"name",{value:r,configurable:!0}),"o");const p=n(e=>`${e.target.project}#${e.target.target}`,"formatTaskLabel"),l=n((e,r)=>{const s=e.endsWith(`
|
|
2
|
+
`)?`
|
|
3
|
+
`:"",t=s?e.slice(0,-1):e;return t.length===0?s:`${t.split(`
|
|
4
|
+
`).map(i=>`[${r}] ${i}`).join(`
|
|
5
|
+
`)}${s}`},"prefixLines");class u{static{o(this,"LogReporter")}static{n(this,"LogReporter")}#e;#t;constructor(r,s=t=>process.stdout.write(t)){this.#e=r,this.#t=s}printTaskTerminalOutput(r,s,t){if(t.length===0)return;if(this.#e==="interleaved"){this.#t(t.endsWith(`
|
|
6
|
+
`)?t:`${t}
|
|
7
|
+
`);return}const i=p(r);if(this.#e==="labeled"){this.#t(l(t.endsWith(`
|
|
8
|
+
`)?t:`${t}
|
|
9
|
+
`,i));return}const a=t.endsWith(`
|
|
10
|
+
`)?t:`${t}
|
|
11
|
+
`;this.#t(`── ${i} ──
|
|
12
|
+
${a}
|
|
13
|
+
`)}endTasks(r){}}const d=n((e,r)=>new u(e,r),"createLogReporter");export{u as LogReporter,d as createLogReporter};
|