"use strict";var to_ascii="undefined"==typeof atob?function(e){return new Buffer(e,"base64").toString()}:atob,to_base64="undefined"==typeof btoa?function(e){return new Buffer(e).toString("base64")}:btoa;function read_source_map(e){var a=/\n\/\/# sourceMappingURL=data:application\/json(;.*?)?;base64,(.*)/.exec(e);return a?to_ascii(a[2]):(AST_Node.warn("inline source map not found"),null)}function set_shorthand(e,a,n){a[e]&&n.forEach(function(n){a[n]&&("object"!=typeof a[n]&&(a[n]={}),e in a[n]||(a[n][e]=a[e]))})}function init_cache(e){e&&("props"in e?e.props instanceof Dictionary||(e.props=Dictionary.fromObject(e.props)):e.props=new Dictionary)}function to_json(e){return{props:e.props.toObject()}}function minify(e,a){var n=AST_Node.warn_function;try{var o,r=(a=defaults(a,{compress:{},ecma:void 0,ie8:!1,keep_classnames:void 0,keep_fnames:!1,mangle:{},nameCache:null,output:{},parse:{},rename:void 0,safari10:!1,sourceMap:!1,timings:!1,toplevel:!1,warnings:!1,wrap:!1},!0)).timings&&{start:Date.now()};void 0===a.keep_classnames&&(a.keep_classnames=a.keep_fnames),void 0===a.rename&&(a.rename=a.compress&&a.mangle),set_shorthand("ecma",a,["parse","compress","output"]),set_shorthand("ie8",a,["compress","mangle","output"]),set_shorthand("keep_classnames",a,["compress","mangle"]),set_shorthand("keep_fnames",a,["compress","mangle"]),set_shorthand("safari10",a,["mangle","output"]),set_shorthand("toplevel",a,["compress","mangle"]),set_shorthand("warnings",a,["compress"]),a.mangle&&(a.mangle=defaults(a.mangle,{cache:a.nameCache&&(a.nameCache.vars||{}),eval:!1,ie8:!1,keep_classnames:!1,keep_fnames:!1,properties:!1,reserved:[],safari10:!1,toplevel:!1},!0),a.mangle.properties&&("object"!=typeof a.mangle.properties&&(a.mangle.properties={}),a.mangle.properties.keep_quoted&&(o=a.mangle.properties.reserved,Array.isArray(o)||(o=[]),a.mangle.properties.reserved=o),!a.nameCache||"cache"in a.mangle.properties||(a.mangle.properties.cache=a.nameCache.props||{})),init_cache(a.mangle.cache),init_cache(a.mangle.properties.cache)),a.sourceMap&&(a.sourceMap=defaults(a.sourceMap,{content:null,filename:null,includeSources:!1,root:null,url:null},!0));var t,s=[];if(a.warnings&&!AST_Node.warn_function&&(AST_Node.warn_function=function(e){s.push(e)}),r&&(r.parse=Date.now()),e instanceof AST_Toplevel)t=e;else{for(var p in"string"==typeof e&&(e=[e]),a.parse=a.parse||{},a.parse.toplevel=null,e)if(HOP(e,p)&&(a.parse.filename=p,a.parse.toplevel=parse(e[p],a.parse),a.sourceMap&&"inline"==a.sourceMap.content)){if(Object.keys(e).length>1)throw new Error("inline source map only works with singular input");a.sourceMap.content=read_source_map(e[p])}t=a.parse.toplevel}o&&reserve_quoted_keys(t,o),a.wrap&&(t=t.wrap_commonjs(a.wrap)),r&&(r.rename=Date.now()),r&&(r.compress=Date.now()),a.compress&&(t=new Compressor(a.compress).compress(t)),r&&(r.scope=Date.now()),a.mangle&&t.figure_out_scope(a.mangle),r&&(r.mangle=Date.now()),a.mangle&&(base54.reset(),t.compute_char_frequency(a.mangle),t.mangle_names(a.mangle)),r&&(r.properties=Date.now()),a.mangle&&a.mangle.properties&&(t=mangle_properties(t,a.mangle.properties)),r&&(r.output=Date.now());var c={};if(a.output.ast&&(c.ast=t),!HOP(a.output,"code")||a.output.code){if(a.sourceMap&&("string"==typeof a.sourceMap.content&&(a.sourceMap.content=JSON.parse(a.sourceMap.content)),a.output.source_map=SourceMap({file:a.sourceMap.filename,orig:a.sourceMap.content,root:a.sourceMap.root}),a.sourceMap.includeSources)){if(e instanceof AST_Toplevel)throw new Error("original source content unavailable");for(var p in e)HOP(e,p)&&a.output.source_map.get().setSourceContent(p,e[p])}delete a.output.ast,delete a.output.code;var i=OutputStream(a.output);t.print(i),c.code=i.get(),a.sourceMap&&(c.map=a.output.source_map.toString(),"inline"==a.sourceMap.url?c.code+="\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+to_base64(c.map):a.sourceMap.url&&(c.code+="\n//# sourceMappingURL="+a.sourceMap.url))}return a.nameCache&&a.mangle&&(a.mangle.cache&&(a.nameCache.vars=to_json(a.mangle.cache)),a.mangle.properties&&a.mangle.properties.cache&&(a.nameCache.props=to_json(a.mangle.properties.cache))),r&&(r.end=Date.now(),c.timings={parse:.001*(r.rename-r.parse),rename:.001*(r.compress-r.rename),compress:.001*(r.scope-r.compress),scope:.001*(r.mangle-r.scope),mangle:.001*(r.properties-r.mangle),properties:.001*(r.output-r.properties),output:.001*(r.end-r.output),total:.001*(r.end-r.start)}),s.length&&(c.warnings=s),c}catch(e){return{error:e}}finally{AST_Node.warn_function=n}}