/**
 * Minified by jsDelivr using Terser v5.37.0.
 * Original file: /npm/grpc-zjl@1.24.0-pre1/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
/**
 * @license
 * Copyright 2015 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
"use strict";var path=require("path"),fs=require("fs"),util=require("util"),SSL_ROOTS_PATH=path.resolve(__dirname,"deps","grpc","etc","roots.pem"),client=require("./src/client.js"),server=require("./src/server.js"),common=require("./src/common.js"),Metadata=require("./src/metadata.js"),grpc=require("./src/grpc_extension"),protobuf_js_5_common=require("./src/protobuf_js_5_common"),protobuf_js_6_common=require("./src/protobuf_js_6_common"),constants=require("./src/constants.js");grpc.setDefaultRootsPem(fs.readFileSync(SSL_ROOTS_PATH,"ascii")),exports.loadObject=function(e,t){var r;if(t=Object.assign({},common.defaultGrpcOptions,t),"detect"===(t=Object.assign({},{protobufjsVersion:"detect"},t)).protobufjsVersion)if(protobuf_js_6_common.isProbablyProtobufJs6(e))r=6;else{if(!protobuf_js_5_common.isProbablyProtobufJs5(e)){throw new Error('Could not detect ProtoBuf.js version. Please specify the version number with the "protobufjsVersion" option')}r=5}else r=t.protobufjsVersion;switch(r){case 6:return protobuf_js_6_common.loadObject(e,t);case 5:return protobuf_js_5_common.loadObject(e,t);default:throw new Error("Unrecognized protobufjsVersion",r)}};var loadObject=exports.loadObject;exports.load=util.deprecate((function(e,t,r){const o=require("protobufjs");(r=Object.assign({},common.defaultGrpcOptions,r)).protobufjsVersion=5,t||(t="proto");var s,n=o.convertFieldsToCamelCase;r&&r.hasOwnProperty("convertFieldsToCamelCase")&&(o.convertFieldsToCamelCase=r.convertFieldsToCamelCase);try{switch(t){case"proto":s=o.loadProtoFile(e);break;case"json":s=o.loadJsonFile(e);break;default:throw new Error('Unrecognized format "'+t+'"')}}finally{o.convertFieldsToCamelCase=n}if(!s)throw new Error('Could not load file "'+e+'"');return loadObject(s.ns,r)}),"grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead"),exports.loadPackageDefinition=function(e){const t={};for(const r in e){const o=e[r],s=r.split("."),n=s[s.length-1];let i=t;for(const e of s.slice(0,-1))i[e]||(i[e]={}),i=i[e];o.hasOwnProperty("format")?i[n]=o:i[n]=client.makeClientConstructor(o,n,{})}return t};var log_template=function(e){var t=e.file,r=e.line,o=e.severity,s=e.message;return`${o} ${e.timestamp}\t${t}:${r}]\t${s}`};exports.setLogger=function(e){common.logger=e,grpc.setDefaultLoggerCallback((function(t,r,o,s,n){e.error(log_template({file:path.basename(t),line:r,severity:o,message:s,timestamp:n.toISOString()}))}))},exports.setLogVerbosity=function(e){common.logVerbosity=e,grpc.setLogVerbosity(e)},exports.Server=server.Server,exports.Metadata=Metadata,exports.status=constants.status,exports.propagate=constants.propagate,exports.callError=constants.callError,exports.writeFlags=constants.writeFlags,exports.logVerbosity=constants.logVerbosity,exports.methodTypes=constants.methodTypes,exports.connectivityState=constants.connectivityState,exports.credentials=require("./src/credentials.js"),exports.ServerCredentials=grpc.ServerCredentials,exports.makeGenericClientConstructor=client.makeClientConstructor,exports.getClientChannel=client.getClientChannel,exports.waitForClientReady=client.waitForClientReady,exports.StatusBuilder=client.StatusBuilder,exports.ListenerBuilder=client.ListenerBuilder,exports.RequesterBuilder=client.RequesterBuilder,exports.InterceptingCall=client.InterceptingCall,exports.closeClient=function(e){client.Client.prototype.close.apply(e)},exports.Client=client.Client,exports.Channel=grpc.Channel;
//# sourceMappingURL=/sm/68e3701a156c25f43f16d8d249040a0b747ffbce1ff77284c64c94cd8982b19d.map