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

  var _req, _req2, _req3, _req4, _req5, _req6, _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) {
      _loader = _unresolved_7.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        var require = _loader.createRequireWithReqMap({
          "../internals/export": _req,
          "../internals/global": _req2,
          "../internals/get-built-in": _req3,
          "../internals/function-apply": _req4,
          "../internals/function-uncurry-this": _req5,
          "../internals/fails": _req6
        }, _require);

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

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

          var getBuiltIn = require('../internals/get-built-in');

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

          var uncurryThis = require('../internals/function-uncurry-this');

          var fails = require('../internals/fails');

          var Array = global.Array;
          var $stringify = getBuiltIn('JSON', 'stringify');
          var exec = uncurryThis(/./.exec);
          var charAt = uncurryThis(''.charAt);
          var charCodeAt = uncurryThis(''.charCodeAt);
          var replace = uncurryThis(''.replace);
          var numberToString = uncurryThis(1.0.toString);
          var tester = /[\uD800-\uDFFF]/g;
          var low = /^[\uD800-\uDBFF]$/;
          var hi = /^[\uDC00-\uDFFF]$/;

          var fix = function fix(match, offset, string) {
            var prev = charAt(string, offset - 1);
            var next = charAt(string, offset + 1);

            if (exec(low, match) && !exec(hi, next) || exec(hi, match) && !exec(low, prev)) {
              return '\\u' + numberToString(charCodeAt(match, 0), 16);
            }

            return match;
          };

          var FORCED = fails(function () {
            return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"' || $stringify('\uDEAD') !== '"\\udead"';
          });

          if ($stringify) {
            // `JSON.stringify` method
            // https://tc39.es/ecma262/#sec-json.stringify
            // https://github.com/tc39/proposal-well-formed-stringify
            $({
              target: 'JSON',
              stat: true,
              forced: FORCED
            }, {
              // eslint-disable-next-line no-unused-vars -- required for `.length`
              stringify: function stringify(it, replacer, space) {
                for (var i = 0, l = arguments.length, args = Array(l); i < l; i++) {
                  args[i] = arguments[i];
                }

                var result = apply($stringify, null, args);
                return typeof result == 'string' ? replace(result, tester, fix) : result;
              }
            });
          }
        })();

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

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=es.json.stringify.js.map