var o={};!function(n){function t(n){return"function"==typeof n?n():n}n.none=Object.create({value:function(){throw new Error("Called value on none")},isNone:function(){return!0},isSome:function(){return!1},map:function(){return n.none},flatMap:function(){return n.none},filter:function(){return n.none},toArray:function(){return[]},orElse:t,valueOrElse:t}),n.some=function(n){return new e(n)};var e=function(n){this._value=n};e.prototype.value=function(){return this._value},e.prototype.isNone=function(){return!1},e.prototype.isSome=function(){return!0},e.prototype.map=function(n){return new e(n(this._value))},e.prototype.flatMap=function(n){return n(this._value)},e.prototype.filter=function(t){return t(this._value)?this:n.none},e.prototype.toArray=function(){return[this._value]},e.prototype.orElse=function(n){return this},e.prototype.valueOrElse=function(n){return this._value},n.isOption=function(t){return t===n.none||t instanceof e},n.fromNullable=function(t){return null==t?n.none:new e(t)}}(o);export{o};