@visulima/task-runner 1.0.0-alpha.1 → 1.0.0-alpha.11

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +213 -0
  2. package/README.md +196 -52
  3. package/dist/index.d.ts +3200 -34
  4. package/dist/index.js +1 -20
  5. package/dist/packem_chunks/index.js +11 -0
  6. package/dist/packem_shared/Cache-C540ZPYk.js +2 -0
  7. package/dist/packem_shared/CompositeLifeCycle-D0zWvAXJ.js +1 -0
  8. package/dist/packem_shared/FileAccessTracker-DSNf03JW.js +47 -0
  9. package/dist/packem_shared/FingerprintManager-CYW2EwLc.js +2 -0
  10. package/dist/packem_shared/HttpRemoteCache-Ch-_9ejF.js +1 -0
  11. package/dist/packem_shared/INPUT_URI_SCHEMES-Csrd0tlg.js +1 -0
  12. package/dist/packem_shared/IncrementalFileHasher-CdLXVB5F.js +1 -0
  13. package/dist/packem_shared/LogReporter-BUPWiXAq.js +13 -0
  14. package/dist/packem_shared/ReapiRemoteCache-B3uQuVqP.js +251 -0
  15. package/dist/packem_shared/TaskOrchestrator-C-I6WsBx.js +2 -0
  16. package/dist/packem_shared/TerminalBuffer-BtZy7TpT.js +3 -0
  17. package/dist/packem_shared/TrackedTaskExecutor-D3-LNT_d.js +2 -0
  18. package/dist/packem_shared/V2_ROOT-injxWBrl.js +1 -0
  19. package/dist/packem_shared/actionDigestForTaskHash-BOL4fZ9v.js +1 -0
  20. package/dist/packem_shared/archive-CDfGy5Lm.js +1 -0
  21. package/dist/packem_shared/buildForwardDependencyMap-w1FVPFdv.js +3 -0
  22. package/dist/packem_shared/collectFiles-W4bnBRpb.js +1 -0
  23. package/dist/packem_shared/computeTaskHash-DtCdMJFf.js +1 -0
  24. package/dist/packem_shared/containsBlob-DBWgvkM_.js +1 -0
  25. package/dist/packem_shared/createInputHandler-CkDCpPYy.js +1 -0
  26. package/dist/packem_shared/createTaskGraph-CEYYI-DL.js +1 -0
  27. package/dist/packem_shared/defaultTaskRunner-CARb5zK7.js +2 -0
  28. package/dist/packem_shared/detectFrameworks-WVZJOPgN.js +1 -0
  29. package/dist/packem_shared/detectScriptShell-CaTDk5cW.js +1 -0
  30. package/dist/packem_shared/digestBuffer-g11aCaDx.js +1 -0
  31. package/dist/packem_shared/enforceProjectConstraints-dNc1SwRi.js +1 -0
  32. package/dist/packem_shared/expandArguments-4mab7-Ds.js +1 -0
  33. package/dist/packem_shared/expandShortcut-BErNHNXZ.js +1 -0
  34. package/dist/packem_shared/expandTokensInString-Cyx0qSFA.js +1 -0
  35. package/dist/packem_shared/expandWildcard-DE0dOOZF.js +1 -0
  36. package/dist/packem_shared/extractPackageName-BeL6Gc3a.js +1 -0
  37. package/dist/packem_shared/findCycle-BY8-jmzB.js +1 -0
  38. package/dist/packem_shared/formatTimingTable-CP3rsDwf.js +7 -0
  39. package/dist/packem_shared/generateRunSummary-DXhnX83W.js +1 -0
  40. package/dist/packem_shared/getCurrentBranch-D-qoZByx.js +1 -0
  41. package/dist/packem_shared/getMainWorktreeRoot-DRN_i8jA.js +1 -0
  42. package/dist/packem_shared/isNativeAvailable-BOavFPX1.js +1 -0
  43. package/dist/packem_shared/parseCommands-b1K2vIxj.js +1 -0
  44. package/dist/packem_shared/parsePartition-uzPNgtPp.js +1 -0
  45. package/dist/packem_shared/projectGraphToDot-FN6oHDGH.js +250 -0
  46. package/dist/packem_shared/resolveCacheMode-XhD7mg7G.js +1 -0
  47. package/dist/packem_shared/resolveOutputs-BBjdaraf.js +1 -0
  48. package/dist/packem_shared/runConcurrentFallback-Dpqxuyv-.js +3 -0
  49. package/dist/packem_shared/runConcurrently-CxyC5yGT.js +1 -0
  50. package/dist/packem_shared/runTeardown-DBBpBAyb.js +1 -0
  51. package/dist/packem_shared/shell-quote-CksLqyXK.js +1 -0
  52. package/dist/packem_shared/stripQuotes-jkZb0CL9.js +1 -0
  53. package/dist/packem_shared/toChromeTrace-DxN5NQIU.js +1 -0
  54. package/dist/packem_shared/utils-BH2W5Wml.js +1 -0
  55. package/dist/packem_shared/withRestart-CWO6BKv_.js +1 -0
  56. package/index.js +602 -0
  57. package/package.json +30 -18
  58. package/binding.js +0 -204
  59. package/dist/affected.d.ts +0 -48
  60. package/dist/cache.d.ts +0 -103
  61. package/dist/default-task-runner.d.ts +0 -44
  62. package/dist/file-access-tracker.d.ts +0 -53
  63. package/dist/fingerprint.d.ts +0 -45
  64. package/dist/framework-inference.d.ts +0 -35
  65. package/dist/graph-visualizer.d.ts +0 -74
  66. package/dist/incremental-hasher.d.ts +0 -58
  67. package/dist/life-cycle.d.ts +0 -36
  68. package/dist/lockfile-hasher.d.ts +0 -73
  69. package/dist/native-binding.d.ts +0 -64
  70. package/dist/packem_shared/Cache-IYpTYVUC.js +0 -298
  71. package/dist/packem_shared/CompositeLifeCycle-7AtYw1dv.js +0 -112
  72. package/dist/packem_shared/FileAccessTracker-CrtBAt5D.js +0 -239
  73. package/dist/packem_shared/FingerprintManager-D6Y0erg-.js +0 -227
  74. package/dist/packem_shared/IncrementalFileHasher-Ds3J6dgb.js +0 -151
  75. package/dist/packem_shared/RemoteCache-BDqrnDEi.js +0 -179
  76. package/dist/packem_shared/TaskOrchestrator-BvYs3ONw.js +0 -342
  77. package/dist/packem_shared/TaskScheduler-CJilHDta.js +0 -111
  78. package/dist/packem_shared/TrackedTaskExecutor-BGUKFE-7.js +0 -164
  79. package/dist/packem_shared/collectFiles-ClXHnHhg.js +0 -22
  80. package/dist/packem_shared/computeTaskHash-BoCnnvIJ.js +0 -356
  81. package/dist/packem_shared/createTaskGraph-CcsFaSrz.js +0 -164
  82. package/dist/packem_shared/defaultTaskRunner-CrW4v5Ye.js +0 -79
  83. package/dist/packem_shared/detectFrameworks-CeFzKE6J.js +0 -101
  84. package/dist/packem_shared/extractPackageName-CbVNW-dr.js +0 -189
  85. package/dist/packem_shared/filterAffectedTasks-I-18zPg6.js +0 -135
  86. package/dist/packem_shared/findCycle-DF4_BRdO.js +0 -212
  87. package/dist/packem_shared/generateRunSummary-qn-_jKwt.js +0 -134
  88. package/dist/packem_shared/isNativeAvailable-BWhnZ4ES.js +0 -19
  89. package/dist/packem_shared/projectGraphToDot-VdTjHcVp.js +0 -202
  90. package/dist/packem_shared/utils-zO0ZRgtf.js +0 -390
  91. package/dist/remote-cache.d.ts +0 -55
  92. package/dist/run-summary.d.ts +0 -89
  93. package/dist/task-graph-utils.d.ts +0 -39
  94. package/dist/task-graph.d.ts +0 -22
  95. package/dist/task-hasher.d.ts +0 -67
  96. package/dist/task-orchestrator.d.ts +0 -38
  97. package/dist/task-scheduler.d.ts +0 -18
  98. package/dist/tracked-executor.d.ts +0 -46
  99. package/dist/types.d.ts +0 -385
  100. package/dist/utils.d.ts +0 -39
  101. package/npm/darwin-arm64/LICENSE.md +0 -21
  102. package/npm/darwin-arm64/node_modules/.bin/semantic-release +0 -21
  103. package/npm/darwin-arm64/package.json +0 -39
  104. package/npm/darwin-arm64/task-runner-native.darwin-arm64.node +0 -0
  105. package/npm/darwin-x64/LICENSE.md +0 -21
  106. package/npm/darwin-x64/node_modules/.bin/semantic-release +0 -21
  107. package/npm/darwin-x64/package.json +0 -39
  108. package/npm/darwin-x64/task-runner-native.darwin-x64.node +0 -0
  109. package/npm/linux-arm64-gnu/LICENSE.md +0 -21
  110. package/npm/linux-arm64-gnu/node_modules/.bin/semantic-release +0 -21
  111. package/npm/linux-arm64-gnu/package.json +0 -42
  112. package/npm/linux-arm64-gnu/task-runner-native.linux-arm64-gnu.node +0 -0
  113. package/npm/linux-arm64-musl/LICENSE.md +0 -21
  114. package/npm/linux-arm64-musl/node_modules/.bin/semantic-release +0 -21
  115. package/npm/linux-arm64-musl/package.json +0 -42
  116. package/npm/linux-arm64-musl/task-runner-native.linux-arm64-musl.node +0 -0
  117. package/npm/linux-x64-gnu/LICENSE.md +0 -21
  118. package/npm/linux-x64-gnu/node_modules/.bin/semantic-release +0 -21
  119. package/npm/linux-x64-gnu/package.json +0 -42
  120. package/npm/linux-x64-gnu/task-runner-native.linux-x64-gnu.node +0 -0
  121. package/npm/linux-x64-musl/LICENSE.md +0 -21
  122. package/npm/linux-x64-musl/node_modules/.bin/semantic-release +0 -21
  123. package/npm/linux-x64-musl/package.json +0 -42
  124. package/npm/linux-x64-musl/task-runner-native.linux-x64-musl.node +0 -0
  125. package/npm/win32-arm64-msvc/LICENSE.md +0 -21
  126. package/npm/win32-arm64-msvc/node_modules/.bin/semantic-release +0 -21
  127. package/npm/win32-arm64-msvc/package.json +0 -39
  128. package/npm/win32-arm64-msvc/task-runner-native.win32-arm64-msvc.node +0 -0
  129. package/npm/win32-x64-msvc/LICENSE.md +0 -21
  130. package/npm/win32-x64-msvc/node_modules/.bin/semantic-release +0 -21
  131. package/npm/win32-x64-msvc/package.json +0 -39
  132. package/npm/win32-x64-msvc/task-runner-native.win32-x64-msvc.node +0 -0
  133. package/task-runner-native.darwin-arm64.node +0 -0
  134. package/task-runner-native.darwin-x64.node +0 -0
  135. package/task-runner-native.linux-arm64-gnu.node +0 -0
  136. package/task-runner-native.linux-arm64-musl.node +0 -0
  137. package/task-runner-native.linux-x64-gnu.node +0 -0
  138. package/task-runner-native.linux-x64-musl.node +0 -0
  139. package/task-runner-native.win32-arm64-msvc.node +0 -0
  140. package/task-runner-native.win32-x64-msvc.node +0 -0
package/dist/index.js CHANGED
@@ -1,20 +1 @@
1
- export { filterAffectedTasks, getAffectedProjects, getChangedFiles } from './packem_shared/filterAffectedTasks-I-18zPg6.js';
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-CxyC5yGT.js";import{runConcurrentFallback as Z}from"./packem_shared/runConcurrentFallback-Dpqxuyv-.js";import{defaultTaskRunner as ee}from"./packem_shared/defaultTaskRunner-CARb5zK7.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-FN6oHDGH.js";import{IncrementalFileHasher as Ce}from"./packem_shared/IncrementalFileHasher-CdLXVB5F.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-dNc1SwRi.js";import{generateRunSummary as Ye,getLastRunSummaryPath as qe,readLastRunSummary as Je,writeLastRunSummary as Ke,writeRunSummary as Qe}from"./packem_shared/generateRunSummary-DXhnX83W.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-DtCdMJFf.js";import{TaskOrchestrator as hr}from"./packem_shared/TaskOrchestrator-C-I6WsBx.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 zr=Object.defineProperty;var v=(b,i)=>zr(b,"name",{value:i,configurable:!0});function Ur(b,i){for(var d=0;d<i.length;d++){const l=i[d];if(typeof l!="string"&&!Array.isArray(l))for(const h in l)h!=="default"&&!(h in b)&&(b[h]=l[h])}return Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}v(Ur,"_mergeNamespaces");var Wr=Object.defineProperty,ce=v((b,i)=>Wr(b,"name",{value:i,configurable:!0}),"t"),le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pr(b){return b&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}v(Pr,"getDefaultExportFromCjs");ce(Pr,"getDefaultExportFromCjs");function Hr(b){return b&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}v(Hr,"getDefaultExportFromNamespaceIfPresent");ce(Hr,"getDefaultExportFromNamespaceIfPresent");function Gr(b){return b&&Object.prototype.hasOwnProperty.call(b,"default")&&Object.keys(b).length===1?b.default:b}v(Gr,"getDefaultExportFromNamespaceIfNotNamed");ce(Gr,"getDefaultExportFromNamespaceIfNotNamed");function Xr(b){if(Object.prototype.hasOwnProperty.call(b,"__esModule"))return b;var i=b.default;if(typeof i=="function"){var d=ce(v(function l(){var h=!1;try{h=this instanceof l}catch{}return h?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)},"a"),"a");d.prototype=i.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(b).forEach(function(l){var h=Object.getOwnPropertyDescriptor(b,l);Object.defineProperty(d,l,h.get?h:{enumerable:!0,get:ce(function(){return b[l]},"get")})}),d}v(Xr,"getAugmentedNamespace");ce(Xr,"getAugmentedNamespace");var Ae={exports:{}},Se={exports:{}},Ne={},ke={},Te,Ct;function xr(){if(Ct)return Te;Ct=1;var b=Object.defineProperty,i=v((l,h)=>b(l,"name",{value:h,configurable:!0}),"n");Te=d;function d(l,h){for(var c=new Array(arguments.length-1),o=0,r=2,n=!0;r<arguments.length;)c[o++]=arguments[r++];return new Promise(i(function(t,e){c[o]=i(function(u){if(n)if(n=!1,u)e(u);else{for(var a=new Array(arguments.length-1),s=0;s<a.length;)a[s++]=arguments[s];t.apply(null,a)}},"callback");try{l.apply(h||null,c)}catch(u){n&&(n=!1,e(u))}},"executor"))}return v(d,"asPromise"),i(d,"asPromise"),Te}v(xr,"requireAspromise");var Pe={},Jt;function Yr(){return Jt||(Jt=1,(function(b){var i=Object.defineProperty,d=v((n,t)=>i(n,"name",{value:t,configurable:!0}),"v"),l=b;l.length=d(function(n){var t=n.length;if(!t)return 0;for(var e=0;--t%4>1&&n.charAt(t)==="=";)++e;return Math.ceil(n.length*3)/4-e},"length");for(var h=new Array(64),c=new Array(123),o=0;o<64;)c[h[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;l.encode=d(function(n,t,e){for(var u=null,a=[],s=0,f=0,p;t<e;){var m=n[t++];switch(f){case 0:a[s++]=h[m>>2],p=(m&3)<<4,f=1;break;case 1:a[s++]=h[p|m>>4],p=(m&15)<<2,f=2;break;case 2:a[s++]=h[p|m>>6],a[s++]=h[m&63],f=0;break}s>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,a)),s=0)}return f&&(a[s++]=h[p],a[s++]=61,f===1&&(a[s++]=61)),u?(s&&u.push(String.fromCharCode.apply(String,a.slice(0,s))),u.join("")):String.fromCharCode.apply(String,a.slice(0,s))},"encode");var r="invalid encoding";l.decode=d(function(n,t,e){for(var u=e,a=0,s,f=0;f<n.length;){var p=n.charCodeAt(f++);if(p===61&&a>1)break;if((p=c[p])===void 0)throw Error(r);switch(a){case 0:s=p,a=1;break;case 1:t[e++]=s<<2|(p&48)>>4,s=p,a=2;break;case 2:t[e++]=(s&15)<<4|(p&60)>>2,s=p,a=3;break;case 3:t[e++]=(s&3)<<6|p,a=0;break}}if(a===1)throw Error(r);return e-u},"decode"),l.test=d(function(n){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(n)},"test")})(Pe)),Pe}v(Yr,"requireBase64");var xe,Mt;function Kr(){if(Mt)return xe;Mt=1;var b=Object.defineProperty,i=v((l,h)=>b(l,"name",{value:h,configurable:!0}),"r");xe=d;function d(){this._listeners={}}return v(d,"EventEmitter"),i(d,"EventEmitter"),d.prototype.on=i(function(l,h,c){return(this._listeners[l]||(this._listeners[l]=[])).push({fn:h,ctx:c||this}),this},"on"),d.prototype.off=i(function(l,h){if(l===void 0)this._listeners={};else if(h===void 0)this._listeners[l]=[];else for(var c=this._listeners[l],o=0;o<c.length;)c[o].fn===h?c.splice(o,1):++o;return this},"off"),d.prototype.emit=i(function(l){var h=this._listeners[l];if(h){for(var c=[],o=1;o<arguments.length;)c.push(arguments[o++]);for(o=0;o<h.length;)h[o].fn.apply(h[o++].ctx,c)}return this},"emit"),xe}v(Kr,"requireEventemitter");var Fe,Vt;function Zr(){if(Vt)return Fe;Vt=1;var b=Object.defineProperty,i=v((r,n)=>b(r,"name",{value:n,configurable:!0}),"F");Fe=d(d);function d(r){return typeof Float32Array<"u"?(function(){var n=new Float32Array([-0]),t=new Uint8Array(n.buffer),e=t[3]===128;function u(p,m,O){n[0]=p,m[O]=t[0],m[O+1]=t[1],m[O+2]=t[2],m[O+3]=t[3]}v(u,"E"),i(u,"writeFloat_f32_cpy");function a(p,m,O){n[0]=p,m[O]=t[3],m[O+1]=t[2],m[O+2]=t[1],m[O+3]=t[0]}v(a,"_"),i(a,"writeFloat_f32_rev"),r.writeFloatLE=e?u:a,r.writeFloatBE=e?a:u;function s(p,m){return t[0]=p[m],t[1]=p[m+1],t[2]=p[m+2],t[3]=p[m+3],n[0]}v(s,"d"),i(s,"readFloat_f32_cpy");function f(p,m){return t[3]=p[m],t[2]=p[m+1],t[1]=p[m+2],t[0]=p[m+3],n[0]}v(f,"c"),i(f,"readFloat_f32_rev"),r.readFloatLE=e?s:f,r.readFloatBE=e?f:s})():(function(){function n(e,u,a,s){var f=u<0?1:0;if(f&&(u=-u),u===0)e(1/u>0?0:2147483648,a,s);else if(isNaN(u))e(2143289344,a,s);else if(u>34028234663852886e22)e((f<<31|2139095040)>>>0,a,s);else if(u<11754943508222875e-54)e((f<<31|Math.round(u/1401298464324817e-60))>>>0,a,s);else{var p=Math.floor(Math.log(u)/Math.LN2),m=Math.round(u*Math.pow(2,-p)*8388608)&8388607;e((f<<31|p+127<<23|m)>>>0,a,s)}}v(n,"t"),i(n,"writeFloat_ieee754"),r.writeFloatLE=n.bind(null,l),r.writeFloatBE=n.bind(null,h);function t(e,u,a){var s=e(u,a),f=(s>>31)*2+1,p=s>>>23&255,m=s&8388607;return p===255?m?NaN:f*(1/0):p===0?f*1401298464324817e-60*m:f*Math.pow(2,p-150)*(m+8388608)}v(t,"n"),i(t,"readFloat_ieee754"),r.readFloatLE=t.bind(null,c),r.readFloatBE=t.bind(null,o)})(),typeof Float64Array<"u"?(function(){var n=new Float64Array([-0]),t=new Uint8Array(n.buffer),e=t[7]===128;function u(p,m,O){n[0]=p,m[O]=t[0],m[O+1]=t[1],m[O+2]=t[2],m[O+3]=t[3],m[O+4]=t[4],m[O+5]=t[5],m[O+6]=t[6],m[O+7]=t[7]}v(u,"E"),i(u,"writeDouble_f64_cpy");function a(p,m,O){n[0]=p,m[O]=t[7],m[O+1]=t[6],m[O+2]=t[5],m[O+3]=t[4],m[O+4]=t[3],m[O+5]=t[2],m[O+6]=t[1],m[O+7]=t[0]}v(a,"_"),i(a,"writeDouble_f64_rev"),r.writeDoubleLE=e?u:a,r.writeDoubleBE=e?a:u;function s(p,m){return t[0]=p[m],t[1]=p[m+1],t[2]=p[m+2],t[3]=p[m+3],t[4]=p[m+4],t[5]=p[m+5],t[6]=p[m+6],t[7]=p[m+7],n[0]}v(s,"d"),i(s,"readDouble_f64_cpy");function f(p,m){return t[7]=p[m],t[6]=p[m+1],t[5]=p[m+2],t[4]=p[m+3],t[3]=p[m+4],t[2]=p[m+5],t[1]=p[m+6],t[0]=p[m+7],n[0]}v(f,"c"),i(f,"readDouble_f64_rev"),r.readDoubleLE=e?s:f,r.readDoubleBE=e?f:s})():(function(){function n(e,u,a,s,f,p){var m=s<0?1:0;if(m&&(s=-s),s===0)e(0,f,p+u),e(1/s>0?0:2147483648,f,p+a);else if(isNaN(s))e(0,f,p+u),e(2146959360,f,p+a);else if(s>17976931348623157e292)e(0,f,p+u),e((m<<31|2146435072)>>>0,f,p+a);else{var O;if(s<22250738585072014e-324)O=s/5e-324,e(O>>>0,f,p+u),e((m<<31|O/4294967296)>>>0,f,p+a);else{var g=Math.floor(Math.log(s)/Math.LN2);g===1024&&(g=1023),O=s*Math.pow(2,-g),e(O*4503599627370496>>>0,f,p+u),e((m<<31|g+1023<<20|O*1048576&1048575)>>>0,f,p+a)}}}v(n,"t"),i(n,"writeDouble_ieee754"),r.writeDoubleLE=n.bind(null,l,0,4),r.writeDoubleBE=n.bind(null,h,4,0);function t(e,u,a,s,f){var p=e(s,f+u),m=e(s,f+a),O=(m>>31)*2+1,g=m>>>20&2047,y=4294967296*(m&1048575)+p;return g===2047?y?NaN:O*(1/0):g===0?O*5e-324*y:O*Math.pow(2,g-1075)*(y+4503599627370496)}v(t,"n"),i(t,"readDouble_ieee754"),r.readDoubleLE=t.bind(null,c,0,4),r.readDoubleBE=t.bind(null,o,4,0)})(),r}v(d,"factory"),i(d,"factory");function l(r,n,t){n[t]=r&255,n[t+1]=r>>>8&255,n[t+2]=r>>>16&255,n[t+3]=r>>>24}v(l,"writeUintLE"),i(l,"writeUintLE");function h(r,n,t){n[t]=r>>>24,n[t+1]=r>>>16&255,n[t+2]=r>>>8&255,n[t+3]=r&255}v(h,"writeUintBE"),i(h,"writeUintBE");function c(r,n){return(r[n]|r[n+1]<<8|r[n+2]<<16|r[n+3]<<24)>>>0}v(c,"readUintLE"),i(c,"readUintLE");function o(r,n){return(r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3])>>>0}return v(o,"readUintBE"),i(o,"readUintBE"),Fe}v(Zr,"requireFloat");function $t(b){throw new Error('Could not dynamically require "'+b+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}v($t,"commonjsRequire");var qe,zt;function Fr(){if(zt)return qe;zt=1;var b=Object.defineProperty,i=v((l,h)=>b(l,"name",{value:h,configurable:!0}),"t");qe=d;function d(l){try{if(typeof $t!="function")return null;var h=$t(l);return h&&(h.length||Object.keys(h).length)?h:null}catch{return null}}return v(d,"inquire"),i(d,"inquire"),qe}v(Fr,"requireInquire");var Ie={},Ut;function Qr(){return Ut||(Ut=1,(function(b){var i=Object.defineProperty,d=v((c,o)=>i(c,"name",{value:o,configurable:!0}),"d"),l=b,h="�";l.length=d(function(c){for(var o=0,r=0,n=0;n<c.length;++n)r=c.charCodeAt(n),r<128?o+=1:r<2048?o+=2:(r&64512)===55296&&(c.charCodeAt(n+1)&64512)===56320?(++n,o+=4):o+=3;return o},"utf8_length"),l.read=d(function(c,o,r){if(r-o<1)return"";for(var n="",t=o;t<r;){var e=c[t++];if(e<=127)n+=String.fromCharCode(e);else if(e>=192&&e<224){var u=(e&31)<<6|c[t++]&63;n+=u>=128?String.fromCharCode(u):h}else if(e>=224&&e<240){var a=(e&15)<<12|(c[t++]&63)<<6|c[t++]&63;n+=a>=2048?String.fromCharCode(a):h}else if(e>=240){var s=(e&7)<<18|(c[t++]&63)<<12|(c[t++]&63)<<6|c[t++]&63;s<65536||s>1114111?n+=h:(s-=65536,n+=String.fromCharCode(55296+(s>>10)),n+=String.fromCharCode(56320+(s&1023)))}}return n},"utf8_read"),l.write=d(function(c,o,r){for(var n=r,t,e,u=0;u<c.length;++u)t=c.charCodeAt(u),t<128?o[r++]=t:t<2048?(o[r++]=t>>6|192,o[r++]=t&63|128):(t&64512)===55296&&((e=c.charCodeAt(u+1))&64512)===56320?(t=65536+((t&1023)<<10)+(e&1023),++u,o[r++]=t>>18|240,o[r++]=t>>12&63|128,o[r++]=t>>6&63|128,o[r++]=t&63|128):(o[r++]=t>>12|224,o[r++]=t>>6&63|128,o[r++]=t&63|128);return r-n},"utf8_write")})(Ie)),Ie}v(Qr,"requireUtf8");var Le,Wt;function ei(){if(Wt)return Le;Wt=1;var b=Object.defineProperty,i=v((l,h)=>b(l,"name",{value:h,configurable:!0}),"l");Le=d;function d(l,h,c){var o=c||8192,r=o>>>1,n=null,t=o;return i(function(e){if(e<1||e>r)return l(e);t+e>o&&(n=l(o),t=0);var u=h.call(n,t,t+=e);return t&7&&(t=(t|7)+1),u},"pool_alloc")}return v(d,"pool"),i(d,"pool"),Le}v(ei,"requirePool");var Be,Ht;function ti(){if(Ht)return Be;Ht=1;var b=Object.defineProperty,i=v((r,n)=>b(r,"name",{value:n,configurable:!0}),"r");Be=l;var d=ne();function l(r,n){this.lo=r>>>0,this.hi=n>>>0}v(l,"LongBits"),i(l,"LongBits");var h=l.zero=new l(0,0);h.toNumber=function(){return 0},h.zzEncode=h.zzDecode=function(){return this},h.length=function(){return 1};var c=l.zeroHash="\0\0\0\0\0\0\0\0";l.fromNumber=i(function(r){if(r===0)return h;var n=r<0;n&&(r=-r);var t=r>>>0,e=(r-t)/4294967296>>>0;return n&&(e=~e>>>0,t=~t>>>0,++t>4294967295&&(t=0,++e>4294967295&&(e=0))),new l(t,e)},"fromNumber"),l.from=i(function(r){if(typeof r=="number")return l.fromNumber(r);if(d.isString(r))if(d.Long)r=d.Long.fromString(r);else return l.fromNumber(parseInt(r,10));return r.low||r.high?new l(r.low>>>0,r.high>>>0):h},"from"),l.prototype.toNumber=i(function(r){if(!r&&this.hi>>>31){var n=~this.lo+1>>>0,t=~this.hi>>>0;return n||(t=t+1>>>0),-(n+t*4294967296)}return this.lo+this.hi*4294967296},"toNumber"),l.prototype.toLong=i(function(r){return d.Long?new d.Long(this.lo|0,this.hi|0,!!r):{low:this.lo|0,high:this.hi|0,unsigned:!!r}},"toLong");var o=String.prototype.charCodeAt;return l.fromHash=i(function(r){return r===c?h:new l((o.call(r,0)|o.call(r,1)<<8|o.call(r,2)<<16|o.call(r,3)<<24)>>>0,(o.call(r,4)|o.call(r,5)<<8|o.call(r,6)<<16|o.call(r,7)<<24)>>>0)},"fromHash"),l.prototype.toHash=i(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"),l.prototype.zzEncode=i(function(){var r=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^r)>>>0,this.lo=(this.lo<<1^r)>>>0,this},"zzEncode"),l.prototype.zzDecode=i(function(){var r=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^r)>>>0,this.hi=(this.hi>>>1^r)>>>0,this},"zzDecode"),l.prototype.length=i(function(){var r=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,t=this.hi>>>24;return t===0?n===0?r<16384?r<128?1:2:r<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:t<128?9:10},"length"),Be}v(ti,"requireLongbits");var Gt;function ne(){return Gt||(Gt=1,(function(b){var i=Object.defineProperty,d=v((o,r)=>i(o,"name",{value:r,configurable:!0}),"o"),l=b;l.asPromise=xr(),l.base64=Yr(),l.EventEmitter=Kr(),l.float=Zr(),l.inquire=Fr(),l.utf8=Qr(),l.pool=ei(),l.LongBits=ti(),l.isNode=!!(typeof le<"u"&&le&&le.process&&le.process.versions&&le.process.versions.node),l.global=l.isNode&&le||typeof window<"u"&&window||typeof self<"u"&&self||ke,l.emptyArray=Object.freeze?Object.freeze([]):[],l.emptyObject=Object.freeze?Object.freeze({}):{},l.isInteger=Number.isInteger||d(function(o){return typeof o=="number"&&isFinite(o)&&Math.floor(o)===o},"isInteger"),l.isString=d(function(o){return typeof o=="string"||o instanceof String},"isString"),l.isObject=d(function(o){return o&&typeof o=="object"},"isObject"),l.isset=l.isSet=d(function(o,r){var n=o[r];return n!=null&&o.hasOwnProperty(r)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1},"isSet"),l.Buffer=(function(){try{var o=l.inquire("buffer").Buffer;return o.prototype.utf8Write?o:null}catch{return null}})(),l._Buffer_from=null,l._Buffer_allocUnsafe=null,l.newBuffer=d(function(o){return typeof o=="number"?l.Buffer?l._Buffer_allocUnsafe(o):new l.Array(o):l.Buffer?l._Buffer_from(o):typeof Uint8Array>"u"?o:new Uint8Array(o)},"newBuffer"),l.Array=typeof Uint8Array<"u"?Uint8Array:Array,l.Long=l.global.dcodeIO&&l.global.dcodeIO.Long||l.global.Long||l.inquire("long"),l.key2Re=/^true|false|0|1$/,l.key32Re=/^-?(?:0|[1-9][0-9]*)$/,l.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,l.longToHash=d(function(o){return o?l.LongBits.from(o).toHash():l.LongBits.zeroHash},"longToHash"),l.longFromHash=d(function(o,r){var n=l.LongBits.fromHash(o);return l.Long?l.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},"longFromHash");function h(o,r,n){for(var t=Object.keys(r),e=0;e<t.length;++e)(o[t[e]]===void 0||!n)&&t[e]!=="__proto__"&&(o[t[e]]=r[t[e]]);return o}v(h,"merge"),d(h,"merge"),l.merge=h,l.recursionLimit=100,l.makeProp=d(function(o,r){Object.defineProperty(o,r,{enumerable:!0,configurable:!0,writable:!0})},"makeProp"),l.lcFirst=d(function(o){return o.charAt(0).toLowerCase()+o.substring(1)},"lcFirst");function c(o){function r(n,t){if(!(this instanceof r))return new r(n,t);Object.defineProperty(this,"message",{get:d(function(){return n},"get")}),Error.captureStackTrace?Error.captureStackTrace(this,r):Object.defineProperty(this,"stack",{value:new Error().stack||""}),t&&h(this,t)}return v(r,"e"),d(r,"CustomError"),r.prototype=Object.create(Error.prototype,{constructor:{value:r,writable:!0,enumerable:!1,configurable:!0},name:{get:d(function(){return o},"get"),set:void 0,enumerable:!1,configurable:!0},toString:{value:d(function(){return this.name+": "+this.message},"value"),writable:!0,enumerable:!1,configurable:!0}}),r}v(c,"newError"),d(c,"newError"),l.newError=c,l.ProtocolError=c("ProtocolError"),l.oneOfGetter=d(function(o){for(var r={},n=0;n<o.length;++n)r[o[n]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(r[t[e]]===1&&this[t[e]]!==void 0&&this[t[e]]!==null)return t[e]}},"getOneOf"),l.oneOfSetter=d(function(o){return function(r){for(var n=0;n<o.length;++n)o[n]!==r&&delete this[o[n]]}},"setOneOf"),l.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},l._configure=function(){var o=l.Buffer;if(!o){l._Buffer_from=l._Buffer_allocUnsafe=null;return}l._Buffer_from=o.from!==Uint8Array.from&&o.from||d(function(r,n){return new o(r,n)},"Buffer_from"),l._Buffer_allocUnsafe=o.allocUnsafe||d(function(r){return new o(r)},"Buffer_allocUnsafe")}})(ke)),ke}v(ne,"requireMinimal");var De,Xt;function mt(){if(Xt)return De;Xt=1;var b=Object.defineProperty,i=v((g,y)=>b(g,"name",{value:y,configurable:!0}),"n");De=e;var d=ne(),l,h=d.LongBits,c=d.base64,o=d.utf8;function r(g,y,_){this.fn=g,this.len=y,this.next=void 0,this.val=_}v(r,"Op"),i(r,"Op");function n(){}v(n,"noop"),i(n,"noop");function t(g){this.head=g.head,this.tail=g.tail,this.len=g.len,this.next=g.states}v(t,"State"),i(t,"State");function e(){this.len=0,this.head=new r(n,0,0),this.tail=this.head,this.states=null}v(e,"Writer"),i(e,"Writer");var u=i(function(){return d.Buffer?i(function(){return(e.create=i(function(){return new l},"create_buffer"))()},"create_buffer_setup"):i(function(){return new e},"create_array")},"create");e.create=u(),e.alloc=i(function(g){return new d.Array(g)},"alloc"),d.Array!==Array&&(e.alloc=d.pool(e.alloc,d.Array.prototype.subarray)),e.prototype._push=i(function(g,y,_){return this.tail=this.tail.next=new r(g,y,_),this.len+=y,this},"push");function a(g,y,_){y[_]=g&255}v(a,"writeByte"),i(a,"writeByte");function s(g,y,_){for(;g>127;)y[_++]=g&127|128,g>>>=7;y[_]=g}v(s,"writeVarint32"),i(s,"writeVarint32");function f(g,y){this.len=g,this.next=void 0,this.val=y}v(f,"VarintOp"),i(f,"VarintOp"),f.prototype=Object.create(r.prototype),f.prototype.fn=s,e.prototype.uint32=i(function(g){return this.len+=(this.tail=this.tail.next=new f((g=g>>>0)<128?1:g<16384?2:g<2097152?3:g<268435456?4:5,g)).len,this},"write_uint32"),e.prototype.int32=i(function(g){return g<0?this._push(p,10,h.fromNumber(g)):this.uint32(g)},"write_int32"),e.prototype.sint32=i(function(g){return this.uint32((g<<1^g>>31)>>>0)},"write_sint32");function p(g,y,_){for(;g.hi;)y[_++]=g.lo&127|128,g.lo=(g.lo>>>7|g.hi<<25)>>>0,g.hi>>>=7;for(;g.lo>127;)y[_++]=g.lo&127|128,g.lo=g.lo>>>7;y[_++]=g.lo}v(p,"writeVarint64"),i(p,"writeVarint64"),e.prototype.uint64=i(function(g){var y=h.from(g);return this._push(p,y.length(),y)},"write_uint64"),e.prototype.int64=e.prototype.uint64,e.prototype.sint64=i(function(g){var y=h.from(g).zzEncode();return this._push(p,y.length(),y)},"write_sint64"),e.prototype.bool=i(function(g){return this._push(a,1,g?1:0)},"write_bool");function m(g,y,_){y[_]=g&255,y[_+1]=g>>>8&255,y[_+2]=g>>>16&255,y[_+3]=g>>>24}v(m,"writeFixed32"),i(m,"writeFixed32"),e.prototype.fixed32=i(function(g){return this._push(m,4,g>>>0)},"write_fixed32"),e.prototype.sfixed32=e.prototype.fixed32,e.prototype.fixed64=i(function(g){var y=h.from(g);return this._push(m,4,y.lo)._push(m,4,y.hi)},"write_fixed64"),e.prototype.sfixed64=e.prototype.fixed64,e.prototype.float=i(function(g){return this._push(d.float.writeFloatLE,4,g)},"write_float"),e.prototype.double=i(function(g){return this._push(d.float.writeDoubleLE,8,g)},"write_double");var O=d.Array.prototype.set?i(function(g,y,_){y.set(g,_)},"writeBytes_set"):i(function(g,y,_){for(var E=0;E<g.length;++E)y[_+E]=g[E]},"writeBytes_for");return e.prototype.bytes=i(function(g){var y=g.length>>>0;if(!y)return this._push(a,1,0);if(d.isString(g)){var _=e.alloc(y=c.length(g));c.decode(g,_,0),g=_}return this.uint32(y)._push(O,y,g)},"write_bytes"),e.prototype.string=i(function(g){var y=o.length(g);return y?this.uint32(y)._push(o.write,y,g):this._push(a,1,0)},"write_string"),e.prototype.fork=i(function(){return this.states=new t(this),this.head=this.tail=new r(n,0,0),this.len=0,this},"fork"),e.prototype.reset=i(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 r(n,0,0),this.len=0),this},"reset"),e.prototype.ldelim=i(function(){var g=this.head,y=this.tail,_=this.len;return this.reset().uint32(_),_&&(this.tail.next=g.next,this.tail=y,this.len+=_),this},"ldelim"),e.prototype.finish=i(function(){for(var g=this.head.next,y=this.constructor.alloc(this.len),_=0;g;)g.fn(g.val,y,_),_+=g.len,g=g.next;return y},"finish"),e._configure=function(g){l=g,e.create=u(),l._configure()},De}v(mt,"requireWriter");var Ce,Yt;function ri(){if(Yt)return Ce;Yt=1;var b=Object.defineProperty,i=v((o,r)=>b(o,"name",{value:r,configurable:!0}),"i");Ce=h;var d=mt();(h.prototype=Object.create(d.prototype)).constructor=h;var l=ne();function h(){d.call(this)}v(h,"BufferWriter"),i(h,"BufferWriter"),h._configure=function(){h.alloc=l._Buffer_allocUnsafe,h.writeBytesBuffer=l.Buffer&&l.Buffer.prototype instanceof Uint8Array&&l.Buffer.prototype.set.name==="set"?i(function(o,r,n){r.set(o,n)},"writeBytesBuffer_set"):i(function(o,r,n){if(o.copy)o.copy(r,n,0,o.length);else for(var t=0;t<o.length;)r[n++]=o[t++]},"writeBytesBuffer_copy")},h.prototype.bytes=i(function(o){l.isString(o)&&(o=l._Buffer_from(o,"base64"));var r=o.length>>>0;return this.uint32(r),r&&this._push(h.writeBytesBuffer,r,o),this},"write_bytes_buffer");function c(o,r,n){o.length<40?l.utf8.write(o,r,n):r.utf8Write?r.utf8Write(o,n):r.write(o,n)}return v(c,"writeStringBuffer"),i(c,"writeStringBuffer"),h.prototype.string=i(function(o){var r=l.Buffer.byteLength(o);return this.uint32(r),r&&this._push(c,r,o),this},"write_string_buffer"),h._configure(),Ce}v(ri,"requireWriter_buffer");var Je,Kt;function gt(){if(Kt)return Je;Kt=1;var b=Object.defineProperty,i=v((s,f)=>b(s,"name",{value:f,configurable:!0}),"s");Je=r;var d=ne(),l,h=d.LongBits,c=d.utf8;function o(s,f){return RangeError("index out of range: "+s.pos+" + "+(f||1)+" > "+s.len)}v(o,"indexOutOfRange"),i(o,"indexOutOfRange");function r(s){this.buf=s,this.pos=0,this.len=s.length}v(r,"Reader"),i(r,"Reader");var n=typeof Uint8Array<"u"?i(function(s){if(s instanceof Uint8Array||Array.isArray(s))return new r(s);throw Error("illegal buffer")},"create_typed_array"):i(function(s){if(Array.isArray(s))return new r(s);throw Error("illegal buffer")},"create_array"),t=i(function(){return d.Buffer?i(function(s){return(r.create=i(function(f){return d.Buffer.isBuffer(f)?new l(f):n(f)},"create_buffer"))(s)},"create_buffer_setup"):n},"create");r.create=t(),r.prototype._slice=d.Array.prototype.subarray||d.Array.prototype.slice,r.prototype.uint32=i((function(){var s=4294967295;return i(function(){if(s=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(s=(s|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(s=(s|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(s=(s|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(s=(s|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return s;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return s},"read_uint32")}),"read_uint32_setup")(),r.prototype.int32=i(function(){return this.uint32()|0},"read_int32"),r.prototype.sint32=i(function(){var s=this.uint32();return s>>>1^-(s&1)|0},"read_sint32");function e(){var s=new h(0,0),f=0;if(this.len-this.pos>4){for(;f<4;++f)if(s.lo=(s.lo|(this.buf[this.pos]&127)<<f*7)>>>0,this.buf[this.pos++]<128)return s;if(s.lo=(s.lo|(this.buf[this.pos]&127)<<28)>>>0,s.hi=(s.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return s;f=0}else{for(;f<3;++f){if(this.pos>=this.len)throw o(this);if(s.lo=(s.lo|(this.buf[this.pos]&127)<<f*7)>>>0,this.buf[this.pos++]<128)return s}return s.lo=(s.lo|(this.buf[this.pos++]&127)<<f*7)>>>0,s}if(this.len-this.pos>4){for(;f<5;++f)if(s.hi=(s.hi|(this.buf[this.pos]&127)<<f*7+3)>>>0,this.buf[this.pos++]<128)return s}else for(;f<5;++f){if(this.pos>=this.len)throw o(this);if(s.hi=(s.hi|(this.buf[this.pos]&127)<<f*7+3)>>>0,this.buf[this.pos++]<128)return s}throw Error("invalid varint encoding")}v(e,"readLongVarint"),i(e,"readLongVarint"),r.prototype.bool=i(function(){return this.uint32()!==0},"read_bool");function u(s,f){return(s[f-4]|s[f-3]<<8|s[f-2]<<16|s[f-1]<<24)>>>0}v(u,"readFixed32_end"),i(u,"readFixed32_end"),r.prototype.fixed32=i(function(){if(this.pos+4>this.len)throw o(this,4);return u(this.buf,this.pos+=4)},"read_fixed32"),r.prototype.sfixed32=i(function(){if(this.pos+4>this.len)throw o(this,4);return u(this.buf,this.pos+=4)|0},"read_sfixed32");function a(){if(this.pos+8>this.len)throw o(this,8);return new h(u(this.buf,this.pos+=4),u(this.buf,this.pos+=4))}return v(a,"readFixed64"),i(a,"readFixed64"),r.prototype.float=i(function(){if(this.pos+4>this.len)throw o(this,4);var s=d.float.readFloatLE(this.buf,this.pos);return this.pos+=4,s},"read_float"),r.prototype.double=i(function(){if(this.pos+8>this.len)throw o(this,4);var s=d.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,s},"read_double"),r.prototype.bytes=i(function(){var s=this.uint32(),f=this.pos,p=this.pos+s;if(p>this.len)throw o(this,s);if(this.pos+=s,Array.isArray(this.buf))return this.buf.slice(f,p);if(f===p){var m=d.Buffer;return m?m.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,f,p)},"read_bytes"),r.prototype.string=i(function(){var s=this.bytes();return c.read(s,0,s.length)},"read_string"),r.prototype.skip=i(function(s){if(typeof s=="number"){if(this.pos+s>this.len)throw o(this,s);this.pos+=s}else do if(this.pos>=this.len)throw o(this);while(this.buf[this.pos++]&128);return this},"skip"),r.recursionLimit=d.recursionLimit,r.prototype.skipType=function(s,f){if(f===void 0&&(f=0),f>r.recursionLimit)throw Error("maximum nesting depth exceeded");switch(s){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(s=this.uint32()&7)!==4;)this.skipType(s,f+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+s+" at offset "+this.pos)}return this},r._configure=function(s){l=s,r.create=t(),l._configure();var f=d.Long?"toLong":"toNumber";d.merge(r.prototype,{int64:i(function(){return e.call(this)[f](!1)},"read_int64"),uint64:i(function(){return e.call(this)[f](!0)},"read_uint64"),sint64:i(function(){return e.call(this).zzDecode()[f](!1)},"read_sint64"),fixed64:i(function(){return a.call(this)[f](!0)},"read_fixed64"),sfixed64:i(function(){return a.call(this)[f](!1)},"read_sfixed64")})},Je}v(gt,"requireReader");var Me,Zt;function ii(){if(Zt)return Me;Zt=1;var b=Object.defineProperty,i=v((c,o)=>b(c,"name",{value:o,configurable:!0}),"i");Me=h;var d=gt();(h.prototype=Object.create(d.prototype)).constructor=h;var l=ne();function h(c){d.call(this,c)}return v(h,"BufferReader"),i(h,"BufferReader"),h._configure=function(){l.Buffer&&(h.prototype._slice=l.Buffer.prototype.slice)},h.prototype.string=i(function(){var c=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+c,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+c,this.len))},"read_string_buffer"),h._configure(),Me}v(ii,"requireReader_buffer");var Ve={},$e,Qt;function ni(){if(Qt)return $e;Qt=1;var b=Object.defineProperty,i=v((h,c)=>b(h,"name",{value:c,configurable:!0}),"u");$e=l;var d=ne();(l.prototype=Object.create(d.EventEmitter.prototype)).constructor=l;function l(h,c,o){if(typeof h!="function")throw TypeError("rpcImpl must be a function");d.EventEmitter.call(this),this.rpcImpl=h,this.requestDelimited=!!c,this.responseDelimited=!!o}return v(l,"Service"),i(l,"Service"),l.prototype.rpcCall=i(v(function h(c,o,r,n,t){if(!n)throw TypeError("request must be specified");var e=this;if(!t)return d.asPromise(h,e,c,o,r,n);if(!e.rpcImpl){setTimeout(function(){t(Error("already ended"))},0);return}try{return e.rpcImpl(c,o[e.requestDelimited?"encodeDelimited":"encode"](n).finish(),i(function(u,a){if(u)return e.emit("error",u,c),t(u);if(a===null){e.end(!0);return}if(!(a instanceof r))try{a=r[e.responseDelimited?"decodeDelimited":"decode"](a)}catch(s){return e.emit("error",s,c),t(s)}return e.emit("data",a,c),t(null,a)},"rpcCallback"))}catch(u){e.emit("error",u,c),setTimeout(function(){t(u)},0);return}},"i"),"rpcCall"),l.prototype.end=i(function(h){return this.rpcImpl&&(h||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},"end"),$e}v(ni,"requireService$1");var er;function qr(){return er||(er=1,(function(b){var i=b;i.Service=ni()})(Ve)),Ve}v(qr,"requireRpc");var ze,tr;function Ir(){return tr||(tr=1,ze={}),ze}v(Ir,"requireRoots");var rr;function oi(){return rr||(rr=1,(function(b){var i=Object.defineProperty,d=v((c,o)=>i(c,"name",{value:o,configurable:!0}),"r"),l=b;l.build="minimal",l.Writer=mt(),l.BufferWriter=ri(),l.Reader=gt(),l.BufferReader=ii(),l.util=ne(),l.rpc=qr(),l.roots=Ir(),l.configure=h;function h(){l.util._configure(),l.Writer._configure(l.BufferWriter),l.Reader._configure(l.BufferReader)}v(h,"configure"),d(h,"configure"),h()})(Ne)),Ne}v(oi,"requireIndexMinimal");var Ue={},We={exports:{}},He={},ir;function Lr(){return ir||(ir=1,(function(b){var i=b;i.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,i.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,i.reservedRe=/^(?: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)$/,i.unsafePropertyRe=/^(?:__proto__|prototype|constructor)$/})(He)),He}v(Lr,"requirePatterns");var Ge,nr;function si(){if(nr)return Ge;nr=1;var b=Object.defineProperty,i=v((o,r)=>b(o,"name",{value:r,configurable:!0}),"i");Ge=h;var d=Lr(),l=d.reservedRe;function h(o,r){typeof o=="string"&&(r=o,o=void 0);var n=[];function t(u){if(typeof u!="string"){var a=e();if(h.verbose&&console.log("codegen: "+a),a="return "+a,u){for(var s=Object.keys(u),f=new Array(s.length+1),p=new Array(s.length),m=0;m<s.length;)f[m]=s[m],p[m]=u[s[m++]];return f[m]=a,Function.apply(null,f).apply(null,p)}return Function(a)()}for(var O=new Array(arguments.length-1),g=0;g<O.length;)O[g]=arguments[++g];if(g=0,u=u.replace(/%([%dfijs])/g,i(function(y,_){var E=O[g++];switch(_){case"d":case"f":return String(Number(E));case"i":return String(Math.floor(E));case"j":return JSON.stringify(E);case"s":return String(E)}return"%"},"replace")),g!==O.length)throw Error("parameter count mismatch");return n.push(u),t}v(t,"v"),i(t,"Codegen");function e(u){return"function "+c(u||r)+"("+(o&&o.join(",")||"")+`){
2
+ `+n.join(`
3
+ `)+`
4
+ }`}return v(e,"f"),i(e,"toString"),t.toString=e,t}v(h,"codegen"),i(h,"codegen"),h.verbose=!1;function c(o){return!o||(o=String(o).replace(/[^\w$]/g,""),!o)?"":(/^\d/.test(o)&&(o="_"+o),l.test(o)?o+"_":o)}return v(c,"safeFunctionName"),i(c,"safeFunctionName"),Ge}v(si,"requireCodegen");var Xe,or;function ai(){if(or)return Xe;or=1;var b=Object.defineProperty,i=v((o,r)=>b(o,"name",{value:r,configurable:!0}),"i");Xe=c;var d=xr(),l=Fr(),h=l("fs");function c(o,r,n){return typeof r=="function"?(n=r,r={}):r||(r={}),n?!r.xhr&&h&&h.readFile?h.readFile(o,i(function(t,e){return t&&typeof XMLHttpRequest<"u"?c.xhr(o,r,n):t?n(t):n(null,r.binary?e:e.toString("utf8"))},"fetchReadFileCallback")):c.xhr(o,r,n):d(c,this,o,r)}return v(c,"fetch"),i(c,"fetch"),c.xhr=i(function(o,r,n){var t=new XMLHttpRequest;t.onreadystatechange=i(function(){if(t.readyState===4){if(t.status!==0&&t.status!==200)return n(Error("status "+t.status));if(r.binary){var e=t.response;if(!e){e=[];for(var u=0;u<t.responseText.length;++u)e.push(t.responseText.charCodeAt(u)&255)}return n(null,typeof Uint8Array<"u"?new Uint8Array(e):e)}return n(null,t.responseText)}},"fetchOnReadyStateChange"),r.binary&&("overrideMimeType"in t&&t.overrideMimeType("text/plain; charset=x-user-defined"),t.responseType="arraybuffer"),t.open("GET",o),t.send()},"fetch_xhr"),Xe}v(ai,"requireFetch");var Ye={},sr;function ui(){return sr||(sr=1,(function(b){var i=Object.defineProperty,d=v((o,r)=>i(o,"name",{value:r,configurable:!0}),"t"),l=b,h=l.isAbsolute=d(function(o){return/^(?:\/|\w+:|\\\\\w+)/.test(o)},"isAbsolute"),c=l.normalize=d(function(o){var r=o.substring(0,2),n="";r==="\\\\"&&(n=r,o=o.substring(2)),o=o.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=o.split("/"),e=h(o),u="";e&&(u=t.shift()+"/");for(var a=0;a<t.length;)t[a]===".."?a>0&&t[a-1]!==".."?t.splice(--a,2):e?t.splice(a,1):++a:t[a]==="."?t.splice(a,1):++a;return n+u+t.join("/")},"normalize");l.resolve=d(function(o,r,n){return n||(r=c(r)),h(r)?r:(n||(o=c(o)),(o=o.replace(/(?:\/|^)[^/]+$/,"")).length?c(o+"/"+r):r)},"resolve")})(Ye)),Ye}v(ui,"requirePath");var Ke,ar;function ge(){if(ar)return Ke;ar=1;var b=Object.defineProperty,i=v((a,s)=>b(a,"name",{value:s,configurable:!0}),"i");Ke=e;var d=fe();((e.prototype=Object.create(d.prototype)).constructor=e).className="Namespace";var l=ue(),h=H(),c=de(),o,r,n;e.fromJSON=i(function(a,s){return new e(a,s.options).addJSON(s.nested)},"fromJSON");function t(a,s){if(a&&a.length){for(var f={},p=0;p<a.length;++p)f[a[p].name]=a[p].toJSON(s);return f}}v(t,"arrayToJSON"),i(t,"arrayToJSON"),e.arrayToJSON=t,e.isReservedId=i(function(a,s){if(a){for(var f=0;f<a.length;++f)if(typeof a[f]!="string"&&a[f][0]<=s&&a[f][1]>s)return!0}return!1},"isReservedId"),e.isReservedName=i(function(a,s){if(a){for(var f=0;f<a.length;++f)if(a[f]===s)return!0}return!1},"isReservedName");function e(a,s){d.call(this,a,s),this.nested=void 0,this._nestedArray=null,this._lookupCache=Object.create(null),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}v(e,"Namespace"),i(e,"Namespace");function u(a){a._nestedArray=null,a._lookupCache=Object.create(null);for(var s=a;s=s.parent;)s._lookupCache=Object.create(null);return a}return v(u,"clearCache"),i(u,"clearCache"),Object.defineProperty(e.prototype,"nestedArray",{get:i(function(){return this._nestedArray||(this._nestedArray=h.toArray(this.nested))},"get")}),e.prototype.toJSON=i(function(a){return h.toObject(["options",this.options,"nested",t(this.nestedArray,a)])},"toJSON"),e.prototype.addJSON=i(function(a){var s=this;if(a)for(var f=Object.keys(a),p=0,m;p<f.length;++p)m=a[f[p]],s.add((m.fields!==void 0?o.fromJSON:m.values!==void 0?n.fromJSON:m.methods!==void 0?r.fromJSON:m.id!==void 0?l.fromJSON:e.fromJSON)(f[p],m));return this},"addJSON"),e.prototype.get=i(function(a){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,a)?this.nested[a]:null},"get"),e.prototype.getEnum=i(function(a){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,a)&&this.nested[a]instanceof n)return this.nested[a].values;throw Error("no such enum: "+a)},"getEnum"),e.prototype.add=i(function(a){if(!(a instanceof l&&a.extend!==void 0||a instanceof o||a instanceof c||a instanceof n||a instanceof r||a instanceof e))throw TypeError("object must be a valid nested object");if(a.name==="__proto__")return this;if(!this.nested)this.nested={};else{var s=this.get(a.name);if(s)if(s instanceof e&&a instanceof e&&!(s instanceof o||s instanceof r)){for(var f=s.nestedArray,p=0;p<f.length;++p)a.add(f[p]);this.remove(s),this.nested||(this.nested={}),a.setOptions(s.options,!0)}else throw Error("duplicate name '"+a.name+"' in "+this)}this.nested[a.name]=a,this instanceof o||this instanceof r||this instanceof n||this instanceof l||a._edition||(a._edition=a._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var m=this;m=m.parent;)m._needsRecursiveFeatureResolution=!0,m._needsRecursiveResolve=!0;return a.onAdd(this),u(this)},"add"),e.prototype.remove=i(function(a){if(!(a instanceof d))throw TypeError("object must be a ReflectionObject");if(a.parent!==this)throw Error(a+" is not a member of "+this);return delete this.nested[a.name],Object.keys(this.nested).length||(this.nested=void 0),a.onRemove(this),u(this)},"remove"),e.prototype.define=i(function(a,s){if(h.isString(a))a=a.split(".");else if(!Array.isArray(a))throw TypeError("illegal path");if(a&&a.length&&a[0]==="")throw Error("path must be relative");for(var f=this;a.length>0;){var p=a.shift();if(f.nested&&f.nested[p]){if(f=f.nested[p],!(f instanceof e))throw Error("path conflicts with non-namespace objects")}else f.add(f=new e(p))}return s&&f.addJSON(s),f},"define"),e.prototype.resolveAll=i(function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var a=this.nestedArray,s=0;for(this.resolve();s<a.length;)a[s]instanceof e?a[s++].resolveAll():a[s++].resolve();return this._needsRecursiveResolve=!1,this},"resolveAll"),e.prototype._resolveFeaturesRecursive=i(function(a){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,a=this._edition||a,d.prototype._resolveFeaturesRecursive.call(this,a),this.nestedArray.forEach(s=>{s._resolveFeaturesRecursive(a)}),this):this},"_resolveFeaturesRecursive"),e.prototype.lookup=i(function(a,s,f){if(typeof s=="boolean"?(f=s,s=void 0):s&&!Array.isArray(s)&&(s=[s]),h.isString(a)&&a.length){if(a===".")return this.root;a=a.split(".")}else if(!a.length)return this;var p=a.join(".");if(a[0]==="")return this.root.lookup(a.slice(1),s);var m=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+p];if(m&&(!s||s.indexOf(m.constructor)>-1)||(m=this._lookupImpl(a,p),m&&(!s||s.indexOf(m.constructor)>-1)))return m;if(f)return null;for(var O=this;O.parent;){if(m=O.parent._lookupImpl(a,p),m&&(!s||s.indexOf(m.constructor)>-1))return m;O=O.parent}return null},"lookup"),e.prototype._lookupImpl=i(function(a,s){if(Object.prototype.hasOwnProperty.call(this._lookupCache,s))return this._lookupCache[s];var f=this.get(a[0]),p=null;if(f)a.length===1?p=f:f instanceof e&&(a=a.slice(1),p=f._lookupImpl(a,a.join(".")));else for(var m=0;m<this.nestedArray.length;++m)this._nestedArray[m]instanceof e&&(f=this._nestedArray[m]._lookupImpl(a,s))&&(p=f);return this._lookupCache[s]=p,p},"lookup"),e.prototype.lookupType=i(function(a){var s=this.lookup(a,[o]);if(!s)throw Error("no such type: "+a);return s},"lookupType"),e.prototype.lookupEnum=i(function(a){var s=this.lookup(a,[n]);if(!s)throw Error("no such Enum '"+a+"' in "+this);return s},"lookupEnum"),e.prototype.lookupTypeOrEnum=i(function(a){var s=this.lookup(a,[o,n]);if(!s)throw Error("no such Type or Enum '"+a+"' in "+this);return s},"lookupTypeOrEnum"),e.prototype.lookupService=i(function(a){var s=this.lookup(a,[r]);if(!s)throw Error("no such Service '"+a+"' in "+this);return s},"lookupService"),e._configure=function(a,s,f){o=a,r=s,n=f},Ke}v(ge,"requireNamespace");var Ze,ur;function bt(){if(ur)return Ze;ur=1;var b=Object.defineProperty,i=v((o,r)=>b(o,"name",{value:r,configurable:!0}),"i");Ze=c;var d=ue();((c.prototype=Object.create(d.prototype)).constructor=c).className="MapField";var l=pe(),h=H();function c(o,r,n,t,e,u){if(d.call(this,o,r,t,void 0,void 0,e,u),!h.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}return v(c,"MapField"),i(c,"MapField"),c.fromJSON=i(function(o,r){return new c(o,r.id,r.keyType,r.type,r.options,r.comment)},"fromJSON"),c.prototype.toJSON=i(function(o){var r=o?!!o.keepComments:!1;return h.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",r?this.comment:void 0])},"toJSON"),c.prototype.resolve=i(function(){if(this.resolved)return this;if(l.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return d.prototype.resolve.call(this)},"resolve"),c.d=i(function(o,r,n){return typeof n=="function"?n=h.decorateType(n).name:n&&typeof n=="object"&&(n=h.decorateEnum(n).name),i(function(t,e){h.decorateType(t.constructor).add(new c(e,o,r,n))},"mapFieldDecorator")},"decorateMapField"),Ze}v(bt,"requireMapfield");var Qe,fr;function _t(){if(fr)return Qe;fr=1;var b=Object.defineProperty,i=v((c,o)=>b(c,"name",{value:o,configurable:!0}),"i");Qe=h;var d=fe();((h.prototype=Object.create(d.prototype)).constructor=h).className="Method";var l=H();function h(c,o,r,n,t,e,u,a,s){if(l.isObject(t)?(u=t,t=e=void 0):l.isObject(e)&&(u=e,e=void 0),!(o===void 0||l.isString(o)))throw TypeError("type must be a string");if(!l.isString(r))throw TypeError("requestType must be a string");if(!l.isString(n))throw TypeError("responseType must be a string");d.call(this,c,u),this.type=o||"rpc",this.requestType=r,this.requestStream=t?!0:void 0,this.responseType=n,this.responseStream=e?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=a,this.parsedOptions=s}return v(h,"Method"),i(h,"Method"),h.fromJSON=i(function(c,o){return new h(c,o.type,o.requestType,o.responseType,o.requestStream,o.responseStream,o.options,o.comment,o.parsedOptions)},"fromJSON"),h.prototype.toJSON=i(function(c){var o=c?!!c.keepComments:!1;return l.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",o?this.comment:void 0,"parsedOptions",this.parsedOptions])},"toJSON"),h.prototype.resolve=i(function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),d.prototype.resolve.call(this))},"resolve"),Qe}v(_t,"requireMethod");var et,lr;function Ot(){if(lr)return et;lr=1;var b=Object.defineProperty,i=v((t,e)=>b(t,"name",{value:e,configurable:!0}),"o");et=r;var d=ge();((r.prototype=Object.create(d.prototype)).constructor=r).className="Service";var l=_t(),h=H(),c=qr(),o=h.patterns.reservedRe;function r(t,e){d.call(this,t,e),this.methods={},this._methodsArray=null}v(r,"Service"),i(r,"Service"),r.fromJSON=i(function(t,e){var u=new r(t,e.options);if(e.methods)for(var a=Object.keys(e.methods),s=0;s<a.length;++s)u.add(l.fromJSON(a[s],e.methods[a[s]]));return e.nested&&u.addJSON(e.nested),e.edition&&(u._edition=e.edition),u.comment=e.comment,u._defaultEdition="proto3",u},"fromJSON"),r.prototype.toJSON=i(function(t){var e=d.prototype.toJSON.call(this,t),u=t?!!t.keepComments:!1;return h.toObject(["edition",this._editionToJSON(),"options",e&&e.options||void 0,"methods",d.arrayToJSON(this.methodsArray,t)||{},"nested",e&&e.nested||void 0,"comment",u?this.comment:void 0])},"toJSON"),Object.defineProperty(r.prototype,"methodsArray",{get:i(function(){return this._methodsArray||(this._methodsArray=h.toArray(this.methods))},"get")});function n(t){return t._methodsArray=null,t}return v(n,"clearCache"),i(n,"clearCache"),r.prototype.get=i(function(t){return Object.prototype.hasOwnProperty.call(this.methods,t)?this.methods[t]:d.prototype.get.call(this,t)},"get"),r.prototype.resolveAll=i(function(){if(!this._needsRecursiveResolve)return this;d.prototype.resolve.call(this);for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return this},"resolveAll"),r.prototype._resolveFeaturesRecursive=i(function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,d.prototype._resolveFeaturesRecursive.call(this,t),this.methodsArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},"_resolveFeaturesRecursive"),r.prototype.add=i(function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof l?t.name==="__proto__"?this:(this.methods[t.name]=t,t.parent=this,n(this)):d.prototype.add.call(this,t)},"add"),r.prototype.remove=i(function(t){if(t instanceof l){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,n(this)}return d.prototype.remove.call(this,t)},"remove"),r.prototype.create=i(function(t,e,u){for(var a=new c.Service(t,e,u),s=0,f;s<this.methodsArray.length;++s){var p=h.lcFirst((f=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");a[p]=h.codegen(["r","c"],o.test(p)?p+"_":p)("return this.rpcCall(m,q,s,r,c)")({m:f,q:f.resolvedRequestType.ctor,s:f.resolvedResponseType.ctor})}return a},"create"),et}v(Ot,"requireService");var tt,cr;function wt(){if(cr)return tt;cr=1;var b=Object.defineProperty,i=v((h,c)=>b(h,"name",{value:c,configurable:!0}),"i");tt=l;var d=ne();function l(h){if(h)for(var c=Object.keys(h),o=0;o<c.length;++o){var r=c[o];r!=="__proto__"&&(this[r]=h[r])}}return v(l,"Message"),i(l,"Message"),l.create=i(function(h){return this.$type.create(h)},"create"),l.encode=i(function(h,c){return this.$type.encode(h,c)},"encode"),l.encodeDelimited=i(function(h,c){return this.$type.encodeDelimited(h,c)},"encodeDelimited"),l.decode=i(function(h){return this.$type.decode(h)},"decode"),l.decodeDelimited=i(function(h){return this.$type.decodeDelimited(h)},"decodeDelimited"),l.verify=i(function(h){return this.$type.verify(h)},"verify"),l.fromObject=i(function(h){return this.$type.fromObject(h)},"fromObject"),l.toObject=i(function(h,c){return this.$type.toObject(h,c)},"toObject"),l.prototype.toJSON=i(function(){return this.$type.toObject(this,d.toJSONOptions)},"toJSON"),tt}v(wt,"requireMessage");var rt,pr;function Br(){if(pr)return rt;pr=1;var b=Object.defineProperty,i=v((r,n)=>b(r,"name",{value:n,configurable:!0}),"t");rt=o;var d=ie(),l=pe(),h=H();function c(r){return"missing required '"+r.name+"'"}v(c,"missing"),i(c,"missing");function o(r){for(var n=h.codegen(["r","l","e","n"],r.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(r.fieldsArray.filter(function(f){return f.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),t=0;t<r.fieldsArray.length;++t){var e=r._fieldsArray[t].resolve(),u=e.resolvedType instanceof d?"int32":e.type,a="m"+h.safeProp(e.name);n("case %i: {",e.id),e.map?(n("if(%s===util.emptyObject)",a)("%s={}",a)("var c2 = r.uint32()+r.pos"),l.defaults[e.keyType]!==void 0?n("k=%j",l.defaults[e.keyType]):n("k=null"),l.defaults[u]!==void 0?n("value=%j",l.defaults[u]):n("value=null"),n("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",e.keyType)("case 2:"),l.basic[u]===void 0?n("value=types[%i].decode(r,r.uint32(),undefined,n+1)",t):n("value=r.%s()",u),n("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"),l.long[e.keyType]!==void 0?n('%s[typeof k==="object"?util.longToHash(k):k]=value',a):(e.keyType==="string"&&n('if(k==="__proto__")')("util.makeProp(%s,k)",a),n("%s[k]=value",a))):e.repeated?(n("if(!(%s&&%s.length))",a,a)("%s=[]",a),l.packed[u]!==void 0&&n("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",a,u)("}else"),l.basic[u]===void 0?n(e.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))":"%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))",a,t):n("%s.push(r.%s())",a,u)):l.basic[u]===void 0?n(e.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)":"%s=types[%i].decode(r,r.uint32(),undefined,n+1)",a,t):n("%s=r.%s()",a,u),n("break")("}")}for(n("default:")("r.skipType(t&7,n)")("break")("}")("}"),t=0;t<r._fieldsArray.length;++t){var s=r._fieldsArray[t];s.required&&n("if(!m.hasOwnProperty(%j))",s.name)("throw util.ProtocolError(%j,{instance:m})",c(s))}return n("return m")}return v(o,"decoder"),i(o,"decoder"),rt}v(Br,"requireDecoder");var it,dr;function Dr(){if(dr)return it;dr=1;var b=Object.defineProperty,i=v((n,t)=>b(n,"name",{value:t,configurable:!0}),"u");it=r;var d=ie(),l=H();function h(n,t){return n.name+": "+t+(n.repeated&&t!=="array"?"[]":n.map&&t!=="object"?"{k:"+n.keyType+"}":"")+" expected"}v(h,"invalid"),i(h,"invalid");function c(n,t,e,u){if(t.resolvedType)if(t.resolvedType instanceof d){n("switch(%s){",u)("default:")("return%j",h(t,"enum value"));for(var a=Object.keys(t.resolvedType.values),s=0;s<a.length;++s)n("case %i:",t.resolvedType.values[a[s]]);n("break")("}")}else n("{")("var e=types[%i].verify(%s,n+1);",e,u)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":n("if(!util.isInteger(%s))",u)("return%j",h(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":n("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",u,u,u,u)("return%j",h(t,"integer|Long"));break;case"float":case"double":n('if(typeof %s!=="number")',u)("return%j",h(t,"number"));break;case"bool":n('if(typeof %s!=="boolean")',u)("return%j",h(t,"boolean"));break;case"string":n("if(!util.isString(%s))",u)("return%j",h(t,"string"));break;case"bytes":n('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',u,u,u)("return%j",h(t,"buffer"));break}return n}v(c,"genVerifyValue"),i(c,"genVerifyValue");function o(n,t,e){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":n("if(!util.key32Re.test(%s))",e)("return%j",h(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":n("if(!util.key64Re.test(%s))",e)("return%j",h(t,"integer|Long key"));break;case"bool":n("if(!util.key2Re.test(%s))",e)("return%j",h(t,"boolean key"));break}return n}v(o,"genVerifyKey"),i(o,"genVerifyKey");function r(n){var t=l.codegen(["m","n"],n.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j","maximum nesting depth exceeded"),e=n.oneofsArray,u={};e.length&&t("var p={}");for(var a=0;a<n.fieldsArray.length;++a){var s=n._fieldsArray[a].resolve(),f="m"+l.safeProp(s.name);if(s.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",f,s.name),s.map)t("if(!util.isObject(%s))",f)("return%j",h(s,"object"))("var k=Object.keys(%s)",f)("for(var i=0;i<k.length;++i){"),o(t,s,"k[i]"),c(t,s,a,f+"[k[i]]")("}");else if(s.repeated)t("if(!Array.isArray(%s))",f)("return%j",h(s,"array"))("for(var i=0;i<%s.length;++i){",f),c(t,s,a,f+"[i]")("}");else{if(s.partOf){var p=l.safeProp(s.partOf.name);u[s.partOf.name]===1&&t("if(p%s===1)",p)("return%j",s.partOf.name+": multiple values"),u[s.partOf.name]=1,t("p%s=1",p)}c(t,s,a,f)}s.optional&&t("}")}return t("return null")}return v(r,"verifier"),i(r,"verifier"),it}v(Dr,"requireVerifier");var nt={},hr;function Cr(){return hr||(hr=1,(function(b){var i=Object.defineProperty,d=v((n,t)=>i(n,"name",{value:t,configurable:!0}),"m"),l=b,h=ie(),c=H();function o(n,t,e,u){var a=!1;if(t.resolvedType)if(t.resolvedType instanceof h){n("switch(d%s){",u);for(var s=t.resolvedType.values,f=Object.keys(s),p=0;p<f.length;++p)s[f[p]]===t.typeDefault&&!a&&(n("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',u,u,u),t.repeated||n("break"),a=!0),n("case%j:",f[p])("case %i:",s[f[p]])("m%s=%j",u,s[f[p]])("break");n("}")}else n('if(typeof d%s!=="object")',u)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s,n+1)",u,e,u);else{var m=!1;switch(t.type){case"double":case"float":n("m%s=Number(d%s)",u,u);break;case"uint32":case"fixed32":n("m%s=d%s>>>0",u,u);break;case"int32":case"sint32":case"sfixed32":n("m%s=d%s|0",u,u);break;case"uint64":m=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":n("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",u,u,m)('else if(typeof d%s==="string")',u)("m%s=parseInt(d%s,10)",u,u)('else if(typeof d%s==="number")',u)("m%s=d%s",u,u)('else if(typeof d%s==="object")',u)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",u,u,u,m?"true":"");break;case"bytes":n('if(typeof d%s==="string")',u)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",u,u,u)("else if(d%s.length >= 0)",u)("m%s=d%s",u,u);break;case"string":n("m%s=String(d%s)",u,u);break;case"bool":n("m%s=Boolean(d%s)",u,u);break}}return n}v(o,"genValuePartial_fromObject"),d(o,"genValuePartial_fromObject"),l.fromObject=d(function(n){var t=n.fieldsArray,e=c.codegen(["d","n"],n.name+"$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');if(!t.length)return e("return new this.ctor");e("var m=new this.ctor");for(var u=0;u<t.length;++u){var a=t[u].resolve(),s=c.safeProp(a.name);a.map?(e("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),e('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",s),o(e,a,u,s+"[ks[i]]")("}")("}")):a.repeated?(e("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",s)("for(var i=0;i<d%s.length;++i){",s),o(e,a,u,s+"[i]")("}")("}")):(a.resolvedType instanceof h||e("if(d%s!=null){",s),o(e,a,u,s),a.resolvedType instanceof h||e("}"))}return e("return m")},"fromObject");function r(n,t,e,u){if(t.resolvedType)t.resolvedType instanceof h?n("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",u,e,u,u,e,u,u):n("d%s=types[%i].toObject(m%s,o)",u,e,u);else{var a=!1;switch(t.type){case"double":case"float":n("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",u,u,u,u);break;case"uint64":a=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":n('if(typeof m%s==="number")',u)("d%s=o.longs===String?String(m%s):m%s",u,u,u)("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",u,u,u,u,a?"true":"",u);break;case"bytes":n("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",u,u,u,u,u);break;default:n("d%s=m%s",u,u);break}}return n}v(r,"genValuePartial_toObject"),d(r,"genValuePartial_toObject"),l.toObject=d(function(n){var t=n.fieldsArray.slice().sort(c.compareFieldsById);if(!t.length)return c.codegen()("return {}");for(var e=c.codegen(["m","o"],n.name+"$toObject")("if(!o)")("o={}")("var d={}"),u=[],a=[],s=[],f=0;f<t.length;++f)t[f].partOf||(t[f].resolve().repeated?u:t[f].map?a:s).push(t[f]);if(u.length){for(e("if(o.arrays||o.defaults){"),f=0;f<u.length;++f)e("d%s=[]",c.safeProp(u[f].name));e("}")}if(a.length){for(e("if(o.objects||o.defaults){"),f=0;f<a.length;++f)e("d%s={}",c.safeProp(a[f].name));e("}")}if(s.length){for(e("if(o.defaults){"),f=0;f<s.length;++f){var p=s[f],m=c.safeProp(p.name);if(p.resolvedType instanceof h)e("d%s=o.enums===String?%j:%j",m,p.resolvedType.valuesById[p.typeDefault],p.typeDefault);else if(p.long)e("if(util.Long){")("var n=new util.Long(%i,%i,%j)",p.typeDefault.low,p.typeDefault.high,p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",m)("}else")("d%s=o.longs===String?%j:%i",m,p.typeDefault.toString(),p.typeDefault.toNumber());else if(p.bytes){var O=Array.prototype.slice.call(p.typeDefault);e("if(o.bytes===String)d%s=%j",m,String.fromCharCode.apply(String,p.typeDefault))("else{")("d%s=%j",m,O)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",m,m)("}")}else e("d%s=%j",m,p.typeDefault)}e("}")}var g=!1;for(f=0;f<t.length;++f){var p=t[f],y=n._fieldsArray.indexOf(p),m=c.safeProp(p.name);p.map?(g||(g=!0,e("var ks2")),e("if(m%s&&(ks2=Object.keys(m%s)).length){",m,m)("d%s={}",m)("for(var j=0;j<ks2.length;++j){"),e('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",m),r(e,p,y,m+"[ks2[j]]")("}")):p.repeated?(e("if(m%s&&m%s.length){",m,m)("d%s=[]",m)("for(var j=0;j<m%s.length;++j){",m),r(e,p,y,m+"[j]")("}")):(e("if(m%s!=null&&m.hasOwnProperty(%j)){",m,p.name),r(e,p,y,m),p.partOf&&e("if(o.oneofs)")("d%s=%j",c.safeProp(p.partOf.name),p.name)),e("}")}return e("return d")},"toObject")})(nt)),nt}v(Cr,"requireConverter");var ot={},vr;function Jr(){return vr||(vr=1,(function(b){var i=Object.defineProperty,d=v((c,o)=>i(c,"name",{value:o,configurable:!0}),"l"),l=b,h=wt();l[".google.protobuf.Any"]={fromObject:d(function(c,o){if(c&&c["@type"]){var r=c["@type"].substring(c["@type"].lastIndexOf("/")+1),n=this.lookup(r);if(n){var t=c["@type"].charAt(0)==="."?c["@type"].slice(1):c["@type"];t.indexOf("/")===-1&&(t="/"+t);var e=o===void 0?1:o+1;return this.create({type_url:t,value:n.encode(n.fromObject(c,e)).finish()})}}return this.fromObject(c,o)},"fromObject"),toObject:d(function(c,o){var r="type.googleapis.com/",n="",t="";if(o&&o.json&&c.type_url&&c.value){t=c.type_url.substring(c.type_url.lastIndexOf("/")+1),n=c.type_url.substring(0,c.type_url.lastIndexOf("/")+1);var e=this.lookup(t);e&&(c=e.decode(c.value))}if(!(c instanceof this.ctor)&&c instanceof h){var u=c.$type.toObject(c,o),a=c.$type.fullName[0]==="."?c.$type.fullName.slice(1):c.$type.fullName;return n===""&&(n=r),t=n+a,u["@type"]=t,u}return this.toObject(c,o)},"toObject")}})(ot)),ot}v(Jr,"requireWrappers");var st,yr;function jt(){if(yr)return st;yr=1;var b=Object.defineProperty,i=v((y,_)=>b(y,"name",{value:_,configurable:!0}),"s");st=O;var d=ge();((O.prototype=Object.create(d.prototype)).constructor=O).className="Type";var l=ie(),h=de(),c=ue(),o=bt(),r=Ot(),n=wt(),t=gt(),e=mt(),u=H(),a=Mr(),s=Br(),f=Dr(),p=Cr(),m=Jr();function O(y,_){y=y.replace(/\W/g,""),d.call(this,y,_),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}v(O,"Type"),i(O,"Type"),Object.defineProperties(O.prototype,{fieldsById:{get:i(function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var y=Object.keys(this.fields),_=0;_<y.length;++_){var E=this.fields[y[_]],S=E.id;if(this._fieldsById[S])throw Error("duplicate id "+S+" in "+this);this._fieldsById[S]=E}return this._fieldsById},"get")},fieldsArray:{get:i(function(){return this._fieldsArray||(this._fieldsArray=u.toArray(this.fields))},"get")},oneofsArray:{get:i(function(){return this._oneofsArray||(this._oneofsArray=u.toArray(this.oneofs))},"get")},ctor:{get:i(function(){return this._ctor||(this.ctor=O.generateConstructor(this)())},"get"),set:i(function(y){var _=y.prototype;_ instanceof n||((y.prototype=new n).constructor=y,u.merge(y.prototype,_)),y.$type=y.prototype.$type=this,u.merge(y,n,!0),this._ctor=y;for(var E=0;E<this.fieldsArray.length;++E)this._fieldsArray[E].resolve();var S={};for(E=0;E<this.oneofsArray.length;++E)S[this._oneofsArray[E].resolve().name]={get:u.oneOfGetter(this._oneofsArray[E].oneof),set:u.oneOfSetter(this._oneofsArray[E].oneof)};E&&Object.defineProperties(y.prototype,S)},"set")}}),O.generateConstructor=i(function(y){for(var _=u.codegen(["p"],y.name),E=0,S;E<y.fieldsArray.length;++E)(S=y._fieldsArray[E]).map?_("this%s={}",u.safeProp(S.name)):S.repeated&&_("this%s=[]",u.safeProp(S.name));return _('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]")},"generateConstructor");function g(y){return y._fieldsById=y._fieldsArray=y._oneofsArray=null,delete y.encode,delete y.decode,delete y.verify,y}return v(g,"clearCache"),i(g,"clearCache"),O.fromJSON=i(function(y,_){var E=new O(y,_.options);E.extensions=_.extensions,E.reserved=_.reserved;for(var S=Object.keys(_.fields),x=0;x<S.length;++x)E.add((typeof _.fields[S[x]].keyType<"u"?o.fromJSON:c.fromJSON)(S[x],_.fields[S[x]]));if(_.oneofs)for(S=Object.keys(_.oneofs),x=0;x<S.length;++x)E.add(h.fromJSON(S[x],_.oneofs[S[x]]));if(_.nested)for(S=Object.keys(_.nested),x=0;x<S.length;++x){var D=_.nested[S[x]];E.add((D.id!==void 0?c.fromJSON:D.fields!==void 0?O.fromJSON:D.values!==void 0?l.fromJSON:D.methods!==void 0?r.fromJSON:d.fromJSON)(S[x],D))}return _.extensions&&_.extensions.length&&(E.extensions=_.extensions),_.reserved&&_.reserved.length&&(E.reserved=_.reserved),_.group&&(E.group=!0),_.comment&&(E.comment=_.comment),_.edition&&(E._edition=_.edition),E._defaultEdition="proto3",E},"fromJSON"),O.prototype.toJSON=i(function(y){var _=d.prototype.toJSON.call(this,y),E=y?!!y.keepComments:!1;return u.toObject(["edition",this._editionToJSON(),"options",_&&_.options||void 0,"oneofs",d.arrayToJSON(this.oneofsArray,y),"fields",d.arrayToJSON(this.fieldsArray.filter(function(S){return!S.declaringField}),y)||{},"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",_&&_.nested||void 0,"comment",E?this.comment:void 0])},"toJSON"),O.prototype.resolveAll=i(function(){if(!this._needsRecursiveResolve)return this;d.prototype.resolveAll.call(this);var y=this.oneofsArray;for(E=0;E<y.length;)y[E++].resolve();for(var _=this.fieldsArray,E=0;E<_.length;)_[E++].resolve();return this},"resolveAll"),O.prototype._resolveFeaturesRecursive=i(function(y){return this._needsRecursiveFeatureResolution?(y=this._edition||y,d.prototype._resolveFeaturesRecursive.call(this,y),this.oneofsArray.forEach(_=>{_._resolveFeatures(y)}),this.fieldsArray.forEach(_=>{_._resolveFeatures(y)}),this):this},"_resolveFeaturesRecursive"),O.prototype.get=i(function(y){return Object.prototype.hasOwnProperty.call(this.fields,y)?this.fields[y]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,y)?this.oneofs[y]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,y)?this.nested[y]:null},"get"),O.prototype.add=i(function(y){if(this.get(y.name))throw Error("duplicate name '"+y.name+"' in "+this);if(y instanceof c&&y.extend===void 0){if(this._fieldsById?this._fieldsById[y.id]:this.fieldsById[y.id])throw Error("duplicate id "+y.id+" in "+this);if(this.isReservedId(y.id))throw Error("id "+y.id+" is reserved in "+this);if(this.isReservedName(y.name))throw Error("name '"+y.name+"' is reserved in "+this);return y.name==="__proto__"?this:(y.parent&&y.parent.remove(y),this.fields[y.name]=y,y.message=this,y.onAdd(this),g(this))}return y instanceof h?y.name==="__proto__"?this:(this.oneofs||(this.oneofs={}),this.oneofs[y.name]=y,y.onAdd(this),g(this)):d.prototype.add.call(this,y)},"add"),O.prototype.remove=i(function(y){if(y instanceof c&&y.extend===void 0){if(!this.fields||this.fields[y.name]!==y)throw Error(y+" is not a member of "+this);return delete this.fields[y.name],y.parent=null,y.onRemove(this),g(this)}if(y instanceof h){if(!this.oneofs||this.oneofs[y.name]!==y)throw Error(y+" is not a member of "+this);return delete this.oneofs[y.name],y.parent=null,y.onRemove(this),g(this)}return d.prototype.remove.call(this,y)},"remove"),O.prototype.isReservedId=i(function(y){return d.isReservedId(this.reserved,y)},"isReservedId"),O.prototype.isReservedName=i(function(y){return d.isReservedName(this.reserved,y)},"isReservedName"),O.prototype.create=i(function(y){return new this.ctor(y)},"create"),O.prototype.setup=i(function(){for(var y=this.fullName,_=[],E=0;E<this.fieldsArray.length;++E)_.push(this._fieldsArray[E].resolve().resolvedType);this.encode=a(this)({Writer:e,types:_,util:u}),this.decode=s(this)({Reader:t,types:_,util:u}),this.verify=f(this)({types:_,util:u}),this.fromObject=p.fromObject(this)({types:_,util:u}),this.toObject=p.toObject(this)({types:_,util:u});var S=m[y];if(S){var x=Object.create(this);x.fromObject=this.fromObject,this.fromObject=S.fromObject.bind(x),x.toObject=this.toObject,this.toObject=S.toObject.bind(x)}return this},"setup"),O.prototype.encode=i(function(y,_){return this.setup().encode(y,_)},"encode_setup"),O.prototype.encodeDelimited=i(function(y,_){return this.encode(y,_&&_.len?_.fork():_).ldelim()},"encodeDelimited"),O.prototype.decode=i(function(y,_,E,S){return this.setup().decode(y,_,E,S)},"decode_setup"),O.prototype.decodeDelimited=i(function(y){return y instanceof t||(y=t.create(y)),this.decode(y,y.uint32())},"decodeDelimited"),O.prototype.verify=i(function(y,_){return this.setup().verify(y,_)},"verify_setup"),O.prototype.fromObject=i(function(y,_){return this.setup().fromObject(y,_)},"fromObject"),O.prototype.toObject=i(function(y,_){return this.setup().toObject(y,_)},"toObject"),O.d=i(function(y){return i(function(_){u.decorateType(_,y)},"typeDecorator")},"decorateType"),st}v(jt,"requireType");var at,mr;function kt(){if(mr)return at;mr=1;var b=Object.defineProperty,i=v((f,p)=>b(f,"name",{value:p,configurable:!0}),"u");at=e;var d=ge();((e.prototype=Object.create(d.prototype)).constructor=e).className="Root";var l=ue(),h=ie(),c=de(),o=H(),r,n,t;function e(f){d.call(this,"",f),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}v(e,"Root"),i(e,"Root"),e.fromJSON=i(function(f,p){return p||(p=new e),f.options&&p.setOptions(f.options),p.addJSON(f.nested).resolveAll()},"fromJSON"),e.prototype.resolvePath=o.path.resolve,e.prototype.fetch=o.fetch;function u(){}v(u,"SYNC"),i(u,"SYNC"),e.prototype.load=i(v(function f(p,m,O){typeof m=="function"&&(O=m,m=void 0);var g=this;if(!O)return o.asPromise(f,g,p,m);var y=O===u;function _(L,B){if(O){if(y)throw L;B&&B.resolveAll();var A=O;O=null,A(L,B)}}v(_,"h"),i(_,"finish");function E(L){var B=L.lastIndexOf("google/protobuf/");if(B>-1){var A=L.substring(B);if(A in t)return A}return null}v(E,"y"),i(E,"getBundledFileName");function S(L,B){try{if(o.isString(B)&&B.charAt(0)==="{"&&(B=JSON.parse(B)),!o.isString(B))g.setOptions(B.options).addJSON(B.nested);else{n.filename=L;var A=n(B,g,m),U,z=0;if(A.imports)for(;z<A.imports.length;++z)(U=E(A.imports[z])||g.resolvePath(L,A.imports[z]))&&x(U);if(A.weakImports)for(z=0;z<A.weakImports.length;++z)(U=E(A.weakImports[z])||g.resolvePath(L,A.weakImports[z]))&&x(U,!0)}}catch(N){_(N)}!y&&!D&&_(null,g)}v(S,"v"),i(S,"process");function x(L,B){if(L=E(L)||L,!(g.files.indexOf(L)>-1)){if(g.files.push(L),L in t){y?S(L,t[L]):(++D,setTimeout(function(){--D,S(L,t[L])}));return}if(y){var A;try{A=o.fs.readFileSync(L).toString("utf8")}catch(U){B||_(U);return}S(L,A)}else++D,g.fetch(L,function(U,z){if(--D,!!O){if(U){B?D||_(null,g):_(U);return}S(L,z)}})}}v(x,"x"),i(x,"fetch");var D=0;o.isString(p)&&(p=[p]);for(var G=0,Z;G<p.length;++G)(Z=g.resolvePath("",p[G]))&&x(Z);return y?(g.resolveAll(),g):(D||_(null,g),g)},"o"),"load"),e.prototype.loadSync=i(function(f,p){if(!o.isNode)throw Error("not supported");return this.load(f,p,u)},"loadSync"),e.prototype.resolveAll=i(function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(f){return"'extend "+f.extend+"' in "+f.parent.fullName}).join(", "));return d.prototype.resolveAll.call(this)},"resolveAll");var a=/^[A-Z]/;function s(f,p){var m=p.parent.lookup(p.extend);if(m){var O=new l(p.fullName,p.id,p.type,p.rule,void 0,p.options);return m.get(O.name)||(O.declaringField=p,p.extensionField=O,m.add(O)),!0}return!1}return v(s,"tryHandleExtension"),i(s,"tryHandleExtension"),e.prototype._handleAdd=i(function(f){if(f instanceof l)f.extend!==void 0&&!f.extensionField&&(s(this,f)||this.deferred.push(f));else if(f instanceof h)a.test(f.name)&&(f.parent[f.name]=f.values);else if(!(f instanceof c)){if(f instanceof r)for(var p=0;p<this.deferred.length;)s(this,this.deferred[p])?this.deferred.splice(p,1):++p;for(var m=0;m<f.nestedArray.length;++m)this._handleAdd(f._nestedArray[m]);a.test(f.name)&&(f.parent[f.name]=f)}(f instanceof r||f instanceof h||f instanceof l)&&(this._fullyQualifiedObjects[f.fullName]=f)},"_handleAdd"),e.prototype._handleRemove=i(function(f){if(f instanceof l){if(f.extend!==void 0)if(f.extensionField)f.extensionField.parent.remove(f.extensionField),f.extensionField=null;else{var p=this.deferred.indexOf(f);p>-1&&this.deferred.splice(p,1)}}else if(f instanceof h)a.test(f.name)&&delete f.parent[f.name];else if(f instanceof d){for(var m=0;m<f.nestedArray.length;++m)this._handleRemove(f._nestedArray[m]);a.test(f.name)&&delete f.parent[f.name]}delete this._fullyQualifiedObjects[f.fullName]},"_handleRemove"),e._configure=function(f,p,m){r=f,n=p,t=m},at}v(kt,"requireRoot");var gr;function H(){if(gr)return We.exports;gr=1;var b=Object.defineProperty,i=v((e,u)=>b(e,"name",{value:u,configurable:!0}),"n"),d=We.exports=ne(),l=Ir(),h,c;d.codegen=si(),d.fetch=ai(),d.path=ui(),d.patterns=Lr();var o=d.patterns.reservedRe,r=d.patterns.unsafePropertyRe;d.fs=d.inquire("fs"),d.toArray=i(function(e){if(e){for(var u=Object.keys(e),a=new Array(u.length),s=0;s<u.length;)a[s]=e[u[s++]];return a}return[]},"toArray"),d.toObject=i(function(e){for(var u={},a=0;a<e.length;){var s=e[a++],f=e[a++];f!==void 0&&(u[s]=f)}return u},"toObject"),d.isReserved=i(function(e){return o.test(e)},"isReserved"),d.safeProp=i(function(e){return!/^[$\w_]+$/.test(e)||o.test(e)?"["+JSON.stringify(e)+"]":"."+e},"safeProp"),d.ucFirst=i(function(e){return e.charAt(0).toUpperCase()+e.substring(1)},"ucFirst");var n=/_([a-z])/g;d.camelCase=i(function(e){return e.substring(0,1)+e.substring(1).replace(n,function(u,a){return a.toUpperCase()})},"camelCase"),d.compareFieldsById=i(function(e,u){return e.id-u.id},"compareFieldsById"),d.decorateType=i(function(e,u){if(e.$type)return u&&e.$type.name!==u&&(d.decorateRoot.remove(e.$type),e.$type.name=u,d.decorateRoot.add(e.$type)),e.$type;h||(h=jt());var a=new h(u||e.name);return d.decorateRoot.add(a),a.ctor=e,Object.defineProperty(e,"$type",{value:a,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:a,enumerable:!1}),a},"decorateType");var t=0;return d.decorateEnum=i(function(e){if(e.$type)return e.$type;c||(c=ie());var u=new c("Enum"+t++,e);return d.decorateRoot.add(u),Object.defineProperty(e,"$type",{value:u,enumerable:!1}),u},"decorateEnum"),d.setProperty=i(function(e,u,a,s){function f(p,m,O){var g=m.shift();if(r.test(g))return p;if(m.length>0)p[g]=f(p[g]||{},m,O);else{var y=p[g];if(y&&s)return p;y&&(O=[].concat(y).concat(O)),p[g]=O}return p}if(v(f,"a"),i(f,"setProp"),typeof e!="object")throw TypeError("dst must be an object");if(!u)throw TypeError("path must be specified");return u=u.split("."),f(e,u,a)},"setProperty"),Object.defineProperty(d,"decorateRoot",{get:i(function(){return l.decorated||(l.decorated=new(kt()))},"get")}),We.exports}v(H,"requireUtil");var br;function pe(){return br||(br=1,(function(b){var i=Object.defineProperty,d=v((r,n)=>i(r,"name",{value:n,configurable:!0}),"r"),l=b,h=H(),c=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(r,n){var t=0,e=Object.create(null);for(n|=0;t<r.length;)e[c[t+n]]=r[t++];return e}v(o,"bake"),d(o,"bake"),l.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),l.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",h.emptyArray,null]),l.long=o([0,0,0,1,1],7),l.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),l.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])})(Ue)),Ue}v(pe,"requireTypes");var ut,_r;function ue(){if(_r)return ut;_r=1;var b=Object.defineProperty,i=v((t,e)=>b(t,"name",{value:e,configurable:!0}),"s");ut=n;var d=fe();((n.prototype=Object.create(d.prototype)).constructor=n).className="Field";var l=ie(),h=pe(),c=H(),o,r=/^required|optional|repeated$/;n.fromJSON=i(function(t,e){var u=new n(t,e.id,e.type,e.rule,e.extend,e.options,e.comment);return e.edition&&(u._edition=e.edition),u._defaultEdition="proto3",u},"fromJSON");function n(t,e,u,a,s,f,p){if(c.isObject(a)?(p=s,f=a,a=s=void 0):c.isObject(s)&&(p=f,f=s,s=void 0),d.call(this,t,f),!c.isInteger(e)||e<0)throw TypeError("id must be a non-negative integer");if(!c.isString(u))throw TypeError("type must be a string");if(a!==void 0&&!r.test(a=a.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(s!==void 0&&!c.isString(s))throw TypeError("extend must be a string");a==="proto3_optional"&&(a="optional"),this.rule=a&&a!=="optional"?a:void 0,this.type=u,this.id=e,this.extend=s||void 0,this.repeated=a==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=c.Long?h.long[u]!==void 0:!1,this.bytes=u==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=p}return v(n,"Field"),i(n,"Field"),Object.defineProperty(n.prototype,"required",{get:i(function(){return this._features.field_presence==="LEGACY_REQUIRED"},"get")}),Object.defineProperty(n.prototype,"optional",{get:i(function(){return!this.required},"get")}),Object.defineProperty(n.prototype,"delimited",{get:i(function(){return this.resolvedType instanceof o&&this._features.message_encoding==="DELIMITED"},"get")}),Object.defineProperty(n.prototype,"packed",{get:i(function(){return this._features.repeated_field_encoding==="PACKED"},"get")}),Object.defineProperty(n.prototype,"hasPresence",{get:i(function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"},"get")}),n.prototype.setOption=i(function(t,e,u){return d.prototype.setOption.call(this,t,e,u)},"setOption"),n.prototype.toJSON=i(function(t){var e=t?!!t.keepComments:!1;return c.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"),n.prototype.resolve=i(function(){if(this.resolved)return this;if((this.typeDefault=h.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?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 l&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof l)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=c.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var t;c.base64.test(this.typeDefault)?c.base64.decode(this.typeDefault,t=c.newBuffer(c.base64.length(this.typeDefault)),0):c.utf8.write(this.typeDefault,t=c.newBuffer(c.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=c.emptyObject:this.repeated?this.defaultValue=c.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),d.prototype.resolve.call(this)},"resolve"),n.prototype._inferLegacyProtoFeatures=i(function(t){if(t!=="proto2"&&t!=="proto3")return{};var e={};if(this.rule==="required"&&(e.field_presence="LEGACY_REQUIRED"),this.parent&&h.defaults[this.type]===void 0){var u=this.parent.get(this.type.split(".").pop());u&&u instanceof o&&u.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"),n.prototype._resolveFeatures=i(function(t){return d.prototype._resolveFeatures.call(this,this._edition||t)},"_resolveFeatures"),n.d=i(function(t,e,u,a){return typeof e=="function"?e=c.decorateType(e).name:e&&typeof e=="object"&&(e=c.decorateEnum(e).name),i(function(s,f){c.decorateType(s.constructor).add(new n(f,t,e,u,{default:a}))},"fieldDecorator")},"decorateField"),n._configure=i(function(t){o=t},"configure"),ut}v(ue,"requireField");var ft,Or;function de(){if(Or)return ft;Or=1;var b=Object.defineProperty,i=v((r,n)=>b(r,"name",{value:n,configurable:!0}),"o");ft=c;var d=fe();((c.prototype=Object.create(d.prototype)).constructor=c).className="OneOf";var l=ue(),h=H();function c(r,n,t,e){if(Array.isArray(n)||(t=n,n=void 0),d.call(this,r,t),!(n===void 0||Array.isArray(n)))throw TypeError("fieldNames must be an Array");this.oneof=n||[],this.fieldsArray=[],this.comment=e}v(c,"OneOf"),i(c,"OneOf"),c.fromJSON=i(function(r,n){return new c(r,n.oneof,n.options,n.comment)},"fromJSON"),c.prototype.toJSON=i(function(r){var n=r?!!r.keepComments:!1;return h.toObject(["options",this.options,"oneof",this.oneof,"comment",n?this.comment:void 0])},"toJSON");function o(r){if(r.parent)for(var n=0;n<r.fieldsArray.length;++n)r.fieldsArray[n].parent||r.parent.add(r.fieldsArray[n])}return v(o,"addFieldsToParent"),i(o,"addFieldsToParent"),c.prototype.add=i(function(r){if(!(r instanceof l))throw TypeError("field must be a Field");return r.parent&&r.parent!==this.parent&&r.parent.remove(r),this.oneof.push(r.name),this.fieldsArray.push(r),r.partOf=this,o(this),this},"add"),c.prototype.remove=i(function(r){if(!(r instanceof l))throw TypeError("field must be a Field");var n=this.fieldsArray.indexOf(r);if(n<0)throw Error(r+" is not a member of "+this);return this.fieldsArray.splice(n,1),n=this.oneof.indexOf(r.name),n>-1&&this.oneof.splice(n,1),r.partOf=null,this},"remove"),c.prototype.onAdd=i(function(r){d.prototype.onAdd.call(this,r);for(var n=this,t=0;t<this.oneof.length;++t){var e=r.get(this.oneof[t]);e&&!e.partOf&&(e.partOf=n,n.fieldsArray.push(e))}o(this)},"onAdd"),c.prototype.onRemove=i(function(r){for(var n=0,t;n<this.fieldsArray.length;++n)(t=this.fieldsArray[n]).parent&&t.parent.remove(t);d.prototype.onRemove.call(this,r)},"onRemove"),Object.defineProperty(c.prototype,"isProto3Optional",{get:i(function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var r=this.fieldsArray[0];return r.options!=null&&r.options.proto3_optional===!0},"get")}),c.d=i(function(){for(var r=new Array(arguments.length),n=0;n<arguments.length;)r[n]=arguments[n++];return i(function(t,e){h.decorateType(t.constructor).add(new c(e,r)),Object.defineProperty(t,e,{get:h.oneOfGetter(r),set:h.oneOfSetter(r)})},"oneOfDecorator")},"decorateOneOf"),ft}v(de,"requireOneof");var lt,wr;function fe(){if(wr)return lt;wr=1;var b=Object.defineProperty,i=v((e,u)=>b(e,"name",{value:u,configurable:!0}),"s");lt=t,t.className="ReflectionObject";const d=de();var l=H(),h,c={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"},o={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"},r={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"},n={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 t(e,u){if(!l.isString(e))throw TypeError("name must be a string");if(u&&!l.isObject(u))throw TypeError("options must be an object");this.options=u,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 v(t,"ReflectionObject"),i(t,"ReflectionObject"),Object.defineProperties(t.prototype,{root:{get:i(function(){for(var e=this;e.parent!==null;)e=e.parent;return e},"get")},fullName:{get:i(function(){for(var e=[this.name],u=this.parent;u;)e.unshift(u.name),u=u.parent;return e.join(".")},"get")}}),t.prototype.toJSON=i(function(){throw Error()},"toJSON"),t.prototype.onAdd=i(function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var u=e.root;u instanceof h&&u._handleAdd(this)},"onAdd"),t.prototype.onRemove=i(function(e){var u=e.root;u instanceof h&&u._handleRemove(this),this.parent=null,this.resolved=!1},"onRemove"),t.prototype.resolve=i(function(){return this.resolved?this:(this.root instanceof h&&(this.resolved=!0),this)},"resolve"),t.prototype._resolveFeaturesRecursive=i(function(e){return this._resolveFeatures(this._edition||e)},"_resolveFeaturesRecursive"),t.prototype._resolveFeatures=i(function(e){if(!this._featuresResolved){var u={};if(!e)throw new Error("Unknown edition for "+this.fullName);var a=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(e));if(this._edition){if(e==="proto2")u=Object.assign({},r);else if(e==="proto3")u=Object.assign({},n);else if(e==="2023")u=Object.assign({},o);else if(e==="2024")u=Object.assign({},c);else throw new Error("Unknown edition: "+e);this._features=Object.assign(u,a||{}),this._featuresResolved=!0;return}if(this.partOf instanceof d){var s=Object.assign({},this.partOf._features);this._features=Object.assign(s,a||{})}else if(!this.declaringField)if(this.parent){var f=Object.assign({},this.parent._features);this._features=Object.assign(f,a||{})}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},"_resolveFeatures"),t.prototype._inferLegacyProtoFeatures=i(function(){return{}},"_inferLegacyProtoFeatures"),t.prototype.getOption=i(function(e){if(this.options)return this.options[e]},"getOption"),t.prototype.setOption=i(function(e,u,a){return e==="__proto__"?this:(this.options||(this.options={}),/^features\./.test(e)?l.setProperty(this.options,e,u,a):(!a||this.options[e]===void 0)&&(this.getOption(e)!==u&&(this.resolved=!1),this.options[e]=u),this)},"setOption"),t.prototype.setParsedOption=i(function(e,u,a){if(e==="__proto__")return this;this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(a){var f=s.find(function(O){return Object.prototype.hasOwnProperty.call(O,e)});if(f){var p=f[e];l.setProperty(p,a,u)}else f={},f[e]=l.setProperty({},a,u),s.push(f)}else{var m={};m[e]=u,s.push(m)}return this},"setParsedOption"),t.prototype.setOptions=i(function(e,u){if(e)for(var a=Object.keys(e),s=0;s<a.length;++s)this.setOption(a[s],e[a[s]],u);return this},"setOptions"),t.prototype.toString=i(function(){var e=this.constructor.className,u=this.fullName;return u.length?e+" "+u:e},"toString"),t.prototype._editionToJSON=i(function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},"_editionToJSON"),t._configure=function(e){h=e},lt}v(fe,"requireObject");var ct,jr;function ie(){if(jr)return ct;jr=1;var b=Object.defineProperty,i=v((o,r)=>b(o,"name",{value:r,configurable:!0}),"r");ct=c;var d=fe();((c.prototype=Object.create(d.prototype)).constructor=c).className="Enum";var l=ge(),h=H();function c(o,r,n,t,e,u){if(d.call(this,o,n),r&&typeof r!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=t,this.comments=e||{},this.valuesOptions=u,this._valuesFeatures={},this.reserved=void 0,r)for(var a=Object.keys(r),s=0;s<a.length;++s)a[s]!=="__proto__"&&typeof r[a[s]]=="number"&&(this.valuesById[this.values[a[s]]=r[a[s]]]=a[s])}return v(c,"Enum"),i(c,"Enum"),c.prototype._resolveFeatures=i(function(o){return o=this._edition||o,d.prototype._resolveFeatures.call(this,o),Object.keys(this.values).forEach(r=>{var n=Object.assign({},this._features);this._valuesFeatures[r]=Object.assign(n,this.valuesOptions&&this.valuesOptions[r]&&this.valuesOptions[r].features)}),this},"_resolveFeatures"),c.fromJSON=i(function(o,r){var n=new c(o,r.values,r.options,r.comment,r.comments);return n.reserved=r.reserved,r.edition&&(n._edition=r.edition),n._defaultEdition="proto3",n},"fromJSON"),c.prototype.toJSON=i(function(o){var r=o?!!o.keepComments:!1;return h.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",r?this.comment:void 0,"comments",r?this.comments:void 0])},"toJSON"),c.prototype.add=i(function(o,r,n,t){if(!h.isString(o))throw TypeError("name must be a string");if(!h.isInteger(r))throw TypeError("id must be an integer");if(o==="__proto__")return this;if(this.values[o]!==void 0)throw Error("duplicate name '"+o+"' in "+this);if(this.isReservedId(r))throw Error("id "+r+" is reserved in "+this);if(this.isReservedName(o))throw Error("name '"+o+"' is reserved in "+this);if(this.valuesById[r]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+r+" in "+this);this.values[o]=r}else this.valuesById[this.values[o]=r]=o;return t&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[o]=t||null),this.comments[o]=n||null,this},"add"),c.prototype.remove=i(function(o){if(!h.isString(o))throw TypeError("name must be a string");var r=this.values[o];if(r==null)throw Error("name '"+o+"' does not exist in "+this);return delete this.valuesById[r],delete this.values[o],delete this.comments[o],this.valuesOptions&&delete this.valuesOptions[o],this},"remove"),c.prototype.isReservedId=i(function(o){return l.isReservedId(this.reserved,o)},"isReservedId"),c.prototype.isReservedName=i(function(o){return l.isReservedName(this.reserved,o)},"isReservedName"),ct}v(ie,"require_enum");var pt,kr;function Mr(){if(kr)return pt;kr=1;var b=Object.defineProperty,i=v((r,n)=>b(r,"name",{value:n,configurable:!0}),"o");pt=o;var d=ie(),l=pe(),h=H();function c(r,n,t,e){return n.delimited?r("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",t,e,(n.id<<3|3)>>>0,(n.id<<3|4)>>>0):r("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",t,e,(n.id<<3|2)>>>0)}v(c,"genTypePartial"),i(c,"genTypePartial");function o(r){for(var n=h.codegen(["m","w"],r.name+"$encode")("if(!w)")("w=Writer.create()"),u,t,e=r.fieldsArray.slice().sort(h.compareFieldsById),u=0;u<e.length;++u){var a=e[u].resolve(),s=r._fieldsArray.indexOf(a),f=a.resolvedType instanceof d?"int32":a.type,p=l.basic[f];t="m"+h.safeProp(a.name),a.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,a.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(a.id<<3|2)>>>0,8|l.mapKey[a.keyType],a.keyType),p===void 0?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",s,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,f,t),n("}")("}")):a.repeated?(n("if(%s!=null&&%s.length){",t,t),a.packed&&l.packed[f]!==void 0?n("w.uint32(%i).fork()",(a.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",f,t)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",t),p===void 0?c(n,a,s,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(a.id<<3|p)>>>0,f,t)),n("}")):(a.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,a.name),p===void 0?c(n,a,s,t):n("w.uint32(%i).%s(%s)",(a.id<<3|p)>>>0,f,t))}return n("return w")}return v(o,"encoder"),i(o,"encoder"),pt}v(Mr,"requireEncoder");var Rr;function fi(){if(Rr)return Se.exports;Rr=1;var b=Object.defineProperty,i=v((c,o)=>b(c,"name",{value:o,configurable:!0}),"i"),d=Se.exports=oi();d.build="light";function l(c,o,r){return typeof o=="function"?(r=o,o=new d.Root):o||(o=new d.Root),o.load(c,r)}v(l,"load"),i(l,"load"),d.load=l;function h(c,o){return o||(o=new d.Root),o.loadSync(c)}return v(h,"loadSync"),i(h,"loadSync"),d.loadSync=h,d.encoder=Mr(),d.decoder=Br(),d.verifier=Dr(),d.converter=Cr(),d.ReflectionObject=fe(),d.Namespace=ge(),d.Root=kt(),d.Enum=ie(),d.Type=jt(),d.Field=ue(),d.OneOf=de(),d.MapField=bt(),d.Service=Ot(),d.Method=_t(),d.Message=wt(),d.wrappers=Jr(),d.types=pe(),d.util=H(),d.ReflectionObject._configure(d.Root),d.Namespace._configure(d.Type,d.Service,d.Enum),d.Root._configure(d.Type),d.Field._configure(d.Type),Se.exports}v(fi,"requireIndexLight");var dt,Er;function Vr(){if(Er)return dt;Er=1;var b=Object.defineProperty,i=v((s,f)=>b(s,"name",{value:f,configurable:!0}),"l");dt=a;var d=/[\s{}=;:[\],'"()<>]/g,l=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,h=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,c=/^ *[*/]+ */,o=/^\s*\*?\/*/,r=/\n/g,n=/\s/,t=/\\(.?)/g,e={0:"\0",r:"\r",n:`
5
+ `,t:" "};function u(s){return s.replace(t,function(f,p){switch(p){case"\\":case"":return p;default:return e[p]||""}})}v(u,"unescape"),i(u,"unescape"),a.unescape=u;function a(s,f){s=s.toString();var p=0,m=s.length,O=1,g=0,y={},_=[],E=null;function S(F){return Error("illegal "+F+" (line "+O+")")}v(S,"k"),i(S,"illegal");function x(){var F=E==="'"?h:l;F.lastIndex=p-1;var M=F.exec(s);if(!M)throw S("string");return p=F.lastIndex,A(E),E=null,u(M[1])}v(x,"D"),i(x,"readString");function D(F){return s.charAt(F)}v(D,"a"),i(D,"charAt");function G(F,M,I){var W={type:s.charAt(F++),lineEmpty:!1,leading:I},K;f?K=2:K=3;var C=F-K,V;do if(--C<0||(V=s.charAt(C))===`
6
+ `){W.lineEmpty=!0;break}while(V===" "||V===" ");for(var X=s.substring(F,M).split(r),re=0;re<X.length;++re)X[re]=X[re].replace(f?o:c,"").trim();W.text=X.join(`
7
+ `).trim(),y[O]=W,g=O}v(G,"b"),i(G,"setComment");function Z(F){var M=L(F),I=s.substring(F,M),W=/^\s*\/\//.test(I);return W}v(Z,"C"),i(Z,"isDoubleSlashCommentLine");function L(F){for(var M=F;M<m&&D(M)!==`
8
+ `;)M++;return M}v(L,"y"),i(L,"findEndOfLine");function B(){if(_.length>0)return _.shift();if(E)return x();var F,M,I,W,K,C,V=p===0;do{if(p===m)return null;for(F=!1;n.test(I=D(p));)if(I===`
9
+ `&&(V=!0,++O),++p===m)return null;if(D(p)==="/"){if(++p===m)throw S("comment");if(D(p)==="/")if(f){if(W=p,K=!1,Z(p-1)){K=!0;do{if(p=L(p),p===m||(p++,!V))break;C=Z(p),C&&O++}while(C)}else p=Math.min(m,L(p)+1);K&&(G(W,p,V),V=!0),O++,F=!0}else{for(K=D(W=p+1)==="/";D(++p)!==`
10
+ `;)if(p===m)return null;++p,K&&(G(W,p-1,V),V=!0),++O,F=!0}else if((I=D(p))==="*"){W=p+1,K=f||D(W)==="*";do{if(I===`
11
+ `&&++O,++p===m)throw S("comment");M=I,I=D(p)}while(M!=="*"||I!=="/");++p,K&&(G(W,p-2,V),V=!0),F=!0}else return"/"}}while(F);var X=p;d.lastIndex=0;var re=d.test(D(X++));if(!re)for(;X<m&&!d.test(D(X));)++X;var oe=s.substring(p,p=X);return(oe==='"'||oe==="'")&&(E=oe),oe}v(B,"R"),i(B,"next");function A(F){_.push(F)}v(A,"E"),i(A,"push");function U(){if(!_.length){var F=B();if(F===null)return null;A(F)}return _[0]}v(U,"A"),i(U,"peek");function z(F,M){var I=U(),W=I===F;if(W)return B(),!0;if(!M)throw S("token '"+I+"', '"+F+"' expected");return!1}v(z,"I"),i(z,"skip");function N(F){var M=null,I;return F===void 0?(I=y[O-1],delete y[O-1],I&&(f||I.type==="*"||I.lineEmpty)&&(M=I.leading?I.text:null)):(g<F&&U(),I=y[F],delete y[F],I&&!I.lineEmpty&&(f||I.type==="/")&&(M=I.leading?null:I.text)),M}return v(N,"O"),i(N,"cmnt"),Object.defineProperty({next:B,peek:U,push:A,skip:z,cmnt:N},"line",{get:i(function(){return O},"get")})}return v(a,"tokenize"),i(a,"tokenize"),dt}v(Vr,"requireTokenize");var ht,Ar;function li(){if(Ar)return ht;Ar=1;var b=Object.defineProperty,i=v((D,G)=>b(D,"name",{value:G,configurable:!0}),"u");ht=x,x.filename=null,x.defaults={keepCase:!1};var d=Vr(),l=kt(),h=jt(),c=ue(),o=bt(),r=de(),n=ie(),t=Ot(),e=_t(),u=fe(),a=pe(),s=H(),f=/^[1-9][0-9]*$/,p=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,O=/^-?0[x][0-9a-fA-F]+$/,g=/^0[0-7]+$/,y=/^-?0[0-7]+$/,_=s.patterns.numberRe,E=/^[a-zA-Z_][a-zA-Z_0-9]*$/,S=s.patterns.typeRefRe;function x(D,G,Z){G instanceof l||(Z=G,G=new l),Z||(Z=x.defaults);var L=Z.preferTrailingComment||!1,B=d(D,Z.alternateCommentMode||!1),A=B.next,U=B.push,z=B.peek,N=B.skip,F=B.cmnt,M=!0,I,W,K,C="proto2",V=G,X=[],re={},oe=Z.keepCase?function(j){return j}:s.camelCase;function Rt(){X.forEach(j=>{j._edition=C,Object.keys(re).forEach(w=>{j.getOption(w)===void 0&&j.setOption(w,re[w],!0)})})}v(Rt,"X"),i(Rt,"resolveFileFeatures");function T(j,w,k){var R=x.filename;return k||(x.filename=null),Error("illegal "+(w||"token")+" '"+j+"' ("+(R?R+", ":"")+"line "+B.line+")")}v(T,"n"),i(T,"illegal");function se(){var j=[],w;do{if((w=A())!=='"'&&w!=="'")throw T(w);j.push(A()),N(w),w=z()}while(w==='"'||w==="'");return j.join("")}v(se,"q"),i(se,"readString");function be(j){var w=A();switch(w){case"'":case'"':return U(w),se();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Et(w,!0)}catch{if(j&&S.test(w))return w;throw T(w,"value")}}v(be,"W"),i(be,"readValue");function he(j,w){var k,R;do if(w&&((k=z())==='"'||k==="'")){var q=se();if(j.push(q),C>=2023)throw T(q,"id")}else try{j.push([R=ae(A()),N("to",!0)?ae(A()):R])}catch($){if(w&&S.test(k)&&C>=2023)j.push(k);else throw $}while(N(",",!0));var P={options:void 0};P.setOption=function($,J){this.options===void 0&&(this.options={}),this.options[$]=J},ee(P,i(function($){if($==="option")te(P,$),N(";");else throw T($)},"parseRange_block"),i(function(){me(P)},"parseRange_line"))}v(he,"N"),i(he,"readRanges");function Et(j,w){var k=1;switch(j.charAt(0)==="-"&&(k=-1,j=j.substring(1)),j){case"inf":case"INF":case"Inf":return k*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(f.test(j))return k*parseInt(j,10);if(m.test(j))return k*parseInt(j,16);if(g.test(j))return k*parseInt(j,8);if(_.test(j))return k*parseFloat(j);throw T(j,"number",w)}v(Et,"D"),i(Et,"parseNumber");function ae(j,w){switch(j){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!w&&j.charAt(0)==="-")throw T(j,"id");if(p.test(j))return parseInt(j,10);if(O.test(j))return parseInt(j,16);if(y.test(j))return parseInt(j,8);throw T(j,"id")}v(ae,"F"),i(ae,"parseId");function At(){if(I!==void 0)throw T("package");if(I=A(),!S.test(I))throw T(I,"name");V=V.define(I),N(";")}v(At,"H"),i(At,"parsePackage");function St(){var j=z(),w;switch(j){case"option":if(C<"2024")throw T("option");A(),se(),N(";");return;case"weak":w=K||(K=[]),A();break;case"public":A();default:w=W||(W=[]);break}j=se(),N(";"),w.push(j)}v(St,"J"),i(St,"parseImport");function Nt(){if(N("="),C=se(),C<2023)throw T(C,"syntax");N(";")}v(Nt,"Q"),i(Nt,"parseSyntax");function Tt(){if(N("="),C=se(),!["2023","2024"].includes(C))throw T(C,"edition");N(";")}v(Tt,"Y"),i(Tt,"parseEdition");function ve(j,w){switch(w){case"option":return te(j,w),N(";"),!0;case"message":return ye(j,w),!0;case"enum":return Re(j,w),!0;case"export":case"local":return C<"2024"||(w=A(),w==="export"||w==="local")||w!=="message"&&w!=="enum"?!1:ve(j,w);case"service":return Lt(j,w),!0;case"extend":return Dt(j,w),!0}return!1}v(ve,"T"),i(ve,"parseCommon");function ee(j,w,k){var R=B.line;if(j&&(typeof j.comment!="string"&&(j.comment=F()),j.filename=x.filename),N("{",!0)){for(var q;(q=A())!=="}";)w(q);N(";",!0)}else k&&k(),N(";"),j&&(typeof j.comment!="string"||L)&&(j.comment=F(R)||j.comment)}v(ee,"w"),i(ee,"ifBlock");function ye(j,w){if(!E.test(w=A()))throw T(w,"type name");var k=new h(w);ee(k,i(function(R){if(!ve(k,R))switch(R){case";":break;case"map":xt(k);break;case"required":if(C!=="proto2")throw T(R);case"repeated":Q(k,R);break;case"optional":if(C==="proto3")Q(k,"proto3_optional");else{if(C!=="proto2")throw T(R);Q(k,"optional")}break;case"oneof":Ft(k,R);break;case"extensions":he(k.extensions||(k.extensions=[]));break;case"reserved":he(k.reserved||(k.reserved=[]),!0);break;default:if(C==="proto2"||!S.test(R))throw T(R);U(R),Q(k,"optional");break}},"parseType_block")),j.add(k),j===V&&X.push(k)}v(ye,"M"),i(ye,"parseType");function Q(j,w,k){var R=A();if(R==="group"){Pt(j,w);return}for(;R.endsWith(".")||z().startsWith(".");)R+=A();if(!S.test(R))throw T(R,"type");var q=A();if(!E.test(q))throw T(q,"name");q=oe(q),N("=");var P=new c(q,ae(A()),R,w,k);if(ee(P,i(function(J){if(J==="option")te(P,J),N(";");else throw T(J)},"parseField_block"),i(function(){me(P)},"parseField_line")),w==="proto3_optional"){var $=new r("_"+q);P.setOption("proto3_optional",!0),$.add(P),j.add($)}else j.add(P);j===V&&X.push(P)}v(Q,"m"),i(Q,"parseField");function Pt(j,w){if(C>=2023)throw T("group");var k=A();if(!E.test(k))throw T(k,"name");var R=s.lcFirst(k);k===R&&(k=s.ucFirst(k)),N("=");var q=ae(A()),P=new h(k);P.group=!0;var $=new c(R,q,k,w);$.filename=x.filename,ee(P,i(function(J){switch(J){case";":break;case"option":te(P,J),N(";");break;case"required":case"repeated":Q(P,J);break;case"optional":C==="proto3"?Q(P,"proto3_optional"):Q(P,"optional");break;case"message":ye(P,J);break;case"enum":Re(P,J);break;case"reserved":he(P.reserved||(P.reserved=[]),!0);break;case"export":case"local":if(C<"2024")throw T(J);switch(J=A(),J){case"message":ye(P,J);break;case"enum":ye(P,J);break;default:throw T(J)}break;default:throw T(J)}},"parseGroup_block")),j.add(P).add($)}v(Pt,"j"),i(Pt,"parseGroup");function xt(j){N("<");var w=A();if(a.mapKey[w]===void 0)throw T(w,"type");N(",");var k=A();if(!S.test(k))throw T(k,"type");N(">");var R=A();if(!E.test(R))throw T(R,"name");N("=");var q=new o(oe(R),ae(A()),w,k);ee(q,i(function(P){if(P==="option")te(q,P),N(";");else throw T(P)},"parseMapField_block"),i(function(){me(q)},"parseMapField_line")),j.add(q)}v(xt,"k"),i(xt,"parseMapField");function Ft(j,w){if(!E.test(w=A()))throw T(w,"name");var k=new r(oe(w));ee(k,i(function(R){R==="option"?(te(k,R),N(";")):(U(R),Q(k,"optional"))},"parseOneOf_block")),j.add(k)}v(Ft,"ee"),i(Ft,"parseOneOf");function Re(j,w){if(!E.test(w=A()))throw T(w,"name");var k=new n(w);ee(k,i(function(R){switch(R){case";":break;case"option":te(k,R),N(";");break;case"reserved":he(k.reserved||(k.reserved=[]),!0),k.reserved===void 0&&(k.reserved=[]);break;default:qt(k,R)}},"parseEnum_block")),j.add(k),j===V&&X.push(k)}v(Re,"B"),i(Re,"parseEnum");function qt(j,w){if(!E.test(w))throw T(w,"name");N("=");var k=ae(A(),!0),R={options:void 0};R.getOption=function(q){return this.options[q]},R.setOption=function(q,P){u.prototype.setOption.call(R,q,P)},R.setParsedOption=function(){},ee(R,i(function(q){if(q==="option")te(R,q),N(";");else throw T(q)},"parseEnumValue_block"),i(function(){me(R)},"parseEnumValue_line")),j.add(w,k,R.comment,R.parsedOptions||R.options)}v(qt,"re"),i(qt,"parseEnumValue");function te(j,w){var k,R,q=!0;for(w==="option"&&(w=A());w!=="=";){if(w==="("){var P=A();N(")"),w="("+P+")"}if(q){if(q=!1,w.includes(".")&&!w.includes("(")){var $=w.split(".");k=$[0]+".",w=$[1];continue}k=w}else R=R?R+=w:w;w=A()}var J=R?k.concat(R):k,Oe=Ee(j,J);R=R&&R[0]==="."?R.slice(1):R,k=k&&k[k.length-1]==="."?k.slice(0,-1):k,It(j,k,Oe,R)}v(te,"v"),i(te,"parseOption");function Ee(j,w){if(N("{",!0)){for(var k={};!N("}",!0);){if(!E.test(Y=A()))throw T(Y,"name");if(Y===null)throw T(Y,"end of input");var R,q=Y;if(N(":",!0),z()==="{")R=Ee(j,w+"."+Y);else if(z()==="["){R=[];var P;if(N("[",!0)&&!N("]",!0)){do P=be(!0),R.push(P);while(N(",",!0));N("]"),typeof P<"u"&&_e(j,w+"."+Y,P)}}else R=be(!0),_e(j,w+"."+Y,R);var $=k[q];$&&(R=[].concat($).concat(R)),q!=="__proto__"&&(k[q]=R),N(",",!0),N(";",!0)}return k}var J=be(!0);return _e(j,w,J),J}v(Ee,"K"),i(Ee,"parseOptionValue");function _e(j,w,k){if(V===j&&/^features\./.test(w)){re[w]=k;return}j.setOption&&j.setOption(w,k)}v(_e,"Z"),i(_e,"setOption");function It(j,w,k,R){j.setParsedOption&&j.setParsedOption(w,k,R)}v(It,"ie"),i(It,"setParsedOption");function me(j){if(N("[",!0)){do te(j,"option");while(N(",",!0));N("]")}return j}v(me,"A"),i(me,"parseInlineOptions");function Lt(j,w){if(!E.test(w=A()))throw T(w,"service name");var k=new t(w);ee(k,i(function(R){if(!ve(k,R)&&R!==";")if(R==="rpc")Bt(k,R);else throw T(R)},"parseService_block")),j.add(k),j===V&&X.push(k)}v(Lt,"te"),i(Lt,"parseService");function Bt(j,w){var k=F(),R=w;if(!E.test(w=A()))throw T(w,"name");var q=w,P,$,J,Oe;if(N("("),N("stream",!0)&&($=!0),!S.test(w=A())||(P=w,N(")"),N("returns"),N("("),N("stream",!0)&&(Oe=!0),!S.test(w=A())))throw T(w);J=w,N(")");var we=new e(q,R,P,J,$,Oe);we.comment=k,ee(we,i(function(je){if(je!==";")if(je==="option")te(we,je),N(";");else throw T(je)},"parseMethod_block")),j.add(we)}v(Bt,"ae"),i(Bt,"parseMethod");function Dt(j,w){if(!S.test(w=A()))throw T(w,"reference");var k=w;ee(null,i(function(R){switch(R){case"required":case"repeated":Q(j,R,k);break;case"optional":C==="proto3"?Q(j,"proto3_optional",k):Q(j,"optional",k);break;default:if(C==="proto2"||!S.test(R))throw T(R);U(R),Q(j,"optional",k);break}},"parseExtension_block"))}v(Dt,"se"),i(Dt,"parseExtension");for(var Y;(Y=A())!==null;)switch(Y){case";":break;case"package":if(!M)throw T(Y);At();break;case"import":St();break;case"syntax":if(!M)throw T(Y);Nt();break;case"edition":if(!M)throw T(Y);Tt();break;case"option":te(V,Y),N(";",!0);break;default:if(ve(V,Y)){M=!1;continue}throw T(Y)}return Rt(),x.filename=null,{package:I,imports:W,weakImports:K,root:G}}return v(x,"parse"),i(x,"parse"),ht}v(li,"requireParse");var vt,Sr;function ci(){if(Sr)return vt;Sr=1;var b=Object.defineProperty,i=v((c,o)=>b(c,"name",{value:o,configurable:!0}),"t");vt=l;var d=/\/|\./;function l(c,o){d.test(c)||(c="google/protobuf/"+c+".proto",o={nested:{google:{nested:{protobuf:{nested:o}}}}}),l[c]=o}v(l,"common"),i(l,"common"),l("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var h;return l("duration",{Duration:h={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),l("timestamp",{Timestamp:h}),l("empty",{Empty:{fields:{}}}),l("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}}}}),l("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}}}}),l("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),l.get=i(function(c){return l[c]||null},"get"),vt}v(ci,"requireCommon");var Nr;function pi(){if(Nr)return Ae.exports;Nr=1;var b=Ae.exports=fi();return b.build="full",b.tokenize=Vr(),b.parse=li(),b.common=ci(),b.Root._configure(b.Type,b.parse,b.common),Ae.exports}v(pi,"requireSrc");var yt,Tr;function di(){return Tr||(Tr=1,yt=pi()),yt}v(di,"requireProtobufjs");var $r=di();const hi=Pr($r),yi=Ur({__proto__:null,default:hi},[$r]);export{yi 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 k}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 P=Object.defineProperty,S=h((r,e)=>P(r,"name",{value:e,configurable:!0}),"h");const F=new Set([".cache",".git",".task-runner",".task-runner-cache",".vis","coverage","dist","node_modules"]);class N{static{h(this,"R")}static{S(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=k(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};