System.register(["__unresolved_0", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  "use strict";

  var _req, _req2, _req3, _req4, _req5, _req6, _req7, _loader, _cjsExports, __cjsMetaURL;

  _export("default", void 0);

  return {
    setters: [function (_unresolved_) {
      _req = _unresolved_.__cjsMetaURL;
    }, function (_unresolved_2) {
      _req2 = _unresolved_2.__cjsMetaURL;
    }, function (_unresolved_3) {
      _req3 = _unresolved_3.__cjsMetaURL;
    }, function (_unresolved_4) {
      _req4 = _unresolved_4.__cjsMetaURL;
    }, function (_unresolved_5) {
      _req5 = _unresolved_5.__cjsMetaURL;
    }, function (_unresolved_6) {
      _req6 = _unresolved_6.__cjsMetaURL;
    }, function (_unresolved_7) {
      _req7 = _unresolved_7.__cjsMetaURL;
    }, function (_unresolved_8) {
      _loader = _unresolved_8.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        let require = _loader.createRequireWithReqMap({
          "../internals/global": _req,
          "../internals/function-call": _req2,
          "../internals/is-object": _req3,
          "../internals/is-symbol": _req4,
          "../internals/get-method": _req5,
          "../internals/ordinary-to-primitive": _req6,
          "../internals/well-known-symbol": _req7
        }, _require);

        (function () {
          var global = require('../internals/global');

          var call = require('../internals/function-call');

          var isObject = require('../internals/is-object');

          var isSymbol = require('../internals/is-symbol');

          var getMethod = require('../internals/get-method');

          var ordinaryToPrimitive = require('../internals/ordinary-to-primitive');

          var wellKnownSymbol = require('../internals/well-known-symbol');

          var TypeError = global.TypeError;
          var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
          // https://tc39.es/ecma262/#sec-toprimitive

          module.exports = function (input, pref) {
            if (!isObject(input) || isSymbol(input)) return input;
            var exoticToPrim = getMethod(input, TO_PRIMITIVE);
            var result;

            if (exoticToPrim) {
              if (pref === undefined) pref = 'default';
              result = call(exoticToPrim, input, pref);
              if (!isObject(result) || isSymbol(result)) return result;
              throw TypeError("Can't convert object to primitive value");
            }

            if (pref === undefined) pref = 'number';
            return ordinaryToPrimitive(input, pref);
          };
        })();

        _export("default", _cjsExports = module.exports);
      });

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=to-primitive.js.map