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