const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.js');
const require_identity$1 = require('../util/identity.js');
const require_EmptyError$1 = require('../util/EmptyError.js');
const require_filter$1 = require('./filter.js');
const require_defaultIfEmpty$1 = require('./defaultIfEmpty.js');
const require_take$1 = require('./take.js');
const require_throwIfEmpty$1 = require('./throwIfEmpty.js');

//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/first.js
var require_first = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/first.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	var EmptyError_1 = require_EmptyError$1.require_EmptyError();
	var filter_1 = require_filter$1.require_filter();
	var take_1 = require_take$1.require_take();
	var defaultIfEmpty_1 = require_defaultIfEmpty$1.require_defaultIfEmpty();
	var throwIfEmpty_1 = require_throwIfEmpty$1.require_throwIfEmpty();
	var identity_1 = require_identity$1.require_identity();
	function first(predicate, defaultValue) {
		var hasDefaultValue = arguments.length >= 2;
		return function(source) {
			return source.pipe(predicate ? filter_1.filter(function(v, i) {
				return predicate(v, i, source);
			}) : identity_1.identity, take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() {
				return new EmptyError_1.EmptyError();
			}));
		};
	}
	exports.first = first;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_first();
  }
});