basant307/AI_Governance_Project
048
1"use strict";2var protobuf = module.exports = require("./index-minimal");3 4protobuf.build = "light";5 6/**7 * A node-style callback as used by {@link load} and {@link Root#load}.8 * @typedef LoadCallback9 * @type {function}10 * @param {Error|null} error Error, if any, otherwise `null`11 * @param {Root} [root] Root, if there hasn't been an error12 * @returns {undefined}13 */14 15/**16 * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.17 * @param {string|string[]} filename One or multiple files to load18 * @param {Root} root Root namespace, defaults to create a new one if omitted.19 * @param {LoadCallback} callback Callback function20 * @returns {undefined}21 * @see {@link Root#load}22 */23function load(filename, root, callback) {24 if (typeof root === "function") {25 callback = root;26 root = new protobuf.Root();27 } else if (!root)28 root = new protobuf.Root();29 return root.load(filename, callback);30}31 32/**33 * Loads one or multiple .proto or preprocessed .json files into a common root namespace and calls the callback.34 * @name load35 * @function36 * @param {string|string[]} filename One or multiple files to load37 * @param {LoadCallback} callback Callback function38 * @returns {undefined}39 * @see {@link Root#load}40 * @variation 241 */42// function load(filename:string, callback:LoadCallback):undefined43 44/**45 * Loads one or multiple .proto or preprocessed .json files into a common root namespace and returns a promise.46 * @name load47 * @function48 * @param {string|string[]} filename One or multiple files to load49 * @param {Root} [root] Root namespace, defaults to create a new one if omitted.50 * @returns {Promise<Root>} Promise51 * @see {@link Root#load}52 * @variation 353 */54// function load(filename:string, [root:Root]):Promise<Root>55 56protobuf.load = load;57 58/**59 * Synchronously loads one or multiple .proto or preprocessed .json files into a common root namespace (node only).60 * @param {string|string[]} filename One or multiple files to load61 * @param {Root} [root] Root namespace, defaults to create a new one if omitted.62 * @returns {Root} Root namespace63 * @throws {Error} If synchronous fetching is not supported (i.e. in browsers) or if a file's syntax is invalid64 * @see {@link Root#loadSync}65 */66function loadSync(filename, root) {67 if (!root)68 root = new protobuf.Root();69 return root.loadSync(filename);70}71 72protobuf.loadSync = loadSync;73 74// Serialization75protobuf.encoder = require("./encoder");76protobuf.decoder = require("./decoder");77protobuf.verifier = require("./verifier");78protobuf.converter = require("./converter");79 80// Reflection81protobuf.ReflectionObject = require("./object");82protobuf.Namespace = require("./namespace");83protobuf.Root = require("./root");84protobuf.Enum = require("./enum");85protobuf.Type = require("./type");86protobuf.Field = require("./field");87protobuf.OneOf = require("./oneof");88protobuf.MapField = require("./mapfield");89protobuf.Service = require("./service");90protobuf.Method = require("./method");91 92// Runtime93protobuf.Message = require("./message");94protobuf.wrappers = require("./wrappers");95 96// Utility97protobuf.types = require("./types");98protobuf.util = require("./util");99 100// Set up possibly cyclic reflection dependencies101protobuf.ReflectionObject._configure(protobuf.Root);102protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);103protobuf.Root._configure(protobuf.Type);104protobuf.Field._configure(protobuf.Type);105 