{"version":3,"sources":["../ts/lib/json-stable-stringify.js"],"names":["f","exports","module","define","amd","window","global","self","this","jsonStableStringifyD","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","1","json","JSON","isArray","obj","opts","space","cmp","cycles","Array","join","replacer","key","value","node","b","aobj","bobj","seen","stringify","parent","level","indent","colonSeparator","toJSON","undefined","out","item","push","indexOf","TypeError","keys","objectKeys","sort","keyValue","","x","toString","Object","has","prototype","hasOwnProperty","jsonify","2","parse","./lib/parse","./lib/stringify","3","number","string","ch","next","isFinite","error","at","text","escapee","\"","\\","/","m","name","message","c","charAt","hex","uffff","parseInt","String","fromCharCode","white","object","array","source","reviver","result","walk","holder","k","v","4","gap","rep","escapable","meta","\b","\t","\n","\f","\r","quote","lastIndex","test","replace","charCodeAt","slice","str","partial","mind","apply"],"mappings":"AAIA,CAAA,SAAUA,GAAuB,UAAjB,OAAOC,SAAoC,aAAhB,OAAOC,OAAsBA,OAAOD,QAAQD,EAAC,EAA2B,YAAhB,OAAOG,QAAqBA,OAAOC,IAAKD,OAAO,GAAGH,CAAC,GAAgC,aAAhB,OAAOK,OAAwBA,OAA+B,aAAhB,OAAOC,OAAwBA,OAA6B,aAAd,OAAOC,KAAsBA,KAAYC,MAAOC,qBAAuBT,EAAC,CAAI,EAAE,WAAqC,OAAO,SAAUU,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,GAAG,CAACJ,EAAEG,GAAG,CAAC,GAAG,CAACJ,EAAEI,GAAG,CAAC,IAAIE,EAAkB,YAAhB,OAAOC,SAAqBA,QAAQ,GAAG,CAACF,GAAGC,EAAE,OAAOA,EAAEF,EAAE,CAAA,CAAE,EAAE,GAAGI,EAAE,OAAOA,EAAEJ,EAAE,CAAA,CAAE,EAAMf,EAAE,IAAIoB,MAAM,uBAAuBL,EAAE,GAAG,EAAE,MAAMf,EAAEqB,KAAK,mBAAmBrB,C,CAAMsB,EAAEV,EAAEG,GAAG,CAACd,QAAQ,EAAE,E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,IAC9B,MAAQA,IAAMgB,QAAQvF,KAAK,MAAQuE,GAAG,EAAI,KAAOiB,KAAO,IACxD,IAAMD,QAAQvF,KAAK,GAAG,EAAI,G,CAE9B,OADAuE,IAAMiB,KACCnB,C,CAEf,EA6Be,GAAI,CAAC5C,GAAItB,KAAK,CAAC,EALtB,MAAM,IAAIlB,MAAM,gBAAgB,CAMxC,CAEA,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAChB,CAAC","file":"json-stable-stringify.js","sourcesContent":["/*\r\n https://github.com/substack/json-stable-stringify\r\n License: MIT\r\n*/\r\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.jsonStableStringifyD = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\r\nvar json = typeof JSON !== 'undefined' ? JSON : require('jsonify');\r\n\r\nmodule.exports = function (obj, opts) {\r\n    if (!opts) opts = {};\r\n    if (typeof opts === 'function') opts = { cmp: opts };\r\n    var space = opts.space || '';\r\n    if (typeof space === 'number') space = Array(space+1).join(' ');\r\n    var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\r\n    var replacer = opts.replacer || function(key, value) { return value; };\r\n\r\n    var cmp = opts.cmp && (function (f) {\r\n        return function (node) {\r\n            return function (a, b) {\r\n                var aobj = { key: a, value: node[a] };\r\n                var bobj = { key: b, value: node[b] };\r\n                return f(aobj, bobj);\r\n            };\r\n        };\r\n    })(opts.cmp);\r\n\r\n    var seen = [];\r\n    return (function stringify (parent, key, node, level) {\r\n        var indent = space ? ('\\n' + new Array(level + 1).join(space)) : '';\r\n        var colonSeparator = space ? ': ' : ':';\r\n\r\n        if (node && node.toJSON && typeof node.toJSON === 'function') {\r\n            node = node.toJSON();\r\n        }\r\n\r\n        node = replacer.call(parent, key, node);\r\n\r\n        if (node === undefined) {\r\n            return;\r\n        }\r\n        if (typeof node !== 'object' || node === null) {\r\n            return json.stringify(node);\r\n        }\r\n        if (isArray(node)) {\r\n            var out = [];\r\n            for (var i = 0; i < node.length; i++) {\r\n                var item = stringify(node, i, node[i], level+1) || json.stringify(null);\r\n                out.push(indent + space + item);\r\n            }\r\n            return '[' + out.join(',') + indent + ']';\r\n        }\r\n        else {\r\n            if (seen.indexOf(node) !== -1) {\r\n                if (cycles) return json.stringify('__cycle__');\r\n                throw new TypeError('Converting circular structure to JSON');\r\n            }\r\n            else seen.push(node);\r\n\r\n            var keys = objectKeys(node).sort(cmp && cmp(node));\r\n            var out = [];\r\n            for (var i = 0; i < keys.length; i++) {\r\n                var key = keys[i];\r\n                var value = stringify(node, key, node[key], level+1);\r\n\r\n                if(!value) continue;\r\n\r\n                var keyValue = json.stringify(key)\r\n                    + colonSeparator\r\n                    + value;\r\n                ;\r\n                out.push(indent + space + keyValue);\r\n            }\r\n            return '{' + out.join(',') + indent + '}';\r\n        }\r\n    })({ '': obj }, '', obj, 0);\r\n};\r\n\r\nvar isArray = Array.isArray || function (x) {\r\n    return {}.toString.call(x) === '[object Array]';\r\n};\r\n\r\nvar objectKeys = Object.keys || function (obj) {\r\n    var has = Object.prototype.hasOwnProperty || function () { return true };\r\n    var keys = [];\r\n    for (var key in obj) {\r\n        if (has.call(obj, key)) keys.push(key);\r\n    }\r\n    return keys;\r\n};\r\n\r\n},{\"jsonify\":2}],2:[function(require,module,exports){\r\nexports.parse = require('./lib/parse');\r\nexports.stringify = require('./lib/stringify');\r\n\r\n},{\"./lib/parse\":3,\"./lib/stringify\":4}],3:[function(require,module,exports){\r\nvar at, // The index of the current character\r\n    ch, // The current character\r\n    escapee = {\r\n        '\"':  '\"',\r\n        '\\\\': '\\\\',\r\n        '/':  '/',\r\n        b:    '\\b',\r\n        f:    '\\f',\r\n        n:    '\\n',\r\n        r:    '\\r',\r\n        t:    '\\t'\r\n    },\r\n    text,\r\n\r\n    error = function (m) {\r\n        // Call error when something is wrong.\r\n        throw {\r\n            name:    'SyntaxError',\r\n            message: m,\r\n            at:      at,\r\n            text:    text\r\n        };\r\n    },\r\n    \r\n    next = function (c) {\r\n        // If a c parameter is provided, verify that it matches the current character.\r\n        if (c && c !== ch) {\r\n            error(\"Expected '\" + c + \"' instead of '\" + ch + \"'\");\r\n        }\r\n        \r\n        // Get the next character. When there are no more characters,\r\n        // return the empty string.\r\n        \r\n        ch = text.charAt(at);\r\n        at += 1;\r\n        return ch;\r\n    },\r\n    \r\n    number = function () {\r\n        // Parse a number value.\r\n        var number,\r\n            string = '';\r\n        \r\n        if (ch === '-') {\r\n            string = '-';\r\n            next('-');\r\n        }\r\n        while (ch >= '0' && ch <= '9') {\r\n            string += ch;\r\n            next();\r\n        }\r\n        if (ch === '.') {\r\n            string += '.';\r\n            while (next() && ch >= '0' && ch <= '9') {\r\n                string += ch;\r\n            }\r\n        }\r\n        if (ch === 'e' || ch === 'E') {\r\n            string += ch;\r\n            next();\r\n            if (ch === '-' || ch === '+') {\r\n                string += ch;\r\n                next();\r\n            }\r\n            while (ch >= '0' && ch <= '9') {\r\n                string += ch;\r\n                next();\r\n            }\r\n        }\r\n        number = +string;\r\n        if (!isFinite(number)) {\r\n            error(\"Bad number\");\r\n        } else {\r\n            return number;\r\n        }\r\n    },\r\n    \r\n    string = function () {\r\n        // Parse a string value.\r\n        var hex,\r\n            i,\r\n            string = '',\r\n            uffff;\r\n        \r\n        // When parsing for string values, we must look for \" and \\ characters.\r\n        if (ch === '\"') {\r\n            while (next()) {\r\n                if (ch === '\"') {\r\n                    next();\r\n                    return string;\r\n                } else if (ch === '\\\\') {\r\n                    next();\r\n                    if (ch === 'u') {\r\n                        uffff = 0;\r\n                        for (i = 0; i < 4; i += 1) {\r\n                            hex = parseInt(next(), 16);\r\n                            if (!isFinite(hex)) {\r\n                                break;\r\n                            }\r\n                            uffff = uffff * 16 + hex;\r\n                        }\r\n                        string += String.fromCharCode(uffff);\r\n                    } else if (typeof escapee[ch] === 'string') {\r\n                        string += escapee[ch];\r\n                    } else {\r\n                        break;\r\n                    }\r\n                } else {\r\n                    string += ch;\r\n                }\r\n            }\r\n        }\r\n        error(\"Bad string\");\r\n    },\r\n\r\n    white = function () {\r\n\r\n// Skip whitespace.\r\n\r\n        while (ch && ch <= ' ') {\r\n            next();\r\n        }\r\n    },\r\n\r\n    word = function () {\r\n\r\n// true, false, or null.\r\n\r\n        switch (ch) {\r\n        case 't':\r\n            next('t');\r\n            next('r');\r\n            next('u');\r\n            next('e');\r\n            return true;\r\n        case 'f':\r\n            next('f');\r\n            next('a');\r\n            next('l');\r\n            next('s');\r\n            next('e');\r\n            return false;\r\n        case 'n':\r\n            next('n');\r\n            next('u');\r\n            next('l');\r\n            next('l');\r\n            return null;\r\n        }\r\n        error(\"Unexpected '\" + ch + \"'\");\r\n    },\r\n\r\n    value,  // Place holder for the value function.\r\n\r\n    array = function () {\r\n\r\n// Parse an array value.\r\n\r\n        var array = [];\r\n\r\n        if (ch === '[') {\r\n            next('[');\r\n            white();\r\n            if (ch === ']') {\r\n                next(']');\r\n                return array;   // empty array\r\n            }\r\n            while (ch) {\r\n                array.push(value());\r\n                white();\r\n                if (ch === ']') {\r\n                    next(']');\r\n                    return array;\r\n                }\r\n                next(',');\r\n                white();\r\n            }\r\n        }\r\n        error(\"Bad array\");\r\n    },\r\n\r\n    object = function () {\r\n\r\n// Parse an object value.\r\n\r\n        var key,\r\n            object = {};\r\n\r\n        if (ch === '{') {\r\n            next('{');\r\n            white();\r\n            if (ch === '}') {\r\n                next('}');\r\n                return object;   // empty object\r\n            }\r\n            while (ch) {\r\n                key = string();\r\n                white();\r\n                next(':');\r\n                if (Object.hasOwnProperty.call(object, key)) {\r\n                    error('Duplicate key \"' + key + '\"');\r\n                }\r\n                object[key] = value();\r\n                white();\r\n                if (ch === '}') {\r\n                    next('}');\r\n                    return object;\r\n                }\r\n                next(',');\r\n                white();\r\n            }\r\n        }\r\n        error(\"Bad object\");\r\n    };\r\n\r\nvalue = function () {\r\n\r\n// Parse a JSON value. It could be an object, an array, a string, a number,\r\n// or a word.\r\n\r\n    white();\r\n    switch (ch) {\r\n    case '{':\r\n        return object();\r\n    case '[':\r\n        return array();\r\n    case '\"':\r\n        return string();\r\n    case '-':\r\n        return number();\r\n    default:\r\n        return ch >= '0' && ch <= '9' ? number() : word();\r\n    }\r\n};\r\n\r\n// Return the json_parse function. It will have access to all of the above\r\n// functions and variables.\r\n\r\nmodule.exports = function (source, reviver) {\r\n    var result;\r\n    \r\n    text = source;\r\n    at = 0;\r\n    ch = ' ';\r\n    result = value();\r\n    white();\r\n    if (ch) {\r\n        error(\"Syntax error\");\r\n    }\r\n\r\n    // If there is a reviver function, we recursively walk the new structure,\r\n    // passing each name/value pair to the reviver function for possible\r\n    // transformation, starting with a temporary root object that holds the result\r\n    // in an empty key. If there is not a reviver function, we simply return the\r\n    // result.\r\n\r\n    return typeof reviver === 'function' ? (function walk(holder, key) {\r\n        var k, v, value = holder[key];\r\n        if (value && typeof value === 'object') {\r\n            for (k in value) {\r\n                if (Object.prototype.hasOwnProperty.call(value, k)) {\r\n                    v = walk(value, k);\r\n                    if (v !== undefined) {\r\n                        value[k] = v;\r\n                    } else {\r\n                        delete value[k];\r\n                    }\r\n                }\r\n            }\r\n        }\r\n        return reviver.call(holder, key, value);\r\n    }({'': result}, '')) : result;\r\n};\r\n\r\n},{}],4:[function(require,module,exports){\r\nvar cx = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\r\n    escapable = /[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\r\n    gap,\r\n    indent,\r\n    meta = {    // table of character substitutions\r\n        '\\b': '\\\\b',\r\n        '\\t': '\\\\t',\r\n        '\\n': '\\\\n',\r\n        '\\f': '\\\\f',\r\n        '\\r': '\\\\r',\r\n        '\"' : '\\\\\"',\r\n        '\\\\': '\\\\\\\\'\r\n    },\r\n    rep;\r\n\r\nfunction quote(string) {\r\n    // If the string contains no control characters, no quote characters, and no\r\n    // backslash characters, then we can safely slap some quotes around it.\r\n    // Otherwise we must also replace the offending characters with safe escape\r\n    // sequences.\r\n    \r\n    escapable.lastIndex = 0;\r\n    return escapable.test(string) ? '\"' + string.replace(escapable, function (a) {\r\n        var c = meta[a];\r\n        return typeof c === 'string' ? c :\r\n            '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\r\n    }) + '\"' : '\"' + string + '\"';\r\n}\r\n\r\nfunction str(key, holder) {\r\n    // Produce a string from holder[key].\r\n    var i,          // The loop counter.\r\n        k,          // The member key.\r\n        v,          // The member value.\r\n        length,\r\n        mind = gap,\r\n        partial,\r\n        value = holder[key];\r\n    \r\n    // If the value has a toJSON method, call it to obtain a replacement value.\r\n    if (value && typeof value === 'object' &&\r\n            typeof value.toJSON === 'function') {\r\n        value = value.toJSON(key);\r\n    }\r\n    \r\n    // If we were called with a replacer function, then call the replacer to\r\n    // obtain a replacement value.\r\n    if (typeof rep === 'function') {\r\n        value = rep.call(holder, key, value);\r\n    }\r\n    \r\n    // What happens next depends on the value's type.\r\n    switch (typeof value) {\r\n        case 'string':\r\n            return quote(value);\r\n        \r\n        case 'number':\r\n            // JSON numbers must be finite. Encode non-finite numbers as null.\r\n            return isFinite(value) ? String(value) : 'null';\r\n        \r\n        case 'boolean':\r\n        case 'null':\r\n            // If the value is a boolean or null, convert it to a string. Note:\r\n            // typeof null does not produce 'null'. The case is included here in\r\n            // the remote chance that this gets fixed someday.\r\n            return String(value);\r\n            \r\n        case 'object':\r\n            if (!value) return 'null';\r\n            gap += indent;\r\n            partial = [];\r\n            \r\n            // Array.isArray\r\n            if (Object.prototype.toString.apply(value) === '[object Array]') {\r\n                length = value.length;\r\n                for (i = 0; i < length; i += 1) {\r\n                    partial[i] = str(i, value) || 'null';\r\n                }\r\n                \r\n                // Join all of the elements together, separated with commas, and\r\n                // wrap them in brackets.\r\n                v = partial.length === 0 ? '[]' : gap ?\r\n                    '[\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + ']' :\r\n                    '[' + partial.join(',') + ']';\r\n                gap = mind;\r\n                return v;\r\n            }\r\n            \r\n            // If the replacer is an array, use it to select the members to be\r\n            // stringified.\r\n            if (rep && typeof rep === 'object') {\r\n                length = rep.length;\r\n                for (i = 0; i < length; i += 1) {\r\n                    k = rep[i];\r\n                    if (typeof k === 'string') {\r\n                        v = str(k, value);\r\n                        if (v) {\r\n                            partial.push(quote(k) + (gap ? ': ' : ':') + v);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            else {\r\n                // Otherwise, iterate through all of the keys in the object.\r\n                for (k in value) {\r\n                    if (Object.prototype.hasOwnProperty.call(value, k)) {\r\n                        v = str(k, value);\r\n                        if (v) {\r\n                            partial.push(quote(k) + (gap ? ': ' : ':') + v);\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            \r\n        // Join all of the member texts together, separated with commas,\r\n        // and wrap them in braces.\r\n\r\n        v = partial.length === 0 ? '{}' : gap ?\r\n            '{\\n' + gap + partial.join(',\\n' + gap) + '\\n' + mind + '}' :\r\n            '{' + partial.join(',') + '}';\r\n        gap = mind;\r\n        return v;\r\n    }\r\n}\r\n\r\nmodule.exports = function (value, replacer, space) {\r\n    var i;\r\n    gap = '';\r\n    indent = '';\r\n    \r\n    // If the space parameter is a number, make an indent string containing that\r\n    // many spaces.\r\n    if (typeof space === 'number') {\r\n        for (i = 0; i < space; i += 1) {\r\n            indent += ' ';\r\n        }\r\n    }\r\n    // If the space parameter is a string, it will be used as the indent string.\r\n    else if (typeof space === 'string') {\r\n        indent = space;\r\n    }\r\n\r\n    // If there is a replacer, it must be a function or an array.\r\n    // Otherwise, throw an error.\r\n    rep = replacer;\r\n    if (replacer && typeof replacer !== 'function'\r\n    && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {\r\n        throw new Error('JSON.stringify');\r\n    }\r\n    \r\n    // Make a fake root object containing our value under the key of ''.\r\n    // Return the result of stringifying the value.\r\n    return str('', {'': value});\r\n};\r\n\r\n},{}]},{},[1])(1)\r\n});"]}