func (m *Aproto3) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowProto3
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: Aproto3: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field B", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowProto3
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthProto3
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthProto3
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.B = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipProto3(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthProto3
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthProto3
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}


func httpProxyValid(proxy *contourv1.HTTPProxy) bool {
	return proxy != nil && proxy.Status.CurrentStatus == "valid"
}


func WithRelabeledContainerMounts(mountLabel string) oci.SpecOpts {
	return func(ctx context.Context, client oci.Client, _ *containers.Container, s *runtimespec.Spec) (err error) {
		if mountLabel == "" {
			return nil
		}
		for _, m := range s.Mounts {
			switch m.Destination {
			case etcHosts, etcHostname, resolvConfPath:
				if err := label.Relabel(m.Source, mountLabel, false); err != nil {
					return err
				}
			}
		}
		return nil
	}
}


func (x *ConsoleSession) ProtoReflect() protoreflect.Message {
	mi := &file_console_proto_msgTypes[15]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}


func (x *WriteStorageObjectRequest) Reset() {
	*x = WriteStorageObjectRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_console_proto_msgTypes[44]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}


func (x *ListGroupsRequest) Reset() {
	*x = ListGroupsRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_console_proto_msgTypes[27]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}


func (x *WalletLedgerList) Reset() {
	*x = WalletLedgerList{}
	if protoimpl.UnsafeEnabled {
		mi := &file_console_proto_msgTypes[43]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}


func (x *StorageList) Reset() {
	*x = StorageList{}
	if protoimpl.UnsafeEnabled {
		mi := &file_console_proto_msgTypes[33]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}


func (*WalletLedgerList) Descriptor() ([]byte, []int) {
	return file_console_proto_rawDescGZIP(), []int{43}
}


func (x *UserList_User) ProtoReflect() protoreflect.Message {
	mi := &file_console_proto_msgTypes[48]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}


func (x *Leaderboard) ProtoReflect() protoreflect.Message {
	mi := &file_console_proto_msgTypes[23]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}


func (x *Config_Warning) Reset() {
	*x = Config_Warning{}
	if protoimpl.UnsafeEnabled {
		mi := &file_console_proto_msgTypes[46]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}


func (*DeleteLeaderboardRecordRequest) Descriptor() ([]byte, []int) {
	return file_console_proto_rawDescGZIP(), []int{20}
}


func consoleInterceptorFunc(logger *zap.Logger, config Config) func(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error) {


func (s *ConsoleServer) Authenticate(ctx context.Context, in *console.AuthenticateRequest) (*console.ConsoleSession, error) {
	role := console.UserRole_USER_ROLE_UNKNOWN
	var uname string
	var email string
	var id uuid.UUID
	switch in.Username {
	case s.config.GetConsole().Username:
		if in.Password == s.config.GetConsole().Password {
			role = console.UserRole_USER_ROLE_ADMIN
			uname = in.Username
			id = uuid.Nil
		}
	default:
		var err error
		id, uname, email, role, err = s.lookupConsoleUser(ctx, in.Username, in.Password)
		if err != nil {
			return nil, err
		}
	}

	if role == console.UserRole_USER_ROLE_UNKNOWN {
		return nil, status.Error(codes.Unauthenticated, "Invalid credentials.")
	}

	exp := time.Now().UTC().Add(time.Duration(s.config.GetConsole().TokenExpirySec) * time.Second).Unix()
	token := jwt.NewWithClaims(jwt.SigningMethodHS256, &ConsoleTokenClaims{
		ExpiresAt: exp,
		ID:        id.String(),
		Username:  uname,
		Email:     email,
		Role:      role,
		Cookie:    s.cookie,
	})
	key := []byte(s.config.GetConsole().SigningKey)
	signedToken, _ := token.SignedString(key)

	s.consoleSessionCache.Add(id, exp, signedToken, 0, "")
	return &console.ConsoleSession{Token: signedToken}, nil
}


func (AppModule) ConsensusVersion() uint64 { return 1 }


func (AppModuleBasic) ConsensusVersion() uint64 {
	return 1
}


func TestBuilder_BuildBootstrapLayeredRuntime(t *testing.T) {
	b := New("localhost:1111", "localhost:2222", filemgr.NewManager(), nil)
	staticCfg, err := b.BuildBootstrapLayeredRuntime()
	assert.NoError(t, err)
	testutil.AssertProtoJSONEqual(t, `
		{ "layers": [{
			"name": "static_layer_0",
			"staticLayer": {
				"overload": {
					"global_downstream_max_connections": 50000
				}
			}
		}] }
	`, staticCfg)
}


func main() {
	hostPtr := flag.String("host", "localhost:9159", "the hostname that the server should listen on.")
	tokenPtr := flag.String("token", "", "the Proxy Access Token used to restrict access to the server.")
	allowedOriginsPtr := flag.String("allowed-origins", "*", "a comma separated list of allowed origins.")
	bannedOutputsPtr := flag.String("banned-outputs", "", "a comma separated list of banned outputs.")
	flag.Parse()

	finished := make(chan bool)
	libproxy.Initialize(*tokenPtr, *hostPtr, *allowedOriginsPtr, *bannedOutputsPtr, onProxyStateChangeServer, false, finished)

	<-finished
}


func cmdList(args *docopt.Args, client *tuf.Client) error {
	if _, err := client.Update(); err != nil && !tuf.IsLatestSnapshot(err) {
		return err
	}
	targets, err := client.Targets()
	if err != nil {
		return err
	}
	w := tabwriter.NewWriter(os.Stdout, 1, 2, 2, ' ', 0)
	defer w.Flush()
	fmt.Fprintln(w, "PATH\tSIZE")
	for path, meta := range targets {
		fmt.Fprintf(w, "%s\t%s\n", path, humanize.Bytes(uint64(meta.Length)))
	}
	return nil
}


  componentDidMount () {
    this.store.gotoUrl(this.props.params.url);
    return this.store.generateToken();
  }


    static buildMintOpReturn(config: configBuildMintOpReturn, type = 0x01) {
        return SlpTokenType1.buildMintOpReturn(
            config.tokenIdHex,
            config.batonVout,
            config.mintQuantity,
            type
        )
    }


        let getNftParentId = async (tokenIdHex: string) => {
            let txnhex = (await asyncSlpValidator.getRawTransactions([tokenIdHex]))[0];
            let tx = Primatives.Transaction.parseFromBuffer(Buffer.from(txnhex, 'hex'));
            let nftBurnTxnHex = (await asyncSlpValidator.getRawTransactions([tx.inputs[0].previousTxHash]))[0];
            let nftBurnTxn = Primatives.Transaction.parseFromBuffer(Buffer.from(nftBurnTxnHex, 'hex'));
            let slp = new Slp(this.BITBOX);
            let nftBurnSlp = slp.parseSlpOutputScript(Buffer.from(nftBurnTxn.outputs[0].scriptPubKey));
            if (nftBurnSlp.transactionType === SlpTransactionType.GENESIS) {
                return tx.inputs[0].previousTxHash;
            }
            else {
                return nftBurnSlp.tokenIdHex;
            }
        }


                      'X-Parse-Session-Token': user1.getSessionToken(),
                    },
                  },
                });

                let foundGraphQLClassReadPreference = false;
                let foundUserClassReadPreference = false;
                databaseAdapter.database.serverConfig.cursor.calls
                  .all()
                  .forEach((call) => {
                    if (
                      call.args[0].ns.collection.indexOf('GraphQLClass') >= 0
                    ) {
                      foundGraphQLClassReadPreference = true;
                      expect(call.args[0].options.readPreference.mode).toBe(
                        ReadPreference.PRIMARY
                      );
                    } else if (
                      call.args[0].ns.collection.indexOf('_User') >= 0
                    ) {
                      foundUserClassReadPreference = true;
                      expect(call.args[0].options.readPreference.mode).toBe(
                        ReadPreference.PRIMARY
                      );
                    }
                  });

                expect(foundGraphQLClassReadPreference).toBe(true);
                expect(foundUserClassReadPreference).toBe(true);
              } catch (e) {
                handleError(e);
              }
            });


    ): Promise<void> => {
      event.preventDefault();

      if (SingleSignOn.isSingleSignOnLoginWindow(frameName)) {
        return new SingleSignOn(main, event, url, options).init();
      }

      this.logger.log('Opening an external window from a webview.');
      return shell.openExternal(url);
    };


  function addSockListeners() {
    if (!accept && !reject) {
      sock.once('connect', onconnect);
      sock.on('data', ondata);
      sock.once('error', onerror);
      sock.once('close', onclose);
    } else {
      var chan;
      sock.once('connect', function() {
        chan = accept();
        var isDone = false;
        function onDone() {
          if (isDone)
            return;
          sock.destroy();
          isDone = true;
        }
        chan.once('end', onDone)
            .once('close', onDone)
            .on('data', function(data) {
          sock.write(data);
        });
        sock.on('data', function(data) {
          chan.write(data);
        });
      });
      sock.once('close', function() {
        if (!chan)
          reject();
      });
    }
  }


		([ key, value ]) => ({ [key]: exec.bind(null, value) }),
	),


module.exports = async function(tag) {
	if (!tag || ![ 'string', 'number' ].includes(typeof tag)) {
		throw new TypeError(`string was expected, instead got ${tag}`);
	}

	const { message, author, email } = this;

	await Promise.all([
		exec(`git config user.name "${await author}"`),
		exec(`git config user.email "${await email}"`),
	]);
	await exec(`git tag -a ${JSON.stringify(tag)} -m "${await message}"`);
	await exec(`git push origin ${JSON.stringify(`refs/tags/${tag}`)}`);
};


        GraphQLPlayground.init(root, ${JSON.stringify(
          extendedOptions,
          null,
          2,
        )})
      })


const getCdnMarkup = ({ version, cdnUrl = '//cdn.jsdelivr.net/npm', faviconUrl }) => `
    <link rel="stylesheet" href="${cdnUrl}/graphql-playground-react${


  etsyApiFetch(endpoint, options) {
     this._assumeField('endpoint', endpoint);
     return new Promise((resolve, reject) => {
         const getQueryString = queryString.stringify(this.getOptions(options));
         fetch(`${this.apiUrl}${endpoint}?${getQueryString}`)
           .then(response => EtsyClient._response(response, resolve, reject))
           .catch(reject);
     });
  }


declare function getSetCookie(cookieName: string, value?: string, options?: any): string;

// backw compat, later, do once per file instead (don't want a global 'r').
//
// ReactDOMFactories looks like:
//
// var ReactDOMFactories = {
//   a: createDOMFactory('a'),
//   abbr: ...
//
// function createDOMFactory(type) {
//   var factory = React.createElement.bind(null, type);
//   factory.type = type; // makes:  `<Foo />.type === Foo`  work
//   return factory;
//  };
//
// and React.createElement(type: keyof ReactHTML, props, ...children) returns:
//   DetailedReactHTMLElement<P, T>
//
const r: { [elmName: string]: (props?: any, ...children) => RElm } = ReactDOMFactories;


      switchToInvites: async () => {
        await this.waitAndClick('.e_InvTabB');
        await this.invitedUsersList.waitUntilLoaded();
      },


export function getExtensionPath(): string {
	return extensionPath;
}


export function get(key: "treeIcons"): boolean;
export function get(key: "apiUrl"): string;


    getDownloadUrl(fileId, accessToken) {
        return `${Shopware.Context.api.apiPath}/_action/${this.getApiBasePath()}/` +
            `file/download?fileId=${fileId}&accessToken=${accessToken}`;
    }


function lazyLoadCustomEmoji(element: HTMLElement): void {
  const img = createElement('img', CLASS_CUSTOM_EMOJI) as HTMLImageElement;

  if (element.dataset.emoji) {
    img.src = element.dataset.emoji;
    element.innerText = '';
    element.appendChild(img);
  }
}


    userId: projectUsers.findOne().users.find((elem) => elem._id === entry._id.userId)?.profile?.name,
    totalHours,
  }


export type ReadMessageFuncType = (data: Buffer) => PacketInfo;


        this._transport.on("message", (messageChunk: Buffer) => {
            /**
             * notify the observers that ClientSecureChannelLayer has received a message chunk
             * @event receive_chunk
             * @param message_chunk
             */
            this.emit("receive_chunk", messageChunk);
            this._on_receive_message_chunk(messageChunk);
        });


            function check_response(err: Error | null, response: any) {
                should.not.exist(err);
                //xx debugLog(response.toString());
                response.responseHeader.serviceResult.should.eql(StatusCodes.BadInvalidArgument);
            }


function g_sendError(channel: ServerSecureChannelLayer, message: Message, ResponseClass: any, statusCode: StatusCode): void {
    const response = new ResponseClass({
        responseHeader: { serviceResult: statusCode }
    });
    return channel.send_response("MSG", response, message);
}


    this.serversUpdatedListener = ({ servers }) => {
      // Update status log line with new `garden dashboard` server, if any
      for (const { host, command } of servers) {
        if (command === "dashboard") {
          this.showUrl(host)
          return
        }
      }

      // No active explicit dashboard processes, show own URL instead
      this.showUrl(this.getUrl())
    }


          text += `${c.amount(value, a.currency)}<br>`;
        });


            text += ` / ${c.amount(a.budget, a.currency)}`;
          }
          text += "<br>";
        });


) => [number, number, string] | undefined;


): { destroy: () => void; update: (t: () => string) => void } {


export function add_attribute(name, value, boolean) {
	if (value == null || (boolean && !value)) return '';
	const assignment = (boolean && value === true) ? '' : `="${escape_attribute_value(value.toString())}"`;
	return ` ${name}${assignment}`;
}


  text(notificationName, data) {
    const username = formatUsername(data.display_username);

    let description;
    if (data.topic_title) {
      description = `<span data-topic-id="${this.attrs.topic_id}">${data.topic_title}</span>`;
    } else {
      description = this.description(data);
    }

    return I18n.t(data.message, { description, username });
  },


export async function validateTransfer(
    connection: Connection,
    signature: TransactionSignature,
    { recipient, amount, splToken, reference, memo }: ValidateTransferFields,
    options?: { commitment?: Finality }
): Promise<TransactionResponse> {
    const response = await connection.getTransaction(signature, options);
    if (!response) throw new ValidateTransferError('not found');

    const message = response.transaction.message;
    const meta = response.meta;
    if (!meta) throw new ValidateTransferError('missing meta');
    if (meta.err) throw meta.err;

    const [preAmount, postAmount] = splToken
        ? await validateSPLTokenTransfer(message, meta, recipient, splToken)
        : await validateSystemTransfer(message, meta, recipient);

    if (postAmount.minus(preAmount).lt(amount)) throw new ValidateTransferError('amount not transferred');

    if (reference) {
        if (!Array.isArray(reference)) {
            reference = [reference];
        }

        for (const pubkey of reference) {
            if (!message.accountKeys.some((accountKey) => accountKey.equals(pubkey)))
                throw new ValidateTransferError('reference not found');
        }
    }

    // FIXME: add memo check

    return response;
}