text: "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports.stringify=stringify;var gap,indent,_typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof")),_regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_marked=_regenerator.default.mark(quote),_marked2=_regenerator.default.mark(str),_marked3=_regenerator.default.mark(stringify),yieldCount=0;function yielder(){return yieldCount++,!!(256<yieldCount)&&(yieldCount=0,!0)}var quoteCounter=0;function quote(a){var b;return _regenerator.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(b=JSON.stringify(a),!(8&++quoteCounter&&yielder())){c.next=4;break}return void(c.next=4);case 4:return c.abrupt("return",b);case 5:case"end":return c.stop();}},_marked)}function str(a,b,c){var d,e,f,g,h,j,l,m;return _regenerator.default.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(d=c.rep,!yielder()){i.next=4;break}return void(i.next=4);case 4:j=gap,m=b[a],m&&"object"===(0,_typeof2.default)(m)&&"function"==typeof m.toJSON&&(m=m.toJSON(a)),"function"==typeof d&&(m=d.call(b,a,m)),i.t0=(0,_typeof2.default)(m),i.next="string"===i.t0?11:"number"===i.t0?13:"boolean"===i.t0?14:"null"===i.t0?14:15;break;case 11:return i.delegateYield(quote(m),"t1",12);case 12:return i.abrupt("return",i.t1);case 13:return i.abrupt("return",isFinite(m)?m+"":"null");case 14:return i.abrupt("return",m+"");case 15:if("undefined"!=typeof m){i.next=17;break}return i.abrupt("return",void 0);case 17:if(m){i.next=19;break}return i.abrupt("return","null");case 19:if(gap+=indent,l=[],"[object Array]"!==Object.prototype.toString.apply(m)){i.next=36;break}h=m.length,g="[",e=0;case 25:if(!(e<h)){i.next=35;break}return i.t2=g,i.delegateYield(str(e,m,c)||"null","t3",28);case 28:i.t4=i.t3,i.t5=i.t2+i.t4,i.t6=e===h-1?"":",",g=i.t5+i.t6;case 32:e+=1,i.next=25;break;case 35:return i.abrupt("return",g+"]");case 36:i.t7=_regenerator.default.keys(m);case 37:if((i.t8=i.t7()).done){i.next=53;break}if(f=i.t8.value,!Object.prototype.hasOwnProperty.call(m,f)){i.next=51;break}return i.delegateYield(str(f,m,c),"t9",41);case 41:if(g=i.t9,!g){i.next=51;break}return i.t10=l,i.delegateYield(quote(f),"t11",45);case 45:i.t12=i.t11,i.t13=gap?": ":":",i.t14=i.t12+i.t13,i.t15=g,i.t16=i.t14+i.t15,i.t10.push.call(i.t10,i.t16);case 51:i.next=37;break;case 53:return g=0===l.length?"{}":gap?"{\n"+gap+l.join(",\n"+gap)+"\n"+j+"}":"{"+l.join(",")+"}",gap=j,i.abrupt("return",g);case 56:case"end":return i.stop();}},_marked2)}function stringify(a,b){return _regenerator.default.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(gap="",indent="",!(b&&"function"!=typeof b&&("object"!==(0,_typeof2.default)(b)||"number"!=typeof b.length))){c.next=4;break}throw new Error("JSON.stringify");case 4:return c.delegateYield(str("",{"":a},{rep:b}),"t0",5);case 5:return c.abrupt("return",c.t0);case 6:case"end":return c.stop();}},_marked3)}